true. But the separation might be at the gate level or higher and this
is where Ian style makes a difference
What difference do you think it makes? The 'style' it is written in will make
no difference. Synthesis will take the description and turn it into logic that
is implemented in 'gates' (or connections to LUT) as well as flip flops (or
memory). The tools really do not need any help from the user in figuring out
which is which.
If you think about 'structured programming' as in a paradigm where every
computable function can be expressed as a combination of only three
control structures, then Ian proposal pretty much follows the same line.
Whether is overplayed or not I do not know.
That does not imply that the 'best' way to describe the code is in that form.
The soft metrics for 'best' here should be maintainability. On the assumption
that one can write code that meets the function and performance requirements
in many different ways, then one looks towards source code maintainability
which would be the ability for somebody (not necessarily the original designer)
to get up to speed on the design. Clumping all of the unrelated code physically
together because it describes the transfer function is rather pointless. Clumping
parts of code together that are inter-related makes sense.
Could you be more specific on what kind of 'non-issues' and 'actual
issues' you are referring to? Since I consider the talk rather to the
point I may have missed/misunderstood an essential part of it.
I'll just nitpick on a few points in no particular priority, just the order
that they are in the presentation.
- Other than the last bullet about auto-generated code, nothing on the slide
titled 'Traditional VHDL design methodology' is worth the time it took to
type. It's all wrong. Maybe some people have done he says here but that
doesn't make it 'Traditional'. The statement 'Hard to read = difficult to maintain'
was written and made to seem important by coloring it in red by Capt. Obvious.
- The next slide 'Traditional ad-hoc design style' is similarly biased and worthless.
Taking the statement 'No unified signal naming convention' as one example. The upcoming
'unified' naming convention will not add anything useful (more later). The
statement 'Coding is done at low RTL level' is laughable. Again some may code this
way, but let's not make elevate those people to be considered the traditionalists.
- Slide 'Unified signal naming example'. Only the convention for 'types' has any value
and that is because use of the type name can frequently be used throughout the code and
it can be of value sometimes to easily differentiate that xyz is a data type. Specific
objections to the others are:
* _in -- Yeah, I hadn't noticed that I only use the signal on the right hand side so
it must be an input. If you use a compiler that doesn't complain about assigning to
an input than maybe you need _in...or maybe you need to use a real tool.
* _out -- Ditto
* _s and _v -- Every signal and variable will have a logic meaning conveyed by the name
of the signal/variable. When that logic meaning is conveyed I'll use the appropriate
assignment operator and if I forget the compiler will cough. When I go to *use* that
thing which is the more important thing then I really don't care that it is a signal
or variable.
* _pkg -- It would be better to use it as a prefix so that all the packages will list
together if I needed to get at some signal in a package...but that's about it
* p_ and i_ -- Why? These can never be referenced elsewhere...the authors clearly thought
that they wouldn't have a complete unified example unless they had a scheme for naming
everything, whether it has utility or not. Doing extra for no benefit is not a benefit.
-- Conclusion on the naming convention...very little actual value since it doesn't help
prevent design errors, it doesn't help debug problems it just causes more typing for
no tangible benefit. If you doubt this, then state the tangible benefit in terms of
productivity or maintainability since that is the only metric that could possibly be
affected by this convention. Note: Stating 'I want to know that an object is a signal
or a variable simply by looking at the name' doesn't cut it. Reason: Without stating
the reason why knowing the object type helps your productivity means you're wondering
pointlessly.
- Slide 'The abstracted view in VHDL : the two-process scheme' and successors describing the
method does not justify how productivity would increase with any of the schemes. Examples:
* The collection of signals and/or ports into records groups together things that are logically
completely unrelated other than by the fact that they are pieces of an entity/architecture.
As an example, consider an entity that receives input data, processes it, and then outputs
the data. Further the input data interface has some implementation protocol, the output
has a different protocol, both protocols imposed by external forces (i.e. you can't change
them, maybe they are external device I/O). The natural collection from my perspective is
input interface signals, output interface signals and processing algorithm signals. The
input and output interfaces likely have nothing at all to do with each other...so why should
they be collected into a record together as if they are? Think about it. The input
interface likely has some state machine, the output interface has another, the processing
algorithm possibly a third. Do you think those three state machines should be all lumped
together? No? Then what benefit is it to lump them into a record together? (Hint: None)
But maybe you think there is no cost to doing so...think again. Try to follow the logic for
a particular signal (because when you're debugging real designs that's what you do) and
see how utterly useless you've made the Modelsim Dataflow window by collecting every possible
thing into one process fed by one signal. Guess what? Almost every signal is a function of
only a small handful of actual signals. By lumping this small handful in with a boatload of
unrelated signals by putting them into some bigger record will not help you be more productive.
- Slide 'Benefits'...every single supposed benefit except for 'Sequential coding is well known and
understood' is wrong. How is the 'algorithm' easily extractable as stated? Take the example
I mentioned earlier. There are at least three 'algorithms' going on: input protocol, output
protocol and processing algorithm...and yet the proposed method will lump these together into
one supposed 'algorithm'. What is stated by the author as an 'algorithm' is not really an
algorithm, all it is is the combinatorial logic...
- The other supposed benefits are merely unsubstantiated beliefs...I'll leave it to you to show
in concrete terms how any of them are either generally true. Be specific.
- Adding a port: While I do agree that the method does make it easier to add and subtract I/O,
I'll counter with if you'd put more thought into using a consistent interface protocol in
the first place (example: Avalon or Wishbone) you wouldn't find yourself adding and subtracting
ports in the first place because you'd get it right (or very nearly right) the first time. So
this becomes a benefit of small value over a superior method that mostly avoids the issue.
- Adding a register: There simply is no benefit here. Use a single clocked process and the few
concurrent statements where needed.
- Slide 'Tracing signals during debugging' is ridiculous. This method makes it much harder to
display the signals that are actually relevant to whatever debug you're trying to perform.
Remember that most signals are NOT a function of every other signal that is in these records
so by tracing the record you still have to hunt around and find the elements that you are
actually interested in seeing...no help there, I can see those signals just as easily from the
signal list window. No benefit, medium cost...no thanks.
- Slide 'Stepping through code during debugging'. This is generally the last thing one needs to
do unless you make heavy use of variables in which case you're stuck and forced to single step.
If you use signals you can usually trace through the code without any single stepping and fix
the problem. Remember: when a sim stops due to an assertion, the faulty behavior has already
occurred, no amount of single stepping helps you here because the 'bad' thing (whatever that
may be) has already happened. No benefit here.
- Slide 'Comparison MEC/LEON'...has the skill of the designers involved been controlled for? If not
then this is just a comparison of two different designs, so what? Maybe the LEON people were
simply better designers than the MEC shleps. Not enough information here to determine anything
but you're certainly entitled to infer whatever result you think you see here.
- Slide 'Increasing the abstraction level' is a misnomer. The method described does not increase
abstraction, it simply collects unrelated signals into a tidy (but more difficult to use) bucket.
The supposed 'benefits' and 'problems' are completely unsubstantiated and are simply opinions
presented as 'facts'.
- Slide 'Conclusions'...all opinion presented as unsubstantiated fact.
I may have misunderstood completely the talk but I do not read the
'increasing the abstraction level' slide as a critique to Mike's style
w.r.t. their style.
It sounds better to say 'higher abstration level' than 'collecting unrelated signals'
doesn't it?
On the contrary it seems to me they're trying to give example of higher
level of abstraction (including Mike's one process example) and warn
about what they believe are weak points of these models. Considering the
experience with the LEON vs the ERC32, both quite full fledged projects,
it seems their warnings are not that unfounded (even though this is only
my speculation).
I don't know what they were trying to show with Mike's example.
Which one specifically?
The first bullet qualifies the two-process approach as uniform and I
believe rightly since all entities look the same and a designer only
needs to look at the combinatorial process to understand the algorithm.
Only if you're implementing embarassingly simple entities I suppose. For anything
real, you're making things worse (refer to my simple example stated earlier of a
generic processing module).
Looking at their LEON vs ERC32 example, it seems the method claims less
resources than an ad-hoc one, therefore improving development time.
The most likely reason is more skilled designers rather than style...prove me wrong.
I personally believe the reading is improved by the fact that you do not
need to trace several concurrent processes at the same time and your
flow of reading the code is more or less sequential.
The reading improvement won't be because of the proposed method.
I certainly believe that a readable code is easier to maintain, but I
may doubt that this approach does increase the re-usability of the code,
at least I consider this last point not more than the author's personal
opinion.
A designer's goal is to implement a specific function and meet a specific level of
performance. A method that makes traceability of the function specification to the
source code easier is 'good'. The seperation of that description into a collection of
all combinatorial logic needed to implement the function and a seperate clocked process
does absolutely nothing to define tracability back to the specification. The specification
will most likely have no mention of combinatorial or storage, that is an implementation
decision. Therefore the proposed seperation does not aid tracability and in fact makes
it harder to follow.
Here I need to urge you to go through the presentation again since I
believe, with all due respect, you missed the point. IMO they are *not*
proposing their two-processes approach vs Mike's one process approach.
They actually use Mike's example to show how increasing the level of
abstraction is a good thing.
Nope. Calling it a 'higher level abstraction' doesn't make it so. You've
simply collected together unrelated signals into various records. Records are
a good thing, collecting unrelated things into a record...not so good thing.
The whole point I got, which still might be wrong, is that their
proposed style is way better than what the call 'traditional ad-hoc
design style' (pag. 5).
Different, not better.
Their beliefs are well supported by the example they show (which still
may have some peculiarities and hide larger flows of their approach) and
it seems to me that Mike's style also supports their conclusions.
And you of course are entitled to your opinion as well and I mean that with
absolutely no disrespect or sarcasm or anything else negative.
Kevin Jennings