From: Luke Kenneth Casson Leighton Date: Sun, 4 Oct 2020 15:02:31 +0000 (+0100) Subject: add pinspec to json output X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=56d99bc6341135bd5cc47251fa75f55c92ebf5fe;p=pinmux.git add pinspec to json output --- diff --git a/src/spec/ifaceprint.py b/src/spec/ifaceprint.py index d5ad116..dba37e6 100644 --- a/src/spec/ifaceprint.py +++ b/src/spec/ifaceprint.py @@ -92,7 +92,7 @@ def python_pindict(of, pinmap, pins, function_names, dname, remap): of.write("%s = {\n" % dname) for k, pingroup in pins.byspec.items(): - (a, n) = k + (a, n) = k.split(":") if n.isdigit(): a = "%s%s" % (a, n) fblower = a.lower() diff --git a/src/spec/interfaces.py b/src/spec/interfaces.py index c59a83d..f66e474 100644 --- a/src/spec/interfaces.py +++ b/src/spec/interfaces.py @@ -77,7 +77,7 @@ class PinGen(object): prefix = self.fname if start and limit: # limit turns into an offset from start limit = start + limit - sk = (self.fname, suffix) + sk = "%s:%s" % (self.fname, str(suffix)) print "pingroup pre", sk, pingroup pingroup = pingroup[start:limit] # see comment in spec.pinfunctions print "pingroup post", sk, pingroup diff --git a/src/spec/ls180.py b/src/spec/ls180.py index 2869a01..9fdf135 100644 --- a/src/spec/ls180.py +++ b/src/spec/ls180.py @@ -350,6 +350,8 @@ def pinparse(psp, pinspec): pprint(domains) print "chip clocks (excluding sys-default)" pprint(clocks) + print "pin spec" + pprint(psp.byspec) chip = { 'pads.south' : ps, @@ -357,6 +359,7 @@ def pinparse(psp, pinspec): 'pads.north' : pn, 'pads.west' : pw, 'pads.instances' : iopads, + 'pins.specs' : psp.byspec, 'chip.domains' : domains, 'chip.clocks' : clocks, 'chip.n_intpower': n_intpower,