data/full_repos/permissive/517390617/modules/raizing_video/raizing_pal.v
1: b'%Warning-WIDTH: data/full_repos/permissive/517390617/modules/raizing_video/raizing_pal.v:51: Operator AND expects 32 bits on the LHS, but LHS\'s VARREF \'c\' generates 16 bits.\n                                                                                           : ... In instance raizing_pal\n        r = ((c & 16\'h001F) << 3) | (((c & 16\'h001F) << 3) >> 5);\n                ^\n                ... Use "/* verilator lint_off WIDTH */" and lint_on around source to disable this message.\n%Warning-WIDTH: data/full_repos/permissive/517390617/modules/raizing_video/raizing_pal.v:51: Operator AND expects 32 bits on the RHS, but RHS\'s CONST \'16\'h1f\' generates 16 bits.\n                                                                                           : ... In instance raizing_pal\n        r = ((c & 16\'h001F) << 3) | (((c & 16\'h001F) << 3) >> 5);\n                ^\n%Warning-WIDTH: data/full_repos/permissive/517390617/modules/raizing_video/raizing_pal.v:51: Operator AND expects 32 bits on the LHS, but LHS\'s VARREF \'c\' generates 16 bits.\n                                                                                           : ... In instance raizing_pal\n        r = ((c & 16\'h001F) << 3) | (((c & 16\'h001F) << 3) >> 5);\n                                         ^\n%Warning-WIDTH: data/full_repos/permissive/517390617/modules/raizing_video/raizing_pal.v:51: Operator AND expects 32 bits on the RHS, but RHS\'s CONST \'16\'h1f\' generates 16 bits.\n                                                                                           : ... In instance raizing_pal\n        r = ((c & 16\'h001F) << 3) | (((c & 16\'h001F) << 3) >> 5);\n                                         ^\n%Warning-WIDTH: data/full_repos/permissive/517390617/modules/raizing_video/raizing_pal.v:52: Operator AND expects 32 bits on the LHS, but LHS\'s VARREF \'c\' generates 16 bits.\n                                                                                           : ... In instance raizing_pal\n        g = ((c & 16\'h03E0) >> 2) | (((c & 16\'h03E0) >> 2) >> 5);\n                ^\n%Warning-WIDTH: data/full_repos/permissive/517390617/modules/raizing_video/raizing_pal.v:52: Operator AND expects 32 bits on the RHS, but RHS\'s CONST \'16\'h3e0\' generates 16 bits.\n                                                                                           : ... In instance raizing_pal\n        g = ((c & 16\'h03E0) >> 2) | (((c & 16\'h03E0) >> 2) >> 5);\n                ^\n%Warning-WIDTH: data/full_repos/permissive/517390617/modules/raizing_video/raizing_pal.v:52: Operator AND expects 32 bits on the LHS, but LHS\'s VARREF \'c\' generates 16 bits.\n                                                                                           : ... In instance raizing_pal\n        g = ((c & 16\'h03E0) >> 2) | (((c & 16\'h03E0) >> 2) >> 5);\n                                         ^\n%Warning-WIDTH: data/full_repos/permissive/517390617/modules/raizing_video/raizing_pal.v:52: Operator AND expects 32 bits on the RHS, but RHS\'s CONST \'16\'h3e0\' generates 16 bits.\n                                                                                           : ... In instance raizing_pal\n        g = ((c & 16\'h03E0) >> 2) | (((c & 16\'h03E0) >> 2) >> 5);\n                                         ^\n%Warning-WIDTH: data/full_repos/permissive/517390617/modules/raizing_video/raizing_pal.v:53: Operator AND expects 32 bits on the LHS, but LHS\'s VARREF \'c\' generates 16 bits.\n                                                                                           : ... In instance raizing_pal\n        b = ((c & 16\'h7C00) >> 7) | (((c & 16\'h7C00) >> 7) >> 5);\n                ^\n%Warning-WIDTH: data/full_repos/permissive/517390617/modules/raizing_video/raizing_pal.v:53: Operator AND expects 32 bits on the RHS, but RHS\'s CONST \'16\'h7c00\' generates 16 bits.\n                                                                                           : ... In instance raizing_pal\n        b = ((c & 16\'h7C00) >> 7) | (((c & 16\'h7C00) >> 7) >> 5);\n                ^\n%Warning-WIDTH: data/full_repos/permissive/517390617/modules/raizing_video/raizing_pal.v:53: Operator AND expects 32 bits on the LHS, but LHS\'s VARREF \'c\' generates 16 bits.\n                                                                                           : ... In instance raizing_pal\n        b = ((c & 16\'h7C00) >> 7) | (((c & 16\'h7C00) >> 7) >> 5);\n                                         ^\n%Warning-WIDTH: data/full_repos/permissive/517390617/modules/raizing_video/raizing_pal.v:53: Operator AND expects 32 bits on the RHS, but RHS\'s CONST \'16\'h7c00\' generates 16 bits.\n                                                                                           : ... In instance raizing_pal\n        b = ((c & 16\'h7C00) >> 7) | (((c & 16\'h7C00) >> 7) >> 5);\n                                         ^\n%Warning-WIDTH: data/full_repos/permissive/517390617/modules/raizing_video/raizing_pal.v:54: Operator AND expects 32 bits on the RHS, but RHS\'s CONST \'24\'hff0000\' generates 24 bits.\n                                                                                           : ... In instance raizing_pal\n        calc_col = ((r << 16) & 24\'hFF0000 | (g << 8) & 24\'h00FF00 | b & 24\'h0000FF);\n                              ^\n%Warning-WIDTH: data/full_repos/permissive/517390617/modules/raizing_video/raizing_pal.v:54: Operator AND expects 32 bits on the RHS, but RHS\'s CONST \'24\'hff00\' generates 24 bits.\n                                                                                           : ... In instance raizing_pal\n        calc_col = ((r << 16) & 24\'hFF0000 | (g << 8) & 24\'h00FF00 | b & 24\'h0000FF);\n                                                      ^\n%Warning-WIDTH: data/full_repos/permissive/517390617/modules/raizing_video/raizing_pal.v:54: Operator AND expects 32 bits on the RHS, but RHS\'s CONST \'24\'hff\' generates 24 bits.\n                                                                                           : ... In instance raizing_pal\n        calc_col = ((r << 16) & 24\'hFF0000 | (g << 8) & 24\'h00FF00 | b & 24\'h0000FF);\n                                                                       ^\n%Warning-WIDTH: data/full_repos/permissive/517390617/modules/raizing_video/raizing_pal.v:54: Operator ASSIGN expects 24 bits on the Assign RHS, but Assign RHS\'s OR generates 32 bits.\n                                                                                           : ... In instance raizing_pal\n        calc_col = ((r << 16) & 24\'hFF0000 | (g << 8) & 24\'h00FF00 | b & 24\'h0000FF);\n                 ^\n%Error: data/full_repos/permissive/517390617/modules/raizing_video/raizing_pal.v:106: Cannot find file containing module: \'jtframe_blank\'\njtframe_blank #(.DLY(BLNK_DLY), .DW(24)) u_blank (\n^~~~~~~~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/517390617/modules/raizing_video,data/full_repos/permissive/517390617/jtframe_blank\n             data/full_repos/permissive/517390617/modules/raizing_video,data/full_repos/permissive/517390617/jtframe_blank.v\n             data/full_repos/permissive/517390617/modules/raizing_video,data/full_repos/permissive/517390617/jtframe_blank.sv\n             jtframe_blank\n             jtframe_blank.v\n             jtframe_blank.sv\n             obj_dir/jtframe_blank\n             obj_dir/jtframe_blank.v\n             obj_dir/jtframe_blank.sv\n%Error: Exiting due to 1 error(s), 16 warning(s)\n'
module raizing_pal (
    input CLK,
    input CLK96,
    input PIXEL_CEN,
    input RESET,
    input RESET96,

    input LVBL,
    input LHBL,
    output LVBL_DLY,
    output LHBL_DLY,

    input [10:0] PIXEL,
    output [10:0] PAL_ADDR,
    input [15:0] PAL_DATA,
    input ACTIVE,

    output [ 7:0] RED,
    output [ 7:0] GREEN,
    output [ 7:0] BLUE
);

parameter BLNK_DLY=4;

integer r,g,b;
function [23:0] calc_col;
    input [15:0] c;
    begin
        calc_col = 24'h000000;
        r = ((c & 16'h001F) << 3) | (((c & 16'h001F) << 3) >> 5);
        g = ((c & 16'h03E0) >> 2) | (((c & 16'h03E0) >> 2) >> 5);
        b = ((c & 16'h7C00) >> 7) | (((c & 16'h7C00) >> 7) >> 5);
        calc_col = ((r << 16) & 24'hFF0000 | (g << 8) & 24'h00FF00 | b & 24'h0000FF);

    end
endfunction

assign PAL_ADDR = PIXEL;

reg[23:0] color = 0;
reg [2:0] st = 0;


always @(posedge CLK96, posedge RESET96) begin
    if(RESET96) begin
        color<=0;
        st<=0;
    end else begin





        if(PIXEL_CEN) color <= calc_col(PAL_DATA);
    end
end




























jtframe_blank #(.DLY(BLNK_DLY), .DW(24)) u_blank (
    .clk(CLK96),
    .pxl_cen(PIXEL_CEN),
    .preLHBL(LHBL),
    .preLVBL(LVBL),
    .LHBL(LHBL_DLY),
    .LVBL(LVBL_DLY),
    .rgb_in(color),
    .rgb_out({RED, GREEN, BLUE})
);
endmodule
module raizing_pal (
    input CLK,
    input CLK96,
    input PIXEL_CEN,
    input RESET,
    input RESET96,

    input LVBL,
    input LHBL,
    output LVBL_DLY,
    output LHBL_DLY,

    input [10:0] PIXEL,
    output [10:0] PAL_ADDR,
    input [15:0] PAL_DATA,
    input ACTIVE,

    output [ 7:0] RED,
    output [ 7:0] GREEN,
    output [ 7:0] BLUE
);


parameter BLNK_DLY=4;

integer r,g,b;
function [23:0] calc_col;
    input [15:0] c;
    begin
        calc_col = 24'h000000;
        r = ((c & 16'h001F) << 3) | (((c & 16'h001F) << 3) >> 5);
        g = ((c & 16'h03E0) >> 2) | (((c & 16'h03E0) >> 2) >> 5);
        b = ((c & 16'h7C00) >> 7) | (((c & 16'h7C00) >> 7) >> 5);
        calc_col = ((r << 16) & 24'hFF0000 | (g << 8) & 24'h00FF00 | b & 24'h0000FF);

    end
endfunction

assign PAL_ADDR = PIXEL;

reg[23:0] color = 0;
reg [2:0] st = 0;


always @(posedge CLK96, posedge RESET96) begin
    if(RESET96) begin
        color<=0;
        st<=0;
    end else begin





        if(PIXEL_CEN) color <= calc_col(PAL_DATA);
    end
end




























jtframe_blank #(.DLY(BLNK_DLY), .DW(24)) u_blank (
    .clk(CLK96),
    .pxl_cen(PIXEL_CEN),
    .preLHBL(LHBL),
    .preLVBL(LVBL),
    .LHBL(LHBL_DLY),
    .LVBL(LVBL_DLY),
    .rgb_in(color),
    .rgb_out({RED, GREEN, BLUE})
);
endmodule