Hello all, i am very new to FPGA design and struggling to understand how to write data to Spartan 3 SRAM. I am using verilog and my code looks like something bleow,
------------------------------------------------------------------- cs = 1'b0; ub = 1'b0; lb = 1'b0;
we = 1'b0; oe = 1'b1;
mem = i // i is a counter and mem is an 18 bit memory address
end
assign data = (oe)? input_data : 16'bz // data is the memory data
------------------------------------------------------------------- To my understanding this code will put the Input_data into memory addrees i, but do i need to loop this code a few times because the SRAM operates at 100 MHz, twice as fast as the 50Mhz FPGA.
What is the correct wat to write data to SRAM? ....Thanks !!!