-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathquadTristateTest.sv
34 lines (26 loc) · 1.04 KB
/
quadTristateTest.sv
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
/****************************************************************************************
* *
* https://www.bigmessowires.com/nibbler/ *
* Implementation by: Bryan Chan and Diego Regalado *
* *
*****************************************************************************************/
module testbench();
reg [3:0] dataIn;
reg enable;
wire [3:0] dataOut;
QuadTristate quadTristate(dataIn, enable, dataOut);
initial
begin
// Initial values
{dataIn, enable} = 5'b00001;
//Logging
$display("Time\tData\tEnable");
$monitor("%d\t %b\t%b\t%b", $time, dataIn, enable, dataOut);
#2 {dataIn, enable} = 5'b00111;
#2 {dataIn, enable} = 5'b11001;
#2 {dataIn, enable} = 5'b11000;
end
//Finish simulation
initial
#25 $finish;
endmodule