data/full_repos/permissive/107757225/vga/color_mapper.sv
data/verilator_xmls/6471a132-47d1-426a-aa14-2b587b9a09eb.xml
module  color_mapper ( 
                    input              is_ball, is_background, is_receptor_background,
                    input        [3:0] is_receptor, display_arrow,

                    input        [9:0] DrawX, DrawY,
                    output logic [7:0] VGA_R, VGA_G, VGA_B
                     );
    
    logic [7:0] Red, Green, Blue;


    assign VGA_R = Red;
    assign VGA_G = Green;
    assign VGA_B = Blue;
    

    always_comb
    begin
        if (is_ball == 1'b1) 
        begin
            Red = 8'hff;
            Green = 8'hff;
            Blue = 8'hff;
        end


        else if ( display_arrow[0] )
        begin
            Red = 8'h55; Green = 8'h00; Blue = 8'h00;
        end
		  else if ( display_arrow[1])
		  begin
		      Red = 8'h00; Green = 8'h55; Blue = 8'h00; 
		  end
		  else if ( display_arrow[2])
		  begin
		      Red = 8'h00; Green = 8'h00; Blue = 8'h55; 
		  end
		  else if ( display_arrow[3])
		  begin
		      Red = 8'h40; Green = 8'h40; Blue = 8'h40; 
		  end



        else if (is_receptor[0] == 1'b1)
        begin
            Red = 8'h55; Green = 8'h00; Blue = 8'h00;
        end
        else if (is_receptor[1] == 1'b1)
        begin
            Red = 8'h55; Green = 8'h00; Blue = 8'h00;
        end
        else if (is_receptor[2] == 1'b1)
        begin
            Red = 8'h55; Green = 8'h00; Blue = 8'h00;
        end
        else if (is_receptor[3] == 1'b1)
        begin
            Red = 8'h55; Green = 8'h00; Blue = 8'h00;
        end



        else if (is_receptor_background == 1'b1)
        begin
            Red = 8'h55; Green = 8'h55; Blue = 8'h55;
        end

        else if (is_background == 1'b1)
        begin
            Red = 8'h00; Green = 8'h00; Blue = 8'h00;
        end


        else 
        begin

            Red = 8'h05; Green = 8'h4b;
            Blue = 8'h7f - {1'b0, DrawX[9:3]};
        end
    end 
    
endmodule
module  color_mapper ( 
                    input              is_ball, is_background, is_receptor_background,
                    input        [3:0] is_receptor, display_arrow,

                    input        [9:0] DrawX, DrawY,
                    output logic [7:0] VGA_R, VGA_G, VGA_B
                     );

    
    logic [7:0] Red, Green, Blue;


    assign VGA_R = Red;
    assign VGA_G = Green;
    assign VGA_B = Blue;
    

    always_comb
    begin
        if (is_ball == 1'b1) 
        begin
            Red = 8'hff;
            Green = 8'hff;
            Blue = 8'hff;
        end


        else if ( display_arrow[0] )
        begin
            Red = 8'h55; Green = 8'h00; Blue = 8'h00;
        end
		  else if ( display_arrow[1])
		  begin
		      Red = 8'h00; Green = 8'h55; Blue = 8'h00; 
		  end
		  else if ( display_arrow[2])
		  begin
		      Red = 8'h00; Green = 8'h00; Blue = 8'h55; 
		  end
		  else if ( display_arrow[3])
		  begin
		      Red = 8'h40; Green = 8'h40; Blue = 8'h40; 
		  end



        else if (is_receptor[0] == 1'b1)
        begin
            Red = 8'h55; Green = 8'h00; Blue = 8'h00;
        end
        else if (is_receptor[1] == 1'b1)
        begin
            Red = 8'h55; Green = 8'h00; Blue = 8'h00;
        end
        else if (is_receptor[2] == 1'b1)
        begin
            Red = 8'h55; Green = 8'h00; Blue = 8'h00;
        end
        else if (is_receptor[3] == 1'b1)
        begin
            Red = 8'h55; Green = 8'h00; Blue = 8'h00;
        end



        else if (is_receptor_background == 1'b1)
        begin
            Red = 8'h55; Green = 8'h55; Blue = 8'h55;
        end

        else if (is_background == 1'b1)
        begin
            Red = 8'h00; Green = 8'h00; Blue = 8'h00;
        end


        else 
        begin

            Red = 8'h05; Green = 8'h4b;
            Blue = 8'h7f - {1'b0, DrawX[9:3]};
        end
    end 
    
endmodule