hdl.ast, back.rtlil: add source locations to anonymous wires.

This might help with propagation of locations through optimizer
passes, since not all of them take care to preserve cells at all,
but usually wires stay intact when possible.

Also fixes incorrect source location on value.part().
This commit is contained in:
whitequark 2019-08-03 12:44:52 +00:00
parent 29fee01f86
commit bcdc280a87
2 changed files with 12 additions and 10 deletions

View file

@ -163,7 +163,7 @@ class Value(metaclass=ABCMeta):
Part, out
Selected part of the ``Value``
"""
return Part(self, offset, width)
return Part(self, offset, width, src_loc_at=1)
def eq(self, value):
"""Assignment.