You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We need to add the Zynq (ARM + FPGA) platform as a target for the ACCEPT toolchain.
This involves:
Extend app.mk to cross-compile binaries for the bare-metal ARM.
Also extend it to execute binaries using the Xilinx debugger (xmd), including sending the appropriate bitstream and possibly resetting the board with the Wemo switch.
Collect output and performance numbers through the serial log rather than the filesystem.
Make the experiments command aware of the platform it's running on so we can run x86 benchmarks on the cluster (in parallel) and Zynq experiments on pinga (in serial), and ne'er the twain shall meet.
Instructions from Thierry for running benchmarks on the Zynq:
to run a benchmark, type the following (replace inversek2j with the benchmark of your choice)
make inversek2j
this will compile the benchmark source code in BenchNN/, and will copy the elf file into the elf/ directory, program the NPU and run the binary on the NPU
if you need to run your own elf file on the NPU, change the path of the elf file in the Makefile to your own (e.g. change elf/inversek2j.elf to /sampa/share/andreolb/inversek2j.elf).
to read the output, go to the mini com_logs directory.
cd /sampa/share/thierry/minicom_logs
each output is timestamped with the current time the benchmark was running
vim minicom_14_06_09_13_42_44_inversek2j.txt
Andre's cross-compiler setup is in the npu branch's app.mk. Clang is invoked to target ARM and produce assembly files. Then gcc is used to produce the final binary:
The runtime library (previously enercrt, now acceptrt) was built with CMake
once, up front, with the rest of the toolchain. This was a bad idea because
it's platform-specific. Now it's built by app.mk, on demand for benchmarks
that need it.
The output file is tagged with the ARCH variable, so you get
`acceptrt.zynq.bc`. When ARCH is unset, it defaults to `default`, indicating
non-cross-compiling builds. I haven't tested this, but I think this should
also work for `acceptrt.msp430.bc` and such.
Wraps up the boilerplate used in Theirry's make targets as a RUNSHIM script.
The `zynqrun.sh` script takes both the bitstream file and the ELF binary to be
sent to the device.
Next step: some sort of post-processor script that will split the main output from the performance numbers. For ease of wrangling, this could use the same filename for the performance data as for the default acceptrt. It could even do the conversion to seconds from FPGA clocks.
We need to add the Zynq (ARM + FPGA) platform as a target for the ACCEPT toolchain.
This involves:
app.mk
to cross-compile binaries for the bare-metal ARM.xmd
), including sending the appropriate bitstream and possibly resetting the board with the Wemo switch.Instructions from Thierry for running benchmarks on the Zynq:
Andre's cross-compiler setup is in the npu branch's app.mk. Clang is invoked to target ARM and produce assembly files. Then gcc is used to produce the final binary:
much like the msp430 workflow we have now.
The text was updated successfully, but these errors were encountered: