Skip to content

Commit d4294d8

Browse files
alex-yang-upennQuentin Berthet
authored andcommitted
minor fixes
1 parent 4ceb431 commit d4294d8

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

hls4ml/templates/vitis_accelerator/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ WRAPPER_NAME := kernel_wrapper
4343
# Top level build directory
4444
BUILD_DIR := ./build_$(TARGET)
4545
ifdef DEBUG
46-
BUILD_DIR += _deb
46+
BUILD_DIR := $(BUILD_DIR)_deb
4747
else
48-
BUILD_DIR += _rel
48+
BUILD_DIR := $(BUILD_DIR)_rel
4949
endif
5050

5151
# Directories for kernel synthesis
@@ -70,7 +70,7 @@ else
7070
# Optimization flags can be added here
7171
endif
7272

73-
.PHONY: all xclbin hls clean cleanhls cleanxclbin
73+
.PHONY: all xclbin hls clean cleanhls cleanxclbin ultraclean
7474

7575
all: xclbin host
7676

hls4ml/writer/vitis_accelerator_writer.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ def write_host(self, model):
167167
if '// hls-fpga-machine-learning FPGA type' in line:
168168
fpgaType = 'HbmFpga' if memoryType == 'hbm' else ('DdrFpga' if memoryType == 'ddr' else 'DdrFpga')
169169
dataType = '<float, float>' if isHwQuant else '<in_buffer_t, out_buffer_t>'
170-
newline = fpgaType + dataType + ' fpga(BATCHSIZE * INSTREAMSIZE, BATCHSIZE * OUTSTREAMSIZE, NUM_CU, NUM_THREAD, 10);'
170+
newline = '\t' + fpgaType + dataType + ' fpga(BATCHSIZE * INSTREAMSIZE, BATCHSIZE * OUTSTREAMSIZE, NUM_CU, NUM_THREAD, 10);'
171171
elif '/*IN_TYPE_CAST*/' in line:
172172
newline = line.replace('/*IN_TYPE_CAST*/', '' if isHwQuant else '(in_buffer_t)')
173173
elif '/*OUT_TYPE_CAST*/' in line:
@@ -207,8 +207,7 @@ def write_makefile(self, model):
207207
if 'myproject' in line:
208208
newline = line.replace('myproject', project_name)
209209
if 'BOARD_TYPE :=' in line:
210-
newline = line
211-
newline += board_type
210+
newline += 'BOARD_TYPE := ' + board_type + '\n'
212211
else:
213212
newline = line
214213
fout.write(newline)

0 commit comments

Comments
 (0)