-
Notifications
You must be signed in to change notification settings - Fork 0
/
Ring.sv.bak
55 lines (32 loc) · 879 Bytes
/
Ring.sv.bak
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
`timescale 1ps/1ps
module Ring (Clk, volt_0, volt_1, F_ring);
input Clk, volt_0, volt_1;
output F_ring;
logic Q, Q_bar;
//voltages that enable ring oscillator operation
and (En, volt_0, volt_1);
//oneShot(Clk, Q, Q_bar);
oneShot DUT0 (Clk, Q, Q_bar);
//ringOscillator(En, one_shot, F_ring);
//Sending Q to the Ring Oscillator means the one-shot buffer period is specifiying the amount of time the ring oscillaotr is off
//Sending Q_bar means you are specifiying the length it is on.
ringOscillator DUT1 (En, Q, F_ring);
endmodule
`timescale 1ps/1ps
module Ring_tb;
logic Clk, F_ring, volt_0, volt_1;
Ring DUT (Clk, volt_0, volt_1, F_ring);
always begin
Clk = 0;
#500ns;
Clk = 1'b1;
#500ns;
end
initial begin
#10;
volt_0 = 1'b1;
volt_1 = 1'b1;
#0.01ms;
$stop;
end
endmodule