Skip to content

Commit 045d2f0

Browse files
Virat Agarwalheeran-xilinx
authored andcommitted
New sprite changes (#420)
1 parent cc54606 commit 045d2f0

File tree

111 files changed

+2016
-54
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+2016
-54
lines changed

common/utility/makefile_gen/makegen.py

Lines changed: 68 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -392,8 +392,71 @@ def mk_check(target, data):
392392
target.write("############################## Setting Essential Checks and Running Rules ##############################\n")
393393

394394
target.write("check: all\n")
395-
if "ndevice" in data:
396-
for board in data["ndevice"]:
395+
if "platform_blacklist" in data:
396+
for board in data["platform_blacklist"]:
397+
target.write("ifeq ($(findstring ")
398+
target.write(board)
399+
target.write(", $(DEVICE)), ")
400+
target.write(board)
401+
target.write(")\n")
402+
target.write("$(error This example is not supported for $(DEVICE))\n")
403+
target.write("endif\n")
404+
target.write("\n")
405+
target.write("ifeq ($(TARGET),$(filter $(TARGET),sw_emu hw_emu))\n")
406+
target.write("ifeq ($(HOST_ARCH), x86)\n")
407+
target.write("\t$(CP) $(EMCONFIG_DIR)/emconfig.json .\n")
408+
target.write("\tXCL_EMULATION_MODE=$(TARGET) ./$(EXECUTABLE)")
409+
410+
if "launch" in data:
411+
if "cmd_args" in data["launch"][0]:
412+
args = data["launch"][0]["cmd_args"].split(" ")
413+
for arg in args[0:]:
414+
target.write(" ")
415+
arg = arg.replace('BUILD', '$(BUILD_DIR)')
416+
arg = arg.replace('PROJECT', '.')
417+
target.write(arg)
418+
target.write("\nelse\n")
419+
target.write("\t$(ABS_COMMON_REPO)/common/utility/run_emulation.pl \"./${LAUNCH_EMULATOR} | tee run_app.log\" \"./${RUN_APP_SCRIPT} $(TARGET)\" \"${RESULT_STRING}\" \"7\"")
420+
if "containers" in data:
421+
target.write("\n")
422+
else:
423+
target.write(" -ps-only\n")
424+
target.write("endif\n")
425+
target.write("else\n")
426+
target.write("ifeq ($(HOST_ARCH), x86)\n")
427+
target.write("\t./$(EXECUTABLE)")
428+
429+
if "launch" in data:
430+
if "cmd_args" in data["launch"][0]:
431+
args = data["launch"][0]["cmd_args"].split(" ")
432+
for arg in args[0:]:
433+
target.write(" ")
434+
arg = arg.replace('BUILD', '$(BUILD_DIR)')
435+
arg = arg.replace('PROJECT', '.')
436+
target.write(arg)
437+
target.write("\nendif\n")
438+
target.write("endif\n")
439+
if "targets" in data:
440+
target.write("ifneq ($(TARGET),$(findstring $(TARGET),")
441+
args = data["targets"]
442+
for arg in args:
443+
target.write(" ")
444+
target.write(arg)
445+
target.write("))\n")
446+
target.write("$(warning WARNING:Application supports only")
447+
for arg in args:
448+
target.write(" ")
449+
target.write(arg)
450+
target.write(" TARGET. Please use the target for running the application)\n")
451+
target.write("endif\n")
452+
target.write("\n\n")
453+
454+
def mk_run(target, data):
455+
target.write("############################## Setting Essential Checks and Running Rules ##############################\n")
456+
457+
target.write("run: all\n")
458+
if "platform_blacklist" in data:
459+
for board in data["platform_blacklist"]:
397460
target.write("ifeq ($(findstring ")
398461
target.write(board)
399462
target.write(", $(DEVICE)), ")
@@ -507,6 +570,7 @@ def mk_check(target, data):
507570
target.write("\n")
508571
target.write("\n\n")
509572

573+
def mk_sdcard(target, data):
510574
target.write("############################## Preparing sdcard ##############################\n")
511575
target.write("sd_card: gen_run_app\n")
512576
extra_file_list = []
@@ -735,6 +799,8 @@ def create_mk(target, data):
735799
add_containers(target, data)
736800
mk_build_all(target, data)
737801
mk_check(target, data)
802+
mk_run(target, data)
803+
mk_sdcard(target, data)
738804
mk_clean(target,data)
739805
return
740806

cpp_kernels/array_partition/Makefile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,22 @@ ifeq ($(HOST_ARCH), x86)
141141
endif
142142
endif
143143

144+
145+
############################## Setting Essential Checks and Running Rules ##############################
146+
run: all
147+
ifeq ($(TARGET),$(filter $(TARGET),sw_emu hw_emu))
148+
ifeq ($(HOST_ARCH), x86)
149+
$(CP) $(EMCONFIG_DIR)/emconfig.json .
150+
XCL_EMULATION_MODE=$(TARGET) ./$(EXECUTABLE) $(BUILD_DIR)/matmul.xclbin
151+
else
152+
$(ABS_COMMON_REPO)/common/utility/run_emulation.pl "./${LAUNCH_EMULATOR} | tee run_app.log" "./${RUN_APP_SCRIPT} $(TARGET)" "${RESULT_STRING}" "7"
153+
endif
154+
else
155+
ifeq ($(HOST_ARCH), x86)
156+
./$(EXECUTABLE) $(BUILD_DIR)/matmul.xclbin
157+
endif
158+
endif
159+
144160
.PHONY: test
145161
test: $(EXECUTABLE)
146162
ifeq ($(TARGET),$(filter $(TARGET),sw_emu hw_emu))

cpp_kernels/bind_op_storage/Makefile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,22 @@ ifeq ($(HOST_ARCH), x86)
137137
endif
138138
endif
139139

140+
141+
############################## Setting Essential Checks and Running Rules ##############################
142+
run: all
143+
ifeq ($(TARGET),$(filter $(TARGET),sw_emu hw_emu))
144+
ifeq ($(HOST_ARCH), x86)
145+
$(CP) $(EMCONFIG_DIR)/emconfig.json .
146+
XCL_EMULATION_MODE=$(TARGET) ./$(EXECUTABLE) $(BUILD_DIR)/vadd.xclbin
147+
else
148+
$(ABS_COMMON_REPO)/common/utility/run_emulation.pl "./${LAUNCH_EMULATOR} | tee run_app.log" "./${RUN_APP_SCRIPT} $(TARGET)" "${RESULT_STRING}" "7"
149+
endif
150+
else
151+
ifeq ($(HOST_ARCH), x86)
152+
./$(EXECUTABLE) $(BUILD_DIR)/vadd.xclbin
153+
endif
154+
endif
155+
140156
.PHONY: test
141157
test: $(EXECUTABLE)
142158
ifeq ($(TARGET),$(filter $(TARGET),sw_emu hw_emu))

cpp_kernels/burst_rw/Makefile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,22 @@ ifeq ($(HOST_ARCH), x86)
138138
endif
139139
endif
140140

141+
142+
############################## Setting Essential Checks and Running Rules ##############################
143+
run: all
144+
ifeq ($(TARGET),$(filter $(TARGET),sw_emu hw_emu))
145+
ifeq ($(HOST_ARCH), x86)
146+
$(CP) $(EMCONFIG_DIR)/emconfig.json .
147+
XCL_EMULATION_MODE=$(TARGET) ./$(EXECUTABLE) $(BUILD_DIR)/vadd.xclbin
148+
else
149+
$(ABS_COMMON_REPO)/common/utility/run_emulation.pl "./${LAUNCH_EMULATOR} | tee run_app.log" "./${RUN_APP_SCRIPT} $(TARGET)" "${RESULT_STRING}" "7"
150+
endif
151+
else
152+
ifeq ($(HOST_ARCH), x86)
153+
./$(EXECUTABLE) $(BUILD_DIR)/vadd.xclbin
154+
endif
155+
endif
156+
141157
.PHONY: test
142158
test: $(EXECUTABLE)
143159
ifeq ($(TARGET),$(filter $(TARGET),sw_emu hw_emu))

cpp_kernels/critical_path/Makefile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,22 @@ ifeq ($(HOST_ARCH), x86)
142142
endif
143143
endif
144144

145+
146+
############################## Setting Essential Checks and Running Rules ##############################
147+
run: all
148+
ifeq ($(TARGET),$(filter $(TARGET),sw_emu hw_emu))
149+
ifeq ($(HOST_ARCH), x86)
150+
$(CP) $(EMCONFIG_DIR)/emconfig.json .
151+
XCL_EMULATION_MODE=$(TARGET) ./$(EXECUTABLE) -x $(BUILD_DIR)/apply_watermark_GOOD.xclbin -i ./data/input.bmp -c ./data/golden.bmp
152+
else
153+
$(ABS_COMMON_REPO)/common/utility/run_emulation.pl "./${LAUNCH_EMULATOR} | tee run_app.log" "./${RUN_APP_SCRIPT} $(TARGET)" "${RESULT_STRING}" "7"
154+
endif
155+
else
156+
ifeq ($(HOST_ARCH), x86)
157+
./$(EXECUTABLE) -x $(BUILD_DIR)/apply_watermark_GOOD.xclbin -i ./data/input.bmp -c ./data/golden.bmp
158+
endif
159+
endif
160+
145161
.PHONY: test
146162
test: $(EXECUTABLE)
147163
ifeq ($(TARGET),$(filter $(TARGET),sw_emu hw_emu))

cpp_kernels/custom_datatype/Makefile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,22 @@ ifeq ($(HOST_ARCH), x86)
141141
endif
142142
endif
143143

144+
145+
############################## Setting Essential Checks and Running Rules ##############################
146+
run: all
147+
ifeq ($(TARGET),$(filter $(TARGET),sw_emu hw_emu))
148+
ifeq ($(HOST_ARCH), x86)
149+
$(CP) $(EMCONFIG_DIR)/emconfig.json .
150+
XCL_EMULATION_MODE=$(TARGET) ./$(EXECUTABLE) -x $(BUILD_DIR)/rgb_to_hsv.xclbin -i ./data/input.bmp
151+
else
152+
$(ABS_COMMON_REPO)/common/utility/run_emulation.pl "./${LAUNCH_EMULATOR} | tee run_app.log" "./${RUN_APP_SCRIPT} $(TARGET)" "${RESULT_STRING}" "7"
153+
endif
154+
else
155+
ifeq ($(HOST_ARCH), x86)
156+
./$(EXECUTABLE) -x $(BUILD_DIR)/rgb_to_hsv.xclbin -i ./data/input.bmp
157+
endif
158+
endif
159+
144160
.PHONY: test
145161
test: $(EXECUTABLE)
146162
ifeq ($(TARGET),$(filter $(TARGET),sw_emu hw_emu))

cpp_kernels/dataflow_stream/Makefile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,22 @@ ifeq ($(HOST_ARCH), x86)
137137
endif
138138
endif
139139

140+
141+
############################## Setting Essential Checks and Running Rules ##############################
142+
run: all
143+
ifeq ($(TARGET),$(filter $(TARGET),sw_emu hw_emu))
144+
ifeq ($(HOST_ARCH), x86)
145+
$(CP) $(EMCONFIG_DIR)/emconfig.json .
146+
XCL_EMULATION_MODE=$(TARGET) ./$(EXECUTABLE) $(BUILD_DIR)/adder.xclbin
147+
else
148+
$(ABS_COMMON_REPO)/common/utility/run_emulation.pl "./${LAUNCH_EMULATOR} | tee run_app.log" "./${RUN_APP_SCRIPT} $(TARGET)" "${RESULT_STRING}" "7"
149+
endif
150+
else
151+
ifeq ($(HOST_ARCH), x86)
152+
./$(EXECUTABLE) $(BUILD_DIR)/adder.xclbin
153+
endif
154+
endif
155+
140156
.PHONY: test
141157
test: $(EXECUTABLE)
142158
ifeq ($(TARGET),$(filter $(TARGET),sw_emu hw_emu))

cpp_kernels/dataflow_stream_array/Makefile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,22 @@ ifeq ($(HOST_ARCH), x86)
138138
endif
139139
endif
140140

141+
142+
############################## Setting Essential Checks and Running Rules ##############################
143+
run: all
144+
ifeq ($(TARGET),$(filter $(TARGET),sw_emu hw_emu))
145+
ifeq ($(HOST_ARCH), x86)
146+
$(CP) $(EMCONFIG_DIR)/emconfig.json .
147+
XCL_EMULATION_MODE=$(TARGET) ./$(EXECUTABLE) $(BUILD_DIR)/N_stage_Adders.xclbin
148+
else
149+
$(ABS_COMMON_REPO)/common/utility/run_emulation.pl "./${LAUNCH_EMULATOR} | tee run_app.log" "./${RUN_APP_SCRIPT} $(TARGET)" "${RESULT_STRING}" "7"
150+
endif
151+
else
152+
ifeq ($(HOST_ARCH), x86)
153+
./$(EXECUTABLE) $(BUILD_DIR)/N_stage_Adders.xclbin
154+
endif
155+
endif
156+
141157
.PHONY: test
142158
test: $(EXECUTABLE)
143159
ifeq ($(TARGET),$(filter $(TARGET),sw_emu hw_emu))

cpp_kernels/dependence_inter/Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,26 @@ ifeq ($(HOST_ARCH), x86)
141141
endif
142142
endif
143143

144+
145+
############################## Setting Essential Checks and Running Rules ##############################
146+
run: all
147+
ifeq ($(findstring zc702, $(DEVICE)), zc702)
148+
$(error This example is not supported for $(DEVICE))
149+
endif
150+
151+
ifeq ($(TARGET),$(filter $(TARGET),sw_emu hw_emu))
152+
ifeq ($(HOST_ARCH), x86)
153+
$(CP) $(EMCONFIG_DIR)/emconfig.json .
154+
XCL_EMULATION_MODE=$(TARGET) ./$(EXECUTABLE) $(BUILD_DIR)/vconv.xclbin
155+
else
156+
$(ABS_COMMON_REPO)/common/utility/run_emulation.pl "./${LAUNCH_EMULATOR} | tee run_app.log" "./${RUN_APP_SCRIPT} $(TARGET)" "${RESULT_STRING}" "7"
157+
endif
158+
else
159+
ifeq ($(HOST_ARCH), x86)
160+
./$(EXECUTABLE) $(BUILD_DIR)/vconv.xclbin
161+
endif
162+
endif
163+
144164
.PHONY: test
145165
test: $(EXECUTABLE)
146166
ifeq ($(TARGET),$(filter $(TARGET),sw_emu hw_emu))

cpp_kernels/dependence_inter/description.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
"ndevice": [
1515
"zc702"
1616
],
17+
"platform_blacklist": [
18+
"zc702"
19+
],
1720
"os": [
1821
"Linux"
1922
],

0 commit comments

Comments
 (0)