Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
20704 Discussions

LPM_MULT pipelining: changing input data while calculating

Altera_Forum
Honored Contributor II
993 Views

I am using the LPM_MULT megafunction to implement a 29 bit wide multiplier and setting the LPM_PIPELINE parameter to 2 for achieving the required speed to operate it at 100MHz. My understanding is that this pipeline setting means that the multiplication result is not ready in the next clock cycle but 2 clock cycles after the next, so in 3 clock cycles. 

 

From the documentation it does not appear to be clear whether or not it is valid to change the inputs (dataa and/or datab) when waiting for a result after initially setting them up. I have experimented with changing the inputs on every clock cycle, meaning that up to 3 calculations can be set up and travelling "through the pipe" before the results appear on the output, which do appear to be correct. Also other comments throughout the forum appear to indicate that this is a valid thing to do but I need to be sure. I'm concerned that the reason for needing the pipelining is because there are paths through the multiplier that take different lengths of time, some perhaps longer than a clock cycle and some not and that by changing the inputs before the final result is presented on the output will corrupt the calculation under unforeseen conditions such as under higher temperatures, etc. 

 

So, if a LPM_MULT (or any) megafunction requires pipelining to operate at a given clock speed, is it legitimate practice to feed different input data into the megafunction on every clock cycle?
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
305 Views

that is ok. we all do that pipe stuff. It means every output will have latency but stream can be continuous at clock rate. There is no waiting in such cases. 

This is different from the case where a module dictates slower rate.
0 Kudos
Altera_Forum
Honored Contributor II
305 Views

Thank you for your quick reply. This is good to know.

0 Kudos
Reply