From 7059cb49314d63e1d0f2d5ee21c54a701aaa44f8 Mon Sep 17 00:00:00 2001 From: whitequark Date: Wed, 3 Jul 2019 14:49:20 +0000 Subject: [PATCH] hdl.rec: thread src_loc_at to all inner Signals and Records. --- nmigen/hdl/rec.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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] -- 2.30.2