def main(): plat = icestick.Platform() debugpins = [119, 118, 117, 116, 115, 114, 113, 112] plat.add_extension([ ('sio', 0, Subsignal('rst', Pins('48')), Subsignal('txd', Pins('56')), Subsignal('rxd', Pins('60')), Subsignal('sclk', Pins('61')), Subsignal('busy', Pins('62')), Subsignal('tclk', Pins('47')), IOStandard('LVCMOS33'), ), ] + [ ('debug', i, Pins(str(p)), IOStandard('LVCMOS33')) for i, p in enumerate(debugpins) ]) # Randomize seed because it doesn't get routed with the default of 1. plat.toolchain.pnr_opt = "-q -r" plat.build(Top(plat)) plat.create_programmer().flash(0, 'build/top.bin')
self.bad_led.eq(~superunit.o_success & superunit.o_over)) .Else( self.bad_led.eq(0)) ] if __name__ == "__main__": import sys if len(sys.argv) < 3: raise Exception("Missing argument : [platform] [good/bad]") plat = None if sys.argv[1] == "icestick": plat = icestick.Platform() else: raise Exception("This argument does not exist.") ex = None if sys.argv[2] == "bad": ex = BadExampleModule elif sys.argv[2] == "good": ex = ExampleModule else: raise Exception("This argument does not exist.") u = UnitBenchBuilder("unitbench/tests/json/example.json", ex, [4]) su = u._superunits[1]