From 16f1996a9e92932a87b8b24fc156cc6ba4326764 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sun, 14 Nov 2021 15:25:41 +0000 Subject: [PATCH] override Platform.add_resources() so as to be able to add resources to the Boundary Scan pad_mgr --- src/spec/testing_stage1.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/spec/testing_stage1.py b/src/spec/testing_stage1.py index 3def0b0..70a96cb 100644 --- a/src/spec/testing_stage1.py +++ b/src/spec/testing_stage1.py @@ -156,13 +156,11 @@ class DummyPlatform(TemplatedPlatform): default_clk = "clk" # should be picked up / overridden by platform sys.clk default_rst = "rst" # should be picked up / overridden by platform sys.rst def __init__(self, pinset): + self.pad_mgr = ResourceManager([], []) super().__init__() # create set of pin resources based on the pinset, this is for the core resources = create_resources(pinset) self.add_resources(resources) - # make a *second* - identical - set of pin resources for the IO ring - padres = deepcopy(resources) - self.pad_mgr = ResourceManager(padres, []) # allocate all resources, right now, so that a lookup can be created # between core IO names and pads self.core = {} @@ -182,6 +180,14 @@ class DummyPlatform(TemplatedPlatform): print ("iter", pad) self.padlookup[pad[0].name] = core + def add_resources(self, resources, no_boundary_scan=False): + super().add_resources(resources) + if no_boundary_scan: + return + # make a *second* - identical - set of pin resources for the IO ring + padres = deepcopy(resources) + self.pad_mgr.add_resources(padres) + # XXX these aren't strictly necessary right now but the next # phase is to add JTAG Boundary Scan so it maaay be worth adding? # at least for the print statements -- 2.30.2