testbench.v 530 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
module testbench;
    reg en;

    initial begin
        // $dumpfile("testbench.vcd");
        // $dumpvars(0, testbench);

        #5 en = 0;
        repeat (10000) begin
            #5 en = 1;
            #5 en = 0;
        end

        $display("OKAY");    
    end
   
    
18 19
    reg dinA = 0;
    wire doutB;
20 21 22 23

    top uut (
        .en (en ),
        .a (dinA ),
24
        .b (doutB )
25 26
    );
    
27 28 29 30
    always @(posedge en) begin
    #3;
    dinA <= !dinA;
    end
31
	
32
	assert_tri b_test(.en(en), .A(dinA), .B(doutB));
33 34
  
endmodule