Created
November 25, 2012 06:19
-
-
Save gibiansky/4142599 to your computer and use it in GitHub Desktop.
Verilog Multiplexer Testbench
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module mux_test; | |
reg a, b, s; | |
wire out; | |
mux my_mux(a, b, s, out); | |
initial begin | |
a <= 0; | |
b <= 1; | |
s <= 0; | |
#1; | |
$display("In: %b, %b select %b. Out %b.", a, b, s, out); | |
#1; | |
s <= 1; | |
#1; | |
$display("In: %b, %b select %b. Out %b.", a, b, s, out); | |
#1; | |
a <= 1; | |
b <= 0; | |
#1; | |
$display("In: %b, %b select %b. Out %b.", a, b, s, out); | |
end | |
endmodule |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment