set up defaults for mux
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 3 Aug 2018 05:15:24 +0000 (06:15 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 3 Aug 2018 05:15:24 +0000 (06:15 +0100)
src/bsv/peripheral_gen/gpio.py

index be38502b920533cbf2c3f4bb7f5d093f393d2bb3..d86c5827a249b064fd59121ec8a881bccd3cb9fc 100644 (file)
@@ -37,7 +37,8 @@ class gpio(PBase):
     def mkslow_peripheral(self, size=0):
         print "gpioslow", self.peripheral, dir(self.peripheral)
         size = len(self.peripheral.pinspecs)
-        return "MUX#(%d) mux{0} <- mkmux();\n" % size + \
+        dflt = "'b%s" % ("0"*size*2)
+        return "MUX#(%d) mux{0} <- mkmux(%s);\n" % (size, dflt)+ \
                "GPIO#(%d) gpio{0} <- mkgpio();" % size
 
     def mk_connection(self, count, fabricname, typ):