From b9657e88aa2b50d117c86b88c6d6186b3c91bf8c Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Mon, 25 Oct 2021 11:33:51 +0100 Subject: [PATCH] start filling in ElwidPartType switch/case and other info needed to get it functional and a drop-in replacement for the old PartitionedSignal PartType behaviour --- src/ieee754/part/partsig.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/ieee754/part/partsig.py b/src/ieee754/part/partsig.py index 3ba38a58..e38258be 100644 --- a/src/ieee754/part/partsig.py +++ b/src/ieee754/part/partsig.py @@ -81,6 +81,7 @@ class PartType: # TODO decide name def blanklanes(self): return 0 + # this one would be an elwidth version # see https://bugs.libre-soc.org/show_bug.cgi?id=713#c34 # it requires an "adapter" which is the layout() function @@ -93,19 +94,17 @@ class ElWidthPartType: # TODO decide name self.psig = psig def get_mask(self): - ppoints = self.psig.scope.partpoints - return ppoints.values() # i think + return self.psig.shape.partpoints.values() # i think def get_switch(self): - return self.psig.elwidth + return self.psig.scope.elwid # switch on elwid: match get_cases() def get_cases(self): - pbits = self.psig.scope.bitp - return pbits + return self.psig.shape.bitp.keys() # all possible values of elwid @property def blanklanes(self): - return 0 # TODO + return self.psig.shape.blankmask class SimdShape(Shape): -- 2.30.2