-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprocedure.txt
31 lines (25 loc) · 1.74 KB
/
procedure.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Compile with:
clang -fno-discard-value-names -S -emit-llvm -o test.ll test.c
taffo -fno-discard-value-names -S -emit-llvm -o test.ll test.c
-> add -lm to use math.h
-> you may want to place "static inline" on C functions
-> use -fno-discard-value-names in clang to keep variables names in the IR
-> solve "Floating point exception" by putting a check on the divide-by-zero!
-> avoid in-place updates, TAFFO cannot handle both the range before and after the change and resorts to using floats. Use separate in_ and out_ data structures instead.
-> prevent TAFFO from generating i96 values, those are not supported in PandA!
HLS with:
/mnt/c/Users/marco/Desktop/COaT_project/PandA-Bambu/bambu-2023.1.AppImage test.ll --use-raw -v 2 --top-fname=min_max --compiler=I386_CLANG12
-> to simulate add: --simulate --simulator=VERILATOR (write the testbench in text.xml)
-> switch the top function from "internal" to "dso_local" in the IR file
-> to simulate, replace any "." with "_" in function and parameter names
-> to simulate, you need to duplicate FunctionName_tb.h:
from: /mnt/c/Users/marco/Desktop/COaT_project/Tests/<test_name>/HLS_output//verilator_beh/verilator_obj/
to: /mnt/c/Users/marco/Desktop/COaT_project/Tests/<test_name>/HLS_output//simulation/
then re-run the simulation via the .sh script
!!! -> The IR file must have the extension .ll
!!!!!!!! -> For some reason, arrays must either be passed by reference to functions or arrays
allocated withing synthesized functions must have their size STATIC at compile time
To run synthesis:
open Vivado -> tcl console -> cd/dir/pwd in HLS_output/Synthesis -> source vivado.tcl
-> run the HLS with a device like: --device-name=xc7a100t-1csg324-VVD
-> do a find&replace in vivado.tcl for "/mnt/c/"->"C:/"