sram部分程序如下,希望各位能给些建议和帮助,谢谢!
module simple_exram(
input clk,
input wr,
input rd,
input[7:0] adc_data_in,
input[17:0]wr_end_addr,
output MEM_WE_N,
output reg MEM_OE_N,
output[17:0] MEM_A,
inout[7:0] MEM_DATA,
input[17:0] addr_to_read,
output reg[7:0] data_read
);
/*************** extern_ram *****************/
reg[17:0] wr_addr18 = 18'd0;
reg[17:0] rd_addr18 = 18'd0;
//读数据
reg[7:0] Data_out_r = 8'h00;
always @(posedge clk)
begin
if(rd==1'b1)
begin
MEM_OE_N