//+FHDR-------------------------------------------------------------------------------------------------------- // Company: //----------------------------------------------------------------------------------------------------------------- // File Name : spi_bus_decoder.v // Department : // Author : PWY // Author's Tel : //----------------------------------------------------------------------------------------------------------------- // Relese History // Version Date Author Description // 0.1 2024-03-13 PWY Serial Peripheral Interface BUS Decoder // 0.2 2024-06-15 PWY The slave interface address will be reduced from 25 bits to 20 bits. //----------------------------------------------------------------------------------------------------------------- // Keywords : // //----------------------------------------------------------------------------------------------------------------- // Parameter // //----------------------------------------------------------------------------------------------------------------- // Purpose : // //----------------------------------------------------------------------------------------------------------------- // Target Device: // Tool versions: //----------------------------------------------------------------------------------------------------------------- // Reuse Issues // Reset Strategy: // Clock Domains: // Critical Timing: // Asynchronous I/F: // Synthesizable (y/n): // Other: //-FHDR-------------------------------------------------------------------------------------------------------- module spi_bus_decoder #( parameter SLVNUM = 32 ,parameter SPIBUS_CMD_REG = 1 ,parameter SPIBUS_OUT_REG = 1 )( input clk ,input rst_n ,sram_if.slave mst ,sram_if.master slv [SLVNUM-1:0] //s and m exchange ); generate genvar i; logic [SLVNUM-1:0] cs_slv; logic [31 :0] dtemp[SLVNUM-1:0]; for(i=0;i