data/full_repos/permissive/128426084/src/sources_1/new/draw_rect.v
 line:40: before: "mouse_in"
1: b"%Error: data/full_repos/permissive/128426084/src/sources_1/new/draw_rect.v:24: Define or directive not defined: '`MOUSE_BUS_SIZE'\n    input wire [`MOUSE_BUS_SIZE-1:0] mouse_in,\n                ^~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/128426084/src/sources_1/new/draw_rect.v:25: Define or directive not defined: '`VGA_BUS_SIZE'\n    input wire [`VGA_BUS_SIZE-1:0] vga_in,\n                ^~~~~~~~~~~~~\n%Error: data/full_repos/permissive/128426084/src/sources_1/new/draw_rect.v:26: Define or directive not defined: '`VGA_BUS_SIZE'\n    output wire [`VGA_BUS_SIZE-1:0] vga_out,\n                 ^~~~~~~~~~~~~\n%Error: data/full_repos/permissive/128426084/src/sources_1/new/draw_rect.v:40: Define or directive not defined: '`MOUSE_SPLIT_INPUT'\n    `MOUSE_SPLIT_INPUT(mouse_in)\n    ^~~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/128426084/src/sources_1/new/draw_rect.v:40: syntax error, unexpected '('\n    `MOUSE_SPLIT_INPUT(mouse_in)\n                       ^~~~~~~~\n%Error: data/full_repos/permissive/128426084/src/sources_1/new/draw_rect.v:44: Define or directive not defined: '`VGA_SPLIT_INPUT'\n    `VGA_SPLIT_INPUT(vga_in)\n    ^~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/128426084/src/sources_1/new/draw_rect.v:45: Define or directive not defined: '`VGA_OUT_REG'\n    `VGA_OUT_REG\n    ^~~~~~~~~~~~\n%Error: data/full_repos/permissive/128426084/src/sources_1/new/draw_rect.v:46: Define or directive not defined: '`VGA_MERGE_AT_OUTPUT'\n    `VGA_MERGE_AT_OUTPUT(vga_out)\n    ^~~~~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/128426084/src/sources_1/new/draw_rect.v:60: Unsupported: fork statements\n    fork \n    ^~~~\n%Error: data/full_repos/permissive/128426084/src/sources_1/new/draw_rect.v:73: Unsupported: fork statements\n        fork\n        ^~~~\n%Error: Exiting due to 10 error(s)\n"
module draw_rect(
    input wire [`MOUSE_BUS_SIZE-1:0] mouse_in,
    input wire [`VGA_BUS_SIZE-1:0] vga_in,
    output wire [`VGA_BUS_SIZE-1:0] vga_out,
    input wire pclk,

    output wire [11:0] address,
    input wire [11:0] rgb_rom
    );


    localparam width = 48;
    localparam height = 64;
    localparam color = 12'hf_0_0;
    localparam color2 = 12'h0_0_f;
    

    `MOUSE_SPLIT_INPUT(mouse_in)
    
    
    
    `VGA_SPLIT_INPUT(vga_in)
    `VGA_OUT_REG
    `VGA_MERGE_AT_OUTPUT(vga_out)
    
    reg [11:0] x_pos, y_pos;
    reg [11:0] rgb_next;
    
    
    always @*
    begin
        if ((((hcount_in >= x_pos) && (hcount_in < (x_pos + width)))&& ((vcount_in >= y_pos) && (vcount_in < (y_pos + height)))) && ((hblnk_in == 0)&&(vblnk_in == 0)))
        if(left_in == 0) rgb_next <= rgb_rom; else rgb_next <= color2;
        else rgb_next <= rgb_in;
    end
    
    always @(posedge pclk)
    fork 
        hsync_out <= hsync_in;
        vsync_out <= vsync_in;
        hblnk_out <= hblnk_in;
        vblnk_out <= vblnk_in;
        hcount_out <= hcount_in;
        vcount_out <= vcount_in;
        rgb_out <= rgb_next;
    
    join
   
    always @(posedge pclk)
    if(vsync_in) 
        fork
         x_pos <= xpos_in;
         y_pos <= ypos_in;
        join

    assign  address[5:0] = hcount_in - x_pos;
    assign  address[11:6] = vcount_in - y_pos;    
    
endmodule
module draw_rect(
    input wire [`MOUSE_BUS_SIZE-1:0] mouse_in,
    input wire [`VGA_BUS_SIZE-1:0] vga_in,
    output wire [`VGA_BUS_SIZE-1:0] vga_out,
    input wire pclk,

    output wire [11:0] address,
    input wire [11:0] rgb_rom
    );



    localparam width = 48;
    localparam height = 64;
    localparam color = 12'hf_0_0;
    localparam color2 = 12'h0_0_f;
    

    `MOUSE_SPLIT_INPUT(mouse_in)
    
    
    
    `VGA_SPLIT_INPUT(vga_in)
    `VGA_OUT_REG
    `VGA_MERGE_AT_OUTPUT(vga_out)
    
    reg [11:0] x_pos, y_pos;
    reg [11:0] rgb_next;
    
    
    always @*
    begin
        if ((((hcount_in >= x_pos) && (hcount_in < (x_pos + width)))&& ((vcount_in >= y_pos) && (vcount_in < (y_pos + height)))) && ((hblnk_in == 0)&&(vblnk_in == 0)))
        if(left_in == 0) rgb_next <= rgb_rom; else rgb_next <= color2;
        else rgb_next <= rgb_in;
    end
    
    always @(posedge pclk)
    fork 
        hsync_out <= hsync_in;
        vsync_out <= vsync_in;
        hblnk_out <= hblnk_in;
        vblnk_out <= vblnk_in;
        hcount_out <= hcount_in;
        vcount_out <= vcount_in;
        rgb_out <= rgb_next;
    
    join
   
    always @(posedge pclk)
    if(vsync_in) 
        fork
         x_pos <= xpos_in;
         y_pos <= ypos_in;
        join

    assign  address[5:0] = hcount_in - x_pos;
    assign  address[11:6] = vcount_in - y_pos;    
    
endmodule