dcache fixes
This commit is contained in:
parent
65f8b2461c
commit
ace4c9d13c
@ -323,7 +323,7 @@ class rocketDCacheDM_1C(lines: Int, addrbits: Int) extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
val tag_valid = vb_rdata.toBool;
|
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) {
|
when ((state === s_ready) && r_cpu_req_val && req_store) {
|
||||||
p_store_data <== r_cpu_req_data;
|
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 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 resolve_store = (state === s_resolve_miss) && req_store;
|
||||||
val do_store = drain_store | resolve_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;
|
val ldst_conflict = r_cpu_req_val && req_load && p_store_valid && addr_match;
|
||||||
|
|
||||||
// output signals
|
// 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)) ||
|
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);
|
((state === s_resolve_miss) && req_flush);
|
||||||
|
Loading…
Reference in New Issue
Block a user