def visit_Slice(self, node): if not isinstance(node.value, Signal): slice_proxy = Signal(value_bits_sign(node.value)) if self.target_context: a = _Assign(node.value, slice_proxy) else: a = _Assign(slice_proxy, node.value) self.comb.append(self.visit_Assign(a)) node = _Slice(slice_proxy, node.start, node.stop) return NodeTransformer.visit_Slice(self, node)
def visit_Slice(self, node): return _Slice(self.visit(node.value), node.start, node.stop)