Skip to content

Commit 05784d1

Browse files
minor fixes
1 parent facba4f commit 05784d1

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
@@ -166,7 +166,7 @@ def write_host(self, model):
166166
if '// hls-fpga-machine-learning FPGA type' in line:
167167
fpgaType = 'HbmFpga' if memoryType == 'hbm' else ('DdrFpga' if memoryType == 'ddr' else 'DdrFpga')
168168
dataType = '<float, float>' if isHwQuant else '<in_buffer_t, out_buffer_t>'
169-
newline = fpgaType + dataType + ' fpga(BATCHSIZE * INSTREAMSIZE, BATCHSIZE * OUTSTREAMSIZE, NUM_CU, NUM_THREAD, 10);'
169+
newline = '\t' + fpgaType + dataType + ' fpga(BATCHSIZE * INSTREAMSIZE, BATCHSIZE * OUTSTREAMSIZE, NUM_CU, NUM_THREAD, 10);'
170170
elif '/*IN_TYPE_CAST*/' in line:
171171
newline = line.replace('/*IN_TYPE_CAST*/', '' if isHwQuant else '(in_buffer_t)')
172172
elif '/*OUT_TYPE_CAST*/' in line:
@@ -206,8 +206,7 @@ def write_makefile(self, model):
206206
if 'myproject' in line:
207207
newline = line.replace('myproject', project_name)
208208
if 'BOARD_TYPE :=' in line:
209-
newline = line
210-
newline += board_type
209+
newline += 'BOARD_TYPE := ' + board_type + '\n'
211210
else:
212211
newline = line
213212
fout.write(newline)

0 commit comments

Comments
 (0)