Skip to content

Commit c6ad776

Browse files
authored
更新 datapath.py
1 parent d002f2f commit c6ad776

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pycde_example/mini_riscv/datapath.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ def build(io):
124124
# Regfile Write
125125
reg_wdata = Mux(ctrl_rg.wb_sel, ew_alu, load, (ew_pc.as_uint() + 4).as_bits(XLEN), csr.Out)
126126

127-
(wdata, _) = WriteType.wrap({'data': reg_wdata, 'address': fe_inst[7:12]}, ctrl_rg.wb_en & ~stall & ~csr.expt)
127+
(wdata, _) = WriteType.wrap({'data': reg_wdata, 'address': fe_inst[7:12].as_uint()}, ctrl_rg.wb_en & ~stall & ~csr.expt)
128128
write_pkt.assign(wdata)
129129
io.dreq, _ = types.channel(ReqType).wrap(ReqType({"addr": 123, "data": 456, "mask": 15, "abort" : csr.expt}), 1)
130130

0 commit comments

Comments
 (0)