I'm trying to build a 12 hour clock in Quartus using multiple LPM counters, with the requirement that it be run synchronously, with all lpm counters being driving by a single clock source.
I put together a BDF with two counters to test out the seconds, with one mod-10 counter handling the 'ones' digit, and another mod-6 counter handling the 'tens' digit. A carry out from the mod-10 drives a clock enable pin on the mod-6 counter. Everything work as expected in simulation.
I tried to duplicate this module to work as the minutes counter, except that I'm getting very strange results with the minutes 'ones' mod-10 counter. Whenever the seconds 'tens' counter hits 5, the minutes 'ones' starts counting on every clock pulse, until the previous counter rolls over to zero again.
Here's a picture of my BDF, along with a waveform simulation:
I'm not sure what's causing the issue, because as I understand it, the cout from the second tens should only be asserted when it rolls over to 0, and only long enough so that the minute ones increments a single time.
Just for curiosities sake, I swapped around two middle counters, to see if the issue was related to how the mod6 cout was driving the mod10, but arrive at the same results, (except the mod ten hits 9, then triggers the mod6 to count on every clk pulse until the mod10 rolls over to 0)
Any help would be appreciated, thanks.