Stimulus module for (switch-level) inverter


// Stimulus module for (switch-level) CMOS inverter
module stimulus;
   
   reg	in;               // declare register inputs
   wire	out;              // declare output
   
   inv_sw I0 (out, in);   // call inverter
   
   initial begin
      #2 $display ("in - out");
      forever #5 $display ("%b - %b", out, in);
   end
   
   initial begin
      #5 in=1'b1;
      #5 in=1'b0;
      #5 in=1'b1;
      #5 in=1'b0;
      #5 in=1'b0;
      #5 in=1'b1;
      #5 in=1'b0;
      #5 in=1'b1;
      #5 in=1'b0;
      #5 $finish;
   end
   
endmodule

Back