bugfixes due to new hcl jar file
This commit is contained in:
parent
11f0e3daf4
commit
bc44572d99
@ -45,7 +45,7 @@ class rocketDpath extends Component
|
|||||||
|
|
||||||
val alu = new rocketDpathALU();
|
val alu = new rocketDpathALU();
|
||||||
val ex_alu_out = alu.io.out;
|
val ex_alu_out = alu.io.out;
|
||||||
val ex_jr_target = ex_alu_out(VADDR_BITS,0);
|
val ex_jr_target = ex_alu_out(VADDR_BITS-1,0);
|
||||||
|
|
||||||
val div = new rocketDivider(64);
|
val div = new rocketDivider(64);
|
||||||
val div_result = div.io.div_result_bits;
|
val div_result = div.io.div_result_bits;
|
||||||
@ -60,7 +60,7 @@ class rocketDpath extends Component
|
|||||||
val rfile = new rocketDpathRegfile();
|
val rfile = new rocketDpathRegfile();
|
||||||
|
|
||||||
// instruction fetch definitions
|
// instruction fetch definitions
|
||||||
val if_reg_pc = Reg(resetVal = UFix(0,VADDR_BITS));
|
val if_reg_pc = Reg(resetVal = UFix(START_ADDR,VADDR_BITS));
|
||||||
|
|
||||||
// instruction decode definitions
|
// instruction decode definitions
|
||||||
val id_reg_valid = Reg(resetVal = Bool(false));
|
val id_reg_valid = Reg(resetVal = Bool(false));
|
||||||
@ -141,15 +141,12 @@ class rocketDpath extends Component
|
|||||||
Mux(io.ctrl.sel_pc === PC_BR, ex_branch_target,
|
Mux(io.ctrl.sel_pc === PC_BR, ex_branch_target,
|
||||||
Mux(io.ctrl.sel_pc === PC_J, ex_branch_target,
|
Mux(io.ctrl.sel_pc === PC_J, ex_branch_target,
|
||||||
Mux(io.ctrl.sel_pc === PC_JR, ex_jr_target.toUFix,
|
Mux(io.ctrl.sel_pc === PC_JR, ex_jr_target.toUFix,
|
||||||
Mux(io.ctrl.sel_pc === PC_PCR, mem_reg_wdata, // only used for ERET
|
Mux(io.ctrl.sel_pc === PC_PCR, mem_reg_wdata(VADDR_BITS-1,0), // only used for ERET
|
||||||
Mux(io.ctrl.sel_pc === PC_EVEC, pcr.io.evec,
|
Mux(io.ctrl.sel_pc === PC_EVEC, pcr.io.evec,
|
||||||
Mux(io.ctrl.sel_pc === PC_MEM, mem_reg_pc,
|
Mux(io.ctrl.sel_pc === PC_MEM, mem_reg_pc,
|
||||||
UFix(0, VADDR_BITS)))))))))));
|
UFix(0, VADDR_BITS)))))))))));
|
||||||
|
|
||||||
when (!io.host.start){
|
when (!io.ctrl.stallf && io.host.start) {
|
||||||
if_reg_pc <== UFix(START_ADDR, VADDR_BITS);
|
|
||||||
}
|
|
||||||
when (!io.ctrl.stallf) {
|
|
||||||
if_reg_pc <== if_next_pc.toUFix;
|
if_reg_pc <== if_next_pc.toUFix;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,23 +40,23 @@ class rocketIPrefetcher extends Component() {
|
|||||||
val ip_mem_resp_val = io.mem.resp_val && io.mem.resp_tag(0).toBool;
|
val ip_mem_resp_val = io.mem.resp_val && io.mem.resp_tag(0).toBool;
|
||||||
|
|
||||||
io.mem.req_val := io.icache.req_val & ~hit | (state === s_req_wait);
|
io.mem.req_val := io.icache.req_val & ~hit | (state === s_req_wait);
|
||||||
io.mem.req_tag := !(io.icache.req_val && !hit);
|
io.mem.req_tag := Cat(Bits(0,2), !(io.icache.req_val && !hit));
|
||||||
io.mem.req_addr := Mux(io.mem.req_tag.toBool, prefetch_addr, io.icache.req_addr);
|
io.mem.req_addr := Mux(io.mem.req_tag(0).toBool, prefetch_addr, io.icache.req_addr);
|
||||||
|
|
||||||
val pdq_reset = Reg(resetVal = Bool(true));
|
val pdq_reset = Reg(resetVal = Bool(true));
|
||||||
pdq_reset <== demand_miss & ~hit | (state === s_bad_resp_wait);
|
pdq_reset <== demand_miss & ~hit | (state === s_bad_resp_wait);
|
||||||
|
|
||||||
val fill_cnt = Reg(resetVal = UFix(0, 2));
|
val fill_cnt = Reg(resetVal = UFix(0,2));
|
||||||
when (ip_mem_resp_val.toBool) { fill_cnt <== fill_cnt + UFix(1,1); }
|
when (ip_mem_resp_val.toBool) { fill_cnt <== fill_cnt + UFix(1,1); }
|
||||||
val fill_done = (fill_cnt === UFix(3,2)) & ip_mem_resp_val;
|
val fill_done = (fill_cnt === UFix(3,2)) & ip_mem_resp_val;
|
||||||
|
|
||||||
val forward = Reg(resetVal = Bool(false));
|
val forward = Reg(resetVal = Bool(false));
|
||||||
val forward_cnt = Reg(resetVal = UFix(0, 2));
|
val forward_cnt = Reg(resetVal = UFix(0,2));
|
||||||
when (forward & pdq.io.deq_val) { forward_cnt <== forward_cnt + UFix(1,1); }
|
when (forward & pdq.io.deq_val) { forward_cnt <== forward_cnt + UFix(1,1); }
|
||||||
val forward_done = (forward_cnt === UFix(3, 2)) & pdq.io.deq_val;
|
val forward_done = (forward_cnt === UFix(3,2)) & pdq.io.deq_val;
|
||||||
forward <== (demand_miss & hit | forward & ~forward_done);
|
forward <== (demand_miss & hit | forward & ~forward_done);
|
||||||
|
|
||||||
io.icache.resp_val := (io.mem.resp_val && !io.mem.resp_tag.toBool) || (forward && pdq.io.deq_val);
|
io.icache.resp_val := (io.mem.resp_val && !io.mem.resp_tag(0).toBool) || (forward && pdq.io.deq_val);
|
||||||
io.icache.resp_data := Mux(forward, pdq.io.deq_bits, io.mem.resp_data);
|
io.icache.resp_data := Mux(forward, pdq.io.deq_bits, io.mem.resp_data);
|
||||||
|
|
||||||
pdq.io.q_reset := pdq_reset;
|
pdq.io.q_reset := pdq_reset;
|
||||||
|
Loading…
Reference in New Issue
Block a user