RE: @above in analyses other than tran and dc sweep

From: Marq Kole <marq.kole_at_.....>
Date: Wed Nov 25 2009 - 05:58:35 PST
Dear All,

Perhaps as a continuation of this thread: the functionality of @(above) to trigger during a DC sweep seems to be unique, at least according to the LRM 2.3.1 and earlier. I had always considered the following two statements to be equivalent:

@(above(x)) begin
  ...
end

and

@(initial_step or cross(x, +1))
  if (x > 0) begin
    ...
  end

However, according to the table 5.1 on p.112 of the LRM 2.3.1 the initial_step will not trigger if during the DC sweep after the first step the expression x crosses 0 in the positive direction. So even if the condition inside the @(initial_step) becomes true during the sweep no initialization will be performed that depends on this behavior. This seems counter-intuitive to me.

There is a workaround for this problem by using:

@(initial_step or cross(x, +1))
  if (x > 0) begin
    ...
  end
if (analysis("dc") && (x > 0)) begin
  ...
end

But this leads to code duplication which is also an undesirable development.

As far as I can tell with the presence of the analog initial block there is no need to have the initial_step event act in this way during DC sweep, although for symmetry an analog final block should be introduced that handles finalization during a DC sweep instead of using a final_step event. However, this will open the can of backward incompatibility worms...

Cheers,
Marq


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Wed Nov 25 06:04:40 2009

This archive was generated by hypermail 2.1.8 : Wed Nov 25 2009 - 06:05:02 PST