-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRAM_ADV_TB.v
69 lines (57 loc) · 1.35 KB
/
RAM_ADV_TB.v
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
`timescale 1ns / 1ps
//////////////////////////////////////////////////////////////////////////////////
// Company:
// Engineer:
//
// Create Date: 18.03.2023 11:32:57
// Design Name:
// Module Name: ROM_TB
// Project Name:
// Target Devices:
// Tool Versions:
// Description:
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
//////////////////////////////////////////////////////////////////////////////////
module RAM_ADV_TB(
);
// The Clock Period is 10ns
parameter clkPeriod = 10;
// Stores the duration of one Clock pulse - 5ns
parameter clkPulse = clkPeriod/2;
reg CLK;
reg BUS_WE;
reg [7:0] BUS_ADDR;
wire [7:0] BUS_DATA;
reg Bus_Data;
RAM_ADV uut(
.CLK(CLK),
.BUS_DATA(BUS_DATA),
.BUS_ADDR(BUS_ADDR),
.BUS_WE(BUS_WE)
);
initial begin
CLK = 0;
forever #clkPulse CLK = ~CLK;
end
initial begin
BUS_ADDR = 0;
BUS_WE = 0;
forever #clkPeriod BUS_ADDR = BUS_ADDR + 1;
end
/*initial begin
BUS_WE = 0;
Bus_Data = 8'h0;
#200
forever begin
BUS_WE = ~BUS_WE;
#200 Bus_Data = Bus_Data + 1;
end
assign BUS_DATA = Bus_Data;
end*/
endmodule