Forum Discussion
Altera_Forum
Honored Contributor
8 years agolpm functions and hdl
Hi all, So I'm trying to create a (synchronous) 8-bit loadable counter, as below but for some reason this synthesizes to around 28 LE's compared to the altera LPM 11 LE version. Any idea why? ...
Altera_Forum
Honored Contributor
8 years agoThanks guys!
WRT Tricky's comment, I generally try to stay away from lpm functions as they don't port over to different architectures. Also, I don't see anything 'clever' in my code. The reason I use q_next is that it allows me to calculate the negative / zero flags for an operation before the operation is clocked, thereby saving myself the hassle of trying to figure out which instruction modified the flags. There's no magic here, really. That said, I wholeheartedly agree! I've seen some eye-watering code where I spent hours manually decoding bits to figure out what something did. -Mux