Altera_Forum
Honored Contributor
9 years ago10170 Verilog Error
module tcounter (CLK, CLR, ENP, ENT, Q);
input CLK; input CLR; input ENP; input ENT; output [3:0] Q; wire [3:0] inc; treg4bit register( .CLK(CLK), .IN(inc), .RESET(~CLR), .OUT(Q) ); if (ENP & ENT) begin if (Q[2] & Q[1] & Q[0]) begin inc <= 4'b1111; end else if (Q[1] & Q[0]) begin inc <= 4'b0111; end else if (Q[0]) begin inc <= 4'b0011; end else begin inc <= 4'b0001; end end endmodule Errors: Line 15 (10170): near text if, expecting endmodule Line 19 (10170): near text "&", expecting "." or another identifier Line 22 (10170): near text ")", expecting "." or another identifier Any help would be much appreciated http://www.alteraforum.com/forum//images/icons/icon11.png