Hi,
thank you for your comments.
I think it can indeed be an advantage to use procedures declared in
the process calling them so that the variables are permanently
visible.
When declaring the procedures in a separate package the only way to
make the variables visible
is to set a breakpoint on the code line where the procedure is called
and then to step through
the code.
Rgds
Andre
This may be heresy, but another option is to make the procedures small
enough that you can debug them by eye. If you need a large procedure,
keep breaking it down into smaller procedures and functions until they
are small. I try to keep mine under 10 lines total if practical.
That is the Forth philosophy and it can work if you actually follow
it.
The trouble is that simulators are a PITA to use. They are slow,
require a lot of setup to generate the correct stimulus and can be
difficult to interpret when you are looking for the source of a bug.
It can be much better to code in ways that reduce the likelihood of
creating bugs. The last few passes on my recent design I chose to go
straight to the chip where I could use a scope on the real circuit
rather than try to drill down through the simulator. It worked pretty
well for the slow logic that takes a long time to run in the
simulator.
Rick