This project has been created to give engineering teams the essential material required to rebuilt, test and modify a 10G SFP+ solution using the low-cost KR260 development system. At just $349, no other kit offers the combination of AMD-Xilinx MPSoC technology coupled with 10G SFP+ interface support.
10G MAC Soft-IP
The 10G IP used in this project is not free-of-charge. A free 120-day evaluation can be downloaded from the link posted in this tutorial, and your local Avnet/EBV FAE can support you in the purchase of a production license. Please ensure that you have valid 10G/25G license features in your license.dat file, and that this file is referenced in your Vivado path settings in the Vivado License Manager.
VivadoVivadoProject Regeneration
The Archive supplied with this tutorial can be unzipped in any suitable directory on your Vivado build machine. Upon opening the Vivado project you will see that there is a spurious file in the project hierarchy that can be removed prior to project compilation. Right-Click and remove this file from the project.
Vivado IPI project
With the project restored in Vivado, you can now open the IPI diagram and see how the MPSoC-PS sub-system has been augmented with the Xilinx 10G MAC IP in the PL region of the MPSoC device. Once you have built this project "as-is", you can restore the archive into a new directory and rip into the IPI design, modifying it to your own project needs.
Vivado Project Buildand.XSA export
The project is ready to build, with all the required constraints in place. Just click Generate-Bit-Stream, and make a cup of tea, coffee or lunch if your build machine needs a little more time.
The final step in Vivado is to export the.XSA file that will be used to configure the Petalinux project. In Vivado, click on File > Export > Export Hardware, and follow the instructions to export the.XSA including the bit-stream.
PetalinuxPetalinux Installationand KR260 BSP file download
If you require instructions on installing and setting up Petalinux for the first time, please refer to the excellent instructions provided by Whitney Knitter. https://www.hackster.io/whitney-knitter/vitis-petalinux-2022-1-krs-1-0-install-on-ubuntu-22-04-145c1b
Using the link in the Things section, please download the KR260 BSP file. This is required to create the base Petalinux project.
Petalinux Project build
With the Petalinux tools installed, a Shell opened and the Petalinux environment-settings script run, it's time to Create, Configure, Build and Package your new Petalinux project.
NB: The following instructions assume file locations as per my build machine, please adjust these commands to suit your build environment.
Step-1: Navigate to a directory one level above your KR260 Vivado project and run the following command
- $ petalinux-create -t project -s ~/downloads/xilinx-kr260-starterkit-v2022.1-05140151.bsp -n kr260test
With the new Petalinux Project folder "kr260test" created, it can be useful to copy the.XSA file exported from Vivado into this project folder, for easy reference.
Drop down into the new project directory you just created.
- $ cd kr260test
Configure the project using the.XSA file that you exported from the Vivado project. Your path will differ if you did not copy the.XSA to the project directory.
- $ petalinux-config --get-hw-description=kr260_starter_kit_wrapper.xsa
Whilst you are in the Configuration utility, we need to edit a few settings.
- Image Packaging Configuration ---> [ ] Copy final images to tftpboot (remove the star to disable this option).
- Subsystem AUTO Hardware Settings ---> Memory Settings ---> (0xa00000) u-boot text base address offset to memory base address
Save and Exit the configuration utility, answering Yes to any questions about installing the SDK....
With the Petalinux project Created and Configured, we need to edit one last file before we Build. In your Petalinux Project, navigate to....
/components/yocto/layers/meta-som/dynamic-layers/petalinux/ \ recipes-core/packagegroups/packagegroup-petalinux-som.bb
Edit this file to remove the k26-starter-kits \ line completely.
Removing this line allows you to include the FPGA (PL) bit stream in your boot code, where normally the Kria dev-kits expect the Linux O/S to provide the bit-stream at a later stage of system boot.
Now you can build the project.
$ petalinux-build
Boot File Generation
With the project build is complete, the following commands will create a BOOT-bin file (for the system QSPI chip) and.WIC image for the uSD-card.
NB. Copying the bit-stream file from the Vivado project to the Petalinux project keeps command lines manageable.
KR260 Programming
The most efficient method of updating the contents of the KR260 QSPI chip, is to use the Kria Boot Image Recovery Tool. This can be accessed at a fixed address on the KR260 kit (192.168.0.111:80), when the KR260 is booted with the FWUEN button held down as power is applied. Instructions on using this utility can be found here.
Use this tool to load your BOOT.bin file into partition A of the QSPI and set partition A as the Requested-Partition.
Format a uSD card (of 8GB or more) to FAT32, and then us the Balena-Etcher tool to write the.wic image to the uSD card.
KR260 Setup and Boot
- With the QSPI and uSD card programmed, populate the SFP+ cage with a loop-back module, or connect it to another 10G system. Add a JTAG-UART connection to the board and power up the system.
- A simple IFCONFIG of eth1, and we can interact with the 10G MAC.
Comments