Forum Discussion
Altera_Forum
Honored Contributor
7 years agoYou code does not describe a register, hence why there are no registers in the RTL views, just inferred latches. You have it as if using both reset and clock as clocks. You need to change the code to:
module test_grammar (count, clk, reset);
output count;
input clk, reset;
reg count;
initial
begin
count=0;
end
always @ (negedge clk or posedge reset) begin
if reset begin
count <= 0;
end
else begin
count<=count+1;
end
end
endmodule