标签:files col verilog data out mod com pre blog
module ram( input clk, input wena, input [8:0] addr, input [31:0] data_in, output [31:0] data_out ); reg [31:0] state [0:512]; always@(posedge clk) begin if(wena) begin if(addr!=0) state[addr]<=data_in; end end assign data_out=state[addr]; endmodule
标签:files col verilog data out mod com pre blog
原文地址:http://www.cnblogs.com/liutianchen/p/7616755.html