paris wrote:
> actually i'd like to know what's the use of variables in synthesis, is it
> right to use them? and how?. I mean, i dont think i've ever used variables
> in VHDL (not even in non synthesisable code). Just wondering, why would i'd
> need them for?, my designs would be better with variables?, am i missing
> something good by not using them?.
Yes.
You're missing the opportunity to write much better code (without giving
up quality of synthesis results.)
Apart from the obvious "combinatorial" usage of using a variable for an
intermediate result, synthesis tools can also infer flip-flops from
variables when necessary. It's now almost 15 years since this feature
was introduced in Synopsys DC (1.3a or so?).
Real insight comes when you realize you can combine combinatorial
and sequential usage with the same variable.
Do some googling - it has all been discussed before and is available
for those who want to learn.
Regards, Jan
--
Jan Decaluwe - Resources bvba -
http://jandecaluwe.com
Losbergenlaan 16, B-3010 Leuven, Belgium
Python is fun, and now you can design hardware with it:
http://jandecaluwe.com/Tools/MyHDL/Overview.html