data/full_repos/permissive/451861474/8 Bit Adder_Subractor/A4Q2_8_bitadder_tb.v
1: b'%Error: Cannot find file containing module: Bit\n        ... Looked in:\n             data/full_repos/permissive/451861474/8/Bit\n             data/full_repos/permissive/451861474/8/Bit.v\n             data/full_repos/permissive/451861474/8/Bit.sv\n             Bit\n             Bit.v\n             Bit.sv\n             obj_dir/Bit\n             obj_dir/Bit.v\n             obj_dir/Bit.sv\n%Error: Cannot find file containing module: Adder_Subractor,data/full_repos/permissive/451861474\n%Error: Cannot find file containing module: data/full_repos/permissive/451861474/8\n%Error: Cannot find file containing module: Adder_Subractor/A4Q2_8_bitadder_tb.v\n%Error: Exiting due to 4 error(s)\n'
module top_module ();

    reg[7:0] A,B;
    reg OP;
    wire[7:0] S;
    wire OVER;

    add_8bit _test(A,B,OP,S,OVER);
    initial begin
        $dumpfile("8_bitadder_tb.vcd");
        $dumpvars(0, top_module);

        $display("a        b        opcode    Sum          Overflow");
        
        A=0; B=0; OP=0; 
        #5
        if(OVER==1'b0) begin
            $display("%b %b %b         %b     No",A,B,OP,S);
        end
        else begin
            $display("%b %b %b         %b     Yes",A,B,OP,S);
        end

        A=25; B=59; OP=0; 
        #5
        if(OVER==1'b0) begin
            $display("%b %b %b         %b     No",A,B,OP,S);
        end
        else begin
            $display("%b %b %b         %b     Yes",A,B,OP,S);
        end

        A=25; B=59; OP=1; 
        #5
        if(OVER==1'b0) begin
            $display("%b %b %b         %b     No",A,B,OP,S);
        end
        else begin
            $display("%b %b %b         %b     Yes",A,B,OP,S);
        end

        A=120; B=121; OP=0; 
        #5
        if(OVER==1'b0) begin
            $display("%b %b %b         %b     No",A,B,OP,S);
        end
        else begin
            $display("%b %b %b         %b     Yes",A,B,OP,S);
        end

        A=1; B=2; OP=1; 
        #5
        if(OVER==1'b0) begin
            $display("%b %b %b         %b     No",A,B,OP,S);
        end
        else begin
            $display("%b %b %b         %b     Yes",A,B,OP,S);
        end

        A=110; B=84; OP=1; 
        #5
        if(OVER==1'b0) begin
            $display("%b %b %b         %b     No",A,B,OP,S);
        end
        else begin
            $display("%b %b %b         %b     Yes",A,B,OP,S);
        end

        A=5; B=69; OP=0; 
        #5
        if(OVER==1'b0) begin
            $display("%b %b %b         %b     No",A,B,OP,S);
        end
        else begin
            $display("%b %b %b         %b     Yes",A,B,OP,S);
        end

        A=69; B=105; OP=0; 
        #5
        if(OVER==1'b0) begin
            $display("%b %b %b         %b     No",A,B,OP,S);
        end
        else begin
            $display("%b %b %b         %b     Yes",A,B,OP,S);
        end

        A=1; B=112; OP=0; 
        #5
        if(OVER==1'b0) begin
            $display("%b %b %b         %b     No",A,B,OP,S);
        end
        else begin
            $display("%b %b %b         %b     Yes",A,B,OP,S);
        end

        A=0; B=110; OP=1; 
        #5
        if(OVER==1'b0) begin
            $display("%b %b %b         %b     No",A,B,OP,S);
        end
        else begin
            $display("%b %b %b         %b     Yes",A,B,OP,S);
        end

        A=110; B=0; OP=1; 
        #5
        if(OVER==1'b0) begin
            $display("%b %b %b         %b     No",A,B,OP,S);
        end
        else begin
            $display("%b %b %b         %b     Yes",A,B,OP,S);
        end

        A=50; B=69; OP=0; 
        #5
        if(OVER==1'b0) begin
            $display("%b %b %b         %b     No",A,B,OP,S);
        end
        else begin
            $display("%b %b %b         %b     Yes",A,B,OP,S);
        end

        A=45; B=81; OP=0; 
        #5
        if(OVER==1'b0) begin
            $display("%b %b %b         %b     No",A,B,OP,S);
        end
        else begin
            $display("%b %b %b         %b     Yes",A,B,OP,S);
        end

        A=44; B=44; OP=1; 
        #5
        if(OVER==1'b0) begin
            $display("%b %b %b         %b     No",A,B,OP,S);
        end
        else begin
            $display("%b %b %b         %b     Yes",A,B,OP,S);
        end

        A=0; B=1; OP=0; 
        #5
        if(OVER==1'b0) begin
            $display("%b %b %b         %b     No",A,B,OP,S);
        end
        else begin
            $display("%b %b %b         %b     Yes",A,B,OP,S);
        end

    end
endmodule
module top_module ();


    reg[7:0] A,B;
    reg OP;
    wire[7:0] S;
    wire OVER;

    add_8bit _test(A,B,OP,S,OVER);
    initial begin
        $dumpfile("8_bitadder_tb.vcd");
        $dumpvars(0, top_module);

        $display("a        b        opcode    Sum          Overflow");
        
        A=0; B=0; OP=0; 
        #5
        if(OVER==1'b0) begin
            $display("%b %b %b         %b     No",A,B,OP,S);
        end
        else begin
            $display("%b %b %b         %b     Yes",A,B,OP,S);
        end

        A=25; B=59; OP=0; 
        #5
        if(OVER==1'b0) begin
            $display("%b %b %b         %b     No",A,B,OP,S);
        end
        else begin
            $display("%b %b %b         %b     Yes",A,B,OP,S);
        end

        A=25; B=59; OP=1; 
        #5
        if(OVER==1'b0) begin
            $display("%b %b %b         %b     No",A,B,OP,S);
        end
        else begin
            $display("%b %b %b         %b     Yes",A,B,OP,S);
        end

        A=120; B=121; OP=0; 
        #5
        if(OVER==1'b0) begin
            $display("%b %b %b         %b     No",A,B,OP,S);
        end
        else begin
            $display("%b %b %b         %b     Yes",A,B,OP,S);
        end

        A=1; B=2; OP=1; 
        #5
        if(OVER==1'b0) begin
            $display("%b %b %b         %b     No",A,B,OP,S);
        end
        else begin
            $display("%b %b %b         %b     Yes",A,B,OP,S);
        end

        A=110; B=84; OP=1; 
        #5
        if(OVER==1'b0) begin
            $display("%b %b %b         %b     No",A,B,OP,S);
        end
        else begin
            $display("%b %b %b         %b     Yes",A,B,OP,S);
        end

        A=5; B=69; OP=0; 
        #5
        if(OVER==1'b0) begin
            $display("%b %b %b         %b     No",A,B,OP,S);
        end
        else begin
            $display("%b %b %b         %b     Yes",A,B,OP,S);
        end

        A=69; B=105; OP=0; 
        #5
        if(OVER==1'b0) begin
            $display("%b %b %b         %b     No",A,B,OP,S);
        end
        else begin
            $display("%b %b %b         %b     Yes",A,B,OP,S);
        end

        A=1; B=112; OP=0; 
        #5
        if(OVER==1'b0) begin
            $display("%b %b %b         %b     No",A,B,OP,S);
        end
        else begin
            $display("%b %b %b         %b     Yes",A,B,OP,S);
        end

        A=0; B=110; OP=1; 
        #5
        if(OVER==1'b0) begin
            $display("%b %b %b         %b     No",A,B,OP,S);
        end
        else begin
            $display("%b %b %b         %b     Yes",A,B,OP,S);
        end

        A=110; B=0; OP=1; 
        #5
        if(OVER==1'b0) begin
            $display("%b %b %b         %b     No",A,B,OP,S);
        end
        else begin
            $display("%b %b %b         %b     Yes",A,B,OP,S);
        end

        A=50; B=69; OP=0; 
        #5
        if(OVER==1'b0) begin
            $display("%b %b %b         %b     No",A,B,OP,S);
        end
        else begin
            $display("%b %b %b         %b     Yes",A,B,OP,S);
        end

        A=45; B=81; OP=0; 
        #5
        if(OVER==1'b0) begin
            $display("%b %b %b         %b     No",A,B,OP,S);
        end
        else begin
            $display("%b %b %b         %b     Yes",A,B,OP,S);
        end

        A=44; B=44; OP=1; 
        #5
        if(OVER==1'b0) begin
            $display("%b %b %b         %b     No",A,B,OP,S);
        end
        else begin
            $display("%b %b %b         %b     Yes",A,B,OP,S);
        end

        A=0; B=1; OP=0; 
        #5
        if(OVER==1'b0) begin
            $display("%b %b %b         %b     No",A,B,OP,S);
        end
        else begin
            $display("%b %b %b         %b     Yes",A,B,OP,S);
        end

    end
endmodule