The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
May 3rd, 2024, 10:30am
Pages: 1
Send Topic Print
Procedural Simultaneous Statement (Read 5816 times)
Daniel_Platte
Junior Member
**
Offline



Posts: 11
Munich/Germany
Procedural Simultaneous Statement
Jan 03rd, 2007, 8:39am
 
Hi all!

The VHDL-AMS language provides a feature "Procedural Simultaneous Statement" that is basically the same as Verilog-AMS's "Procedural Assignment". Unfortunately, AMS Designer and ADvance MS do not support the procedural simultaneous statement  :'(.

Example (from a diode model):
--------------------------------------- BEGIN CODE SNIPPET --------------------------------------------------------

PROCEDURAL IS BEGIN
   VD := VIN-VOUT-IIN*RS/AREA;
   ID := GMIN*VD+AREA*(ISS*(-1.0+exp(0.181069E-2*VD*Q/K))-IBV*exp((-0.333167E-2)*(BV+VD)*
Q/K));
   CJ := AREA*CJO*iffunc1(VD);
END PROCEDURAL;

--------------------------------------- END CODE SNIPPET --------------------------------------------------------

The VHDL-AMS committee proposes to model this by using analog functions like this:

--------------------------------------- BEGIN CODE SNIPPET --------------------------------------------------------

TYPE QR IS RECORD
   VDv : REAL;
   IDv : REAL;
   CJv : REAL;
 END RECORD;

 FUNCTION proceqs(
   VINi   : REAL;
   IINi   : REAL;
   VOUTi  : REAL;
   IOUTi  : REAL;
   VDi    : REAL;
   IDi    : REAL;
   CJi    : REAL;
   dIDdti : REAL;
   dVDdti : REAL
 ) RETURN QR IS
    VARIABLE VINv   : REAL := VINi;
    VARIABLE IINv   : REAL := IINi;
    VARIABLE VOUTv  : REAL := VOUTi;
    VARIABLE IOUTv  : REAL := IOUTi;
    VARIABLE VDv    : REAL := VDi;
    VARIABLE IDv    : REAL := IDi;
    VARIABLE CJv    : REAL := CJi;
    VARIABLE dIDdtv : REAL := dIDdti;
    VARIABLE dVDdtv : REAL := dVDdti;
 BEGIN
   VDv := VINv-VOUTv-IINv*RS/AREA;
   IDv := GMIN*VDv+AREA*(ISS*(-1.0+exp(0.181069E-2*VDv*Q/K))-IBV*exp((-0.333167E-2)*(BV+VD
v)*Q/K));
   CJv := AREA*CJO*iffunc1(VDv);
   RETURN (vdv, idv, cjv);
 END;

[...]

 (VD, ID, CJ) == proceqs(VIN, IIN, VOUT, IOUT, VD, ID, CJ, dIDdt, dVDdt) TOLERANCE "Current";

--------------------------------------- END CODE SNIPPET --------------------------------------------------------

Unfortunately, the topology checker of AMS Designer counts this simultaneous statement as one equation (instead of three) and refuses to simulate the model...

Does anyone have experience how to work-around this problem? Are there simulators supporting the proc. sim. stat. or plans to realize the language construct?

Thanks in advance for any help.

Cheers,
Daniel

P.S. Complete VHDL-AMS code is attached
Back to top
 
View Profile   IP Logged
Geoffrey_Coram
Senior Fellow
******
Offline



Posts: 1998
Massachusetts, USA
Re: Procedural Simultaneous Statement
Reply #1 - Jan 4th, 2007, 11:16am
 
I'm not an expert in VHDL, but: shouldn't the model compute charge rather than capacitance?

Code:
 -ID-0.115E-7*dIDdt+IIN-CJ*dVDdt == 0.0 TOLERANCE "Current"; 





Back to top
 
 

If at first you do succeed, STOP, raise your standards, and stop wasting your time.
View Profile WWW   IP Logged
Daniel_Platte
Junior Member
**
Offline



Posts: 11
Munich/Germany
Re: Procedural Simultaneous Statement
Reply #2 - Jan 5th, 2007, 12:53am
 
You're right, charge conservation is not ensured within the posted model. Anyway, the diode model only provides the basis for my question on the VHDL-AMS realization of proc. statements. Is anyone using VHDL-AMS for device modeling purposes?
Back to top
 
 
View Profile   IP Logged
Geoffrey_Coram
Senior Fellow
******
Offline



Posts: 1998
Massachusetts, USA
Re: Procedural Simultaneous Statement
Reply #3 - Jan 18th, 2007, 4:25am
 
Daniel_Platte wrote on Jan 5th, 2007, 12:53am:
Is anyone using VHDL-AMS for device modeling purposes?


I hope not!  I've been presenting tutorials on why Verilog-A is the right language for device modeling. Smiley

Seriously, though, there were a few groups that used to; some of them were connected with Prof C-J Richard Shi at U. Washington, whose MCAST model compiler would convert "VHDL-A" models into Spice C code.  (Note that "VHDL-A" isn't a standard, and I guess is defined in some sense by what MCAST can do ...)
Back to top
 
 

If at first you do succeed, STOP, raise your standards, and stop wasting your time.
View Profile WWW   IP Logged
abhi_kolpekwar
New Member
*
Offline



Posts: 2

Re: Procedural Simultaneous Statement
Reply #4 - Jan 18th, 2007, 2:59pm
 
+ Unfortunately, the topology checker of AMS Designer counts this simultaneous statement as one equation (instead of three) and refuses to simulate the model...

I am assuming you are refering to a compile time error about solvability check. You can use a ncvhdl option "-nosolvecheck" to get around this error. This disables the solvability check by the compiler.

AMS designer support user defined functions to help write device models. However, it does not support analog records yet. Your example uses analog records.

Back to top
 
 
View Profile   IP Logged
Pages: 1
Send Topic Print
Copyright 2002-2024 Designer’s Guide Consulting, Inc. Designer’s Guide® is a registered trademark of Designer’s Guide Consulting, Inc. All rights reserved. Send comments or questions to editor@designers-guide.org. Consider submitting a paper or model.