From ed08d4bd3552fb87218231bb6eef7c118a9f0868 Mon Sep 17 00:00:00 2001 From: Dennis Date: Wed, 6 Oct 2021 23:39:04 -0700 Subject: [PATCH] Fix external-register bug where the sw_rd-wire is missing This was introduced in dc37c879 because sw_rd-wires got removed here for registers that don't need it. --- srdl2sv/components/field.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/srdl2sv/components/field.py b/srdl2sv/components/field.py index 92deb2e..13fb0bd 100644 --- a/srdl2sv/components/field.py +++ b/srdl2sv/components/field.py @@ -1235,6 +1235,10 @@ class Field(Component): self.properties['sw_wr'] = obj.get_property('sw') in (AccessType.rw, AccessType.w) self.properties['sw_rd'] = obj.get_property('sw') in (AccessType.rw, AccessType.r) + # In case of an external register, a wire to indicate a read + # is always required + self.properties['sw_rd_wire'] = self.config['external'] and self.properties['sw_rd'] + # Save dimensions of unpacked dimension self.array_dimensions = array_dimensions self.total_array_dimensions = array_dimensions