On Wednesday, October 17, 2012 12:03:14 PM UTC-5,
carlos...@gmail.com wrote:
> Andy, I do agree with you concerning the incremental numbers, they are quite annoying and I do not typically use them unless it's a single delay pipe. Concerning using a function. Do you mean that you would do the whole calculation (with resizes etc...) in a combinatorial fashion (or in single equation) and then add some amount of pipelining stages to improve the performance. Or would you manually separate the calculations into several stages rather than rely on the tools to do the work? I will also have a look at Xilinx Vivado HLS, thanks! C.
Sorry it took me a whle to get back to you...
I would try the single expression followed (or preceded) by pipeline stages, and enable retiming/pipelining optimizations in synthesis first. If that gets you where you need to be (speed, area, etc.) then you're done. Only if that does not work satisfactorily with your tool would I break it up manually into individual pipeline stages. The former is much more readable, writable and maintainable than the latter.
Note that, if you need to use resizing() to manage the size/precision of intermediate results, you can break it up into several statements using variables, then shift the final variable result into the pipeline. Just remember to write before read on a variable to retain the combinatorial behavior before it gets shifted into the pipeline, all in the same clocked process.
Note also that breaking the expression up is not absolutely necessary if you want to use resize() on intermediate results; you can embed resize() in the expression.
Andy