Advertisement
itsme_rudj

1 to 8 Demultiplexer Testbench

Dec 8th, 2023
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VeriLog 0.41 KB | Source Code | 0 0
  1. module demux18a_tst();
  2.   reg a;
  3.   reg [2:0]s;
  4.   wire [7:0]c;
  5.  
  6.   demux18a uut (.a(a),.s(s),.c(c));
  7.   initial begin
  8.           a = 1 ; s = 3'b000;
  9.     #10   a = 1 ; s = 3'b001;
  10.     #10   a = 1 ; s = 3'b010;
  11.     #10   a = 1 ; s = 3'b011;
  12.     #10   a = 1 ; s = 3'b100;
  13.     #10   a = 1 ; s = 3'b101;
  14.     #10   a = 1 ; s = 3'b110;
  15.     #10   a = 1 ; s = 3'b111;
  16.     #10   a = 0 ; s = 3'bxxx;
  17.   end
  18. endmodule
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement