APF9328 APF27 APF51 OPOS6UL SP FPGA configuration: Difference between revisions
From ArmadeusWiki
No edit summary |
No edit summary |
||
Line 2: | Line 2: | ||
[[Category: APF27]] | [[Category: APF27]] | ||
[[Category: APF51]] | [[Category: APF51]] | ||
[[Category: OPOS6UL_SP]] | |||
[[Category: FPGA]] | [[Category: FPGA]] | ||
Revision as of 15:35, 3 October 2025
Test bitstream
- The FPGA bitstreams are all located in the firmware/ directory of your Armadeus BSP sources:
$ ls firmware/ apf_pkg BRAMTest bus_led led PS2 PS2_Opencore servo sram_test wishbone_example Xtools
- You can make some trials with the firmware/leds/blinking_led/bin/ files.
Configuring from Linux
Please use the FPGA loader linux driver.
Configuring from uBoot
- Step 1: instal/copy your firmware to /tftpboot
- manually:
$ cp myfirmware.bin /tftpboot/apfXX-firmware.bin (where apfXX is the name of your board: apf27, apf51 or apf9328)
- using the armadeus BSP:
$ make menuconfig
Package Selection for the target ---> Armadeus specific tools/utilities --->
- specify the path to the FPGA firmware:
- manually:
[*] FPGA Firmware Firmware to install (Install a custom FPGA firmware) ---> ($(TOPDIR)/../firmware/leds/blinking_led/bin/blinking_led_apf27_200k.bit) FPGA binary file path [*] Export this file to Buildroot images folder
$ cp buildroot/output/images/* /tftpboot
- Step 2: Load FPGA firmware image file with U-Boot through Ethernet:
BIOS> tftpboot ${loadaddr} fpgafirmware.bin
fpgafirmware.bin is of course the name of your bitfile stored in your TFTP shared directory (/tftpboot/)
then you can type the c command to reconnect to the terminal
- Step 3: Test your new FPGA firmware's downloading:
- for .bin binary files
BIOS> fpga load 0 ${loadaddr} ${filesize}
- for .bit binary files
BIOS> fpga loadb 0 ${loadaddr} ${filesize}
- for .bin binary files
Using U-Boot scripts
For your convenience a set of U-Boot script to facilitate firmware management with the APF boards:
- download_firmware: assuming your firmware is in /tftpboot and name apfXX-firmware.bin (where apfXX is the name of your board apf27, apf51, apf9328..) will download the firmware in RAM with the command: run download_firmware
- flash_firmware: save the previously downloaded firmware from RAM into the flash.
- update_firmware: will execute the previous 2 scripts in sequence.
- load_firmware: read a firmware from the flash (there is dedication partition named firmware for this purpose) and load it into the FPGA.
Download and test your firmware image with:
BIOS> run download_firmware BIOS> run load_firmware
Autoloading
When you are satisfied with your firmware, you can write it in flash make it "autoloaded" at power up:
BIOS> run update_firmware BIOS> setenv firmware_autoload 1 BIOS> saveenv