From: Luke Kenneth Casson Leighton Date: Mon, 30 Jul 2018 05:04:16 +0000 (+0100) Subject: format rgbttl connections X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=870776869f3a7e384d72f5e8140f82cb933541e9;p=pinmux.git format rgbttl connections --- diff --git a/src/bsv/peripheral_gen/rgbttl.py b/src/bsv/peripheral_gen/rgbttl.py index f72c9bf..53bffa3 100644 --- a/src/bsv/peripheral_gen/rgbttl.py +++ b/src/bsv/peripheral_gen/rgbttl.py @@ -24,15 +24,18 @@ class rgbttl(PBase): return pname return '' - def mk_pincon(self, name, count): - ret = [PBase.mk_pincon(self, name, count)] - # special-case for gpio in, store in a temporary vector - sname = self.peripheral.iname().format(count) - plen = len(self.peripheral.pinspecs) - template = "mkConnection({0}.{1},\n\t\t\t{2}.{1});" + def _mk_pincon(self, name, count, ptyp): + ret = [PBase._mk_pincon(self, name, count, ptyp)] + if ptyp == 'fast': + sname = self.get_iname(count) + ps = "slow_peripherals.%s" % sname + else: + sname = self.peripheral.iname().format(count) + ps = "pinmux.peripheral_side.%s" % sname name = self.get_iname(count) - ps = "pinmux.peripheral_side.%s" % sname n = "{0}".format(name) for ptype in ['data_out']: - ret.append(template.format(ps, ptype, n)) + ps_ = "{0}.{1}".format(ps, ptype) + ret += self._mk_actual_connection('out', name, count, 'out', + ptype, ps_, n, ptype) return '\n'.join(ret)