Aug 11, 2008 #1 G Ghassan Newbie level 6 Joined Dec 13, 2005 Messages 11 Helped 0 Reputation 0 Reaction score 0 Trophy points 1,281 Activity points 1,355 Hi all... can anyone tell me how to program a RAM in verilog ? i want to make 128-Deep by 14-Wide memory... thx alot...
Hi all... can anyone tell me how to program a RAM in verilog ? i want to make 128-Deep by 14-Wide memory... thx alot...
Aug 11, 2008 #2 J j_andr Full Member level 4 Joined Mar 30, 2008 Messages 207 Helped 59 Reputation 118 Reaction score 37 Trophy points 1,308 Location europe Activity points 2,491 ram verilog may be this example will help ? Code: module verilog_dual_port_ram ( input [(D_WIDTH-1):0] data, input [(A_WIDTH-1):0] read_addr, write_addr, input we, clk, output reg [(D_WIDTH-1):0] q ); parameter D_WIDTH = ???; // your parameters parameter A_WIDTH = ???; reg [D_WIDTH-1:0] ram[2**A_WIDTH-1:0]; always @ (posedge clk) begin if (we) ram[write_addr] <= data; q <= ram[read_addr]; end endmodule ---
ram verilog may be this example will help ? Code: module verilog_dual_port_ram ( input [(D_WIDTH-1):0] data, input [(A_WIDTH-1):0] read_addr, write_addr, input we, clk, output reg [(D_WIDTH-1):0] q ); parameter D_WIDTH = ???; // your parameters parameter A_WIDTH = ???; reg [D_WIDTH-1:0] ram[2**A_WIDTH-1:0]; always @ (posedge clk) begin if (we) ram[write_addr] <= data; q <= ram[read_addr]; end endmodule ---
Aug 11, 2008 #3 G Ghassan Newbie level 6 Joined Dec 13, 2005 Messages 11 Helped 0 Reputation 0 Reaction score 0 Trophy points 1,281 Activity points 1,355 dual port ram verilog thx alooot
Feb 27, 2011 #4 M m2star Junior Member level 1 Joined May 1, 2010 Messages 18 Helped 2 Reputation 4 Reaction score 2 Trophy points 1,283 Location Rawalpindi, Pakistan, Pakistan Activity points 1,390 hi all hope you are fine and sir "j_andr" i've been working on FPGA based projects can you tell me your email address....................
hi all hope you are fine and sir "j_andr" i've been working on FPGA based projects can you tell me your email address....................
Oct 13, 2011 #5 S sandy28 Newbie level 2 Joined Oct 12, 2011 Messages 2 Helped 1 Reputation 2 Reaction score 1 Trophy points 1,283 Activity points 1,306 can i create 6 RAM blocks in verilog coding