Altera_Forum
Honored Contributor
15 years agoDE1 Reading / Writing to SRAM
Hi, I'm trying to design a SRAM controller that can be used to read or write to or from the DE1's SRAM for a project and I have absolutely no clue where to begin. I've got the basic entity skeleton as follows...
ENTITY SRAM_16bit_512k IS PORT( iCLK : IN STD_LOGIC; iREAD : IN STD_LOGIC; iWRITE : IN STD_LOGIC: iADDR : IN STD_LOGIC (17 donwto 0); iDATA : IN STD_LOGIC_VECTOR (15 downto 0): oCLK : OUT STD_LOGIC; oDATA : OUT STD_LOGIC_VECTOR (7 downto 0); SRAM_DQ : INOUT STD_LOGIC_VECTOR (15 downto 0); SRAM_ADDR : OUT STD_LOGIC_VECTOR (17 downto 0); SRAM_OE_N : OUT_STD_LOGIC; SRAM_WE_N : OUT_STD_LOGIC; SRAM_CE_N : OUT_STD_LOGIC; SRAM_UB_N : OUT_STD_LOGIC; SRAM_LB_N : OUT_STD_LOGIC); END SRAM_16bit_512k; Obviously to read or write one must assert iREAD or iWRITE while iDATA and oDATA are the input and output data respectively. iADDR will provide the SRAM memory address. iCLK will be the clock input to the controller and we are told that oCLK must determine the read / write cycle time. I really just need someone to point me in the right direction and get me started with this. I've never done anything with SRAM on the DE1 board (Or SRAM at all for that matter) and could really just use some guidance on designing this controller...