Forum Discussion
JUNIOR
New Contributor
6 years agorandom adder(counter) error in FSM
Hi, I have random adder error in FSM problem the current result of reg [15:0]counter is : 1,2,3,4,5,4,5,6 but the correct result would be 1,2,3,4,5,6,7,8 Does anyone know how to fix this, any rep...
sstrell
Super Contributor
6 years agoI think you have to look at the toggling of GPIO_1[9] since that seems to be what's required to continue the count.
#iwork4intel
- JUNIOR6 years ago
New Contributor
Thanks and I solve it by add one flip-flop to eliminate the glitch, replace GPIO with synchronized register
always@(negedge CLOCK_50)
begin
REG_GPIO_1_9<= GPIO_1[9];
end