KJ <> writes:
> On Aug 20, 6:00*am, Jonathan Bromley <jonathan.brom...@MYCOMPANY.com>
> wrote:
>> On Tue, 19 Aug 2008 14:29:55 -0700 (PDT), rickman wrote:
>> >One of the issues I have with variables is
>> >that they are hard to debug since they can only be viewed when in
>> >context, so I prefer a signal that is always viewable. *It was a long
>> >ago that I worked with signals and maybe the tools I used were not
>> >very good. *Has that changed?
>>
>> There's no difficulty viewing variables (at least, the static
>> variables that you declare in processes) in any tools I use.
>
> You can't view variables in a wave or list windows after the fact
> using Modelsim.
>
In defence of variables, you can view them when you've added them to
the wave before you start. When I start debugging an entity, I
usually just add all its various variables to a wave window at the
start.
> When something fails in any simulation, the reason for the failure
> many time is in the past, although sometimes the reason is in the
> present. The wave and list windows are the available tools for
> investigating what happened prior to the failure in order to discern
> what was the root cause. When you use variables extensively you lose
> at least some of the ability to use those tools to debug. Given that
> handicap you must turn to other methods such as re-running the
> simulation to either step through code, or add the variables that
> you'd like to see to the wave/list windows at sim start (hoping you've
> guessed correctly at all of the ones you need). At best you're only
> slightly less productive because of this handicap.
For the vast majority of my simulations, re-running the sim takes a
matter of seconds if I forget to add the signals to the wave window.
Problems that a "whole-FPGA" problems usually come down to signals anyway.
>
> Modelsim's log -r /* command is a very powerful debug aid...it get
> signals, it doesn't pick up variables.
>
It would be nice if it did

Maybe some TCL could help here... hmm...
<snip>
> Within an entity, I tend to have multiple clocked processes and
> concurrent statements. The physical grouping of what signals go in
> this clocked process versus that clocked process has to do with how
> closely related the logic is that is required to implement that
> signal. Things that are unrelated go in separate processes. I'll
> also tend to try to limit the physical size of a process so that it
> fits on a screen. The end result is a file where you don't have to
> scroll back and forth and all around in order to see what is going
> on. During the design process where you're still working on what the
> actual logic is, things can freely move (by cut/paste) from one
> process to another as the realization sets in that the logic for
> signal 'abc' is very similar after all to that which I have for
> 'xyz'. This type of situation is also where the limited use of
> variables is a good thing since I can freely move and modify the code
> from one process to the other to textually group together the related
> stuff because, when the code being moved only uses signals, that cut/
> paste can always be safely done without mucking up something else in
> the process that it was cut from.
Except when you forget to move the reset clause for a signal - then
you have two processes driving it. But that's what std_ulogic is for
<snip>
>>
>> >I would almost prefer a language that did not offer so much freedom.
>> >I can't help but think this offers limited value to the coders and
>> >makes life a lot harder for the tool writers.
>>
>> Again, perhaps we should agree to differ.
>>
>
> I agree with you (Jonathon). The more skilled you get with VHDL, the
> more you appreciate all the things that they thought to include (but
> you still gripe about the odd constraints).
>
> Abel is a simple language to learn and use but I wouldn't use it today
> because VHDL provides much more power for creating not only a design
> but a self checking testbench of the design within a single language
> environment. That design and testbench can also be as fully
> parameterized as I would like it so that they can be reused for some
> other project down the road.
That get's my agreement too!
Cheers,
Martin
--
TRW Conekt - Consultancy in Engineering, Knowledge and Technology
http://www.conekt.net/electronics.html