From: Luke Kenneth Casson Leighton Date: Tue, 24 Jul 2018 10:25:09 +0000 (+0100) Subject: add rgbttl mk_pincon X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=311cea904e5563dc5fc4325da802c0a89e542e0f;p=pinmux.git add rgbttl mk_pincon --- diff --git a/src/bsv/peripheral_gen/rgbttl.py b/src/bsv/peripheral_gen/rgbttl.py index e350e65..3ba08c6 100644 --- a/src/bsv/peripheral_gen/rgbttl.py +++ b/src/bsv/peripheral_gen/rgbttl.py @@ -17,4 +17,20 @@ class rgbttl(PBase): return "lcd{0}.slave" def pinname_out(self, pname): - return pname + if not pname.startswith('out'): + 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 + plen = len(self.peripheral.pinspecs) + template = " mkConnection({0}.{1},\n\t\t\t{2}.{1});" + name = self.get_iname(count) + ps = "pinmux.peripheral_side.%s" % name + n = "{0}".format(name) + for ptype in ['data_out']: + ret.append(template.format(ps, ptype, n)) + return '\n'.join(ret) + +