mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
fhdl: support for naming related signals
This commit is contained in:
parent
146a1b5d51
commit
305c6985bc
1 changed files with 5 additions and 2 deletions
|
@ -113,7 +113,7 @@ class Replicate(Value):
|
|||
self.n = n
|
||||
|
||||
class Signal(Value):
|
||||
def __init__(self, bits_sign=None, name=None, variable=False, reset=0, name_override=None, min=None, max=None):
|
||||
def __init__(self, bits_sign=None, name=None, variable=False, reset=0, name_override=None, min=None, max=None, related=None):
|
||||
from migen.fhdl.size import bits_for
|
||||
|
||||
Value.__init__(self)
|
||||
|
@ -139,7 +139,10 @@ class Signal(Value):
|
|||
self.variable = variable # deprecated
|
||||
self.reset = reset
|
||||
self.name_override = name_override
|
||||
self.backtrace = tracer.trace_back(name)
|
||||
self.backtrace = []
|
||||
if related is not None:
|
||||
self.backtrace += related.backtrace
|
||||
self.backtrace += tracer.trace_back(name)
|
||||
|
||||
def __repr__(self):
|
||||
return "<Signal " + (self.backtrace[-1][0] or "anonymous") + " at " + hex(id(self)) + ">"
|
||||
|
|
Loading…
Reference in a new issue