From: whitequark Date: Wed, 3 Jul 2019 14:49:20 +0000 (+0000) Subject: hdl.rec: thread src_loc_at to all inner Signals and Records. X-Git-Tag: locally_working~117 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7059cb49314d63e1d0f2d5ee21c54a701aaa44f8;p=nmigen.git hdl.rec: thread src_loc_at to all inner Signals and Records. --- diff --git a/nmigen/hdl/rec.py b/nmigen/hdl/rec.py index be70af2..7828f76 100644 --- a/nmigen/hdl/rec.py +++ b/nmigen/hdl/rec.py @@ -110,9 +110,11 @@ class Record(Value): self.fields[field_name] = field else: if isinstance(field_shape, Layout): - self.fields[field_name] = Record(field_shape, name=concat(name, field_name)) + self.fields[field_name] = Record(field_shape, name=concat(name, field_name), + src_loc_at=src_loc_at + 1) else: - self.fields[field_name] = Signal(field_shape, name=concat(name, field_name)) + self.fields[field_name] = Signal(field_shape, name=concat(name, field_name), + src_loc_at=src_loc_at + 1) def __getattr__(self, name): return self[name]