From bed1fd727f98ed135e8077520219d5c0a2be4a88 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Thu, 24 Jun 2021 22:11:26 +0100 Subject: [PATCH] allow default decoder to be created with no col/row subset --- src/openpower/decoder/power_decoder2.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/openpower/decoder/power_decoder2.py b/src/openpower/decoder/power_decoder2.py index 88421837..a7098303 100644 --- a/src/openpower/decoder/power_decoder2.py +++ b/src/openpower/decoder/power_decoder2.py @@ -767,7 +767,12 @@ class PowerDecodeSubset(Elaboratable): if opkls is None: opkls = Decode2ToOperand self.do = opkls(fn_name) - col_subset = self.get_col_subset(self.do) + if final: + col_subset = self.get_col_subset(self.do) + row_subset = self.rowsubsetfn + else: + col_subset = None + row_subset = None # "conditions" for Decoders, to enable some weird and wonderful # alternatives. useful for PCR (Program Compatibility Register) @@ -775,6 +780,7 @@ class PowerDecodeSubset(Elaboratable): conditions = {'SVP64BREV': self.use_svp64_ldst_dec, '~SVP64BREV': ~self.use_svp64_ldst_dec } + # only needed for "main" PowerDecode2 if not self.final: self.e = Decode2ToExecute1Type(name=self.fn_name, do=self.do, @@ -783,7 +789,7 @@ class PowerDecodeSubset(Elaboratable): # create decoder if one not already given if dec is None: dec = create_pdecode(name=fn_name, col_subset=col_subset, - row_subset=self.rowsubsetfn, + row_subset=row_subset, conditions=conditions) self.dec = dec -- 2.30.2