data/full_repos/permissive/194450802/draw_grid.v
1: b"%Error: data/full_repos/permissive/194450802/draw_grid.v:155: Cannot find file containing module: 'draw_square'\n    draw_square ds0 (.clock(clock),\n    ^~~~~~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/194450802,data/full_repos/permissive/194450802/draw_square\n             data/full_repos/permissive/194450802,data/full_repos/permissive/194450802/draw_square.v\n             data/full_repos/permissive/194450802,data/full_repos/permissive/194450802/draw_square.sv\n             draw_square\n             draw_square.v\n             draw_square.sv\n             obj_dir/draw_square\n             obj_dir/draw_square.v\n             obj_dir/draw_square.sv\n%Error: Exiting due to 1 error(s)\n"
module _draw_grid_datapath(clock, reset,
                           grid_x, grid_y, grid_out,
                           vga_x, vga_y, vga_colour, vga_write,
                           reset_counter, increment_counter, draw_square, counter_at_max, draw_square_done);

    input clock;
    input reset;


    output [5:0] grid_x;
    output [4:0] grid_y;
    input [2:0] grid_out;


    output [7:0] vga_x;
    output [6:0] vga_y;
    output [17:0] vga_colour;
    output vga_write;


    input reset_counter;
    input increment_counter;
    input draw_square;
    output counter_at_max;
    output draw_square_done;


    reg [5:0] grid_x;
    reg [4:0] grid_y;


    wire x_at_max;
    wire y_at_max;
    assign x_at_max = grid_x == 6'd39;
    assign y_at_max = grid_y == 5'd29;
    always @(posedge clock) begin
        if (reset_counter | reset) begin
            grid_x <= 6'b0;
            grid_y <= 5'b0;
        end
        else if (increment_counter) begin
            if (x_at_max) begin
                grid_x <= 0;
                grid_y <= grid_y + 1;
            end
            else
                grid_x <= grid_x + 1;
        end
    end
    assign counter_at_max = x_at_max & y_at_max;


    draw_square ds0 (.clock(clock),
                     .reset(reset),
                     .start(draw_square),
                     .done(draw_square_done),
                     .x({2'b0, grid_x} << 2),
                     .y({2'b0, grid_y} << 2),
                     .colour({{6{grid_out[2]}}, {6{grid_out[1]}}, {6{grid_out[0]}}}),
                     .vga_x(vga_x),
                     .vga_y(vga_y),
                     .vga_colour(vga_colour),
                     .vga_write(vga_write));
endmodule
module _draw_grid_datapath(clock, reset,
                           grid_x, grid_y, grid_out,
                           vga_x, vga_y, vga_colour, vga_write,
                           reset_counter, increment_counter, draw_square, counter_at_max, draw_square_done);


    input clock;
    input reset;


    output [5:0] grid_x;
    output [4:0] grid_y;
    input [2:0] grid_out;


    output [7:0] vga_x;
    output [6:0] vga_y;
    output [17:0] vga_colour;
    output vga_write;


    input reset_counter;
    input increment_counter;
    input draw_square;
    output counter_at_max;
    output draw_square_done;


    reg [5:0] grid_x;
    reg [4:0] grid_y;


    wire x_at_max;
    wire y_at_max;
    assign x_at_max = grid_x == 6'd39;
    assign y_at_max = grid_y == 5'd29;
    always @(posedge clock) begin
        if (reset_counter | reset) begin
            grid_x <= 6'b0;
            grid_y <= 5'b0;
        end
        else if (increment_counter) begin
            if (x_at_max) begin
                grid_x <= 0;
                grid_y <= grid_y + 1;
            end
            else
                grid_x <= grid_x + 1;
        end
    end
    assign counter_at_max = x_at_max & y_at_max;


    draw_square ds0 (.clock(clock),
                     .reset(reset),
                     .start(draw_square),
                     .done(draw_square_done),
                     .x({2'b0, grid_x} << 2),
                     .y({2'b0, grid_y} << 2),
                     .colour({{6{grid_out[2]}}, {6{grid_out[1]}}, {6{grid_out[0]}}}),
                     .vga_x(vga_x),
                     .vga_y(vga_y),
                     .vga_colour(vga_colour),
                     .vga_write(vga_write));
endmodule