aboutsummaryrefslogtreecommitdiffstats
path: root/atk16_fpga/flash_to_ram.v
diff options
context:
space:
mode:
Diffstat (limited to 'atk16_fpga/flash_to_ram.v')
-rw-r--r--atk16_fpga/flash_to_ram.v27
1 files changed, 27 insertions, 0 deletions
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