uwsampa / accept

an approximate compiler
http://accept.rocks
MIT License
37 stars 14 forks source link

Target Zynq and NPU #17

Closed sampsyo closed 10 years ago

sampsyo commented 10 years ago

We need to add the Zynq (ARM + FPGA) platform as a target for the ACCEPT toolchain.

This involves:


Instructions from Thierry for running benchmarks on the Zynq:

  1. ssh into sampa-gw.cs.washington.edu
    1. ssh sampa-gw.cs.washington.edu
  2. from there, ssh into pinga
    1. ssh pinga
  3. source the xilinx settings script
    1. . /sampa/share/Xilinx/14.6/14.6/ISE_DS/settings64.sh
  4. go to the following directory
    1. cd /sampa/share/thierry/benchmarks/boot_files
  5. to run a benchmark, type the following (replace inversek2j with the benchmark of your choice)
    1.  make inversek2j
    2. 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
    3. 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).
  6. to read the output, go to the mini com_logs directory. 
    1. cd /sampa/share/thierry/minicom_logs
  7. each output is timestamped with the current time the benchmark was running
    1. 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:

arm-xilinx-eabi-gcc -Wl,-T -Wl,../lib/lscript.ld -L ../lib/bsp/lib inversek2j.s -o inversek2j.elf -Wl,--start-group,-lxil,-lgcc,-lc,-lm,--end-group

much like the msp430 workflow we have now.

sampsyo commented 10 years ago

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.

sampsyo commented 10 years ago

All ready. Need to merge in the NPU branch so we can actually run the experiments.