Hi there
I want to design a logic circuit that countdown from 6 downto 0.
so that is 110->101->100->011->010->001->000->110
This is my circuit (using CEDAR), the led display number 6
but something weird happen, when I give the circuit another pulse, the number countdown to 2!!
When I simulated step by step, I found out a huge problem. Let call the left D-FF is the LSB and the right D-FF is the MSB. When it counts from 6 to 5 (110 downto 101), the signal Q from the left D-FF (LSB) now is 1 and it go to the NAND gates, whose input now is 1-1-1, and it reset the entire loop to 6. (110). Because the signal Q of the middle D-FF went from 0 to 1, the right D-FF is counted from 1 to 0. As the result, the set of Q signals now is 010.
I want to design a logic circuit that countdown from 6 downto 0.
so that is 110->101->100->011->010->001->000->110
This is my circuit (using CEDAR), the led display number 6
but something weird happen, when I give the circuit another pulse, the number countdown to 2!!

When I simulated step by step, I found out a huge problem. Let call the left D-FF is the LSB and the right D-FF is the MSB. When it counts from 6 to 5 (110 downto 101), the signal Q from the left D-FF (LSB) now is 1 and it go to the NAND gates, whose input now is 1-1-1, and it reset the entire loop to 6. (110). Because the signal Q of the middle D-FF went from 0 to 1, the right D-FF is counted from 1 to 0. As the result, the set of Q signals now is 010.