class BranchALU(Elaboratable):
def __init__(self, width):
+ self.p = Dummy() # make look like nmutil pipeline API
+ self.p.data_i = Dummy()
+ self.p.data_i.ctx = Dummy()
+ self.n = Dummy() # make look like nmutil pipeline API
+ self.n.data_o = Dummy()
self.p.valid_i = Signal()
self.p.ready_o = Signal()
self.n.ready_i = Signal()
from nmigen import Module, Const, Signal, Array, Cat, Elaboratable, Memory
from nmigen.back.pysim import Delay
-from soc.regfile.regfile import RegFileArray, treereduce
+from soc.regfile.regfile import RegFileArray, ortreereduce
from soc.scoremulti.fu_fu_matrix import FUFUDepMatrix
from soc.scoremulti.fu_reg_matrix import FURegDepMatrix
from soc.scoreboard.global_pending import GlobalPending
# protected by a single go_wr. multi-issue requires a bus
# to be inserted here.
if self.units:
- data_o = treereduce(self.units, "data_o")
+ data_o = ortreereduce(self.units, "data_o")
comb += self.data_o.eq(data_o)
if self.ldstmode:
- addr_o = treereduce(self.units, "addr_o")
+ addr_o = ortreereduce(self.units, "addr_o")
comb += self.addr_o.eq(addr_o)
for i, alu in enumerate(self.units):
def ports(self):
res = list(self)
-def ortreereduce(tree):
- return treereduce(tree, operator.or_, lambda x: getattr(x, "data_o"))
+def ortreereduce(tree, attr="data_o"):
+ return treereduce(tree, operator.or_, lambda x: getattr(x, attr))
class RegFileArray(Elaboratable):