From: rickman on
I am running a simulation in Active HDL and using generics to vary
some parameters to the top level test bench. I can't seem to figure
out what to do to get Active-HDL to use the changed generics I set in
the Design Settings dialog box. I've tried restarting the simulation
and recompiling the design and this does not always do the job.
Watching the Console I see that the new generic values are finally
used when an asim command is issued rather than just a restart and a
run.

The only way I have found to reliably pull in the new generic values
is to start a simulation and then use the "End simulation" button to
stop it. Surely there is something I am missing...

Rick
From: Jonathan Bromley on
On Sun, 21 Mar 2010 14:37:22 -0700 (PDT), rickman wrote:

>Watching the Console I see that the new generic values are finally
>used when an asim command is issued rather than just a restart

I can't really understand why you would expect any other
behaviour. Generics (and, similarly, Verilog parameters)
are finalized at elaboration time, so you must of necessity
re-elaborate if you wish to change a generic. As I
understand it, the "asim" command is responsible for
that elaboration step just as "vsim" is in ModelSim.

Restarting a sim generally means simply reloading an
already-elaborated image (a "snapshot" in Cadence IUS
jargon). You can't expect to tweak the generics on
such a snapshot.

ModelSim keeps track of compilations to a sufficient extent
that it knows to re-elaborate if you try to restart after
recompiling something; maybe Active-HDL has some similar
feature. But whatever happens, you need a complete new
elaboration of the model if you want to change a generic.
--
Jonathan Bromley
From: rickman on
On Mar 21, 6:19 pm, Jonathan Bromley <jonathan.brom...(a)MYCOMPANY.com>
wrote:
> On Sun, 21 Mar 2010 14:37:22 -0700 (PDT), rickman wrote:
> >Watching the Console I see that the new generic values are finally
> >used when an asim command is issued rather than just a restart
>
> I can't really understand why you would expect any other
> behaviour.  Generics (and, similarly, Verilog parameters)
> are finalized at elaboration time, so you must of necessity
> re-elaborate if you wish to change a generic.  As I
> understand it, the "asim" command is responsible for
> that elaboration step just as "vsim" is in ModelSim.
>
> Restarting a sim generally means simply reloading an
> already-elaborated image (a "snapshot" in Cadence IUS
> jargon).  You can't expect to tweak the generics on
> such a snapshot.
>
> ModelSim keeps track of compilations to a sufficient extent
> that it knows to re-elaborate if you try to restart after
> recompiling something; maybe Active-HDL has some similar
> feature.  But whatever happens, you need a complete new
> elaboration of the model if you want to change a generic.
> --
> Jonathan Bromley

I'm not asking about the behavior of the asim command. I am asking
how to invoke this through the GUI. The tool must by necessity re-
elaborate after recompiling, right? But that doesn't seem to result
in the asim command being run. However, a restart does seem to re-
elaborate according to the log file...

restart
# ELBREAD: Elaboration process.
# ELBREAD: Elaboration time 0.0 [s].
# KERNEL: Main thread initiated.
# KERNEL: Kernel process initialization phase.
# KERNEL: Time resolution set to 1ps.
# ELAB2: Elaboration final pass...
# ELAB2: Create instances ...
# ELAB2: Create instances complete.
# ELAB2: Elaboration final pass complete - time: 0.1 [s].

It does say "final pass", so maybe this is not the "full"
elaboration. But it does the same thing after compiling the entire
project.

It seems I have to use the small square button (VCR stop) to stop the
simulation to get it to accept a new set of top level generics even if
the source is recompiled... strange...

Rick
From: Charles Gardiner on
Hi,
Using the menu pulldown Design -> Settings, you get at the design settings window.
Here, on the left hand side there is a category sub-window. If you go to General
-> Simulation -> Generic/Parameters you can add your generic settings to the
window on the right hand side.

The design settings window should pop up automatically if there is no top-level
design configured and you select the Simulation -> Initialise Simulation menu
pulldown.

All that said, I prefer to put everything in a *.do file, with the -g switches set
in the call to asim. But then I normally use riviera under Linux and only resort
to activeHDL when a customer needs it.

Charles
>
> restart
> # ELBREAD: Elaboration process.
> # ELBREAD: Elaboration time 0.0 [s].
> # KERNEL: Main thread initiated.
> # KERNEL: Kernel process initialization phase.
> # KERNEL: Time resolution set to 1ps.
> # ELAB2: Elaboration final pass...
> # ELAB2: Create instances ...
> # ELAB2: Create instances complete.
> # ELAB2: Elaboration final pass complete - time: 0.1 [s].
>
> It does say "final pass", so maybe this is not the "full"
> elaboration. But it does the same thing after compiling the entire
> project.
>
> It seems I have to use the small square button (VCR stop) to stop the
> simulation to get it to accept a new set of top level generics even if
> the source is recompiled... strange...
>
> Rick
From: rickman on
Charles,

Thanks for the reply. I understand how to change the generic
parameters. The problem is that they aren't used until I stop the
simulation. Using the restart control or even recompiling doesn't
seem to load the new values unless I actually use the "stop
simulation" control.

I guess I'm used to the GUI understanding things like this and when I
update a generic I expect the tool to do what it takes to have it take
effect.

Rick


On Mar 22, 7:12 am, Charles Gardiner <inva...(a)invalid.invalid> wrote:
> Hi,
> Using the menu pulldown Design -> Settings, you get at the design settings window.
> Here, on the left hand side there is a category sub-window. If you go to General
> -> Simulation -> Generic/Parameters you can add your generic settings to the
> window on the right hand side.
>
> The design settings window should pop up automatically if there is no top-level
> design configured and you select the Simulation -> Initialise Simulation menu
> pulldown.
>
> All that said, I prefer to put everything in a *.do file, with the -g switches set
> in the call to asim. But then I normally use riviera under Linux and only resort
> to activeHDL when a customer needs it.
>
> Charles
>
>
>
> > restart
> > # ELBREAD: Elaboration process.
> > # ELBREAD: Elaboration time 0.0 [s].
> > # KERNEL: Main thread initiated.
> > # KERNEL: Kernel process initialization phase.
> > # KERNEL: Time resolution set to 1ps.
> > # ELAB2: Elaboration final pass...
> > # ELAB2: Create instances ...
> > # ELAB2: Create instances complete.
> > # ELAB2: Elaboration final pass complete - time: 0.1 [s].
>
> > It does say "final pass", so maybe this is not the "full"
> > elaboration.  But it does the same thing after compiling the entire
> > project.
>
> > It seems I have to use the small square button (VCR stop) to stop the
> > simulation to get it to accept a new set of top level generics even if
> > the source is recompiled... strange...
>
> > Rick