uni

University stuff
git clone git://git.margiolis.net/uni.git
Log | Files | Refs | README | LICENSE

comp2_tb.v (314B)


      1 module comp2_tb;
      2 	reg [1:0] tb_a;
      3 	wire signed [3:0] tb_y;
      4 
      5 	comp2 comp2_tb(
      6 		.a (tb_a),
      7 		.y (tb_y)
      8 	);
      9 
     10 	initial begin
     11 		$dumpfile("comp2.vcd");
     12 		$dumpvars(0, comp2_tb);
     13 
     14 		$monitor("time=%3d, tb_a=%b, tb_y=%d\n", $time, tb_a, tb_y);
     15 
     16 		tb_a <= 2'b01;
     17 		#20 tb_a <= 2'b00;
     18 		#20 tb_a <= 2'b10;
     19 	end
     20 endmodule
     21