data/full_repos/permissive/159096530/HPS_CONTROL_FPGA_LED/quad_counter.v
 line:51: before: "("
1: b'%Warning-STMTDLY: data/full_repos/permissive/159096530/HPS_CONTROL_FPGA_LED/quad_counter.v:39: Unsupported: Ignoring delay on this delayed statement.\n always #1 clk = ~clk;\n        ^\n                  ... Use "/* verilator lint_off STMTDLY */" and lint_on around source to disable this message.\n%Warning-STMTDLY: data/full_repos/permissive/159096530/HPS_CONTROL_FPGA_LED/quad_counter.v:46: Unsupported: Ignoring delay on this delayed statement.\n  #(stimDelay)\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/159096530/HPS_CONTROL_FPGA_LED/quad_counter.v:48: Unsupported: Ignoring delay on this delayed statement.\n  #(stimDelay);\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/159096530/HPS_CONTROL_FPGA_LED/quad_counter.v:53: Unsupported: Ignoring delay on this delayed statement.\n   #(stimDelay) quadB = 1;\n   ^\n%Warning-STMTDLY: data/full_repos/permissive/159096530/HPS_CONTROL_FPGA_LED/quad_counter.v:54: Unsupported: Ignoring delay on this delayed statement.\n   #(stimDelay) quadA = 1;\n   ^\n%Warning-STMTDLY: data/full_repos/permissive/159096530/HPS_CONTROL_FPGA_LED/quad_counter.v:55: Unsupported: Ignoring delay on this delayed statement.\n   #(stimDelay) quadB = 0;\n   ^\n%Warning-STMTDLY: data/full_repos/permissive/159096530/HPS_CONTROL_FPGA_LED/quad_counter.v:56: Unsupported: Ignoring delay on this delayed statement.\n   #(stimDelay) quadA = 0;\n   ^\n%Warning-STMTDLY: data/full_repos/permissive/159096530/HPS_CONTROL_FPGA_LED/quad_counter.v:59: Unsupported: Ignoring delay on this delayed statement.\n  #(stimDelay)\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/159096530/HPS_CONTROL_FPGA_LED/quad_counter.v:61: Unsupported: Ignoring delay on this delayed statement.\n  #(stimDelay);\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/159096530/HPS_CONTROL_FPGA_LED/quad_counter.v:64: Unsupported: Ignoring delay on this delayed statement.\n  #(stimDelay) quadB = 0;\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/159096530/HPS_CONTROL_FPGA_LED/quad_counter.v:65: Unsupported: Ignoring delay on this delayed statement.\n  #(stimDelay) quadA = 0;\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/159096530/HPS_CONTROL_FPGA_LED/quad_counter.v:66: Unsupported: Ignoring delay on this delayed statement.\n  #(stimDelay) quadB = 1;\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/159096530/HPS_CONTROL_FPGA_LED/quad_counter.v:67: Unsupported: Ignoring delay on this delayed statement.\n  #(stimDelay) quadA = 1;\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/159096530/HPS_CONTROL_FPGA_LED/quad_counter.v:68: Unsupported: Ignoring delay on this delayed statement.\n  #(stimDelay) quadB = 0;\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/159096530/HPS_CONTROL_FPGA_LED/quad_counter.v:69: Unsupported: Ignoring delay on this delayed statement.\n  #(stimDelay) quadA = 0; \n  ^\n%Warning-STMTDLY: data/full_repos/permissive/159096530/HPS_CONTROL_FPGA_LED/quad_counter.v:71: Unsupported: Ignoring delay on this delayed statement.\n  #(stimDelay) quadA = 1;\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/159096530/HPS_CONTROL_FPGA_LED/quad_counter.v:72: Unsupported: Ignoring delay on this delayed statement.\n  #(stimDelay) quadB = 1;\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/159096530/HPS_CONTROL_FPGA_LED/quad_counter.v:73: Unsupported: Ignoring delay on this delayed statement.\n  #(stimDelay) quadA = 0;\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/159096530/HPS_CONTROL_FPGA_LED/quad_counter.v:74: Unsupported: Ignoring delay on this delayed statement.\n  #(stimDelay) quadB = 0;\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/159096530/HPS_CONTROL_FPGA_LED/quad_counter.v:75: Unsupported: Ignoring delay on this delayed statement.\n  #(stimDelay) quadA = 1;\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/159096530/HPS_CONTROL_FPGA_LED/quad_counter.v:76: Unsupported: Ignoring delay on this delayed statement.\n  #(stimDelay) quadB = 1;\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/159096530/HPS_CONTROL_FPGA_LED/quad_counter.v:79: Unsupported: Ignoring delay on this delayed statement.\n  #100;  \n  ^\n%Error: Exiting due to 22 warning(s)\n        ... See the manual and https://verilator.org for more assistance.\n'
module quad_counter(clk, quadA, quadB, count, reset);
	input clk, quadA, quadB, reset;
	output [31:0] count;

	reg [2:0] quadA_delayed, quadB_delayed;
	always @(posedge clk) quadA_delayed <= {quadA_delayed[1:0], quadA};
	always @(posedge clk) quadB_delayed <= {quadB_delayed[1:0], quadB};

	wire count_enable = quadA_delayed[1] ^ quadA_delayed[2] ^ quadB_delayed[1] ^ quadB_delayed[2];
	wire count_direction = quadA_delayed[1] ^ quadB_delayed[2];

	reg [31:0] count;
	
	
	always @(posedge clk)
	begin
	  if(reset)
	  begin
			count<=0;
	  end
	  else if(count_enable)
	  begin
		 if(count_direction) count<=count+1; else count<=count-1;
	  end
	end

endmodule
module quad_counter(clk, quadA, quadB, count, reset);

	input clk, quadA, quadB, reset;
	output [31:0] count;

	reg [2:0] quadA_delayed, quadB_delayed;
	always @(posedge clk) quadA_delayed <= {quadA_delayed[1:0], quadA};
	always @(posedge clk) quadB_delayed <= {quadB_delayed[1:0], quadB};

	wire count_enable = quadA_delayed[1] ^ quadA_delayed[2] ^ quadB_delayed[1] ^ quadB_delayed[2];
	wire count_direction = quadA_delayed[1] ^ quadB_delayed[2];

	reg [31:0] count;
	
	
	always @(posedge clk)
	begin
	  if(reset)
	  begin
			count<=0;
	  end
	  else if(count_enable)
	  begin
		 if(count_direction) count<=count+1; else count<=count-1;
	  end
	end

endmodule