From: Luke Kenneth Casson Leighton Date: Mon, 30 Jul 2018 07:20:28 +0000 (+0100) Subject: add pin renaming for vector connections X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3d1e1572b9176503204bcd7ebeb8c3f4ff2de160;p=pinmux.git add pin renaming for vector connections --- diff --git a/src/bsv/peripheral_gen/base.py b/src/bsv/peripheral_gen/base.py index fd30384..ee837ab 100644 --- a/src/bsv/peripheral_gen/base.py +++ b/src/bsv/peripheral_gen/base.py @@ -196,7 +196,9 @@ else""" ret += cn return '\n'.join(ret) - def _mk_vpincon(self, name, count, ptyp, typ, pname): + def _mk_vpincon(self, name, count, ptyp, typ, pname, stype=None): + if stype is None: + stype = pname ret = [] if ptyp == 'fast': sname = self.get_iname(count) @@ -207,7 +209,7 @@ else""" n = self.get_iname(count) ps_ = "{0}.{1}".format(ps, pname) ret += self._mk_actual_connection(typ, name, count, typ, - pname, ps_, n, pname) + pname, ps_, n, stype) return '\n'.join(ret) def _mk_actual_connection(self, ctype, name, count, typ, diff --git a/src/bsv/peripheral_gen/flexbus.py b/src/bsv/peripheral_gen/flexbus.py index ba05e1c..1db1965 100644 --- a/src/bsv/peripheral_gen/flexbus.py +++ b/src/bsv/peripheral_gen/flexbus.py @@ -65,6 +65,7 @@ class flexbus(PBase): ('ad_in', 'm_din', 'in'), ('ad_out_en', 'm_OE32n', 'out'), ]: - ret.append(self._mk_vpincon(name, count, typ, ptype, pname)) + ret.append(self._mk_vpincon(name, count, typ, ptype, pname, + stype)) return '\n'.join(ret)