data/full_repos/permissive/156539908/octants-pdm/octants-pdm.v
 line:80: before: "+"
1: b'%Error: data/full_repos/permissive/156539908/octants-pdm/octants-pdm.v:3: Cannot find include file: ../include/led-pdm-gamma.v\n`include "../include/led-pdm-gamma.v" \n         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/156539908/octants-pdm,data/full_repos/permissive/156539908/../include/led-pdm-gamma.v\n             data/full_repos/permissive/156539908/octants-pdm,data/full_repos/permissive/156539908/../include/led-pdm-gamma.v.v\n             data/full_repos/permissive/156539908/octants-pdm,data/full_repos/permissive/156539908/../include/led-pdm-gamma.v.sv\n             ../include/led-pdm-gamma.v\n             ../include/led-pdm-gamma.v.v\n             ../include/led-pdm-gamma.v.sv\n             obj_dir/../include/led-pdm-gamma.v\n             obj_dir/../include/led-pdm-gamma.v.v\n             obj_dir/../include/led-pdm-gamma.v.sv\n%Error: Exiting due to 1 error(s)\n'
module painter24(
        input         clk,
        input         reset,
        input  [9:0] frame,
        input   [7:0] subframe,
        input   [5:0] x,
        input   [5:0] y,
        output [23:0] rgb24);


    wire [23:0] fast_frame;
    assign fast_frame = {frame, subframe};

    localparam FSPEED = 5;
    reg [5:0] flyer_x0, flyer_x1, flyer_y0, flyer_y1;
    always @(posedge clk) begin
        flyer_x0 <= fast_frame[FSPEED+:6];
        flyer_x1 <= fast_frame[FSPEED+:6] + 4;
        flyer_y0 <= fast_frame[FSPEED+6+:6];
        flyer_y1 <= fast_frame[FSPEED+6+:6] + 4;
    end

    wire in_flyer;
    assign in_flyer = 0 && flyer_x0 <= x && x < flyer_x1 &&
                      flyer_y0 <= y && y < flyer_y1;

    reg [2:0] schan, gchan;
    reg [4:0] sdist, gdist;
    always @(posedge clk) begin
        if (!y[5]) begin
            if (!x[5]) begin
                if (x > y) begin
                    schan  <= 3'b000;
                    gchan  <= 3'b001;
                    sdist  <= 31 - y;
                    gdist  <= x - y;
                end
                else begin
                    schan <= 3'b000;
                    gchan <= 3'b100;
                    sdist <= 31 - x;
                    gdist <= y - x;
                end
            end
            else begin
                if ((63 - x) > y) begin
                    schan <= 3'b001;
                    gchan <= 3'b010;
                    sdist <= 31 - y;
                    gdist <= x[4:0];
                end
                else begin
                    schan <= 3'b011;
                    gchan <= 3'b001;
                    sdist <= x[4:0];
                    gdist <= 31 - y;
                end
            end
        end
        else begin
            if (x[5]) begin
                if (x > y) begin
                    schan <= 3'b010;
                    gchan <= 3'b100;
                    sdist <= x[4:0];
                    gdist <= y[4:0];
                end
                else begin
                    schan <= 3'b110;
                    gchan <= 3'b001;
                    sdist <= y[4:0];
                    gdist <= y - x;
                end
            end
            else begin
                if (x > (63 - y)) begin
                    schan <= 3'b101;
                    gchan <= 3'b010;
                    sdist <= y[4:0];
                    gdist <= x + y;
                end
                else begin
                    schan <= 3'b100;
                    gchan <= 3'b001;
                    sdist <= 31 - x;
                    gdist <= y[4:0];
                end
            end
        end
    end

    wire [7:0] solid, grad;
    assign solid = {sdist[4:0], sdist[4:2]};
    assign grad  = {gdist[4:0], gdist[4:2]};


    wire [7:0] red, green, blue;
    assign red   = in_flyer ? 0 : gchan[0] ? grad : (schan[0] ? solid : 0);
    assign green = in_flyer ? 0 : gchan[1] ? grad : (schan[1] ? solid : 0);
    assign blue  = in_flyer ? 0 : gchan[2] ? grad : (schan[2] ? solid : 0);

    assign rgb24 = {blue, green, red};

endmodule
module painter24(
        input         clk,
        input         reset,
        input  [9:0] frame,
        input   [7:0] subframe,
        input   [5:0] x,
        input   [5:0] y,
        output [23:0] rgb24);



    wire [23:0] fast_frame;
    assign fast_frame = {frame, subframe};

    localparam FSPEED = 5;
    reg [5:0] flyer_x0, flyer_x1, flyer_y0, flyer_y1;
    always @(posedge clk) begin
        flyer_x0 <= fast_frame[FSPEED+:6];
        flyer_x1 <= fast_frame[FSPEED+:6] + 4;
        flyer_y0 <= fast_frame[FSPEED+6+:6];
        flyer_y1 <= fast_frame[FSPEED+6+:6] + 4;
    end

    wire in_flyer;
    assign in_flyer = 0 && flyer_x0 <= x && x < flyer_x1 &&
                      flyer_y0 <= y && y < flyer_y1;

    reg [2:0] schan, gchan;
    reg [4:0] sdist, gdist;
    always @(posedge clk) begin
        if (!y[5]) begin
            if (!x[5]) begin
                if (x > y) begin
                    schan  <= 3'b000;
                    gchan  <= 3'b001;
                    sdist  <= 31 - y;
                    gdist  <= x - y;
                end
                else begin
                    schan <= 3'b000;
                    gchan <= 3'b100;
                    sdist <= 31 - x;
                    gdist <= y - x;
                end
            end
            else begin
                if ((63 - x) > y) begin
                    schan <= 3'b001;
                    gchan <= 3'b010;
                    sdist <= 31 - y;
                    gdist <= x[4:0];
                end
                else begin
                    schan <= 3'b011;
                    gchan <= 3'b001;
                    sdist <= x[4:0];
                    gdist <= 31 - y;
                end
            end
        end
        else begin
            if (x[5]) begin
                if (x > y) begin
                    schan <= 3'b010;
                    gchan <= 3'b100;
                    sdist <= x[4:0];
                    gdist <= y[4:0];
                end
                else begin
                    schan <= 3'b110;
                    gchan <= 3'b001;
                    sdist <= y[4:0];
                    gdist <= y - x;
                end
            end
            else begin
                if (x > (63 - y)) begin
                    schan <= 3'b101;
                    gchan <= 3'b010;
                    sdist <= y[4:0];
                    gdist <= x + y;
                end
                else begin
                    schan <= 3'b100;
                    gchan <= 3'b001;
                    sdist <= 31 - x;
                    gdist <= y[4:0];
                end
            end
        end
    end

    wire [7:0] solid, grad;
    assign solid = {sdist[4:0], sdist[4:2]};
    assign grad  = {gdist[4:0], gdist[4:2]};


    wire [7:0] red, green, blue;
    assign red   = in_flyer ? 0 : gchan[0] ? grad : (schan[0] ? solid : 0);
    assign green = in_flyer ? 0 : gchan[1] ? grad : (schan[1] ? solid : 0);
    assign blue  = in_flyer ? 0 : gchan[2] ? grad : (schan[2] ? solid : 0);

    assign rgb24 = {blue, green, red};

endmodule