README.org 4.9 KB
Newer Older
Brad Whitlock's avatar
Brad Whitlock committed
1
#+TITLE: Ultra96v2 Acceleration Base
Brad Whitlock's avatar
initial  
Brad Whitlock committed
2

Brad Whitlock's avatar
updated    
Brad Whitlock committed
3
* Overview
Brad Whitlock's avatar
initial  
Brad Whitlock committed
4
5
Simple project to allow developing accelerated applications on
Ultra96v2 using Vitis Acceleration and PetaLinux.
Brad Whitlock's avatar
.    
Brad Whitlock committed
6

Brad Whitlock's avatar
Brad Whitlock committed
7
: Todos
Brad Whitlock's avatar
updates    
Brad Whitlock committed
8
9
10
11
12
13
14
: abstract target IP address
: gdb for sw_emu
:  tried following chapter 20 UG1393
:  host program is compiled for ARM, but trying to run on X86
:  how do you do this with QEMU?
:  seems like I got further when compiled for X86 -> dltmp issue
:  maybe some clues in lab4
Brad Whitlock's avatar
updates    
Brad Whitlock committed
15
16
17
: fix gpio leds for hw target
: generate sd_card manifest
: handle zcu102 image.ub file
Brad Whitlock's avatar
updates    
Brad Whitlock committed
18
: sstate petalinux build
Brad Whitlock's avatar
updated    
Brad Whitlock committed
19
: check that lab4 training document for sd card manifest file mods required
Brad Whitlock's avatar
updates    
Brad Whitlock committed
20
21
22
23
24
25
26
27
28
: pull make targets from zcu102_pl_ddr reference design
: add streaming example to pl
: debug host app with GDB in Qemu?
: dynamically create sd_card.manifest
: try X86 GDB debug ch20 ug1393 see if that resolves dltmp issue - nope
:  keep in mind three terminal window flow, not simple gdb
:  seems to be a python 2.7 dependency issue
:  installed python2.7-dev to get libpython2.7.so
:  that fixed xgdb startup issues, but still can't debug
Brad Whitlock's avatar
updates    
Brad Whitlock committed
29
30
31
32
33
:  x86 sysroots issue?? LD_LIBRARY_PATH?
: sw_emu from lab4 - am I missing a ton of steps with behav models?
:  look at sd_card tool help menu --emu_behav
:  might need to do more with sd_card.manifest
:
Brad Whitlock's avatar
updated    
Brad Whitlock committed
34
35

* Environment
36

Brad Whitlock's avatar
Brad Whitlock committed
37
38
39
40
41
:  edit the bin/setup.sh script to suit
:  source the bin/setup.sh script to configure environment
:   psource to source all tool settings
:   pa pop all dirs off directory stack
:   pws cd to project root directory
42

Brad Whitlock's avatar
updated    
Brad Whitlock committed
43
* Vivado Project
44

Brad Whitlock's avatar
Brad Whitlock committed
45
46
:  bin/gen-vivado-project.sh
:   uses ultra96v2-accel-base-bd.tcl
47

Brad Whitlock's avatar
Brad Whitlock committed
48
49
50
51
:  install board files
:  VIO LEDs
:  JTAG to AXI
:  VIO PL Reset
52

Brad Whitlock's avatar
Brad Whitlock committed
53
54
55
:  set_property pfm_name {vendor:boardid:name:rev} [current_project]
:  see output of validate_platform -verbose to see fields
:  or use list_property_value and list_property commands
56

Brad Whitlock's avatar
Brad Whitlock committed
57
58
:  Needed to generate output products in OOC in order to get
:  write_hw_platform command to complete sucessfully
59

Brad Whitlock's avatar
Brad Whitlock committed
60
61
:  'name' fields in the xsa appear to be set by the file name given for
:  xsa file
62

Brad Whitlock's avatar
Brad Whitlock committed
63
64
:  break out pfm interface set_parameters to an external function
:  install ultra96v2 board files
65

Brad Whitlock's avatar
Brad Whitlock committed
66
67
:  separate bd tcl and platform related commands - then easier to
:  change the hardware design
68

Brad Whitlock's avatar
updated    
Brad Whitlock committed
69
* PetaLinux Project
70

Brad Whitlock's avatar
Brad Whitlock committed
71
:  disable 96boards-sensors arduino-tools issue
72

Brad Whitlock's avatar
Brad Whitlock committed
73
74
75
76
77
78
79
80
81
82
:  build sd card img file for rufus
:  wifi credentials
:  wifi autostart
:  XILINX_XRT set to /usr
:  sstate for faster builds
:  remove extra files jffs cpio etc
:   IMAGE_FSTYPES_forcevariable in build/conf/plnxtool.conf for example
:  fsck.fat32
:   IMAGE_INSTALL_append = " dosfstools"
:  shared downloads dir
83

Brad Whitlock's avatar
updated    
Brad Whitlock committed
84
* Vitis Project
85

Brad Whitlock's avatar
Brad Whitlock committed
86
87
88
:  Install board files for u96
:  v++ options
:   debug, profile, interactive, config, save temps,
89

Brad Whitlock's avatar
Brad Whitlock committed
90
91
92
93
: I want a scripted flow here, but not sure that Makefile makes any
: sense. For the host application, it seems reasonable, but for the
: kernels not so much. Well, I guess it's not that bad. Could make the
: entire project Makefile based or cmake based...
Brad Whitlock's avatar
updates    
Brad Whitlock committed
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
* Qemu

notes from the Makefile playing with qemu

# see ug1169
# Taken from logs of running qemu on zcu102 edge platform
# Never boots, all CPU cores at 100%. Possibly an issue with image.ub
# and rootfs or just a very large rootfs, not sure
# zcu102 qemu uses ramdisk
#
# using the sd-card-image switch, and pointing to sd_card.img for a
# zcu102 app, it would boot fine. Getting closer.
#
# Changed sd_card.manifest to point to image.ub from zcu102_base
# edge platfrom as downloaded from Xilinx and that also worked
# looks like sd_card.img is dynamically generated when launch_emulator
# is run
#
# probably need to add xrt.ini to get debug data
#
# how to see xsim waveform?
#
# look into how sd_card.img is generated, may be able to add
# u96 rootfs somehow. Would make a large file for qemu to load though
#
# fix qemu_args.txt and pmu_args files - paths are wrong, but not
# sure it matters





* sd_card image

try to generate a custom sd card image (img) so that I can create a sd
partition layout that matched u96 petalinux kernel boot args and loads
rootfs from partition 2

the zcu102 image loads pretty fast and is only 512MB, so I think there
is a correlation with image size and qemu boot time. Could be
worthwhile to generate a very small image. Of course, that's what the
zcu102 image already is, so let's just use that and move on
Brad Whitlock's avatar
updates    
Brad Whitlock committed
136
l
Brad Whitlock's avatar
updates    
Brad Whitlock committed
137
138
139
140
141
142
143
144
145
146
147
148
* X86
instructions for compiling and linking are on the online docs
https://www.xilinx.com/html_docs/xilinx2019_2/vitis_doc/Chunk62438775.html#esv1560357060167
need to set XILINX_XRT=$SYSROOT/usr
XCL_EMULATION_MODE=sw_emu
can run host on x86 but core dumps

reason why cant run on x86 seems to come down to dltmp being compiled
for aarch64
* hw_emu

issue with undefined symbol remoteport_tlm in libspi.so
Brad Whitlock's avatar
updates    
Brad Whitlock committed
149
150
151
152
153
154
155
156
157
158
159
160
161
162
* gdb

u96
> gdbserver --multi :2000

docker
> aarch64-linux-gnu-gdb -x $PWS/support/gdb/debug-settings.gdbbuild/vitis/host
(gdb) run /mnt/vadd.hw.xclbin
(gdb) breakpoint hit...
(gdb) cont

watch the gdbserver window for program output

(gdb) monitor exit