def toolchain_erase(self): """ Erases the LUNA board's flash. """ from apollo_fpga import ApolloDebugger from apollo_fpga.flash import ensure_flash_gateware_loaded # Create our connection to the debug module. debugger = ApolloDebugger() ensure_flash_gateware_loaded(debugger, platform=self.__class__()) with debugger.flash as flash: flash.erase() debugger.soft_reset()
def toolchain_flash(self, products, name="top"): """ Programs the LUNA board's flash via its sideband connection. """ from apollo_fpga import ApolloDebugger from apollo_fpga.flash import ensure_flash_gateware_loaded # Create our connection to the debug module. debugger = ApolloDebugger() ensure_flash_gateware_loaded(debugger, platform=self.__class__()) # Grab our generated bitstream, and upload it to the . bitstream = products.get("{}.bit".format(name)) with debugger.flash as flash: flash.program(bitstream) debugger.soft_reset()