Re: Verilog-AMS question regarding retention - related issue

From: Marq Kole <marq.kole_at_.....>
Date: Wed Nov 02 2005 - 00:20:18 PST
Martin,

My take would also be that the final result would be 1.0 V. The begin-end 
denote a sequential block, so the order of the statements should be 
maintained. The sections from the LRM you quote do not contradict each 
other. I think your example excellently shows the issue.

The actual problem is of course with users that try to "outsmart" the 
compiler/simulator and define a couple of contribution statements in 
parallel in the hopes that the overall result will be 
faster/better/smaller/etc. That only works if there are separate branches 
created for each parallel contribution statement - maybe that should be 
stated in the LRM as well.

Marq


Marq Kole
Competence Leader Analog Simulation, Philips ED&T










"Martin O'Leary" <oleary@cadence.com> 
Sent by:
owner-verilog-ams@eda.org
02-11-2005 01:12

To
<verilog-ams@eda.org>
cc

Subject
Verilog-AMS question regarding retention - related issue
Classification







 
The thread on retention brought up another issue that I think should be
considered.

That is how interleaved contribution statements should be handled; e.g;

analog begin
V(out) <+ 1.0;
I(out) <+ 1.0;
V(out) <+ 1.0;
end

Section 5.3.1.2 of the LRM v2.2 says;

"A statement is evaluated as follows for source branch contributions:
1. The simulator evaluates the right-hand side.
2. The simulator adds the value of the right-hand side to any previously
retained value of the branch for later assignment to the branch. If
there are no previously retained values, the value of the right-hand
side itself is retained.
3. At the end of the simulation cycle, the simulator assigns the
retained value to the source branch."

Section 5.3.1.3 of the LRM v2.2 says: 
 
"Contributing a flow to a branch which already has a value retained for
the potential results in the potential being discarded and the branch
being converted to a flow source.
Conversely, contributing a potential to a branch which already has a
value retained for the flow results in the flow being discarded and the
branch being converted into a potential source. This is used to model
switches. It is illegal to contribute to an external switch branch from
within an analog block."

This suggests that the branch should have a value of 1.0 V not 2.0V  -
what are other people's take on this?

What ever the resolution I think it would be good to have an example to
clarify this point.

Thanks,
--Martin
Received on Wed Nov 2 00:24:46 2005

This archive was generated by hypermail 2.1.8 : Wed Nov 02 2005 - 00:25:00 PST