def led_blinker_top(clock, reset, leds, buttons): glbl = Global(clock, reset) csrbus = Barebone() dbtns = Signal(buttons.val) led_inst = led_blinker(glbl, csrbus, leds) dbn_inst = button_debounce(glbl, buttons, dbtns) btn_inst = button_controller(glbl, csrbus, dbtns) # above all the components have been added, now build the # register file (figures out addresses, etc) and then get # the memory-mapped bus interconnect csrbus.regfile_build() bus_inst = csrbus.interconnect() return myhdl.instances()