data/full_repos/permissive/132176809/numbers.v
1: b'%Error: data/full_repos/permissive/132176809/numbers.v:42: Cannot find file containing module: \'image\'\n    image\n    ^~~~~\n        ... Looked in:\n             data/full_repos/permissive/132176809,data/full_repos/permissive/132176809/image\n             data/full_repos/permissive/132176809,data/full_repos/permissive/132176809/image.v\n             data/full_repos/permissive/132176809,data/full_repos/permissive/132176809/image.sv\n             image\n             image.v\n             image.sv\n             obj_dir/image\n             obj_dir/image.v\n             obj_dir/image.sv\n%Warning-WIDTH: data/full_repos/permissive/132176809/numbers.v:58: Operator ASSIGN expects 2 bits on the Assign RHS, but Assign RHS\'s SHIFTR generates 32 or 10 bits.\n                                                                 : ... In instance numbers\n        col = (x_px - x_off) >> 4;  \n            ^\n                ... Use "/* verilator lint_off WIDTH */" and lint_on around source to disable this message.\n%Warning-WIDTH: data/full_repos/permissive/132176809/numbers.v:78: Operator ASSIGN expects 8 bits on the Assign RHS, but Assign RHS\'s SUB generates 32 or 10 bits.\n                                                                 : ... In instance numbers\n        x_img = (x_px - x_off - 1) - col * width_numbers;\n              ^\n%Warning-WIDTH: data/full_repos/permissive/132176809/numbers.v:79: Operator ASSIGN expects 8 bits on the Assign RHS, but Assign RHS\'s ADD generates 32 or 10 bits.\n                                                                 : ... In instance numbers\n        y_img = (y_px - y_off - (row * height_numbers)) + number * height_numbers;\n              ^\n%Error: Exiting due to 1 error(s), 3 warning(s)\n'
module numbers 
#(
    parameter x_off = 0,
    parameter y_off = 0,
    parameter background = black,
    parameter ink = white
)
(
    input wire        clk,
    input wire [15:0] var1,
    input wire [15:0] var2,
    input wire [15:0] var3,
    input wire [15:0] var4,
    input wire [9:0]  x_px,
    input wire [9:0]  y_px,
    output reg [5:0]  color_px
);


    parameter [5:0] black  = 6'b000000;
    parameter [5:0] blue   = 6'b000011;
    parameter [5:0] green  = 6'b001100;
    parameter [5:0] red    = 6'b110000;
    parameter [5:0] yellow = 6'b111100;
    parameter [5:0] white  = 6'b111111;


    

    parameter width_numbers = 16;
    parameter height_numbers = 16;


    reg [7:0] x_img;
    reg [7:0] y_img;
    wire pixel;

    reg [3:0] number;
   

    image
    image01 (
            .clk (clk),
            .x_img (x_img),
            .y_img (y_img),
            .pixel (pixel)
            );



    reg [1:0] row = 0;
    reg [1:0] col = 0;



    always @(posedge clk) begin
        col = (x_px - x_off) >> 4;


        if(y_px - y_off >= height_numbers * 3) begin
            number = var1[(4-col)*4-1 -:4];
            row = 3;
        end else 
        if(y_px - y_off >= height_numbers * 2) begin
            number = var2[(4-col)*4-1 -:4];
            row = 2;
        end else
        if(y_px - y_off >=  height_numbers * 1) begin
            number = var3[(4-col)*4-1 -:4];
            row = 1;
        end else
        if(y_px - y_off >= height_numbers * 0) begin
            number = var4[(4-col)*4-1 -:4];
            row = 0;
        end

        x_img = (x_px - x_off - 1) - col * width_numbers;
        y_img = (y_px - y_off - (row * height_numbers)) + number * height_numbers;

    end
       

    wire drawing;
    assign drawing = color_px == ink;

    always @(posedge clk)
    begin

        if ((x_px > x_off + 1) && (x_px <= x_off + width_numbers * 4 + 1) && (y_px >= y_off) && (y_px < y_off + height_numbers * 4))   
        begin

            if (pixel)
                color_px <= ink;
            else
                color_px <= background;
        end
        else
           color_px <= background;
    end

endmodule
module numbers 
#(
    parameter x_off = 0,
    parameter y_off = 0,
    parameter background = black,
    parameter ink = white
)
(
    input wire        clk,
    input wire [15:0] var1,
    input wire [15:0] var2,
    input wire [15:0] var3,
    input wire [15:0] var4,
    input wire [9:0]  x_px,
    input wire [9:0]  y_px,
    output reg [5:0]  color_px
);



    parameter [5:0] black  = 6'b000000;
    parameter [5:0] blue   = 6'b000011;
    parameter [5:0] green  = 6'b001100;
    parameter [5:0] red    = 6'b110000;
    parameter [5:0] yellow = 6'b111100;
    parameter [5:0] white  = 6'b111111;


    

    parameter width_numbers = 16;
    parameter height_numbers = 16;


    reg [7:0] x_img;
    reg [7:0] y_img;
    wire pixel;

    reg [3:0] number;
   

    image
    image01 (
            .clk (clk),
            .x_img (x_img),
            .y_img (y_img),
            .pixel (pixel)
            );



    reg [1:0] row = 0;
    reg [1:0] col = 0;



    always @(posedge clk) begin
        col = (x_px - x_off) >> 4;


        if(y_px - y_off >= height_numbers * 3) begin
            number = var1[(4-col)*4-1 -:4];
            row = 3;
        end else 
        if(y_px - y_off >= height_numbers * 2) begin
            number = var2[(4-col)*4-1 -:4];
            row = 2;
        end else
        if(y_px - y_off >=  height_numbers * 1) begin
            number = var3[(4-col)*4-1 -:4];
            row = 1;
        end else
        if(y_px - y_off >= height_numbers * 0) begin
            number = var4[(4-col)*4-1 -:4];
            row = 0;
        end

        x_img = (x_px - x_off - 1) - col * width_numbers;
        y_img = (y_px - y_off - (row * height_numbers)) + number * height_numbers;

    end
       

    wire drawing;
    assign drawing = color_px == ink;

    always @(posedge clk)
    begin

        if ((x_px > x_off + 1) && (x_px <= x_off + width_numbers * 4 + 1) && (y_px >= y_off) && (y_px < y_off + height_numbers * 4))   
        begin

            if (pixel)
                color_px <= ink;
            else
                color_px <= background;
        end
        else
           color_px <= background;
    end

endmodule