|

楼主 |
发表于 2015-2-2 23:26:41
|
显示全部楼层
回复 2# Gary.wang
源代码是这个
module fifomem(rdata,wdata,raddr,waddr,wen,wclk,wfull);
output [7:0] rdata;
input [7:0] wdata;
input [2:0] waddr,raddr;
input wen,wclk,wfull;
reg [7:0] mem[0:7];
assign rdata = mem[raddr];
always @(posedge wclk)
begin
if(wen & !wfull) begin
mem[waddr] <= wdata;
end
end
endmodule |
|