data/full_repos/permissive/132176809/color_sq.v
data/verilator_xmls/b09347b4-4d53-49d2-be23-7c2081fb4403.xml
module color_sq
#(
    parameter x_off = 0,
    parameter y_off = 0,
    parameter w = 100,
    parameter h = 100,
    parameter color1 = 6'b000000,
    parameter color2 = 6'b111111
)
(
    input wire        clk,
    input wire [9:0]  x_px,
    input wire [9:0]  y_px,
    output reg [5:0]  color_px,
    input wire [9:0]  div
);

    always @(posedge clk)
    begin

        if ((x_px > x_off) && (x_px <= x_off + w) && (y_px > y_off) && (y_px <= y_off + h))   
        begin
            if((x_px - x_off ) > div)
                color_px <= color1;
            else
                color_px <= color2;
        end
        else
           color_px <= 0;
    end

endmodule
module color_sq
#(
    parameter x_off = 0,
    parameter y_off = 0,
    parameter w = 100,
    parameter h = 100,
    parameter color1 = 6'b000000,
    parameter color2 = 6'b111111
)
(
    input wire        clk,
    input wire [9:0]  x_px,
    input wire [9:0]  y_px,
    output reg [5:0]  color_px,
    input wire [9:0]  div
);


    always @(posedge clk)
    begin

        if ((x_px > x_off) && (x_px <= x_off + w) && (y_px > y_off) && (y_px <= y_off + h))   
        begin
            if((x_px - x_off ) > div)
                color_px <= color1;
            else
                color_px <= color2;
        end
        else
           color_px <= 0;
    end

endmodule