data/full_repos/permissive/127044786/blocks/Display/iPxs/Overlay/PxsCourt.v
data/verilator_xmls/ee662aa3-c21a-455a-93e8-12c8db2b6698.xml
module PxsCourt (
                input wire        px_clk,
                input wire [22:0] VGAStr_i,
                output reg [25:0] RGBStr_o
                );


`define Active 0:0
`define VS     1:1
`define HS     2:2
`define YC     12:3
`define XC     22:13
`define R      23:23
`define G      24:24
`define B      25:25
`define RGB    25:23
`define VGA    22:0
`define separator_line 6:6


localparam width_line = 6;
localparam width_screen = 640;
localparam height_screen = 480;


localparam black = 3'b000;
localparam white = 3'b111;


always @(posedge px_clk)
begin

    RGBStr_o[`VGA] <= VGAStr_i[`VGA];


    RGBStr_o[`RGB] <= (

                       ((VGAStr_i[`XC] > (width_screen/2 - width_line/2)) && (VGAStr_i[`XC] < (width_screen/2 + width_line/2)) && (VGAStr_i[`separator_line])) ||

                       ((VGAStr_i[`YC] > 0) && (VGAStr_i[`YC] < width_line)) ||

                       ((VGAStr_i[`YC] > (height_screen - width_line)) && (VGAStr_i[`YC] < height_screen))
                      ) ? white : black;
end

endmodule
module PxsCourt (
                input wire        px_clk,
                input wire [22:0] VGAStr_i,
                output reg [25:0] RGBStr_o
                );



`define Active 0:0
`define VS     1:1
`define HS     2:2
`define YC     12:3
`define XC     22:13
`define R      23:23
`define G      24:24
`define B      25:25
`define RGB    25:23
`define VGA    22:0
`define separator_line 6:6


localparam width_line = 6;
localparam width_screen = 640;
localparam height_screen = 480;


localparam black = 3'b000;
localparam white = 3'b111;


always @(posedge px_clk)
begin

    RGBStr_o[`VGA] <= VGAStr_i[`VGA];


    RGBStr_o[`RGB] <= (

                       ((VGAStr_i[`XC] > (width_screen/2 - width_line/2)) && (VGAStr_i[`XC] < (width_screen/2 + width_line/2)) && (VGAStr_i[`separator_line])) ||

                       ((VGAStr_i[`YC] > 0) && (VGAStr_i[`YC] < width_line)) ||

                       ((VGAStr_i[`YC] > (height_screen - width_line)) && (VGAStr_i[`YC] < height_screen))
                      ) ? white : black;
end

endmodule