Advertisement
itsme_rudj

1:4 Demultiplexer Testbench

Dec 8th, 2023 (edited)
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VeriLog 0.28 KB | Source Code | 0 0
  1. module demux_14_tst();
  2.   reg a;
  3.   reg [1:0]s;
  4.   wire [3:0]c;
  5.  
  6.   demux_4to1 uut (.a(a),.s(s),.c(c));
  7.   initial begin
  8.           a = 1 ; s = 2'b00;
  9.     #10   a = 1 ; s = 2'b01;
  10.     #10   a = 1 ; s = 2'b10;
  11.     #10   a = 1 ; s = 2'b11;
  12.     #10   a = 0 ; s = 2'bxx;
  13.   end
  14. endmodule
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement