data/full_repos/permissive/194450802/raytracer.v
1: b"%Error: data/full_repos/permissive/194450802/raytracer.v:150: Cannot find file containing module: 'bytian_to_vector'\n    bytian_to_vector btv0 (.bytian(angle),\n    ^~~~~~~~~~~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/194450802,data/full_repos/permissive/194450802/bytian_to_vector\n             data/full_repos/permissive/194450802,data/full_repos/permissive/194450802/bytian_to_vector.v\n             data/full_repos/permissive/194450802,data/full_repos/permissive/194450802/bytian_to_vector.sv\n             bytian_to_vector\n             bytian_to_vector.v\n             bytian_to_vector.sv\n             obj_dir/bytian_to_vector\n             obj_dir/bytian_to_vector.v\n             obj_dir/bytian_to_vector.sv\n%Error: data/full_repos/permissive/194450802/raytracer.v:156: Cannot find file containing module: 'coordinate_to_grid'\n    coordinate_to_grid ctg0 (.coord_x(pos_x),\n    ^~~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/194450802/raytracer.v:163: Cannot find file containing module: 'coordinate_to_grid'\n    coordinate_to_grid ctg1 (.coord_x(prev_pos_x),\n    ^~~~~~~~~~~~~~~~~~\n%Error: Exiting due to 3 error(s)\n"
module _raytracer_fsm(clock, reset,
                      start, done,
                      load_values, go_to_next_pos, on_obstacle);

    input clock;
    input reset;


    input start;
    output done;


    output load_values;
    output go_to_next_pos;
    input on_obstacle;


    reg [2:0] state;


    localparam WAIT            = 3'd0,
               INITIALIZE      = 3'd1,
               CHECK_OBSTACLE  = 3'd2,
               GO_TO_NEXT_POS  = 3'd3,
               DONE            = 3'd4;


    always @(posedge clock) begin
        if (reset)
            state <= WAIT;
        else begin
            case (state)
                WAIT:            state <= start ? INITIALIZE : WAIT;
                INITIALIZE:      state <= CHECK_OBSTACLE;
                CHECK_OBSTACLE:  state <= on_obstacle ? DONE : GO_TO_NEXT_POS;
                GO_TO_NEXT_POS:  state <= CHECK_OBSTACLE;
                DONE:            state <= WAIT;
                default:         state <= WAIT;
            endcase
        end
    end


    assign load_values = state == INITIALIZE;
    assign go_to_next_pos = state == GO_TO_NEXT_POS;
    assign done = state == DONE;
endmodule
module _raytracer_fsm(clock, reset,
                      start, done,
                      load_values, go_to_next_pos, on_obstacle);


    input clock;
    input reset;


    input start;
    output done;


    output load_values;
    output go_to_next_pos;
    input on_obstacle;


    reg [2:0] state;


    localparam WAIT            = 3'd0,
               INITIALIZE      = 3'd1,
               CHECK_OBSTACLE  = 3'd2,
               GO_TO_NEXT_POS  = 3'd3,
               DONE            = 3'd4;


    always @(posedge clock) begin
        if (reset)
            state <= WAIT;
        else begin
            case (state)
                WAIT:            state <= start ? INITIALIZE : WAIT;
                INITIALIZE:      state <= CHECK_OBSTACLE;
                CHECK_OBSTACLE:  state <= on_obstacle ? DONE : GO_TO_NEXT_POS;
                GO_TO_NEXT_POS:  state <= CHECK_OBSTACLE;
                DONE:            state <= WAIT;
                default:         state <= WAIT;
            endcase
        end
    end


    assign load_values = state == INITIALIZE;
    assign go_to_next_pos = state == GO_TO_NEXT_POS;
    assign done = state == DONE;
endmodule