From e3f03c0ff4b71c7500b5c997d183d0b931d22853 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sun, 19 Apr 2020 11:32:41 +0100 Subject: [PATCH] convert BranchALU to temporary conformant API --- src/soc/experiment/alu_hier.py | 10 +++++++--- src/soc/experiment/score6600_multi.py | 5 +++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/soc/experiment/alu_hier.py b/src/soc/experiment/alu_hier.py index 2e9a10dd..e3dfe3c6 100644 --- a/src/soc/experiment/alu_hier.py +++ b/src/soc/experiment/alu_hier.py @@ -273,9 +273,13 @@ class BranchALU(Elaboratable): self.n_valid_o = Signal() self.counter = Signal(4) self.op = Signal(2) - self.a = Signal(width) - self.b = Signal(width) - self.o = Signal(width) + i = [] + i.append(Signal(width, name="i1")) + i.append(Signal(width, name="i2")) + self.i = Array(i) + self.a, self.b = i[0], i[1] + self.out = Array([Signal(width)]) + self.o = self.out[0] self.width = width def elaborate(self, platform): diff --git a/src/soc/experiment/score6600_multi.py b/src/soc/experiment/score6600_multi.py index b24b2fa3..53d27ee9 100644 --- a/src/soc/experiment/score6600_multi.py +++ b/src/soc/experiment/score6600_multi.py @@ -142,7 +142,6 @@ class CompUnitsBase(Elaboratable): godie_l.append(alu.go_die_i) print (alu, "rel", alu.req_rel_o, alu.rd_rel_o) if isinstance(alu, LDSTCompUnit) or \ - isinstance(alu, CompUnitBR) or \ isinstance(alu, ComputationUnitNoDelay): if isinstance(alu, CompUnitsBase): ulen = alu.n_units @@ -322,13 +321,14 @@ class CompUnitBR(CompUnitsBase): self.opwid = opwid # inputs + self.op = CompALUOpSubset("cua_i") # TODO - CompALUBranchSubset self.oper_i = Signal(opwid, reset_less=True) self.imm_i = Signal(rwid, reset_less=True) # Branch ALU and CU self.bgt = BranchALU(rwid) aluopwid = 3 # extra bit for immediate mode - self.br1 = ComputationUnitNoDelay(rwid, self.bgt) + self.br1 = MultiCompUnit(rwid, self.bgt) CompUnitsBase.__init__(self, rwid, [self.br1]) def elaborate(self, platform): @@ -337,6 +337,7 @@ class CompUnitBR(CompUnitsBase): # hand the same operation to all units for alu in self.units: + #comb += alu.oper_i.eq(self.op) # TODO comb += alu.oper_i.eq(self.oper_i) #comb += alu.imm_i.eq(self.imm_i) -- 2.30.2