// Copy Right(C) Makoto IKEDA, VDEC University of Tokyo 1998. `timescale 1ns/100ps `include "cntout.v" module TOP; reg ck, Reset, PinCtr; wire [3:0] DIO; reg [3:0] D; wire Cout; Counter cnt(DIO, ck, Reset, PinCtr, Cout); assign DIO = (PinCtr == 1 ? (D) : ('bz)); initial begin $monitor( ck,DIO,Reset,PinCtr,Cout); `ifdef SDF $sdf_annotate( "COUNTER.SDF", cnt, ,"SDF.log" ); `endif ck=0; Reset = 1; PinCtr = 0; #35 Reset = 0; #300 PinCtr = 1; D = $random; #20 PinCtr = 0; #1000 $finish; end always #10 ck=~ck; endmodule