Electronics > FPGA

Easy way to see number of registers along datapath in Vivado?

(1/2) > >>

SMB784:
My computation pipeline has two input branches that feed into a multiplier, and currently the branches don't have the same number of registers in them.  To make a well-formed pipeline, I would like the two input branches to have the same number of registers.  However, counting these registers is tedious because the input branches are long.  Can I have vivado show me how many registers are in each branch and preferably what those registers are?

dmendesf:
Can you feed 1,2,3,4 sincronized in both inputs and look if 1 arrives with 8 at the multiplier, for example?

SMB784:

--- Quote from: dmendesf on June 17, 2021, 10:06:31 pm ---Can you feed 1,2,3,4 sincronized in both inputs and look if 1 arrives with 8 at the multiplier, for example?

--- End quote ---

I suppose I could try stimulating it as you suggest, however that sounds like it might be prone to errors.

Perhaps there is a way to get the timing analysis to tell me this?

hamster_nz:

--- Quote from: SMB784 on June 19, 2021, 02:25:53 am ---
--- Quote from: dmendesf on June 17, 2021, 10:06:31 pm ---Can you feed 1,2,3,4 sincronized in both inputs and look if 1 arrives with 8 at the multiplier, for example?

--- End quote ---

I suppose I could try stimulating it as you suggest, however that sounds like it might be prone to errors.

Perhaps there is a way to get the timing analysis to tell me this?

--- End quote ---
No, not really. Timing analysis is focused on the clock cycle, not over a number of clock cycles.

IMO you should structure your code so you can't end up with mismatched latency in your pipelines. It is quite easy to do if you can get away from "I must do this in what feels like the most 'source code' efficient way" rather than a "I must do this in a way that minimises errors and adds flexibility even if it does make the code look verbose".

A bit of 'scaffolding' will make this much easier. Don't plug the output of one computation onto the inputs of the next, but set up a framework and plug the calculation components onto that, then let the tools prune away unused resources. The end result will be equally efficient, or maybe even better as the optimiser may more freedom to shuffle registers around.

In both cases debugging involves simulating and sending a impulse down the pipeline, and checking the results come out in the correct alignment...

rstofer:

--- Quote from: SMB784 on June 17, 2021, 02:36:43 pm ---My computation pipeline has two input branches that feed into a multiplier, and currently the branches don't have the same number of registers in them.  To make a well-formed pipeline, I would like the two input branches to have the same number of registers.  However, counting these registers is tedious because the input branches are long.  Can I have vivado show me how many registers are in each branch and preferably what those registers are?

--- End quote ---

You can always look at the RTL schematic but it might not be easy to spot the pipeline.

I would lay out the pipeline registers first such that all of them are clocked simultaneously.  The output of one stage would then go through some logic (combinatorial) and serve as the input to the next stage.  I would be very deliberate about the pipeline registers.  I might even create a component composed of some variable number of flops where a generic variable specified the width.  I would probably instantiate these registers with names such as 'Stage_1_FirstPath', 'Stage_1_SecondPath'...,'Stage_n_FirstPath','Stage_n_SecondPath' and so on.  Hopefully, I could come up with something better than these...

I would be very pedantic about the stage registers and not leave anything up to the synthesizer.

It would be quite easy to spot the critical path logic between stages.  Depending on the required speed, there may be a need for more stages and smaller logic steps.

Navigation

[0] Message Index

[#] Next page

There was an error while thanking
Thanking...
Go to full version