data/full_repos/permissive/470619013/verilog/rtl/frame.v
1: b'%Warning-WIDTH: data/full_repos/permissive/470619013/verilog/rtl/frame.v:29: Operator ASSIGN expects 3 bits on the Assign RHS, but Assign RHS\'s DIV generates 11 bits.\n                                                                           : ... In instance frame\n        col = shift_x / 11\'d76;\n            ^\n                ... Use "/* verilator lint_off WIDTH */" and lint_on around source to disable this message.\n%Warning-WIDTH: data/full_repos/permissive/470619013/verilog/rtl/frame.v:30: Operator ASSIGN expects 3 bits on the Assign RHS, but Assign RHS\'s DIV generates 11 bits.\n                                                                           : ... In instance frame\n        line = shift_y / 11\'d76;\n             ^\n%Warning-WIDTH: data/full_repos/permissive/470619013/verilog/rtl/frame.v:32: Operator ASSIGNDLY expects 7 bits on the Assign RHS, but Assign RHS\'s MODDIV generates 11 bits.\n                                                                           : ... In instance frame\n        sub_x <= shift_x % 11\'d76;\n              ^~\n%Warning-WIDTH: data/full_repos/permissive/470619013/verilog/rtl/frame.v:33: Operator ASSIGNDLY expects 7 bits on the Assign RHS, but Assign RHS\'s MODDIV generates 11 bits.\n                                                                           : ... In instance frame\n        sub_y <= shift_y % 11\'d76;\n              ^~\n%Error: data/full_repos/permissive/470619013/verilog/rtl/frame.v:62: Cannot find file containing module: \'square\'\nsquare square_inst (\n^~~~~~\n        ... Looked in:\n             data/full_repos/permissive/470619013/verilog/rtl,data/full_repos/permissive/470619013/square\n             data/full_repos/permissive/470619013/verilog/rtl,data/full_repos/permissive/470619013/square.v\n             data/full_repos/permissive/470619013/verilog/rtl,data/full_repos/permissive/470619013/square.sv\n             square\n             square.v\n             square.sv\n             obj_dir/square\n             obj_dir/square.v\n             obj_dir/square.sv\n%Error: Exiting due to 1 error(s), 4 warning(s)\n'
module frame(
    input clk,
    input rst,
    input [10:0] x,
    input [10:0] y,
    input [239:0] status,
    output [11:0] color
    );

reg [10:0] shift_x;
reg [10:0] shift_y;
reg [2:0] col;
reg [2:0] line;
reg [7:0] index;
reg [6:0] sub_x;
reg [6:0] sub_y;
reg valid;
always @(posedge clk) begin
    if (x >= 11'd130 && x < 11'd510 && y >= 11'd12 && y < 11'd468) begin
        shift_x = x - 11'd130;
        shift_y = y - 11'd12;
        col = shift_x / 11'd76;
        line = shift_y / 11'd76;
        index <= line * 8'd40 + col * 8'd8;
        sub_x <= shift_x % 11'd76;
        sub_y <= shift_y % 11'd76;
        valid <= 1'b1;
    end else begin
        shift_x = 11'd0;
        shift_y = 11'd0;
        col = 3'd0;
        line = 3'd0;
        index <= 8'd0;
        sub_x <= 7'd0;
        sub_y <= 7'd0;
        valid <= 1'b0;
    end   
end

reg [2:0] style;
reg [4:0] letter;
reg [6:0] p2_sub_x;
reg [6:0] p2_sub_y;
always @(posedge clk) begin
    if (valid) begin
        {style, letter} <= status[index +: 8];
    end else begin
        {style, letter} <= 8'h1f;
    end
    p2_sub_x <= sub_x;
    p2_sub_y <= sub_y;
end

wire [11:0] square_color;
square square_inst (
    .clk(clk),
    .rst(rst),
    .x(p2_sub_x),
    .y(p2_sub_y),
    .style(style),
    .letter(letter),
    .color(color)
);

endmodule
module frame(
    input clk,
    input rst,
    input [10:0] x,
    input [10:0] y,
    input [239:0] status,
    output [11:0] color
    );


reg [10:0] shift_x;
reg [10:0] shift_y;
reg [2:0] col;
reg [2:0] line;
reg [7:0] index;
reg [6:0] sub_x;
reg [6:0] sub_y;
reg valid;
always @(posedge clk) begin
    if (x >= 11'd130 && x < 11'd510 && y >= 11'd12 && y < 11'd468) begin
        shift_x = x - 11'd130;
        shift_y = y - 11'd12;
        col = shift_x / 11'd76;
        line = shift_y / 11'd76;
        index <= line * 8'd40 + col * 8'd8;
        sub_x <= shift_x % 11'd76;
        sub_y <= shift_y % 11'd76;
        valid <= 1'b1;
    end else begin
        shift_x = 11'd0;
        shift_y = 11'd0;
        col = 3'd0;
        line = 3'd0;
        index <= 8'd0;
        sub_x <= 7'd0;
        sub_y <= 7'd0;
        valid <= 1'b0;
    end   
end

reg [2:0] style;
reg [4:0] letter;
reg [6:0] p2_sub_x;
reg [6:0] p2_sub_y;
always @(posedge clk) begin
    if (valid) begin
        {style, letter} <= status[index +: 8];
    end else begin
        {style, letter} <= 8'h1f;
    end
    p2_sub_x <= sub_x;
    p2_sub_y <= sub_y;
end

wire [11:0] square_color;
square square_inst (
    .clk(clk),
    .rst(rst),
    .x(p2_sub_x),
    .y(p2_sub_y),
    .style(style),
    .letter(letter),
    .color(color)
);

endmodule