From 78345d8bdf353d34f7ba6cef8a9ec44bef282d09 Mon Sep 17 00:00:00 2001 From: Blaise Tine Date: Fri, 15 Oct 2021 21:30:47 -0700 Subject: [PATCH] fixed warning messages --- hw/rtl/VX_cache_arb.v | 159 ----------------------------- runtime/src/vx_print.c | 6 +- sim/rtlsim/Makefile | 2 +- sim/vlsim/Makefile | 2 +- tests/opencl/guassian/clutils.cpp | 6 +- tests/opencl/nearn/clutils.cpp | 6 +- tests/opencl/oclprintf/Makefile | 2 +- tests/opencl/oclprintf/kernel.pocl | Bin 220195 -> 220195 bytes tests/opencl/psort/Makefile | 2 +- tests/opencl/saxpy/Makefile | 2 +- tests/opencl/saxpy/main.cc | 2 +- tests/opencl/sfilter/Makefile | 2 +- tests/opencl/sgemm/Makefile | 2 +- tests/opencl/vecadd/Makefile | 2 +- tests/runtime/simple/tests.cpp | 4 +- 15 files changed, 20 insertions(+), 179 deletions(-) delete mode 100644 hw/rtl/VX_cache_arb.v diff --git a/hw/rtl/VX_cache_arb.v b/hw/rtl/VX_cache_arb.v deleted file mode 100644 index 85800edf..00000000 --- a/hw/rtl/VX_cache_arb.v +++ /dev/null @@ -1,159 +0,0 @@ -`include "VX_define.vh" - -module VX_cache_arb #( - parameter NUM_REQS = 1, - parameter LANES = 1, - parameter DATA_SIZE = 1, - parameter TAG_IN_WIDTH = 1, - parameter TAG_SEL_IDX = 0, - parameter BUFFERED_REQ = 0, - parameter BUFFERED_RSP = 0, - parameter TYPE = "R", - - localparam ADDR_WIDTH = (32-`CLOG2(DATA_SIZE)), - localparam DATA_WIDTH = (8 * DATA_SIZE), - localparam LOG_NUM_REQS = `CLOG2(NUM_REQS), - localparam TAG_OUT_WIDTH = TAG_IN_WIDTH + LOG_NUM_REQS -) ( - input wire clk, - input wire reset, - - // input requests - input wire [NUM_REQS-1:0][LANES-1:0] req_valid_in, - input wire [NUM_REQS-1:0][LANES-1:0] req_rw_in, - input wire [NUM_REQS-1:0][LANES-1:0][DATA_SIZE-1:0] req_byteen_in, - input wire [NUM_REQS-1:0][LANES-1:0][ADDR_WIDTH-1:0] req_addr_in, - input wire [NUM_REQS-1:0][LANES-1:0][DATA_WIDTH-1:0] req_data_in, - input wire [NUM_REQS-1:0][LANES-1:0][TAG_IN_WIDTH-1:0] req_tag_in, - output wire [NUM_REQS-1:0][LANES-1:0] req_ready_in, - - // output request - output wire [LANES-1:0] req_valid_out, - output wire [LANES-1:0] req_rw_out, - output wire [LANES-1:0][DATA_SIZE-1:0] req_byteen_out, - output wire [LANES-1:0][ADDR_WIDTH-1:0] req_addr_out, - output wire [LANES-1:0][DATA_WIDTH-1:0] req_data_out, - output wire [LANES-1:0][TAG_OUT_WIDTH-1:0] req_tag_out, - input wire [LANES-1:0] req_ready_out, - - // input response - input wire rsp_valid_in, - input wire [LANES-1:0] rsp_tmask_in, - input wire [LANES-1:0][DATA_WIDTH-1:0] rsp_data_in, - input wire [TAG_OUT_WIDTH-1:0] rsp_tag_in, - output wire rsp_ready_in, - - // output responses - output wire [NUM_REQS-1:0] rsp_valid_out, - output wire [NUM_REQS-1:0][LANES-1:0] rsp_tmask_out, - output wire [NUM_REQS-1:0][LANES-1:0][DATA_WIDTH-1:0] rsp_data_out, - output wire [NUM_REQS-1:0][TAG_IN_WIDTH-1:0] rsp_tag_out, - input wire [NUM_REQS-1:0] rsp_ready_out -); - localparam REQ_DATAW = TAG_OUT_WIDTH + ADDR_WIDTH + 1 + DATA_SIZE + DATA_WIDTH; - localparam RSP_DATAW = LANES * (1 + DATA_WIDTH) + TAG_IN_WIDTH; - - if (NUM_REQS > 1) begin - - wire [NUM_REQS-1:0][LANES-1:0][REQ_DATAW-1:0] req_data_in_merged; - wire [LANES-1:0][REQ_DATAW-1:0] req_data_out_merged; - - for (genvar i = 0; i < NUM_REQS; i++) begin - for (genvar j = 0; j < LANES; ++j) begin - wire [TAG_OUT_WIDTH-1:0] req_tag_in_w; - - VX_bits_insert #( - .N (TAG_IN_WIDTH), - .S (LOG_NUM_REQS), - .POS (TAG_SEL_IDX) - ) bits_insert ( - .data_in (req_tag_in[i][j]), - .sel_in (LOG_NUM_REQS'(i)), - .data_out (req_tag_in_w) - ); - - assign req_data_in_merged[i][j] = {req_tag_in_w, req_addr_in[i][j], req_rw_in[i][j], req_byteen_in[i][j], req_data_in[i][j]}; - end - end - - VX_stream_arbiter #( - .NUM_REQS (NUM_REQS), - .LANES (LANES), - .DATAW (REQ_DATAW), - .BUFFERED (BUFFERED_REQ), - .TYPE (TYPE) - ) req_arb ( - .clk (clk), - .reset (reset), - .valid_in (req_valid_in), - .data_in (req_data_in_merged), - .ready_in (req_ready_in), - .valid_out (req_valid_out), - .data_out (req_data_out_merged), - .ready_out (req_ready_out) - ); - - for (genvar i = 0; i < LANES; ++i) begin - assign {req_tag_out[i], req_addr_out[i], req_rw_out[i], req_byteen_out[i], req_data_out[i]} = req_data_out_merged[i]; - end - - /////////////////////////////////////////////////////////////////////// - - wire [NUM_REQS-1:0][RSP_DATAW-1:0] rsp_data_out_merged; - - wire [LOG_NUM_REQS-1:0] rsp_sel = rsp_tag_in[TAG_SEL_IDX +: LOG_NUM_REQS]; - - wire [TAG_IN_WIDTH-1:0] rsp_tag_in_w; - - VX_bits_remove #( - .N (TAG_OUT_WIDTH), - .S (LOG_NUM_REQS), - .POS (TAG_SEL_IDX) - ) bits_remove ( - .data_in (rsp_tag_in), - .data_out (rsp_tag_in_w) - ); - - VX_stream_demux #( - .NUM_REQS (NUM_REQS), - .LANES (1), - .DATAW (RSP_DATAW), - .BUFFERED (BUFFERED_RSP) - ) rsp_demux ( - .clk (clk), - .reset (reset), - .sel_in (rsp_sel), - .valid_in (rsp_valid_in), - .data_in ({rsp_tmask_in, rsp_tag_in_w, rsp_data_in}), - .ready_in (rsp_ready_in), - .valid_out (rsp_valid_out), - .data_out (rsp_data_out_merged), - .ready_out (rsp_ready_out) - ); - - for (genvar i = 0; i < NUM_REQS; i++) begin - assign {rsp_tmask_out[i], rsp_tag_out[i], rsp_data_out[i]} = rsp_data_out_merged[i]; - end - - end else begin - - `UNUSED_VAR (clk) - `UNUSED_VAR (reset) - - assign req_valid_out = req_valid_in; - assign req_tag_out = req_tag_in; - assign req_addr_out = req_addr_in; - assign req_rw_out = req_rw_in; - assign req_byteen_out = req_byteen_in; - assign req_data_out = req_data_in; - assign req_ready_in = req_ready_out; - - assign rsp_valid_out = rsp_valid_in; - assign rsp_tmask_out = rsp_tmask_in; - assign rsp_tag_out = rsp_tag_in; - assign rsp_data_out = rsp_data_in; - assign rsp_ready_in = rsp_ready_out; - - end - -endmodule \ No newline at end of file diff --git a/runtime/src/vx_print.c b/runtime/src/vx_print.c index b43cdd4a..86458644 100644 --- a/runtime/src/vx_print.c +++ b/runtime/src/vx_print.c @@ -34,7 +34,7 @@ int vx_vprintf(const char* format, va_list va) { printf_arg_t arg; arg.format = format; arg.va = &va; - vx_serial(__printf_cb, &arg); + vx_serial((vx_serial_cb)__printf_cb, &arg); return arg.ret; } @@ -63,7 +63,7 @@ void vx_putint(int value, int base) { putint_arg_t arg; arg.value = value; arg.base = base; - vx_serial(__putint_cb, &arg); + vx_serial((vx_serial_cb)__putint_cb, &arg); } static void __putfloat_cb(const putfloat_arg_t* arg) { @@ -83,7 +83,7 @@ void vx_putfloat(float value, int precision) { putfloat_arg_t arg; arg.value = value; arg.precision = precision; - vx_serial(__putfloat_cb, &arg); + vx_serial((vx_serial_cb)__putfloat_cb, &arg); } #ifdef __cplusplus diff --git a/sim/rtlsim/Makefile b/sim/rtlsim/Makefile index 194e6ebc..6f82e73a 100644 --- a/sim/rtlsim/Makefile +++ b/sim/rtlsim/Makefile @@ -1,7 +1,7 @@ RTL_DIR=../../hw/rtl DPI_DIR=../../hw/dpi -CXXFLAGS += -std=c++11 -Wall -Wextra -Wfatal-errors +CXXFLAGS += -std=c++11 -Wall -Wextra -Wfatal-errors -Wno-array-bounds CXXFLAGS += -fPIC -Wno-maybe-uninitialized CXXFLAGS += -I../../../hw -I../../common CXXFLAGS += -I../../common/softfloat/source/include diff --git a/sim/vlsim/Makefile b/sim/vlsim/Makefile index 1dcc4f64..9b6fa274 100644 --- a/sim/vlsim/Makefile +++ b/sim/vlsim/Makefile @@ -2,7 +2,7 @@ RTL_DIR = ../../hw/rtl DPI_DIR = ../../hw/dpi SCRIPT_DIR=../../hw/scripts -CXXFLAGS += -std=c++11 -Wall -Wextra -Wfatal-errors +CXXFLAGS += -std=c++11 -Wall -Wextra -Wfatal-errors -Wno-array-bounds CXXFLAGS += -fPIC -Wno-maybe-uninitialized CXXFLAGS += -I.. -I../../../hw -I../../common CXXFLAGS += -I../../common/softfloat/source/include diff --git a/tests/opencl/guassian/clutils.cpp b/tests/opencl/guassian/clutils.cpp index c977477a..e10fcba2 100755 --- a/tests/opencl/guassian/clutils.cpp +++ b/tests/opencl/guassian/clutils.cpp @@ -421,7 +421,7 @@ cl_context cl_init_context(int platform, int dev,int quiet) { #else commandQueue = clCreateCommandQueue(context, - devices[device_touse], NULL, &status); + devices[device_touse], 0, &status); #endif // PROFILING @@ -451,8 +451,8 @@ void cl_cleanup() printf("clReleaseContext()\n"); } - for (int p = 0; p < numPlatforms; ++p) { - for (int d = 0; d < numDevices[p]; ++d) { + for (cl_uint p = 0; p < numPlatforms; ++p) { + for (cl_uint d = 0; d < numDevices[p]; ++d) { status = clReleaseDevice(devices[d]); cl_errChk(status, "Oops!", true); printf("clReleaseDevice()\n"); diff --git a/tests/opencl/nearn/clutils.cpp b/tests/opencl/nearn/clutils.cpp index c977477a..e10fcba2 100755 --- a/tests/opencl/nearn/clutils.cpp +++ b/tests/opencl/nearn/clutils.cpp @@ -421,7 +421,7 @@ cl_context cl_init_context(int platform, int dev,int quiet) { #else commandQueue = clCreateCommandQueue(context, - devices[device_touse], NULL, &status); + devices[device_touse], 0, &status); #endif // PROFILING @@ -451,8 +451,8 @@ void cl_cleanup() printf("clReleaseContext()\n"); } - for (int p = 0; p < numPlatforms; ++p) { - for (int d = 0; d < numDevices[p]; ++d) { + for (cl_uint p = 0; p < numPlatforms; ++p) { + for (cl_uint d = 0; d < numDevices[p]; ++d) { status = clReleaseDevice(devices[d]); cl_errChk(status, "Oops!", true); printf("clReleaseDevice()\n"); diff --git a/tests/opencl/oclprintf/Makefile b/tests/opencl/oclprintf/Makefile index 34d0146a..2c2fffa5 100644 --- a/tests/opencl/oclprintf/Makefile +++ b/tests/opencl/oclprintf/Makefile @@ -16,7 +16,7 @@ K_LDFLAGS += "-Wl,-Bstatic,-T$(VORTEX_RT_PATH)/linker/vx_link.ld -Wl,--gc-secti CXXFLAGS += -std=c++11 -O2 -Wall -Wextra -Wfatal-errors #CXXFLAGS += -std=c++11 -O0 -g -Wall -Wextra -Wfatal-errors -CXXFLAGS += -Wno-deprecated-declarations -Wno-unused-parameter +CXXFLAGS += -Wno-deprecated-declarations -Wno-unused-parameter -Wno-narrowing CXXFLAGS += -I$(POCL_RT_PATH)/include diff --git a/tests/opencl/oclprintf/kernel.pocl b/tests/opencl/oclprintf/kernel.pocl index a687db751b00506e79858a7832d782f7d4bb5ec4..e615c954655e5fee25b7b1d2a9a5177bdd60d8d5 100644 GIT binary patch delta 156 zcmZ3ygLm-`-U$jCj-LAdUT!{~E^e+Ko}M0_t}c%L0nYw@-hS@xKHgrgzD_NB^e}I UrY3E-<6++DN4#?JXl5Qp09`ySPXGV_ delta 156 zcmZ3ygLm-`-U$jCZhrb6ZZ7VQ9$wzQE?&+qzP>(gP62LS?w(%mj-I}5p5Cr*j(#3q zjUKHYjIAC_TRoW1acdYQ8X2diB_