fixed rtlsim regression
This commit is contained in:
@@ -55,7 +55,7 @@ VL_FLAGS += verilator.vlt
|
|||||||
|
|
||||||
# Debugigng
|
# Debugigng
|
||||||
ifdef DEBUG
|
ifdef DEBUG
|
||||||
VL_FLAGS += -DVCD_OUTPUT --assert --trace $(DBG_FLAGS)
|
VL_FLAGS += -DVCD_OUTPUT --assert --trace-fst --trace-threads 1 $(DBG_FLAGS)
|
||||||
CFLAGS += -DVCD_OUTPUT $(DBG_FLAGS)
|
CFLAGS += -DVCD_OUTPUT $(DBG_FLAGS)
|
||||||
else
|
else
|
||||||
VL_FLAGS += -DNDEBUG
|
VL_FLAGS += -DNDEBUG
|
||||||
|
|||||||
@@ -96,15 +96,15 @@ void Simulator::reset() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Simulator::step() {
|
void Simulator::step() {
|
||||||
this->eval_dram_bus();
|
|
||||||
this->eval_io_bus();
|
|
||||||
this->eval_csr_bus();
|
|
||||||
this->eval_snp_bus();
|
|
||||||
|
|
||||||
vortex_->clk = 0;
|
vortex_->clk = 0;
|
||||||
this->eval();
|
this->eval();
|
||||||
vortex_->clk = 1;
|
vortex_->clk = 1;
|
||||||
this->eval();
|
this->eval();
|
||||||
|
|
||||||
|
this->eval_dram_bus();
|
||||||
|
this->eval_io_bus();
|
||||||
|
this->eval_csr_bus();
|
||||||
|
this->eval_snp_bus();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Simulator::eval() {
|
void Simulator::eval() {
|
||||||
@@ -216,7 +216,7 @@ void Simulator::eval_snp_bus() {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
if (vortex_->snp_req_valid && vortex_->snp_req_ready) {
|
if (vortex_->snp_req_valid && vortex_->snp_req_ready) {
|
||||||
if (snp_req_size_) {
|
if (snp_req_size_ != 0) {
|
||||||
vortex_->snp_req_addr += 1;
|
vortex_->snp_req_addr += 1;
|
||||||
vortex_->snp_req_tag += 1;
|
vortex_->snp_req_tag += 1;
|
||||||
--snp_req_size_;
|
--snp_req_size_;
|
||||||
@@ -289,7 +289,7 @@ void Simulator::flush_caches(uint32_t mem_addr, uint32_t size) {
|
|||||||
vortex_->snp_req_valid = 1;
|
vortex_->snp_req_valid = 1;
|
||||||
vortex_->snp_rsp_ready = 1;
|
vortex_->snp_rsp_ready = 1;
|
||||||
|
|
||||||
snp_req_size_ = (size + GLOBAL_BLOCK_SIZE - 1) / GLOBAL_BLOCK_SIZE;
|
snp_req_size_ = (size + GLOBAL_BLOCK_SIZE - 1) / GLOBAL_BLOCK_SIZE;
|
||||||
--snp_req_size_;
|
--snp_req_size_;
|
||||||
pending_snp_reqs_ = 1;
|
pending_snp_reqs_ = 1;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user