Skip to content

Commit a62f4d3

Browse files
Virat Agarwalheeran-xilinx
authored andcommitted
Removing compile warnings (#401)
1 parent bcbe4aa commit a62f4d3

File tree

10 files changed

+31
-23
lines changed

10 files changed

+31
-23
lines changed

cpp_kernels/gmem_2banks/Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,12 @@ CLFLAGS += -t $(TARGET) --platform $(DEVICE) --save-temps
7878
ifneq ($(TARGET), hw)
7979
CLFLAGS += -g
8080
endif
81-
CLFLAGS += --max_memory_ports apply_watermark
81+
CLFLAGS_apply_watermark += --config ./bandwidth.ini
8282

8383

8484

8585
# Adding config files to linker
86-
LDCLFLAGS += --config apply_watermark.ini
86+
LDCLFLAGS_apply_watermark += --config apply_watermark.ini
8787
EXECUTABLE = host
8888
CMD_ARGS = $(BUILD_DIR)/apply_watermark.xclbin ./data/input.bmp ./data/golden.bmp
8989
EMCONFIG_DIR = $(TEMP_DIR)
@@ -107,10 +107,10 @@ build: check-vitis $(BINARY_CONTAINERS)
107107
# Building kernel
108108
$(TEMP_DIR)/apply_watermark.xo: src/apply_watermark.cpp
109109
mkdir -p $(TEMP_DIR)
110-
$(VPP) $(CLFLAGS) --temp_dir $(TEMP_DIR) -c -k apply_watermark -I'$(<D)' -o'$@' '$<'
110+
$(VPP) $(CLFLAGS) $(CLFLAGS_apply_watermark) --temp_dir $(TEMP_DIR) -c -k apply_watermark -I'$(<D)' -o'$@' '$<'
111111
$(BUILD_DIR)/apply_watermark.xclbin: $(BINARY_CONTAINER_apply_watermark_OBJS)
112112
mkdir -p $(BUILD_DIR)
113-
$(VPP) $(CLFLAGS) --temp_dir $(BUILD_DIR) -l $(LDCLFLAGS) -o'$@' $(+)
113+
$(VPP) $(CLFLAGS) --temp_dir $(BUILD_DIR) -l $(LDCLFLAGS) $(LDCLFLAGS_apply_watermark) -o'$@' $(+)
114114

115115
# Building Host
116116
$(EXECUTABLE): check-xrt $(HOST_SRCS) $(HOST_HDRS)
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[advanced]
2+
prop=solution.hls_pre_tcl=hls_config.tcl

cpp_kernels/gmem_2banks/description.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@
3535
]
3636
}
3737
},
38+
"v++": {
39+
"build_datafiles" : [
40+
"PROJECT/hls_config.tcl",
41+
"PROJECT/bandwidth.ini"
42+
]
43+
},
3844
"key_concepts": [
3945
"Multiple Banks"
4046
],
@@ -53,7 +59,6 @@
5359
{
5460
"accelerators": [
5561
{
56-
"max_memory_ports": "true",
5762
"compute_units": [
5863
{
5964
"arguments": [
@@ -69,7 +74,8 @@
6974
}
7075
],
7176
"name": "apply_watermark",
72-
"location": "src/apply_watermark.cpp"
77+
"location": "src/apply_watermark.cpp",
78+
"clflags": "--config PROJECT/bandwidth.ini"
7379
}
7480
],
7581
"name": "apply_watermark"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
config_interface -m_axi_auto_max_ports=true

cpp_kernels/gmem_2banks/src/apply_watermark.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -73,16 +73,6 @@ const unsigned int c_image_size =
7373

7474
extern "C" {
7575
void apply_watermark(TYPE *input, TYPE *output, int width, int height) {
76-
// Using Separate interface bundle gmem0 and gmem1 for both argument
77-
// input and output. It will allow user to create two separate interfaces
78-
// and as a result allow kernel to access both interfaces simultaneous.
79-
#pragma HLS INTERFACE m_axi port = input offset = slave bundle = gmem0
80-
#pragma HLS INTERFACE m_axi port = output offset = slave bundle = gmem1
81-
#pragma HLS INTERFACE s_axilite port = input
82-
#pragma HLS INTERFACE s_axilite port = output
83-
#pragma HLS INTERFACE s_axilite port = width
84-
#pragma HLS INTERFACE s_axilite port = height
85-
#pragma HLS INTERFACE s_axilite port = return
8676

8777
// WaterMark Image of 16x16 size
8878
int watermark[WATERMARK_HEIGHT][WATERMARK_WIDTH] = {

host/debug_profile/xrt.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
profile=true
33

44
[Emulation]
5-
launch_waveform=batch
5+
debug_mode=batch

ocl_kernels/cl_gmem_2banks/Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,12 @@ CLFLAGS += -t $(TARGET) --platform $(DEVICE) --save-temps
7878
ifneq ($(TARGET), hw)
7979
CLFLAGS += -g
8080
endif
81-
CLFLAGS += --max_memory_ports apply_watermark
81+
CLFLAGS_apply_watermark += --config ./bandwidth.ini
8282

8383

8484

8585
# Adding config files to linker
86-
LDCLFLAGS += --config apply_watermark.ini
86+
LDCLFLAGS_apply_watermark += --config apply_watermark.ini
8787
EXECUTABLE = host
8888
CMD_ARGS = $(BUILD_DIR)/apply_watermark.xclbin ./data/input.bmp ./data/golden.bmp
8989
EMCONFIG_DIR = $(TEMP_DIR)
@@ -107,10 +107,10 @@ build: check-vitis $(BINARY_CONTAINERS)
107107
# Building kernel
108108
$(TEMP_DIR)/apply_watermark.xo: src/apply_watermark.cl
109109
mkdir -p $(TEMP_DIR)
110-
$(VPP) $(CLFLAGS) --temp_dir $(TEMP_DIR) -c -k apply_watermark -I'$(<D)' -o'$@' '$<'
110+
$(VPP) $(CLFLAGS) $(CLFLAGS_apply_watermark) --temp_dir $(TEMP_DIR) -c -k apply_watermark -I'$(<D)' -o'$@' '$<'
111111
$(BUILD_DIR)/apply_watermark.xclbin: $(BINARY_CONTAINER_apply_watermark_OBJS)
112112
mkdir -p $(BUILD_DIR)
113-
$(VPP) $(CLFLAGS) --temp_dir $(BUILD_DIR) -l $(LDCLFLAGS) -o'$@' $(+)
113+
$(VPP) $(CLFLAGS) --temp_dir $(BUILD_DIR) -l $(LDCLFLAGS) $(LDCLFLAGS_apply_watermark) -o'$@' $(+)
114114

115115
# Building Host
116116
$(EXECUTABLE): check-xrt $(HOST_SRCS) $(HOST_HDRS)
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[advanced]
2+
prop=solution.hls_pre_tcl=hls_config.tcl

ocl_kernels/cl_gmem_2banks/description.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,16 @@
3535
]
3636
}
3737
},
38+
"v++": {
39+
"build_datafiles" : [
40+
"PROJECT/hls_config.tcl",
41+
"PROJECT/bandwidth.ini"
42+
]
43+
},
3844
"containers": [
3945
{
4046
"accelerators": [
4147
{
42-
"max_memory_ports": "true",
4348
"compute_units": [
4449
{
4550
"arguments": [
@@ -55,7 +60,8 @@
5560
}
5661
],
5762
"name": "apply_watermark",
58-
"location": "src/apply_watermark.cl"
63+
"location": "src/apply_watermark.cl",
64+
"clflags": "--config PROJECT/bandwidth.ini"
5965
}
6066
],
6167
"name": "apply_watermark"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
config_interface -m_axi_auto_max_ports=true

0 commit comments

Comments
 (0)