赞
踩
目录
- `timescale 1ns / 1ps
- module blk_mem_gen_0_tb();
-
- `define CLK_PERIOD 20
- reg clk;
- reg [7:0]addr;
- integer i = 0;
-
- initial clk = 1;
- always #(`CLK_PERIOD/2) clk = ~clk;
-
- wire [7:0]dout;
-
- blk_mem_gen_0 rom (
- .clka(clk), // input wire clka
- .addra(addr), // input wire [7 : 0] addra
- .douta(dout) // output wire [7 : 0] douta
- );
- initial begin
- addr = 0;
- #21;
- for(i=0;i<2560;i=i+1)begin
- #`CLK_PERIOD;
- addr = addr + 1'b1;
- end
- #(`CLK_PERIOD * 50);
- $stop;
- end
- endmodule
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。