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 _add_wire(self, other: Wire, delay: int = 0): split_out_pin = PinOut("v_fanout_out_{}".format(str(self._tracker)), self, other) self._outputs.add(split_out_pin) self._tracker = self._tracker + 1 self._after[split_out_pin.name] = delay
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)