data/full_repos/permissive/518466015/bitonicSortScalable_tb.v
1: b'%Warning-STMTDLY: data/full_repos/permissive/518466015/bitonicSortScalable_tb.v:38: Unsupported: Ignoring delay on this delayed statement.\n    always #(20/2) begin\n           ^\n                  ... Use "/* verilator lint_off STMTDLY */" and lint_on around source to disable this message.\n%Warning-STMTDLY: data/full_repos/permissive/518466015/bitonicSortScalable_tb.v:47: Unsupported: Ignoring delay on this delayed statement.\n        #(20);\n        ^\n%Warning-STMTDLY: data/full_repos/permissive/518466015/bitonicSortScalable_tb.v:71: Unsupported: Ignoring delay on this delayed statement.\n        #(20);\n        ^\n%Warning-STMTDLY: data/full_repos/permissive/518466015/bitonicSortScalable_tb.v:74: Unsupported: Ignoring delay on this delayed statement.\n        #(20*10000);\n        ^\n%Error: data/full_repos/permissive/518466015/bitonicSortScalable_tb.v:24: Cannot find file containing module: \'BitonicSortScalable\'\n    BitonicSortScalable bitonic_SORT(\n    ^~~~~~~~~~~~~~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/518466015,data/full_repos/permissive/518466015/BitonicSortScalable\n             data/full_repos/permissive/518466015,data/full_repos/permissive/518466015/BitonicSortScalable.v\n             data/full_repos/permissive/518466015,data/full_repos/permissive/518466015/BitonicSortScalable.sv\n             BitonicSortScalable\n             BitonicSortScalable.v\n             BitonicSortScalable.sv\n             obj_dir/BitonicSortScalable\n             obj_dir/BitonicSortScalable.v\n             obj_dir/BitonicSortScalable.sv\n%Warning-WIDTH: data/full_repos/permissive/518466015/bitonicSortScalable_tb.v:53: Operator ASSIGN expects 512 bits on the Assign RHS, but Assign RHS\'s REPLICATE generates 1024 bits.\n                                                                                : ... In instance BitonicSortScalable_tb\n        in ={   8\'d28,  8\'d23,  8\'d24,  8\'d16,  8\'d11,  8\'d25,  8\'d29,  8\'d1,\n           ^\n%Error: Exiting due to 1 error(s), 5 warning(s)\n        ... See the manual and https://verilator.org for more assistance.\n'
module BitonicSortScalable_tb #(
    parameter BITWIDTH = 8,
    parameter ELEMENTS = 64
)
();

    reg clk, rst_n, en_i;
    reg [ELEMENTS*BITWIDTH-1:0] in;
    wire done_o;
    wire [ELEMENTS*BITWIDTH-1:0] out;

    BitonicSortScalable bitonic_SORT(
        clk,
        rst_n,
        en_i,
        in,
        done_o,
        out
    );

    integer i;
    initial begin
        clk = 1'b1;
    end

    always #(`clk_period/2) begin
        clk = ~clk;
    end

    initial begin
        rst_n = 0;
        en_i = 0;
        in = 0;

        #(`clk_period);
        rst_n = 1;
        en_i = 1;



        in ={   8'd28,  8'd23,  8'd24,  8'd16,  8'd11,  8'd25,  8'd29,  8'd1,
                8'd10,  8'd32,  8'd21,  8'd2,   8'd27,  8'd31,  8'd3,   8'd30,
                8'd15,  8'd13,  8'd0,   8'd8,   8'd5,   8'd18,  8'd22,  8'd26,
                8'd4,   8'd6,   8'd9,   8'd19,  8'd20,  8'd7,   8'd14,  8'd17,
                8'd28,  8'd23,  8'd24,  8'd16,  8'd11,  8'd25,  8'd29,  8'd1,
                8'd10,  8'd32,  8'd21,  8'd2,   8'd27,  8'd31,  8'd3,   8'd30,
                8'd15,  8'd13,  8'd0,   8'd8,   8'd5,   8'd18,  8'd22,  8'd26,
                8'd4,   8'd6,   8'd9,   8'd19,  8'd20,  8'd7,   8'd14,  8'd17,
                8'd28,  8'd23,  8'd24,  8'd16,  8'd11,  8'd25,  8'd29,  8'd1,
                8'd10,  8'd32,  8'd21,  8'd2,   8'd27,  8'd31,  8'd3,   8'd30,
                8'd15,  8'd13,  8'd0,   8'd8,   8'd5,   8'd18,  8'd22,  8'd26,
                8'd4,   8'd6,   8'd9,   8'd19,  8'd20,  8'd7,   8'd14,  8'd17,
                8'd28,  8'd23,  8'd24,  8'd16,  8'd11,  8'd25,  8'd29,  8'd1,
                8'd10,  8'd32,  8'd21,  8'd2,   8'd27,  8'd31,  8'd3,   8'd30,
                8'd15,  8'd13,  8'd0,   8'd8,   8'd5,   8'd18,  8'd22,  8'd26,
                8'd4,   8'd6,   8'd9,   8'd19,  8'd20,  8'd7,   8'd14,  8'd17
            };

        #(`clk_period);
        en_i = 0;

        #(`clk_period*10000);
        $display("Input array:");
        for(i=0;i<ELEMENTS;i=i+1)
        $write(in[i*BITWIDTH +: 8]);

        $display("\nOutput sorted array:");
        for(i=0;i<ELEMENTS;i=i+1)
        $write(out[i*BITWIDTH +: 8]);

        $display("\ndone %d", done_o);

        $finish;
    end

endmodule
module BitonicSortScalable_tb #(
    parameter BITWIDTH = 8,
    parameter ELEMENTS = 64
)
();


    reg clk, rst_n, en_i;
    reg [ELEMENTS*BITWIDTH-1:0] in;
    wire done_o;
    wire [ELEMENTS*BITWIDTH-1:0] out;

    BitonicSortScalable bitonic_SORT(
        clk,
        rst_n,
        en_i,
        in,
        done_o,
        out
    );

    integer i;
    initial begin
        clk = 1'b1;
    end

    always #(`clk_period/2) begin
        clk = ~clk;
    end

    initial begin
        rst_n = 0;
        en_i = 0;
        in = 0;

        #(`clk_period);
        rst_n = 1;
        en_i = 1;



        in ={   8'd28,  8'd23,  8'd24,  8'd16,  8'd11,  8'd25,  8'd29,  8'd1,
                8'd10,  8'd32,  8'd21,  8'd2,   8'd27,  8'd31,  8'd3,   8'd30,
                8'd15,  8'd13,  8'd0,   8'd8,   8'd5,   8'd18,  8'd22,  8'd26,
                8'd4,   8'd6,   8'd9,   8'd19,  8'd20,  8'd7,   8'd14,  8'd17,
                8'd28,  8'd23,  8'd24,  8'd16,  8'd11,  8'd25,  8'd29,  8'd1,
                8'd10,  8'd32,  8'd21,  8'd2,   8'd27,  8'd31,  8'd3,   8'd30,
                8'd15,  8'd13,  8'd0,   8'd8,   8'd5,   8'd18,  8'd22,  8'd26,
                8'd4,   8'd6,   8'd9,   8'd19,  8'd20,  8'd7,   8'd14,  8'd17,
                8'd28,  8'd23,  8'd24,  8'd16,  8'd11,  8'd25,  8'd29,  8'd1,
                8'd10,  8'd32,  8'd21,  8'd2,   8'd27,  8'd31,  8'd3,   8'd30,
                8'd15,  8'd13,  8'd0,   8'd8,   8'd5,   8'd18,  8'd22,  8'd26,
                8'd4,   8'd6,   8'd9,   8'd19,  8'd20,  8'd7,   8'd14,  8'd17,
                8'd28,  8'd23,  8'd24,  8'd16,  8'd11,  8'd25,  8'd29,  8'd1,
                8'd10,  8'd32,  8'd21,  8'd2,   8'd27,  8'd31,  8'd3,   8'd30,
                8'd15,  8'd13,  8'd0,   8'd8,   8'd5,   8'd18,  8'd22,  8'd26,
                8'd4,   8'd6,   8'd9,   8'd19,  8'd20,  8'd7,   8'd14,  8'd17
            };

        #(`clk_period);
        en_i = 0;

        #(`clk_period*10000);
        $display("Input array:");
        for(i=0;i<ELEMENTS;i=i+1)
        $write(in[i*BITWIDTH +: 8]);

        $display("\nOutput sorted array:");
        for(i=0;i<ELEMENTS;i=i+1)
        $write(out[i*BITWIDTH +: 8]);

        $display("\ndone %d", done_o);

        $finish;
    end

endmodule