yield
def test_fu_fu_matrix():
- dut = FUFUDepMatrix(n_fu_row=4, n_fu_col=4, n_src=3, n_dest=2)
+ dut = FUFUDepMatrix(n_fu_row=30, n_fu_col=30, n_src=3, n_dest=2)
vl = rtlil.convert(dut, ports=dut.ports())
with open("test_fu_fu_matrix.il", "w") as f:
f.write(vl)
for regfile, spec in byregfiles_rd.items():
rdpickers[regfile] = {}
for rpidx, (idx, fuspec) in enumerate(spec.items()):
+ # get the regfile specs for this regfile port
+ (regname, rdflag, read, wid) = byregfiles_rdspec[regfile]
+
+ # "munge" the regfile port index, due to full-port access
+ if regfile in ['XER', 'CR']:
+ if regname.startswith('full'):
+ rpidx = 0 # by convention, first port
+ else:
+ rpidx += 1 # start indexing port 0 from 1
+
# select the required read port. these are pre-defined sizes
print (regfile, regs.rf.keys())
rport = regs.rf[regfile.lower()].r_ports[rpidx]
setattr(m.submodules, "rdpick_%s_%d" % (regfile, idx), rdpick)
# connect the regspec "reg select" number to this port
- (regname, rdflag, read, wid) = byregfiles_rdspec[regfile]
- comb += rport.ren.eq(read)
+ with m.If(rdpick.en_o):
+ comb += rport.ren.eq(read)
# connect up the FU req/go signals and the reg-read to the FU
for pi, (funame, fu) in enumerate(fuspec):