From: Luke Kenneth Casson Leighton Date: Wed, 4 Mar 2020 16:49:01 +0000 (+0000) Subject: move default case out of switch, to make room for multiple switches X-Git-Tag: div_pipeline~1783 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=322b55ed89390939318cf4dc0f750f808214bdd0;p=soc.git move default case out of switch, to make room for multiple switches and a *list* of subdecoders --- diff --git a/src/decoder/power_decoder.py b/src/decoder/power_decoder.py index de857592..96ad6a73 100644 --- a/src/decoder/power_decoder.py +++ b/src/decoder/power_decoder.py @@ -136,6 +136,9 @@ class PowerDecoder(Elaboratable): comb += self.op.eq(subdecoder.op) else: + comb += self.op._eq(None) # default case + # TODO: detect if subdecoders is a *list*, and do + # a for-loop around the *list* of subdecoders with m.Switch(opcode_switch): self.handle_subdecoders(m) for row in self.opcodes: @@ -146,8 +149,6 @@ class PowerDecoder(Elaboratable): continue with m.Case(opcode): comb += self.op._eq(row) - with m.Default(): - comb += self.op._eq(None) return m def handle_subdecoders(self, m):