`timescale 1ns / 1ps
module array_tb;
parameter DELAY = 5;
logic clk;
logic [7:0] address;
wire [7:0] data;
logic cs;
logic we;
logic oe;
logic [7:0] dout;
array_unpacked array_unpacked_i (.*);
initial begin
clk = 1'b0;
forever begin
clk = #10 ~clk;
end
end
assign data = dout;
initial begin
cs = 1'b1;
oe = 1'b0;
we = 1'b0;
address = 8'h0;
dout = 8'h12;
@(posedge clk); // next rising clock
#DELAY;
@(posedge clk); // next rising clock
#DELAY;
we = 1'b1; // Write
@(posedge clk); // next rising clock
#DELAY;
dout = 8'hzz;
we = 1'b0;
@(posedge clk); // next rising clock
#DELAY;
oe = 1'b1;
@(posedge clk); // next rising clock
#DELAY;
@(posedge clk); // next rising clock
#DELAY;
oe = 1'b0;
@(posedge clk); // next rising clock
#DELAY;
address = 8'h8;
dout = 8'h34;
we = 1'b1; // Write
@(posedge clk); // next rising clock
#DELAY;
dout = 8'hzz;
we = 1'b0;
@(posedge clk); // next rising clock
#DELAY;
oe = 1'b1;
@(posedge clk); // next rising clock
#DELAY;
@(posedge clk); // next rising clock
#DELAY;
oe = 1'b0;
end
endmodule
日 | 月 | 火 | 水 | 木 | 金 | 土 |
---|---|---|---|---|---|---|
- | - | - | - | - | 1 | 2 |
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
31 | - | - | - | - | - | - |