data/full_repos/permissive/420259327/IP/colourise.v
1: b"%Error: data/full_repos/permissive/420259327/IP/colourise.v:35: Cannot find file containing module: 'rgb_2_luma'\n    rgb_2_luma lumaData(\n    ^~~~~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/420259327/IP,data/full_repos/permissive/420259327/rgb_2_luma\n             data/full_repos/permissive/420259327/IP,data/full_repos/permissive/420259327/rgb_2_luma.v\n             data/full_repos/permissive/420259327/IP,data/full_repos/permissive/420259327/rgb_2_luma.sv\n             rgb_2_luma\n             rgb_2_luma.v\n             rgb_2_luma.sv\n             obj_dir/rgb_2_luma\n             obj_dir/rgb_2_luma.v\n             obj_dir/rgb_2_luma.sv\n%Error: Exiting due to 1 error(s)\n"
module colourise(
        input [23:0] vid_pData_in,
        input [2:0] mode,
        output [23:0] vid_pData_out
    );
    
    wire [7:0] luma;
    reg [23:0] vid;
    reg [7:0] red;
    reg [7:0] green;
    reg [7:0] blue;
    
    rgb_2_luma lumaData(
        .vid_pData_in(vid_pData_in),
        .en(1'b1),
        .vid_pData_out(luma)
    );

    always @ (vid_pData_in, mode) begin
      case (mode)
        3'b001 :
        begin 
         if ((luma >=0) && (luma<=50))
            begin
            red = 252;
            green = 3;
            blue = 3;
            vid = {blue, green, red};
            end
            
        if ((luma >=51) && (luma<=100))
            begin
            red = 252;
            green = 240;
            blue = 3;
            vid = {blue, green, red};
            end
            
        if ((luma >=101) && (luma<=150))
            begin
            red = 3;
            green = 252;
            blue = 107;
            vid = {blue, green, red};
            end
            
        if ((luma >=151) && (luma<=200))
            begin
            red = 3;
            green = 198;
            blue = 252;
            vid = {blue, green, red};
            end
            
        if ((luma >=201) && (luma<=255))
            begin
            red = 219;
            green = 3;
            blue = 252;
            vid = {blue, green, red};
            end
        end
          
       
          
        default :
            begin
                vid = vid_pData_in;
            end
                  
      endcase
            
    end
    
    assign vid_pData_out = vid;
    
endmodule
module colourise(
        input [23:0] vid_pData_in,
        input [2:0] mode,
        output [23:0] vid_pData_out
    );

    
    wire [7:0] luma;
    reg [23:0] vid;
    reg [7:0] red;
    reg [7:0] green;
    reg [7:0] blue;
    
    rgb_2_luma lumaData(
        .vid_pData_in(vid_pData_in),
        .en(1'b1),
        .vid_pData_out(luma)
    );

    always @ (vid_pData_in, mode) begin
      case (mode)
        3'b001 :
        begin 
         if ((luma >=0) && (luma<=50))
            begin
            red = 252;
            green = 3;
            blue = 3;
            vid = {blue, green, red};
            end
            
        if ((luma >=51) && (luma<=100))
            begin
            red = 252;
            green = 240;
            blue = 3;
            vid = {blue, green, red};
            end
            
        if ((luma >=101) && (luma<=150))
            begin
            red = 3;
            green = 252;
            blue = 107;
            vid = {blue, green, red};
            end
            
        if ((luma >=151) && (luma<=200))
            begin
            red = 3;
            green = 198;
            blue = 252;
            vid = {blue, green, red};
            end
            
        if ((luma >=201) && (luma<=255))
            begin
            red = 219;
            green = 3;
            blue = 252;
            vid = {blue, green, red};
            end
        end
          
       
          
        default :
            begin
                vid = vid_pData_in;
            end
                  
      endcase
            
    end
    
    assign vid_pData_out = vid;
    
endmodule