remove muxwire from generator, call from interface_decl instead
[pinmux.git] / src / interface_decl.py
index dc6ffa737a40045aed67d8f0f05652f927d31cd2..c532a84e98dd3ec15f55de8efa0b13d37a1a3b4e 100644 (file)
@@ -1,6 +1,7 @@
 from UserDict import UserDict
 
 from wire_def import generic_io # special case
+from wire_def import muxwire # special case
 
 class Pin(object):
     """ pin interface declaration.
@@ -159,6 +160,10 @@ class Interface(object):
         res = res.format(*args)
         return '\n' + res + '\n'
 
+class MuxInterface(Interface):
+
+    def wirefmt(self, *args):
+        return muxwire.format(*args)
 
 class IOInterface(Interface):
 
@@ -236,7 +241,7 @@ class Interfaces(UserDict):
 
 # ========= Interface declarations ================ #
 
-mux_interface = Interface('cell', [{'name': 'mux', 'ready': False,
+mux_interface = MuxInterface('cell', [{'name': 'mux', 'ready': False,
                                     'enabled': False,
                                     'bitspec': '{1}', 'action': True}])