data/full_repos/permissive/496325532/vga_playground/sv/sync_gen.sv
1: b'%Error: data/full_repos/permissive/496325532/vga_playground/sv/sync_gen.sv:1: Cannot find include file: definitions.sv\n`include "definitions.sv" \n         ^~~~~~~~~~~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/496325532/vga_playground/sv,data/full_repos/permissive/496325532/definitions.sv\n             data/full_repos/permissive/496325532/vga_playground/sv,data/full_repos/permissive/496325532/definitions.sv.v\n             data/full_repos/permissive/496325532/vga_playground/sv,data/full_repos/permissive/496325532/definitions.sv.sv\n             definitions.sv\n             definitions.sv.v\n             definitions.sv.sv\n             obj_dir/definitions.sv\n             obj_dir/definitions.sv.v\n             obj_dir/definitions.sv.sv\n%Error: data/full_repos/permissive/496325532/vga_playground/sv/sync_gen.sv:23: Define or directive not defined: \'`RST_MSFF\'\n`RST_MSFF   (CounterX, (CounterX+1\'b1), CLK_25, CounterXmaxed)\n^~~~~~~~~\n%Error: data/full_repos/permissive/496325532/vga_playground/sv/sync_gen.sv:23: syntax error, unexpected \'(\'\n`RST_MSFF   (CounterX, (CounterX+1\'b1), CLK_25, CounterXmaxed)\n             ^~~~~~~~\n%Error: data/full_repos/permissive/496325532/vga_playground/sv/sync_gen.sv:24: Define or directive not defined: \'`EN_RST_MSFF\'\n`EN_RST_MSFF(CounterY, (CounterY+1\'b1), CLK_25, CounterXmaxed, (CounterXmaxed && CounterYmaxed) )\n^~~~~~~~~~~~\n%Error: data/full_repos/permissive/496325532/vga_playground/sv/sync_gen.sv:28: Define or directive not defined: \'`MSFF\'\n`MSFF(h_sync, next_h_sync, CLK_25)\n^~~~~\n%Error: data/full_repos/permissive/496325532/vga_playground/sv/sync_gen.sv:28: syntax error, unexpected \'(\'\n`MSFF(h_sync, next_h_sync, CLK_25)\n      ^~~~~~\n%Error: data/full_repos/permissive/496325532/vga_playground/sv/sync_gen.sv:29: Define or directive not defined: \'`MSFF\'\n`MSFF(v_sync, next_v_sync, CLK_25)\n^~~~~\n%Error: data/full_repos/permissive/496325532/vga_playground/sv/sync_gen.sv:33: Define or directive not defined: \'`MSFF\'\n`MSFF(inDisplayArea, NextinDisplayArea, CLK_25)\n^~~~~\n%Error: Exiting due to 8 error(s)\n'
module sync_gen(
        input  logic        CLK_25,
        input  logic        Reset,
        output logic        vga_h_sync,
        output logic        vga_v_sync,
        output logic        inDisplayArea,
        output logic  [9:0] CounterX,
        output logic  [9:0] CounterY
    );
    
logic h_sync, v_sync;
logic next_h_sync, next_v_sync;
logic CounterXmaxed, CounterYmaxed;
logic NextinDisplayArea;



assign CounterXmaxed = (CounterX == 800) || Reset;
assign CounterYmaxed = (CounterY == 525) || Reset;


`RST_MSFF   (CounterX, (CounterX+1'b1), CLK_25, CounterXmaxed)
`EN_RST_MSFF(CounterY, (CounterY+1'b1), CLK_25, CounterXmaxed, (CounterXmaxed && CounterYmaxed) )

assign next_h_sync = (CounterX >= (640 + 16) && (CounterX < (640 + 16 + 96)));
assign next_v_sync = (CounterY >= (480 + 10) && (CounterY < (480 + 10 + 2)));
`MSFF(h_sync, next_h_sync, CLK_25)
`MSFF(v_sync, next_v_sync, CLK_25)


assign NextinDisplayArea = ((CounterX < 640) && (CounterY < 480));
`MSFF(inDisplayArea, NextinDisplayArea, CLK_25)

assign vga_h_sync = ~h_sync;
assign vga_v_sync = ~v_sync;

endmodule
module sync_gen(
        input  logic        CLK_25,
        input  logic        Reset,
        output logic        vga_h_sync,
        output logic        vga_v_sync,
        output logic        inDisplayArea,
        output logic  [9:0] CounterX,
        output logic  [9:0] CounterY
    );

    
logic h_sync, v_sync;
logic next_h_sync, next_v_sync;
logic CounterXmaxed, CounterYmaxed;
logic NextinDisplayArea;



assign CounterXmaxed = (CounterX == 800) || Reset;
assign CounterYmaxed = (CounterY == 525) || Reset;


`RST_MSFF   (CounterX, (CounterX+1'b1), CLK_25, CounterXmaxed)
`EN_RST_MSFF(CounterY, (CounterY+1'b1), CLK_25, CounterXmaxed, (CounterXmaxed && CounterYmaxed) )

assign next_h_sync = (CounterX >= (640 + 16) && (CounterX < (640 + 16 + 96)));
assign next_v_sync = (CounterY >= (480 + 10) && (CounterY < (480 + 10 + 2)));
`MSFF(h_sync, next_h_sync, CLK_25)
`MSFF(v_sync, next_v_sync, CLK_25)


assign NextinDisplayArea = ((CounterX < 640) && (CounterY < 480));
`MSFF(inDisplayArea, NextinDisplayArea, CLK_25)

assign vga_h_sync = ~h_sync;
assign vga_v_sync = ~v_sync;

endmodule