Advertisement
toweber

comblogic_tb.v

Aug 29th, 2022
971
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. `include "comblogic.v"
  2.  
  3. `timescale 1us/1us
  4. module comblogic_tb;
  5.  
  6.    // on testbenches, inputs are regs
  7.    reg a;
  8.    reg b;
  9.  
  10.    // on testbenches, outputs are wires
  11.    wire out;
  12.  
  13.    comblogic CL1 (out, a, b);  
  14.  
  15.    initial begin
  16.       a = 0;
  17.       b = 0;    
  18.       #10 a = 1; b = 0;      
  19.       #10 a = 0; b = 1;
  20.       #10 a = 1; b = 1;      
  21.       #10 $finish;
  22.  
  23.    end // initial begin
  24.  
  25.    initial begin
  26.       $monitor ("%t | a = %d | b = %d | out = %d", $time, a, b, out);
  27.       $dumpfile("dump.vcd");
  28.       $dumpvars();
  29.    end // initial begin
  30. endmodule
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement