The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
May 7th, 2024, 4:45pm
Pages: 1
Send Topic Print
Compact model numerical precision (Read 843 times)
A_Programmer
Junior Member
**
Offline



Posts: 13

Compact model numerical precision
Jul 07th, 2006, 2:03am
 
I have just implemented a compact model in Verilog A. But comparing with the original model implemented in Spice, there are some differences between their simulation results. Provided that I have eliminated all the logical errors. What are the possible sources of error? Can numberical precision harm me in this case? Thanks a lot.
Back to top
 
 
View Profile   IP Logged
Geoffrey_Coram
Senior Fellow
******
Offline



Posts: 1998
Massachusetts, USA
Re: Compact model numerical precision
Reply #1 - Jul 7th, 2006, 7:23am
 
My first guess would be that your physical constants are off.

Spice uses some old values for q (electron charge) and k (Boltzmann's constant), whereas the Verilog-AMS LRM specifies values from NIST.  Unfortunately, the NIST values keep changing as those darn physicists get better at measuring these things.  Colin McAndrew points out that this is a *terrible* thing for compact modeling; you want to fix a value for q so that the circuit simulator matches the device parameter extraction tool.

-Geoffrey
Back to top
 
 

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



Posts: 13

Re: Compact model numerical precision
Reply #2 - Jul 7th, 2006, 11:04pm
 
Thanks a lot Geoffrey.  Do you mean that I should add:

`define q 1.6e-19

in my verilog code?

Back to top
 
 
View Profile   IP Logged
Geoffrey_Coram
Senior Fellow
******
Offline



Posts: 1998
Massachusetts, USA
Re: Compact model numerical precision
Reply #3 - Jul 10th, 2006, 4:10am
 
A_Programmer wrote on Jul 7th, 2006, 11:04pm:
Thanks a lot Geoffrey.  Do you mean that I should add:

`define q 1.6e-19

in my verilog code?



Yikes!  No, you should have a few digits more.  Right now, the AMS LRM says
`define P_Q 1.602176462e-19

whereas BSIM3 has hard-coded
#define Charge_q 1.60219e-19

You can try that value, or you can try to find the actual value used in Spice, if you have the source code.
Back to top
 
 

If at first you do succeed, STOP, raise your standards, and stop wasting your time.
View Profile WWW   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.