Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Tracking variables in a process, in modelsim?

300 views
Skip to first unread message

Kim Noer

unread,
May 22, 2003, 5:28:29 PM5/22/03
to
Hi there..

For now I've converted some of the important variables into signals, which I
can track in modelsim. For some reasons I can't track the variables, even
though Modelsim do have a 'view->variables'. Is that because it's inside a
process, and thus 'invisible' to modelsim? If so, why this 'limitation'?

--
I doubt, therefore I might be.


Keith R. Williams

unread,
May 22, 2003, 9:40:11 PM5/22/03
to
In article <bajfdv$fn04$1...@ID-151686.news.dfncis.de>, k...@nospam.dk
says...

> Hi there..
>
> For now I've converted some of the important variables into signals, which I
> can track in modelsim. For some reasons I can't track the variables, even
> though Modelsim do have a 'view->variables'. Is that because it's inside a
> process, and thus 'invisible' to modelsim? If so, why this 'limitation'?

Variables can be viewed in ModelSim too. You just have to get
down through the hierarchy in the variable window.

--
Keith

Allan Herriman

unread,
May 22, 2003, 11:16:26 PM5/22/03
to

It helps if you have the process window open. Click in the structure
window to get to the right architecture, then click in the process
window to select the right process and the variables window will
display the variables in that process. You can then drag them into
the waveform viewer.

Allan.

Kai Harrekilde-Petersen

unread,
May 23, 2003, 2:07:07 AM5/23/03
to
Allan Herriman <allan_herrim...@agilent.com> writes:

or in the tcl window for scripting:

add wave <path-to-rtl-code>/<named-process>/<variable>

(* work fine, IIRC)


Regards,


Kai

Paul

unread,
May 23, 2003, 4:09:44 AM5/23/03
to
"Kim Noer" <k...@nospam.dk> wrote in message news:<bajfdv$fn04$1...@ID-151686.news.dfncis.de>...

> Hi there..
>
> For now I've converted some of the important variables into signals, which I
> can track in modelsim. For some reasons I can't track the variables, even
> though Modelsim do have a 'view->variables'. Is that because it's inside a
> process, and thus 'invisible' to modelsim? If so, why this 'limitation'?

You have to click on the component that you interested in. Open the
process and variable windows. Select the process that contains the
variables via the process window.

Paul

Kim Noer

unread,
May 24, 2003, 7:47:04 AM5/24/03
to
"Paul" <paul...@sli-institute.ac.uk> wrote in message
news:9aeb7852.03052...@posting.google.com

> You have to click on the component that you interested in. Open the
> process and variable windows. Select the process that contains the
> variables via the process window.

Done that been there. It doesn't matter what component I click on (with
variables of course) - nothing in the variables view. Strangest thing.

An unrelated question, is there, hardware wise, a difference between a
variable and a signal? Ie. does it take up less space etc. or is the purpose
of a variable only that it exists in a process, and not outside?

Tim Hubberstey

unread,
May 25, 2003, 1:50:25 PM5/25/03
to
Kim Noer wrote:
>
> An unrelated question, is there, hardware wise, a difference between a
> variable and a signal? Ie. does it take up less space etc. or is the purpose
> of a variable only that it exists in a process, and not outside?

No. If the code is written to infer a flip-flop, you'll get a flip-flop
regardless of whether it is a variable or signal.

I try to use variables wherever possible for signals used only within a
process because it makes the code clearer (you _know_ the signal isn't
used anywhere else) and because variables simulate faster. Naming
conventions can deal with the first issue but I still prefer variables
because of the simulation speed.

I also use variables to create intermediate combinational signals within
a process. Sometimes these are necessary, such as when you want to use a
concatenation of signals in a case statement and sometimes it is for
clarity to avoid repeating a long or complex expression.
--
Tim Hubberstey, P.Eng. . . . . . Hardware/Software Consulting Engineer
Marmot Engineering . . . . . . . VHDL, ASICs, FPGAs, embedded systems
Vancouver, BC, Canada . . . . . . . . . . . http://www.marmot-eng.com

Kim Noer

unread,
May 25, 2003, 5:01:48 PM5/25/03
to
"Keith R. Williams" <k...@attglobal.net> wrote in message
news:MPG.193746026...@enews.newsguy.com

> Variables can be viewed in ModelSim too. You just have to get
> down through the hierarchy in the variable window.

But the autogenerated testbench does not contain anything related to the
variables, and even though I manage to click the correct structure in
ModelSim, nothing shows up in the 'Variables' window.

It's very annoying to say atleast.

Kim Noer

unread,
May 26, 2003, 4:39:55 AM5/26/03
to
"Tim Hubberstey" <sen...@no.spam> wrote in message
news:3ED102E4...@no.spam

> I try to use variables wherever possible for signals used only within
> a process because it makes the code clearer (you _know_ the signal
> isn't
> used anywhere else) and because variables simulate faster. Naming
> conventions can deal with the first issue but I still prefer variables
> because of the simulation speed.

Sounds great (that about the simulation speed). Anyway- I've managed to
locate the variables, you first have to click on the relevant structure,
then click on the process in the process window then finally selecting the
variable.

0 new messages