Re: initial_step and final_step in DC sweep

From: Geoffrey.Coram <Geoffrey.Coram_at_.....>
Date: Fri Aug 25 2006 - 05:45:06 PDT
Marq Kole wrote:
> In the Verilog-AMS LRM 2.2 in section 6.7.4 (as well as in the
> LRM 2.3 draft, section 6.7.2) in table 6.1 it says that the
> initial_step is only active in the first point of a DC sweep,
> and the final_step is only active in the last point of it. 
> 
> The consequence would be that this behavior makes it impossible
> for a model to react on parameter changes during a DC
> sweep if this reaction is coded in the initial_step. 
... 
> The general application of the initial_step event as I have seen
> in nearly all models is as an initialization block. If such a block
> is used, for instance, to calculate effective device length and the
> external length of the device is swept in a DC analysis, section
> 6.7.4 of the LRM 2.2 says that the user should not see any change
> in the effective device device length after the first point in the
> DC sweep.

This is why initial_step is the wrong way to do this sort of
initialization.  I have long argued (see my BMAS presentations)
that initial_step should not be used.  The compiler must take
care of these optimizations.  In particular, you don't want
the intialization to be performed for every iteration of the
first point of a DC sweep, even though intial_step is true
for each of these iterations.  We had this discussion during
a conference call.

Also: what should initial_step do for periodic-steady-state,
when doing fixed-point iterations (where the simulator starts
at time=0, runs for a period, adjusts the initial conditions,
and returns to time=0)?  I believe initial_step() is true
each time that time=0, but you don't want the initialization
block to be re-run.

ADMS allows you to specify instance and model initialization.
I think it used to have an event @(initial_model) that was
non-standard, but I believe it changed to a "special" block name:
  begin : intializeModel
  end
Other compilers are free to use this special name themselves,
either as the "truth" or as a hint (what if the model writer
made a mistake?).  I believe some commercial compilers are
already smart enough to determine what variables do not
depend on voltages.

The PSP model uses this special block name.  I have tried to
get the word out to other model writers, eg Hicum and Mextram
(Mextram does use initial_step, but only does an assignment,
no operations, because localparam is not widely available).

-Geoffrey
Received on Fri Aug 25 05:45:09 2006

This archive was generated by hypermail 2.1.8 : Fri Aug 25 2006 - 05:45:11 PDT