From 99203fb27559f91ff903690338af76f6f29cf52d Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Thu, 2 Jan 2025 15:36:57 +0200 Subject: WIP flash bootload --- atk16_fpga/flash_to_ram.v | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 atk16_fpga/flash_to_ram.v (limited to 'atk16_fpga/flash_to_ram.v') diff --git a/atk16_fpga/flash_to_ram.v b/atk16_fpga/flash_to_ram.v new file mode 100644 index 0000000..2e0f7b6 --- /dev/null +++ b/atk16_fpga/flash_to_ram.v @@ -0,0 +1,27 @@ +module flash_to_ram( + // SRAM interface + output sram_cs_n, + output sram_rd_n, + output sram_wr_n, + output [17:0] sram_addr, + output [15:0] sram_in, + input [15:0] sram_out, + + // SPI master interface + output wire spi_cs_n, // Chip select, active low + output wire spi_clk, // SPI clock + output wire spi_mosi, // Master Out Slave In + input wire spi_miso, // Master In Slave Out + output wire spi_rst_n // Active low reset +); + + // Copy 128KB from flash address 2^20 onwards to SRAM address 0 + // 1. Send a read message to the flash + // 2. Wait for the flash to respond + // 3. Write the data to SRAM + // 4. Repeat until 128KB has been copied + + + + +endmodule -- cgit v1.3