Forum Discussion
Altera_Forum
Honored Contributor
9 years agoHi,
a few thoughts on this:- the "always" block is not sensitive to the reset; should be no reset in the real design, though, just something which would behave strange in the simulation
- does that PLL actually support a 256 kHz output clock? Sounds mighty low for a FPGA PLL. Was there any warning in the MegaWizard/IP Catalog?
- the reset signal seems to be active-low (I assume so because the name is "rst_n"), but your reset condition is "if (rst=1)"; typo?
- I assume "pwm_up" and "pwm_down" are push-buttons; are they debounced?
- are the "pwm_up" and "pwm_down" input signals maybe floating? If you accidentally mapped them to floating pins, they would wildly change the PWM duty cycle, which might cause the described behavior; actually, same for all input signals