Altera_Forum
Honored Contributor
9 years agoChecking the RAM and Inserting Image into in a RAM
I have designed a RAM. The RAM has following codes.
module ram_8bit (we,re, clk, add, datin, datout); input [6:0] add; input we, re, clk; input [7:0] datin; output[7:0] datout; reg [7:0] datout; reg [7:0] mem [127:0]; always @(posedge clk) begin if (we) mem[add] <= datin; //data write else if (re) datout = mem[add]; //data read else datout=datout; end endmodule The code a have written here shows a ram but the input and output simulation file remains same. I have attached the files here. Please see the files. Any one please help me regarding this code. Where is the wrong i made? or My input is wrong. Please help. I want to insert an image in this RAM. I mean the images pixel value not the image. Can any one help me? I am in big trouble. Thanks in advance.