How to access EKV model for MOSFETs?

Skip to first unread message

Conrad Jensen

Dec 4, 2023, 12:55:06 PM12/4/23
to xyce-users
Hello! I'm trying to use the EKV model by including a .lib file with:
".model blah pmos(level=301)" 
but I am getting errors saying "Level must be < 99 (Setting Level to 1)".
Note: level 301 is what the user manual says is for the EKV model

When I changed the .lib file to:
".model blah pmos(level=99)"
I get: "Only MOS device levels 1-6,8-10,14,49,54-58,60,68,73 are supported in this binary".

On the Xyce download page it says "Note: From Xyce 7.3 onward, the executables provided are the 'XyceNF' version of the code rather than the open source version.  These binaries include proprietary models that we cannot release in source form, but that we can distribute in executable code."

My understanding is that the EKV model should be available in the release I have. Could any help me out with how I can access an EKV model? Thank you!

Relevant Info:
OS: Windows 10
Xyce 7.7 NORAD Serial Binary (fresh install)

Tom Russo

Dec 4, 2023, 1:22:30 PM12/4/23
to Conrad Jensen, xyce-users
The EKV 3.01 model in Xyce (level 301 MOSFET) is only available in XyceNF binaries, because it was provided to the Xyce team only through an NDA with Technical University of Crete.  It cannot be provided in source form, so is only available in the binaries.

EKV 2.6 is available in open source Xyce as the level 260 MOSFET.

I just grepped for the error message you report and can't find it anywhere in the source code.  That is the case for both the "Only MOS device levels..." and "Level must be..." messages.  So that is very puzzling.

Are you trying to run Xyce directly from the command line or through some other product that might be parsing the netlist for you first (like a GUI or schematic capture tool)? 

The Xyce team tests out its binaries against a test suite that contains both EKV2.6 and EKV 3.01 test cases and doesn't ship them if they fail any tests, so if you're running Xyce 7.7 binaries off of their web site it is supposed to contain those models.

Perhaps there is something amiss specifically with the Xyce 7.7 release binaries for Windows.  The team had to change their build platform somewhere between 7.6 and 7.7 and there might be a problem with it.  I know that it was fine in the 7.6 release, which is the last one I worked on personally.  You can still download that version for Windows by copying the download link on the web site and replacing "7.7.0" with "7.6.0", so you might want to give that a try before trying to diagnose further.

You received this message because you are subscribed to the Google Groups "xyce-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit

Tom Russo    KM5VY 
Tijeras, NM 

 echo "prpv_a'rfg_cnf_har_cvcr" | sed -e 's/_/ /g' | tr [a-m][n-z] [n-z][a-m]

Tom Russo

Dec 4, 2023, 1:34:20 PM12/4/23
to Conrad Jensen, xyce-users
And for what it's worth, that list of "levels supported in this binary" is grossly shortened compared even to what's in the open source builds.  Can you try running "Xyce -param", redirecting the output  to a file (e.g. "Xyce -param > foobar"), and scanning the file for lines that begin with "m level"?  This should enumerate all the levels actually supported in the binary, and in an open source build should contain all of these lines:

m level 1 {
m level 2 {
m level 3 {
m level 6 {
m level 9 {
m level 10 {
m level 14 {
m level 18 {
m level 49 {
m level 54 {
m level 57 {
m level 70 {
m level 77 {
m level 102 {
m level 103 {
m level 107 {
m level 108 {
m level 110 {
m level 260 {
m level 1031 {
m level 2000 {
m level 2001 {
m level 2002 {
m level 10240 {
m level 70450 {

Notice that the supposed list of supported model levels you have quoted in XyceNF 7.7 for Windows bears no resemblance to this list.  So something is *definitely* amiss here.

Thomas Russo

Dec 4, 2023, 2:44:07 PM12/4/23
to xyce-users
On a whim, I just checked and found that the error messages you report as coming from Xyce are actually present in ngspice. 

Double check that you're actually using Xyce to run your netlist.  Are you possibly running through a tool like qucs-s, which can run either Xyce or ngspice based on the simulator setting it its configuration.

Conrad Jensen

Dec 4, 2023, 4:29:42 PM12/4/23
to xyce-users
I am thoroughly embarrassed, you are right I had forgotten to switch back to Xyce. Thank you very much for your help!
Reply all
Reply to author
0 new messages