Re: Hardware book like "Code Complete"?
- From: Mike Treseler <mike_treseler@xxxxxxxxxxx>
- Date: Sun, 23 Jul 2006 09:51:15 -0700
KJ wrote:
Breaking what can be accomplished in one process into two (or more) logically equivalent processes should be considered for code clarity
I find the idea of describing both the "Q side" state
and the "D side" next state more confusing than clarifying.
which can aid in support and maintenance of the code during it's lifetime as well as for potential design reuse (although realistically re-use of any single process is probably pretty low). Re-use happens more often at the entity/architecture level,
....one reason that I favor single process entities.
but the 'copy/paste/modify' type of re-use probably happens more at the process level when it does happen.
....for this type of reuse, I use procedures.
This provides some modularity and built-in documentation.
Even if the operation is not reused, well-named
procedures in process scope make code easier to read and maintain.
Breaking a process into two just to have a combinatorial process to describe the 'next' state and a separate process to clock that 'next' state into the 'current' state has no particular value when using design support and maintenance cost as a metric of 'value'. Since the different methods produce the final end logic there is no function or performance advantage to either approach. On the other hand, there are definite drawbacks to implementing combinatorial logic in a VHDL process. Two of these are
- Introduction of 'unintended' latches
- Missing signals in the sensitivity list that result in different simulation versus synthesis results
Both of these drawbacks have manual methods that can be used to try to minimize them from happening but the bottom line is that extra effort (a.k.a.. cost or negative value) must be incurred to do this....all of which is avoided by simply not using the VHDL process to implement combinatorial logic (i.e. the 'next' state computation).
So as far as the VHDL language is concerned, there are real costs that will be incurred every time the two process method is used but no real value add....or at least that's my 2 cents.....
Well said. Thanks for the posting.
-- Mike Treseler
.
- Follow-Ups:
- Prev by Date: VHDL source code for KASUMI
- Next by Date: Re: Hardware book like "Code Complete"?
- Previous by thread: Re: Hardware book like "Code Complete"?
- Next by thread: Re: Hardware book like "Code Complete"?
- Index(es):
Relevant Pages
|