The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl
Simulators >> Circuit Simulators >> using Eldo models in Spectre?
https://designers-guide.org/forum/YaBB.pl?num=1178532919

Message started by Pavel on May 7th, 2007, 3:15am

Title: using Eldo models in Spectre?
Post by Pavel on May 7th, 2007, 3:15am

Hello,

How can I use Eldo models in Spectre simulator?
Is there some conversion program/script?

Regards

Pavel.

Title: Re: using Eldo models in Spectre?
Post by Andrew Beckett on May 7th, 2007, 4:18am

Pavel,

For the most part, they should work as is. spectre can read native SPICE models and usually would be able to read model files with no trouble.

Have you tried that? Just make sure that the file does not have a ".scs" suffix (otherwise that tells spectre to read it in spectre syntax) and include the file. Make sure you're using an MMSIM version (preferrably MMSIM61, since MMSIM60 is no longer supported).

Best Regards,

Andrew.

Title: Re: using Eldo models in Spectre?
Post by Pavel on May 7th, 2007, 7:06am

Andrew,

First, thank you for rapid answer.
Yes, I already tried it. I choosed Spectre as simulator and put +csfc option to force Spice syntax recognition.
But it was not sufficient. In Eldo model there are functions (for example trunc) that are not recognized by Spectre parser.
Moreover Eldo model of nmos/pmos contains directive Level=60. I searched for level 60 in Spectre Reference manual, but without success.

Regards,

Pavel.

P.S. What is MMSIM and where can I find its version?

Title: Re: using Eldo models in Spectre?
Post by Geoffrey_Coram on May 7th, 2007, 8:18am

Every simulator has its own LEVEL system.  Do you know if level=60 in Eldo is supposed to be BSIM3, BSIM4, or something else?  I think these are level=49 and =54 respectively in "spice."  One can generally deduce the model by looking at the parameters that are specified, if one doesn't have the (Eldo) user's guide.

Title: Re: using Eldo models in Spectre?
Post by Pavel on May 8th, 2007, 5:00am

Geoffrey,

First, thank you for response.
I compared liste of parameters of BSIM4 Spectre level 14 (from manual) with BSIM4 Eldo level 60 (form model from our Design Kit). There are quite a lot of differencies.

As number of parameters is huge (about 300), it's rather difficult (or time consumming) to establish correspondance.

Apart from this I've found in Design Kit file with extension .so, that sounds like model library. What is this file and can I use it?

I've noted that when I run simulation in ADE, first 5 lines in log window are:

Loading /mnt/ed/cadtools/lic5141_USR2.3/tools.lnx86/cmi/lib/4.0/libinfineon_sh.so
       ...
Loading /mnt/ed/cadtools/lic5141_USR2.3/tools.lnx86/cmi/lib/4.0/libnortel_sh.so
       ...
Loading /mnt/ed/cadtools/lic5141_USR2.3/tools.lnx86/cmi/lib/4.0/libphilips_sh.so
       ...
Loading /mnt/ed/cadtools/lic5141_USR2.3/tools.lnx86/cmi/lib/4.0/libsparam_sh.so
       ...
Loading /mnt/ed/cadtools/lic5141_USR2.3/tools.lnx86/cmi/lib/4.0/libstmodels_sh.so

What this information means?

Regards

Pavel

Title: Re: using Eldo models in Spectre?
Post by Geoffrey_Coram on May 8th, 2007, 5:54am


Pavel wrote on May 8th, 2007, 5:00am:
I compared liste of parameters of BSIM4 Spectre level 14 (from manual) with BSIM4 Eldo level 60 (form model from our Design Kit). There are quite a lot of differencies.


That surprises me.  I know every simulator adds a few special flags, but it should be just a few.


Quote:
As number of parameters is huge (about 300), it's rather difficult (or time consumming) to establish correspondance.


Spectre is "nice enough" to ignore any parameters it doesn't know, so if you just change level=60 to level=14 you should be able to run it and see which one Spectre says it doesn't know (rather than checking all 300 individually).  You might also want to check the version= value; the default is not the latest, and it may ignore new parameters from the latest version if you don't set the version correctly.


Quote:
Apart from this I've found in Design Kit file with extension .so, that sounds like model library. What is this file and can I use it?


.so is a "shared object" -- similar to a DLL in Windows.  Eg, the libphilips_sh.so contains the Mextram and PSP transistor models.

Title: Re: using Eldo models in Spectre?
Post by Pavel on May 9th, 2007, 1:25am

Geoffrey,


Quote:
so if you just change level=60 to level=14 you should be able to run it and see which one Spectre says it doesn't know


Thank you fot hint. I tried it. For the moment I've problem with model syntax.

At the begining of Eldo model there is following piece of code


Code:
.SUBCKT ENULLMM9JU D G S B
+       param: W=10e-6 L=10e-6 nfing=1 mismatch=1 srcefirst=1
+       wfing={w/nfing+3.6e-08}
+       fd={srcefirst*(nfing-2*trunc(nfing/2))+(1-srcefirst)*(2*trunc(1+nfing/2)-nfing)}
+       fs={2-fd}
+       AD={wfing*(nfing*(5.2e-07-(-2.8e-08))/2+fd*(1.4e-07+(3.6e-08)/2))}
+       AS={wfing*(nfing*(5.2e-07-(-2.8e-08))/2+fs*(1.4e-07+(3.6e-08)/2))}
+       PD={nfing*2*(5.2e-07-(-2.8e-08))/2+fd*(wfing+2*1.4e-07+(3.6e-08))}
+       PS={nfing*2*(5.2e-07-(-2.8e-08))/2+fs*(wfing+2*1.4e-07+(3.6e-08))}
+       number=1
***MATCHING****
.PARAM vtor_alpha = {7.2e-09}
.PARAM vtor_beta  = {0}
.PARAM vtor_fudge  = {1}
.PARAM betsq_alpha = {1.85e-08}
.PARAM betsq_beta  = {0}
.PARAM betsq_fudge  = {1}
.PARAM vtor_sig = {((vtor_alpha/sqrt(W*L*number))+vtor_beta)*vtor_fudge/sqrt(2.0)}
.PARAM vtor_dev = 0.0 DEV/gauss = {vtor_sig*mismatch}
.PARAM betsq_sig = {((betsq_alpha/sqrt(W*L*number))+betsq_beta)*betsq_fudge/sqrt(2.0)}
.PARAM betsq_dev = 0.0 DEV/gauss = {betsq_sig*mismatch}


First I tried spice parser (option +csfe). It didn't like function trunc . The Spice homologue of Eldo trunc is int. When I replace trunc by int, spice parcer gives error.

Then I tried Spectre parser. I replaced .PARAM by parameters and trunc by floor. This was Ok. Problem rised with vtor_dev and betsq_dev parameters. For Spectre such syntax is uncomprehesible.

In which directio should I follow (adaptation to Spectre or Spice) and how could I circumvent problems mentionned above.


Quote:
.so is a "shared object" -- similar to a DLL in Windows.  Eg, the libphilips_sh.so contains the Mextram and PSP transistor models.


If I properly undestand you, the contents of this file is compiled models. So, it should be the way to use them? How?

Regards.

Pavel.

Title: Re: using Eldo models in Spectre?
Post by imd1 on May 9th, 2007, 1:45am

Your kit uses an intermediate step between the actual transistor instantiation and the model parameter call.
So your problem is this intermediate step (the .SUBCKT call). I'd expect Spectre's SPICE reader to undertand Int()... Do you have a HSPICE compatible option for the spectre reader?

DEV/gauss in the .param is an ELDO idiom to specify the pdf of that .param for Monte-Carlo simulation. If you don't care much for it at this step you could just remove it. Spectre has probably a totally different way to define a probability distribution for a simulation parameter, which in this case is not a model parameter, but simply a subcircuit parameter (local to the subcircuit...).

I'd skip this and just get the normal simulation to run, and study later how the ELDO way differs from the Spectre way.

The .so seem to be external models using the CMI (Compiled Models Interface). It's curious that they are being loaded at all, since you do not need those models in your circuit... Apparently Spectre has all its MOS models as CMI .so files.

I don't know if the CMI interface for Spectre is publicly documented, if that's your question. Do you want to write/compile new models for it?

Title: Re: using Eldo models in Spectre?
Post by Pavel on May 9th, 2007, 4:22am

Hello imd1. Thanks for response. Some question concerning your advices.


Quote:
Your kit uses an intermediate step between the actual transistor instantiation and the model parameter call.
So your problem is this intermediate step (the .SUBCKT call). I'd expect Spectre's SPICE reader to undertand Int()... Do you have a HSPICE compatible option for the spectre reader?

What does "intermediate step" mean? When using Spectre parser I, of course, suppress the point.
So where is the problem? For Spice compatibility I use +csfe flag. With this flag Spice parser is used  (as I understood). But in this case another problem rises - trunc function. When I try replace trunc by int, parser gives an error.


Quote:
The .so seem to be external models using the CMI (Compiled Models Interface). It's curious that they are being loaded at all, since you do not need those models in your circuit... Apparently Spectre has all its MOS models as CMI .so files.


I didn't really understand what is the contents of this file. It isn't loaded. I've just founded it it Design Kit.
My question is : can it be used in some way or not?

Regards.

Pavel.

Title: Re: using Eldo models in Spectre?
Post by Geoffrey_Coram on May 9th, 2007, 4:43am


imd1 wrote on May 9th, 2007, 1:45am:
Your kit uses an intermediate step between the actual transistor instantiation and the model parameter call.


A simpler structure would be something like
M1 d g s b nch l=0.18u w=10u
.MODEL nch nmos level=60
But you have an instance of "ENULLMM9JU" that resolves to a .SUBCKT rather than a .MODEL.  Indeed, I would try to figure out how to get the "nominal" simulation to run and then worry about mismatch later, as imd1 suggests.


Quote:
The .so seem to be external models using the CMI (Compiled Models Interface). It's curious that they are being loaded at all, since you do not need those models in your circuit... Apparently Spectre has all its MOS models as CMI .so files.


I don't think BSIM3/4 are .so files.


Quote:
I don't know if the CMI interface for Spectre is publicly documented, if that's your question. Do you want to write/compile new models for it?


It's not; last time I asked, Cadence wanted an NDA.  I think you also need a license key.

Title: Re: using Eldo models in Spectre?
Post by Geoffrey_Coram on May 9th, 2007, 4:48am


Pavel wrote on May 9th, 2007, 4:22am:
I didn't really understand what is the contents of this file. It isn't loaded. I've just founded it it Design Kit.
My question is : can it be used in some way or not?


It will automatically be loaded if it is needed.  If you have
.model nch nmos level=14 vth0=0.7 ...
then this is a BSIM4 model, and the model equations that go with these parameters are built into Spectre.

If you have
model nch psp1020 tox=1.5n ...
then Spectre will load the philips .so file for the equations for the PSP model.  But the equations are useless without the appropriate parameters.

If you do a "spectre -help", near the end there is a list of components, with * for those that are loaded from shared objects (.so).

Title: Re: using Eldo models in Spectre?
Post by Pavel on May 14th, 2007, 3:41am


Quote:
DEV/gauss in the .param is an ELDO idiom to specify the pdf of that .param for Monte-Carlo simulation. If you don't care much for it at this step you could just remove it. Spectre has probably a totally different way to define a probability distribution for a simulation parameter, which in this case is not a model parameter, but simply a subcircuit parameter (local to the subcircuit...).


Quote:
A simpler structure would be something like
M1 d g s b nch l=0.18u w=10u
.MODEL nch nmos level=60  
But you have an instance of "ENULLMM9JU" that resolves to a .SUBCKT rather than a .MODEL.  Indeed, I would try to figure out how to get the "nominal" simulation to run and then worry about mismatch later, as imd1 suggests.


I tried as you suggested - suppresed Monte-Carlo statements. I also changed parameter names to lowercase to be them compatible with Spectre bsim4 parameters. Then I tried to generate netlist for small test schema (please, see on the picture).

Results
- parser passes without errors
- nmos isn't present in netlist
- in Spectre log window I see following information:

Notice from spectre during topology check.
   Only one connection to the following 2 nodes:
       drain
       gate


Circuit inventory:
         nodes 3
         equations 5
         resistor 1    
         vsource 2  

Nmos isn't recognized, but parser passes without errors. Why?

Regards.

Pavel.

Title: Re: using Eldo models in Spectre?
Post by Pavel on May 14th, 2007, 5:22am

Previous error is corrected. I included eldo in Switch & Stop View Lists in ADE/Setup/Environment Options/.
nmos appears in netlist.

Now problem is with model. Here is error message from spectre log window:
Error found by spectre during circuit read-in.
   "........./test_lib.lib" 126: Bad `subckt ... ENLLMM9JU' statement.


Where 126 is the last line in the file test_lib.lib.
it sounds like this:
ends ENLLMM9JU
what is conform with Spectre syntax.

Where is the problem?

Regards.

Pavel.

Title: Re: using Eldo models in Spectre?
Post by Geoffrey_Coram on May 14th, 2007, 6:38am

In spice format, it's .subckt and .ends; in spectre, there's no leading "."  I can't tell from your post which one you are intending to  use.  I don't remember whether either allows/requires/forbids having the subckt name on the "ends" line.


Title: Re: using Eldo models in Spectre?
Post by Pavel on May 14th, 2007, 6:51am

Geoffrey,

I don't use leading "."
According to manual subckt name after ends is allowed. In any way I tried 2 options - with and without.

Regards.

Pavel.


Title: Re: using Eldo models in Spectre?
Post by Geoffrey_Coram on May 15th, 2007, 4:10am

The subckt definition you posted has the leading "." -- can you post your Spectre translation?

I've never seen "param:" in a netlist before; I'm used to seeing the .PARAM instead.

Title: Re: using Eldo models in Spectre?
Post by Pavel on May 16th, 2007, 2:23am

Geoffrey,

I put in attachment model file as I cannot reproduce it in mail body due to its size.
Could you, please, have a glance on it.

I didn't remove "simulator-specific" part at the end of model, as you told me that Spectre is capable to filter out
unrecognized parameters.

When I try to simulate it, simulator stops with error that I exposed in one of my previous messages:
last line: bad 'subckt ENLLMM9JU' statement.

Thank you in advance.

Regards

Pavel.

Title: Re: using Eldo models in Spectre?
Post by Geoffrey_Coram on May 16th, 2007, 7:36am

Pavel -
I think it's odd that the subckt name is the same as the model name.  So, I changed it; also I think you can't use "nmos level=14" in spectre format.

32c32
< M1 d g s b ENLLMM9JU w=w/nfing l=l as=as/nfing ad=ad/nfing ps=ps/nfing pd=pd/nfing M=number*nfing
---
> M1 d g s b ENLLMM9JUmod w=w/nfing l=l as=as/nfing ad=ad/nfing ps=ps/nfing pd=pd/nfing M=number*nfing
34c34
< model ENLLMM9JU nmos level=14 version = 4.4  
---
> model ENLLMM9JUmod bsim4 version = 4.4  


Title: Re: using Eldo models in Spectre?
Post by Pavel on May 18th, 2007, 5:42am

Geoffrey,

I followed your suggestion. Error message is the same.
Moreover, I changed "continue line" from "+" to "\" (as it seems that last one is more credible)
and commented the 'end part' of model that contains simulator-oriented parameters.

Without any effect - parser pointed to the last line:

Bad 'subckt ... ENLLMM9JU' statement.

Is there a limit in number of characters between subckt and ends statements?

Regards

P.S. In attachemnt you could find revised model

Title: Re: using Eldo models in Spectre?
Post by Geoffrey_Coram on May 18th, 2007, 8:39am

When I made the changes I posted, I was able to run a circuit in my version of Spectre (just a simple dc op pt of a single transistor).


Title: Re: using Eldo models in Spectre?
Post by Pavel on May 21st, 2007, 1:28am

Geoffrey,

I appologize for my importunity, but I still cannot resolve this problem (that's apparently not so difficult).

I tried many times ... Always the same error message - Bad subckt .... statement.
In my last version it looks realy very strange - parser gives this error message pointing to the comment line,
that is situated AFTER ends declaration!!!

What is - software bug or I missed something essential (should I check/change some options).

Regards

Pavel.

P.S. In attachment there is my last model version that discloses strange behaviour of Spectre parser.

Title: Re: using Eldo models in Spectre?
Post by Geoffrey_Coram on May 21st, 2007, 4:41am


Pavel wrote on May 18th, 2007, 5:42am:
I followed your suggestion. Error message is the same.


What version of Spectre are you running?


Quote:
Moreover, I changed "continue line" from "+" to "\" (as it seems that last one is more credible)


When I tried your latest file, the \ didn't work because you left in the comment lines "//-----------"

I also found that sometimes it's important not to start on the first line -- spice has a "tradition" of ignoring the first line, so I always start my files with a line containing only "* name of circuit" or "// name of circuit".  If you have the simulator lang statement there, it's not clear to me if spectre will read it.

Can you run the attached?

Title: Re: using Eldo models in Spectre?
Post by Pavel on May 21st, 2007, 5:08am

Geoffrey,

First, thank you for assistance.
I tried your attachment. The results you can see below.
My Spectre version is 5.10.41.112405.

Regards

Pavel.

Title: Re: using Eldo models in Spectre?
Post by Ken Kundert on May 21st, 2007, 7:59am

Remove any spaces or tabs after the backslashes.

Title: Re: using Eldo models in Spectre?
Post by Pavel on May 22nd, 2007, 12:41am

Ken

I removed spaces. Now simulator takes model. Thanks.
But simulation results are far from expecting (please see the picture).
On the graph there is Id versus Vd. As you see almost no current through NMOS.
First I tried to add type = n declaration in model (I was not sure that if type isn't specified, simulator considers it as N). The result was the same - no current.
Then, considering that model was too reduced and some essential parameters were missed, I returned to "full"
model version, where I carefully removed all spaces after backslashes.
Result - the same error message from parser Bad subckt .... statement.

So Ihave 2 questions:

1. How can I proceed further - begin with the simplest model and add line by line untill parser error message appears, or there is more skilled way to debug model?

2. This relatively poor diagnostic from Spectre parser is due to my rather old version,
   or in new version the situation is the same?

Regards

Pavel.

Title: Re: using Eldo models in Spectre?
Post by Geoffrey_Coram on May 22nd, 2007, 4:32am


Pavel wrote on May 22nd, 2007, 12:41am:
1. How can I proceed further - begin with the simplest model and add line by line untill parser error message appears, or there is more skilled way to debug model?


That's pretty much what I'd do; though, I'd do a "binary search" -- add half of the lines, run it; if it works, add half the remaining, if it didn't, take back half of the lines you just added.

Did you also remove all the //--- comment lines, along with the spaces?  Did you try the simple model with + instead of \ ?  I think the parser is more tolerant of spaces/tabs when you use + instead of /, but I'm not sure.

Title: Re: using Eldo models in Spectre?
Post by iamchuck on Jun 12th, 2007, 2:01pm

When I run Spectre, I too have seen the 'Bad subckt' error,  I found that my version of Spectre does not like multiple PARAM lines that begin with PARAM.  All extra instances of the PARAM card should be replaced with a '+' sign, which will continue the initial PARAM statement

I hope this helps!  

The Designer's Guide Community Forum » Powered by YaBB 2.2.2!
YaBB © 2000-2008. All Rights Reserved.