// Mechanism to reprogram boot flash module spi_flash( input clk, // client interface with RTEFI, see doc/clients.eps input [10:0] len_c, input [7:0] idata, input raw_l, input raw_s, output [7:0] odata, // 4-wire to e.g., Winbond W25X16 output spi_clk, output spi_cs, output spi_mosi, input spi_miso, output busy // only intended for simulation ); parameter n_lat = 8; // latency of client pipeline // Try really hard to be non-fancy here, just the obvious way of // gatewaying the previously functioning spi_flash_engine into // the RTEFI scheme. // Longer term it would be nice if this could be re-written to // allow more resource sharing, say between Rx and Tx buffers, // and code sharing with other buffered clients, like the SPI // slave gateway to a microcontroller, as was done in PSPEPS. // This module cries out to be a customer of an authentication // mechanism, whenever that becomes available. parameter aw=9; // nominal/minimal 512 x 8 reg [7:0] rx_mem[0:(1<