@@ -51,9 +51,14 @@ $(syn_dir): $(srcs) run_hls_script.tcl
5151 @if [ ! -d " $( SNAP_ROOT) /hardware/logs" ]; then \
5252 mkdir -p $(SNAP_ROOT ) /hardware/logs; \
5353 fi
54- @echo " Compiling action with Vivado HLS ` vivado_hls -version| head -n1| cut -d " " -f 11` "
5554 @echo " Clock period used for HLS is $( HLS_ACTION_CLOCK) ns"
56- vivado_hls -f run_hls_script.tcl > $(SNAP_ROOT ) /hardware/logs/action_make.log
55+ @if [ " X$( HLS_VITIS_USED) " = " XTRUE" ]; then \
56+ echo " Compiling action with Vitis HLS ` vitis_hls -version| head -n1| cut -d " " -f 11` " ; \
57+ vitis_hls -f run_hls_script.tcl > $(SNAP_ROOT ) /hardware/logs/action_make.log; \
58+ else \
59+ echo " Compiling action with Vivado HLS ` vivado_hls -version| head -n1| cut -d " " -f 11` " ; \
60+ vivado_hls -f run_hls_script.tcl > $(SNAP_ROOT ) /hardware/logs/action_make.log; \
61+ fi
5762 $(RM ) -rf $@ /systemc $@ /verilog
5863
5964# Create symlinks for simpler access
@@ -76,29 +81,28 @@ $(SOLUTION_NAME): $(objs)
7681
7782# FIXME That those things are not resulting in an error is problematic.
7883# If we get critical warnings we stay away from continuing now,
79- # since that will according to our experience with vivado_hls , lead
84+ # since that will according to our experience with vivado/vitis_hls , lead
8085# to strange problems later on. So let us work on fixing the design
8186# if they occur. Rather than challenging our luck.
8287#
8388# Check that last HLS compilation of the action was done with the same clock period. Exit if occurs.
8489# Check for CRITICAL warnings and exit if those occur. Add more if needed.
8590# Check for critical warnings and exit if those occur. Add more if needed.
8691# Check for reserved HLS MMIO reg at offset 0x17c.
87- #
92+
8893check : $(syn_dir )
89- @if [ X$( HLS_ACTION_CLOCK) != X$( shell grep " Setting up clock" vivado_hls.log | cut -d " " -f 12| cut -d " n" -f 1) ]; then \
90- echo " ---------------------------------------------------------- " ; \
91- echo " ERROR: Action was last compiled with a different HLS clock." ; \
92- echo " Please force the recompilation with a 'make clean' command" ; \
93- echo " ---------------------------------------------------------- " ; exit -1; \
94+ @if [ " ${HLS_ACTION_CLOCK} " != " ${shell grep " Setting up clock" * _hls.log |cut -d " " -f 12|cut -d " n" -f 1} " ]; then \
95+ echo " ERROR with Vivado/Vitis HLS. HLS Action was last compiled with a different HLS clock." ; \
96+ echo " Please force the recompilation with a 'make clean' command" ; \
97+ echo " ---------------------------------------------------------- " ; exit 1; \
9498 fi
9599 @echo -n " Checking for critical warnings during HLS synthesis .... "
96- @grep -A8 CRITICAL vivado_hls .log; \
100+ @grep -A8 CRITICAL * _hls .log; \
97101 test $$? = 1
98102 @echo " OK"
99103 @if [ $( HLS_ACTION_CLOCK) == $( HLS_ACTION_CLOCK_DEFAULT) ]; then \
100104 echo -n " Checking for critical timings during HLS synthesis .... " ; \
101- grep -A8 critical vivado_hls .log; \
105+ grep -A8 critical *_hls .log; \
102106 if [ $$? -eq 0 ]; then \
103107 echo "------------------------------------------------------------------ "; \
104108 echo "TIMING ERROR : Please correct your action code before going further"!; \
@@ -113,11 +117,11 @@ check: $(syn_dir)
113117 echo " By defining a HLS clock different than the default 5ns, the automatic checking"; \
114118 echo " of the critical timings is disabled. You need to manually check them."; \
115119 echo " FYI action was compiled with following HLS clock:"; \
116- grep "Setting up clock" vivado_hls .log ; \
120+ grep "Setting up clock" *_hls .log ; \
117121 echo " --------------------------------------------------------------------------- "; \
118122 echo " please CHECK the below list (if any) for HLS synthesis critical timing .... "; \
119123 echo " --------------------------------------------------------------------------- "; \
120- grep -A8 critical vivado_hls .log ; \
124+ grep -A8 critical *_hls .log ; \
121125 echo " --------------------------------------------------------------------------- "; \
122126 if [ $$? -ne 0 ]; then \
123127 echo "OK"; \
0 commit comments