BSV auto-gen from spec also multiple maps, selectable via an external pin at boot time (not to be put onto the pinmux!!!)
src/bsv/peripheral_gen/gpio.py: def mkslow_peripheral(self, size=0): print "gpioslow", self.peripheral, dir(self.peripheral) size = len(self.peripheral.pinspecs) dflt = "%s" % ("0"*size*2) # XX TODO: read default from config return "MUX#(%d) mux{0} <- mkmux(`b%s);\n" % (size, dflt)+ \ "GPIO#(%d) gpio{0} <- mkgpio();" % size src/spec/microtest.py: config = {'muxdefaults': {'A': '001010' # binary (2-bit)? } } ps = PinSpec(pinbanks, fixedpins, function_names, config) maybe there are better ways to spec this, e.g. pass in a dictionary of muxer defaults {"A": {0: 0b01, 5: 0b10 } } which are turned into the binary string, later?