How to parameterize a clock divider?
You can write this more generally as counter &amp; DIVIDER == DIVIDER. This will check that all the 1 bits in the divider are in the counter, but it won't check the 0 bits, which are not necessary to check. The synthesis tool will certainly optimize out the anything &amp; 0 == 0 part.