Hacker News new | comments | ask | show | jobs | submit login
Show HN: Parameterized PWM controller in VHDL (fpgaer.wordpress.com)
22 points by chclau 9 months ago | hide | past | web | favorite | 2 comments

The constants should at least be generics. As is, you can't instantiate two with different behavior. Some would also be better just as input signals to permit runtime configurability. Any that don't need to change can be tied to constant values for the same result as the current circuit.

Thanks for your comment. You may have noticed that duty_cycle is indeed an input. Some of the other constants could be indeed input as generics. In general I prefer to use packages, since it makes instantiation simpler, and parameterization can be done by using different packages for each block. Of course generics have advantages of their own.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact