mirror of
https://github.com/vortexgpgpu/vortex.git
synced 2025-04-23 13:27:29 -04:00
fixed snoop forwarder dequue to support out of order responses
This commit is contained in:
parent
9398c07afb
commit
c54fa50715
4 changed files with 3637 additions and 98765 deletions
|
@ -12,13 +12,13 @@ DBG_PRINT_FLAGS = -DDBG_PRINT_CORE_ICACHE \
|
|||
-DDBG_PRINT_DRAM \
|
||||
-DDBG_PRINT_OPAE
|
||||
|
||||
DBG_PRINT=$(DBG_PRINT_FLAGS)
|
||||
#DBG_PRINT=$(DBG_PRINT_FLAGS)
|
||||
|
||||
#MULTICORE += -DNUM_CLUSTERS=2 -DNUM_CORES=4
|
||||
#MULTICORE += -DNUM_CLUSTERS=1 -DNUM_CORES=4
|
||||
#MULTICORE += -DNUM_CLUSTERS=1 -DNUM_CORES=2
|
||||
|
||||
DEBUG = 1
|
||||
#DEBUG = 1
|
||||
|
||||
CFLAGS += -fPIC
|
||||
|
||||
|
@ -45,10 +45,10 @@ VL_FLAGS += -DGLOBAL_BLOCK_SIZE=64
|
|||
|
||||
# Debugigng
|
||||
ifdef DEBUG
|
||||
VL_FLAGS += --trace $(DBG_PRINT)
|
||||
CFLAGS += -DVCD_OUTPUT
|
||||
VL_FLAGS += --trace -DVCD_OUTPUT $(DBG_PRINT)
|
||||
CFLAGS += -DVCD_OUTPUT $(DBG_PRINT)
|
||||
else
|
||||
CFLAGS += -DNDEBUG $(DBG_PRINT)
|
||||
CFLAGS += -DNDEBUG
|
||||
VL_FLAGS += -DNDEBUG
|
||||
endif
|
||||
|
||||
|
|
102379
driver/tests/demo/run.log
102379
driver/tests/demo/run.log
File diff suppressed because it is too large
Load diff
5
hw/rtl/cache/VX_snp_forwarder.v
vendored
5
hw/rtl/cache/VX_snp_forwarder.v
vendored
|
@ -38,7 +38,7 @@ module VX_snp_forwarder #(
|
|||
reg [`LOG2UP(SNRQ_SIZE)-1:0] rd_ptr, wr_ptr;
|
||||
reg [`LOG2UP(SNRQ_SIZE)-1:0] pending_size;
|
||||
reg [`REQS_BITS-1:0] fwdin_sel;
|
||||
wire enqueue, dequeue;
|
||||
wire enqueue, dequeue, empty;
|
||||
|
||||
wire fwdout_ready;
|
||||
|
||||
|
@ -67,8 +67,9 @@ module VX_snp_forwarder #(
|
|||
assign snp_rsp_valid = fwdin_taken && (1 == pending_cntrs[fwdin_tag]); // send response
|
||||
assign {snp_rsp_addr, snp_rsp_tag} = pending_reqs[fwdin_tag];
|
||||
|
||||
assign empty = (wr_ptr == rd_ptr);
|
||||
assign enqueue = snp_req_valid && snp_req_ready;
|
||||
assign dequeue = snp_rsp_valid && (rd_ptr == fwdin_tag);
|
||||
assign dequeue = !empty && (0 == pending_cntrs[rd_ptr]);
|
||||
|
||||
always @(posedge clk) begin
|
||||
if (reset) begin
|
||||
|
|
|
@ -195,14 +195,18 @@ void Simulator::flush_caches(uint32_t mem_addr, uint32_t size) {
|
|||
if (vortex_->snp_rsp_valid) {
|
||||
assert(pending_snp_reqs > 0);
|
||||
--pending_snp_reqs;
|
||||
//std::cout << timestamp << ": [sim] snp rsp: tag=" << vortex_->snp_rsp_tag << " pending=" << pending_snp_reqs << std::endl;
|
||||
#ifdef DBG_PRINT_CACHE_SNP
|
||||
std::cout << timestamp << ": [sim] snp rsp: tag=" << vortex_->snp_rsp_tag << " pending=" << pending_snp_reqs << std::endl;
|
||||
#endif
|
||||
}
|
||||
if (vortex_->snp_req_valid && vortex_->snp_req_ready) {
|
||||
if (vortex_->snp_req_addr < aligned_addr_end) {
|
||||
vortex_->snp_req_addr += 1;
|
||||
vortex_->snp_req_tag += 1;
|
||||
++pending_snp_reqs;
|
||||
//std::cout << timestamp << ": [sim] snp req: addr=" << vortex_->snp_req_addr << " tag=" << vortex_->snp_req_tag << " remain=" << (aligned_addr_end - vortex_->snp_req_addr) << std::endl;
|
||||
#ifdef DBG_PRINT_CACHE_SNP
|
||||
std::cout << timestamp << ": [sim] snp req: addr=" << vortex_->snp_req_addr << " tag=" << vortex_->snp_req_tag << " remain=" << (aligned_addr_end - vortex_->snp_req_addr) << std::endl;
|
||||
#endif
|
||||
} else {
|
||||
vortex_->snp_req_valid = 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue