build warnings clean
This commit is contained in:
@@ -18,9 +18,9 @@ install:
|
||||
- export RISCV_TOOLCHAIN_PATH=/opt/riscv-gnu-toolchain
|
||||
- export VERILATOR_ROOT=/opt/verilator
|
||||
- export PATH=$VERILATOR_ROOT/bin:$PATH
|
||||
|
||||
script:
|
||||
- make -s
|
||||
|
||||
script:
|
||||
- ./ci/test_runtime.sh
|
||||
- ./ci/test_riscv_isa.sh
|
||||
- ./ci/test_opencl.sh
|
||||
|
||||
@@ -11,8 +11,11 @@ K_LLCFLAGS += "-O3 -march=riscv32 -target-abi=ilp32f -mcpu=generic-rv32 -mattr=+
|
||||
K_CFLAGS += "-v -O3 --sysroot=$(SYSROOT) --gcc-toolchain=$(RISCV_TOOLCHAIN_PATH) -march=rv32imf -mabi=ilp32f -I$(VORTEX_RT_PATH)/include -fno-rtti -fno-exceptions -ffreestanding -nostartfiles -Wl,--gc-sections -Wl,-Bstatic,-T$(VORTEX_RT_PATH)/linker/vx_link.ld"
|
||||
K_LDFLAGS += "$(VORTEX_RT_PATH)/libvortexrt.a -lm"
|
||||
|
||||
CXXFLAGS += -std=c++11 -O2 -Wall -Wextra -pedantic -Wfatal-errors
|
||||
#CXXFLAGS += -std=c++11 -O0 -g -Wall -Wextra -pedantic -Wfatal-errors
|
||||
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-unused-variable -Wno-narrowing -Wno-unused-result -Wno-unused-but-set-variable
|
||||
|
||||
CXXFLAGS += -I$(POCL_RT_PATH)/include
|
||||
|
||||
|
||||
@@ -11,8 +11,11 @@ K_LLCFLAGS += "-O3 -march=riscv32 -target-abi=ilp32f -mcpu=generic-rv32 -mattr=+
|
||||
K_CFLAGS += "-v -O3 --sysroot=$(SYSROOT) --gcc-toolchain=$(RISCV_TOOLCHAIN_PATH) -march=rv32imf -mabi=ilp32f -I$(VORTEX_RT_PATH)/include -fno-rtti -fno-exceptions -ffreestanding -nostartfiles -Wl,--gc-sections -Wl,-Bstatic,-T$(VORTEX_RT_PATH)/linker/vx_link.ld"
|
||||
K_LDFLAGS += "$(VORTEX_RT_PATH)/libvortexrt.a -lm"
|
||||
|
||||
CXXFLAGS += -std=c++11 -O2 -Wall -Wextra -pedantic -Wfatal-errors
|
||||
#CXXFLAGS += -std=c++11 -O0 -g -Wall -Wextra -pedantic -Wfatal-errors
|
||||
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-unused-variable -Wno-narrowing -Wno-unused-result -Wno-unused-but-set-variable
|
||||
|
||||
CXXFLAGS += -I$(POCL_RT_PATH)/include
|
||||
|
||||
|
||||
@@ -11,8 +11,10 @@ K_LLCFLAGS += "-O3 -march=riscv32 -target-abi=ilp32f -mcpu=generic-rv32 -mattr=+
|
||||
K_CFLAGS += "-v -O3 --sysroot=$(SYSROOT) --gcc-toolchain=$(RISCV_TOOLCHAIN_PATH) -march=rv32imf -mabi=ilp32f -I$(VORTEX_RT_PATH)/include -fno-rtti -fno-exceptions -ffreestanding -nostartfiles -Wl,--gc-sections -Wl,-Bstatic,-T$(VORTEX_RT_PATH)/linker/vx_link.ld"
|
||||
K_LDFLAGS += "$(VORTEX_RT_PATH)/libvortexrt.a -lm"
|
||||
|
||||
CXXFLAGS += -std=c++11 -O2 -Wall -Wextra -pedantic -Wfatal-errors
|
||||
#CXXFLAGS += -std=c++11 -O0 -g -Wall -Wextra -pedantic -Wfatal-errors
|
||||
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 += -I$(POCL_RT_PATH)/include
|
||||
|
||||
|
||||
@@ -113,7 +113,6 @@ int main(int argc, char **argv) {
|
||||
cl_device_id device_id;
|
||||
size_t kernel_size;
|
||||
cl_int binary_status = 0;
|
||||
int i;
|
||||
|
||||
// read kernel binary from file
|
||||
if (0 != read_kernel_file("kernel.pocl", &kernel_bin, &kernel_size))
|
||||
@@ -169,7 +168,7 @@ int main(int argc, char **argv) {
|
||||
printf("attempting to create kernel\n");
|
||||
kernel = CL_CHECK_ERR(clCreateKernel(program, "saxpy", &_err));
|
||||
|
||||
printf("setting up kernel args cl_mem:%lx \n", input_buffer);
|
||||
printf("setting up kernel args\n");
|
||||
CL_CHECK(clSetKernelArg(kernel, 0, sizeof(input_buffer), &input_buffer));
|
||||
CL_CHECK(clSetKernelArg(kernel, 1, sizeof(output_buffer), &output_buffer));
|
||||
CL_CHECK(clSetKernelArg(kernel, 2, sizeof(factor), &factor));
|
||||
@@ -196,11 +195,11 @@ int main(int argc, char **argv) {
|
||||
float* h_dst = (float*)malloc(nbytes);
|
||||
CL_CHECK(clEnqueueReadBuffer(queue, output_buffer, CL_TRUE, 0, nbytes, h_dst, 0, NULL, NULL));
|
||||
|
||||
printf("Result:");
|
||||
/*printf("Result:");
|
||||
for (int i = 0; i < NUM_DATA; i++) {
|
||||
float data = h_dst[i];
|
||||
// printf(" %f", data);
|
||||
}
|
||||
printf(" %f", data);
|
||||
}*/
|
||||
free(h_dst);
|
||||
|
||||
CL_CHECK(clReleaseMemObject(memObjects[0]));
|
||||
|
||||
@@ -11,8 +11,10 @@ K_LLCFLAGS += "-O3 -march=riscv32 -target-abi=ilp32f -mcpu=generic-rv32 -mattr=+
|
||||
K_CFLAGS += "-v -O3 --sysroot=$(SYSROOT) --gcc-toolchain=$(RISCV_TOOLCHAIN_PATH) -march=rv32imf -mabi=ilp32f -I$(VORTEX_RT_PATH)/include -fno-rtti -fno-exceptions -ffreestanding -nostartfiles -Wl,--gc-sections -Wl,-Bstatic,-T$(VORTEX_RT_PATH)/linker/vx_link.ld"
|
||||
K_LDFLAGS += "$(VORTEX_RT_PATH)/libvortexrt.a -lm"
|
||||
|
||||
CXXFLAGS += -std=c++11 -O2 -Wall -Wextra -pedantic -Wfatal-errors
|
||||
#CXXFLAGS += -std=c++11 -O0 -g -Wall -Wextra -pedantic -Wfatal-errors
|
||||
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 += -I$(POCL_RT_PATH)/include
|
||||
|
||||
|
||||
@@ -187,7 +187,6 @@ int main(int argc, char **argv) {
|
||||
cl_device_id device_id;
|
||||
size_t kernel_size;
|
||||
cl_int binary_status = 0;
|
||||
int i;
|
||||
|
||||
// read kernel binary from file
|
||||
if (0 != read_kernel_file("kernel.pocl", &kernel_bin, &kernel_size))
|
||||
@@ -250,7 +249,7 @@ int main(int argc, char **argv) {
|
||||
|
||||
printf("attempting to create kernel\n");
|
||||
kernel = CL_CHECK_ERR(clCreateKernel(program, "sfilter", &_err));
|
||||
printf("setting up kernel args cl_mem:%lx \n", input_buffer);
|
||||
printf("setting up kernel args\n");
|
||||
CL_CHECK(clSetKernelArg(kernel, 0, sizeof(input_buffer), &input_buffer));
|
||||
CL_CHECK(clSetKernelArg(kernel, 1, sizeof(output_buffer), &output_buffer));
|
||||
CL_CHECK(clSetKernelArg(kernel, 2, sizeof(ldc), (&ldc)));
|
||||
@@ -288,11 +287,11 @@ int main(int argc, char **argv) {
|
||||
float* h_dst = (float*)malloc(nbytes);
|
||||
CL_CHECK(clEnqueueReadBuffer(queue, output_buffer, CL_TRUE, 0, nbytes, h_dst, 0, NULL, NULL));
|
||||
|
||||
printf("Result:");
|
||||
/*printf("Result:");
|
||||
for (int i = 0; i < NUM_DATA * NUM_DATA; i++) {
|
||||
float data = h_dst[i];
|
||||
// printf(" %f", data);
|
||||
}
|
||||
printf(" %f", data);
|
||||
}*/
|
||||
free(h_dst);
|
||||
|
||||
CL_CHECK(clReleaseMemObject(memObjects[0]));
|
||||
|
||||
@@ -11,8 +11,10 @@ K_LLCFLAGS += "-O3 -march=riscv32 -target-abi=ilp32f -mcpu=generic-rv32 -mattr=+
|
||||
K_CFLAGS += "-v -O3 --sysroot=$(SYSROOT) --gcc-toolchain=$(RISCV_TOOLCHAIN_PATH) -march=rv32imf -mabi=ilp32f -I$(VORTEX_RT_PATH)/include -fno-rtti -fno-exceptions -ffreestanding -nostartfiles -Wl,--gc-sections -Wl,-Bstatic,-T$(VORTEX_RT_PATH)/linker/vx_link.ld"
|
||||
K_LDFLAGS += "$(VORTEX_RT_PATH)/libvortexrt.a -lm"
|
||||
|
||||
CXXFLAGS += -std=c++11 -O2 -Wall -Wextra -pedantic -Wfatal-errors
|
||||
#CXXFLAGS += -std=c++11 -O0 -g -Wall -Wextra -pedantic -Wfatal-errors
|
||||
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 += -I$(POCL_RT_PATH)/include
|
||||
|
||||
|
||||
@@ -11,8 +11,10 @@ K_LLCFLAGS += "-O3 -march=riscv32 -target-abi=ilp32f -mcpu=generic-rv32 -mattr=+
|
||||
K_CFLAGS += "-v -O3 --sysroot=$(SYSROOT) --gcc-toolchain=$(RISCV_TOOLCHAIN_PATH) -march=rv32imf -mabi=ilp32f -I$(VORTEX_RT_PATH)/include -fno-rtti -fno-exceptions -ffreestanding -nostartfiles -Wl,--gc-sections -Wl,-Bstatic,-T$(VORTEX_RT_PATH)/linker/vx_link.ld"
|
||||
K_LDFLAGS += "$(VORTEX_RT_PATH)/libvortexrt.a -lm"
|
||||
|
||||
CXXFLAGS += -std=c++11 -O2 -Wall -Wextra -pedantic -Wfatal-errors
|
||||
#CXXFLAGS += -std=c++11 -O0 -g -Wall -Wextra -pedantic -Wfatal-errors
|
||||
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 += -I$(POCL_RT_PATH)/include
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#CFLAGS += -std=c++11 -O2 -DNDEBUG -Wall -Wextra -Wfatal-errors
|
||||
CFLAGS += -std=c++11 -g -O0 -Wall -Wextra -Wfatal-errors
|
||||
CFLAGS += -std=c++11 -O2 -Wall -Wextra -Wfatal-errors
|
||||
#CFLAGS += -std=c++11 -g -O0 -Wall -Wextra -Wfatal-errors
|
||||
|
||||
CFLAGS += -Wno-aligned-new -Wno-maybe-uninitialized
|
||||
|
||||
CFLAGS += -I../../../../hw
|
||||
|
||||
@@ -25,9 +27,6 @@ DBG_FLAGS += -DDBG_CACHE_REQ_INFO
|
||||
CONFIGS ?= -DNUM_CLUSTERS=1 -DNUM_CORES=2 -DL2_ENABLE=0
|
||||
#CONFIGS ?= -DNUM_CLUSTERS=1 -DNUM_CORES=1
|
||||
|
||||
#DEBUG=1
|
||||
#SCOPE=1
|
||||
|
||||
CFLAGS += -fPIC
|
||||
|
||||
CFLAGS += -DUSE_VLSIM $(CONFIGS)
|
||||
@@ -83,9 +82,6 @@ VL_FLAGS += -DFPU_FAST
|
||||
|
||||
RTL_INCLUDE += -I../../../hw/opae -I../../../hw/opae/ccip
|
||||
|
||||
OPT_FAST = "-Wno-aligned-new -Wmaybe-uninitialized"
|
||||
OPT_SLOW = "-Wno-aligned-new -Wmaybe-uninitialized"
|
||||
|
||||
PROJECT = libopae-c-vlsim.so
|
||||
|
||||
all: $(PROJECT)
|
||||
@@ -98,7 +94,7 @@ $(RTL_DIR)/scope-defs.vh: $(SCRIPT_DIR)/scope.json
|
||||
|
||||
$(PROJECT): $(SRCS) $(SCOPE_VH)
|
||||
verilator --exe --cc $(TOP) --top-module $(TOP) $(RTL_INCLUDE) $(VL_FLAGS) $(SRCS) -CFLAGS '$(CFLAGS)' -LDFLAGS '$(LDFLAGS)' -o ../$(PROJECT)
|
||||
make OPT_FAST=$(OPT_FAST) OPT_SLOW=$(OPT_SLOW) -j -C obj_dir -f V$(TOP).mk
|
||||
make -j -C obj_dir -f V$(TOP).mk
|
||||
|
||||
clean:
|
||||
rm -rf $(PROJECT) obj_dir ../scope-defs.h $(RTL_DIR)/scope-defs.vh
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#CFLAGS += -std=c++11 -O2 -DNDEBUG -Wall -Wextra -Wfatal-errors
|
||||
CFLAGS += -std=c++11 -g -O0 -Wall -Wextra -Wfatal-errors
|
||||
CFLAGS += -std=c++11 -O2 -Wall -Wextra -Wfatal-errors
|
||||
#CFLAGS += -std=c++11 -g -O0 -Wall -Wextra -Wfatal-errors
|
||||
|
||||
CFLAGS += -Wno-aligned-new -Wno-maybe-uninitialized
|
||||
|
||||
CFLAGS += -I../../include -I../../../hw/simulate -I../../../hw
|
||||
|
||||
@@ -25,8 +27,6 @@ DBG_FLAGS += -DDBG_CACHE_REQ_INFO
|
||||
CONFIGS ?= -DNUM_CLUSTERS=1 -DNUM_CORES=2 -DL2_ENABLE=0
|
||||
#CONFIGS ?= -DNUM_CLUSTERS=1 -DNUM_CORES=1
|
||||
|
||||
#DEBUG=1
|
||||
|
||||
CFLAGS += -fPIC
|
||||
|
||||
CFLAGS += -DUSE_RTLSIM $(CONFIGS)
|
||||
@@ -34,7 +34,7 @@ CFLAGS += -DUSE_RTLSIM $(CONFIGS)
|
||||
CFLAGS += -DDUMP_PERF_STATS
|
||||
|
||||
LDFLAGS += -shared -pthread
|
||||
# LDFLAGS += -dynamiclib -pthread
|
||||
#LDFLAGS += -dynamiclib -pthread
|
||||
|
||||
TOP = Vortex
|
||||
|
||||
@@ -67,9 +67,6 @@ endif
|
||||
# use DPI FPU
|
||||
VL_FLAGS += -DFPU_FAST
|
||||
|
||||
OPT_FAST = "-Wno-aligned-new -Wmaybe-uninitialized"
|
||||
OPT_SLOW = "-Wno-aligned-new -Wmaybe-uninitialized"
|
||||
|
||||
PROJECT = libvortex.so
|
||||
# PROJECT = libvortex.dylib
|
||||
|
||||
@@ -77,7 +74,7 @@ all: $(PROJECT)
|
||||
|
||||
$(PROJECT): $(SRCS)
|
||||
verilator --exe --cc $(TOP) --top-module $(TOP) $(RTL_INCLUDE) $(VL_FLAGS) $(SRCS) -CFLAGS '$(CFLAGS)' -LDFLAGS '$(LDFLAGS)' -o ../$(PROJECT)
|
||||
make OPT_FAST=$(OPT_FAST) OPT_SLOW=$(OPT_SLOW) -j -C obj_dir -f V$(TOP).mk
|
||||
make -j -C obj_dir -f V$(TOP).mk
|
||||
|
||||
clean:
|
||||
rm -rf $(PROJECT) obj_dir
|
||||
|
||||
@@ -1,32 +1,53 @@
|
||||
CFLAGS += -std=c++11 -O3 -Wall -Wextra -pedantic -Wfatal-errors
|
||||
#CFLAGS += -std=c++11 -g -O0 -Wall -Wextra -pedantic -Wfatal-errors
|
||||
CFLAGS += -std=c++11 -O2 -Wall -Wextra -Wfatal-errors
|
||||
#CFLAGS += -std=c++11 -g -O0 -Wall -Wextra -Wfatal-errors
|
||||
|
||||
CFLAGS += -Wno-aligned-new -Wno-maybe-uninitialized
|
||||
|
||||
CFLAGS += -I../../include -I../../../simX/include -I../../../hw
|
||||
|
||||
CFLAGS += -fPIC
|
||||
|
||||
CFLAGS += -DUSE_SIMX
|
||||
CFLAGS += -DUSE_SIMX
|
||||
|
||||
LDFLAGS += -shared -pthread
|
||||
#LDFLAGS += -dynamiclib -pthread
|
||||
|
||||
SRCS = vortex.cpp ../common/vx_utils.cpp ../../simX/args.cpp ../../simX/mem.cpp ../../simX/core.cpp ../../simX/instruction.cpp ../../simX/enc.cpp ../../simX/util.cpp
|
||||
TOP = cache_simX
|
||||
|
||||
RTL_TOP = ../../simX/cache_simX.v
|
||||
RTL_DIR = ../../hw/old_rtl
|
||||
|
||||
RTL_INCLUDE = -I../../hw/old_rtl -I../../hw/old_rtl/interfaces -I../../hw/old_rtl/cache -I../../hw/old_rtl/shared_memory
|
||||
SRCS = vortex.cpp ../common/vx_utils.cpp
|
||||
SRCS += ../../simX/args.cpp ../../simX/mem.cpp ../../simX/core.cpp ../../simX/instruction.cpp ../../simX/enc.cpp ../../simX/util.cpp
|
||||
|
||||
THREADS ?= $(shell python3 -c 'import multiprocessing as mp; print(max(1, mp.cpu_count() // 2))')
|
||||
VL_FLAGS += --threads $(THREADS)
|
||||
RTL_INCLUDE = -I$(RTL_DIR) -I$(RTL_DIR)/interfaces -I$(RTL_DIR)/cache -I$(RTL_DIR)/shared_memory
|
||||
RTL_INCLUDE += -I../../simX
|
||||
|
||||
VL_FLAGS += -Wno-UNOPTFLAT -Wno-WIDTH
|
||||
VL_FLAGS += -O2 --language 1800-2009 --assert
|
||||
VL_FLAGS += -Wno-DECLFILENAME
|
||||
VL_FLAGS += --x-initial unique --x-assign unique
|
||||
VL_FLAGS += -Wno-UNOPTFLAT -Wno-WIDTH
|
||||
|
||||
# Enable Verilator multithreaded simulation
|
||||
#THREADS ?= $(shell python3 -c 'import multiprocessing as mp; print(max(1, mp.cpu_count() // 2))')
|
||||
#VL_FLAGS += --threads $(THREADS)
|
||||
|
||||
# Debugigng
|
||||
ifdef DEBUG
|
||||
VL_FLAGS += -DVCD_OUTPUT --trace --trace-structs $(DBG_FLAGS)
|
||||
CFLAGS += -DVCD_OUTPUT $(DBG_FLAGS)
|
||||
else
|
||||
VL_FLAGS += -DNDEBUG
|
||||
CFLAGS += -DNDEBUG
|
||||
endif
|
||||
|
||||
PROJECT = libvortex.so
|
||||
#PROJECT = libvortex.dylib
|
||||
|
||||
all: $(PROJECT)
|
||||
|
||||
$(PROJECT): $(SRCS)
|
||||
verilator --exe --cc $(RTL_TOP) $(RTL_INCLUDE) $(VL_FLAGS) $(SRCS) -CFLAGS '$(CFLAGS)' -LDFLAGS '$(LDFLAGS)' -o ../$(PROJECT)
|
||||
make -j -C obj_dir -f Vcache_simX.mk
|
||||
verilator --exe --cc $(TOP) --top-module $(TOP) $(RTL_INCLUDE) $(VL_FLAGS) $(SRCS) -CFLAGS '$(CFLAGS)' -LDFLAGS '$(LDFLAGS)' -o ../$(PROJECT)
|
||||
make -j -C obj_dir -f V$(TOP).mk
|
||||
|
||||
clean:
|
||||
rm -rf $(PROJECT) obj_dir
|
||||
@@ -202,16 +202,16 @@
|
||||
`define DCREQ_SIZE 4
|
||||
`endif
|
||||
|
||||
// Miss Reserv Queue Knob
|
||||
`ifndef DMRVQ_SIZE
|
||||
`define DMRVQ_SIZE `MAX(`LSUQ_SIZE, 4)
|
||||
`endif
|
||||
|
||||
// Core Writeback Queue Size
|
||||
`ifndef DCWBQ_SIZE
|
||||
`define DCWBQ_SIZE 4
|
||||
`endif
|
||||
|
||||
// Miss Reserv Queue Knob
|
||||
`ifndef DMRVQ_SIZE
|
||||
`define DMRVQ_SIZE `MAX(`LSUQ_SIZE, 4)
|
||||
`endif
|
||||
|
||||
// DRAM Request Queue Size
|
||||
`ifndef DDREQ_SIZE
|
||||
`define DDREQ_SIZE 4
|
||||
@@ -244,16 +244,16 @@
|
||||
`define ICREQ_SIZE 4
|
||||
`endif
|
||||
|
||||
// Miss Reserv Queue Knob
|
||||
`ifndef IMRVQ_SIZE
|
||||
`define IMRVQ_SIZE 4
|
||||
`endif
|
||||
|
||||
// Core Writeback Queue Size
|
||||
`ifndef ICWBQ_SIZE
|
||||
`define ICWBQ_SIZE 4
|
||||
`endif
|
||||
|
||||
// Miss Reserv Queue Knob
|
||||
`ifndef IMRVQ_SIZE
|
||||
`define IMRVQ_SIZE 4
|
||||
`endif
|
||||
|
||||
// DRAM Request Queue Size
|
||||
`ifndef IDREQ_SIZE
|
||||
`define IDREQ_SIZE 4
|
||||
@@ -303,16 +303,16 @@
|
||||
`define L2CREQ_SIZE 4
|
||||
`endif
|
||||
|
||||
// Miss Reserv Queue Knob
|
||||
`ifndef L2MRVQ_SIZE
|
||||
`define L2MRVQ_SIZE 8
|
||||
`endif
|
||||
|
||||
// Core Writeback Queue Size
|
||||
`ifndef L2CWBQ_SIZE
|
||||
`define L2CWBQ_SIZE 4
|
||||
`endif
|
||||
|
||||
// Miss Reserv Queue Knob
|
||||
`ifndef L2MRVQ_SIZE
|
||||
`define L2MRVQ_SIZE 8
|
||||
`endif
|
||||
|
||||
// DRAM Request Queue Size
|
||||
`ifndef L2DREQ_SIZE
|
||||
`define L2DREQ_SIZE 4
|
||||
@@ -350,16 +350,16 @@
|
||||
`define L3CREQ_SIZE 4
|
||||
`endif
|
||||
|
||||
// Miss Reserv Queue Knob
|
||||
`ifndef L3MRVQ_SIZE
|
||||
`define L3MRVQ_SIZE 8
|
||||
`endif
|
||||
|
||||
// Core Writeback Queue Size
|
||||
`ifndef L3CWBQ_SIZE
|
||||
`define L3CWBQ_SIZE 4
|
||||
`endif
|
||||
|
||||
// Miss Reserv Queue Knob
|
||||
`ifndef L3MRVQ_SIZE
|
||||
`define L3MRVQ_SIZE 8
|
||||
`endif
|
||||
|
||||
// DRAM Request Queue Size
|
||||
`ifndef L3DREQ_SIZE
|
||||
`define L3DREQ_SIZE 4
|
||||
|
||||
@@ -211,8 +211,8 @@ module VX_lsu_unit #(
|
||||
always @(posedge clk) begin
|
||||
if ((| dcache_req_if.valid) && dcache_req_if.ready) begin
|
||||
if (dcache_req_if.rw)
|
||||
$display("%t: D$%0d Rw Req: wid=%0d, PC=%0h, tmask=%b, addr=%0h, tag=%0h, rd=%0d, byteen=%0h, data=%0h",
|
||||
$time, CORE_ID, req_wid, req_pc, dcache_req_if.valid, req_address, dcache_req_if.tag, req_rd, dcache_req_if.byteen, dcache_req_if.data);
|
||||
$display("%t: D$%0d Rw Req: wid=%0d, PC=%0h, tmask=%b, addr=%0h, tag=%0h, byteen=%0h, data=%0h",
|
||||
$time, CORE_ID, req_wid, req_pc, dcache_req_if.valid, req_address, dcache_req_if.tag, dcache_req_if.byteen, dcache_req_if.data);
|
||||
else
|
||||
$display("%t: D$%0d Rd Req: wid=%0d, PC=%0h, tmask=%b, addr=%0h, tag=%0h, rd=%0d, byteen=%0h",
|
||||
$time, CORE_ID, req_wid, req_pc, dcache_req_if.valid, req_address, dcache_req_if.tag, req_rd, dcache_req_if.byteen, dcache_req_if.data);
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
SINGLECORE += -DNUM_CLUSTERS=1 -DNUM_CORES=1 -DL2_ENABLE=0
|
||||
CFLAGS += -std=c++11 -O2 -Wall -Wextra -Wfatal-errors
|
||||
#CFLAGS += -std=c++11 -g -O0 -Wall -Wextra -Wfatal-errors
|
||||
|
||||
#MULTICORE ?= -DNUM_CLUSTERS=2 -DNUM_CORES=4 -DL2_ENABLE=1
|
||||
#MULTICORE ?= -DNUM_CLUSTERS=1 -DNUM_CORES=4 -DL2_ENABLE=1
|
||||
MULTICORE ?= -DNUM_CLUSTERS=1 -DNUM_CORES=2 -DL2_ENABLE=0
|
||||
CFLAGS += -Wno-aligned-new -Wno-maybe-uninitialized
|
||||
|
||||
CFLAGS += -I../..
|
||||
|
||||
# control RTL debug print states
|
||||
DBG_PRINT_FLAGS += -DDBG_PRINT_PIPELINE
|
||||
@@ -21,66 +22,71 @@ DBG_PRINT_FLAGS += -DDBG_PRINT_SCOPE
|
||||
DBG_FLAGS += $(DBG_PRINT_FLAGS)
|
||||
DBG_FLAGS += -DDBG_CACHE_REQ_INFO
|
||||
|
||||
FPU_INCLUDE = -I../rtl/fp_cores -I../rtl/fp_cores/svdpi -I../rtl/fp_cores/fpnew/src/common_cells/include -I../rtl/fp_cores/fpnew/src/common_cells/src -I../rtl/fp_cores/fpnew/src/fpu_div_sqrt_mvp/hdl -I../rtl/fp_cores/fpnew/src
|
||||
INCLUDE = -I../rtl/ -I../rtl/libs -I../rtl/interfaces -I../rtl/cache -I../rtl/simulate $(FPU_INCLUDE)
|
||||
SINGLECORE += -DNUM_CLUSTERS=1 -DNUM_CORES=1 -DL2_ENABLE=0
|
||||
|
||||
#MULTICORE ?= -DNUM_CLUSTERS=2 -DNUM_CORES=4 -DL2_ENABLE=1
|
||||
#MULTICORE ?= -DNUM_CLUSTERS=1 -DNUM_CORES=4 -DL2_ENABLE=1
|
||||
MULTICORE ?= -DNUM_CLUSTERS=1 -DNUM_CORES=2 -DL2_ENABLE=0
|
||||
|
||||
TOP = Vortex
|
||||
|
||||
RTL_DIR=../rtl
|
||||
|
||||
FPU_INCLUDE = -I$(RTL_DIR)/fp_cores -I$(RTL_DIR)/fp_cores/svdpi -I$(RTL_DIR)/fp_cores/fpnew/src/common_cells/include -I$(RTL_DIR)/fp_cores/fpnew/src/common_cells/src -I$(RTL_DIR)/fp_cores/fpnew/src/fpu_div_sqrt_mvp/hdl -I$(RTL_DIR)/fp_cores/fpnew/src
|
||||
RTL_INCLUDE = -I$(RTL_DIR)/ -I$(RTL_DIR)/libs -I$(RTL_DIR)/interfaces -I$(RTL_DIR)/cache -I$(RTL_DIR)/simulate $(FPU_INCLUDE)
|
||||
|
||||
SRCS = simulator.cpp testbench.cpp
|
||||
SRCS += ../rtl/fp_cores/svdpi/float_dpi.cpp
|
||||
SRCS += $(RTL_DIR)/fp_cores/svdpi/float_dpi.cpp
|
||||
|
||||
all: build-s
|
||||
VL_FLAGS += -O2 --language 1800-2009 --assert -Wall -Wpedantic
|
||||
VL_FLAGS += -Wno-DECLFILENAME
|
||||
VL_FLAGS += --x-initial unique --x-assign unique
|
||||
VL_FLAGS += verilator.vlt
|
||||
|
||||
CF += -std=c++11 -O2 -DNDEBUG -Wall -Wextra -Wfatal-errors -I../..
|
||||
#CF += -std=c++11 -g -O0 -Wall -Wextra -Wfatal-errors -I../..
|
||||
VL_FLAGS += --exe $(SRCS) $(RTL_INCLUDE)
|
||||
VL_FLAGS += --cc Vortex.v --top-module $(TOP)
|
||||
|
||||
VF += -O2 --language 1800-2009 --assert -Wall -Wpedantic
|
||||
VF += -Wno-DECLFILENAME
|
||||
VF += --x-initial unique --x-assign unique
|
||||
VF += --exe $(SRCS) $(INCLUDE)
|
||||
VF += --cc Vortex.v --top-module Vortex
|
||||
VF += verilator.vlt
|
||||
|
||||
DBG += -DVCD_OUTPUT $(DBG_FLAGS)
|
||||
DBG_FLAGS += -DVCD_OUTPUT $(DBG_FLAGS)
|
||||
|
||||
THREADS ?= $(shell python3 -c 'import multiprocessing as mp; print(max(1, mp.cpu_count() // 2))')
|
||||
|
||||
OPT_FAST = "-Wno-aligned-new -Wmaybe-uninitialized"
|
||||
OPT_SLOW = "-Wno-aligned-new -Wmaybe-uninitialized"
|
||||
all: build-s
|
||||
|
||||
gen-s:
|
||||
verilator $(VF) -DNDEBUG $(SINGLECORE) -CFLAGS '$(CF) -DNDEBUG $(SINGLECORE)'
|
||||
verilator $(VL_FLAGS) -DNDEBUG $(SINGLECORE) -CFLAGS '$(CFLAGS) -DNDEBUG $(SINGLECORE)'
|
||||
|
||||
gen-sd:
|
||||
verilator $(VF) $(SINGLECORE) -CFLAGS '$(CF) $(DBG) $(SINGLECORE)' --trace --trace-structs $(DBG)
|
||||
verilator $(VL_FLAGS) $(SINGLECORE) -CFLAGS '$(CFLAGS) $(DBG_FLAGS) $(SINGLECORE)' --trace --trace-structs $(DBG_FLAGS)
|
||||
|
||||
gen-st:
|
||||
verilator $(VF) -DNDEBUG $(SINGLECORE) -CFLAGS '$(CF) -DNDEBUG $(SINGLECORE)' --threads $(THREADS)
|
||||
verilator $(VL_FLAGS) -DNDEBUG $(SINGLECORE) -CFLAGS '$(CFLAGS) -DNDEBUG $(SINGLECORE)' --threads $(THREADS)
|
||||
|
||||
gen-m:
|
||||
verilator $(VF) -DNDEBUG $(MULTICORE) -CFLAGS '$(CF) -DNDEBUG $(MULTICORE)'
|
||||
verilator $(VL_FLAGS) -DNDEBUG $(MULTICORE) -CFLAGS '$(CFLAGS) -DNDEBUG $(MULTICORE)'
|
||||
|
||||
gen-md:
|
||||
verilator $(VF) $(MULTICORE) -CFLAGS '$(CF) $(DBG) $(MULTICORE)' --trace --trace-structs $(DBG)
|
||||
verilator $(VL_FLAGS) $(MULTICORE) -CFLAGS '$(CFLAGS) $(DBG_FLAGS) $(MULTICORE)' --trace --trace-structs $(DBG_FLAGS)
|
||||
|
||||
gen-mt:
|
||||
verilator $(VF) -DNDEBUG $(MULTICORE) -CFLAGS '$(CF) -DNDEBUG $(MULTICORE)' --threads $(THREADS)
|
||||
verilator $(VL_FLAGS) -DNDEBUG $(MULTICORE) -CFLAGS '$(CFLAGS) -DNDEBUG $(MULTICORE)' --threads $(THREADS)
|
||||
|
||||
build-s: gen-s
|
||||
make OPT_FAST=$(OPT_FAST) OPT_SLOW=$(OPT_SLOW) -j -C obj_dir -f VVortex.mk
|
||||
make -j -C obj_dir -f VVortex.mk
|
||||
|
||||
build-sd: gen-sd
|
||||
make OPT_FAST=$(OPT_FAST) OPT_SLOW=$(OPT_SLOW) -j -C obj_dir -f VVortex.mk
|
||||
make -j -C obj_dir -f VVortex.mk
|
||||
|
||||
build-st: gen-st
|
||||
make OPT_FAST=$(OPT_FAST) OPT_SLOW=$(OPT_SLOW) -j -C obj_dir -f VVortex.mk
|
||||
make -j -C obj_dir -f VVortex.mk
|
||||
|
||||
build-m: gen-m
|
||||
make OPT_FAST=$(OPT_FAST) OPT_SLOW=$(OPT_SLOW) -j -C obj_dir -f VVortex.mk
|
||||
make -j -C obj_dir -f VVortex.mk
|
||||
|
||||
build-md: gen-md
|
||||
make OPT_FAST=$(OPT_FAST) OPT_SLOW=$(OPT_SLOW) -j -C obj_dir -f VVortex.mk
|
||||
make -j -C obj_dir -f VVortex.mk
|
||||
|
||||
build-mt: gen-mt
|
||||
make OPT_FAST=$(OPT_FAST) OPT_SLOW=$(OPT_SLOW) -j -C obj_dir -f VVortex.mk
|
||||
make -j -C obj_dir -f VVortex.mk
|
||||
|
||||
run: run-s
|
||||
|
||||
|
||||
@@ -1,37 +1,37 @@
|
||||
################################################################################
|
||||
# HARPtools by Chad D. Kersey, Summer 2011 #
|
||||
################################################################################
|
||||
CFLAGS += -std=c++11 -O2 -Wall -Wextra -Wfatal-errors
|
||||
#CFLAGS += -std=c++11 -g -O0 -Wall -Wextra -Wfatal-errors
|
||||
|
||||
CXXFLAGS ?= -std=c++11 -fPIC -O3 -Wall -Wextra -pedantic -DUSE_DEBUG=3 -DPRINT_ACTIVE_THREADS
|
||||
#CXXFLAGS ?= -std=c++11 -fPIC -g -O0 -Wall -Wextra -pedantic -DUSE_DEBUG=3 -DPRINT_ACTIVE_THREADS
|
||||
CFLAGS += -Wno-aligned-new -Wno-maybe-uninitialized
|
||||
|
||||
LIB_OBJS=simX.cpp args.cpp mem.cpp core.cpp instruction.cpp enc.cpp util.cpp
|
||||
CFLAGS += -I../../hw
|
||||
|
||||
TOP = cache_simX
|
||||
|
||||
INCLUDE=-I../hw/old_rtl -I../hw/old_rtl/interfaces -I../hw/old_rtl/cache -I../hw/old_rtl/shared_memory
|
||||
FILE=cache_simX.v
|
||||
COMP=--compiler gcc
|
||||
LIB=
|
||||
RTL_DIR = ../hw/old_rtl
|
||||
|
||||
CF=-CFLAGS '-std=c++11 -fPIC -O3 -Wall -Wextra -pedantic -I../../hw'
|
||||
#CF=-CFLAGS '-std=c++11 -fPIC -O0 -g -Wall -Wextra -pedantic'
|
||||
SRCS = simX.cpp args.cpp mem.cpp core.cpp instruction.cpp enc.cpp util.cpp
|
||||
|
||||
LIGHTW=-Wno-UNOPTFLAT -Wno-WIDTH
|
||||
DEB=--trace -DVL_DEBUG=1
|
||||
EXE=--exe $(LIB_OBJS)
|
||||
RTL_INCLUDE=-I$(RTL_DIR) -I$(RTL_DIR)/interfaces -I$(RTL_DIR)/cache -I$(RTL_DIR)/shared_memory
|
||||
|
||||
OPT_FAST = "-Wno-aligned-new -Wmaybe-uninitialized"
|
||||
OPT_SLOW = "-Wno-aligned-new -Wmaybe-uninitialized"
|
||||
VL_FLAGS += -O2 --language 1800-2009 --assert
|
||||
VL_FLAGS += -Wno-DECLFILENAME
|
||||
VL_FLAGS += --x-initial unique --x-assign unique
|
||||
VL_FLAGS += -Wno-UNOPTFLAT -Wno-WIDTH
|
||||
|
||||
# Debugigng
|
||||
ifdef DEBUG
|
||||
VL_FLAGS += -DVCD_OUTPUT --trace --trace-structs $(DBG_FLAGS)
|
||||
CFLAGS += -DVCD_OUTPUT $(DBG_FLAGS)
|
||||
else
|
||||
VL_FLAGS += -DNDEBUG
|
||||
CFLAGS += -DNDEBUG
|
||||
endif
|
||||
|
||||
all: simX
|
||||
|
||||
# simX:
|
||||
# g++ $(LDFLAGS) $(LIB_OBJS) -o simX.run
|
||||
|
||||
|
||||
simX:
|
||||
verilator $(COMP) -cc $(FILE) $(INCLUDE) $(EXE) $(LIB) $(CF) $(LIGHTW) $(DEB)
|
||||
make OPT_FAST=$(OPT_FAST) OPT_SLOW=$(OPT_SLOW) -j -C obj_dir -f Vcache_simX.mk OPT='-DVL_DEBUG' VL_DEBUG=1 DVL_DEBUG=1
|
||||
verilator --exe --cc $(TOP) --top-module $(TOP) $(RTL_INCLUDE) $(VL_FLAGS) $(SRCS) -CFLAGS '$(CFLAGS)'
|
||||
make -j -C obj_dir -f V$(TOP).mk
|
||||
|
||||
clean:
|
||||
rm -rf *~ \#* *.o *.a *.so include/*~ include/\#* simX.run obj_dir
|
||||
rm -rf obj_dir
|
||||
|
||||
Reference in New Issue
Block a user