data/full_repos/permissive/140493787/src/hdl/pi_estimator_vga.v
 line:80: before: "("
1: b'%Warning-STMTDLY: data/full_repos/permissive/140493787/src/hdl/pi_estimator_vga.v:74: Unsupported: Ignoring delay on this delayed statement.\n      forever #(CLK_PER / 2) clk <= ~clk;\n              ^\n                  ... Use "/* verilator lint_off STMTDLY */" and lint_on around source to disable this message.\n%Error: data/full_repos/permissive/140493787/src/hdl/pi_estimator_vga.v:78: syntax error, unexpected \'@\'\n      reset <= 1; @(posedge clk);\n                  ^\n%Error: data/full_repos/permissive/140493787/src/hdl/pi_estimator_vga.v:79: syntax error, unexpected \'@\'\n      reset <= 0; @(posedge clk);\n                  ^\n%Error: data/full_repos/permissive/140493787/src/hdl/pi_estimator_vga.v:80: syntax error, unexpected \'@\'\n      repeat (1680400) @(posedge clk);\n                       ^\n%Error: Exiting due to 3 error(s), 1 warning(s)\n        ... See the manual and https://verilator.org for more assistance.\n'
module pi_estimator_vga (
   output wire       HS,
   output wire       VS,
   output wire [9:0] px_x,
   output wire [9:0] px_y,
   output wire       vidSel,
   input  wire       clk25,
   input  wire       reset
);

   wire [9:0] hCount, vCount;
   wire       tc_h, tc_v;

   assign px_x = hCount - 10'd144;
   assign px_y = vCount - 10'd35;

   wire horizCountReset, vertCountReset;
   assign horizCountReset = reset | tc_h;
   assign vertCountReset = reset | (tc_h & tc_v);
   vga_counter #(.TERMINAL_COUNT(799)) horizCount (
      .q(hCount),
      .tc(tc_h),
      .en(1'b1),
      .clk(clk25),
      .reset(horizCountReset)
   );
   vga_counter #(.TERMINAL_COUNT(524)) vertCount (
      .q(vCount),
      .tc(tc_v),
      .en(tc_h),
      .clk(clk25),
      .reset(vertCountReset)
   );

   wire HSn, VSn;
   vga_comparator horizComp (.lt(HSn), .a(hCount), .b(10'd96));
   vga_comparator vertComp (.lt(VSn), .a(vCount), .b(10'd2));
   assign HS = ~HSn;
   assign VS = ~VSn;

   wire ltHorizLow, ltHorizHigh;
   vga_comparator horizLowCheck (.lt(ltHorizLow), .a(hCount), .b(10'd144));
   vga_comparator horizHighCheck (.lt(ltHorizHigh), .a(hCount), .b(10'd784));

   wire ltVertLow, ltVertHigh;
   vga_comparator vertLowCheck (.lt(ltVertLow), .a(vCount), .b(10'd35));
   vga_comparator vertHighCheck (.lt(ltVertHigh), .a(vCount), .b(10'd515));

   assign vidSel = ~ltHorizLow & ltHorizHigh & ~ltVertLow & ltVertHigh;
endmodule
module pi_estimator_vga (
   output wire       HS,
   output wire       VS,
   output wire [9:0] px_x,
   output wire [9:0] px_y,
   output wire       vidSel,
   input  wire       clk25,
   input  wire       reset
);


   wire [9:0] hCount, vCount;
   wire       tc_h, tc_v;

   assign px_x = hCount - 10'd144;
   assign px_y = vCount - 10'd35;

   wire horizCountReset, vertCountReset;
   assign horizCountReset = reset | tc_h;
   assign vertCountReset = reset | (tc_h & tc_v);
   vga_counter #(.TERMINAL_COUNT(799)) horizCount (
      .q(hCount),
      .tc(tc_h),
      .en(1'b1),
      .clk(clk25),
      .reset(horizCountReset)
   );
   vga_counter #(.TERMINAL_COUNT(524)) vertCount (
      .q(vCount),
      .tc(tc_v),
      .en(tc_h),
      .clk(clk25),
      .reset(vertCountReset)
   );

   wire HSn, VSn;
   vga_comparator horizComp (.lt(HSn), .a(hCount), .b(10'd96));
   vga_comparator vertComp (.lt(VSn), .a(vCount), .b(10'd2));
   assign HS = ~HSn;
   assign VS = ~VSn;

   wire ltHorizLow, ltHorizHigh;
   vga_comparator horizLowCheck (.lt(ltHorizLow), .a(hCount), .b(10'd144));
   vga_comparator horizHighCheck (.lt(ltHorizHigh), .a(hCount), .b(10'd784));

   wire ltVertLow, ltVertHigh;
   vga_comparator vertLowCheck (.lt(ltVertLow), .a(vCount), .b(10'd35));
   vga_comparator vertHighCheck (.lt(ltVertHigh), .a(vCount), .b(10'd515));

   assign vidSel = ~ltHorizLow & ltHorizHigh & ~ltVertLow & ltVertHigh;
endmodule