self.invert_a = Signal()
self.a = Signal(width)
self.b = Signal(width)
- self.o = Signal(width)
+ self.o = Signal(width, name="add_o")
def elaborate(self, platform):
m = Module()
def __init__(self, width):
self.a = Signal(width)
self.b = Signal(width)
- self.o = Signal(width)
+ self.o = Signal(width, name="sub_o")
def elaborate(self, platform):
m = Module()
def __init__(self, width):
self.a = Signal(width)
self.b = Signal(width)
- self.o = Signal(width)
+ self.o = Signal(width, name="mul_o")
def elaborate(self, platform):
m = Module()
self.width = width
self.a = Signal(width)
self.b = Signal(width)
- self.o = Signal(width)
+ self.o = Signal(width, name="shf_o")
def elaborate(self, platform):
m = Module()
class Dummy:
pass
+
class DummyALU(Elaboratable):
def __init__(self, width):
self.p = Dummy() # make look like nmutil pipeline API
i.append(Signal(width, name="i3"))
self.i = Array(i)
self.a, self.b, self.c = i[0], i[1], i[2]
- self.out = Array([Signal(width)])
+ self.out = Array([Signal(width, name="alu_o")])
self.o = self.out[0]
self.width = width
# more "look like nmutil pipeline API"
i.append(Signal(width, name="i2"))
self.i = Array(i)
self.a, self.b = i[0], i[1]
- self.out = Array([Signal(width)])
+ self.out = Array([Signal(width, name="alu_o")])
self.o = self.out[0]
self.width = width
# more "look like nmutil pipeline API"