minor update
This commit is contained in:
13
hw/rtl/cache/VX_shared_mem.v
vendored
13
hw/rtl/cache/VX_shared_mem.v
vendored
@@ -270,19 +270,6 @@ module VX_shared_mem #(
|
||||
end
|
||||
`endif
|
||||
|
||||
// Check potential stack overflow
|
||||
for (genvar i = 0; i < NUM_REQS; ++i) begin
|
||||
wire [31:0] addr_offset = `SMEM_BASE_ADDR - `TO_FULL_ADDR(core_req_addr[i]);
|
||||
wire [31:0] stack_offset = addr_offset % `STACK_SIZE;
|
||||
always @(posedge clk) begin
|
||||
if (core_req_valid[i] && core_req_ready[i]) begin
|
||||
if (stack_offset > (`STACK_SIZE-5)) begin
|
||||
$error("*** stack overflow! tid=%0d, offset=%0d ", i, stack_offset);
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
`ifdef DBG_PRINT_CACHE_BANK
|
||||
|
||||
reg is_multi_tag_req;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include <stdint.h>
|
||||
#include <vx_intrinsics.h>
|
||||
#include <vx_print.h>
|
||||
#include <vx_spawn.h>
|
||||
#include "common.h"
|
||||
|
||||
|
||||
@@ -9,14 +9,10 @@ VX_CXX = $(RISCV_TOOLCHAIN_PATH)/bin/riscv32-unknown-elf-g++
|
||||
VX_DP = $(RISCV_TOOLCHAIN_PATH)/bin/riscv32-unknown-elf-objdump
|
||||
VX_CP = $(RISCV_TOOLCHAIN_PATH)/bin/riscv32-unknown-elf-objcopy
|
||||
|
||||
VX_CFLAGS += -march=rv32imf -mabi=ilp32f -Os -Wstack-usage=1024 -ffreestanding -nostartfiles -fdata-sections -ffunction-sections -nostdlib
|
||||
VX_CFLAGS += -march=rv32imf -mabi=ilp32f -Os -Wstack-usage=1024 -ffreestanding -nostartfiles -fdata-sections -ffunction-sections
|
||||
VX_CFLAGS += -I$(VORTEX_RT_PATH)/include -I$(VORTEX_RT_PATH)/../hw
|
||||
|
||||
VX_LDFLAGS += -T$(VORTEX_RT_PATH)/linker/vx_link.ld -static $(VORTEX_RT_PATH)/libvortexrt.a -lc -lm -lgcc
|
||||
|
||||
#VX_CFLAGS += -march=rv32imf -mabi=ilp32f -O3 -Wstack-usage=1024 -ffreestanding -nostartfiles -fdata-sections -ffunction-sections
|
||||
#VX_CFLAGS += -I$(VORTEX_RT_PATH)/include -I$(VORTEX_RT_PATH)/../hw
|
||||
#VX_LDFLAGS += -Wl,-Bstatic,-T,$(VORTEX_RT_PATH)/linker/vx_link.ld -Wl,--gc-sections $(VORTEX_RT_PATH)/libvortexrt.a
|
||||
VX_LDFLAGS += -Wl,-Bstatic,-T,$(VORTEX_RT_PATH)/linker/vx_link.ld -Wl,--gc-sections $(VORTEX_RT_PATH)/libvortexrt.a
|
||||
|
||||
VX_SRCS = kernel.c
|
||||
|
||||
|
||||
Binary file not shown.
@@ -1,6 +1,7 @@
|
||||
#include <stdint.h>
|
||||
#include <vx_intrinsics.h>
|
||||
#include <vx_spawn.h>
|
||||
#include <vx_print.h>
|
||||
#include "common.h"
|
||||
|
||||
// Parallel Selection sort
|
||||
@@ -33,6 +34,7 @@ void kernel_body(int task_id, void* arg) {
|
||||
pos += __smaller(i, task_id, cur_value, ref_value);
|
||||
}
|
||||
dst_ptr[pos] = ref_value;
|
||||
vx_printf("taskid=%d, pos=%d, value=%d\n", task_id, pos, ref_value);
|
||||
}
|
||||
|
||||
void main() {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Reference in New Issue
Block a user