Files
nand2tetris_verilog/mux8way16_tb.v
2024-06-13 18:28:20 -07:00

31 lines
605 B
Verilog

`include "mux8way16.v"
module Mux8Way16_test;
reg [15:0] a, b, c, d, e, f, g, h;
reg [2:0] sel;
wire [15:0] out;
integer i;
initial begin
$dumpfile("mux8way16_tb.vcd");
$dumpvars;
a=16'hDEAD;
b=16'hBEEF;
c=16'h0000;
d=16'hFFFF;
e=16'h5555;
f=16'hAAAA;
g=16'hFEED;
h=16'hB00F;
for (i=0; i<8; i=i+1)
begin
sel=i;
#1;
end
$finish();
end
Mux8Way16 u1 (.a(a), .b(b), .c(c), .d(d), .e(e), .f(f), .g(g), .h(h), .sel(sel), .out(out));
endmodule