def __init__(self, parent: Module, source: Wire, delay: int): super().__init__("{}_v_buffer".format(source.name), parent) buf_out = parent.create_wire() org_post = set(source.post) for p in org_post: p.unbind() p.bind(buf_out) self._input = PinIn("v_bfr_in", self, source) self._output = PinOut("v_bfr_out", self, buf_out) self._delay = delay
def __init__(self, name: str, parent: Device, model: Device, mapping: Dict[str, Net]): super().__init__(name, parent) self._model = model self._pins = dict() self._inputs = list() self._outputs = list() for x in model.input_labels: pin = PinIn(x, self, mapping.get(x)) self._pins[x] = pin self._inputs.append(pin) for x in model.output_labels: pin = PinOut(x, self, mapping.get(x)) self._pins[x] = pin self._outputs.append(pin)
def __init__(self, parent: Module, source: Wire, child_wires: Dict[Wire, int] = None): super().__init__("{}_v_fanout".format(source.name), parent) self._before = 0 self._tracker = 0 self._outputs = set() self._after = dict() if child_wires is None: org_post = set(source.post) for p in org_post: p.unbind() split_out_wire = parent.create_wire() p.bind(split_out_wire) self._add_wire(split_out_wire) else: for p in child_wires.keys(): self._add_wire(p, child_wires[p]) self._input = PinIn("v_fanout_in", self, source)
def __init__(self, name: str, parent: (Block, Device), org: Net, alias: Net): super().__init__(name, parent) self._input = PinIn("alias", self, alias) self._output = PinOut("org", self, org)