1
0

dcache fixes

This commit is contained in:
Rimas Avizienis 2011-10-31 17:17:36 -07:00
parent 65f8b2461c
commit ace4c9d13c

View File

@ -323,7 +323,7 @@ class rocketDCacheDM_1C(lines: Int, addrbits: Int) extends Component {
}
val tag_valid = vb_rdata.toBool;
val tag_match = tag_valid && !req_flush && (tag_rdata === r_cpu_req_addr(tagmsb, taglsb));
val tag_match = tag_valid && (tag_rdata === r_cpu_req_addr(tagmsb, taglsb));
when ((state === s_ready) && r_cpu_req_val && req_store) {
p_store_data <== r_cpu_req_data;
@ -333,7 +333,7 @@ class rocketDCacheDM_1C(lines: Int, addrbits: Int) extends Component {
}
val addr_match = (r_cpu_req_addr(tagmsb, offsetlsb) === p_store_addr(tagmsb, offsetlsb));
val drain_store = ((state === s_ready) && p_store_valid && (!r_cpu_req_val || !req_load || addr_match))
val drain_store = ((state === s_ready) && p_store_valid && (!r_cpu_req_val || !tag_match || !req_load || addr_match))
val resolve_store = (state === s_resolve_miss) && req_store;
val do_store = drain_store | resolve_store;
@ -389,7 +389,7 @@ class rocketDCacheDM_1C(lines: Int, addrbits: Int) extends Component {
val ldst_conflict = r_cpu_req_val && req_load && p_store_valid && addr_match;
// output signals
io.cpu.req_rdy := (state === s_ready) && !ldst_conflict && (!r_cpu_req_val || tag_match);
io.cpu.req_rdy := (state === s_ready) && !ldst_conflict && (!r_cpu_req_val || (tag_match && !req_flush));
io.cpu.resp_val := ((state === s_ready) && r_cpu_req_val && tag_match && req_load && !(p_store_valid && addr_match)) ||
((state === s_resolve_miss) && req_flush);