-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding test steps to take the design to Hardware (VCK190 board) #69
base: 2024.2
Are you sure you want to change the base?
Changes from all commits
2783d98
094f438
bea554c
28af5f2
410f7ce
4141137
ee94939
512d5e3
46afdea
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -214,7 +214,7 @@ ${SD_CARD}: ${BUILD_DIR}/${XSA} ${PS_EXE} ${KERNEL_IMAGE} ${ROOTFS} ${STIMULUS_I | |
|
||
This target creates an `sd_card.img` that can be loaded onto a board, in this case a VCK190. The packager takes as inputs the VSS and the XSA that was generated by the linker. | ||
|
||
## Building and Running the Project | ||
## Building and Running the Project for Hardware Emulation | ||
|
||
The `Makefile` contained in this folder invokes other Makefiles in the project to build each component, then link and package the overall platform. | ||
|
||
|
@@ -265,6 +265,90 @@ Max Error: 256 | |
|
||
``` | ||
|
||
## Building and Running the Project for Hardware | ||
|
||
1. Run `make all TARGET=hw` in a terminal window to build and package the project for the target. | ||
|
||
 | ||
|
||
2. The build process will take some time. When complete, the outputs will appear in a new folder named `package`. | ||
|
||
 | ||
|
||
3. A new folder named `build_hw` will appear under `vitis` after completion of hardware build: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's not clear why you're showing the contents of the build_hw folder. |
||
|
||
 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Crop the screenshots so they only show the folder listing, instead of the whole VSCode window. |
||
|
||
 | ||
|
||
4. Prerequisites: | ||
* An sd_card.img file, generated by Vitis for the design to be tested on board | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Talk about this in step 2 above. |
||
* VCK190 Evaluation board | ||
* System Controller SD Card: may already be available with the board and plugged in. | ||
* VCK190 SD card: may already be available with the board. This is the card, where you will write the sd_card.img file generated for your design. | ||
* Connect uSD card to your laptop. If your laptop does not come with a uSD card reader slot, an USB-to-uSD card-reader may be used, assuming laptop has a USB port | ||
* For board setup please refer to (https://github.com/Xilinx/Vitis_Model_Composer/tree/2024.2/QuickGuides/Running_on_Hardware/linux). | ||
|
||
5. Now Run the command `connect com0` in the vitis terminal. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's not clear that the user needs to follow the instructions in the link above to establish a COM link to the board, before proceeding with the next steps. 'connect com0' is a Systest command and shouldn't be shown here. |
||
|
||
6. Open a new terminal and cd to the path for .pdi file. | ||
cd "the_path_for_golden_pdi_file" (You must have your .pdi file in your system) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Where do they get the pdi from? |
||
|
||
7. Type `xsdb` | ||
|
||
8. Type `conn` | ||
|
||
9. Type `ta 1` | ||
|
||
10. Type `dev p linux_prod.pdi` | ||
|
||
 | ||
|
||
10. Go back to the 1st terminal and hit any key to stop auto boot. | ||
|
||
11. Type `booti 2000000 - 1000` this command will boot the default linux. | ||
|
||
12. Now copy the image file at a specified location by using below commands: | ||
|
||
`scp sd_card.img <image_file_location>` | ||
|
||
`dd if=sd_card.img of=/dev/mmcblk0` | ||
|
||
13. Type `sync`. | ||
|
||
14. Now switch back to the 2nd terminal and type `exit` (It will exit from the xsdb). | ||
|
||
15. Type `power 0 power 1` (It will execute the power sequence of the board). | ||
|
||
16. Now switch back to 1st terminal and type `connect com0`. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 'connect com0' is a Systest command and shouldn't be shown here. |
||
|
||
17. Now go to the 2nd terminal and type `xsdb` and then type `conn`. | ||
|
||
18. Run the below commands in a sequence as shown in the figure below: | ||
|
||
ta 1 | ||
mwr -force 0xF1260200 0xE100 | ||
mrd -force 0xF1260200 | ||
after 2000 | ||
mwr -force 0xF126031C 0x8 | ||
|
||
 | ||
|
||
18. Type the command `petalinux` and then type `sudo su`. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. User needs to wait for board to boot up, log in as user 'petalinux' and set a password. |
||
|
||
19. Mount the memory location and then change the current directory by using the below commands. | ||
|
||
`mount /dev/mmcblk0p1 /mnt` | ||
|
||
`cd /mnt/` | ||
|
||
20. Type `ls` and run the executable file from the list by using the command `./embedded_exec.sh`. | ||
|
||
21. It should print the test result as shown in the below image: | ||
|
||
 | ||
|
||
|
||
## Conclusion | ||
|
||
**Congratulations!** In this tutorial, you saw how to export a heterogeneous design (AI Engine + PL) to Vitis as a Vitis Subsystem (VSS) and build a complete design targeting the board. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please mention that sd_card.img is the file that we need to run the design on the board.