From: Luke Kenneth Casson Leighton Date: Sun, 7 Apr 2019 23:17:42 +0000 (+0100) Subject: add ports function to Cam.py for convenience X-Git-Tag: div_pipeline~2276 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2098e352a5c0765beb4efe57fc0f489e2b60dc9b;p=soc.git add ports function to Cam.py for convenience --- diff --git a/TLB/src/Cam.py b/TLB/src/Cam.py index ecb4902b..64ccdcaa 100644 --- a/TLB/src/Cam.py +++ b/TLB/src/Cam.py @@ -111,10 +111,14 @@ class Cam(): return m + def ports(self): + return [self.enable, self.write_enable, + self.data_in, self.data_mask, + self.read_warning, self.single_match, + self.multiple_match, self.match_address] + + if __name__ == '__main__': cam = Cam(4, 4) - main(cam, ports=[cam.enable, cam.write_enable, - cam.data_in, cam.data_mask, - cam.read_warning, cam.single_match, - cam.multiple_match, cam.match_address]) + main(cam, ports=cam.ports())