def __init__(self, delay, *endpoint_descriptions, **misc):
self.delay = delay
self.trigger = Signal()
- BinaryActor.__init__(*endpoint_descriptions, **misc)
+ super().__init__(*endpoint_descriptions, **misc)
def get_binary_control_fragment(self, stb_i, ack_o, stb_o, ack_i):
ready = Signal()
def __init__(self, latency, *endpoint_descriptions, **misc):
self.latency = latency
self.pipe_ce = Signal()
- BinaryActor.__init__(*endpoint_descriptions, **misc)
+ super().__init__(*endpoint_descriptions, **misc)
def get_binary_control_fragment(self, stb_i, ack_o, stb_o, ack_i):
valid = Signal(BV(self.latency))
class _SimpleBinary(CombinatorialActor):
def __init__(self, op, bv_op, bv_r):
self.op = op
- CombinatorialActor.__init__(self,
+ super().__init____(
("operands", Sink, [("a", bv_op), ("b", bv_op)]),
("result", Source, [("r", bv_r)]))
class Add(_SimpleBinary):
def __init__(self, bv):
- _SimpleBinary.__init__(self, "+", bv, BV(bv.width+1, bv.signed))
+ super().__init__("+", bv, BV(bv.width+1, bv.signed))
class Sub(_SimpleBinary):
def __init__(self, bv):
- _SimpleBinary.__init__(self, "-", bv, BV(bv.width+1, bv.signed))
+ super().__init__("-", bv, BV(bv.width+1, bv.signed))
class Mul(_SimpleBinary):
def __init__(self, bv):
- _SimpleBinary.__init__(self, "*", bv, BV(2*bv.width, bv.signed))
+ super().__init__("*", bv, BV(2*bv.width, bv.signed))
class And(_SimpleBinary):
def __init__(self, bv):
- _SimpleBinary.__init__(self, "&", bv, bv)
+ super().__init__("&", bv, bv)
class Xor(_SimpleBinary):
def __init__(self, bv):
- _SimpleBinary.__init__(self, "^", bv, bv)
+ super().__init__("^", bv, bv)
class Or(_SimpleBinary):
def __init__(self, bv):
- _SimpleBinary.__init__(self, "|", bv, bv)
+ super().__init__("|", bv, bv)
class LT(_SimpleBinary):
def __init__(self, bv):
- _SimpleBinary.__init__(self, "<", bv, BV(1))
+ super().__init__("<", bv, BV(1))
class LE(_SimpleBinary):
def __init__(self, bv):
- _SimpleBinary.__init__(self, "<=", bv, BV(1))
+ super().__init__("<=", bv, BV(1))
class EQ(_SimpleBinary):
def __init__(self, bv):
- _SimpleBinary.__init__(self, "==", bv, BV(1))
+ super().__init__("==", bv, BV(1))
class NE(_SimpleBinary):
def __init__(self, bv):
- _SimpleBinary.__init__(self, "!=", bv, BV(1))
+ super().__init__("!=", bv, BV(1))
class DivMod(SequentialActor):
def __init__(self, width):
self.div = divider.Divider(width)
- SequentialActor.__init__(self, width,
+ super().__init__(width,
("operands", Sink, [("dividend", self.div.dividend_i), ("divisor", self.div.divisor_i)]),
("result", Source, [("quotient", self.div.quotient_o), ("remainder", self.div.remainder_o)]))
class Buffer(PipelinedActor):
def __init__(self, layout):
- PipelinedActor.__init__(self, 1,
+ super().__init__(1,
("d", Sink, layout), ("q", Source, layout))
def get_process_fragment(self):
for n, r in enumerate(subrecords)]
ep_source = ("source", Source, source)
eps.append(ep_source)
- CombinatorialActor.__init__(self, *eps)
+ super().__init__(*eps)
def get_fragment(self):
source = self.endpoints["source"]
for n, r in enumerate(subrecords)]
ep_sink = ("sink", Sink, sink)
eps.append(ep_sink)
- CombinatorialActor.__init__(self, *eps)
+ super().__init__(*eps)
# TODO def get_fragment(self):