m.submodules.pdecode2 = pdecode2 = PowerDecode2(pdecode)
+ class PPspec:
+ XLEN = 64
+ pps = PPspec()
pspec = DivPipeSpec(
- id_wid=2, div_pipe_kind=div_pipe_kind, parent_pspec=None)
+ id_wid=2, div_pipe_kind=div_pipe_kind, parent_pspec=pps)
m.submodules.alu = alu = DivBasePipe(pspec)
comb += alu.p.i_data.ctx.op.eq_from_execute1(pdecode2.do)
class TestPipeIlang(unittest.TestCase):
def write_ilang(self, div_pipe_kind):
+ class PPspec:
+ XLEN = 64
+ pps = PPspec()
pspec = DivPipeSpec(
- id_wid=2, div_pipe_kind=div_pipe_kind, parent_pspec=None)
+ id_wid=2, div_pipe_kind=div_pipe_kind, parent_pspec=pps)
alu = DivBasePipe(pspec)
vl = rtlil.convert(alu, ports=alu.ports())
with open(f"div_pipeline_{div_pipe_kind.name}.il", "w") as f:
m.submodules.pdecode2 = pdecode2 = PowerDecode2(None, opkls, fn_name)
pdecode = pdecode2.dec
- pspec = MulPipeSpec(id_wid=2, parent_pspec=None)
+ class PPspec:
+ XLEN = 64
+ pps = PPspec()
+ pspec = MulPipeSpec(id_wid=2, parent_pspec=pps)
m.submodules.alu = alu = MulBasePipe(pspec)
comb += alu.p.i_data.ctx.op.eq_from_execute1(pdecode2.do)
class TestPipeIlang(unittest.TestCase):
def write_ilang(self):
- pspec = MulPipeSpec(id_wid=2, parent_pspec=None)
+ class PPspec:
+ XLEN = 64
+ pps = PPspec()
+ pspec = MulPipeSpec(id_wid=2, parent_pspec=pps)
alu = MulBasePipe(pspec)
vl = rtlil.convert(alu, ports=alu.ports())
with open("mul_pipeline.il", "w") as f: