From dc7a84e6be63e1a15cdde3f13fea4b9d58e2312d Mon Sep 17 00:00:00 2001 From: Michael Nolan Date: Mon, 30 Mar 2020 13:03:33 -0400 Subject: [PATCH] Minor cleanup --- src/soc/decoder/power_decoder.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/soc/decoder/power_decoder.py b/src/soc/decoder/power_decoder.py index a3d67fb1..dfd5cb67 100644 --- a/src/soc/decoder/power_decoder.py +++ b/src/soc/decoder/power_decoder.py @@ -245,8 +245,7 @@ class TopPowerDecoder(PowerDecoder): self.raw_opcode_in = Signal.like(self.opcode_in, reset_less=True) self.bigendian = Signal(reset_less=True) - for name in self.fields.common_fields: - value = getattr(self.fields, name) + for name, value in self.fields.common_fields.items(): sig = Signal(value[0:-1].shape(), reset_less=True, name=name) setattr(self, name, sig) @@ -263,8 +262,7 @@ class TopPowerDecoder(PowerDecoder): comb += self.opcode_in.eq(Mux(self.bigendian, raw_be, raw_le)) # add all signal from commonly-used fields - for name in self.fields.common_fields: - value = getattr(self.fields, name) + for name, value in self.fields.common_fields.items(): sig = getattr(self, name) comb += sig.eq(value[0:-1]) -- 2.30.2