diff --git a/src/spicelib/devices/adms/admst/COPYING b/src/spicelib/devices/adms/admst/COPYING
deleted file mode 100644
index 12f7f3f21..000000000
--- a/src/spicelib/devices/adms/admst/COPYING
+++ /dev/null
@@ -1,674 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc.
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The GNU General Public License is a free, copyleft license for
-software and other kinds of works.
-
- The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works. By contrast,
-the GNU General Public License is intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users. We, the Free Software Foundation, use the
-GNU General Public License for most of our software; it applies also to
-any other work released this way by its authors. You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.
-
- To protect your rights, we need to prevent others from denying you
-these rights or asking you to surrender the rights. Therefore, you have
-certain responsibilities if you distribute copies of the software, or if
-you modify it: responsibilities to respect the freedom of others.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must pass on to the recipients the same
-freedoms that you received. You must make sure that they, too, receive
-or can get the source code. And you must show them these terms so they
-know their rights.
-
- Developers that use the GNU GPL protect your rights with two steps:
-(1) assert copyright on the software, and (2) offer you this License
-giving you legal permission to copy, distribute and/or modify it.
-
- For the developers' and authors' protection, the GPL clearly explains
-that there is no warranty for this free software. For both users' and
-authors' sake, the GPL requires that modified versions be marked as
-changed, so that their problems will not be attributed erroneously to
-authors of previous versions.
-
- Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the manufacturer
-can do so. This is fundamentally incompatible with the aim of
-protecting users' freedom to change the software. The systematic
-pattern of such abuse occurs in the area of products for individuals to
-use, which is precisely where it is most unacceptable. Therefore, we
-have designed this version of the GPL to prohibit the practice for those
-products. If such problems arise substantially in other domains, we
-stand ready to extend this provision to those domains in future versions
-of the GPL, as needed to protect the freedom of users.
-
- Finally, every program is threatened constantly by software patents.
-States should not allow patents to restrict development and use of
-software on general-purpose computers, but in those that do, we wish to
-avoid the special danger that patents applied to a free program could
-make it effectively proprietary. To prevent this, the GPL assures that
-patents cannot be used to render the program non-free.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- TERMS AND CONDITIONS
-
- 0. Definitions.
-
- "This License" refers to version 3 of the GNU General Public License.
-
- "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
- "The Program" refers to any copyrightable work licensed under this
-License. Each licensee is addressed as "you". "Licensees" and
-"recipients" may be individuals or organizations.
-
- To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy. The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
- A "covered work" means either the unmodified Program or a work based
-on the Program.
-
- To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy. Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
- To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies. Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
- An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License. If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
- 1. Source Code.
-
- The "source code" for a work means the preferred form of the work
-for making modifications to it. "Object code" means any non-source
-form of a work.
-
- A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
- The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form. A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
- The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities. However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work. For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
- The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
- The Corresponding Source for a work in source code form is that
-same work.
-
- 2. Basic Permissions.
-
- All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met. This License explicitly affirms your unlimited
-permission to run the unmodified Program. The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work. This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
- You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force. You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright. Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
- Conveying under any other circumstances is permitted solely under
-the conditions stated below. Sublicensing is not allowed; section 10
-makes it unnecessary.
-
- 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
- No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
- When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
- 4. Conveying Verbatim Copies.
-
- You may convey verbatim copies of the Program's source code as you
-receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
- You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
- 5. Conveying Modified Source Versions.
-
- You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
- a) The work must carry prominent notices stating that you modified
- it, and giving a relevant date.
-
- b) The work must carry prominent notices stating that it is
- released under this License and any conditions added under section
- 7. This requirement modifies the requirement in section 4 to
- "keep intact all notices".
-
- c) You must license the entire work, as a whole, under this
- License to anyone who comes into possession of a copy. This
- License will therefore apply, along with any applicable section 7
- additional terms, to the whole of the work, and all its parts,
- regardless of how they are packaged. This License gives no
- permission to license the work in any other way, but it does not
- invalidate such permission if you have separately received it.
-
- d) If the work has interactive user interfaces, each must display
- Appropriate Legal Notices; however, if the Program has interactive
- interfaces that do not display Appropriate Legal Notices, your
- work need not make them do so.
-
- A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit. Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
- 6. Conveying Non-Source Forms.
-
- You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
- a) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by the
- Corresponding Source fixed on a durable physical medium
- customarily used for software interchange.
-
- b) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by a
- written offer, valid for at least three years and valid for as
- long as you offer spare parts or customer support for that product
- model, to give anyone who possesses the object code either (1) a
- copy of the Corresponding Source for all the software in the
- product that is covered by this License, on a durable physical
- medium customarily used for software interchange, for a price no
- more than your reasonable cost of physically performing this
- conveying of source, or (2) access to copy the
- Corresponding Source from a network server at no charge.
-
- c) Convey individual copies of the object code with a copy of the
- written offer to provide the Corresponding Source. This
- alternative is allowed only occasionally and noncommercially, and
- only if you received the object code with such an offer, in accord
- with subsection 6b.
-
- d) Convey the object code by offering access from a designated
- place (gratis or for a charge), and offer equivalent access to the
- Corresponding Source in the same way through the same place at no
- further charge. You need not require recipients to copy the
- Corresponding Source along with the object code. If the place to
- copy the object code is a network server, the Corresponding Source
- may be on a different server (operated by you or a third party)
- that supports equivalent copying facilities, provided you maintain
- clear directions next to the object code saying where to find the
- Corresponding Source. Regardless of what server hosts the
- Corresponding Source, you remain obligated to ensure that it is
- available for as long as needed to satisfy these requirements.
-
- e) Convey the object code using peer-to-peer transmission, provided
- you inform other peers where the object code and Corresponding
- Source of the work are being offered to the general public at no
- charge under subsection 6d.
-
- A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
- A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling. In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage. For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product. A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
- "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source. The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
- If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information. But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
- The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed. Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
- Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
- 7. Additional Terms.
-
- "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law. If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
- When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it. (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.) You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
- Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
- a) Disclaiming warranty or limiting liability differently from the
- terms of sections 15 and 16 of this License; or
-
- b) Requiring preservation of specified reasonable legal notices or
- author attributions in that material or in the Appropriate Legal
- Notices displayed by works containing it; or
-
- c) Prohibiting misrepresentation of the origin of that material, or
- requiring that modified versions of such material be marked in
- reasonable ways as different from the original version; or
-
- d) Limiting the use for publicity purposes of names of licensors or
- authors of the material; or
-
- e) Declining to grant rights under trademark law for use of some
- trade names, trademarks, or service marks; or
-
- f) Requiring indemnification of licensors and authors of that
- material by anyone who conveys the material (or modified versions of
- it) with contractual assumptions of liability to the recipient, for
- any liability that these contractual assumptions directly impose on
- those licensors and authors.
-
- All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10. If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term. If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
- If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
- Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
- 8. Termination.
-
- You may not propagate or modify a covered work except as expressly
-provided under this License. Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
- However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
- Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
- Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License. If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
- 9. Acceptance Not Required for Having Copies.
-
- You are not required to accept this License in order to receive or
-run a copy of the Program. Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance. However,
-nothing other than this License grants you permission to propagate or
-modify any covered work. These actions infringe copyright if you do
-not accept this License. Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
- 10. Automatic Licensing of Downstream Recipients.
-
- Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License. You are not responsible
-for enforcing compliance by third parties with this License.
-
- An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations. If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
- You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License. For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
- 11. Patents.
-
- A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based. The
-work thus licensed is called the contributor's "contributor version".
-
- A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version. For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
- Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
- In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement). To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
- If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients. "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
- If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
- A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License. You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
- Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
- 12. No Surrender of Others' Freedom.
-
- If conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all. For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
- 13. Use with the GNU Affero General Public License.
-
- Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU Affero General Public License into a single
-combined work, and to convey the resulting work. The terms of this
-License will continue to apply to the part which is the covered work,
-but the special requirements of the GNU Affero General Public License,
-section 13, concerning interaction through a network will apply to the
-combination as such.
-
- 14. Revised Versions of this License.
-
- The Free Software Foundation may publish revised and/or new versions of
-the GNU General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
- Each version is given a distinguishing version number. If the
-Program specifies that a certain numbered version of the GNU General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation. If the Program does not specify a version number of the
-GNU General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
- If the Program specifies that a proxy can decide which future
-versions of the GNU General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
- Later license versions may give you additional or different
-permissions. However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
- 15. Disclaimer of Warranty.
-
- THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
-IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
-ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. Limitation of Liability.
-
- IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.
-
- 17. Interpretation of Sections 15 and 16.
-
- If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-state the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-
- Copyright (C)
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
-
-Also add information on how to contact you by electronic and paper mail.
-
- If the program does terminal interaction, make it output a short
-notice like this when it starts in an interactive mode:
-
- Copyright (C)
- This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, your program's commands
-might be different; for a GUI interface, you would use an "about box".
-
- You should also get your employer (if you work as a programmer) or school,
-if any, to sign a "copyright disclaimer" for the program, if necessary.
-For more information on this, and how to apply and follow the GNU GPL, see
-.
-
- The GNU General Public License does not permit incorporating your program
-into proprietary programs. If your program is a subroutine library, you
-may consider it more useful to permit linking proprietary applications with
-the library. If this is what you want to do, use the GNU Lesser General
-Public License instead of this License. But first, please read
-.
\ No newline at end of file
diff --git a/src/spicelib/devices/adms/admst/adms.implicit.xml b/src/spicelib/devices/adms/admst/adms.implicit.xml
deleted file mode 100644
index b2a95ccc5..000000000
--- a/src/spicelib/devices/adms/admst/adms.implicit.xml
+++ /dev/null
@@ -1,803 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/spicelib/devices/adms/admst/analogfunction.xml b/src/spicelib/devices/adms/admst/analogfunction.xml
deleted file mode 100644
index e991ee0cc..000000000
--- a/src/spicelib/devices/adms/admst/analogfunction.xml
+++ /dev/null
@@ -1,1144 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-/* math functions and appropriate derivatives */
-static inline double _fn_cos(double arg) { return cos(arg); }
-static inline double _d0_cos(double arg) { return (-sin(arg)); }
-static inline double _fn_sin(double arg) { return sin(arg); }
-static inline double _d0_sin(double arg) { return (cos(arg)); }
-static inline double _fn_tan(double arg) { return tan(arg); }
-static inline double _d0_tan(double arg) { return (1.0/cos(arg)/cos(arg)); }
-static inline double _fn_cosh(double arg) { return cosh(arg); }
-static inline double _d0_cosh(double arg) { return (sinh(arg)); }
-static inline double _fn_sinh(double arg) { return sinh(arg); }
-static inline double _d0_sinh(double arg) { return (cosh(arg)); }
-static inline double _fn_tanh(double arg) { return tanh(arg); }
-static inline double _d0_tanh(double arg) { return (1.0/cosh(arg)/cosh(arg)); }
-static inline double _fn_acos(double arg) { return acos(arg); }
-static inline double _d0_acos(double arg) { return (-1.0/sqrt(1-arg*arg)); }
-static inline double _fn_asin(double arg) { return asin(arg); }
-static inline double _d0_asin(double arg) { return (+1.0/sqrt(1-arg*arg)); }
-static inline double _fn_atan(double arg) { return atan(arg); }
-static inline double _d0_atan(double arg) { return (+1.0/(1+arg*arg)); }
-static inline double _fn_acosh(double arg) { return acosh(arg); }
-static inline double _d0_acosh(double arg) { return (1.0/(sqrt(arg-1)*sqrt(arg+1))); }
-static inline double _fn_asinh(double arg) { return asinh(arg); }
-static inline double _d0_asinh(double arg) { return (1.0/(sqrt(arg*arg+1))); }
-static inline double _fn_atanh(double arg) { return atanh(arg); }
-static inline double _d0_atanh(double arg) { return (+1.0/(1-arg*arg)); }
-
-static inline double _fn_logE(double arg) { return log(arg); }
-static inline double _d0_logE(double arg) { return (1.0/arg); }
-static inline double _fn_log10(double arg) { return log10(arg); }
-static inline double _d0_log10(double arg) { return (1.0/arg/log(10.0)); }
-static inline double _fn_exp(double arg) { return exp(arg); }
-static inline double _d0_exp(double arg) { return exp(arg); }
-static inline double _fn_sqrt(double arg) { return sqrt(arg); }
-static inline double _d0_sqrt(double arg) { return (1.0/sqrt(arg)/2.0); }
-
-static inline double _fn_abs(double arg) { return fabs(arg); }
-static inline double _d0_abs(double arg) { return (((arg)>=0)?(+1.0):(-1.0)); }
-
-static inline double _fn_floor(double arg) { return floor(arg); }
-static inline double _d0_floor(double arg) { (void) arg; return 0.0; }
-
-static inline double _fn_ceil(double arg) { return ceil(arg); }
-static inline double _d0_ceil(double arg) { (void) arg; return 0.0; }
-
-static inline double _fn_hypot(double x,double y) { return sqrt((x)*(x)+(y)*(y)); }
-static inline double _d0_hypot(double x,double y) { return (x)/sqrt((x)*(x)+(y)*(y)); }
-static inline double _d1_hypot(double x,double y) { return (y)/sqrt((x)*(x)+(y)*(y)); }
-
-static inline double _fn_atan2(double x,double y) { return atan2(x,y); }
-static inline double _d0_atan2(double x,double y) { return -y / (x*x + y*y); }
-static inline double _d1_atan2(double x,double y) { return x / (x*x + y*y); }
-
-static inline double _fn_max(double x,double y) { return ((x)>(y))?(x):(y); }
-static inline double _d0_max(double x,double y) { return ((x)>(y))?1.0:0.0; }
-static inline double _d1_max(double x,double y) { return ((x)>(y))?0.0:1.0; }
-
-static inline double _fn_min(double x,double y) { return ((x)<(y))?(x):(y); }
-static inline double _d0_min(double x,double y) { return ((x)<(y))?1.0:0.0; }
-static inline double _d1_min(double x,double y) { return ((x)<(y))?0.0:1.0; }
-
-static inline double _fn_pow(double x,double y) { return pow(x,y); }
-static inline double _d0_pow(double x,double y) { return (x==0.0)?0.0:((y/x)*pow(x,y)); }
-static inline double _d1_pow(double x,double y) { return (x==0.0)?0.0:((log(x)/exp(0.0))*pow(x,y)); }
-
-static inline double _fn_limexp(double arg) { return ((arg)<(80))?(exp(arg)):(exp(80.0)*(1.0+(arg-80))); }
-static inline double _d0_limexp(double arg) { return ((arg)<(80))?(exp(arg)):(exp(80.0)); }
-
-static inline double _fn_vt(double arg) { return (1.3806503e-23 / 1.602176462e-19) * arg; }
-static inline double _d0_vt(double arg) { (void) arg; return (1.3806503e-23 / 1.602176462e-19); }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- $(module)_$function (
-
-
- )
-
-
-
-
-
-
- =0
- =0.0
-
-
-
-
-
-
-
- =0
- =0.0
-
-
-
-
-
-
-
-double $(module)_d_$(function) (
-
-
- ,
-
-
- )
-
-
-
-
-
-
-
- =0
- =0.0
-
-
-
-
-
-
- =0
- =0.0
-
-
-
-
-
-
-
-
-
- =0
- =0.0
-
-
-
-
-
-
- =0
- =0.0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- /*
- * %(attribute[name='ngspicename']/value).analogfunction.h - analog function header
- *
- * This is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- */
-
-#ifndef __$(module)_ANALOGFUNCTION_H__
-#define __$(module)_ANALOGFUNCTION_H__
-
-
-
-#endif /* __$(module)_ANALOGFUNCTION_H__ */
-
-
-
-
- /*
- * %(attribute[name='ngspicename']/value).analogfunction.c - analog function implementations
- *
- * This is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- */
-
-// #if HAVE_CONFIG_H
-// # include <config.h>
-// #endif
-
-#include <stdio.h>
-#include "%(attribute[name='ngspicename']/value).analogfunction.h"
-#include <math.h>
-
-
-
-
-
-
-
-
-
diff --git a/src/spicelib/devices/adms/admst/ngspiceMODULE.c.xml b/src/spicelib/devices/adms/admst/ngspiceMODULE.c.xml
deleted file mode 100644
index 6ea922da0..000000000
--- a/src/spicelib/devices/adms/admst/ngspiceMODULE.c.xml
+++ /dev/null
@@ -1,124 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-#include "ngspice/ngspice.h"
-#include "ngspice/devdefs.h"
-#include "$(module)defs.h"
-#include "ngspice/suffix.h"
-
-IFparm $(module)pTable[] = {
-
-
-
- IOP("%(lower-case(name))",$(module)_instance_%(name),IF_REAL,"%(name)"),
-
-
- IOP("%(lower-case(name))",$(module)_instance_%(name),IF_INTEGER,"%(name)"),
-
-
-
-
-
-
-
-
-
-
-
-
- OP("%(lower-case(name))",$(module)_ask_%(name),IF_REAL,"%(attribute[name='desc']/value)"),
-
-
-
-
-
-
-
-
-};
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-char *$(module)names[] = {
-
-
-
-
-
-
-
-
-
-
-
-
-
-};
-
-int $(module)nSize = NUMELEMS($(module)names);
-int $(module)pTSize = NUMELEMS($(module)pTable);
-int $(module)mPTSize = NUMELEMS($(module)mPTable);
-int $(module)iSize = sizeof($(module)instance);
-int $(module)mSize = sizeof($(module)model);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/spicelib/devices/adms/admst/ngspiceMODULE.hxx.xml b/src/spicelib/devices/adms/admst/ngspiceMODULE.hxx.xml
deleted file mode 100644
index 59b3d6f5f..000000000
--- a/src/spicelib/devices/adms/admst/ngspiceMODULE.hxx.xml
+++ /dev/null
@@ -1,2901 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-#define ELECTRON_CHARGE 1.602191770e-19 /* C */
-#define BOLTZMANN 1.38062259e-23 /* J/oK */
-
-/* arithmetics */
-#define EXP90 1.220403294317841e+039
-#define m00_hypot(v00,x,y) v00 = sqrt((x)*(x)+(y)*(y));
-#define m10_hypot(v10,v00,x,y) v10 = (x)/(v00);
-#define m11_hypot(v11,v00,x,y) v11 = (y)/(v00);
-#define m00_max(v00,x,y) v00 = ((x)>(y))?(x):(y);
-#define m10_max(v10,v00,x,y) v10 = ((x)>(y))?1.0:0.0;
-#define m11_max(v11,v00,x,y) v11 = ((x)>(y))?0.0:1.0;
-#define m00_min(v00,x,y) v00 = ((x)<(y))?(x):(y);
-#define m10_min(v10,v00,x,y) v10 = ((x)<(y))?1.0:0.0;
-#define m11_min(v11,v00,x,y) v11 = ((x)<(y))?0.0:1.0;
-#define m00_pow(v00,x,y) v00 = pow(x,y);
-#define m10_pow(v10,v00,x,y) v10 = (x==0.0)?0.0:(v00)*(y)/(x);
-#define m11_pow(v11,v00,x,y) v11 = (x==0.0)?0.0:(log(x)*(v00));
-#define m00_div(v00,v10,x,y) double v10=1/(y); double v00=(x)*v10;
-#define m10_div(v10,v00,vv,x,y)
-#define m11_div(v11,v00,vv,x,y) double v11 = -v00*vv;
-#define m00_mult(v00,v10,v11,x,y) double v10=(x); double v11=(y); double v00=v10*v11;
-#define m00_add(v00,x,y) double v00=(x)+(y);
-#define m00_cos(v00,x) v00 = cos(x);
-#define m10_cos(v10,v00,x) v10 = (-sin(x));
-#define m00_sin(v00,x) v00 = sin(x);
-#define m10_sin(v10,v00,x) v10 = (cos(x));
-#define m00_tan(v00,x) v00 = tan(x);
-#define m10_tan(v10,v00,x) v10 = (1.0/cos(x)/cos(x));
-#define m00_cosh(v00,x) v00 = cosh(x);
-#define m10_cosh(v10,v00,x) v10 = (sinh(x));
-#define m00_sinh(v00,x) v00 = sinh(x);
-#define m10_sinh(v10,v00,x) v10 = (cosh(x));
-#define m00_tanh(v00,x) v00 = tanh(x);
-#define m10_tanh(v10,v00,x) v10 = (1.0/cosh(x)/cosh(x));
-#define m00_acos(v00,x) v00 = acos(x);
-#define m10_acos(v10,v00,x) v10 = (-1.0/sqrt(1-x*x));
-#define m00_asin(v00,x) v00 = asin(x);
-#define m10_asin(v10,v00,x) v10 = (+1.0/sqrt(1-x*x));
-#define m00_atan(v00,x) v00 = atan(x);
-#define m10_atan(v10,v00,x) v10 = (+1.0/(1+x*x));
-#define m00_logE(v00,x) v00 = log(x);
-#define m10_logE(v10,v00,x) v10 = (1.0/x);
-#define m00_log10(v00,x) v00 = log10(x);
-#define m10_log10(v10,v00,x) v10 = (1.0/x/log(10));
-#define m00_sqrt(v00,x) v00 = sqrt(x);
-#define m10_sqrt(v10,v00,x) v10 = (0.5/v00);
-#define m00_fabs(v00,x) v00 = fabs(x);
-#define m10_fabs(v10,v00,x) v10 = (((x)>=0)?(+1.0):(-1.0));
-#define m00_exp(v00,x) v00 = exp(x);
-#define m10_exp(v10,v00,x) v10 = v00;
-#define m00_abs(v00) ((v00)<(0)?(-(v00)):(v00))
-#define m00_floor(v00,x) v00 = floor(x);
-#define m00_ceil(v00,x) v00 = ceil(x);
-#define m00_limexp(v00,x) v00 = ((x)<90.0?exp(x):EXP90*(x-89.0));
-#define m10_limexp(v10,v00,x) v10 = ((x)<90.0?(v00):EXP90);
-#define m00_atan2(v00,x,y) v00 = atan2(x,y);
-#define m10_atan2(v10,x,y) v10 = (-(y)/((x)*(x)+(y)*(y)));
-#define m11_atan2(v11,x,y) v11 = ((x)/((x)*(x)+(y)*(y)));
-#define m00_acosh(v00,x) v00 = acosh(x);
-#define m10_acosh(v10,v00,x) v10 = (1.0/(sqrt(x-1)*sqrt(x+1)));
-#define m00_asinh(v00,x) v00 = asinh(x);
-#define m10_asinh(v10,v00,x) v10 = (1.0/(sqrt(x*x+1)));
-#define m00_atanh(v00,x) v00 = atanh(x);
-#define m10_atanh(v10,v00,x) v10 = (1.0/(1-x*x));
-
-#define m20_logE(v00) (-1.0/v00/v00)
-#define m20_exp(v00) exp(v00)
-#define m20_limexp(v00) ((v00)<90.0?exp(v00):0.0)
-#define m20_sqrt(v00) (-0.25/(v00)/sqrt(v00))
-#define m20_fabs(v00) 0.0
-
-
-
-
-/*wrapper*/
-#define pModel model
-#define pInst here
-#define mint_get_circuit_tempK() _circuit_temp
-#define voltages(n) NP(n)
-#define _DDT(q) q
-#define _DDX
-#define _DERIVATEFORDDX
-
-#define _DERIVATE2
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- int
- double
- char*
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- fabs
- shrinkl
- shrinka
- log10
- logE
- limexp
- limexp
- %(name)
-
-
-
-
- $e
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/spicelib/devices/adms/admst/ngspiceMODULEacld.c.xml b/src/spicelib/devices/adms/admst/ngspiceMODULEacld.c.xml
deleted file mode 100644
index 2e9206c1a..000000000
--- a/src/spicelib/devices/adms/admst/ngspiceMODULEacld.c.xml
+++ /dev/null
@@ -1,95 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-#include "ngspice/ngspice.h"
-#include "ngspice/cktdefs.h"
-#include "$(module)defs.h"
-#include "ngspice/sperror.h"
-#include "ngspice/suffix.h"
-
-int $(module)acLoad(GENmodel *inModel, CKTcircuit *ckt)
-{
- $(module)model *model = ($(module)model*)inModel;
- $(module)instance *here;
- for ( ; model != NULL; model = $(module)nextModel(model) )
- {
- /* loop through all the instances of the model */
- for (here = $(module)instances(model); here != NULL ; here = $(module)nextInstance(here))
- {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- } /* End of MOSFET Instance */
- } /* End of Model Instance */
- return(OK);
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/spicelib/devices/adms/admst/ngspiceMODULEask.c.xml b/src/spicelib/devices/adms/admst/ngspiceMODULEask.c.xml
deleted file mode 100644
index 008f97bd5..000000000
--- a/src/spicelib/devices/adms/admst/ngspiceMODULEask.c.xml
+++ /dev/null
@@ -1,101 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-#include "ngspice/ngspice.h"
-#include "ngspice/const.h"
-#include "ngspice/cktdefs.h"
-#include "$(module)defs.h"
-#include "ngspice/ifsim.h"
-#include "ngspice/sperror.h"
-#include "ngspice/suffix.h"
-
-int $(module)ask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, IFvalue *select)
-{
- $(module)instance *instance = ($(module)instance*)inst;
- NG_IGNOREABLE(ckt);
- NG_IGNOREABLE(value);
- NG_IGNOREABLE(select);
- NG_IGNOREABLE(instance);
- switch (which) {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- case $(module)_ask_%(name) :
- value->rValue = ckt->CKTstate0[inst->GENstate + hide_%(name)];
- return OK;
-
-
-
-
-
-
-
-
-
- default:
- return(-1);
- }
- return(-1);
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/spicelib/devices/adms/admst/ngspiceMODULEbindCSC.c.xml b/src/spicelib/devices/adms/admst/ngspiceMODULEbindCSC.c.xml
deleted file mode 100644
index 395060b50..000000000
--- a/src/spicelib/devices/adms/admst/ngspiceMODULEbindCSC.c.xml
+++ /dev/null
@@ -1,161 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-/**********
-Author: 2020 Francesco Lannutti
-**********/
-
-#include "ngspice/ngspice.h"
-#include "ngspice/cktdefs.h"
-#include "$(module)defs.h"
-#include "ngspice/sperror.h"
-#include "ngspice/klu-binding.h"
-
-int
-$(module)bindCSC (GENmodel *inModel, CKTcircuit *ckt)
-{
- $(module)model *model = ($(module)model *)inModel ;
- $(module)instance *here ;
- BindElement i, *matched, *BindStruct ;
- size_t nz ;
-
- BindStruct = ckt->CKTmatrix->SMPkluMatrix->KLUmatrixBindStructCOO ;
- nz = (size_t)ckt->CKTmatrix->SMPkluMatrix->KLUmatrixLinkedListNZ ;
-
- /* loop through all the $(module) models */
- for ( ; model != NULL ; model = $(module)nextModel(model))
- {
- /* loop through all the instances of the model */
- for (here = $(module)instances(model); here != NULL ; here = $(module)nextInstance(here))
- {
-
-
-
-
-
-
-
- CREATE_KLU_BINDING_TABLE(PTR_J_%s_%s, $(module)%s%sBinding, %sNode, %sNode);
-
- }
- }
-
- return (OK) ;
-}
-
-int
-$(module)bindCSCComplex (GENmodel *inModel, CKTcircuit *ckt)
-{
- $(module)model *model = ($(module)model *)inModel ;
- $(module)instance *here ;
-
- NG_IGNORE (ckt) ;
-
- /* loop through all the $(module) models */
- for ( ; model != NULL ; model = $(module)nextModel(model))
- {
- /* loop through all the instances of the model */
- for (here = $(module)instances(model); here != NULL ; here = $(module)nextInstance(here))
- {
-
-
-
-
-
-
-
- CONVERT_KLU_BINDING_TABLE_TO_COMPLEX(PTR_J_%s_%s, $(module)%s%sBinding, %sNode, %sNode);
-
- }
- }
-
- return (OK) ;
-}
-
-int
-$(module)bindCSCComplexToReal (GENmodel *inModel, CKTcircuit *ckt)
-{
- $(module)model *model = ($(module)model *)inModel ;
- $(module)instance *here ;
-
- NG_IGNORE (ckt) ;
-
- /* loop through all the $(module) models */
- for ( ; model != NULL ; model = $(module)nextModel(model))
- {
- /* loop through all the instances of the model */
- for (here = $(module)instances(model); here != NULL ; here = $(module)nextInstance(here))
- {
-
-
-
-
-
-
-
- CONVERT_KLU_BINDING_TABLE_TO_REAL(PTR_J_%s_%s, $(module)%s%sBinding, %sNode, %sNode);
-
- }
- }
-
- return (OK) ;
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/spicelib/devices/adms/admst/ngspiceMODULEdefs.h.xml b/src/spicelib/devices/adms/admst/ngspiceMODULEdefs.h.xml
deleted file mode 100644
index eca9991f1..000000000
--- a/src/spicelib/devices/adms/admst/ngspiceMODULEdefs.h.xml
+++ /dev/null
@@ -1,396 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-#ifndef $(module)
-#define $(module)
-
-#include "ngspice/cktdefs.h"
-#include "ngspice/ifsim.h"
-#include "ngspice/gendefs.h"
-#include "ngspice/complex.h"
-#include "ngspice/noisedef.h"
-
-
-
-
-#ifdef $(variable)
- #warning conflict: $(variable) is declared as a variable of module '$(module)'.
- #warning conflict: However in the API of ngspice '$(variable)' is also defined as a pragma.
- #warning conflict: Pragma '$(variable)' will be undefined.
- #warning conflict: You can solve the confict by renaming variable '$(variable)' in module '$(module)'.
- #undef $(variable)
-#endif
-
-
-
-
-#ifdef $(variable)
- #warning conflict: $(node) is declared as a node of module '$(module)'.
- #warning conflict: However in the API of ngspice '$(node)' is also defined as a pragma.
- #warning conflict: Pragma '$(node)' will be undefined.
- #warning conflict: You can solve the confict by renaming variable '$(node)' in module '$(module)'.
- #undef $(variable)
-#endif
-
-
-#ifdef NGSPICE_DEBUG_OK
-#define NGSPICE_DEBUG \\
-{ \\
- if(getenv("ngspice_debug")) \\
- $(module)debug(ckt,model,here); \\
- else \\
- { \\
- printf(" To get more info run your simulation after setting shell variable ngspice_debug to 1\\n"); \\
- printf(" For example in sh shell just type: export ngspice_debug=1\\n"); \\
- } \\
-}
-#else
-#define NGSPICE_DEBUG
-#endif
-
-#define EXIT_IF_ISNAN(var) \\
-{ \\
-}
-
-static inline double max(double x,double y) { return ((x)>(y))?(x):(y); }
-static inline double min(double x,double y) { return ((x)<(y))?(x):(y); }
-
-/* ngspice \$simparam variables
- gdev (1/Ohms): Additional conductance to be added to nonlinear branches for conductance homotopy convergence algorithm.
- gmin (1/Ohms): Minimum conductance placed in parallel with nonlinear branches.
- imax (Amps) : Branch current threshold above which the constitutive relation of a nonlinear branch should be linearized.
- imelt (Amps) : Branch current threshold indicating device failure.
- iteration : Iteration number of the analog solver.
- scale : Scale factor for device instance geometry parameters.
- shrink : Optical linear shrink factor.
- simulatorSubversion : The simulator sub-version.
- simulatorVersion : The simulator version.
- sourceScaleFactor : Multiplicative factor for independent sources for source stepping homotopy convergence algorithm.
- tnom degrees (Celsius): Default value of temperature at which model parameters were extracted.
-*/
-
-#define _circuit_gdev ckt->CKTgmin
-#define _circuit_gmin ((ckt->CKTgmin)>(ckt->CKTdiagGmin))?(ckt->CKTgmin):(ckt->CKTdiagGmin)
-#define _circuit_imax 1.0
-#define _circuit_imelt 1.0
-#define _circuit_iteration 1.0
-#define _circuit_scale 1.0
-#define _circuit_shrink 1.0
-#define _circuit_simulatorSubversion 0
-#define _circuit_simulatorVersion 3.5
-#define _circuit_sourceScaleFactor 1.0
-#define _circuit_tnom ckt->CKTnomTemp
-
-#define _circuit_temp ckt->CKTtemp
-#define _scale 1.0
-
-#define _f_cos(val,arg) val = cos(arg);
-#define _d_cos(val,dval,arg) val = cos(arg); dval = (-sin(arg));
-#define _f_sin(val,arg) val = sin(arg);
-#define _d_sin(val,dval,arg) val = sin(arg); dval = (cos(arg));
-#define _f_tan(val,arg) val = tan(arg);
-#define _d_tan(val,dval,arg) val = tan(arg); dval = (1.0/cos(arg)/cos(arg));
-#define _f_asinh(val,arg) val = asinh(arg);
-#define _d_asinh(val,dval,arg) val = asinh(arg); dval = (1.0/sqrt(arg*arg + 1));
-#define _f_hypot(xy,x,y) xy = sqrt((x)*(x)+(y)*(y));
-#define _dx_hypot(dx,xy,x,y) dx = (x)/(xy);
-#define _dy_hypot(dy,xy,x,y) dy = (y)/(xy);
-#define _f_max(xy,x,y) xy = ((x)>(y))?(x):(y);
-#define _dx_max(dx,xy,x,y) dx = ((x)>(y))?1.0:0.0;
-#define _dy_max(dy,xy,x,y) dy = ((x)>(y))?0.0:1.0;
-#define _f_min(xy,x,y) xy = ((x)<(y))?(x):(y);
-#define _dx_min(dx,xy,x,y) dx = ((x)<(y))?1.0:0.0;
-#define _dy_min(dy,xy,x,y) dy = ((x)<(y))?0.0:1.0;
-#define _f_cosh(val,arg) val = cosh(arg);
-#define _d_cosh(val,dval,arg) val = cosh(arg); dval = (sinh(arg));
-#define _f_sinh(val,arg) val = sinh(arg);
-#define _d_sinh(val,dval,arg) val = sinh(arg); dval = (cosh(arg));
-#define _f_tanh(val,arg) val = tanh(arg);
-#define _d_tanh(val,dval,arg) val = tanh(arg); dval = (1.0/cosh(arg)/cosh(arg));
-#define _f_acos(val,arg) val = acos(arg);
-#define _d_acos(val,dval,arg) val = acos(arg); dval = (-1.0/sqrt(1-arg*arg));
-#define _f_asin(val,arg) val = asin(arg);
-#define _d_asin(val,dval,arg) val = asin(arg); dval = (+1.0/sqrt(1-arg*arg));
-#define _f_atan(val,arg) val = atan(arg);
-#define _d_atan(val,dval,arg) val = atan(arg); dval = (+1.0/(1+arg*arg));
-#define _f_logE(val,arg) val = log(arg);
-#define _d_logE(val,dval,arg) val = log(arg); dval = (1.0/arg);
-#define _f_log10(val,arg) val = log10(arg);
-#define _d_log10(val,dval,arg) val = log10(arg); dval = (1.0/arg/log(10));
-#define _f_exp(val,arg) val = exp(arg);
-#define _d_exp(val,dval,arg) val = exp(arg); dval = val;
-#define _f_sqrt(val,arg) val = sqrt(arg);
-#define _d_sqrt(val,dval,arg) val = sqrt(arg); dval = (1.0/val/2.0);
-#define _f_pow(xy,x,y) xy = pow(x,y);
-#define _dx_pow(dx,xy,x,y) dx = (x==0.0)?0.0:((y/x)*xy);
-#define _dy_pow(dy,xy,x,y) dy = (x==0.0)?0.0:((log(x)/exp(0.0))*xy);
-
-#define _f_atan2(xy,x,y) xy = atan2(x,y);
-#define _dx_atan2(dx,x,y) dx = -(y)/((x)*(x)+(y)*(y));
-#define _dy_atan2(dy,x,y) dy = (x)/((x)*(x)+(y)*(y));
-
-#define _f_div1(x,y) ((x)/(y))
-#define _f_div0(xy,x,y) xy=(x)/(y);
-#define _f_div(xy,dx,x,y) dx=1/(y); xy=(x)*dx;
-#define _dx_div(dx,xy,x,y)
-#define _dy_div(dy,dx,xy,x,y) dy = -xy*dx;
-
-#define _f_limexp(val,arg) val = ((arg)<(90)) ? (exp(arg)) : (exp(90)*(1.0+(arg-90)));
-#define _d_limexp(val,dval,arg) val = ((arg)<(90)) ? (exp(arg)) : (exp(90)*(1.0+(arg-90))); dval = val;
-#define _f_fabs(val,arg) val = fabs(arg);
-#define _d_fabs(val,dval,arg) val = fabs(arg); dval = (((val)>=0)?(+1.0):(-1.0));
-#define _f_abs(val) ((val)<(0) ? (-(val)):(val))
-#define _f_floor(val,arg) val = floor(arg);
-#define _f_ceil(val,arg) val = ceil(arg);
-
-/* declarations for $(module) MOSFETs */
-
-/* information needed for each instance */
-typedef struct s$(module)instance {
-
- struct GENinstance gen;
-
-#define $(module)modPtr(inst) (($(module)model *)((inst)->gen.GENmodPtr))
-#define $(module)nextInstance(inst) (($(module)instance *)((inst)->gen.GENnextInstance))
-#define $(module)name gen.GENname
-#define $(module)states gen.GENstate
-
- /* node */
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- /* instance parameters */
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- // noise\n
-
-
-
-
- /* variables */
-
-
-
-
-
-
-
-
-
- /* states */
-
-
-
-
-
- /* pointer to sparse matrix (+ values)*/
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-#define $(module)numStates 0
-
-#ifdef KLU
-
-
-
- BindElement *$(module)%s%sBinding ;
-
-#endif
-
-} $(module)instance ;
-
-enum {
-
-
-
- hide_%(name),
-#define %(name) ((struct hides *)hide_%(name))
-
-
-
- $(module)numStates
-};
-
-/* per model data */
-
-typedef struct s$(module)model { /* model structure */
- struct GENmodel gen;
-
-#define $(module)modType gen.GENmodType
-#define $(module)nextModel(inst) (($(module)model*)((inst)->gen.GENnextModel))
-#define $(module)instances(inst) (($(module)instance*)((inst)->gen.GENinstances))
-#define $(module)modName gen.GENmodName
-
- /* model parameters */
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- /* variable */
-
-
-
-
-
-
-
-
-
-
-} $(module)model;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- $(module)_ask_%(name),
-
-
-
-
-
-
-
-
-
-#include "$(module)ext.h"
-
-#include "$(module).analogfunction.h"
-
-
-#endif /*$(module)*/
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/spicelib/devices/adms/admst/ngspiceMODULEdel.c.xml b/src/spicelib/devices/adms/admst/ngspiceMODULEdel.c.xml
deleted file mode 100644
index 00a7aa96f..000000000
--- a/src/spicelib/devices/adms/admst/ngspiceMODULEdel.c.xml
+++ /dev/null
@@ -1,67 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-#include "ngspice/ngspice.h"
-#include "$(module)defs.h"
-#include "ngspice/sperror.h"
-#include "ngspice/suffix.h"
-
-int
-$(module)delete(GENinstance *gen_inst)
-{
- NG_IGNORE(gen_inst);
- return OK;
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/spicelib/devices/adms/admst/ngspiceMODULEdest.c.xml b/src/spicelib/devices/adms/admst/ngspiceMODULEdest.c.xml
deleted file mode 100644
index eadee1a98..000000000
--- a/src/spicelib/devices/adms/admst/ngspiceMODULEdest.c.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-#include "ngspice/ngspice.h"
-#include "$(module)defs.h"
-#include "ngspice/suffix.h"
-
-void
-$(module)destroy(void)
-{
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/spicelib/devices/adms/admst/ngspiceMODULEext.h.xml b/src/spicelib/devices/adms/admst/ngspiceMODULEext.h.xml
deleted file mode 100644
index f96de98f3..000000000
--- a/src/spicelib/devices/adms/admst/ngspiceMODULEext.h.xml
+++ /dev/null
@@ -1,78 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-#ifndef __$(module)EXT_H
-#define __$(module)EXT_H
-
-
-
-
-#include "$(module)defs.h"
-
-extern int $(module)par(int,IFvalue*,GENinstance*,IFvalue*);
-extern int $(module)mParam(int,IFvalue*,GENmodel*);
-extern int $(module)load(GENmodel*,CKTcircuit*);
-extern int $(module)setup(SMPmatrix*,GENmodel*,CKTcircuit*,int*);
-extern int $(module)guesstopology(SMPmatrix *, CKTcircuit *, $(module)model *, $(module)instance *);
-extern int $(module)temp(GENmodel*,CKTcircuit*);
-extern int $(module)ask(CKTcircuit *,GENinstance*,int,IFvalue*,IFvalue*);
-extern int $(module)mAsk(CKTcircuit*,GENmodel *,int, IFvalue*);
-extern int $(module)acLoad(GENmodel *,CKTcircuit*);
-extern int $(module)convTest(GENmodel *,CKTcircuit*);
-extern int $(module)delete(GENinstance*);
-extern int $(module)getic(GENmodel*,CKTcircuit*);
-extern int $(module)mDelete(GENmodel*);
-extern int $(module)noise(int,int,GENmodel*,CKTcircuit*,Ndata*,double*);
-extern int $(module)pzLoad(GENmodel*,CKTcircuit*,SPcomplex*);
-extern int $(module)trunc(GENmodel*,CKTcircuit*,double*);
-extern int $(module)unsetup(GENmodel*,CKTcircuit*);
-extern void $(module)destroy(void);
-
-#ifdef KLU
-extern int $(module)bindCSC (GENmodel*, CKTcircuit*) ;
-extern int $(module)bindCSCComplex (GENmodel*, CKTcircuit*) ;
-extern int $(module)bindCSCComplexToReal (GENmodel*, CKTcircuit*) ;
-#endif
-
-#endif
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/spicelib/devices/adms/admst/ngspiceMODULEguesstopology.c.xml b/src/spicelib/devices/adms/admst/ngspiceMODULEguesstopology.c.xml
deleted file mode 100644
index 603b11db7..000000000
--- a/src/spicelib/devices/adms/admst/ngspiceMODULEguesstopology.c.xml
+++ /dev/null
@@ -1,363 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-#include "ngspice/ngspice.h"
-#include "ngspice/cktdefs.h"
-#include "ngspice/smpdefs.h"
-#include "$(module)defs.h"
-#include "ngspice/const.h"
-#include "ngspice/sperror.h"
-#include "ngspice/ifsim.h"
-#include "ngspice/suffix.h"
-
-#define ELECTRON_CHARGE 1.602191770e-19 /* C */
-#define BOLTZMANN 1.38062259e-23 /* J/oK */
-
-#define jacobian(a,b) here->PTR_J_##a##_##b##_required=1;
-#define static_jacobian4(p,q,r,s) jacobian(p,r) jacobian(p,s) jacobian(q,r) jacobian(q,s)
-#define static_jacobian2s(p,q,r) jacobian(p,r) jacobian(q,r)
-#define static_jacobian2p(p,r,s) jacobian(p,r) jacobian(p,s)
-#define static_jacobian1(p,r) jacobian(p,r)
-#define dynamic_jacobian4(p,q,r,s) jacobian(p,r) jacobian(p,s) jacobian(q,r) jacobian(q,s)
-#define dynamic_jacobian2s(p,q,r) jacobian(p,r) jacobian(q,r)
-#define dynamic_jacobian2p(p,r,s) jacobian(p,r) jacobian(p,s)
-#define dynamic_jacobian1(p,r) jacobian(p,r)
-#define whitenoise_jacobian4(p,q,r,s)
-#define whitenoise_jacobian2s(p,q,r)
-#define whitenoise_jacobian2p(p,r,s)
-#define whitenoise_jacobian1(p)
-#define flickernoise_jacobian4(p,q,r,s)
-#define flickernoise_jacobian2s(p,q,r)
-#define flickernoise_jacobian2p(p,r,s)
-#define flickernoise_jacobian1(p)
-
-
-int $(module)guesstopology (SMPmatrix *matrix, CKTcircuit *ckt, $(module)model *model, $(module)instance *here)
- /* guess topology */
-{
- NG_IGNOREABLE(matrix);
- NG_IGNOREABLE(ckt);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- int %(name);\n
- double %(name)=0.0/0.0;\n
- char* %(name);\n
-
-
-
-
-
-
- return(OK);
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/spicelib/devices/adms/admst/ngspiceMODULEinit.c.xml b/src/spicelib/devices/adms/admst/ngspiceMODULEinit.c.xml
deleted file mode 100644
index 9e39f7cbc..000000000
--- a/src/spicelib/devices/adms/admst/ngspiceMODULEinit.c.xml
+++ /dev/null
@@ -1,124 +0,0 @@
-
-
-
-
-
-
-
-#include "ngspice/config.h"
-
-#include "ngspice/devdefs.h"
-
-
-
-
-#include "$(module)itf.h"
-#include "$(module)ext.h"
-#include "$(module)init.h"
-
-SPICEdev $(module)info = {
- .DEVpublic = {
- .name = "$module",
- .description = "$module created by adms",
- .terms = &$(module)nSize,
- .numNames = &$(module)nSize,
- .termNames = $(module)names,
- .numInstanceParms = &$(module)pTSize,
- .instanceParms = $(module)pTable,
- .numModelParms = &$(module)mPTSize,
- .modelParms = $(module)mPTable,
- .flags = DEV_DEFAULT,
-
-#ifdef XSPICE
- .cm_func = NULL,
- .num_conn = 0,
- .conn = NULL,
- .num_param = 0,
- .param = NULL,
- .num_inst_var = 0,
- .inst_var = NULL,
-#endif
- },
-
- .DEVparam = $(module)par,
- .DEVmodParam = $(module)mParam,
- .DEVload = $(module)load,
- .DEVsetup = $(module)setup,
- .DEVunsetup = $(module)unsetup,
- .DEVpzSetup = $(module)setup,
- .DEVtemperature = $(module)temp,
- .DEVtrunc = $(module)trunc,
- .DEVfindBranch = NULL,
- .DEVacLoad = $(module)acLoad,
- .DEVaccept = NULL,
- .DEVdestroy = $(module)destroy,
- .DEVmodDelete = $(module)mDelete,
- .DEVdelete = $(module)delete,
- .DEVsetic = NULL,
- .DEVask = $(module)ask,
- .DEVmodAsk = $(module)mAsk,
- .DEVpzLoad = $(module)pzLoad,
- .DEVconvTest = NULL,
- .DEVsenSetup = NULL,
- .DEVsenLoad = NULL,
- .DEVsenUpdate = NULL,
- .DEVsenAcLoad = NULL,
- .DEVsenPrint = NULL,
- .DEVsenTrunc = NULL,
- .DEVdisto = NULL,
- .DEVnoise = NULL,
- .DEVsoaCheck = NULL,
- .DEVinstSize = &$(module)iSize,
- .DEVmodSize = &$(module)mSize,
-
-#ifdef CIDER
- .DEVdump = NULL,
- .DEVacct = NULL,
-#endif
-
-#ifdef KLU
- .DEVbindCSC = $(module)bindCSC,
- .DEVbindCSCComplex = $(module)bindCSCComplex,
- .DEVbindCSCComplexToReal = $(module)bindCSCComplexToReal,
-#endif
-};
-
-
-SPICEdev *
-get_$(module)_info(void)
-{
- return &$(module)info;
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/spicelib/devices/adms/admst/ngspiceMODULEinit.h.xml b/src/spicelib/devices/adms/admst/ngspiceMODULEinit.h.xml
deleted file mode 100644
index 78d732bdc..000000000
--- a/src/spicelib/devices/adms/admst/ngspiceMODULEinit.h.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-#ifndef _$(module)INIT_H
-#define _$(module)INIT_H
-
-extern IFparm $(module)pTable[ ];
-extern IFparm $(module)mPTable[ ];
-extern char *$(module)names[ ];
-extern int $(module)pTSize;
-extern int $(module)mPTSize;
-extern int $(module)nSize;
-extern int $(module)iSize;
-extern int $(module)mSize;
-
-#endif
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/spicelib/devices/adms/admst/ngspiceMODULEitf.h.xml b/src/spicelib/devices/adms/admst/ngspiceMODULEitf.h.xml
deleted file mode 100644
index 7a5c9c9f0..000000000
--- a/src/spicelib/devices/adms/admst/ngspiceMODULEitf.h.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-#ifndef DEV_$(module)
-#define DEV_$(module)
-
-extern SPICEdev *get_$(module)_info(void);
-
-#endif
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/spicelib/devices/adms/admst/ngspiceMODULEload.c.xml b/src/spicelib/devices/adms/admst/ngspiceMODULEload.c.xml
deleted file mode 100644
index c673fbd64..000000000
--- a/src/spicelib/devices/adms/admst/ngspiceMODULEload.c.xml
+++ /dev/null
@@ -1,332 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-#define NGSPICE_DEBUG_OK
-
-
-
-
-#include "ngspice/ngspice.h"
-#include "ngspice/cktdefs.h"
-#include "$(module)defs.h"
-#include "ngspice/const.h"
-#include "ngspice/trandefs.h"
-#include "ngspice/sperror.h"
-#include "ngspice/devdefs.h"
-#include "ngspice/suffix.h"
-
-/*fixme: noise not implemented in ngspice*/
-#define ngspice_flickernoise(p,n,mag,freq,info)\\
-{\\
-}
-#define ngspice_whitenoise(p,n,mag,info)\\
-{\\
-}
-
-#define NP(p) *(ckt->CKTrhsOld+here->p ## Node)
-#define BP(p,n) (NP(p)-NP(n))
-#define DBGNODE(p) printf(#p "=%i - v=%e\\n",here->p ## Node,NP(p));
-
-
-
-#define _STATIC
-#define _DYNAMIC
-#define _DERIVATE
-
-#define _load_static_residual2(p,n,v)\\
- *(ckt->CKTrhs+here->p ## Node)-=v;\\
- *(ckt->CKTrhs+here->n ## Node)+=v;
-#define _load_static_residual1(p,v)\\
- *(ckt->CKTrhs+here->p ## Node)-=v;
-
-#define _load_static_jacobian4(Sp,Sn,Pp,Pn,v)\\
- _load_static_residual2(Sp,Sn,-v*BP(Pp,Pn))\\
- *(here->PTR_J_ ## Sp ## _ ## Pp)+=v;\\
- *(here->PTR_J_ ## Sn ## _ ## Pn)+=v;\\
- *(here->PTR_J_ ## Sp ## _ ## Pn)-=v;\\
- *(here->PTR_J_ ## Sn ## _ ## Pp)-=v;\\
- (here->JSVAL_ ## Sp ## _ ## Pp)+=v;\\
- (here->JSVAL_ ## Sn ## _ ## Pn)+=v;\\
- (here->JSVAL_ ## Sp ## _ ## Pn)-=v;\\
- (here->JSVAL_ ## Sn ## _ ## Pp)-=v;
-#define _load_static_jacobian2s(Sp,Sn,Pp,v)\\
- _load_static_residual2(Sp,Sn,-v*NP(Pp))\\
- *(here->PTR_J_ ## Sp ## _ ## Pp)+=v;\\
- *(here->PTR_J_ ## Sn ## _ ## Pp)-=v;\\
- (here->JSVAL_ ## Sp ## _ ## Pp)+=v;\\
- (here->JSVAL_ ## Sn ## _ ## Pp)-=v;
-#define _load_static_jacobian2p(Sp,Pp,Pn,v)\\
- _load_static_residual1(Sp,-v*BP(Pp,Pn))\\
- *(here->PTR_J_ ## Sp ## _ ## Pp)+=v;\\
- *(here->PTR_J_ ## Sp ## _ ## Pn)-=v;\\
- (here->JSVAL_ ## Sp ## _ ## Pp)+=v;\\
- (here->JSVAL_ ## Sp ## _ ## Pn)-=v;
-#define _load_static_jacobian1(Sp,Pp,v)\\
- _load_static_residual1(Sp,-v*NP(Pp))\\
- *(here->PTR_J_ ## Sp ## _ ## Pp)+=v;\\
- (here->JSVAL_ ## Sp ## _ ## Pp)+=v;
-
-#define _load_dynamic_residual2(p,n,v)\\
-if(ChargeComputationNeeded)\\
-{\\
- int error;\\
- double unused;\\
- *(ckt->CKTstate0+here->state_##p##_##n)=v;\\
- if(ckt->CKTmode & MODEINITTRAN)\\
- *(ckt->CKTstate1+here->state_##p##_##n)=*(ckt->CKTstate0+here->state_##p##_##n);\\
- error = NIintegrate(ckt,&unused,&unused,0.0,here->state_##p##_##n);\\
- if(error) return(error);\\
- if(ckt->CKTmode & MODEINITTRAN)\\
- *(ckt->CKTstate1+here->state_##p##_##n+1) = *(ckt->CKTstate0+here->state_##p##_##n+1);\\
- *(ckt->CKTrhs+here->p##Node)-=*(ckt->CKTstate0+here->state_##p##_##n+1);\\
- *(ckt->CKTrhs+here->n##Node)+=*(ckt->CKTstate0+here->state_##p##_##n+1);\\
-}
-#define _load_dynamic_residual1(p,v)\\
-if(ChargeComputationNeeded)\\
-{\\
- int error;\\
- double unused;\\
- *(ckt->CKTstate0+here->state_##p##_GND)=v;\\
- if(ckt->CKTmode & MODEINITTRAN)\\
- *(ckt->CKTstate1+here->state_##p##_GND)=*(ckt->CKTstate0+here->state_##p##_GND);\\
- error = NIintegrate(ckt,&unused,&unused,0.0,here->state_##p##_GND);\\
- if(error) return(error);\\
- if(ckt->CKTmode & MODEINITTRAN)\\
- *(ckt->CKTstate1+here->state_##p##_GND+1) = *(ckt->CKTstate0+here->state_##p##_GND+1);\\
- *(ckt->CKTrhs+here->p##Node)-=*(ckt->CKTstate0+here->state_##p##_GND+1);\\
-}
-
-#define _load_dynamic_jacobian4(Sp,Sn,Pp,Pn,v)\\
-if(ChargeComputationNeeded)\\
-{\\
- double geq=(v)*ckt->CKTag[0];\\
- double ceq=geq*BP(Pp,Pn);\\
- *(ckt->CKTrhs+here->Sp##Node)+=ceq;\\
- *(ckt->CKTrhs+here->Sn##Node)-=ceq;\\
- *(here->PTR_J_ ## Sp ## _ ## Pp)+=geq;\\
- *(here->PTR_J_ ## Sn ## _ ## Pn)+=geq;\\
- *(here->PTR_J_ ## Sp ## _ ## Pn)-=geq;\\
- *(here->PTR_J_ ## Sn ## _ ## Pp)-=geq;\\
-}\\
- (here->JDVAL_ ## Sp ## _ ## Pp)+=v;\\
- (here->JDVAL_ ## Sn ## _ ## Pn)+=v;\\
- (here->JDVAL_ ## Sp ## _ ## Pn)-=v;\\
- (here->JDVAL_ ## Sn ## _ ## Pp)-=v;
-#define _load_dynamic_jacobian2s(Sp,Sn,Pp,v)\\
-if(ChargeComputationNeeded)\\
-{\\
- double geq=(v)*ckt->CKTag[0];\\
- double ceq=geq*NP(Pp);\\
- *(ckt->CKTrhs+here->Sp##Node)+=ceq;\\
- *(ckt->CKTrhs+here->Sn##Node)-=ceq;\\
- *(here->PTR_J_ ## Sp ## _ ## Pp)+=geq;\\
- *(here->PTR_J_ ## Sn ## _ ## Pp)-=geq;\\
-}\\
- (here->JDVAL_ ## Sp ## _ ## Pp)+=v;\\
- (here->JDVAL_ ## Sn ## _ ## Pp)-=v;
-#define _load_dynamic_jacobian2p(Sp,Pp,Pn,v)\\
-if(ChargeComputationNeeded)\\
-{\\
- double geq=(v)*ckt->CKTag[0];\\
- double ceq=geq*BP(Pp,Pn);\\
- *(ckt->CKTrhs+here->Sp##Node)+=ceq;\\
- *(here->PTR_J_ ## Sp ## _ ## Pp)+=geq;\\
- *(here->PTR_J_ ## Sp ## _ ## Pn)-=geq;\\
-}\\
- (here->JDVAL_ ## Sp ## _ ## Pp)+=v;\\
- (here->JDVAL_ ## Sp ## _ ## Pn)-=v;
-#define _load_dynamic_jacobian1(Sp,Pp,v)\\
-if(ChargeComputationNeeded)\\
-{\\
- double geq=(v)*ckt->CKTag[0];\\
- double ceq=geq*NP(Pp);\\
- *(ckt->CKTrhs+here->Sp##Node)+=ceq;\\
- *(here->PTR_J_ ## Sp ## _ ## Pp)+=geq;\\
-}\\
-(here->JDVAL_ ## Sp ## _ ## Pp)+=v;
-
-int $(module)load(GENmodel *inModel, CKTcircuit *ckt)
- /* actually load the current value into the
- * sparse matrix previously provided
- */
-{
- $(module)model *model = ($(module)model*)inModel;
- $(module)instance *here;
- int ChargeComputationNeeded =
- ((ckt->CKTmode & (MODEAC | MODETRAN | MODEINITSMSIG)) ||
- ((ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC)))
- ? 1 : 0;
-
- for ( ; model != NULL; model = $(module)nextModel(model) )
- {
- /* loop through all the instances of the model */
- for (here = $(module)instances(model); here != NULL ; here = $(module)nextInstance(here))
- {
-{
-
-
-
-
-
-
-
-
-
-
-}
-{
-#include "$module.hxx"
-}
- } /* End of Instance */
- } /* End of Model */
- return(OK);
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/spicelib/devices/adms/admst/ngspiceMODULEmask.c.xml b/src/spicelib/devices/adms/admst/ngspiceMODULEmask.c.xml
deleted file mode 100644
index 1c519b3f3..000000000
--- a/src/spicelib/devices/adms/admst/ngspiceMODULEmask.c.xml
+++ /dev/null
@@ -1,82 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-#include "ngspice/ngspice.h"
-#include "ngspice/const.h"
-#include "ngspice/ifsim.h"
-#include "ngspice/cktdefs.h"
-#include "ngspice/devdefs.h"
-#include "$(module)defs.h"
-#include "ngspice/sperror.h"
-#include "ngspice/suffix.h"
-
-int $(module)mAsk(CKTcircuit *ckt, GENmodel *inst, int which, IFvalue *value)
-{
- $(module)model *model = ($(module)model *)inst;
- NG_IGNOREABLE(ckt);
- switch (which) {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- default:
- return(-1);
- }
- return(-1);
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/spicelib/devices/adms/admst/ngspiceMODULEmdel.c.xml b/src/spicelib/devices/adms/admst/ngspiceMODULEmdel.c.xml
deleted file mode 100644
index 55267306f..000000000
--- a/src/spicelib/devices/adms/admst/ngspiceMODULEmdel.c.xml
+++ /dev/null
@@ -1,67 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-#include "ngspice/ngspice.h"
-#include "$(module)defs.h"
-#include "ngspice/sperror.h"
-#include "ngspice/suffix.h"
-
-int
-$(module)mDelete(GENmodel *gen_model)
-{
- NG_IGNORE(gen_model);
- return OK;
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/spicelib/devices/adms/admst/ngspiceMODULEmpar.c.xml b/src/spicelib/devices/adms/admst/ngspiceMODULEmpar.c.xml
deleted file mode 100644
index 2b5170f93..000000000
--- a/src/spicelib/devices/adms/admst/ngspiceMODULEmpar.c.xml
+++ /dev/null
@@ -1,82 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-#include "ngspice/ngspice.h"
-#include "ngspice/const.h"
-#include "ngspice/ifsim.h"
-#include "$(module)defs.h"
-#include "ngspice/sperror.h"
-#include "ngspice/suffix.h"
-
-int $(module)mParam(int param, IFvalue *value, GENmodel *inMod)
-{
- $(module)model *mod = ($(module)model*)inMod;
- switch (param) {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- default:
- return(-1);
- }
- return(OK);
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/spicelib/devices/adms/admst/ngspiceMODULEnoise.c.xml b/src/spicelib/devices/adms/admst/ngspiceMODULEnoise.c.xml
deleted file mode 100644
index eb71f4823..000000000
--- a/src/spicelib/devices/adms/admst/ngspiceMODULEnoise.c.xml
+++ /dev/null
@@ -1,87 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-#include "ngspice/ngspice.h"
-#include "$(module)defs.h"
-#include "ngspice/cktdefs.h"
-#include "ngspice/iferrmsg.h"
-#include "ngspice/noisedef.h"
-#include "ngspice/suffix.h"
-
-extern void NevalSrc();
-extern double Nintegrate();
-
-static char* $(module)nNames []= {
-
-
-
-};
-
-int
-$(module)noise (int mode, int operation, GENmodel *genmodel, CKTcircuit *ckt, Ndata *data, double *OnDens)
-{
- $(module)model *firstModel = ($(module)model *) genmodel;
- $(module)model *model;
- $(module)instance *inst;
- for (model=firstModel; model != NULL; model=$(module)nextModel(model))
- {
- for (inst=$(module)instances(model); inst != NULL; inst=$(module)nextInstance(inst))
- {
- switch (operation)
- {
- case N_OPEN:
- break;
- case N_CALC:
- switch (mode)
- {
- case N_DENS:
- break;
- case INT_NOIZ:
- break;
- }
- break;
- case N_CLOSE:
- return (OK);
- break;
- }
- }
- }
- return(OK);
-}
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/spicelib/devices/adms/admst/ngspiceMODULEpar.c.xml b/src/spicelib/devices/adms/admst/ngspiceMODULEpar.c.xml
deleted file mode 100644
index e05987c36..000000000
--- a/src/spicelib/devices/adms/admst/ngspiceMODULEpar.c.xml
+++ /dev/null
@@ -1,83 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-#include "ngspice/ngspice.h"
-#include "ngspice/const.h"
-#include "ngspice/ifsim.h"
-#include "$(module)defs.h"
-#include "ngspice/sperror.h"
-#include "ngspice/suffix.h"
-
-int $(module)par(int param, IFvalue *value, GENinstance *inst, IFvalue *select)
-{
- $(module)instance *myinstance = ($(module)instance*)inst;
- NG_IGNOREABLE(value);
- NG_IGNOREABLE(select);
- NG_IGNOREABLE(myinstance);
- switch (param) {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- default:
- return(-1);
- }
- return(OK);
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/spicelib/devices/adms/admst/ngspiceMODULEpzld.c.xml b/src/spicelib/devices/adms/admst/ngspiceMODULEpzld.c.xml
deleted file mode 100644
index d43dec4b2..000000000
--- a/src/spicelib/devices/adms/admst/ngspiceMODULEpzld.c.xml
+++ /dev/null
@@ -1,106 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-#include "ngspice/ngspice.h"
-#include "ngspice/cktdefs.h"
-#include "ngspice/complex.h"
-#include "$(module)defs.h"
-#include "ngspice/sperror.h"
-#include "ngspice/suffix.h"
-
-int $(module)pzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s)
-{
- $(module)model *model = ($(module)model*)inModel;
- $(module)instance *here;
- NG_IGNOREABLE(ckt);
- for ( ; model != NULL; model = $(module)nextModel(model) )
- {
- /* loop through all the instances of the model */
- for (here = $(module)instances(model); here != NULL ; here = $(module)nextInstance(here))
- {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- } /* End of MOSFET Instance */
- } /* End of Model Instance */
- return(OK);
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/spicelib/devices/adms/admst/ngspiceMODULEsetup.c.xml b/src/spicelib/devices/adms/admst/ngspiceMODULEsetup.c.xml
deleted file mode 100644
index 5fd893635..000000000
--- a/src/spicelib/devices/adms/admst/ngspiceMODULEsetup.c.xml
+++ /dev/null
@@ -1,221 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-#include "ngspice/ngspice.h"
-#include "ngspice/cktdefs.h"
-#include "ngspice/smpdefs.h"
-#include "$(module)defs.h"
-#include "ngspice/const.h"
-#include "ngspice/sperror.h"
-#include "ngspice/ifsim.h"
-#include "ngspice/suffix.h"
-
-int $(module)setup (SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
- /* load the $(module) device structure with those pointers needed later
- * for fast matrix loading
- */
-{
- $(module)model *model = ($(module)model*)inModel;
- $(module)instance *here;
-
- /* loop through all the $(module) device models */
- for ( ;model != NULL ;model = $(module)nextModel(model) )
- {
-
-
-
-
-
-
-
-
-
-
-
-
-
- if(model->%s_Given == FALSE) model->%s=%s;
-
-
-
-
- for ( here = $(module)instances(model) ;here != NULL ; here = $(module)nextInstance(here) )
- {
-
-
-
-
-
-
-
-
-
-
-
-
-
- if(here->%s_Given == FALSE) here->%s=%s;
-
-
-
-
- /* External Nodes, connected ? */
-
- here->%(name)Node_connected = (here->%(name)Node >= 0);
-
-
- /* Internal Nodes */
- {
-
-
-
-
-
-
-
- here->%sNode = -1;
- here->%(name)Node_mine = 0;
-
- }
-
- ((GENinstance*)here)->GENstate = *states;
- *states += $(module)numStates;
- /* set states */
-
-
-
- here->state_%s_%s = *states; *states += 2;
-
- /* set Sparse Matrix Pointers */
-
-
-
- here->PTR_J_%s_%s_required=0;
-
-
- $(module)guesstopology(matrix,ckt,model,here);
-
- /* Internal Nodes */
- {
- int error;
- CKTnode *tmp;
-
-
-
-
-
-
- if(here->%(name)Node == -1)
- {
- error=CKTmkVolt(ckt,&tmp,here->$(module)name,"X%(name)X");
- if(error) return(error);
- here->%(name)Node = tmp->number;
- here->%(name)Node_mine = 1;
- }
-
- }
-
-
-
- if(here->PTR_J_%s_%s_required==1)
- {
-
-
-
-
- here->PTR_J_%s_%s=SMPmakeElt(matrix,here->%sNode,here->%sNode);
- }
-
-
- }
- }
- return(OK);
-}
-
-
-int
-$(module)unsetup(GENmodel *inModel, CKTcircuit *ckt)
-{
- $(module)model *model = ($(module)model*)inModel;
- $(module)instance *here;
-
- /* loop through all the $(module) device models */
- for ( ;model != NULL ;model = $(module)nextModel(model) )
- {
- for ( here = $(module)instances(model) ;here != NULL ; here = $(module)nextInstance(here) )
- {
-
- if (here->%(name)Node_mine) {
- if (here->%(name)Node > 0)
- CKTdltNNum(ckt, here->%(name)Node);
- here->%(name)Node_mine = 0;
- }
- if (!here->%(name)Node_connected)
- here->%(name)Node = -1;
-
-
- if (here->%(name)Node_mine)
- if (here->%(name)Node > 0)
- CKTdltNNum(ckt, here->%(name)Node);
- here->%(name)Node = -1;
- here->%(name)Node_mine = 0;
-
- }
- }
- return OK;
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/spicelib/devices/adms/admst/ngspiceMODULEtemp.c.xml b/src/spicelib/devices/adms/admst/ngspiceMODULEtemp.c.xml
deleted file mode 100644
index b40c18aa1..000000000
--- a/src/spicelib/devices/adms/admst/ngspiceMODULEtemp.c.xml
+++ /dev/null
@@ -1,88 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-#include "ngspice/ngspice.h"
-#include "ngspice/cktdefs.h"
-#include "ngspice/smpdefs.h"
-#include "$(module)defs.h"
-#include "ngspice/const.h"
-#include "ngspice/sperror.h"
-#include "ngspice/ifsim.h"
-#include "ngspice/suffix.h"
-
-#define _STATIC
-#define _DYNAMIC
-
-int $(module)temp(GENmodel *inModel, CKTcircuit *ckt)
-{
- $(module)model *model = ($(module)model*)inModel;
- $(module)instance *here;
- NG_IGNOREABLE(ckt);
- for ( ; model != NULL; model = $(module)nextModel(model) )
- {
-
-
- /* loop through all the instances of the model */
- for (here = $(module)instances(model); here != NULL ; here = $(module)nextInstance(here))
- {
-
-
- } /* End of MOSFET Instance */
- } /* End of Model Instance */
- return(OK);
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/spicelib/devices/adms/admst/ngspiceMODULEtrunc.c.xml b/src/spicelib/devices/adms/admst/ngspiceMODULEtrunc.c.xml
deleted file mode 100644
index 4b5152c8f..000000000
--- a/src/spicelib/devices/adms/admst/ngspiceMODULEtrunc.c.xml
+++ /dev/null
@@ -1,100 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-#include "ngspice/ngspice.h"
-#include "ngspice/cktdefs.h"
-#include "$(module)defs.h"
-#include "ngspice/sperror.h"
-#include "ngspice/suffix.h"
-
-int $(module)trunc(GENmodel *inModel, CKTcircuit *ckt, double *timeStep)
-{
- $(module)model *model = ($(module)model*)inModel;
- $(module)instance *here;
-
-#ifdef STEPDEBUG
- double debugtemp;
-#endif /* STEPDEBUG */
-
- for ( ; model != NULL; model = $(module)nextModel(model) )
- {
- /* loop through all the instances of the model */
- for (here = $(module)instances(model); here != NULL ; here = $(module)nextInstance(here))
- {
-#ifdef STEPDEBUG
- debugtemp = *timeStep;
-#endif /* STEPDEBUG */
-
-
-
-
- CKTterr(here->state_%s_%s, ckt, timeStep);
-
-
-
-#ifdef STEPDEBUG
- if(debugtemp != *timeStep)
- { printf("device %%s reduces step from %%g to %%g\\n",
- here->$(module)name,debugtemp,*timeStep);
- }
-#endif /* STEPDEBUG */
-
- } /* End of Instance */
- } /* End of Model */
- return(OK);
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/spicelib/devices/adms/admst/ngspiceMakefile.am.xml b/src/spicelib/devices/adms/admst/ngspiceMakefile.am.xml
deleted file mode 100644
index 0751491b2..000000000
--- a/src/spicelib/devices/adms/admst/ngspiceMakefile.am.xml
+++ /dev/null
@@ -1,217 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-## Process this file with automake to produce Makefile.in
-
-ADMSXMLINTERFACE=\$(srcdir)/../admst
-
-noinst_LTLIBRARIES = lib$(module).la
-
-BUILT_SOURCES = \\
- $(module).c \\
- $(module).hxx \\
- $(module)acld.c \\
- $(module).analogfunction.c \\
- $(module)ask.c \\
- $(module)defs.h \\
- $(module)del.c \\
- $(module)dest.c \\
- $(module)ext.h \\
- $(module)guesstopology.c \\
- $(module)init.c \\
- $(module)init.h \\
- $(module)itf.h \\
- $(module)load.c \\
- $(module)mask.c \\
- $(module)mdel.c \\
- $(module)mpar.c \\
- $(module)par.c \\
- $(module)pzld.c \\
- $(module)setup.c \\
- $(module)temp.c \\
- $(module)trunc.c
-
-if KLU_WANTED
-BUILT_SOURCES += $(module)bindCSC.c
-endif
-
-lib$(module)_la_SOURCES = \\
- \$(BUILT_SOURCES)
-
-CLEANFILES = \\
- \$(BUILT_SOURCES) \\
- $(module)noise.c \\
- .$(module).va.adms \\
- .adms.implicit.xml \\
- .interface.xml \\
- constants.vams \\
- disciplines.vams \\
- *.h \\
- *.xml
-
-#TODO (not implemented) \\
- $(module)conv.c \\
- $(module)getic.c
-
-AM_CPPFLAGS = @AM_CPPFLAGS@ -I\$(top_srcdir)/src/include
-AM_CFLAGS = \$(STATIC)
-
-MAINTAINERCLEANFILES = Makefile.in \\
- Makefile.am
-
-DISTCLEANFILES = Makefile.am \\
- Makefile.in
-
-if KLU_WANTED
-\%.c \%.hxx \\
- \%acld.c \%ask.c \%bindCSC.c \%defs.h \%del.c \%dest.c \%ext.h \%guesstopology.c \\
- \%init.c \%init.h \%itf.h \%load.c \%mask.c \%mdel.c \%mpar.c \%par.c \\
- \%pzld.c \%setup.c \%temp.c \%trunc.c \\
- : \$(srcdir)/admsva/\%.va \\
- \$(ADMSXMLINTERFACE)/ngspiceVersion.xml \\
- \$(ADMSXMLINTERFACE)/ngspiceMODULEbindCSC.c.xml \\
- \$(ADMSXMLINTERFACE)/ngspiceMODULEitf.h.xml \\
- \$(ADMSXMLINTERFACE)/ngspiceMODULEinit.c.xml \\
- \$(ADMSXMLINTERFACE)/ngspiceMODULEinit.h.xml \\
- \$(ADMSXMLINTERFACE)/ngspiceMODULEext.h.xml \\
- \$(ADMSXMLINTERFACE)/ngspiceMODULEdefs.h.xml \\
- \$(ADMSXMLINTERFACE)/ngspiceMODULEask.c.xml \\
- \$(ADMSXMLINTERFACE)/ngspiceMODULEmask.c.xml \\
- \$(ADMSXMLINTERFACE)/ngspiceMODULEpar.c.xml \\
- \$(ADMSXMLINTERFACE)/ngspiceMODULEmpar.c.xml \\
- \$(ADMSXMLINTERFACE)/ngspiceMODULEload.c.xml \\
- \$(ADMSXMLINTERFACE)/ngspiceMODULEacld.c.xml \\
- \$(ADMSXMLINTERFACE)/ngspiceMODULEpzld.c.xml \\
- \$(ADMSXMLINTERFACE)/ngspiceMODULEtemp.c.xml \\
- \$(ADMSXMLINTERFACE)/ngspiceMODULEtrunc.c.xml \\
- \$(ADMSXMLINTERFACE)/ngspiceMODULEsetup.c.xml \\
- \$(ADMSXMLINTERFACE)/ngspiceMODULEdel.c.xml \\
- \$(ADMSXMLINTERFACE)/ngspiceMODULEmdel.c.xml \\
- \$(ADMSXMLINTERFACE)/ngspiceMODULEdest.c.xml \\
- \$(ADMSXMLINTERFACE)/ngspiceMODULEnoise.c.xml \\
- \$(ADMSXMLINTERFACE)/ngspiceMODULEguesstopology.c.xml \\
- \$(ADMSXMLINTERFACE)/ngspiceMODULE.hxx.xml \\
- \$(ADMSXMLINTERFACE)/ngspiceMODULE.c.xml
- \$(ADMSXML) -I\$(srcdir) -I\$(srcdir)/admsva \$< \\
- -e \$(ADMSXMLINTERFACE)/ngspiceVersion.xml \\
- -e \$(ADMSXMLINTERFACE)/ngspiceMODULEbindCSC.c.xml \\
- -e \$(ADMSXMLINTERFACE)/ngspiceMODULEitf.h.xml \\
- -e \$(ADMSXMLINTERFACE)/ngspiceMODULEinit.c.xml \\
- -e \$(ADMSXMLINTERFACE)/ngspiceMODULEinit.h.xml \\
- -e \$(ADMSXMLINTERFACE)/ngspiceMODULEext.h.xml \\
- -e \$(ADMSXMLINTERFACE)/ngspiceMODULEdefs.h.xml \\
- -e \$(ADMSXMLINTERFACE)/ngspiceMODULEask.c.xml \\
- -e \$(ADMSXMLINTERFACE)/ngspiceMODULEmask.c.xml \\
- -e \$(ADMSXMLINTERFACE)/ngspiceMODULEpar.c.xml \\
- -e \$(ADMSXMLINTERFACE)/ngspiceMODULEmpar.c.xml \\
- -e \$(ADMSXMLINTERFACE)/ngspiceMODULEload.c.xml \\
- -e \$(ADMSXMLINTERFACE)/ngspiceMODULEacld.c.xml \\
- -e \$(ADMSXMLINTERFACE)/ngspiceMODULEpzld.c.xml \\
- -e \$(ADMSXMLINTERFACE)/ngspiceMODULEtemp.c.xml \\
- -e \$(ADMSXMLINTERFACE)/ngspiceMODULEtrunc.c.xml \\
- -e \$(ADMSXMLINTERFACE)/ngspiceMODULEsetup.c.xml \\
- -e \$(ADMSXMLINTERFACE)/ngspiceMODULEdel.c.xml \\
- -e \$(ADMSXMLINTERFACE)/ngspiceMODULEmdel.c.xml \\
- -e \$(ADMSXMLINTERFACE)/ngspiceMODULEdest.c.xml \\
- -e \$(ADMSXMLINTERFACE)/ngspiceMODULEnoise.c.xml \\
- -e \$(ADMSXMLINTERFACE)/ngspiceMODULEguesstopology.c.xml \\
- -e \$(ADMSXMLINTERFACE)/ngspiceMODULE.hxx.xml \\
- -e \$(ADMSXMLINTERFACE)/ngspiceMODULE.c.xml
-else
-\%.c \%.hxx \\
- \%acld.c \%.analogfunction.c \%ask.c \%defs.h \%del.c \%dest.c \%ext.h \%guesstopology.c \\
- \%init.c \%init.h \%itf.h \%load.c \%mask.c \%mdel.c \%mpar.c \%par.c \\
- \%pzld.c \%setup.c \%temp.c \%trunc.c \\
- : \$(srcdir)/admsva/\%.va \\
- \$(ADMSXMLINTERFACE)/adms.implicit.xml \\
- \$(ADMSXMLINTERFACE)/ngspiceVersion.xml \\
- \$(ADMSXMLINTERFACE)/analogfunction.xml \\
- \$(ADMSXMLINTERFACE)/ngspiceMODULEitf.h.xml \\
- \$(ADMSXMLINTERFACE)/ngspiceMODULEinit.c.xml \\
- \$(ADMSXMLINTERFACE)/ngspiceMODULEinit.h.xml \\
- \$(ADMSXMLINTERFACE)/ngspiceMODULEext.h.xml \\
- \$(ADMSXMLINTERFACE)/ngspiceMODULEdefs.h.xml \\
- \$(ADMSXMLINTERFACE)/ngspiceMODULEask.c.xml \\
- \$(ADMSXMLINTERFACE)/ngspiceMODULEmask.c.xml \\
- \$(ADMSXMLINTERFACE)/ngspiceMODULEpar.c.xml \\
- \$(ADMSXMLINTERFACE)/ngspiceMODULEmpar.c.xml \\
- \$(ADMSXMLINTERFACE)/ngspiceMODULEload.c.xml \\
- \$(ADMSXMLINTERFACE)/ngspiceMODULEacld.c.xml \\
- \$(ADMSXMLINTERFACE)/ngspiceMODULEpzld.c.xml \\
- \$(ADMSXMLINTERFACE)/ngspiceMODULEtemp.c.xml \\
- \$(ADMSXMLINTERFACE)/ngspiceMODULEtrunc.c.xml \\
- \$(ADMSXMLINTERFACE)/ngspiceMODULEsetup.c.xml \\
- \$(ADMSXMLINTERFACE)/ngspiceMODULEdel.c.xml \\
- \$(ADMSXMLINTERFACE)/ngspiceMODULEmdel.c.xml \\
- \$(ADMSXMLINTERFACE)/ngspiceMODULEdest.c.xml \\
- \$(ADMSXMLINTERFACE)/ngspiceMODULEnoise.c.xml \\
- \$(ADMSXMLINTERFACE)/ngspiceMODULEguesstopology.c.xml \\
- \$(ADMSXMLINTERFACE)/ngspiceMODULE.hxx.xml \\
- \$(ADMSXMLINTERFACE)/ngspiceMODULE.c.xml
- \$(ADMSXML) -I\$(srcdir) -I\$(srcdir)/admsva \$< \\
- -x \\
- -e \$(ADMSXMLINTERFACE)/adms.implicit.xml \\
- -e \$(ADMSXMLINTERFACE)/ngspiceVersion.xml \\
- -e \$(ADMSXMLINTERFACE)/analogfunction.xml \\
- -e \$(ADMSXMLINTERFACE)/ngspiceMODULEitf.h.xml \\
- -e \$(ADMSXMLINTERFACE)/ngspiceMODULEinit.c.xml \\
- -e \$(ADMSXMLINTERFACE)/ngspiceMODULEinit.h.xml \\
- -e \$(ADMSXMLINTERFACE)/ngspiceMODULEext.h.xml \\
- -e \$(ADMSXMLINTERFACE)/ngspiceMODULEdefs.h.xml \\
- -e \$(ADMSXMLINTERFACE)/ngspiceMODULEask.c.xml \\
- -e \$(ADMSXMLINTERFACE)/ngspiceMODULEmask.c.xml \\
- -e \$(ADMSXMLINTERFACE)/ngspiceMODULEpar.c.xml \\
- -e \$(ADMSXMLINTERFACE)/ngspiceMODULEmpar.c.xml \\
- -e \$(ADMSXMLINTERFACE)/ngspiceMODULEload.c.xml \\
- -e \$(ADMSXMLINTERFACE)/ngspiceMODULEacld.c.xml \\
- -e \$(ADMSXMLINTERFACE)/ngspiceMODULEpzld.c.xml \\
- -e \$(ADMSXMLINTERFACE)/ngspiceMODULEtemp.c.xml \\
- -e \$(ADMSXMLINTERFACE)/ngspiceMODULEtrunc.c.xml \\
- -e \$(ADMSXMLINTERFACE)/ngspiceMODULEsetup.c.xml \\
- -e \$(ADMSXMLINTERFACE)/ngspiceMODULEdel.c.xml \\
- -e \$(ADMSXMLINTERFACE)/ngspiceMODULEmdel.c.xml \\
- -e \$(ADMSXMLINTERFACE)/ngspiceMODULEdest.c.xml \\
- -e \$(ADMSXMLINTERFACE)/ngspiceMODULEnoise.c.xml \\
- -e \$(ADMSXMLINTERFACE)/ngspiceMODULEguesstopology.c.xml \\
- -e \$(ADMSXMLINTERFACE)/ngspiceMODULE.hxx.xml \\
- -e \$(ADMSXMLINTERFACE)/ngspiceMODULE.c.xml
-endif
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/spicelib/devices/adms/admst/ngspiceVersion.xml b/src/spicelib/devices/adms/admst/ngspiceVersion.xml
deleted file mode 100644
index 413b0c358..000000000
--- a/src/spicelib/devices/adms/admst/ngspiceVersion.xml
+++ /dev/null
@@ -1,2299 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- #if defined(_DYNAMIC)\n
-
- int %s;\n
- double %s=0.0/0.0;\n
- char* %s;\n
-
-
-
-
-
-
-
-
-
-
-
-
-
- #endif /*_DYNAMIC*/\n
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- int %(name);\n
- double %(name);\n
- char* %(name);\n
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- %s
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/spicelib/devices/adms/bsimbulk/admsva/bsimbulk.va b/src/spicelib/devices/adms/bsimbulk/admsva/bsimbulk.va
deleted file mode 100644
index 11c13895f..000000000
--- a/src/spicelib/devices/adms/bsimbulk/admsva/bsimbulk.va
+++ /dev/null
@@ -1,4399 +0,0 @@
-// ****************************************************************************
-// * BSIM-BULK 106.2.0 released by Chetan Gupta on 6/30/2017 *
-// * BSIM Bulk MOSFET Model Equations (Verilog-A) *
-// ****************************************************************************
-
-// ****************************************************************************
-// * Copyright 2017 Regents of the University of California *
-// * All rights reserved. *
-// * *
-// * Project director: Prof. Chenming Hu *
-// * *
-// * Current developers: Chetan Gupta (Ph.D. student, IIT Kanpur) *
-// * Prof. Yogesh Chauhan (IIT Kanpur) *
-// * Dr. Harshit Agarwal (Postdoc, UC Berkeley) *
-// * Dr. Huan-Lin Chang (Postdoc, UC Berkeley) *
-// * Dr. Pragya Kushwaha (Postdoc, UC Berkeley) *
-// * Juan Duarte (Ph.D. student, UC Berkeley) *
-// * Yen-Kai Lin (Ph.D. student, UC Berkeley) *
-// ****************************************************************************
-
-// ****************************************************************************
-// * Software is distributed as is, completely without warranty or service *
-// * support. The University of California and its employees are not liable *
-// * for the condition or performance of the software. *
-// * *
-// * The University of California owns the copyright and grants users a *
-// * perpetual, irrevocable, worldwide, non-exclusive, royalty-free license *
-// * with respect to the software as set forth below. *
-// * *
-// * The University of California hereby disclaims all implied warranties. *
-// * *
-// * The University of California grants the users the right to modify, *
-// * copy, and redistribute the software and documentation, both within *
-// * the user's organization and externally, subject to the following *
-// * restrictions: *
-// * *
-// * 1. The users agree not to charge for the University of California code *
-// * itself but may charge for additions, extensions, or support. *
-// * *
-// * 2. In any product based on the software, the users agree to *
-// * acknowledge the University of California that developed the *
-// * software. This acknowledgment shall appear in the product *
-// * documentation. *
-// * *
-// * 3. Redistributions to others of source code and documentation must *
-// * retain the copyright notice, disclaimer, and list of conditions. *
-// * *
-// * 4. Redistributions to others in binary form must reproduce the *
-// * copyright notice, disclaimer, and list of conditions in the *
-// * documentation and/or other materials provided with the *
-// * distribution. *
-// * *
-// * Agreed to on _________Jun. 30, 2017__________ *
-// * *
-// * By: ____University of California, Berkeley___ *
-// * ____Chenming Hu__________________________ *
-// * ____Professor in Graduate School ________ *
-// ****************************************************************************
-
-`include "constants.vams"
-`include "disciplines.vams"
-
-// Disable strobe for improved performance speed
-// To Use DISABLE_STROBE, Activate it here. Used Only at GEOMOD and RGEOMOD
-// `define DISABLE_STROBE
-`ifdef DISABLE_STROBE
- `define STROBE(X)
- `define STROBE2(X,Y)
-`else
- `define STROBE(X) $strobe(X)
- `define STROBE2(X,Y) $strobe(X,Y)
-`endif
-
-// Junction capacitance macro between S/D and bulk
-`define JunCap(Czbx, Vbx_jct, PBX_t, MJX, czbx_p1, czbx_p2, Qbxj) \
- if (Czbx > 0.0) begin \
- T1 = Vbx_jct / PBX_t; \
- if (T1 < 0.9) begin \
- arg = 1.0 - T1; \
- if (MJX == 0.5) begin \
- sarg = 1.0 / sqrt(arg); \
- end else begin \
- sarg = lexp(-MJX * lln(arg)); \
- end \
- Qbxj = PBX_t * Czbx * (1.0 - arg * sarg) / (1.0 - MJX); \
- end else begin \
- T2 = czbx_p1 * (T1 - 1.0) * (5.0 * MJX * (T1 - 1.0) + (1.0 + MJX)); \
- Qbxj = PBX_t * Czbx * (T2 + czbx_p2); \
- end \
- end else begin \
- Qbxj = 0.0; \
- end \
-
-// Normalized pinch-off voltage including PD
-`define PO_psip(vg_vfb, gamma, DPD, phif, psip) \
- T1 = 1.0 + DPD; \
- vgfbPD = vg_vfb / T1; \
- gammaPD = gamma / T1; \
- T1 = 0.5 * vgfbPD - 3.0 * (1.0 + gammaPD / `M_SQRT2); \
- T2 = T1 + sqrt(T1 * T1 + 6.0 * vgfbPD); \
- if (vgfbPD < 0.0) begin \
- T3 = (vgfbPD - T2) / gammaPD; \
- psip = -lln(1.0 - T2 + T3 * T3); \
- end else begin \
- T3 = lexp(-T2); \
- T1 = 0.5 * gammaPD; \
- T2 = sqrt(vgfbPD - 1.0 + T3 + T1 * T1) - T1; \
- psip = T2 * T2 + 1.0 - T3; \
- end \
-
-// Normalized charge-voltage relationship
-`define BSIM_q(psip, phib, vch, gam, q) \
- T8 = 0.5 * (psip + 1.0 + sqrt((psip - 1.0) * (psip - 1.0) + 0.25 * 2.0 * 2.0)); \
- sqrtpsip = sqrt(T8); \
- T9 = 1.0 + gam / (2.0 * sqrtpsip); \
- T0 = (1.0 + (gam / (2.0 * sqrtpsip))) / gam; \
- T1 = psip - 2.0 * phib - vch; \
- T2 = T1 - lln(4.0 * T0 * sqrtpsip); \
- T8 = 0.5 * (T2 - 0.201491 - sqrt(T2 * (T2 + 0.402982) + 2.446562)); \
- sqrtpsisa = sqrtpsip; \
- if (T8 <= -68.0) begin \
- T4 = -100.0; \
- T5 = 20.0; \
- if (T8 < T4 - 0.5 * T5) \
- T3 = lexp(T4); \
- else begin \
- if (T8 > T4 + 0.5 * T5) \
- T3 = lexp(T8); \
- else begin \
- T2 = (T8 - T4) / T5; \
- T6 = T2 * T2; \
- T3 = lexp(T4 + T5 * ((5.0 / 64.0) + 0.5 * T2 + T6 * ((15.0 / 16.0) - T6 * (1.25 - T6)))); \
- end \
- end \
- q = T3 * (1.0 + T1 - T8 - lln(2.0 * T0 * (T3 * 2.0 * T0 + 2.0 * sqrtpsisa))); \
- end else begin \
- T3 = lexp(T8); \
- sqrtpsisainv = 1.0 / sqrtpsisa; \
- T4 = 2.0 * T3 + lln(T3 * 2.0 * T0 * (T3 * 2.0 * T0 + 2.0 * sqrtpsisa)) - T1; \
- T5 = 2.0 + (1.0 / T3) + (T0 + sqrtpsisainv) / (T0 * T3 + sqrtpsisa); \
- T3 = T3 - T4 / T5; \
- T4 = 2.0 * T3 + lln(T3 * 2.0 * T0 * (T3 * 2.0 * T0 + 2.0 * sqrtpsisa)) - T1; \
- T5 = 2.0 + (1.0 / T3) + (T0 + sqrtpsisainv) / (T0 * T3 + sqrtpsisa); \
- T6 = ((T0 + sqrtpsisainv) / (T0 * T3 + sqrtpsisa)) * ((T0 + sqrtpsisainv) / (T0 * T3 + sqrtpsisa)); \
- T7 = -((1.0 / T3) * (1.0 / T3)) - (1.0 / (sqrtpsisa * sqrtpsisa * sqrtpsisa * (T0 * T3 + sqrtpsisa))) - T6; \
- q = T3 - (T4 / T5) * (1.0 + T4 * T7 / (2.0 * T5 * T5)); \
- end \
-
-// Smoothing function for (max of x, x0 with deltax)
-`define Smooth(x, x0, deltax, xsmooth) \
- xsmooth = 0.5 * (x + x0 + sqrt((x - x0) * (x - x0) + 0.25 * deltax * deltax)); \
-
-// Smoothing function for (max of x, x0 with deltax)
-`define Smooth1(x, x0, deltax, xsmooth) \
- xsmooth = 0.5 * (x + x0 + sqrt((x - x0) * (x - x0) + 0.25 * deltax * deltax)) - 0.25 * deltax; \
-
-// Smoothing function for (min of x, x0 with deltax)
-`define Smooth2(x, x0, deltax, xsmooth) \
- xsmooth = 0.5 * (x + x0 - sqrt((x - x0) * (x - x0) + 0.25 * deltax * deltax)) + 0.25 * deltax; \
-
-// Smoothing function for (min of x, x0 with deltax)
-`define Min1(x, x0, deltax, xsmooth) \
- xsmooth = 0.5 * (x + x0 - sqrt((x - x0) * (x - x0) + 0.25 * deltax * deltax)); \
-
- // These macros represent the subroutines to process the geometry dependent
- // parasitics for BSIM-BULK, which calculates Ps, Pd, As, Ad, and Rs and Rd
- // for multi-fingers and various GEO and RGEO options.
-
-// Define GEOMOD and RGEOMOD in the modelcard
-`define BSIMBULKNumFingerDiff(nf, minSD, nuIntD, nuEndD, nuIntS, nuEndS) \
- if ((nf % 2) != 0) begin \
- nuEndD = 1.0; \
- nuEndS = 1.0; \
- nuIntD = 2.0 * max((nf - 1.0) / 2.0, 0.0); \
- nuIntS = nuIntD; \
- end else begin \
- if (minSD == 1) begin \
- nuEndD = 2.0; \
- nuIntD = 2.0 * max((nf / 2.0 - 1.0), 0.0); \
- nuEndS = 0.0; \
- nuIntS = nf; \
- end else begin \
- nuEndD = 0.0; \
- nuIntD = nf; \
- nuEndS = 2.0; \
- nuIntS = 2.0 * max((nf / 2.0 - 1.0), 0.0); \
- end \
- end
-
-`define BSIMBULKRdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEnd, rgeo, SRCFLAG, Rend) \
- if (SRCFLAG == 1) begin \
- case (rgeo) \
- 1, 2, 5: begin \
- if (nuEnd == 0.0) begin \
- Rend = 0.0; \
- end else begin \
- Rend = Rsh * DMCG / (Weffcj * nuEnd); \
- end \
- end \
- 3, 4, 6: begin \
- if ((DMCG + DMCI) == 0.0) begin \
- `STROBE("(DMCG + DMCI) can not be equal to zero"); \
- end \
- if (nuEnd == 0.0) begin \
- Rend = 0.0; \
- end else begin \
- Rend = Rsh * Weffcj / (3.0 * nuEnd * (DMCG + DMCI)); \
- end \
- end \
- default: begin \
- `STROBE2("Warning: (instance BSIMBULK) Specified RGEO = %d not matched (BSIMBULKRdsEndIso), Rend is set to zero.", rgeo); \
- Rend = 0.0; \
- end \
- endcase \
- end else begin \
- case (rgeo) \
- 1, 3, 7: begin \
- if (nuEnd == 0.0) begin \
- Rend = 0.0; \
- end else begin \
- Rend = Rsh * DMCG / (Weffcj * nuEnd); \
- end \
- end \
- 2, 4, 8: begin \
- if ((DMCG + DMCI) == 0.0) begin \
- `STROBE("(DMCG + DMCI) can not be equal to zero"); \
- end \
- if (nuEnd == 0.0) begin \
- Rend = 0.0; \
- end \
- else begin \
- Rend = Rsh * Weffcj / (3.0 * nuEnd * (DMCG + DMCI)); \
- end \
- end \
- default: begin \
- `STROBE2("Warning: (instance BSIMBULK) Specified RGEO=%d not matched (BSIMBULKRdsEndIso type 2), Rend is set to zero.", rgeo); \
- Rend = 0.0; \
- end \
- endcase \
- end
-
-`define BSIMBULKRdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEnd, rgeo, SRCFLAG, Rend) \
- begin \
- if (SRCFLAG == 1) begin \
- case (rgeo) \
- 1, 2, 5: begin \
- if (nuEnd == 0.0) begin \
- Rend = 0.0; \
- end else begin \
- Rend = Rsh * DMCG / (Weffcj * nuEnd); \
- end \
- end \
- 3, 4, 6: begin \
- if (DMCG == 0.0) begin \
- `STROBE("DMCG can not be equal to zero"); \
- end \
- if (nuEnd == 0.0) begin \
- Rend = 0.0; \
- end \
- else begin \
- Rend = Rsh * Weffcj / (6.0 * nuEnd * DMCG); \
- end \
- end \
- default: begin \
- `STROBE2("Warning: (instance BSIMBULK) Specified RGEO = %d not matched (BSIMBULKRdsEndSha), Rend is set to zero.", rgeo); \
- Rend = 0.0; \
- end \
- endcase \
- end else begin \
- case (rgeo) \
- 1, 3, 7: begin \
- if (nuEnd == 0.0) begin \
- Rend = 0.0; \
- end else begin \
- Rend = Rsh * DMCG / (Weffcj * nuEnd); \
- end \
- end \
- 2, 4, 8: begin \
- if (DMCG == 0.0) begin \
- `STROBE("DMCG can not be equal to zero"); \
- end \
- if (nuEnd == 0.0) begin \
- Rend = 0.0; \
- end \
- else begin \
- Rend = Rsh * Weffcj / (6.0 * nuEnd * DMCG); \
- end \
- end \
- default: begin \
- `STROBE2("Warning: (instance BSIMBULK) Specified RGEO=%d not matched (BSIMBULKRdsEndSha \
- type 2), Rend is set to zero.", rgeo); \
- Rend = 0.0; \
- end \
- endcase \
- end \
- end
-
-`define BSIMBULKRdseffGeo(nf, geo, rgeo, minSD, Weffcj, Rsh, DMCG, DMCI, DMDG, SRCFLAG, Rtot) \
- begin \
- if (geo < 9) begin \
- `BSIMBULKNumFingerDiff(nf, minSD, nuIntD, nuEndD, nuIntS, nuEndS) \
- if (SRCFLAG == 1) begin \
- if (nuIntS == 0.0) begin \
- Rint = 0.0; \
- end else begin \
- Rint = Rsh * DMCG / ( Weffcj * nuIntS); \
- end \
- end \
- else begin \
- if (nuIntD == 0.0) begin \
- Rint = 0.0; \
- end else begin \
- Rint = Rsh * DMCG / ( Weffcj * nuIntD); \
- end \
- end \
- end \
- case (geo) \
- 0: begin \
- if (SRCFLAG == 1) begin \
- `BSIMBULKRdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndS, \
- rgeo, 1, Rend) \
- end else begin \
- `BSIMBULKRdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndD, \
- rgeo, 0, Rend) \
- end \
- end \
- 1: begin \
- if (SRCFLAG == 1) begin \
- `BSIMBULKRdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndS, \
- rgeo, 1, Rend) \
- end else begin \
- `BSIMBULKRdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndD, \
- rgeo, 0, Rend) \
- end \
- end \
- 2: begin \
- if (SRCFLAG == 1) begin \
- `BSIMBULKRdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndS, \
- rgeo, 1, Rend) \
- end else begin \
- `BSIMBULKRdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndD, \
- rgeo, 0, Rend) \
- end \
- end \
- 3: begin \
- if (SRCFLAG == 1) begin \
- `BSIMBULKRdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndS, \
- rgeo, 1, Rend) \
- end else begin \
- `BSIMBULKRdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndD, \
- rgeo, 0, Rend) \
- end \
- end \
- 4: begin \
- if (SRCFLAG == 1) begin \
- `BSIMBULKRdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndS, \
- rgeo, 1, Rend) \
- end else begin \
- Rend = Rsh * DMDG / Weffcj; \
- end \
- end \
- 5: begin \
- if (SRCFLAG == 1) begin \
- `BSIMBULKRdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndS, \
- rgeo, 1, Rend) \
- end else begin \
- if (nuEndD==0) begin\
- Rend = 0;\
- end else begin \
- Rend = Rsh * DMDG / (Weffcj * nuEndD); \
- end \
- end\
- end \
- 6: begin \
- if (SRCFLAG == 1) begin \
- Rend = Rsh * DMDG / Weffcj; \
- end else begin \
- `BSIMBULKRdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndD, \
- rgeo, 0, Rend) \
- end \
- end \
- 7:begin \
- if (SRCFLAG == 1) begin \
- if (nuEndS == 0) begin \
- Rend = 0; \
- end else begin \
- Rend = Rsh * DMDG / (Weffcj * nuEndS); \
- end \
- end else \
- `BSIMBULKRdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndD, \
- rgeo, 0, Rend) \
- end \
- 8: begin \
- Rend = Rsh * DMDG / Weffcj; \
- end \
- 9: begin /* all wide contacts assumed for geo = 9 and 10 */\
- if (SRCFLAG == 1) begin \
- Rend = 0.5 * Rsh * DMCG / Weffcj; \
- if (nf == 2.0) begin \
- Rint = 0.0; \
- end else begin \
- Rint = Rsh * DMCG / (Weffcj * (nf - 2.0)); \
- end \
- end \
- else begin \
- Rend = 0.0; \
- Rint = Rsh * DMCG / (Weffcj * nf); \
- end \
- end \
- 10: begin \
- if (SRCFLAG == 1) begin \
- Rend = 0.0; \
- Rint = Rsh * DMCG / (Weffcj * nf); \
- end \
- else begin \
- Rend = 0.5 * Rsh * DMCG / Weffcj; \
- if (nf == 2.0) begin \
- Rint = 0.0; \
- end else begin \
- Rint = Rsh * DMCG / (Weffcj * (nf - 2.0)); \
- end \
- end \
- end \
- default: begin \
- `STROBE2("Warning: (instance BSIMBULK) Specified GEO=%d not matched (BSIMBULKRdseffGeo), Rint is set to zero.", geo); \
- Rint = 0.0; \
- end \
- endcase \
- if (Rint <= 0.0) begin \
- Rtot = Rend; \
- end else if (Rend <= 0.0) begin \
- Rtot = Rint; \
- end else begin \
- Rtot = Rint * Rend / (Rint + Rend); \
- end \
- if (Rtot==0.0) begin \
- `STROBE("Warning: (instance BSIMBULK) Zero resistance returned from RdseffGeo"); \
- end \
- end
-
-// Effective PS, PD, AS, AD calculation, Ref: BSIM4
-`define BSIMBULKPAeffGeo(nf, geo, minSD,Weffcj, DMCG, DMCI, DMDG, Ps, Pd, As, Ad) \
- begin if (geo < 9) \
- `BSIMBULKNumFingerDiff(nf, minSD, nuIntD, nuEndD, nuIntS, nuEndS) \
- T0 = DMCG + DMCI;\
- T1 = DMCG + DMCG;\
- T2y = DMDG + DMDG;\
- PSiso = T0 + T0 + Weffcj;\
- PDiso = T0 + T0 + Weffcj;\
- PSsha = T1;\
- PDsha = T1;\
- PSmer = T2y;\
- PDmer = T2y;\
- ASiso = T0 * Weffcj;\
- ADiso = T0 * Weffcj;\
- ASsha = DMCG * Weffcj;\
- ADsha = DMCG * Weffcj;\
- ASmer = DMDG * Weffcj; \
- ADmer = DMDG * Weffcj; \
- case (geo) \
- 0: begin \
- Ps = nuEndS * PSiso + nuIntS * PSsha;\
- Pd = nuEndD * PDiso + nuIntD * PDsha;\
- As = nuEndS * ASiso + nuIntS * ASsha;\
- Ad = nuEndD * ADiso + nuIntD * ADsha;\
- end \
- 1: begin \
- Ps = nuEndS * PSiso + nuIntS * PSsha;\
- Pd = (nuEndD + nuIntD) * PDsha;\
- As = nuEndS * ASiso + nuIntS * ASsha;\
- Ad = (nuEndD + nuIntD) * ADsha;\
- end \
- 2: begin \
- Ps = (nuEndS + nuIntS) * PSsha;\
- Pd = nuEndD * PDiso + nuIntD * PDsha;\
- As = (nuEndS + nuIntS) * ASsha;\
- Ad = nuEndD * ADiso + nuIntD * ADsha;\
- end \
- 3: begin \
- Ps = (nuEndS + nuIntS) * PSsha;\
- Pd = (nuEndD + nuIntD) * PDsha;\
- As = (nuEndS + nuIntS) * ASsha;\
- Ad = (nuEndD + nuIntD) * ADsha;\
- end \
- 4: begin \
- Ps = nuEndS * PSiso + nuIntS * PSsha;\
- Pd = nuEndD * PDmer + nuIntD * PDsha;\
- As = nuEndS * ASiso + nuIntS * ASsha;\
- Ad = nuEndD * ADmer + nuIntD * ADsha;\
- end \
- 5: begin \
- Ps = (nuEndS + nuIntS) * PSsha;\
- Pd = nuEndD * PDmer + nuIntD * PDsha;\
- As = (nuEndS + nuIntS) * ASsha;\
- Ad = nuEndD * ADmer + nuIntD * ADsha;\
- end \
- 6: begin \
- Ps = nuEndS * PSmer + nuIntS * PSsha;\
- Pd = nuEndD * PDiso + nuIntD * PDsha;\
- As = nuEndS * ASmer + nuIntS * ASsha;\
- Ad = nuEndD * ADiso + nuIntD * ADsha;\
- end \
- 7: begin \
- Ps = nuEndS * PSmer + nuIntS * PSsha;\
- Pd = (nuEndD + nuIntD) * PDsha;\
- As = nuEndS * ASmer + nuIntS * ASsha;\
- Ad = (nuEndD + nuIntD) * ADsha;\
- end \
- 8: begin \
- Ps = nuEndS * PSmer + nuIntS * PSsha;\
- Pd = nuEndD * PDmer + nuIntD * PDsha;\
- As = nuEndS * ASmer + nuIntS * ASsha;\
- Ad = nuEndD * ADmer + nuIntD * ADsha;\
- end \
- 9: begin \
- Ps = PSiso + (nf - 1.0) * PSsha;\
- Pd = nf * PDsha;\
- As = ASiso + (nf - 1.0) * ASsha;\
- Ad = nf * ADsha;\
- end \
- 10: begin \
- Ps = nf * PSsha;\
- Pd = PDiso + (nf - 1.0) * PDsha;\
- As = nf * ASsha;\
- Ad = ADiso + (nf - 1.0) * ADsha;\
- end \
- default: begin \
- `STROBE2("Warning: (instance BSIMBULK) Specified GEO=%d not matched (BSIMBULKPAeffGeo \
- ), PS,PD,AS,AD set to zero.", geo); \
- Ps = 0;\
- Pd = 0;\
- As = 0;\
- Ad = 0;\
- end \
- endcase \
- end \
-
-// Numerical Constants
-`define EXPL_THRESHOLD 80.0
-`define MAX_EXPL 5.540622384e34
-`define MIN_EXPL 1.804851387e-35
-`define N_MINLOG 1.0e-38
-`define DELTA_1 0.02
-`define Oneby3 0.33333333333333333
-`define REFTEMP 300.15 // 27 degrees C
-
-// Physical Constants
-`define ntype 1
-`define ptype -1
-`define q 1.60219e-19
-`define EPS0 8.85418e-12
-`define KboQ 8.617087e-5 // Joule/degree
-
-// Macros for the model/instance parameters
-//
-// MPRxx model parameter real
-// MPIxx model parameter integer
-// IPRxx instance parameter real
-// IPIxx instance parameter integer
-// ||
-// cc closed lower bound, closed upper bound
-// oo open lower bound, open upper bound
-// co closed lower bound, open upper bound
-// oc open lower bound, closed upper bound
-// cz closed lower bound=0, open upper bound=inf
-// oz open lower bound=0, open upper bound=inf
-// nb no bounds
-// ex no bounds with exclude
-// sw switch(integer only, values 0=false and 1=true)
-// ty switch(integer only, values -1=p-type and +1=n-type)
-//
-// IPM instance parameter mFactor(multiplicity, implicit for LRM 2.2)
-// OPP operating point parameter, includes units and description for printing
-
-`define OPP(nam,uni,des) (* units=uni, desc=des *) real nam;
-`define OPM(nam,uni,des) (* units=uni, desc=des, multiplicity="multiply" *) real nam;
-`define OPD(nam,uni,des) (* units=uni, desc=des, multiplicity="divide" *) real nam;
-
-`define MPRnb(nam,def,uni, des) (* units=uni, desc=des *) parameter real nam=def;
-`define MPRex(nam,def,uni,exc, des) (* units=uni, desc=des *) parameter real nam=def exclude exc;
-`define MPRcc(nam,def,uni,lwr,upr,des) (* units=uni, desc=des *) parameter real nam=def from[lwr:upr];
-`define MPRoo(nam,def,uni,lwr,upr,des) (* units=uni, desc=des *) parameter real nam=def from(lwr:upr);
-`define MPRco(nam,def,uni,lwr,upr,des) (* units=uni, desc=des *) parameter real nam=def from[lwr:upr);
-`define MPRoc(nam,def,uni,lwr,upr,des) (* units=uni, desc=des *) parameter real nam=def from(lwr:upr];
-`define MPRcz(nam,def,uni, des) (* units=uni, desc=des *) parameter real nam=def from[ 0:inf);
-`define MPRoz(nam,def,uni, des) (* units=uni, desc=des *) parameter real nam=def from( 0:inf);
-
-`define MPInb(nam,def,uni, des) (* units=uni, desc=des *) parameter integer nam=def;
-`define MPIex(nam,def,uni,exc, des) (* units=uni, desc=des *) parameter integer nam=def exclude exc;
-`define MPIcc(nam,def,uni,lwr,upr,des) (* units=uni, desc=des *) parameter integer nam=def from[lwr:upr];
-`define MPIoo(nam,def,uni,lwr,upr,des) (* units=uni, desc=des *) parameter integer nam=def from(lwr:upr);
-`define MPIco(nam,def,uni,lwr,upr,des) (* units=uni, desc=des *) parameter integer nam=def from[lwr:upr);
-`define MPIoc(nam,def,uni,lwr,upr,des) (* units=uni, desc=des *) parameter integer nam=def from(lwr:upr];
-`define MPIcz(nam,def,uni, des) (* units=uni, desc=des *) parameter integer nam=def from[ 0:inf);
-`define MPIoz(nam,def,uni, des) (* units=uni, desc=des *) parameter integer nam=def from( 0:inf);
-`define MPIsw(nam,def,uni, des) (* units=uni, desc=des *) parameter integer nam=def from[ 0: 1];
-`define MPIty(nam,def,uni, des) (* units=uni, desc=des *) parameter integer nam=def from[ -1: 1] exclude 0;
-`define IPRnb(nam,def,uni, des) (* units=uni, type = "instance", desc=des *) parameter real nam=def;
-`define IPRex(nam,def,uni,exc, des) (* units=uni, type = "instance", desc=des *) parameter real nam=def exclude exc;
-`define IPRcc(nam,def,uni,lwr,upr,des) (* units=uni, type = "instance", desc=des *) parameter real nam=def from[lwr:upr];
-`define IPRoo(nam,def,uni,lwr,upr,des) (* units=uni, type = "instance", desc=des *) parameter real nam=def from(lwr:upr);
-`define IPRco(nam,def,uni,lwr,upr,des) (* units=uni, type = "instance", desc=des *) parameter real nam=def from[lwr:upr);
-`define IPRoc(nam,def,uni,lwr,upr,des) (* units=uni, type = "instance", desc=des *) parameter real nam=def from(lwr:upr];
-`define IPRcz(nam,def,uni, des) (* units=uni, type = "instance", desc=des *) parameter real nam=def from[ 0:inf);
-`define IPRoz(nam,def,uni, des) (* units=uni, type = "instance", desc=des *) parameter real nam=def from( 0:inf);
-`define IPInb(nam,def,uni, des) (* units=uni, type = "instance", desc=des *) parameter integer nam=def;
-`define IPIex(nam,def,uni,exc, des) (* units=uni, type = "instance", desc=des *) parameter integer nam=def exclude exc;
-`define IPIcc(nam,def,uni,lwr,upr,des) (* units=uni, type = "instance", desc=des *) parameter integer nam=def from[lwr:upr];
-`define IPIoo(nam,def,uni,lwr,upr,des) (* units=uni, type = "instance", desc=des *) parameter integer nam=def from(lwr:upr);
-`define IPIco(nam,def,uni,lwr,upr,des) (* units=uni, type = "instance", desc=des *) parameter integer nam=def from[lwr:upr);
-`define IPIoc(nam,def,uni,lwr,upr,des) (* units=uni, type = "instance", desc=des *) parameter integer nam=def from(lwr:upr];
-`define IPIcz(nam,def,uni, des) (* units=uni, type = "instance", desc=des *) parameter integer nam=def from[ 0:inf);
-`define IPIoz(nam,def,uni, des) (* units=uni, type = "instance", desc=des *) parameter integer nam=def from( 0:inf);
-`define BPRco(nam, def, uni, lwr, upr, des) (* units = uni, type = "instance", desc = des *) parameter real nam = def from[lwr : upr);
-`define BPRoz(nam, def, uni, des) (* units = uni, type = "instance", desc = des *) parameter real nam = def from(0.0 : inf);
-`define BPRcz(nam, def, uni, des) (* units = uni, type = "instance", desc = des *) parameter real nam = def from[0.0 : inf);
-`define BPIcc(nam, def, uni, lwr, upr, des) (* units = uni, type = "instance", desc = des *) parameter integer nam = def from[lwr : upr];
-`define BPInb(nam,def,uni, des) (* units=uni, type = "instance", desc=des *) parameter integer nam=def;
-`define BPRnb(nam,def,uni, des) (* units=uni, type = "instance", desc=des *) parameter real nam=def;
-
-
-module bsimbulk(d, g, s, b, t);
-inout d, g, s, b, t;
-electrical d, g, s, b, di, si, gi, gm, bi, sbulk, dbulk;
-thermal t;
-
-// Extra internal nodes and branches (TNOIMOD=1) for correlated drain and gate noise
-electrical N1, N2;
-branch (N1) NI;
-branch (N1) NR;
-branch (N1) NC;
-
-// Clamped exponential function
-analog function real lexp;
- input x;
- real x;
- begin
- if (x > `EXPL_THRESHOLD) begin
- lexp = `MAX_EXPL * (1.0 + x - `EXPL_THRESHOLD);
- end else if (x < -`EXPL_THRESHOLD) begin
- lexp = `MIN_EXPL;
- end else begin
- lexp = exp(x);
- end
- end
-endfunction
-
-// Clamped log function
-analog function real lln;
- input x;
- real x;
- begin
- lln = ln(max(x, `N_MINLOG));
- end
-endfunction
-
-// Hyperbolic smoothing function
-analog function real hypsmooth;
- input x, c;
- real x, c;
- begin
- hypsmooth = 0.5 * (x + sqrt(x * x + 4.0 * c * c));
- end
-endfunction
-
-// Pure instance parameters
-`IPRoz( L ,1.0e-5 ,"m" ,"Length" )
-`IPRoz( W ,1.0e-5 ,"m" ,"Total width including fingers" )
-`IPIco( NF ,1 ,"" ,1 ,inf ,"Number of fingers" )
-`IPRcz( NRS ,1.0 ,"" ,"Number of squares in source" )
-`IPRcz( NRD ,1.0 ,"" ,"Number of squares in drain" )
-`IPRnb( VFBSDOFF ,0.0 ,"V" ,"Flat-band Voltage Offset Parameter" )
-`IPIcc( MINZ ,0 ,"" ,0 ,1 ,"Minimize either D or S" )
-`IPRnb( XGW ,0.0 ,"m" ,"Distance from gate contact centre to dev edge" )
-`IPIcc( NGCON ,1 ,"" ,1 ,2 ,"Number of gate contacts" )
-`IPIcc( RGATEMOD ,0 ,"" ,0 ,3 ,"Gate resistance model selector" )
-`IPIcc( RBODYMOD ,0 ,"" ,0 ,2 ,"Distributed body R model" )
-`IPIcc( GEOMOD ,0 ,"" ,0 ,10 ,"Geometry-dependent parasitics model" )
-`IPIcc( RGEOMOD ,0 ,"" ,0 ,8 ,"Geometry-dependent source/drain resistance, 0: RSH-based, 1: Holistic" )
-`IPIcc( EDGEFET ,0 ,"" ,0 ,1 ,"0: Edge FET Model Off, 1: Edge FET Model ON" )
-`IPIcc( SSLMOD ,0 ,"" ,0 ,1 ,"Sub-Surface Leakage Drain Current, 0: Turn off 1: Turn on" )
-`IPRcz( RBPB ,50.0 ,"ohm" ,"Resistance between bNodePrime and bNode" )
-`IPRcz( RBPD ,50.0 ,"ohm" ,"Resistance between bNodePrime and bNode " )
-`IPRcz( RBPS ,50.0 ,"ohm" ,"Resistance between bNodePrime and sbNode " )
-`IPRcz( RBDB ,50.0 ,"ohm" ,"Resistance between bNode and dbNode " )
-`IPRcz( RBSB ,50.0 ,"ohm" ,"Resistance between bNode and sbNode" )
-`IPRnb( SA ,0.0 ,"m" ,"Distance between OD edge from Poly from one side" )
-`IPRnb( SB ,0.0 ,"m" ,"Distance between OD edge from Poly from other side" )
-`IPRnb( SD ,0.0 ,"m" ,"Distance between neighbouring fingers" )
-`IPRoo( SCA ,0.0 ,"" ,-inf ,inf ,"Integral of the first distribution function for scattered well dopant" )
-`IPRoo( SCB ,0.0 ,"" ,-inf ,inf ,"Integral of second distribution function for scattered well dopant" )
-`IPRoo( SCC ,0.0 ,"" ,-inf ,inf ,"Integral of third distribution function for scattered well dopant" )
-`IPRoo( SC ,0.0 ,"m" ,-inf ,inf ,"Distance to a single well edge if <=0.0, turn off WPE" )
-`IPRcz( AS ,0.0 ,"m^2" ,"Source to Substrate Junction Area" )
-`IPRcz( AD ,0.0 ,"m^2" ,"Drain to Substrate Junction Area" )
-`IPRcz( PS ,0.0 ,"m" ,"Source to Substrate Junction Perimeter" )
-`IPRcz( PD ,0.0 ,"m" ,"Drain to Substrate Junction Perimeter" )
-
-// Both model and instance parameters
-`BPRnb( DTEMP ,0.0 ,"K" ,"Offset of Device Temperature" )
-`BPRnb( MULU0 ,1.0 ,"m^2/(V*s)" ,"Multiplication factor for low field mobility" )
-`BPRnb( DELVTO ,0.0 ,"V" ,"Zero bias threshold voltage variation" )
-`BPRcz( IDS0MULT ,1.0 ,"" ,"Variability in drain current for miscellaneous reasons" )
-
-// Pure model parameters
-`MPIty( TYPE ,`ntype ,"" ,"ntype=1, ptype=-1" )
-`MPIcc( CVMOD ,0 ,"" ,0 ,1 ,"0: Consistent IV-CV, 1: Different IV-CV" )
-`MPIcc( COVMOD ,0 ,"" ,0 ,1 ,"0: Use Bias-independent Overlap Capacitances, 1: Use Bias-dependent Overlap Capacitances" )
-`MPIcc( RDSMOD ,0 ,"" ,0 ,2 ,"0: Internal bias dependent and external bias independent s/d resistance model, 1: External s/d resistance model, 2: Internal s/d resistance model" )
-`MPIcc( WPEMOD ,0 ,"" ,0 ,1 ,"Model flag" )
-`MPIcc( ASYMMOD ,0 ,"" ,0 ,1 ,"0: Asymmetry Model turned off - forward mode parameters used, 1: Asymmetry Model turned on" )
-`MPIcc( GIDLMOD ,0 ,"" ,0 ,1 ,"0: Turn off GIDL Current, 1: Turn on GIDL Current" )
-`MPIcc( IGCMOD ,0 ,"" ,0 ,1 ,"0: Turn off Igc, Igs and Igd, 1: Turn on Igc, Igs and Igd" )
-`MPIcc( IGBMOD ,0 ,"" ,0 ,1 ,"0: Turn off Igb, 1: Turn on Igb" )
-`MPIcc( TNOIMOD ,0 ,"" ,0 ,1 ,"Thermal noise model selector" )
-`MPIcc( SHMOD ,0 ,"" ,0 ,1 ,"0 : Self heating model OFF, 1 : Self heating model ON" )
-`MPIcc( MOBSCALE ,0 ,"" ,0 ,1 ,"Mobility scaling model, 0: Old Model, 1: New Model" )
-
-// Device parameters
-`MPRoz( LLONG ,10u ,"m" ,"L of extracted Long channel device" )
-`MPRoz( LMLT ,1.0 ,"" ,"Length Shrinking Parameter" )
-`MPRoz( WMLT ,1.0 ,"" ,"Width Shrinking Parameter" )
-`MPRnb( XL ,0.0 ,"m" ,"L offset for channel length due to mask/etch effect" )
-`MPRoz( WWIDE ,10u ,"m" ,"W of extracted Wide channel device" )
-`MPRnb( XW ,0.0 ,"m" ,"W offset for channel width due to mask/etch effect" )
-`MPRnb( LINT ,0.0 ,"m" ,"Delta L for IV" )
-`MPRnb( LL ,0.0 ,"m^(1+LLN)" ,"Length reduction parameter" )
-`MPRnb( LW ,0.0 ,"m^(1+LWN)" ,"Length reduction parameter" )
-`MPRnb( LWL ,0.0 ,"m^(1+LLN+LWN)" ,"Length reduction parameter" )
-`MPRnb( LLN ,1.0 ,"" ,"Length reduction parameter" )
-`MPRnb( LWN ,1.0 ,"" ,"Length reduction parameter" )
-`MPRnb( WINT ,0.0 ,"m" ,"Delta W for IV" )
-`MPRnb( WL ,0.0 ,"m^(1+WLN)" ,"Width reduction parameter" )
-`MPRnb( WW ,0.0 ,"m^(1+WWN)" ,"Width reduction parameter" )
-`MPRnb( WWL ,0.0 ,"m^(1+WWN+WLN)" ,"Width reduction parameter" )
-`MPRnb( WLN ,1.0 ,"" ,"Width reduction parameter" )
-`MPRnb( WWN ,1.0 ,"" ,"Width reduction parameter" )
-`MPRnb( DLC ,0.0 ,"m" ,"Delta L for CV" )
-`MPRnb( LLC ,0.0 ,"m^(1+LLN)" ,"Length reduction parameter" )
-`MPRnb( LWC ,0.0 ,"m^(1+LWN)" ,"Length reduction parameter" )
-`MPRnb( LWLC ,0.0 ,"m^(1+LWN+LLN)" ,"Length reduction parameter" )
-`MPRnb( DWC ,0.0 ,"m" ,"Delta W for CV" )
-`MPRnb( WLC ,0.0 ,"m^(1+WLN)" ,"Width reduction parameter" )
-`MPRnb( WWC ,0.0 ,"m^(1+WWN)" ,"Width reduction parameter" )
-`MPRnb( WWLC ,0.0 ,"m^(1+WWN+WLN)" ,"Width reduction parameter" )
-`MPRoo( TOXE ,3.0e-9 ,"m" ,0 ,inf ,"Effective gate dielectric thickness relative to SiO2" )
-`MPRoo( TOXP ,TOXE ,"m" ,0 ,inf ,"Physical gate dielectric thickness. If not given, TOXP is calculated from TOXE and DTOX" )
-`MPRnb( DTOX ,0.0 ,"m" ,"Difference between effective dielectric thickness" )
-`MPRnb( NDEP ,1e24 ,"1/m^3" ,"Channel Doping Concentration for IV" )
-`MPRnb( NDEPL1 ,0.0 ,"m" ,"Length dependence coefficient of NDEP" )
-`MPRoz( NDEPLEXP1 ,1.0 ,"" ,"Length dependence exponent coefficient of NDEP" )
-`MPRnb( NDEPL2 ,0.0 ,"m" ,"Length dependence of NDEP - For Short Channel Devices" )
-`MPRoz( NDEPLEXP2 ,2.0 ,"" ,"Length dependence exponent coefficient of NDEP" )
-`MPRnb( NDEPW ,0.0 ,"m" ,"Width dependence coefficient of NDEP" )
-`MPRoz( NDEPWEXP ,1.0 ,"" ,"Width dependence exponent coefficient of NDEP" )
-`MPRnb( NDEPWL ,0.0 ,"m^2" ,"Width-Length dependence coefficient of NDEP" )
-`MPRoz( NDEPWLEXP ,1.0 ,"" ,"Width-Length dependence exponent coefficient of NDEP" )
-`MPRnb( LNDEP ,0.0 ,"1/m^2" ,"Length dependence of NDEP" )
-`MPRnb( WNDEP ,0.0 ,"1/m^2" ,"Width dependence of NDEP" )
-`MPRnb( PNDEP ,0.0 ,"1/m" ,"Area dependence of NDEP " )
-`MPRnb( NDEPCV ,NDEP ,"1/m^3" ,"Channel Doping Concentration for CV" )
-`MPRnb( NDEPCVL1 ,NDEPL1 ,"m" ,"Length dependence coefficient of NDEPCV" )
-`MPRoz( NDEPCVLEXP1 ,NDEPLEXP1 ,"" ,"Length dependence exponent coefficient of NDEPCV" )
-`MPRnb( NDEPCVL2 ,NDEPL2 ,"m" ,"Length dependence coefficient of NDEPCV - For Short Channel Devices" )
-`MPRoz( NDEPCVLEXP2 ,NDEPLEXP2 ,"" ,"Length dependence exponent coefficient of NDEPCV" )
-`MPRnb( NDEPCVW ,NDEPW ,"m" ,"Width dependence coefficient of NDEPCV" )
-`MPRoz( NDEPCVWEXP ,NDEPWEXP ,"" ,"Width dependence exponent coefficient of NDEPCV" )
-`MPRnb( NDEPCVWL ,NDEPWL ,"m^2" ,"Width-Length dependence coefficient of NDEPCV" )
-`MPRoz( NDEPCVWLEXP ,NDEPWLEXP ,"" ,"Width-Length dependence exponent coefficient of NDEPCV" )
-`MPRnb( LNDEPCV ,LNDEP ,"1/m^2" ,"Length dependence of NDEP for CV" )
-`MPRnb( WNDEPCV ,WNDEP ,"1/m^2" ,"Width dependence of NDEP for CV" )
-`MPRnb( PNDEPCV ,PNDEP ,"1/m" ,"Area dependence of NDEP for CV" )
-`MPRnb( NGATE ,5e25 ,"1/m^3" ,"Gate Doping Concentration" )
-`MPRnb( LNGATE ,0.0 ,"1/m^2" ,"Length dependence of NGATE" )
-`MPRnb( WNGATE ,0.0 ,"1/m^2" ,"Width dependence of NGATE" )
-`MPRnb( PNGATE ,0.0 ,"1/m" ,"Area dependence of NGATE" )
-`MPRnb( EASUB ,4.05 ,"eV" ,"Electron affinity of substrate" )
-`MPRoz( NI0SUB ,1.1e16 ,"1/m^3" ,"Intrinsic carrier concentration of the substrate at 300.15K" )
-`MPRoo( BG0SUB ,1.17 ,"eV" ,0 ,inf ,"Band gap of substrate at 300.15K" )
-`MPRoo( EPSRSUB ,11.9 ,"" ,0 ,inf ,"Relative dielectric constant of the channel material" )
-`MPRoo( EPSROX ,3.9 ,"" ,0 ,inf ,"Relative dielectric constant of the gate dielectric" )
-`MPRnb( XJ ,1.5e-7 ,"m" ,"S/D junction depth" )
-`MPRnb( LXJ ,0.0 ,"m^2" ,"Length dependence of XJ " )
-`MPRnb( WXJ ,0.0 ,"m^2" ,"Width dependence of XJ" )
-`MPRnb( PXJ ,0.0 ,"m^3" ,"Area dependence of XJ" )
-`MPRnb( VFB ,-0.5 ,"V" ,"Flat band voltage " )
-`MPRnb( LVFB ,0.0 ,"V*m" ,"Length dependence of VFB" )
-`MPRnb( WVFB ,0.0 ,"V*m" ,"Width dependence of VFB" )
-`MPRnb( PVFB ,0.0 ,"V*m^2" ,"Area dependence of VFB" )
-`MPRnb( VFBCV ,VFB ,"V" ,"Flat band voltage for CV" )
-`MPRnb( LVFBCV ,LVFB ,"V*m" ,"Length dependence of VFBCV" )
-`MPRnb( WVFBCV ,WVFB ,"V*m" ,"Width dependence of VFBCV" )
-`MPRnb( PVFBCV ,PVFB ,"V*m^2" ,"Area dependence of VFBCV" )
-`MPRnb( VFBCVL ,0.0 ,"m" ,"Length dependence coefficient of VFBCV" )
-`MPRoz( VFBCVLEXP ,1.0 ,"" ,"Length dependence exponent coefficient of VFBCV" )
-`MPRnb( VFBCVW ,0.0 ,"m" ,"Width dependence coefficient of VFBCV" )
-`MPRoz( VFBCVWEXP ,1.0 ,"" ,"Width dependence exponent coefficient of VFBCV" )
-`MPRnb( VFBCVWL ,0.0 ,"m^2" ,"Width-Length dependence coefficient of VFBCV" )
-`MPRoz( VFBCVWLEXP ,1.0 ,"" ,"Width-Length dependence coefficient of VFBCV" )
-
-// Diode parameters
-`MPIcc( PERMOD ,1 ,"" ,0 ,1 ,"Whether PS/PD (when given) include gate-edge perimeter" )
-`MPRnb( DWJ ,DWC ,"m" ,"delta W for S/D junctions" )
-
-// Short channel effects
-`MPRnb( NSD ,1e26 ,"1/m^3" ,"S/D Doping Concentration" )
-`MPRnb( LNSD ,0.0 ,"1/m^2" ,"Length dependence of NSD" )
-`MPRnb( WNSD ,0.0 ,"1/m^2" ,"Width dependence of NSD" )
-`MPRnb( PNSD ,0.0 ,"1/m" ,"Area dependence of NSD" )
-`MPRnb( DVTP0 ,0.0 ,"m" ,"DITS" )
-`MPRnb( LDVTP0 ,0 ,"m^2" ,"Length dependence of DVTP0" )
-`MPRnb( WDVTP0 ,0 ,"m^2" ,"Width dependence of DVTP0" )
-`MPRnb( PDVTP0 ,0 ,"m^3" ,"Area dependence of DVTP0" )
-`MPRnb( DVTP1 ,0.0 ,"1/V" ,"DITS" )
-`MPRnb( LDVTP1 ,0 ,"m/V" ,"Length dependence of DVTP1" )
-`MPRnb( WDVTP1 ,0 ,"m/V" ,"Width dependence of DVTP1" )
-`MPRnb( PDVTP1 ,0 ,"m^2/V" ,"Area dependence of DVTP1" )
-`MPRnb( DVTP2 ,0.0 ,"m*V" ,"DITS" )
-`MPRnb( LDVTP2 ,0 ,"m^2/V" ,"Length dependence of DVTP2" )
-`MPRnb( WDVTP2 ,0 ,"m^2/V" ,"Width dependence of DVTP2" )
-`MPRnb( PDVTP2 ,0 ,"m^3/V" ,"Area dependence of DVTP2" )
-`MPRnb( DVTP3 ,0.0 ,"" ,"DITS" )
-`MPRnb( LDVTP3 ,0 ,"m" ,"Length dependence of DVTP3" )
-`MPRnb( WDVTP3 ,0 ,"m" ,"Width dependence of DVTP3" )
-`MPRnb( PDVTP3 ,0 ,"m^2" ,"Area dependence of DVTP3" )
-`MPRnb( DVTP4 ,0.0 ,"1/V" ,"DITS" )
-`MPRnb( LDVTP4 ,0 ,"m/V" ,"Length dependence of DVTP4" )
-`MPRnb( WDVTP4 ,0 ,"m/V" ,"Width dependence of DVTP4" )
-`MPRnb( PDVTP4 ,0 ,"m^2/V" ,"Area dependence of DVTP4" )
-`MPRnb( DVTP5 ,0.0 ,"V" ,"DITS" )
-`MPRnb( LDVTP5 ,0 ,"m*V" ,"Length dependence of DVTP5" )
-`MPRnb( WDVTP5 ,0 ,"m*V" ,"Width dependence of DVTP5" )
-`MPRnb( PDVTP5 ,0 ,"m^2*V" ,"Area dependence of DVTP5" )
-`MPRnb( PHIN ,0.045 ,"V" ,"Non-uniform vertical doping effect on surface potential" )
-`MPRnb( LPHIN ,0.0 ,"m*V" ,"Length dependence of PHIN" )
-`MPRnb( WPHIN ,0.0 ,"m*V" ,"Width dependence of PHIN" )
-`MPRnb( PPHIN ,0.0 ,"m^2*V" ,"Area dependence of PHIN" )
-`MPRnb( ETA0 ,0.08 ,"" ,"DIBL coefficient" )
-`MPRnb( LETA0 ,0.0 ,"m" ,"Length dependence of ETA0" )
-`MPRnb( WETA0 ,0.0 ,"m" ,"Width dependence of ETA0" )
-`MPRnb( PETA0 ,0.0 ,"m^2" ,"Area dependence of ETA0" )
-`MPRnb( ETA0R ,ETA0 ,"" ,"DIBL coefficient" )
-`MPRnb( LETA0R ,LETA0 ,"m" ,"Length dependence of ETA0R" )
-`MPRnb( WETA0R ,WETA0 ,"m" ,"Width dependence of ETA0R" )
-`MPRnb( PETA0R ,PETA0 ,"m^2" ,"Area dependence of ETA0R" )
-`MPRnb( DSUB ,1.0 ,"" ,"Length scaling exponent for DIBL" )
-`MPRnb( ETAB ,-0.07 ,"1/V" ,"Body bias coefficient for sub-threshold DIBL effect" )
-`MPRoz( ETABEXP ,1.0 ,"" ,"Exponent coefficient of ETAB" )
-`MPRnb( LETAB ,0.0 ,"m/V" ,"Length dependence of ETAB" )
-`MPRnb( WETAB ,0.0 ,"m/V" ,"Width dependence of ETAB" )
-`MPRnb( PETAB ,0.0 ,"m^2/V" ,"Area dependence of ETAB" )
-`MPRnb( K1 ,0.0 ,"V^0.5" ,"First-order body-bias Vth shift due to Vertical Non-uniform doping" )
-`MPRnb( K1L ,0.0 ,"" ,"length dependence coefficient of K1" )
-`MPRoz( K1LEXP ,1.0 ,"" ,"Length dependence exponent coefficient of K1" )
-`MPRnb( K1W ,0.0 ,"" ,"Width dependence coefficient of K1" )
-`MPRoz( K1WEXP ,1.0 ,"" ,"Width dependence exponent coefficient of K1" )
-`MPRnb( K1WL ,0.0 ,"" ,"Width-Length dependence coefficient of K1" )
-`MPRoz( K1WLEXP ,1.0 ,"" ,"Width-Length dependence exponent coefficient of K1" )
-`MPRnb( LK1 ,0.0 ,"m*V^0.5" ,"Length dependence of K1" )
-`MPRnb( WK1 ,0.0 ,"m*V^0.5" ,"Width dependence of K1" )
-`MPRnb( PK1 ,0.0 ,"m^2*V^0.5" ,"Area dependence of K1" )
-`MPRnb( K2 ,0.0 ,"V" ,"Vth shift due to Vertical Non-uniform doping" )
-`MPRnb( K2L ,0.0 ,"m^K2LEXP" ,"Length dependence coefficient of K2" )
-`MPRoz( K2LEXP ,1.0 ,"" ,"Length dependence exponent coefficient of K2" )
-`MPRnb( K2W ,0.0 ,"m^K2WEXP" ,"Width dependence coefficient of K2" )
-`MPRoz( K2WEXP ,1.0 ,"" ,"Width dependence exponent coefficient of K2" )
-`MPRnb( K2WL ,0.0 ,"m^(2*K2WLEXP)" ,"Width-Length dependence coefficient of K2" )
-`MPRoz( K2WLEXP ,1.0 ,"" ,"Width-Length dependence exponent coefficient of K2" )
-`MPRnb( LK2 ,0.0 ,"m" ,"Length dependence of K2" )
-`MPRnb( WK2 ,0.0 ,"m" ,"Width dependence of K2" )
-`MPRnb( PK2 ,0.0 ,"m^2" ,"Area dependence of K2" )
-
-// Quantum mechanical effects
-`MPRcz( ADOS ,0.0 ,"" ,"Quantum mechanical effect pre-factor cum switch in inversion" )
-`MPRcz( BDOS ,1.0 ,"" ,"Charge centroid parameter - slope of CV curve under QME in inversion" )
-`MPRoz( QM0 ,1.0e-3 ,"" ,"Charge centroid parameter - starting point for QME in inversion" )
-`MPRcz( ETAQM ,0.54 ,"" ,"Bulk charge coefficient for charge centroid in inversion" )
-
-// Sub-threshold swing factor
-`MPRnb( CIT ,0.0 ,"F/m^2" ,"Parameter for interface trap" )
-`MPRnb( LCIT ,0.0 ,"F/m" ,"Length dependence of CIT" )
-`MPRnb( WCIT ,0.0 ,"F/m" ,"Width dependence of CIT" )
-`MPRnb( PCIT ,0.0 ,"F" ,"Area dependence of CIT" )
-`MPRnb( NFACTOR ,0.0 ,"" ,"Sub-threshold slope factor" )
-`MPRnb( NFACTORL ,0.0 ,"m^NFACTORLEXP" ,"Length dependence coefficient of NFACTOR" )
-`MPRoz( NFACTORLEXP ,1.0 ,"" ,"Length dependence exponent coefficient of NFACTOR" )
-`MPRnb( NFACTORW ,0.0 ,"m^NFACTORWEXP" ,"Width dependence coefficient of NFACTOR" )
-`MPRoz( NFACTORWEXP ,1.0 ,"" ,"Width dependence exponent coefficient of NFACTOR" )
-`MPRnb( NFACTORWL ,0.0 ,"m^(2*NFACTORWLEXP)" ,"Width-Length dependence coefficient of NFACTOR" )
-`MPRoz( NFACTORWLEXP ,1.0 ,"" ,"Width-Length dependence exponent coefficient of NFACTOR" )
-`MPRnb( LNFACTOR ,0.0 ,"m" ,"Length dependence of NFACTOR" )
-`MPRnb( WNFACTOR ,0.0 ,"m" ,"Width dependence of NFACTOR" )
-`MPRnb( PNFACTOR ,0.0 ,"m^2" ,"Area dependence of NFACTOR" )
-`MPRnb( CDSCD ,1e-9 ,"F/m^2/V" ,"Drain-bias sensitivity of sub-threshold slope" )
-`MPRnb( CDSCDL ,0.0 ,"m^CDSCDLEXP" ,"Length dependence coefficient of CDSCD" )
-`MPRoz( CDSCDLEXP ,1.0 ,"" ,"Length dependence exponent coefficient of CDSCD" )
-`MPRnb( LCDSCD ,0.0 ,"F/m/V" ,"Length dependence of CDSCD" )
-`MPRnb( WCDSCD ,0.0 ,"F/m/V" ,"Width dependence of CDSCD" )
-`MPRnb( PCDSCD ,0.0 ,"F/V" ,"Area dependence of CDSCD" )
-`MPRnb( CDSCDR ,CDSCD ,"F/m^2/V" ,"Drain-bias sensitivity of sub-threshold slope" )
-`MPRnb( CDSCDLR ,CDSCDL ,"m^CDSCDLEXP" ,"Length dependence coefficient of CDSCD" )
-`MPRnb( LCDSCDR ,LCDSCD ,"F/m/V" ,"Length dependence of CDSCDR" )
-`MPRnb( WCDSCDR ,WCDSCD ,"F/m/V" ,"Width dependence of CDSCDR" )
-`MPRnb( PCDSCDR ,PCDSCD ,"F/V" ,"Area dependence of CDSCDR" )
-`MPRnb( CDSCB ,0.0 ,"F/m^2/V" ,"Body-bias sensitivity of sub-threshold slope" )
-`MPRnb( CDSCBL ,0.0 ,"m^CDSCBLEXP" ,"Length dependence coefficient of CDSCB" )
-`MPRoz( CDSCBLEXP ,1.0 ,"" ,"Length dependence exponent coefficient of CDSCB" )
-`MPRnb( LCDSCB ,0.0 ,"F/m/V" ,"Length dependence of CDSCB" )
-`MPRnb( WCDSCB ,0.0 ,"F/m/V" ,"Width dependence of CDSCB" )
-`MPRnb( PCDSCB ,0.0 ,"F/V" ,"Area dependence of CDSCB" )
-
-// Drain saturation voltage
-`MPRnb( VSAT ,1e5 ,"m/s" ,"Saturation Velocity" )
-`MPRnb( LVSAT ,0.0 ,"m^2/s" ,"Length dependence of VSAT" )
-`MPRnb( WVSAT ,0.0 ,"m^2/s" ,"Width dependence of VSAT" )
-`MPRnb( PVSAT ,0.0 ,"m^3/s" ,"Area dependence of VSAT" )
-`MPRnb( VSATL ,0.0 ,"m^VSATLEXP" ,"Length dependence coefficient of of VSAT" )
-`MPRoz( VSATLEXP ,1.0 ,"" ,"Length dependence exponent coefficient of VSAT" )
-`MPRnb( VSATW ,0.0 ,"m^VSATWEXP" ,"Width dependence coefficient of of VSAT" )
-`MPRoz( VSATWEXP ,1.0 ,"" ,"Width dependence exponent coefficient of of VSAT" )
-`MPRnb( VSATWL ,0.0 ,"m^(2*VSATWLEXP)" ,"Width-Length dependence coefficient of of VSAT" )
-`MPRoz( VSATWLEXP ,1.0 ,"" ,"Width-Length dependence exponent coefficient of of VSAT" )
-`MPRnb( VSATR ,VSAT ,"m/s" ,"Saturation Velocity" )
-`MPRnb( LVSATR ,LVSAT ,"m^2/s" ,"Length dependence of VSATR" )
-`MPRnb( WVSATR ,WVSAT ,"m^2/s" ,"Width dependence of VSATR" )
-`MPRnb( PVSATR ,PVSAT ,"m^3/s" ,"Area dependence of VSATR" )
-`MPRnb( DELTA ,0.125 ,"" ,"Smoothing function factor for Vdsat" )
-`MPRnb( LDELTA ,0.0 ,"m" ,"Length dependence of DELTA" )
-`MPRnb( WDELTA ,0.0 ,"m" ,"Width dependence of DELTA" )
-`MPRnb( PDELTA ,0.0 ,"m^2" ,"Area dependence of DELTA" )
-`MPRnb( DELTAL ,0.0 ,"m^DELTALEXP" ,"Length dependence coefficient of DELTA" )
-`MPRoz( DELTALEXP ,1.0 ,"" ,"Length dependence exponent coefficient of DELTA" )
-`MPRnb( VSATCV ,VSAT ,"m/s" ,"VSAT parameter for CV" )
-`MPRnb( LVSATCV ,LVSAT ,"m^2/s" ,"Length dependence of VSATCV" )
-`MPRnb( WVSATCV ,WVSAT ,"m^2/s" ,"Width dependence of VSATCV" )
-`MPRnb( PVSATCV ,PVSAT ,"m^3/s" ,"Area dependence of VSATCV" )
-`MPRnb( VSATCVL ,VSATL ,"m^VSATCVLEXP" ,"Length dependence coefficient of VSATCV" )
-`MPRoz( VSATCVLEXP ,VSATLEXP ,"" ,"Length dependence exponent coefficient of VSATCV" )
-`MPRnb( VSATCVW ,VSATW ,"m^VSATCVWEXP" ,"Width dependence coefficient of VSATCV" )
-`MPRoz( VSATCVWEXP ,VSATWEXP ,"" ,"Width dependence exponent coefficient of VSATCV" )
-`MPRnb( VSATCVWL ,VSATWL ,"m^(2*VSATCVWLEXP)" ,"Width-Length dependence coefficient of VSATCV" )
-`MPRoz( VSATCVWLEXP ,VSATWLEXP ,"" ,"Width-Length dependence exponent coefficient of VSATCV" )
-
-// Mobility degradation
-`MPRoo( UP1 ,0.0 ,"" ,-inf ,inf ,"Mobility channel length coefficient" )
-`MPRex( LP1 ,1.0e-8 ,"m" ,0.0 ,"Mobility channel length exponential coefficient" )
-`MPRoo( UP2 ,0.0 ,"" ,-inf ,inf ,"Mobility channel length coefficient" )
-`MPRex( LP2 ,1.0e-8 ,"m" ,0.0 ,"Mobility channel length exponential coefficient" )
-`MPRnb( U0 ,67.0e-3 ,"m^2/V/s" ,"Low Field mobility." )
-`MPRnb( U0L ,0.0 ,"m^U0LEXP" ,"Length dependence coefficient of U0L" )
-`MPRoz( U0LEXP ,1.0 ,"" ,"Length dependence exponent coefficient of U0L" )
-`MPRnb( LU0 ,0.0 ,"m^3/V/s" ,"Length dependence of U0" )
-`MPRnb( WU0 ,0.0 ,"m^3/V/s" ,"Width dependence of U0" )
-`MPRnb( PU0 ,0.0 ,"m^4/V/s" ,"Area dependence of U0" )
-`MPRnb( U0R ,U0 ,"m2/V/s" ,"Reverse-mode Low Field mobility." )
-`MPRnb( LU0R ,LU0 ,"m^3/V/s" ,"Length dependence of U0R" )
-`MPRnb( WU0R ,WU0 ,"m^3/V/s" ,"Width dependence of U0R" )
-`MPRnb( PU0R ,PU0 ,"m^4/V/s" ,"Area dependence of U0R" )
-`MPRnb( ETAMOB ,1.0 ,"" ,"Effective field parameter (should be kept close to 1)" )
-`MPRnb( UA ,0.001 ,"(m/V)^EU" ,"Mobility reduction coefficient" )
-`MPRnb( UAL ,0.0 ,"m^UALEXP" ,"Length dependence coefficient of UA" )
-`MPRoz( UALEXP ,1.0 ,"" ,"Length dependence exponent coefficient of UA" )
-`MPRnb( UAW ,0.0 ,"m^UAWEXP" ,"Width dependence coefficient of UA" )
-`MPRoz( UAWEXP ,1.0 ,"" ,"Width dependence exponent coefficient of UA" )
-`MPRnb( UAWL ,0.0 ,"m^UAWLEXP" ,"Width-Length dependence coefficient of UA" )
-`MPRoz( UAWLEXP ,1.0 ,"" ,"Width-Length dependence coefficient of UA" )
-`MPRnb( LUA ,0.0 ,"m*(m/V)^EU" ,"Length dependence of UA" )
-`MPRnb( WUA ,0.0 ,"m*(m/V)^EU" ,"Width dependence of UA" )
-`MPRnb( PUA ,0.0 ,"m^2*(m/V)^EU" ,"Area dependence of UA" )
-`MPRnb( UAR ,UA ,"(m/V)^EU" ,"Reverse-mode Mobility reduction coefficient" )
-`MPRnb( LUAR ,LUA ,"m*(m/V)^EU" ,"Length dependence of UAR" )
-`MPRnb( WUAR ,WUA ,"m*(m/V)^EU" ,"Width dependence of UAR" )
-`MPRnb( PUAR ,PUA ,"m^2*(m/V)^EU" ,"Area dependence of UAR" )
-`MPRnb( EU ,1.5 ,"" ,"Mobility reduction exponent" )
-`MPRnb( LEU ,0.0 ,"m" ,"Length dependence of EU" )
-`MPRnb( WEU ,0.0 ,"m" ,"Width dependence of EU" )
-`MPRnb( PEU ,0.0 ,"m^2" ,"Area dependence of EU" )
-`MPRnb( EUL ,0.0 ,"m^EULEXP" ,"Length dependence coefficient of EU" )
-`MPRoz( EULEXP ,1.0 ,"" ,"Length dependence exponent coefficient of EU" )
-`MPRnb( EUW ,0.0 ,"m^EUWEXP" ,"Width dependence coefficient of EU" )
-`MPRoz( EUWEXP ,1.0 ,"" ,"Width dependence exponent coefficient of EU" )
-`MPRnb( EUWL ,0.0 ,"m^EUWLEXP" ,"Width-Length dependence coefficient of EU" )
-`MPRoz( EUWLEXP ,1.0 ,"" ,"Width-Length dependence coefficient of EU" )
-`MPRnb( UD ,0.001 ,"" ,"Coulomb scattering parameter" )
-`MPRnb( UDL ,0.0 ,"m^UDLEXP" ,"Length dependence coefficient of UD" )
-`MPRoz( UDLEXP ,1.0 ,"" ,"Length dependence exponent coefficient of UD" )
-`MPRnb( LUD ,0.0 ,"m" ,"Length dependence of UD" )
-`MPRnb( WUD ,0.0 ,"m" ,"Width dependence of UD" )
-`MPRnb( PUD ,0.0 ,"m^2" ,"Area dependence of UD" )
-`MPRnb( UDR ,UD ,"" ,"Reverse-mode Coulomb scattering parameter" )
-`MPRnb( LUDR ,LUD ,"m" ,"Length dependence of UDR" )
-`MPRnb( WUDR ,WUD ,"m" ,"Width dependence of UDR" )
-`MPRnb( PUDR ,PUD ,"m^2" ,"Area dependence of UDR" )
-`MPRnb( UCS ,2.0 ,"" ,"Coulomb scattering parameter" )
-`MPRnb( LUCS ,0.0 ,"m" ,"Length dependence of UCS" )
-`MPRnb( WUCS ,0.0 ,"m" ,"Width dependence of UCS" )
-`MPRnb( PUCS ,0.0 ,"m^2" ,"Area dependence of UCS" )
-`MPRnb( UCSR ,UCS ,"" ,"Reverse-mode Coulomb scattering parameter" )
-`MPRnb( LUCSR ,LUCS ,"m" ,"Length dependence of UCSR" )
-`MPRnb( WUCSR ,WUCS ,"m" ,"Width dependence of UCSR" )
-`MPRnb( PUCSR ,PUCS ,"m^2" ,"Area dependence of UCSR" )
-`MPRnb( UC ,0.0 ,"(m/V)^EU/V" ,"Mobility reduction with body bias" )
-`MPRnb( UCL ,0.0 ,"m^UCLEXP" ,"Length dependence coefficient of UC" )
-`MPRoz( UCLEXP ,1.0 ,"" ,"Length dependence exponent coefficient of UC" )
-`MPRnb( UCW ,0.0 ,"m^UCWEXP" ,"Width dependence coefficient of UC" )
-`MPRoz( UCWEXP ,1.0 ,"" ,"Width dependence exponent coefficient of UC" )
-`MPRnb( UCWL ,0.0 ,"m^(2*UCWLEXP)" ,"Width-Length dependence coefficient of UC" )
-`MPRoz( UCWLEXP ,1.0 ,"" ,"Width-Length dependence exponent coefficient of UC" )
-`MPRnb( LUC ,0.0 ,"m*(m/V)^EU/V" ,"Length dependence of UC" )
-`MPRnb( WUC ,0.0 ,"m*(m/V)^EU/V" ,"Width dependence of UC" )
-`MPRnb( PUC ,0.0 ,"m^2*(m/V)^EU/V" ,"Area dependence of UC" )
-`MPRnb( UCR ,UC ,"(m/V)^EU/V" ,"Reverse-mode Mobility reduction with body bias" )
-`MPRnb( LUCR ,LUC ,"m*(m/V)^EU/V" ,"Length dependence of UCR" )
-`MPRnb( WUCR ,WUC ,"m*(m/V)^EU/V" ,"Width dependence of UCR" )
-`MPRnb( PUCR ,PUC ,"m^2*(m/V)^EU/V" ,"Area dependence of UCR" )
-
-// Channel length modulation
-`MPRnb( PCLM ,0.0 ,"" ,"CLM pre-factor" )
-`MPRnb( PCLML ,0.0 ,"m^PCLMLEXP" ,"Length dependence coefficient of PCLM" )
-`MPRoz( PCLMLEXP ,1.0 ,"" ,"Length dependence exponent coefficient of PCLM" )
-`MPRnb( LPCLM ,0.0 ,"m" ,"Length dependence of PCLM" )
-`MPRnb( WPCLM ,0.0 ,"m" ,"Width dependence of PCLM" )
-`MPRnb( PPCLM ,0.0 ,"m^2" ,"Area dependence of PCLM" )
-`MPRnb( PCLMR ,PCLM ,"" ,"Reverse-mode CLM pre-factor" )
-`MPRnb( LPCLMR ,LPCLM ,"m" ,"Length dependence of PCLMR" )
-`MPRnb( WPCLMR ,WPCLM ,"m" ,"Width dependence of PCLMR" )
-`MPRnb( PPCLMR ,PPCLM ,"m^2" ,"Area dependence of PCLMR" )
-`MPRnb( PCLMG ,0.0 ,"V" ,"CLM pre-factor gate voltage dependence" )
-`MPRnb( PCLMCV ,PCLM ,"" ,"CLM parameter for CV" )
-`MPRnb( PCLMCVL ,PCLML ,"m^PCLMLEXP" ,"Length dependence coefficient of PCLMCV" )
-`MPRoz( PCLMCVLEXP ,PCLMLEXP ,"" ,"Length dependence exponent coefficient of PCLMCV" )
-`MPRnb( LPCLMCV ,LPCLM ,"m" ,"Length dependence of PCLMCV" )
-`MPRnb( WPCLMCV ,WPCLM ,"m" ,"Width dependence of PCLMCV" )
-`MPRnb( PPCLMCV ,PPCLM ,"m^2" ,"Area dependence of PCLMCV" )
-`MPRnb( PSCBE1 ,4.24e8 ,"V/m" ,"Substrate current body-effect coefficient" )
-`MPRnb( LPSCBE1 ,0.0 ,"V" ,"Length dependence of PSCBE1" )
-`MPRnb( WPSCBE1 ,0.0 ,"V" ,"Width dependence of PSCBE1" )
-`MPRnb( PPSCBE1 ,0.0 ,"V*m" ,"Area dependence of PSCBE1" )
-`MPRnb( PSCBE2 ,1.0e-8 ,"m/V" ,"Substrate current body-effect coefficient" )
-`MPRnb( LPSCBE2 ,0.0 ,"m^2/V" ,"Length dependence of PSCBE2" )
-`MPRnb( WPSCBE2 ,0.0 ,"m^2/V" ,"Width dependence of PSCBE2" )
-`MPRnb( PPSCBE2 ,0.0 ,"m^3/V" ,"Area dependence of PSCBE2" )
-`MPRnb( PDITS ,0.0 ,"1/V" ,"Coefficient for drain-induced Vth shift" )
-`MPRnb( LPDITS ,0.0 ,"m/V" ,"Length dependence of PDITS" )
-`MPRnb( WPDITS ,0.0 ,"m/V" ,"Width dependence of PDITS" )
-`MPRnb( PPDITS ,0.0 ,"m^2/V" ,"Area dependence of PDITS" )
-`MPRcz( PDITSL ,0.0 ,"1/m" ,"L dependence of drain-induced Vth shift" )
-`MPRnb( PDITSD ,0.0 ,"1/V" ,"Vds dependence of drain-induced Vth shift" )
-`MPRnb( LPDITSD ,0.0 ,"m/V" ,"Length dependence of PDITSD" )
-`MPRnb( WPDITSD ,0.0 ,"m/V" ,"Width dependence of PDITSD" )
-`MPRnb( PPDITSD ,0.0 ,"m^2/V" ,"Area dependence of PDITSD" )
-
-// S/D series resistance
-`MPRcz( RSH ,0.0 ,"ohm/square" ,"Source-drain sheet resistance" )
-`MPRnb( PRWG ,1.0 ,"1/V" ,"Gate bias dependence of S/D extension resistance" )
-`MPRnb( LPRWG ,0.0 ,"m/V" ,"Length dependence of PRWG" )
-`MPRnb( WPRWG ,0.0 ,"m/V" ,"Width dependence of PRWG" )
-`MPRnb( PPRWG ,0.0 ,"m^2/V" ,"Area dependence of PRWG" )
-`MPRnb( PRWB ,0.0 ,"1/V" ,"Body bias dependence of resistance" )
-`MPRnb( LPRWB ,0.0 ,"m/V" ,"Length dependence of PRWB" )
-`MPRnb( WPRWB ,0.0 ,"m/V" ,"Width dependence of PRWB" )
-`MPRnb( PPRWB ,0.0 ,"m^2/V" ,"Area dependence of PRWB" )
-`MPRnb( PRWBL ,0.0 ,"m^PRWBLEXP" ,"Length dependence coefficient of PPRWB" )
-`MPRoz( PRWBLEXP ,1.0 ,"" ,"Length dependence exponent coefficient of PPRWB" )
-`MPRnb( WR ,1.0 ,"" ,"W dependence parameter of S/D extension resistance" )
-`MPRnb( LWR ,0.0 ,"m" ,"Length dependence of WR" )
-`MPRnb( WWR ,0.0 ,"m" ,"Width dependence of WR" )
-`MPRnb( PWR ,0.0 ,"m^2" ,"Area dependence of WR" )
-`MPRnb( RSWMIN ,0.0 ,"ohm*m^WR" ,"Source Resistance per unit width at high Vgs (RDSMOD=1)" )
-`MPRnb( LRSWMIN ,0.0 ,"ohm*m^(2*WR)" ,"Length dependence of RSWMIN" )
-`MPRnb( WRSWMIN ,0.0 ,"ohm*m^(2*WR)" ,"Width dependence of RSWMIN" )
-`MPRnb( PRSWMIN ,0.0 ,"ohm*m^(3*WR)" ,"Area dependence of RSWMIN" )
-`MPRnb( RSW ,10.0 ,"ohm*m^WR" ,"Zero bias Source Resistance (RDSMOD=1)" )
-`MPRnb( LRSW ,0.0 ,"ohm*m^(2*WR)" ,"Length dependence of RSW" )
-`MPRnb( WRSW ,0.0 ,"ohm*m^(2*WR)" ,"Width dependence of RSW" )
-`MPRnb( PRSW ,0.0 ,"ohm*m^(3*WR)" ,"Area dependence of RSW" )
-`MPRnb( RSWL ,0.0 ,"m^RSWLEXP" ,"Geometrical scaling of RSW (RDSMOD=1)" )
-`MPRoz( RSWLEXP ,1.0 ,"" ,"Geometrical scaling of RSW (RDSMOD=1)" )
-`MPRnb( RDWMIN ,RSWMIN ,"ohm*m^WR" ,"Drain Resistance per unit width at high Vgs (RDSMOD=1)" )
-`MPRnb( LRDWMIN ,LRSWMIN ,"ohm*m^(2*WR)" ,"Length dependence of RDWMIN" )
-`MPRnb( WRDWMIN ,WRSWMIN ,"ohm*m^(2*WR)" ,"Width dependence of RDWMIN" )
-`MPRnb( PRDWMIN ,PRSWMIN ,"ohm*m^(3*WR)" ,"Area dependence of RDWMIN" )
-`MPRnb( RDW ,RSW ,"ohm*m^WR" ,"zero bias Drain Resistance (RDSMOD=1)" )
-`MPRnb( LRDW ,LRSW ,"ohm*m^(2*WR)" ,"Length dependence of RDW" )
-`MPRnb( WRDW ,WRSW ,"ohm*m^(2*WR)" ,"Width dependence of RDW" )
-`MPRnb( PRDW ,PRSW ,"ohm*m^(3*WR)" ,"Area dependence of RDW" )
-`MPRnb( RDWL ,RSWL ,"m^RDWLEXP" ,"Geometrical scaling of RDW (RDSMOD=1)" )
-`MPRoz( RDWLEXP ,RSWLEXP ,"" ,"Geometrical scaling of RDW (RDSMOD=1)" )
-`MPRnb( RDSWMIN ,0.0 ,"ohm*m^WR" ,"S/D Resistance per unit width at high Vgs (RDSMOD=0 and RDSMOD=2)" )
-`MPRnb( LRDSWMIN ,0.0 ,"ohm*m^(2*WR)" ,"Length dependence of RDSWMIN " )
-`MPRnb( WRDSWMIN ,0.0 ,"ohm*m^(2*WR)" ,"Width dependence of RDSWMIN " )
-`MPRnb( PRDSWMIN ,0.0 ,"ohm*m^(3*WR)" ,"Area dependence of RDSWMIN " )
-`MPRnb( RDSW ,20.0 ,"ohm*um^WR" ,"Zero bias Resistance (RDSMOD=0 and RDSMOD=2)" )
-`MPRnb( RDSWL ,0.0 ,"m^RDSWLEXP" ,"Geometrical scaling of RDSW (RDSMOD=0 and RDSMOD=2)" )
-`MPRoz( RDSWLEXP ,1.0 ,"" ,"Geometrical scaling of RDSW (RDSMOD=0 and RDSMOD=2)" )
-`MPRnb( LRDSW ,0.0 ,"ohm*m^(2*WR)" ,"Length dependence of RDSW" )
-`MPRnb( WRDSW ,0.0 ,"ohm*m^(2*WR)" ,"Width dependence of RDSW" )
-`MPRnb( PRDSW ,0.0 ,"ohm*m^(3*WR)" ,"Area dependence of RDSW " )
-
-// Velocity saturation
-`MPRnb( PSAT ,1.0 ,"" ,"Gmsat variation with gate bias" )
-`MPRnb( LPSAT ,0.0 ,"m" ,"Length dependence of PSAT" )
-`MPRnb( WPSAT ,0.0 ,"m" ,"Width dependence of PSAT" )
-`MPRnb( PPSAT ,0.0 ,"m^2" ,"Area dependence of PSAT" )
-`MPRnb( PSATL ,0.0 ,"m^PSATLEXP" ,"Length dependence coefficient of PSATL" )
-`MPRoz( PSATLEXP ,1.0 ,"" ,"Length dependence exponent coefficient of PSATLEXP" )
-`MPRnb( PSATB ,0.0 ,"1/V" ,"Body bias effect on Idsat" )
-`MPRnb( PSATR ,PSAT ,"" ,"Reverse-mode Gmsat variation with gate bias" )
-`MPRnb( LPSATR ,LPSAT ,"m" ,"Length dependence of PSATR" )
-`MPRnb( WPSATR ,WPSAT ,"m" ,"Width dependence of PSATR" )
-`MPRnb( PPSATR ,PPSAT ,"m^2" ,"Area dependence of PSATR" )
-`MPRnb( LPSATB ,0.0 ,"m/V" ,"Length dependence of PSATB" )
-`MPRnb( WPSATB ,0.0 ,"m/V" ,"Width dependence of PSATB" )
-`MPRnb( PPSATB ,0.0 ,"m^2/V" ,"Area dependence of PSATB" )
-`MPRoz( PSATX ,1.0 ,"" ,"Fine tuning of PTWG effect" )
-`MPRnb( PTWG ,0.0 ,"" ,"Idsat variation with gate bias" )
-`MPRnb( LPTWG ,0.0 ,"m" ,"Length dependence of PTWG" )
-`MPRnb( WPTWG ,0.0 ,"m" ,"Width dependence of PTWG" )
-`MPRnb( PPTWG ,0.0 ,"m^2" ,"Area dependence of PTWG" )
-`MPRnb( PTWGL ,0.0 ,"m^PTWGLEXP" ,"Length dependence coefficient of PTWG" )
-`MPRoz( PTWGLEXP ,1.0 ,"" ,"Length dependence exponent coefficient of PTWG" )
-`MPRnb( PTWGR ,PTWG ,"" ,"Reverse-mode Idsat variation with gate bias" )
-`MPRnb( LPTWGR ,LPTWG ,"m" ,"Length dependence of PTWGR" )
-`MPRnb( WPTWGR ,WPTWG ,"m" ,"Width dependence of PTWGR" )
-`MPRnb( PPTWGR ,PPTWG ,"m^2" ,"Area dependence of PTWGR" )
-`MPRnb( PTWGLR ,PTWGL ,"m^PTWGLEXPR" ,"Length dependence coefficient of PTWG" )
-`MPRoz( PTWGLEXPR ,PTWGLEXP ,"" ,"Length dependence exponent coefficient of PTWG" )
-
-// Velocity non-saturation effect
-`MPRnb( A1 ,0.0 ,"1/V^2" ,"Non-saturation effect parameter for strong inversion region" )
-`MPRnb( LA1 ,0.0 ,"m/V^2" ,"Length dependence of A1" )
-`MPRnb( WA1 ,0.0 ,"m/V^2" ,"Width dependence of A1" )
-`MPRnb( PA1 ,0.0 ,"m^2/V^2" ,"Area dependence of A1" )
-`MPRnb( A11 ,0.0 ,"" ,"Temperature dependence of A1" )
-`MPRnb( LA11 ,0.0 ,"m" ,"Length dependence of A11" )
-`MPRnb( WA11 ,0.0 ,"m" ,"Width dependence of A11" )
-`MPRnb( PA11 ,0.0 ,"m^2" ,"Area dependence of A11" )
-`MPRnb( A2 ,0.0 ,"1/V" ,"Non-saturation effect parameter for moderate inversion region" )
-`MPRnb( LA2 ,0.0 ,"m/V" ,"Length dependence of A2" )
-`MPRnb( WA2 ,0.0 ,"m/V" ,"Width dependence of A2" )
-`MPRnb( PA2 ,0.0 ,"m^2/V" ,"Area dependence of A2" )
-`MPRnb( A21 ,0.0 ,"" ,"Temperature dependence of A2" )
-`MPRnb( LA21 ,0.0 ,"m" ,"Length dependence of A21" )
-`MPRnb( WA21 ,0.0 ,"m" ,"Width dependence of A21" )
-`MPRnb( PA21 ,0.0 ,"m^2" ,"Area dependence of A21" )
-
-// Output conductance
-`MPRnb( PDIBLC ,0.0 ,"" ,"Parameter for DIBL effect on Rout" )
-`MPRnb( PDIBLCL ,0.0 ,"m^PDIBLCLEXP" ,"Length dependence coefficient of PDIBLC" )
-`MPRoz( PDIBLCLEXP ,1.0 ,"" ,"Length dependence exponent coefficient of PDIBLC" )
-`MPRnb( LPDIBLC ,0.0 ,"m" ,"Length dependence of PDIBLC" )
-`MPRnb( WPDIBLC ,0.0 ,"m" ,"Width dependence of PDIBLC" )
-`MPRnb( PPDIBLC ,0.0 ,"m^2" ,"Area dependence of PDIBLC" )
-`MPRnb( PDIBLCR ,PDIBLC ,"" ,"Reverse-mode Parameter for DIBL effect on Rout" )
-`MPRnb( PDIBLCLR ,PDIBLCL ,"m^PDIBLCLEXPR" ,"Length dependence coefficient of PDIBLC" )
-`MPRoz( PDIBLCLEXPR ,PDIBLCLEXP ,"" ,"Length dependence exponent coefficient of PDIBLC" )
-`MPRnb( LPDIBLCR ,LPDIBLC ,"m" ,"Length dependence of PDIBLCR" )
-`MPRnb( WPDIBLCR ,WPDIBLC ,"m" ,"Width dependence of PDIBLCR" )
-`MPRnb( PPDIBLCR ,PPDIBLC ,"m^2" ,"Area dependence of PDIBLCR" )
-`MPRnb( PDIBLCB ,0.0 ,"1/V" ,"Parameter for DIBL effect on Rout" )
-`MPRnb( LPDIBLCB ,0.0 ,"m/V" ,"Length dependence of PDIBLCB" )
-`MPRnb( WPDIBLCB ,0.0 ,"m/V" ,"Width dependence of PDIBLCB" )
-`MPRnb( PPDIBLCB ,0.0 ,"m^2/V" ,"Area dependence of PDIBLCB" )
-`MPRnb( PVAG ,1.0 ,"" ,"Vg dependence of early voltage" )
-`MPRnb( LPVAG ,0.0 ,"m" ,"Length dependence of PVAG" )
-`MPRnb( WPVAG ,0.0 ,"m" ,"Width dependence of PVAG" )
-`MPRnb( PPVAG ,0.0 ,"m^2" ,"Area dependence of PVAG" )
-`MPRnb( FPROUT ,0.0 ,"V/m^0.5" ,"gds degradation factor due to pocket implant." )
-`MPRnb( FPROUTL ,0.0 ,"m^FPROUTLEXP" ,"Length dependence coefficient of FPROUT" )
-`MPRoz( FPROUTLEXP ,1.0 ,"" ,"Length dependence exponent coefficient of FPROUT" )
-`MPRnb( LFPROUT ,0.0 ,"V*m^0.5" ,"Length dependence of FPROUT" )
-`MPRnb( WFPROUT ,0.0 ,"V*m^0.5" ,"Width dependence of FPROUT" )
-`MPRnb( PFPROUT ,0.0 ,"V*m^1.5" ,"Area dependence of FPROUT" )
-
-// Impact ionization current
-`MPRnb( ALPHA0 ,0.0 ,"m/V" ,"First parameter of Iii" )
-`MPRnb( ALPHA0L ,0.0 ,"m^ALPHA0LEXP" ,"Length dependence coefficient of ALPHA0" )
-`MPRoz( ALPHA0LEXP ,1.0 ,"" ,"Length dependence exponent coefficient of ALPHA0" )
-`MPRnb( LALPHA0 ,0.0 ,"m^2/V" ,"Length dependence of ALPHA0" )
-`MPRnb( WALPHA0 ,0.0 ,"m^2/V" ,"Width dependence of ALPHA0" )
-`MPRnb( PALPHA0 ,0.0 ,"m^3/V" ,"Area dependence of ALPHA0" )
-`MPRnb( BETA0 ,0.0 ,"1/V" ,"Vds dependent parameter of Iii" )
-`MPRnb( LBETA0 ,0.0 ,"m/V" ,"Length dependence of BETA0" )
-`MPRnb( WBETA0 ,0.0 ,"m/V" ,"Width dependence of BETA0" )
-`MPRnb( PBETA0 ,0.0 ,"m^2/V" ,"Area dependence of BETA0" )
-
-// Gate dielectric tunnelling current model parameters
-`MPRnb( AIGBACC ,1.36e-2 ,"(F*s^2/g)^0.5/m" ,"Parameter for Igb" )
-`MPRnb( BIGBACC ,1.71e-3 ,"(F*s^2/g)^0.5/m/V" ,"Parameter for Igb" )
-`MPRnb( CIGBACC ,0.075 ,"1/V" ,"Parameter for Igb" )
-`MPRnb( NIGBACC ,1.0 ,"" ,"Parameter for Igbacc slope" )
-`MPRnb( AIGBINV ,1.11e-2 ,"(F*s^2/g)^0.5/m" ,"Parameter for Igb" )
-`MPRnb( BIGBINV ,9.49e-4 ,"(F*s^2/g)^0.5/m/V" ,"Parameter for Igb" )
-`MPRnb( CIGBINV ,0.006 ,"1/V" ,"Parameter for Igb" )
-`MPRnb( EIGBINV ,1.1 ,"V" ,"Parameter for the Si band-gap for Igbinv" )
-`MPRnb( NIGBINV ,3.0 ,"" ,"Parameter for Igbinv slope" )
-`MPRnb( AIGC ,((TYPE == `ntype) ? 1.36e-2 : 9.8e-3) ,"(F*s^2/g)^0.5/m" ,"Parameter for Igc" )
-`MPRnb( BIGC ,((TYPE == `ntype) ? 1.71e-3 : 7.59e-4) ,"(F*s^2/g)^0.5/m/V" ,"Parameter for Igc" )
-`MPRnb( CIGC ,((TYPE == `ntype) ? 0.075 : 0.03) ,"1/V" ,"Parameter for Igc" )
-`MPRnb( AIGS ,((TYPE == `ntype) ? 1.36e-2 : 9.8e-3) ,"(F*s^2/g)^0.5/m" ,"Parameter for Igs d" )
-`MPRnb( BIGS ,((TYPE == `ntype) ? 1.71e-3 : 7.59e-4) ,"(F*s^2/g)^0.5/m/V" ,"Parameter for Igs d" )
-`MPRnb( CIGS ,((TYPE == `ntype) ? 0.075 : 0.03) ,"1/V" ,"Parameter for Igs d" )
-`MPRnb( AIGD ,((TYPE == `ntype) ? 1.36e-2 : 9.8e-3) ,"(F*s^2/g)^0.5/m" ,"Parameter for Igs d" )
-`MPRnb( BIGD ,((TYPE == `ntype) ? 1.71e-3 : 7.59e-4) ,"(F*s^2/g)^0.5/m/V" ,"Parameter for Igs d" )
-`MPRnb( CIGD ,((TYPE == `ntype) ? 0.075 : 0.03) ,"1/V" ,"Parameter for Igs d" )
-`MPRnb( DLCIG ,LINT ,"m" ,"Delta L for Ig model" )
-`MPRnb( DLCIGD ,DLCIG ,"m" ,"Delta L for Ig model" )
-`MPRnb( POXEDGE ,1.0 ,"" ,"Factor for the gate edge Tox" )
-`MPRnb( NTOX ,1.0 ,"" ,"Exponent for Tox ratio" )
-`MPRoz( TOXREF ,3.0e-9 ,"m" ,"Target tox value" )
-`MPRcc( PIGCD ,1.0 ,"" ,-50 ,50 ,"Igc, S/D partition parameter" )
-`MPRnb( AIGCL ,0.0 ,"m" ,"Length dependence coefficient of AIGC" )
-`MPRnb( AIGCW ,0.0 ,"m" ,"Width dependence coefficient of AIGC" )
-`MPRnb( AIGSL ,0.0 ,"m" ,"Length dependence coefficient of AIGS" )
-`MPRnb( AIGSW ,0.0 ,"m" ,"Width dependence coefficient of AIGS" )
-`MPRnb( AIGDL ,0.0 ,"m" ,"Length dependence coefficient of AIGD" )
-`MPRnb( AIGDW ,0.0 ,"m" ,"Width dependence coefficient of AIGD" )
-`MPRnb( PIGCDL ,0.0 ,"m" ,"Length dependence coefficient of PIGCD" )
-`MPRnb( LAIGBINV ,0.0 ,"(F*s^2/g)^0.5" ,"Length dependence of AIGBINV" )
-`MPRnb( WAIGBINV ,0.0 ,"(F*s^2/g)^0.5" ,"Width dependence of AIGBINV" )
-`MPRnb( PAIGBINV ,0.0 ,"m*(F*s^2/g)^0.5" ,"Area dependence of AIGBINV" )
-`MPRnb( LBIGBINV ,0.0 ,"(F*s^2/g)^0.5/V" ,"Length dependence of BIGBINV" )
-`MPRnb( WBIGBINV ,0.0 ,"(F*s^2/g)^0.5/V" ,"Width dependence of BIGBINV" )
-`MPRnb( PBIGBINV ,0.0 ,"m*(F*s^2/g)^0.5/V" ,"Area dependence of BIGBINV" )
-`MPRnb( LCIGBINV ,0.0 ,"m/V" ,"Length dependence of CIGBINV" )
-`MPRnb( WCIGBINV ,0.0 ,"m/V" ,"Width dependence of CIGBINV" )
-`MPRnb( PCIGBINV ,0.0 ,"m^2/V" ,"Area dependence of CIGBINV" )
-`MPRnb( LEIGBINV ,0.0 ,"m*V" ,"Length dependence of EIGBINV" )
-`MPRnb( WEIGBINV ,0.0 ,"m*V" ,"Width dependence of EIGBINV" )
-`MPRnb( PEIGBINV ,0.0 ,"m^2*V" ,"Area dependence of EIGBINV" )
-`MPRnb( LNIGBINV ,0.0 ,"m" ,"Length dependence of NIGBINV" )
-`MPRnb( WNIGBINV ,0.0 ,"m" ,"Width dependence of NIGBINV" )
-`MPRnb( PNIGBINV ,0.0 ,"m^2" ,"Area dependence of NIGBINV" )
-`MPRnb( LAIGBACC ,0.0 ,"(F*s^2/g)^0.5" ,"Length dependence of AIGBACC" )
-`MPRnb( WAIGBACC ,0.0 ,"(F*s^2/g)^0.5" ,"Width dependence of AIGBACC" )
-`MPRnb( PAIGBACC ,0.0 ,"m*(F*s^2/g)^0.5" ,"Area dependence of AIGBACC" )
-`MPRnb( LBIGBACC ,0.0 ,"(F*s^2/g)^0.5/V" ,"Length dependence of BIGBACC" )
-`MPRnb( WBIGBACC ,0.0 ,"(F*s^2/g)^0.5/V" ,"Width dependence of BIGBACC" )
-`MPRnb( PBIGBACC ,0.0 ,"m*(F*s^2/g)^0.5/V" ,"Area dependence of BIGBACC" )
-`MPRnb( LCIGBACC ,0.0 ,"m/V" ,"Length dependence of CIGBACC" )
-`MPRnb( WCIGBACC ,0.0 ,"m/V" ,"Width dependence of CIGBACC" )
-`MPRnb( PCIGBACC ,0.0 ,"m^2/V" ,"Area dependence of CIGBACC" )
-`MPRnb( LNIGBACC ,0.0 ,"m" ,"Length dependence of NIGBACC" )
-`MPRnb( WNIGBACC ,0.0 ,"m" ,"Width dependence of NIGBACC" )
-`MPRnb( PNIGBACC ,0.0 ,"m^2" ,"Area dependence of NIGBACC" )
-`MPRnb( LAIGC ,0.0 ,"(F*s^2/g)^0.5" ,"Length dependence of AIGC" )
-`MPRnb( WAIGC ,0.0 ,"(F*s^2/g)^0.5" ,"Width dependence of AIGC" )
-`MPRnb( PAIGC ,0.0 ,"m*(F*s^2/g)^0.5" ,"Area dependence of AIGC" )
-`MPRnb( LBIGC ,0.0 ,"(F*s^2/g)^0.5/V" ,"Length dependence of BIGC" )
-`MPRnb( WBIGC ,0.0 ,"(F*s^2/g)^0.5/V" ,"Width dependence of BIGC" )
-`MPRnb( PBIGC ,0.0 ,"m*(F*s^2/g)^0.5/V" ,"Area dependence of BIGC" )
-`MPRnb( LCIGC ,0.0 ,"m/V" ,"Length dependence of CIGC" )
-`MPRnb( WCIGC ,0.0 ,"m/V" ,"Width dependence of CIGC" )
-`MPRnb( PCIGC ,0.0 ,"m^2/V" ,"Area dependence of CIGC" )
-`MPRnb( LAIGS ,0.0 ,"(F*s^2/g)^0.5" ,"Length dependence of AIGS" )
-`MPRnb( WAIGS ,0.0 ,"(F*s^2/g)^0.5" ,"Width dependence of AIGS" )
-`MPRnb( PAIGS ,0.0 ,"m*(F*s^2/g)^0.5" ,"Area dependence of AIGS" )
-`MPRnb( LBIGS ,0.0 ,"(F*s^2/g)^0.5/V" ,"Length dependence of BIGS" )
-`MPRnb( WBIGS ,0.0 ,"(F*s^2/g)^0.5/V" ,"Width dependence of BIGS" )
-`MPRnb( PBIGS ,0.0 ,"m*(F*s^2/g)^0.5/V" ,"Area dependence of BIGS" )
-`MPRnb( LCIGS ,0.0 ,"m/V" ,"Length dependence of CIGS" )
-`MPRnb( WCIGS ,0.0 ,"m/V" ,"Width dependence of CIGS" )
-`MPRnb( PCIGS ,0.0 ,"m^2/V" ,"Area dependence of CIGS" )
-`MPRnb( LAIGD ,0.0 ,"(F*s^2/g)^0.5" ,"Length dependence of AIGD" )
-`MPRnb( WAIGD ,0.0 ,"(F*s^2/g)^0.5" ,"Width dependence of AIGD" )
-`MPRnb( PAIGD ,0.0 ,"m*(F*s^2/g)^0.5" ,"Area dependence of AIGD" )
-`MPRnb( LBIGD ,0.0 ,"(F*s^2/g)^0.5/V" ,"Length dependence of BIGD" )
-`MPRnb( WBIGD ,0.0 ,"(F*s^2/g)^0.5/V" ,"Width dependence of BIGD" )
-`MPRnb( PBIGD ,0.0 ,"m*(F*s^2/g)^0.5/V" ,"Area dependence of BIGD" )
-`MPRnb( LCIGD ,0.0 ,"m/V" ,"Length dependence of CIGD" )
-`MPRnb( WCIGD ,0.0 ,"m/V" ,"Width dependence of CIGD" )
-`MPRnb( PCIGD ,0.0 ,"m^2/V" ,"Area dependence of CIGD" )
-`MPRnb( LPOXEDGE ,0.0 ,"m" ,"Length dependence of POXEDGE" )
-`MPRnb( WPOXEDGE ,0.0 ,"m" ,"Width dependence of POXEDGE" )
-`MPRnb( PPOXEDGE ,0.0 ,"m^2" ,"Area dependence of POXEDGE" )
-`MPRnb( LDLCIG ,0.0 ,"m^2" ,"Length dependence of DLCIG" )
-`MPRnb( WDLCIG ,0.0 ,"m^2" ,"Width dependence of DLCIG" )
-`MPRnb( PDLCIG ,0.0 ,"m^3" ,"Area dependence of DLCIG" )
-`MPRnb( LDLCIGD ,0.0 ,"m^2" ,"Length dependence of DLCIGD" )
-`MPRnb( WDLCIGD ,0.0 ,"m^2" ,"Width dependence of DLCIGD" )
-`MPRnb( PDLCIGD ,0.0 ,"m^3" ,"Area dependence of DLCIGD" )
-`MPRnb( LNTOX ,0.0 ,"m" ,"Length dependence of NTOX" )
-`MPRnb( WNTOX ,0.0 ,"m" ,"Width dependence of NTOX" )
-`MPRnb( PNTOX ,0.0 ,"m^2" ,"Area dependence of NTOX" )
-
-// GIDL and GISL currents
-`MPRnb( AGIDL ,0.0 ,"V/m" ,"Pre-exponential coefficient for GIDL" )
-`MPRnb( AGIDLL ,0.0 ,"m" ,"Length dependence coefficient of AGIDL" )
-`MPRnb( AGIDLW ,0.0 ,"m" ,"Width dependence coefficient of AGIDL" )
-`MPRnb( LAGIDL ,0.0 ,"m^2" ,"Length dependence of AGIDL" )
-`MPRnb( WAGIDL ,0.0 ,"m^2" ,"Width dependence of AGIDL" )
-`MPRnb( PAGIDL ,0.0 ,"m^3" ,"Area dependence of AGIDL" )
-`MPRnb( BGIDL ,2.3e9 ,"V/m" ,"Exponential coefficient for GIDL" )
-`MPRnb( LBGIDL ,0.0 ,"V" ,"Length dependence of BGIDL" )
-`MPRnb( WBGIDL ,0.0 ,"V" ,"Width dependence of BGIDL" )
-`MPRnb( PBGIDL ,0.0 ,"V*m" ,"Area dependence of BGIDL" )
-`MPRnb( CGIDL ,0.5 ,"V/m" ,"Exponential coefficient for GIDL" )
-`MPRnb( LCGIDL ,0.0 ,"V" ,"Length dependence of CGIDL" )
-`MPRnb( WCGIDL ,0.0 ,"V" ,"Width dependence of CGIDL" )
-`MPRnb( PCGIDL ,0.0 ,"V*m" ,"Area dependence of CGIDL" )
-`MPRnb( EGIDL ,0.8 ,"V" ,"Band bending parameter for GIDL" )
-`MPRnb( LEGIDL ,0.0 ,"V*m" ,"Length dependence of EGIDL" )
-`MPRnb( WEGIDL ,0.0 ,"V*m" ,"Width dependence of EGIDL" )
-`MPRnb( PEGIDL ,0.0 ,"V*m^2" ,"Area dependence of EGIDL" )
-`MPRnb( AGISL ,AGIDL ,"V/m" ,"Pre-exponential coefficient for GISL" )
-`MPRnb( AGISLL ,AGIDLL ,"m" ,"Length dependence coefficient of AGISL" )
-`MPRnb( AGISLW ,AGIDLW ,"m" ,"Width dependence coefficient of AGISL" )
-`MPRnb( LAGISL ,LAGIDL ,"m^2" ,"Length dependence of AGISL" )
-`MPRnb( WAGISL ,WAGIDL ,"m^2" ,"Width dependence of AGISL" )
-`MPRnb( PAGISL ,PAGIDL ,"m^3" ,"Area dependence of AGISL" )
-`MPRnb( BGISL ,BGIDL ,"V/m" ,"Exponential coefficient for GISL" )
-`MPRnb( LBGISL ,LBGIDL ,"V" ,"Length dependence of BGISL" )
-`MPRnb( WBGISL ,WBGIDL ,"V" ,"Width dependence of BGISL" )
-`MPRnb( PBGISL ,PBGIDL ,"V*m" ,"Area dependence of BGISL" )
-`MPRnb( CGISL ,CGIDL ,"V/m" ,"Exponential coefficient for GISL" )
-`MPRnb( LCGISL ,LCGIDL ,"V" ,"Length dependence of CGISL" )
-`MPRnb( WCGISL ,WCGIDL ,"V" ,"Width dependence of CGISL" )
-`MPRnb( PCGISL ,PCGIDL ,"V*m" ,"Area dependence of CGISL" )
-`MPRnb( EGISL ,EGIDL ,"V" ,"Band bending parameter for GISL" )
-`MPRnb( LEGISL ,LEGIDL ,"V*m" ,"Length dependence of EGISL" )
-`MPRnb( WEGISL ,WEGIDL ,"V*m" ,"Width dependence of EGISL" )
-`MPRnb( PEGISL ,PEGIDL ,"V*m^2" ,"Area dependence of EGISL" )
-
-// Overlap capacitance and fringing capacitance
-`MPRnb( CF ,0.0 ,"F/m" ,"Outer Fringe capacitance" )
-`MPRnb( LCF ,0.0 ,"F" ,"Length dependence of CF" )
-`MPRnb( WCF ,0.0 ,"F" ,"Width dependence of CF" )
-`MPRnb( PCF ,0.0 ,"F*m" ,"Area dependence of CF" )
-`MPRco( CFRCOEFF ,1.0 ,"F/m" ,1.0 ,inf ,"Coefficient for Outer Fringe capacitance" )
-`MPRnb( CGSO ,0.0 ,"F/m" ,"Gate - Source overlap capacitance" )
-`MPRnb( CGDO ,0.0 ,"F/m" ,"Gate - Drain overlap capacitance" )
-`MPRnb( CGBO ,0.0 ,"F/m" ,"Gate - Body overlap capacitance" )
-`MPRnb( CGSL ,0.0 ,"F/m" ,"Overlap capacitance between gate and lightly-doped source region" )
-`MPRnb( LCGSL ,0.0 ,"" ,"Length dependence of CGSL" )
-`MPRnb( WCGSL ,0.0 ,"" ,"Width dependence of CGSL" )
-`MPRnb( PCGSL ,0.0 ,"" ,"Area dependence of CGSL" )
-`MPRnb( CGDL ,0.0 ,"F/m" ,"Overlap capacitance between gate and lightly-doped drain region" )
-`MPRnb( LCGDL ,0.0 ,"F" ,"Length dependence of CGDL" )
-`MPRnb( WCGDL ,0.0 ,"F" ,"Width dependence of CGDL" )
-`MPRnb( PCGDL ,0.0 ,"F*m" ,"Area dependence of CGDL" )
-`MPRnb( CKAPPAS ,0.6 ,"V" ,"Coefficient of bias-dependent overlap capacitance for the source side" )
-`MPRnb( LCKAPPAS ,0.0 ,"m*V" ,"Length dependence of CKAPPAS" )
-`MPRnb( WCKAPPAS ,0.0 ,"m*V" ,"Width dependence of CKAPPAS" )
-`MPRnb( PCKAPPAS ,0.0 ,"m^2*V" ,"Area dependence of CKAPPAS" )
-`MPRnb( CKAPPAD ,0.6 ,"V" ,"Coefficient of bias-dependent overlap capacitance for the drain side" )
-`MPRnb( LCKAPPAD ,0.0 ,"m*V" ,"Length dependence of CKAPPAD" )
-`MPRnb( WCKAPPAD ,0.0 ,"m*V" ,"Width dependence of CKAPPAD" )
-`MPRnb( PCKAPPAD ,0.0 ,"m^2*V" ,"Area dependence of CKAPPAD" )
-
-// Layout-dependent parasitics model parameters (resistance only)
-`MPRnb( DMCG ,0.0 ,"m" ,"Distance of Mid-Contact to Gate edge" )
-`MPRnb( DMCI ,DMCG ,"m" ,"Distance of Mid-Contact to Isolation" )
-`MPRnb( DMDG ,0.0 ,"m" ,"Distance of Mid-Diffusion to Gate edge" )
-`MPRnb( DMCGT ,0.0 ,"m" ,"Distance of Mid-Contact to Gate edge in Test" )
-`MPRoo( XGL ,0.0 ,"m" ,-inf ,L*LMLT+XL ,"Variation in Ldrawn" )
-`MPRcz( RSHG ,0.1 ,"ohm" ,"Gate sheet resistance" )
-
-// Junction capacitance
-`MPRnb( CJS ,5.0e-4 ,"F/m^2" ,"Unit area source-side junction capacitance at zero bias" )
-`MPRnb( CJD ,CJS ,"F/m^2" ,"Unit area drain-side junction capacitance at zero bias" )
-`MPRnb( CJSWS ,5.0e-10 ,"F/m" ,"Unit length source-side side-wall junction capacitance at zero bias" )
-`MPRnb( CJSWD ,CJSWS ,"F/m" ,"Unit length drain-side side-wall junction capacitance at zero bias" )
-`MPRnb( CJSWGS ,0.0 ,"F/m" ,"Unit length source-side gate side-wall junction capacitance at zero bias" )
-`MPRnb( CJSWGD ,CJSWGS ,"F/m" ,"Unit length drain-side gate side-wall junction capacitance at zero bias" )
-`MPRnb( PBS ,1.0 ,"V" ,"Source-side bulk junction built-in potential" )
-`MPRnb( PBD ,PBS ,"V" ,"Drain-side bulk junction built-in potential" )
-`MPRnb( PBSWS ,1.0 ,"V" ,"Built-in potential for Source-side side-wall junction capacitance" )
-`MPRnb( PBSWD ,PBSWS ,"V" ,"Built-in potential for Drain-side side-wall junction capacitance" )
-`MPRnb( PBSWGS ,PBSWS ,"V" ,"Built-in potential for Source-side gate side-wall junction capacitance" )
-`MPRnb( PBSWGD ,PBSWGS ,"V" ,"Built-in potential for Drain-side gate side-wall junction capacitance" )
-`MPRnb( MJS ,0.5 ,"" ,"Source bottom junction capacitance grading coefficient" )
-`MPRnb( MJD ,MJS ,"" ,"Drain bottom junction capacitance grading coefficient" )
-`MPRnb( MJSWS ,0.33 ,"" ,"Source side-wall junction capacitance grading coefficient" )
-`MPRnb( MJSWD ,MJSWS ,"" ,"Drain side-wall junction capacitance grading coefficient" )
-`MPRnb( MJSWGS ,MJSWS ,"" ,"Source-side gate side-wall junction capacitance grading coefficient" )
-`MPRnb( MJSWGD ,MJSWGS ,"" ,"Drain-side gate side-wall junction capacitance grading coefficient" )
-
-// Junction current
-`MPRnb( JSS ,1.0e-4 ,"A/m^2" ,"Bottom source junction reverse saturation current density" )
-`MPRnb( JSD ,JSS ,"A/m^2" ,"Bottom drain junction reverse saturation current density" )
-`MPRnb( JSWS ,0.0 ,"A/m" ,"Unit length reverse saturation current for side-wall source junction" )
-`MPRnb( JSWD ,JSWS ,"A/m" ,"Unit length reverse saturation current for side-wall drain junction" )
-`MPRnb( JSWGS ,0.0 ,"A/m" ,"Unit length reverse saturation current for gate-edge side-wall source junction" )
-`MPRnb( JSWGD ,JSWGS ,"A/m" ,"Unit length reverse saturation current for gate-edge side-wall drain junction" )
-`MPRoz( NJS ,1.0 ,"" ,"Source junction emission coefficient" )
-`MPRoz( NJD ,NJS ,"" ,"Drain junction emission coefficient" )
-`MPRnb( IJTHSFWD ,0.1 ,"A" ,"Forward source diode breakdown limiting current" )
-`MPRnb( IJTHDFWD ,IJTHSFWD ,"A" ,"Forward drain diode breakdown limiting current" )
-`MPRnb( IJTHSREV ,0.1 ,"A" ,"Reverse source diode breakdown limiting current" )
-`MPRnb( IJTHDREV ,IJTHSREV ,"A" ,"Reverse drain diode breakdown limiting current" )
-`MPRnb( BVS ,10.0 ,"V" ,"Source diode breakdown voltage" )
-`MPRnb( BVD ,BVS ,"V" ,"Drain diode breakdown voltage" )
-`MPRoz( XJBVS ,1.0 ,"" ,"Fitting parameter for source diode breakdown current" )
-`MPRoz( XJBVD ,XJBVS ,"" ,"Fitting parameter for drain diode breakdown current" )
-
-// Tunneling component of junction current
-`MPRnb( JTSS ,0.0 ,"A/m" ,"Bottom source junction trap-assisted saturation current density" )
-`MPRnb( JTSD ,JTSS ,"A/m" ,"Bottom drain junction trap-assisted saturation current density" )
-`MPRnb( JTSSWS ,0.0 ,"A/m^2" ,"Unit length trap-assisted saturation current for side-wall source junction" )
-`MPRnb( JTSSWD ,JTSSWS ,"A/m^2" ,"Unit length trap-assisted saturation current for side-wall drain junction" )
-`MPRnb( JTSSWGS ,0.0 ,"A/m" ,"Unit length trap-assisted saturation current for gate-edge side-wall source junction" )
-`MPRnb( JTSSWGD ,JTSSWGS ,"A/m" ,"Unit length trap-assisted saturation current for gate-edge side-wall drain junction" )
-`MPRcz( JTWEFF ,0.0 ,"" ,"Trap assisted tunnelling current width dependence" )
-`MPRnb( NJTS ,20.0 ,"" ,"Non-ideality factor for JTSS" )
-`MPRnb( NJTSD ,NJTS ,"" ,"Non-ideality factor for JTSD" )
-`MPRnb( NJTSSW ,20.0 ,"" ,"Non-ideality factor for JTSSWS" )
-`MPRnb( NJTSSWD ,NJTSSW ,"" ,"Non-ideality factor for JTSSWD" )
-`MPRnb( NJTSSWG ,20.0 ,"" ,"Non-ideality factor for JTSSWGS" )
-`MPRnb( NJTSSWGD ,NJTSSWG ,"" ,"Non-ideality factor for JTSSWGD" )
-`MPRnb( VTSS ,10.0 ,"V" ,"Bottom source junction trap-assisted current voltage dependent parameter" )
-`MPRnb( VTSD ,VTSS ,"V" ,"Bottom drain junction trap-assisted current voltage dependent parameter" )
-`MPRnb( VTSSWS ,10.0 ,"V" ,"Unit length trap-assisted current voltage dependent parameter for side-wall source junction" )
-`MPRnb( VTSSWD ,VTSSWS ,"V" ,"Unit length trap-assisted current voltage dependent parameter for side-wall drain junction" )
-`MPRnb( VTSSWGS ,10.0 ,"V" ,"Unit length trap-assisted current voltage dependent parameter for gate-edge side-wall source junction" )
-`MPRnb( VTSSWGD ,VTSSWGS ,"V" ,"Unit length trap-assisted current voltage dependent parameter for gate-edge side-wall drain junction" )
-
-// High-speed/RF model parameters
-`MPRnb( XRCRG1 ,12.0 ,"" ,"1st fitting parameter the bias-dependent Rg " )
-`MPRnb( XRCRG2 ,1.0 ,"" ,"2nd fitting parameter the bias-dependent Rg " )
-`MPRcz( GBMIN ,1.0e-12 ,"mho" ,"Minimum body conductance" )
-`MPRoz( RBPS0 ,50.0 ,"ohm" ,"Scaling pre-factor for RBPS" )
-`MPRcz( RBPSL ,0.0 ,"" ,"Length Scaling parameter for RBPS" )
-`MPRcz( RBPSW ,0.0 ,"" ,"Width Scaling parameter for RBPS" )
-`MPRcz( RBPSNF ,0.0 ,"" ,"Number of fingers Scaling parameter for RBPS" )
-`MPRoz( RBPD0 ,50.0 ,"ohm" ,"Scaling pre-factor for RBPD" )
-`MPRcz( RBPDL ,0.0 ,"" ,"Length Scaling parameter for RBPD" )
-`MPRcz( RBPDW ,0.0 ,"" ,"Width Scaling parameter for RBPD" )
-`MPRcz( RBPDNF ,0.0 ,"" ,"Number of fingers Scaling parameter for RBPD" )
-`MPRoz( RBPBX0 ,100.0 ,"ohm" ,"Scaling pre-factor for RBPBX" )
-`MPRcz( RBPBXL ,0.0 ,"" ,"Length Scaling parameter for RBPBX" )
-`MPRcz( RBPBXW ,0.0 ,"" ,"Width Scaling parameter for RBPBX" )
-`MPRcz( RBPBXNF ,0.0 ,"" ,"Number of fingers Scaling parameter for RBPBX" )
-`MPRoz( RBPBY0 ,100.0 ,"ohm" ,"Scaling pre-factor for RBPBY" )
-`MPRcz( RBPBYL ,0.0 ,"" ,"Length Scaling parameter for RBPBY" )
-`MPRcz( RBPBYW ,0.0 ,"" ,"Width Scaling parameter for RBPBY" )
-`MPRcz( RBPBYNF ,0.0 ,"" ,"Number of fingers Scaling parameter for RBPBY" )
-`MPRoz( RBSBX0 ,100.0 ,"ohm" ,"Scaling pre-factor for RBSBX" )
-`MPRoz( RBSBY0 ,100.0 ,"ohm" ,"Scaling pre-factor for RBSBY" )
-`MPRoz( RBDBX0 ,100.0 ,"ohm" ,"Scaling pre-factor for RBDBX" )
-`MPRoz( RBDBY0 ,100.0 ,"ohm" ,"Scaling pre-factor for RBDBY" )
-`MPRcz( RBSDBXL ,0.0 ,"" ,"Length Scaling parameter for RBSBX and RBDBX" )
-`MPRcz( RBSDBXW ,0.0 ,"" ,"Width Scaling parameter for RBSBX and RBDBX" )
-`MPRcz( RBSDBXNF ,0.0 ,"" ,"Number of fingers Scaling parameter for RBSBX and RBDBX" )
-`MPRcz( RBSDBYL ,0.0 ,"" ,"Length Scaling parameter for RBSBY and RBDBY" )
-`MPRcz( RBSDBYW ,0.0 ,"" ,"Width Scaling parameter for RBSBY and RBDBY" )
-`MPRcz( RBSDBYNF ,0.0 ,"" ,"Number of fingers Scaling parameter for RBSBY and RBDBY" )
-
-// Flicker noise
-`MPRoc( EF ,1.0 ,"" ,0 ,2 ,"Flicker Noise frequency exponent" )
-`MPRnb( EM ,4.1e7 ,"V/m" ,"Saturation Field" )
-`MPRnb( NOIA ,6.250e+40 ,"s^(1-EF)/(eV)^1/m^3" ,"Flicker noise parameter A" )
-`MPRnb( NOIB ,3.125e+25 ,"s^(1-EF)/(eV)^1/m" ,"Flicker noise parameter B" )
-`MPRnb( NOIC ,8.750e+8 ,"s^(1-EF)*m/(eV)^1" ,"Flicker noise parameter C" )
-`MPRnb( LINTNOI ,0.0 ,"m" ,"Length Reduction Parameter Offset" )
-
-// Thermal noise
-`MPRcz( NTNOI ,1.0 ,"" ,"Noise factor for short-channel devices for TNOIMOD=0 only" )
-`MPRnb( RNOIA ,0.577 ,"" ,"TNOIMOD = 1" )
-`MPRnb( RNOIB ,0.5164 ,"" ,"TNOIMOD = 1" )
-`MPRnb( RNOIC ,0.395 ,"" ,"TNOIMOD = 1" )
-`MPRoo( TNOIA ,0.0 ,"" ,-inf ,inf ,"TNOIMOD = 1" )
-`MPRoo( TNOIB ,0.0 ,"" ,-inf ,inf ,"TNOIMOD = 1" )
-`MPRoo( TNOIC ,0.0 ,"" ,-inf ,inf ,"Correlation coefficient" )
-
-// Binning parameters
-`MPIcc( BINUNIT ,1 ,"" ,0 ,1 ,"Unit of L and W for Binning, 1 : micro-meter, 0 : default" )
-`MPRnb( DLBIN ,0.0 ,"" ,"Length reduction parameter for binning" )
-`MPRnb( DWBIN ,0.0 ,"" ,"Width reduction parameter for binning" )
-
-// Temperature dependence parameters
-`MPRnb( TNOM ,27.0 ,"degC" ,"Temperature at which the model was extracted" )
-`MPRnb( TBGASUB ,4.73e-4 ,"eV/K" ,"Band-gap Temperature Coefficient" )
-`MPRnb( TBGBSUB ,636.0 ,"K" ,"Band-gap Temperature Coefficient" )
-`MPRnb( TNFACTOR ,0.0 ,"" ,"Temperature exponent for NFACTOR" )
-`MPRnb( UTE ,-1.5 ,"" ,"Mobility temperature exponent" )
-`MPRnb( LUTE ,0.0 ,"m" ,"Length dependence of UTE" )
-`MPRnb( WUTE ,0.0 ,"m" ,"Width dependence of UTE" )
-`MPRnb( PUTE ,0.0 ,"m^2" ,"Area dependence of UTE" )
-`MPRnb( UTEL ,0.0 ,"m" ,"Length Scaling parameter for UTE" )
-`MPRnb( UA1 ,1.0e-3 ,"m/V" ,"Temperature coefficient for UA" )
-`MPRnb( LUA1 ,0.0 ,"m^2/V" ,"Length dependence of UA1" )
-`MPRnb( WUA1 ,0.0 ,"m^2/V" ,"Width dependence of UA1" )
-`MPRnb( PUA1 ,0.0 ,"m^3/V" ,"Area dependence of UA1" )
-`MPRnb( UA1L ,0.0 ,"m" ,"Length Scaling parameter for UA1" )
-`MPRnb( UC1 ,0.056e-9 ,"1/K" ,"Temperature coefficient for UC" )
-`MPRnb( LUC1 ,0.0 ,"m/K" ,"Length dependence of UC1" )
-`MPRnb( WUC1 ,0.0 ,"m/K" ,"Width dependence of UC1" )
-`MPRnb( PUC1 ,0.0 ,"m^2/K" ,"Area dependence of UC1" )
-`MPRnb( UD1 ,0.0 ,"1/m^2" ,"Temperature coefficient for UD" )
-`MPRnb( LUD1 ,0.0 ,"1/m" ,"Length dependence of UD1" )
-`MPRnb( WUD1 ,0.0 ,"1/m" ,"Width dependence of UD1" )
-`MPRnb( PUD1 ,0.0 ,"" ,"Area dependence of UD1" )
-`MPRnb( UD1L ,0.0 ,"m" ,"Length Scaling parameter for UD1" )
-`MPRnb( UCSTE ,-4.775e-3 ,"" ,"Temperature coefficient for UCS" )
-`MPRnb( LUCSTE ,0.0 ,"m" ,"Length dependence of UCSTE" )
-`MPRnb( WUCSTE ,0.0 ,"m" ,"Width dependence of UCSTE" )
-`MPRnb( PUCSTE ,0.0 ,"m^2" ,"Area dependence of UCSTE" )
-`MPRnb( TETA0 ,0.0 ,"" ,"Temperature coefficient for ETA0" )
-`MPRnb( PRT ,0.0 ,"" ,"Temperature coefficient for resistance" )
-`MPRnb( LPRT ,0.0 ,"m" ,"Length dependence of PRT" )
-`MPRnb( WPRT ,0.0 ,"m" ,"Width dependence of PRT" )
-`MPRnb( PPRT ,0.0 ,"m^2" ,"Area dependence of PRT" )
-`MPRnb( AT ,-1.56e-3 ,"m/s" ,"Temperature coefficient for saturation velocity" )
-`MPRnb( LAT ,0.0 ,"m^2/s" ,"Length dependence of AT" )
-`MPRnb( WAT ,0.0 ,"m^2/s" ,"Width dependence of AT" )
-`MPRnb( PAT ,0.0 ,"m^3/s" ,"Area dependence of AT" )
-`MPRnb( ATL ,0.0 ,"m" ,"Length Scaling parameter for AT" )
-`MPRnb( TDELTA ,0.0 ,"1/K" ,"Temperature coefficient for DELTA" )
-`MPRnb( PTWGT ,0.0 ,"1/K" ,"Temperature coefficient for PTWG" )
-`MPRnb( LPTWGT ,0.0 ,"m/K" ,"Length dependence of PTWGT" )
-`MPRnb( WPTWGT ,0.0 ,"m/K" ,"Width dependence of PTWGT" )
-`MPRnb( PPTWGT ,0.0 ,"m^2/K" ,"Area dependence of PTWGT" )
-`MPRnb( PTWGTL ,0.0 ,"m" ,"Length Scaling parameter for PTWGT" )
-`MPRnb( KT1 ,-0.11 ,"V" ,"Temperature coefficient for Vth" )
-`MPRoz( KT1EXP ,1.0 ,"" ,"Temperature coefficient for Vth" )
-`MPRnb( KT1L ,0.0 ,"V*m" ,"Temperature coefficient for Vth" )
-`MPRnb( LKT1 ,0.0 ,"V*m" ,"Length dependence of KT1" )
-`MPRnb( WKT1 ,0.0 ,"V*m" ,"Width dependence of KT1" )
-`MPRnb( PKT1 ,0.0 ,"V*m^2" ,"Area dependence of KT1" )
-`MPRnb( KT2 ,0.022 ,"" ,"Temperature coefficient for Vth" )
-`MPRnb( LKT2 ,0.0 ,"m" ,"Length dependence of KT2" )
-`MPRnb( WKT2 ,0.0 ,"m" ,"Width dependence of KT2" )
-`MPRnb( PKT2 ,0.0 ,"m^2" ,"Area dependence of KT2" )
-`MPRnb( IIT ,0.0 ,"" ,"Temperature coefficient for BETA0" )
-`MPRnb( LIIT ,0.0 ,"m" ,"Length dependence of IIT" )
-`MPRnb( WIIT ,0.0 ,"m" ,"Width dependence of IIT" )
-`MPRnb( PIIT ,0.0 ,"m^2" ,"Area dependence of IIT" )
-`MPRnb( IGT ,2.5 ,"" ,"Gate Current Temperature Dependence" )
-`MPRnb( LIGT ,0.0 ,"m" ,"Length dependence of IGT" )
-`MPRnb( WIGT ,0.0 ,"m" ,"Width dependence of IGT" )
-`MPRnb( PIGT ,0.0 ,"m^2" ,"Area dependence of IGT" )
-`MPRnb( TGIDL ,0.0 ,"1/K" ,"Temperature coefficient for GIDL/GISL" )
-`MPRnb( LTGIDL ,0.0 ,"m/K" ,"Length dependence of TGIDL" )
-`MPRnb( WTGIDL ,0.0 ,"m/K" ,"Width dependence of TGIDL" )
-`MPRnb( PTGIDL ,0.0 ,"m^2/K" ,"Area dependence of TGIDL" )
-`MPRnb( TCJ ,0.0 ,"1/K" ,"Temperature coefficient for CJS/CJD" )
-`MPRnb( TCJSW ,0.0 ,"1/K" ,"Temperature coefficient for CJSWS/CJSWD" )
-`MPRnb( TCJSWG ,0.0 ,"1/K" ,"Temperature coefficient for CJSWGS/CJSWGD" )
-`MPRnb( TPB ,0.0 ,"V/K" ,"Temperature coefficient for PBS/PBD" )
-`MPRnb( TPBSW ,0.0 ,"V/K" ,"Temperature coefficient for PBSWS/PBSWD" )
-`MPRnb( TPBSWG ,0.0 ,"V/K" ,"Temperature coefficient for PBSWGS/PBSWGD" )
-`MPRnb( XTIS ,3.0 ,"" ,"Source junction current temperature exponent" )
-`MPRnb( XTID ,XTIS ,"" ,"Drain junction current temperature exponent" )
-`MPRnb( XTSS ,0.02 ,"" ,"Power dependence of JTSS on temperature" )
-`MPRnb( XTSD ,XTSS ,"" ,"Power dependence of JTSD on temperature" )
-`MPRnb( XTSSWS ,0.02 ,"" ,"Power dependence of JTSSWS on temperature" )
-`MPRnb( XTSSWD ,XTSSWS ,"" ,"Power dependence of JTSSWD on temperature" )
-`MPRnb( XTSSWGS ,0.02 ,"" ,"Power dependence of JTSSWGS on temperature" )
-`MPRnb( XTSSWGD ,XTSSWGS ,"" ,"Power dependence of JTSSWGD on temperature" )
-`MPRnb( TNJTS ,0.0 ,"" ,"Temperature coefficient for NJTS" )
-`MPRnb( TNJTSD ,TNJTS ,"" ,"Temperature coefficient for NJTSD" )
-`MPRnb( TNJTSSW ,0.0 ,"" ,"Temperature coefficient for NJTSSW" )
-`MPRnb( TNJTSSWD ,TNJTSSW ,"" ,"Temperature coefficient for NJTSSWD" )
-`MPRnb( TNJTSSWG ,0.0 ,"" ,"Temperature coefficient for NJTSSWG" )
-`MPRnb( TNJTSSWGD ,TNJTSSWG ,"" ,"Temperature coefficient for NJTSSWGD" )
-
-// Self heating parameters
-`MPRco( RTH0 ,0.0 ,"m*K/W" ,0 ,inf ,"Thermal resistance" )
-`MPRco( CTH0 ,1.0E-05 ,"s*W/(m*K)" ,0 ,inf ,"Thermal capacitance" )
-`MPRnb( WTH0 ,0.0 ,"m" ,"Width dependence coefficient for Rth and Cth" )
-
-// Stress related parameters
-`MPRoz( SAREF ,1.0e-6 ,"m" ,"Reference distance between OD edge from Poly from one side" )
-`MPRoz( SBREF ,1.0e-6 ,"m" ,"Reference distance between OD edge from Poly from other side" )
-`MPRcz( WLOD ,0.0 ,"m" ,"Width Parameter for Stress Effect" )
-`MPRnb( KU0 ,0.0 ,"m" ,"Mobility degradation/enhancement Parameter for Stress Effect" )
-`MPRnb( KVSAT ,0.0 ,"m" ,"Saturation Velocity degradation/enhancement Parameter for Stress Effect" )
-`MPRnb( TKU0 ,0.0 ,"" ,"Temperature Coefficient for KU0" )
-`MPRnb( LKU0 ,0.0 ,"m^LLODKU0" ,"Length Dependence of KU0" )
-`MPRnb( WKU0 ,0.0 ,"m^WLODKU0" ,"Width Dependence of KU0" )
-`MPRnb( PKU0 ,0.0 ,"m^(LLODKU0+WLODKU0)" ,"Cross Term Dependence of KU0" )
-`MPRnb( LLODKU0 ,0.0 ,"" ,"Length Parameter for U0 stress effect" )
-`MPRnb( WLODKU0 ,0.0 ,"" ,"Width Parameter for U0 stress effect" )
-`MPRnb( KVTH0 ,0.0 ,"V*m" ,"Threshold Shift parameter for stress effect" )
-`MPRnb( LKVTH0 ,0.0 ,"m^LLODKU0" ,"Length dependence of KVTH0" )
-`MPRnb( WKVTH0 ,0.0 ,"m^WLODKU0" ,"Width dependence of KVTH0" )
-`MPRnb( PKVTH0 ,0.0 ,"m^(LLODKU0+WLODKU0)" ,"Cross-term dependence of KVTH0" )
-`MPRnb( LLODVTH ,0.0 ,"" ,"Length Parameter for Vth stress effect" )
-`MPRnb( WLODVTH ,0.0 ,"" ,"Width Parameter for Vth stress effect" )
-`MPRnb( STK2 ,0.0 ,"m" ,"K2 shift factor related to Vth change" )
-`MPRnb( LODK2 ,0.0 ,"" ,"K2 shift modification factor for stress effect" )
-`MPRnb( STETA0 ,0.0 ,"m" ,"ETA0 shift related to Vth0 change" )
-`MPRnb( LODETA0 ,0.0 ,"" ,"ETA0 modification factor for stress effect" )
-
-// Well proximity parameters
-`MPRnb( WEB ,0.0 ,"" ,"Coefficient for SCB (>0.0)" )
-`MPRnb( WEC ,0.0 ,"" ,"Coefficient for SCC (>0.0)" )
-`MPRnb( KVTH0WE ,0.0 ,"" ,"Threshold shift factor for well proximity effect" )
-`MPRnb( LKVTH0WE ,0.0 ,"m" ,"Length dependence of KVTH0WE" )
-`MPRnb( WKVTH0WE ,0.0 ,"m" ,"Width dependence of KVTH0WE" )
-`MPRnb( PKVTH0WE ,0.0 ,"m^2" ,"Area dependence of KVTH0WE" )
-`MPRnb( K2WE ,0.0 ,"" ,"K2 shift factor for well proximity effect" )
-`MPRnb( LK2WE ,0.0 ,"m" ,"Length dependence of K2WE" )
-`MPRnb( WK2WE ,0.0 ,"m" ,"Width dependence of K2WE" )
-`MPRnb( PK2WE ,0.0 ,"m^2" ,"Area dependence of K2WE" )
-`MPRnb( KU0WE ,0.0 ,"" ,"Mobility degradation factor for well proximity effect" )
-`MPRnb( LKU0WE ,0.0 ,"m" ,"Length dependence of KU0WE" )
-`MPRnb( WKU0WE ,0.0 ,"m" ,"Width dependence of KU0WE" )
-`MPRnb( PKU0WE ,0.0 ,"m^2" ,"Area dependence of KU0WE" )
-`MPRoo( SCREF ,1.0e-6 ,"m" ,0 ,inf ,"Reference distance to calculate SCA,SCB and SCC (<0)" )
-
-// Sub-surface leakage drain current
-`MPRnb( SSL0 ,4.0e2 ,"A/m" ,"Temperature- and doping-independent parameter for sub-surface leakage drain current")
-`MPRnb( SSL1 ,3.36e8 ,"1/m" ,"Temperature- and doping-independent parameter for gate length for sub-surface leakage drain current")
-`MPRnb( SSL2 ,0.185 ,"" ,"Fitting parameter for sub-surface leakage drain current: barrier height")
-`MPRnb( SSL3 ,0.3 ,"V" ,"Fitting parameter for sub-surface leakage drain current: gate voltage effect")
-`MPRnb( SSL4 ,1.4 ,"1/V" ,"Fitting parameter for sub-surface leakage drain current: gate voltage effect")
-`MPRnb( SSLEXP1 ,0.490 ,"" ,"Fitting exponent for ssl doping effect")
-`MPRnb( SSLEXP2 ,1.42 ,"" ,"Fitting exponent for ssl temperature")
-
-// Vdsx smoothing
-`MPRco( AVDSX ,20 ,"" ,5 ,100 ,"Smoothing parameter in Vdsx in Vbsx" )
-
-// STI edge FET device parameters
-`MPRco( WEDGE ,10.0e-9 ,"m" ,1.0e-9 ,inf ,"Edge FET Width" )
-`MPRoo( DGAMMAEDGE ,0.0 ,"" ,-inf ,inf ,"Different in body-bias coefficient between Edge-FET and Main-FET" )
-`MPRoo( DGAMMAEDGEL ,0.0 ,"" ,-inf ,inf ,"L dependence parameter for DGAMMA" )
-`MPRoo( DGAMMAEDGELEXP ,1.0 ,"" ,-inf ,inf ,"Exponent of L dependence parameter for DGAMMA" )
-`MPRoo( DVTEDGE ,0.0 ,"" ,-inf ,inf ,"Vth shift for Edge FET" )
-`MPRnb( NFACTOREDGE ,NFACTOR ,"" ,"NFACTOR for Edge FET" )
-`MPRnb( LNFACTOREDGE ,LNFACTOR ,"m" ,"Length dependence of NFACTOREDGE" )
-`MPRnb( WNFACTOREDGE ,WNFACTOR ,"m" ,"Width dependence of NFACTOREDGE" )
-`MPRnb( PNFACTOREDGE ,PNFACTOR ,"m^2" ,"Area dependence of NFACTOREDGE" )
-`MPRnb( CITEDGE ,CIT ,"F/m^2" ,"CIT for Edge FET" )
-`MPRnb( LCITEDGE ,LCIT ,"F/m" ,"Length dependence of CITEDGE" )
-`MPRnb( WCITEDGE ,WCIT ,"F/m" ,"Width dependence of CITEDGE" )
-`MPRnb( PCITEDGE ,PCIT ,"F" ,"Area dependence of CITEDGE" )
-`MPRnb( CDSCDEDGE ,CDSCD ,"F/m^2/V" ,"CDSCD for edge FET" )
-`MPRnb( LCDSCDEDGE ,LCDSCD ,"F/m/V" ,"Length dependence of CDSCDEDGE" )
-`MPRnb( WCDSCDEDGE ,WCDSCD ,"F/m/V" ,"Width dependence of CDSCDEDGE" )
-`MPRnb( PCDSCDEDGE ,PCDSCD ,"F/V" ,"Area dependence of CDSCDEDGE" )
-`MPRnb( CDSCBEDGE ,CDSCB ,"F/m^2/V" ,"CDSCB for edge FET" )
-`MPRnb( LCDSCBEDGE ,LCDSCB ,"F/m/V" ,"Length dependence of CDSCBEDGE" )
-`MPRnb( WCDSCBEDGE ,WCDSCB ,"F/m/V" ,"Width dependence of CDSCBEDGE" )
-`MPRnb( PCDSCBEDGE ,PCDSCB ,"F/V" ,"Area dependence of CDSCBEDGE" )
-`MPRnb( ETA0EDGE ,ETA0 ,"" ,"DIBL parameter for edge FET" )
-`MPRnb( LETA0EDGE ,LETA0 ,"m" ,"Length dependence of ETA0EDGE" )
-`MPRnb( WETA0EDGE ,WETA0 ,"m" ,"Width dependence of ETA0EDGE" )
-`MPRnb( PETA0EDGE ,PETA0 ,"m^2" ,"Area dependence of ETA0EDGE" )
-`MPRnb( ETABEDGE ,ETAB ,"1/V" ,"ETAB for edge FET" )
-`MPRnb( LETABEDGE ,LETAB ,"m/V" ,"Length dependence of ETABEDGE" )
-`MPRnb( WETABEDGE ,WETAB ,"m/V" ,"Width dependence of ETABEDGE" )
-`MPRnb( PETABEDGE ,PETAB ,"m^2/V" ,"Area dependence of ETABEDGE" )
-`MPRnb( KT1EDGE ,KT1 ,"V" ,"Temperature dependence parameter of threshold voltage for edge FET" )
-`MPRnb( LKT1EDGE ,LKT1 ,"V*m" ,"Length dependence of KT1EDGE" )
-`MPRnb( WKT1EDGE ,WKT1 ,"V*m" ,"Width dependence of KT1EDGE" )
-`MPRnb( PKT1EDGE ,PKT1 ,"V*m^2" ,"Area dependence of KT1EDGE" )
-`MPRnb( KT1LEDGE ,KT1L ,"V*m" ,"Temperature dependence parameter of threshold voltage for edge FET" )
-`MPRnb( LKT1LEDGE ,0.0 ,"V*m^2" ,"Length dependence of KT1LEDGE" )
-`MPRnb( WKT1LEDGE ,0.0 ,"V*m^2" ,"Width dependence of KT1LEDGE" )
-`MPRnb( PKT1LEDGE ,0.0 ,"V*m^3" ,"Area dependence of KT1LEDGE" )
-`MPRnb( KT2EDGE ,KT2 ,"" ,"Temperature dependence parameter of threshold voltage for edge FET" )
-`MPRnb( LKT2EDGE ,LKT2 ,"m" ,"Length dependence of KT2EDGE" )
-`MPRnb( WKT2EDGE ,WKT2 ,"m" ,"Width dependence of KT2EDGE" )
-`MPRnb( PKT2EDGE ,PKT2 ,"m^2" ,"Area dependence of KT2EDGE" )
-`MPRnb( KT1EXPEDGE ,KT1EXP ,"" ,"Temperature dependence parameter of threshold voltage for edge device" )
-`MPRnb( LKT1EXPEDGE ,0.0 ,"m" ,"Length dependence of KT1EXPEDGE" )
-`MPRnb( WKT1EXPEDGE ,0.0 ,"m" ,"Width dependence of KT1EXPEDGE" )
-`MPRnb( PKT1EXPEDGE ,0.0 ,"m^2" ,"Area dependence of KT1EXPEDGE" )
-`MPRnb( TNFACTOREDGE ,TNFACTOR ,"" ,"Temperature dependence parameter of sub-threshold slope factor for edge" )
-`MPRnb( LTNFACTOREDGE ,0.0 ,"m" ,"Length dependence of TNFACTOREDGE" )
-`MPRnb( WTNFACTOREDGE ,0.0 ,"m" ,"Width dependence of TNFACTOREDGE" )
-`MPRnb( PTNFACTOREDGE ,0.0 ,"m^2" ,"Area dependence of TNFACTOREDGE" )
-`MPRnb( TETA0EDGE ,TETA0 ,"" ,"Temperature dependence parameter of DIBL parameter for edge FET" )
-`MPRnb( LTETA0EDGE ,0.0 ,"m" ,"Length dependence of TETA0EDGE" )
-`MPRnb( WTETA0EDGE ,0.0 ,"m" ,"Width dependence of TETA0EDGE" )
-`MPRnb( PTETA0EDGE ,0.0 ,"m^2" ,"Area dependence of TETA0EDGE" )
-`MPRnb( DVT0EDGE ,2.2 ,"" ,"First coefficient of SCE effect on Vth for Edge FET" )
-`MPRnb( DVT1EDGE ,0.53 ,"" ,"Second coefficient of SCE effect on Vth for Edge FET" )
-`MPRnb( DVT2EDGE ,0.0 ,"1/V" ,"Body-bias coefficient for SCE effect for Edge FET" )
-`MPRnb( K2EDGE ,K2 ,"V" ,"Vth shift due to Vertical Non-uniform doping" )
-`MPRnb( LK2EDGE ,LK2 ,"m" ,"Length dependence of K2EDGE" )
-`MPRnb( WK2EDGE ,WK2 ,"m" ,"Width dependence of K2EDGE" )
-`MPRnb( PK2EDGE ,PK2 ,"m^2" ,"Area dependence of K2EDGE" )
-`MPRnb( KVTH0EDGE ,KVTH0 ,"V*m" ,"Threshold Shift parameter for stress effect" )
-`MPRnb( LKVTH0EDGE ,LKVTH0 ,"m^LLODKU0" ,"Length dependence of KVTH0EDGE" )
-`MPRnb( WKVTH0EDGE ,WKVTH0 ,"m^WLODKU0" ,"Width dependence of KVTH0EDGE" )
-`MPRnb( PKVTH0EDGE ,PKVTH0 ,"m^(LLODKU0+WLODKU0)" ,"Area dependence of KVTH0EDGE" )
-`MPRnb( STK2EDGE ,STK2 ,"m" ,"K2 shift factor related to Vth change" )
-`MPRnb( LSTK2EDGE ,0.0 ,"m^2" ,"Length dependence of STK2EDGE" )
-`MPRnb( WSTK2EDGE ,0.0 ,"m^2" ,"Width dependence of STK2EDGE" )
-`MPRnb( PSTK2EDGE ,0.0 ,"m^3" ,"Area dependence of STK2EDGE" )
-`MPRnb( STETA0EDGE ,STETA0 ,"m" ,"ETA0 shift related to Vth0 change" )
-`MPRnb( LSTETA0EDGE ,0.0 ,"m^2" ,"Length dependence of STETA0EDGE" )
-`MPRnb( WSTETA0EDGE ,0.0 ,"m^2" ,"Width dependence of STETA0EDGE" )
-`MPRnb( PSTETA0EDGE ,0.0 ,"m^3" ,"Area dependence of STETA0EDGE" )
-`MPIcc( IGCLAMP ,1 ,"" ,0 ,1 ,"Model flag" )
-`MPRoz( LP ,10u ,"m" ,"Length scaling parameter for thermal noise" )
-`MPRnb( RNOIK ,0.0 ,"" ,"Exponential coefficient for enhanced correlated thermal noise" )
-`MPRoo( TNOIK ,0.0 ,"1/m" ,-inf ,inf ,"Empirical parameter for Leff trend of Sid at low Ids" )
-`MPRcz( TNOIK2 ,0.1 ,"1/m" ,"Empirical parameter for sensitivity of RNOIK" )
-`MPRnb( K0 ,0.0 ,"" ,"Non-saturation effect parameter for strong inversion region" )
-`MPRnb( LK0 ,0.0 ,"m" ,"Length dependence of " )
-`MPRnb( WK0 ,0.0 ,"m" ,"Width dependence of " )
-`MPRnb( PK0 ,0.0 ,"m^2" ,"Area dependence of " )
-`MPRnb( K01 ,0.0 ,"1/K" ,"Temperature coefficient for K0" )
-`MPRnb( LK01 ,0.0 ,"m/K" ,"Length dependence of K0" )
-`MPRnb( WK01 ,0.0 ,"m/K" ,"Width dependence of K0" )
-`MPRnb( PK01 ,0.0 ,"m^2/K" ,"Area dependence of K0" )
-`MPRnb( M0 ,1.0 ,"" ,"offset of non-saturation effect parameter for strong inversion region" )
-`MPRnb( LM0 ,0.0 ,"m" ,"Length dependence of " )
-`MPRnb( WM0 ,0.0 ,"m" ,"Width dependence of " )
-`MPRnb( PM0 ,0.0 ,"m^2" ,"Area dependence of " )
-`MPRnb( M01 ,0.0 ,"1/K" ,"Temperature coefficient for M0" )
-`MPRnb( LM01 ,0.0 ,"m/K" ,"Length dependence of M0" )
-`MPRnb( WM01 ,0.0 ,"m/K" ,"Width dependence of M0" )
-`MPRnb( PM01 ,0.0 ,"m^2/K" ,"Area dependence of M0" )
-`MPIcc( FNOIMOD ,0 ,"" ,0 ,1 ,"Flicker noise model selector" )
-`MPRoo( LH ,30n ,"m" ,0 ,L ,"Length of Halo transistor" )
-`MPRnb( NOIA2 ,NOIA ,"s^(1-EF)/(eV)^1/m^3" ,"Flicker noise parameter A for Halo" )
-`MPRoz( HNDEP ,NDEP ,"1/m^3" ,"Halo Doping Concentration for IV" )
-
-// Common variables
-real PSiso, PDiso, PSsha, PDsha, PSmer, PDmer, ASiso, ADiso, ASsha, ADsha, ASmer, ADmer;
-real T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12;
-real T0y, T1y, T2y, T3y;
-real Tb;
-real epssi, epsox, ni, Weff, Leff, Weff1, Leff1, Wact, Lact, Weffcj, Eg, Eg0, Weff_SH;
-real dLIV, dWIV, dLB, dWB, dLCV, dWCV, dWJ, Cox, epsratio;
-real Vdb_noswap, Vsb_noswap, Vgs_noswap, Vgd_noswap, Vds_noswap;
-real sigvds, vfb, vgfb, vgfbCV, Vbsx, Vfbsdr;
-real Vg, vg, Vd, Vs, vs, Vds, Vdsx, Vgs_eff, Vgd_eff;
-real Vth_shift;
-real qia, qba, qiaCV, qbaCV, qbs, qbd, qb, dps, phib, phib_n;
-real nq, psip, psiavg, psipclamp, sqrtpsisa, sqrtpsisainv, sqrtpsip;
-real Cdep, Lnew, L_mult, Wnew, W_mult;
-real wf, wr;
-
-// Short channel effects
-real n, Fp, nVt, inv_nVt, Vt, inv_Vt;
-real PhistVbs, sqrtPhistVbs, Xdep, cdsc;
-real T1DEP;
-real dVth_ldop, DVTP0_i, DVTP1_i, DVTP2_i, DVTP3_i, DVTP4_i, DVTP5_i;
-real dVth_VNUD, dVth_dibl, dvth_temp;
-real gam, inv_gam, Phist, sqrtPhist, litl;
-
-// Drain saturation voltage
-real qis, qdsat, Eeffs, Dmobs, Esat, EsatL, Vdsat, LambdaC_by2, LambdaC;
-real Vdseff, Vdssat, VdssatCV, vdeff, vdsat, qdeff, vdsatcv, VdsatCV;
-real ln_T1_T2;
-real A1_i, A11_i, A1_t, A2_i, A21_i, A2_t, Nsat;
-
-// Mobility degradation
-real EeffFactor, Eeffm, ueff, eta_mu, Dmob, Dtot;
-
-// Velocity saturation
-real zsat, Dvsat, Dptwg, PSAT_i, PSATR_i, PSAT_a;
-
-// Output conductance
-real diffVds, VaDITS, VaSCBE, Vasat;
-real DIBLfactor, PVAGfactor, VaDIBL, Vgst2Vtm, Moc, MdL, Mscbe;
-
-// Impact ionization and GIDL
-real Iii, igidl, igisl;
-
-// I-V variables
-integer devsign;
-real ids;
-
-// C-V variables
-real Qb, Qs, Qd1, Qd2, Qd, Qi, QBi, QSi, QDi, QGi, WLCOXVtinv;
-real qs, qbeff, dqgeff;
-real DPD, vgfbPD, gammaPD, gamg2;
-real MdL_2, inv_MdL, inv_MdL_2, MdL_less_1;
-real sis, sid, vgpqm, Temps, Tempd, DQSD, DQSD2, invgamg2;
-real Vgsov, Vgdov, Qovb, Qovg, Qovs, Qovd, Cgsof, Cgdof;
-real XDCinv, Coxeffinv, BSIMBULKTOXP;
-real Vgd_ov_noswap, Vgs_ov_noswap;
-
-// S/D series resistance
-real WeffWRFactor, DMCGeff, DMDGeff, DMCIeff;
-real RSourceGeo, RDrainGeo, Rsource, Rdrain, Rdss, Rdsi, Dr;
-
-// S/D junction area and perimeter
-real temp_ASeff, temp_ADeff, temp_PSeff, temp_PDeff;
-real ASeff, ADeff;
-
-// Gate resistances
-real Grgeltd, Gcrg, idsovvds;
-
-// Body resistance
-real Lnl, Lnw, Lnnf, Bodymode, Rbpbx, Rbpby, Rbsbx, Rbsby, Rbdbx, Rbdby;
-real Rbdb, Rbsb, Rbpb, Rbps, Rbpd;
-real Grbsb, Grbdb, Grbpb, Grbps, Grbpd;
-
-// Gate current
-real Voxm, Voxminv, Voxmacc, Vdseffx;
-real Vaux_Igbinv, Vaux_Igbacc, igbinv, igbacc, igb;
-real igcs, igcd, igc0, T1_exp;
-real igs, igd, igs_mult, igd_mult;
-real Aechvb, Bechvb, AechvbEdge, BechvbEdge, ToxRatio, ToxRatioEdge;
-
-// Junction current and capacitance
-real PSeff, PDeff;
-real Ibs, Ibd, Vbs_jct, Vbd_jct, arg, sarg;
-real Czbs, czbs_p1, czbs_p2, Czbssw, czbssw_p1, czbssw_p2, Czbsswg, czbsswg_p1, czbsswg_p2;
-real Czbd, czbd_p1, czbd_p2, Czbdsw, czbdsw_p1, czbdsw_p2, Czbdswg, czbdswg_p1, czbdswg_p2;
-real Qbsj, Qbsj1, Qbsj2, Qbsj3;
-real Qbdj, Qbdj1, Qbdj2, Qbdj3;
-real Isbs, Isbd, Nvtms, Nvtmd;
-real SslpRev, IVjsmRev, VjsmRev, SslpFwd, IVjsmFwd, VjsmFwd, XExpBVS;
-real DslpRev, IVjdmRev, VjdmRev, DslpFwd, IVjdmFwd, VjdmFwd, XExpBVD;
-
-// Flicker noise
-real LINTNOI_i;
-real Esatnoi, Leffnoi, Leffnoisq, DelClm;
-real N0, Nl, Nstar, Ssi, Swi, FNPowerAt1Hz;
-
-// Thermal noise
-real gspr, gdpr;
-real Gtnoi, sidn, Nt;
-real mig, migid, mid, Lvsat, Vtn;
-real cm_igid, sqid, sqig, ctnoi, betanoisq, thetanoisq, betaLowId;
-
-// Temperature effects
-real delTemp1;
-real DevTemp, Tnom, Vtm, Vtm0;
-real TRatio, delTemp;
-real U0_t, U0R_t, UA_t, UAR_t, UC_t, UCR_t, UD_t, UDR_t, UCS_t, UCSR_t, rdstemp, VSAT_t, VSATR_t, VSATCV_t;
-real DELTA_t, PTWG_t, PTWGR_t, BETA0_t, BGIDL_t, BGISL_t;
-real igtemp;
-real ETA0_t, ETA0R_t, NFACTOR_t;
-
-//Diode temperature effects
-real CJS_t, CJSWS_t, CJSWGD_t, CJD_t, CJSWD_t, CJSWGS_t;
-real PBS_t, PBSWS_t, PBSWGS_t, PBD_t, PBSWD_t, PBSWGD_t;
-real JSS_t, JSWS_t, JSWGS_t, JSD_t, JSWD_t, JSWGD_t;
-real JTSS_t, JTSD_t, JTSSWS_t, JTSSWD_t, JTSSWGS_t, JTSSWGD_t;
-real NJTS_t, NJTSD_t, NJTSSW_t, NJTSSWD_t, NJTSSWG_t, NJTSSWGD_t;
-
-// Binning
-real PSATB_i;
-real KT1_i, KT2_i;
-real W_by_NF;
-real L_LLN, W_LWN, LW_LLN_LWN, L_LLN1, W_LWN1, LW_LLN_LWN1;
-real L_WLN, W_WWN, LW_WLN_WWN, L_WLN1, W_WWN1, LW_WLN_WWN1;
-real Inv_L, Inv_W, Inv_WL, Inv_Lact, Inv_Wact, Inv_Llong, Inv_Wwide;
-real BIN_L, BIN_W, BIN_WL;
-real NGATE_i, NSD_i, NDEP_i, VFB_i;
-real CIT_i, CDSCD_i, CDSCDR_i, CDSCD_a, CDSCB_i, NFACTOR_i;
-real PHIN_i, ETA0_i, ETA0R_i, ETA0_a, ETAB_i, K2_i, K1_i;
-real DELTA_i;
-real U0_i, U0R_i, U0_a, VSAT_i, VSATR_i, VSAT_a, VSATCV_i, UA_i, UAR_i, UA_a, EU_i, UD_i, UDR_i, UD_a, UCS_i, UCSR_i, UCS_a, UC_i, UCR_i, UC_a;
-real PDIBLC_i, PDIBLCR_i, PDIBLC_a, PDIBLCB_i, PSCBE1_i, PSCBE2_i, PDITS_i, PDITSD_i, FPROUT_i;
-real PRWG_i, WR_i, RDWMIN_i, RSWMIN_i, RDW_i, RSW_i, RDSW_i, RDSWMIN_i;
-real PTWG_i, PTWGR_i, PTWG_a, PVAG_i, XJ_i;
-real PCLM_i, PCLMR_i, PCLM_a, PCLMCV_i, PRWB_i;
-real CF_i, CGSL_i, CGDL_i, CKAPPAS_i, CKAPPAD_i;
-real VFBCV_i, NDEPCV_i;
-real ALPHA0_i, BETA0_i;
-real AGIDL_i, BGIDL_i, CGIDL_i, EGIDL_i;
-real AGISL_i, BGISL_i, CGISL_i, EGISL_i;
-real UTE_i, UA1_i, UC1_i, UD1_i, UCSTE_i, PRT_i, AT_i, PTWGT_i, IIT_i, TGIDL_i;
-real KVTH0WE_i, K2WE_i, KU0WE_i;
-real AIGBINV_i, BIGBINV_i, CIGBINV_i, EIGBINV_i, NIGBINV_i;
-real AIGBACC_i, BIGBACC_i, CIGBACC_i, NIGBACC_i;
-real AIGC_i, BIGC_i, CIGC_i;
-real AIGS_i, BIGS_i, CIGS_i, AIGD_i, BIGD_i, CIGD_i, POXEDGE_i, PIGCD_i;
-real DLCIG_i, DLCIGD_i, NTOX_i;
-real IGT_i;
-real K0_i, M0_i;
-real K01_i, M01_i;
-real K0_t, M0_t;
-real Mnud;
-real NFACTOREDGE_i, CITEDGE_i, CDSCDEDGE_i, CDSCBEDGE_i, ETA0EDGE_i, ETABEDGE_i, KT1EDGE_i, KT1LEDGE_i, KT2EDGE_i, KT1EXPEDGE_i, TNFACTOREDGE_i, TETA0EDGE_i, K2EDGE_i, KVTH0EDGE_i, STK2EDGE_i, STETA0EDGE_i;
-
-// Stress effect
-real W_tmp_stress, tmp1_stress, kstress_u0, tmp1_stress_vth, kstress_vth0, ku0_temp;
-real Inv_sa, Inv_sb, Inv_saref, Inv_sbref, Inv_odref, rho_ref, Inv_od,rho;
-real mu0_mult, vsat_mult, vth0_stress, k2_stress, eta_stress;
-integer i;
-
-// Well Proximity effect
-real vth0_well, k2_well, mu_well, Wdrn, local_sca, local_scb, local_scc;
-
-// Edge FET Model Variables
-real ids_edge, ETA0EDGE_t, NFACTOREDGE_t, Vbi, theta_sce_edge, dvth_dibl, dvth_sce, litl_edge, DGAMMAEDGE_i, vdsatedge, Vdsatedge, Vdssate;
-real vth0_stress_EDGE, k2_stress_EDGE, eta_stress_EDGE, K2_EDGE,ETA0_EDGE;
-
-// The following are used by the macro definitions (GEOMOD and RGEOMOD)
-real nuIntD, nuEndD, nuIntS, nuEndS;
-real Rint, Rend;
-
-// Sub-surface punchthrough
-real Issl, SSL0_NT, SSL1_NT, PHIB_SSL;
-
-// VTH variables
-real q_vth, psip_th;
-
-// 1/f Noise model for Halo
-real vgfbh, gam_h, phib_h, psiph, qsh, nq_h, U0_i_h, i1, qdh, i2, qsch;
-real Np2, beta_ch, beta_h, gds_h, gds_ch, gm_ch, R_ch, R_h, Ssi_ch;
-real Swi_ch, FNPowerAt1Hz_ch, FNPowerAt1Hz_h;
-real T0a, T0b, T0c, T0d, T0e, Swi_h, t_tot, CF_ch, CF_h, LeffnoiH;
-
-// Self Heating
-real gth, cth;
-
-real Ggate, Gnoise;
-
-
-// OPERATING POINT VARIABLES
-`OPM( QBI, "C", "Intrinsic body charge")
-`OPM( QSI, "C", "Intrinsic source charge")
-`OPM( QDI, "C", "Intrinsic drain charge")
-`OPM( QGI, "C", "Intrinsic gate charge")
-`OPM( CGGI, "F", "Intrinsic g-g MOSFET capacitance")
-`OPM( CGBI, "F", "Intrinsic g-b MOSFET capacitance")
-`OPM( CGSI, "F", "Intrinsic g-s MOSFET capacitance")
-`OPM( CGDI, "F", "Intrinsic g-d MOSFET capacitance")
-`OPM( CSGI, "F", "Intrinsic s-g MOSFET capacitance")
-`OPM( CSBI, "F", "Intrinsic s-b MOSFET capacitance")
-`OPM( CSSI, "F", "Intrinsic s-s MOSFET capacitance")
-`OPM( CSDI, "F", "Intrinsic s-d MOSFET capacitance")
-`OPM( CDGI, "F", "Intrinsic d-g MOSFET capacitance")
-`OPM( CDBI, "F", "Intrinsic d-b MOSFET capacitance")
-`OPM( CDSI, "F", "Intrinsic d-s MOSFET capacitance")
-`OPM( CDDI, "F", "Intrinsic d-d MOSFET capacitance")
-`OPM( CBGI, "F", "Intrinsic b-g MOSFET capacitance")
-`OPM( CBBI, "F", "Intrinsic b-b MOSFET capacitance")
-`OPM( CBSI, "F", "Intrinsic b-s MOSFET capacitance")
-`OPM( CBDI, "F", "Intrinsic b-d MOSFET capacitance")
-`OPM( QB, "C", "Body charge")
-`OPM( QS, "C", "Source charge")
-`OPM( QD, "C", "Drain charge")
-`OPM( QG, "C", "Gate charge")
-`OPM( CGG, "F", "g-g MOSFET capacitance")
-`OPM( CGB, "F", "g-b MOSFET capacitance")
-`OPM( CGS, "F", "g-s MOSFET capacitance")
-`OPM( CGD, "F", "g-d MOSFET capacitance")
-`OPM( CSG, "F", "s-g MOSFET capacitance")
-`OPM( CSB, "F", "s-b MOSFET capacitance")
-`OPM( CSS, "F", "s-s MOSFET capacitance")
-`OPM( CSD, "F", "s-d MOSFET capacitance")
-`OPM( CDG, "F", "d-g MOSFET capacitance")
-`OPM( CDB, "F", "d-b MOSFET capacitance")
-`OPM( CDS, "F", "d-s MOSFET capacitance")
-`OPM( CDD, "F", "d-d MOSFET capacitance")
-`OPM( CBG, "F", "b-g MOSFET capacitance")
-`OPM( CBB, "F", "b-b MOSFET capacitance")
-`OPM( CBS, "F", "b-s MOSFET capacitance")
-`OPM( CBD, "F", "b-d MOSFET capacitance")
-`OPM( ISUB, "A", "Substrate current")
-`OPM( IGIDL, "A", "")
-`OPM( IGISL, "A", "")
-`OPM( IGS, "A", "")
-`OPM( IGD, "A", "")
-`OPM( IGCS, "A", "")
-`OPM( IGCD, "A", "")
-`OPM( IGB, "A", "")
-`OPM( CGSEXT, "F", "")
-`OPM( CGDEXT, "F", "")
-`OPM( CGBOV, "F", "Front gate charge")
-`OPM( CAPBS, "F", "")
-`OPM( CAPBD, "F", "")
-`OPP( WEFF, "m", "")
-`OPP( LEFF, "m", "")
-`OPP( WEFFCV, "m", "")
-`OPP( LEFFCV, "m", "")
-`OPM( IDS, "A", "Drain-source current")
-`OPM( IDEFF, "A", "Effective drain current")
-`OPM( ISEFF, "A", "Effective source current")
-`OPM( IGEFF, "A", "Effective gate current")
-`OPM( IBS, "A", "")
-`OPM( IBD, "A", "")
-`OPP( VDS, "V", "Drain to source voltage")
-`OPP( VGS, "V", "Gate to source voltage")
-`OPP( VBS, "V", "Body to source voltage")
-`OPP( VDSAT, "V", "")
-`OPM( GM, "mho", "")
-`OPM( GMBS, "mho", "")
-`OPM( GDS, "mho", "")
-`OPP( T_TOTAL_K, "K", "")
-`OPP( T_TOTAL_C, "degC", "")
-`OPP( T_DELTA_SH, "K", "")
-`OPP( VTH, "V", "Threshold voltage")
-
-analog begin
- // Variable initialization to prevent hidden states
- CDSCDR_i = 0.0; ETA0R_i = 0.0; ETA0R_t = 0.0; L_LLN1 = 0.0;
- L_WLN1 = 0.0; PCLMR_i = 0.0; PDIBLCR_i = 0.0; PSATR_i = 0.0;
- PTWGR_i = 0.0; PTWGR_t = 0.0; U0R_i = 0.0; U0R_t = 0.0;
- UAR_i = 0.0; UAR_t = 0.0; UCR_i = 0.0; UCR_t = 0.0;
- UCSR_i = 0.0; UCSR_t = 0.0; UDR_i = 0.0; UDR_t = 0.0;
- UD_a = 0.0; VSATR_i = 0.0; VSATR_t = 0.0; W_LWN1 = 0.0;
- W_WWN1 = 0.0; local_sca = 0.0; local_scb = 0.0; local_scc = 0.0;
- Inv_sa = 0.0; Inv_sb = 0.0; vth0_stress_EDGE = 0.0; k2_stress_EDGE = 0.0;
- eta_stress = 0.0; K2_EDGE = 0.0; ETA0_EDGE = 0.0; eta_stress_EDGE = 0.0;
- local_sca = 0.0; local_scb = 0.0; local_scc = 0.0; K0_i = 0.0;
- M0_i = 0.0; K01_i = 0.0; M01_i = 0.0; K0_t = 0.0;
- M0_t = 0.0; CITEDGE_i = 0.0; CDSCDEDGE_i = 0.0; CDSCBEDGE_i = 0.0;
- ETA0EDGE_i = 0.0; ETABEDGE_i = 0.0; KT1EDGE_i = 0.0; KT1LEDGE_i = 0.0;
- KT2EDGE_i = 0.0; KT1EXPEDGE_i = 0.0; TNFACTOREDGE_i = 0.0; TETA0EDGE_i = 0.0;
- K2EDGE_i = 0.0; KVTH0EDGE_i = 0.0; STK2EDGE_i = 0.0; STETA0EDGE_i = 0.0;
-
- // Bias independent calculations
- if (TYPE == `ntype) begin
- devsign = 1;
- end else begin
- devsign = -1;
- end
-
- // Constants
- epssi = EPSRSUB * `EPS0;
- epsox = EPSROX * `EPS0;
- Cox = EPSROX * `EPS0 / TOXE;
- epsratio = EPSRSUB / EPSROX;
-
- // Physical Oxide Thickness
- if (!$param_given(TOXP)) begin
- BSIMBULKTOXP = (TOXE * EPSROX / 3.9) - DTOX;
- end else begin
- BSIMBULKTOXP = TOXP;
- end
- L_mult = L * LMLT;
- W_mult = W * WMLT;
- Lnew = L_mult + XL;
- if (Lnew <= 0.0) begin
- $strobe("Fatal: Ldrawn * LMLT + XL = %e for BSIMBULK is non-positive", Lnew);
- $finish(0);
- end
- W_by_NF = W_mult / NF;
- Wnew = W_by_NF + XW;
- if (Wnew <= 0.0) begin
- $strobe("Fatal: W / NF * WMLT + XW = %e for BSIMBULK is non-positive", Wnew);
- $finish(0);
- end
-
- // Leff and Weff for I-V
- L_LLN = pow(Lnew, -LLN);
- W_LWN = pow(Wnew, -LWN);
- LW_LLN_LWN = L_LLN * W_LWN;
- dLIV = LINT + LL * L_LLN + LW * W_LWN + LWL * LW_LLN_LWN;
- L_WLN = pow(Lnew, -WLN);
- W_WWN = pow(Wnew, -WWN);
- LW_WLN_WWN = L_WLN * W_WWN;
- dWIV = WINT + WL * L_WLN + WW * W_WWN + WWL * LW_WLN_WWN;
- Leff = Lnew - 2.0 * dLIV;
- if (Leff <= 0.0) begin
- $strobe("Fatal: Effective channel length = %e for BSIMBULK is non-positive", Leff);
- $finish(0);
- end else if (Leff <= 1.0e-9) begin
- $strobe("Warning: Effective channel length = %e for BSIMBULK is <= 1.0e-9. Recommended Leff >= 1e-8", Leff);
- end
- Weff = Wnew - 2.0 * dWIV;
- if (Weff <= 0.0) begin
- $strobe("Fatal: Effective channel Width = %e for BSIMBULK is non-positive", Weff);
- $finish(0);
- end else if (Weff <= 1.0e-9) begin
- $strobe("Warning: Effective channel width = %e for BSIMBULK is <= 1.0e-9. Recommended Weff >= 1e-8", Weff);
- end
-
- // Leff and Weff for C-V
- dLCV = DLC + LLC * L_LLN + LWC * W_LWN + LWLC * LW_LLN_LWN;
- dWCV = DWC + WLC * L_WLN + WWC * W_WWN + WWLC * LW_WLN_WWN;
- Lact = Lnew - 2.0 * dLCV;
- if (Lact <= 0.0) begin
- $strobe("Fatal: Effective channel length for CV = %e for BSIMBULK is non-positive", Lact);
- $finish(0);
- end else if (Lact <= 1.0e-9) begin
- $strobe("Warning: Effective channel length for CV = %e for BSIMBULK is <= 1.0e-9. Recommended Lact >= 1e-8", Lact);
- end
- Wact = Wnew - 2.0 * dWCV;
- if (Wact <= 0.0) begin
- $strobe("Fatal: Effective channel width for CV = %e for BSIMBULK is non-positive", Wact);
- $finish(0);
- end else if (Wact <= 1.0e-9) begin
- $strobe("Warning: Effective channel width for CV = %e for BSIMBULK is <= 1.0e-9. Recommended Wact >= 1e-8", Wact);
- end
-
- // Weffcj for Diode, GIDL etc.
- dWJ = DWJ + WLC / pow(Lnew, WLN) + WWC / pow(Wnew, WWN) + WWLC / pow(Lnew, WLN) / pow(Wnew, WWN);
- Weffcj = Wnew - 2.0 * dWJ;
- if (Weffcj <= 0.0) begin
- $strobe("Fatal: Effective channel width for S/D junctions = %e for BSIMBULK is non-positive", Weffcj);
- $finish(0);
- end
- Inv_L = 1.0e-6 / Leff;
- Inv_W = 1.0e-6 / Weff;
- Inv_Lact = 1.0e-6 / Lact;
- Inv_Wact = 1.0e-6 / Wact;
- Inv_Llong = 1.0e-6 / LLONG;
- Inv_Wwide = 1.0e-6 / WWIDE;
- Inv_WL = Inv_L * Inv_W;
-
- // Effective length and width for binning
- L_LLN1 = L_LLN;
- L_WLN1 = L_WLN;
- if (DLBIN != 0.0) begin
- if (DLBIN <= -Lnew) begin
- $strobe("Fatal: DLBIN for BSIMBULK = %e is <= -Ldrawn * LMLT", DLBIN);
- $finish(0);
- end else begin
- L_LLN1 = pow(Lnew + DLBIN, -LLN);
- L_WLN1 = pow(Lnew + DLBIN, -WLN);
- end
- end
- W_LWN1 = W_LWN;
- W_WWN1 = W_WWN;
- if (DWBIN != 0.0) begin
- if (DWBIN <= -Wnew) begin
- $strobe("Fatal: DWBIN for BSIMBULK = %e is <= -Wdrawn * WMLT", DWBIN);
- $finish(0);
- end else begin
- W_LWN1 = pow(Wnew + DWBIN, -LWN);
- W_WWN1 = pow(Wnew + DWBIN, -WWN);
- end
- end
- LW_LLN_LWN1 = L_LLN1 * W_LWN1;
- dLB = LINT + LL * L_LLN1 + LW * W_LWN1 + LWL * LW_LLN_LWN1;
- LW_WLN_WWN1 = L_WLN1 * W_WWN1;
- dWB = WINT + WL * L_WLN1 + WW * W_WWN1 + WWL * LW_WLN_WWN1;
- Leff1 = Lnew - 2.0 * dLB + DLBIN;
- if (Leff1 <= 0.0) begin
- $strobe("Fatal: Effective channel length for binning = %e for BSIMBULK is non-positive", Leff1);
- $finish(0);
- end
- Weff1 = Wnew - 2.0 * dWB + DWBIN;
- if (Weff1 <= 0.0) begin
- $strobe("Fatal: Effective channel width for binning = %e for BSIMBULK is non-positive", Weff1);
- $finish(0);
- end
- if (BINUNIT == 1) begin
- BIN_L = 1.0e-6 / Leff1;
- BIN_W = 1.0e-6 / Weff1;
- end else begin
- BIN_L = 1.0 / Leff1;
- BIN_W = 1.0 / Weff1;
- end
- BIN_WL = BIN_L * BIN_W;
- VFB_i = VFB + BIN_L * LVFB + BIN_W * WVFB + BIN_WL * PVFB;
- VFBCV_i = VFBCV + BIN_L * LVFBCV + BIN_W * WVFBCV + BIN_WL * PVFBCV;
- NSD_i = NSD + BIN_L * LNSD + BIN_W * WNSD + BIN_WL * PNSD;
- NDEP_i = NDEP + BIN_L * LNDEP + BIN_W * WNDEP + BIN_WL * PNDEP;
- NDEPCV_i = NDEPCV + BIN_L * LNDEPCV + BIN_W * WNDEPCV + BIN_WL * PNDEPCV;
- NGATE_i = NGATE + BIN_L * LNGATE + BIN_W * WNGATE + BIN_WL * PNGATE;
- CIT_i = CIT + BIN_L * LCIT + BIN_W * WCIT + BIN_WL * PCIT;
- NFACTOR_i = NFACTOR + BIN_L * LNFACTOR + BIN_W * WNFACTOR + BIN_WL * PNFACTOR;
- CDSCD_i = CDSCD + BIN_L * LCDSCD + BIN_W * WCDSCD + BIN_WL * PCDSCD;
- CDSCB_i = CDSCB + BIN_L * LCDSCB + BIN_W * WCDSCB + BIN_WL * PCDSCB;
- DVTP0_i = DVTP0 + BIN_L * LDVTP0 + BIN_W * WDVTP0 + BIN_WL * PDVTP0;
- DVTP1_i = DVTP1 + BIN_L * LDVTP1 + BIN_W * WDVTP1 + BIN_WL * PDVTP1;
- DVTP2_i = DVTP2 + BIN_L * LDVTP2 + BIN_W * WDVTP2 + BIN_WL * PDVTP2;
- DVTP3_i = DVTP3 + BIN_L * LDVTP3 + BIN_W * WDVTP3 + BIN_WL * PDVTP3;
- DVTP4_i = DVTP4 + BIN_L * LDVTP4 + BIN_W * WDVTP4 + BIN_WL * PDVTP4;
- DVTP5_i = DVTP5 + BIN_L * LDVTP5 + BIN_W * WDVTP5 + BIN_WL * PDVTP5;
- K2_i = K2 + BIN_L * LK2 + BIN_W * WK2 + BIN_WL * PK2;
- K1_i = K1 + BIN_L * LK1 + BIN_W * WK1 + BIN_WL * PK1;
- XJ_i = XJ + BIN_L * LXJ + BIN_W * WXJ + BIN_WL * PXJ;
- PHIN_i = PHIN + BIN_L * LPHIN + BIN_W * WPHIN + BIN_WL * PPHIN;
- ETA0_i = ETA0 + BIN_L * LETA0 + BIN_W * WETA0 + BIN_WL * PETA0;
- ETAB_i = ETAB + BIN_L * LETAB + BIN_W * WETAB + BIN_WL * PETAB;
- DELTA_i = DELTA + BIN_L * LDELTA + BIN_W * WDELTA + BIN_WL * PDELTA;
- U0_i = U0 + BIN_L * LU0 + BIN_W * WU0 + BIN_WL * PU0;
- UA_i = UA + BIN_L * LUA + BIN_W * WUA + BIN_WL * PUA;
- UD_i = UD + BIN_L * LUD + BIN_W * WUD + BIN_WL * PUD;
- EU_i = EU + BIN_L * LEU + BIN_W * WEU + BIN_WL * PEU;
- UCS_i = UCS + BIN_L * LUCS + BIN_W * WUCS + BIN_WL * PUCS;
- UC_i = UC + BIN_L * LUC + BIN_W * WUC + BIN_WL * PUC;
- PCLM_i = PCLM + BIN_L * LPCLM + BIN_W * WPCLM + BIN_WL * PPCLM;
- PCLMCV_i = PCLMCV + BIN_L * LPCLMCV + BIN_W * WPCLMCV + BIN_WL * PPCLMCV;
- RSW_i = RSW + BIN_L * LRSW + BIN_W * WRSW + BIN_WL * PRSW;
- RDW_i = RDW + BIN_L * LRDW + BIN_W * WRDW + BIN_WL * PRDW;
- PRWG_i = PRWG + BIN_L * LPRWG + BIN_W * WPRWG + BIN_WL * PPRWG;
- PRWB_i = PRWB + BIN_L * LPRWB + BIN_W * WPRWB + BIN_WL * PPRWB;
- WR_i = WR + BIN_L * LWR + BIN_W * WWR + BIN_WL * PWR;
- RSWMIN_i = RSWMIN + BIN_L * LRSWMIN + BIN_W * WRSWMIN + BIN_WL * PRSWMIN;
- RDWMIN_i = RDWMIN + BIN_L * LRDWMIN + BIN_W * WRDWMIN + BIN_WL * PRDWMIN;
- RDSW_i = RDSW + BIN_L * LRDSW + BIN_W * WRDSW + BIN_WL * PRDSW;
- RDSWMIN_i = RDSWMIN + BIN_L * LRDSWMIN + BIN_W * WRDSWMIN + BIN_WL * PRDSWMIN;
- PTWG_i = PTWG + BIN_L * LPTWG + BIN_W * WPTWG + BIN_WL * PPTWG;
- PDIBLC_i = PDIBLC + BIN_L * LPDIBLC + BIN_W * WPDIBLC + BIN_WL * PPDIBLC;
- PDIBLCB_i = PDIBLCB + BIN_L * LPDIBLCB + BIN_W * WPDIBLCB + BIN_WL * PPDIBLCB;
- PSCBE1_i = PSCBE1 + BIN_L * LPSCBE1 + BIN_W * WPSCBE1 + BIN_WL * PPSCBE1;
- PSCBE2_i = PSCBE2 + BIN_L * LPSCBE2 + BIN_W * WPSCBE2 + BIN_WL * PPSCBE2;
- PDITS_i = PDITS + BIN_L * LPDITS + BIN_W * WPDITS + BIN_WL * PPDITS;
- PDITSD_i = PDITSD + BIN_L * LPDITSD + BIN_W * WPDITSD + BIN_WL * PPDITSD;
- FPROUT_i = FPROUT + BIN_L * LFPROUT + BIN_W * WFPROUT + BIN_WL * PFPROUT;
- PVAG_i = PVAG + BIN_L * LPVAG + BIN_W * WPVAG + BIN_WL * PPVAG;
- VSAT_i = VSAT + BIN_L * LVSAT + BIN_W * WVSAT + BIN_WL * PVSAT;
- PSAT_i = PSAT + BIN_L * LPSAT + BIN_W * WPSAT + BIN_WL * PPSAT;
- VSATCV_i = VSATCV + BIN_L * LVSATCV + BIN_W * WVSATCV + BIN_WL * PVSATCV;
- CF_i = CF + BIN_L * LCF + BIN_W * WCF + BIN_WL * PCF;
- CGSL_i = CGSL + BIN_L * LCGSL + BIN_W * WCGSL + BIN_WL * PCGSL;
- CGDL_i = CGDL + BIN_L * LCGDL + BIN_W * WCGDL + BIN_WL * PCGDL;
- CKAPPAS_i = CKAPPAS + BIN_L * LCKAPPAS + BIN_W * WCKAPPAS + BIN_WL * PCKAPPAS;
- CKAPPAD_i = CKAPPAD + BIN_L * LCKAPPAD + BIN_W * WCKAPPAD + BIN_WL * PCKAPPAD;
- ALPHA0_i = ALPHA0 + BIN_L * LALPHA0 + BIN_W * WALPHA0 + BIN_WL * PALPHA0;
- BETA0_i = BETA0 + BIN_L * LBETA0 + BIN_W * WBETA0 + BIN_WL * PBETA0;
- KVTH0WE_i = KVTH0WE + BIN_L * LKVTH0WE + BIN_W * WKVTH0WE + BIN_WL * PKVTH0WE;
- K2WE_i = K2WE + BIN_L * LK2WE + BIN_W * WK2WE + BIN_WL * PK2WE;
- KU0WE_i = KU0WE + BIN_L * LKU0WE + BIN_W * WKU0WE + BIN_WL * PKU0WE;
- AGIDL_i = AGIDL + BIN_L * LAGIDL + BIN_W * WAGIDL + BIN_WL * PAGIDL;
- BGIDL_i = BGIDL + BIN_L * LBGIDL + BIN_W * WBGIDL + BIN_WL * PBGIDL;
- CGIDL_i = CGIDL + BIN_L * LCGIDL + BIN_W * WCGIDL + BIN_WL * PCGIDL;
- EGIDL_i = EGIDL + BIN_L * LEGIDL + BIN_W * WEGIDL + BIN_WL * PEGIDL;
- AGISL_i = AGISL + BIN_L * LAGISL + BIN_W * WAGISL + BIN_WL * PAGISL;
- BGISL_i = BGISL + BIN_L * LBGISL + BIN_W * WBGISL + BIN_WL * PBGISL;
- CGISL_i = CGISL + BIN_L * LCGISL + BIN_W * WCGISL + BIN_WL * PCGISL;
- EGISL_i = EGISL + BIN_L * LEGISL + BIN_W * WEGISL + BIN_WL * PEGISL;
- UTE_i = UTE + BIN_L * LUTE + BIN_W * WUTE + BIN_WL * PUTE;
- UA1_i = UA1 + BIN_L * LUA1 + BIN_W * WUA1 + BIN_WL * PUA1;
- UC1_i = UC1 + BIN_L * LUC1 + BIN_W * WUC1 + BIN_WL * PUC1;
- UD1_i = UD1 + BIN_L * LUD1 + BIN_W * WUD1 + BIN_WL * PUD1;
- UCSTE_i = UCSTE + BIN_L * LUCSTE + BIN_W * WUCSTE + BIN_WL * PUCSTE;
- PRT_i = PRT + BIN_L * LPRT + BIN_W * WPRT + BIN_WL * PPRT;
- AT_i = AT + BIN_L * LAT + BIN_W * WAT + BIN_WL * PAT;
- PTWGT_i = PTWGT + BIN_L * LPTWGT + BIN_W * WPTWGT + BIN_WL * PPTWGT;
- IIT_i = IIT + BIN_L * LIIT + BIN_W * WIIT + BIN_WL * PIIT;
- TGIDL_i = TGIDL + BIN_L * LTGIDL + BIN_W * WTGIDL + BIN_WL * PTGIDL;
- IGT_i = IGT + BIN_L * LIGT + BIN_W * WIGT + BIN_WL * PIGT;
- AIGBINV_i = AIGBINV + BIN_L * LAIGBINV + BIN_W * WAIGBINV + BIN_WL * PAIGBINV;
- BIGBINV_i = BIGBINV + BIN_L * LBIGBINV + BIN_W * WBIGBINV + BIN_WL * PBIGBINV;
- CIGBINV_i = CIGBINV + BIN_L * LCIGBINV + BIN_W * WCIGBINV + BIN_WL * PCIGBINV;
- EIGBINV_i = EIGBINV + BIN_L * LEIGBINV + BIN_W * WEIGBINV + BIN_WL * PEIGBINV;
- NIGBINV_i = NIGBINV + BIN_L * LNIGBINV + BIN_W * WNIGBINV + BIN_WL * PNIGBINV;
- AIGBACC_i = AIGBACC + BIN_L * LAIGBACC + BIN_W * WAIGBACC + BIN_WL * PAIGBACC;
- BIGBACC_i = BIGBACC + BIN_L * LBIGBACC + BIN_W * WBIGBACC + BIN_WL * PBIGBACC;
- CIGBACC_i = CIGBACC + BIN_L * LCIGBACC + BIN_W * WCIGBACC + BIN_WL * PCIGBACC;
- NIGBACC_i = NIGBACC + BIN_L * LNIGBACC + BIN_W * WNIGBACC + BIN_WL * PNIGBACC;
- AIGC_i = AIGC + BIN_L * LAIGC + BIN_W * WAIGC + BIN_WL * PAIGC;
- BIGC_i = BIGC + BIN_L * LBIGC + BIN_W * WBIGC + BIN_WL * PBIGC;
- CIGC_i = CIGC + BIN_L * LCIGC + BIN_W * WCIGC + BIN_WL * PCIGC;
- AIGS_i = AIGS + BIN_L * LAIGS + BIN_W * WAIGS + BIN_WL * PAIGS;
- BIGS_i = BIGS + BIN_L * LBIGS + BIN_W * WBIGS + BIN_WL * PBIGS;
- CIGS_i = CIGS + BIN_L * LCIGS + BIN_W * WCIGS + BIN_WL * PCIGS;
- AIGD_i = AIGD + BIN_L * LAIGD + BIN_W * WAIGD + BIN_WL * PAIGD;
- BIGD_i = BIGD + BIN_L * LBIGD + BIN_W * WBIGD + BIN_WL * PBIGD;
- CIGD_i = CIGD + BIN_L * LCIGD + BIN_W * WCIGD + BIN_WL * PCIGD;
- POXEDGE_i = POXEDGE + BIN_L * LPOXEDGE + BIN_W * WPOXEDGE + BIN_WL * PPOXEDGE;
- DLCIG_i = DLCIG + BIN_L * LDLCIG + BIN_W * WDLCIG + BIN_WL * PDLCIG;
- DLCIGD_i = DLCIGD + BIN_L * LDLCIGD + BIN_W * WDLCIGD + BIN_WL * PDLCIGD;
- NTOX_i = NTOX + BIN_L * LNTOX + BIN_W * WNTOX + BIN_WL * PNTOX;
- KT1_i = KT1 + BIN_L * LKT1 + BIN_W * WKT1 + BIN_WL * PKT1;
- KT2_i = KT2 + BIN_L * LKT2 + BIN_W * WKT2 + BIN_WL * PKT2;
- PSATB_i = PSATB + BIN_L * LPSATB + BIN_W * WPSATB + BIN_WL * PPSATB;
- A1_i = A1 + BIN_L * LA1 + BIN_W * WA1 + BIN_WL * PA1;
- A11_i = A11 + BIN_L * LA11 + BIN_W * WA11 + BIN_WL * PA11;
- A2_i = A2 + BIN_L * LA2 + BIN_W * WA2 + BIN_WL * PA2;
- A21_i = A21 + BIN_L * LA21 + BIN_W * WA21 + BIN_WL * PA21;
- K0_i = K0 + BIN_L * LK0 + BIN_W * WK0 + BIN_WL * PK0;
- M0_i = M0 + BIN_L * LM0 + BIN_W * WM0 + BIN_WL * PM0;
- K01_i = K01 + BIN_L * LK01 + BIN_W * WK01 + BIN_WL * PK01;
- M01_i = M01 + BIN_L * LM01 + BIN_W * WM01 + BIN_WL * PM01;
- NFACTOREDGE_i = NFACTOREDGE + BIN_L * LNFACTOREDGE + BIN_W * WNFACTOREDGE + BIN_WL * PNFACTOREDGE;
- CITEDGE_i = CITEDGE + BIN_L * LCITEDGE + BIN_W * WCITEDGE + BIN_WL * PCITEDGE;
- CDSCDEDGE_i = CDSCDEDGE + BIN_L * LCDSCDEDGE + BIN_W * WCDSCDEDGE + BIN_WL * PCDSCDEDGE;
- CDSCBEDGE_i = CDSCBEDGE + BIN_L * LCDSCBEDGE + BIN_W * WCDSCBEDGE + BIN_WL * PCDSCBEDGE;
- ETA0EDGE_i = ETA0EDGE + BIN_L * LETA0EDGE + BIN_W * WETA0EDGE + BIN_WL * PETA0EDGE;
- ETABEDGE_i = ETABEDGE + BIN_L * LETABEDGE + BIN_W * WETABEDGE + BIN_WL * PETABEDGE;
- KT1EDGE_i = KT1EDGE + BIN_L * LKT1EDGE + BIN_W * WKT1EDGE + BIN_WL * PKT1EDGE;
- KT1LEDGE_i = KT1LEDGE + BIN_L * LKT1LEDGE + BIN_W * WKT1LEDGE + BIN_WL * PKT1LEDGE;
- KT2EDGE_i = KT2EDGE + BIN_L * LKT2EDGE + BIN_W * WKT2EDGE + BIN_WL * PKT2EDGE;
- KT1EXPEDGE_i = KT1EXPEDGE + BIN_L * LKT1EXPEDGE + BIN_W * WKT1EXPEDGE + BIN_WL * PKT1EXPEDGE;
- TNFACTOREDGE_i = TNFACTOREDGE + BIN_L * LTNFACTOREDGE + BIN_W * WTNFACTOREDGE + BIN_WL * PTNFACTOREDGE;
- TETA0EDGE_i = TETA0EDGE + BIN_L * LTETA0EDGE + BIN_W * WTETA0EDGE + BIN_WL * PTETA0EDGE;
- K2EDGE_i = K2EDGE + BIN_L * LK2EDGE + BIN_W * WK2EDGE + BIN_WL * PK2EDGE;
- KVTH0EDGE_i = KVTH0EDGE + BIN_L * LKVTH0EDGE + BIN_W * WKVTH0EDGE + BIN_WL * PKVTH0EDGE;
- STK2EDGE_i = STK2EDGE + BIN_L * LSTK2EDGE + BIN_W * WSTK2EDGE + BIN_WL * PSTK2EDGE;
- STETA0EDGE_i = STETA0EDGE + BIN_L * LSTETA0EDGE + BIN_W * WSTETA0EDGE + BIN_WL * PSTETA0EDGE;
-
- if (ASYMMOD != 0) begin
- CDSCDR_i = CDSCDR + BIN_L * LCDSCDR + BIN_W * WCDSCDR + BIN_WL * PCDSCDR;
- ETA0R_i = ETA0R + BIN_L * LETA0R + BIN_W * WETA0R + BIN_WL * PETA0R;
- U0R_i = U0R + BIN_L * LU0R + BIN_W * WU0R + BIN_WL * PU0R;
- UAR_i = UAR + BIN_L * LUAR + BIN_W * WUAR + BIN_WL * PUAR;
- UDR_i = UDR + BIN_L * LUDR + BIN_W * WUDR + BIN_WL * PUDR;
- UCSR_i = UCSR + BIN_L * LUCSR + BIN_W * WUCSR + BIN_WL * PUCSR;
- UCR_i = UCR + BIN_L * LUCR + BIN_W * WUCR + BIN_WL * PUCR;
- PCLMR_i = PCLMR + BIN_L * LPCLMR + BIN_W * WPCLMR + BIN_WL * PPCLMR;
- PDIBLCR_i = PDIBLCR + BIN_L * LPDIBLCR + BIN_W * WPDIBLCR + BIN_WL * PPDIBLCR;
- VSATR_i = VSATR + BIN_L * LVSATR + BIN_W * WVSATR + BIN_WL * PVSATR;
- PSATR_i = PSATR + BIN_L * LPSATR + BIN_W * WPSATR + BIN_WL * PPSATR;
- PTWGR_i = PTWGR + BIN_L * LPTWGR + BIN_W * WPTWGR + BIN_WL * PPTWGR;
- end
-
- // Geometrical scaling
- T0y = NDEPL1 * max(pow(Inv_L, NDEPLEXP1) - pow(Inv_Llong, NDEPLEXP1), 0.0) + NDEPL2 * max(pow(Inv_L, NDEPLEXP2) - pow(Inv_Llong, NDEPLEXP2), 0.0);
- T1y = NDEPW * max(pow(Inv_W, NDEPWEXP) - pow(Inv_Wwide, NDEPWEXP), 0.0) + NDEPWL * pow(Inv_W * Inv_L, NDEPWLEXP);
- NDEP_i = NDEP_i * (1.0 + T0y + T1y);
- T0y = NFACTORL * max( pow(Inv_L, NFACTORLEXP) - pow(Inv_Llong, NFACTORLEXP), 0.0);
- T1y = NFACTORW * max( pow(Inv_W, NFACTORWEXP) - pow(Inv_Wwide, NFACTORWEXP), 0.0) + NFACTORWL * pow(Inv_WL, NFACTORWLEXP);
- NFACTOR_i = NFACTOR_i * (1.0 + T0y + T1y);
- T0y = (1.0 + CDSCDL * max(pow(Inv_L, CDSCDLEXP) - pow(Inv_Llong, CDSCDLEXP), 0.0));
- CDSCD_i = CDSCD_i * T0y;
- if (ASYMMOD != 0) begin
- CDSCDR_i = CDSCDR_i * T0y;
- end
- CDSCB_i = CDSCB_i * (1.0 + CDSCBL * max(pow(Inv_L, CDSCBLEXP) - pow(Inv_Llong, CDSCBLEXP), 0.0));
- U0_i = MULU0 * U0_i;
- if (MOBSCALE != 1) begin
- if (U0LEXP > 0.0) begin
- U0_i = U0_i * (1.0 - U0L * max(pow(Inv_L, U0LEXP) - pow(Inv_Llong, U0LEXP), 0.0));
- if (ASYMMOD != 0) begin
- U0R_i = U0R_i * (1.0 - U0L * max(pow(Inv_L, U0LEXP) - pow(Inv_Llong, U0LEXP), 0.0));
- end
- end else begin
- U0_i = U0_i * (1.0 - U0L);
- if (ASYMMOD != 0) begin
- U0R_i = U0R_i * (1.0 - U0L);
- end
- end
- end else begin
- U0_i = U0_i * (1.0 - (UP1 * lexp(-Leff / LP1)) - (UP2 * lexp(-Leff / LP2)));
- if (ASYMMOD != 0) begin
- U0R_i = U0R_i * (1.0 - (UP1 * lexp(-Leff / LP1)) - (UP2 * lexp(-Leff / LP2)));
- end
- end
- T0y = UAL * max(pow(Inv_L, UALEXP) - pow(Inv_Llong, UALEXP), 0.0);
- T1y = UAW * max(pow(Inv_W, UAWEXP) - pow(Inv_Wwide, UAWEXP), 0.0) + UAWL * pow(Inv_WL, UAWLEXP);
- UA_i = UA_i * (1.0 + T0y + T1y);
- if (ASYMMOD != 0) begin
- UAR_i = UAR_i * (1.0 + T0y + T1y);
- end
- T0y = EUL * max(pow(Inv_L, EULEXP) - pow(Inv_Llong, EULEXP), 0.0);
- T1y = EUW * max(pow(Inv_W, EUWEXP) - pow(Inv_Wwide, EUWEXP), 0.0) + EUWL * pow(Inv_WL, EUWLEXP);
- EU_i = EU_i * (1.0 + T0y + T1y);
- T0y = 1.0 + UDL * max(pow(Inv_L, UDLEXP) - pow(Inv_Llong, UDLEXP), 0.0);
- UD_i = UD_i * T0y;
- if (ASYMMOD != 0) begin
- UDR_i = UDR_i * T0y;
- end
- T0y = UCL * max(pow(Inv_L, UCLEXP) - pow(Inv_Llong, UCLEXP), 0.0);
- T1y = UCW * max(pow(Inv_W, UCWEXP) - pow(Inv_Wwide, UCWEXP), 0.0) + UCWL * pow(Inv_WL, UCWLEXP);
- UC_i = UC_i * (1.0 + T0y + T1y);
- if (ASYMMOD != 0) begin
- UCR_i = UCR_i * (1.0 + T0y + T1y);
- end
- T0y = max(pow(Inv_L, DSUB) - pow(Inv_Llong, DSUB), 0.0);
- ETA0_i = ETA0_i * T0y;
- if (ASYMMOD != 0) begin
- ETA0R_i = ETA0R_i * T0y;
- end
- ETAB_i = ETAB_i * max(pow(Inv_L, ETABEXP) - pow(Inv_Llong, ETABEXP), 0.0);
- T0y = 1.0 + PDIBLCL * max(pow(Inv_L, PDIBLCLEXP) - pow(Inv_Llong, PDIBLCLEXP), 0.0);
- PDIBLC_i = PDIBLC_i * T0y;
- if (ASYMMOD != 0) begin
- PDIBLCR_i = PDIBLCR_i * T0y;
- end
- T0y = DELTA_i * (1.0 + DELTAL * max(pow(Inv_L, DELTALEXP) - pow(Inv_Llong, DELTALEXP), 0.0));
- DELTA_i = min(T0y, 0.5);
- FPROUT_i = FPROUT_i * (1.0 + FPROUTL * max(pow(Inv_L, FPROUTLEXP) - pow(Inv_Llong, FPROUTLEXP), 0.0));
- T0y = (1.0 + PCLML * max(pow(Inv_L, PCLMLEXP) - pow(Inv_Llong, PCLMLEXP), 0.0));
- PCLM_i = PCLM_i * T0y;
- PCLM_i = max(PCLM_i, 0.0);
- if (ASYMMOD != 0) begin
- PCLMR_i = PCLMR_i * T0y;
- PCLMR_i = max(PCLMR_i, 0.0);
- end
- T0y = VSATL * max(pow(Inv_L, VSATLEXP) - pow(Inv_Llong, VSATLEXP), 0.0);
- T1y = VSATW * max(pow(Inv_W, VSATWEXP) - pow(Inv_Wwide, VSATWEXP), 0.0) + VSATWL * pow(Inv_WL, VSATWLEXP);
- VSAT_i = VSAT_i * (1.0 + T0y + T1y);
- if (ASYMMOD != 0) begin
- VSATR_i = VSATR_i * (1.0 + T0y + T1y);
- end
- PSAT_i = max(PSAT_i * (1.0 + PSATL * max(pow(Inv_L, PSATLEXP) - pow(Inv_Llong, PSATLEXP), 0.0)), 0.25);
- if (ASYMMOD != 0) begin
- PSATR_i = max(PSATR_i * (1.0 + PSATL * max(pow(Inv_L, PSATLEXP) - pow(Inv_Llong, PSATLEXP), 0.0)), 0.25);
- end
- T0y = (1.0 + PTWGL * max(pow(Inv_L, PTWGLEXP) - pow(Inv_Llong, PTWGLEXP), 0.0));
- PTWG_i = PTWG_i * T0y;
- if (ASYMMOD != 0) begin
- PTWGR_i = PTWGR_i * T0y;
- end
- ALPHA0_i = ALPHA0_i * (1.0 + ALPHA0L * max(pow(Inv_L, ALPHA0LEXP) - pow(Inv_Llong, ALPHA0LEXP), 0.0));
- AGIDL_i = AGIDL_i * (1.0 + AGIDLL * Inv_L + AGIDLW * Inv_W);
- AGISL_i = AGISL_i * (1.0 + AGISLL * Inv_L + AGISLW * Inv_W);
- AIGC_i = AIGC_i * (1.0 + AIGCL * Inv_L + AIGCW * Inv_W);
- AIGS_i = AIGS_i * (1.0 + AIGSL * Inv_L + AIGSW * Inv_W);
- AIGD_i = AIGD_i * (1.0 + AIGDL * Inv_L + AIGDW * Inv_W);
- PIGCD_i = PIGCD * (1.0 + PIGCDL * Inv_L);
- T0y = NDEPCVL1 * max(pow(Inv_Lact, NDEPCVLEXP1) - pow(Inv_Llong, NDEPCVLEXP1), 0.0) + NDEPCVL2 * max( pow(Inv_Lact, NDEPCVLEXP2) - pow(Inv_Llong, NDEPCVLEXP2), 0.0);
- T1y = NDEPCVW * max(pow(Inv_Wact, NDEPCVWEXP) - pow(Inv_Wwide, NDEPCVWEXP), 0.0) + NDEPCVWL * pow(Inv_Wact * Inv_Lact, NDEPCVWLEXP);
- NDEPCV_i = NDEPCV_i * (1.0 + T0y + T1y);
- T0y = VFBCVL * max(pow(Inv_Lact, VFBCVLEXP) - pow(Inv_Llong, VFBCVLEXP), 0.0);
- T1y = VFBCVW * max(pow(Inv_Wact, VFBCVWEXP) - pow(Inv_Wwide, VFBCVWEXP), 0.0) + VFBCVWL * pow(Inv_WL, VFBCVWLEXP);
- VFBCV_i = VFBCV_i * (1.0 + T0y + T1y);
- T0y = VSATCVL * max(pow(Inv_Lact, VSATCVLEXP) - pow(Inv_Llong, VSATCVLEXP), 0.0);
- T1y = VSATCVW * max(pow(Inv_W, VSATCVWEXP) - pow(Inv_Wwide, VSATCVWEXP), 0.0) + VSATCVWL * pow(Inv_WL, VSATCVWLEXP);
- VSATCV_i = VSATCV_i * (1.0 + T0y + T1y);
- PCLMCV_i = PCLMCV_i * (1.0 + PCLMCVL * max(pow(Inv_Lact, PCLMCVLEXP) - pow(Inv_Llong, PCLMCVLEXP), 0.0));
- PCLMCV_i = max(PCLMCV_i, 0.0);
- T0y = K1L * max(pow(Inv_L, K1LEXP) - pow(Inv_Llong, K1LEXP), 0.0);
- T1y = K1W * max(pow(Inv_W, K1WEXP) - pow(Inv_Wwide, K1WEXP), 0.0) + K1WL * pow(Inv_WL, K1WLEXP);
- K1_i = K1_i * (1.0 + T0y + T1y);
- T0y = K2L * max(pow(Inv_L, K2LEXP) - pow(Inv_Llong, K2LEXP), 0.0);
- T1y = K2W * max(pow(Inv_W, K2WEXP) - pow(Inv_Wwide, K2WEXP), 0.0) + K2WL * pow(Inv_WL, K2WLEXP);
- K2_i = K2_i * (1.0 + T0y + T1y);
- PRWB_i = PRWB_i * (1.0 + PRWBL * max( pow(Inv_L, PRWBLEXP) - pow(Inv_Llong, PRWBLEXP), 0));
-
- // Global scaling parameters for temperature
- UTE_i = UTE_i * (1.0 + Inv_L * UTEL);
- UA1_i = UA1_i * (1.0 + Inv_L * UA1L);
- UD1_i = UD1_i * (1.0 + Inv_L * UD1L);
- AT_i = AT_i * (1.0 + Inv_L * ATL);
- PTWGT_i = PTWGT_i * (1.0 + Inv_L * PTWGTL);
- if ($port_connected(t) == 0) begin
- if (SHMOD == 0 || RTH0 == 0.0) begin
- Temp(t) <+ 0.0;
- end else begin
- $strobe("5 terminal Module, while 't' node is not connected, SH is activated.");
- end
- end
- if (RDSMOD == 1) begin
- RSW_i = RSW_i * (1.0 + RSWL * max(pow(Inv_L, RSWLEXP) - pow(Inv_Llong, RSWLEXP), 0.0));
- RDW_i = RDW_i * (1.0 + RDWL * max(pow(Inv_L, RDWLEXP) - pow(Inv_Llong, RDWLEXP), 0.0));
- end else begin
- RDSW_i = RDSW_i * (1.0 + RDSWL * max(pow(Inv_L, RDSWLEXP) - pow(Inv_Llong, RDSWLEXP), 0.0));
- end
-
- // Parameter checking
- if (UCS_i < 1.0) begin
- UCS_i = 1.0;
- end else if (UCS_i > 2.0) begin
- UCS_i = 2.0;
- end
- if (ASYMMOD != 0) begin
- if (UCSR_i < 1.0) begin
- UCSR_i = 1.0;
- end else if (UCSR_i > 2.0) begin
- UCSR_i = 2.0;
- end
- end
- if (CGIDL_i < 0.0) begin
- $strobe("Fatal: CGIDL_i = %e is negative.", CGIDL_i);
- $finish(0);
- end
- if (CGISL_i < 0.0) begin
- $strobe("Fatal: CGISL_i = %e is negative.", CGISL_i);
- $finish(0);
- end
- if (CKAPPAD_i <= 0.0) begin
- $strobe("Fatal: CKAPPAD_i = %e is non-positive.", CKAPPAD_i);
- $finish(0);
- end
- if (CKAPPAS_i <= 0.0) begin
- $strobe("Fatal: CKAPPAS_i = %e is non-positive.", CKAPPAS_i);
- $finish(0);
- end
- if (PDITS_i < 0.0) begin
- $strobe("Fatal: PDITS_i = %e is negative.", PDITS_i);
- $finish(0);
- end
- if (CIT_i < 0.0) begin
- $strobe("Fatal: CIT_i = %e is negative.", CIT_i);
- $finish(0);
- end
- if (NFACTOR_i < 0.0) begin
- $strobe("Fatal: NFACTOR_i = %e is negative.", NFACTOR_i);
- $finish(0);
- end
- if (K1_i < 0.0) begin
- $strobe("Fatal: K1_i = %e is negative.", K1_i);
- $finish(0);
- end
-
- if (NSD_i <= 0.0) begin
- $strobe("Fatal: NSD_i = %e is non-positive.", NSD_i);
- $finish(0);
- end
- if (NDEP_i <= 0.0) begin
- $strobe("Fatal: NDEP_i = %e is non-positive.", NDEP_i);
- $finish(0);
- end
- if (NDEPCV_i <= 0.0) begin
- $strobe("Fatal: NDEPCV_i = %e is non-positive.", NDEPCV_i);
- $finish(0);
- end
- if (IGBMOD != 0) begin
- if (NIGBINV_i <= 0.0) begin
- $strobe("Fatal: NIGBINV_i = %e is non-positive.", NIGBINV_i);
- $finish(0);
- end
- if (NIGBACC_i <= 0.0) begin
- $strobe("Fatal: NIGBACC_i = %e is non-positive.", NIGBACC_i);
- $finish(0);
- end
- end
- if (IGCMOD != 0) begin
- if (POXEDGE_i <= 0.0) begin
- $strobe("Fatal: POXEDGE_i = %e is non-positive.", POXEDGE_i);
- $finish(0);
- end
- end
- if (CDSCD_i < 0.0) begin
- $strobe("Fatal: CDSCD_i = %e is negative.", CDSCD_i);
- $finish(0);
- end
- if (ASYMMOD != 0) begin
- if (CDSCDR_i < 0.0) begin
- $strobe("Fatal: CDSCDR_i = %e is negative.", CDSCDR_i);
- $finish(0);
- end
- end
- if (DLCIG_i < 0.0) begin
- $strobe("Warning: DLCIG = %e is negative, setting it to 0.", DLCIG_i);
- DLCIG_i = 0.0;
- end
- if (DLCIGD_i < 0.0) begin
- $strobe("Warning: DLCIGD = %e is negative, setting it to 0.", DLCIGD_i);
- DLCIGD_i = 0.0;
- end
- if (M0_i < 0.0) begin
- $strobe("Warning: M0_i = %e is negative, setting it to 0.", M0_i);
- M0_i = 0.0;
- end
-
- // Initialize variables used in geometry macros
- nuEndD = 0.0; nuEndS = 0.0; nuIntD = 0.0; nuIntS = 0.0; Rend = 0.0; Rint = 0.0;
-
- // Process drain series resistance
- DMCGeff = DMCG - DMCGT;
- DMCIeff = DMCI;
- DMDGeff = DMDG - DMCGT;
-
- // Processing S/D resistance and conductance below
- if($param_given(NRS)) begin
- RSourceGeo = RSH * NRS;
- end else if (RGEOMOD > 0 && RSH > 0.0) begin
- `BSIMBULKRdseffGeo(NF, GEOMOD, RGEOMOD, MINZ, Weff, RSH, DMCGeff, DMCIeff, DMDGeff, 1, RSourceGeo)
- end else begin
- RSourceGeo = 0.0;
- end
-
- if ($param_given(NRD)) begin
- RDrainGeo = RSH * NRD;
- end else if (RGEOMOD > 0 && RSH > 0.0) begin
- `BSIMBULKRdseffGeo(NF, GEOMOD, RGEOMOD, MINZ, Weff, RSH, DMCGeff, DMCIeff, DMDGeff, 0, RDrainGeo)
- end else begin
- RDrainGeo = 0.0;
- end
-
- // Clamping of source/drain resistances
- if (RSourceGeo <= 1.0e-3) begin
- RSourceGeo = 1.0e-3;
- end
- if (RDrainGeo <= 1.0e-3) begin
- RDrainGeo = 1.0e-3;
- end
-
- if (RDSMOD == 1) begin
- if (RSWMIN_i <= 0.0) begin
- RSWMIN_i = 0.0;
- end
- if (RDWMIN_i <= 0.0) begin
- RDWMIN_i = 0.0;
- end
- if (RSW_i <= 0.0) begin
- RSW_i = 0.0;
- end
- if (RDW_i <= 0.0) begin
- RDW_i = 0.0;
- end
- end else begin
- if (RDSWMIN_i <= 0.0) begin
- RDSWMIN_i = 0.0;
- end
- if (RDSW_i <= 0.0) begin
- RDSW_i = 0.0;
- end
- end
-
- // Body resistance network
- Grbsb = 0.0;
- Grbdb = 0.0;
- Grbpb = 0.0;
- Grbps = 0.0;
- Grbpd = 0.0;
- if (RBODYMOD != 0) begin
- Lnl = lln(Leff * 1.0e6);
- Lnw = lln(Weff * 1.0e6);
- Lnnf = lln(NF);
- Bodymode = 5;
- Rbpb = RBPB;
- Rbpd = RBPD;
- Rbps = RBPS;
- Rbdb = RBDB;
- Rbsb = RBSB;
- if (!$param_given(RBPS0) || !$param_given(RBPD0)) begin
- Bodymode = 1;
- end
- else if (!$param_given(RBSBX0) && !$param_given(RBSBY0) || !$param_given(RBDBX0) && !$param_given(RBDBY0)) begin
- Bodymode = 3;
- end
- if (RBODYMOD == 2) begin
- if (Bodymode == 5) begin
- Rbsbx = RBSBX0 * lexp(RBSDBXL * Lnl + RBSDBXW * Lnw + RBSDBXNF * Lnnf);
- Rbsby = RBSBY0 * lexp(RBSDBYL * Lnl + RBSDBYW * Lnw + RBSDBYNF * Lnnf);
- Rbsb = Rbsbx * Rbsby / (Rbsbx + Rbsby);
- Rbdbx = RBDBX0 * lexp(RBSDBXL * Lnl + RBSDBXW * Lnw + RBSDBXNF * Lnnf);
- Rbdby = RBDBY0 * lexp(RBSDBYL * Lnl + RBSDBYW * Lnw + RBSDBYNF * Lnnf);
- Rbdb = Rbdbx * Rbdby / (Rbdbx + Rbdby);
- end
- if (Bodymode == 3 || Bodymode == 5) begin
- Rbps = RBPS0 * lexp(RBPSL * Lnl + RBPSW * Lnw + RBPSNF * Lnnf);
- Rbpd = RBPD0 * lexp(RBPDL * Lnl + RBPDW * Lnw + RBPDNF * Lnnf);
- end
- Rbpbx = RBPBX0 * lexp(RBPBXL * Lnl + RBPBXW * Lnw + RBPBXNF * Lnnf);
- Rbpby = RBPBY0 * lexp(RBPBYL * Lnl + RBPBYW * Lnw + RBPBYNF * Lnnf);
- Rbpb = Rbpbx * Rbpby / (Rbpbx + Rbpby);
- end
- if (RBODYMOD == 1 || (RBODYMOD == 2 && Bodymode == 5)) begin
- if (Rbdb < 1.0e-3) begin
- Grbdb = 1.0e3; // in mho
- end else begin
- Grbdb = GBMIN + 1.0 / Rbdb;
- end
- if (Rbpb < 1.0e-3) begin
- Grbpb = 1.0e3;
- end else begin
- Grbpb = GBMIN + 1.0 / Rbpb;
- end
- if (Rbps < 1.0e-3) begin
- Grbps = 1.0e3;
- end else begin
- Grbps = GBMIN + 1.0 / Rbps;
- end
- if (Rbsb < 1.0e-3) begin
- Grbsb = 1.0e3;
- end else begin
- Grbsb = GBMIN + 1.0 / Rbsb;
- end
- if (Rbpd < 1.0e-3) begin
- Grbpd = 1.0e3;
- end else begin
- Grbpd = GBMIN + 1.0 / Rbpd;
- end
- end else if (RBODYMOD == 2 && Bodymode == 3) begin
- Grbdb = GBMIN;
- Grbsb = GBMIN;
- if (Rbpb < 1.0e-3) begin
- Grbpb = 1.0e3;
- end else begin
- Grbpb = GBMIN + 1.0 / Rbpb;
- end
- if (Rbps < 1.0e-3) begin
- Grbps = 1.0e3;
- end else begin
- Grbps = GBMIN + 1.0 / Rbps;
- end
- if (Rbpd < 1.0e-3) begin
- Grbpd = 1.0e3;
- end else begin
- Grbpd = GBMIN + 1.0 / Rbpd;
- end
- end else if (RBODYMOD == 2 && Bodymode == 1) begin
- Grbdb = GBMIN;
- Grbsb = GBMIN;
- Grbps = 1.0e3;
- Grbpd = 1.0e3;
- if (Rbpb < 1.0e-3) begin
- Grbpb = 1.0e3;
- end else begin
- Grbpb = GBMIN + 1.0 / Rbpb;
- end
- end
- end
-
- // Gate process resistance
- Grgeltd = RSHG * (XGW + Weffcj / 3.0 / NGCON) / (NGCON * NF * (Lnew - XGL));
- if (Grgeltd > 0.0) begin
- Grgeltd = 1.0 / Grgeltd;
- end else begin
- Grgeltd = 1.0e3;
- if (RGATEMOD != 0) begin
- `STROBE("Warning: (instance BSIMBULK) The gate conductance reset to 1.0e3 mho.");
- end
- end
- T0y = TOXE * TOXE;
- T1y = TOXE * POXEDGE_i;
- T2y = T1y * T1y;
- ToxRatio = lexp(NTOX_i * lln(TOXREF / TOXE)) / T0y;
- ToxRatioEdge = lexp(NTOX_i * lln(TOXREF / T1y)) / T2y;
- Aechvb = (TYPE == `ntype) ? 4.97232e-7 : 3.42537e-7;
- Bechvb = (TYPE == `ntype) ? 7.45669e11 : 1.16645e12;
- AechvbEdge = Aechvb * Weff * ToxRatioEdge;
- BechvbEdge = -Bechvb * TOXE * POXEDGE_i;
- Aechvb = Aechvb * (Weff * Leff * ToxRatio);
- Bechvb = -Bechvb * TOXE;
- Weff_SH = WTH0 + Weff;
-
- // Parameters for self-heating
- if((SHMOD != 0) && (RTH0 > 0.0) && (Weff_SH > 0.0)) begin
- gth = Weff_SH * NF / RTH0;
- cth = CTH0 * Weff_SH * NF;
- end else begin
- // set gth to some value to prevent a singular G matrix
- gth = 1.0;
- cth = 0.0;
- end
-
- // Temperature Dependent Calculations Begin Here
- if (TNOM <= -`P_CELSIUS0) begin
- T0 = `REFTEMP - `P_CELSIUS0;
- $strobe("Warning: TNOM = %e C <= %e C. Setting TNOM to %e C.", TNOM, -`P_CELSIUS0, T0);
- Tnom = `REFTEMP;
- end else begin
- Tnom = TNOM + `P_CELSIUS0;
- end
- DevTemp = $temperature + DTEMP;
-
- // Calculate temperature dependent values for self-heating effect
- if ((SHMOD != 0) && (RTH0 > 0.0) && (Weff_SH > 0.0)) begin
- delTemp1 = Temp(t);
- end else begin
- delTemp1 = 0.0;
- end
- DevTemp = delTemp1 + DevTemp;
- T_DELTA_SH = Temp(t);
- T_TOTAL_K = DevTemp;
- T_TOTAL_C = DevTemp - `P_CELSIUS0;
- Vt = `KboQ * DevTemp;
- inv_Vt = 1.0 / Vt;
- TRatio = DevTemp / Tnom;
- delTemp = DevTemp - Tnom;
- Vtm = `KboQ * DevTemp;
- Vtm0 = `KboQ * Tnom;
- Eg = BG0SUB - TBGASUB * DevTemp * DevTemp / (DevTemp + TBGBSUB);
- Eg0 = BG0SUB - TBGASUB * Tnom * Tnom / (Tnom + TBGBSUB);
- T1 = (DevTemp / Tnom) * sqrt(DevTemp / Tnom);
- ni = NI0SUB * T1 * lexp(Eg / (2.0 * Vtm0) - Eg / (2.0 * Vtm));
- if ((SHMOD != 0) && (RTH0 > 0.0) && (Weff_SH > 0.0)) begin
- T0 = lln(NDEP_i / ni);
- phib = sqrt(T0 * T0 + 1.0e-6);
- end else begin
- phib = lln(NDEP_i / ni);
- end
- if ((SHMOD != 0) && (RTH0 > 0.0) && (Weff_SH > 0.0)) begin
- T0 = lln(NDEP_i * NSD_i / (ni * ni));
- Vbi = sqrt(T0 * T0 + 1.0e-6);
- end else begin
- Vbi = lln(NDEP_i * NSD_i / (ni * ni));
- end
- if (NGATE_i > 0.0) begin
- Vfbsdr = -devsign * Vt * lln(NGATE_i / NSD_i) + VFBSDOFF;
- end else begin
- Vfbsdr = 0.0;
- end
-
- // Short channel effects
- Phist = max(0.4 + Vt * phib + PHIN_i, 0.4);
- sqrtPhist = sqrt(Phist);
- T1DEP = sqrt(2.0 * epssi / (`q * NDEP_i));
- litl = sqrt((epssi / epsox) * TOXE * XJ_i);
- NFACTOR_t = NFACTOR_i * hypsmooth((1.0 + TNFACTOR * (TRatio - 1.0)), 1e-3);
- ETA0_t = ETA0_i * (1.0 + TETA0 * (TRatio - 1.0));
- if (ASYMMOD != 0) begin
- ETA0R_t = ETA0R_i * (1.0 + TETA0 * (TRatio - 1.0));
- end
-
- // Mobility degradation
- eta_mu = (TYPE != `ntype) ? (`Oneby3 * ETAMOB) : (0.5 * ETAMOB);
- U0_t = U0_i * pow(TRatio, UTE_i);
- UA_t = UA_i * hypsmooth(1.0 + UA1_i * delTemp - 1.0e-6, 1.0e-3);
- UC_t = UC_i * hypsmooth(1.0 + UC1_i * delTemp - 1.0e-6, 1.0e-3);
- UD_t = UD_i * pow(TRatio, UD1_i);
- UCS_t = UCS_i * pow(TRatio, UCSTE_i);
- if (ASYMMOD != 0) begin
- U0R_t = U0R_i * pow(TRatio, UTE_i);
- UAR_t = UAR_i * hypsmooth(1.0 + UA1_i * delTemp - 1.0e-6, 1.0e-3);
- UCR_t = UCR_i * hypsmooth(1.0 + UC1_i * delTemp - 1.0e-6, 1.0e-3);
- UDR_t = UDR_i * pow(TRatio, UD1_i);
- UCSR_t = UCSR_i * pow(TRatio, UCSTE_i);
- end
- rdstemp = pow(TRatio, PRT_i);
- VSAT_t = VSAT_i * pow(TRatio, -AT_i);
- if (VSAT_t < 100.0) begin
- $strobe("Warning: VSAT(%f) = %e is less than 100, setting it to 100.", DevTemp, VSAT_t);
- VSAT_t = 100.0;
- end
- if (ASYMMOD != 0) begin
- VSATR_t = VSATR_i * pow(TRatio, -AT_i);
- if (VSATR_t < 100.0) begin
- $strobe("Warning: VSATR(%f) = %e is less than 100, setting it to 100.", DevTemp, VSATR_t);
- VSATR_t = 100.0;
- end
- end
- VSATCV_t = VSATCV_i * pow(TRatio, -AT_i);
- if (VSATCV_t < 100.0) begin
- $strobe("Warning: VSATCV(%f) = %e is less than 100, setting it to 100.", DevTemp, VSATCV_t);
- VSATCV_t = 100.0;
- end
- DELTA_t = 1.0 / ( hypsmooth((1.0 / DELTA_i) * (1.0 + TDELTA * delTemp) - 2.0 , 1.0e-3) + 2.0);
- PTWG_t = PTWG_i * hypsmooth(1.0 - PTWGT_i * delTemp - 1.0e-6, 1.0e-3);
- if (ASYMMOD != 0) begin
- PTWGR_t = PTWGR_i * hypsmooth(1.0 - PTWGT_i * delTemp - 1.0e-6, 1.0e-3);
- end
- A1_t = A1_i * hypsmooth(1.0 + A11_i * delTemp - 1.0e-6, 1.0e-3);
- A2_t = A2_i * hypsmooth(1.0 + A21_i * delTemp - 1.0e-6, 1.0e-3);
- BETA0_t = BETA0_i * pow(TRatio, IIT_i);
- BGIDL_t = BGIDL_i * hypsmooth(1.0 + TGIDL_i * delTemp - 1.0e-6, 1.0e-3);
- BGISL_t = BGISL_i * hypsmooth(1.0 + TGIDL_i * delTemp - 1.0e-6, 1.0e-3);
- igtemp = lexp(IGT_i * lln(TRatio));
- K0_t = K0_i * hypsmooth(1.0 + K01_i * delTemp - 1.0e-6, 1.0e-3);
- M0_t = M0_i * hypsmooth(1.0 + M01_i * delTemp - 1.0e-6, 1.0e-3);
-
- // Diode Model temperature Code Start
- CJS_t = CJS * hypsmooth(1.0 + TCJ * delTemp - 1.0e-6, 1.0e-3);
- CJD_t = CJD * hypsmooth(1.0 + TCJ * delTemp - 1.0e-6, 1.0e-3);
- CJSWS_t = CJSWS * hypsmooth(1.0 + TCJSW * delTemp - 1.0e-6, 1.0e-3);
- CJSWD_t = CJSWD * hypsmooth(1.0 + TCJSW * delTemp - 1.0e-6, 1.0e-3);
- CJSWGS_t = CJSWGS * hypsmooth(1.0 + TCJSWG * delTemp - 1.0e-6, 1.0e-3);
- CJSWGD_t = CJSWGD * hypsmooth(1.0 + TCJSWG * delTemp - 1.0e-6, 1.0e-3);
- PBS_t = hypsmooth(PBS - TPB * delTemp - 0.01, 1.0e-3) + 0.01;
- PBD_t = hypsmooth(PBD - TPB * delTemp - 0.01, 1.0e-3) + 0.01;
- PBSWS_t = hypsmooth(PBSWS - TPBSW * delTemp - 0.01, 1.0e-3) + 0.01;
- PBSWD_t = hypsmooth(PBSWD - TPBSW * delTemp - 0.01, 1.0e-3) + 0.01;
- PBSWGS_t = hypsmooth(PBSWGS - TPBSWG * delTemp - 0.01, 1.0e-3) + 0.01;
- PBSWGD_t = hypsmooth(PBSWGD - TPBSWG * delTemp - 0.01, 1.0e-3) + 0.01;
- T0 = Eg0 / Vtm0 - Eg / Vtm;
- T1 = lln(TRatio);
- T3 = lexp((T0 + XTIS * T1) / NJS);
- JSS_t = JSS * T3;
- JSWS_t = JSWS * T3;
- JSWGS_t = JSWGS * T3;
- T3 = lexp((T0 + XTID * T1) / NJD);
- JSD_t = JSD * T3;
- JSWD_t = JSWD * T3;
- JSWGD_t = JSWGD * T3;
- JTSS_t = JTSS * lexp(Eg0 * XTSS * (TRatio - 1.0) / Vtm);
- JTSSWS_t = JTSSWS * lexp(Eg0 * XTSSWS * (TRatio - 1.0) / Vtm);
- JTSSWGS_t = JTSSWGS * (sqrt(JTWEFF / Weffcj) + 1.0) * lexp(Eg0 * XTSSWGS * (TRatio - 1) / Vtm);
- JTSD_t = JTSD * lexp(Eg0 * XTSD * (TRatio - 1.0) / Vtm);
- JTSSWD_t = JTSSWD * lexp(Eg0 * XTSSWD * (TRatio - 1.0) / Vtm);
- JTSSWGD_t = JTSSWGD * (sqrt(JTWEFF / Weffcj) + 1.0) * lexp(Eg0 * XTSSWGD * (TRatio - 1) / Vtm);
-
- // All NJT*'s smoothed to 0.01 to prevent divide by zero / negative values
- NJTS_t = hypsmooth(NJTS * (1.0 + TNJTS * (TRatio - 1.0)) - 0.01, 1.0e-3) + 0.01;
- NJTSSW_t = hypsmooth(NJTSSW * (1.0 + TNJTSSW * (TRatio - 1.0)) - 0.01, 1.0e-3) + 0.01;
- NJTSSWG_t = hypsmooth(NJTSSWG * (1.0 + TNJTSSWG * (TRatio - 1.0)) - 0.01, 1.0e-3) + 0.01;
- NJTSD_t = hypsmooth(NJTSD * (1.0 + TNJTSD * (TRatio - 1.0)) - 0.01, 1.0e-3) + 0.01;
- NJTSSWD_t = hypsmooth(NJTSSWD * (1.0 + TNJTSSWD * (TRatio - 1.0)) - 0.01, 1.0e-3) + 0.01;
- NJTSSWGD_t = hypsmooth(NJTSSWGD * (1.0 + TNJTSSWGD * (TRatio - 1.0)) - 0.01, 1.0e-3) + 0.01;
-
- // Effective Source/Drain junction area and perimeter
- `BSIMBULKPAeffGeo(NF, GEOMOD, MINZ, Weffcj, DMCGeff, DMCIeff, DMDGeff, temp_PSeff, temp_PDeff, temp_ASeff, temp_ADeff)
- if ($param_given(AS)) begin
- ASeff = AS * WMLT * LMLT;
- end else begin
- ASeff = temp_ASeff;
- end
- if (ASeff < 0.0) begin
- $strobe("Warning: (instance BSIMBULK) ASeff = %e is negative, set to zero.", ASeff);
- ASeff = 0.0;
- end
- if ($param_given(AD)) begin
- ADeff = AD * WMLT * LMLT;
- end else begin
- ADeff = temp_ADeff;
- end
- if (ADeff < 0.0) begin
- $strobe("Warning: (instance BSIMBULK) ADeff = %e is negative, set to zero.", ADeff);
- ADeff = 0.0;
- end
- if ($param_given(PS)) begin
- if (PERMOD == 0) begin
- // PS does not include gate-edge perimeter
- PSeff = PS * WMLT;
- end else begin
- // PS includes gate-edge perimeter
- PSeff = max(PS * WMLT - Weffcj * NF, 0.0);
- end
- end else begin
- PSeff = temp_PSeff;
- if (PSeff < 0.0) begin
- $strobe("Warning: (instance BSIMBULK) PSeff = %e is negative.Set to 0.0", PSeff);
- PSeff = 0.0;
- end
- end
- if ($param_given(PD)) begin
- if (PERMOD == 0) begin
- // PD does not include gate-edge perimeter
- PDeff = PD * WMLT;
- end else begin
- // PD includes gate-edge perimeter
- PDeff = max(PD * WMLT - Weffcj * NF, 0.0);
- end
- end else begin
- PDeff = temp_PDeff;
- if (PDeff < 0.0) begin
- $strobe("Warning: (instance BSIMBULK) PDeff = %e is negative.Set to 0.0", PDeff);
- PDeff = 0.0;
- end
- end
- Isbs = ASeff * JSS_t + PSeff * JSWS_t + Weffcj * NF * JSWGS_t;
- if (Isbs > 0.0) begin
- Nvtms = Vtm * NJS;
- XExpBVS = lexp(-BVS / Nvtms) * XJBVS;
- T2 = max(IJTHSFWD / Isbs, 10.0);
- Tb = 1.0 + T2 - XExpBVS;
- VjsmFwd = Nvtms * lln(0.5 * (Tb + sqrt(Tb * Tb + 4.0 * XExpBVS)));
- T0 = lexp(VjsmFwd / Nvtms);
- IVjsmFwd = Isbs * (T0 - XExpBVS / T0 + XExpBVS - 1.0);
- SslpFwd = Isbs * (T0 + XExpBVS / T0) / Nvtms;
- T2 = hypsmooth(IJTHSREV / Isbs - 10.0, 1.0e-3) + 10.0;
- VjsmRev = -BVS - Nvtms * lln((T2 - 1.0) / XJBVS);
- T1 = XJBVS * lexp(-(BVS + VjsmRev) / Nvtms);
- IVjsmRev = Isbs * (1.0 + T1);
- SslpRev = -Isbs * T1 / Nvtms;
- end else begin
- Nvtms = 0.0;
- XExpBVS = 0.0;
- VjsmFwd = 0.0;
- IVjsmFwd = 0.0;
- SslpFwd = 0.0;
- VjsmRev = 0.0;
- IVjsmRev = 0.0;
- SslpRev = 0.0;
- end
-
- // Drain-side junction current
- Isbd = ADeff * JSD_t + PDeff * JSWD_t + Weffcj * NF * JSWGD_t;
- if (Isbd > 0.0) begin
- Nvtmd = Vtm * NJD;
- XExpBVD = lexp(-BVD / Nvtmd) * XJBVD;
- T2 = max(IJTHDFWD / Isbd, 10.0);
- Tb = 1.0 + T2 - XExpBVD;
- VjdmFwd = Nvtmd * lln(0.5 * (Tb + sqrt(Tb * Tb + 4.0 * XExpBVD)));
- T0 = lexp(VjdmFwd / Nvtmd);
- IVjdmFwd = Isbd * (T0 - XExpBVD / T0 + XExpBVD - 1.0);
- DslpFwd = Isbd * (T0 + XExpBVD / T0) / Nvtmd;
- T2 = hypsmooth(IJTHDREV / Isbd - 10.0, 1.0e-3) + 10.0;
- VjdmRev = -BVD - Nvtmd * lln((T2 - 1.0) / XJBVD);
- T1 = XJBVD * lexp(-(BVD + VjdmRev) / Nvtmd);
- IVjdmRev = Isbd * (1.0 + T1);
- DslpRev = -Isbd * T1 / Nvtmd;
- end else begin
- Nvtmd = 0.0;
- XExpBVD = 0.0;
- VjdmFwd = 0.0;
- IVjdmFwd = 0.0;
- DslpFwd = 0.0;
- VjdmRev = 0.0;
- IVjdmRev = 0.0;
- DslpRev = 0.0;
- end
-
- // STI stress equations
- if((SA > 0.0) && (SB > 0.0) && ((NF == 1.0) || ((NF > 1.0) && (SD > 0.0)))) begin
- T0 = pow(Lnew, LLODKU0);
- W_tmp_stress = Wnew + WLOD;
- T1 = pow(W_tmp_stress, WLODKU0);
- tmp1_stress = LKU0 / T0 + WKU0 / T1 + PKU0 / (T0 * T1);
- kstress_u0 = 1.0 + tmp1_stress;
- T0 = pow(Lnew, LLODVTH);
- T1 = pow(W_tmp_stress, WLODVTH);
- tmp1_stress_vth = LKVTH0 / T0 + WKVTH0 / T1 + PKVTH0 / (T0 * T1);
- kstress_vth0 = 1.0 + tmp1_stress_vth;
- T0 = TRatio - 1.0;
- ku0_temp = kstress_u0 * (1.0 + TKU0 * T0) + 1.0e-9;
- i = 0;
- while (i < NF) begin
- T0 = 1.0 / NF / (SA + 0.5 * L_mult + i * (SD + L_mult));
- T1 = 1.0 / NF / (SB + 0.5 * L_mult + i * (SD + L_mult));
- Inv_sa = Inv_sa + T0;
- Inv_sb = Inv_sb + T1;
- i = i + 1;
- end
- Inv_saref = 1.0 / (SAREF + 0.5 * L_mult);
- Inv_sbref = 1.0 / (SBREF + 0.5 * L_mult);
- Inv_odref = Inv_saref + Inv_sbref;
- rho_ref = (KU0 / ku0_temp) * Inv_odref;
- Inv_od = Inv_sa + Inv_sb;
- rho = (KU0 / ku0_temp) * Inv_od;
- mu0_mult = (1.0 + rho) / (1.0 + rho_ref);
- vsat_mult = (1.0 + rho * KVSAT) / (1.0 + rho_ref * KVSAT);
- vth0_stress = (KVTH0 / kstress_vth0) * (Inv_od - Inv_odref);
- k2_stress = (STK2 / pow(kstress_vth0, LODK2)) * (Inv_od - Inv_odref);
- eta_stress = (STETA0 / pow(kstress_vth0, LODETA0)) * (Inv_od - Inv_odref);
- U0_t = U0_t * mu0_mult;
- VSAT_t = VSAT_t * vsat_mult;
- K2_i = K2_i + k2_stress;
- ETA0_t = ETA0_t + eta_stress;
- if (EDGEFET == 1) begin
- vth0_stress_EDGE = (KVTH0EDGE_i / kstress_vth0) * (Inv_od - Inv_odref);
- k2_stress_EDGE = (STK2EDGE_i / pow(kstress_vth0, LODK2)) * (Inv_od - Inv_odref);
- eta_stress_EDGE = (STETA0EDGE_i / pow(kstress_vth0, LODETA0)) * (Inv_od - Inv_odref);
- end
- K2_EDGE = K2EDGE_i + k2_stress_EDGE;
- ETA0_EDGE = ETA0EDGE_i + eta_stress_EDGE;
- end else begin
- vth0_stress = 0.0;
- vth0_stress_EDGE = 0.0;
- end
-
- // Well proximity effect
- if (WPEMOD == 1) begin
- Wdrn = W / NF;
- local_sca = SCA;
- local_scb = SCB;
- local_scc = SCC;
- if (!$param_given(SCA) && !$param_given(SCB) && !$param_given(SCC)) begin
- if($param_given(SC) && SC > 0.0) begin
- T1 = SC + Wdrn;
- T2 = 1.0 / SCREF;
- local_sca = SCREF * SCREF / (SC * T1);
- local_scb = ((0.1 * SC + 0.01 * SCREF) * lexp(-10.0 * SC * T2) - (0.1 * T1 + 0.01 * SCREF) *
- lexp(-10.0 * T1 * T2)) / Wdrn;
- local_scc = ((0.05 * SC + 0.0025 * SCREF) * lexp(-20.0 * SC * T2) - (0.05 * T1 + 0.0025 * SCREF) *
- lexp(-20.0 * T1 * T2)) / Wdrn;
- end else begin
- `STROBE("Warning: (Instance BSIMBULK) No WPE as none of SCA, SCB, SCC, SC is given and/or SC not positive.");
- end
- end
- end
- vth0_well = KVTH0WE_i * (local_sca + WEB * local_scb + WEC * local_scc);
- k2_well = K2WE_i * (local_sca + WEB * local_scb + WEC * local_scc);
- mu_well = 1.0 + KU0WE_i * (local_sca + WEB * local_scb + WEC * local_scc);
- U0_t = U0_t * mu_well;
- K2_i = K2_i + k2_well;
-
- // Load Terminal Voltages
- Vg = devsign * V(gi, bi);
- Vd = devsign * V(di, bi);
- Vs = devsign * V(si, bi);
- Vds = Vd - Vs;
- Vds_noswap = Vds;
- Vsb_noswap = Vs;
- Vdb_noswap = Vd;
- Vbs_jct = devsign * V(sbulk, si);
- Vbd_jct = devsign * V(dbulk, di);
- Vgd_noswap = Vg - Vd;
- Vgs_noswap = Vg - Vs;
- Vgd_ov_noswap = devsign * V(gm, di);
- Vgs_ov_noswap = devsign * V(gm, si);
-
- // Terminal voltage conditioning
- // Source-drain interchange
- sigvds = 1.0;
- if (Vds < 0.0) begin
- sigvds = -1.0;
- Vd = devsign * V(si, bi);
- Vs = devsign * V(di, bi);
- end
- Vds = Vd - Vs;
- T0 = AVDSX * Vds;
- if (T0 > `EXPL_THRESHOLD) begin
- T1 = T0;
- end else begin
- T1 = ln(1.0 + exp(T0));
- end
- Vdsx = ((2.0/AVDSX) * T1) - Vds - ((2.0/AVDSX) * ln(2.0));
- Vbsx = -(Vs + 0.5 * (Vds - Vdsx));
-
- // Asymmetry model
- T0 = tanh(0.6 * Vds_noswap / Vtm);
- wf = 0.5 + 0.5 * T0;
- wr = 1.0 - wf;
- if (ASYMMOD != 0) begin
- CDSCD_a = CDSCDR_i * wr + CDSCD_i * wf;
- ETA0_a = ETA0R_t * wr + ETA0_t * wf;
- PDIBLC_a = PDIBLCR_i * wr + PDIBLC_i * wf;
- PCLM_a = PCLMR_i * wr + PCLM_i * wf;
- PSAT_a = PSATR_i * wr + PSAT_i * wf;
- VSAT_a = VSATR_t * wr + VSAT_t * wf;
- PTWG_a = PTWGR_t * wr + PTWG_t * wf;
- U0_a = U0R_t * wr + U0_t * wf;
- UA_a = UAR_t * wr + UA_t * wf;
- UC_a = UCR_t * wr + UC_t * wf;
- UD_a = UDR_t * wr + UD_t * wf;
- UCS_a = UCSR_t * wr + UCS_t * wf;
- end else begin
- CDSCD_a = CDSCD_i;
- ETA0_a = ETA0_t;
- PDIBLC_a = PDIBLC_i;
- PCLM_a = PCLM_i;
- PSAT_a = PSAT_i;
- VSAT_a = VSAT_t;
- PTWG_a = PTWG_t;
- U0_a = U0_t;
- UA_a = UA_t;
- UC_a = UC_t;
- UD_a = UD_t;
- UCS_a = UCS_t;
- end
-
- // SCE, DIBL, SS degradation effects, Ref: BSIM4 Model
- `Smooth(Phist - Vbsx, 0.05, 0.1, PhistVbs)
- sqrtPhistVbs = sqrt(PhistVbs);
- Xdep = T1DEP * sqrtPhistVbs;
- Cdep = epssi / Xdep;
- cdsc = CIT_i + NFACTOR_t + CDSCD_a * Vdsx - CDSCB_i * Vbsx;
- T1 = 1.0 + cdsc/Cox;
- `Smooth(T1, 1, 0.05, n)
- nVt = n * Vt;
- inv_nVt = 1.0 / nVt;
-
- // Vth Shift for DIBL
- dVth_dibl = -(ETA0_a + ETAB_i * Vbsx) * Vdsx;
-
- // Vth shift with temperature
- dvth_temp = (KT1_i + KT1L / Leff + KT2_i * Vbsx) * (pow(TRatio, KT1EXP) - 1.0);
- `Smooth2(dVth_dibl, 0.0, 5.0e-5, dVth_dibl)
-
- // Vth Correction for Pocket Implant
- if (DVTP0_i > 0.0) begin
- T0 = -DVTP1_i * Vdsx;
- if (T0 < -`EXPL_THRESHOLD) begin
- T2 = `MIN_EXPL;
- end else begin
- T2 = lexp(T0);
- end
- T3 = Leff + DVTP0_i * (1.0 + T2);
- dVth_ldop = -nVt * lln(Leff / T3);
- end else begin
- dVth_ldop = 0.0;
- end
- T4 = DVTP5_i + DVTP2_i / pow(Leff, DVTP3_i);
- dVth_ldop = dVth_ldop - T4 * tanh(DVTP4_i * Vdsx);
-
- // Normalization of terminal and flatband voltage by nVt
- VFB_i = VFB_i + DELVTO;
- vg = Vg * inv_nVt;
- vs = Vs * inv_nVt;
- vfb = VFB_i * inv_nVt;
-
- // Compute dVth_VNUD with "first-order" and "second-order" body-bias effect
- dVth_VNUD = K1_i * (sqrtPhistVbs - sqrtPhist) - K2_i * Vbsx;
- Vth_shift = dVth_dibl + dVth_ldop + dVth_VNUD - dvth_temp + vth0_stress + vth0_well;
- vgfb = vg - vfb - Vth_shift * inv_nVt;
-
- // Threshold voltage for operating point information
- gam = sqrt(2.0 * `q * epssi * NDEP_i * inv_Vt) / Cox;
- q_vth = 0.5;
- T0 = hypsmooth((2.0 * phib + Vs * inv_Vt), 1.0e-3);
- nq = 1.0 + gam / (2.0 * sqrt(T0));
- psip_th = hypsmooth((Vs * inv_Vt + 2.0 * phib + lln(q_vth) + 2.0 * q_vth + lln(2.0 * nq / gam * (2.0 * q_vth * nq / gam + 2.0 * sqrt(T0)))), 1.0e-3);
- VTH = devsign * (VFB_i + (psip_th - Vs * inv_Vt) * Vt + Vt * gam * sqrt(psip_th) + Vth_shift);
-
- // Normalized body factor
- gam = sqrt(2.0 * `q * epssi * NDEP_i * inv_nVt) / Cox;
- inv_gam = 1.0 / gam;
-
- // psip: pinch-off voltage
- phib_n = phib / n;
- `PO_psip(vgfb, gam, 0, phib_n, psip)
-
- // normalized inversion charge at source end of channel
- `BSIM_q(psip, phib_n, vs, gam, qs)
-
- // average charge-surf. pot. slope, Ref: Charge-based MOS Transistor Modeling by C. Enz & E. Vittoz
- `Smooth(psip, 1.0, 2.0, psipclamp)
- sqrtpsip = sqrt(psipclamp);
-
- // source side surf pot.
- psiavg = psip - 2.0 * qs;
- `Smooth(psiavg, 1.0, 2.0, T0)
- nq = 1.0 + gam / (sqrtpsip + sqrt(T0));
-
- // Drain Saturation Voltage
- EeffFactor = 1.0e-8 / (epsratio * TOXE);
- T0 = nVt * (vgfb - psip - 2.0 * qs * (nq - 1.0));
- `Smooth(T0, 0, 0.1, qbs)
-
- // Source side qi and qb for Vdsat- normalized to Cox
- qis = 2.0 * nq * nVt * qs;
- Eeffs = EeffFactor * (qbs + eta_mu * qis);
-
- // Ref: BSIM4 Model mobility model
- T2 = pow(0.5 * (1.0 + (qis / qbs)), UCS_a);
- T3 = (UA_a + UC_a * Vbsx) * pow(Eeffs, EU_i) + UD_a / T2;
- T4 = 1.0 + T3;
- `Smooth(T4, 1.0, 0.0015, Dmobs)
- WeffWRFactor = 1.0 / (pow(Weff * 1.0e6, WR_i) * NF);
-
- if (RDSMOD == 1) begin
- Rdss = 0.0;
- end else begin
- T0 = 1.0 + PRWG_i * qis;
- T1 = PRWB_i * (sqrtPhistVbs - sqrtPhist);
- T2 = 1.0 / T0 + T1;
- T3 = T2 + sqrt(T2 * T2 + 0.01);
- Rdss = (RDSWMIN_i + RDSW_i * T3) * WeffWRFactor * NF * rdstemp;
- if (RDSMOD == 2) begin
- Rdss = (RSourceGeo + (RDSWMIN_i + RDSW_i * T3) * WeffWRFactor * NF + RDrainGeo) * rdstemp;
- end
- end
- T0 = pow(Dmobs, 1.0 / PSAT_a);
- if (PSATB_i < 0.0) begin
- T1 = 1.0 / (1.0 + PSATB_i * Vbsx);
- end else begin
- T1 = 1.0 - PSATB_i * Vbsx;
- end
- T2 = 10.0 * PSATX * qs * T1 / (10.0 * PSATX + qs * T1);
- if (PTWG_a < 0.0) begin
- LambdaC = 2.0 * ((U0_a / T0) * nVt / (VSAT_a * Leff)) * (1.0 / (1.0 - PTWG_a * T2));
- end else begin
- LambdaC = 2.0 * ((U0_a / T0) * nVt / (VSAT_a * Leff)) * (1.0 + PTWG_a * T2);
- end
-
- // qdsat for external Rds
- if (Rdss == 0) begin
- // Accurate qdsat derived from consistent I-V
- T0 = 0.5 * LambdaC * (qs * qs + qs) / (1.0 + 0.5 * LambdaC * (1.0 + qs));
- T1 = 2.0 * LambdaC * (qs - T0);
- T2 = sqrt(1.0 + T1 * T1);
- ln_T1_T2 = asinh(T1);
- if (T1 != 0.0) begin
- T3 = T2 + (1.0 / T1) * ln_T1_T2;
- end else begin
- T3 = T2 + (1.0 / T2);
- end
- T4 = T0 * T3 - LambdaC * ((qs * qs + qs) - (T0 * T0 + T0));
- if (T1 != 0.0) begin
- T5 = -2.0 * LambdaC * (T1 * T2 - ln_T1_T2) / (T1 * T1);
- end else begin
- T5 = -2.0 * LambdaC * (T1/T2) * (T1/T2) *(T1/T2);
- end
- T6 = T0 * T5 + T3 + LambdaC * (2.0 * T0 + 1.0);
- T0 = T0 - (T4 / T6);
- T1 = 2.0 * LambdaC * (qs - T0);
- T2 = sqrt(1.0 + T1 * T1);
- ln_T1_T2 = asinh(T1);
- if (T1 != 0.0) begin
- T3 = T2 + (1.0 / T1) * ln_T1_T2;
- end else begin
- T3 = T2 + (1.0 / T2);
- end
- T4 = T0 * T3 - LambdaC * ((qs * qs + qs) - (T0 * T0 + T0));
- if (T1 != 0.0) begin
- T5 = -2.0 * LambdaC * (T1 * T2 - ln_T1_T2) / (T1 * T1);
- end else begin
- T5 = (T1 / T2) * (T1 / T2) * (T1 / T2);
- end
- T6 = T0 * T5 + T3 + LambdaC * (2.0 * T0 + 1.0);
- qdsat = T0 - (T4/T6);
- // qdsat for internal Rds, Ref: BSIM4 Model
- end else begin
- // Accurate qdsat derived from consistent I-V
- T11 = Weff * 2.0 * nq * Cox * nVt * VSAT_a;
- T12 = T11 * LambdaC * Rdss / (2.0 * nVt);
- T0 = 0.5 * LambdaC * (qs * qs + qs) / (1.0 + 0.5 * LambdaC * (1.0 + qs));
- T1 = 2.0 * LambdaC * (qs - T0);
- T2 = sqrt(1.0 + T1 * T1);
- ln_T1_T2 = asinh(T1);
- if (T1 != 0.0) begin
- T3 = T2 + (1.0 / T1) * ln_T1_T2;
- end else begin
- T3 = T2 + (1.0 / T2);
- end
- T4 = T0 * T3 + T12 * T0 * (qs + T0 + 1.0) - LambdaC * ((qs * qs + qs) - (T0 * T0 + T0));
- if (T1 != 0.0) begin
- T5 = -2.0 * LambdaC * (T1 * T2 - ln_T1_T2) / (T1 * T1);
- end else begin
- T5 = -2.0 * LambdaC * (T1 / T2) * (T1 / T2) * (T1 / T2);
- end
- T6 = T0 * T5 + T3 + T12 * (qs + 2.0 * T0 + 1.0) + LambdaC * (2.0 * T0 + 1.0);
- T0 = T0 - T4 / T6;
- T1 = 2.0 * LambdaC * (qs - T0);
- T2 = sqrt(1.0 + T1 * T1);
- ln_T1_T2 = asinh(T1);
- if (T1 != 0) begin
- T3 = T2 + (1.0 / T1) * ln_T1_T2;
- end else begin
- T3 = T2 + (1.0 / T2);
- end
- T4 = T0 * T3 + T12 * T0 * (qs + T0 + 1.0) - LambdaC * ((qs * qs + qs) - (T0 * T0 + T0));
- if (T1 != 0.0) begin
- T5 = -2.0 * LambdaC * (T1 * T2 - ln_T1_T2) / (T1 * T1);
- end else begin
- T5 = -2.0 * LambdaC * (T1 / T2) * (T1 / T2) * (T1 / T2);
- end
- T6 = T0 * T5 + T3 + T12 * (qs + 2.0 * T0 + 1.0) + LambdaC * (2.0 * T0 + 1.0);
- qdsat = T0 - T4 / T6;
- end
- vdsat = psip - 2.0 * phib_n - (2.0 * qdsat + lln((qdsat * 2.0 * nq * inv_gam) * ((qdsat * 2.0 * nq * inv_gam) + (gam / (nq - 1.0)))));
- Vdsat = vdsat * nVt;
-
- // normalized charge qdeff at drain end of channel
- // Vdssat clamped to avoid negative values during transient simulation
- `Smooth(Vdsat - Vs, 0.0, 1.0e-3, Vdssat)
- T7 = pow(Vds / Vdssat , 1.0 / DELTA_t);
- T8 = pow(1.0 + T7, -DELTA_t);
- Vdseff = Vds * T8;
- vdeff = (Vdseff + Vs) * inv_nVt;
- `BSIM_q(psip, phib_n, vdeff, gam, qdeff)
-
- // Reevaluation of nq to include qdeff
- psiavg = psip - qs - qdeff -1.0;
- `Smooth(psiavg, 1.0, 2.0, T0)
- T2 = sqrt(T0);
- nq = 1.0 + gam / (sqrtpsip + T2);
-
- // Inversion and bulk charge
- DQSD2 = (qs - qdeff) * (qs - qdeff);
- T0 = 1.0 / (1.0 + qs + qdeff);
- T1 = DQSD2 * T0;
- Qb = vgfb - psip - (nq - 1.0) * (qs + qdeff + `Oneby3 * T1);
- T2 = `Oneby3 * nq;
- T3 = T1 * T0;
- Qs = T2 * (2.0 * qs + qdeff + 0.5 * (1.0 + 0.8 * qs + 1.2 * qdeff) * T3);
- Qd = T2 * (qs + 2.0 * qdeff + 0.5 * (1.0 + 1.2 * qs + 0.8 * qdeff) * T3);
-
- // Mobility degradation, Ref: BSIM4
- // Average charges (qba and qia) - normalized to Cox
- `Smooth(nVt * Qb, 0, 0.1, qba)
- qia = nVt * (Qs + Qd);
-
- Eeffm = EeffFactor * (qba + eta_mu * qia);
- T2 = pow(0.5 * (1.0 + (qia / qba)), UCS_a);
- T3 = (UA_a + UC_a * Vbsx) * pow(Eeffm, EU_i) + UD_a / T2;
- T4 = 1.0 + T3;
- `Smooth(T4, 1.0, 0.0015, Dmob)
-
- // Output conductance
- Esat = 2.0 * VSAT_a / (U0_a / Dmob);
- EsatL = Esat * Leff;
- if (PVAG_i > 0.0) begin
- PVAGfactor = 1.0 + PVAG_i * qia / EsatL;
- end else begin
- PVAGfactor = 1.0 / (1.0 - PVAG_i * qia / EsatL);
- end
-
- // Output conductance due to DIBL, Ref: BSIM4
- DIBLfactor = PDIBLC_a;
- diffVds = Vds - Vdseff;
- Vgst2Vtm = qia + 2.0 * nVt;
- if (DIBLfactor > 0.0) begin
- T3 = Vgst2Vtm / (Vdssat + Vgst2Vtm);
- T4 = hypsmooth((1.0 + PDIBLCB_i * Vbsx), 1.0e-3);
- T5 = 1.0 / T4;
- VaDIBL = Vgst2Vtm / DIBLfactor * T3 * PVAGfactor * T5;
- Moc = 1.0 + diffVds / VaDIBL;
- end else begin
- Moc = 1.0;
- end
-
- // Degradation factor due to pocket implant, Ref: BSIM4 Model
- if (FPROUT_i <= 0.0) begin
- Fp = 1.0;
- end else begin
- T9 = FPROUT_i * sqrt(Leff) / Vgst2Vtm;
- Fp = 1.0 / (1.0 + T9);
- end
-
- // Channel length modulation, Ref: BSIM4 Model
- Vasat = Vdssat + EsatL;
- if (PCLM_a != 0.0) begin
- if (PCLMG < 0.0) begin
- T1 = PCLM_a / (1.0 - PCLMG * qia / EsatL) / Fp;
- end else begin
- T1 = PCLM_a * (1.0 + PCLMG * qia / EsatL) / Fp;
- end
- MdL = 1.0 + T1 * lln(1.0 + diffVds / T1 / Vasat);
- end else begin
- MdL = 1.0;
- end
- Moc = Moc * MdL;
-
- // Calculate Va_DITS, Ref: BSIM4
- T1 = lexp(PDITSD_i * Vds);
- if (PDITS_i > 0.0) begin
- T2 = 1.0 + PDITSL * Leff;
- VaDITS = (1.0 + T2 * T1) / PDITS_i;
- VaDITS = VaDITS * Fp;
- end else begin
- VaDITS = `MAX_EXPL;
- end
- T4 = diffVds / VaDITS;
- T0 = 1.0 + T4;
- Moc = Moc * T0;
-
- // Calculate Vascbe, Ref: BSIM4 Model
- if (PSCBE2_i > 0.0) begin
- if (diffVds > PSCBE1_i * litl / `EXPL_THRESHOLD) begin
- T0 = PSCBE1_i * litl / diffVds;
- VaSCBE = Leff * lexp(T0) / PSCBE2_i;
- end else begin
- VaSCBE = `MAX_EXPL * Leff/PSCBE2_i;
- end
- end else begin
- VaSCBE = `MAX_EXPL;
- end
- Mscbe = 1.0 + (diffVds / VaSCBE);
- Moc = Moc * Mscbe;
-
- // Velocity saturation
- T0 = pow(Dmob, 1.0 / PSAT_a);
- if (PSATB_i < 0.0) begin
- T1 = 1.0 / (1.0 + PSATB_i * Vbsx);
- end else begin
- T1 = 1.0 - PSATB_i * Vbsx;
- end
- T2 = 10.0 * PSATX * qia * T1 / (10.0 * PSATX + qia * T1);
- if (PTWG_a < 0.0) begin
- LambdaC = 2.0 * ((U0_a / T0) * nVt / (VSAT_a * Leff)) * (1.0 / (1.0 - PTWG_a * T2));
- end else begin
- LambdaC = 2.0 * ((U0_a / T0) * nVt / (VSAT_a * Leff)) * (1.0 + PTWG_a * T2);
- end
- T1 = 2.0 * LambdaC * (qs - qdeff);
- T2 = sqrt(1.0 + T1 * T1);
- if (T1 != 0.0) begin
- Dvsat = 0.5 * (T2 + (1.0 / T1) * asinh(T1));
- end else begin
- Dvsat = 0.5 * (T2 + (1.0 / T2));
- end
- Dptwg = Dvsat;
-
- // S/D Series Resistance, Ref: BSIM4
- Rsource = 0.0;
- Rdrain = 0.0;
- if (RDSMOD == 1) begin
- Rdsi = 0.0;
- Dr = 1.0;
- // Rs (Source side resistance for all fingers)
- T2 = Vgs_noswap - Vfbsdr;
- T3 = sqrt(T2 * T2 + 0.01);
- Vgs_eff = 0.5 * (T2 + T3);
- T5 = 1.0 + PRWG_i * Vgs_eff;
- T6 = (1.0 / T5) + PRWB_i * Vsb_noswap;
- T4 = 0.5 * (T6 + sqrt(T6 * T6 + 0.01));
- Rsource = rdstemp * (RSourceGeo + (RSWMIN_i + RSW_i * T4) * WeffWRFactor);
- // Rd (Drain side resistance for all fingers)
- T2 = Vgd_noswap - Vfbsdr;
- T3 = sqrt(T2 * T2 + 0.01);
- Vgd_eff = 0.5 * (T2 + T3);
- T5 = 1.0 + PRWG_i * Vgd_eff;
- T6 = (1.0 / T5) + PRWB_i * Vdb_noswap;
- T4 = 0.5 * (T6 + sqrt(T6 * T6 + 0.01));
- Rdrain = rdstemp * (RDrainGeo + (RDWMIN_i + RDW_i * T4) * WeffWRFactor);
- end else begin
- // Ref: (1) BSIM4 Model (2) "Operation and Modeling of the MOS Transistor" by Yannis Tsividis
- T0 = 1.0 + PRWG_i * qia;
- T1 = PRWB_i * (sqrtPhistVbs - sqrtPhist);
- T2 = 1.0 / T0 + T1;
- T3 = 0.5 * (T2 + sqrt(T2 * T2 + 0.01));
- Rdsi = rdstemp * (RDSWMIN_i + RDSW_i * T3) * WeffWRFactor * NF;
- Rdrain = RDrainGeo;
- Rsource = RSourceGeo;
- Dr = 1.0 + U0_a /(Dvsat * Dmob) * Cox * Weff / Leff * qia * Rdsi;
- if (RDSMOD == 2) begin
- Rdsi = rdstemp * (RSourceGeo + (RDSWMIN_i + RDSW_i * T3) * WeffWRFactor * NF + RDrainGeo);
- Rdrain = 0.0;
- Rsource = 0.0;
- Dr = 1.0 + U0_a /(Dvsat * Dmob) * Cox * Weff / Leff * qia * Rdsi;
- end
- end
-
- // Non-saturation effect
- T0 = A1_t + A2_t / (qia + 2.0 * n * Vtm);
- DQSD = qs - qdeff;
- T1 = T0 * DQSD * DQSD;
- T2 = T1 + 1.0 - 0.001;
- T3 = -1.0 + 0.5 * (T2 + sqrt(T2 * T2 + 0.004));
- Nsat = 0.5 * (1.0 + sqrt(1.0 + T3));
-
- // MNUD model to enhance Id-Vd fitting flexibility
- T0 = (qs + qdeff);
- T1 = (qs - qdeff);
- T2 = T1 / (T0 + M0_t);
- T3 = K0_t * T2 * T2;
- Mnud = 1.0 + T3;
- Dtot = Dmob * Dvsat * Dr;
-
- // Effective mobility including mobility degradation
- ueff = U0_a / Dtot;
-
- // I-V
- ids = 2.0 * NF * nq * ueff * Weff / Leff * Cox * nVt * nVt * ((qs - qdeff) * (1.0 + qs + qdeff)) * Moc / Nsat * Mnud;
- ids = ids * IDS0MULT;
- Gcrg = 0.0;
- if (RGATEMOD > 1) begin
- idsovvds = ueff * Weff / Leff * Cox * qia;
- T9 = XRCRG2 * Vt;
- T0 = T9 * ueff * Weff / Leff * Cox;
- Gcrg = XRCRG1 * NF * (T0 + idsovvds);
- if (RGATEMOD == 2) begin
- T11 = Grgeltd + Gcrg;
- Gcrg = Grgeltd * Gcrg / T11;
- end
- end
-
- // Impact ionization current, Ref: BSIM4
- if ((ALPHA0_i <= 0.0) || (BETA0_t <= 0.0)) begin
- Iii = 0.0;
- end else if (diffVds > BETA0_t / `EXPL_THRESHOLD) begin
- T1 = -BETA0_t / diffVds;
- Iii = ALPHA0_i * diffVds * ids * lexp(T1) / Mscbe;
- end else begin
- Iii = ALPHA0_i * diffVds * ids * `MIN_EXPL / Mscbe;
- end
- ISUB = Iii * devsign;
-
- // Gate Current, Ref: BSIM4 Model
- igbinv = 0.0;
- igbacc = 0.0;
- igb = 0.0;
- igcs = 0.0;
- igcd = 0.0;
- igs = 0.0;
- igd = 0.0;
- if ((IGCMOD != 0) || (IGBMOD != 0)) begin
- Voxm = nVt * (vgfb - psip + qs + qdeff);
- T1 = sqrt(Voxm * Voxm + 1.0e-4);
- Voxmacc = 0.5 * (-Voxm + T1);
- Voxminv = 0.5 * (Voxm + T1);
- // Igbinv
- if (IGBMOD != 0) begin
- T1 = Voxmacc / NIGBACC_i / Vt;
- Vaux_Igbacc = NIGBACC_i * Vt * lln(1.0 + lexp(-T1));
- T2 = AIGBACC_i - BIGBACC_i * Voxmacc;
- T3 = 1.0 + CIGBACC_i * Voxmacc;
- T4 = -7.45669e11 * TOXE * T2 * T3;
- T5 = lexp(T4);
- T6 = 4.97232e-7;
- igbacc = NF * Weff * Leff * T6 * ToxRatio * Vg * Vaux_Igbacc * T5;
- igbacc = igbacc * igtemp;
- T1 = (Voxminv - EIGBINV_i) / NIGBINV_i / Vt;
- Vaux_Igbinv = NIGBINV_i * Vt * lln(1.0 + lexp(T1));
- T2 = AIGBINV_i - BIGBINV_i * Voxminv;
- T3 = 1.0 + CIGBINV_i * Voxminv;
- T4 = -9.82222e11 * TOXE * T2 * T3;
- T5 = lexp (T4);
- T6 = 3.75956e-7;
- igbinv = NF * Weff * Leff * T6 * ToxRatio * Vg * Vaux_Igbinv * T5;
- igbinv = igbinv * igtemp;
- igb = igbacc + igbinv;
- end
-
- if (IGCMOD != 0) begin
- // Igcinv
- T1 = AIGC_i - BIGC_i * Voxminv;
- T2 = 1.0 + CIGC_i * Voxminv;
- T3 = Bechvb * T1 * T2;
- T4 = nq * nVt * (qs + qdeff) * lexp(T3);
- igc0 = NF * Aechvb * T4 * (Vg + 0.5 * Vdsx - 0.5 * (Vs + Vd)) * igtemp;
- // Gate-current partitioning
- Vdseffx = sqrt(Vdseff * Vdseff + 0.01) - 0.1;
- T1 = PIGCD_i * Vdseffx;
- T1_exp = lexp(-T1);
- T3 = T1 + T1_exp -1.0 + 1.0e-4;
- T4 = 1.0 - (T1 + 1.0) * T1_exp + 1.0e-4;
- T5 = T1 * T1 + 2.0e-4;
- if (sigvds > 0) begin
- igcd = igc0 * T4 / T5;
- igcs = igc0 * T3 / T5;
- end else begin
- igcs = igc0 * T4 / T5;
- igcd = igc0 * T3 / T5;
- end
- // Igs
- T2 = Vgs_noswap - Vfbsdr;
- Vgs_eff = sqrt(T2 * T2 + 1.0e-4);
- if (IGCLAMP == 1) begin
- T1 = hypsmooth((AIGS_i - BIGS_i * Vgs_eff), 1.0e-6);
- if (CIGS_i < 0.01) begin
- CIGS_i = 0.01;
- end
- end else begin
- T1 = AIGS_i - BIGS_i * Vgs_eff;
- end
- T2 = 1.0 + CIGS_i * Vgs_eff;
- T3 = BechvbEdge * T1 * T2;
- T4 = lexp(T3);
- igs_mult = igtemp * NF * AechvbEdge * DLCIG_i;
- igs = igs_mult * Vgs_noswap * Vgs_eff * T4;
- // Igd
- T2 = Vgd_noswap - Vfbsdr;
- Vgd_eff = sqrt(T2 * T2 + 1.0e-4);
- if (IGCLAMP == 1) begin
- T1 = hypsmooth((AIGD_i - BIGD_i * Vgd_eff), 1.0e-6);
- if (CIGD_i < 0.01) begin
- CIGD_i = 0.01;
- end
- end else begin
- T1 = AIGD_i - BIGD_i * Vgd_eff;
- end
- T2 = 1.0 + CIGD_i * Vgd_eff;
- T3 = BechvbEdge * T1 * T2;
- T4 = lexp(T3);
- igd_mult = igtemp * NF * AechvbEdge * DLCIGD_i;
- igd = igd_mult * Vgd_noswap * Vgd_eff * T4;
- end
- end
- IGS = devsign * igs;
- IGD = devsign * igd;
- IGB = devsign * igb;
- IGCS = devsign * igcs;
- IGCD = devsign * igcd;
-
- // GIDL and GISL Currents , Ref: BSIM4 Model
- igisl = 0.0;
- igidl = 0.0;
- if (GIDLMOD != 0) begin
- T0 = epsratio * TOXE;
- // GIDL
- if ((AGIDL_i <= 0.0) || (BGIDL_t <= 0.0) || (CGIDL_i < 0.0)) begin
- T6 = 0.0;
- end else begin
- T1 = (-Vgd_noswap - EGIDL_i + Vfbsdr) / T0;
- T1 = hypsmooth(T1, 1.0e-2);
- T2 = BGIDL_t / (T1 + 1.0e-3);
- if (CGIDL_i != 0.0) begin
- T3 = Vdb_noswap * Vdb_noswap * Vdb_noswap;
- T4 = CGIDL_i + abs(T3) + 1.0e-4;
- T5 = hypsmooth(T3 / T4, 1.0e-6) - 1.0e-6;
- end else begin
- T5 = 1.0;
- end
- T6 = AGIDL_i * Weff * T1 * lexp(-T2) * T5;
- end
- igidl = T6;
- // GISL
- if ((AGISL_i <= 0.0) || (BGISL_t <= 0.0) || (CGISL_i < 0.0)) begin
- T6 = 0.0;
- end else begin
- T1 = (-Vgs_noswap - EGISL_i + Vfbsdr) / T0;
- T1 = hypsmooth(T1, 1.0e-2);
- T2 = BGISL_t / (T1 + 1.0e-3);
- if (CGISL_i != 0.0) begin
- T3 = Vsb_noswap * Vsb_noswap * Vsb_noswap;
- T4 = CGISL_i + abs(T3) + 1.0e-4;
- T5 = hypsmooth(T3 / T4, 1.0e-6) - 1.0e-6;
- end else begin
- T5 = 1.0;
- end
- T6 = AGISL_i * Weff * T1 * lexp(-T2) * T5;
- end
- igisl = T6;
- end
- IGIDL = devsign * NF * igidl;
- IGISL = devsign * NF * igisl;
-
- // Junction current and capacitances
- // Source-side junction current
- if (Isbs > 0.0) begin
- if (Vbs_jct < VjsmRev) begin
- T0 = Vbs_jct / Nvtms;
- T1 = lexp(T0) - 1.0;
- T2 = IVjsmRev + SslpRev * (Vbs_jct - VjsmRev);
- Ibs = T1 * T2;
- end else if (Vbs_jct <= VjsmFwd) begin
- T0 = Vbs_jct / Nvtms;
- T1 = (BVS + Vbs_jct) / Nvtms;
- T2 = lexp(-T1);
- Ibs = Isbs * (lexp(T0) + XExpBVS - 1.0 - XJBVS * T2);
- end else begin
- Ibs = IVjsmFwd + SslpFwd * (Vbs_jct - VjsmFwd);
- end
- end else begin
- Ibs = 0.0;
- end
-
- //Source-side junction tunneling current
- if (JTSS_t > 0.0) begin
- if ((VTSS - Vbs_jct) < (VTSS * 1.0e-3)) begin
- T0 = -Vbs_jct / Vtm0 / NJTS_t;
- T1 = lexp(T0 * 1.0e3) - 1.0;
- Ibs = Ibs - ASeff * JTSS_t * T1;
- end else begin
- T0 = -Vbs_jct / Vtm0 / NJTS_t;
- T1 = lexp(T0 * VTSS / (VTSS - Vbs_jct)) - 1.0;
- Ibs = Ibs - ASeff * JTSS_t * T1;
- end
- end
- if (JTSSWS_t > 0.0) begin
- if ((VTSSWS - Vbs_jct) < (VTSSWS * 1.0e-3)) begin
- T0 = -Vbs_jct / Vtm0 / NJTSSW_t;
- T1 = lexp(T0 * 1.0e3) - 1.0;
- Ibs = Ibs - PSeff * JTSSWS_t * T1;
- end else begin
- T0 = -Vbs_jct / Vtm0 / NJTSSW_t;
- T1 = lexp(T0 * VTSSWS / (VTSSWS - Vbs_jct)) - 1.0;
- Ibs = Ibs - PSeff * JTSSWS_t * T1;
- end
- end
- if (JTSSWGS_t > 0.0) begin
- if((VTSSWGS - Vbs_jct) < (VTSSWGS * 1.0e-3)) begin
- T0 = -Vbs_jct / Vtm0 / NJTSSWG_t;
- T1 = lexp(T0 * 1.0e3) - 1.0;
- Ibs = Ibs - Weffcj * NF * JTSSWGS_t * T1;
- end else begin
- T0 = -Vbs_jct / Vtm0 / NJTSSWG_t;
- T1 = lexp(T0 * VTSSWGS / (VTSSWGS - Vbs_jct)) - 1.0;
- Ibs = Ibs - Weffcj * NF * JTSSWGS_t * T1;
- end
- end
-
- // Drain-side Junction Current
- if (Isbd > 0.0) begin
- if (Vbd_jct < VjdmRev) begin
- T0 = Vbd_jct / Nvtmd;
- T1 = lexp(T0) - 1.0;
- T2 = IVjdmRev + DslpRev * (Vbd_jct - VjdmRev);
- Ibd = T1 * T2;
- end else if (Vbd_jct <= VjdmFwd) begin
- T0 = Vbd_jct / Nvtmd;
- T1 = (BVD + Vbd_jct) / Nvtmd;
- T2 = lexp(-T1);
- Ibd = Isbd * (lexp(T0) + XExpBVD - 1.0 - XJBVD * T2);
- end else begin
- Ibd = IVjdmFwd + DslpFwd * (Vbd_jct - VjdmFwd);
- end
- end else begin
- Ibd = 0.0;
- end
-
- // Drain-side junction tunneling current
- if (JTSD_t > 0.0) begin
- if ((VTSD - Vbd_jct) < (VTSD * 1.0e-3)) begin
- T0 = -Vbd_jct / Vtm0 / NJTSD_t;
- T1 = lexp(T0 * 1.0e3) - 1.0;
- Ibd = Ibd - ADeff * JTSD_t * T1;
- end else begin
- T0 = -Vbd_jct / Vtm0 / NJTSD_t;
- T1 = lexp(T0 * VTSD/ (VTSD - Vbd_jct)) - 1.0;
- Ibd = Ibd - ADeff * JTSD_t * T1;
- end
- end
- if (JTSSWD_t > 0.0) begin
- if ((VTSSWD - Vbd_jct) < (VTSSWD * 1.0e-3)) begin
- T0 = -Vbd_jct / Vtm0 / NJTSSWD_t;
- T1 = lexp(T0 * 1.0e3) - 1.0;
- Ibd = Ibd - PDeff * JTSSWD_t * T1;
- end else begin
- T0 = -Vbd_jct / Vtm0 / NJTSSWD_t;
- T1 = lexp(T0 * VTSSWD / (VTSSWD - Vbd_jct)) - 1.0;
- Ibd = Ibd - PDeff * JTSSWD_t * T1;
- end
- end
- if (JTSSWGD_t > 0.0) begin
- if ((VTSSWGD - Vbd_jct) < (VTSSWGD * 1.0e-3)) begin
- T0 = -Vbd_jct / Vtm0 / NJTSSWGD_t;
- T1 = lexp(T0 * 1.0e3) - 1.0;
- Ibd = Ibd - Weffcj * NF * JTSSWGD_t * T1;
- end else begin
- T0 = -Vbd_jct / Vtm0 / NJTSSWGD_t;
- T1 = lexp(T0 * VTSSWGD / (VTSSWGD - Vbd_jct)) - 1.0;
- Ibd = Ibd - Weffcj * NF * JTSSWGD_t * T1;
- end
- end
-
- // Junction capacitance (no swapping)
- // Source Bulk Junction
- Czbs = CJS_t * ASeff;
- Czbssw = CJSWS_t * PSeff;
- Czbsswg = CJSWGS_t * Weffcj * NF;
- czbs_p1 = pow(0.1, -MJS);
- czbs_p2 = 1.0 / (1.0 - MJS) * (1.0 - 0.05 * MJS * (1.0 + MJS) * czbs_p1);
- czbssw_p1 = pow(0.1, -MJSWS);
- czbssw_p2 = 1.0 / (1.0 - MJSWS) * (1.0 - 0.05 * MJSWS * (1.0 + MJSWS) * czbssw_p1);
- czbsswg_p1 = pow(0.1, -MJSWGS);
- czbsswg_p2 = 1.0 / (1.0 - MJSWGS) * (1.0 - 0.05 * MJSWGS * (1.0 + MJSWGS) * czbsswg_p1);
- `JunCap(Czbs, Vbs_jct, PBS_t, MJS, czbs_p1, czbs_p2, Qbsj1)
- `JunCap(Czbssw, Vbs_jct, PBSWS_t, MJSWS, czbssw_p1, czbssw_p2, Qbsj2)
- `JunCap(Czbsswg, Vbs_jct, PBSWGS_t, MJSWGS, czbsswg_p1, czbsswg_p2, Qbsj3)
- Qbsj = Qbsj1 + Qbsj2 + Qbsj3;
-
- // Drain Bulk Junction
- Czbd = CJD_t * ADeff;
- Czbdsw = CJSWD_t * PDeff;
- Czbdswg = CJSWGD_t * Weffcj * NF;
- czbd_p1 = pow(0.1, -MJD);
- czbd_p2 = 1.0 / (1.0 - MJD) * (1.0 - 0.05 * MJD * (1.0 + MJD) * czbd_p1);
- czbdsw_p1 = pow(0.1, -MJSWD);
- czbdsw_p2 = 1.0 / (1.0 - MJSWD) * (1.0 - 0.05 * MJSWD * (1.0 + MJSWD) * czbdsw_p1);
- czbdswg_p1 = pow(0.1, -MJSWGD);
- czbdswg_p2 = 1.0 / (1.0 - MJSWGD) * (1.0 - 0.05 * MJSWGD * (1.0 + MJSWGD) * czbdswg_p1);
- `JunCap(Czbd, Vbd_jct, PBD_t, MJD, czbd_p1, czbd_p2, Qbdj1)
- `JunCap(Czbdsw, Vbd_jct, PBSWD_t, MJSWD, czbdsw_p1, czbdsw_p2, Qbdj2)
- `JunCap(Czbdswg, Vbd_jct, PBSWGD_t, MJSWGD, czbdswg_p1, czbdswg_p2, Qbdj3)
- Qbdj = Qbdj1 + Qbdj2 + Qbdj3;
-
- // Sub-Surface Leakage Drain Current
- if (SSLMOD != 0) begin
- T1 = pow(NDEP_i / 1.0e23, SSLEXP1);
- T2 = pow(300.0 / DevTemp, SSLEXP2);
- SSL0_NT = SSL0 * lexp(-T1 * T2);
- SSL1_NT = SSL1 * T2 * T1;
- PHIB_SSL = SSL3 * tanh(lexp(devsign * SSL4 * (V(g, b) - VTH)));
- Issl = sigvds * NF * Weff * SSL0_NT * lexp(-SSL1_NT * Leff) * lexp(PHIB_SSL / Vt) * (lexp(SSL2 * Vdsx / Vt) - 1.0);
- I(di, si) <+ Issl;
- end
-
- // Harshit's New Flicker Noise Model, Ref : H. Agarwal et. al., IEEE JEDS,Vol. 3, Issue 4, April 2015.
- Nt = 4.0 * Vt * `q;
- Esatnoi = 2.0 * VSAT_a / ueff;
- if (EM <= 0.0) begin
- DelClm = 0.0;
- end else begin
- T0 = (diffVds / litl + EM) / Esatnoi;
- DelClm = litl * lln(T0);
- if (DelClm < 0.0) begin
- DelClm = 0.0;
- end
- end
- Nstar = Vt / `q * (Cox + Cdep + CIT_i);
- Nl = 2.0 * nq * Cox * Vt * qdeff / `q;
- T0a = `q * `q * `q * Vt * abs(ids) * ueff;
- T0b = `q * Vt * ids * ids;
- T0c = NOIA + NOIB * Nl + NOIC * Nl * Nl;
- T0d = (Nl + Nstar) * (Nl + Nstar);
- T0e = NOIA * `q * Vt;
- if (FNOIMOD == 1) begin
- if (LINTNOI >= (Leff - LH) / 2.0) begin
- $strobe("Warning: LINTNOI = %e is too large - Leff for noise is negative. Re-setting LINTNOI = 0.", LINTNOI);
- LINTNOI_i = 0.0;
- end else begin
- LINTNOI_i = LINTNOI;
- end
- LeffnoiH = Leff;
- if (Leff < LH) begin
- LeffnoiH = LH;
- end
- vgfbh = (Vg - VFB_i) / Vt;
- gam_h = sqrt(2.0 * `q * epssi * HNDEP / Vt) / Cox;
- phib_h = ln(HNDEP / ni);
-
- // Pinch-Off potential for halo region
- `PO_psip(vgfbh, gam_h, 0, phib_h, psiph)
-
- // normalized inversion charge at source end of halo MOSFET
- `BSIM_q(psiph, phib_h, vs, gam_h, qsh)
- nq_h = 1.0 + gam_h / (2.0 * sqrt(psiph));
-
- // Setting mobility of Halo region equal to the mobility of the channel. In general, U0H 0.0) begin
- FNPowerAt1Hz_ch = (Ssi_ch * Swi_ch) / T7;
- end else begin
- FNPowerAt1Hz_ch = 0.0;
- end
- end else begin
- FNPowerAt1Hz_ch = 0.0;
- end
-
- // Halo transistor LNS
- T8 = NOIA2 * `q * Vt;
- T9 = Weff * NF * LH * 1.0e10 * Nstar * Nstar;
- Swi_h = T8 / T9 * ids * ids;
- T10 = Swi_h;
- if (T10 > 0.0) begin
- FNPowerAt1Hz_h = Swi_h;
- end else begin
- FNPowerAt1Hz_h = 0.0;
- end
-
- // Overall noise
- FNPowerAt1Hz = FNPowerAt1Hz_ch * CF_ch + FNPowerAt1Hz_h * CF_h;
- I(di, si) <+ flicker_noise(FNPowerAt1Hz, EF, "1overf");
- end else begin
- //Parameter checking
- if (LINTNOI >= Leff/2.0) begin
- $strobe("Warning: LINTNOI = %e is too large - Leff for noise is negative. Re-setting LINTNOI = 0.", LINTNOI);
- LINTNOI_i = 0.0;
- end else begin
- LINTNOI_i = LINTNOI;
- end
- if (NOIA > 0 || NOIB > 0 || NOIC > 0) begin
- Leffnoi = Leff - 2.0 * LINTNOI_i;
- Leffnoisq = Leffnoi * Leffnoi;
- T0 = 1.0e10 * Cox * Leffnoisq;
- N0 = 2.0 * nq * Cox * Vt * qs / `q;
- T1 = NOIA * lln((N0 + Nstar) / (Nl + Nstar));
- T2 = NOIB * (N0 - Nl);
- T3 = 0.5 * NOIC * (N0 * N0 - Nl * Nl);
- T4 = 1.0e10 * Leffnoisq * Weff * NF;
- Ssi = T0a / T0 * (T1 + T2 + T3) + T0b / T4 * DelClm * T0c / T0d;
- T5 = Weff * NF * Leffnoi * 1.0e10 * Nstar * Nstar;
- Swi = T0e / T5 * ids * ids;
- T6 = Swi + Ssi;
- if (T6 > 0.0) begin
- FNPowerAt1Hz = (Ssi * Swi) / T6;
- end else begin
- FNPowerAt1Hz = 0.0;
- end
- end else begin
- FNPowerAt1Hz = 0.0;
- end
- I(di, si) <+ flicker_noise(FNPowerAt1Hz, EF, "1overf");
- end
- T0 = qia / Esatnoi / Leff;
- T1 = T0 * T0;
- T3 = RNOIA * (1.0 + TNOIA * Leff * T1);
- T4 = RNOIB * (1.0 + TNOIB * Leff * T1);
- T5 = RNOIK * (1.0 + TNOIK * Leff * T1);
- ctnoi = RNOIC * (1.0 + TNOIC * Leff * T1);
- betanoisq = 3.0 * T3 * T3;
- betanoisq = (betanoisq - 1.0) * exp(-Leff / LP) + 1.0;
- betaLowId = T5 * T5;
- thetanoisq = T4 * T4;
- cm_igid = 0.0;
- case (TNOIMOD)
- 0: begin
- QSi = -NF * Weff * Leff * Cox * Vt * Qs;
- QDi = -NF * Weff * Leff * Cox * Vt * Qd;
- T0 = ueff * abs(QSi + QDi);
- T1 = T0 * Rdsi + Leff * Leff;
- Gtnoi = (T0 / T1) * NTNOI;
- sidn = Nt * Gtnoi;
- I(di, si) <+ white_noise(sidn, "id");
- V(N1) <+ 0.0;
- end
- 1: begin
- Vtn = 2.0 * nq * nVt;
- T0 = ueff * Dptwg * Moc * Cox * Vtn;
- T1 = 0.5 * (qs + qdeff);
- T3 = T1 + 0.5;
- T4 = T3 * T3;
- T5 = T4 * T3;
- T6 = qs - qdeff;
- T7 = T6 * T6;
- T8 = T7 * T6;
- T9 = (6.0 * T1 + 0.5) * T7;
- Lvsat = Leff * Dptwg;
- T10 = Lvsat / Leff;
- T12 = 1.0 + (betaLowId * (Vdseff / Vdssat) / (TNOIK2 + qia));
- T12 = ((T12 - 1.0) * exp(-Leff / LP)) + 1.0;
- `Smooth(T12, 0, 1.0e-1, T12)
- mid = T0 * NF * Weff / Lvsat * (T1 * T12 + T7 * betanoisq / (12.0 * T3));
- mig = Lvsat * T10 * T10 * (T1 / T4 - T9 / (60.0 * T4 * T4) + T7 * T7 / (144.0 * T4 * T5)) * 15.0 / 4.0 * thetanoisq / (NF * Weff * 12.0 * T0);
- migid = T10 * (T6 / (12.0 * T3) - T8 / (144.0 * T5)) * ctnoi / 0.395;
- sqid = sqrt(Nt * mid);
- if (mig == 0.0) begin
- sqig = 0.0;
- cm_igid = 0.0;
- end else begin
- sqig = sqrt(Nt / mig);
- if (sqid == 0.0) begin
- cm_igid = 0.0;
- end else begin
- cm_igid = migid * sqig / sqid;
- end
- end
- I(N2) <+ white_noise(cm_igid, "corl");
- I(NI) <+ white_noise(sqig * sqig * (1.0 - cm_igid), "corl");
- I(NI) <+ -sqig * V(N2);
- I(NC) <+ ddt(mig * Cox * Weff * NF * Leff * V(NC));
- I(di, si) <+ white_noise(sqid * sqid * (1.0 - cm_igid), "id");
- I(di, si) <+ sqid * V(N2);
- I(gi, si) <+ ddt(0.5 * ((1.0 + sigvds) * mig * Cox * Weff * NF * Leff * V(NC)));
- I(gi, di) <+ ddt(0.5 * ((1.0 - sigvds) * mig * Cox * Weff * NF * Leff * V(NC)));
- end
- endcase
- I(N2) <+ V(N2);
- I(NR) <+ V(NR);
-
- // Gate current shot noise
- if (IGCMOD != 0) begin
- I(gi, si) <+ white_noise(2.0 * `q * abs(igcs + igs), "igs");
- I(gi, di) <+ white_noise(2.0 * `q * abs(igcd + igd), "igd");
- end
- if (IGBMOD != 0) begin
- I(gi, bi) <+ white_noise(2.0 * `q * abs(igb), "igb");
- end
-
- // C-V model
- vgfbCV = vgfb;
- gamg2 = (2.0 * `q * epssi * NGATE_i) / (Cox * Cox * Vt);
- invgamg2 = (NGATE_i > 0.0) ? (1.0 / gamg2) : 0.0;
- if (CVMOD == 1) begin
- VFBCV_i = VFBCV_i + DELVTO;
- vg = Vg * inv_Vt;
- vs = Vs * inv_Vt;
- vfb = VFBCV_i * inv_Vt;
- vgfbCV = vg - vfb;
- phib = lln(NDEPCV_i / ni);
- // Normalized body factor
- gam = sqrt(2.0 * `q * epssi * NDEPCV_i * inv_Vt) / Cox;
- inv_gam = 1.0 / gam;
- gamg2 = (2.0 * `q * epssi * NGATE_i) / (Cox * Cox * Vt);
- invgamg2 = (NGATE_i > 0.0) ? (1.0 / gamg2) : 0.0;
- DPD = (NGATE_i > 0.0) ? (NDEPCV_i / NGATE_i) : 0.0;
-
- // psip: pinch-off voltage
- `PO_psip(vgfbCV, gam, DPD, phib, psip)
-
- // normalized inversion charge at source end of channel
- `BSIM_q(psip, phib, vs, gam, qs)
- `Smooth(psip, 1.0, 2.0, psipclamp)
- sqrtpsip = sqrt(psipclamp);
-
- // source side surf pot.
- psiavg = psip - 2.0 * qs;
- `Smooth(psiavg, 1.0, 2.0, T0)
- nq = 1.0 + gam / (sqrtpsip + sqrt(T0));
-
- // Drain Saturation Voltage
- T0 = Vt * (vgfbCV - psip - 2.0 * qs * (nq - 1.0));
- `Smooth(T0, 0, 0.1, qbs)
-
- // Source side qi and qb for Vdsat- normalized to Cox
- qis = 2.0 * nq * Vt * qs;
- Eeffs = EeffFactor * (qbs + eta_mu * qis); // in the unit of MV/cm
-
- // Ref: BSIM4 Model mobility model
- T3 = (UA_a + UC_a * Vbsx) * pow(Eeffs, EU_i);
- T4 = 1.0 + T3;
- `Smooth(T4, 1.0, 0.0015, Dmobs)
- LambdaC_by2 = (U0_a / Dmobs) * Vt / (VSATCV_t * Lact);
- qdsat = LambdaC_by2 * (qs * qs + qs) / (1.0 + LambdaC_by2 * (1.0 + qs));
- vdsatcv = psip - 2.0 * phib - (2.0 * qdsat + lln((qdsat * 2.0 * nq * inv_gam) * ((qdsat * 2.0 * nq * inv_gam) + (gam / (nq - 1.0)))));
- VdsatCV = vdsatcv * Vt;
-
- // Normalized charge qdeff at drain end of channel
- `Smooth(VdsatCV - Vs, 0.0, 1e-3, VdssatCV)
- T7 = pow(Vds / VdssatCV , 1.0 / DELTA_t);
- T8 = pow(1.0 + T7, -DELTA_t);
- Vdseff = Vds * T8;
- vdeff = (Vdseff + Vs) * inv_Vt;
- `BSIM_q(psip, phib, vdeff, gam, qdeff)
-
- // Reevaluation of nq to include qdeff needed for gummel symmetry
- psiavg = psip - qs - qdeff - 1.0;
- `Smooth(psiavg, 1.0, 2.0, T0)
- T2 = sqrt(T0);
- T3 = 1.0 + DPD + gam / (sqrtpsip + T2);
- T4 = 0.5 + DPD * T2 * inv_gam;
- T5 = sqrt(T4 * T4 + T3 * (qs + qdeff) * invgamg2);
- nq = T3 / (T4 + T5);
-
- // CV Expressions including Velocity Saturation and CLM
- // Velocity Saturation for CV
- T0 = Vt * (vgfbCV - psip - 2.0 * qs * (nq - 1.0));
- `Smooth(T0, 0, 0.1, qbs)
- T1 = Vt * (vgfbCV - psip - 2.0 * qdeff * (nq - 1.0));
- `Smooth(T1, 0, 0.1, qbd)
- qb = 0.5 * (qbs + qbd);
- qia = nq * Vt * (qs + qdeff);
- Eeffm = EeffFactor * (qb + eta_mu * qia);
- T3 = (UA_a + UC_a * Vbsx) * pow(Eeffm, EU_i);
- T4 = 1.0 + T3;
- `Smooth(T4, 1.0, 0.0015, Dmob)
- LambdaC = 2.0 * (U0_a / Dmob) * Vt / (VSATCV_t * Lact);
- dps = qs - qdeff;
- T1 = 2.0 * (LambdaC * dps) * (LambdaC * dps);
- zsat = sqrt(1.0 + T1);
- Dvsat = 0.5 * (1.0 + zsat);
- // CLM for CV
- Esat = 2.0 * VSATCV_t / (U0_a / Dmob);
- EsatL = Esat * Lact;
- Vasat = VdssatCV + EsatL;
- diffVds = Vds - Vdseff;
- end
- if (PCLMCV_i != 0.0) begin
- MdL = 1.0 + PCLMCV_i * lln(1.0 + diffVds / PCLMCV_i / Vasat);
- end else begin
- MdL = 1.0;
- end
- MdL_2 = MdL * MdL;
- inv_MdL = 1.0 / MdL;
- inv_MdL_2 = 1.0 / MdL_2;
- MdL_less_1 = MdL - 1.0;
- vgpqm = vgfbCV - psip;
- DQSD = (qs - qdeff);
- DQSD2 = (qs - qdeff) * (qs - qdeff);
- sis = vgpqm + 2.0 * qs;
- sid = vgpqm + 2.0 * qdeff;
- `Smooth(sis, 0.0, 0.5, T1)
- `Smooth(sid, 0.0, 0.5, T2)
- Temps = sqrt(0.25 + T1 * invgamg2);
- Tempd = sqrt(0.25 + T2 * invgamg2);
- T1 = sis / (1.0 + 2.0 * Temps);
- T2 = sid / (1.0 + 2.0 * Tempd);
- T3 = Temps + Tempd;
- T4 = `Oneby3 * (DQSD2 / (T3 * T3 * T3));
- T5 = (Dvsat * inv_MdL) / (1.0 + qs + qdeff);
- T6 = 0.8 * (T3 * T3 + Temps * Tempd) * T5;
- T7 = T6 + (2.0 * invgamg2);
- T8 = `Oneby3 * DQSD2 * T5;
- dqgeff = sid * (2.0 * Tempd - 1.0) / (2.0 * Tempd + 1.0);
- qbeff = vgpqm - 2.0 * (nq - 1.0) * qdeff + dqgeff;
- Qb = inv_MdL * (T1 + T2 + (T4 * T7 - nq * (qs + qdeff + T8))) + MdL_less_1 * qbeff;
- T9 = qs + qdeff;
- T10 = DQSD2 * T5 * T5;
- Qi = nq * inv_MdL * (T9 + `Oneby3 * DQSD2 * T5) + 2.0 * nq * MdL_less_1 * qdeff;
- Qd1 = nq * inv_MdL_2 * (0.5 * T9 - (DQSD / 6.0) * (1.0 - DQSD * T5 - 0.2 * T10));
- Qd2 = nq * (MdL - inv_MdL) * qdeff;
- Qd = Qd1 + Qd2;
- Qs = Qi - Qd;
-
- // Quantum Mechanical Effect
- `Smooth(Vt*Qb, 0, 0.1, qbaCV)
- qiaCV = Vt *( Qs + Qd);
- T0 = (qiaCV + ETAQM * qbaCV) / QM0;
- T1 = 1.0 + pow(T0, 0.7 * BDOS);
- XDCinv = ADOS * 1.9e-9 / T1;
- Coxeffinv = 3.9 * `EPS0 / (BSIMBULKTOXP * 3.9 / EPSROX + XDCinv / epsratio);
- QBi = -NF * Wact * Lact * (`EPS0 * EPSROX / BSIMBULKTOXP) * Vt * Qb;
- WLCOXVtinv = NF * Wact * Lact * Coxeffinv * Vt;
- QSi = -WLCOXVtinv * Qs;
- QDi = -WLCOXVtinv * Qd;
- QGi = -(QBi + QSi + QDi);
-
- // Outer fringing capacitance
- if (!$param_given(CF)) begin
- CF_i = 2.0 * EPSROX * `EPS0 / `M_PI * lln(CFRCOEFF * (1.0 + 0.4e-6 / TOXE));
- end
- Cgsof = CGSO + CF_i;
- Cgdof = CGDO + CF_i;
-
- // Overlap capacitance
- if (COVMOD == 0) begin
- Qovs = -Wact * NF * Cgsof * Vgs_ov_noswap;
- Qovd = -Wact * NF * Cgdof * Vgd_ov_noswap;
- end else begin
- T0 = sqrt((Vgs_ov_noswap - Vfbsdr + `DELTA_1) * (Vgs_ov_noswap -Vfbsdr + `DELTA_1) + 4.0 * `DELTA_1);
- Vgsov = 0.5 * (Vgs_ov_noswap - Vfbsdr + `DELTA_1 - T0);
- T1 = sqrt(1.0 - 4.0 * Vgsov / CKAPPAS_i);
- Qovs = -Wact * NF * (Cgsof * Vgs_ov_noswap + CGSL_i * (Vgs_ov_noswap -Vfbsdr - Vgsov - 0.5 * CKAPPAS_i * (-1.0 + T1)));
- T0 = sqrt((Vgd_ov_noswap - Vfbsdr + `DELTA_1) * (Vgd_ov_noswap - Vfbsdr + `DELTA_1) + 4.0 * `DELTA_1);
- Vgdov = 0.5 * (Vgd_ov_noswap - Vfbsdr + `DELTA_1 - T0);
- T2 = sqrt(1.0 - 4.0 * Vgdov / CKAPPAD_i);
- Qovd = -Wact * NF * (Cgdof * Vgd_ov_noswap + CGDL_i * (Vgd_ov_noswap - Vfbsdr - Vgdov - 0.5 * CKAPPAD_i * (-1.0 + T2)));
- end
- Qovb = -devsign * NF * Lact * CGBO * V(gm, bi);
- Qovg = -(Qovs + Qovd + Qovb);
-
- // Edge FET model
- if (EDGEFET == 1) begin
- NFACTOREDGE_t = NFACTOREDGE_i * hypsmooth((1.0 + TNFACTOREDGE_i * (TRatio - 1.0)), 1e-3);
- ETA0EDGE_t = ETA0_EDGE * (1.0 + TETA0EDGE_i * (TRatio - 1.0));
- cdsc = CITEDGE_i + NFACTOREDGE_t + CDSCDEDGE_i * Vdsx - CDSCBEDGE_i * Vbsx;
- T1 = 1.0 + cdsc/Cox;
- `Smooth(T1, 1.0, 0.05, n)
- nVt = n * Vt;
- inv_nVt = 1.0 / nVt;
- vg = Vg * inv_nVt;
- vs = Vs * inv_nVt;
- vfb = VFB_i * inv_nVt;
- dvth_dibl = -(ETA0EDGE_t + ETABEDGE_i * Vbsx) * Vdsx;
- dvth_temp = (KT1EDGE_i + KT1LEDGE_i / Leff + KT2EDGE_i * Vbsx) * (pow(TRatio, KT1EXPEDGE_i) - 1.0);
- litl_edge = litl * (1.0 + DVT2EDGE * Vbsx);
- T0 = DVT1EDGE * Leff / litl_edge;
- if (T0 < 40.0) begin
- theta_sce_edge = 0.5 * DVT0EDGE / (cosh(T0) - 1.0);
- end else begin
- theta_sce_edge = DVT0EDGE * lexp(-T0);
- end
- dvth_sce = theta_sce_edge * (Vbi - Phist);
- Vth_shift = dvth_dibl - dvth_temp + dvth_sce + DVTEDGE + vth0_stress_EDGE - K2_EDGE * Vbsx;
- vgfb = vg - vfb - Vth_shift * inv_nVt;
-
- // Normalized body factor
- DGAMMAEDGE_i = DGAMMAEDGE * (1.0 + DGAMMAEDGEL * pow(Leff, -DGAMMAEDGELEXP));
- gam = sqrt(2.0 * `q * epssi * NDEP_i * inv_nVt) / Cox;
- gam = gam * (1.0 + DGAMMAEDGE_i);
- inv_gam = 1.0 / gam;
- phib_n = phib / n;
- `PO_psip(vgfb, gam, 0, phib_n, psip)
- `BSIM_q(psip, phib_n, vs, gam, qs)
-
- // Approximate Pinch Off voltage
- vdsatedge = 2.0 * nVt * qs + 2.0 * nVt;
- Vdsatedge = vdsatedge;
- Vdsatedge = Vdsatedge + Vs;
-
- // Vdssat clamped to avoid negative values during transient simulation
- `Smooth(Vdsatedge - Vs, 0.0, 1.0e-3, Vdssate)
- T7 = pow(Vds / Vdssate , 1.0 / DELTA_t);
- T8 = pow(1.0 + T7, -DELTA_t);
- Vdseff = Vds * T8;
- vdeff = (Vdseff + Vs) * inv_nVt;
- `BSIM_q(psip, phib_n, vdeff, gam, qdeff)
-
- // Nq calculation for Edge FET
- `Smooth(psip, 1.0, 2.0, psipclamp)
- sqrtpsip = sqrt(psipclamp);
- psiavg = psip - qs - qdeff -1.0;
- `Smooth(psiavg, 1.0, 2.0, T0)
- T2 = sqrt(T0);
- nq = 1.0 + gam / (sqrtpsip + T2);
- ids_edge = 2.0 * NF * nq * ueff * WEDGE / Leff * Cox * nVt * nVt *((qs - qdeff)*(1.0 + qs + qdeff)) *Moc;
- ids = ids_edge + ids;
- end
-
- // Edge FET Parasitic Device Drain Current Model Ends
- // Charge expressions including fringing and overlap capacitance
- QB = devsign * (QBi + Qovb + Qbsj + Qbdj);
- if (sigvds > 0) begin
- QSI = devsign * QSi;
- QDI = devsign * QDi;
- QS = devsign * (QSi + Qovs - Qbsj);
- QD = devsign * (QDi + Qovd - Qbdj);
- end else begin
- QSI = devsign * QDi;
- QDI = devsign * QSi;
- QS = devsign * (QDi + Qovs - Qbsj);
- QD = devsign * (QSi + Qovd - Qbdj);
- end
- QG = devsign * (QGi + Qovg);
-
- // Output
- // Intrinsic Charges
- QBI = devsign * QBi;
- QGI = devsign * QGi;
-
- // QSI and QDI are defined above
- // Intrinsic Capacitances
- CGSI = -ddx(QGI,V(si));
- CGDI = -ddx(QGI,V(di));
- CGBI = -ddx(QGI,V(bi));
- CGGI = ddx(QGI,V(gi));
- CSSI = ddx(QSI,V(si));
- CSDI = -ddx(QSI,V(di));
- CSBI = -ddx(QSI,V(bi));
- CSGI = -ddx(QSI,V(gi));
- CDSI = -ddx(QDI,V(si));
- CDDI = ddx(QDI,V(di));
- CDBI = -ddx(QDI,V(bi));
- CDGI = -ddx(QDI,V(gi));
- CBSI = -ddx(QBI,V(si));
- CBDI = -ddx(QBI,V(di));
- CBBI = ddx(QBI,V(bi));
- CBGI = -ddx(QBI,V(gi));
-
- // Total Capacitances
- CGS = -ddx(QG, V(si));
- CGD = -ddx(QG, V(di));
- CGB = -ddx(QG, V(bi));
- CGG = CGGI + ddx(devsign * Qovg, V(gm));
- CSS = ddx(QS, V(si));
- CSD = -ddx(QS, V(di));
- CSB = CSBI - ddx((QS - QSI), V(sbulk));
- CSG = CSGI - ddx((QS - QSI), V(gm));
- CDS = -ddx(QD, V(si));
- CDD = ddx(QD, V(di));
- CDB = CDBI - ddx((QD - QDI), V(dbulk));
- CDG = CDGI - ddx((QD - QDI), V(gm));
- CBS = -ddx(QB, V(si));
- CBD = -ddx(QB, V(di));
- CBB = CBBI + ddx(QB, V(sbulk)) + ddx(QB, V(dbulk)) + ddx((devsign * Qovb), V(bi));
- CBG = -ddx(QB, V(gi)) - ddx((devsign * Qovb), V(gm));
-
- // Total extrinsic capacitance
- CGSEXT = -devsign * ddx(Qovg, V(si)); // Gate-Source Overlap + outer fringing
- CGDEXT = -devsign * ddx(Qovg, V(di)); // Gate-Drain Overlap + outer fringing
- CGBOV = -devsign * ddx(Qovg, V(bi)); // Gate-Body Overlap
-
- // Total Source/Drain Junction Capacitances
- CAPBS = -devsign * ddx(Qbsj, V(si));
- CAPBD = -devsign * ddx(Qbdj, V(di));
-
- // W & L
- WEFF = Weff; // Effective width for IV
- LEFF = Leff; // Effective length for IV
- WEFFCV = Wact; // Effective width for CV
- LEFFCV = Lact; // Effective length for CV
-
- // Currents and derivatives
- if (sigvds > 0) begin
- IDS = devsign * ids; // Intrinsic drain to source current
- IDEFF = IDS - (IGD + IGCD) + ISUB + IGIDL; // Total drain current
- ISEFF = -IDS - (IGS + IGCS) + IGISL; // Total source current
- end else begin
- IDS = -devsign * ids; // Intrinsic drain to source current
- IDEFF = IDS - (IGD + IGCD) + IGIDL; // Total drain current
- ISEFF = -IDS - (IGS + IGCS) + ISUB + IGISL; // Total source current
- end
- IGEFF = IGB + IGS + IGCS + IGD + IGCD;//Total gate tunneling current
- IBS = -devsign * Ibs; // Source junction current
- IBD = -devsign * Ibd; // Source junction current
- VDS = V(di, si); // Drain-Source Voltage
- VGS = V(gi, si);
- VBS = -V(si, bi); // Source-body Voltage
- VDSAT = Vdssat; // Drain-Source saturation Voltage
- GM = ddx(IDS, V(gi)); // Transconductance
- GMBS = ddx(IDS, V(bi)); // Body transconductance
- GDS = ddx(IDS, V(di)); // Output conductance
-
- // Loading variables
- I(gi, bi) <+ ddt(QGI);
- I(si, bi) <+ ddt(QSI);
- I(di, bi) <+ ddt(QDI);
- I(gm, si) <+ ddt(-devsign * Qovs);
- I(gm, di) <+ ddt(-devsign * Qovd);
- I(gm, bi) <+ ddt(-devsign * Qovb);
-
- // Drain to source current
- I(di, si) <+ devsign * sigvds * ids;
-
- if (IGBMOD != 0) begin
- I(gi, bi) <+ IGB;
- end
- if (IGCMOD != 0) begin
- I(gi, si) <+ (IGS + IGCS);
- I(gi, di) <+ (IGD + IGCD);
- end
- if (sigvds > 0) begin
- I(di, bi) <+ ISUB + IGIDL;
- I(si, bi) <+ IGISL;
- end else begin
- I(di, bi) <+ IGIDL;
- I(si, bi) <+ ISUB + IGISL;
- end
-
- // External S/D Resistance
- if (RDSMOD != 2) begin
- gdpr = 1.0 / Rdrain; // Note: gdpr considers all fingers
- gspr = 1.0 / Rsource; // Note: gspr considers all fingers
- I(d, di) <+ V(d, di) * gdpr;
- I(s, si) <+ V(s, si) * gspr;
- I(d, di) <+ white_noise(Nt * gdpr, "rd");
- I(s, si) <+ white_noise(Nt * gspr, "rs");
- end else begin
- V(d, di) <+ 0.0;
- V(s, si) <+ 0.0;
- end
- if (RGATEMOD == 0) begin
- V(g, gm) <+ 0.0;
- end else begin: rgate
- if (RGATEMOD == 2) begin
- Ggate = Gcrg;
- Gnoise = Gcrg * Gcrg / Grgeltd;
- end else begin
- Ggate = Grgeltd;
- Gnoise = Grgeltd;
- end
- I(g, gm) <+ V(g, gm) * Ggate;
- I(g, gm) <+ white_noise(Nt * Gnoise, "rg");
- end
- if (RGATEMOD == 3) begin
- I(gm, gi) <+ V(gm, gi) * Gcrg;
- end else begin
- V(gm, gi) <+ 0;
- end
- if ((SHMOD != 0) && (RTH0 > 0.0)) begin
- if (RDSMOD != 2) begin
- Pwr(t) <+ -(devsign * sigvds * ids * V(di, si) + V(d,di) * V(d,di) / Rdrain + V(s,si) * V(s,si) / Rsource) + delTemp1 * gth;
- end else begin
- Pwr(t) <+ -(devsign * sigvds * ids * V(di, si)) + delTemp1 * gth;
- end
- Pwr(t) <+ ddt(delTemp1 * cth);
- end else begin
- Temp(t) <+ 0.0;
- end
- if (RBODYMOD != 0) begin
- I(bi, sbulk) <+ V(bi, sbulk) * Grbps;
- I(b, sbulk) <+ V(b, sbulk) * Grbsb;
- I(b, bi) <+ V(b, bi) * Grbpb;
- I(b, dbulk) <+ V(b, dbulk) * Grbdb;
- I(bi, dbulk) <+ V(bi, dbulk) * Grbpd;
- I(sbulk, bi) <+ white_noise(Nt * Grbps, "rbps");
- I(sbulk, b) <+ white_noise(Nt * Grbsb, "rbsb");
- I(b, bi) <+ white_noise(Nt * Grbpb, "rbpb");
- I(dbulk, bi) <+ white_noise(Nt * Grbpd, "rbpd");
- I(dbulk, b) <+ white_noise(Nt * Grbdb, "rbdb");
- end else begin
- V(b, sbulk) <+ 0.0;
- V(b, bi) <+ 0.0;
- V(b, dbulk) <+ 0.0;
- end
-
- // Diode Current and Capacitance
- if (RBODYMOD != 0) begin
- I(sbulk, si) <+ devsign * Ibs;
- I(dbulk, di) <+ devsign * Ibd;
- I(sbulk, si) <+ devsign * ddt(Qbsj);
- I(dbulk, di) <+ devsign * ddt(Qbdj);
- end else begin
- I(bi, si) <+ devsign * Ibs;
- I(bi, di) <+ devsign * Ibd;
- I(bi, si) <+ devsign * ddt(Qbsj);
- I(bi, di) <+ devsign * ddt(Qbdj);
- end
-end
-endmodule
diff --git a/src/spicelib/devices/adms/bsimcmg/admsva/bsimcmg.va b/src/spicelib/devices/adms/bsimcmg/admsva/bsimcmg.va
deleted file mode 100644
index 42ef83a14..000000000
--- a/src/spicelib/devices/adms/bsimcmg/admsva/bsimcmg.va
+++ /dev/null
@@ -1,117 +0,0 @@
-// ********************************************************
-// **** BSIM-CMG 110.0.0 released by Sourabh Khandelwal on 01/01/2016 *****/
-// * BSIM Common Multi-Gate Model Equations (Verilog-A)
-// ********************************************************
-//
-// ********************************************************
-// * Copyright 2016 Regents of the University of California.
-// * All rights reserved.
-// *
-// * Project Director: Prof. Chenming Hu.
-// * Authors: Sriramkumar V., Navid Paydavosi, Juan Duarte, Darsen Lu, Sourabh Khandelwal
-// * Chung-Hsun Lin, Mohan Dunga, Shijing Yao,
-// * Ali Niknejad, Chenming Hu
-// ********************************************************
-// ********************************************************
-// * NONDISCLOSURE STATEMENT
-// Software is distributed as is, completely without warranty or service
-// support. The University of California and its employees are not liable
-// for the condition or performance of the software.
-// The University of California owns the copyright and grants users a perpetual,
-// irrevocable, worldwide, non-exclusive, royalty-free license with
-// respect to the software as set forth below.
-// The University of California hereby disclaims all implied warranties.
-// The University of California grants the users the right to modify, copy,
-// and redistribute the software and documentation, both within the user's
-// organization and externally, subject to the following restrictions
-// 1. The users agree not to charge for the University of California code
-// itself but may charge for additions, extensions, or support.
-// 2. In any product based on the software, the users agree to acknowledge
-// the University of California that developed the software. This
-// acknowledgment shall appear in the product documentation.
-// 3. The users agree to obey all U.S. Government restrictions governing
-// redistribution or export of the software.
-// 4. The users agree to reproduce any copyright notice which appears on
-// the software on any copy or modification of such made available
-// to others
-// Agreed to on __Jan 01, 2016__________________
-// By: ___University of California, Berkeley____
-// ___Chenming Hu_____________________
-// ___Professor in Graduate School _______
-// ********************************************************
-
-
-`include "constants.vams"
-`include "disciplines.vams"
-
-/**************************************************************/
-/* SHMOD is a model parameter */
-/* SHMOD = 1 : Self-heating turned on */
-/* SHMOD = 0 : Self-heating turned off */
-/* */
-/* RDSMOD is a model parameter */
-/* RDSMOD = 1 : External source/drain resistance model */
-/* RDSMOD = 0 : Internal source/drain resistance model */
-/* RDSMOD = 2 : Internal Bias Dependent and Bias Independent part of source/drain resistance */
-/* */
-/* NQSMOD is a model parameter */
-/* NQSMOD = 1 : NQS Resistance / gi node turned on */
-/* NQSMOD = 0 : NQS Resistance / gi node turned off */
-/* */
-/* RGATEMOD is a model parameter */
-/* RGATEMOD = 1 : Gate Resistance / ge node turned on */
-/* RGATEMOD = 0 : Gate Resistance / ge node turned off */
-/**************************************************************/
-//
-// In Verilog-A the number of internal nodes cannot be controlled by
-// a model parameter. Therefore we use `define statements
-// to control it. Comment the following lines whenever
-// possible for best computational efficiency.
-`define __OPINFO__
-`define __DEBUG__
-`define __SHMOD__
-`define __RDSMOD__
-//`define __NQSMOD1__
-//`define __NQSMOD2__
-`define __RGATEMOD__
-`define __TNOIMOD1__ //Correlated Thermal Noise Switch
-
-`include "common_defs.include"
-`include "bsimcmg_cfringe.include"
-
-
-module bsimcmg(d, g, s, e, t);
- inout g, d, s, e, t;
- electrical g, d, s, e;
- electrical si, di;
-
-`ifdef __NQSMOD1__
- electrical gi;
-`endif
-
-`ifdef __NQSMOD2__
- electrical q;
-`endif
-
-`ifdef __RGATEMOD__
- electrical ge;
-`endif
-
-`ifdef __SHMOD__
- thermal t;
- branch (t) rth_branch;
- branch (t) ith_branch;
-`else
- thermal t;
-`endif
-
- // Internal node controlled by Correlated Thermal Noise Switch
-`ifdef __TNOIMOD1__
- electrical N;
-`endif
-
-`include "bsimcmg_body.include"
-
-
-endmodule
-
diff --git a/src/spicelib/devices/adms/bsimcmg/admsva/bsimcmg_binning_parameters.include b/src/spicelib/devices/adms/bsimcmg/admsva/bsimcmg_binning_parameters.include
deleted file mode 100644
index c620ceb04..000000000
--- a/src/spicelib/devices/adms/bsimcmg/admsva/bsimcmg_binning_parameters.include
+++ /dev/null
@@ -1,756 +0,0 @@
-// ********************************************************
-// **** BSIM-CMG 110.0.0 released by Sourabh Khandelwal on 01/01/2016 ****/
-// * BSIM Common Multi-Gate Model Equations (Verilog-A)
-// ********************************************************
-//
-// ********************************************************
-// * Copyright 2016 Regents of the University of California.
-// * All rights reserved.
-// *
-// * Project Director: Prof. Chenming Hu.
-// * Authors: Sriramkumar V., Navid Paydavosi, Juan Duarte, Darsen Lu, Sourabh Khandelwal
-// * Chung-Hsun Lin, Mohan Dunga, Shijing Yao,
-// * Ali Niknejad, Chenming Hu
-// ********************************************************
-// ********************************************************
-// * NONDISCLOSURE STATEMENT
-// Software is distributed as is, completely without warranty or service
-// support. The University of California and its employees are not liable
-// for the condition or performance of the software.
-// The University of California owns the copyright and grants users a perpetual,
-// irrevocable, worldwide, non-exclusive, royalty-free license with
-// respect to the software as set forth below.
-// The University of California hereby disclaims all implied warranties.
-// The University of California grants the users the right to modify, copy,
-// and redistribute the software and documentation, both within the user's
-// organization and externally, subject to the following restrictions
-// 1. The users agree not to charge for the University of California code
-// itself but may charge for additions, extensions, or support.
-// 2. In any product based on the software, the users agree to acknowledge
-// the University of California that developed the software. This
-// acknowledgment shall appear in the product documentation.
-// 3. The users agree to obey all U.S. Government restrictions governing
-// redistribution or export of the software.
-// 4. The users agree to reproduce any copyright notice which appears on
-// the software on any copy or modification of such made available
-// to others
-// Agreed to on __Jan 01, 2016_________________
-// By: ___University of California, Berkeley____
-// ___Chenming Hu_____________________
-// ___Professor in Graduate School _______
-// ********************************************************
-`MPRnb( LNBODY ,0.0 ,"m^-2" ,"" )
-`MPRnb( NNBODY ,0.0 ,"m^-2" ,"" )
-`MPRnb( PNBODY ,0.0 ,"m^-1" ,"" )
-
-`MPRnb( LPHIG ,0.0 ,"m*eV" ,"" )
-`MPRnb( NPHIG ,0.0 ,"m*eV" ,"" )
-`MPRnb( PPHIG ,0.0 ,"(m^2)*eV" ,"" )
-
-`MPRnb( LNGATE ,0.0 ,"m^-2" ,"" )
-`MPRnb( NNGATE ,0.0 ,"m^-2" ,"" )
-`MPRnb( PNGATE ,0.0 ,"m^-1" ,"" )
-
-`MPRnb( LCIT ,0.0 ,"F/m" ,"" )
-`MPRnb( NCIT ,0.0 ,"F/m" ,"" )
-`MPRnb( PCIT ,0.0 ,"F" ,"" )
-
-`MPRnb( LCITR ,LCIT ,"" ,"" )
-`MPRnb( NCITR ,NCIT ,"" ,"" )
-`MPRnb( PCITR ,PCIT ,"" ,"" )
-
-`MPRnb( LCDSC ,0.0 ,"F/m" ,"" )
-`MPRnb( NCDSC ,0.0 ,"F/m" ,"" )
-`MPRnb( PCDSC ,0.0 ,"F" ,"" )
-
-`MPRnb( LCDSCD ,0.0 ,"F/m" ,"" )
-`MPRnb( NCDSCD ,0.0 ,"F/m" ,"" )
-`MPRnb( PCDSCD ,0.0 ,"F" ,"" )
-
-`MPRnb( LCDSCDR ,LCDSCD ,"F/m" ,"" )
-`MPRnb( NCDSCDR ,NCDSCD ,"F/m" ,"" )
-`MPRnb( PCDSCDR ,PCDSCD ,"F" ,"" )
-
-`MPRnb( LDVT0 ,0.0 ,"" ,"" )
-`MPRnb( NDVT0 ,0.0 ,"" ,"" )
-`MPRnb( PDVT0 ,0.0 ,"" ,"" )
-
-`MPRnb( LDVT1 ,0.0 ,"" ,"" )
-`MPRnb( NDVT1 ,0.0 ,"" ,"" )
-`MPRnb( PDVT1 ,0.0 ,"" ,"" )
-
-`MPRnb( LDVT1SS ,LDVT1 ,"" ,"" )
-`MPRnb( NDVT1SS ,NDVT1 ,"" ,"" )
-`MPRnb( PDVT1SS ,PDVT1 ,"" ,"" )
-
-`MPRnb( LPHIN ,0.0 ,"m*V" ,"" )
-`MPRnb( NPHIN ,0.0 ,"m*V" ,"" )
-`MPRnb( PPHIN ,0.0 ,"(m^2)*V" ,"" )
-
-`MPRnb( LETA0 ,0.0 ,"" ,"" )
-`MPRnb( NETA0 ,0.0 ,"" ,"" )
-`MPRnb( PETA0 ,0.0 ,"" ,"" )
-
-`MPRnb( LETA0R ,LETA0 ,"" ,"" )
-`MPRnb( NETA0R ,NETA0 ,"" ,"" )
-`MPRnb( PETA0R ,PETA0 ,"" ,"" )
-
-`MPRnb( LDSUB ,0.0 ,"" ,"" )
-`MPRnb( NDSUB ,0.0 ,"" ,"" )
-`MPRnb( PDSUB ,0.0 ,"" ,"" )
-
-`MPRnb( LK1RSCE ,0.0 ,"m*V^(1/2)" ,"" )
-`MPRnb( NK1RSCE ,0.0 ,"m*V^(1/2)" ,"" )
-`MPRnb( PK1RSCE ,0.0 ,"(m^2)*V^(1/2)" ,"" )
-
-`MPRnb( LLPE0 ,0.0 ,"m^2" ,"" )
-`MPRnb( NLPE0 ,0.0 ,"m^2" ,"" )
-`MPRnb( PLPE0 ,0.0 ,"m^3" ,"" )
-
-`MPRnb( LDVTSHIFT ,0.0 ,"m*V" ,"" )
-`MPRnb( NDVTSHIFT ,0.0 ,"m*V" ,"" )
-`MPRnb( PDVTSHIFT ,0.0 ,"(m^2)*V" ,"" )
-
-`MPRnb( LDVTSHIFTR ,LDVTSHIFT ,"" ,"" )
-`MPRnb( NDVTSHIFTR ,NDVTSHIFT ,"" ,"" )
-`MPRnb( PDVTSHIFTR ,PDVTSHIFT ,"" ,"" )
-
-`MPRnb( LPHIBE ,0.0 ,"m*V" ,"" )
-`MPRnb( NPHIBE ,0.0 ,"m*V" ,"" )
-`MPRnb( PPHIBE ,0.0 ,"(m^2)*V" ,"" )
-
-`MPRnb( LK0 ,0.0 ,"m*V" ,"" )
-`MPRnb( NK0 ,0.0 ,"m*V" ,"" )
-`MPRnb( PK0 ,0.0 ,"(m^2)*V" ,"" )
-
-`MPRnb( LK01 ,0.0 ,"(m*V)/K" ,"" )
-`MPRnb( NK01 ,0.0 ,"(m*V)/K" ,"" )
-`MPRnb( PK01 ,0.0 ,"(m^2*V)/K" ,"" )
-
-`MPRnb( LK0SI ,0.0 ,"" ,"" )
-`MPRnb( NK0SI ,0.0 ,"" ,"" )
-`MPRnb( PK0SI ,0.0 ,"" ,"" )
-
-`MPRnb( LK0SI1 ,0.0 ,"m/K" ,"" )
-`MPRnb( NK0SI1 ,0.0 ,"m/K" ,"" )
-`MPRnb( PK0SI1 ,0.0 ,"(m^2)/K" ,"" )
-
-`MPRnb( LK1 ,0.0 ,"m*V^(1/2)" ,"" )
-`MPRnb( NK1 ,0.0 ,"m*V^(1/2)" ,"" )
-`MPRnb( PK1 ,0.0 ,"(m^2)*V^(1/2)" ,"" )
-
-`MPRnb( LK11 ,0.0 ,"(m*V^(-1/2))/K" ,"" )
-`MPRnb( NK11 ,0.0 ,"(m*V^(-1/2))/K" ,"" )
-`MPRnb( PK11 ,0.0 ,"(m^2*V^(-1/2))/K" ,"" )
-
-`MPRnb( LK2SI ,LK0SI ,"" ,"" )
-`MPRnb( NK2SI ,NK0SI ,"" ,"" )
-`MPRnb( PK2SI ,PK0SI ,"" ,"" )
-
-`MPRnb( LK2SI1 ,LK0SI1 ,"" ,"" )
-`MPRnb( NK2SI1 ,NK0SI1 ,"" ,"" )
-`MPRnb( PK2SI1 ,PK0SI1 ,"" ,"" )
-
-`MPRnb( LK0SISAT ,0.0 ,"" ,"" )
-`MPRnb( NK0SISAT ,0.0 ,"" ,"" )
-`MPRnb( PK0SISAT ,0.0 ,"" ,"" )
-
-`MPRnb( LK0SISAT1 ,0.0 ,"" ,"" )
-`MPRnb( NK0SISAT1 ,0.0 ,"" ,"" )
-`MPRnb( PK0SISAT1 ,0.0 ,"" ,"" )
-
-`MPRnb( LK2SISAT ,LK0SISAT ,"" ,"" )
-`MPRnb( NK2SISAT ,NK0SISAT ,"" ,"" )
-`MPRnb( PK2SISAT ,PK0SISAT ,"" ,"" )
-
-`MPRnb( LK2SISAT1 ,LK0SISAT1 ,"" ,"" )
-`MPRnb( NK2SISAT1 ,NK0SISAT1 ,"" ,"" )
-`MPRnb( PK2SISAT1 ,PK0SISAT1 ,"" ,"" )
-
-`MPRnb( LK2SAT ,0.0 ,"" ,"" )
-`MPRnb( NK2SAT ,0.0 ,"" ,"" )
-`MPRnb( PK2SAT ,0.0 ,"" ,"" )
-
-`MPRnb( LK2SAT1 ,0.0 ,"" ,"" )
-`MPRnb( NK2SAT1 ,0.0 ,"" ,"" )
-`MPRnb( PK2SAT1 ,0.0 ,"" ,"" )
-
-`MPRnb( LK2 ,0.0 ,"" ,"" )
-`MPRnb( NK2 ,0.0 ,"" ,"" )
-`MPRnb( PK2 ,0.0 ,"" ,"" )
-
-`MPRnb( LK21 ,0.0 ,"" ,"" )
-`MPRnb( NK21 ,0.0 ,"" ,"" )
-`MPRnb( PK21 ,0.0 ,"" ,"" )
-
-`MPRnb( LDVTB ,0.0 ,"" ,"" )
-`MPRnb( NDVTB ,0.0 ,"" ,"" )
-`MPRnb( PDVTB ,0.0 ,"" ,"" )
-
-`MPRnb( LLPEB ,0.0 ,"" ,"" )
-`MPRnb( NLPEB ,0.0 ,"" ,"" )
-`MPRnb( PLPEB ,0.0 ,"" ,"" )
-
-`MPRnb( LQMFACTOR ,0.0 ,"" ,"" )
-`MPRnb( NQMFACTOR ,0.0 ,"" ,"" )
-`MPRnb( PQMFACTOR ,0.0 ,"" ,"" )
-
-`MPRnb( LQMTCENCV ,0.0 ,"" ,"" )
-`MPRnb( NQMTCENCV ,0.0 ,"" ,"" )
-`MPRnb( PQMTCENCV ,0.0 ,"" ,"" )
-
-`MPRnb( LQMTCENCVA ,0.0 ,"" ,"" )
-`MPRnb( NQMTCENCVA ,0.0 ,"" ,"" )
-`MPRnb( PQMTCENCVA ,0.0 ,"" ,"" )
-
-`MPRnb( LVSAT ,0.0 ,"(m^2)/s" ,"" )
-`MPRnb( NVSAT ,0.0 ,"(m^2)/s" ,"" )
-`MPRnb( PVSAT ,0.0 ,"(m^3)/s" ,"" )
-
-`MPRnb( LVSATR ,LVSAT ,"" ,"" )
-`MPRnb( NVSATR ,NVSAT ,"" ,"" )
-`MPRnb( PVSATR ,PVSAT ,"" ,"" )
-
-`MPRnb( LVSAT1 ,LVSAT ,"" ,"" )
-`MPRnb( NVSAT1 ,NVSAT ,"" ,"" )
-`MPRnb( PVSAT1 ,PVSAT ,"" ,"" )
-
-`MPRnb( LVSAT1R ,LVSAT1 ,"(m^2)/s" ,"" )
-`MPRnb( NVSAT1R ,NVSAT1 ,"(m^2)/s" ,"" )
-`MPRnb( PVSAT1R ,PVSAT1 ,"(m^3)/s" ,"" )
-
-`MPRnb( LPSAT ,0.0 ,"" ,"" )
-`MPRnb( NPSAT ,0.0 ,"" ,"" )
-`MPRnb( PPSAT ,0.0 ,"" ,"" )
-
-`MPRnb( LDELTAVSAT ,0.0 ,"" ,"" )
-`MPRnb( NDELTAVSAT ,0.0 ,"" ,"" )
-`MPRnb( PDELTAVSAT ,0.0 ,"" ,"" )
-
-`MPRnb( LKSATIV ,0.0 ,"" ,"" )
-`MPRnb( NKSATIV ,0.0 ,"" ,"" )
-`MPRnb( PKSATIV ,0.0 ,"" ,"" )
-
-`MPRnb( LKSATIVR ,LKSATIV ,"" ,"" )
-`MPRnb( NKSATIVR ,NKSATIV ,"" ,"" )
-`MPRnb( PKSATIVR ,PKSATIV ,"" ,"" )
-
-`MPRnb( LVSATCV ,0.0 ,"(m^2)/s" ,"" )
-`MPRnb( NVSATCV ,0.0 ,"(m^2)/s" ,"" )
-`MPRnb( PVSATCV ,0.0 ,"(m^3)/s" ,"" )
-
-`MPRnb( LPSATCV ,0.0 ,"" ,"" )
-`MPRnb( NPSATCV ,0.0 ,"" ,"" )
-`MPRnb( PPSATCV ,0.0 ,"" ,"" )
-
-`MPRnb( LDELTAVSATCV ,0.0 ,"" ,"" )
-`MPRnb( NDELTAVSATCV ,0.0 ,"" ,"" )
-`MPRnb( PDELTAVSATCV ,0.0 ,"" ,"" )
-
-`MPRnb( LMEXP ,0.0 ,"" ,"" )
-`MPRnb( NMEXP ,0.0 ,"" ,"" )
-`MPRnb( PMEXP ,0.0 ,"" ,"" )
-
-`MPRnb( LMEXPR ,LMEXP ,"" ,"" )
-`MPRnb( NMEXPR ,NMEXP ,"" ,"" )
-`MPRnb( PMEXPR ,PMEXP ,"" ,"" )
-
-`MPRnb( LPTWG ,0.0 ,"m*(V^-2)" ,"" )
-`MPRnb( NPTWG ,0.0 ,"m*(V^-2)" ,"" )
-`MPRnb( PPTWG ,0.0 ,"m^2*(V^-2)" ,"" )
-
-`MPRnb( LPTWGR ,LPTWG ,"m*(V^-2)" ,"" )
-`MPRnb( NPTWGR ,NPTWG ,"m*(V^-2)" ,"" )
-`MPRnb( PPTWGR ,PPTWG ,"m^2*(V^-2)" ,"" )
-
-`MPRnb( LU0 ,0.0 ,"(m^3)/V*s" ,"" )
-`MPRnb( NU0 ,0.0 ,"(m^3)/V*s" ,"" )
-`MPRnb( PU0 ,0.0 ,"(m^4)/V*s" ,"" )
-
-`MPRnb( LU0R ,LU0 ,"" ,"" )
-`MPRnb( NU0R ,NU0 ,"" ,"" )
-`MPRnb( PU0R ,PU0 ,"" ,"" )
-
-`MPRnb( LETAMOB ,0.0 ,"" ,"" )
-`MPRnb( NETAMOB ,0.0 ,"" ,"" )
-`MPRnb( PETAMOB ,0.0 ,"" ,"" )
-
-`MPRnb( LUP ,0.0 ,"m*(um^LPA)" ,"" )
-`MPRnb( NUP ,0.0 ,"m*(um^LPA)" ,"" )
-`MPRnb( PUP ,0.0 ,"m^2*(um^LPA)" ,"" )
-
-`MPRnb( LUPR ,LUP ,"" ,"" )
-`MPRnb( NUPR ,NUP ,"" ,"" )
-`MPRnb( PUPR ,PUP ,"" ,"" )
-
-`MPRnb( LUA ,0.0 ,"m*((cm/MV)^EU)" ,"" )
-`MPRnb( NUA ,0.0 ,"m*((cm/MV)^EU)" ,"" )
-`MPRnb( PUA ,0.0 ,"m^2*((cm/MV)^EU)" ,"" )
-
-`MPRnb( LUAR ,LUA ,"" ,"" )
-`MPRnb( NUAR ,NUA ,"" ,"" )
-`MPRnb( PUAR ,PUA ,"" ,"" )
-
-`MPRnb( LUC ,0.0 ,"" ,"" )
-`MPRnb( NUC ,0.0 ,"" ,"" )
-`MPRnb( PUC ,0.0 ,"" ,"" )
-
-`MPRnb( LUCR ,LUC ,"" ,"" )
-`MPRnb( NUCR ,NUC ,"" ,"" )
-`MPRnb( PUCR ,PUC ,"" ,"" )
-
-`MPRnb( LEU ,0.0 ,"m*(cm/MV)" ,"" )
-`MPRnb( NEU ,0.0 ,"m*(cm/MV)" ,"" )
-`MPRnb( PEU ,0.0 ,"m^2*(cm/MV)" ,"" )
-
-`MPRnb( LEUR ,LEU ,"" ,"" )
-`MPRnb( NEUR ,NEU ,"" ,"" )
-`MPRnb( PEUR ,PEU ,"" ,"" )
-
-`MPRnb( LUD ,0.0 ,"m*(cm/MV)" ,"" )
-`MPRnb( NUD ,0.0 ,"m*(cm/MV)" ,"" )
-`MPRnb( PUD ,0.0 ,"m^2*(cm/MV)" ,"" )
-
-`MPRnb( LUDR ,LUD ,"" ,"" )
-`MPRnb( NUDR ,NUD ,"" ,"" )
-`MPRnb( PUDR ,PUD ,"" ,"" )
-
-`MPRnb( LUCS ,0.0 ,"" ,"" )
-`MPRnb( NUCS ,0.0 ,"" ,"" )
-`MPRnb( PUCS ,0.0 ,"" ,"" )
-
-`MPRnb( LPCLM ,0.0 ,"" ,"" )
-`MPRnb( NPCLM ,0.0 ,"" ,"" )
-`MPRnb( PPCLM ,0.0 ,"" ,"" )
-
-`MPRnb( LPCLMR ,LPCLM ,"" ,"" )
-`MPRnb( NPCLMR ,NPCLM ,"" ,"" )
-`MPRnb( PPCLMR ,PPCLM ,"" ,"" )
-
-`MPRnb( LPCLMG ,0.0 ,"" ,"" )
-`MPRnb( NPCLMG ,0.0 ,"" ,"" )
-`MPRnb( PPCLMG ,0.0 ,"" ,"" )
-
-`MPRnb( LPCLMCV ,LPCLM ,"" ,"" )
-`MPRnb( NPCLMCV ,NPCLM ,"" ,"" )
-`MPRnb( PPCLMCV ,PPCLM ,"" ,"" )
-
-`MPRnb( LA1 ,0.0 ,"m*(V^-2)" ,"" )
-`MPRnb( NA1 ,0.0 ,"m*(V^-2)" ,"" )
-`MPRnb( PA1 ,0.0 ,"m^2*(V^-2)" ,"" )
-
-`MPRnb( LA11 ,0.0 ,"m*(V^-2/K)" ,"" )
-`MPRnb( NA11 ,0.0 ,"m*(V^-2/K)" ,"" )
-`MPRnb( PA11 ,0.0 ,"m^2*(V^-2/K)" ,"" )
-
-`MPRnb( LA2 ,0.0 ,"m*(V^-1)" ,"" )
-`MPRnb( NA2 ,0.0 ,"m*(V^-1)" ,"" )
-`MPRnb( PA2 ,0.0 ,"m^2*(V^-1)" ,"" )
-
-`MPRnb( LA21 ,0.0 ,"m*(V^-1/K)" ,"" )
-`MPRnb( NA21 ,0.0 ,"m*(V^-1/K)" ,"" )
-`MPRnb( PA21 ,0.0 ,"m^2*(V^-1/K)" ,"" )
-
-`MPRnb( LRDSW ,0.0 ,"m*(ohm-um^WR)" ,"" )
-`MPRnb( NRDSW ,0.0 ,"m*(ohm-um^WR)" ,"" )
-`MPRnb( PRDSW ,0.0 ,"(m^2)*(ohm-um^WR)" ,"" )
-
-`MPRnb( LRSW ,0.0 ,"m*(ohm-um^WR)" ,"" )
-`MPRnb( NRSW ,0.0 ,"m*(ohm-um^WR)" ,"" )
-`MPRnb( PRSW ,0.0 ,"(m^2)*(ohm-um^WR)" ,"" )
-
-`MPRnb( LRDW ,0.0 ,"m*(ohm-um^WR)" ,"" )
-`MPRnb( NRDW ,0.0 ,"m*(ohm-um^WR)" ,"" )
-`MPRnb( PRDW ,0.0 ,"(m^2)*(ohm-um^WR)" ,"" )
-
-`MPRnb( LPRWGS ,0.0 ,"m/V" ,"" )
-`MPRnb( NPRWGS ,0.0 ,"m/V" ,"" )
-`MPRnb( PPRWGS ,0.0 ,"(m^2)/V" ,"" )
-
-`MPRnb( LPRWGD ,0.0 ,"m/V" ,"" )
-`MPRnb( NPRWGD ,0.0 ,"m/V" ,"" )
-`MPRnb( PPRWGD ,0.0 ,"(m^2)/V" ,"" )
-
-`MPRnb( LWR ,0.0 ,"" ,"" )
-`MPRnb( NWR ,0.0 ,"" ,"" )
-`MPRnb( PWR ,0.0 ,"" ,"" )
-
-`MPRnb( LPDIBL1 ,0.0 ,"" ,"" )
-`MPRnb( NPDIBL1 ,0.0 ,"" ,"" )
-`MPRnb( PPDIBL1 ,0.0 ,"" ,"" )
-
-`MPRnb( LPDIBL1R ,LPDIBL1 ,"" ,"" )
-`MPRnb( NPDIBL1R ,NPDIBL1 ,"" ,"" )
-`MPRnb( PPDIBL1R ,PPDIBL1 ,"" ,"" )
-
-`MPRnb( LPDIBL2 ,0.0 ,"" ,"" )
-`MPRnb( NPDIBL2 ,0.0 ,"" ,"" )
-`MPRnb( PPDIBL2 ,0.0 ,"" ,"" )
-
-`MPRnb( LPDIBL2R ,LPDIBL2 ,"" ,"" )
-`MPRnb( NPDIBL2R ,NPDIBL2 ,"" ,"" )
-`MPRnb( PPDIBL2R ,PPDIBL2 ,"" ,"" )
-
-`MPRnb( LDROUT ,0.0 ,"" ,"" )
-`MPRnb( NDROUT ,0.0 ,"" ,"" )
-`MPRnb( PDROUT ,0.0 ,"" ,"" )
-
-`MPRnb( LPVAG ,0.0 ,"" ,"" )
-`MPRnb( NPVAG ,0.0 ,"" ,"" )
-`MPRnb( PPVAG ,0.0 ,"" ,"" )
-
-`MPRnb( LAIGBINV ,0.0 ,"(F*s^2/g)^0.5" ,"" )
-`MPRnb( NAIGBINV ,0.0 ,"(F*s^2/g)^0.5" ,"" )
-`MPRnb( PAIGBINV ,0.0 ,"((F*s^2/g)^0.5)*m" ,"" )
-
-`MPRnb( LAIGBINV1 ,0.0 ,"((F*s^2/g)^0.5)/K" ,"" )
-`MPRnb( NAIGBINV1 ,0.0 ,"((F*s^2/g)^0.5)/K" ,"" )
-`MPRnb( PAIGBINV1 ,0.0 ,"((F*s^2/g)^0.5)*(m/K)" ,"" )
-
-`MPRnb( LBIGBINV ,0.0 ,"((F*s^2/g)^0.5)/V" ,"" )
-`MPRnb( NBIGBINV ,0.0 ,"((F*s^2/g)^0.5)/V" ,"" )
-`MPRnb( PBIGBINV ,0.0 ,"((F*s^2/g)^0.5)*(m/V)" ,"" )
-
-`MPRnb( LCIGBINV ,0.0 ,"m/V" ,"" )
-`MPRnb( NCIGBINV ,0.0 ,"m/V" ,"" )
-`MPRnb( PCIGBINV ,0.0 ,"(m^2)/V" ,"" )
-
-`MPRnb( LEIGBINV ,0.0 ,"m*V" ,"" )
-`MPRnb( NEIGBINV ,0.0 ,"m*V" ,"" )
-`MPRnb( PEIGBINV ,0.0 ,"(m^2)*V" ,"" )
-
-`MPRnb( LNIGBINV ,0.0 ,"" ,"" )
-`MPRnb( NNIGBINV ,0.0 ,"" ,"" )
-`MPRnb( PNIGBINV ,0.0 ,"" ,"" )
-
-`MPRnb( LAIGBACC ,0.0 ,"(F*s^2/g)^0.5" ,"" )
-`MPRnb( NAIGBACC ,0.0 ,"(F*s^2/g)^0.5" ,"" )
-`MPRnb( PAIGBACC ,0.0 ,"((F*s^2/g)^0.5)*m" ,"" )
-
-`MPRnb( LAIGBACC1 ,0.0 ,"((F*s^2/g)^0.5)/K" ,"" )
-`MPRnb( NAIGBACC1 ,0.0 ,"((F*s^2/g)^0.5)/K" ,"" )
-`MPRnb( PAIGBACC1 ,0.0 ,"((F*s^2/g)^0.5)*(m/K)" ,"" )
-
-`MPRnb( LBIGBACC ,0.0 ,"((F*s^2/g)^0.5)/V" ,"" )
-`MPRnb( NBIGBACC ,0.0 ,"((F*s^2/g)^0.5)/V" ,"" )
-`MPRnb( PBIGBACC ,0.0 ,"((F*s^2/g)^0.5)*(m/V)" ,"" )
-
-`MPRnb( LCIGBACC ,0.0 ,"m/V" ,"" )
-`MPRnb( NCIGBACC ,0.0 ,"m/V" ,"" )
-`MPRnb( PCIGBACC ,0.0 ,"(m^2)/V" ,"" )
-
-`MPRnb( LNIGBACC ,0.0 ,"" ,"" )
-`MPRnb( NNIGBACC ,0.0 ,"" ,"" )
-`MPRnb( PNIGBACC ,0.0 ,"" ,"" )
-
-`MPRnb( LAIGC ,0.0 ,"(F*s^2/g)^0.5" ,"" )
-`MPRnb( NAIGC ,0.0 ,"(F*s^2/g)^0.5" ,"" )
-`MPRnb( PAIGC ,0.0 ,"((F*s^2/g)^0.5)*m" ,"" )
-
-`MPRnb( LAIGC1 ,0.0 ,"((F*s^2/g)^0.5)/K" ,"" )
-`MPRnb( NAIGC1 ,0.0 ,"((F*s^2/g)^0.5)/K" ,"" )
-`MPRnb( PAIGC1 ,0.0 ,"((F*s^2/g)^0.5)*(m/K)" ,"" )
-
-`MPRnb( LBIGC ,0.0 ,"((F*s^2/g)^0.5)/V" ,"" )
-`MPRnb( NBIGC ,0.0 ,"((F*s^2/g)^0.5)/V" ,"" )
-`MPRnb( PBIGC ,0.0 ,"((F*s^2/g)^0.5)*(m/V)" ,"" )
-
-`MPRnb( LCIGC ,0.0 ,"m/V" ,"" )
-`MPRnb( NCIGC ,0.0 ,"m/V" ,"" )
-`MPRnb( PCIGC ,0.0 ,"(m^2)/V" ,"" )
-
-`MPRnb( LPIGCD ,0.0 ,"" ,"" )
-`MPRnb( NPIGCD ,0.0 ,"" ,"" )
-`MPRnb( PPIGCD ,0.0 ,"" ,"" )
-
-`MPRnb( LAIGS ,0.0 ,"(F*s^2/g)^0.5" ,"" )
-`MPRnb( NAIGS ,0.0 ,"(F*s^2/g)^0.5" ,"" )
-`MPRnb( PAIGS ,0.0 ,"((F*s^2/g)^0.5)*m" ,"" )
-
-`MPRnb( LAIGS1 ,0.0 ,"((F*s^2/g)^0.5)/K" ,"" )
-`MPRnb( NAIGS1 ,0.0 ,"((F*s^2/g)^0.5)/K" ,"" )
-`MPRnb( PAIGS1 ,0.0 ,"((F*s^2/g)^0.5)*(m/K)" ,"" )
-
-`MPRnb( LBIGS ,0.0 ,"((F*s^2/g)^0.5)/V" ,"" )
-`MPRnb( NBIGS ,0.0 ,"((F*s^2/g)^0.5)/V" ,"" )
-`MPRnb( PBIGS ,0.0 ,"((F*s^2/g)^0.5)*(m/V)" ,"" )
-
-`MPRnb( LCIGS ,0.0 ,"m/V" ,"" )
-`MPRnb( NCIGS ,0.0 ,"m/V" ,"" )
-`MPRnb( PCIGS ,0.0 ,"(m^2)/V" ,"" )
-
-`MPRnb( LAIGD ,LAIGS ,"(F*s^2/g)^0.5" ,"" )
-`MPRnb( NAIGD ,NAIGS ,"(F*s^2/g)^0.5" ,"" )
-`MPRnb( PAIGD ,PAIGS ,"((F*s^2/g)^0.5)*m" ,"" )
-
-`MPRnb( LAIGD1 ,LAIGS1 ,"((F*s^2/g)^0.5)/K" ,"" )
-`MPRnb( NAIGD1 ,NAIGS1 ,"((F*s^2/g)^0.5)/K" ,"" )
-`MPRnb( PAIGD1 ,PAIGS1 ,"((F*s^2/g)^0.5)*(m/K)" ,"" )
-
-`MPRnb( LBIGD ,LBIGS ,"((F*s^2/g)^0.5)/V" ,"" )
-`MPRnb( NBIGD ,NBIGS ,"((F*s^2/g)^0.5)/V" ,"" )
-`MPRnb( PBIGD ,PBIGS ,"((F*s^2/g)^0.5)*(m/V)" ,"" )
-
-`MPRnb( LCIGD ,LCIGS ,"m/V" ,"" )
-`MPRnb( NCIGD ,NCIGS ,"m/V" ,"" )
-`MPRnb( PCIGD ,PCIGS ,"(m^2)/V" ,"" )
-
-`MPRnb( LNTOX ,0.0 ,"" ,"" )
-`MPRnb( NNTOX ,0.0 ,"" ,"" )
-`MPRnb( PNTOX ,0.0 ,"" ,"" )
-
-`MPRnb( LPOXEDGE ,0.0 ,"" ,"" )
-`MPRnb( NPOXEDGE ,0.0 ,"" ,"" )
-`MPRnb( PPOXEDGE ,0.0 ,"" ,"" )
-
-`MPRnb( LAGISL ,0.0 ,"m/ohm" ,"" )
-`MPRnb( NAGISL ,0.0 ,"m/ohm" ,"" )
-`MPRnb( PAGISL ,0.0 ,"(m^2)/ohm" ,"" )
-
-`MPRnb( LBGISL ,0.0 ,"V" ,"" )
-`MPRnb( NBGISL ,0.0 ,"V" ,"" )
-`MPRnb( PBGISL ,0.0 ,"m*V" ,"" )
-
-`MPRnb( LCGISL ,0.0 ,"m*(V^3)" ,"" )
-`MPRnb( NCGISL ,0.0 ,"m*(V^3)" ,"" )
-`MPRnb( PCGISL ,0.0 ,"(m^2)*(V^3)" ,"" )
-
-`MPRnb( LEGISL ,0.0 ,"m*V" ,"" )
-`MPRnb( NEGISL ,0.0 ,"m*V" ,"" )
-`MPRnb( PEGISL ,0.0 ,"(m^2)*V" ,"" )
-
-`MPRnb( LPGISL ,0.0 ,"" ,"" )
-`MPRnb( NPGISL ,0.0 ,"" ,"" )
-`MPRnb( PPGISL ,0.0 ,"" ,"" )
-
-`MPRnb( LAGIDL ,LAGISL ,"m/ohm" ,"" )
-`MPRnb( NAGIDL ,NAGISL ,"m/ohm" ,"" )
-`MPRnb( PAGIDL ,PAGISL ,"(m^2)/ohm" ,"" )
-
-`MPRnb( LBGIDL ,LBGISL ,"V" ,"" )
-`MPRnb( NBGIDL ,NBGISL ,"V" ,"" )
-`MPRnb( PBGIDL ,PBGISL ,"m*V" ,"" )
-
-`MPRnb( LCGIDL ,LCGISL ,"m*(V^3)" ,"" )
-`MPRnb( NCGIDL ,NCGISL ,"m*(V^3)" ,"" )
-`MPRnb( PCGIDL ,PCGISL ,"(m^2)*(V^3)" ,"" )
-
-`MPRnb( LEGIDL ,LEGISL ,"m*V" ,"" )
-`MPRnb( NEGIDL ,NEGISL ,"m*V" ,"" )
-`MPRnb( PEGIDL ,PEGISL ,"(m^2)*V" ,"" )
-
-`MPRnb( LPGIDL ,LPGISL ,"" ,"" )
-`MPRnb( NPGIDL ,NPGISL ,"" ,"" )
-`MPRnb( PPGIDL ,PPGISL ,"" ,"" )
-
-`MPRnb( LALPHA0 ,0.0 ,"(m^2)/V" ,"" )
-`MPRnb( NALPHA0 ,0.0 ,"(m^2)/V" ,"" )
-`MPRnb( PALPHA0 ,0.0 ,"(m^3)/V" ,"" )
-
-`MPRnb( LALPHA1 ,0.0 ,"m/V" ,"" )
-`MPRnb( NALPHA1 ,0.0 ,"m/V" ,"" )
-`MPRnb( PALPHA1 ,0.0 ,"(m^2)/V" ,"" )
-
-`MPRnb( LALPHAII0 ,0.0 ,"(m^2)/V" ,"" )
-`MPRnb( NALPHAII0 ,0.0 ,"(m^2)/V" ,"" )
-`MPRnb( PALPHAII0 ,0.0 ,"(m^3)/V" ,"" )
-
-`MPRnb( LALPHAII1 ,0.0 ,"m/V" ,"" )
-`MPRnb( NALPHAII1 ,0.0 ,"m/V" ,"" )
-`MPRnb( PALPHAII1 ,0.0 ,"(m^2)/V" ,"" )
-
-`MPRnb( LBETA0 ,0.0 ,"m/V" ,"" )
-`MPRnb( NBETA0 ,0.0 ,"m/V" ,"" )
-`MPRnb( PBETA0 ,0.0 ,"(m^2)/V" ,"" )
-
-`MPRnb( LBETAII0 ,0.0 ,"m/V" ,"" )
-`MPRnb( NBETAII0 ,0.0 ,"m/V" ,"" )
-`MPRnb( PBETAII0 ,0.0 ,"(m^2)/V" ,"" )
-
-`MPRnb( LBETAII1 ,0.0 ,"" ,"" )
-`MPRnb( NBETAII1 ,0.0 ,"" ,"" )
-`MPRnb( PBETAII1 ,0.0 ,"" ,"" )
-
-`MPRnb( LBETAII2 ,0.0 ,"m*V" ,"" )
-`MPRnb( NBETAII2 ,0.0 ,"m*V" ,"" )
-`MPRnb( PBETAII2 ,0.0 ,"(m^2)*V" ,"" )
-
-`MPRnb( LESATII ,0.0 ,"V" ,"" )
-`MPRnb( NESATII ,0.0 ,"V" ,"" )
-`MPRnb( PESATII ,0.0 ,"m*V" ,"" )
-
-`MPRnb( LLII ,0.0 ,"(m^2)*V" ,"" )
-`MPRnb( NLII ,0.0 ,"(m^2)*V" ,"" )
-`MPRnb( PLII ,0.0 ,"(m^3)*V" ,"" )
-
-`MPRnb( LSII0 ,0.0 ,"m/V" ,"" )
-`MPRnb( NSII0 ,0.0 ,"m/V" ,"" )
-`MPRnb( PSII0 ,0.0 ,"(m^2)/V" ,"" )
-
-`MPRnb( LSII1 ,0.0 ,"" ,"" )
-`MPRnb( NSII1 ,0.0 ,"" ,"" )
-`MPRnb( PSII1 ,0.0 ,"" ,"" )
-
-`MPRnb( LSII2 ,0.0 ,"m*V" ,"" )
-`MPRnb( NSII2 ,0.0 ,"m*V" ,"" )
-`MPRnb( PSII2 ,0.0 ,"(m^2)*V" ,"" )
-
-`MPRnb( LSIID ,0.0 ,"m*V" ,"" )
-`MPRnb( NSIID ,0.0 ,"m*V" ,"" )
-`MPRnb( PSIID ,0.0 ,"(m^2)*V" ,"" )
-
-`MPRnb( LCFS ,0.0 ,"F" ,"" )
-`MPRnb( NCFS ,0.0 ,"F" ,"" )
-`MPRnb( PCFS ,0.0 ,"F*m" ,"" )
-
-`MPRnb( LCFD ,LCFS ,"F" ,"" )
-`MPRnb( NCFD ,NCFS ,"F" ,"" )
-`MPRnb( PCFD ,PCFS ,"F*m" ,"" )
-
-`MPRnb( LCOVS ,0.0 ,"F" ,"" )
-`MPRnb( NCOVS ,0.0 ,"F" ,"" )
-`MPRnb( PCOVS ,0.0 ,"F*m" ,"" )
-
-`MPRnb( LCOVD ,LCOVS ,"F" ,"" )
-`MPRnb( NCOVD ,NCOVS ,"F" ,"" )
-`MPRnb( PCOVD ,PCOVS ,"F*m" ,"" )
-
-`MPRnb( LCGSL ,0.0 ,"F" ,"" )
-`MPRnb( NCGSL ,0.0 ,"F" ,"" )
-`MPRnb( PCGSL ,0.0 ,"F*m" ,"" )
-
-`MPRnb( LCGDL ,LCGSL ,"F" ,"" )
-`MPRnb( NCGDL ,NCGSL ,"F" ,"" )
-`MPRnb( PCGDL ,PCGSL ,"F*m" ,"" )
-
-`MPRnb( LCKAPPAS ,0.0 ,"m*V" ,"" )
-`MPRnb( NCKAPPAS ,0.0 ,"m*V" ,"" )
-`MPRnb( PCKAPPAS ,0.0 ,"(m^2)*V" ,"" )
-
-`MPRnb( LCKAPPAD ,LCKAPPAS ,"m*V" ,"" )
-`MPRnb( NCKAPPAD ,NCKAPPAS ,"m*V" ,"" )
-`MPRnb( PCKAPPAD ,PCKAPPAS ,"(m^2)*V" ,"" )
-
-`MPRnb( LCGBL ,0.0 ,"F" ,"" )
-`MPRnb( NCGBL ,0.0 ,"F" ,"" )
-`MPRnb( PCGBL ,0.0 ,"F*m" ,"" )
-
-`MPRnb( LCKAPPAB ,0.0 ,"m*V" ,"" )
-`MPRnb( NCKAPPAB ,0.0 ,"m*V" ,"" )
-`MPRnb( PCKAPPAB ,0.0 ,"(m^2)*V" ,"" )
-
-`MPRnb( LNTGEN ,0.0 ,"" ,"" )
-`MPRnb( NNTGEN ,0.0 ,"" ,"" )
-`MPRnb( PNTGEN ,0.0 ,"" ,"" )
-
-`MPRnb( LAIGEN ,0.0 ,"(m^-2)*(V^-1)" ,"" )
-`MPRnb( NAIGEN ,0.0 ,"(m^-2)*(V^-1)" ,"" )
-`MPRnb( PAIGEN ,0.0 ,"(m^-1)*(V^-1)" ,"" )
-
-`MPRnb( LBIGEN ,0.0 ,"(m^-2)*(V^-3)" ,"" )
-`MPRnb( NBIGEN ,0.0 ,"(m^-2)*(V^-3)" ,"" )
-`MPRnb( PBIGEN ,0.0 ,"(m^-1)*(V^-3)" ,"" )
-
-`MPRnb( LXRCRG1 ,0.0 ,"" ,"" )
-`MPRnb( NXRCRG1 ,0.0 ,"" ,"" )
-`MPRnb( PXRCRG1 ,0.0 ,"" ,"" )
-
-`MPRnb( LXRCRG2 ,0.0 ,"" ,"" )
-`MPRnb( NXRCRG2 ,0.0 ,"" ,"" )
-`MPRnb( PXRCRG2 ,0.0 ,"" ,"" )
-
-`MPRnb( LUTE ,0.0 ,"" ,"" )
-`MPRnb( NUTE ,0.0 ,"" ,"" )
-`MPRnb( PUTE ,0.0 ,"" ,"" )
-
-`MPRnb( LUTER ,LUTE ,"" ,"" )
-`MPRnb( NUTER ,NUTE ,"" ,"" )
-`MPRnb( PUTER ,PUTE ,"" ,"" )
-
-`MPRnb( LUTL ,0.0 ,"" ,"" )
-`MPRnb( NUTL ,0.0 ,"" ,"" )
-`MPRnb( PUTL ,0.0 ,"" ,"" )
-
-`MPRnb( LUTLR ,LUTL ,"" ,"" )
-`MPRnb( NUTLR ,NUTL ,"" ,"" )
-`MPRnb( PUTLR ,PUTL ,"" ,"" )
-
-`MPRnb( LEMOBT ,0.0 ,"" ,"" )
-`MPRnb( NEMOBT ,0.0 ,"" ,"" )
-`MPRnb( PEMOBT ,0.0 ,"" ,"" )
-
-`MPRnb( LUA1 ,0.0 ,"" ,"" )
-`MPRnb( NUA1 ,0.0 ,"" ,"" )
-`MPRnb( PUA1 ,0.0 ,"" ,"" )
-
-`MPRnb( LUA1R ,LUA1 ,"" ,"" )
-`MPRnb( NUA1R ,NUA1 ,"" ,"" )
-`MPRnb( PUA1R ,PUA1 ,"" ,"" )
-
-`MPRnb( LUC1 ,0.0 ,"" ,"" )
-`MPRnb( NUC1 ,0.0 ,"" ,"" )
-`MPRnb( PUC1 ,0.0 ,"" ,"" )
-
-`MPRnb( LUC1R ,LUC1 ,"" ,"" )
-`MPRnb( NUC1R ,NUC1 ,"" ,"" )
-`MPRnb( PUC1R ,PUC1 ,"" ,"" )
-
-`MPRnb( LUD1 ,0.0 ,"" ,"" )
-`MPRnb( NUD1 ,0.0 ,"" ,"" )
-`MPRnb( PUD1 ,0.0 ,"" ,"" )
-
-`MPRnb( LUD1R ,LUD1 ,"" ,"" )
-`MPRnb( NUD1R ,NUD1 ,"" ,"" )
-`MPRnb( PUD1R ,PUD1 ,"" ,"" )
-
-`MPRnb( LUCSTE ,0.0 ,"" ,"" )
-`MPRnb( NUCSTE ,0.0 ,"" ,"" )
-`MPRnb( PUCSTE ,0.0 ,"" ,"" )
-
-`MPRnb( LPTWGT ,0.0 ,"m/K" ,"" )
-`MPRnb( NPTWGT ,0.0 ,"m/K" ,"" )
-`MPRnb( PPTWGT ,0.0 ,"(m^2)/K" ,"" )
-
-`MPRnb( LAT ,0.0 ,"m/K" ,"" )
-`MPRnb( NAT ,0.0 ,"m/K" ,"" )
-`MPRnb( PAT ,0.0 ,"(m^2)/K" ,"" )
-
-`MPRnb( LATR ,LAT ,"" ,"" )
-`MPRnb( NATR ,NAT ,"" ,"" )
-`MPRnb( PATR ,PAT ,"" ,"" )
-
-`MPRnb( LATCV ,0.0 ,"m/K" ,"" )
-`MPRnb( NATCV ,0.0 ,"m/K" ,"" )
-`MPRnb( PATCV ,0.0 ,"(m^2)/K" ,"" )
-
-`MPRnb( LSTTHETASAT ,0.0 ,"" ,"" )
-`MPRnb( NSTTHETASAT ,0.0 ,"" ,"" )
-`MPRnb( PSTTHETASAT ,0.0 ,"" ,"" )
-
-`MPRnb( LPRT ,0.0 ,"m/K" ,"" )
-`MPRnb( NPRT ,0.0 ,"m/K" ,"" )
-`MPRnb( PPRT ,0.0 ,"(m^2)/K" ,"" )
-
-`MPRnb( LKT1 ,0.0 ,"m*V" ,"" )
-`MPRnb( NKT1 ,0.0 ,"m*V" ,"" )
-`MPRnb( PKT1 ,0.0 ,"(m^2)*V" ,"" )
-
-`MPRnb( LTSS ,0.0 ,"" ,"" )
-`MPRnb( NTSS ,0.0 ,"" ,"" )
-`MPRnb( PTSS ,0.0 ,"" ,"" )
-
-`MPRnb( LIIT ,0.0 ,"" ,"" )
-`MPRnb( NIIT ,0.0 ,"" ,"" )
-`MPRnb( PIIT ,0.0 ,"" ,"" )
-
-`MPRnb( LTII ,0.0 ,"" ,"" )
-`MPRnb( NTII ,0.0 ,"" ,"" )
-`MPRnb( PTII ,0.0 ,"" ,"" )
-
-`MPRnb( LTGIDL ,0.0 ,"m/K" ,"" )
-`MPRnb( NTGIDL ,0.0 ,"m/K" ,"" )
-`MPRnb( PTGIDL ,0.0 ,"(m^2)/K" ,"" )
-
-`MPRnb( LIGT ,0.0 ,"" ,"" )
-`MPRnb( NIGT ,0.0 ,"" ,"" )
-`MPRnb( PIGT ,0.0 ,"" ,"" )
diff --git a/src/spicelib/devices/adms/bsimcmg/admsva/bsimcmg_body.include b/src/spicelib/devices/adms/bsimcmg/admsva/bsimcmg_body.include
deleted file mode 100644
index fdb851974..000000000
--- a/src/spicelib/devices/adms/bsimcmg/admsva/bsimcmg_body.include
+++ /dev/null
@@ -1,4145 +0,0 @@
-// ********************************************************
-// ********************************************************
-// *** BSIM-CMG 110.0.0 released by Sourabh Khandelwal on 01/01/2016 ****/
-// * BSIM Common Multi-Gate Model Equations (Verilog-A)
-// ********************************************************
-//
-// ********************************************************
-// * Copyright 2016 Regents of the University of California.
-// * All rights reserved.
-// *
-// * Project Director: Prof. Chenming Hu.
-// * Authors: Sriramkumar V., Navid Paydavosi, Juan Duarte, Sourabh Khandelwal, Darsen Lu,
-// * Chung-Hsun Lin, Mohan Dunga, Shijing Yao,
-// * Ali Niknejad, Chenming Hu
-// ********************************************************
-// ********************************************************
-// * NONDISCLOSURE STATEMENT
-// Software is distributed as is, completely without warranty or service
-// support. The University of California and its employees are not liable
-// for the condition or performance of the software.
-// The University of California owns the copyright and grants users a perpetual,
-// irrevocable, worldwide, non-exclusive, royalty-free license with
-// respect to the software as set forth below.
-// The University of California hereby disclaims all implied warranties.
-// The University of California grants the users the right to modify, copy,
-// and redistribute the software and documentation, both within the user's
-// organization and externally, subject to the following restrictions
-// 1. The users agree not to charge for the University of California code
-// itself but may charge for additions, extensions, or support.
-// 2. In any product based on the software, the users agree to acknowledge
-// the University of California that developed the software. This
-// acknowledgment shall appear in the product documentation.
-// 3. The users agree to obey all U.S. Government restrictions governing
-// redistribution or export of the software.
-// 4. The users agree to reproduce any copyright notice which appears on
-// the software on any copy or modification of such made available
-// to others
-// Agreed to on __Jan 01, 2016__________________
-// By: ___University of California, Berkeley____
-// ___Chenming Hu_____________________
-// ___Professor in Graduate School _______
-// ********************************************************
-
-// Clamped Exponential Function
-analog function real lexp;
- input x;
- real x;
-
- begin
- if (x > `EXPL_THRESHOLD) begin
- lexp = `MAX_EXPL * (1.0 + x - `EXPL_THRESHOLD);
- end else if (x < -`EXPL_THRESHOLD) begin
- lexp = `MIN_EXPL;
- end else begin
- lexp = exp(x);
- end
- end
-endfunction
-
-// Clamped log Function
-analog function real lln;
- input x;
- real x;
-
- begin
- lln = ln(max(x, `N_MINLOG));
- end
-endfunction
-
-// Hyperbolic Smoothing Function
-analog function real hypsmooth;
- input x, c;
- real x, c;
-
- begin
- hypsmooth = 0.5 * (x + sqrt(x * x + 4.0 * c * c));
- end
-endfunction
-
-// Hyperbolic Smoothing max Function
-analog function real hypmax;
- input x, xmin, c;
- real x, xmin, c;
-
- begin
- hypmax = xmin + 0.5 * (x - xmin - c + sqrt((x - xmin - c) * (x - xmin - c) - 4.0 * xmin * c));
- end
-endfunction
-
-// Temperature Dependence Type
-analog function real Tempdep;
- input PARAML, PARAMT, DELTEMP, TEMPMOD;
- real PARAML, PARAMT, DELTEMP, TEMPMOD;
-
- begin
- if (TEMPMOD != 0) begin
- Tempdep = PARAML + hypmax(PARAMT * DELTEMP, -PARAML, 1.0e-6);
- end else begin
- Tempdep = PARAML * hypsmooth(1.0 + PARAMT * DELTEMP - 1.0e-6, 1.0e-3);
- end
- end
-endfunction
-
-// Node Definitions
-`ifdef __RGATEMOD__
- `define GateEdgeNode ge
-`else
- `define GateEdgeNode g
-`endif
-`ifdef __NQSMOD1__
- `define IntrinsicGate gi
-`else
- `define IntrinsicGate `GateEdgeNode
-`endif
-
-// ***************************
-// * Instance Parameters *
-// ***************************
-
-// Note: Some instance parameters are also model parameters. Please refer to the technical note for details.
-`IPRco( L ,3.0e-8 ,"m" ,1.0e-9 ,inf ,"Designed gate length" )
-`IPRco( D ,4.0e-8 ,"m" ,1.0e-9 ,inf ,"Diameter of the cylinder (GEOMOD=3)" )
-`IPRco( TFIN ,1.5e-8 ,"m" ,1.0e-9 ,inf ,"Body (fin) thickness" )
-`IPRco( FPITCH ,8.0e-8 ,"m" ,TFIN ,inf ,"Fin pitch" )
-`IPIco( NF ,1 ,"" ,1 ,inf ,"Number of fingers" )
-`IPRoz( NFIN ,1.0 ,"" ,"Number of fins per finger (real number enables optimization)" )
-`IPIcc( NGCON ,1 ,"" ,1 ,2 ,"Number of gate contact (1 or 2 sided)" )
-`IPRcz( ASEO ,0.0 ,"m^2" ,"Source-to-substrate overlap area through oxide" )
-`IPRcz( ADEO ,0.0 ,"m^2" ,"Drain-to-substrate overlap area through oxide" )
-`IPRcz( PSEO ,0.0 ,"m" ,"Perimeter of source-to-substrate overlap region through oxide" )
-`IPRcz( PDEO ,0.0 ,"m" ,"Perimeter of drain-to-substrate overlap region through oxide" )
-`IPRcz( ASEJ ,0.0 ,"m^2" ,"Source junction area (BULKMOD=1 or 2)" )
-`IPRcz( ADEJ ,0.0 ,"m^2" ,"Drain junction area (BULKMOD=1 or 2)" )
-`IPRcz( PSEJ ,0.0 ,"m" ,"Source-to-substrate PN junction perimeter (BULKMOD=1 or 2)" )
-`IPRcz( PDEJ ,0.0 ,"m" ,"Drain-to-substrate PN junction perimeter (BULKMOD=1 or 2)" )
-`IPRcz( COVS ,0.0 ,"F/m" ,"Constant gate-to-source overlap capacitance (CGEOMOD=1)" )
-`IPRcz( COVD ,COVS ,"F/m" ,"Constant gate-to-drain overlap capacitance (CGEOMOD=1)" )
-`IPRcz( CGSP ,0.0 ,"F/m" ,"Constant gate-to-source fringe capacitance (CGEOMOD=1)" )
-`IPRcz( CGDP ,0.0 ,"F/m" ,"Constant gate-to-drain fringe capacitance (CGEOMOD=1)" )
-`IPRcz( CDSP ,0.0 ,"F" ,"Constant drain-to-source fringe capacitance (all CGEOMOD)" )
-`IPRcz( NRS ,0.0 ,"" ,"Number of source diffusion squares" )
-`IPRcz( NRD ,0.0 ,"" ,"Number of source diffusion squares" )
-`IPRoz( LRSD ,L ,"m" ,"Length of the source/drain" )
-`IPRoz( NFINNOM ,1.0 ,"" ,"Nominal number of fins per finger" )
-
-// Variability Handles
-`MPRnb( XL ,0.0 ,"m" ,"L offset for channel length due to mask/etch effect" )
-`MPRnb( DTEMP ,0.0 ,"Celsius" ,"Variability in device temperature" )
-`MPRnb( DELVTRAND ,0.0 ,"V" ,"Variability in Vth" )
-`MPRcz( U0MULT ,1.0 ,"" ,"Variability in carrier mobility" )
-`MPRcz( IDS0MULT ,1.0 ,"" ,"Variability in drain current for miscellaneous reasons" )
-
-// ************************
-// * Model Parameters *
-// ************************
-`MPIcc( DEVTYPE ,`ntype ,"" ,`ptype ,`ntype ,"0: PMOS; 1: NMOS" )
-`MPIcc( TYPE ,DEVTYPE ,"" ,`ptype ,`ntype ,"0: PMOS; 1: NMOS" )
-`MPIcc( BULKMOD ,0 ,"" ,0 ,2 ,"0: SOI multi-gate; 1: Bulk multi-gate; 2: for decoupled bulk multi-gate" )
-`MPIcc( GEOMOD ,0 ,"" ,0 ,4 ,"0: Double gate; 1: Triple gate; 2: Quadruple gate; 3: Cylindrical gate; 4: Unified fin Shape" )
-`MPIcc( CGEO1SW ,0 ,"" ,0 ,1 ,"For CGEOMOD=1 only, this switch enables the parameters COVS, COVD, CGSP, and CGDP to be in F per fin, per gate-finger, per unit channel width" )
-`MPIcc( RDSMOD ,0 ,"" ,0 ,2 ,"0: Internal S/D resistance model; 1: External S/D resistance model; 2: Both bias dependent and independent part of S/D resistance internal" )
-`MPIcc( ASYMMOD ,0 ,"" ,0 ,1 ,"0: Turn off asymmetry model - forward mode parameters used; 1: Turn on asymmetry model" )
-`MPIcc( IGCMOD ,0 ,"" ,0 ,1 ,"0: Turn off Igc, Igs and Igd; 1: Turn on Igc, Igs and Igd" )
-`MPIcc( IGBMOD ,0 ,"" ,0 ,1 ,"0: Turn off Igb; 1: Turn on Igb" )
-`MPIcc( GIDLMOD ,0 ,"" ,0 ,1 ,"0: Turn off GIDL/GISL current; 1: Turn on GIDL/GISL current" )
-`MPIcc( IIMOD ,0 ,"" ,0 ,2 ,"0: Turn off impact ionization current; 1: BSIM4-based model; 2: BSIMSOI-based model" )
-`MPIcc( TNOIMOD ,0 ,"" ,0 ,1 ,"0: Charge-based, 1: Correlated thermal noise model" )
-`MPIcc( NQSMOD ,0 ,"" ,0 ,2 ,"0: Turn off NQS model; 1: NQS gate resistance (with gi node); 2: NQS charge deficit model from BSIM4 (with q node)" )
-`MPIcc( SHMOD ,0 ,"" ,0 ,1 ,"0: Turn off self-heating; 1: Turn on self-heating" )
-`MPIcc( TEMPMOD ,0 ,"" ,0 ,1 ,"1: Change temperature dependence of specific parameters" )
-`MPIcc( RGATEMOD ,0 ,"" ,0 ,1 ,"0: Turn off gate electrode resistance (without ge node); 1: Turn on gate electrode resistance (with ge node)" )
-`MPIcc( RGEOMOD ,0 ,"" ,0 ,1 ,"Geometry-dependent source/drain resistance; 0: RSH-based; 1: Holistic" )
-`MPIcc( CGEOMOD ,0 ,"" ,0 ,2 ,"Geometry-dependent parasitic capacitance model selector" )
-`MPIcc( SH_WARN ,0 ,"" ,0 ,1 ,"0: Disable self-heating warnings; 1: Enable self-heating warnings" )
-`MPIcc( IGCLAMP ,1 ,"" ,0 ,1 ,"0: Disable gate current clamps; 1: Enable gate current clamps" )
-`MPRnb( LINT ,0.0 ,"m" ,"Length reduction parameter (dopant diffusion effect)" )
-`MPRnb( LL ,0.0 ,"m^(LLN+1)" ,"Length reduction parameter (dopant diffusion effect)" )
-`MPRnb( LLN ,1.0 ,"" ,"Length reduction parameter (dopant diffusion effect)" )
-`MPRnb( DLC ,0.0 ,"m" ,"Delta L for C-V model" )
-`MPRnb( DLCACC ,0.0 ,"m" ,"Delta L for C-V model in accumulation region (BULKMOD=1 or 2)" )
-`MPRnb( DLBIN ,0.0 ,"m" ,"Delta L for binning" )
-`MPRnb( LLC ,0.0 ,"m^(LLN+1)" ,"Length reduction parameter (dopant diffusion effect)" )
-`MPRco( EOT ,1.0e-9 ,"m" ,1.0e-10 ,inf ,"Equivalent oxide thickness" )
-`MPRco( TOXP ,1.2e-9 ,"m" ,1.0e-10 ,inf ,"Physical oxide thickness" )
-`MPRco( EOTBOX ,1.4e-7 ,"m" ,1.0e-9 ,inf ,"Equivalent oxide thickness of the buried oxide (SOI FinFET)" )
-`MPRco( HFIN ,3.0e-8 ,"m" ,1.0e-9 ,inf ,"Fin height" )
-`MPRcz( FECH ,1.0 ,"" ,"End-channel factor for different orientation/shape" )
-`MPRnb( DELTAW ,0.0 ,"m" ,"Change of effective width due to shape of fin/cylinder" )
-`MPRcz( FECHCV ,1.0 ,"" ,"CV end-channel factor for different orientation/shape" )
-`MPRnb( DELTAWCV ,0.0 ,"m" ,"CV change of effective width due to shape of fin/cylinder" )
-`MPRnb( NBODY ,1.0e22 ,"/m^3" ,"Channel (body) doping" )
-`MPRnb( NBODYN1 ,0.0 ,"" ,"NFIN dependence of channel (body) doping" )
-`MPRex( NBODYN2 ,1.0e5 ,"" ,0.0 ,"NFIN dependence of channel (body) doping" )
-`MPRcc( NSD ,2.0e26 ,"/m^3" ,2.0e25 ,1.0e27 ,"Source/drain active doping concentration" )
-`MPRcz( PHIG ,4.61 ,"eV" ,"Gate workfunction" )
-`MPRnb( PHIGL ,0.0 ,"eV/m" ,"Length dependence of gate workfunction" )
-`MPRnb( PHIGLT ,0.0 ,"/m" ,"Coupled NFIN and length dependence of gate workfunction" )
-`MPRnb( PHIGN1 ,0.0 ,"" ,"NFIN dependence of gate workfunction" )
-`MPRex( PHIGN2 ,1.0e5 ,"" ,0.0 ,"NFIN dependence of gate workfunction" )
-`MPRco( EPSROX ,3.9 ,"" ,1.0 ,inf ,"Relative dielectric constant of the gate dielectric" )
-`MPRco( EPSRSUB ,11.9 ,"" ,1.0 ,inf ,"Relative dielectric constant of the channel material" )
-`MPRcz( EASUB ,4.05 ,"eV" ,"Electron affinity of substrate" )
-`MPRnb( NI0SUB ,1.1e16 ,"/m^3" ,"Intrinsic carrier constant at 300.15K" )
-`MPRnb( BG0SUB ,1.12 ,"eV" ,"Bandgap of substrate at 300.15K" )
-`MPRnb( NC0SUB ,2.86e25 ,"/m^3" ,"Conduction band density of states" )
-`MPRnb( NGATE ,0.0 ,"/m^3" ,"Parameter for poly gate doping. For metal gate please set NGATE = 0" )
-`MPRnb( Imin ,1.0e-15 ,"A/m^2" ,"Parameter for Vgs clamping for inversion region calculation in accumulation" )
-
-// Short Channel Effects
-`MPRnb( CIT ,0.0 ,"F/m^2" ,"Parameter for interface trap" )
-`MPRnb( CITR ,CIT ,"" ,"Parameter for interface trap in reverse mode for asymmetric model" )
-`MPRnb( CDSC ,7.0e-3 ,"F/m^2" ,"Coupling capacitance between S/D and channel" )
-`MPRnb( CDSCN1 ,0.0 ,"" ,"NFIN dependence of CDSC" )
-`MPRnb( CDSCN2 ,1.0e5 ,"" ,"NFIN dependence of CDSC" )
-`MPRnb( CDSCD ,7.0e-3 ,"F/m^2" ,"Drain-bias sensitivity of CDSC" )
-`MPRnb( CDSCDN1 ,0.0 ,"" ,"NFIN dependence of CDSCD" )
-`MPRex( CDSCDN2 ,1.0e5 ,"" ,0.0 ,"NFIN dependence of CDSCD" )
-`MPRnb( CDSCDR ,CDSCD ,"F/m^2" ,"Reverse-mode drain-bias sensitivity of CDSC" )
-`MPRnb( CDSCDRN1 ,CDSCDN1 ,"" ,"NFIN dependence of CDSCD" )
-`MPRex( CDSCDRN2 ,CDSCDN2 ,"" ,0.0 ,"NFIN dependence of CDSCD" )
-`MPRnb( DVT0 ,0.0 ,"" ,"SCE coefficient" )
-`MPRnb( DVT1 ,0.6 ,"" ,"SCE exponent coefficient. After binning it should be within (0:inf)" )
-`MPRnb( DVT1SS ,DVT1 ,"" ,"Subthreshold swing exponent coefficient. After binning it should be within (0:inf)" )
-`MPRnb( PHIN ,0.05 ,"V" ,"Nonuniform vertical doping effect on surface potential" )
-`MPRnb( ETA0 ,0.6 ,"" ,"DIBL coefficient" )
-`MPRnb( ETA0N1 ,0.0 ,"" ,"NFIN dependence of ETA0" )
-`MPRco( ETA0N2 ,1.0e5 ,"" ,1.0e-5 ,inf ,"NFIN dependence of ETA0" )
-`MPRnb( ETA0LT ,0.0 ,"/m" ,"Coupled NFIN and length dependence of ETA0" )
-`MPRnb( TETA0 ,0.0 ,"/K" ,"Temperature dependence of DIBL coefficient" )
-`MPRnb( ETA0R ,ETA0 ,"" ,"Reverse-mode DIBL coefficient" )
-`MPRnb( TETA0R ,TETA0 ,"/K" ,"Temperature dependence of reverse-mode DIBL coefficient" )
-`MPRnb( DSUB ,1.06 ,"" ,"DIBL exponent coefficient" )
-`MPRnb( DVTP0 ,0.0 ,"" ,"Coefficient for drain-induced Vth shift (DITS)" )
-`MPRnb( DVTP1 ,0.0 ,"" ,"DITS exponent coefficient" )
-`MPRnb( ADVTP0 ,0.0 ,"" ,"Pre-exponential coefficient for DITS" )
-`MPRex( BDVTP0 ,1.0e-7 ,"" ,0.0 ,"Exponential coefficient for DITS" )
-`MPRnb( ADVTP1 ,0.0 ,"" ,"Pre-exponential coefficient for DVTP1" )
-`MPRex( BDVTP1 ,1.0e-7 ,"" ,0.0 ,"Exponential coefficient for DVTP1" )
-`MPRnb( DVTP2 ,0.0 ,"" ,"DITS model parameter" )
-`MPRnb( K1RSCE ,0.0 ,"/V^(0.5)" ,"K1 for reverse short channel effect calculation" )
-`MPRnb( LPE0 ,5.0e-9 ,"m" ,"Equivalent length of pocket region at zero bias" )
-`MPRnb( DVTSHIFT ,0.0 ,"V" ,"Vth shift handle" )
-`MPRnb( DVTSHIFTR ,DVTSHIFT ,"" ,"Vth shift handle for asymmetric mode" )
-`MPRnb( THETASCE ,0.0 ,"" ,"Vth roll-off length dependence. If defined by user, it will overwrite Theta_SCE in the code")
-`MPRnb( THETADIBL ,0.0 ,"" ,"DIBL length dependence. If defined by user, will overwrite Theta_DIBL in the code" )
-`MPRnb( THETASW ,0.0 ,"" ,"Subthreshold swing length dependence. If defined by user, it will overwrite Theta_SW in the code" )
-`MPRnb( NVTM ,0.0 ,"V" ,"Subthreshold swing factor multiplied by Vtm. If defined by user, it will overwrite nVtm in the code" )
-
-// Lateral non-uniform doping effect (IV-CV Vth shift)
-`MPRnb( K0 ,0.0 ,"V" ,"Lateral NUD voltage parameter" )
-`MPRnb( K01 ,0.0 ,"V/K" ,"Temperature dependence of lateral NUD voltage parameter" )
-`MPRnb( K0SI ,1.0 ,"" ,"Correction factor for strong inversion used in Mnud. After binning it should be within (0:inf)" )
-`MPRnb( K0SI1 ,0.0 ,"/K" ,"Temperature dependence of K0SI" )
-`MPRnb( K2SI ,K0SI ,"" ,"Correction factor for strong inversion used in Mob" )
-`MPRnb( K2SI1 ,K0SI1 ,"" ,"Temperature dependence of K2SI" )
-`MPRnb( K0SISAT ,0.0 ,"" ,"Correction factor for strong inversion used in Mnud" )
-`MPRnb( K0SISAT1 ,0.0 ,"" ,"Temperature dependence of K0SISAT" )
-`MPRnb( K2SISAT ,K0SISAT ,"" ,"Correction factor for strong inversion used in Mob" )
-`MPRnb( K2SISAT1 ,K0SISAT1 ,"" ,"Temperature dependence of K2SISAT" )
-
-// Body Effect for MG Devices on Bulk Substrate (ex: FinFETs on BULK)
-`MPRnb( PHIBE ,0.7 ,"V" ,"Body effect voltage parameter. After binning it should be within [0.2:1.2]" )
-`MPRco( K1 ,1.0e-6 ,"V^(0.5)" ,1.0e-6 ,inf ,"Body effect coefficient for subthreshold region" )
-`MPRnb( K11 ,0.0 ,"V^(0.5)/K" ,"Temperature dependence of K1" )
-`MPRnb( K2SAT ,0.0 ,"" ,"Correction factor for K2 in saturation (high Vds)" )
-`MPRnb( K2SAT1 ,0.0 ,"" ,"Temperature dependence of K2SAT" )
-`MPRnb( K2 ,0.0 ,"" ,"Body effect coefficient for BULKMOD==2" )
-`MPRnb( K21 ,0.0 ,"" ,"Temperature dependence of K2" )
-
-// Quantum Mechanical Effect
-`MPRnb( QMFACTOR ,0.0 ,"" ,"Prefactor + switch for QM Vth correction" )
-`MPRnb( QMTCENCV ,0.0 ,"" ,"Prefactor + switch for QM Width and Toxeff correction for CV" )
-`MPRnb( QMTCENCVA ,0.0 ,"" ,"Prefactor + switch for QM Width and Toxeff correction for CV (accumulation region)" )
-`MPRnb( AQMTCEN ,0.0 ,"" ,"Parameter for geometric dependence of Tcen on R/TFIN/HFIN" )
-`MPRex( BQMTCEN ,1.2e-8 ,"" ,0.0 ,"Parameter for geometric dependence of Tcen on R/TFIN/HFIN" )
-`MPRnb( ETAQM ,0.54 ,"" ,"Bulk charge coefficient for Tcen" )
-`MPRnb( QM0 ,1.0e-3 ,"V" ,"Knee-point for Tcen in inversion (Charge normalized to Cox)" )
-`MPRnb( PQM ,0.66 ,"" ,"Slope of normalized Tcen in inversion" )
-`MPRnb( QM0ACC ,1.0e-3 ,"V" ,"Knee-point for Tcen in accumulation (Charge normalized to Cox)" )
-`MPRnb( PQMACC ,0.66 ,"" ,"Slope of normalized Tcen in accumulation" )
-
-// Velocity Saturation Model
-`MPRnb( VSAT ,8.5e4 ,"m/s" ,"Saturation velocity for the saturation region" )
-`MPRnb( VSATR ,VSAT ,"m/s" ,"Saturation velocity for the saturation region in the reverse mode" )
-`MPRnb( VSATN1 ,0.0 ,"" ,"NFIN dependence of VSAT" )
-`MPRex( VSATN2 ,1.0e5 ,"" ,0.0 ,"NFIN dependence of VSAT" )
-`MPRnb( VSATRN1 ,VSATN1 ,"" ,"NFIN dependence of VSATR" )
-`MPRex( VSATRN2 ,VSATN2 ,"" ,0.0 ,"NFIN dependence of VSATR" )
-`MPRnb( AVSAT ,0.0 ,"" ,"Pre-exponential coefficient for VSAT" )
-`MPRex( BVSAT ,1.0e-7 ,"" ,0.0 ,"Exponential coefficient for VSAT" )
-`MPRnb( VSAT1 ,VSAT ,"m/s" ,"Velocity saturation parameter for Ion degradation - forward mode" )
-`MPRnb( VSAT1N1 ,VSATN1 ,"" ,"NFIN dependence of VSAT1" )
-`MPRex( VSAT1N2 ,VSATN2 ,"" ,0.0 ,"NFIN dependence of VSAT1" )
-`MPRnb( VSAT1R ,VSAT1 ,"m/s" ,"Velocity saturation parameter for Ion degradation - reverse mode" )
-`MPRnb( VSAT1RN1 ,VSAT1N1 ,"" ,"NFIN dependence of VSAT1R" )
-`MPRex( VSAT1RN2 ,VSAT1N2 ,"" ,0.0 ,"NFIN dependence of VSAT1R" )
-`MPRnb( AVSAT1 ,AVSAT ,"" ,"Pre-exponential coefficient for VSAT1" )
-`MPRex( BVSAT1 ,BVSAT ,"" ,0.0 ,"Exponential coefficient for VSAT1" )
-`MPRnb( DELTAVSAT ,1.0 ,"" ,"velocity saturation parameter in the linear region" )
-`MPRnb( PSAT ,2.0 ,"" ,"Velocity saturation exponent, after binnig should be from [2.0:inf)" )
-`MPRnb( APSAT ,0.0 ,"" ,"Pre-exponential coefficient for PSAT" )
-`MPRex( BPSAT ,1.0 ,"" ,0.0 ,"Exponential coefficient for PSAT" )
-`MPRnb( KSATIV ,1.0 ,"" ,"Parameter for long channel Vdsat" )
-`MPRnb( KSATIVR ,KSATIV ,"" ,"KSATIV in asymmetric mode" )
-`MPRnb( VSATCV ,VSAT ,"m/s" ,"Velocity saturation parameter for CV" )
-`MPRnb( AVSATCV ,AVSAT ,"" ,"Pre-exponential coefficient for VSATCV" )
-`MPRex( BVSATCV ,BVSAT ,"" ,0.0 ,"Exponential coefficient for VSATCV" )
-`MPRnb( DELTAVSATCV ,DELTAVSAT ,"" ,"Velocity saturation parameter in the linear region for the capacitance model" )
-`MPRnb( PSATCV ,PSAT ,"" ,"Velocity saturation exponent for C-V" )
-`MPRnb( APSATCV ,APSAT ,"" ,"Pre-exponential coefficient for PSATCV" )
-`MPRex( BPSATCV ,BPSAT ,"" ,0.0 ,"Exponential coefficient for PSATCV" )
-`MPRnb( MEXP ,4.0 ,"" ,"Smoothing function factor for Vdsat" )
-`MPRnb( AMEXP ,0.0 ,"" ,"Pre-exponential coefficient for MEXP" )
-`MPRnb( BMEXP ,1.0 ,"" ,"Exponential coefficient for MEXP" )
-`MPRnb( MEXPR ,MEXP ,"" ,"Reverse-mode smoothing function factor for Vdsat" )
-`MPRnb( AMEXPR ,AMEXP ,"" ,"Pre-exponential coefficient for MEXPR" )
-`MPRnb( BMEXPR ,BMEXP ,"" ,"Exponential coefficient for MEXPR" )
-`MPRnb( PTWG ,0.0 ,"/V^2" ,"Gmsat degradation parameter - forward mode" )
-`MPRnb( PTWGR ,PTWG ,"/V^2" ,"Gmsat degradation parameter - reverse mode" )
-`MPRnb( APTWG ,0.0 ,"" ,"Pre-exponential coefficient for PTWG" )
-`MPRex( BPTWG ,1.0e-7 ,"" ,0.0 ,"Exponential coefficient for PTWG" )
-`MPRnb( AT ,-1.56e-3 ,"/K" ,"Saturation velocity temperature coefficient" )
-`MPRnb( ATR ,AT ,"" ,"Reverse-mode saturation velocity temperature coefficient" )
-`MPRnb( ATCV ,AT ,"/K" ,"Saturation velocity temperature coefficient for CV" )
-`MPRnb( TMEXP ,0.0 ,"/K" ,"Temperature coefficient for Vdseff smoothing" )
-`MPRnb( TMEXPR ,TMEXP ,"/K" ,"Reverse-mode temperature coefficient for Vdseff smoothing" )
-`MPRnb( PTWGT ,4.0e-3 ,"/K" ,"PTWG temperature coefficient" )
-
-// Mobility Model
-`MPRnb( U0 ,3.0e-2 ,"m^2/(V*s)" ,"Low-field mobility" )
-`MPRnb( U0R ,U0 ,"m^2/(V*s)" ,"Reverse-mode low-field mobility" )
-`MPRnb( U0N1 ,0.0 ,"" ,"NFIN dependence of U0" )
-`MPRnb( U0N1R ,U0N1 ,"" ,"Reverse-mode NFIN dependence of U0" )
-`MPRex( U0N2 ,1.0e5 ,"" ,0.0 ,"NFIN dependence of U0" )
-`MPRex( U0N2R ,U0N2 ,"" ,0.0 ,"Reverse-mode NFIN dependence of U0" )
-`MPRnb( U0LT ,0.0 ,"/m" ,"Coupled NFIN and length dependence of U0" )
-`MPRnb( ETAMOB ,2.0 ,"" ,"Effective field parameter" )
-`MPRnb( UP ,0.0 ,"um^LPA" ,"Mobility L coefficient" )
-`MPRnb( LPA ,1.0 ,"" ,"Mobility L power coefficient" )
-`MPRnb( UPR ,UP ,"um^LPA" ,"Reverse-mode mobility L coefficient" )
-`MPRnb( LPAR ,LPA ,"" ,"Reverse-mode mobility L power coefficient" )
-`MPRnb( UA ,0.3 ,"(cm/MV)^EU" ,"Phonon/surface roughness scattering parameter" )
-`MPRnb( UAR ,UA ,"(cm/MV)^EU" ,"Reverse-mode phonon/surface roughness scattering parameter" )
-`MPRnb( AUA ,0.0 ,"" ,"Pre-exponential coefficient for UA" )
-`MPRnb( AUAR ,AUA ,"" ,"Reverse-mode pre-exponential coefficient for UA" )
-`MPRex( BUA ,1.0e-7 ,"" ,0.0 ,"Exponential coefficient for UA" )
-`MPRex( BUAR ,BUA ,"" ,0.0 ,"Reverse-mode exponential coefficient for UAR" )
-`MPRnb( UC ,0.0 ,"(1e-6*cm/MV^2)^EU" ,"Body effect for mobility degradation parameter - BULKMOD=1 or 2" )
-`MPRnb( UCR ,UC ,"" ,"Reverse-mode body effect for mobility degradation parameter - BULKMOD=1 or 2" )
-`MPRnb( EU ,2.5 ,"cm/MV" ,"Phonon/surface roughness scattering parameter" )
-`MPRnb( EUR ,EU ,"cm/MV" ,"Reverse-mode phonon/surface roughness scattering parameter" )
-`MPRnb( AEU ,0.0 ,"" ,"Pre-exponential coefficient for EU" )
-`MPRnb( AEUR ,AEU ,"" ,"Reverse-mode pre-exponential coefficient for EU" )
-`MPRex( BEU ,1.0e-7 ,"" ,0.0 ,"Exponential coefficient for EU" )
-`MPRex( BEUR ,BEU ,"" ,0.0 ,"Reverse-mode exponential coefficient for EU" )
-`MPRnb( UD ,0.0 ,"cm/MV" ,"Columbic scattering parameter" )
-`MPRnb( UDR ,UD ,"cm/MV" ,"Reverse-mode columbic scattering parameter" )
-`MPRnb( AUD ,0.0 ,"" ,"Pre-exponential coefficient for UD" )
-`MPRnb( AUDR ,AUD ,"" ,"Reverse-mode pre-exponential coefficient for UD" )
-`MPRex( BUD ,5.0e-8 ,"" ,0.0 ,"Exponential coefficient for UD" )
-`MPRex( BUDR ,BUD ,"" ,0.0 ,"Reverse-mode exponential coefficient for UD" )
-`MPRnb( UCS ,1.0 ,"" ,"Columbic scattering parameter" )
-`MPRnb( UTE ,0.0 ,"" ,"Mobility temperature coefficient" )
-`MPRnb( UTER ,UTE ,"" ,"Reverse-mode for mobility temperature coefficient" )
-`MPRnb( UTL ,-1.5e-3 ,"" ,"Mobility temperature coefficient" )
-`MPRnb( UTLR ,UTL ,"" ,"Reverse-mode for mobility temperature coefficient" )
-`MPRnb( EMOBT ,0.0 ,"" ,"Temperature coefficient of ETAMOB" )
-`MPRnb( UA1 ,1.032e-3 ,"" ,"Mobility temperature coefficient for UA" )
-`MPRnb( UA1R ,UA1 ,"" ,"Reverse-mode mobility temperature coefficient for UA" )
-`MPRnb( UC1 ,5.6e-11 ,"" ,"Mobility temperature coefficient for UC" )
-`MPRnb( UC1R ,UC1 ,"" ,"Reverse-mode mobility temperature coefficient for UC" )
-`MPRnb( UD1 ,0.0 ,"" ,"Mobility temperature coefficient for UC" )
-`MPRnb( UD1R ,UD1 ,"" ,"Reverse-mode mobility temperature coefficient for UD" )
-`MPRnb( UCSTE ,-4.775e-3 ,"" ,"Mobility temperature coefficient" )
-`MPRcc( CHARGEWF ,0.0 ,"" ,-1.0 ,1.0 ,"Average channel charge weighting factor, +1: source-side, 0: middle, -1: drain-side" )
-
-// Access Resistance Model
-`MPRnb( RDSWMIN ,0.0 ,"ohm*(um^(WR))" ,"RDSMOD = 0 S/D extension resistance per unit width at high Vgs" )
-`MPRnb( RDSW ,1.0e2 ,"ohm*(um^(WR))" ,"RDSMOD = 0 zero bias S/D extension resistance per unit width" )
-`MPRnb( ARDSW ,0.0 ,"" ,"Pre-exponential coefficient for RDSW" )
-`MPRex( BRDSW ,1.0e-7 ,"" ,0.0 ,"exponential coefficient for RDSW" )
-`MPRnb( RSWMIN ,0.0 ,"ohm*(um^(WR))" ,"RDSMOD = 1 source extension resistance per unit width at high Vgs" )
-`MPRnb( RSW ,5.0e1 ,"ohm*(um^(WR))" ,"RDSMOD = 1 zero bias source extension resistance per unit width" )
-`MPRnb( ARSW ,0.0 ,"" ,"Pre-exponential coefficient for RSW" )
-`MPRex( BRSW ,1.0e-7 ,"" ,0.0 ,"Exponential coefficient for RSW" )
-`MPRnb( RDWMIN ,0.0 ,"ohm*(um^(WR))" ,"RDSMOD = 1 drain extension resistance per unit width at high Vgs" )
-`MPRnb( RDW ,5.0e1 ,"" ,"RDSMOD = 1 zero bias drain extension resistance per unit width" )
-`MPRnb( ARDW ,0.0 ,"" ,"Pre-exponential coefficient for RDW" )
-`MPRex( BRDW ,1.0e-7 ,"" ,0.0 ,"Exponential coefficient for RDW" )
-`MPRcz( RSDR ,0.0 ,"V^(-PRSDR)" ,"Source-side drift resistance parameter - forward mode" )
-`MPRcz( RSDRR ,RSDR ,"V^(-PRSDR)" ,"Source-side drift resistance parameter - reverse mode" )
-`MPRcz( RDDR ,RSDR ,"V^(-PRDDR)" ,"Drain-side drift resistance parameter - forward mode" )
-`MPRcz( RDDRR ,RDDR ,"V^(-PRDDR)" ,"Drain-side drift resistance parameter - reverse mode" )
-`MPRnb( PRSDR ,1.0 ,"" ,"Source-side quasi-saturation parameter" )
-`MPRnb( PRDDR ,PRSDR ,"" ,"Drain-side quasi-saturation parameter" )
-`MPRnb( PRWGS ,0.0 ,"/V" ,"Gate bias dependence of source extension resistance" )
-`MPRnb( PRWGD ,PRWGS ,"/V" ,"Gate bias dependence of drain extension resistance" )
-`MPRnb( WR ,1.0 ,"" ,"W dependence parameter of S/D extension resistance" )
-`MPRnb( PRT ,1.0e-3 ,"/K" ,"Series resistance temperature coefficient" )
-`MPRnb( TRSDR ,0.0 ,"/K" ,"Source-side drift resistance temperature coefficient" )
-`MPRnb( TRDDR ,TRSDR ,"/K" ,"Drain-side drift resistance temperature coefficient" )
-
-// DIBL Model
-`MPRnb( PDIBL1 ,1.3 ,"" ,"DIBL output conductance parameter - forward mode" )
-`MPRnb( PDIBL1R ,PDIBL1 ,"" ,"DIBL output conductance parameter - reverse mode" )
-`MPRnb( PDIBL2 ,2.0e-4 ,"" ,"DIBL output conductance parameter" )
-`MPRnb( PDIBL2R ,PDIBL2 ,"" ,"DIBL output conductance parameter - reverse mode" )
-`MPRnb( DROUT ,1.06 ,"" ,"L dependence of DIBL effect on Rout" )
-`MPRnb( PVAG ,1.0 ,"" ,"Vgs dependence on early voltage" )
-
-// Channel Length Modulation Effect
-`MPRnb( PCLM ,1.3e-2 ,"" ,"Channel length modulation (CLM) parameter" )
-`MPRnb( PCLMR ,PCLM ,"" ,"Reverse model PCLM parameter" )
-`MPRnb( APCLM ,0.0 ,"" ,"Pre-exponential coefficient for PCLM" )
-`MPRnb( APCLMR ,APCLM ,"" ,"Reverse-mode pre-exponential coefficient for PCLM" )
-`MPRex( BPCLM ,1.0e-7 ,"" ,0.0 ,"Exponential coefficient for PCLM" )
-`MPRex( BPCLMR ,BPCLM ,"" ,0.0 ,"Reverse-mode exponential coefficient for PCLM" )
-`MPRnb( PCLMG ,0.0 ,"" ,"Gate bias dependence parameter for CLM" )
-`MPRnb( PCLMCV ,PCLM ,"" ,"CLM parameter for short-channel CV" )
-
-// Non-Saturation Effect
-`MPRnb( A1 ,0.0 ,"" ,"Non-saturation effect parameter for strong inversion Region" )
-`MPRnb( A11 ,0.0 ,"(V^-2)/K" ,"Temperature dependence of A1" )
-`MPRnb( A2 ,0.0 ,"" ,"Non-saturation effect parameter for moderate Inversion Region" )
-`MPRnb( A21 ,0.0 ,"(V^-1)/K" ,"Temperature dependence of A2" )
-
-// Gate Electrode Resistance
-`MPRcz( RGEXT ,0.0 ,"ohm" ,"Effective gate electrode external resistance" )
-`MPRco( RGFIN ,1.0e-3 ,"ohm" ,1.0e-3 ,inf ,"Effective gate electrode per finger per fin resistance" )
-
-// Geometry Dependent Source/Drain Resistance of RGEOMOD = 0
-`MPRnb( RSHS ,0.0 ,"ohm" ,"Source-side sheet resistance" )
-`MPRnb( RSHD ,RSHS ,"ohm" ,"Drain-side sheet resistance" )
-
-// Geometry Dependent Source/Drain Resistance of RGEOMOD = 1 for variability modeling
-// These parameters are shared with CGEOMOD = 2
-`MPRnb( HEPI ,1.0e-8 ,"m" ,"Height of the raised source/drain on top of the fin" )
-`MPRnb( TSILI ,1.0e-8 ,"m" ,"Thickness of the silicide on top of the raised source/drain" )
-`MPRcc( RHOC ,1.0e-12 ,"ohm*(m^2)" ,1.0e-18 ,1.0e-9 ,"Contact resistivity at the silicon/silicide interface" )
-`MPRoz( RHORSD ,1.0 ,"ohm*(m)" ,"Average resistivity of silicon in the raised source/drain region" )
-`MPRcc( CRATIO ,0.5 ,"" ,0.0 ,1.0 ,"Ratio of the corner area filled with silicon to the total corner area" )
-`MPRoo( DELTAPRSD ,0.0 ,"m" ,-FPITCH ,inf ,"Change in silicon/silicide interface length due to non-rectangular epi" )
-`MPIcc( SDTERM ,0 ,"" ,0 ,1 ,"Indicator of whether the source/drain are terminated with silicide" )
-`MPRnb( LSP ,-1 ,"m" ,"Thickness of the gate sidewall spacer" )
-`MPRco( EPSRSP ,3.9 ,"" ,1.0 ,inf ,"Relative dielectric constant of the spacer" )
-`MPRoz( TGATE ,3.0e-8 ,"m" ,"Gate height on top of the hard mask" )
-`MPRcz( TMASK ,3.0e-8 ,"m" ,"Height of hard mask on top of the fin" )
-`MPRcz( ASILIEND ,0.0 ,"m^2" ,"Extra silicide cross sectional area at the two ends of the FinFET" )
-`MPRcz( ARSDEND ,0.0 ,"m^2" ,"Extra raised source/drain cross sectional areaat the two ends of the FinFET" )
-`MPRcz( PRSDEND ,0.0 ,"m" ,"Extra silicon/silicide interface perimeter at the two ends of the FinFET" )
-`MPRcc( NSDE ,2.0e25 ,"/(m^3)" ,1.0e25 ,1.0e26 ,"Source/drain active doping concentration at Leff edge" )
-`MPRnb( RGEOA ,1.0 ,"" ,"Fitting parameter for RGEOMOD=1" )
-`MPRnb( RGEOB ,0.0 ,"/m" ,"Fitting parameter for RGEOMOD=1" )
-`MPRnb( RGEOC ,0.0 ,"/m" ,"Fitting parameter for RGEOMOD=1" )
-`MPRnb( RGEOD ,0.0 ,"/m" ,"Fitting parameter for RGEOMOD=1" )
-`MPRnb( RGEOE ,0.0 ,"/m" ,"Fitting parameter for RGEOMOD=1" )
-`MPRnb( CGEOA ,1.0 ,"" ,"Fitting parameter for CGEOMOD=2" )
-`MPRnb( CGEOB ,0.0 ,"/m" ,"Fitting parameter for CGEOMOD=2" )
-`MPRnb( CGEOC ,0.0 ,"/m" ,"Fitting parameter for CGEOMOD=2" )
-`MPRnb( CGEOD ,0.0 ,"/m" ,"Fitting parameter for CGEOMOD=2" )
-`MPRcz( CGEOE ,1.0 ,"" ,"Fitting parameter for CGEOMOD=2" )
-
-// Gate Current
-`MPRnb( AIGBINV ,1.11e-2 ,"((F*s^2/g)^0.5)*m^-1" ,"Parameter for Igb in inversion" )
-`MPRnb( AIGBINV1 ,0.0 ,"((F*s^2/g)^0.5)*m^-1/K" ,"Parameter for Igb in inversion" )
-`MPRnb( BIGBINV ,9.49e-4 ,"((F*s^2/g)^0.5)*(m*V)^-1" ,"Parameter for Igb in inversion" )
-`MPRnb( CIGBINV ,6.0e-3 ,"/V" ,"Parameter for Igb in inversion" )
-`MPRnb( EIGBINV ,1.1 ,"V" ,"Parameter for Igb in inversion" )
-`MPRnb( NIGBINV ,3.0 ,"" ,"Parameter for Igb in inversion" )
-`MPRnb( AIGBACC ,1.36e-2 ,"((F*s^2/g)^0.5)*m^-1" ,"Parameter for Igb in accumulation" )
-`MPRnb( AIGBACC1 ,0.0 ,"((F*s^2/g)^0.5)*m^-1/K" ,"Parameter for Igb in accumulation" )
-`MPRnb( BIGBACC ,1.71e-3 ,"((F*s^2/g)^0.5)*(m*V)^-1" ,"Parameter for Igb in accumulation" )
-`MPRnb( CIGBACC ,7.5e-2 ,"/V" ,"Parameter for Igb in accumulation" )
-`MPRnb( NIGBACC ,1.0 ,"" ,"Parameter for Igb in accumulation" )
-`MPRnb( AIGC ,1.36e-2 ,"((F*s^2/g)^0.5)*m^-1" ,"Parameter for Igc in inversion" )
-`MPRnb( AIGC1 ,0.0 ,"((F*s^2/g)^0.5)*m^-1/K" ,"Parameter for Igc in inversion" )
-`MPRnb( BIGC ,1.71e-3 ,"((F*s^2/g)^0.5)*(m*V)^-1" ,"Parameter for Igc in inversion" )
-`MPRnb( CIGC ,7.5e-2 ,"/V" ,"Parameter for Igc in inversion" )
-`MPRnb( PIGCD ,1.0 ,"" ,"Parameter for Igc partition" )
-`MPRnb( DLCIGS ,0.0 ,"m" ,"Delta L for Igs model" )
-`MPRnb( AIGS ,1.36e-2 ,"((F*s^2/g)^0.5)*m^-1" ,"Parameter for Igs in inversion" )
-`MPRnb( AIGS1 ,0.0 ,"((F*s^2/g)^0.5)*m^-1/K" ,"Parameter for Igs in inversion" )
-`MPRnb( BIGS ,1.71e-3 ,"((F*s^2/g)^0.5)*(m*V)^-1" ,"Parameter for Igs in inversion" )
-`MPRnb( CIGS ,7.5e-2 ,"/V" ,"Parameter for Igs in inversion" )
-`MPRnb( DLCIGD ,DLCIGS ,"m" ,"Delta L for Igd model" )
-`MPRnb( AIGD ,AIGS ,"((F*s^2/g)^0.5)*m^-1" ,"Parameter for Igd in inversion" )
-`MPRnb( AIGD1 ,AIGS1 ,"((F*s^2/g)^0.5)*m^-1/K" ,"Parameter for Igd in inversion" )
-`MPRnb( BIGD ,BIGS ,"((F*s^2/g)^0.5)*(m*V)^-1" ,"Parameter for Igd in inversion" )
-`MPRnb( CIGD ,CIGS ,"/V" ,"Parameter for Igd in inversion" )
-`MPRnb( VFBSD ,0.0 ,"V" ,"Flatband voltage for S/D region" )
-`MPRnb( VFBSDCV ,VFBSD ,"V" ,"Flatband voltage for S/D region for C-V calculations" )
-`MPRoz( TOXREF ,1.2e-9 ,"m" ,"Target tox value" )
-`MPRnb( TOXG ,TOXP ,"m" ,"Oxide thickness for gate current model" )
-`MPRnb( NTOX ,1.0 ,"" ,"Exponent for Tox ratio" )
-`MPRnb( POXEDGE ,1.0 ,"" ,"Factor for the gate edge Tox" )
-
-// GIDL/GISL Current
-`MPRnb( AGISL ,6.055e-12 ,"mho" ,"Pre-exponential coefficient for GISL" )
-`MPRnb( BGISL ,3.0e8 ,"V/m" ,"Exponential coefficient for GISL" )
-`MPRnb( CGISL ,0.5 ,"V^3" ,"Parameter for body-effect of GISL" )
-`MPRnb( EGISL ,0.2 ,"V" ,"Band bending parameter for GISL" )
-`MPRnb( PGISL ,1.0 ,"" ,"Parameter for body-bias effect on GISL" )
-`MPRnb( AGIDL ,AGISL ,"mho" ,"Pre-exponential coefficient for GIDL" )
-`MPRnb( BGIDL ,BGISL ,"V/m" ,"Exponential coefficient for GIDL" )
-`MPRnb( CGIDL ,CGISL ,"V^3" ,"Parameter for body-effect of GIDL" )
-`MPRnb( EGIDL ,EGISL ,"V" ,"Band bending parameter for GIDL" )
-`MPRnb( PGIDL ,PGISL ,"" ,"Parameter for body-bias effect on GIDL" )
-
-// Impact Ionization Current
-// IIMOD = 1
-`MPRnb( ALPHA0 ,0.0 ,"m/V" ,"First parameter of Iii" )
-`MPRnb( ALPHA01 ,0.0 ,"m/V/K" ,"Temperature dependence of ALPHA0" )
-`MPRnb( ALPHA1 ,0.0 ,"/V" ,"L scaling parameter of Iii" )
-`MPRnb( ALPHA11 ,0.0 ,"/V/K" ,"Temperature dependence ALPHA1" )
-`MPRnb( BETA0 ,0.0 ,"/V" ,"Vds dependence parameter of Iii" )
-
-// IIMOD = 2
-`MPRnb( ALPHAII0 ,0.0 ,"m/V" ,"First parameter of Iii for IIMOD=2" )
-`MPRnb( ALPHAII01 ,0.0 ,"m/V/K" ,"Temperature dependence of ALPHAII0" )
-`MPRnb( ALPHAII1 ,0.0 ,"/V" ,"L scaling parameter of Iii for IIMOD=2" )
-`MPRnb( ALPHAII11 ,0.0 ,"m/V/K" ,"Temperature dependence of ALPHAII1" )
-`MPRnb( BETAII0 ,0.0 ,"/V" ,"Vds dependence parameter of Iii" )
-`MPRnb( BETAII1 ,0.0 ,"" ,"Vds dependence parameter of Iii" )
-`MPRnb( BETAII2 ,0.1 ,"V" ,"Vds dependence parameter of Iii" )
-`MPRnb( ESATII ,1.0e7 ,"V/m" ,"Saturation channel E-field for Iii" )
-`MPRnb( LII ,0.5e-9 ,"V*m" ,"Channel length dependence parameter of Iii" )
-`MPRnb( SII0 ,0.5 ,"/V" ,"Vgs dependence parameter of Iii" )
-`MPRnb( SII1 ,0.1 ,"" ,"1st Vgs dependence parameter of Iii" )
-`MPRnb( SII2 ,0.0 ,"V" ,"2nd Vgs dependence parameter of Iii" )
-`MPRnb( SIID ,0.0 ,"V" ,"3rd Vds dependence parameter of Iii" )
-`MPRoo( IIMOD2CLAMP1 ,0.1 ,"V" ,0.0 ,inf ,"Clamp1 of SII1*Vg term in IIMOD=2 model" )
-`MPRoo( IIMOD2CLAMP2 ,0.1 ,"V" ,0.0 ,inf ,"Clamp2 of SII0*Vg term in IIMOD=2 model" )
-`MPRoo( IIMOD2CLAMP3 ,0.1 ,"V" ,0.0 ,inf ,"Clamp3 of Ratio term in IIMOD=2 model" )
-
-// Accumulation Capacitance
-`MPRco( EOTACC ,EOT ,"m" ,1.0e-10 ,inf ,"Equivalent oxide thickness for accumulation region" )
-`MPRnb( DELVFBACC ,0.0 ,"V" ,"Change in flatband voltage: Vfb_accumulation - Vfb_inversion" )
-
-// Fringe Capacitance
-// CGEOMOD=0
-`MPRcz( CFS ,2.5e-11 ,"F/m" ,"Outer fringe capacitance at source side" )
-`MPRcz( CFD ,CFS ,"F/m" ,"Outer fringe capacitance at drain side" )
-
-// Overlap Capacitance for CGEOMOD = 0 and 2
-`MPRcz( CGSO ,0.0 ,"F/m" ,"Non LDD region source-gate overlap capacitance per unit channel width" )
-`MPRcz( CGDO ,CGSO ,"F/m" ,"Non LDD region drain-gate overlap capacitance per unit channel width" )
-`MPRcz( CGSL ,0.0 ,"F/m" ,"Overlap capacitance between gate and lightly-doped source region (for CGEOMOD = 0, 2)" )
-`MPRcz( CGDL ,CGSL ,"F/m" ,"Overlap capacitance between gate and lightly-doped drain region (for CGEOMOD = 0, 2)" )
-`MPRco( CKAPPAS ,0.6 ,"V" ,2.0e-2 ,inf ,"Coefficient of bias-dependent overlap capacitance for the source side (for CGEOMOD = 0, 2)" )
-`MPRco( CKAPPAD ,CKAPPAS ,"V" ,2.0e-2 ,inf ,"Coefficient of bias-dependent overlap capacitance for the drain side (for CGEOMOD = 0, 2)" )
-`MPRcz( CGBO ,0.0 ,"F/m" ,"Gate-to-substrate overlap capacitance per unit channel length per finger per NGCON" )
-`MPRcz( CGBN ,0.0 ,"F/m" ,"Gate-to-substrate overlap capacitance per unit channel length per fin per finger" )
-`MPRcz( CGBL ,0.0 ,"F/m" ,"Bias dependent component of gate-to-substrate overlap capacitance per unit channel length per fin per finger" )
-`MPRco( CKAPPAB ,0.6 ,"" ,2.0e-2 ,inf ,"Bias dependent gate-to-substrate parasitic capacitance" )
-
-// Source/Drain-to-Substrate Sidewall Capacitance
-`MPRcz( CSDESW ,0.0 ,"F/m" ,"Coefficient for source/drain-to-substrate sidewall capacitance" )
-
-// Junction Current and Capacitance
-// Junction Capacitance
-`MPRnb( CJS ,5.0e-4 ,"F/m^2" ,"Unit area source-side junction capacitance at zero bias" )
-`MPRnb( CJD ,CJS ,"F/m^2" ,"Unit area drain-side junction capacitance at zero bias" )
-`MPRnb( CJSWS ,5.0e-10 ,"F/m" ,"Unit length source-side sidewall junction capacitance at zero bias" )
-`MPRnb( CJSWD ,CJSWS ,"F/m" ,"Unit length drain-side sidewall junction capacitance at zero bias" )
-`MPRnb( CJSWGS ,0.0 ,"F/m" ,"Unit length source-side gate sidewall junction capacitance at zero bias" )
-`MPRnb( CJSWGD ,CJSWGS ,"F/m" ,"Unit length drain-side gate sidewall junction capacitance at zero bias" )
-`MPRnb( PBS ,1.0 ,"V" ,"Source-side bulk junction built-in potential" )
-`MPRnb( PBD ,PBS ,"V" ,"Drain-side bulk junction built-in potential" )
-`MPRnb( PBSWS ,1.0 ,"V" ,"Built-in potential for Source-side sidewall junction capacitance" )
-`MPRnb( PBSWD ,PBSWS ,"V" ,"Built-in potential for Drain-side sidewall junction capacitance" )
-`MPRnb( PBSWGS ,PBSWS ,"V" ,"Built-in potential for Source-side gate sidewall junction capacitance" )
-`MPRnb( PBSWGD ,PBSWGS ,"V" ,"Built-in potential for Drain-side gate sidewall junction capacitance" )
-`MPRnb( MJS ,0.5 ,"" ,"Source bottom junction capacitance grading coefficient" )
-`MPRnb( MJD ,MJS ,"" ,"Drain bottom junction capacitance grading coefficient" )
-`MPRnb( MJSWS ,0.33 ,"" ,"Source sidewall junction capacitance grading coefficient" )
-`MPRnb( MJSWD ,MJSWS ,"" ,"Drain sidewall junction capacitance grading coefficient" )
-`MPRnb( MJSWGS ,MJSWS ,"" ,"Source-side gate sidewall junction capacitance grading coefficient" )
-`MPRnb( MJSWGD ,MJSWGS ,"" ,"Drain-side gate sidewall junction capacitance grading coefficient" )
-
-// Second Junction for Two-Step Junction Capacitance
-`MPRcz( SJS ,0.0 ,"" ,"Constant for source-side two-step second junction" )
-`MPRcz( SJD ,SJS ,"" ,"Constant for drain-side two-step second junction" )
-`MPRcz( SJSWS ,0.0 ,"" ,"Constant for source-side sidewall two-step second junction" )
-`MPRcz( SJSWD ,SJSWS ,"" ,"Constant for drain-side sidewall two-step second junction" )
-`MPRcz( SJSWGS ,0.0 ,"" ,"Constant for source-side gate sidewall two-step second junction" )
-`MPRcz( SJSWGD ,SJSWGS ,"" ,"Constant for source-side gate sidewall two-step second junction" )
-`MPRnb( MJS2 ,1.25e-1 ,"" ,"Source bottom two-step second junction capacitance grading coefficient" )
-`MPRnb( MJD2 ,MJS2 ,"" ,"Drain bottom two-step second junction capacitance grading coefficient" )
-`MPRnb( MJSWS2 ,8.3e-2 ,"" ,"Source sidewall two-step second junction capacitance grading coefficient" )
-`MPRnb( MJSWD2 ,MJSWS2 ,"" ,"Drain sidewall two-step second junction capacitance grading coefficient" )
-`MPRnb( MJSWGS2 ,MJSWS2 ,"" ,"Source-side gate sidewall two-step second junction capacitance grading coefficient" )
-`MPRnb( MJSWGD2 ,MJSWGS2 ,"" ,"Drain-side gate sidewall two-step second junction capacitance grading coefficient" )
-
-// Junction Current
-`MPRnb( JSS ,1.0e-4 ,"A/m^2" ,"Bottom source junction reverse saturation current density" )
-`MPRnb( JSD ,JSS ,"A/m^2" ,"Bottom drain junction reverse saturation current density" )
-`MPRnb( JSWS ,0.0 ,"A/m" ,"Unit length reverse saturation current for sidewall source junction" )
-`MPRnb( JSWD ,JSWS ,"A/m" ,"Unit length reverse saturation current for sidewall drain junction" )
-`MPRnb( JSWGS ,0.0 ,"A/m" ,"Unit length reverse saturation current for gate-edge sidewall source junction" )
-`MPRnb( JSWGD ,JSWGS ,"A/m" ,"Unit length reverse saturation current for gate-edge sidewall drain junction" )
-`MPRex( NJS ,1.0 ,"" ,0.0 ,"Source junction emission coefficient" )
-`MPRex( NJD ,NJS ,"" ,0.0 ,"Drain junction emission coefficient" )
-`MPRnb( IJTHSFWD ,0.1 ,"A" ,"Forward source diode breakdown limiting current" )
-`MPRnb( IJTHDFWD ,IJTHSFWD ,"A" ,"Forward drain diode breakdown limiting current" )
-`MPRnb( IJTHSREV ,0.1 ,"A" ,"Reverse source diode breakdown limiting current" )
-`MPRnb( IJTHDREV ,IJTHSREV ,"A" ,"Reverse drain diode breakdown limiting current" )
-`MPRnb( BVS ,1.0e1 ,"V" ,"Source diode breakdown voltage" )
-`MPRnb( BVD ,BVS ,"V" ,"Drain diode breakdown voltage" )
-`MPRnb( XJBVS ,1.0 ,"" ,"Fitting parameter for source diode breakdown current" )
-`MPRnb( XJBVD ,XJBVS ,"" ,"Fitting parameter for drain diode breakdown current" )
-
-// Tunneling Component of Junction Current
-`MPRnb( JTSS ,0.0 ,"A/m^2" ,"Bottom source junction trap-assisted saturation current density" )
-`MPRnb( JTSD ,JTSS ,"A/m^2" ,"Bottom drain junction trap-assisted saturation current density" )
-`MPRnb( JTSSWS ,0.0 ,"A/m" ,"Unit length trap-assisted saturation current for sidewall source junction" )
-`MPRnb( JTSSWD ,JTSSWS ,"A/m" ,"Unit length trap-assisted saturation current for sidewall drain junction" )
-`MPRnb( JTSSWGS ,0.0 ,"A/m" ,"Unit length trap-assisted saturation current for gate-edge sidewall source junction" )
-`MPRnb( JTSSWGD ,JTSSWGS ,"A/m" ,"Unit length trap-assisted saturation current for gate-edge sidewall drain junction" )
-`MPRnb( JTWEFF ,0.0 ,"m" ,"Trap-assisted tunneling current width dependence" )
-`MPRnb( NJTS ,2.0e1 ,"" ,"Non-ideality factor for JTSS" )
-`MPRnb( NJTSD ,NJTS ,"" ,"Non-ideality factor for JTSD" )
-`MPRnb( NJTSSW ,2.0e1 ,"" ,"Non-ideality factor for JTSSWS" )
-`MPRnb( NJTSSWD ,NJTSSW ,"" ,"Non-ideality factor for JTSSWD" )
-`MPRnb( NJTSSWG ,2.0e1 ,"" ,"Non-ideality factor for JTSSWGS" )
-`MPRnb( NJTSSWGD ,NJTSSWG ,"" ,"Non-ideality factor for JTSSWGD" )
-`MPRnb( VTSS ,1.0e1 ,"V" ,"Bottom source junction trap-assisted current voltage dependent parameter" )
-`MPRnb( VTSD ,VTSS ,"V" ,"Bottom drain junction trap-assisted current voltage dependent parameter" )
-`MPRnb( VTSSWS ,1.0e1 ,"V" ,"Unit length trap-assisted current voltage dependent parameter for sidewall source junction" )
-`MPRnb( VTSSWD ,VTSSWS ,"V" ,"Unit length trap-assisted current voltage dependent parameter for sidewall drain junction" )
-`MPRnb( VTSSWGS ,1.0e1 ,"V" ,"Unit length trap-assisted current voltage dependent parameter for gate-edge sidewall source junction" )
-`MPRnb( VTSSWGD ,VTSSWGS ,"V" ,"Unit length trap-assisted current voltage dependent parameter for gate-edge sidewall drain junction" )
-
-// Recombination-Generation Current
-`MPRnb( LINTIGEN ,0.0 ,"m" ,"Lint for thermal generation current" )
-`MPRnb( NTGEN ,1.0 ,"" ,"Thermal generation current parameter" )
-`MPRnb( AIGEN ,0.0 ,"(m^-3)*(V^-1)" ,"Thermal generation current parameter" )
-`MPRnb( BIGEN ,0.0 ,"(m^-3)*(V^-3)" ,"Thermal generation current parameter" )
-
-// NQS Gate Resistance Model & NQS Charge Deficit Model
-// For NQSMOD=1, Set XRCRG1=0 to turn off NQS gate resistance
-`MPRnb( XRCRG1 ,1.2e1 ,"" ,"Parameter for non-quasistatic gate resistance (NQSMOD = 1) and NQSMOD = 2" )
-`MPRnb( XRCRG2 ,1.0 ,"" ,"Parameter for non-quasistatic gate resistance (NQSMOD = 1) and NQSMOD = 2" )
-
-// NQS Charge Segmentation Model
-`MPIcc( NSEG ,4 ,"" ,4 ,10 ,"Number of segments for NQSMOD=3 (3, 5 & 10 supported)" )
-
-// Flicker Noise
-`MPRnb( EF ,1.0 ,"" ,"Flicker noise frequency exponent" )
-`MPRnb( EM ,4.1e7 ,"V/m" ,"Flicker noise parameter" )
-`MPRnb( NOIA ,6.25e39 ,"(eV^-1)*(s^(1-EF))*(m^-3)" ,"Flicker noise parameter" )
-`MPRnb( NOIB ,3.125e24 ,"(eV^-1)*(s^(1-EF))*(m^-1)" ,"Flicker noise parameter" )
-`MPRnb( NOIC ,8.75e7 ,"(eV^-1)*(s^(1-EF))*(m)" ,"Flicker noise parameter" )
-`MPRnb( LINTNOI ,0.0 ,"m^2" ,"L offset for flicker noise calculation" )
-
-// Thermal Noise
-`MPRcz( NTNOI ,1.0 ,"" ,"Thermal noise parameter" )
-`MPRnb( TNOIA ,1.5 ,"/m" ,"Thermal noise parameter" )
-`MPRnb( TNOIB ,3.5 ,"/m" ,"Thermal noise parameter" )
-`MPRnb( RNOIA ,5.77e-1 ,"" ,"Thermal noise coefficient" )
-`MPRnb( RNOIB ,3.7e-1 ,"" ,"Thermal noise coefficient" )
-
-// Parameters Controlled by Correlated Thermal Noise Switch
-`ifdef __TNOIMOD1__
- `MPRnb( TNOIC ,3.5 ,"" ,"Thermal noise parameter for TNOIMOD=1" )
- `MPRnb( RNOIC ,3.95e-1 ,"" ,"Thermal noise coefficient for TNOIMOD=1" )
- `MPRex( SCALEN ,1.0e5 ,"" ,0.0 ,"Noise scaling parameter for TNOIMOD=1" )
-`endif
-
-// Temperature Effects
-`MPRco( TNOM ,27.0 ,"Celsius" ,-`P_CELSIUS0,inf ,"Temperature at which the model is extracted" )
-`MPRnb( TBGASUB ,7.02e-4 ,"eV/K" ,"Bandgap temperature coefficient" )
-`MPRnb( TBGBSUB ,1.108e3 ,"K" ,"Bandgap temperature coefficient" )
-`MPRnb( KT1 ,0.0 ,"V" ,"Vth temperature coefficient" )
-`MPRnb( KT1L ,0.0 ,"V*m" ,"Vth temperature L coefficient" )
-`MPRnb( TSS ,0.0 ,"/K" ,"Swing temperature coefficient" )
-`MPRnb( IIT ,-0.5 ,"" ,"Impact ionization temperature dependence for IIMOD = 1" )
-`MPRnb( TII ,0.0 ,"" ,"Impact ionization temperature dependence for IIMOD = 2" )
-`MPRnb( TGIDL ,-3.0e-3 ,"/K" ,"GIDL/GISL temperature dependence" )
-`MPRnb( IGT ,2.5 ,"" ,"Gate current temperature dependence" )
-`MPRnb( TCJ ,0.0 ,"/K" ,"Temperature coefficient for CJS/CJD" )
-`MPRnb( TCJSW ,0.0 ,"/K" ,"Temperature coefficient for CJSWS/CJSWD" )
-`MPRnb( TCJSWG ,0.0 ,"/K" ,"Temperature coefficient for CJSWGS/CJSWGD" )
-`MPRnb( TPB ,0.0 ,"/K" ,"Temperature coefficient for PBS/PBD" )
-`MPRnb( TPBSW ,0.0 ,"/K" ,"Temperature coefficient for PBSWS/PBSWD" )
-`MPRnb( TPBSWG ,0.0 ,"/K" ,"Temperature coefficient for PBSWGS/PBSWGD" )
-`MPRnb( XTIS ,3.0 ,"" ,"Source junction current temperature exponent" )
-`MPRnb( XTID ,XTIS ,"" ,"Drain junction current temperature exponent" )
-`MPRnb( XTSS ,2.0e-2 ,"" ,"Power dependence of JTSS on temperature" )
-`MPRnb( XTSD ,XTSS ,"" ,"Power dependence of JTSD on temperature" )
-`MPRnb( XTSSWS ,2.0e-2 ,"" ,"Power dependence of JTSSWS on temperature" )
-`MPRnb( XTSSWD ,XTSSWS ,"" ,"Power dependence of JTSSWD on temperature" )
-`MPRnb( XTSSWGS ,2.0e-2 ,"" ,"Power dependence of JTSSWGS on temperature" )
-`MPRnb( XTSSWGD ,XTSSWGS ,"" ,"Power dependence of JTSSWGD on temperature" )
-`MPRnb( TNJTS ,0.0 ,"" ,"Temperature coefficient for NJTS" )
-`MPRnb( TNJTSD ,TNJTS ,"" ,"Temperature coefficient for NJTSD" )
-`MPRnb( TNJTSSW ,0.0 ,"" ,"Temperature coefficient for NJTSSW" )
-`MPRnb( TNJTSSWD ,TNJTSSW ,"" ,"Temperature coefficient for NJTSSWD" )
-`MPRnb( TNJTSSWG ,0.0 ,"" ,"Temperature coefficient for NJTSSWG" )
-`MPRnb( TNJTSSWGD ,TNJTSSWG ,"" ,"Temperature coefficient for NJTSSWGD" )
-
-// Self Heating
-`MPRcz( RTH0 ,1.0e-2 ,"ohm*m*K/W" ,"Thermal resistance" )
-`MPRcz( CTH0 ,1.0e-5 ,"W*s/m/K" ,"Thermal capacitance" )
-`MPRcz( WTH0 ,0.0 ,"m" ,"Width dependence coefficient for Rth and Cth" )
-`MPRcz( ASHEXP ,1.0 ,"" ,"Exponent to tune RTH dependence of NFINTOTAL" )
-`MPRcz( BSHEXP ,1.0 ,"" ,"Exponent to tune RTH dependence of NF" )
-
-// Unified Model
-`MPRoz( ACH_UFCM ,1.0 ,"m^2" ,"Area of the channel for the unified Model" )
-`MPRoz( CINS_UFCM ,1.0 ,"F/m" ,"Insulator capacitance for the unified Model" )
-`MPRoz( W_UFCM ,1.0 ,"m" ,"Effective channel width for the unified Model" )
-`MPRcz( TFIN_TOP ,1.5e-8 ,"m" ,"Top body (fin) thickness for trapezoidal triple gate" )
-`MPRco( TFIN_BASE ,1.5e-8 ,"m" ,1.0e-9 ,inf ,"Base body (fin) thickness for trapezoidal triple gate" )
-`MPRcz( QMFACTORCV ,0.0 ,"" ,"Charge dependence taking QM effects into account" )
-`MPRcz( ALPHA_UFCM ,0.5556 ,"" ,"Mobile charge scaling term taking QM effects into account" )
-
-// Binning Parameters
-`include "bsimcmg_binning_parameters.include"
-
-// Output Variables
-`ifdef __OPINFO__
- (* desc= "WEFF" *) real WEFF;
- (* desc= "LEFF" *) real LEFF;
- (* desc= "WEFFCV" *) real WEFFCV;
- (* desc= "LEFFCV" *) real LEFFCV;
- (* desc= "IDS" *) real IDS;
- (* desc= "IDEFF" *) real IDEFF;
- (* desc= "ISEFF" *) real ISEFF;
- (* desc= "IGTOT" *) real IGTOT;
- (* desc= "IDSGEN" *) real IDSGEN;
- (* desc= "III" *) real III;
- (* desc= "IGS" *) real IGS;
- (* desc= "IGD" *) real IGD;
- (* desc= "IGCS" *) real IGCS;
- (* desc= "IGCD" *) real IGCD;
- (* desc= "IGBS" *) real IGBS;
- (* desc= "IGBD" *) real IGBD;
- (* desc= "IGIDL" *) real IGIDL;
- (* desc= "IGISL" *) real IGISL;
- (* desc= "IJSB" *) real IJSB;
- (* desc= "IJDB" *) real IJDB;
- (* desc= "ISUB" *) real ISUB;
- (* desc= "BETA" *) real BETA;
- (* desc= "VTH" *) real VTH;
- (* desc= "VDSSAT" *) real VDSSAT;
- (* desc= "VFB" *) real VFB;
- (* desc= "GM" *) real GM;
- (* desc= "GDS" *) real GDS;
- (* desc= "GMBS" *) real GMBS;
- (* desc= "QGI" *) real QGI;
- (* desc= "QDI" *) real QDI;
- (* desc= "QSI" *) real QSI;
- (* desc= "QBI" *) real QBI;
- (* desc= "QG" *) real QG;
- (* desc= "QD" *) real QD;
- (* desc= "QS" *) real QS;
- (* desc= "QB" *) real QB;
- (* desc= "CGGI" *) real CGGI;
- (* desc= "CGSI" *) real CGSI;
- (* desc= "CGDI" *) real CGDI;
- (* desc= "CGEI" *) real CGEI;
- (* desc= "CDGI" *) real CDGI;
- (* desc= "CDDI" *) real CDDI;
- (* desc= "CDSI" *) real CDSI;
- (* desc= "CDEI" *) real CDEI;
- (* desc= "CSGI" *) real CSGI;
- (* desc= "CSDI" *) real CSDI;
- (* desc= "CSSI" *) real CSSI;
- (* desc= "CSEI" *) real CSEI;
- (* desc= "CEGI" *) real CEGI;
- (* desc= "CEDI" *) real CEDI;
- (* desc= "CESI" *) real CESI;
- (* desc= "CEEI" *) real CEEI;
- (* desc= "CGG" *) real CGG;
- (* desc= "CGS" *) real CGS;
- (* desc= "CGD" *) real CGD;
- (* desc= "CGE" *) real CGE;
- (* desc= "CDG" *) real CDG;
- (* desc= "CDD" *) real CDD;
- (* desc= "CDS" *) real CDS;
- (* desc= "CDE" *) real CDE;
- (* desc= "CSG" *) real CSG;
- (* desc= "CSD" *) real CSD;
- (* desc= "CSS" *) real CSS;
- (* desc= "CSE" *) real CSE;
- (* desc= "CEG" *) real CEG;
- (* desc= "CED" *) real CED;
- (* desc= "CES" *) real CES;
- (* desc= "CEE" *) real CEE;
- (* desc= "CGSEXT" *) real CGSEXT;
- (* desc= "CGDEXT" *) real CGDEXT;
- (* desc= "CGBOV" *) real CGBOV;
- (* desc= "CJST" *) real CJST;
- (* desc= "CJDT" *) real CJDT;
- (* desc= "RSGEO" *) real RSGEO;
- (* desc= "RDGEO" *) real RDGEO;
- (* desc= "CFGEO" *) real CFGEO;
- (* desc= "T_TOTAL_K" *) real T_TOTAL_K;
- (* desc= "T_TOTAL_C" *) real T_TOTAL_C;
- (* desc= "T_DELTA_SH" *) real T_DELTA_SH;
-
- `ifdef __DEBUG__
- (* desc= "IGBACC" *) real IGBACC;
- (* desc= "IGBINV" *) real IGBINV;
- (* desc= "DIDSDVG" *) real DIDSDVG;
- (* desc= "DIDSDVS" *) real DIDSDVS;
- (* desc= "DIDSDVD" *) real DIDSDVD;
- (* desc= "DIGSDVG" *) real DIGSDVG;
- (* desc= "DIGSDVS" *) real DIGSDVS;
- (* desc= "DIGSDVD" *) real DIGSDVD;
- (* desc= "DIGDDVG" *) real DIGDDVG;
- (* desc= "DIGDDVS" *) real DIGDDVS;
- (* desc= "DIGDDVD" *) real DIGDDVD;
- (* desc= "DIIIDVG" *) real DIIIDVG;
- (* desc= "DIIIDVS" *) real DIIIDVS;
- (* desc= "DIIIDVD" *) real DIIIDVD;
- (* desc= "DIGIDLDVG" *) real DIGIDLDVG;
- (* desc= "DIGIDLDVS" *) real DIGIDLDVS;
- (* desc= "DIGIDLDVD" *) real DIGIDLDVD;
- (* desc= "DIGISLDVG" *) real DIGISLDVG;
- (* desc= "DIGISLDVS" *) real DIGISLDVS;
- (* desc= "DIGISLDVD" *) real DIGISLDVD;
-
- `ifdef __SHMOD__
- (* desc= "CGT" *) real CGT;
- (* desc= "CST" *) real CST;
- (* desc= "CDT" *) real CDT;
- (* desc= "DIDSDVTH" *) real DIDSDVTH;
- (* desc= "DIGSDVTH" *) real DIGSDVTH;
- (* desc= "DIGDDVTH" *) real DIGDDVTH;
- (* desc= "DIIIDVTH" *) real DIIIDVTH;
- (* desc= "DIGIDLDVTH" *) real DIGIDLDVTH;
- (* desc= "DIGISLDVTH" *) real DIGISLDVTH;
- (* desc= "DITHDVTH" *) real DITHDVTH;
- `endif
-
- (* desc= "ITH" *) real ITH;
- (* desc= "DITHDVG" *) real DITHDVG;
- (* desc= "DITHDVS" *) real DITHDVS;
- (* desc= "DITHDVD" *) real DITHDVD;
- `endif
-`endif
-
-// Variables Inside the Model
-integer devsign;
-
-real NFINtotal;
-real DevTemp;
-real ids0, ids0_ov_dqi, ids, vgs, vds, vdsx, sigvds, vch, etaiv;
-real vgs_noswap, vds_noswap, vgd_noswap;
-real qd, qg, qs, qb;
-real ni, epssub, epssp, epsratio, Eg, Eg0, Nc;
-real Lg, deltaL, deltaL1, deltaLCV, Leff, Leff1, LeffCV, LeffCV_acc, Weff0, WeffCV0;
-real cox, cdsc, cbox;
-real nbody, phib, deltaPhi;
-real T0, T0y, T1, T1y, T2, T2y, T3, T3y, T4, T4a, T5, T6, T7, T8, T9;
-real Vtm, Vtm0, nVtm;
-real beta, beta0 ;
-real wf, wr;
-
-// Temperature Effects
-real Tnom, TRatio, dvth_temp, delTemp, ThetaSS;
-real K0_t, K0SI_t, K2SI_t, K1_t, K2SAT_t, A1_t, A2_t;
-real AIGBINV_t, AIGBACC_t, AIGC_t, AIGS_t, AIGD_t;
-real BETA0_t, SII0_t, BGISL_t, BGIDL_t, igtemp, PTWG_t, PTWGR_t;
-real ALPHA0_t, ALPHA1_t, ALPHAII0_t, ALPHAII1_t;
-real CJS_t, CJSWS_t, CJSWGD_t, CJD_t, CJSWD_t, CJSWGS_t;
-real PBS_t, PBSWS_t, PBSWGS_t, PBD_t, PBSWD_t, PBSWGD_t;
-real JSS_t, JSWS_t, JSWGS_t, JSD_t, JSWD_t, JSWGD_t;
-real JTSS_t, JTSD_t, JTSSWS_t, JTSSWD_t, JTSSWGS_t, JTSSWGD_t;
-real NJTS_t, NJTSD_t, NJTSSW_t, NJTSSWD_t, NJTSSWG_t, NJTSSWGD_t;
-real K2_t;
-real K0SISAT_t, K2SISAT_t;
-
-// Variables for analytical surface potential
-real q0;
-real T10, T11, T12;
-real e0, e1, e2;
-
-// Accumulation Model
-real vgsfb, vgsfbeff;
-
-// Short Channel Effect
-real ETA0_t, ETA0R_t;
-real scl, vbi, phist, dvth_vtroll, dvth_dibl, dvth_rsce, dvth_all;
-real tmp, Theta_SCE, Theta_SW, Theta_DIBL, Theta_RSCE, Theta_DITS;
-
-// Lateral Non-uniform Doping Effect
-real Mnud;
-
-// Body Effect for BULKMOD=1
-real ves, vesx, vesmax, veseff;
-real Mob;
-
-// Quantum mechanical correction [units are MKS]
-real coxeff, Tcen0, Tcen, dvch_qm, MTcen;
-real E0, E0prime, E1, E1prime, mx, mxprime, md, mdprime;
-real gprime, gfactor, gam0, gam1, kT;
-
-// Drain Saturation Voltage
-real Vdseff, qis, qid, qbs, Dmobs;
-
-// Midpoint Potential and Charge
-real qia, qia2, qba, dqi;
-real qb0;
-real eta_mu, eta_mu_cv, Eeffm, Eeffm_cv, Dmob, Dmob_cv, u0, ueff, u0_a, u0r;
-real UA_t, UAR_t, UC_t, UCR_t, UCS_t, UD_t, UDR_t, U0_t, U0R_t, ETAMOB_t, Eeffs, EeffFactor;
-
-real Dr, WeffWRFactor;
-real RSourceGeo, RDrainGeo;
-real RDSWMIN_i, RDWMIN_i, RSWMIN_i;
-real Rdrain, Rsource;
-
-real rdstemp, Rdsi, Rdss;
-real RSDR_t, RSDRR_t, RDDR_t, RDDRR_t;
-
-real DIBLfactor, PVAGfactor, diffVds, VaDIBL, Vgst2Vtm, Moc, Mclm;
-real MclmCV, inv_MclmCV;
-
-real Dvsat, Vdsat, inv_MEXP, DvsatCV, Nsat;
-real VSAT_t, VSAT1_t, VSAT1R_t, VSATCV_t, MEXP_t, MEXPR_t, Esat, EsatL, Esat1, Esat1L, EsatCV, EsatCVL;
-real WVCox, Ta, Tb, Tc;
-
-// Asymmetry Model
-real VSAT1_a, MEXP_a, PTWG_a, RSDR_a, RDDR_a, PDIBL1_a, VSAT_a;
-
-// Geometry dependent Source/Drain Resistance
-real mu_max, mu_rsd, rhorsd, afin, thetarsp;
-real Rsp, lt, arsd_total, prsd_total, alpha;
-real eta, RrsdTML, Rrsdside, Rrsd;
-real Rdsgeo, Arsd, Prsd;
-
-// Geometry dependent fringing capacitance
-real Hg, Wg, Trsd, Hrsd, Cgg_top, Cgg_side, Cfr_geo, Acorner, Ccorner;
-
-// Gate Electrode Resistance
-`ifdef __RGATEMOD__
- real ggeltd, Rgeltd;
-`endif
-
-// Gate Current
-real Vaux_Igbinv, igbinv, igsd_mult, igsd_mult0, igbs, igbd;
-real Voxacc, Vaux_Igbacc, vfbzb, igbacc;
-real igcs, igcd, igc0, Vdseffx, T1_exp;
-real igisl, igidl, vfbsd, igs, igd, vgs_eff, vgd_eff;
-real Aechvb, Bechvb, Toxratio, Toxratioedge;
-
-// Impact Ionization current
-real Iii, Vdiff, Vdsatii, VgsStep, Ratio, ALPHAII;
-
-// Accumulation Capacitance
-real cox_acc;
-real qg_acc, qb_acc;
-real vge;
-
-// Parasitic Capacitance
-real qgs_ov, qgd_ov, qgs_fr, qgd_fr, qds_fr;
-real qgs_parasitic, qgd_parasitic, Qes, Qed, Qeg;
-real vgs_overlap, vgd_overlap, vge_overlap;
-real cgsp, cgdp, csbox, cdbox, cgbox, vfbsdcv;
-
-// Junction Current and Capacitance
-real Ies, Ied, ves_jct, ved_jct, vec;
-real Czbs, Czbssw, Czbsswg, Czbd, Czbdsw, Czbdswg;
-real pb2, arg, sarg, Qec;
-real Qesj, Qesj1, Qesj2, Qesj3, Qedj, Qedj1, Qedj2, Qedj3;
-real Isbs, Isbd, Nvtms, Nvtmd;
-real SslpRev, IVjsmRev, VjsmRev, SslpFwd, IVjsmFwd, VjsmFwd, XExpBVS;
-real DslpRev, IVjdmRev, VjdmRev, DslpFwd, IVjdmFwd, VjdmFwd, XExpBVD;
-real igentemp, idsgen, LINTIGEN_i;
-
-// NQS Gate Resistance
-`ifdef __NQSMOD1__
- real gcrg, XRCRG1_i, XRCRG2_i;
- real IdovVds;
-`endif
-
-// NQS Charge Deficit Model
-`ifdef __NQSMOD2__
- real xdpart, gtau, gcrg, XRCRG1_i, XRCRG2_i;
- real IdovVds;
-`endif
-
-// Flicker Noise
-real LINTNOI_i;
-real litl, Esatnoi, Leffnoi, Leffnoisq, DelClm;
-real N0, Nl, Nstar, Ssi, Swi, FNPowerAt1Hz;
-
-// Thermal Noise
-real NTNOI_i, qinv;
-real Gtnoi, sid;
-real gspr, gdpr;
-
-// Variables Controlled by Correlated Thermal Noise Switch
-`ifdef __TNOIMOD1__
- real Abulk, etaa, gamma, delta, epsilon, gche;
- real npart_beta, npart_theta, ctnoi, npart_c;
- real noiGd0, GammaGd0, C0, sf;
-`endif
-
-// Self Heating
-`ifdef __SHMOD__
- real gth, cth;
-`endif
-
-// Binning
-real Inv_L, Inv_NFIN, Inv_LNFIN;
-real NBODY_i, PHIG_i, CFD_i, CFS_i, COVS_i, COVD_i, CGSO_i, CGDO_i;
-real CGSL_i, CGDL_i, CGBL_i, CKAPPAS_i, CKAPPAD_i, CKAPPAB_i;
-real QMFACTOR_i, QMTCENCV_i, QMTCENCVA_i, KSATIV_i, KSATIVR_i, KSATIV_a;
-real CDSC_i, CDSCD_i, CDSCD_a, CDSCDR_i, CIT_i, DVT0_i, CITR_i, CIT_a;
-real DVT1_i, DVT1SS_i, PHIN_i, ETA0_i, ETA0_a, ETA0R_i, DSUB_i, VSAT_i, VSATR_i, VSATR_t;
-real DVTP0_i, DVTP1_i ;
-real K0_i, K01_i, K0SI_i, K0SI1_i, K2SI_i, K2SI1_i, PHIBE_i, K1_i, K11_i, K2SAT_i, K2SAT1_i;
-real DELTAVSAT_i, PSAT_i, DELTAVSATCV_i, PSATCV_i, VSAT1_i, VSAT1R_i, PTWG_i, PTWGR_i, VSATCV_i;
-real UP_i, U0_i, U0R_i, ETAMOB_i, NGATE_i, RDSW_i, UPR_i;
-real PRWGS_i, PRWGD_i, WR_i, PDIBL1_i, PDIBL1R_i, PDIBL2_i,PDIBL2R_i, PDIBL2_a ;
-real DROUT_i, PVAG_i;
-real AIGBINV_i, AIGBINV1_i, BIGBINV_i, CIGBINV_i, EIGBINV_i, NIGBINV_i;
-real AIGBACC_i, AIGBACC1_i, BIGBACC_i, CIGBACC_i, NIGBACC_i;
-real AIGC_i, AIGC1_i, BIGC_i, CIGC_i, PIGCD_i;
-real AIGS_i, AIGS1_i, BIGS_i, CIGS_i, NTOX_i, POXEDGE_i;
-real AIGD_i, AIGD1_i, BIGD_i, CIGD_i;
-real AGIDL_i, BGIDL_i, CGIDL_i, EGIDL_i, PGIDL_i;
-real AGISL_i, BGISL_i, CGISL_i, EGISL_i, PGISL_i;
-real ALPHA0_i, ALPHA1_i, ALPHAII0_i, ALPHAII1_i, BETA0_i;
-real BETAII0_i, BETAII1_i, BETAII2_i, ESATII_i;
-real LII_i, SII0_i, SII1_i, SII2_i, SIID_i, TII_i;
-real MEXP_i, MEXPR_i;
-real PCLM_i, PCLMG_i, PCLMCV_i, PCLM_a, PCLMR_i;
-real A1_i, A2_i, A11_i, A21_i;
-real K1RSCE_i, LPE0_i, DVTSHIFT_i, DVTSHIFT_a, DVTSHIFTR_i ;
-real UA_i, UC_i, EU_i, UD_i, UCS_i, UAR_i, EUR_i, UCR_i, UDR_i, UA_a, UD_a, UC_a, EU_a;
-real UA1_i, UA1R_i, UC1_i, UD1_i, UCSTE_i, UTE_i, UTL_i, EMOBT_i, UC1R_i, UD1R_i, UTER_i, UTLR_i;
-real PTWGT_i;
-real AT_i, ATCV_i, ATR_i;
-real RDW_i, RSW_i;
-real PRT_i, KT1_i, TSS_i, IIT_i, IGT_i, TGIDL_i;
-real NTGEN_i, AIGEN_i, BIGEN_i;
-real K0SISAT_i, K0SISAT1_i;
-real K2SISAT_i, K2SISAT1_i;
-real K2_i, K21_i;
-
-// Variables of Unified Finfet Compact Model
-real Cins, Ach, Weff_UFCM, qdep,rc, vth_fixed_factor_Sub, vth_fixed_factor_SI, qm, Qdep_ov_Cins, qi_acc_for_QM;
-real fieldnormalizationfactor, auxQMfact, QMFACTORCVfinal;
-real psipclamp, sqrtpsip, nq, F0;
-
-real LSP_i;
-
-`Cfringe_2d_vars();
-
-//===================================================
-// analog block begins
-//===================================================
-analog begin
-
- // ************************************************
- // * Geometry dependent calculations *
- // ************************************************
- begin : CMGBiasIndepCalc
-
- // Variable Initialization to Prevent Hidden States
- qid = 0.0;
- qis = 0.0;
- qba = 0.0;
- T11 = 0.0;
- T12 = 0.0;
- ids = 0.0;
- sigvds = 0.0;
- Iii = 0.0;
- qd = 0.0;
- qg = 0.0;
- qs = 0.0;
- qb = 0.0;
- Weff0 = 0.0;
- WeffCV0 = 0.0;
- CJS_t = 0.0;
- CJSWS_t = 0.0;
- CJSWGS_t = 0.0;
- CJD_t = 0.0;
- CJSWD_t = 0.0;
- CJSWGD_t = 0.0;
- PBS_t = 0.0;
- PBSWS_t = 0.0;
- PBSWGS_t = 0.0;
- PBD_t = 0.0;
- PBSWD_t = 0.0;
- PBSWGD_t = 0.0;
- JSS_t = 0.0;
- JSWS_t = 0.0;
- JSWGS_t = 0.0;
- JSD_t = 0.0;
- JSWD_t = 0.0;
- JSWGD_t = 0.0;
- JTSS_t = 0.0;
- JTSSWS_t = 0.0;
- JTSSWGS_t = 0.0;
- JTSD_t = 0.0;
- JTSSWD_t = 0.0;
- JTSSWGD_t = 0.0;
- NJTS_t = 0.0;
- NJTSSW_t = 0.0;
- NJTSSWG_t = 0.0;
- NJTSD_t = 0.0;
- NJTSSWD_t = 0.0;
- NJTSSWGD_t = 0.0;
- Ies = 0.0;
- Ied = 0.0;
- Czbs = 0.0;
- Czbssw = 0.0;
- Czbsswg = 0.0;
- Czbd = 0.0;
- Czbdsw = 0.0;
- Czbdswg = 0.0;
- Qes = 0.0;
- Qed = 0.0;
- Qeg = 0.0;
- Isbs = 0.0;
- Isbd = 0.0;
- Nvtms = 0.0;
- Nvtmd = 0.0;
- SslpRev = 0.0;
- IVjsmRev = 0.0;
- VjsmRev = 0.0;
- SslpFwd = 0.0;
- IVjsmFwd = 0.0;
- VjsmFwd = 0.0;
- DslpRev = 0.0;
- IVjdmRev = 0.0;
- VjdmRev = 0.0;
- DslpFwd = 0.0;
- IVjdmFwd = 0.0;
- VjdmFwd = 0.0;
- XExpBVS = 0.0;
- XExpBVD = 0.0;
- idsgen = 0.0;
- q0 = 0.0;
- Tcen = 0.0;
- MTcen = 0.0;
- Rdrain = 0.0;
- Rsource = 0.0;
- Cfr_geo = 0.0;
- igbinv = 0.0;
- igbs = 0.0;
- igbd = 0.0;
- igbacc = 0.0;
- igcs = 0.0;
- igcd = 0.0;
- igidl = 0.0;
- igisl = 0.0;
- igs = 0.0;
- igd = 0.0;
- cox_acc = 0.0;
- CGSO_i = 0.0;
- CGDO_i = 0.0;
- qb_acc = 0.0;
- qg_acc = 0.0;
- qgs_fr = 0.0;
- qgd_fr = 0.0;
- qds_fr = 0.0;
- qgs_parasitic = 0.0;
- qgd_parasitic = 0.0;
- FNPowerAt1Hz = 0.0;
- Gtnoi = 0.0;
- gspr = 0.0;
- gdpr = 0.0;
- Dr = 1.0;
- CDSCDR_i = 0.0;
- ETA0R_i = 0.0;
- VSAT1R_i = 0.0;
- VSAT1R_t = 0.0;
- MEXPR_i = 0.0;
- MEXPR_t = 0.0;
- PTWGR_i = 0.0;
- PTWGR_t = 0.0;
- PDIBL1R_i = 0.0;
- PDIBL2R_i = 0.0;
- PHIBE_i = 0.0;
- K1_i = 0.0;
- K11_i = 0.0;
- K2SAT_i = 0.0;
- K2SAT1_i = 0.0;
- KSATIVR_i = 0.0;
- K2_i = 0.0;
- K21_i = 0.0;
- UC_i = 0.0;
- UC1_i = 0.0;
- UC_t = 0.0;
- U0R_i = 0.0;
- UPR_i = 0.0;
- EUR_i = 0.0;
- ATR_i = 0.0;
- CITR_i = 0.0;
- ETA0R_i = 0.0;
- DVTP0_i = 0.0;
- DVTP1_i = 0.0;
- PDIBL2R_i = 0.0;
- PCLMR_i = 0.0;
- LeffCV_acc = 0.0;
- RDDRR_t = 0.0;
- RSDRR_t = 0.0;
- Rdsi = 0.0;
- T3y = 0.0;
- Tcen0 = 0.0;
- veseff = 0.0;
- U0R_t = 0.0;
- UAR_t = 0.0;
- UCR_t = 0.0;
- UDR_t = 0.0;
- VSAT_a = 0.0;
- DVTSHIFTR_i = 0.0;
- UA1R_i = 0.0;
- UAR_i = 0.0;
- UC1R_i = 0.0;
- UCR_i = 0.0;
- UD1R_i = 0.0;
- UDR_i = 0.0;
- UTER_i = 0.0;
- UTLR_i = 0.0;
- VSATR_i = 0.0;
- VSATR_t = 0.0;
- u0r = 0.0;
-
- // Thermal Noise
- sid = 0.0;
-
- `ifdef __TNOIMOD1__
- ctnoi = 0.0;
- sf = 0.0;
- C0 = 0.0;
- gamma = 0.0;
- delta = 0.0;
- `endif
-
- `ifdef __RGATEMOD__
- ggeltd = 0.0;
- `endif
-
- // Unified FinFET Model
- qm = 1.0;
- Cins = 1.0;
- Ach = 1.0;
- Weff_UFCM = 1.0;
- qdep = -1.0;
- rc = 1.0;
- vth_fixed_factor_Sub = 1.0;
- vth_fixed_factor_SI = 1.0;
- qi_acc_for_QM = 0.0;
- fieldnormalizationfactor = 0.0;
- auxQMfact = 0.0;
- QMFACTORCVfinal = 0.0;
- psipclamp = 1.0;
- sqrtpsip = 1.0;
- nq = 1.0;
- F0 = 0.0;
- e0 = 0.0;
- e1 = 0.0;
- e2 = 0.0;
- Qdep_ov_Cins = 0.0;
-
- // Constants
- if ( TYPE == `ntype ) begin
- devsign = 1;
- end else begin
- devsign = -1;
- end
-
- epssub = EPSRSUB * `EPS0;
- epssp = EPSRSP * `EPS0;
- cbox = EPSROX * `EPS0 / EOTBOX;
- epsratio = EPSRSUB / EPSROX;
-
- if ($port_connected(t) == 1) begin
- `ifdef __SHMOD__
- if (SHMOD == 0) begin
- if (SH_WARN == 1) begin
- $strobe("The optional 5th terminal is present but not active because SHMOD=0.");
- end
- end
- `else
- Temp(t) <+ 0.0;
- if (SH_WARN == 1) begin
- $strobe("The optional 5th terminal is present but not active because the model was not compiled with self-heating enabled (__SHMOD__ was not activated).");
- end
- `endif
- end
-
- // Constants for Quantum Mechanical Effects
- mx = 0.916 * `MEL;
- mxprime = 0.190 * `MEL;
- md = 0.190 * `MEL;
- mdprime = 0.417 * `MEL;
- gprime = 4.0;
- gfactor = 2.0;
-
- // Effective Channel Length for I-V / C-V
- Lg = L + XL;
- deltaL = LINT + LL * pow(Lg, -LLN);
- deltaL1 = LINT + LL * pow(Lg+DLBIN, -LLN);
- deltaLCV = DLC + LLC * pow(Lg, -LLN);
- Leff = Lg - 2.0 * deltaL;
- Leff1 = Lg + DLBIN - 2.0 * deltaL1; //Used in the binning equations only
- LeffCV = Lg - 2.0 * deltaLCV;
- if (BULKMOD != 0) LeffCV_acc = LeffCV - DLCACC;
-
- // Total Fins
- NFINtotal = NFIN * NF;
-
- // Range Checking on Leff and Leff1
- if (Leff <= 0.0) begin
- $strobe("Fatal: Leff = %e is not positive.", Leff);
- $finish(0);
- end else if (Leff <= 1.0e-9) begin
- $strobe("Warning: Leff = %e <= 1.0e-9.", Leff);
- end
-
- if (Leff1 <= 0.0) begin
- $strobe("Fatal: Leff1 = %e is not positive.", Leff1);
- $finish(0);
- end else if (Leff1 <= 1.0e-9) begin
- $strobe("Warning: Leff1 = %e <= 1.0e-9.", Leff1);
- end
-
- // Binning
- Inv_L = 1.0e-6 / (Leff1);
- Inv_NFIN = 1.0 / NFIN;
- Inv_LNFIN = 1.0e-6 / (Leff1 * NFIN);
-
- // Nbody Binning Equation for UFCM Parameters
- NBODY_i = NBODY + Inv_L * LNBODY + Inv_NFIN * NNBODY + Inv_LNFIN * PNBODY;
-
- if (NBODYN1 != 0.0) begin
- NBODY_i = NBODY_i * (1.0 + NBODYN1/NFIN * lln(1.0 + NFIN/NBODYN2));
- end
-
- // Model Parameters for Unified FinFET Compact Model by Juan Duarte 10/2013
- case (GEOMOD)
- 0: begin // Double Gate
- if (!$param_given(TFIN_TOP) || !$param_given(TFIN_BASE)) begin
- Weff_UFCM = 2.0 * HFIN;
- Cins = Weff_UFCM * EPSROX * `EPS0 / EOT;
- Ach = HFIN * TFIN;
- rc = (2.0 * Cins / (Weff_UFCM * Weff_UFCM * epssub / Ach));
- Qdep_ov_Cins = -`q * NBODY_i * Ach / Cins;
- end else begin
- Weff_UFCM = 2.0 * sqrt( HFIN * HFIN + (TFIN_TOP - TFIN_BASE) * (TFIN_TOP - TFIN_BASE) / 4.0);
- Cins = Weff_UFCM * EPSROX * `EPS0 / EOT;
- Ach = HFIN * (TFIN_TOP + TFIN_BASE) / 2.0;
- rc = (2.0 * Cins / (Weff_UFCM * Weff_UFCM * epssub / Ach));
- Qdep_ov_Cins = -`q * NBODY_i * Ach / Cins;
- end
- end
- 1: begin // Triple Gate
- if (!$param_given(TFIN_TOP) || !$param_given(TFIN_BASE)) begin
- Weff_UFCM = 2.0 * HFIN + TFIN;
- Cins = Weff_UFCM * EPSROX * `EPS0 / EOT;
- Ach = HFIN * TFIN;
- rc = (2.0 * Cins / (Weff_UFCM * Weff_UFCM * epssub / Ach));
- Qdep_ov_Cins = -`q * NBODY_i * Ach / Cins;
- end else begin
- Weff_UFCM = 2.0 * sqrt(HFIN * HFIN + (TFIN_TOP - TFIN_BASE) * (TFIN_TOP - TFIN_BASE) / 4.0) + TFIN_TOP;
- Cins = Weff_UFCM * EPSROX * `EPS0 / EOT;
- Ach = HFIN * (TFIN_TOP + TFIN_BASE) / 2.0;
- rc = (2.0 * Cins /(Weff_UFCM * Weff_UFCM * epssub / Ach));
- Qdep_ov_Cins = -`q * NBODY_i * Ach / Cins;
- end
- end
- 2: begin // Quadruple Gate
- if (!$param_given(TFIN_TOP) || !$param_given(TFIN_BASE)) begin
- Weff_UFCM = 2.0 * HFIN + 2.0 * TFIN;
- Cins = Weff_UFCM * EPSROX * `EPS0 / EOT;
- Ach = HFIN * TFIN;
- rc = (2.0 * Cins / (Weff_UFCM * Weff_UFCM * epssub / Ach));
- Qdep_ov_Cins = -`q * NBODY_i * Ach / Cins;
- end else begin
- Weff_UFCM = 2.0 * sqrt(HFIN * HFIN + (TFIN_TOP - TFIN_BASE) * (TFIN_TOP - TFIN_BASE) / 4.0) + TFIN_TOP + TFIN_BASE;
- Cins = Weff_UFCM * EPSROX * `EPS0 / EOT;
- Ach = HFIN * (TFIN_TOP + TFIN_BASE) / 2.0;
- rc = (2.0 * Cins / (Weff_UFCM * Weff_UFCM * epssub / Ach));
- Qdep_ov_Cins = -`q * NBODY_i * Ach / Cins;
- end
- end
- 3: begin // Cylindrical Gate
- Weff_UFCM = `M_PI * D;
- Cins = 2.0 * `M_PI * EPSROX * `EPS0 / ln(1.0 + 2.0 * EOT / D);
- Ach = `M_PI * D * D / 4.0;
- rc = (2.0 * Cins / (Weff_UFCM * Weff_UFCM * epssub / Ach));
- Qdep_ov_Cins = -`q * NBODY_i * Ach / Cins;
- end
- 4: begin // Unified Model
- Weff_UFCM = W_UFCM;
- Cins = CINS_UFCM;
- Ach = ACH_UFCM;
- rc = (2.0 * Cins / (Weff_UFCM * Weff_UFCM * epssub / Ach));
- Qdep_ov_Cins = -`q * NBODY_i * Ach / Cins;
- end
- endcase
-
- // Cox Definition
- cox = Cins / Weff_UFCM;
- if (BULKMOD != 0) begin
- cox_acc = cox * EOT / EOTACC;
- end
-
- // Effective Width Calculation
- Weff0 = Weff_UFCM - DELTAW;
- WeffCV0 = Weff_UFCM - DELTAWCV;
-
- // SCE Scaling Length
- scl = sqrt((epssub * Ach / Cins) * (1.0 + Ach * Cins / (2.0 * epssub * Weff_UFCM * Weff_UFCM)));
-
- // Binning Equations (Process Parameters)
- PHIG_i = PHIG + Inv_L * LPHIG + Inv_NFIN * NPHIG + Inv_LNFIN * PPHIG;
- NGATE_i = NGATE + Inv_L * LNGATE + Inv_NFIN * NNGATE + Inv_LNFIN * PNGATE;
-
- // Binning Equations (Model Parameters)
- CIT_i = CIT + Inv_L * LCIT + Inv_NFIN * NCIT + Inv_LNFIN * PCIT;
- CDSC_i = CDSC + Inv_L * LCDSC + Inv_NFIN * NCDSC + Inv_LNFIN * PCDSC;
- CDSCD_i = CDSCD + Inv_L * LCDSCD + Inv_NFIN * NCDSCD + Inv_LNFIN * PCDSCD;
- DVT0_i = DVT0 + Inv_L * LDVT0 + Inv_NFIN * NDVT0 + Inv_LNFIN * PDVT0;
- DVT1_i = DVT1 + Inv_L * LDVT1 + Inv_NFIN * NDVT1 + Inv_LNFIN * PDVT1;
- DVT1SS_i = DVT1SS + Inv_L * LDVT1SS + Inv_NFIN * NDVT1SS + Inv_LNFIN * PDVT1SS;
- PHIN_i = PHIN + Inv_L * LPHIN + Inv_NFIN * NPHIN + Inv_LNFIN * PPHIN;
- ETA0_i = ETA0 + Inv_L * LETA0 + Inv_NFIN * NETA0 + Inv_LNFIN * PETA0;
- DSUB_i = DSUB + Inv_L * LDSUB + Inv_NFIN * NDSUB + Inv_LNFIN * PDSUB;
- K1RSCE_i = K1RSCE + Inv_L * LK1RSCE + Inv_NFIN * NK1RSCE + Inv_LNFIN * PK1RSCE;
- LPE0_i = LPE0 + Inv_L * LLPE0 + Inv_NFIN * NLPE0 + Inv_LNFIN * PLPE0;
- DVTSHIFT_i = DVTSHIFT + Inv_L * LDVTSHIFT + Inv_NFIN * NDVTSHIFT + Inv_LNFIN * PDVTSHIFT;
- K0_i = K0 + Inv_L * LK0 + Inv_NFIN * NK0 + Inv_LNFIN * PK0;
- K01_i = K01 + Inv_L * LK01 + Inv_NFIN * NK01 + Inv_LNFIN * PK01;
- K0SI_i = K0SI + Inv_L * LK0SI + Inv_NFIN * NK0SI + Inv_LNFIN * PK0SI;
- K0SI1_i = K0SI1 + Inv_L * LK0SI1 + Inv_NFIN * NK0SI1 + Inv_LNFIN * PK0SI1;
- K2SI_i = K2SI + Inv_L * LK2SI + Inv_NFIN * NK2SI + Inv_LNFIN * PK2SI;
- K2SI1_i = K2SI1 + Inv_L * LK2SI1 + Inv_NFIN * NK2SI1 + Inv_LNFIN * PK2SI1;
- K0SISAT_i = K0SISAT + Inv_L * LK0SISAT + Inv_NFIN * NK0SISAT + Inv_LNFIN * PK0SISAT;
- K0SISAT1_i = K0SISAT1 + Inv_L * LK0SISAT1 + Inv_NFIN * NK0SISAT1 + Inv_LNFIN * PK0SISAT1;
- K2SISAT_i = K2SISAT + Inv_L * LK2SISAT + Inv_NFIN * NK2SISAT + Inv_LNFIN * PK2SISAT;
- K2SISAT1_i = K2SISAT1 + Inv_L * LK2SISAT1 + Inv_NFIN * NK2SISAT1 + Inv_LNFIN * PK2SISAT1;
-
- if (BULKMOD != 0) begin
- if (BULKMOD == 2) begin
- K2_i = K2 + Inv_L * LK2 + Inv_NFIN * NK2 + Inv_LNFIN * PK2;
- K21_i = K21 + Inv_L * LK21 + Inv_NFIN * NK21 + Inv_LNFIN * PK21;
- K2SAT_i = K2SAT + Inv_L * LK2SAT + Inv_NFIN * NK2SAT + Inv_LNFIN * PK2SAT;
- K2SAT1_i = K2SAT1 + Inv_L * LK2SAT1 + Inv_NFIN * NK2SAT1 + Inv_LNFIN * PK2SAT1;
- end
- PHIBE_i = PHIBE + Inv_L * LPHIBE + Inv_NFIN * NPHIBE + Inv_LNFIN * PPHIBE;
- K1_i = K1 + Inv_L * LK1 + Inv_NFIN * NK1 + Inv_LNFIN * PK1;
- K11_i = K11 + Inv_L * LK11 + Inv_NFIN * NK11 + Inv_LNFIN * PK11;
- end
- QMFACTOR_i = QMFACTOR + Inv_L * LQMFACTOR + Inv_NFIN * NQMFACTOR + Inv_LNFIN * PQMFACTOR;
- QMTCENCV_i = QMTCENCV + Inv_L * LQMTCENCV + Inv_NFIN * NQMTCENCV + Inv_LNFIN * PQMTCENCV;
- QMTCENCVA_i = QMTCENCVA + Inv_L * LQMTCENCVA + Inv_NFIN * NQMTCENCVA + Inv_LNFIN * PQMTCENCVA;
- VSAT_i = VSAT + Inv_L * LVSAT + Inv_NFIN * NVSAT + Inv_LNFIN * PVSAT;
- VSAT1_i = VSAT1 + Inv_L * LVSAT1 + Inv_NFIN * NVSAT1 + Inv_LNFIN * PVSAT1;
- VSATCV_i = VSATCV + Inv_L * LVSATCV + Inv_NFIN * NVSATCV + Inv_LNFIN * PVSATCV;
- DELTAVSAT_i = DELTAVSAT + Inv_L * LDELTAVSAT + Inv_NFIN * NDELTAVSAT + Inv_LNFIN * PDELTAVSAT;
- PSAT_i = PSAT + Inv_L * LPSAT + Inv_NFIN * NPSAT + Inv_LNFIN * PPSAT;
- DELTAVSATCV_i = DELTAVSATCV + Inv_L * LDELTAVSATCV + Inv_NFIN * NDELTAVSATCV + Inv_LNFIN * PDELTAVSATCV;
- PSATCV_i = PSATCV + Inv_L * LPSATCV + Inv_NFIN * NPSATCV + Inv_LNFIN * PPSATCV;
- KSATIV_i = KSATIV + Inv_L * LKSATIV + Inv_NFIN * NKSATIV + Inv_LNFIN * PKSATIV;
- MEXP_i = MEXP + Inv_L * LMEXP + Inv_NFIN * NMEXP + Inv_LNFIN * PMEXP;
- PTWG_i = PTWG + Inv_L * LPTWG + Inv_NFIN * NPTWG + Inv_LNFIN * PPTWG;
- U0_i = U0 + Inv_L * LU0 + Inv_NFIN * NU0 + Inv_LNFIN * PU0;
- ETAMOB_i = ETAMOB + Inv_L * LETAMOB + Inv_NFIN * NETAMOB + Inv_LNFIN * PETAMOB;
- UP_i = UP + Inv_L * LUP + Inv_NFIN * NUP + Inv_LNFIN * PUP;
- UA_i = UA + Inv_L * LUA + Inv_NFIN * NUA + Inv_LNFIN * PUA;
- if (BULKMOD != 0) begin
- UC_i = UC + Inv_L * LUC + Inv_NFIN * NUC + Inv_LNFIN * PUC;
- end
- EU_i = EU + Inv_L * LEU + Inv_NFIN * NEU + Inv_LNFIN * PEU;
- UD_i = UD + Inv_L * LUD + Inv_NFIN * NUD + Inv_LNFIN * PUD;
- UCS_i = UCS + Inv_L * LUCS + Inv_NFIN * NUCS + Inv_LNFIN * PUCS;
- PCLM_i = PCLM + Inv_L * LPCLM + Inv_NFIN * NPCLM + Inv_LNFIN * PPCLM;
- PCLMG_i = PCLMG + Inv_L * LPCLMG + Inv_NFIN * NPCLMG + Inv_LNFIN * PPCLMG;
- PCLMCV_i = PCLMCV + Inv_L * LPCLMCV + Inv_NFIN * NPCLMCV + Inv_LNFIN * PPCLMCV;
- A1_i = A1 + Inv_L * LA1 + Inv_NFIN * NA1 + Inv_LNFIN * PA1;
- A11_i = A11 + Inv_L * LA11 + Inv_NFIN * NA11 + Inv_LNFIN * PA11;
- A2_i = A2 + Inv_L * LA2 + Inv_NFIN * NA2 + Inv_LNFIN * PA2;
- A21_i = A21 + Inv_L * LA21 + Inv_NFIN * NA21 + Inv_LNFIN * PA21;
- RDSW_i = RDSW + Inv_L * LRDSW + Inv_NFIN * NRDSW + Inv_LNFIN * PRDSW;
- RSW_i = RSW + Inv_L * LRSW + Inv_NFIN * NRSW + Inv_LNFIN * PRSW;
- RDW_i = RDW + Inv_L * LRDW + Inv_NFIN * NRDW + Inv_LNFIN * PRDW;
- PRWGD_i = PRWGD + Inv_L * LPRWGD + Inv_NFIN * NPRWGD + Inv_LNFIN * PPRWGD;
- PRWGS_i = PRWGS + Inv_L * LPRWGS + Inv_NFIN * NPRWGS + Inv_LNFIN * PPRWGS;
- WR_i = WR + Inv_L * LWR + Inv_NFIN * NWR + Inv_LNFIN * PWR;
- PDIBL1_i = PDIBL1 + Inv_L * LPDIBL1 + Inv_NFIN * NPDIBL1 + Inv_LNFIN * PPDIBL1;
- PDIBL2_i = PDIBL2 + Inv_L * LPDIBL2 + Inv_NFIN * NPDIBL2 + Inv_LNFIN * PPDIBL2;
- DROUT_i = DROUT + Inv_L * LDROUT + Inv_NFIN * NDROUT + Inv_LNFIN * PDROUT;
- PVAG_i = PVAG + Inv_L * LPVAG + Inv_NFIN * NPVAG + Inv_LNFIN * PPVAG;
- AIGBINV_i = AIGBINV + Inv_L * LAIGBINV + Inv_NFIN * NAIGBINV + Inv_LNFIN * PAIGBINV;
- AIGBINV1_i = AIGBINV1 + Inv_L * LAIGBINV1 + Inv_NFIN * NAIGBINV1 + Inv_LNFIN * PAIGBINV1;
- BIGBINV_i = BIGBINV + Inv_L * LBIGBINV + Inv_NFIN * NBIGBINV + Inv_LNFIN * PBIGBINV;
- CIGBINV_i = CIGBINV + Inv_L * LCIGBINV + Inv_NFIN * NCIGBINV + Inv_LNFIN * PCIGBINV;
- EIGBINV_i = EIGBINV + Inv_L * LEIGBINV + Inv_NFIN * NEIGBINV + Inv_LNFIN * PEIGBINV;
- NIGBINV_i = NIGBINV + Inv_L * LNIGBINV + Inv_NFIN * NNIGBINV + Inv_LNFIN * PNIGBINV;
- AIGBACC_i = AIGBACC + Inv_L * LAIGBACC + Inv_NFIN * NAIGBACC + Inv_LNFIN * PAIGBACC;
- AIGBACC1_i = AIGBACC1 + Inv_L * LAIGBACC1 + Inv_NFIN * NAIGBACC1 + Inv_LNFIN * PAIGBACC1;
- BIGBACC_i = BIGBACC + Inv_L * LBIGBACC + Inv_NFIN * NBIGBACC + Inv_LNFIN * PBIGBACC;
- CIGBACC_i = CIGBACC + Inv_L * LCIGBACC + Inv_NFIN * NCIGBACC + Inv_LNFIN * PCIGBACC;
- NIGBACC_i = NIGBACC + Inv_L * LNIGBACC + Inv_NFIN * NNIGBACC + Inv_LNFIN * PNIGBACC;
- AIGC_i = AIGC + Inv_L * LAIGC + Inv_NFIN * NAIGC + Inv_LNFIN * PAIGC;
- AIGC1_i = AIGC1 + Inv_L * LAIGC1 + Inv_NFIN * NAIGC1 + Inv_LNFIN * PAIGC1;
- BIGC_i = BIGC + Inv_L * LBIGC + Inv_NFIN * NBIGC + Inv_LNFIN * PBIGC;
- CIGC_i = CIGC + Inv_L * LCIGC + Inv_NFIN * NCIGC + Inv_LNFIN * PCIGC;
- PIGCD_i = PIGCD + Inv_L * LPIGCD + Inv_NFIN * NPIGCD + Inv_LNFIN * PPIGCD;
- AIGS_i = AIGS + Inv_L * LAIGS + Inv_NFIN * NAIGS + Inv_LNFIN * PAIGS;
- AIGS1_i = AIGS1 + Inv_L * LAIGS1 + Inv_NFIN * NAIGS1 + Inv_LNFIN * PAIGS1;
- BIGS_i = BIGS + Inv_L * LBIGS + Inv_NFIN * NBIGS + Inv_LNFIN * PBIGS;
- CIGS_i = CIGS + Inv_L * LCIGS + Inv_NFIN * NCIGS + Inv_LNFIN * PCIGS;
- AIGD_i = AIGD + Inv_L * LAIGD + Inv_NFIN * NAIGD + Inv_LNFIN * PAIGD;
- AIGD1_i = AIGD1 + Inv_L * LAIGD1 + Inv_NFIN * NAIGD1 + Inv_LNFIN * PAIGD1;
- BIGD_i = BIGD + Inv_L * LBIGD + Inv_NFIN * NBIGD + Inv_LNFIN * PBIGD;
- CIGD_i = CIGD + Inv_L * LCIGD + Inv_NFIN * NCIGD + Inv_LNFIN * PCIGD;
- NTOX_i = NTOX + Inv_L * LNTOX + Inv_NFIN * NNTOX + Inv_LNFIN * PNTOX;
- POXEDGE_i = POXEDGE + Inv_L * LPOXEDGE + Inv_NFIN * NPOXEDGE + Inv_LNFIN * PPOXEDGE;
- AGIDL_i = AGIDL + Inv_L * LAGIDL + Inv_NFIN * NAGIDL + Inv_LNFIN * PAGIDL;
- BGIDL_i = BGIDL + Inv_L * LBGIDL + Inv_NFIN * NBGIDL + Inv_LNFIN * PBGIDL;
- CGIDL_i = CGIDL + Inv_L * LCGIDL + Inv_NFIN * NCGIDL + Inv_LNFIN * PCGIDL;
- EGIDL_i = EGIDL + Inv_L * LEGIDL + Inv_NFIN * NEGIDL + Inv_LNFIN * PEGIDL;
- PGIDL_i = PGIDL + Inv_L * LPGIDL + Inv_NFIN * NPGIDL + Inv_LNFIN * PPGIDL;
- AGISL_i = AGISL + Inv_L * LAGISL + Inv_NFIN * NAGISL + Inv_LNFIN * PAGISL;
- BGISL_i = BGISL + Inv_L * LBGISL + Inv_NFIN * NBGISL + Inv_LNFIN * PBGISL;
- CGISL_i = CGISL + Inv_L * LCGISL + Inv_NFIN * NCGISL + Inv_LNFIN * PCGISL;
- EGISL_i = EGISL + Inv_L * LEGISL + Inv_NFIN * NEGISL + Inv_LNFIN * PEGISL;
- PGISL_i = PGISL + Inv_L * LPGISL + Inv_NFIN * NPGISL + Inv_LNFIN * PPGISL;
- ALPHA0_i = ALPHA0 + Inv_L * LALPHA0 + Inv_NFIN * NALPHA0 + Inv_LNFIN * PALPHA0;
- ALPHA1_i = ALPHA1 + Inv_L * LALPHA1 + Inv_NFIN * NALPHA1 + Inv_LNFIN * PALPHA1;
- ALPHAII0_i = ALPHAII0 + Inv_L * LALPHAII0 + Inv_NFIN * NALPHAII0 + Inv_LNFIN * PALPHAII0;
- ALPHAII1_i = ALPHAII1 + Inv_L * LALPHAII1 + Inv_NFIN * NALPHAII1 + Inv_LNFIN * PALPHAII1;
- BETA0_i = BETA0 + Inv_L * LBETA0 + Inv_NFIN * NBETA0 + Inv_LNFIN * PBETA0;
- BETAII0_i = BETAII0 + Inv_L * LBETAII0 + Inv_NFIN * NBETAII0 + Inv_LNFIN * PBETAII0;
- BETAII1_i = BETAII1 + Inv_L * LBETAII1 + Inv_NFIN * NBETAII1 + Inv_LNFIN * PBETAII1;
- BETAII2_i = BETAII2 + Inv_L * LBETAII2 + Inv_NFIN * NBETAII2 + Inv_LNFIN * PBETAII2;
- ESATII_i = ESATII + Inv_L * LESATII + Inv_NFIN * NESATII + Inv_LNFIN * PESATII;
- LII_i = LII + Inv_L * LLII + Inv_NFIN * NLII + Inv_LNFIN * PLII;
- SII0_i = SII0 + Inv_L * LSII0 + Inv_NFIN * NSII0 + Inv_LNFIN * PSII0;
- SII1_i = SII1 + Inv_L * LSII1 + Inv_NFIN * NSII1 + Inv_LNFIN * PSII1;
- SII2_i = SII2 + Inv_L * LSII2 + Inv_NFIN * NSII2 + Inv_LNFIN * PSII2;
- SIID_i = SIID + Inv_L * LSIID + Inv_NFIN * NSIID + Inv_LNFIN * PSIID;
- TII_i = TII + Inv_L * LTII + Inv_NFIN * NTII + Inv_LNFIN * PTII;
- CFS_i = CFS + Inv_L * LCFS + Inv_NFIN * NCFS + Inv_LNFIN * PCFS;
- CFD_i = CFD + Inv_L * LCFD + Inv_NFIN * NCFD + Inv_LNFIN * PCFD;
- COVS_i = COVS + Inv_L * LCOVS + Inv_NFIN * NCOVS + Inv_LNFIN * PCOVS;
- COVD_i = COVD + Inv_L * LCOVD + Inv_NFIN * NCOVD + Inv_LNFIN * PCOVD;
- CGSL_i = CGSL + Inv_L * LCGSL + Inv_NFIN * NCGSL + Inv_LNFIN * PCGSL;
- CGDL_i = CGDL + Inv_L * LCGDL + Inv_NFIN * NCGDL + Inv_LNFIN * PCGDL;
- CGBL_i = CGBL + Inv_L * LCGBL + Inv_NFIN * NCGBL + Inv_LNFIN * PCGBL;
- CKAPPAS_i = CKAPPAS + Inv_L * LCKAPPAS + Inv_NFIN * NCKAPPAS + Inv_LNFIN * PCKAPPAS;
- CKAPPAD_i = CKAPPAD + Inv_L * LCKAPPAD + Inv_NFIN * NCKAPPAD + Inv_LNFIN * PCKAPPAD;
- CKAPPAB_i = CKAPPAB + Inv_L * LCKAPPAB + Inv_NFIN * NCKAPPAB + Inv_LNFIN * PCKAPPAB;
- NTGEN_i = NTGEN + Inv_L * LNTGEN + Inv_NFIN * NNTGEN + Inv_LNFIN * PNTGEN;
- AIGEN_i = AIGEN + Inv_L * LAIGEN + Inv_NFIN * NAIGEN + Inv_LNFIN * PAIGEN;
- BIGEN_i = BIGEN + Inv_L * LBIGEN + Inv_NFIN * NBIGEN + Inv_LNFIN * PBIGEN;
-
- if (ASYMMOD != 0) begin
- CDSCDR_i = CDSCDR + Inv_L * LCDSCDR + Inv_NFIN * NCDSCDR + Inv_LNFIN * PCDSCDR;
- CITR_i = CITR + Inv_L * LCITR + Inv_NFIN * NCITR + Inv_LNFIN * PCITR;
- ETA0R_i = ETA0R + Inv_L * LETA0R + Inv_NFIN * NETA0R + Inv_LNFIN * PETA0R;
- VSAT1R_i = VSAT1R + Inv_L * LVSAT1R + Inv_NFIN * NVSAT1R + Inv_LNFIN * PVSAT1R;
- MEXPR_i = MEXPR + Inv_L * LMEXPR + Inv_NFIN * NMEXPR + Inv_LNFIN * PMEXPR;
- PTWGR_i = PTWGR + Inv_L * LPTWGR + Inv_NFIN * NPTWGR + Inv_LNFIN * PPTWGR;
- PDIBL1R_i = PDIBL1R + Inv_L * LPDIBL1R + Inv_NFIN * NPDIBL1R + Inv_LNFIN * PPDIBL1R;
- PDIBL2R_i = PDIBL2R + Inv_L * LPDIBL2R + Inv_NFIN * NPDIBL2R + Inv_LNFIN * PPDIBL2R;
- PCLMR_i = PCLMR + Inv_L * LPCLMR + Inv_NFIN * NPCLMR + Inv_LNFIN * PPCLMR;
- DVTSHIFTR_i = DVTSHIFTR + Inv_L * LDVTSHIFTR + Inv_NFIN * NDVTSHIFTR + Inv_LNFIN * PDVTSHIFTR;
- VSATR_i = VSATR + Inv_L * LVSATR + Inv_NFIN * NVSATR + Inv_LNFIN * PVSATR;
- KSATIVR_i = KSATIVR + Inv_L * LKSATIVR + Inv_NFIN * NKSATIVR + Inv_LNFIN * PKSATIVR;
- U0R_i = U0R + Inv_L * LU0R + Inv_NFIN * NU0R + Inv_LNFIN * PU0R;
- UAR_i = UAR + Inv_L * LUAR + Inv_NFIN * NUAR + Inv_LNFIN * PUAR;
- UPR_i = UPR + Inv_L * LUPR + Inv_NFIN * NUPR + Inv_LNFIN * PUPR;
- if (BULKMOD != 0) begin
- UCR_i = UCR + Inv_L * LUCR + Inv_NFIN * NUCR + Inv_LNFIN * PUCR;
- end
- EUR_i = EUR + Inv_L * LEUR + Inv_NFIN * NEUR + Inv_LNFIN * PEUR;
- UDR_i = UDR + Inv_L * LUDR + Inv_NFIN * NUDR + Inv_LNFIN * PUDR;
- end
-
- `ifdef __NQSMOD1__
- if (NQSMOD == 1 && XRCRG1 != 0.0) begin
- XRCRG1_i = XRCRG1 + Inv_L * LXRCRG1 + Inv_NFIN * NXRCRG1 + Inv_LNFIN * PXRCRG1;
- XRCRG2_i = XRCRG2 + Inv_L * LXRCRG2 + Inv_NFIN * NXRCRG2 + Inv_LNFIN * PXRCRG2;
- end else begin
- XRCRG1_i = 0.0;
- XRCRG2_i = 0.0;
- end
- `else
- if (NQSMOD == 1) begin
- $strobe(" Although the model selector NQSMOD is set to 1, the NQS gate resistance model is not activated in the Verilog-A code. Please uncomment \"`define __NQSMOD1__\" in bsimcmg.va to activate it.");
- end
- `endif
-
- `ifdef __NQSMOD2__
- if (NQSMOD == 2 && XRCRG1 != 0.0) begin
- XRCRG1_i = XRCRG1 + Inv_L * LXRCRG1 + Inv_NFIN * NXRCRG1 + Inv_LNFIN * PXRCRG1;
- XRCRG2_i = XRCRG2 + Inv_L * LXRCRG2 + Inv_NFIN * NXRCRG2 + Inv_LNFIN * PXRCRG2;
- end else begin
- XRCRG1_i = 0.0;
- XRCRG2_i = 0.0;
- end
- `else
- if (NQSMOD == 2) begin
- $strobe(" Although the model selector NQSMOD is set to 2, the NQS gate resistance model is not activated in the Verilog-A code. Please uncomment \"`define __NQSMOD2__\" in bsimcmg.va to activate it.");
- end
- `endif
-
- UTE_i = UTE + Inv_L * LUTE + Inv_NFIN * NUTE + Inv_LNFIN * PUTE;
- UTL_i = UTL + Inv_L * LUTL + Inv_NFIN * NUTL + Inv_LNFIN * PUTL;
- EMOBT_i = EMOBT + Inv_L * LEMOBT + Inv_NFIN * NEMOBT + Inv_LNFIN * PEMOBT;
- UA1_i = UA1 + Inv_L * LUA1 + Inv_NFIN * NUA1 + Inv_LNFIN * PUA1;
-
- if (BULKMOD != 0) begin
- UC1_i = UC1 + Inv_L * LUC1 + Inv_NFIN * NUC1 + Inv_LNFIN * PUC1;
- end
- UD1_i = UD1 + Inv_L * LUD1 + Inv_NFIN * NUD1 + Inv_LNFIN * PUD1;
- UCSTE_i = UCSTE + Inv_L * LUCSTE + Inv_NFIN * NUCSTE + Inv_LNFIN * PUCSTE;
- PTWGT_i = PTWGT + Inv_L * LPTWGT + Inv_NFIN * NPTWGT + Inv_LNFIN * PPTWGT;
- AT_i = AT + Inv_L * LAT + Inv_NFIN * NAT + Inv_LNFIN * PAT;
- ATCV_i = ATCV + Inv_L * LATCV + Inv_NFIN * NATCV + Inv_LNFIN * PATCV;
- PRT_i = PRT + Inv_L * LPRT + Inv_NFIN * NPRT + Inv_LNFIN * PPRT;
- KT1_i = KT1 + Inv_L * LKT1 + Inv_NFIN * NKT1 + Inv_LNFIN * PKT1;
- TSS_i = TSS + Inv_L * LTSS + Inv_NFIN * NTSS + Inv_LNFIN * PTSS;
- IIT_i = IIT + Inv_L * LIIT + Inv_NFIN * NIIT + Inv_LNFIN * PIIT;
- TGIDL_i = TGIDL + Inv_L * LTGIDL + Inv_NFIN * NTGIDL + Inv_LNFIN * PTGIDL;
- IGT_i = IGT + Inv_L * LIGT + Inv_NFIN * NIGT + Inv_LNFIN * PIGT;
-
- if (ASYMMOD != 0) begin
- UTER_i = UTER + Inv_L * LUTER + Inv_NFIN * NUTER + Inv_LNFIN * PUTER;
- UTLR_i = UTLR + Inv_L * LUTLR + Inv_NFIN * NUTLR + Inv_LNFIN * PUTLR;
- UA1R_i = UA1R + Inv_L * LUA1R + Inv_NFIN * NUA1R + Inv_LNFIN * PUA1R;
- UD1R_i = UD1R + Inv_L * LUD1R + Inv_NFIN * NUD1R + Inv_LNFIN * PUD1R;
- ATR_i = ATR + Inv_L * LATR + Inv_NFIN * NATR + Inv_LNFIN * PATR;
- if (BULKMOD != 0) begin
- UC1R_i = UC1R + Inv_L * LUC1R + Inv_NFIN * NUC1R + Inv_LNFIN * PUC1R;
- end
- end
-
- // Geometrical Scaling
- // NFIN Scaling
- if (PHIGN1 != 0.0) begin
- PHIG_i = PHIG_i * (1.0 + PHIGN1 / NFIN * lln(1.0 + NFIN / PHIGN2));
- end
-
- if (ETA0N1 != 0.0) begin
- ETA0_i = ETA0_i * (1.0 + ETA0N1 / NFIN * lln(1.0 + NFIN / ETA0N2));
- end
-
- if (CDSCN1 != 0.0) begin
- CDSC_i = CDSC_i * (1.0 + CDSCN1 / NFIN * lln(1.0 + NFIN / CDSCN2));
- end
-
- if (CDSCDN1 != 0.0) begin
- CDSCD_i = CDSCD_i * (1.0 + CDSCDN1 / NFIN * lln(1.0 + NFIN / CDSCDN2));
- end
-
- if (CDSCDRN1 != 0.0) begin
- CDSCDR_i = CDSCDR_i * (1.0 + CDSCDRN1 / NFIN * lln(1.0 + NFIN / CDSCDRN2));
- end
-
- if (VSATN1 != 0.0) begin
- VSAT_i = VSAT_i * (1.0 + VSATN1 / NFIN * lln(1.0 + NFIN / VSATN2));
- end
-
- if (VSAT1N1 != 0.0) begin
- VSAT1_i = VSAT1_i * (1.0 + VSAT1N1 / NFIN * lln(1.0 + NFIN / VSAT1N2));
- end
-
- if (VSAT1RN1 != 0.0) begin
- VSAT1R_i = VSAT1R_i * (1.0 + VSAT1RN1 / NFIN * lln(1.0 + NFIN / VSAT1RN2));
- end
-
- if (U0N1 != 0.0) begin
- U0_i = U0_i * (1.0 + U0N1 / NFIN * lln(1.0 + NFIN / U0N2));
- end
-
- if ($param_given(NFINNOM)) begin
- PHIG_i = PHIG_i * (1.0 + (NFIN - NFINNOM) * PHIGLT * Leff) ;
- ETA0_i = ETA0_i * (1.0 + (NFIN - NFINNOM) * ETA0LT * Leff);
- U0_i = U0_i * (1.0 + (NFIN - NFINNOM) * U0LT * Leff);
- end
-
- if (U0N1R != 0.0) begin
- U0R_i = U0R_i * (1.0 + U0N1R / NFIN * lln(1.0 + NFIN / U0N2R));
- end
-
- // Length Scaling
- PHIG_i = PHIG_i + PHIGL * Leff;
- if (LPA > 0.0) begin
- U0_i = U0_i * (1.0 - UP_i * pow(Leff, -LPA));
- end else begin
- U0_i = U0_i * (1.0 - UP_i);
- end
- UA_i = UA_i + AUA * lexp(-Leff / BUA);
- UD_i = UD_i + AUD * lexp(-Leff / BUD);
- EU_i = EU_i + AEU * lexp(-Leff / BEU);
-
- if (ASYMMOD != 0) begin
- if (LPAR > 0.0) begin
- U0R_i = U0R_i * (1.0 - UPR_i * pow(Leff, -LPAR));
- end else begin
- U0R_i = U0R_i * (1.0 - UPR_i);
- end
- UAR_i = UAR_i + AUAR * lexp(-Leff / BUAR);
- UDR_i = UDR_i + AUDR * lexp(-Leff / BUDR);
- EUR_i = EUR_i + AEUR * lexp(-Leff / BEUR);
- end
-
- if (RDSMOD == 1) begin
- RSW_i = RSW_i + ARSW * lexp(-Leff / BRSW);
- RDW_i = RDW_i + ARDW * lexp(-Leff / BRDW);
- end else begin
- RDSW_i = RDSW_i + ARDSW * lexp(-Leff / BRDSW);
- end
-
- PCLM_i = PCLM_i + APCLM * lexp(-Leff / BPCLM);
- if (ASYMMOD != 0) begin
- PCLMR_i = PCLMR_i + APCLMR * pow(Leff, -BPCLMR);
- end
-
- MEXP_i = MEXP_i + AMEXP * pow(Leff, -BMEXP);
- if (ASYMMOD != 0) begin
- MEXPR_i = MEXPR_i + AMEXPR * pow(Leff, -BMEXPR);
- end
-
- PTWG_i = PTWG_i + APTWG * lexp(-Leff / BPTWG);
- if (ASYMMOD != 0) begin
- PTWGR_i = PTWGR_i + APTWG * lexp(-Leff / BPTWG);
- end
-
- VSAT_i = VSAT_i + AVSAT * lexp(-Leff / BVSAT);
- VSAT1_i = VSAT1_i + AVSAT1 * lexp(-Leff / BVSAT1);
- if (ASYMMOD != 0) begin
- VSAT1R_i = VSAT1R_i + AVSAT1 * lexp(-Leff / BVSAT1);
- end
-
- PSAT_i = PSAT_i + APSAT * lexp(-Leff / BPSAT);
- PSATCV_i = PSATCV_i + APSATCV * lexp(-Leff / BPSATCV);
- VSATCV_i = VSATCV_i + AVSATCV * lexp(-LeffCV / BVSATCV);
-
- // Scaling for DITS Parameters
- DVTP0_i = DVTP0 + ADVTP0 * lexp(-Leff / BDVTP0);
- DVTP1_i = DVTP1 + ADVTP1 * lexp(-Leff / BDVTP1);
-
- // Geometrical Scaling for Toxeff / Charge Centroid Tcen
- if (QMTCENCV_i > 0.0 || QMTCENCVA_i > 0.0) begin
- MTcen = 1.0 + AQMTCEN * lexp(- (2.0 * Ach / Weff_UFCM) / BQMTCEN);
- Tcen0 = (2.0 * Ach / Weff_UFCM ) * MTcen;
- end
-
- // **************************************
- // * Parameter Checking *
- // **************************************
-
- if (LeffCV <= 1.0e-9) begin
- $strobe("Warning: LeffCV = %e <= 1.0e-9.", LeffCV);
- end
-
- if (BULKMOD != 0) begin
- if (LeffCV_acc <= 1.0e-9) begin
- $strobe("Warning: LeffCV_acc = %e <= 1.0e-9.", LeffCV_acc);
- end
- end
-
- if (Weff0 <= 1.0e-9) begin
- $strobe("Warning: Weff0 = %e <= 1.0e-9.", Weff0);
- end
-
- if (WeffCV0 <= 1.0e-9) begin
- $strobe("Warning: WeffCV0 = %e <= 1.0e-9.", WeffCV0);
- end
-
- if (NBODY_i <= 0.0) begin
- $strobe("Fatal: NBODY_i = %e is not positive.", NBODY_i);
- $finish(0);
- end else if (NBODY_i <= 1.0e18) begin
- $strobe("Warning: NBODY_i = %e m^-3 may be too small.", NBODY_i);
- end
-
- if (NGATE_i < 0.0) begin
- $strobe("Fatal: NGATE_i = %e is negative.", NGATE_i);
- $finish(0);
- end else if (NGATE_i != 0.0 && NGATE_i <= 1.0e24) begin
- $strobe("Warning: NGATE_i = %e may be too small.", NGATE_i);
- end else if (NGATE_i > 1.0e31) begin
- $strobe("Fatal: NGATE_i = %e is too high.", NGATE_i);
- $finish(0);
- end
-
- if (DVT0_i < 0.0) begin
- $strobe("Warning: DVT0_i = %e is negative.", DVT0_i);
- end
-
- if (PHIG_i <= 0.0) begin
- $strobe("Fatal: PHIG_i = %e is not positive.", PHIG_i);
- $finish(0);
- end
-
- if (VSAT_i <= 0.0) begin
- $strobe("Fatal: VSAT_i = %e is not positive.", VSAT_i);
- $finish(0);
- end
-
- if (VSAT1_i <= 0.0) begin
- $strobe("Fatal: VSAT1_i = %e is not positive.", VSAT1_i);
- $finish(0);
- end
-
- if (ASYMMOD != 0 && VSAT1R_i <= 0.0) begin
- $strobe("Fatal: VSAT1R_i = %e is not positive.", VSAT1R_i);
- $finish(0);
- end
-
- if (DVT1_i <= 0.0) begin
- $strobe("Fatal: DVT1_i = %e is not positive.", DVT1_i);
- $finish(0);
- end
-
- if (DVT1SS_i <= 0.0) begin
- $strobe("Fatal: DVT1SS_i = %e is not positive.", DVT1SS_i);
- $finish(0);
- end
-
- if (CDSC_i < 0.0) begin
- $strobe("Warning: CDSC_i = %e is negative.", CDSC_i);
- end
-
- if (CDSCD_i < 0.0) begin
- $strobe("Warning: CDSCD_i = %e is negative.", CDSCD_i);
- end
-
- if (ASYMMOD != 0 && CDSCDR_i < 0.0) begin
- $strobe("Warning: CDSCDR_i = %e is negative.", CDSCDR_i);
- end
-
- if (DSUB_i <= 0.0) begin
- $strobe("Fatal: DSUB_i = %e is not positive.", DSUB_i);
- $finish(0);
- end
-
- if (ETA0_i < 0.0) begin
- $strobe("Warning: ETA0_i = %e is negative, setting it to 0", ETA0_i);
- ETA0_i = 0.0;
- end
-
- if (ETA0R_i < 0.0) begin
- $strobe("Warning: ETA0R_i = %e is negative, setting it to 0", ETA0R_i);
- ETA0R_i = 0.0;
- end
-
- if (LPE0_i < -Leff) begin
- $strobe("Warning: LPE0_i = %e is less than -Leff. Clipping LPE0_i to 0", LPE0_i);
- LPE0_i = 0.0;
- end
-
- if (K0SI_i <= 0.0) begin
- $strobe("Warning: K0SI_i = %e is not positive, setting it to 0.", K0SI_i);
- K0SI_i = 0.0;
- end
-
- if (K2SI_i <= 0.0) begin
- $strobe("Warning: K2SI_i = %e is not positive, setting it to 0.", K2SI_i);
- K2SI_i = 0.0;
- end
-
- if (PHIBE_i < 0.2 && BULKMOD != 0) begin
- $strobe("Warning: PHIBE_i = %e is less than 0.2, setting it to 0.2.", PHIBE_i);
- PHIBE_i = 0.2;
- end
-
- if (PHIBE_i > 1.2 && BULKMOD != 0) begin
- $strobe("Warning: PHIBE_i = %e is larger than 1.2, setting it to 1.2.", PHIBE_i);
- PHIBE_i = 1.2;
- end
-
- if (PSAT_i < 2.0) begin
- $strobe("Warning: PSAT_i = %e is less than 2.0, setting it to 2.0.", PSAT_i);
- PSAT_i = 2.0;
- end
-
- if (PSATCV_i < 2.0) begin
- $strobe("Warning: PSATCV_i = %e is less than 2.0, setting it to 2.0.", PSATCV_i);
- PSATCV_i = 2.0;
- end
-
- if (U0_i < 0.0) begin
- $strobe("Warning: U0_i = %e is negative, setting it to the default value.", U0_i);
- U0_i = 0.03;
- end
-
- if (UA_i < 0.0) begin
- $strobe("Warning: UA_i = %e is negative, setting it to 0.", UA_i);
- UA_i = 0.0;
- end
-
- if (EU_i < 0.0) begin
- $strobe("Warning: EU_i = %e is negative, setting it to 0.", EU_i);
- EU_i = 0.0;
- end
-
- if (UD_i < 0.0) begin
- $strobe("Warning: UD_i = %e is negative, setting it to 0.", UD_i);
- UD_i = 0.0;
- end
-
- if (UCS_i < 0.0) begin
- $strobe("Warning: UCS_i = %e is negative, setting it to 0.", UCS_i);
- UCS_i = 0.0;
- end
-
- if (ETAMOB_i < 0.0) begin
- $strobe("Warning: ETAMOB_i = %e is negative, setting it to 0", ETAMOB_i);
- ETAMOB_i = 0.0;
- end
-
- RDSWMIN_i = RDSWMIN;
- if (RDSWMIN_i < 0.0) begin
- $strobe("Warning: RDSWMIN = %e is negative. Set to zero", RDSWMIN_i);
- RDSWMIN_i = 0.0;
- end
-
- if (RDSW_i < 0.0) begin
- $strobe("Warning: RDSW_i = %e is negative. Set to zero", RDSW_i);
- RDSW_i = 0.0;
- end
-
- RSWMIN_i = RSWMIN;
- if (RSWMIN_i < 0.0) begin
- $strobe("Warning: RSWMIN = %e is negative. Set to zero", RSWMIN_i);
- RSWMIN_i = 0.0;
- end
-
- if (RSW_i < 0.0) begin
- $strobe("Warning: RSW_i = %e is negative. Set to zero", RSW_i);
- RSW_i = 0.0;
- end
-
- RDWMIN_i = RDWMIN;
- if (RDWMIN_i < 0.0) begin
- $strobe("Warning: RDWMIN = %e is negative. Set to zero", RDWMIN_i);
- RDWMIN_i = 0.0;
- end
-
- if (RDW_i < 0) begin
- $strobe("Warning: RDW_i = %e is negative. Set to zero", RDW_i);
- RDW_i = 0.0;
- end
-
- if (PRWGD_i < 0.0) begin
- $strobe("Warning: PRWGD_i = %e is negative. Set to zero", PRWGD_i);
- PRWGD_i = 0.0;
- end
-
- if (PRWGS_i < 0.0) begin
- $strobe("Warning: PRWGS_i = %e is negative. Set to zero", PRWGS_i);
- PRWGS_i = 0.0;
- end
-
- if (PCLM_i < 0) begin
- $strobe("Warning: PCLM_i = %e is negative.", PCLM_i);
- end
-
- if (PDIBL1_i < 0.0) begin
- $strobe("Warning: PDIBL1_i = %e is negative.", PDIBL1_i);
- end
-
- if (ASYMMOD != 0) begin
- if (PDIBL1R_i < 0.0) begin
- $strobe("Warning: PDIBL1R_i = %e is negative.", PDIBL1R_i);
- end
- if (PDIBL2R_i < 0.0) begin
- $strobe("Warning: PDIBL2R_i = %e is negative.", PDIBL2R_i);
- end
- if (U0R_i < 0) begin
- $strobe("Warning: U0R_i = %e is negative, setting it to 0.", U0R_i);
- U0R_i = 0.0;
- end
- if (UAR_i < 0.0) begin
- $strobe("Warning: UAR_i = %e is negative, setting it to 0.", UAR_i);
- UAR_i = 0.0;
- end
- if (EUR_i < 0.0) begin
- $strobe("Warning: EUR_i = %e is negative, setting it to 0.", EUR_i);
- EUR_i = 0.0;
- end
- if (UDR_i < 0.0) begin
- $strobe("Warning: UDR_i = %e is negative, setting it to 0.", UDR_i);
- UDR_i = 0.0;
- end
- end
-
- if (PDIBL2_i < 0.0) begin
- $strobe("Warning: PDIBL2_i = %e is negative.", PDIBL2_i);
- end
-
- if (DROUT_i <= 0.0) begin
- $strobe("Fatal: DROUT_i = %e is non-positive.", DROUT_i);
- $finish(0);
- end
-
- if (MEXP_i < 2.0) begin
- $strobe("Warning: MEXP_i = %e < 2. Setting MEXP_i = 2.", MEXP_i);
- MEXP_i = 2.0;
- end
-
- if (ASYMMOD != 0) begin
- if (MEXPR_i < 2.0) begin
- $strobe("Warning: MEXPR_i = %e < 2. Setting MEXPR_i = 2.", MEXPR_i);
- MEXPR_i = 2.0;
- end
- end
-
- if (PTWG_i < 0) begin
- $strobe("Warning: PTWG_i = %e is negative, setting it to 0.", PTWG_i );
- PTWG_i = 0.0;
- end
-
- if (QMTCENCV_i > 0.0) begin
- if (QM0 <= 0.0) begin
- $strobe("Fatal: QM0 = %e is non-positive.", QM0);
- $finish(0);
- end
- end
-
- if (BULKMOD != 0 && QMTCENCVA_i > 0.0) begin
- if (QM0ACC <= 0.0) begin
- $strobe("Fatal: QM0ACC = %e is non-positive.", QM0ACC);
- $finish(0);
- end
- end
-
- if (CGIDL_i < 0.0) begin
- $strobe("Warning: CGIDL_i = %e < 0. Setting CGIDL_i = 0.", CGIDL_i);
- CGIDL_i = 0.0;
- end
-
- if (CGISL_i < 0.0) begin
- $strobe("Warning: CGISL_i = %e < 0. Setting CGISL_i = 0.", CGISL_i);
- CGISL_i = 0.0;
- end
-
- if (IGBMOD != 0) begin
- if (NIGBINV_i <= 0.0) begin
- $strobe("Fatal: NIGBINV_i = %e is non-positive.", NIGBINV_i);
- $finish(0);
- end
- if (NIGBACC_i <= 0.0) begin
- $strobe("Fatal: NIGBACC_i = %e is non-positive.", NIGBACC_i);
- $finish(0);
- end
- end
-
- if (IGCMOD != 0) begin
- if (POXEDGE_i <= 0.0) begin
- $strobe("Fatal: POXEDGE_i = %e is non-positive.", POXEDGE_i);
- $finish(0);
- end
- if (PIGCD_i <= 0.0) begin
- $strobe("Fatal: PIGCD_i = %e is non-positive.", PIGCD_i);
- $finish(0);
- end
- end
-
- if (IGCMOD != 0 || IGBMOD != 0) begin
- if (TOXREF <= 0) begin
- $strobe("Fatal: TOXREF = %e is non-positive.", TOXREF);
- $finish(0);
- end
- end
-
- if (LINTIGEN >= (Leff / 2.0)) begin
- $strobe("Warning: LINTIGEN = %e is too large - Leff for r/g current is negative. Re-setting LINTIGEN = 0.", LINTIGEN);
- LINTIGEN_i = 0.0;
- end else begin
- LINTIGEN_i = LINTIGEN;
- end
-
- if (NTGEN_i <= 0.0) begin
- $strobe("Fatal: NTGEN_i = %e is non-positive.", NTGEN_i);
- $finish(0);
- end
-
- `ifdef __NQSMOD1__
- if (NQSMOD == 1 && XRCRG1_i != 0.0 && XRCRG1_i < 1.0e-3) begin
- $strobe("Warning: XRCRG1_i = %e. Gate resistance may be too large. Disabling NQS Gate Resistance.", XRCRG1_i);
- XRCRG1_i = 0.0;
- end
- `endif
-
- if (IIMOD == 2) begin
- if (BETAII0_i < 0.0) begin
- $strobe("Warning: BETAII0_i = %e is negative.",BETAII0_i);
- end
- if (BETAII1_i < 0.0) begin
- $strobe("Warning: BETAII1_i = %e is negative.", BETAII1_i);
- end
- if (BETAII2_i < 0.0) begin
- $strobe("Warning: BETAII2_i = %e is negative.", BETAII2_i);
- end
- if (ESATII_i < 0.0) begin
- $strobe("Warning: ESATII_i = %e is negative.", ESATII_i);
- end
- if (LII_i < 0.0) begin
- $strobe("Warning: LII_i = %e is negative.", LII_i);
- end
- if (SII1_i < 0.0) begin
- $strobe("Warning: SII1_i = %e is negative.", SII1);
- end
- if (SII2_i < 0.0) begin
- $strobe("Warning: SII2_i = %e is negative.", SII2_i);
- end
- if (SIID_i < 0.0) begin
- $strobe("Warning: SIID_i = %e is negative.", SIID_i);
- end
- end
-
- if (EF <= 0.0) begin
- $strobe("Fatal: EF = %e is non-positive.", EF);
- $finish(0);
- end else if (EF > 2.0) begin
- $strobe("Fatal: EF = %e > 2.0.", EF);
- $finish(0);
- end
-
- if (LINTNOI >= (Leff / 2.0)) begin
- $strobe("Warning: LINTNOI = %e is too large - Leff for noise is negative. Re-setting LINTNOI = 0.", LINTNOI);
- LINTNOI_i = 0.0;
- end else begin
- LINTNOI_i = LINTNOI;
- end
-
- if (NTNOI < 0) begin
- $strobe("Warning: NTNOI = %e is negative. Set to zero.", NTNOI);
- NTNOI_i = 0.0;
- end else begin
- NTNOI_i = NTNOI;
- end
-
- // Self-Heating
- `ifdef __SHMOD__
- if (SHMOD != 0 && RTH0 > 0.0) begin
- T1y = WTH0;
- if (BSHEXP != 0.0) begin
- T1y = WTH0 * pow(NF, BSHEXP);
- end
- T2y = FPITCH;
- if (ASHEXP != 0.0) begin
- T2y = FPITCH * pow(NFINtotal, ASHEXP);
- end
- gth = (T1y + T2y)/ RTH0;
- cth = CTH0 * (T1y + T2y);
- end else begin
- gth = 1.0;
- cth = 0.0;
- end
- `else
- if (SHMOD != 0) begin
- $strobe("Although the model selector SHMOD is set to 1, the self heating model is not activated in the Verilog-A code. Please uncomment \"`define __SHMOD__\" in bsimcmg.va to activate it.");
- end
- `endif
-
- // Gate Electrode Resistance
- `ifdef __RGATEMOD__
- if (RGATEMOD != 0) begin
- Rgeltd = (RGEXT / NGCON + (RGFIN * NFIN) / (NGCON == 2 ? 12.0 : 3.0)) / NF;
- ggeltd = 1.0 / max(1.0e-3, Rgeltd);
- end
- `else
- if (RGATEMOD != 0)
- $strobe("Although the model selector RGATEMOD is set to 1, the gate electrode resistance model is not activated in the Verilog-A code. Please uncomment \"`define __RGATEMOD__\" in bsimcmg.va to activate it.");
- `endif
-
- // Geometry-Dependent Source/Drain Resistance
- if (RGEOMOD == 0) begin
- RSourceGeo = RSHS * NRS;
- RDrainGeo = RSHD * NRD;
- end else begin
- // Area and perimeter calculation
- if (HEPI > 0.0) begin
- Arsd = FPITCH * HFIN + (TFIN + (FPITCH - TFIN) * CRATIO) * HEPI;
- end else begin
- Arsd = FPITCH * max(1.0e-9, HFIN + HEPI);
- end
- Prsd = FPITCH + DELTAPRSD;
-
- // Resistivity Calculation
- if ($param_given(RHORSD)) begin
- rhorsd = RHORSD;
- end else begin
- mu_max = (TYPE == `ntype) ? 1417.0 : 470.5;
- if (TYPE == `ntype) begin
- mu_rsd = (52.2 + (mu_max - 52.2) / (1.0 + pow(NSD / 9.68e22, 0.680)) - 43.4 / (1.0 + pow(3.43e26 / NSD, 2.0))) * 1.0e-4;
- end else begin
- mu_rsd = (44.9 + (mu_max - 44.9) / (1.0 + pow(NSD / 2.23e22, 0.719)) - 29.0 / (1.0 + pow(6.10e26 / NSD, 2.0))) * 1.0e-4;
- end
- rhorsd = 1.0 / (`q * NSD * mu_rsd);
- end
-
- // Component: Spreading Resistance (extension -> hdd)
- thetarsp = 55.0 * `M_PI / 180.0;
- afin = min(Arsd, max(1.0e-18, TFIN * (HFIN + min(0.0, HEPI))));
- T1y = `COT(thetarsp);
- Rsp = rhorsd * T1y / (sqrt(`M_PI) * NFIN) * (1.0 / sqrt(afin) - 2.0 / sqrt(Arsd) + sqrt(afin / (Arsd*Arsd)));
-
- // Component: Contact Resistance
- arsd_total = Arsd * NFIN + ARSDEND;
- prsd_total = Prsd * NFIN + PRSDEND;
- lt = sqrt(RHOC * arsd_total / (rhorsd * prsd_total));
- alpha = LRSD / lt;
- T0y = lexp(alpha + alpha);
-
- if (SDTERM == 1.0) begin
- eta = rhorsd * lt / RHOC;
- T1y = T0y * (1.0 + eta);
- T2y = T1y + 1.0 - eta;
- T3y = T1y - 1.0 + eta;
- end else begin
- T2y = T0y + 1.0;
- T3y = T0y - 1.0;
- end
- RrsdTML = rhorsd * lt * T2y / (arsd_total * T3y);
-
- if (HEPI < -1.0e-10) begin
- Rrsdside = RHOC / (-HEPI * TFIN * NFIN);
- Rrsd = (RrsdTML + Rsp) * Rrsdside / ((RrsdTML + Rsp) + Rrsdside);
- end else begin
- Rrsd = RrsdTML + Rsp;
- end
-
- Rdsgeo = Rrsd / NF * max(0.0, RGEOA + RGEOB * TFIN + RGEOC * FPITCH + RGEOD * LRSD + RGEOE * HEPI);
- RSourceGeo = Rdsgeo;
- RDrainGeo = Rdsgeo;
- end
-
- // Clamping of Source/Drain Resistances
- if (RSourceGeo <= 1.0e-3) begin
- RSourceGeo = 1.0e-3;
- end
-
- if (RDrainGeo <= 1.0e-3) begin
- RDrainGeo = 1.0e-3;
- end
-
- if (RDSMOD == 1) begin
- if (RSWMIN_i <= 0.0) begin
- RSWMIN_i = 0.0;
- end
- if (RDWMIN_i <= 0.0) begin
- RDWMIN_i = 0.0;
- end
- if (RSW_i <= 0.0) begin
- RSW_i = 0.0;
- end
- if (RDW_i <= 0.0) begin
- RDW_i = 0.0;
- end
- end else begin
- if (RDSWMIN_i <= 0.0) begin
- RDSWMIN_i = 0.0;
- end
- if (RDSW_i <= 0.0) begin
- RDSW_i = 0.0;
- end
- end // End of Clamping of Source/Drain Resistances
-
- if (CGEOMOD != 1) begin
- if ($param_given(CGSO)) begin
- CGSO_i = CGSO;
- end else begin
- if ($param_given(DLC) && DLC > 0.0) begin
- CGSO_i = max(0.0, DLC * cox - CGSL_i);
- end else begin
- CGSO_i = 0.3 * TFIN * cox;
- end
- end
- if ($param_given(CGDO)) begin
- CGDO_i = CGDO;
- end else begin
- if ($param_given(DLC) && DLC > 0.0) begin
- CGDO_i = max(0.0, DLC * cox - CGDL_i);
- end else begin
- CGDO_i = 0.3 * TFIN * cox;
- end
- end
- end
-
- // Parasitic Source/Drain to Gate Fringe Capacitance Model
- if (CGEOMOD == 2) begin
- if ($param_given(LSP))
- LSP_i = LSP;
- else
- LSP_i = 0.2*(L + XL);
- Hg = TGATE + TMASK;
- Trsd = 0.5 * (FPITCH - TFIN);
- Wg = max(0.0, Trsd - TOXP);
- Hrsd = max(0.0, HEPI + TSILI);
-
- // Top Component
- if (TMASK > 0.0) begin
- // Capacitance Model by Chung-Hsun Lin (IBM)
- T0y = 3.467e-11 * lln(1.0e-7 * EPSRSP / (3.9 * LSP_i));
- T1y = 0.942 * Hrsd * epssp / LSP_i;
- Cgg_top = (T0y + T1y) * (TFIN + (FPITCH - TFIN) * CRATIO);
- end else begin
- `Cfringe_2d(cfr_top_trigate, Hg, Hrsd, LSP_i, TFIN, LRSD, Lg, TOXP, 0.85, Cgg_top)
- end
-
- // Side Component
- if (TMASK > 0) begin
- `Cfringe_2d(cfr_side_dblgate, Wg, Trsd, LSP_i, HFIN, LRSD, Lg, TOXP, 0.70, Cgg_side)
- end else begin
- `Cfringe_2d(cfr_side_trigate, Wg, Trsd, LSP_i, HFIN, LRSD, Lg, TOXP, 0.85, Cgg_side)
- end
-
- // Corner Component
- if (TMASK > 0.0) begin
- Acorner = 0.0;
- end else begin
- if (HEPI > 0.0) begin
- Acorner = (FPITCH - TFIN) * (HEPI * CRATIO + TSILI);
- end else begin
- Acorner = (FPITCH - TFIN) * Hrsd;
- end
- end
- Ccorner = (NFIN * Acorner + ARSDEND + ASILIEND) * epssp / LSP_i;
- Cfr_geo = (Ccorner + Cgg_top * NFIN + CGEOE * Cgg_side * NFIN * 2.0) * NF;
- Cfr_geo = Cfr_geo * max(0.0, CGEOA + CGEOB * TFIN + CGEOC * FPITCH + CGEOD * LRSD);
- end
-
- // Source/Gate/Drain-to-Substrate Parasitic Capacitances
- T0y = CSDESW * lln(1.0 + HFIN / EOTBOX);
- csbox = cbox * ASEO + T0y * max(0.0, PSEO - FPITCH * NFINtotal);
- cdbox = cbox * ADEO + T0y * max(0.0, PDEO - FPITCH * NFINtotal);
- cgbox = (CGBO * NF * NGCON + CGBN * NFINtotal) * Lg;
-
- // Mobility Degradation
- EeffFactor = 1.0e-8 / (epsratio * (EOT));
- WeffWRFactor = 1.0 / (pow((Weff0) * 1.0e6, WR_i) * NFINtotal);
- litl = sqrt(epsratio * EOT * 0.5 * TFIN);
-
- if (!$param_given(THETASCE)) begin
- tmp = DVT1_i * Leff / scl + 1.0e-6;
- if (tmp < 40.0) begin
- Theta_SCE = 0.5 / (cosh(tmp) - 1.0);
- end else begin
- Theta_SCE = exp(-tmp);
- end
- end else begin
- Theta_SCE = THETASCE;
- end
-
- if (!$param_given(THETASW)) begin
- tmp = DVT1SS_i * Leff / scl + 1.0e-6;
- if (tmp < 40.0) begin
- Theta_SW = 0.5 / (cosh(tmp) - 1.0);
- end else begin
- Theta_SW = exp(-tmp);
- end
- end else begin
- Theta_SW = THETASW;
- end
-
- if (!$param_given(THETADIBL)) begin
- tmp = DSUB_i * Leff / scl + 1.0e-6;
- if (tmp < 40.0) begin
- Theta_DIBL = 0.5 / (cosh(tmp) - 1.0);
- end else begin
- Theta_DIBL = exp(-tmp);
- end
- end else begin
- Theta_DIBL = THETADIBL;
- end
-
- Theta_RSCE = sqrt(1.0 + LPE0_i / Leff) - 1.0;
-
- tmp = DSUB_i * Leff / scl + 1.0e-6;
- if (tmp < 40.0) begin
- T0y = 1.0 / max((1.0 + DVTP2 * (cosh(tmp) - 2.0)), 1.0e-6);
- end else begin
- T0y = exp(-tmp) / max((exp(-tmp) + DVTP2), 1.0e-6);
- end
-
- Theta_DITS = T0y;
- nbody = NBODY_i;
- qbs = `q * nbody * Ach / Cins;
-
- // Gate Current
- if (TYPE == `ntype) begin
- Aechvb = 4.97232e-7; // NMOS
- Bechvb = 7.45669e11; // NMOS
- end else begin
- Aechvb = 3.42537e-7; // PMOS
- Bechvb = 1.16645e12; // PMOS
- end
-
- T0y = TOXG * TOXG;
- T1y = TOXG * POXEDGE_i;
- T2y = T1y * T1y;
- Toxratio = lexp(NTOX_i * lln(TOXREF / TOXG)) / T0y;
- Toxratioedge = lexp(NTOX_i * lln(TOXREF / T1y)) / T2y;
- igsd_mult0 = Weff0 * Aechvb * Toxratioedge;
-
- if (TNOM < -`P_CELSIUS0) begin
- $strobe("Warning: (TNOM=%e) < -`P_CELSIUS0. Set to 27 C.", TNOM);
- Tnom = `REFTEMP;
- end else begin
- Tnom = TNOM + `CONSTCtoK;
- end
- end // initial_step
-
- // ************************************************
- // * Temperature Dependence Calculations *
- // ************************************************
- `ifdef __SHMOD__
- if (SHMOD != 0 && RTH0 > 0.0) begin
- DevTemp = $temperature + Temp(rth_branch) + DTEMP;
- end else begin
- `endif
- DevTemp = $temperature + DTEMP;
- `ifdef __SHMOD__
- end
- `endif
-
- begin : CMGTempDepCalc
- TRatio = DevTemp / Tnom;
- delTemp = DevTemp - Tnom;
- Vtm = `KboQ * DevTemp;
- Vtm0 = `KboQ * Tnom;
- Eg = BG0SUB - TBGASUB * DevTemp * DevTemp / (DevTemp + TBGBSUB);
- Eg0 = BG0SUB - TBGASUB * Tnom * Tnom / (Tnom + TBGBSUB);
- T1 = (DevTemp / 300.15) * sqrt(DevTemp / 300.15);
- ni = NI0SUB * T1 * lexp(BG0SUB / (2.0 * `KboQ * 300.15) - Eg / (2.0 * Vtm));
- Nc = NC0SUB * T1;
- ThetaSS = hypsmooth(1.0 + TSS_i * delTemp - 1.0e-6, 1.0e-3);
-
- // Quantum Mechanical Vth Correction (Ref: Trivedi et al., EDL 2005)
- kT = Vtm * `q;
- T0y = `HBAR * `M_PI / (2*Ach/Weff_UFCM );
- E0 = T0y * T0y / (2.0 * mx);
- E0prime = T0y * T0y / (2.0 * mxprime);
- E1 = 4.0 * E0;
- E1prime = 4.0 * E0prime;
- T1 = gprime * mdprime / (gfactor * md);
- gam0 = 1.0 + T1 * lexp((E0 - E0prime) / kT);
- gam1 = gam0 + lexp((E0 - E1) / kT) + T1 * lexp((E0 - E1prime) / kT);
- T2 = -Vtm * lln(gfactor * md / (`M_PI * `HBAR * `HBAR * Nc) * kT / (2.0 * Ach / Weff_UFCM) * gam1);
- dvch_qm = QMFACTOR_i * (E0 / `q + T2);
-
- // Temperature Dependence
- ETA0_t = Tempdep(ETA0_i, TETA0, delTemp, TEMPMOD);
- ETA0R_t = Tempdep(ETA0R_i, TETA0R, delTemp, TEMPMOD);
- T1 = U0_i * pow(TRatio, UTE_i);
- U0_t = T1 + hypmax(UTL_i * delTemp, -0.9 * T1, 1.0e-4);
- u0 = U0_t;
- if (ASYMMOD == 1) begin
- T1 = U0R_i * pow(TRatio, UTER_i);
- U0R_t = T1 + hypmax(UTLR_i * delTemp, -0.9 * T1, 1.0e-4);
- u0r = U0R_t;
- end
-
- ETAMOB_t = Tempdep(ETAMOB_i, EMOBT_i, delTemp, TEMPMOD);
- UA_t = UA_i + hypmax(UA1_i*delTemp, -UA_i, 1.0e-6);
- if (ASYMMOD != 0) begin
- UAR_t = UAR_i + hypmax(UA1R_i * delTemp, -UAR_i, 1.0e-6);
- end
-
- if (BULKMOD != 0) begin
- if (TEMPMOD == 0) begin
- UC_t = Tempdep(UC_i, UC1_i, delTemp, 0);
- if (ASYMMOD != 0) begin
- UCR_t = Tempdep(UCR_i, UC1R_i, delTemp, 0);
- end
- end else begin
- UC_t = UC_i + UC1_i * delTemp;
- if (ASYMMOD != 0) begin
- UCR_t = UCR_i + UC1R_i * delTemp;
- end
- end
- end
-
- UD_t = UD_i * pow(TRatio, UD1_i);
- if (ASYMMOD != 0) begin
- UDR_t = UDR_i * pow(TRatio, UD1R_i);
- end
-
- UCS_t = UCS_i * pow(TRatio, UCSTE_i);
-
- rdstemp = hypsmooth(1.0 + PRT_i * delTemp - 1.0e-6, 1.0e-3);
- RSDR_t = Tempdep(RSDR, TRSDR, delTemp, TEMPMOD);
- if (ASYMMOD != 0) begin
- RSDRR_t = Tempdep(RSDRR, TRSDR, delTemp, TEMPMOD);
- end
-
- RDDR_t = Tempdep(RDDR, TRDDR, delTemp, TEMPMOD);
- if (ASYMMOD != 0) begin
- RDDRR_t = Tempdep(RDDRR, TRDDR, delTemp, TEMPMOD);
- end
-
- VSAT_t = Tempdep(VSAT_i, -AT_i, delTemp, TEMPMOD);
- if (VSAT_t < 1000) begin
- $strobe("Warning: VSAT(%f) = %e is less than 1K, setting it to 1K.", DevTemp, VSAT_t);
- VSAT_t = 1000;
- end
-
- if (ASYMMOD != 0) begin
- VSATR_t = Tempdep(VSATR_i, -ATR_i, delTemp, TEMPMOD);
- if (VSATR_t < 1000) begin
- $strobe("Warning: VSATR(%f) = %e is less than 1K, setting it to 1K.", DevTemp, VSATR_t);
- VSATR_t = 1000;
- end
- end
-
- VSAT1_t = Tempdep(VSAT1_i, -AT_i, delTemp, TEMPMOD);
- if (VSAT1_t < 1000) begin
- $strobe("Warning: VSAT1(%f) = %e is less than 1K, setting it to 1K.", DevTemp, VSAT1_t);
- VSAT1_t = 1000;
- end
-
- if (ASYMMOD != 0) begin
- VSAT1R_t = Tempdep(VSAT1R_i, -AT_i, delTemp, TEMPMOD);
- if (VSAT1R_t < 1000) begin
- $strobe("Warning: VSAT1R(%f) = %e is less than 1K, setting it to 1K.", DevTemp, VSAT1R_t);
- VSAT1R_t = 1000;
- end
- end
-
- VSATCV_t = Tempdep(VSATCV_i, -ATCV_i, delTemp, TEMPMOD);
- if (VSATCV_t < 1000) begin
- $strobe("Warning: VSATCV(%f) = %e is less than 1K, setting it to 1K.", DevTemp, VSATCV_t);
- VSATCV_t = 1000;
- end
-
- MEXP_t = hypsmooth(MEXP_i * (1.0 + TMEXP * delTemp) - 2.0, 1.0e-3) + 2.0;
- if (ASYMMOD != 0) begin
- MEXPR_t = hypsmooth(MEXPR_i * (1.0 + TMEXPR * delTemp) - 2.0, 1.0e-3) + 2.0;
- end
-
- PTWG_t = Tempdep(PTWG_i, -PTWGT_i, delTemp, TEMPMOD);
- if (ASYMMOD != 0) begin
- PTWGR_t = Tempdep(PTWGR_i, -PTWGT_i, delTemp, TEMPMOD);
- end
-
- dvth_temp = (KT1_i + KT1L / Leff) * (TRatio - 1.0);
- BETA0_t = BETA0_i * pow(TRatio, IIT_i);
- SII0_t = SII0_i * (hypsmooth(1.0 + TII_i * (TRatio - 1.0) - 0.01, 1.0e-3) + 0.01);
-
- K0_t = K0_i + K01_i * delTemp;
- K0SI_t = K0SI_i + hypmax(K0SI1_i * delTemp, -K0SI_i, 1.0e-6);
- K2SI_t = K2SI_i + hypmax(K2SI1_i * delTemp, -K2SI_i, 1.0e-6);
- K1_t = K1_i + hypmax(K11_i * delTemp, -K1_i, 1.0e-6);
- K2SAT_t = K2SAT_i + K2SAT1_i * delTemp;
- A1_t = A1_i + A11_i * delTemp;
- A2_t = A2_i + A21_i * delTemp;
- K2_t = K2_i + hypmax(K21_i * delTemp, -K2_i, 1.0e-6);
- K0SISAT_t = K0SISAT_i + K0SISAT1_i * delTemp;
- K2SISAT_t = K2SISAT_i + K2SISAT1_i * delTemp;
- AIGBINV_t = AIGBINV_i + hypmax(AIGBINV1_i * delTemp, -AIGBINV_i, 1.0e-6);
- AIGBACC_t = AIGBACC_i + hypmax(AIGBACC1_i * delTemp, -AIGBACC_i, 1.0e-6);
- AIGC_t = AIGC_i + hypmax(AIGC1_i * delTemp, -AIGC_i, 1.0e-6);
- AIGS_t = AIGS_i + hypmax(AIGS1_i * delTemp, -AIGS_i, 1.0e-6);
- AIGD_t = AIGD_i + hypmax(AIGD1_i * delTemp, -AIGD_i, 1.0e-6);
- BGIDL_t = BGIDL_i * hypsmooth(1.0 + TGIDL_i * delTemp - 1.0e-6, 1.0e-3);
- BGISL_t = BGISL_i * hypsmooth(1.0 + TGIDL_i * delTemp - 1.0e-6, 1.0e-3);
- ALPHA0_t = ALPHA0_i + hypmax(ALPHA01 * delTemp, -ALPHA0_i, 1.0e-6);
- ALPHA1_t = ALPHA1_i + hypmax(ALPHA11 * delTemp, -ALPHA1_i, 1.0e-6);
- ALPHAII0_t = ALPHAII0_i + hypmax(ALPHAII01 * delTemp, -ALPHAII0_i, 1.0e-25);
- ALPHAII1_t = ALPHAII1_i + hypmax(ALPHAII11 * delTemp, -ALPHAII1_i, 1.0e-20);
- igtemp = lexp(IGT_i * lln(TRatio));
- igsd_mult = igsd_mult0 * igtemp;
-
- if (BULKMOD != 0) begin
- CJS_t = Tempdep(CJS, TCJ, delTemp, TEMPMOD);
- CJD_t = Tempdep(CJD, TCJ, delTemp, TEMPMOD);
- CJSWS_t = Tempdep(CJSWS, TCJSW, delTemp, TEMPMOD);
- CJSWD_t = Tempdep(CJSWD, TCJSW, delTemp, TEMPMOD);
- CJSWGS_t = Tempdep(CJSWGS, TCJSWG, delTemp, TEMPMOD);
- CJSWGD_t = Tempdep(CJSWGD, TCJSWG, delTemp, TEMPMOD);
-
- PBS_t = hypsmooth(PBS - TPB * delTemp - 0.01, 1.0e-3) + 0.01;
- PBD_t = hypsmooth(PBD - TPB * delTemp - 0.01, 1.0e-3) + 0.01;
- PBSWS_t = hypsmooth(PBSWS - TPBSW * delTemp - 0.01, 1.0e-3) + 0.01;
- PBSWD_t = hypsmooth(PBSWD - TPBSW * delTemp - 0.01, 1.0e-3) + 0.01;
- PBSWGS_t = hypsmooth(PBSWGS - TPBSWG * delTemp - 0.01, 1.0e-3) + 0.01;
- PBSWGD_t = hypsmooth(PBSWGD - TPBSWG * delTemp - 0.01, 1.0e-3) + 0.01;
-
- T0 = Eg0 / Vtm0 - Eg / Vtm;
- T1 = lln(TRatio);
- T3 = lexp((T0 + XTIS * T1) / NJS);
- JSS_t = JSS * T3;
- JSWS_t = JSWS * T3;
- JSWGS_t = JSWGS * T3;
-
- T3 = lexp((T0 + XTID * T1) / NJD);
- JSD_t = JSD * T3;
- JSWD_t = JSWD * T3;
- JSWGD_t = JSWGD * T3;
-
- JTSS_t = JTSS * lexp(Eg0 * XTSS * (TRatio - 1.0) / Vtm);
- JTSD_t = JTSD * lexp(Eg0 * XTSD * (TRatio - 1.0) / Vtm);
- JTSSWS_t = JTSSWS * lexp(Eg0 * XTSSWS * (TRatio - 1.0) / Vtm);
- JTSSWD_t = JTSSWD * lexp(Eg0 * XTSSWD * (TRatio - 1.0) / Vtm);
- JTSSWGS_t = JTSSWGS * (sqrt(JTWEFF / Weff0) + 1.0) * lexp(Eg0 * XTSSWGS * (TRatio - 1.0) / Vtm);
- JTSSWGD_t = JTSSWGD * (sqrt(JTWEFF / Weff0) + 1.0) * lexp(Eg0 * XTSSWGD * (TRatio - 1.0) / Vtm);
-
- // All NJT's Smoothed to 0.01 to Prevent Divide-by-zero / Negative Values
- NJTS_t = hypsmooth(NJTS * (1.0 + TNJTS * (TRatio-1.0)) - 0.01, 1.0e-3) + 0.01;
- NJTSD_t = hypsmooth(NJTSD * (1.0 + TNJTSD * (TRatio-1.0)) - 0.01, 1.0e-3) + 0.01;
- NJTSSW_t = hypsmooth(NJTSSW * (1.0 + TNJTSSW * (TRatio-1.0)) - 0.01, 1.0e-3) + 0.01;
- NJTSSWD_t = hypsmooth(NJTSSWD * (1.0 + TNJTSSWD * (TRatio-1.0)) - 0.01, 1.0e-3) + 0.01;
- NJTSSWG_t = hypsmooth(NJTSSWG * (1.0 + TNJTSSWG * (TRatio-1.0)) - 0.01, 1.0e-3) + 0.01;
- NJTSSWGD_t = hypsmooth(NJTSSWGD * (1.0 + TNJTSSWGD * (TRatio-1.0)) - 0.01, 1.0e-3) + 0.01;
- end
-
- if (!$param_given(VFBSD)) begin
- if (NGATE > 0.0) begin
- vfbsd = devsign * (hypsmooth(0.5 * Eg - Vtm * lln(NGATE / ni), 1.0e-4) - (0.5 * Eg - devsign * (0.5 * Eg - hypsmooth(0.5 * Eg - Vtm * lln(NSD / ni), 1.0e-4))));
- end else begin
- vfbsd = devsign * (PHIG_i - (EASUB + 0.5 * Eg - devsign * (0.5 * Eg - hypsmooth(0.5 * Eg - Vtm * lln(NSD / ni), 1.0e-4))));
- end
- end else begin
- vfbsd = VFBSD;
- end
-
- if (!$param_given(VFBSDCV)) begin
- vfbsdcv = vfbsd;
- end else begin
- vfbsdcv = VFBSDCV;
- end
-
- `ifdef __SHMOD__
- if (SHMOD != 0 && RTH0 > 0.0) begin
- T0 = Vtm * lln(nbody / ni);
- phib = sqrt(T0 * T0 + 1.0e-6);
- end else begin
- phib = Vtm * lln(nbody / ni);
- end
- `else
- phib = Vtm * lln(nbody/ni);
- `endif
-
- `ifdef __SHMOD__
- if (SHMOD != 0 && RTH0 > 0.0) begin
- T0 = Vtm * lln(nbody * NSD / (ni * ni));
- vbi = sqrt(T0 * T0 + 1.0e-6);
- end else begin
- vbi = Vtm * lln(nbody * NSD / (ni * ni));
- end
- `else
- vbi = Vtm * lln(nbody * NSD / (ni * ni));
- `endif
-
- // deltaPhi definition and Polysilicon Depletion
- // deltaPhi: workfunction difference between the gate and the n+ source.
- deltaPhi = devsign*(PHIG_i - (EASUB + (TYPE == `ntype ? 0 : Eg)));
-
- // Mobility Degradation
- eta_mu = 0.5 * ETAMOB_t;
- eta_mu_cv = 0.5;
- if ( TYPE != `ntype ) begin
- eta_mu = 1.0 / 3.0 * ETAMOB_t;
- eta_mu_cv = 1.0 / 3.0;
- end
-
- // Junction Current and Capacitance
- if (BULKMOD != 0) begin
- // Source-Side Junction Current
- Isbs = ASEJ * JSS_t + PSEJ * JSWS_t + TFIN * NFINtotal * JSWGS_t;
- if (Isbs > 0.0) begin
- Nvtms = Vtm * NJS;
- XExpBVS = lexp(-BVS / Nvtms) * XJBVS;
- T2 = max(IJTHSFWD / Isbs, 10.0);
- Tb = 1.0 + T2 - XExpBVS;
- VjsmFwd = Nvtms * lln(0.5 * (Tb + sqrt(Tb * Tb + 4.0 * XExpBVS)));
- T0 = lexp(VjsmFwd / Nvtms);
- IVjsmFwd = Isbs * (T0 - XExpBVS / T0 + XExpBVS - 1.0);
- SslpFwd = Isbs * (T0 + XExpBVS / T0) / Nvtms;
- T2 = hypsmooth(IJTHSREV / Isbs - 10.0, 1.0e-3) + 10.0;
- VjsmRev = -BVS - Nvtms * lln((T2 - 1.0) / XJBVS);
- T1 = XJBVS * lexp(-(BVS + VjsmRev) / Nvtms);
- IVjsmRev = Isbs * (1.0 + T1);
- SslpRev = -Isbs * T1 / Nvtms;
- end
-
- // Drain-Side Junction Current
- Isbd = ADEJ * JSD_t + PDEJ * JSWD_t + TFIN * NFINtotal * JSWGD_t;
- if (Isbd > 0.0) begin
- Nvtmd = Vtm * NJD;
- XExpBVD = lexp(-BVD / Nvtmd) * XJBVD;
- T2 = max(IJTHDFWD / Isbd, 10.0);
- Tb = 1.0 + T2 - XExpBVD;
- VjdmFwd = Nvtmd * lln(0.5 * (Tb + sqrt(Tb * Tb + 4.0 * XExpBVD)));
- T0 = lexp(VjdmFwd / Nvtmd);
- IVjdmFwd = Isbd * (T0 - XExpBVD / T0 + XExpBVD - 1.0);
- DslpFwd = Isbd * (T0 + XExpBVD / T0) / Nvtmd;
- T2 = hypsmooth(IJTHDREV / Isbd - 10.0, 1.0e-3) + 10.0;
- VjdmRev = -BVD - Nvtmd * lln((T2 - 1.0) / XJBVD);
- T1 = XJBVD * lexp(-(BVD + VjdmRev) / Nvtmd);
- IVjdmRev = Isbd * (1.0 + T1);
- DslpRev = -Isbd * T1 / Nvtmd;
- end
-
- // Junction Capacitance
- Czbs = CJS_t * ASEJ;
- Czbssw = CJSWS_t * PSEJ;
- Czbsswg = CJSWGS_t * Weff0 * NFINtotal;
- Czbd = CJD_t * ADEJ;
- Czbdsw = CJSWD_t * PDEJ;
- Czbdswg = CJSWGD_t * Weff0 * NFINtotal;
- end
-
- // Generation-Recombination Current
- T0 = Eg / Vtm * (TRatio - 1.0);
- T1 = T0 / NTGEN_i;
- igentemp = lexp(T1);
-
- end // End of temperature dependent calculations
-
- // ************************************************
- // * Bias dependent calculations follow *
- // ************************************************
-
- // Load Terminal Voltages
- vgs_noswap = devsign * V(`IntrinsicGate, si);
- vds_noswap = devsign * V(di, si);
- vgd_noswap = devsign * V(`IntrinsicGate, di);
- ves_jct = devsign * V(e, si);
- ved_jct = devsign * V(e, di);
- vge = devsign * V(`IntrinsicGate, e);
-
- // Source-Drain Interchange
- sigvds = 1.0;
- if (vds_noswap < 0.0) begin
- sigvds = -1.0;
- vgs = vgs_noswap - vds_noswap;
- vds = -1.0 * vds_noswap;
- ves = ved_jct;
- end else begin
- vgs = vgs_noswap;
- vds = vds_noswap;
- ves = ves_jct;
- end
- vgsfb = vgs - deltaPhi;
-
- // Initialize Certain Variables to Zero to Prevent Unnecessary Update
- etaiv = 0.0;
- Qes = 0.0;
- Qesj = 0.0;
- Qeg = 0.0;
- Qed = 0.0;
- Qedj = 0.0;
-
- // Vds Smoothing
- vdsx = sqrt (vds * vds + 0.01) - 0.1;
-
- // Ves Smoothing
- if (BULKMOD != 0) begin
- vesx = ves - 0.5 * (vds - vdsx);
- vesmax = 0.95 * PHIBE_i;
- T2 = vesmax - vesx - 1.0e-3;
- veseff = vesmax - 0.5 * (T2 + sqrt(T2 * T2 + 0.004 * vesmax));
- end
-
- // Asymmetry Model
- T0 = tanh(0.6 * vds_noswap / Vtm);
- wf = 0.5 + 0.5 * T0;
- wr = 1.0 - wf;
- if (ASYMMOD != 0) begin
- CDSCD_a = CDSCDR_i * wr + CDSCD_i * wf;
- ETA0_a = ETA0R_t * wr + ETA0_t * wf;
- PDIBL1_a = PDIBL1R_i * wr + PDIBL1_i * wf;
- PDIBL2_a = PDIBL2R_i * wr + PDIBL2_i * wf;
- MEXP_a = MEXPR_t * wr + MEXP_t * wf;
- PTWG_a = PTWGR_t * wr + PTWG_t * wf;
- VSAT1_a = VSAT1R_t * wr + VSAT1_t * wf;
- RSDR_a = RSDRR_t * wr + RSDR_t * wf;
- RDDR_a = RDDRR_t * wr + RDDR_t * wf;
- PCLM_a = PCLMR_i * wr + PCLM_i * wf;
- VSAT_a = VSATR_t * wr + VSAT_t * wf;
- KSATIV_a = KSATIVR_i * wr + KSATIV_i * wf;
- DVTSHIFT_a = DVTSHIFTR_i * wr + DVTSHIFT_i * wf;
- CIT_a = CITR_i * wr + CIT_i * wf;
- u0_a = u0r * wr + u0 * wf;
- UA_a = UAR_t*wr + UA_t * wf;
- UD_a = UDR_t * wr + UD_t * wf;
- UC_a = UCR_t * wr + UC_t * wf;
- EU_a = EUR_i * wr + EU_i * wf;
- end else begin
- CDSCD_a = CDSCD_i;
- ETA0_a = ETA0_t;
- PDIBL1_a = PDIBL1_i;
- PDIBL2_a = PDIBL2_i;
- MEXP_a = MEXP_t;
- PTWG_a = PTWG_t;
- VSAT1_a = VSAT1_t;
- RSDR_a = RSDR_t;
- RDDR_a = RDDR_t;
- PCLM_a = PCLM_i;
- VSAT_a = VSAT_t;
- KSATIV_a = KSATIV_i;
- DVTSHIFT_a = DVTSHIFT_i;
- CIT_a = CIT_i;
- u0_a = u0;
- UA_a = UA_t;
- UD_a = UD_t;
- UC_a = UC_t;
- EU_a = EU_i;
- end
-
- // Drain Saturation Voltage
- inv_MEXP = 1.0 / MEXP_a;
-
- // SCE, DIBL, SS Degradation Effects (Ref: BSIM4 Model)
- phist = 0.4 + phib + PHIN_i;
- T1 = 2.0 * (Cins / Weff_UFCM) / (rc + 2.0);
- cdsc = Theta_SW * (CDSC_i + CDSCD_a * vdsx);
-
- if (!$param_given(NVTM))
- nVtm = Vtm * ThetaSS * (1.0 + (CIT_a + cdsc) / T1);
- else nVtm = NVTM;
-
- // temp deped UFCM
- qdep = Qdep_ov_Cins / nVtm;
- vth_fixed_factor_SI = ln(Cins * nVtm/(`q * Nc * 2.0 * Ach));
- vth_fixed_factor_Sub = ln((qdep * rc) * (qdep * rc) / ((exp(qdep * rc) - qdep * rc - 1.0))) + vth_fixed_factor_SI;
- q0 = 10.0 * nVtm / rc + 2.0 * qbs;
-
- // New QM parameter calculation: fieldnormalizationfactor, auxQMfact, QMFACTORCVfinal
- fieldnormalizationfactor = Vtm * Cins / (Weff_UFCM * epssub);
- auxQMfact = pow(((3.0 / 4.0) * 3.0 * `HBAR * 2.0 * `M_PI * `q / (4.0 * sqrt(2.0 * mx))), 2.0 / 3.0);
- QMFACTORCVfinal = QMFACTORCV * auxQMfact * pow(fieldnormalizationfactor, 2.0 / 3.0) * (1/(`q * Vtm));
-
- dvth_vtroll = -DVT0_i * Theta_SCE * (vbi - phist);
- dvth_dibl = -ETA0_a * Theta_DIBL * vdsx + (DVTP0_i * Theta_DITS * pow(vdsx, DVTP1_i));
- dvth_rsce = K1RSCE_i * Theta_RSCE * sqrt(phist);
- dvth_all = dvth_vtroll + dvth_dibl + dvth_rsce + dvth_temp + DVTSHIFT_a;
- vgsfb = vgsfb - dvth_all;
-
- // Vgs Clamping for Inversion Region Calculation in Accumulation
- beta0 = u0_a * cox * Weff0 / Leff;
- T0 = -(dvch_qm + nVtm * lln(2.0 * cox * Imin / (beta0 * nVtm * `q * Nc * TFIN)));
- T1 = vgsfb + T0 + DELVTRAND;
- vgsfbeff = hypsmooth(T1 , 1.0e-4) - T0;
-
- // Core Model Calculation at Source Side
- vch = 0.0 + dvch_qm;
-
- if (BULKMOD != 0) begin
- T1 = hypsmooth(2.0 * phib + vch - ves, 0.1);
- T3 = (-K1_t / (2.0 * nVtm)) * (sqrt(T1) - sqrt(2.0 * phib));
- T0 = -qdep - T3 + vth_fixed_factor_Sub + QMFACTORCVfinal * pow(-qdep, 2.0/3.0);
- T1 = -qdep - T3 + vth_fixed_factor_SI;
- end else begin
- T0 = -qdep + vth_fixed_factor_Sub + QMFACTORCVfinal * pow(-qdep, 2.0/3.0);
- T1 = -qdep + vth_fixed_factor_SI;
- end
- T2 = (vgsfbeff - vch) / nVtm;
- F0 = -T2 + T1;
- T3 = 0.5 * (T2 - T0);
- qm = exp(T3);
- if (qm > 1.0e-7) begin
- T7 = ln(1.0 + qm);
- qm = 2.0 * (1.0 - sqrt(1.0 + T7 * T7));
- T8 = (qm * ALPHA_UFCM + qdep) * rc;
- T4 = T8 / (exp(T8) - T8 - 1.0);
- T5 = T8 * T4;
- e0 = F0 - qm + ln(-qm) + ln(T5) + QMFACTORCVfinal * pow(-(qm + qdep), 2.0 / 3.0);
- e1 = -1.0 + 1.0 / qm + (2.0 / T8 - T4 - 1.0) * rc - (2.0 / 3.0) * QMFACTORCVfinal * pow(-(qm + qdep), -1.0 / 3.0);
- e2 = -1.0 / (qm * qm) - (2.0 / 9.0) * QMFACTORCVfinal * pow(-(qm + qdep), -4.0/3.0);
- qm = qm - (e0 / e1) * (1.0 + (e0 * e2) / (2.0 * e1 * e1));
- T8 = (qm * ALPHA_UFCM + qdep) * rc;
- T4 = T8 / (exp(T8) - T8 - 1.0);
- T5 = T8 * T4;
- e0 = F0 - qm + ln(-qm) + ln(T5) + QMFACTORCVfinal * pow(-(qm + qdep), 2.0 / 3.0);
- e1 = -1.0 + 1.0 / qm + (2.0 / T8 - T4 - 1.0) * rc - (2.0 / 3.0) * QMFACTORCVfinal * pow(-(qm + qdep), -1.0/3.0);
- e2 = -1.0 / (qm * qm) - (2.0 / 9.0) * QMFACTORCVfinal * pow(-(qm + qdep), -4.0/3.0);
- qm = qm - (e0 / e1) * (1.0 + (e0 * e2) / (2.0 * e1 * e1));
- end else begin
- qm = -qm * qm;
- end
- qis = -qm * nVtm;
-
- // Drain Saturation Voltage
- Eeffs = EeffFactor * (qbs + eta_mu * qis);
- qb0 = 1.0e-2 / cox;
- T2 = pow(0.5 * (1.0 + abs((qis) / qb0)), UCS_t);
- if (BULKMOD != 0) begin
- T3 = (UA_a + UC_a * veseff) * pow(abs(Eeffs), EU_a) + UD_a / T2;
- end else begin
- T3 = UA_a * pow(abs(Eeffs), EU_a) + UD_a / T2;
- end
- Dmobs = 1.0 + T3;
- Dmobs = Dmobs / U0MULT;
-
- if (RDSMOD == 1) begin
- Rdss = 0.0;
- end else if (RDSMOD == 0) begin
- T4 = 1.0 + PRWGS_i * qis;
- T1 = 1.0 / T4;
- T0 = 0.5 * (T1 + sqrt(T1 * T1 + 0.01));
- Rdss = (RDSWMIN_i + RDSW_i * T0) * WeffWRFactor * NFINtotal * rdstemp;
- end else begin
- T4 = 1.0 + PRWGS_i * qis;
- T1 = 1.0 / T4;
- T0 = 0.5 * (T1 + sqrt(T1 * T1 + 0.01));
- Rdss = (RSourceGeo + RDrainGeo + RDSWMIN_i + RDSW_i * T0) * WeffWRFactor * NFINtotal * rdstemp;
- end
-
- Esat = 2.0 * VSAT_a / u0_a * Dmobs;
- EsatL = Esat * Leff;
- T6 = KSATIV_a * (qis + 2 * Vtm);
-
- if (Rdss == 0.0) begin
- Vdsat = EsatL * T6 / (EsatL + T6);
- end else begin
- WVCox = Weff0 * VSAT_a * cox;
- T0 = WVCox * Rdss;
- Ta = 2.0 * T0;
- Tb = T6 + EsatL + 3.0 * T6 * T0;
- Tc = T6 * (EsatL + 2.0 * T6 * T0);
- Vdsat = (Tb - sqrt(Tb * Tb - 2.0 * Ta * Tc)) / Ta;
- end
- Vdsat = hypsmooth(Vdsat - 1.0e-3, 1.0e-5) + 1.0e-3;
- T7 = pow(vds / Vdsat , MEXP_a);
- T8 = pow(1.0 + T7, inv_MEXP);
- Vdseff = vds / T8;
-
- if (Vdseff > vds) begin
- Vdseff = vds;
- end
-
- // Core Model Calculation at Drain Side
- vch = Vdseff + dvch_qm;
-
- if (BULKMOD != 0) begin
- T1 = hypsmooth(2.0 * phib + vch - ves, 0.1);
- T3 = (-K1_t / (2.0 * nVtm)) * (sqrt(T1) - sqrt(2.0 * phib));
- T0 = -qdep - T3 + vth_fixed_factor_Sub + QMFACTORCVfinal * pow(-qdep, 2.0 / 3.0);
- T1 = -qdep - T3 + vth_fixed_factor_SI;
- end else begin
- T0 = -qdep + vth_fixed_factor_Sub + QMFACTORCVfinal * pow(-qdep, 2.0 / 3.0);
- T1 = -qdep + vth_fixed_factor_SI;
- end
- T2 = (vgsfbeff - vch) / nVtm;
- F0 = -T2 + T1;
- T3 = (T2 - T0) * 0.5;
- qm = exp(T3);
- if (qm > 1.0e-7) begin
- T7 = ln(1.0 + qm);
- qm = 2.0 * (1.0 - sqrt(1.0 + T7 * T7));
- T8 = (qm * ALPHA_UFCM + qdep) * rc;
- T4 = T8 / (exp(T8) - T8 - 1.0);
- T5 = T8 * T4;
- e0 = F0 - qm + ln(-qm) + ln(T5) + QMFACTORCVfinal * pow(-(qm + qdep), 2.0 / 3.0);
- e1 = -1.0 + (1.0 / qm) + (2.0 / T8 - T4 - 1.0) * rc - (2.0 / 3.0) * QMFACTORCVfinal * pow(-(qm + qdep), -1.0 / 3.0);
- e2 = -1.0 / (qm * qm) - (2.0 / 9.0) * QMFACTORCVfinal * pow(-(qm + qdep), -4.0 / 3.0);
- qm = qm - (e0 / e1)*(1.0 + (e0 * e2) / (2.0 * e1 * e1));
- T8 = (qm * ALPHA_UFCM + qdep) * rc;
- T4 = T8 / (exp(T8) - T8 - 1.0);
- T5 = T8 * T4;
- e0 = F0 - qm + ln(-qm) + ln(T5) + QMFACTORCVfinal * pow(-(qm + qdep), 2.0/3.0);
- e1 = -1.0 + (1.0 / qm) + (2.0 / T8 - T4 - 1.0) * rc - (2.0 / 3.0) * QMFACTORCVfinal * pow(-(qm + qdep), -1.0 / 3.0);
- e2 = -1.0 / (qm * qm) - (2.0 / 9.0) * QMFACTORCVfinal * pow(-(qm + qdep), -4.0 / 3.0);
- qm = qm - (e0 / e1) * (1.0 + (e0 * e2) / (2.0 * e1 * e1));
- end else begin
- qm = -qm * qm;
- end
- qid = -qm * nVtm;
-
- if (BULKMOD != 0) begin
- T9 = (K1_t / (2.0 * nVtm)) * sqrt(Vtm);
- T0 = T9 / 2.0;
- T2 = (vge - (deltaPhi - Eg - Vtm * ln(NBODY / Nc) + DELVFBACC)) / Vtm;
- if ((T2 * Vtm) > phib + T9 * sqrt(phib * Vtm)) begin
- T1 = sqrt(T2 - 1.0 + T0 * T0) - T0;
- T10 = 1.0 + T1 * T1;
- end else begin
- T3 = T2 * 0.5 - 3.0 * (1.0 + T9 / sqrt(2.0));
- T10 = T3 + sqrt(T3 * T3 + 6.0 * T2);
- if (T2 < 0.0) begin
- T4 = (T2 - T10) / T9;
- T10 = -ln(1.0 - T10 + T4 * T4 );
- end else begin
- T11 = exp(-T10);
- T4 = sqrt(T2 - 1.0 + T11 + T0 * T0) - T0;
- T10 = 1.0 - T11 + T4 * T4;
- end
- end
- T6 = exp(-T10) - 1.0;
- T7 = sqrt(T6 + T10);
- if (T10 > 1.0e-15) begin
- e0 = -(T2 - T10) + T9 * T7;
- e1 = 1.0 - T9 * 0.5 * T6 / T7;
- T8 = T10 - (e0 / e1);
- T11 = exp(-T8) - 1.0;
- T12 = sqrt(T11 + T8);
- qba = -T9 * T12 * Vtm;
- end else begin
- if (T10 < -1.0e-15) begin
- e0 = -(T2 - T10) - T9 * T7;
- e1 = 1.0 + T9 * 0.5 * T6 / T7;
- T8 = T10 - e0 / e1;
- T12 = T9 * sqrt(exp(-T8) + T8 - 1.0);
- end else begin
- T12 = 0.0;
- T8 = 0.0;
- end
- qba = T12 * Vtm;
- end
- qi_acc_for_QM = T9 * exp(-T8 / 2.0) * Vtm;
-
- psipclamp = 0.5 * (T8 + 1.0 + sqrt((T8 - 1.0) * (T8 - 1.0) + 0.25 * 2.0 * 2.0));
- sqrtpsip = sqrt(psipclamp);
- nq = 1.0 + T9 / sqrtpsip;
- end
-
- // Drain Side and Average Potential / Charge
- qia = 0.5 * (qis + qid);
- dqi = qis - qid;
-
- T0 = pow(Vdseff, 2.0) / 6.25e-4; // pow(Vdseff,2.0) / pow(25e-3, 2.0)
- if (CHARGEWF != 0.0)
- qia2 = 0.5 * (qis + qid) + CHARGEWF * (1.0 - lexp(-T0)) * 0.5 * dqi;
- else
- qia2 = 0.5 * (qis + qid);
-
- `ifdef __DEBUG__
- if (qis < 0.0) $strobe("Warning: negative source-side inversion carrier density. Vgs=%f Vds=%f Vbs=%f qis=%e", V(g, s), V(d, s), V(e, s), qis);
- if (qid < 0.0) $strobe("Warning: negative drain-side inversion carrier density. Vgs=%f Vds=%f Vbs=%f qid=%e", V(g, s), V(d, s), V(e, s), qid);
- `endif
-
- // Toxeff model for quantum mechanical effects
- // Normal operation (Vgs > Vfb)
- if (QMTCENCV_i > 0.0) begin
- T4 = qia / QM0;
- T5 = 1.0 + pow(T4, PQM);
- Tcen = Tcen0 / T5;
- coxeff = 1.0 / (1.0 / (cox * EOT / TOXP) + Tcen * QMTCENCV_i / epssub);
- end else begin
- coxeff = cox;
- end
-
- // Quantum Mechanical Effect Correction for Accumulation Side Cap (Vgs < Vfb)
- if (BULKMOD != 0 && QMTCENCVA_i != 0.0) begin
- T6 = 1.0 + pow(qi_acc_for_QM / QM0ACC, PQMACC);
- Tcen = Tcen0 / T6;
- cox_acc = 1.0 / (1.0 / cox_acc + Tcen * QMTCENCVA_i / epssub);
- end
-
- // Multiplication Factor for I-V
- beta = u0_a * cox * Weff0 / Leff;
-
- // Mobility Degradation
- Eeffm = EeffFactor * (qba + eta_mu * qia2);
- T2 = pow(0.5 * (1.0 + abs((qia2) / qb0)), UCS_t);
- if (BULKMOD != 0) begin
- T3 = (UA_a + UC_a * veseff) * pow(abs(Eeffm), EU_a) + UD_a / T2;
- end else begin
- T3 = UA_a * pow(abs(Eeffm), EU_a) + UD_a / T2;
- end
- Dmob = 1.0 + T3;
- Dmob = Dmob / U0MULT;
- ueff = u0_a / Dmob;
-
- // Mobility Degradation for C-V
- Eeffm_cv = EeffFactor * (qba + eta_mu_cv * qia2);
- T3 = UA_a * pow(abs(Eeffm_cv), EU_a) + UD_a / T2;
- Dmob_cv = 1.0 + T3;
- Dmob_cv = Dmob_cv / U0MULT;
-
- // Calculate current and capacitance enhancement factors due to CLM and DIBL
- tmp = DROUT_i * Leff / scl + 1.0e-6;
-
- if (tmp < 40.0) begin
- DIBLfactor = 0.5 * PDIBL1_a / (cosh(tmp) - 1.0) + PDIBL2_a;
- end else begin
- DIBLfactor = PDIBL1_a * exp(-tmp) + PDIBL2_a;
- end
-
- if (PVAG_i > 0.0) begin
- PVAGfactor = 1.0 + PVAG_i * qia / EsatL;
- end else begin
- PVAGfactor = 1.0 / (1.0 - PVAG_i * qia / EsatL);
- end
-
- if (Vdseff > vds) begin
- Vdseff = vds;
- end
- diffVds = vds - Vdseff;
- Vgst2Vtm = qia + 2.0 * Vtm;
- if (DIBLfactor > 0) begin
- T1 = Vgst2Vtm;
- T3 = T1 / (Vdsat + T1);
- VaDIBL = T1 / DIBLfactor * T3 * PVAGfactor;
- Moc = 1.0 + diffVds / VaDIBL;
- end else begin
- Moc = 1.0;
- end
-
- if (PCLM_a > 0.0) begin
- if (PCLMG_i < 0.0) begin
- T1 = 1.0 / (1.0 / PCLM_a - PCLMG_i * qia);
- end else begin
- T1 = PCLM_a + PCLMG_i * qia;
- end
- Mclm = 1.0 + T1 * lln(1.0 + (vds - Vdseff) / T1 / (Vdsat + EsatL));
- end else begin
- Mclm = 1.0;
- end
-
- Moc = Moc * Mclm;
-
- // Current Degradation Factor Due to Velocity Saturation
- Esat1 = 2.0 * VSAT1_a / ueff;
- Esat1L = Esat1 * Leff;
- T0 = lexp(PSAT_i * lln(dqi / Esat1L));
- Ta = (1.0 + lexp(1.0 / PSAT_i * lln(DELTAVSAT_i)));
- Dvsat = (1.0 + lexp(1.0 / PSAT_i * lln(DELTAVSAT_i + T0))) / Ta;
- Dvsat = Dvsat + 0.5 * PTWG_a * qia * dqi * dqi;
-
- // Non-Saturation Effect
- T0 = A1_t + A2_t / (qia + 2.0 * nVtm);
- T1 = T0 * dqi * dqi;
- T2 = T1 + 1.0 - 0.001;
- T3 = -1.0 + 0.5 * (T2 + sqrt(T2 * T2 + 0.004)); // max(T1, -1.0)
- Nsat = 0.5 * (1.0 + sqrt(1.0 + T3));
- Dvsat = Dvsat * Nsat;
-
- // Lateral Non-uniform doping effect (IV-CV Vth shift) factor
- if (K0_t != 0) begin
- T1 = K0_t / (max(0, K0SI_t + K0SISAT_t * dqi * dqi) * qia + 2.0 * nVtm);
- Mnud = lexp(-T1);
- end else begin
- Mnud = 1.0;
- end
-
- // Body-Effect Factor for BULKMOD = 2
- if (BULKMOD == 2) begin
- T0 = hypsmooth((K2_t + K2SAT_t * vdsx), 1.0e-6);
- T1 = T0 / (max(0, K2SI_t + K2SISAT_t * dqi * dqi) * qia + 2.0 * nVtm);
- T3 = sqrt(PHIBE_i - veseff) - sqrt(PHIBE_i);
- Mob = lexp(- T1 * T3);
- end else
- Mob = 1.0;
-
- // Velocity Saturation Factor for C-V
- EsatCV = 2.0 * VSATCV_t * Dmob_cv / u0_a;
- EsatCVL = EsatCV * LeffCV;
- T0 = lexp(PSATCV_i * lln(dqi / EsatCVL));
- Ta = (1.0 + lexp(1.0 / PSATCV_i * lln(DELTAVSATCV_i)));
- DvsatCV = (1.0 + lexp(1.0 / PSATCV_i * lln(DELTAVSATCV_i + T0))) / Ta;
-
- // Channel Length Modulation factor for C-V
- if (PCLMCV_i != 0) begin
- MclmCV = 1.0 + PCLMCV_i * lln(1.0 + (vds - Vdseff) / PCLMCV_i / (Vdsat + EsatCVL));
- end else begin
- MclmCV = 1.0;
- end
-
- // Calculating fixed body charge qb with sign (Here to avoid multiple calculation in NQSMOD=3 case)
- qb = -`q * nbody * Ach * LeffCV;
-
- // ************************************************
- // * Current and Charges Calculations *
- // ************************************************
- // Quasi Static I-V Model
- T1 = qia;
- etaiv = q0 / (q0 + qia);
- T2 = (2.0 - etaiv) * nVtm;
- ids0_ov_dqi = T1 + T2;
- ids0 = ids0_ov_dqi * dqi;
-
- // S/D Series Resistance
- `include "bsimcmg_rdsmod.include"
-
- ids = NFINtotal * beta * ids0 * Moc * Mnud * Mob / (Dmob * Dvsat * Dr);
- ids = ids * IDS0MULT;
-
- // Quasi Static C-V Model
- `include "bsimcmg_quasi_static_cv.include"
-
- // Parasitic Capacitances
- // Bias-dependent overlap capacitances (CGEOMOD = 0 and 2)
- qgs_ov = 0.0;
- qgd_ov = 0.0;
- if (CGEOMOD != 1) begin
- T1 = NFINtotal * WeffCV0 * devsign;
- T2 = devsign * V(`GateEdgeNode, si);
- T0 = T2 - vfbsdcv + `DELTA_1;
- vgs_overlap = 0.5 * (T0 - sqrt(T0 * T0 + 4.0 * `DELTA_1));
- qgs_ov = T1 * (CGSL_i * (T2 - vfbsdcv - vgs_overlap - 0.5 * CKAPPAS_i * (sqrt(1.0 - 4.0 * vgs_overlap / CKAPPAS_i) - 1.0)) + CGSO_i * T2);
- T2 = devsign * V(`GateEdgeNode, di);
- T0 = T2 - vfbsdcv + `DELTA_1;
- vgd_overlap = 0.5 * (T0 - sqrt(T0 * T0 + 4.0 * `DELTA_1));
- qgd_ov = T1 * (CGDL_i * (T2 - vfbsdcv - vgd_overlap - 0.5 * CKAPPAD_i * (sqrt(1.0 - 4.0 * vgd_overlap / CKAPPAD_i) - 1.0)) + CGDO_i * T2);
- end
-
- if (CGEOMOD == 0) begin
- T1 = NFINtotal * WeffCV0; // Fringe caps dont see QM effects
- qgs_fr = T1 * CFS_i * V(`GateEdgeNode, si);
- qgd_fr = T1 * CFD_i * V(`GateEdgeNode, di);
- qgs_parasitic = qgs_ov + qgs_fr;
- qgd_parasitic = qgd_ov + qgd_fr;
- end else if (CGEOMOD == 1) begin // CGEO1SW=1 enables parameters to be in F per fin, per gate-finger, per unit channel width
- if (CGEO1SW == 1) begin
- T0 = NFINtotal * WeffCV0;
- COVS_i = T0 * COVS_i;
- COVD_i = T0 * COVD_i;
- cgsp = T0 * CGSP;
- cgdp = T0 * CGDP;
- end else begin
- cgsp = CGSP;
- cgdp = CGDP;
- end
- qgs_ov = COVS_i * V(`GateEdgeNode, si);
- qgd_ov = COVD_i * V(`GateEdgeNode, di);
- qgs_parasitic = qgs_ov;
- qgd_parasitic = qgd_ov;
- qgs_fr = cgsp * V(`GateEdgeNode, s);
- qgd_fr = cgdp * V(`GateEdgeNode, d);
- end else begin
- qgs_fr = Cfr_geo * V(`GateEdgeNode, si);
- qgd_fr = Cfr_geo * V(`GateEdgeNode, di);
- qgs_parasitic = qgs_ov + qgs_fr;
- qgd_parasitic = qgd_ov + qgd_fr;
- end
-
- // Drain-to-Source Fringe Capacitance Available for all CGEOMOD
- qds_fr = CDSP * V(d, s);
-
- // Impact Ionization Current (Ref: IIMOD = 1 from BSIM4 Model, IIMOD = 2 from BSIMSOI Model)
- Iii = 0.0;
- if (IIMOD == 1) begin
- T0 = (ALPHA0_t + ALPHA1_t * Leff) / Leff;
- if ((T0 <= 0.0) || (BETA0_t <= 0.0))
- Iii = 0.0;
- else begin
- T1 = -BETA0_t / (diffVds + 1.0e-30);
- Iii = T0 * diffVds * ids * lexp(T1);
- end
- end else if (IIMOD == 2) begin //End of IIMOD=1
- ALPHAII = (ALPHAII0_t + ALPHAII1_t * Leff) / Leff;
- if (ALPHAII <= 0.0) begin
- Iii = 0.0;
- end else begin
- T0 = ESATII_i * Leff;
- T1 = SII0_t * T0 / (1.0 + T0);
- T0 = 1.0 / (1.0 + hypsmooth(SII1_i * vgsfbeff, IIMOD2CLAMP1)); // T0 = 1 / (1 + SII1_i * vgsfbeff)
- T3 = T0 + SII2_i;
- T2 = hypsmooth(vgsfbeff * T3, IIMOD2CLAMP2); // T2 = vgsfbeff * T3
- T3 = 1.0 / (1.0 + SIID_i * vds);
- VgsStep = T1 * T2 * T3;
- Vdsatii = VgsStep * (1.0 - LII_i / Leff);
- Vdiff = vds - Vdsatii;
- T0 = BETAII2_i + BETAII1_i * Vdiff + BETAII0_i * Vdiff * Vdiff;
- T1 = sqrt(T0 * T0 + 1.0e-10);
- Ratio = -hypmax( -ALPHAII * lexp(Vdiff / T1), -10.0, IIMOD2CLAMP3);
- Iii = Ratio * ids;
- end
- end // End of IIMOD=2
-
- // Gate Current (Ref: BSIM4 Model)
- igbinv = 0.0;
- igbacc = 0.0;
- igcs = 0.0;
- igcd = 0.0;
- igs = 0.0;
- igd = 0.0;
-
- // Igb
- if (IGBMOD != 0) begin
- // Igbinv
- T1 = (qia - EIGBINV_i) / NIGBINV_i / Vtm;
- Vaux_Igbinv = NIGBINV_i * Vtm * lln(1.0 + lexp(T1));
- T2 = AIGBINV_t - BIGBINV_i * qia;
- T3 = 1.0 + CIGBINV_i * qia;
- T4 = -9.82222e11 * TOXG * T2 * T3;
- T5 = lexp(T4);
- T6 = 3.75956e-7;
- igbinv = Weff0 * Leff * T6 * Toxratio * vge * Vaux_Igbinv * T5;
- igbinv = igbinv * igtemp;
-
- // Igbacc
- vfbzb = deltaPhi - (Eg / 2.0) - phib;
- T0 = vfbzb - vge;
- T1 = T0 / NIGBACC_i / Vtm;
- Vaux_Igbacc = NIGBACC_i * Vtm * lln(1.0 + lexp(T1));
- if (BULKMOD != 0) begin
- Voxacc = qi_acc_for_QM;
- end else begin
- if (vfbzb <= 0)
- Voxacc = 0.5 * (T0 - 0.02 + sqrt((T0 - 0.02) * (T0 - 0.02) - 0.08 * vfbzb));
- else
- Voxacc = 0.5 * (T0 - 0.02 + sqrt((T0 - 0.02) * (T0 - 0.02) + 0.08 * vfbzb));
- end
- T2 = AIGBACC_t - BIGBACC_i * Voxacc;
- T3 = 1.0 + CIGBACC_i * Voxacc;
- T4 = -7.45669e11 * TOXG * T2 * T3;
- T5 = lexp(T4);
- T6 = 4.97232e-7;
- igbacc = Weff0 * Leff * T6 * Toxratio * vge * Vaux_Igbacc * T5;
- igbacc = igbacc * igtemp;
-
- end
-
- if (IGCMOD != 0) begin
- // Igcinv
- T1 = AIGC_t - BIGC_i * qia;
- T2 = 1.0 + CIGC_i * qia;
- T3 = -Bechvb * TOXG * T1 * T2;
- T4 = qia * lexp(T3);
- T5 = (vge + 0.5 * vdsx + 0.5 * (ves_jct + ved_jct));
- igc0 = Weff0 * Leff * Aechvb * Toxratio * T4 * T5 * igtemp;
-
- // Gate-Current Partitioning
- Vdseffx = sqrt(Vdseff * Vdseff + 0.01) - 0.1;
- T1 = PIGCD_i * Vdseffx;
- T1_exp = lexp(-T1);
- T3 = T1 + T1_exp - 1.0 + 1.0e-4;
- T4 = 1.0 - (T1 + 1.0) * T1_exp + 1.0e-4;
- T5 = T1 * T1 + 2.0e-4;
- igcd = igc0 * T4 / T5;
- igcs = igc0 * T3 / T5;
-
- // Igs
- T0 = vgs_noswap - vfbsd;
- vgs_eff = sqrt(T0 * T0 + 1.0e-4);
- if (IGCLAMP == 1) begin
- T1 = hypsmooth((AIGS_t - BIGS_i * vgs_eff), 1.0e-6);
- if (CIGS_i < 0.01) begin
- CIGS_i = 0.01;
- end
- end else begin
- T1 = AIGS_t - BIGS_i * vgs_eff;
- end
- T2 = 1.0 + CIGS_i * vgs_eff;
- T3 = -Bechvb * TOXG * POXEDGE_i * T1 * T2;
- T4 = lexp(T3);
- if (sigvds > 0.0) begin
- igs = igsd_mult * DLCIGS * vgs_noswap * vgs_eff * T4;
- end else begin
- igd = igsd_mult * DLCIGS * vgs_noswap * vgs_eff * T4;
- end
-
- // Igd
- T0 = vgd_noswap - vfbsd;
- vgd_eff = sqrt(T0 * T0 + 1.0e-4);
- if (IGCLAMP == 1) begin
- T1 = hypsmooth((AIGD_t - BIGD_i * vgd_eff), 1.0e-6);
- if (CIGD_i < 0.01) begin
- CIGD_i = 0.01;
- end
- end else begin
- T1 = AIGD_t - BIGD_i * vgd_eff;
- end
- T2 = 1.0 + CIGD_i * vgd_eff;
- T3 = -Bechvb * TOXG * POXEDGE_i * T1 * T2;
- T4 = lexp(T3);
-
- if (sigvds > 0.0) begin
- igd = igsd_mult * DLCIGD * vgd_noswap * vgd_eff * T4;
- end else begin
- igs = igsd_mult * DLCIGD * vgd_noswap * vgd_eff * T4;
- end
- end
-
- // GIDL/GISL Current (Ref: BSIM4 Model)
- igisl = 0.0;
- igidl = 0.0;
-
- if (GIDLMOD != 0) begin
- T0 = epsratio * EOT;
- // GIDL
- if ((AGIDL_i <= 0.0) || (BGIDL_t <= 0.0)) begin
- T6 = 0.0;
- end else begin
- T1 = (-vgd_noswap - EGIDL_i + vfbsd) / T0;
- T1 = hypsmooth(T1, 1.0e-2);
- T2 = BGIDL_t / (T1 + 1.0e-3);
- T3 = lexp(PGIDL_i * lln(T1));
- if (BULKMOD != 0) begin
- T4 = -ved_jct*ved_jct*ved_jct;
- T4a = CGIDL_i + abs(T4) + 1.0e-5;
- T5 = hypsmooth(T4/T4a, 1.0e-6) - 1.0e-6;
- T6 = AGIDL_i * Weff0 * T3 * lexp(-T2) * T5;
- end else begin
- T6 = AGIDL_i * Weff0 * T3 * lexp(-T2) * vds_noswap;
- end
- end
-
- if (sigvds > 0.0) begin
- igidl = T6;
- end else begin
- igisl = T6;
- end
-
- // GISL
- if ((AGISL_i <= 0.0) || (BGISL_t <= 0.0)) begin
- T6 = 0.0;
- end else begin
- T1 = (-vgs_noswap - EGISL_i + vfbsd) / T0;
- T1 = hypsmooth(T1, 1.0e-2);
- T2 = BGISL_t / (T1 + 1.0e-3);
- T3 = lexp(PGISL_i * lln(T1));
- if (BULKMOD != 0) begin
- T4 = -ves_jct * ves_jct * ves_jct;
- T4a = CGISL_i + abs(T4) + 1.0e-5;
- T5 = hypsmooth(T4/T4a, 1.0e-6) - 1.0e-6;
- T6 = AGISL_i * Weff0 * T3 * lexp(-T2) * T5;
- end else
- T6 = AGISL_i * Weff0 * T3 * lexp(-T2) * (-vds_noswap);
- end
-
- if (sigvds > 0.0) begin
- igisl = T6;
- end else begin
- igidl = T6;
- end
-
- end // End of GIDLMOD
-
- // Junction Current
- if (BULKMOD != 0) begin
- // Source-Side Junction Current
- if (Isbs > 0.0) begin
- if (ves_jct < VjsmRev) begin
- T0 = ves_jct / Nvtms;
- T1 = lexp(T0) - 1.0;
- T2 = IVjsmRev + SslpRev * (ves_jct - VjsmRev);
- Ies = T1 * T2;
- end else if (ves_jct <= VjsmFwd) begin
- T0 = ves_jct / Nvtms;
- T1 = (BVS + ves_jct) / Nvtms;
- T2 = lexp(-T1);
- Ies = Isbs * (lexp(T0) + XExpBVS - 1.0 - XJBVS * T2);
- end else begin
- Ies = IVjsmFwd + SslpFwd * (ves_jct - VjsmFwd);
- end
- end else begin
- Ies = 0.0;
- end
-
- // Source-Side Junction Tunneling Current
- if (JTSS_t > 0.0) begin
- if ((VTSS - ves_jct) < (VTSS * 1.0e-3)) begin
- T0 = -ves_jct / Vtm0 / NJTS_t;
- T1 = lexp(T0 * 1.0e3) - 1.0;
- Ies = Ies - ASEJ * JTSS_t * T1;
- end else begin
- T0 = -ves_jct / Vtm0 / NJTS_t;
- T1 = lexp(T0 * VTSS / (VTSS - ves_jct)) - 1.0;
- Ies = Ies - ASEJ * JTSS_t * T1;
- end
- end
-
- if (JTSSWS_t > 0.0) begin
- if ((VTSSWS - ves_jct) < (VTSSWS * 1.0e-3)) begin
- T0 = -ves_jct / Vtm0 / NJTSSW_t;
- T1 = lexp(T0 * 1.0e3) - 1.0;
- Ies = Ies - PSEJ * JTSSWS_t * T1;
- end else begin
- T0 = -ves_jct / Vtm0 / NJTSSW_t;
- T1 = lexp(T0 * VTSSWS / (VTSSWS - ves_jct)) - 1.0;
- Ies = Ies - PSEJ * JTSSWS_t * T1;
- end
- end
-
- if (JTSSWGS_t > 0.0) begin
- if ((VTSSWGS - ves_jct) < (VTSSWGS * 1.0e-3)) begin
- T0 = -ves_jct / Vtm0 / NJTSSWG_t;
- T1 = lexp(T0 * 1.0e3) - 1.0;
- Ies = Ies - Weff0 * NFINtotal * JTSSWGS_t * T1;
- end else begin
- T0 = -ves_jct / Vtm0 / NJTSSWG_t;
- T1 = lexp(T0 * VTSSWGS / (VTSSWGS - ves_jct)) - 1.0;
- Ies = Ies - Weff0 * NFINtotal * JTSSWGS_t * T1;
- end
- end
-
- // Drain-Side Junction Current
- if (Isbd > 0.0) begin
- if (ved_jct < VjdmRev) begin
- T0 = ved_jct / Nvtmd;
- T1 = lexp(T0) - 1.0;
- T2 = IVjdmRev + DslpRev * (ved_jct - VjdmRev);
- Ied = T1 * T2;
- end else if (ved_jct <= VjdmFwd) begin
- T0 = ved_jct / Nvtmd;
- T1 = (BVD + ved_jct) / Nvtmd;
- T2 = lexp(-T1);
- Ied = Isbd * (lexp(T0) + XExpBVD - 1.0 - XJBVD * T2);
- end else
- Ied = IVjdmFwd + DslpFwd * (ved_jct - VjdmFwd);
- end else
- Ied = 0.0;
-
- // Drain-Side Junction Tunneling Current
- if (JTSD_t > 0.0) begin
- if ((VTSD - ved_jct) < (VTSD * 1.0e-3)) begin
- T0 = -ved_jct / Vtm0 / NJTSD_t;
- T1 = lexp(T0 * 1.0e3) - 1.0;
- Ied = Ied - ADEJ * JTSD_t * T1;
- end else begin
- T0 = -ved_jct / Vtm0 / NJTSD_t;
- T1 = lexp(T0 * VTSD/ (VTSD - ved_jct)) - 1.0;
- Ied = Ied - ADEJ * JTSD_t * T1;
- end
- end
- if (JTSSWD_t > 0.0) begin
- if ((VTSSWD - ved_jct) < (VTSSWD * 1.0e-3)) begin
- T0 = -ved_jct / Vtm0 / NJTSSWD_t;
- T1 = lexp(T0 * 1.0e3) - 1.0;
- Ied = Ied - PDEJ * JTSSWD_t * T1;
- end else begin
- T0 = -ved_jct / Vtm0 / NJTSSWD_t;
- T1 = lexp(T0 * VTSSWD / (VTSSWD - ved_jct)) - 1.0;
- Ied = Ied - PDEJ * JTSSWD_t * T1;
- end
- end
- if (JTSSWGD_t > 0.0) begin
- if ((VTSSWGD - ved_jct) < (VTSSWGD * 1.0e-3)) begin
- T0 = -ved_jct / Vtm0 / NJTSSWGD_t;
- T1 = lexp(T0 * 1.0e3) - 1.0;
- Ied = Ied - Weff0 * NFINtotal * JTSSWGD_t * T1;
- end else begin
- T0 = -ved_jct / Vtm0 / NJTSSWGD_t;
- T1 = lexp(T0 * VTSSWGD / (VTSSWGD - ved_jct)) - 1.0;
- Ied = Ied - Weff0 * NFINtotal * JTSSWGD_t * T1;
- end
- end
-
- // Junction Capacitance (No Swapping)
- // Source-Substrate Junction
- `BSIM6JunctnCap(ves_jct, Czbs, PBS_t, SJS, MJS, MJS2, Qesj1)
- `BSIM6JunctnCap(ves_jct, Czbssw, PBSWS_t, SJSWS, MJSWS, MJSWS2, Qesj2)
- `BSIM6JunctnCap(ves_jct, Czbsswg, PBSWGS_t, SJSWGS, MJSWGS, MJSWGS2, Qesj3)
- Qesj = Qesj1 + Qesj2 + Qesj3;
-
- // Drain-Substrate Junction
- `BSIM6JunctnCap(ved_jct, Czbd, PBD_t, SJD, MJD, MJD2, Qedj1)
- `BSIM6JunctnCap(ved_jct, Czbdsw, PBSWD_t, SJSWD, MJSWD, MJSWD2, Qedj2)
- `BSIM6JunctnCap(ved_jct, Czbdswg, PBSWGD_t, SJSWGD, MJSWGD, MJSWGD2, Qedj3)
- Qedj = Qedj1 + Qedj2 + Qedj3;
-
- end // BULKMOD=0
-
- Qes = Qesj + csbox * ves_jct;
- Qed = Qedj + cdbox * ved_jct;
-
- // Gate-to-Substrate Parasitic Capacitance
- // Bias Independent Component
- Qeg = cgbox * devsign * V(e, `GateEdgeNode);
- if (BULKMOD != 0) begin
- // Bias Dependent Component
- T2 = devsign * V(`GateEdgeNode, e);
- T3 = T2 - deltaPhi + Eg / 2.0 + phib - DELVFBACC;
- T0 = T3 + `DELTA_1;
- vge_overlap = 0.5 * (T0 + sqrt(T0 * T0 + 4.0 * `DELTA_1));
- Qeg = Qeg - NFINtotal * LeffCV * (CGBL_i * (T3 - vge_overlap + 0.5 * CKAPPAB_i * ( sqrt(1.0 + 4.0 * vge_overlap / CKAPPAB_i) - 1.0 )));
- end
-
- // Generation-Recombination Component
- T0 = vds;
- T1 = T0 * (AIGEN_i + BIGEN_i * T0 * T0);
- idsgen = HFIN * TFIN * (Leff - 2.0 * LINTIGEN_i) * igentemp * T1;
-
- // NQS Gate Resistance (Ref: BSIM4 Model)
- T0 = ueff * coxeff * Weff0 / Leff;
-
- `ifdef __NQSMOD1__
- if (NQSMOD == 1 && XRCRG1_i != 0) begin
- IdovVds = beta * ids0_ov_dqi * Moc / (Dmob * Dvsat * Dr);
- gcrg = NFINtotal * XRCRG1_i * (IdovVds + XRCRG2_i * Vtm * T0);
- end
- `endif
-
- `ifdef __NQSMOD2__
- if (NQSMOD == 2) begin
- IdovVds = beta * ids0_ov_dqi * Moc / (Dmob * Dvsat * Dr);
- gcrg = NFINtotal * XRCRG1_i * (IdovVds + XRCRG2_i * Vtm * T0);
- gtau = gcrg / (cox * Weff0 * Leff);
- end
- `endif
-
- // *** Multiply all current and charge components by NFINtotal ***
- // Note: Do not multiply ids, qg, qs, qd, qb, Ies, Ied, Qbs, Qbd with NFINtotal
- // since it is already considered.
-
- igidl = NFINtotal * igidl;
- igisl = NFINtotal * igisl;
- igcd = NFINtotal * igcd;
- igcs = NFINtotal * igcs;
- igs = NFINtotal * igs;
- igd = NFINtotal * igd;
- igbinv = NFINtotal * igbinv;
- igbacc = NFINtotal * igbacc;
- idsgen = NFINtotal * idsgen;
-
- // Gate to Body Tunneling Current Empirical Partition for BULKMOD = 0
- igbs = 0.0;
- igbd = 0.0;
- if (BULKMOD == 0) begin
- igbs = (igbinv + igbacc) * wf;
- igbd = (igbinv + igbacc) * wr;
- end
-
- // Noise Models
- Esatnoi = 2.0 * VSAT_a / ueff; // Thermal noise and flicker noise
-
- // Flicker Noise (Ref: BSIM4 Model from K. K. Hung et al. TED 1990)
- if (NOIA > 0.0 || NOIB > 0.0 || NOIC > 0.0) begin
- Leffnoi = Leff - 2.0 * LINTNOI_i;
- Leffnoisq = Leffnoi * Leffnoi;
- if (EM <= 0.0) begin
- DelClm = 0.0;
- end else begin
- T0 = (diffVds / litl + EM) / Esatnoi;
- DelClm = litl * lln(T0);
- if (DelClm < 0.0) begin
- DelClm = 0.0;
- end
- end
- T1 = `q * `q * `q * Vtm * abs(ids) * ueff;
- T2 = 1.0e10 * coxeff * Leffnoisq;
- N0 = coxeff * qis / `q;
- Nl = coxeff * qid / `q;
- Nstar = Vtm / `q * (coxeff + CIT_a);
- T3 = NOIA * lln((N0 + Nstar) / (Nl + Nstar));
- T4 = NOIB * (N0 - Nl);
- T5 = 0.5 * NOIC * (N0 * N0 - Nl * Nl);
- T6 = `q * Vtm * ids * ids;
- T7 = 1.0e10 * Leffnoisq * Weff0 * NFINtotal;
- T8 = NOIA + NOIB * Nl + NOIC * Nl * Nl;
- T9 = (Nl + Nstar) * (Nl + Nstar);
- Ssi = T1 / T2 * (T3 + T4 + T5) + T6 / T7 * DelClm * T8 / T9;
- T10 = NOIA * `q * Vtm;
- T11 = Weff0 * NFINtotal * Leffnoi * 1.0e10 * Nstar * Nstar;
- Swi = T10 / T11 * ids * ids;
- T1 = Swi + Ssi;
- if (T1 > 0.0) begin
- FNPowerAt1Hz = (Ssi * Swi) / T1;
- end else begin
- FNPowerAt1Hz = 0.0;
- end
- end else begin
- FNPowerAt1Hz = 0.0;
- end
-
- // Thermal Noise
- case (TNOIMOD)
- 0 : begin // Charge-based model (BSIM4 - TNOIMOD=0)
- T0 = ueff * qinv;
- T1 = T0 * Rdsi + Leff * Leff;
- Gtnoi = (T0 / T1) * NTNOI_i;
- sid = 4.0 * Vtm * `q * Gtnoi;
- end
- 1: begin // Correlated Thermal Noise by Navid, November 2013, Reference BSIMSOI4.5.0
- `ifdef __TNOIMOD1__
- Abulk = 1.0;
- Vgst2Vtm = KSATIV_a * (qis + 2.0 * Vtm);
- etaa = 1.0 - Vdseff * Abulk / Vgst2Vtm ;
- T0 = 1.0 - etaa;
- T1 = 1.0 + etaa;
- T2 = T1 + 2.0 * Abulk * Vtm / (qia + 1.0e-10);
- T3 = T2 * T2;
- T4 = T0 * T0;
- T5 = T3 * T3;
- T6 = 1.0 / (1.0 + Vdseff / EsatL) ;
- gamma = T6 * (0.5 * T1 + T0 * T0 / (6.0 * T2));
- delta = ((T1 / T3) - (5.0 * T1 + T2) * T4 / (15.0 * T5) + T4 * T4 / (9.0 * T5 * T2)) / (6.0 * T6 * T6 * T6);
- T7 = T0 / T2;
- epsilon = (T7 + T7 * T7 * T7 / 3.0) / (6.0 * T6);
- T8 = qia / EsatL;
- T8 = T8 * T8;
- npart_c = RNOIC * (1.0 + T8 * TNOIC * Leff);
- T9 = gamma * delta ;
- if (T9 > 0.0) begin
- ctnoi = epsilon / sqrt( gamma * delta) * (2.5316 * npart_c);
- end else begin
- ctnoi = 1.0;
- end
- if (ctnoi > 1) begin
- ctnoi = 1.0;
- end
- if (ctnoi < 0) begin
- ctnoi = 0.0;
- end
- npart_beta = RNOIA * (1.0 + T8 * TNOIA * Leff);
- npart_theta = RNOIB * (1.0 + T8 * TNOIB * Leff);
- gamma = gamma * (3.0 * npart_beta * npart_beta);
- delta = delta * (3.75 * npart_theta * npart_theta);
- T9 = qia * 0.5 * T1;
- gche = beta * T9 * T6;
- noiGd0 = NFINtotal * beta * qia / (1.0 + gche * Rdsi);
- GammaGd0 = gamma * noiGd0;
- sid = 4.0 * Vtm * `q * GammaGd0;
- C0 = NFINtotal * coxeff * WeffCV0 * LeffCV;
- if (gamma > 0.0 && delta > 0.0) begin
- sf = (noiGd0 + 1.0e-15) / sqrt(delta / gamma);
- end else begin
- sf = 0.0;
- end
- `else
- $strobe("[Warning!] Although the model selector TNOIMOD is set to 1, the new correlated thermal noise model is not activated. Please uncomment \"`define __TNOIMOD1__\" in the bsimcmg.va.");
- `endif
- end
- endcase
-
- // Source and Drain Conductance for Thermal Noise Contribution
- if (RDSMOD != 2) begin
- gspr = 1.0 / Rsource; // Note: gspr considers all fins
- gdpr = 1.0 / Rdrain; // Note: gdpr considers all fins
- end
-
- // Loading Ids, Gate and Drain charges
- `ifdef __NQSMOD2__
- if (sigvds > 0.0) begin
- I(di, si) <+ devsign * ids;
- end else begin
- I(si, di) <+ devsign * ids;
- end
-
- if (NQSMOD == 2) begin
- I(`IntrinsicGate, si) <+ devsign * gtau * -V(q);
- I(di, si) <+ devsign * xdpart * gtau * V(q);
- end else begin // Quasi-static Stamping (Normal case)
- I(di, si) <+ devsign * ddt(qd);
- I(`IntrinsicGate, si) <+ devsign * ddt(qg);
- end
- `else
- if (sigvds > 0.0) begin
- I(di, si) <+ devsign * ids;
- end else begin
- I(si, di) <+ devsign * ids;
- end
- I(di, si) <+ devsign * ddt(qd);
- I(`IntrinsicGate, si) <+ devsign * ddt(qg);
- `endif
-
- // Loading Other Currents
- if (sigvds > 0.0) begin
- I(di, si) <+ devsign * idsgen;
- I(`IntrinsicGate, si) <+ devsign * (igcs + igs);
- I(`IntrinsicGate, di) <+ devsign * (igcd + igd);
- if (BULKMOD != 0) begin
- I(di, e) <+ devsign * (igidl + Iii);
- I(si, e) <+ devsign * igisl;
- I(`IntrinsicGate, e) <+ devsign * (igbinv + igbacc);
- end else begin
- I(di, si) <+ devsign * (igidl + Iii);
- I(si, di) <+ devsign * igisl;
- end
- end else begin
- I(si, di) <+ devsign * idsgen;
- I(`IntrinsicGate, di) <+ devsign * (igcs + igs);
- I(`IntrinsicGate, si) <+ devsign * (igcd + igd);
- if (BULKMOD != 0) begin
- I(si, e) <+ devsign * (igidl + Iii);
- I(di, e) <+ devsign * igisl;
- I(`IntrinsicGate, e) <+ devsign * (igbinv + igbacc);
- end else begin
- I(si, di) <+ devsign * (igidl + Iii);
- I(di, si) <+ devsign * igisl;
- end
- end
- if (BULKMOD == 0) begin
- I(`IntrinsicGate, si) <+ devsign * igbs;
- I(`IntrinsicGate, di) <+ devsign * igbd;
- end
-
- if (BULKMOD != 0) begin
- I(e, si) <+ devsign * Ies;
- I(e, di) <+ devsign * Ied;
- end
- I(e, si) <+ devsign * ddt(Qes);
- I(e, di) <+ devsign * ddt(Qed);
- I(e, `GateEdgeNode) <+ devsign * ddt(Qeg);
-
- // Loading other charges
- I(`GateEdgeNode, si) <+ ddt(qgs_parasitic);
- I(`GateEdgeNode, di) <+ ddt(qgd_parasitic);
- I(d, s) <+ ddt(qds_fr);
- if (CGEOMOD == 1) begin
- I(`GateEdgeNode, s) <+ ddt(qgs_fr);
- I(`GateEdgeNode, d) <+ ddt(qgd_fr);
- end
-
- // Accumulation Charge for Bulk FET
- if (BULKMOD != 0) begin
- I(`IntrinsicGate, si) <+ devsign * ddt(qg_acc);
- I(e, si) <+ devsign * ddt(qb_acc);
- end
-
- // External S/D Resistance
- if (RDSMOD == 2) begin
- V(d, di) <+ 0.0;
- V(s, si) <+ 0.0;
- end else begin
- I(d, di) <+ V(d, di) / Rdrain;
- I(s, si) <+ V(s, si) / Rsource;
- end
-
- // NQSMOD1 Gate Resistance Model
- `ifdef __NQSMOD1__
- if (NQSMOD == 1 && XRCRG1_i != 0)
- I(`GateEdgeNode, gi) <+ V(`GateEdgeNode, gi) * gcrg;
- else
- V(`GateEdgeNode, gi) <+ 0.0;
- `endif
-
- // NQSMOD2 BSIM4 Charge Deficit Model
- `ifdef __NQSMOD2__
- if (NQSMOD ==2) begin
- I(q) <+ ddt(qg - qb);
- I(q) <+ V(q) * gtau;
- I(q) <+ ddt(V(q));
- end else
- V(q) <+ 0.0;
- `endif
-
- // Gate Electrode Resistance
- `ifdef __RGATEMOD__
- if (RGATEMOD != 0)
- I(g, ge) <+ V(g, ge) * ggeltd;
- else
- V(g, ge) <+ 0.0;
- `endif
-
- // Flicker Noise
- I(di,si) <+ flicker_noise(FNPowerAt1Hz, EF, "flicker");
-
- // Thermal noise for parasitics
- if (RDSMOD != 2) begin
- I(d, di) <+ white_noise(4.0 * Vtm * `q * gdpr, "thermal");
- I(s, si) <+ white_noise(4.0 * Vtm * `q * gspr, "thermal");
- end
-
- `ifdef __RGATEMOD__
- if (RGATEMOD != 0)
- I(g, ge) <+ white_noise(4.0 * Vtm * `q * ggeltd, "thermal");
- `endif
-
- // Channel thermal noise and induced gate noise stamping
- // Implementation of correlated noise follows C. C. McAndrew, WCM 2005
- if (TNOIMOD == 0) begin
- I(di, si) <+ white_noise(sid, "thermal");
- `ifdef __TNOIMOD1__
- V(N) <+ 0.0;
- `endif
- end else begin
- `ifdef __TNOIMOD1__
- I(di,si) <+ white_noise(sid * abs(1.0 - ctnoi * ctnoi), "thermal");
- I(di,si) <+ ctnoi * V(N) * sf * SCALEN ;
- if (gamma > 0 && delta > 0) begin
- I(N) <+ V(N) * sf * SCALEN;
- I(N) <+ white_noise(sid/(sf*sf*SCALEN*SCALEN));
- end else begin
- I(N) <+ V(N) ;
- end
- I(`IntrinsicGate,si) <+ ddt(0.5 * C0 * SCALEN * V(N));
- I(`IntrinsicGate,di) <+ ddt(0.5 * C0 * SCALEN * V(N));
- `else
- $strobe("[Warning!] Although the model selector TNOIMOD is set to 1, the new correlated thermal noise model is not activated. Please uncomment \"`define __TNOIMOD1__\" in the bsimcmg.va.");
- `endif
- end
-
- // Gate Current Shot Noise
- if (IGCMOD != 0) begin
- if (sigvds > 0) begin
- I(`IntrinsicGate, si) <+ white_noise(2.0 * `q * abs(igcs + igs), "shot");
- I(`IntrinsicGate, di) <+ white_noise(2.0 * `q * abs(igcd + igd), "shot");
- end else begin
- I(`IntrinsicGate, di) <+ white_noise(2.0 * `q * abs(igcs + igs), "shot");
- I(`IntrinsicGate, si) <+ white_noise(2.0 * `q * abs(igcd + igd), "shot");
- end
- end
-
- if (IGBMOD != 0) begin
- if (BULKMOD != 0) begin
- I(`IntrinsicGate, e) <+ white_noise(2.0 * `q * abs(igbinv + igbacc), "shot");
- end else begin
- I(`IntrinsicGate, si) <+ white_noise(2.0 * `q * abs(igbs), "shot");
- I(`IntrinsicGate, di) <+ white_noise(2.0 * `q * abs(igbd), "shot");
- end
- end
-
- // Self Heating
- `ifdef __SHMOD__
- if (SHMOD != 0 && RTH0 > 0) begin
- if (RDSMOD != 2) begin
- Pwr(ith_branch) <+ -(devsign * sigvds * V(di,si) * ids + V(d,di) * V(d,di) / Rdrain + V(s,si) * V(s,si) / Rsource);
- end else begin
- Pwr(ith_branch) <+ -(devsign * sigvds * V(di,si) * ids );
- end
- end
- Pwr(rth_branch) <+ Temp(rth_branch) * gth;
- Pwr(rth_branch) <+ ddt(Temp(rth_branch) * cth);
- `endif
-
- // Operating-Point information
- `ifdef __OPINFO__
- // W & L
- WEFF = Weff0; // Effective width for IV
- LEFF = Leff; // Effective length for IV
- WEFFCV = WeffCV0; // Effective width for CV
- LEFFCV = LeffCV; // Effective length for CV
-
- // Currents
- IDS = devsign * ids; // Intrinsic Drain Current (Electrical)
- if (sigvds > 0) begin // Total Source/Drain Currents (Physical)
- if (BULKMOD != 0) begin
- IDEFF = IDS + devsign * idsgen - devsign * (igd + igcd) + devsign * (Iii + igidl) - devsign * Ied;
- ISEFF = -IDS - devsign * idsgen - devsign * (igs + igcs) + devsign * (igisl) - devsign * Ies;
- end else begin
- IDEFF = IDS + devsign * idsgen - devsign * (igd + igcd + igbd) + devsign * (Iii + igidl - igisl);
- ISEFF = -IDS - devsign * idsgen - devsign * (igs + igcs + igbs) + devsign* (igisl - igidl);
- end
- end else begin
- if (BULKMOD != 0) begin
- IDEFF = -IDS - devsign * idsgen - devsign * (igs + igcs) + devsign * (igisl) - devsign * Ied;
- ISEFF = IDS + devsign * idsgen - devsign * (igd + igcd) + devsign * (Iii + igidl) - devsign * Ies;
- end else begin
- IDEFF = -IDS - devsign * idsgen - devsign * (igs + igcs + igbd) + devsign * (igisl - igidl);
- ISEFF = IDS + devsign * idsgen - devsign * (igd + igcd + igbs) + devsign * (Iii + igidl - igisl);
- end
- end
-
- if (BULKMOD == 0) begin // Total Gate Current
- IGTOT = devsign * (igs + igd + igcs + igcd + igbs + igbd);
- end else begin
- IGTOT = devsign * (igs + igd + igcs + igcd + igbacc + igbinv);
- end
-
- IDSGEN = sigvds * devsign * idsgen; // Generation-Recombination Current (Physical)
- III = devsign * Iii; // Impact Ionization Current
- if (sigvds > 0) begin
- IGIDL = devsign * igidl; // GIDL Current (Physical)
- IGISL = devsign * igisl; // GISL Current (Physical)
- end else begin
- IGIDL = devsign * igisl; // GIDL Current (Physical)
- IGISL = devsign * igidl; // GISL Current (Physical)
- end
-
- if (BULKMOD != 0) begin
- IJSB = -devsign * Ies; // Source-Body Junction Current (Physical)
- IJDB = -devsign * Ied; // Drain-Body Junction Current (Physical)
- end else begin
- IJSB = 0.0;
- IJDB = 0.0;
- end
-
- if (BULKMOD != 0) begin
- ISUB = -III - IGIDL - IGISL - IJSB - IJDB - devsign * (igbinv + igbacc); // Substrate Current
- end else begin
- ISUB = 0.0;
- end
-
- // Misc Variables
- BETA = beta; // Drain Current prefactor per fin per finger
- VDSSAT = Vdsat; // Drain-Source saturation Voltage
- if (NGATE_i > 0) // Flatband Voltage
- VFB = -devsign * (phib + Vtm * lln(NGATE_i / ni));
- else
- VFB = PHIG_i - (EASUB + 0.5 * Eg + devsign * phib);
-
- // Threshold Voltage Calculation
- q0 = 10.0 * Vtm / rc + 2.0 * qbs;
- T1 = Vtm * (Vtm + q0);
- T2 = cox * cox * T1;
- T3 = 2.0 * `q * ni * epssub * Vtm;
- VTH = VFB + devsign * (Vtm * lln(T2 / T3) + dvch_qm + phib + qbs + Vtm + dvth_all - DELVTRAND);
-
- // Conductances
- GM = ddx(devsign * ids,V(`IntrinsicGate)); // Transconductance
- GDS = ddx(devsign * ids,V(di)); // Output Conductance
- if (BULKMOD != 0)
- GMBS = ddx(devsign * ids,V(e)); // Body Transconductance
- else
- GMBS = 0.0;
-
- // Intrinsic Charges (Physical) (Sriram: Not accurate for NQSMOD= 2 and 3)
- QGI = devsign * qg + devsign * qg_acc;
- QDI = devsign * qd;
- QSI = devsign * qs;
- QBI = devsign * (qb + qb_acc);
-
- // Total Charges (Sriram: Not accurate for NQSMOD= 2 and 3)
- QG = devsign * qg + qgs_parasitic + qgd_parasitic + (CGEOMOD == 1 ? qgs_fr + qgd_fr : 0) + devsign * qg_acc - devsign * Qeg;
- QD = devsign * qd - qgd_parasitic - (CGEOMOD == 1 ? qgd_fr : 0) - devsign * Qed;
- QS = devsign * qs - qgs_parasitic - (CGEOMOD == 1 ? qgs_fr : 0) - devsign * Qes;
- QB = devsign * (qb + qb_acc) + devsign * (Qeg + Qes + Qed);
-
- // Intrinsic Capacitances (Physical)
- CGGI = ddx(QGI, V(`IntrinsicGate));
- CGSI = ddx(-QGI, V(si));
- CGDI = ddx(-QGI, V(di));
- CGEI = ddx(-QGI, V(e));
-
- CSGI = ddx(-QSI, V(`IntrinsicGate));
- CSDI = ddx(-QSI, V(di));
- CSSI = ddx(QSI, V(si));
- CSEI = ddx(-QSI, V(e)); // Should be zero everywhere
-
- CDGI = ddx(-QDI, V(`IntrinsicGate));
- CDDI = ddx(QDI, V(di));
- CDSI = ddx(-QDI, V(si));
- CDEI = ddx(-QDI, V(e));
-
- CEGI = ddx(-QBI, V(`IntrinsicGate));
- CEDI = ddx(-QBI, V(di)); // Should be zero everywhere
- CESI = ddx(-QBI, V(si)); // Should be zero everywhere
- CEEI = ddx(QBI, V(e));
-
- // Total Capacitances
- CGG = ddx(QG, V(`IntrinsicGate));
- CGS = ddx(-QG, V(si));
- CGD = ddx(-QG, V(di));
- CGE = ddx(-QG, V(e));
-
- CSG = ddx(-QS, V(`IntrinsicGate));
- CSD = ddx(-QS, V(di));
- CSS = ddx(QS, V(si));
- CSE = ddx(-QS, V(e));
-
- CDG = ddx(-QD, V(`IntrinsicGate));
- CDD = ddx(QD, V(di));
- CDS = ddx(-QD, V(si));
- CDE = ddx(-QD, V(e));
-
- CEG = ddx(-QB, V(`IntrinsicGate));
- CED = ddx(-QB, V(di));
- CES = ddx(-QB, V(si));
- CEE = ddx(QB, V(e));
-
- // Total extrinsic capacitance
- CGSEXT = ddx(-(qgs_parasitic + (CGEOMOD == 1 ? qgs_fr : 0)),V(si)); // Gate-Source Overlap + outer fringing
- CGDEXT = ddx(-(qgd_parasitic + (CGEOMOD == 1 ? qgd_fr : 0)),V(di)); // Gate-Drain Overlap + outer fringing
- CGBOV = ddx(Qeg,V(e)); // Gate-Body Overlap
- CGBOV = -devsign * CGBOV;
-
- // Total of Junction Capacitance and Source/Drain-Body Overlap Capacitance
- CJST = ddx(Qes, V(si));
- CJST = -devsign * CJST;
- CJDT = ddx(Qed, V(di));
- CJDT = -devsign * CJDT;
-
- RSGEO = RSourceGeo; // External bias independent Source Resistance
- RDGEO = RDrainGeo; // External bias independent Drain Resistance
- CFGEO = Cfr_geo; // Geometric Parasitic Cap for CGEOMOD=1
-
- // Output for Self-Heating Temperature
- T_TOTAL_K = DevTemp;
- T_TOTAL_C = DevTemp - `P_CELSIUS0;
- T_DELTA_SH = Temp(t);
-
- `ifdef __DEBUG__
- // Individual Gate Current Components
- IGS = devsign * igs;
- IGD = devsign * igd;
- IGCS = devsign * igcs;
- IGCD = devsign * igcd;
- if (BULKMOD == 0) begin
- IGBS = devsign * igbs;
- IGBD = devsign * igbd;
- end else begin
- IGBINV = devsign * igbinv;
- IGBACC = devsign * igbacc;
- end
-
- DIDSDVG = ddx(ids, V(`IntrinsicGate));
- DIDSDVG = devsign * sigvds * DIDSDVG;
- DIDSDVS = ddx(ids, V(si));
- DIDSDVS = devsign * sigvds * DIDSDVS;
- DIDSDVD = ddx(ids, V(di));
- DIDSDVD = devsign * sigvds * DIDSDVD;
- `ifdef __SHMOD__
- DIDSDVTH = ddx(ids, Temp(t));
- DIDSDVTH = devsign * sigvds * DIDSDVTH;
- `endif
- DIGSDVG = ddx(igs + igcs, V(`IntrinsicGate));
- DIGSDVG = devsign * DIGSDVG;
- DIGSDVS = ddx(igs + igcs, V(si));
- DIGSDVS = devsign * DIGSDVS;
- DIGSDVD = ddx(igs + igcs, V(di));
- DIGSDVD = devsign * DIGSDVD;
- `ifdef __SHMOD__
- DIGSDVTH = ddx(igs + igcs, Temp(t));
- DIGSDVTH = devsign * DIGSDVTH;
- `endif
- DIGDDVG = ddx(igd + igcd, V(`IntrinsicGate));
- DIGDDVG = devsign * DIGDDVG;
- DIGDDVS = ddx(igd + igcd, V(si));
- DIGDDVS = devsign * DIGDDVS;
- DIGDDVD = ddx(igd + igcd, V(di));
- DIGDDVD = devsign * DIGDDVD;
- `ifdef __SHMOD__
- DIGDDVTH = ddx(igd + igcd, Temp(t));
- DIGDDVTH = devsign * DIGDDVTH;
- `endif
- DIIIDVG = ddx(Iii, V(`IntrinsicGate));
- DIIIDVG = devsign * DIIIDVG;
- DIIIDVS = ddx(Iii, V(si));
- DIIIDVS = devsign * DIIIDVS;
- DIIIDVD = ddx(Iii, V(di));
- DIIIDVD = devsign * DIIIDVD;
- `ifdef __SHMOD__
- DIIIDVTH = ddx(Iii, Temp(t));
- DIIIDVTH = devsign * DIIIDVTH;
- `endif
- DIGIDLDVG = ddx(igidl, V(`IntrinsicGate));
- DIGIDLDVG = devsign * DIGIDLDVG;
- DIGIDLDVS = ddx(igidl, V(si));
- DIGIDLDVS = devsign * DIGIDLDVS;
- DIGIDLDVD = ddx(igidl, V(di));
- DIGIDLDVD = devsign * DIGIDLDVD;
- `ifdef __SHMOD__
- DIGIDLDVTH = ddx(igidl, Temp(t));
- DIGIDLDVTH = devsign * DIGIDLDVTH;
- `endif
- DIGISLDVG = ddx(igisl, V(`IntrinsicGate));
- DIGISLDVG = devsign * DIGISLDVG;
- DIGISLDVS = ddx(igisl, V(si));
- DIGISLDVS = devsign * DIGISLDVS;
- DIGISLDVD = ddx(igisl, V(di));
- DIGISLDVD = devsign * DIGISLDVD;
- `ifdef __SHMOD__
- DIGISLDVTH = ddx(igisl, Temp(t));
- DIGISLDVTH = devsign * DIGISLDVTH;
- `endif
-
- `ifdef __SHMOD__
- CGT = ddx(QG, Temp(t));
- CST = ddx(QS, Temp(t));
- CDT = ddx(QD, Temp(t));
- `endif
- ITH = ids * vds;
- `ifdef __SHMOD__
- DITHDVTH = ddx(ITH, Temp(t));
- `endif
- DITHDVG = ddx(ITH, V(`IntrinsicGate));
- DITHDVS = ddx(ITH, V(si));
- DITHDVD = ddx(ITH, V(di));
- `endif // __DEBUG__
- `endif // __OPINFO__
-end // analog block ends
-//================================================
diff --git a/src/spicelib/devices/adms/bsimcmg/admsva/bsimcmg_cfringe.include b/src/spicelib/devices/adms/bsimcmg/admsva/bsimcmg_cfringe.include
deleted file mode 100644
index 04d206f22..000000000
--- a/src/spicelib/devices/adms/bsimcmg/admsva/bsimcmg_cfringe.include
+++ /dev/null
@@ -1,117 +0,0 @@
-// ********************************************************
-// **** BSIM-CMG 110.0.0 released by Sourabh Khandelwal on 01/01/2016****/
-// * BSIM Common Multi-Gate Model Equations (Verilog-A)
-// ********************************************************
-//
-// ********************************************************
-// * Copyright 2016 Regents of the University of California.
-// * All rights reserved.
-// *
-// * Project Director: Prof. Chenming Hu.
-// * Authors: Sriramkumar V., Navid Paydavosi, Juan Duarte, Darsen Lu, Sourabh Khandelwal,
-// * Chung-Hsun Lin, Mohan Dunga, Shijing Yao,
-// * Ali Niknejad, Chenming Hu
-// ********************************************************
-// ********************************************************
-// * NONDISCLOSURE STATEMENT
-// Software is distributed as is, completely without warranty or service
-// support. The University of California and its employees are not liable
-// for the condition or performance of the software.
-// The University of California owns the copyright and grants users a perpetual,
-// irrevocable, worldwide, non-exclusive, royalty-free license with
-// respect to the software as set forth below.
-// The University of California hereby disclaims all implied warranties.
-// The University of California grants the users the right to modify, copy,
-// and redistribute the software and documentation, both within the user's
-// organization and externally, subject to the following restrictions
-// 1. The users agree not to charge for the University of California code
-// itself but may charge for additions, extensions, or support.
-// 2. In any product based on the software, the users agree to acknowledge
-// the University of California that developed the software. This
-// acknowledgment shall appear in the product documentation.
-// 3. The users agree to obey all U.S. Government restrictions governing
-// redistribution or export of the software.
-// 4. The users agree to reproduce any copyright notice which appears on
-// the software on any copy or modification of such made available
-// to others
-// Agreed to on __Jan 01, 2016__________________
-// By: ___University of California, Berkeley____
-// ___Chenming Hu_____________________
-// ___Professor in Graduate School _______
-// ********************************************************
-
-// ********************************************************
-// Macro for the geometry-dependent fringing capacitance
-// model
-// ********************************************************
-
-/*
- (while (re-search-forward
- (rx bow
- (or "Hr" "Lr" "Hgdelta" "Lmax" "y" "x"
- "CcgSat" "Cnon" "TT1" "Ccg1" "r1cf" "Rcf" "Ccg2"
- "Ccg" "C1" "C2" "C3" "Cfglog" "dcf" "TT0"
- "TT2" "Cfgsat" "delta" "xCfg")
- eow)
- nil t)
- (replace-match "x42_\\&" t))
-*/
-
-`define Cfringe_2d_vars() \
- real x42_Hr, x42_Lr, x42_Hgdelta, x42_Lmax, x42_y, x42_x; \
- real x42_CcgSat, x42_Cnon, x42_TT1, x42_Ccg1, x42_r1cf, x42_Rcf, x42_Ccg2; \
- real x42_Ccg, x42_C1, x42_C2, x42_C3, x42_Cfglog, x42_dcf, x42_TT0; \
- real x42_TT2, x42_Cfgsat, x42_delta, Cfg;
-
-`define Cfringe_2d(block_name, Hg, Hc, Lext, Wfin, Lc, Lg, Tox, Cf1, Cgg) \
- begin : block_name \
- x42_Hr = 2.3 + 0.2 * ((Hg) + (Tox)) / (Hc); \
- x42_Lr = 1.05; \
- x42_Hgdelta = abs((Hg) + (Tox) - (Hc)); \
- x42_Lmax = (Lext) * x42_Lr; \
- \
- x42_y = min((Hc), (Hg) + (Tox)); \
- x42_x = (Lext) / (x42_Hr + 1.0); \
- x42_Cnon = 1.7e12; \
- x42_CcgSat = epssp * (x42_y - x42_x) / (Lext); \
- x42_TT1 = x42_Cnon * x42_CcgSat; \
- if (x42_TT1 > `EXPL_THRESHOLD) \
- x42_Ccg1 = x42_CcgSat; \
- else \
- x42_Ccg1 = 1.0 / x42_Cnon * ln(1.0 + lexp(x42_TT1)); \
- \
- x42_r1cf = 0.5 * \
- min((Hc) / ((Hg) + (Tox)), ((Hg) + (Tox)) / (Hc)); \
- x42_Rcf = x42_Hgdelta * x42_r1cf; \
- x42_Ccg2 = epssp * 2 / `M_PI * \
- ln(((Lext) + 0.5 * `M_PI * x42_Rcf) / (Lext)); \
- \
- x42_Ccg = (Wfin) * (x42_Ccg1 + x42_Ccg2); \
- \
- x42_x = x42_Lmax / (Hg); \
- x42_C1 = 4.0 / (sqrt(2.0 * (x42_x + 1)) * `M_PI); \
- x42_C2 = sqrt((Tox) * (Tox) + 2.0 * (Hg) * (Tox) + \
- (Hg) * (Hg) * (x42_x + 1)) * sqrt(x42_x + 1) + (Tox) + \
- (Hg) * x42_x + (Hg); \
- x42_C3 = (Tox) * sqrt((x42_x + 1) * (x42_x + 4)) + Tox * (x42_x + 2); \
- x42_Cfglog = epssp * (x42_C1 * ln(x42_C2 / x42_C3) + 12.27); \
- \
- x42_dcf = x42_Hr * x42_Lr; \
- x42_TT0 = sqrt(x42_dcf * x42_dcf + 1.0); \
- x42_TT1 = sqrt((x42_dcf * x42_dcf + 1) * ((x42_dcf * (Tox)) * (x42_dcf * (Tox)) + \
- 2 * x42_dcf * x42_Lmax * (Tox) + (x42_dcf * x42_dcf + 1) * x42_Lmax * x42_Lmax)) \
- + x42_dcf * (Tox) + x42_dcf * x42_dcf * x42_Lmax + x42_Lmax; \
- x42_TT2 = (x42_TT0 + 1.0) * (x42_dcf * (Tox)); \
- x42_Cfgsat = 2.0 * epssp * sqrt(2) / `M_PI * (Cf1) * x42_dcf \
- / x42_TT0 * ln(x42_TT1 / x42_TT2); \
- \
- x42_delta = 1.2e-12; \
- x42_TT1 = x42_Cfgsat - x42_Cfglog - x42_delta; \
- Cfg = (Wfin) * (x42_Cfgsat - 0.5 * (x42_TT1 + \
- sqrt(x42_TT1 * x42_TT1 + 4 * x42_delta * x42_Cfgsat))); \
- Cgg = x42_Ccg + Cfg; \
- end
-
-
-
-
diff --git a/src/spicelib/devices/adms/bsimcmg/admsva/bsimcmg_quasi_static_cv.include b/src/spicelib/devices/adms/bsimcmg/admsva/bsimcmg_quasi_static_cv.include
deleted file mode 100644
index a0210a4f9..000000000
--- a/src/spicelib/devices/adms/bsimcmg/admsva/bsimcmg_quasi_static_cv.include
+++ /dev/null
@@ -1,89 +0,0 @@
-// ********************************************************
-// **** BSIM-CMG 110.0.0 released by Sourabh Khandelwal on 01/01/2016 ****/
-// * BSIM Common Multi-Gate Model Equations (Verilog-A)
-// ********************************************************
-//
-// ********************************************************
-// * Copyright 2016 Regents of the University of California.
-// * All rights reserved.
-// *
-// * Project Director: Prof. Chenming Hu.
-// * Authors: Sriramkumar V., Navid Paydavosi, Juan Duarte, Darsen Lu,
-// * Chung-Hsun Lin, Mohan Dunga, Shijing Yao,
-// * Ali Niknejad, Chenming Hu
-// ********************************************************
-// ********************************************************
-// * NONDISCLOSURE STATEMENT
-// Software is distributed as is, completely without warranty or service
-// support. The University of California and its employees are not liable
-// for the condition or performance of the software.
-// The University of California owns the copyright and grants users a perpetual,
-// irrevocable, worldwide, non-exclusive, royalty-free license with
-// respect to the software as set forth below.
-// The University of California hereby disclaims all implied warranties.
-// The University of California grants the users the right to modify, copy,
-// and redistribute the software and documentation, both within the user's
-// organization and externally, subject to the following restrictions
-// 1. The users agree not to charge for the University of California code
-// itself but may charge for additions, extensions, or support.
-// 2. In any product based on the software, the users agree to acknowledge
-// the University of California that developed the software. This
-// acknowledgment shall appear in the product documentation.
-// 3. The users agree to obey all U.S. Government restrictions governing
-// redistribution or export of the software.
-// 4. The users agree to reproduce any copyright notice which appears on
-// the software on any copy or modification of such made available
-// to others
-// Agreed to on __Jan 01, 2016_________________
-// By: ___University of California, Berkeley____
-// ___Chenming Hu_____________________
-// ___Professor in Graduate School _______
-// ********************************************************
-// *** Quasi Static CV Model ***
-
- T11 = (2.0*qia+nVtm)/DvsatCV;//G
- qg = qia+dqi*dqi/(6.0*T11);//qc
- qd = -0.5*(qia-(dqi/(6.0))*(1.0-(dqi/T11)*(1+dqi/(5.0*T11))));//qd
- // Including CLM in qg and qd
- inv_MclmCV = 1.0 / MclmCV;
- qg = inv_MclmCV * qg + (MclmCV - 1.0) * qid;
- qd = inv_MclmCV * inv_MclmCV * qd + 0.5 * (MclmCV - inv_MclmCV) * qid;
-
-//Calculating partition for NQSMOD2
-`ifdef __NQSMOD2__
- if(NQSMOD == 2) xdpart = qd / qg;
- else xdpart = 0;
-`endif
-
- qs = -qg-qd; //from charge conservation qs = -qg-qd;
- T6 = NFINtotal*WeffCV0 * LeffCV * coxeff;
-
- qg = T6*qg;
- qd = T6*qd;
- qs = T6*qs;
- qinv = qg ;
- if(BULKMOD != 0) begin
- T1 = NFINtotal * WeffCV0 * LeffCV_acc * cox_acc;
- T7 = qi_acc_for_QM;//qbulk
- T10 = T7 * T1;
- qg_acc = - T10;
- qb_acc = T10;
- T1 = NFINtotal * WeffCV0 * LeffCV * cox;
- T2 = qba - qi_acc_for_QM;
- T10 = T1*T2;
- qg_acc = qg_acc - T10;
- qb_acc = qb_acc + T10;
- T1 = NFINtotal * WeffCV0 * LeffCV * cox;
- T2 = (nq-1.0)*0.5*(qia+(dqi*dqi/(6.0*T11)));
- T10 = T1*T2;
- qg_acc = qg_acc - T10;
- qb_acc = qb_acc + T10;
- end
-
-// if vds is negative, physical charge on qd is qs
- if (sigvds < 0) begin
- T1 = qd;
- qd = qs;
- qs = T1;
- end
-
diff --git a/src/spicelib/devices/adms/bsimcmg/admsva/bsimcmg_rdsmod.include b/src/spicelib/devices/adms/bsimcmg/admsva/bsimcmg_rdsmod.include
deleted file mode 100644
index 892a126cc..000000000
--- a/src/spicelib/devices/adms/bsimcmg/admsva/bsimcmg_rdsmod.include
+++ /dev/null
@@ -1,84 +0,0 @@
-// *******************************************************
-// **** BSIM-CMG 110.0.0 released by Sourabh Khandelwal on 01/01/2016 ****/
-// * BSIM Common Multi-Gate Model Equations (Verilog-A)
-// ********************************************************
-//
-// ********************************************************
-// * Copyright 2016 Regents of the University of California.
-// * All rights reserved.
-// *
-// * Project Director: Prof. Chenming Hu.
-// * Authors: Sriramkumar V., Navid Paydavosi, Juan Duarte, Darsen Lu, Sourabh Khandelwal
-// * Chung-Hsun Lin, Mohan Dunga, Shijing Yao,
-// * Ali Niknejad, Chenming Hu
-// ********************************************************
-// ********************************************************
-// * NONDISCLOSURE STATEMENT
-// Software is distributed as is, completely without warranty or service
-// support. The University of California and its employees are not liable
-// for the condition or performance of the software.
-// The University of California owns the copyright and grants users a perpetual,
-// irrevocable, worldwide, non-exclusive, royalty-free license with
-// respect to the software as set forth below.
-// The University of California hereby disclaims all implied warranties.
-// The University of California grants the users the right to modify, copy,
-// and redistribute the software and documentation, both within the user's
-// organization and externally, subject to the following restrictions
-// 1. The users agree not to charge for the University of California code
-// itself but may charge for additions, extensions, or support.
-// 2. In any product based on the software, the users agree to acknowledge
-// the University of California that developed the software. This
-// acknowledgment shall appear in the product documentation.
-// 3. The users agree to obey all U.S. Government restrictions governing
-// redistribution or export of the software.
-// 4. The users agree to reproduce any copyright notice which appears on
-// the software on any copy or modification of such made available
-// to others
-// Agreed to on __Jan 01, 2016_________________
-// By: ___University of California, Berkeley____
-// ___Chenming Hu_____________________
-// ___Professor in Graduate School _______
-// ********************************************************
-// Source-Drain Resistance Model
-case(RDSMOD)
- 1: begin
- Rdsi = 0.0;
- Dr = 1.0;
-
- T2 = vgs_noswap - vfbsd;
- T3 = sqrt(T2 * T2 + 1.0e-1);
- vgs_eff = 0.5 * (T2 + T3);
- T4 = 1.0 + PRWGS_i * vgs_eff;
- T1 = 1.0 / T4;
- T0 = 0.5 * (T1 + sqrt(T1 * T1 + 0.01));
- T5 = RSW_i * (1.0 + RSDR_a * lexp(0.5 * PRSDR * lln(V(si,s) * V(si,s) + 1.0E-6)));
- Rsource = rdstemp * (RSourceGeo + (RSWMIN_i + T5 * T0) * WeffWRFactor);
-
- T2 = vgd_noswap - vfbsd;
- T3 = sqrt(T2 * T2 + 1.0e-1);
- vgd_eff = 0.5 * (T2 + T3);
- T4 = 1.0 + PRWGD_i * vgd_eff;
- T1 = 1.0 / T4;
- T0 = 0.5 * (T1 + sqrt(T1 * T1 + 0.01));
- T5 = RDW_i * (1.0 + RDDR_a * lexp(0.5 * PRDDR * lln(V(di,d) * V(di,d) + 1.0E-6)));
- Rdrain = rdstemp * (RDrainGeo + (RDWMIN_i + T5 * T0) * WeffWRFactor);
- end
- 0: begin
- Rsource = RSourceGeo;
- Rdrain = RDrainGeo;
- T4 = 1.0 + PRWGS_i * qia;
- T1 = 1.0 / T4;
- T0 = 0.5 * (T1 + sqrt(T1 * T1 + 0.01));
- Rdsi = rdstemp * (RDSWMIN_i + RDSW_i * T0) * WeffWRFactor;
- Dr = 1.0 + (NFINtotal) * beta * ids0_ov_dqi / (Dmob * Dvsat) * Rdsi;
- end
- 2: begin
- T4 = 1.0 + PRWGS_i * qia;
- T1 = 1.0 / T4;
- T0 = 0.5 * (T1 + sqrt(T1 * T1 + 0.01));
- Rdsi = rdstemp * (RSourceGeo + RDrainGeo + RDSWMIN_i + RDSW_i * T0) * WeffWRFactor;
- Dr = 1.0 + (NFINtotal) * beta * ids0_ov_dqi / (Dmob * Dvsat) * Rdsi;
- Rsource = 0.0;
- Rdrain = 0.0;
- end
-endcase
diff --git a/src/spicelib/devices/adms/bsimcmg/admsva/common_defs.include b/src/spicelib/devices/adms/bsimcmg/admsva/common_defs.include
deleted file mode 100644
index d93f94733..000000000
--- a/src/spicelib/devices/adms/bsimcmg/admsva/common_defs.include
+++ /dev/null
@@ -1,185 +0,0 @@
-// ********************************************************
-// **** BSIM-CMG 110.0.0 released by Sourabh Khandelwal on 01/01/2016 ****/
-// * BSIM Common Multi-Gate Model Equations (Verilog-A)
-// ********************************************************
-//
-// ********************************************************
-// * Copyright 2016 Regents of the University of California.
-// * All rights reserved.
-// *
-// * Project Director: Prof. Chenming Hu.
-// * Authors: Sriramkumar V., Navid Paydavosi, Juan Duarte, Darsen Lu, Sourabh Khandelwal
-// * Chung-Hsun Lin, Mohan Dunga, Shijing Yao,
-// * Ali Niknejad, Chenming Hu
-// ********************************************************
-// ********************************************************
-// * NONDISCLOSURE STATEMENT
-// Software is distributed as is, completely without warranty or service
-// support. The University of California and its employees are not liable
-// for the condition or performance of the software.
-// The University of California owns the copyright and grants users a perpetual,
-// irrevocable, worldwide, non-exclusive, royalty-free license with
-// respect to the software as set forth below.
-// The University of California hereby disclaims all implied warranties.
-// The University of California grants the users the right to modify, copy,
-// and redistribute the software and documentation, both within the user's
-// organization and externally, subject to the following restrictions
-// 1. The users agree not to charge for the University of California code
-// itself but may charge for additions, extensions, or support.
-// 2. In any product based on the software, the users agree to acknowledge
-// the University of California that developed the software. This
-// acknowledgment shall appear in the product documentation.
-// 3. The users agree to obey all U.S. Government restrictions governing
-// redistribution or export of the software.
-// 4. The users agree to reproduce any copyright notice which appears on
-// the software on any copy or modification of such made available
-// to others
-// Agreed to on __Jan 01, 2016__________________
-// By: ___University of California, Berkeley____
-// ___Chenming Hu_____________________
-// ___Professor in Graduate School _______
-// ********************************************************
-
-// Numerical Constants
-`define EXPL_THRESHOLD 80.0
-`define MAX_EXPL 5.540622384e34
-`define MIN_EXPL 1.804851387e-35
-`define N_MINLOG 1.0e-38
-`define MEXPQM 4
-`define DELTA_1 0.02
-`define DELTA_ASYMM 0.04
-`define CONSTCtoK (273.15)
-`define REFTEMP (300.15) /* 27 degrees C */
-
-
-// Model type definitions
-`define ntype 1
-`define ptype 0
-
-// Physical Constants
-`define q 1.60219e-19 // Coul
-`define EPS0 8.8542e-12 // F/m
-`define HBAR 1.05457e-34 // Joule-sec
-`define MEL 9.11e-31 // kg
-`define KboQ 8.617087e-5 // Joule / degree
-
-// Mathematical functions
-//`define SINH(x) (0.5 * (lexp(x) - lexp(-(x))))
-`define COSH(x) (0.5 * (lexp(x) + lexp(-(x))))
-//`define TANH(x) ((lexp(x) - lexp(-(x))) / (lexp(x) + lexp(-(x))))
-`define COT(x) ((x)>=`M_PI/2 ? 0 : ((x)<=-`M_PI/2 ? 0 : 1.0/tan(x)))
-
-// Junction capacitance
-//ex:(ves_jct, Czbs, PBS_t, SBS, MJS, MJS2, Qes1)
-`define BSIM6JunctnCap(vex, Cz, PB, SJ, MJ, MJ2, Qej) \
- begin \
- if (Cz > 0.0) begin \
- T1 = vex / PB; \
- if (T1 < 0.9) begin \
- if (SJ > 0.0) begin /*second-step junction*/ \
- vec = PB * (1.0 - lexp((1.0 / MJ) * lln(1.0/SJ))); /*Switch over voltage*/\
- pb2 = PB * SJ * MJ2 / MJ / lexp(- (1.0 + MJ) * lln(1.0 - vec / PB)); /*PB for second doping region*/\
- if (vex > vec) begin \
- arg = 1.0 - T1; \
- if (MJ == 0.5) sarg = 1.0 / sqrt(arg); \
- else sarg = lexp(-MJ * lln(arg)); \
- Qej = PB * Cz * (1.0 - arg * sarg) / (1.0 - MJ); \
- end else begin /*vex < vec*/ \
- arg = 1.0 - vec / PB; \
- if (MJ == 0.5) sarg = 1.0 / sqrt(arg); \
- else sarg = lexp(-MJ * lln(arg)); \
- Qec = PB * Cz * (1.0 - arg * sarg) / (1.0 - MJ); \
- arg = 1.0 - (vex - vec) / pb2; \
- if (MJ2 == 0.5) sarg = 1.0 / sqrt(arg); \
- else sarg = lexp(-MJ2 * lln(arg)); \
- Qej = Qec + SJ * pb2 * Cz * (1.0 - arg * sarg) / (1.0 - MJ2); \
- end \
- end else begin /*single junction*/ \
- arg = 1.0 - T1; \
- if (MJ == 0.5) sarg = 1.0 / sqrt(arg); \
- else sarg = lexp(-MJ * lln(arg)); \
- Qej = PB * Cz * (1.0 - arg * sarg) / (1.0 - MJ); \
- end \
- end else begin /*vex/PB>=0.9*/ \
- T2 = lexp(-MJ * lln(0.1)); \
- T3 = 1.0 / (1.0-MJ); \
- T4 = T2 * (T1 - 1.0) * (5.0 * MJ * (T1-1.0) + (1.0 + MJ) ); \
- T5 = T3 * (1.0 - 0.05 * MJ * (1.0 + MJ) * T2 ); \
- Qej = PB * Cz * (T4 + T5); /*Quadratic equation for Qej when vex/PB>=0.9*/\
- end \
- end else begin \
- Qej = 0.0; \
- end \
- end
-
-//
-// Macros for the model/instance parameters
-//
-// MPRxx model parameter real
-// MPIxx model parameter integer
-// IPRxx instance parameter real
-// IPIxx instance parameter integer
-// ||
-// cc closed lower bound, closed upper bound
-// oo open lower bound, open upper bound
-// co closed lower bound, open upper bound
-// oc open lower bound, closed upper bound
-// cz closed lower bound=0, open upper bound=inf
-// oz open lower bound=0, open upper bound=inf
-// nb no bounds
-// ex no bounds with exclude
-// sw switch(integer only, values 0=false and 1=true)
-// ty switch(integer only, values -1=p-type and +1=n-type)
-//
-// IPM instance parameter mFactor(multiplicity, implicit for LRM2.2)
-// OPP operating point parameter, includes units and description for printing
-//
-`define ALIAS(alias,paramName) aliasparam alias = paramName ;
-`define OPP(nam,uni,des) (*units=uni, desc=des*) real nam ;
-
-`define MPRnb(nam,def,uni, des) (*units=uni, desc=des*) parameter real nam=def ;
-`define MPRex(nam,def,uni,exc, des) (*units=uni, desc=des*) parameter real nam=def exclude exc ;
-`define MPRcc(nam,def,uni,lwr,upr,des) (*units=uni, desc=des*) parameter real nam=def from[lwr:upr] ;
-`define MPRoo(nam,def,uni,lwr,upr,des) (*units=uni, desc=des*) parameter real nam=def from(lwr:upr) ;
-`define MPRco(nam,def,uni,lwr,upr,des) (*units=uni, desc=des*) parameter real nam=def from[lwr:upr) ;
-`define MPRoc(nam,def,uni,lwr,upr,des) (*units=uni, desc=des*) parameter real nam=def from(lwr:upr] ;
-`define MPRcz(nam,def,uni, des) (*units=uni, desc=des*) parameter real nam=def from[ 0:inf);
-`define MPRoz(nam,def,uni, des) (*units=uni, desc=des*) parameter real nam=def from( 0:inf);
-
-`define MPInb(nam,def,uni, des) (*units=uni, desc=des*) parameter integer nam=def ;
-`define MPIex(nam,def,uni,exc, des) (*units=uni, desc=des*) parameter integer nam=def exclude exc ;
-`define MPIcc(nam,def,uni,lwr,upr,des) (*units=uni, desc=des*) parameter integer nam=def from[lwr:upr] ;
-`define MPIoo(nam,def,uni,lwr,upr,des) (*units=uni, desc=des*) parameter integer nam=def from(lwr:upr) ;
-`define MPIco(nam,def,uni,lwr,upr,des) (*units=uni, desc=des*) parameter integer nam=def from[lwr:upr) ;
-`define MPIoc(nam,def,uni,lwr,upr,des) (*units=uni, desc=des*) parameter integer nam=def from(lwr:upr] ;
-`define MPIcz(nam,def,uni, des) (*units=uni, desc=des*) parameter integer nam=def from[ 0:inf);
-`define MPIoz(nam,def,uni, des) (*units=uni, desc=des*) parameter integer nam=def from( 0:inf);
-
-`define MPIsw(nam,def,uni, des) (*units=uni, desc=des*) parameter integer nam=def from[ 0: 1] ;
-`define MPIty(nam,def,uni, des) (*units=uni, desc=des*) parameter integer nam=def from[ -1: 1] exclude 0 ;
-
-`define IPRnb(nam,def,uni, des) (*units=uni, type="instance", desc=des*) parameter real nam=def ;
-`define IPRex(nam,def,uni,exc, des) (*units=uni, type="instance", desc=des*) parameter real nam=def exclude exc ;
-`define IPRcc(nam,def,uni,lwr,upr,des) (*units=uni, type="instance", desc=des*) parameter real nam=def from[lwr:upr] ;
-`define IPRoo(nam,def,uni,lwr,upr,des) (*units=uni, type="instance", desc=des*) parameter real nam=def from(lwr:upr) ;
-`define IPRco(nam,def,uni,lwr,upr,des) (*units=uni, type="instance", desc=des*) parameter real nam=def from[lwr:upr) ;
-`define IPRoc(nam,def,uni,lwr,upr,des) (*units=uni, type="instance", desc=des*) parameter real nam=def from(lwr:upr] ;
-`define IPRcz(nam,def,uni, des) (*units=uni, type="instance", desc=des*) parameter real nam=def from[ 0:inf);
-`define IPRoz(nam,def,uni, des) (*units=uni, type="instance", desc=des*) parameter real nam=def from( 0:inf);
-
-`define IPInb(nam,def,uni, des) (*units=uni, type="instance", desc=des*) parameter integer nam=def ;
-`define IPIex(nam,def,uni,exc, des) (*units=uni, type="instance", desc=des*) parameter integer nam=def exclude exc ;
-`define IPIcc(nam,def,uni,lwr,upr,des) (*units=uni, type="instance", desc=des*) parameter integer nam=def from[lwr:upr] ;
-`define IPIoo(nam,def,uni,lwr,upr,des) (*units=uni, type="instance", desc=des*) parameter integer nam=def from(lwr:upr) ;
-`define IPIco(nam,def,uni,lwr,upr,des) (*units=uni, type="instance", desc=des*) parameter integer nam=def from[lwr:upr) ;
-`define IPIoc(nam,def,uni,lwr,upr,des) (*units=uni, type="instance", desc=des*) parameter integer nam=def from(lwr:upr] ;
-`define IPIcz(nam,def,uni, des) (*units=uni, type="instance", desc=des*) parameter integer nam=def from[ 0:inf);
-`define IPIoz(nam,def,uni, des) (*units=uni, type="instance", desc=des*) parameter integer nam=def from( 0:inf);
-
-`ifdef EXPLICIT_MFACTOR
- `define IPM (*units="" , type="instance", desc="multiplicity factor"*) parameter real m=1.0 from(0.0:inf) ;
- `define MFACTOR_USE m
-`else //
- `define IPM
- `define MFACTOR_USE 1.0
-`endif
diff --git a/src/spicelib/devices/adms/ekv/admsva/ekv.va b/src/spicelib/devices/adms/ekv/admsva/ekv.va
deleted file mode 100644
index a75bcfdd8..000000000
--- a/src/spicelib/devices/adms/ekv/admsva/ekv.va
+++ /dev/null
@@ -1,621 +0,0 @@
-// EPFL-EKV version 2.6: A Verilog-A description.
-// The intrinsic device is coded according to the official manual
-// (revision II) available at http://legwww.epfl.ch/ekv.
-// contribution of Ivan Riis Nielsen 11/2006, modified by Dietmar Warning 01/2009
-
-`define P(txt) (*txt*)
-`define PGIVEN(p) $param_given(p)
-`ifdef insideADMS
- `define INITIAL_MODEL @(initial_model)
- `define INSTANCE @(initial_instance)
- `define NOISE @(noise)
-`else
- `define INITIAL_MODEL
- `define INSTANCE
- `define NOISE
-`endif
-
-`include "constants.h"
-`include "discipline.h"
-
-`define NMOS 1
-`define PMOS -1
-
-`define EPSSI `P_EPS0*11.7
-`define EPSOX `P_EPS0*3.9
-`define TREF 300.15
-`define MIN_R 0.001
-`define VEXLIM 200.0
-
-`define SQR(x) ((x)*(x))
-
-`define VT(temp) (`P_K*temp/`P_Q)
-`define EG(temp) (1.16-0.000702*`SQR(temp)/(temp+1108))
-`define NI(temp) (1.45e16*(temp/`TREF)*exp(`EG(`TREF)/(2*`VT(`TREF))-`EG(temp)/(2*`VT(temp))))
-
-`define y_fv(fv,y)\
- if (fv > -0.35) begin \
- z0 = 2.0/(1.3 + fv - ln(fv+1.6));\
- z1 = (2.0 + z0) / (1.0 + fv + ln(z0));\
- y = (1.0 + fv + ln(z1)) / (2.0 + z1);\
- end \
- else if (fv > -15) begin \
- tmp = exp(-fv);\
- z0 = 1.55 + tmp;\
- z1 = (2.0 + z0) / (1.0 + fv + ln(z0));\
- y = (1.0 + fv + ln(z1)) / (2.0 + z1);\
- end \
- else if (fv > -23.0) begin \
- tmp = exp(-fv);\
- y = 1.0 / (2.0 + tmp);\
- end \
- else begin \
- tmp = exp(fv);\
- y = tmp + 1.0e-64;\
- end
-
-`define expLin(result, x)\
- if (x < `VEXLIM)\
- result = exp(x);\
- else begin\
- result = exp(`VEXLIM) * (1.0 + (x - `VEXLIM));\
- end
-
-module ekv (d,g,s,b);
-
- // Node definitions
-
- inout d,g,s,b; // external nodes
- electrical d,g,s,b; // external nodes
- electrical dp,sp; // internal nodes
-
- branch (dp,sp) dpsp;
- branch (dp,b) dpb;
- branch (sp,b) spb;
- branch (g,dp) gpdp;
- branch (g,sp) gpsp;
- branch (g,b) gb;
- branch (d,dp) ddp;
- branch (s,sp) ssp;
-
- // Instance parameters
-
- // - intrinsic model
- parameter real l=10e-6 from [0:inf) `P(type="instance" desc="Drawn length [m]" units="m");
- parameter real w=10e-6 from [0:inf) `P(type="instance" desc="Drawn width [m]" units="m");
- parameter real m=1.0 from [1:inf) `P(type="instance" desc="Parallel multiplier" units="m");
- parameter real ns=1.0 from [1:inf) `P(type="instance" desc="Series multiplier" units="m");
- parameter real dtemp = 0.0 from (-inf:inf) `P(type="instance" desc="Difference sim. temp and device temp" units="C");
-
- // - external parasitics
- parameter real ad=0.0 from [0:inf) `P(type="instance" desc="Drain area" units="m^2");
- parameter real as=0.0 from [0:inf) `P(type="instance" desc="Source area" units="m^2");
- parameter real pd=0.0 from [0:inf) `P(type="instance" desc="Drain perimeter" units="m");
- parameter real ps=0.0 from [0:inf) `P(type="instance" desc="Source perimeter" units="m");
- parameter real nrd=0.0 from [0:inf) `P(type="instance" desc="Drain no. squares");
- parameter real nrs=0.0 from [0:inf) `P(type="instance" desc="Source no. squares");
-
- // Model parameters
-
- parameter integer nmos=1 from [0:1] `P(desc="MOS channel type");
- parameter integer pmos=1 from [0:1] `P(desc="MOS channel type");
- parameter integer type=1 from [-1:1] exclude 0;
- parameter real tnom=27.0 from [-273.15:inf) `P(desc="Nominal temperature" units="C");
- parameter real imax=1.0 from [0:inf) `P(desc="Maximum forward junction current before linearization" units="A");
-
- // - intrinsic model (optional, section 4.2.1)
- parameter real tox=0.0 from [0:inf) `P(desc="Oxide thickness" units="m");
- parameter real nsub=0.0 from [0:inf) `P(desc="Channel doping" units="cm^-3");
- parameter real vfb=-1.0 from (-inf:inf) `P(desc="Flat-band voltage" units="V");
-
- parameter real uo=0.0 from [0:inf) `P(desc="Low-field mobility" units="cm^2/Vs");
- parameter real vmax=0.0 from [0:inf) `P(desc="Saturation velocity" units="m/s");
- parameter real theta=0.0 from [0:inf) `P(desc="Mobility reduction coefficient" units="V^-1");
-
- // - intrinsic model (process related, section 4.1)
- parameter real cox=0.7e-3 from [1e-6:inf) `P(desc="Oxide capacitance" units="F/m^2");
- parameter real xj=0.1e-6 from [1n:inf) `P(desc="Junction depth" units="m");
- parameter real dl=0.0 from (-inf:inf) `P(desc="Length correction" units="m");
- parameter real dw=0.0 from (-inf:inf) `P(desc="Width correction" units="m");
-
- // - intrinsic model (basic, section 4.2)
- parameter real gamma=0.7 from [0:inf) `P(desc="Body effect parameter" units="V^0.5");
- parameter real phi=0.5 from [0.1:inf) `P(desc="Bulk Fermi potential (*2)" units="V");
- parameter real vto=0.5 from (-inf:inf) `P(desc="Long-channel threshold voltage" units="V");
- parameter real kp=20e-6 from [0.0:inf) `P(desc="Transconductance parameter" units="A/V^2");
- parameter real ucrit=1.0e+6 from [100e+3:inf) `P(desc="Longitudinal critical field" units="V/m");
- parameter real e0=1.0e-9 from [1e-12:inf) `P(desc="Mobility reduction coefficient" units="V/m");
-
- // - intrinsic model (channel length modulation and charge sharing, section 4.3)
- parameter real lambda=0.5 from [0:inf) `P(desc="Depletion length coefficient (CLM)");
- parameter real weta=0.25 from (-inf:inf) `P(desc="Narrow-channel effect coefficient");
- parameter real leta=0.1 from (-inf:inf) `P(desc="Short-channel effect coefficient");
-
- // - intrinsic model (reverse short channel effect, section 4.4)
- parameter real q0=0.0 from (-inf:inf) `P(desc="RSCE peak charge density" units="C/m^2");
- parameter real lk=0.29e-6 from [10n:inf) `P(desc="RSCE characteristic length" units="m");
-
- // - intrinsic model (impact ionization, section 4.5)
- parameter real iba=0.0 from (-inf:inf) `P(desc="First impact ionization coefficient" units="m^-1");
- parameter real ibb=3e8 from [1e8:inf) `P(desc="Second impact ionization coefficient" units="V/m");
- parameter real ibn=1.0 from [0.1:inf) `P(desc="Saturation voltage factor for impact ionization");
-
- // - intrinsic model (temperature, section 4.6)
- parameter real tcv=1e-3 from (-inf:inf) `P(desc="Threshold voltage TC" units="V/deg");
- parameter real bex=-1.5 from (-inf:inf) `P(desc="Mobility temperature exponent");
- parameter real ucex=0.8 from (-inf:inf) `P(desc="Longitudinal critical field temperature exponent");
- parameter real ibbt=9e-4 from (-inf:inf) `P(desc="Temperature coefficient for ibb" units="K^-1");
-
- // - intrinsic model (matching, section 4.7)
- parameter real avto=0.0 from (-inf:inf) `P(desc="Area related vto mismatch parameter" units="Vm");
- parameter real akp=0.0 from (-inf:inf) `P(desc="Area related kp mismatch parameter" units="m");
- parameter real agamma=0.0 from (-inf:inf) `P(desc="Area related gamma mismatch parameter" units="V^0.5*m");
-
- // - intrinsic model (flicker noise, section 4.8)
- parameter real kf=0.0 from [0:inf) `P(desc="Flicker noise coefficient");
- parameter real af=1.0 from (-inf:inf) `P(desc="Flicker noise exponent");
-
- // - external parasitic parameters
- parameter real hdif=0.0 from [0:inf) `P(desc="S/D diffusion length (/2)" units="m");
- parameter real rsh=0.0 from [0:inf) `P(desc="S/D sheet resistance" units="Ohm");
- parameter real js=0.0 from [0:inf) `P(desc="S/D junction saturation current density" units="A/m^2");
- parameter real jsw=0.0 from [0:inf) `P(desc="S/D junction sidewall saturation current density" units="A/m");
- parameter real xti=0.0 from [0:inf) `P(desc="S/D diode saturation current temperature exponent");
- parameter real n=1 from [0.5:10] `P(desc="S/D diode emission coefficient");
- parameter real cj=0.0 from [0:inf) `P(desc="S/D zero-bias junction capacitance per area" units="F/m^2");
- parameter real cjsw=0.0 from [0:inf) `P(desc="S/D zero-bias junction capacitance per perimeter" units="F/m");
- parameter real pb=0.8 from (0:inf) `P(desc="S/D bottom junction builtin potential" units="V");
- parameter real pbsw=pb from (0:inf) `P(desc="S/D sidewall junction builtin potential" units="V");
- parameter real mj=0.5 from (0:inf) `P(desc="S/D bottom junction grading coefficient");
- parameter real mjsw=0.333 from (0:inf) `P(desc="S/D sidewall junction grading coefficient");
- parameter real fc=0.5 from (0:inf) `P(desc="S/D bottom junction forward-bias threshold");
- parameter real fcsw=fc from (0:inf) `P(desc="S/D sidewall junction forward-bias threshold");
- parameter real cgso=1.5e-10 from [0:inf) `P(desc="Gate-source overlap capacitance per width" units="F/m");
- parameter real cgdo=1.5e-10 from [0:inf) `P(desc="Gate-drain overlap capacitance per width" units="F/m");
- parameter real cgbo=4.0e-10 from [0:inf) `P(desc="Gate-bulk overlap capacitance per length" units="F/m");
-
- // Declaration of variables
- integer mode, MOStype;
- real lc,isat_s,vexp_s,gexp_s,isat_d,vexp_d,gexp_d,fact,
- weff,leff,lmin,RDeff,RSeff,ceps,ca,xsi,dvrsce,
- TempK,Vt,sqrt_A,vto_a,kp_a,gamma_a,ucrit_a,phi_a,ibb_a,vc,qb0,
- vg,vd,vs,tmp,vgprime,vp0,vsprime,vdprime,gamma0,gammaprime,vp,nslope,ifwd,
- vdss,vdssprime,dv,vds,vip,dl_a,lprime,leq,irprime,irev,beta0,nau,
- nq,xf,xr,qd,qs,qi,qb,qg,beta0prime,beta,vpprime,is,ids,vib,
- idb,ibdj,ibsj,coxt,qdt,qst,qdtx,qstx,qgt,qjs,qjd,
- cbs0,cbs0sw,cbs,cbd0,cbd0sw,cbd,v_bp_dp, v_bp_sp,
- fv,z0,z1,y;
-
- real ADeff, ASeff, PDeff, PSeff;
- real cgso_s,cgdo_s,cgbo_s;
- real gmin, TnomK;
- real cox_p, gamma_p, phi_p, kp_p, vto_p, ucrit_p;
-
- analog begin
-
- MOStype = 1;
-
- gmin = $simparam("gmin");
-
- `INITIAL_MODEL // Model Initialization
- begin
- if (`PGIVEN(nmos)) begin
- MOStype = `NMOS;
- end else if (`PGIVEN(pmos)) begin
- MOStype = `PMOS;
- end else begin
- MOStype = (`PGIVEN(type)) ? type : `NMOS;
- end
- //$strobe("MOStype %d", MOStype);
-
- if (`PGIVEN(cox)) begin
- cox_p = cox;
- end else begin
- cox_p = (tox>0) ? (`EPSOX/tox) : 0.7e-3;
- end
-
- if (`PGIVEN(gamma)) begin
- gamma_p = gamma;
- end else begin
- gamma_p = (nsub>0) ? (sqrt(2*`P_Q*`EPSSI*nsub*1e+6)/cox_p) : 0.7;
- end
-
- if (`PGIVEN(phi)) begin
- phi_p = phi;
- end else begin
- phi_p = (nsub>0) ? (2*`VT(tnom+273.15)*ln(nsub*1e+6/`NI(tnom+273.15))) : 0.5;
- end
-
- if (`PGIVEN(kp)) begin
- kp_p = kp;
- end else begin
- kp_p = (uo>0) ? (uo*1e-4*cox_p) : 20e-6;
- end
-
- if (`PGIVEN(vto)) begin
- vto_p = vto;
- end else begin
- vto_p = (`PGIVEN(vfb)) ? (vfb+phi_p+gamma_p*sqrt(phi_p)) : 0.5;
- end
-
- if (`PGIVEN(ucrit)) begin
- ucrit_p = ucrit;
- end else begin
- ucrit_p = (vmax>0 && uo>0) ? (vmax/(uo*1e-4)) : 100e+3;
- end
-
- lc = sqrt(`EPSSI/cox_p*xj);
-
- end // INITIAL_MODEL
-
- `INSTANCE // temperature independent device initialization
- begin
- weff = w+dw;
- leff = l+dl;
-
- // eq. 54
- lmin = 0.1*ns*leff;
-
- if (hdif > 0) begin
- RSeff = ns/m*rsh*hdif/weff;
- RDeff = ns/m*rsh*hdif/weff;
- ADeff = 2*hdif*weff;
- ASeff = 2*hdif*weff;
- PDeff = 4*hdif+2*weff;
- PSeff = 4*hdif+2*weff;
- end else begin
- RSeff = ns/m*rsh*nrs;
- RDeff = ns/m*rsh*nrd;
- ADeff = ad;
- ASeff = as;
- PDeff = pd;
- PSeff = ps;
- end
- if (RDeff < `MIN_R) begin
- RDeff = `MIN_R;
- end
- if (RSeff < `MIN_R) begin
- RSeff = `MIN_R;
- end
-
- ceps = 4*22e-3*22e-3;
- ca = 0.028;
- xsi = ca*(10*leff/lk-1);
- dvrsce = 2*q0/cox_p/`SQR(1+0.5*(xsi+sqrt(xsi*xsi+ceps)));
-
- coxt = m*ns*cox_p*weff*leff;
-
- cbs0 = m*ns*cj*ASeff;
- cbd0 = m*ns*cj*ADeff;
- cbs0sw = m*ns*cjsw*PSeff;
- cbd0sw = m*ns*cjsw*PDeff;
-
- cgso_s = m*ns*cgso*weff;
- cgdo_s = m*ns*cgdo*weff;
- cgbo_s = m*ns*cgbo*leff;
-
- end // temperature independent
-
- `INSTANCE // temperature dependent device initialization
- begin
- if (dtemp > 0.0) begin
- TempK = $temperature + dtemp;
- end else begin
- TempK = $temperature;
- end
-
- TnomK = tnom + 273.15;
-
- Vt = `VT(TempK);
-
- sqrt_A = sqrt(m*weff*ns*leff);
-
- vto_a = MOStype*(vto_p+tcv*(TempK-TnomK))+avto/sqrt_A;
- kp_a = m*kp_p*pow(TempK/TnomK,bex)*(1+akp/sqrt_A);
- gamma_a = gamma_p+agamma/sqrt_A;
- ucrit_a = ucrit_p*pow(TempK/TnomK,ucex);
- phi_a = phi_p*TempK/TnomK-3*Vt*ln(TempK/TnomK)-`EG(TnomK)*TempK/TnomK+`EG(TempK);
- ibb_a = ibb*(1+ibbt*(TempK-TnomK));
-
- vc = ucrit_a*ns*leff;
-
- // eq. 60
- qb0 = gamma_a*sqrt(phi_a);
-
- fact = (`EG(TnomK)/`VT(TnomK)-`EG(TempK)/Vt) * pow(TempK/TnomK,xti);
- `expLin(tmp,fact)
- isat_s = m*ns*(js*ASeff+jsw*PSeff)*tmp;
- isat_d = m*ns*(js*ADeff+jsw*PDeff)*tmp;
-
- if (isat_s>0) begin
- vexp_s = Vt*ln(imax/isat_s+1);
- gexp_s = (imax+isat_s)/Vt;
- end else begin
- vexp_s = -1e9;
- gexp_s = 0;
- end
-
- if (isat_d>0) begin
- vexp_d = Vt*ln(imax/isat_d+1);
- gexp_d = (imax+isat_d)/Vt;
- end else begin
- vexp_d = -1e9;
- gexp_d = 0;
- end
-
- end // temperature dependent
-
-
- begin //Bias-dependent model evaluation
-
- vg = MOStype*V(gb);
- vd = MOStype*V(dpb);
- vs = MOStype*V(spb);
- // $strobe("MOStype %d vg=%e vd=%e vs=%e",MOStype,vg,vd,vs);
-
- if (vd>=vs)
- mode = 1;
- else begin
- mode = -1;
- tmp = vs;
- vs = vd;
- vd = tmp;
- end
-
- // eq. 33
- vgprime = vg-vto_a-dvrsce+phi_a+gamma_a*sqrt(phi_a);
- // eq. 35
- vsprime = 0.5*(vs+phi_a+sqrt(`SQR(vs+phi_a)+16*`SQR(Vt)));
- vdprime = 0.5*(vd+phi_a+sqrt(`SQR(vd+phi_a)+16*`SQR(Vt)));
- // $strobe("vgprime=%e vdprime=%e vsprime=%e",vgprime,vdprime,vsprime);
- // eq. 34
- if (vgprime>=0) begin
- vp0 = vgprime-phi_a-gamma_a*(sqrt(vgprime+0.25*`SQR(gamma_a))-0.5*gamma_a);
- // eq. 36
- gamma0 = gamma_a-`EPSSI/cox_p*(leta/leff*(sqrt(vsprime)+sqrt(vdprime))-3*weta/weff*sqrt(vp0+phi_a));
- end else begin
- vp0 = -phi_a;
- // eq. 36 - skipped sqrt(vp0+phi_a) here, it produces inf on derivative
- gamma0 = gamma_a-`EPSSI/cox_p*(leta/leff*(sqrt(vsprime)+sqrt(vdprime)) );
- end
- // eq. 37
- gammaprime = 0.5*(gamma0+sqrt(`SQR(gamma0)+0.1*Vt));
- // eq. 38
- if (vgprime>=0) begin
- vp = vgprime-phi_a-gammaprime*(sqrt(vgprime+0.25*`SQR(gammaprime))-0.5*gammaprime);
- end else begin
- vp = -phi_a;
- end
- // $strobe("vp0=%e vp=%e gamma0=%e gammaprime=%e",vp0,vp,gamma0,gammaprime);
- // eq. 39
- nslope = 1+gamma_a*0.5/sqrt(vp+phi_a+4*Vt);
-
- // Forward current (43-44)
- fv=(vp-vs)/Vt;
-
- `y_fv(fv,y)
-
- ifwd = y*(1.0 + y);
-
- // eq. 46
- vdss = vc*(sqrt(0.25+Vt/vc*sqrt(ifwd))-0.5);
- // eq. 47
- vdssprime = vc*(sqrt(0.25+Vt/vc*(sqrt(ifwd)-0.75*ln(ifwd)))-0.5)+Vt*(ln(0.5*vc/Vt)-0.6);
- // $strobe("ifwd=%e vdss=%e vdssprime=%e",ifwd,vdss,vdssprime);
- // eq. 48
- dv = 4*Vt*sqrt(lambda*(sqrt(ifwd)-vdss/Vt)+1.0/64);
- // eq. 49
- vds = 0.5*(vd-vs);
- // eq. 50
- vip = sqrt(`SQR(vdss)+`SQR(dv))-sqrt(`SQR(vds-vdss)+`SQR(dv));
- // eq. 52
- dl_a = lambda*lc*ln(1+(vds-vip)/(lc*ucrit_a));
-
- // eq. 53
- lprime = ns*leff-dl_a+(vds+vip)/ucrit_a;
- // eq. 55
- leq = 0.5*(lprime+sqrt(`SQR(lprime)+`SQR(lmin)));
-
- // eq. 56
- fv=(vp-vds-vs-sqrt(`SQR(vdssprime)+`SQR(dv))+sqrt(`SQR(vds-vdssprime)+`SQR(dv)))/Vt;
-
- `y_fv(fv,y)
-
- irprime = y*(1.0 + y);
-
- // eq. 57
- fv=(vp-vd)/Vt;
-
- `y_fv(fv,y)
-
- irev = y*(1.0 + y);
-
- // eq. 58
- beta0 = kp_a*weff/leq;
- // eq. 59
- nau = (5+MOStype)/12.0;
-
- // eq. 69
- nq = 1+0.5*gamma_a/sqrt(vp+phi_a+1e-6);
-
- // eq. 70
- xf = sqrt(0.25+ifwd);
- // eq. 71
- xr = sqrt(0.25+irev);
- // eq. 72
- qd = -nq*(4.0/15*(3*`SQR(xr)*(xr+2*xf)+2*`SQR(xf)*(xf+2*xr))/`SQR(xf+xr)-0.5);
- // eq. 73
- qs = -nq*(4.0/15*(3*`SQR(xf)*(xf+2*xr)+2*`SQR(xr)*(xr+2*xf))/`SQR(xf+xr)-0.5);
- // eq. 74
- qi = qs+qd;
- // eq. 75
- if (vgprime>=0) begin
- qb = (-gamma_a*sqrt(vp+phi_a+1e-6))/Vt-(nq-1)/nq*qi;
- end else begin
- qb = -vgprime/Vt;
- end
- // eq. 76 (qox removed since it is assumed to be zero)
- qg = -qi-qb;
-
- if (e0!=0) begin
- // eq. 61
- beta0prime = beta0*(1+cox_p/(e0*`EPSSI)*qb0);
- // eq. 62
- beta = beta0prime/(1+cox_p/(e0*`EPSSI)*Vt*abs(qb+nau*qi));
- end else begin
- // eq. 63
- vpprime = 0.5*(vp+sqrt(`SQR(vp)+2*`SQR(Vt)));
- // eq. 64
- beta = beta0/(1+theta*vpprime);
- end // else: !if(e0!=0)
- // eq. 65
- is = 2*nslope*beta*`SQR(Vt);
- // $strobe("beta0=%e beta0prime=%e beta=%e e0=%e qb0=%e qb=%e qi=%e",beta0,beta0prime,beta,e0,qb0,qb,qi);
- // eq. 66
- ids = is*(ifwd-irprime);
- // eq. 67
- vib = vd-vs-ibn*2*vdss;
- // eq. 68
- if (vib>0) begin
- `expLin(tmp,(-ibb_a*lc)/vib)
- idb = ids*iba/ibb_a*vib*tmp;
- end else
- idb = 0;
- // $strobe("ids=%e idb=%e",ids,idb);
-
- if (mode>1) begin
- if (isat_s>0) begin
- if (-vs>vexp_s)
- ibsj = imax+gexp_s*(-vs-vexp_s);
- else begin
- `expLin(tmp,-vs/(n*Vt))
- ibsj = isat_s*(tmp-1);
- end
- end else
- ibsj = 0;
-
- if (isat_d>0) begin
- if (-vd>vexp_d)
- ibdj = imax+gexp_d*(-vd-vexp_d);
- else begin
- `expLin(tmp,-vd/(n*Vt))
- ibdj = isat_d*(tmp-1);
- end
- end else
- ibdj = 0;
-
- end else begin // if (mode>1)
- if (isat_s>0) begin
- if (-vd>vexp_s)
- ibsj = imax+gexp_s*(-vd-vexp_s);
- else begin
- `expLin(tmp,-vd/(n*Vt))
- ibsj = isat_s*(tmp-1);
- end
- end else
- ibsj = 0;
-
- if (isat_d>0) begin
- if (-vs>vexp_d)
- ibdj = imax+gexp_d*(-vs-vexp_d);
- else begin
- `expLin(tmp,-vs/(n*Vt))
- ibdj = isat_d*(tmp-1);
- end
- end else
- ibdj = 0;
-
- end // else: !if(mode>1)
-
- qdt = coxt*Vt*qd;
- qst = coxt*Vt*qs;
- qgt = coxt*Vt*qg;
-// qbt = coxt*Vt*qb;
-
- cbs = 0;
- cbd = 0;
- v_bp_dp = MOStype*V(b,dp);
- v_bp_sp = MOStype*V(b,sp);
- if (cbs0>0) begin
- if (v_bp_sp>fc*pb) begin
- cbs = cbs+cbs0/pow(1-fc,mj)*(1+mj*(v_bp_sp-pb*fc))/(pb*(1-fc));
- end else begin
- cbs = cbs+cbs0/pow(1-v_bp_sp,mj);
- end
- end
- if (cbd0>0) begin
- if (v_bp_dp>fc*pb) begin
- cbd = cbd+cbd0/pow(1-fc,mj)*(1+mj*(v_bp_dp-pb*fc))/(pb*(1-fc));
- end else begin
- cbd = cbd+cbd0/pow(1-v_bp_dp,mj);
- end
- end
- if (cbs0sw>0) begin
- if (v_bp_sp>fcsw*pbsw) begin
- cbs = cbs+cbs0sw/pow(1-fcsw,mjsw)*(1+mjsw*(v_bp_sp-pbsw*fcsw))/(pbsw*(1-fcsw));
- end else begin
- cbs = cbs+cbs0sw/pow(1-v_bp_sp,mjsw);
- end
- end
- if (cbd0sw>0) begin
- if (v_bp_dp>fcsw*pbsw) begin
- cbd = cbd+cbd0sw/pow(1-fcsw,mjsw)*(1+mjsw*(v_bp_dp-pbsw*fcsw))/(pbsw*(1-fcsw));
- end else begin
- cbd = cbd+cbd0sw/pow(1-v_bp_dp,mjsw);
- end
- end
-
- end //Bias-dependent model evaluation
-
- begin //Define branch sources
-
- I(dpsp) <+ MOStype*mode*ids;
- I(dpsp) <+ gmin*V(dpsp);
-
- if (mode>0) begin
- I(dpb) <+ MOStype*idb;
- I(dpb) <+ gmin*V(dpb);
-
- qdtx = qdt;
- qstx = qst;
-
- end else begin
- I(spb) <+ MOStype*idb;
- I(spb) <+ gmin*V(spb);
-
- qdtx = qst;
- qstx = qdt;
-
- end // else: !if(mode>0)
-
- I(dpb) <+ MOStype*ddt(qdtx);
- I(spb) <+ MOStype*ddt(qstx);
- I(gb) <+ MOStype*ddt(qgt);
- //$strobe("V(dpb): %e qdtx=%e V(spb): %e qstx=%e V(gb): %e qgt: %e" ,V(dpb),qdtx,V(spb),qstx,V(gb),qgt);
-
- I(b,sp) <+ MOStype*ibsj;
- I(b,dp) <+ MOStype*ibdj;
-
- qjs = cbs * v_bp_sp;
- qjd = cbd * v_bp_dp;
- I(b,sp) <+ MOStype*ddt(qjs);
- I(b,dp) <+ MOStype*ddt(qjd);
- //$strobe("v_bp_sp: %e cbs=%e v_bp_dp: %e cbd=%e" ,v_bp_sp,cbs,v_bp_dp,cbd);
-
- I(gpsp) <+ ddt(cgso_s*V(gpsp));
- I(gpdp) <+ ddt(cgdo_s*V(gpdp));
- I(gb) <+ ddt(cgbo_s*V(gb)) + gmin*V(dpsp);
- //$strobe("V(gpsp): %e cgso_s=%e V(gpdp): %e cgdo_s=%e V(gb): %e cgbo_s: %e" ,V(gpsp),cgso_s,V(gpdp),cgdo_s,V(gb),cgbo_s);
-
- I(ddp) <+ V(ddp)/RDeff;
- I(ssp) <+ V(ssp)/RSeff;
-
- end // begin
-
-// `NOISE begin //Define noise sources
-//
-// end // noise
-
- end //analog
-
-endmodule
diff --git a/src/spicelib/devices/adms/hicum0/admsva/hicum0.va b/src/spicelib/devices/adms/hicum0/admsva/hicum0.va
deleted file mode 100644
index 96b45368a..000000000
--- a/src/spicelib/devices/adms/hicum0/admsva/hicum0.va
+++ /dev/null
@@ -1,1259 +0,0 @@
-/* ******************************************************************************
- **************** COPYRIGHT NOTICE(Originator: Michael Schroter)***************
- ******************************************************************************
-
-The terms under which the HICUM/L0 software is provided are as follows:
-
-Software is distributed as is, completely without warranty or service
-support. Michael Schroter and his team members are not liable for the
-condition or performance of the software.
-
-Michael Schroter owns the copyright and grants users a perpetual,
-irrevocable, worldwide, non-exclusive, royalty-free license with respect
-to the software as set forth below.
-
-Michael Schroter hereby disclaims all implied warranties.
-
-Michael Schroter grants the users the right to modify, copy, and
-redistribute the software and documentation, both within the user's
-organization and externally, subject to the following restrictions.
-
-1. The users agree not to charge for the model owner's code itself but may
- charge for additions, extensions, or support.
-
-2. In any product based on the software, the users agree to acknowledge
- Michael Schroter who developed the model and software. This
- acknowledgment shall appear in the product documentation.
-
-3. Redistributions to others of source code and documentation must retain
- the copyright notice, disclaimer, and list of conditions.
-
-4. Redistributions to others in binary form must reproduce the copyright
- notice, disclaimer, and list of conditions in the documentation
- and/or other materials provided with the distribution
-*/
-
-// HICUM Level_0 Version_1.32: A Verilog-A description
-// (A simplified version of HICUM Level2 model for BJT)
-// ## It is modified after the first version of HICUM/L0 code ##
-
-// Minor code related changes
-// 01/11: Corrected SPICE name for AHQ and ZETAIQF. Implemented a gmin between nodes CI and EI.
-// qj is now limited to positive values to improve convergence a negative bias.
-// Resolved a convergence issue for cc at calculation of voltage dependence of t0.
-// 01/09: Introduction of temporary dc capacitance variable CJE_DC to call the procedure with
-// the AC and DC parameter set and assign an AC and DC result to its output variables
-// 01/09: Ranges of ZE & ZEDC have been modified to a new range (0:1) from the old range (0:1]
-// 12/08: gmin declaration by L. Lemaitre.
-// 12/08: rth has been used instead of rth_t (dynamic variable) in the corresponding if statement
-// 12/08: Macro `QJMODF has been used to compute AC as well as DC charge with corresponding AC and DC variables respectively
-// 11/08: Conditional statement for calculating normalized minority charge to avoid overflow at TFH=0
-// 11/08: Range of AHQ has been modified to a new range [-0.9:10] from the old range [0:10]
-// 03/08: Quick Fix: Default value of TFH has been changed from infinity to zero and modification has been done to
-// the default value limits to [0, inf) to include zero
-// 12/06: Upper limit of FGEO is changed to infinity
-// 06/06: Thermal node "tnode" set as external
-// Flag FLSH introduced for controlling Self-heating calculation
-// all if-else blocks marked with begin-end
-// all series resistors and RTH are allowed to have a minimum value MIN_R
-// 07/06: QCJMOD deleted, QJMODF introduced along with with HICJQ
-// ddx() operator used with QJMOD and QJMODF wherever needed
-// aj is kept at 2.4 except BE depletion charge
-// Substrate transistor transfer current added.
-// Gmin added to (bi,ei) and (bi,ci) branches.
-// hyperbolic smoothing used in rbi computation to avoid devide-by-zero.
-
-// *********************************************************************************
-// 06/06: Comment on NODE COLLAPSING:
-// Presently this verilog code permits a minimum of 1 milli-Ohm resistance for any
-// series resistance as well as for thermal resistance RTH. If any of the resistance
-// values drops below this minimum value, the corresponding nodes are shorted with
-// zero voltage contribution. We want the model compilers/simulators deal this
-// situation in such a manner that the corresponding node is COLLAPSED.
-// We expect that the simulators should permit current contribution statement
-// for any branch with resistance value more than (or equal to) 1 milli-Ohm without
-// any convergence problem. In fact, we wish NOT to have to use a voltage contribution
-// statement in our Verilog code, except as an indication for the model compiler/simulator
-// to interprete a zero branch voltage as NODE-COLLAPSING action.
-// **********************************************************************************
-
-//*****************************************************
-//*****************************************************
-// 08/04:(Modification by Cornelia Thiele)
-// New expression for the normalized hole charge qpt and the model parameter AHQ is inserted
-// The reverse Early-Effect VER is reintroduced
-// A temperature dependent modeling of IQF using the model parameter ZETAIQF is included
-
-//*****************************************************
-//*****************************************************
-// 11/08: Modification done at TUD
-// 3 more parameters VDEDC, ZEDC, AJEDC have been introduced for DC depletion charge
-// Flag FIQF has been introduced to introduce voltage dependence in the base related critical current
-// ZETARTH has been introduced for temperature dependent thermal resistance
-//*****************************************************
-
-//*****************************************************
-//*****************************************************
-// 01/2011: Modification done at TUD
-// Third order polynomial is solved for transfer current. Can be turned on by IT_MOD=1.
-// Added voltage dependent Reverse Early voltage. Parameter aver describes voltage dependence.
-// Parameters ZETAVER, ZETAVGBE, VGBE describes temperature dependence of VER and IQF.
-// Added temperature dependence for IQFH and TFH, ALIQFH and KIQFH is used to model a second order temperature model.
-// Parameter TEF_TEMP=0 turns temperature dependence for TEF0 off.
-//*****************************************************
-
-
-//*****************************************************
-//*****************************************************
-// 11/2012: Modification done at TUD
-// This code contains a Verilog-A implementation of Vertical Non-Quasi-Static(NQS)
-// Effects using adjunct gyrator networks. To turn on this effect please set FLNQS=1.
-//
-// This code contains Operating Point Information to turn-on this section please use the compiler flag CALC_OP.
-//*****************************************************
-
-
-/* *****************************************************
-********************************************************
-12/2015: Modification done at TUD and released as version 1.32
-* Removal of some unrequired variables.
-* Changed the type selection (npn or pnp) accordingly to HICUM/L2
- - supply a single type parameter (+1 -> npn, -1 -> pnp)
- - remove the npn and pnp parameter
-* Parasitic PNP transistor now also takes the device type into account
-* Usage of rth instead of rth_t for power calculation
- - compatible with node collapsing statement
-******************************************************** */
-
-//Default simulator: Spectre
-
-`define PGIVEN(p) $param_given(p)
-`ifdef insideADMS
- `define P(p) (*p*)
- `define INITIAL_MODEL @(initial_model)
-`else
- `define P(p)
- `define INITIAL_MODEL
-`endif
-
-//Spectre
-`include "constants.h"
-`include "discipline.h"
-
-// Comment this line, if calculation of operating point values should be omitted
-`define CALC_OP
-
-// Comment this line, if calculation of noise analysis should be omitted
-//`define CALC_NOISE
-
-`define NPN +1
-`define PNP -1
-
-`define VPT_thresh 1.0e2
-`define EXPLIM 80.0
-`define INF 1.0e6
-`define TMAX 326.85
-`define TMIN -100.00
-`define MIN_R 0.001
-//`define GMIN 1.0e-12
-//`define GMIN $simparam("gmin") //suggested by L.L
-`define GMIN $simparam("gmin",1e-12) //suggested by L.L
-
-`define QCMODF(vj,cj0,vd,z,aj,cjf)\
- if (cj0 > 0.0) begin\
- vf = vd*(1.0-exp(-ln(aj)/z));\
- xvf = (vf-vj)/VT;\
- xvf2 = sqrt(xvf*xvf+1.921812);\
- v_j = vf-VT*(xvf+xvf2)*0.5;\
- dvj = 0.5*(xvf+xvf2)/xvf2;\
- cjf = cj0*exp(-z*ln(1-v_j/vd))*dvj+aj*cj0*(1-dvj);\
- end else begin\
- cjf = 0.0;\
- end
-
-// DEPLETION CHARGE CALCULATION
-// Hyperbolic smoothing used; no punch-through
-`define QJMODF(vj,cj0,vd,z,aj,qjf)\
- if (cj0 > 0.0) begin\
- vf = vd*(1.0-exp(-ln(aj)/z));\
- xvf = (vf-vj)/VT;\
- xvf2 = sqrt(xvf*xvf+1.921812);\
- v_j = vf-VT*(xvf+xvf2)*0.5;\
- x = 1.0-z;\
- y = 1.0-exp(x*ln(1.0-v_j/vd));\
- qjf = cj0*vd*y/x+aj*cj0*(vj-v_j);\
- end else begin\
- qjf = 0.00;\
- end
-
-// Depletion Charge : with punch through
-`define QJMOD(vj,cj0,vd,z,vpt,aj,qjf)\
- if (cj0 > 0.0) begin\
- zr = z/4.0;\
- vp = vpt-vd;\
- vf = vd*(1.0-exp(-ln(aj)/z));\
- cmax = aj*cj0;\
- cr = cj0*exp((z-zr)*ln(vd/vpt));\
- a = VT;\
- ve = (vf-vj)/a;\
- if (ve <= `EXPLIM) begin\
- ex1 = exp(ve);\
- ee1 = 1.0+ex1;\
- vj1 = vf-a*ln(ee1);\
- end else begin\
- vj1 = vj;\
- end\
- a = 0.1*vp+4.0*VT;\
- vr = (vp+vj1)/a;\
- if (vr <= `EXPLIM) begin\
- ex1 = exp(vr);\
- ee1 = 1.0+ex1;\
- vj2 = -vp+a*ln(ee1);\
- end else begin\
- vj2 = vj1;\
- end\
- vj4 = vj-vj1;\
- ez = 1.0-z;\
- ezr = 1.0-zr;\
- vdj1 = ln(1.0-vj1/vd);\
- vdj2 = ln(1.0-vj2/vd);\
- qj1 = cj0*(1.0-exp(vdj2*ez))/ez;\
- qj2 = cr*(1.0-exp(vdj1*ezr))/ezr;\
- qj3 = cr*(1.0-exp(vdj2*ezr))/ezr;\
- qjf = (qj1+qj2-qj3)*vd+cmax*vj4;\
- end else begin\
- qjf = 0.0;\
- end
-
-// DEPLETION CHARGE CALCULATION SELECTOR:
-// Dependent on junction punch-through voltage
-// Important for collector related junctions
-`define HICJQ(vj,cj0,vd,z,vpt,qjf)\
- if (vpt < `VPT_thresh) begin\
- `QJMOD(vj,cj0,vd,z,vpt,2.4,qjf)\
- end else begin\
- `QJMODF(vj,cj0,vd,z,2.4,qjf)\
- end
-
-//Temperature dependence of depletion capacitance parameters
-`define TMPHICJ(cj0,vd,z,vg,cj0_t,vd_t)\
- arg = 0.5*vd/vt0;\
- vdj0 = 2*vt0*ln(exp(arg)-exp(-arg));\
- vdjt = vdj0*qtt0+vg*(1-qtt0)-mg*VT*ln_qtt0;\
- vd_t = vdjt+2*VT*ln(0.5*(1+sqrt(1+4*exp(-vdjt/VT))));\
- cj0_t = cj0*exp(z*ln(vd/vd_t));
-
-//Limiting exponential
-`define LIN_EXP(le, arg)\
- if (arg > 80) begin\
- le = (1 + ((arg) - 80));\
- arg = 80;\
- end else begin\
- le=1;\
- end\
- le = le*limexp(arg);
-
-// conductance not calculated
-// INPUT:
-// IS, IST : saturation currents (model parameter related)
-// UM1 : ideality factor
-// U : branch voltage
-// IMPLICIT INPUT:
-// VT : thermal voltage
-// OUTPUT:
-// Iz : diode current
-`define HICDIO(IS,IST,UM1,U,Iz)\
- DIOY = U/(UM1*VT);\
- if (IS > 0.0) begin\
- if (DIOY > 80) begin\
- le = (1 + ((DIOY) - 80));\
- DIOY = 80;\
- end else begin\
- le = 1;\
- end\
- le = le*limexp(DIOY);\
- Iz = IST*(le-1.0);\
- if (DIOY <= -14.0) begin\
- Iz = -IST;\
- end\
- end else begin\
- Iz = 0.0;\
- end
-
-`define qpt_mod(qpt_mod,qlow)\
- o3 = 1.0/3;\
- p2_a = -2*qj_2;\
- if (iqf == `INF && iqfh == `INF) begin\
- p2_b = 0;\
- end else begin\
- p2_b = -(qlow);\
- end\
- p2_c = -itfi*itfi/ick*tfh_t/iqfh_t;\
- tmp = p2_a*p2_a;\
- p2_p = p2_b-tmp*o3;\
- p2_q = 2*p2_a*tmp/27-p2_a*p2_b*o3+p2_c;\
- p2_D = p2_q*p2_q*0.25+p2_p*p2_p*p2_p/27;\
- if (abs(p2_D) < 1e-10) begin\
- q_p3 = 3*p2_q/p2_p-p2_a*o3;\
- end else if (p2_D > 0) begin\
- tmp2 = -p2_q*0.5;\
- tmp3 = sqrt(p2_D);\
- tmp = tmp2+tmp3;\
- if (tmp > 0) begin\
- p2_u = exp(o3*ln(tmp));\
- end else begin\
- p2_u = -exp(o3*ln(-tmp));\
- end\
- tmp = tmp2-tmp3;\
- if (tmp > 0) begin\
- p2_v = exp(o3*ln(tmp));\
- end else begin\
- p2_v = -exp(o3*ln(-tmp));\
- end\
- q_p3 = (p2_u+p2_v)-p2_a*o3;\
- end else begin\
- tmp = -p2_q*0.5*sqrt(-27.0/(p2_p*p2_p*p2_p));\
- tmp2 = tmp*tmp;\
- if (tmp >= 0) begin\
- tmp = `M_PI/2-atan(sqrt(tmp2/(1-tmp2)));\
- end else begin\
- tmp = `M_PI/2+atan(sqrt(tmp2/(1-tmp2)));\
- end\
- tmp = sqrt(-4*p2_p*o3)*cos(o3*tmp)-p2_a*o3;\
- q_p3 = tmp;\
- end\
- qpt_mod = q_p3;
-
-module hic0_full (c,b,e,s,tnode);
-
-
-//Node definitions
-
- inout c,b,e,s,tnode;
- electrical c `P(info="external collector node");
- electrical b `P(info="external base node");
- electrical e `P(info="external emitter node");
- electrical s `P(info="external substrate node");
- electrical ci `P(info="internal collector node");
- electrical bi `P(info="internal base node");
- electrical ei `P(info="internal emitter node");
- electrical tnode `P(info="local temperature rise node");
-
- electrical xf1,xf2;
- electrical xf; //RC nw
-
-
- //Branch definitions
- branch (ci,c) br_cic_i;
- branch (ci,c) br_cic_v;
- branch (ei,e) br_eie_i;
- branch (ei,e) br_eie_v;
- branch (bi,ei) br_biei;
- branch (bi,ci) br_bici;
- branch (ci,ei) br_ciei;
- branch (b,bi) br_bbi_i;
- branch (b,bi) br_bbi_v;
- branch (b,e) br_be;
- branch (b,ci) br_bci;
- branch (b,s) br_bs;
- branch (s,ci) br_sci;
- branch (tnode ) br_sht;
-
- //Phase network for ITF
- branch (xf1 ) br_bxf1;
- branch (xf1 ) br_cxf1;
- branch (xf2 ) br_bxf2;
- branch (xf2 ) br_cxf2;
-
- //Phase network for QF
-
- branch (xf ) br_bxf; //for RC nw
- branch (xf ) br_cxf; //for RC nw
-
-//
-// Parameter initialization with default values
-
-// Collector current
- parameter real is = 1.0e-16 from [0:1] `P(spice:name="is" info="(Modified) saturation current" m:factor="yes" unit="A");
- parameter integer it_mod = 0 from [0:1] `P(spice:name="it_mod" info="Flag for using third order solution for transfer current");
- parameter real mcf = 1.00 from (0:10] `P(spice:name="mcf" info="Non-ideality coefficient of forward collector current");
- parameter real mcr = 1.00 from (0:10] `P(spice:name="mcr" info="Non-ideality coefficient of reverse collector current");
- parameter real vef = `INF from (0:inf) `P(spice:name="vef" info="forward Early voltage (normalization volt.)" unit="V" default:value="infinity");
- parameter real ver = `INF from (0:inf) `P(spice:name="ver" info="reverse Early voltage (normalization volt.)" unit="V" default:value="infinity");
- parameter real aver = 0.0 from [0:100] `P(spice:name="aver" info="bias dependence for reverse Early voltage");
- parameter real iqf = `INF from (0:inf) `P(spice:name="iqf" info="forward d.c. high-injection toll-off current" unit="A" m:factor="yes" default:value="infinity");
-
- parameter real fiqf = 0.0 from [0:1] `P(spice:name="fiqf" info="flag for turning on base related critical current" default:value="zero");
-
- parameter real iqr = `INF from (0:inf) `P(spice:name="iqr" info="inverse d.c. high-injection roll-off current" unit="A" m:factor="yes" default:value="infinity");
- parameter real iqfh = `INF from (0:inf) `P(spice:name="iqfh" info="high-injection correction current" unit="A" m:factor="yes");
- parameter real tfh = 0.0 from [0:inf) `P(spice:name="tfh" info="high-injection correction factor" test:value="2e-9" m:factor="yes");
- parameter real ahq = 0.0 from [-0.9:inf) `P(spice:name="ahq" info="Smoothing factor for the d.c. injection width");
-
- // Base current
- parameter real ibes = 1e-18 from [0:1] `P(spice:name="ibes" info="BE saturation current" unit="A" m:factor="yes");
- parameter real mbe = 1.0 from (0:10] `P(spice:name="mbe" info="BE non-ideality factor");
- parameter real ires = 0.0 from [0:1] `P(spice:name="ires" info="BE recombination saturation current" test:value="1e-16" unit="A" m:factor="yes");
- parameter real mre = 2.0 from (0:10] `P(spice:name="mre" info="BE recombination non-ideality factor");
- parameter real ibcs = 0.0 from [0:1] `P(spice:name="ibcs" info="BC saturation current" test:value="1e-16" unit="A" m:factor="yes");
- parameter real mbc = 1.0 from (0:10] `P(spice:name="mbc" info="BC non-ideality factor");
-
- // BE depletion cap
- parameter real cje0 = 1.0e-20 from (0:inf) `P(spice:name="cje0" info="Zero-bias BE depletion capacitance" unit="F" test:value="2e-14" m:factor="yes");
- parameter real vde = 0.9 from (0:10] `P(spice:name="vde" info="BE built-in voltage" unit="V");
- parameter real ze = 0.5 from (0:1) `P(spice:name="ze" info="BE exponent factor");
- parameter real aje = 2.5 from [1:inf) `P(spice:name="aje" info="Ratio of maximum to zero-bias value");
- parameter real vdedc = 0.9 from (0:10] `P(spice:name="vdedc" info="BE charge built-in voltage for d.c. transfer current" unit="V");
- parameter real zedc = 0.5 from (0:2) `P(spice:name="zedc" info="charge BE exponent factor for d.c. transfer current");
- parameter real ajedc = 2.5 from [1:inf) `P(spice:name="ajedc" info="BE capacitance ratio Ratio maximum to zero-bias value for d.c. transfer current");
-
- // Transit time
- parameter real t0 = 0.0 from [0:inf) `P(spice:name="t0" info="low current transit time at Vbici=0" test:value="5e-12" unit="s");
- parameter real dt0h = 0.0; // from [0:inf) `P(spice:name="dt0h" info="Base width modulation contribution" test:value="2e-12" unit="s");
- parameter real tbvl = 0.0 from [0:inf) `P(spice:name="tbvl" info="SCR width modulation contribution" test:value="4e-12" unit="s");
- parameter real tef0 = 0.0 from [0:inf) `P(spice:name="tef0" info="Storage time in neutral emitter" test:value="1e-12" unit="s");
- parameter real gte = 1.0 from (0:20] `P(spice:name="gte" info="Exponent factor for emmiter transit time");
- parameter real thcs = 0.0 from [0:inf) `P(spice:name="thcs" info="Saturation time at high current densities" test:value="3e-11" unit="s");
- parameter real ahc = 0.1 from (0:10] `P(spice:name="ahc" info="Smoothing facor for current dependence");
- parameter real tr = 0.0 from [0:inf) `P(spice:name="tr" info="Storage time at inverse operation" unit="s");
-
- // Critical current
- parameter real rci0 = 150 from (0:inf) `P(spice:name="rci0" info="Low-field collector resistance under emitter" test:value="50" unit="Ohm" m:inverse_factor="yes");
- parameter real vlim = 0.5 from (0:10] `P(spice:name="vlim" info="Voltage dividing ohmic and satur.region" unit="V");
- parameter real vpt = 100 from (0:100] `P(spice:name="vpt" info="Punch-through voltage" test:value="10" unit="V" default="infinity");
- parameter real vces = 0.1 from [0:1] `P(spice:name="vces" info="Saturation voltage" unit="V");
-
- // BC depletion cap intern
- parameter real cjci0 = 1.0e-20 from (0:inf) `P(spice:name="cjci0" info="Total zero-bias BC depletion capacitance" test:value="1e-15" unit="F" m:factor="yes");
- parameter real vdci = 0.7 from (0:10] `P(spice:name="vdci" info="BC built-in voltage" test:value="0.7" unit="V");
- parameter real zci = 0.333 from (0:1] `P(spice:name="zci" info="BC exponent factor" test:value="0.4");
- parameter real vptci = 100 from (0:100] `P(spice:name="vptci" info="Punch-through voltage of BC junction" test:value="50" unit="V");
-
- // BC depletion cap extern
- parameter real cjcx0 = 1.0e-20 from [0:inf) `P(spice:name="cjcx0" info="Zero-bias external BC depletion capacitance" unit="F" test:value="1e-15" m:factor="yes");
- parameter real vdcx = 0.7 from (0:10] `P(spice:name="vdcx" info="External BC built-in voltage" unit="V");
- parameter real zcx = 0.333 from (0:1] `P(spice:name="zcx" info="External BC exponent factor");
- parameter real vptcx = 100 from (0:100] `P(spice:name="vptcx" info="Punch-through voltage" unit="V" test:value="5.0" default="infinity");
- parameter real fbc = 1.0 from [0:1] `P(spice:name="fbc" info="Split factor = Cjci0/Cjc0" test:value="0.5");
-
- // Base resistance
- parameter real rbi0 = 0.0 from [0:inf) `P(spice:name="rbi0" info="Internal base resistance at zero-bias" test:value="100" unit="Ohm" m:inverse_factor="yes");
- parameter real vr0e = 2.5 from (0:inf) `P(spice:name="vr0e" info="forward Early voltage (normalization volt.)" unit="V");
- parameter real vr0c = `INF from (0:inf) `P(spice:name="vr0c" info="forward Early voltage (normalization volt.)" unit="V" default="infinity" test:value="25.0");
- parameter real fgeo = 0.656 from [0:inf) `P(spice:name="fgeo" info="Geometry factor" test:value="0.73");
-
- // Series resistances
- parameter real rbx = 0.0 from [0:inf) `P(spice:name="rbx" info="External base series resistance" test:value="8.8" unit="Ohm" m:inverse_factor="yes");
- parameter real rcx = 0.0 from [0:inf) `P(spice:name="rcx" info="Emitter series resistance" test:value="12.5" unit="Ohm" m:inverse_factor="yes");
- parameter real re = 0.0 from [0:inf) `P(spice:name="re" info="External collector series resistance" test:value="9.16" unit="Ohm" m:inverse_factor="yes");
-
- // Substrate transfer current, diode current and cap
- parameter real itss = 0.0 from [0:1.0] `P(spice:name="itss" info="Substrate transistor transfer saturation current" unit="A" test:value="1e-17" m:factor="yes");
- parameter real msf = 1.0 from (0:10] `P(spice:name="msf" info="Substrate transistor transfer current non-ideality factor");
- parameter real iscs = 0.0 from [0:1.0] `P(spice:name="iscs" info="SC saturation current" unit="A" test:value="1e-17" m:factor="yes");
- parameter real msc = 1.0 from (0:10] `P(spice:name="msc" info="SC non-ideality factor");
- parameter real cjs0 = 1.0e-20 from [0:inf) `P(spice:name="cjs0" info="Zero-bias SC depletion capacitance" unit="F" test:value="1e-15" m:factor="yes");
- parameter real vds = 0.3 from (0:10] `P(spice:name="vds" info="SC built-in voltage" unit="V");
- parameter real zs = 0.3 from (0:1] `P(spice:name="zs" info="External SC exponent factor");
- parameter real vpts = 100 from (0:100] `P(spice:name="vpts" info="SC punch-through voltage" unit="V" test:value="5.0" default="infinity");
-
- // Parasitic caps
- parameter real cbcpar = 0.0 from [0:inf) `P(spice:name="cbcpar" info="Collector-base isolation (overlap) capacitance" unit="F" m:factor="yes" test:value="1e-15");
- parameter real cbepar = 0.0 from [0:inf) `P(spice:name="cbepar" info="Emitter-base oxide capacitance" unit="F" m:factor="yes" test:value="2e-15");
-
- // BC avalanche current
- parameter real eavl = 0.0 from [0:inf) `P(spice:name="eavl" info="Exponent factor" test:value="1e-14");
- parameter real kavl = 0.0 from [0:inf) `P(spice:name="kavl" info="Prefactor" test:value="1.19");
-
- // Flicker noise
- parameter real kf = 0.0 from [0:inf) `P(spice:name="kf" info="flicker noise coefficient" unit="M^(1-AF)");
- parameter real af = 2.0 from (0:10] `P(spice:name="af" info="flicker noise exponent factor");
-
- //Non-quasi-static Effect
- parameter real alqf = 0.167 from (0:1] `P(spice:name="alqf" info="Factor for additional delay time of minority charge");
- parameter real alit = 0.333 from (0:1] `P(spice:name="alit" info="Factor for additional delay time of transfer current");
- parameter integer flnqs = 0 from [0:1] `P(spice:name="flnqs" info="Flag for turning on and off of vertical NQS effect");
-
-
- // Temperature dependance
- parameter real vgb = 1.2 from (0:10] `P(spice:name="vgb" info="Bandgap-voltage" unit="V" test:value="1.17");
- parameter real vge = 1.17 from (0:10] `P(spice:name="vge" info="Effective emitter bandgap-voltage" unit="V" test:value="1.07");
- parameter real vgc = 1.17 from (0:10] `P(spice:name="vgc" info="Effective collector bandgap-voltage" unit="V" test:value="1.14");
- parameter real vgs = 1.17 from (0:10] `P(spice:name="vgs" info="Effective substrate bandgap-voltage" unit="V" test:value="1.17");
- parameter real f1vg =-1.02377e-4 `P(spice:name="f1vg" info="Coefficient K1 in T-dependent bandgap equation" unit="V/K");
- parameter real f2vg = 4.3215e-4 `P(spice:name="f2vg" info="Coefficient K2 in T-dependent bandgap equation" unit="V/K");
- parameter real alt0 = 0.0 `P(spice:name="alt0" info="Frist-order TC of tf0" unit="1/K");
- parameter real kt0 = 0.0 `P(spice:name="kt0" info="Second-order TC of tf0" unit="1/K^2");
- parameter real zetact = 3.0 `P(spice:name="zetact" info="Exponent coefficient in transfer current temperature dependence" test:value="3.5");
- parameter real zetabet = 3.5 `P(spice:name="zetabet" info="Exponent coefficient in BE junction current temperature dependence" test:value="4.0");
- parameter real zetaci = 0.0 `P(spice:name="zetaci" info="TC of epi-collector diffusivity" test:value="1.6");
- parameter real alvs = 0.0 `P(spice:name="alvs" info="Relative TC of satur.drift velocity" unit="1/K" test:value="1e-3");
- parameter real alces = 0.0 `P(spice:name="alces" info="Relative TC of vces" unit="1/K" test:value="4e-4");
- parameter real zetarbi = 0.0 `P(spice:name="zetarbi" info="TC of internal base resistance" test:value="0.6");
- parameter real zetarbx = 0.0 `P(spice:name="zetarbx" info="TC of external base resistance" test:value="0.2");
- parameter real zetarcx = 0.0 `P(spice:name="zetarcx" info="TC of external collector resistance" test:value="0.2");
- parameter real zetare = 0.0 `P(spice:name="zetare" info="TC of emitter resistances");
- parameter real zetaiqf = 0.0 `P(spice:name="zetaiqf" info="TC of iqf");
- parameter real alkav = 0.0 `P(spice:name="alkav" info="TC of avalanche prefactor" unit="1/K");
- parameter real aleav = 0.0 `P(spice:name="aleav" info="TC of avalanche exponential factor" unit="1/K");
-
- parameter real zetarth = 0.0 `P(spice:name="zetarth" info="Exponent factor for temperature dependent thermal resistance" test:value="0.0");
-
- parameter integer tef_temp = 1 `P(spice:name="tef_temp" info="Flag for turning temperature dependence of tef0 on and off");
- parameter real zetaver = -1.0 `P(spice:name="zetaver" info="TC of Reverse Early voltage");
- parameter real zetavgbe = 1.0 `P(spice:name="zetavgbe" info="TC of AVER");
- parameter real dvgbe = 0.0 `P(spice:name="dvgbe" info="Bandgap difference between base and BE-junction");
- parameter real aliqfh = 0.0 `P(spice:name="aliqfh" info="Frist-order TC of iqfh" unit="1/K");
- parameter real kiqfh = 0.0 `P(spice:name="kiqfh" info="Second-order TC of iqfh" unit="1/K^2");
-
- // Self-heating
- parameter integer flsh = 0 from [0:2] `P(spice:name="flsh" info="Flag for self-heating calculation" test:value="2");
- parameter real rth = 0.0 from [0:inf) `P(spice:name="rth" info="Thermal resistance" test:value="200.0" unit="K/W" m:inverse_factor="yes");
- parameter real cth = 0.0 from [0:inf) `P(spice:name="cth" info="Thermal capacitance" test:value="0.1" unit="Ws/K" m:factor="yes");
-
- // Transistor type
-
- parameter integer npn = 1 from [0:1] `P(spice:isflag="yes" info="model type flag for npn" );
- parameter integer pnp = 1 from [0:1] `P(info="model type flag for pnp" );
- parameter integer type=(npn==0 ? (pnp==0 ? 0 : 1) : (pnp==0 ? -1 : 0));
-
- //Circuit simulator specific parameters
- parameter real tnom = 27.0 `P(spice:name="tnom" info="Temperature for which parameters are valid" unit="C");
- parameter real dtemp = 0.0 `P(spice:name="dtemp" type="instance" info="Temperature change for particular transistor" unit="K");
-
-// Declaration of the variables: begin
-
- integer HICUMtype;
-
- // QCJMOD
- real zr,vp;
- real cmax,cr,ve;
- real ee1,ez,ezr,vdj1,vdj2,ex1,vr,vj1,vj2,vj4;
- real qj1,qj2,qj3;
-
- //cjtfun *** tnom,VT,mg,vt0, removed: BA
- real vdj0,vdjt;
-
- // temperature and drift
- real VT,Tamb,Tdev,TnomK,dT,qtt0,ln_qtt0;
- real vde_t,vdci_t,vdcx_t,vds_t,vdedc_t;
- real is_t,ires_t,ibes_t,ibcs_t,iqf_t;
- real itss_t,iscs_t,cje0_t,cjci0_t,cjcx0_t, cje0_dc_t, cje0_dc;
- real cjs0_t,rci0_t,vlim_t;
- real vces_t,thcs_t,tef0_t,rbi0_t;
- real rbx_t,rcx_t,re_t,t0_t,eavl_t,kavl_t;
- real aje_t,ajedc_t;
-
- // bc charge and cap
- real qjci `P(ask="yes" info="B-C internal junction charge" unit="C");
- real qjcx,qjcii,cjcii,qjcxi,qjci_int; //cjcx
- real cjci0_t_ii,cjcx0_t_ii,cjcx0_t_i,v_j;
-
- // be junction
- real qjei `P(ask="yes" info="B-E internal junction charge" unit="C");
- real vf,x,y;
-
- // transfer and internal base current
- real cc,qj_2,qj;
- real tf0,ickf,ickr,itfi,itri,qm, qml, qmh;
- real qpt,itf,itr, qpt_l, qpt_h, denom_iqf;
- real b_q;
-
- real it `P(ask="yes" info="Transfer Current" unit="A");
- real it_wop;
- real ibe,ire,ibi;
-
-
- // be diffusion charge
- real qf,qf0,dqfh,dqef;
- real dtef,dtfh,tf,ick;
- real vc,vceff,s3,w,wdc,a,tww, aa, a1, a2;
-
- // bc diffusion charge
- real qr;
-
- // avalanche current source
- real v_bord,a_iavl,lncc;
-
- // base resistance
- real rb,eta,rbi,qje,Qz_nom,fQz;
-
- // substrate transistor, diode and cap
- real qjs,HSa,HSb,HSI_Tsu,HSUM;
-
- // self heating
- real pterm;
- real rth_t;
-
- // new for temperature dependence
- real mg,zetabci,zetasct,zetatef,avs;
- real vgbe,vgbc,vgsc,dvg;
- real xvf,xvf2,dvj,uvc,vt0;
-
- // noise
- real flicker_Pwr,fourkt,twoq;
-
- // LIN_EXP
- real le,arg,le1,arg1,le2,arg2;
-
- //HICDIO
- real DIOY;
-
- // branch voltages
- real Vbci,Vbici,Vbiei,Vciei,Vsci,Veie,Vbbi,Vcic,Vbe,Vrth;
-
- //Output to be seen
- real ijbc `P(ask="yes" info="Base-collector diode current" unit="A");
- real iavl `P(ask="yes" info="Avalanche current" unit="A");
- real ijsc `P(ask="yes" info="Substrate-collector diode current" unit="A");
- real Ibici `P(ask="yes" info="Base-collector diode current minus the avalanche current" unit="A");
- real ijbe `P(ask="yes" info="Base-emitter diode current" unit="A");
-
- real Qbci,Qbe,Qbici,Qbiei;
- real aver_t,vjh,vj_z,h_vbe,ver_t,iqfh_t,tfh_t,ahq_t;
- real p2_a,p2_b,p2_c,p2_p,p2_q,p2_D,p2_u,p2_v,q_p3;
- real tmp,tmp2,tmp3,o3,diff_q;
-
- //NQS
- real Ixf1,Ixf2,Qxf1,Qxf2,Vxf1,Vxf2,Itxf,Qdeix;
- real Vxf, Ixf, Qxf,fact;
-
- real gmin;
-
-// For .OP pt calculation
-`ifdef CALC_OP
- (* desc="Base terminal current", units="A" multiplicity="multiply" *) real IB;
- (* desc="Collector terminal current", units="A" multiplicity="multiply" *) real IC;
- (* desc="Substrate current", units="A" multiplicity="multiply" *) real ISUB;
- (* desc="Avalanche current", units="A" multiplicity="multiply" *) real IAVL;
- (* desc="External BE voltage", units="V" multiplicity="divide" *) real VBE;
- (* desc="External BC voltage", units="V" multiplicity="divide" *) real VBC;
- (* desc="External CE voltage", units="V" multiplicity="divide" *) real VCE;
- (* desc="External SC voltage", units="V" multiplicity="divide" *) real VSC;
- (* desc="Common emitter forward current gain" multiplicity="none" *) real BETADC;
- (* desc="Internal transconductance", units="S" multiplicity="multiply" *) real GMi;
- (* desc="Internal input resistance", units="Ohm" multiplicity="divide" *) real RPIi;
- (* desc="Internal feedback resistance", units="Ohm" multiplicity="divide" *) real RMUi;
- (* desc="Internal Output resistance", units="Ohm" multiplicity="divide" *) real ROi;
- (* desc="Total BE capacitance", units="F" multiplicity="multiply" *) real CPIi;
- (* desc="Total internal BC capacitance", units="F" multiplicity="multiply" *) real CMUi;
- (* desc="Total external BC capacitance", units="F" multiplicity="multiply" *) real CBCX;
- (* desc="CS junction capacitance", units="F" multiplicity="multiply" *) real CCS;
- (* desc="Internal base resistance", units="Ohm" multiplicity="divide" *) real RBi;
- (* desc="Total base resistance", units="Ohm" multiplicity="divide" *) real RB;
- (* desc="External (saturated) collector series resistance", units="Ohm" multiplicity="divide" *) real RCXop;
- (* desc="Emitter series resistance", units="Ohm" multiplicity="divide" *) real REop;
- (* desc="Small signal current gain" multiplicity="none" *) real BETAAC;
- (* desc="Total forward transit time", units="s" multiplicity="none" *) real TF;
- (* desc="Transit frequency", units="Hz" multiplicity="none" *) real FT;
-`endif
-
-
-//Declaration of the variables: end
-
-
-//
-//======================== calculation of the transistor ===================
-//
-
- analog begin
-
- gmin = `GMIN;
-
- `INITIAL_MODEL // Model Initialization
- begin
-
- if (`PGIVEN(npn)) begin
- HICUMtype = `NPN;
- end else if (`PGIVEN(pnp)) begin
- HICUMtype = `PNP;
- end else begin
- HICUMtype = (`PGIVEN(type)) ? type : `NPN;
- end
-
- end
-
-// assign voltages with regard to transistor type
-
- Vbci = HICUMtype*V(br_bci);
- Vbici = HICUMtype*V(br_bici);
- Vbiei = HICUMtype*V(br_biei);
- Vciei = HICUMtype*V(br_ciei);
- Vsci = HICUMtype*V(br_sci);
- Veie = V(br_eie_v);
- Vcic = V(br_cic_v);
- Vbbi = V(br_bbi_v);
- Vbe = HICUMtype*V(br_be);
- Vrth = V(br_sht);
-
-//
-// temperature and resulting parameter drift
-//
-
- TnomK = tnom+273.15;
- Tamb = $temperature;
- Tdev = Tamb+dtemp+Vrth;
-
-// Limit temperature to avoid FPE's in equations
- if (Tdev < `TMIN + 273.15) begin
- Tdev = `TMIN + 273.15;
- end else begin
- if (Tdev > `TMAX + 273.15) begin
- Tdev = `TMAX + 273.15;
- end
- end
-
- vt0 = `P_K*TnomK /`P_Q;
- VT = `P_K*Tdev /`P_Q;
- dT = Tdev-TnomK;
- qtt0 = Tdev/TnomK;
- ln_qtt0 = ln(qtt0);
- avs = alvs*TnomK;
- vgbe = (vgb+vge)/2;
- vgbc = (vgb+vgc)/2;
- vgsc = (vgs+vgc)/2;
- mg = 3-`P_Q*f1vg/`P_K;
- zetabci = mg+1-zetaci;
- zetasct = mg-1.5; //+1-m_upS with m_upS=2.5
- is_t = is*exp(zetact*ln_qtt0+vgb/VT*(qtt0-1));
- ibes_t = ibes*exp(zetabet*ln_qtt0+vge/VT*(qtt0-1));
- ires_t = ires*exp(0.5*mg*ln_qtt0+0.5*vgbe/VT*(qtt0-1));
- ibcs_t = ibcs*exp(zetabci*ln_qtt0+vgc/VT*(qtt0-1));
- itss_t = itss*exp(zetasct*ln_qtt0+vgc/VT*(qtt0-1));
- iscs_t = iscs*exp(zetasct*ln_qtt0+vgs/VT*(qtt0-1));
-
- `TMPHICJ(cje0,vde,ze,vgbe,cje0_t,vde_t)
-
- // `TMPHICJ(cje0,vde,zedc,vgbe,cje0_t,vdedc_t)
-
- cje0_dc = cje0;
-
- `TMPHICJ(cje0_dc,vdedc,zedc,vgbe,cje0_dc_t,vdedc_t) //introducing DC capacitance
-
-
- aje_t = aje*vde_t/vde;
-
- ajedc_t = ajedc*vdedc_t/vdedc;
-
- `TMPHICJ(cjci0,vdci,zci,vgbc,cjci0_t,vdci_t)
- `TMPHICJ(cjcx0,vdcx,zcx,vgbc,cjcx0_t,vdcx_t)
- `TMPHICJ(cjs0,vds,zs,vgsc,cjs0_t,vds_t)
- iqf_t = iqf*exp(zetaiqf*ln_qtt0-dvgbe/VT*(qtt0-1));
- rci0_t = rci0*exp(zetaci*ln_qtt0);
- vlim_t = vlim*exp((zetaci-avs)*ln_qtt0);
- vces_t = vces*(1+alces*dT);
- t0_t = t0*(1+alt0*dT+kt0*dT*dT);
- thcs_t = thcs*exp((zetaci-1)*ln_qtt0);
- zetatef = zetabet-zetact-0.5;
- dvg = vgb-vge;
- if (tef_temp == 1) begin
- tef0_t = tef0*exp(zetatef*ln_qtt0-dvg/VT*(qtt0-1));
- end else begin
- tef0_t = tef0;
- end
- rbx_t = rbx*exp(zetarbx*ln_qtt0);
- rcx_t = rcx*exp(zetarcx*ln_qtt0);
- rbi0_t = rbi0*exp(zetarbi*ln_qtt0);
- re_t = re*exp(zetare*ln_qtt0);
- eavl_t = eavl*exp(aleav*dT);
- kavl_t = kavl*exp(alkav*dT);
-
-
- //Temperature dependence of Thermal resistance
- if (zetarth!=0) begin
- rth_t = rth*exp(zetarth*ln(Tdev/TnomK));
- end else begin
- rth_t=rth;
- end
-
- aver_t = aver*exp(zetaver*ln_qtt0);
- ver_t = ver/exp(dvgbe/VT*(exp(zetavgbe*ln_qtt0)-1));
- iqfh_t = iqfh*(1+aliqfh*dT+kiqfh*dT*dT);
- tfh_t = tfh*(1+aliqfh*dT+kiqfh*dT*dT)*exp((vgb-vge)/VT*(qtt0-1));
- ahq_t = ahq;
-
-//
-// Calculation of intrinsic transistor elements
-//
-
-// BC charge and cap (internal and external)
-
-// The cjcx0 value is used to switch between one (cjcx0=0) and two bc parameter sets
-// 1. For one parameter set only the internal bc set is partitioned by fbc
-// 2. For two independent sets only the external set is partitioned by fbc
-
- if (cjcx0_t > 0.0) begin
- cjci0_t_ii = cjci0_t; // zero bias internal portion
- cjcx0_t_ii = cjcx0_t*fbc;
- `HICJQ(Vbici,cjcx0_t_ii,vdcx_t,zcx,vptcx,qjcxi)
- cjcx0_t_i = cjcx0_t*(1-fbc); // zero bias external portion
- `HICJQ(Vbci,cjcx0_t_i,vdcx_t,zcx,vptcx,qjcx)
- end else begin
- cjci0_t_ii = cjci0_t*fbc; // zero bias internal portion
- qjcxi = 0;
- cjcx0_t_i = cjci0_t*(1-fbc); // zero bias external portion
- `HICJQ(Vbci,cjcx0_t_i,vdci_t,zci,vptci,qjcx)
- end
- `HICJQ(Vbici,cjci0_t_ii,vdci_t,zci,vptci,qjci)
- qjci_int = qjci; // int BC charge without normalization
- qjcii = qjci+qjcxi;
-
-//Internal bc cap without punch through for cc
-
- //`HICJQ(Vbici,cjci0_t_ii,vdci_t,zci,100,qjciii)
- `QCMODF(Vbici,cjci0_t_ii,vdci_t,zci,2.4,cjcii)
- //cjcii = ddx(qjciii,V(bi));
-
-//Internal be cap and charge
-
-// `QJMODF(Vbiei,cje0_dc_t,vde_t,ze,aje_t,qjei)
-// cjei = ddx(qjei,V(bi));
-
-// Critical current: ick
- vc = Vciei-vces_t;
- uvc = vc/VT-1;
- vceff = VT*(1+0.5*(uvc+sqrt(uvc*uvc+1.921812)));
- x = (vceff-vlim_t)/vpt;
- ick = vceff*(1+0.5*(x+sqrt(x*x+1e-3)))/rci0_t/sqrt(1+vceff*vceff/vlim_t/vlim_t);
-
-
-// Normalized BC cap and charge
-
- if (cjcii > 0.0 && cjci0_t_ii > 0.0) begin
-
- cc = cjci0_t_ii/cjcii;
- qjci = qjci/cjci0_t_ii;
-
- end else begin
-
- cc = 1.0;
- qjci = 0;
-
- end
-
- //cc = cjci0_t_ii/cjcii;
- //qjci = qjci/cjci0_t_ii;
-
- `QJMODF(Vbiei,cje0_dc_t,vdedc_t,zedc,ajedc_t,qjei)
-
- if (aver == 0.0) begin
- h_vbe = 1;
- end else begin
- vjh = (vdedc_t-Vbiei)/(2.0*VT);
- vjh = vdedc_t-2.0*VT*(vjh+sqrt(vjh*vjh+1.921812))*0.5;
- vjh = (vjh-VT)/VT;
- vjh = VT*(1.0+(vjh+sqrt(vjh*vjh+1.921812))*0.5);
- vj_z = (1.0-exp(zedc*ln(1.0-vjh/vdedc_t)))*aver_t;
- h_vbe = (exp(vj_z)-1.0)/vj_z;
- end
-
- qje = h_vbe*qjei/cje0_dc_t;
- qj = (1+qjci/vef+qje/ver_t);
-
- b_q = 20*qj-1;
- qj_2=0.025*(1+(b_q +sqrt(b_q*b_q+1.921812))/2);
-
-// Minority charge transit time
- tf0 = t0_t+dt0h*(cc-1)+tbvl*(1/cc-1);
-
- //Determination of base realted critical current
-
- if (fiqf==1)begin
- denom_iqf = fiqf*((tf0/t0_t)-1);
- ickf = iqf_t/(1+denom_iqf);
- end else begin
- ickf = iqf_t;
- end
-
- ickr = iqr;
-
-// Ideal transfer currents
- arg1 = Vbiei/(mcf*VT);
- `LIN_EXP(le1,arg1)
- itfi=is_t*le1;
-
- arg2 = Vbici/(mcr*VT);
- `LIN_EXP(le2,arg2)
- itri=is_t*le2;
-// Normalized minority charge at low currents (w=0) and high currents (w=1)
-
- if (tfh!=0)begin
- qml = itfi/ickf+itri/ickr+exp((0.6666)*ln(itfi*(itfi/ick)*((tfh_t)/iqfh_t)));
- qmh = itfi/ickf+itri/ickr+itfi/iqfh_t+exp((0.6666)*ln(itfi*(itfi/ick)*((tfh_t)/iqfh_t)));
- end else begin
- qml = itfi/ickf+itri/ickr;
- qmh = itfi/ickf+itri/ickr+itfi/iqfh_t;
- end
- qpt_l= qj_2+sqrt((qj_2)*(qj_2)+qml);
- qpt_h= qj_2+sqrt((qj_2)*(qj_2)+qmh);
-
-// Calculation of the injection width
- diff_q = qmh-qml;
- if (abs(diff_q)>1e-8) begin
- a1= 1-ick/(1+ahq_t)/itfi*qpt_l;
- a2= 1+ick/(1+ahq_t)/itfi*(qpt_h-qpt_l);
- aa= a1/a2;
-
- wdc= (sqrt(aa*aa+0.01)+aa)/(1+sqrt(1+0.01));
- end else begin
- wdc = 0;
- end
-
-// Normalized minority charge
-
- if (it_mod == 0) begin
- if (tfh!=0) begin
- qm = itfi/ickf+itri/ickr+itfi/iqfh_t*wdc*wdc+exp((0.6666)*ln(itfi*(itfi/ick)*((tfh_t)/iqfh_t)));
- end else begin
- qm = itfi/ickf+itri/ickr+itfi/iqfh_t*wdc*wdc;
- end
- // Normalized total hole charge
- qpt = qj_2+sqrt((qj_2)*(qj_2)+qm);
- end else begin
- `qpt_mod(qpt,itfi/ickf+itri/ickr+itfi/iqfh_t*wdc*wdc)
- end
- if (qpt<=1e-20) begin
- qpt=1e-20;
- end
-
- itf = itfi/qpt;
- itr = itri/qpt;
-
- // Transfer current
-
- if (itf<=1e-20) begin
- itf = 1e-20;
- end
- it = itf-itr;
-
-// BE diffusion charge
-
-// Calculation of low-current portion
- qf0 = tf0*itf;
-
-// Current dependent component
- a = 1-ick/itf;
- s3 = sqrt(a*a+ahc);
- w = (a+s3)/(1+sqrt(1+ahc));
- tww = thcs_t*w*w;
- dqfh = tww*itf;
- dtfh = tww*(1+2*ick/itf/s3);
-
-// Emitter component
- dtef = tef0_t*exp(gte*ln(itf/ick));
- dqef = dtef*itf/(gte+1.0);
-
-// Total minority charge and transit time
- qf = qf0+dqef+dqfh;
- tf = tf0+dtfh+dtef;
-
-// BC diffusion charge
- qr = tr*itr;
-
-// Internal base current
-
-// BE diode
- `HICDIO(ibes,ibes_t,mbe,Vbiei,ibe)
- `HICDIO(ires,ires_t,mre,Vbiei,ire)
- ijbe = ibe+ire;
-
-// BC diode
- `HICDIO(ibcs,ibcs_t,mbc,Vbici,ijbc)
-
-// Total base current
- ibi = ijbe+ijbc;
-
-// Avalanche current
-
- if (Vbici < 0) begin : HICAVL
- v_bord = eavl_t*vdci_t;
- if (vdci_t-Vbici>v_bord) begin
- a_iavl = kavl_t/vdci_t*exp(-cc);
- iavl = itf*a_iavl*(v_bord+(1+cc)*(vdci_t-Vbici-v_bord));
- end else begin
- lncc = ln(1/cc);
- iavl = kavl_t*itf*exp(-1/zci*lncc-eavl_t*exp((1/zci-1)*lncc));
- end
- end else begin
- iavl = 0;
- end
-
-//
-// Additional elements for external transistor
-//
- `QJMODF(Vbiei,cje0_t,vde_t,ze,aje_t,qjei) // Computation of AC charge for base resistance calculation
- qje = qjei/cje0_t;
-
-// Base resistance
- if (rbi0_t > 0.0) begin : HICRBI
- // Conductivity modulation with hyperbolic smoothing
-
- Qz_nom = 1+qje/vr0e+qjci/vr0c+itf/ickf+itr/ickr;
- fQz = 0.5*(Qz_nom+sqrt(Qz_nom*Qz_nom+0.01));
- rbi = rbi0_t/fQz;
-
- //rbi= rbi0_t*(1+0.2)/(0.2+qpt);
- // Emitter current crowding
- if (ibi > 0.0) begin
- eta = fgeo*rbi*ibi/VT;
- if (eta < 1e-6) begin
- rbi = rbi*(1-0.5*eta);
- end else begin
- rbi = rbi*ln(eta+1)/eta;
- end
- end
- end else begin
- rbi = 0.0;
- end
- // Total base resistance
- //rbi= rbi0_t;
- rb = rbi+rbx_t;
-
-// Parasitic substrate transistor transfer current
- if (itss > 0.0) begin : Sub_Transfer
- HSUM = msf*VT;
- HSa = limexp(Vbci/HSUM);
- HSb = limexp(Vsci/HSUM);
- HSI_Tsu = itss_t*(HSa-HSb);
- end else begin
- HSI_Tsu = 0.0;
- end
-
-// Substrate diode and cap and charge
-
- `HICDIO(iscs,iscs_t,msc,Vsci,ijsc)
-
- `HICJQ(Vsci,cjs0_t,vds_t,zs,vpts,qjs)
-
-// Self heating
-
- pterm = 0;
-
- if (flsh == 1 && rth >= `MIN_R) begin
- pterm = it*Vciei+iavl*(vdci_t-Vbici);
- end else if (flsh == 2 && rth >= `MIN_R) begin
- pterm = Vciei*it + (vdci_t-Vbici)*iavl + ijbe*Vbiei + ijbc*Vbici + ijsc*Vsci;
- if (rb >= `MIN_R) begin
- pterm = pterm + Vbbi*Vbbi/rb;
- end
- if (re >= `MIN_R) begin
- pterm = pterm + Veie*Veie/re_t;
- end
- if (rcx >= `MIN_R) begin
- pterm = pterm + Vcic*Vcic/rcx_t;
- end
- end
-
- Itxf = itf;
- Qdeix = qf;
- // Excess Phase calculation
-
- if (flnqs != 0 && tf != 0) begin
- Vxf1 = V(br_bxf1);
- Vxf2 = V(br_bxf2);
-
- Ixf1 = (Vxf2-itf)/tf*t0;
- Ixf2 = (Vxf2-Vxf1)/tf*t0;
- Qxf1 = alit*Vxf1*t0;
- Qxf2 = alit*Vxf2/3*t0;
- Itxf = Vxf2;
-
- Vxf = V(br_bxf);
- fact = t0/tf;
- Ixf = (Vxf - qf)*fact;
- Qxf = alqf*Vxf*t0;
- Qdeix = Vxf;
- end else begin
- Ixf1 = V(br_bxf1);
- Ixf2 = V(br_bxf2);
- Qxf1 = 0;
- Qxf2 = 0;
-
- Ixf = V(br_bxf);
- Qxf = 0;
- end
-
-
-//
-// Compute branch sources
-//
-
- Ibici = ijbc - iavl;
-
- Qbci = cbcpar*Vbci;
- Qbe = cbepar*Vbe;
- Qbici = qjcii+qr;
- //Qbiei = qjei+qf;
- Qbiei = qjei+Qdeix;
-
- ijsc = HICUMtype*ijsc;
- qjs = HICUMtype*qjs;
- qjcx = HICUMtype*qjcx;
- Qbci = HICUMtype*Qbci;
- Qbe = HICUMtype*Qbe;
-
- Ibici = HICUMtype*Ibici;
- Qbici = HICUMtype*Qbici;
- ijbe = HICUMtype*ijbe;
- Qbiei = HICUMtype*Qbiei;
- it_wop = HICUMtype*it; // 'it' without excess phase
- it = HICUMtype*(Itxf-itr); // 'it' with excess phase
- iavl = HICUMtype*iavl;
-//
-// Define branch sources
-//
- I(br_biei) <+ gmin*V(br_biei);
- I(br_bici) <+ gmin*V(br_bici);
- I(br_ciei) <+ gmin*V(br_ciei);
-
- I(br_bs) <+ HICUMtype*HSI_Tsu;
- I(br_sci) <+ ijsc + gmin*V(br_sci);//`P(spectre:gmin="add" spectre:pwl_passive="1e10");
- I(br_sci) <+ ddt(qjs);
- I(br_bci) <+ ddt(qjcx);
- I(br_bci) <+ ddt(Qbci);
- I(br_be) <+ ddt(Qbe);
- if (re >= `MIN_R) begin
- I(br_eie_i) <+ Veie/re_t; //`P(spectre:gmin="add");
- end else begin
- I(br_eie_i) <+ Veie/`MIN_R; //`P(spectre:gmin="add");
- end
- if (rcx >= `MIN_R) begin
- I(br_cic_i) <+ Vcic/rcx_t; //`P(spectre:gmin="add");
- end else begin
- I(br_cic_i) <+ Vcic/`MIN_R; //`P(spectre:gmin="add");
- end
- if (rbi0 >= `MIN_R || rbx >= `MIN_R) begin
- I(br_bbi_i) <+ Vbbi/rb + gmin*Vbbi; //`P(spectre:gmin="add");
- end else begin
- I(br_bbi_i) <+ Vbbi/`MIN_R; //`P(spectre:gmin="add");
- end
- I(br_bici) <+ Ibici; //`P(spectre:gmin="add" spectre:pwl_sat_current="IMAX" spectre:pwl_sat_cond="imax/0.025" spectre:pwl_rev_current="imax" spectre:pwl_rev_cond="IMAX/0.025");
- I(br_bici) <+ ddt(Qbici);
- I(br_biei) <+ ijbe; //`P(spectre:gmin="add" spectre:pwl_fwd_current="IBEIS*exp(25.0)" spectre:pwl_fwd_node="bi" spectre:pwl_fwd_cond="IBEIS*exp(25.0)/0.025" spectre:pwl_sat_current="IMAX" spectre:pwl_sat_cond="IMAX/0.025" spectre:pwl_passive="1e10");
- I(br_biei) <+ ddt(Qbiei);
- I(br_ciei) <+ it; //`P(spectre:pwl_fwd_current="IS*exp(25.0)" spectre:pwl_fwd_node="bi" spectre:pwl_fwd_cond="IS*exp(25.0)/0.025" spectre:pwl_rev_current="IMAX" spectre:pwl_rev_cond="IMAX/0.025" spectre:pwl_passive="1e10");
- //I(br_ciei) <+ Itxf;
-
- // Following code is an intermediate solution:
- // ******************************************
- if (flsh == 0 || rth < `MIN_R) begin
- I(br_sht) <+ Vrth/`MIN_R;
- end else begin
- I(br_sht) <+ Vrth/rth_t-pterm; //`P(spectre:gmin="add");
- I(br_sht) <+ ddt(cth*Vrth);
- end
- // ******************************************
- // For simulators having no problem with V(br_sht) <+ 0.0
- // with external thermal node, follwing code may be used.
- // This external thermal node should remain accessible.
- // ********************************************
- //if (flsh == 0 || rth < `MIN_R) begin
- // V(br_sht) <+ 0.0;
- //end else begin
- // I(br_sht) <+ Vrth/rth_t-pterm ; //`P(spectre:gmin="add");
- // I(br_sht) <+ ddt(cth*Vrth);
- //
- //end
- // ********************************************
-
- // NQS effect
- I(br_bxf1) <+ Ixf1;
- I(br_cxf1) <+ ddt(Qxf1);
- I(br_bxf2) <+ Ixf2;
- I(br_cxf2) <+ ddt(Qxf2);
-
- I(br_bxf) <+ Ixf;
- I(br_cxf) <+ ddt(Qxf);
-
-
-`ifdef CALC_NOISE
-// Noise sources
-// Thermal noise
- fourkt = 4.0 * `P_K * Tdev;
- if (rbx >= `MIN_R || rbi0 >= `MIN_R) begin
- I(br_bbi_i) <+ white_noise(fourkt/rb, "rb thermal");
- end
- if (rcx >= `MIN_R) begin
- I(br_cic_i) <+ white_noise(fourkt/rcx_t, "rcx thermal");
- end
- if (re >= `MIN_R) begin
- I(br_eie_i) <+ white_noise(fourkt/re_t, "re thermal");
- end
-
-// Shot noise
- twoq = 2.0 * `P_Q;
- I(br_biei) <+ white_noise(twoq*ijbe, "ijbe shot");
- I(br_ciei) <+ white_noise(twoq*it, "it shot");
-
-// Flicker noise
- flicker_Pwr = kf*pow(ijbe,af);
- I(br_biei) <+ flicker_noise(flicker_Pwr,1.0, "ib flicker");
-`endif
-
-
-`ifdef CALC_OP
-// if (analysis("static")) begin : OP_calculation
- begin : OP_calculation
- real oRPIi, oRMUi, oROi, gAVL;
- real Cdei, Cdci, Cjei, Cjci, Cjcx, CBC;
- real R_tot;
-
-// IB = I();
-// IC = I();
-// ISUB = I();
- IB = ibe;
- IC = it;
- ISUB = ijsc;
- IAVL = iavl;
-
- VBE = V(b,e);
- VBC = V(b,c);
- VCE = V(c,e);
- VSC = V(s,c);
-
-// GMi = ddx(it_wop,V(bi));
- GMi = ddx(it,V(bi));
-
- oRPIi = ddx(ijbe,V(bi));
- RPIi = 1.0/(oRPIi+1e-12);
-
- oRMUi = -1*ddx(Ibici,V(ci));
- RMUi = 1.0/(oRMUi+1e-12);
-
- gAVL = HICUMtype*ddx(iavl,V(ci));
- oROi = ddx(it_wop,V(ci));
- ROi = 1.0/(oROi+gAVL+1e-12);
-
- Cdei = -1*HICUMtype*ddx(qf,V(ei));
- Cjei = ddx(qjei,V(bi));
- CPIi = Cjei + Cdei + cbepar;
-
- Cdci = -1*HICUMtype*ddx(qr,V(ci));
- Cjci = ddx(qjci_int,V(bi));
- CMUi = Cjci + Cdci;
-
- Cjcx = -1*ddx(qjcxi,V(ci));
- CBCX = Cjcx + cbcpar ;
-
- CCS = ddx(qjs,V(s));
-
- RBi = rbi;
- RB = rb;
- RCXop = rcx_t;
- REop = re_t;
-
- BETADC = IC/IB;
- BETAAC = GMi*RPIi;
-
- R_tot = RCXop + REop + ((RB+REop)/BETAAC);
-
- TF = tf;
-
- CBC = CMUi+CBCX;
- FT = GMi/(2*`M_PI*(CPIi+CBC+(R_tot*CBC*GMi)));
- end
-`endif
-
-
- end // analog
-endmodule
diff --git a/src/spicelib/devices/adms/mextram/admsva/IP_NOTICE_DISCLAIMER_LICENSE b/src/spicelib/devices/adms/mextram/admsva/IP_NOTICE_DISCLAIMER_LICENSE
deleted file mode 100644
index 60ba5752b..000000000
--- a/src/spicelib/devices/adms/mextram/admsva/IP_NOTICE_DISCLAIMER_LICENSE
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright (c) 2000-2007, NXP Semiconductors
-// Copyright (c) 2007-2014, Delft University of Technology
-// Copyright (c) 2015, Auburn University
-
-INTELLECTUAL PROPERTY NOTICE, DISCLAIMER AND LICENSE
-
-The Mextram model and documentation presented at this website,
-denoted as the Model,
-has been developed by NXP Semiconductors until 2007,
-Delft University of Technology from 2007 to 2014,
-and Auburn University since April 2015.
-
-The Model is distributed as is, completely without any expressed
-or implied warranty or service support.
-NXP Semiconductors, Delft University of Technology,
-Auburn University and their employees are not liable for
-the condition or performance of the Model.
-
-NXP Semiconductors, Delft University of Technology,
-Auburn University own
-the copyright and grant users a perpetual,
-irrevocable, worldwide, non-exclusive, royalty-free
-license with respect to the Model as set forth below.
-
-NXP Semiconductors, Delft University of Technology, Auburn University
-hereby disclaim all implied warranties.
-
-NXP Semiconductors, Delft University of Technology, Auburn University
-grant the users the right to modify, copy, and
-redistribute the Model and documentation,
-both within the user's organization and externally,
-subject to the following restrictions
-
-1. The users agree not to charge for the code
-itself but may charge for additions, extensions, or support.
-
-2. In any product based on the Model, the users agree to acknowledge
-NXP Semiconductors, Delft University of Technology, Auburn University
-that developed the Model. This acknowledgment
-shall appear in the product documentation.
-
-3. The users agree to obey all restrictions governing redistribution
-or export of the Model.
-
-4. The users agree to reproduce any copyright notice which appears
-on the Model on any copy or modification of such made available
-to others.
-
diff --git a/src/spicelib/devices/adms/mextram/admsva/bjt504t.va b/src/spicelib/devices/adms/mextram/admsva/bjt504t.va
deleted file mode 100644
index d5d1c36b7..000000000
--- a/src/spicelib/devices/adms/mextram/admsva/bjt504t.va
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright (c) 2000-2007, NXP Semiconductor
-// Copyright (c) 2007-2014, Delft University of Technology
-// Copyright (c) 2015, Auburn University
-// All rights reserved, see IP_NOTICE_DISCLAIMER_LICENSE for further information.
-
-`include "frontdef.inc"
-`define SELFHEATING
-`define SUBSTRATE
-
-module bjt504tva (c, b, e, s, dt);
-
-// External ports
-inout c, b, e, s, dt;
-
-electrical c `P(desc="external collector node");
-electrical b `P(desc="external base node");
-electrical e `P(desc="external emitter node");
-electrical s `P(desc="external substrate node");
-electrical dt `P(desc="external thermal node");
-
-// Internal nodes
-electrical c1 `P(desc="internal collector node 1");
-electrical e1 `P(desc="internal emitter node");
-electrical b1 `P(desc="internal base node 1");
-electrical b2 `P(desc="internal base node 2");
-electrical c2 `P(desc="internal collector node 2");
-electrical c3 `P(desc="internal collector node 3");
-electrical c4 `P(desc="internal collector node 4");
-// For correlated noise implementation
-electrical noi `P(desc="internal noise node");
-
-`include "parameters.inc"
-`include "variables.inc"
-`include "opvars.inc"
-
-analog begin
-`include "initialize.inc"
-`include "tscaling.inc"
-`include "evaluate.inc"
-`include "noise.inc"
-`include "opinfo.inc"
-
-// The following can be used to print OP-info to std out:
-// `include "op_print.inc"
-
-end // analog
-endmodule
diff --git a/src/spicelib/devices/adms/mextram/admsva/evaluate.inc b/src/spicelib/devices/adms/mextram/admsva/evaluate.inc
deleted file mode 100644
index 95f9ebd05..000000000
--- a/src/spicelib/devices/adms/mextram/admsva/evaluate.inc
+++ /dev/null
@@ -1,636 +0,0 @@
-// Copyright (c) 2000-2007, NXP Semiconductor
-// Copyright (c) 2007-2014, Delft University of Technology
-// Copyright (c) 2015, Auburn University
-// All rights reserved, see IP_NOTICE_DISCLAIMER_LICENSE for further information.
-
-// Evaluate model equations
-
-begin // Currents and charges
- // Nodal biases
-
- Vb2c1 = TYPE * V(b2, c1);
- Vb2c2 = TYPE * V(b2, c2);
- Vb2e1 = TYPE * V(b2, e1);
- Vb1e1 = TYPE * V(b1, e1);
- Vb1b2 = TYPE * V(b1, b2);
-`ifdef SUBSTRATE
- Vsc1 = TYPE * V(s, c1);
-`endif
- Vc1c2 = TYPE * V(c1, c2);
- Vee1 = TYPE * V(e, e1);
- Vbb1 = TYPE * V(b, b1);
- Vbe = TYPE * V(b, e);
- Vbc = TYPE * V(b, c);
-
- /* RvdT, 03-12-2007, voltage differences
- associated with distributed parasitic collector.
- Evaluated taking values of resistances into account:
- in case of vanishing resistance corresponding node
- is not addressed: */
-
- if (RCBLX > 0.0)
- begin
- if (RCBLI > 0.0)
- begin
- Vc4c1 = TYPE * V(c4, c1);
- Vc3c4 = TYPE * V(c3, c4);
- end
- else
- begin
- Vc4c1 = 0 ;
- Vc3c4 = TYPE * V(c3, c1);
- end
- end
- else
- begin
- if (RCBLI > 0.0)
- begin
- Vc4c1 = TYPE * V(c4, c1);
- Vc3c4 = 0 ;
- end
- else
- begin
- Vc4c1 = 0 ;
- Vc3c4 = 0 ;
- end
- end
-
- Vb1c4 = Vb1b2 + Vb2c2 - Vc1c2 - Vc4c1 ;
- Vcc3 = - Vbc + Vbb1 + Vb1c4 - Vc3c4 ;
- Vbc3 = Vbc + Vcc3 ;
-
-`ifdef SUBSTRATE
- Vsc4 = Vsc1 - Vc4c1 ;
- Vsc3 = Vsc4 - Vc3c4 ;
-`endif
-
-
- // Exponential bias terms
-
- `expLin(eVb2c2,Vb2c2 * VtINV)
- `expLin(eVb2e1,Vb2e1 * VtINV)
- `expLin(eVb1e1,Vb1e1 * VtINV)
- `expLin(eVb1c4,Vb1c4 * VtINV)
- `expLin(eVb1b2,Vb1b2 * VtINV)
- `expLin(eVbc3,Vbc3 * VtINV)
-`ifdef SUBSTRATE
- `expLin(eVsc1,Vsc1 * VtINV)
- // RvdT MXT504.10, new: eVsc3, eVsc4
- `expLin(eVsc3,Vsc3 * VtINV)
- `expLin(eVsc4,Vsc4 * VtINV)
-`endif
-
- `expLin(eVbc3VDC,(Vbc3 - VDC_T) * VtINV)
- `expLin(eVb1c4VDC,(Vb1c4 - VDC_T) * VtINV)
- `expLin(eVb2c2VDC,(Vb2c2 - VDC_T) * VtINV)
- `expLin(eVb2c1VDC,(Vb2c1 - VDC_T) * VtINV)
-
- // Governing equations
-
- // Epilayer model
-
- K0 = sqrt(1.0 + 4.0 * eVb2c2VDC);
- Kw = sqrt(1.0 + 4.0 * eVb2c1VDC);
- pW = 2.0 * eVb2c1VDC / (1.0 + Kw);
- // if (pW < `TEN_M40) pW = 0;
- Ec = Vt * (K0 - Kw - ln((K0 + 1.0) / (Kw + 1.0)) );
- Ic1c2 = (Ec + Vc1c2) / RCV_TM;
-
- if (Ic1c2 > 0.0) begin
-
- `linLog(tmpV,Vb2c1,100.0);
- Vqs_th = VDC_T + 2.0 * Vt *
- ln(0.5 * Ic1c2 * RCV_TM * VtINV + 1.0) - tmpV;
- eps_VDC = 0.2 * VDC_T;
- `max_hyp0(Vqs, Vqs_th, eps_VDC);
- Iqs = Vqs * (Vqs + IHC_M * SCRCV_M) / (SCRCV_M * (Vqs + IHC_M * RCV_TM));
-
- Ic1c2_Iqs = Ic1c2 / Iqs;
- `max_logexp(alpha1, Ic1c2_Iqs, 1.0, AXI);
- alpha = alpha1 / (1.0 + AXI * ln(1.0 + exp(-1.0 / AXI)));
- vyi = Vqs / (IHC_M * SCRCV_M);
- yi = (1.0 + sqrt(1.0 + 4.0 * alpha * vyi * (1.0 + vyi))) /
- (2.0 * alpha * (1.0 + vyi));
-
- //xi_w = 1.0 - yi / (1.0 + pW * yi);
- // Niu 5/23/2015, fixes numerical discontinuity at forward/reverse transition, see "Epi layer model improvement of smoothness at I=0"
- xi_w = (1.0 - yi + pW * yi) / (1.0 + pW * yi);
- gp0 = 0.5 * Ic1c2 * RCV_TM * xi_w * VtINV;
-
- gp0_help = 2.0 * gp0 + pW * (pW + gp0 + 1.0);
- gp02 = 0.5 * (gp0 - 1.0);
- sqr_arg = gp02 * gp02 + gp0_help;
- if (gp0 >= 1.0)
- p0star = gp02 + sqrt(sqr_arg);
- else
- p0star = gp0_help / (sqrt(sqr_arg) - gp02);
- // if (p0star < `TEN_M40) p0star = 0.0;
-
-
- eVb2c2star = p0star * (p0star + 1.0) * exp(VDC_T * VtINV);
- B1 = 0.5 * SCRCV_M * (Ic1c2 - IHC_M);
- B2 = SCRCV_M * RCV_TM * IHC_M * Ic1c2;
- Vxi0 = B1 + sqrt(B1 * B1 + B2);
- Vch = VDC_T * (0.1 + 2.0 * Ic1c2 / (Ic1c2 + Iqs));
- Icap = IHC_M * Ic1c2 / (IHC_M + Ic1c2);
- Icap_IHC = IHC_M / (IHC_M + Ic1c2);
-
- end else begin
-
- Iqs = 0.0 ;
- p0star = 2.0 * eVb2c2VDC / (1.0 + K0);
- eVb2c2star = eVb2c2;
- if ((abs(Vc1c2) < 1.0e-5 * Vt) ||
- (abs(Ec) < `TEN_M40 * Vt * (K0 + Kw)))
- begin
- pav = 0.5 * (p0star + pW);
- xi_w = pav / (pav + 1.0);
- end
- else
- begin
- xi_w = Ec / (Ec + Vb2c2 - Vb2c1);
- end
-
- Vxi0 = Vc1c2;
- Vch = 0.1 * VDC_T;
- Icap = Ic1c2;
- Icap_IHC = 1.0 - Icap / IHC_M;
-
- end
-
- // Effective emitter junction capacitance bias
-
- Vfe = VDE_T * (1.0 - pow(`AJE , -1.0 / PE));
- a_VDE = 0.1 * VDE_T;
- `min_logexp(Vje, Vb2e1, Vfe, a_VDE);
-
- // RvdT, November 2008, E0BE to be re-used in EB- Zener tunnel model:
- E0BE = pow(1.0 - Vje * inv_VDE_T, 1.0 - PE) ;
- Vte = VDE_T / (1.0 - PE) * (1.0 - E0BE) +
- `AJE * (Vb2e1 - Vje);
-
- // Effective collector junction capacitance bias
-
- Vjunc = Vb2c1 + Vxi0;
- bjc = (`AJC - XP_T) / (1.0 - XP_T);
- Vfc = VDC_T * (1.0 - pow(bjc, -1.0 / PC));
- `min_logexp(Vjc, Vjunc, Vfc, Vch);
- fI = pow(Icap_IHC, MC);
- Vcv = VDC_T / (1.0 - PC) * (1.0 - fI * pow(1.0 - Vjc / VDC_T, 1.0 - PC)) +
- fI * bjc * (Vjunc - Vjc);
- Vtc = (1.0 - XP_T) * Vcv + XP_T * Vb2c1;
-
- // Transfer current
-
- If0 = 4.0 * IS_TM / IK_TM;
- f1 = If0 * eVb2e1;
- n0 = f1 / (1.0 + sqrt(1.0 + f1));
- f2 = If0 * eVb2c2star;
- nB = f2 / (1.0 + sqrt(1.0 + f2));
-
- if (DEG == 0.0)
- q0I = 1.0 + Vte / VER_T + Vtc / VEF_T;
- else
- begin
- termE = (Vte / VER_T + 1.0) * DEG_T * VtINV;
- termC = -Vtc / VEF_T * DEG_T * VtINV;
- q0I = (exp(termE) - exp(termC)) /
- (exp(DEG_T * VtINV) - 1.0);
- end
-
- `max_hyp0(q1I, q0I, 0.1);
- qBI = q1I * (1.0 + 0.5 * (n0 + nB));
-
- Ir = IS_TM * eVb2c2star;
- If = IS_TM * eVb2e1;
- In = (If - Ir) / qBI;
-
- // Base and substrate current(s)
-
- Ibf0 = IS_TM / BF_T;
- if (XREC == 0.0)
- Ib1 = (1.0 - XIBI) * Ibf0 * (eVb2e1 - 1.0);
- else
- Ib1 = (1.0 - XIBI) * Ibf0 * ((1.0 - XREC) * (eVb2e1 - 1.0) +
- XREC * (eVb2e1 + eVb2c2star - 2.0) * (1.0 + Vtc / VEF_T));
-
- Ib1_s = XIBI * Ibf0 * (eVb1e1 - 1.0);
- `expLin(tmpExp,Vb2e1 * VtINV / MLF)
- Ib2 = IBF_TM * (tmpExp - 1.0) + my_gmin * Vb2e1;
- `expLin(tmpExp,0.5 * Vb1c4 * VtINV)
- Ib3 = IBR_TM * (eVb1c4 - 1.0) /
- (tmpExp + exp(0.5 * VLR * VtINV)) +
- my_gmin * Vb1c4;
-
- // begin RvdT, November 2008, MXT504.8_alpha
-
- // Base-emitter tunneling current
- // max E-field E0BE calculated in BE depletion charge model:
-
- if (IZEB > 0.0 && NZEB > 0.0 && Vb2e1 < 0)
- begin
- `expLin(eZEB, nZEB_T * (1 - (pow2_2mPE/(2.0*E0BE))))
- // Force all derivatives at Vb2e1=0 to zero by using in DZEB a
- // modified dE0BE expression for E0BE:
- x = Vb2e1 * inv_VDE_T ;
- dE0BE = pow(- x, -2.0-PE)*(PE*(1-PE*PE-3*x*(PE-1))-6*x*x*(PE-1+x)) * `one_sixth ;
- `expLin(edZEB, Vb2e1 * pow2_2mPE * nZEB_T / (VGZEB_T * dE0BE ))
- DZEB = - Vb2e1 - VGZEB_T * dE0BE * (1 - edZEB) / (pow2_2mPE * nZEB_T) ;
- Izteb = 2.0 * IZEB_TM * DZEB * E0BE * eZEB * inv_VDE_T * pow2_PEm2 ;
- end
- else
- begin
- DZEB = 0 ;
- Izteb = 0 ;
- end
-
- // end RvdT, November 2008, MXT504.8_alpha
-
- // Iex, Isub (XIex, XIsub)
- g1 = If0 * eVb1c4;
- g2 = 4.0 * eVb1c4VDC;
-
- // nBex until and including MXT 504.9:
- // nBex = g1 / (1.0 + sqrt(1.0 + g1));
- // nBex since MXT 504.10.1: Ackn. Jos Peters, Geoffrey Coram
- nBex = (g1 - If0) / (1.0 + sqrt(1.0 + g1));
- pWex = g2 / (1.0 + sqrt(1.0 + g2));
- /* Iex until and including MXT 504.9:
- Iex = (1.0 / BRI_T) * (0.5 * IK_TM * nBex - IS_TM);
-*/
- // Iex since MXT 504.10: RvdT@TUDelft Q1, 2011:
- Iex = IK_TM * nBex / (2.0 * BRI_T) ;
-
-`ifdef SUBSTRATE
- // RvdT MXT504.10, new term: eVsc4
- if (EXSUB == 1.0)
- Isub = 2.0 * ISS_TM * (eVb1c4 - eVsc4) /
- (1.0 + sqrt(1.0 + 4.0 * (IS_TM / IKS_TM) * eVb1c4));
- else
- Isub = 2.0 * ISS_TM * (eVb1c4 - 1.0) /
- (1.0 + sqrt(1.0 + 4.0 * (IS_TM / IKS_TM) * eVb1c4));
-
- // until504.8: Isf = ISS_TM * (eVsc1 - 1.0);
- // New 504.9:
-
- if (ICSS < 0.0)
- // this clause is to implement backwards compatibility
- begin
- Isf = ISS_TM * (eVsc1 - 1.0);
- end
- else
- begin
- Isf = ICSS_TM * (eVsc1 - 1.0);
- end
-
- // End: New 504.9.
-
-`endif
-
- XIex =0.0;
-
-`ifdef SUBSTRATE
- XIsub = 0.0;
-`endif
-
- /* begin: RvdT, Q4 2012, Mextram 504.11: added EXMOD=2 option: */
- if (EXMOD == 1 || EXMOD == 2)
- begin
-
- Iex = Iex * Xext1;
-
-`ifdef SUBSTRATE
- Isub = Isub * Xext1;
-`endif
-
- Xg1 = If0 * eVbc3;
- // XnBex until and including MXT 504.9:
- // XnBex = Xg1 / (1.0 + sqrt(1.0 + Xg1));
- // XnBex in MXT 504.10.1: Ackn. Jos Peters, Geoffrey Coram:
- XnBex = (Xg1 - If0) / (1.0 + sqrt(1.0 + Xg1));
- /* XIMex until and including MXT 504.9:
- XIMex = XEXT * (0.5 * IK_TM * XnBex - IS_TM) / BRI_T;
-*/
- // XIMex in MXT 504.10: RvdT@TUDelft Q1, 2011:
- XIMex = XEXT * 0.5 * IK_TM * XnBex / BRI_T;
-
-`ifdef SUBSTRATE
- // RvdT MXT504.10, new term: eVsc3
- if (EXSUB == 1.0)
- XIMsub = XEXT * 2.0 * ISS_TM * (eVbc3 - eVsc3) /
- (1.0 + sqrt(1.0 + 4.0 * IS_T / IKS_T * eVbc3));
- else
- XIMsub = XEXT * 2.0 * ISS_TM * (eVbc3 - 1.0) /
- (1.0 + sqrt(1.0 + 4.0 * IS_T / IKS_T * eVbc3));
-`else
- XIMsub = 0.0;
-`endif
-
- if (EXMOD == 1)
- begin
-`ifdef SUBSTRATE
- Vex_bias = XEXT * (IS_TM / BRI_T + ISS_TM) * RCCxx_TM;
-`else
- Vex_bias = XEXT * (IS_TM / BRI_T) * RCCxx_TM;
-`endif
- Vex = Vt * (2.0 - ln( Vex_bias * VtINV));
- vdif = Vbc3 - Vex;
- `max_hyp0(VBex, vdif, 0.11);
- Fex = VBex /(Vex_bias + (XIMex + XIMsub) * RCCxx_TM + VBex);
- end
- else
- begin
- Vex = 0.0 ;
- vdif = 0.0 ;
- VBex = 0.0 ;
- Fex = 1.0 ;
- end
-
- /* end: RvdT, Q4, 2012, Mextram 504.11: added EXMOD=2 option: */
-
- XIex = Fex * XIMex;
-
-`ifdef SUBSTRATE
- XIsub = Fex * XIMsub;
-`endif
- end
- else
- begin
- Fex = 0;
- XnBex = 0 ;
- end
-
- // Variable base resistance
-
- q0Q = 1.0 + Vte / VER_T + Vtc / VEF_T;
- `max_hyp0(q1Q, q0Q, 0.1);
- qBQ = q1Q * (1.0 + 0.5 * (n0 + nB));
-
- Rb2 = 3.0 * RBV_TM / qBQ;
- Ib1b2 = (2.0 * Vt * (eVb1b2 - 1.0) + Vb1b2) / Rb2;
-
- // Weak-avalanche current
-
- Iavl = 0.0;
- Gem = 0.0;
- if ((Ic1c2 > 0.0) && (Vb2c1 < VDC_T)) begin
-
- dEdx0 = 2.0 * VAVL / (WAVL * WAVL);
- sqr_arg = (VDC_T - Vb2c1) / Icap_IHC;
- xd = sqrt(2.0 * sqr_arg / dEdx0);
- if (EXAVL == 0.0)
- Weff = WAVL;
- else
- begin
- xi_w1 = 1.0 - 0.5 * xi_w;
- Weff = WAVL * xi_w1 * xi_w1;
- end
- Wd = xd * Weff / sqrt(xd * xd + Weff * Weff);
- Eav = (VDC_T - Vb2c1) / Wd;
- E0 = Eav + 0.5 * Wd * dEdx0 * Icap_IHC;
-
- if (EXAVL == 0)
- Em = E0;
- else
- begin
- SHw = 1.0 + 2.0 * SFH * (1.0 + 2.0 * xi_w);
- Efi = (1.0 + SFH) / (1.0 + 2.0 * SFH);
- Ew = Eav - 0.5 * Wd * dEdx0 * (Efi - Ic1c2 / (IHC_M * SHw));
- sqr_arg = (Ew - E0) * (Ew - E0) + 0.1 * Eav * Eav * Icap / IHC_M;
- Em = 0.5 * (Ew + E0 + sqrt(sqr_arg));
- end
-
- EmEav_Em = (Em - Eav) / Em;
- if (abs(EmEav_Em) > `TEN_M07)
- begin
- lambda = 0.5 * Wd / EmEav_Em;
- Gem = An / BnT * Em * lambda *
- (exp(-BnT / Em) - exp(-BnT / Em * (1.0 + Weff / lambda)) );
- end
- else
- Gem = An * Weff * exp(-BnT / Em);
-
- Gmax = Vt / (Ic1c2 * (RBC_TM + Rb2)) + qBI / BF_T +
- RE_TM / (RBC_TM + Rb2);
- Iavl = Ic1c2 * Gem / (Gem +Gem / Gmax + 1.0);
- end
-
- if (eVb2c2star > 0.0)
- Vb2c2star = Vt * ln(eVb2c2star);
- else
- Vb2c2star = Vb2c2;
-
-`ifdef SELFHEATING
- // Power dissipation
-
- // RvdT 03-12-2007, modified power equation due to distribution collector resistance
-
- power_dis = In * (Vb2e1 - Vb2c2star) +
- Ic1c2 * (Vb2c2star - Vb2c1) -
- Iavl * Vb2c2star +
- Vee1 * Vee1 / RE_TM +
- Vcc3 * Vcc3 * GCCxx_TM +
- Vc3c4 * Vc3c4 * GCCex_TM +
- Vc4c1 * Vc4c1 * GCCin_TM +
- Vbb1 * Vbb1 / RBC_TM +
- Ib1b2 * Vb1b2 +
- // 504.8: Nov. 2008, RvdT, TU_Delft: Zener current contribution added:
- // Izteb > 0 for Vb2e1 < 0, hence the minus sign:
- (Ib1 + Ib2 - Izteb) * Vb2e1 +
- Ib1_s * Vb1e1 +
-`ifdef SUBSTRATE
- (Iex + Ib3) * Vb1c4 + XIex * Vbc3 +
- Isub * (Vb1c4 - Vsc4) +
- XIsub * (Vbc3 - Vsc3) +
- Isf * Vsc1;
-`else
- (Iex + Ib3) * Vb1c4 + XIex * Vbc3;
-`endif
-
-`endif
-
-
- // Charges
-
- Qte = (1.0 - XCJE) * CJE_TM * Vte;
- `min_logexp(Vje_s, Vb1e1, Vfe, a_VDE);
- Qte_s = XCJE * CJE_TM * (VDE_T / (1.0 - PE) *
- (1.0 - pow(1.0 - Vje_s * inv_VDE_T, 1.0 - PE)) +
- `AJE * (Vb1e1 - Vje_s));
-
- Qtc = XCJC * CJC_TM * Vtc;
- Qb0 = TAUB_T * IK_TM;
- Qbe_qs = 0.5 * Qb0 * n0 * q1Q;
- Qbc_qs = 0.5 * Qb0 * nB * q1Q;
-
- a_VDC = 0.1 * VDC_T;
- `min_logexp(Vjcex, Vb1c4, Vfc, a_VDC);
- Vtexv = VDC_T / (1.0 - PC) * (1.0 - pow(1.0 - Vjcex / VDC_T, 1.0 - PC)) +
- bjc * (Vb1c4 - Vjcex);
- Qtex = CJC_TM * ((1.0 - XP_T) * Vtexv + XP_T * Vb1c4) *
- (1.0 - XCJC) * (1.0 - XEXT);
-
- `min_logexp(XVjcex, Vbc3, Vfc, a_VDC);
- XVtexv = VDC_T / (1.0 - PC) * (1.0 - pow(1.0 - XVjcex / VDC_T, 1.0 - PC)) +
- bjc * (Vbc3 - XVjcex);
- XQtex = CJC_TM * ((1.0 - XP_T) * XVtexv + XP_T * Vbc3) *
- (1.0 - XCJC) * XEXT;
-
-`ifdef SUBSTRATE
- a_VDS = 0.1 * VDS_T;
- Vfs = VDS_T * (1.0 - pow(`AJS , -1.0 / PS));
- `min_logexp(Vjs, Vsc1, Vfs, a_VDS);
- Qts = CJS_TM * (VDS_T / (1.0 - PS) *
- (1.0 - pow(1.0 - Vjs / VDS_T, 1.0 - PS)) + `AJS * (Vsc1 - Vjs));
-`endif
-
- Qe0 = TAUE_T * IK_TM * pow(IS_TM / IK_TM, 1.0 / MTAU);
- `expLin(tmpExp,Vb2e1 / (MTAU * Vt))
-
- // Niu Q2, 2016, for fixing reverse VBE noise when KE=1, KC=1,
- // Previous Qe_qs causes unphysically large noise correlation time constant tau_n
- Qe_qs = Qe0 * tmpExp;
-
- Qepi0 = 4.0 * TEPI_T * Vt / RCV_TM;
- Qepi = 0.5 * Qepi0 * xi_w * (p0star + pW + 2.0);
-
- Qex = TAUR_T * 0.5 * (Qb0 * nBex + Qepi0 * pWex) / (TAUB_T + TEPI_T);
- XQex = 0.0;
-
- if (EXMOD == 1) begin
-
- Qex = Qex * (1.0 - XEXT);
- Xg2 = 4.0 * eVbc3VDC;
- XpWex = Xg2 / (1.0 + sqrt(1.0 + Xg2));
- XQex = 0.5 * Fex * XEXT * TAUR_T *
- (Qb0 * XnBex + Qepi0 * XpWex) / (TAUB_T + TEPI_T);
-
- end
-
- Qb1b2 = 0.0;
- if (EXPHI == 1)
- begin
- dVteVje = pow(1.0 - Vje * inv_VDE_T, -PE) - `AJE;
- Vb2e1Vfe = (Vb2e1 - Vfe) / a_VDE;
- if (Vb2e1Vfe < 0.0)
- dVjeVb2e1 = 1.0 / (1.0 + exp(Vb2e1Vfe));
- else
- dVjeVb2e1 = exp(- Vb2e1Vfe) / (1.0 + exp(- Vb2e1Vfe));
-
- dVteVb2e1 = dVteVje * dVjeVb2e1 + `AJE;
- dQteVb2e1 = (1.0 - XCJE) * CJE_TM * dVteVb2e1;
-
- dn0Vb2e1 = If0 * eVb2e1 * VtINV * (0.5 / sqrt(1.0 + f1));
- dQbeVb2e1 = 0.5 * Qb0 * q1Q * dn0Vb2e1;
-
- // Niu, Q2 2016. Modified to fix reverse VBE noise problem.
- dQeVb2e1 = Qe_qs / (MTAU * Vt);
-
- Qb1b2 = 0.2 * Vb1b2 * (dQteVb2e1 + dQbeVb2e1 + dQeVb2e1);
-
- Qe = (1 - KE) * Qe_qs;
- Qbe_qs_eff = Qbe_qs + KE * Qe_qs;
- Qbc = XQB * Qbe_qs_eff + Qbc_qs;
- Qbe = (1 - XQB) * Qbe_qs_eff;
-
- end
- else
- begin
- Qbe = Qbe_qs;
- Qbc = Qbc_qs;
- Qe = Qe_qs;
- end
-
-
- // Add branch current contributions
-
- // Static currents
- I(c1, c2) <+ TYPE * Ic1c2;
- I(c2, e1) <+ TYPE * In;
- I(b1, e1) <+ TYPE * Ib1_s;
- // begin RvdT, 28-10-2008, MXT504.8_alpha
- // contribution tunnel current added
- I(b2, e1) <+ TYPE * (Ib1 + Ib2 - Izteb);
-
-`ifdef SUBSTRATE
- I(b1, s) <+ TYPE * Isub;
- I(b, s) <+ TYPE * XIsub;
- I(s, c1) <+ TYPE * Isf;
-`endif
- I(b1, b2) <+ TYPE * Ib1b2;
- I(b2, c2) <+ TYPE * (-1.0 * Iavl);
- I(e, e1) <+ TYPE * Vee1 / RE_TM;
- I(b, b1) <+ TYPE * Vbb1 / RBC_TM;
-
-`ifdef SELFHEATING
- // Electrical equivalent for the thermal network
- I(dt) <+ V(dt) / RTH_Tamb_M;
- I(dt) <+ ddt(CTH_M * V(dt));
- I(dt) <+ -1.0 * power_dis;
-`endif
-
-
- // Dynamic currents
- I(b2, e1) <+ ddt(TYPE * (Qte + Qbe + Qe));
- I(b1, e1) <+ ddt(TYPE * (Qte_s));
- I(b2, c2) <+ ddt(TYPE * (Qtc + Qbc + Qepi));
-`ifdef SUBSTRATE
- I(s, c1) <+ ddt(TYPE * Qts);
-`endif
- I(b1, b2) <+ ddt(TYPE * Qb1b2);
- I(b, e) <+ ddt(TYPE * CBEO_M * Vbe);
- I(b, c) <+ ddt(TYPE * CBCO_M * Vbc);
-
- end // Currents and charges
-
-
- /* RvdT, Delft Univ. Tech. 03-12-2007.
-Distribution of parasitic collector resistance.
-This construct supports the case
-RCBLI = 0.0 and or RCBLX = 0.0 .
-It is up to the compiler to adjust the circuit topology
-and perform a node-collapse in such cases. */
- if (RCBLX > 0.0)
- begin
- I(b, c3) <+ TYPE * XIex;
- I(c, c3) <+ TYPE * Vcc3 * GCCxx_TM ;
- I(b, c3) <+ ddt(TYPE * (XQtex + XQex));
- if (RCBLI > 0.0)
- begin
- I(c4, c1) <+ TYPE * Vc4c1 * GCCin_TM;
- I(b1, c4) <+ TYPE * (Ib3 + Iex);
- I(c3, c4) <+ TYPE * Vc3c4 * GCCex_TM ;
- I(b1, c4) <+ ddt(TYPE * (Qtex + Qex));
- end
- else
- begin
- V(c4, c1) <+ 0.0 ;
- I(b1, c1) <+ TYPE * (Ib3 + Iex);
- I(b1, c1) <+ ddt(TYPE * (Qtex + Qex));
- I(c3, c1) <+ TYPE * Vc3c4 * GCCex_TM ;
- end
- end
- else
- begin
- V(c3, c4) <+ 0 ;
- if (RCBLI > 0.0)
- begin
- I(b, c4) <+ TYPE * XIex;
- I(c, c4) <+ TYPE * Vcc3 * GCCxx_TM ;
- I(c4, c1) <+ TYPE * Vc4c1 * GCCin_TM;
- I(b1, c4) <+ TYPE * (Ib3 + Iex);
- I(b1, c4) <+ ddt(TYPE * (Qtex + Qex));
- I(b, c4) <+ ddt(TYPE * (XQtex + XQex));
- end
- else
- begin
- I(b, c1) <+ TYPE * XIex;
- I(c, c1) <+ TYPE * Vcc3 * GCCxx_TM ;
- V(c4, c1) <+ 0.0 ;
- I(b1, c1) <+ TYPE * (Ib3 + Iex);
- I(b1, c1) <+ ddt(TYPE * (Qtex + Qex));
- I(b, c1) <+ ddt(TYPE * (XQtex + XQex));
- I(c3, c1) <+ TYPE * Vc3c4 * GCCex_TM ;
- end
- end
-
diff --git a/src/spicelib/devices/adms/mextram/admsva/frontdef.inc b/src/spicelib/devices/adms/mextram/admsva/frontdef.inc
deleted file mode 100644
index ebe911458..000000000
--- a/src/spicelib/devices/adms/mextram/admsva/frontdef.inc
+++ /dev/null
@@ -1,133 +0,0 @@
-// Copyright (c) 2000-2007, NXP Semiconductor
-// Copyright (c) 2007-2014, Delft University of Technology
-// Copyright (c) 2015, Auburn University
-// All rights reserved, see IP_NOTICE_DISCLAIMER_LICENSE for further information.
-
-// Front definitions
-
-`include "discipline.h"
-
-// Numerical, physical and model constants
-`define TEN_M40 1.0e-40
-`define TEN_M07 1.0e-7
-`define C2K 273.15
-`define KB 1.3806226e-23
-`define QQ 1.6021918e-19
-`define KBdivQQ 8.61708691805812512584e-5
-`define one_third 0.33333333333333333333
-`define one_sixth 0.16666666666666666667
-`define VDLOW 0.05
-`define AJE 3.0
-`define AJC 2.0
-`define AJS 2.0
-`define VEXLIM 400.0
-`define PI 3.1415926
-
-`define NGSPICE_ADMS
-
-// Desriptions and units
-//`ifdef __VAMS_COMPACT_MODELING__
-`ifdef NGSPICE_ADMS
- `define OPP(nam,uni,des) (* desc="des", units="uni" *) real nam;
- `define PAR(des,uni) (* desc="des", units="uni" *) parameter real
- `define PAI(des,uni) (* desc="des", units="uni" *) parameter integer
-`else
- `define OPP(nam,uni,des)
- `define PAR(des,uni) parameter real
- `define PAI(des,uni) parameter integer
-`endif
-
-`define PGIVEN $param_given
-
-// ADMS specific definitions
-`ifdef insideADMS
- `define P(p) (*p*)
- `define MODEL @(initial_model)
- `define INSTANCE @(initial_instance)
- `define NOISE @(noise)
-`else
- `define P(p)
- `define MODEL
- `define INSTANCE
- `define NOISE
-`endif
-
-// Smooth limitting functions
-`define max_hyp0(result, x, epsilon)\
- eps2 = epsilon * epsilon;\
- x2 = x * x;\
- if (x < 0.0)\
- result = 0.5 * eps2 / (sqrt(x2 + eps2) - x);\
- else\
- result = 0.5 * (sqrt(x2 + eps2) + x);\
- result=result
-
-`define min_logexp(result, x, x0, a)\
- dxa = (x - x0) / (a);\
- if (x < x0)\
- result = x - a * ln(1.0 + exp(dxa));\
- else\
- result = x0 - a * ln(1.0 + exp(-dxa));\
- result=result
-
-`define max_logexp(result, x, x0, a)\
- dxa = (x - x0) / (a);\
- if (x < x0)\
- result = x0 + a * ln(1.0 + exp(dxa));\
- else\
- result = x + a * ln(1.0 + exp(-dxa));\
- result=result
-
-`define expLin(result, x)\
- if (x < `VEXLIM) begin\
- result = exp(x);\
- end else begin\
- expl = exp(`VEXLIM);\
- result = expl * (1.0 + (x - `VEXLIM));\
- end
-
-`define linLog(result, x, vlim)\
- if (x < vlim)\
- result = x;\
- else\
- result = vlim + ln(1.0 + (x - vlim));\
- result=result
-
-// Macros for the model/instance parameters
-//
-// MPRxx model parameter real
-// MPIxx model parameter integer
-// ||
-// cc closed lower bound, closed upper bound
-// oo open lower bound, open upper bound
-// co closed lower bound, open upper bound
-// oc open lower bound, closed upper bound
-// cz closed lower bound=0, open upper bound=inf
-// oz open lower bound=0, open upper bound=inf
-// nb no bounds
-// ex no bounds with exclude
-// sw switch(integer only, values 0=false and 1=true)
-// ty switch(integer only, values -1=p-type and +1=n-type)
-//
-//
-`define MPRnb(nam,def,uni, des) (*units=uni, desc=des*) parameter real nam=def ;
-`define MPRex(nam,def,uni,exc, des) (*units=uni, desc=des*) parameter real nam=def exclude exc ;
-`define MPRcc(nam,def,uni,lwr,upr,des) (*units=uni, desc=des*) parameter real nam=def from[lwr:upr] ;
-`define MPRoo(nam,def,uni,lwr,upr,des) (*units=uni, desc=des*) parameter real nam=def from(lwr:upr) ;
-`define MPRco(nam,def,uni,lwr,upr,des) (*units=uni, desc=des*) parameter real nam=def from[lwr:upr) ;
-`define MPRoc(nam,def,uni,lwr,upr,des) (*units=uni, desc=des*) parameter real nam=def from(lwr:upr] ;
-`define MPRcz(nam,def,uni, des) (*units=uni, desc=des*) parameter real nam=def from[ 0:inf);
-`define MPRoz(nam,def,uni, des) (*units=uni, desc=des*) parameter real nam=def from( 0:inf);
-
-`define MPInb(nam,def,uni, des) (*units=uni, desc=des*) parameter integer nam=def ;
-`define MPIex(nam,def,uni,exc, des) (*units=uni, desc=des*) parameter integer nam=def exclude exc ;
-`define MPIcc(nam,def,uni,lwr,upr,des) (*units=uni, desc=des*) parameter integer nam=def from[lwr:upr] ;
-`define MPIoo(nam,def,uni,lwr,upr,des) (*units=uni, desc=des*) parameter integer nam=def from(lwr:upr) ;
-`define MPIco(nam,def,uni,lwr,upr,des) (*units=uni, desc=des*) parameter integer nam=def from[lwr:upr) ;
-`define MPIoc(nam,def,uni,lwr,upr,des) (*units=uni, desc=des*) parameter integer nam=def from(lwr:upr] ;
-`define MPIcz(nam,def,uni, des) (*units=uni, desc=des*) parameter integer nam=def from[ 0:inf);
-`define MPIoz(nam,def,uni, des) (*units=uni, desc=des*) parameter integer nam=def from( 0:inf);
-
-`define MPIsw(nam,def,uni, des) (*units=uni, desc=des*) parameter integer nam=def from[ 0: 1] ;
-`define MPIty(nam,def,uni, des) (*units=uni, desc=des*) parameter integer nam=def from[ -1: 1] exclude 0 ;
-
diff --git a/src/spicelib/devices/adms/mextram/admsva/initialize.inc b/src/spicelib/devices/adms/mextram/admsva/initialize.inc
deleted file mode 100644
index c515a9f0c..000000000
--- a/src/spicelib/devices/adms/mextram/admsva/initialize.inc
+++ /dev/null
@@ -1,89 +0,0 @@
-// Copyright (c) 2000-2007, NXP Semiconductor
-// Copyright (c) 2007-2014, Delft University of Technology
-// Copyright (c) 2015, Auburn University
-// All rights reserved, see IP_NOTICE_DISCLAIMER_LICENSE for further information.
-
-if (`PGIVEN(GMIN))
- my_gmin = GMIN;
-else
- my_gmin = $simparam("gmin");
-
-// Initialize model constants
-`INITIAL_INSTANCE
-begin
- // Impact ionization constants (NPN - PNP)
-
- if (TYPE == 1) begin
-
- An = 7.03e7;
- Bn = 1.23e8;
-
- end else begin
-
- An = 1.58e8;
- Bn = 2.04e8;
-
- end
-
- Xext1 = 1.0 - XEXT;
-
- // Temperature independent MULT scaling
-
-`ifdef SELFHEATING
- CTH_M = CTH * MULT;
-`endif
-
- CBEO_M = CBEO * MULT;
- CBCO_M = CBCO * MULT;
-
- invMULT = 1.0 / MULT;
- SCRCV_M = SCRCV * invMULT;
-
- KF_M = KF * pow(MULT, 1.0 - AF);
- KFN_M = KFN * pow(MULT, 1.0 - (2.0 * (MLF - 1.0) + AF * (2.0 - MLF)));
-
- // begin: RvdT, November 2008; Zener tunneling current model
-
- pow2_2mPE = pow(2.0, 2.0 - PE);
- pow2_PEm2 = 1.0 / pow2_2mPE;
-
- // Reference Temperature expressed in Kelvin:
- Trk = TREF + `C2K;
- // Ambient Temperature expressed in Kelvin:
- Tamb = $temperature + DTA;
-
-
- // begin: RvdT, November 2008; Zener tunneling current model
- //
- // Comment added March 2009: this assumes VGZEBOK as a model parameter.
- //
- // Bandgap for Zener tunnel current model at reference temperature in eV:
- // VGZEB_Tr = VGZEBOK - AVGEB*Trk*Trk / (Trk + TVGEB);
- // `max_logexp(VGZEB_Tr, VGZEBOK - AVGEB*Trk*Trk / (Trk + TVGEB), 0.05, 0.1);
- // end: RvdT, November 2008
-
- // begin: RvdT March 2009:
- // to decrease parameter interdependency,
- // use VGZEB as a parameter, instead of VGZEBOK:
- // VGZEB : bandgap for Zener tunneling at T = Tref,
- // VGZEBOK : bandgap for Zener tunneling at T = 0 K.
- //`max_logexp(VGZEBOK, VGZEB + AVGEB*Trk*Trk / (Trk + TVGEB), 0.05, 0.1);
- //dw admsXml can't expand the macro `max_logexp here - using the code
- _x = VGZEB + AVGEB*Trk*Trk / (Trk + TVGEB);
- _x0 = 0.05;
- _a = 0.1;
- _dxa = (_x - _x0) / (_a);
- if (_x < _x0)
- VGZEBOK = _x0 + _a * ln(1.0 + exp(_dxa));
- else
- VGZEBOK = _x + _a * ln(1.0 + exp(-_dxa));
-
- VGZEB_Tr = VGZEB;
- // end: RvdT March 2009: use VGZEB as a parameter, instead of VGZEBOK:
-
- inv_VGZEB_Tr = 1.0 / VGZEB_Tr;
-
- inv_VDE = 1.0 / VDE;
-
- // end: RvdT, November 2008; Zener tunneling current model
-end
diff --git a/src/spicelib/devices/adms/mextram/admsva/noise.inc b/src/spicelib/devices/adms/mextram/admsva/noise.inc
deleted file mode 100644
index f07ce223a..000000000
--- a/src/spicelib/devices/adms/mextram/admsva/noise.inc
+++ /dev/null
@@ -1,145 +0,0 @@
-// Copyright (c) 2000-2007, NXP Semiconductor
-// Copyright (c) 2007-2014, Delft University of Technology
-// Copyright (c) 2015, Auburn University
-// All rights reserved, see IP_NOTICE_DISCLAIMER_LICENSE for further information.
-
-// Noise sources
-
-`NOISE begin
-
-// Thermal noise
-common = 4.0 * `KB * Tk;
-powerREC = common / RE_TM; // Emitter resistance
-powerRBC = common / RBC_TM; // Base resistance
-powerRCCxx = common * GCCxx_TM; // Collector resistance
-powerRCCex = common * GCCex_TM; // Collector resistance
-powerRCCin = common * GCCin_TM; // Collector resistance
-powerRBV = common / Rb2 * (4.0 * eVb1b2 + 5.0) * `one_third ; // Variable base resistance
-
-// Main current shot noise
-In_N = (If + Ir) / qBI;
-powerCCS = 2.0 * `QQ * abs(In_N);
-
-// Weak-avalanche current shot noise
-if (KAVL > 0) begin
- Gem_N = abs(Iavl / In_N);
-end else begin
- Gem_N = 0.0;
-end
-
-powerIIS = 2.0 * `QQ * Iavl * (Gem_N + 1);
-
-// Transit time for noise
-if (In_N > 0.0) begin
- Taub_N = (Qbe + Qbc) / In_N;
-end else begin
- Taub_N = TAUB_T * q1Q * qBI;
-end
-
-// RF correlation noise model switch
-if (KC == 1) begin
- // use charge partition for noise transit time
- taun = XQB * Taub_N;
-end else if (KC == 2) begin
- // use fraction of transit time for noise transit time
- taun = FTAUN * Taub_N;
-end else begin // KC == 0
- // no correlation noise
- taun = 0;
-end
-
-// Forward base current shot noise and 1/f noise
-powerFBCS = 2.0 * `QQ * (abs(Ib1) + abs(Ib2) + abs(Izteb));
-powerFBC1fB1 = (1.0 - XIBI) * pow((abs(Ib1) / (1 - XIBI)), AF) * KF_M;
-exponentFBC1fB2 = (2.0 * (MLF - 1.0)) + (AF * (2.0 - MLF));
-powerFBC1fB2 = KFN_M * pow(abs(Ib2), exponentFBC1fB2);
-
-// Emitter-base sidewall current shot and 1/f noise
-powerEBSCS = 2.0 * `QQ * abs(Ib1_s);
-if (XIBI == 0)
- powerEBSC1f = 0.0;
-else
- powerEBSC1f = KF_M * XIBI * pow((abs(Ib1_s / XIBI)), AF);
-
-// Reverse base current shot noise and 1/f noise
-powerRBCS = 2.0 * `QQ * abs(Ib3);
-powerRBC1f = KF_M * pow(abs(Ib3), AF);
-
-// Extrinsic current shot noise and 1/f noise
-powerExCS = 2.0 * `QQ * abs(Iex);
-powerExC1f = KF_M * (1 - (EXMOD * XEXT)) *
- pow((abs(Iex) / (1 - (EXMOD * XEXT))), AF);
-powerExCSMOD = 2.0 * `QQ * abs(XIex) * EXMOD;
-if (XEXT == 0.0)
- powerExC1fMOD = 0.0;
-else
- powerExC1fMOD = KF_M * EXMOD * XEXT * pow((abs(XIex) / XEXT), AF);
-
-`ifdef SUBSTRATE
-// Substrate current shot noise (between nodes B1 and S, resp. B and S)
- powerSubsCS_B1S = 2.0 * `QQ * abs(Isub);
- powerSubsCS_BS = 2.0 * `QQ * abs(XIsub);
-`endif
-
-// Reference un-correlated current shot noise sources
-I(noi) <+ white_noise(powerCCS, "un-correlated current shot noise");
-I(noi) <+ V(noi);
-
-// Implementing correlated noise sources
-I(b2, e1) <+ taun * ddt(V(noi));
-I(c2, b2) <+ Gem_N * V(noi);
-I(c2, e1) <+ V(noi);
-
-// Implementing un-correlated noise sources
-I(c2, b2) <+ white_noise(powerIIS, "un-correlated noise");
-I(b2, e1) <+ white_noise(powerFBCS, "un-correlated noise");
-
-// Add noise sources
-I(e, e1) <+ white_noise(powerREC, "emitter resistance");
-I(b, b1) <+ white_noise(powerRBC, "base resistance");
-I(b1, b2) <+ white_noise(powerRBV, "variable base resistance");
-I(b2, e1) <+ flicker_noise(powerFBC1fB1, 1, "bas_emi_forw");
-I(b2, e1) <+ flicker_noise(powerFBC1fB2, 1, "bas_emi_forw");
-I(e1, b1) <+ white_noise(powerEBSCS, "emi_bas_side");
-I(e1, b1) <+ flicker_noise(powerEBSC1f, 1, "emi_bas_side");
-I(b1, c4) <+ white_noise(powerRBCS, "bas_col_reve");
-I(b1, c4) <+ flicker_noise(powerRBC1f, 1, "bas_col_reve");
-I(b1, c4) <+ white_noise(powerExCS, "Ext_bas_col");
-I(b1, c4) <+ flicker_noise(powerExC1f, 1, "Ext_bas_col");
-I(b, c3) <+ white_noise(powerExCSMOD, "Ext_bas_col");
-I(b, c3) <+ flicker_noise(powerExC1fMOD, 1, "Ext_bas_col");
-
-`ifdef SUBSTRATE
- I(b1, s) <+ white_noise(powerSubsCS_B1S, "bas_sub_current");
- I(b, s) <+ white_noise(powerSubsCS_BS, "bas_sub_current");
-`endif
-
-if (RCBLX > 0.0)
-begin
- if (RCBLI > 0.0)
- begin /* all branches exist */
- I(c, c3) <+ white_noise(powerRCCxx, "collector plug resistance");
- I(c3, c4) <+ white_noise(powerRCCex, "extrinsic collector BL resistance");
- I(c4, c1) <+ white_noise(powerRCCin, "intrinsic collector BL resistance");
- end
- else
- begin /* only Rcblx exists */
- I(c, c3) <+ white_noise(powerRCCxx, "collector plug resistance");
- I(c3, c1) <+ white_noise(powerRCCex, "extrinsic collector BL resistance");
- end
-end
-else
-begin
- if (RCBLI > 0.0)
- begin /* only Rcbli exists */
- I(c, c4) <+ white_noise(powerRCCxx, "collector plug resistance");
- I(c4, c1) <+ white_noise(powerRCCin, "intrinsic collector BL resistance");
- end
- else
- begin /* neither Rcblx nor Rcbli exists */
- I(c, c1) <+ white_noise(powerRCCxx, "collector plug resistance");
- end
-end
-
-end // Noise
-
diff --git a/src/spicelib/devices/adms/mextram/admsva/opinfo.inc b/src/spicelib/devices/adms/mextram/admsva/opinfo.inc
deleted file mode 100644
index 7b916a43e..000000000
--- a/src/spicelib/devices/adms/mextram/admsva/opinfo.inc
+++ /dev/null
@@ -1,250 +0,0 @@
-// Copyright (c) 2000-2007, NXP Semiconductor
-// Copyright (c) 2007-2014, Delft University of Technology
-// Copyright (c) 2015, Auburn University
-// All rights reserved, see IP_NOTICE_DISCLAIMER_LICENSE for further information.
-
-// Evaluate the operating point (output) variables
-begin
-
- //`ifdef __VAMS_COMPACT_MODELING__
-`ifdef NGSPICE_ADMS
-
- // The external currents and the current gain
- //OP_ic = I(); // External DC collector current
- OP_ic = TYPE*Ic1c2; // External DC collector current
- //OP_ib = I(); // External DC base Current
- OP_ib = TYPE*Ib1b2; // External DC base Current
-
- if (OP_ib == 0)
- begin
- OP_betadc = 0.0 ;
- end
- else
- begin
- OP_betadc = OP_ic / OP_ib; // External DC Current gain
- end
-
- // begin added in MXT 504.9:
- //OP_ie = I(); // External DC emitter current
- OP_ie = TYPE*(In+Ib1_s); // External DC emitter current
- OP_vbe = V(b, e); // External base-emitter bias
- OP_vce = V(c, e); // External collector-emitter bias
- OP_vbc = V(b, c); // External base-collector bias
-
-`ifdef SUBSTRATE
- //OP_is = I(); // External DC emitter current
- OP_is = TYPE*Isub; // External DC emitter current
- OP_vse = V(s, e); // External substrate-emitter bias
- OP_vbs = V(b, s); // External base-substrate bias
- OP_vsc = V(s, c); // External substrate-collector bias
-`endif
-
- // end added in MXT 504.9:
-
- // The internal voltage differences
- OP_vb2e1 = Vb2e1; // Internal base-emiter bias
- OP_vb2c2 = Vb2c2; // Internal base-emiter bias
- OP_vb2c1 = Vb2c1; // Internal base-collector bias including epilayer
-
- OP_vb1c1 = Vb1b2 + Vb2c1; // External base-collector bias without contact resistances
-
- OP_vc4c1 = Vc4c1; // Bias over intrinsic buried layer
- OP_vc3c4 = Vc3c4; // Bias over extrinsic buried layer
-
- OP_ve1e = - Vee1; // Bias over emiter resistance
-
- // The branch currents
- OP_in = In; // Main current
- OP_ic1c2 = Ic1c2; // Epilayer current
- OP_ib1b2 = Ib1b2; // Pinched-base current
- OP_ib1 = Ib1; // Ideal forward base current
- OP_sib1 = Ib1_s; // Ideal side-wall base current
- //
- // 504.8, RvdT, TU-Delft April. 2009:
- //
- OP_izteb = Izteb ; // Zener tunneling current
- //
- OP_ib2 = Ib2; // Non-ideal forward base current
- OP_ib3 = Ib3; // Non-ideal reverse base current
- OP_iavl = Iavl; // Avalanche current
- OP_iex = Iex; // Extrinsic reverse base current
- OP_xiex = XIex; // Extrinsic reverse base current
-`ifdef SUBSTRATE
- OP_isub = Isub; // Substrate current
- OP_xisub = XIsub; // Substrate current
- OP_isf = Isf; // Substrate-collector current
-`endif
- OP_ire = - Vee1 / RE_TM; // Current through emiter resistance
- OP_irbc = Vbb1 / RBC_TM; // Current through constant base resistance
-
- OP_ircc = Vcc3 * GCCxx_TM; // Current through collector contact resistance
- OP_ircblx = Vc3c4 * GCCex_TM; // Current through extrinsic buried layer resistance
- OP_ircbli = Vc4c1 * GCCin_TM; // Current through extrinsic buried layer resistance
-
- // The branch charges
- OP_qe = Qe; // Emitter charge or emitter neutral charge
- OP_qte = Qte; // Base-emiter depletion charge
- OP_sqte = Qte_s; // Sidewall base-emiter depletion charge
- OP_qbe = Qbe; // Base-emiter diffusion charge
- OP_qbc = Qbc; // Base-collector diffusion charge
- OP_qtc = Qtc; // Base-colector depletion charge
- OP_qepi = Qepi; // Epilayer diffusion charge
- OP_qb1b2 = Qb1b2; // AC current crowding charge
- OP_qtex = Qtex; // Extrinsic base-collector depletion charge
- OP_xqtex = XQtex; // Extrinsic base-collector depletion charge
- OP_qex = Qex; // Extrinsic base-collector diffusion charge
- OP_xqex = XQex; // Extrinsic base-collector diffusion charge
-`ifdef SUBSTRATE
- OP_qts = Qts; // Collector substrate depletion charge
-`endif
-
- // Small signal equivalent circuit conductances and resistances
-
- OP_gx = - ddx(In, V(e1)); // Forward transconductance
- OP_gy = - ddx(In, V(c2)); // Reverse transconductance
-
- OP_gz = - ddx(In, V(c1)); // Reverse transconductance
-
- OP_sgpi =
- - ddx(Ib1_s, V(e1)); // Conductance sidewal b-e junction
- OP_gpix = - ddx(Ib1+Ib2, V(e1)); // Conductance floor b-e junction
-
- OP_gpiy = - ddx(Ib1, V(c2)); // Early effect on recombination base current
- OP_gpiz = - ddx(Ib1, V(c1)); // Early effect on recombination base current
-
- OP_gmux = ddx( Iavl, V(e1)); // Early effect on avalanche current limitting
- OP_gmuy = ddx( Iavl, V(c2)); // Conductance of avalanche current
- OP_gmuz = ddx( Iavl, V(c1)); // Conductance of avalanche current
-
- // Conductance extrinsic b-c current :
- OP_gmuex =
- + ddx(Iex+Ib3, V(b1))
- + ddx(Iex+Ib3, V(b2))
- + ddx(Iex+Ib3, V(e1))
- + ddx(Iex+Ib3, V(c2));
-
- OP_xgmuex = ddx(XIex, V(b)) ; // Conductance extrinsic b-c current
-
- OP_grcvy = - ddx(Ic1c2, V(c2)); // Conductance of epilayer current
- OP_grcvz = - ddx(Ic1c2, V(c1)); // Conductance of epilayer current
-
-// OP_rbv = 1.0 / (- ddx(Ib1b2, V(b2)) - ddx(Ib1b2, V(c2))); // Base resistance
- OP_rbv = Rb2; // FIXME: Base resistance - very, very raw
-
- OP_grbvx = - ddx(Ib1b2, V(e1)); // Early effect on base resistance
- OP_grbvy = - ddx(Ib1b2, V(c2)); // Early effect on base resistance
-
- OP_grbvz = - ddx(Ib1b2, V(c1)); // Early effect on base resistance
-
- OP_re = RE_TM; // Emiter resistance
- OP_rbc = RBC_TM; // Constant base resistance
- OP_rcc = RCCxx_TM; // Collector Contact resistance
- OP_rcblx = RCCex_TM; // Extrinsic buried layer resistance
- OP_rcbli = RCCin_TM; // Extrinsic buried layer resistance
-
-
-`ifdef SUBSTRATE
- OP_gs = ddx(Isub, V(b1)); // Conductance parasitic PNP transitor
- OP_xgs = ddx(XIsub, V(b)) ; // Conductance parasitic PNP transistor
- OP_gsf = ddx(Isf, V(s)) ; // Conductance substrate-collector current
-`endif
-
-
-
- // Small signal equivalent circuit capacitances
- OP_scbe = - ddx(Qte_s, V(e1)); // Capacitance sidewall b-e junction
-
- OP_cbex = - ddx(Qte + Qbe + Qe, V(e1)) ; // Capacitance floor b-e junction
-
- OP_cbey = - ddx(Qbe, V(c2)); // Early effect on b-e diffusion junction
-
- OP_cbez = - ddx(Qbe, V(c1)); // Early effect on b-e diffusion junction
-
- OP_cbcx = - ddx(Qbc, V(e1)); // Early effect on b-c diffusion junction
-
-
- OP_cbcy = - ddx(Qtc + Qbc + Qepi, V(c2)); // Capacitance floor b-c junction
- OP_cbcz = - ddx(Qtc + Qbc + Qepi, V(c1)); // Capacitance floor b-c junction
-
- // Capacitance extrinsic b-c junction :
- OP_cbcex =
- + ddx(Qtex + Qex,V(b1 ))
- + ddx(Qtex + Qex,V(b2))
- + ddx(Qtex + Qex,V(e1))
- + ddx(Qtex + Qex,V(c2)) ;
-
- // Capacitance extrinsic b-c junction :
- OP_xcbcex = ddx(XQtex + XQex, V(b)) ;
-
- OP_cb1b2 = - ddx(Qb1b2, V(b2)) - ddx(Qb1b2, V(c2)); // Capacitance AC current crowding
-
- OP_cb1b2x = - ddx(Qb1b2, V(e1)); // Cross-capacitance AC current crowding
- OP_cb1b2y = - ddx(Qb1b2, V(c2)); // Cross-capacitance AC current crowding
- OP_cb1b2z = - ddx(Qb1b2, V(c1)) ; // Cross-capacitance AC current crowding
-
-`ifdef SUBSTRATE
- OP_cts = ddx(Qts, V(s)) ; // Capacitance s-c junction
-`endif
-
- // Approximate small signal equivalent circuit
- dydx = (OP_gx - OP_gmux) / (OP_grcvy + OP_gmuy - OP_gy);
- dydz = (OP_gz - OP_grcvz - OP_gmuz) / (OP_grcvy + OP_gmuy - OP_gy);
- gpi = OP_sgpi + OP_gpix + OP_gmux + OP_gpiz + OP_gmuz +
- (OP_gpiy + OP_gmuy) * (dydx + dydz);
- OP_gm = (OP_grcvy * (OP_gx - OP_gmux + // Transconductance
- OP_gz - OP_gmuz) - OP_grcvz *
- (OP_gy - OP_gmuy)) / (OP_grcvy + OP_gmuy - OP_gy);
- OP_beta = OP_gm / gpi; // Current amplification
- OP_gout = ((OP_gy - OP_gmuy) * OP_grcvz - // Output conductance
- (OP_gz - OP_gmuz) * OP_grcvy) /
- (OP_grcvy + OP_gmuy - OP_gy);
- OP_gmu = OP_gpiz + OP_gmuz + (OP_gpiy + OP_gmuy) * dydz + // Feedback transconductance
- OP_gmuex + OP_xgmuex;
- OP_rb = RBC_TM + OP_rbv; // Base resistance
- OP_rc = OP_rcc + OP_rcblx + OP_rcbli; // Collector resistance
- OP_cbe = OP_cbex + OP_scbe + OP_cbcx + // Base-emitter capacitance
- (OP_cbey + OP_cbcy) * dydx + CBEO_M;
- OP_cbc = (OP_cbey + OP_cbcy) * dydz + OP_cbcz + // Base-collector capacitance
- OP_cbcex + OP_xcbcex + CBCO_M;
-
-
- // Quantities to describe internal state of the model
- gammax = (OP_gpix + OP_gmux - OP_grbvx) * OP_rbv;
- gammay = (OP_gpiy + OP_gmuy - OP_grbvy) * OP_rbv;
- gammaz = (OP_gpiz + OP_gmuz - OP_grbvz) * OP_rbv;
- gbfx = OP_gpix + OP_sgpi * (1.0 + gammax);
- gbfy = OP_gpiy + OP_sgpi * gammay;
- gbfz = OP_gpiz + OP_sgpi * gammaz;
-
- // RvdT March 2008:
- alpha_ft = (1.0 + (OP_grcvy * dydx * OP_rc) +
- (OP_gx + gbfx + (OP_gy + gbfy) * dydx) * RE_TM)/
- (1.0 - (OP_grcvz + OP_grcvy * dydz) * OP_rc -
- (OP_gz + gbfz + (OP_gy + gbfy) * dydz) * RE_TM);
-
- rx = pow((OP_grcvy * dydx + alpha_ft * (OP_grcvz + OP_grcvy * dydz)), -1);
- rz = alpha_ft * rx;
- ry = (1.0 - OP_grcvz * rz) / OP_grcvy;
- rb1b2 = gammax * rx + gammay * ry + gammaz * rz;
- rex = rz + rb1b2 - OP_rcbli;
- xrex = rz + rb1b2 + RBC_TM * ((gbfx + OP_gmux) * rx + (gbfy + OP_gmuy) * ry +
- (gbfz + OP_gmuz) * rz) - OP_rcbli - OP_rcblx;
-
- taut = OP_scbe * (rx + rb1b2) + (OP_cbex + OP_cbcx) * rx + (OP_cbey + OP_cbcy) *
- ry + (OP_cbez + OP_cbcz) * rz + OP_cbcex * rex + OP_xcbcex * xrex +
- (CBEO_M + CBCO_M) * (xrex - RCCxx_TM);
-
- OP_ft = 1.0 / (2.0 * `PI * taut); // Good approximation for cut-off frequency
- OP_iqs = Iqs; // Current at onset of quasi-saturation
- OP_xiwepi = xi_w; // Thickness of injection layer
- OP_vb2c2star = Vb2c2star; // Physical value of internal base-collector bias
-
- //self-heating
-`ifdef SELFHEATING
- OP_pdiss = power_dis; // Dissipation
-`endif
-
- OP_tk = Tk; // Actual temperature
-
-`endif
- end
diff --git a/src/spicelib/devices/adms/mextram/admsva/opvars.inc b/src/spicelib/devices/adms/mextram/admsva/opvars.inc
deleted file mode 100644
index e892da1d6..000000000
--- a/src/spicelib/devices/adms/mextram/admsva/opvars.inc
+++ /dev/null
@@ -1,156 +0,0 @@
-// Copyright (c) 2000-2007, NXP Semiconductor
-// Copyright (c) 2007-2014, Delft University of Technology
-// Copyright (c) 2015, Auburn University
-// All rights reserved, see IP_NOTICE_DISCLAIMER_LICENSE for further information.
-
-//
-// Operation point (output) variables
-//
-
-// The external currents and current gain
-`OPP(OP_ic, A, External DC collector current)
-`OPP(OP_ib, A, External DC base current)
-`OPP(OP_betadc, , External DC current gain Ic/Ib)
-
-// begin added in MXT 504.9:
-`OPP(OP_ie, A, External DC emitter current)
-
-// The external biases
-`OPP(OP_vbe, V, External base-emitter bias)
-`OPP(OP_vce, V, External collector-emitter bias)
-`OPP(OP_vbc, V, External base-collector bias)
-
-`ifdef SUBSTRATE
-`OPP(OP_is, A, External DC substrate current)
-`OPP(OP_vse, V, External substrate-emitter bias)
-`OPP(OP_vbs, V, External base-substrate bias)
-`OPP(OP_vsc, V, External substrate-collector bias)
-`endif
-
-// end added in MXT 504.9
-// The internal biases
-`OPP(OP_vb2e1, V, Internal base-emitter bias)
-`OPP(OP_vb2c2, V, Internal base-collector bias)
-`OPP(OP_vb2c1, V, Internal base-collector bias including epilayer)
-`OPP(OP_vb1c1, V, External base-collector bias without contact resistances)
-`OPP(OP_vc4c1, V, Bias over intrinsic buried layer)
-`OPP(OP_vc3c4, V, Bias over extrinsic buried layer)
-`OPP(OP_ve1e, V, Bias over emitter resistance)
-
-// The actual currents
-`OPP(OP_in, A, Main current)
-`OPP(OP_ic1c2, A, Epilayer current)
-`OPP(OP_ib1b2, A, Pinched-base current)
-`OPP(OP_ib1, A, Ideal forward base current)
-`OPP(OP_sib1, A, Ideal side-wall base current)
-//
-// 504.8, RvdT, TU-Delft April. 2009, Zener tunneling current:
-//
-`OPP(OP_izteb, A, Zener tunneling current in the emitter base junction)
-//
-`OPP(OP_ib2, A, Non-ideal forward base current)
-`OPP(OP_ib3, A, Non-ideal reverse base current)
-`OPP(OP_iavl, A, Avalanche current)
-`OPP(OP_iex, A, Extrinsic reverse base current)
-
-`OPP(OP_xiex, A, Extrinsic reverse base current)
-`ifdef SUBSTRATE
-`OPP(OP_isub, A, Substrate current)
-`OPP(OP_xisub, A, Substrate current)
-`OPP(OP_isf, A, Substrate failure current)
-`endif
-`OPP(OP_ire, A, Current through emitter resistance)
-`OPP(OP_irbc, A, Current through constant base resistance)
-`OPP(OP_ircblx, A, Current through extrinsic buried layer resistance)
-`OPP(OP_ircbli, A, Current through intrinsic buried layer resistance)
-`OPP(OP_ircc, A, Current through collector contact resistance)
-
-//The actual charges
-`OPP(OP_qe, C, Emitter charge or emitter neutral charge)
-`OPP(OP_qte, C, Base-emitter depletion charge)
-`OPP(OP_sqte, C, Sidewall base-emitter depletion charge)
-`OPP(OP_qbe, C, Base-emitter diffusion charge)
-`OPP(OP_qbc, C, Base_collector diffusion charge)
-`OPP(OP_qtc, C, Base-collector depletion charge)
-`OPP(OP_qepi, C, Epilayer diffusion charge)
-`OPP(OP_qb1b2, C, AC current crowding charge)
-`OPP(OP_qtex, C, Extrinsic base-collector depletion charge)
-`OPP(OP_xqtex, C, Extrinsic base-collector depletion charge)
-`OPP(OP_qex, C, Extrinsic base-collector diffusion charge)
-`OPP(OP_xqex, C, Extrinsic base-collector diffusion charge)
-`ifdef SUBSTRATE
-`OPP(OP_qts, C, Collector-substrate depletion charge)
-`endif
-
-//Small signal equivalent circuit conductances and resistances
-`OPP(OP_gx, S, Forward transconductance)
-`OPP(OP_gy, S, Reverse transconductance)
-`OPP(OP_gz, S, Reverse transconductance)
-`OPP(OP_sgpi, S, Conductance sidewall b-e junction)
-`OPP(OP_gpix, S, Conductance floor b-e junction)
-`OPP(OP_gpiy, S, Early effect on recombination base current)
-`OPP(OP_gpiz, S, Early effect on recombination base current)
-`OPP(OP_gmux, S, Early effect on avalanche current limiting)
-`OPP(OP_gmuy, S, Conductance of avalanche current)
-`OPP(OP_gmuz, S, Conductance of avalanche current)
-`OPP(OP_gmuex, S, Conductance of extrinsic b-c junction)
-`OPP(OP_xgmuex, S, Conductance of extrinsic b-c junction)
-`OPP(OP_grcvy, S, Conductance of epilayer current)
-`OPP(OP_grcvz, S, Conductance of epilayer current)
-`OPP(OP_rbv, Ohm, Base resistance)
-`OPP(OP_grbvx, S, Early effect on base resistance)
-`OPP(OP_grbvy, S, Early effect on base resistance)
-`OPP(OP_grbvz, S, Early effect on base resistance)
-`OPP(OP_re, Ohm, Emitter resistance)
-`OPP(OP_rbc, Ohm, Constant base resistance)
-`OPP(OP_rcc, Ohm, Collector contact resistance)
-`OPP(OP_rcblx, Ohm, Extrinsic buried layer resistance)
-`OPP(OP_rcbli, Ohm, Intrinsic buried layer resistance)
-`ifdef SUBSTRATE
-`OPP(OP_gs, S, Conductance parasitic PNP transistor)
-`OPP(OP_xgs, S, Conductance parasitic PNP transistor)
-`OPP(OP_gsf, S, Conductance substrate failure current)
-`endif
-//Small signal equivalent circuit capacitances
-`OPP(OP_scbe, F, Capacitance sidewall b-e junction)
-`OPP(OP_cbex, F, Capacitance floor b-e junction)
-`OPP(OP_cbey, F, Early effect on b-e diffusion charge)
-`OPP(OP_cbez, F, Early effect on b-e diffusion charge)
-`OPP(OP_cbcx, F, Early effect on b-c diffusion charge)
-`OPP(OP_cbcy, F, Capacitance floor b-c junction)
-`OPP(OP_cbcz, F, Capacitance floor b-c junction)
-`OPP(OP_cbcex, F, Capacitance extrinsic b-c junction)
-`OPP(OP_xcbcex, F, Capacitance extrinsic b-c junction)
-`OPP(OP_cb1b2, F, Capacitance AC current crowding)
-`OPP(OP_cb1b2x, F, Cross-capacitance AC current crowding)
-`OPP(OP_cb1b2y, F, Cross-capacitance AC current crowding)
-`OPP(OP_cb1b2z, F, Cross-capacitance AC current crowding)
-`ifdef SUBSTRATE
-`OPP(OP_cts, F, Capacitance s-c junction)
-`endif
-//Approximate small signal equivalent circuit
-`OPP(OP_gm, S,transconductance)
-`OPP(OP_beta, , Current amplification)
-`OPP(OP_gout, S, Output conductance)
-`OPP(OP_gmu, S, Feedback transconductance)
-`OPP(OP_rb, Ohm, Base resistance)
-`OPP(OP_rc, Ohm, Collector resistance)
-`OPP(OP_cbe, C, Base-emitter capacitance)
-`OPP(OP_cbc, C, Base-collector capacitance)
-
-//quantities to describe internal state of the model
-`OPP(OP_ft, , Good approximation for cut-off frequency)
-`OPP(OP_iqs, A, Current at onset of quasi-saturation)
-`OPP(OP_xiwepi, m, Thickness of injection layer)
-`OPP(OP_vb2c2star, V, Physical value of internal base-collector bias)
-
-//self-heating
-`ifdef SELFHEATING
-`OPP(OP_pdiss, W, Dissipation)
-`endif
-`OPP(OP_tk, K, Actual temperature)
-
-//help variables
-real dydx, dydz, gpi;
-real gammax, gammay, gammaz, gbfx, gbfy, gbfz, alpha_ft;
-real rx, ry, rz, rb1b2, rex, xrex, taut;
diff --git a/src/spicelib/devices/adms/mextram/admsva/parameters.inc b/src/spicelib/devices/adms/mextram/admsva/parameters.inc
deleted file mode 100644
index f6660f46b..000000000
--- a/src/spicelib/devices/adms/mextram/admsva/parameters.inc
+++ /dev/null
@@ -1,115 +0,0 @@
-// Copyright (c) 2000-2007, NXP Semiconductor
-// Copyright (c) 2007-2014, Delft University of Technology
-// Copyright (c) 2015, Auburn University
-// All rights reserved, see IP_NOTICE_DISCLAIMER_LICENSE for further information.
-
-// Mextram parameters
-`MPIco( LEVEL ,504 ,"" ,504 ,505 ,"Model level" )
-`MPRco( TREF ,25.0 ,"" ,-273.0 ,inf ,"Reference temperature" )
-`MPRnb( DTA ,0.0 ,"" ,"Difference between the local and global ambient temperatures" )
-`MPIcc( EXMOD ,1 ,"" ,0 ,2 ,"Flag for extended modeling of the reverse current gain" )
-`MPIcc( EXPHI ,1 ,"" ,0 ,1 ,"Flag for the distributed high-frequency effects in transient" )
-`MPIcc( EXAVL ,0 ,"" ,0 ,1 ,"Flag for extended modeling of avalanche currents" )
-
-`ifdef SUBSTRATE
-`MPIcc( EXSUB ,0 ,"" ,0 ,1 ,"Flag for extended modelling of substrate currents" )
-`endif
-
-`MPRoo( IS ,22.0a ,"" ,0.0 ,inf ,"Collector-emitter saturation current" )
-`MPRco( IK ,0.1 ,"" ,1.0p ,inf ,"Collector-emitter high injection knee current" )
-`MPRco( VER ,2.5 ,"" ,0.01 ,inf ,"Reverse Early voltage" )
-`MPRco( VEF ,44.0 ,"" ,0.01 ,inf ,"Forward Early voltage" )
-`MPRco( BF ,215.0 ,"" ,0.1m ,inf ,"Ideal forward current gain" )
-`MPRco( IBF ,2.7f ,"" ,0.0 ,inf ,"Saturation current of the non-ideal forward base current" )
-`MPRco( MLF ,2.0 ,"" ,0.1 ,inf ,"Non-ideality factor of the non-ideal forward base current" )
-`MPRcc( XIBI ,0.0 ,"" ,0.0 ,1.0 ,"Part of ideal base current that belongs to the sidewall" )
-`MPRco( IZEB ,0.0 ,"" ,0.0 ,inf ,"Pre-factor of emitter-base Zener tunneling current" )
-`MPRco( NZEB ,22.0 ,"" ,0.0 ,inf ,"Coefficient of emitter-base Zener tunneling current" )
-`MPRco( BRI ,7.0 ,"" ,1.0e-4 ,inf ,"Ideal reverse current gain" )
-`MPRco( IBR ,1.0f ,"" ,0.0 ,inf ,"Saturation current of the non-ideal reverse base current" )
-`MPRnb( VLR ,0.2 ,"" ,"Cross-over voltage of the non-ideal reverse base current" )
-`MPRcc( XEXT ,0.63 ,"" ,0.0 ,1.0 ,"Part of currents and charges that belong to extrinsic region" )
-`MPRco( WAVL ,1.1u ,"" ,1.0n ,inf ,"Epilayer thickness used in weak-avalanche model" )
-`MPRco( VAVL ,3.0 ,"" ,0.01 ,inf ,"Voltage determining curvature of avalanche current" )
-`MPRco( SFH ,0.3 ,"" ,0.0 ,inf ,"Current spreading factor of avalanche model when EXAVL=1" )
-`MPRco( RE ,5.0 ,"" ,1.0m ,inf ,"Emitter resistance" )
-`MPRco( RBC ,23.0 ,"" ,1.0m ,inf ,"Constant part of the base resistance" )
-`MPRco( RBV ,18.0 ,"" ,1.0m ,inf ,"Zero-bias value of the variable part of the base resistance" )
-`MPRco( RCC ,12.0 ,"" ,1.0m ,inf ,"Constant part of the collector resistance" )
-`MPRco( RCV ,150.0 ,"" ,1.0m ,inf ,"Resistance of the un-modulated epilayer" )
-`MPRco( SCRCV ,1250.0 ,"" ,1.0m ,inf ,"Space charge resistance of the epilayer" )
-`MPRco( IHC ,4.0m ,"" ,1.0p ,inf ,"Critical current for velocity saturation in the epilayer" )
-`MPRco( AXI ,0.3 ,"" ,0.02 ,inf ,"Smoothness parameter for the onset of quasi-saturation" )
-`MPRco( CJE ,73.0f ,"" ,0.0 ,inf ,"Zero-bias emitter-base depletion capacitance" )
-`MPRco( VDE ,0.95 ,"" ,0.05 ,inf ,"Emitter-base diffusion voltage" )
-`MPRco( PE ,0.4 ,"" ,0.01 ,0.99 ,"Emitter-base grading coefficient" )
-`MPRcc( XCJE ,0.4 ,"" ,0.0 ,1.0 ,"Sidewall fraction of the emitter-base depletion capacitance" )
-`MPRco( CBEO ,0.0 ,"" ,0.0 ,inf ,"Emitter-base overlap capacitance" )
-`MPRco( CJC ,78.0f ,"" ,0.0 ,inf ,"Zero-bias collector-base depletion capacitance" )
-`MPRco( VDC ,0.68 ,"" ,0.05 ,inf ,"Collector-base diffusion voltage" )
-`MPRco( PC ,0.5 ,"" ,0.01 ,0.99 ,"Collector-base grading coefficient" )
-`MPRco( XP ,0.35 ,"" ,0.0 ,0.99 ,"Constant part of Cjc" )
-`MPRco( MC ,0.5 ,"" ,0.0 ,1.0 ,"Coefficient for current modulation of CB depletion capacitance" )
-`MPRcc( XCJC ,32.0m ,"" ,0.0 ,1.0 ,"Fraction of CB depletion capacitance under the emitter" )
-`MPRco( RCBLX ,0.001 ,"" ,0.001 ,inf ,"Resistance Collector Buried Layer eXtrinsic" )
-`MPRco( RCBLI ,0.001 ,"" ,0.001 ,inf ,"Resistance Collector Buried Layer Intrinsic" )
-`MPRco( CBCO ,0.0 ,"" ,0.0 ,inf ,"Collector-base overlap capacitance" )
-`MPRco( MTAU ,1.0 ,"" ,0.1 ,inf ,"Non-ideality factor of the emitter stored charge" )
-`MPRco( TAUE ,2.0p ,"" ,0.0 ,inf ,"Minimum transit time of stored emitter charge" )
-`MPRoo( TAUB ,4.2p ,"" ,0.0 ,inf ,"Transit time of stored base charge" )
-`MPRco( TEPI ,41.0p ,"" ,0.0 ,inf ,"Transit time of stored epilayer charge" )
-`MPRco( TAUR ,520.0p ,"" ,0.0 ,inf ,"Transit time of reverse extrinsic stored base charge" )
-`MPRnb( DEG ,0.0 ,"" ,"Bandgap difference over the base" )
-`MPRco( XREC ,0.0 ,"" ,0.0 ,inf ,"Pre-factor of the recombination part of Ib1" )
-`MPRcc( XQB ,`one_third ,"" ,0.0 ,1.0 ,"Emitter-fraction of base diffusion charge" )
-`MPRnb( AQBO ,0.3 ,"" ,"Temperature coefficient of the zero-bias base charge" )
-`MPRnb( AE ,0.0 ,"" ,"Temperature coefficient of the resistivity of the emitter" )
-`MPRnb( AB ,1.0 ,"" ,"Temperature coefficient of the resistivity of the base" )
-`MPRnb( AEPI ,2.5 ,"" ,"Temperature coefficient of the resistivity of the epilayer" )
-`MPRnb( AEX ,0.62 ,"" ,"Temperature coefficient of the resistivity of the extrinsic base" )
-`MPRnb( AC ,2.0 ,"" ,"Temperature coefficient of the resistivity of the collector contact" )
-`MPRco( ACBL ,2.0 ,"" ,0.0 ,inf ,"Temperature coefficient of the resistivity of the collector buried layer" )
-`MPRnb( DVGBF ,50.0m ,"" ,"Band-gap voltage difference of the forward current gain" )
-`MPRnb( DVGBR ,45.0m ,"" ,"Band-gap voltage difference of the reverse current gain" )
-`MPRco( VGB ,1.17 ,"" ,0.1 ,inf ,"Band-gap voltage of the base" )
-`MPRco( VGC ,1.18 ,"" ,0.1 ,inf ,"Band-gap voltage of the collector" )
-`MPRco( VGJ ,1.15 ,"" ,0.1 ,inf ,"Band-gap voltage recombination emitter-base junction" )
-`MPRco( VGZEB ,1.15 ,"" ,0.1 ,inf ,"Band-gap voltage at Tref of Zener effect emitter-base junction" )
-`MPRoo( AVGEB ,4.73e-4 ,"" ,-inf ,inf ,"Temperature coefficient band-gap voltage for Zener effect emitter-base junction" )
-`MPRco( TVGEB ,636.0 ,"" ,0.0 ,inf ,"Temperature coefficient band-gap voltage for Zener effect emitter-base junction" )
-`MPRnb( DVGTE ,0.05 ,"" ,"Band-gap voltage difference of emitter stored charge" )
-`MPRnb( DAIS ,0.0 ,"" ,"Fine tuning of temperature dependence of C-E saturation current" )
-`MPRco( AF ,2.0 ,"" ,0.01 ,inf ,"Exponent of the Flicker-noise" )
-`MPRco( KF ,20.0p ,"" ,0.0 ,inf ,"Flicker-noise coefficient of the ideal base current" )
-`MPRco( KFN ,20.0p ,"" ,0.0 ,inf ,"Flicker-noise coefficient of the non-ideal base current" )
-`MPIcc( KAVL ,0 ,"" ,0 ,1 ,"Switch for white noise contribution due to avalanche" )
-`MPIcc( KC ,0 ,"" ,0 ,2 ,"Switch for RF correlation noise model selection" )
-`MPRcc( KE ,0.0 ,"" ,0.0 ,1.0 ,"Fraction of QE in excess phase shift" )
-`MPRcc( FTAUN ,0.0 ,"" ,0.0 ,1.0 ,"Fraction of noise transit time to total transit time" )
-
-`ifdef SUBSTRATE
-`MPRco( ISS ,48.0a ,"" ,0.0 ,inf ,"Base-substrate saturation current" )
-`MPRoo( ICSS ,-1.0 ,"" ,-inf ,inf ,"Collector-substrate ideal saturation current" )
-`MPRco( IKS ,250.0u ,"" ,1.0p ,inf ,"Base-substrate high injection knee current" )
-`MPRco( CJS ,315.0f ,"" ,0.0 ,inf ,"Zero-bias collector-substrate depletion capacitance" )
-`MPRoo( VDS ,0.62 ,"" ,0.05 ,inf ,"Collector-substrate diffusion voltage" )
-`MPRoo( PS ,0.34 ,"" ,0.01 ,0.99 ,"Collector-substrate grading coefficient" )
-`MPRco( VGS ,1.20 ,"" ,0.1 ,inf ,"Band-gap voltage of the substrate" )
-`MPRnb( AS ,1.58 ,"" ,"Substrate temperature coefficient" )
-`MPRnb( ASUB ,2.0 ,"" ,"Temperature coefficient for mobility of minorities in the substrate" )
-`endif
-
-`ifdef SELFHEATING
-`MPRoo( RTH ,300.0 ,"" ,0.0 ,inf ,"Thermal resistance" )
-`MPRco( CTH ,3.0n ,"" ,0.0 ,inf ,"Thermal capacitance" )
-`MPRnb( ATH ,0.0 ,"" ,"Temperature coefficient of the thermal resistance" )
-`endif
-
-`MPRoo( MULT ,1.0 ,"" ,0.0 ,inf ,"Multiplication factor" )
-`MPIty( TYPE ,1 ,"" ,"Flag for NPN (1) or PNP (-1) transistor type" )
-`MPRoc( GMIN ,1.0e-13 ,"" ,0.0 ,1e-10 ,"Minimum conductance" )
-
-
-
-
-
diff --git a/src/spicelib/devices/adms/mextram/admsva/tscaling.inc b/src/spicelib/devices/adms/mextram/admsva/tscaling.inc
deleted file mode 100644
index 53c1d0b94..000000000
--- a/src/spicelib/devices/adms/mextram/admsva/tscaling.inc
+++ /dev/null
@@ -1,237 +0,0 @@
-// Copyright (c) 2000-2007, NXP Semiconductor
-// Copyright (c) 2007-2014, Delft University of Technology
-// Copyright (c) 2015, Auburn University
-// All rights reserved, see IP_NOTICE_DISCLAIMER_LICENSE for further information.
-
-// Temperature scaling of parameters
-
-// The excess transistor temperature due to the self-heating
-`ifdef SELFHEATING
- Tki = V(dt);
- // *** Convergence related smoothing ***
- if (Tki < 0.0) begin
- Tki = - ln(1.0 - Tki);
- end
- `linLog(Vdt, Tki, 200.0);
- // `min_logexp(Vdt, Tki, 200.0, 10.0);
-`else
- Vdt = 0.0;
-`endif
-
-// Temperature variables
-Tk = Tamb + Vdt;
-
-tN = Tk / Trk;
-Vt = `KBdivQQ * Tk;
-Vtr = `KBdivQQ * Trk;
-VtINV = 1.0 / Vt;
-VtrINV = 1.0 / Vtr;
-VdtINV = VtINV - VtrINV;
-
-lntN = ln(tN) ;
-
-// begin: RvdT, November 2008, "Zener tunneling model"
-// VGZEB_T = VGZEBOK - AVGEB*Tk*Tk / (Tk + TVGEB) ;
-`max_logexp(VGZEB_T, VGZEBOK - AVGEB*Tk*Tk / (Tk + TVGEB), 0.05, 0.1) ;
-
-// end: RvdT, November 2008, "Zener tunneling model"
-
-// Depletion capacitances
-
-UdeT = -3.0 * Vt * ln(tN) + VDE * tN + (1.0 - tN) * VGB;
-`max_logexp(VDE_T, `VDLOW, UdeT, Vt);
-
-UdcT = -3.0 * Vt * ln(tN) + VDC * tN + (1.0 - tN) * VGC;
-`max_logexp(VDC_T, `VDLOW, UdcT, Vt);
-
-`ifdef SUBSTRATE
- UdsT = -3.0 * Vt * ln(tN) + VDS * tN + (1.0 - tN) * VGS;
- `max_logexp(VDS_T, `VDLOW, UdsT, Vt);
-`endif
-inv_VDE_T = 1.0 / VDE_T ;
-CJE_T_div_CJE = pow(VDE * inv_VDE_T, PE);
-CJE_T = CJE * CJE_T_div_CJE ;
-
-`ifdef SUBSTRATE
- CJS_T = CJS * pow(VDS / VDS_T, PS);
-`endif
-
-CJCscale = ((1.0 - XP) * pow(VDC / VDC_T, PC) + XP);
-CJCscaleINV = 1.0 / CJCscale;
-
-CJC_T = CJC * CJCscale;
-XP_T = XP * CJCscaleINV;
-
-// Resistances
-
-// RvdT, November 2008:
-// Instead of the following definition
-// RE_T = RE * pow(tN, AE);
-// we use, here, and in all following powers of tN,
-// the following computationally cheaper implementation:
-RE_T = RE * exp(lntN * AE);
-// This is based on the observation that exp() is faster than pow().
-// Acknowledgement due to Geoffrey Coram.
-
-RBV_T = RBV * exp(lntN * (AB - AQBO));
-RBC_T = RBC * exp(lntN * AEX);
-
-// RvdT, 30-11-2007: new collector resistances RCCxx_T, RCCex_T, RCCin_T
-RCCxx_T = RCC * exp(lntN * AC);
-RCCex_T = RCBLX * exp(lntN * ACBL);
-RCCin_T = RCBLI * exp(lntN * ACBL);
-
-RCV_T = RCV * exp(lntN * AEPI);
-
-// Current gains
-
-BF_T = BF * exp(lntN * (AE - AB - AQBO)) * exp(-DVGBF * VdtINV);
-BRI_T = BRI * exp(-DVGBR * VdtINV);
-
-// Currents and voltages
-
-IS_T = IS * exp(lntN * (4.0 - AB - AQBO + DAIS)) * exp(-VGB * VdtINV);
-IK_T = IK * exp(lntN * (1.0 - AB));
-IBF_T = IBF * exp(lntN * (6.0 - 2.0 * MLF)) * exp(-VGJ * VdtINV / MLF);
-IBR_T = IBR * tN * tN * exp(-VGC * VdtINV / 2.0);
-
-// begin RvdT, November 2008, MXT504.8_alpha
-// T-scaling BE tunneling:
-//
-x = pow(VGZEB_T * inv_VGZEB_Tr, -0.5) ;
-// y = pow(VDE_T * inv_VDE, PE) ;
-// more efficient, because we need both y and 1.0 / y:
-y = 1.0 / CJE_T_div_CJE ;
-// definition:
-// nZEB_T = NZEB* pow(VGZEB_T/VGZEB_Tr, 1.5) * pow(VDE_T / VDE, PE-1) ;
-// more efficient implementation:
-// nZEB_T = NZEB* VGZEB_T * VGZEB_T * x * y * VDE /(VDE_T*VGZEB_Tr*VGZEB_Tr) ;
-nZEB_T = NZEB* VGZEB_T * VGZEB_T * x * y * VDE * inv_VDE_T*inv_VGZEB_Tr*inv_VGZEB_Tr ;
-
-// definition:
-// IZEB_T = IZEB* pow(VGZEB_T/VGZEB_Tr, -0.5) * pow(VDE_T / VDE, 2-PE) * exp(NZEB-nZEB_T);
-// more efficient implementation:
-IZEB_T = IZEB* x * VDE_T * VDE_T * inv_VDE * inv_VDE * CJE_T_div_CJE * exp(NZEB-nZEB_T) ;
-//
-// end RvdT, November 2008, MXT504.8_alpha
-
-x = exp(lntN * AQBO) ;
-VEF_T = VEF * x * CJCscaleINV;
-// VER_T = VER * x * pow(VDE / VDE_T, -PE);
-VER_T = VER * x * y;
-
-`ifdef SUBSTRATE
- ISS_T = ISS * exp(lntN * (4.0 - AS)) * exp(-VGS * VdtINV);
- // New 504.9:
- ICSS_T = ICSS * exp(lntN * (3.5 - 0.5 * ASUB)) * exp(-VGS * VdtINV);
- // End New 504.9.
-
- if ((ISS_T > 0.0))
- IKS_T = IKS * exp(lntN * (1.0 - AS)) * (IS_T / IS) * (ISS / ISS_T);
- else
- IKS_T = IKS * exp(lntN * (1.0 - AS));
-`endif
-
-// Transit times
-
-TAUE_T = TAUE * exp(lntN * (AB - 2.0)) * exp(-DVGTE * VdtINV);
-TAUB_T = TAUB * exp(lntN * (AQBO + AB - 1.0));
-TEPI_T = TEPI * exp(lntN * (AEPI - 1.0));
-TAUR_T = TAUR * (TAUB_T + TEPI_T) / (TAUB + TEPI);
-
-// Avalanche constant
-
-Tk300 = Tk - 300.0;
-// RvdT, 15-02-2008: prevent division by zero and overflow at high temperatures:
-if (Tk < 525.0)
-begin
- BnT = Bn * (1.0 + 7.2e-4 * Tk300 - 1.6e-6 * Tk300 * Tk300) ;
-end
-else
-begin
- BnT = Bn * 1.081 ;
-end
-
-// Heterojunction features
-
-DEG_T = DEG * exp(lntN * AQBO);
-
-`ifdef SELFHEATING
- // Temperature scaling of the thermal resistance
-
- RTH_Tamb = RTH * pow(Tamb / Trk, ATH);
-`endif
-
-// MULT - scaling
-
-IS_TM = IS_T * MULT;
-IK_TM = IK_T * MULT;
-IBF_TM = IBF_T * MULT;
-IBR_TM = IBR_T * MULT;
-// RvdT: November 2008, Zener tunneling parameters
-IZEB_TM = IZEB_T * MULT ;
-
-// end Zener tunneling parameters
-
-
-IHC_M = IHC * MULT;
-`ifdef SUBSTRATE
- ISS_TM = ISS_T * MULT;
- // New: 504.9
- ICSS_TM = ICSS_T * MULT;
- IKS_TM = IKS_T * MULT;
-`endif
-CJE_TM = CJE_T * MULT;
-CJC_TM = CJC_T * MULT;
-
-// begin RvdT, 28-10-2008, MXT504.8_alpha
-// Base-emitter tunneling current Mult scaling:
-// BTJE_TM = BTJE_T * MULT;
-// end RvdT, 28-10-2008, MXT504.8_alpha
-
-
-`ifdef SUBSTRATE
- CJS_TM = CJS_T * MULT;
-`endif
-
-RE_TM = RE_T * invMULT;
-RBC_TM = RBC_T * invMULT;
-RBV_TM = RBV_T * invMULT;
-// RvdT, 30-01-2007: new collector resistances:
-RCCxx_TM = RCCxx_T * invMULT;
-RCCex_TM = RCCex_T * invMULT;
-RCCin_TM = RCCin_T * invMULT;
-RCV_TM = RCV_T * invMULT;
-
-
-// RvdT, 03-12-2007: new collector conductances
-if (RCC > 0.0)
-begin
- GCCxx_TM = 1.0 / RCCxx_TM ;
-end
-else
-begin
- GCCxx_TM = 0 ;
-end
-
-if (RCBLX > 0.0)
-begin
- GCCex_TM = 1.0 / RCCex_TM ;
-end
-else
-begin
- GCCex_TM = 0 ;
-end
-
-if (RCBLI > 0.0)
-begin
- GCCin_TM = 1.0 / RCCin_TM ;
-end
-else
-begin
- GCCin_TM = 0 ;
-end
-
-`ifdef SELFHEATING
- RTH_Tamb_M = RTH_Tamb * invMULT;
-`endif
diff --git a/src/spicelib/devices/adms/mextram/admsva/variables.inc b/src/spicelib/devices/adms/mextram/admsva/variables.inc
deleted file mode 100644
index 2298390e2..000000000
--- a/src/spicelib/devices/adms/mextram/admsva/variables.inc
+++ /dev/null
@@ -1,201 +0,0 @@
-// Copyright (c) 2000-2007, NXP Semiconductor
-// Copyright (c) 2007-2014, Delft University of Technology
-// Copyright (c) 2015, Auburn University
-// All rights reserved, see IP_NOTICE_DISCLAIMER_LICENSE for further information.
-
-// Declaration of variables
-
-real _x, _x0, _a, _dxa;
-
-// Model constants
-
-real An, Bn;
-
-// Temperature scaling variables
-
-real Tk, Trk, tN, Tamb;
-real Vt, Vtr, VtINV, VtrINV, VdtINV;
-real Vdt;
-
-real UdeT, VDE_T, UdcT, VDC_T;
-real CJE_T, CJC_T, XP_T;
-real CJCscale, CJCscaleINV;
-
-real RE_T, RBV_T, RBC_T, RCV_T;
-// RvdT: 30-01-2007, new collector resistances:
-real RCCxx_T, RCCex_T, RCCin_T;
-
-real BF_T, BRI_T;
-
-real IS_T, IK_T, IBF_T, IBR_T, VEF_T, VER_T;
-
-// RvdT: November 2008, Zener tunneling parameters and variables:
-real Izteb, IZEB_T, E0BE, dE0BE,nZEB_T, pow2_2mPE, pow2_PEm2, inv_VDE, inv_VDE_T;
-real eZEB, edZEB, DZEB, VGZEB_T, VGZEB_Tr, inv_VGZEB_Tr, CJE_T_div_CJE ;
-
-// RvdT: March 2009, Zener tunneling parameters and variables:
-real VGZEBOK;
-
-// end Zener tunneling parameters
-
-real TAUE_T, TAUB_T, TEPI_T, TAUR_T;
-real BnT, DEG_T, Tk300;
-
-`ifdef SELFHEATING
-real RTH_Tamb;
-`endif
-
-`ifdef SUBSTRATE
-real UdsT, VDS_T, CJS_T, ISS_T, ICSS_T, IKS_T;
-`endif
-
-// MULT - scaling variables
-
-real invMULT;
-real IS_TM, IK_TM, IBF_TM, IBR_TM, IHC_M;
-// RvdT: November 2008, Zener tunneling parameters
-real IZEB_TM ;
-
-// end Zener tunneling parameters
-
-
-
-
-real CJE_TM, CJC_TM;
-
-real RE_TM, RBC_TM, RBV_TM, RCV_TM, SCRCV_M;
-// RvdT: 30-01-2007, new collector resistances:
-real RCCxx_TM, RCCex_TM, RCCin_TM;
-// RvdT: 03-12-2007, new collector conductances:
-real GCCxx_TM, GCCex_TM, GCCin_TM;
-
-
-real KF_M, KFN_M;
-
-`ifdef SELFHEATING
-real RTH_Tamb_M, CTH_M;
-`endif
-
-`ifdef SUBSTRATE
-real ISS_TM, ICSS_TM, IKS_TM, CJS_TM;
-`endif
-
-
-// Epilayer model variables
-
-real K0, Kw, pW, Ec, Ic1c2;
-real Vqs_th, Vqs, Iqs;
-real alpha, vyi, yi, xi_w, xi_w1;
-real gp0, gp02, p0star, Vb2c2star, eVb2c2star;
-real B1, B2, Vxi0, Vch, Icap, pav;
-
-// Effective emitter and collector junction bias variables
-
-real Vfe, Vje, Vte;
-real Vjunc, bjc, Vfc, Vjc, fI, Vcv, Vtc;
-
-// Transfer current variables
-
-real If0, f1, f2, n0, nB;
-real q0I, q1I, qBI, Ir, If, In;
-
-// Base and substrate current(s) variables
-
-real Xext1;
-real Ib1, Ib1_s, Ib2, Ib3;
-real Ibf0, Iex;
-real g1, g2, pWex, nBex;
-real Xg1, XnBex, XIMex, XIMsub, Vex, VBex, Fex, XIex;
-
-`ifdef SUBSTRATE
-real Isub, XIsub, Isf;
-`endif
-
-// Distributed base effects variables
-
-real q0Q, q1Q, qBQ, Rb2, Ib1b2;
-real dVteVb2e1, dVteVje, dVjeVb2e1;
-real dQteVb2e1, dQbeVb2e1, dQeVb2e1;
-real dn0Vb2e1;
-
-// Weak-avalanche current variables
-
-real dEdx0, xd, Weff, Wd, Eav, E0, Em, SHw, Efi, Ew;
-real lambda, Gem, Gmax, Iavl;
-real Icap_IHC;
-
-`ifdef SELFHEATING
-real Tki, power_dis;
-`endif
-
-// Charges and capacitances variables
-
-real Qte, Vje_s, Qte_s;
-real Qtc;
-real Qb0, Qbe, Qbc, Qb1b2;
-real Qbe_qs, Qbc_qs;
-real Vjcex, Vtexv, Qtex, XVjcex, XVtexv, XQtex;
-
-`ifdef SUBSTRATE
-real Vfs, Vjs, Qts;
-`endif
-
-real Qe0, Qe;
-real Qe_qs;
-real Qepi0, Qepi, Xg2, XpWex, XQex;
-real Qex;
-real CBEO_M, CBCO_M;
-
-// Biases and exponential terms variables
-
-real Vb2c1, Vb2c2, Vb2e1, Vb1e1, Vb1b2, Vb1c4, Vc1c2;
-real Vc3c4, Vc4c1;
-`ifdef SUBSTRATE
-real Vsc1, Vsc3, Vsc4, eVsc1, eVsc3, eVsc4;
-`endif
-real Vee1, Vbb1, Vbc3, Vcc3, Vbe, Vbc;
-real eVb2c2, eVb2e1, eVb1e1, eVb1b2, eVb1c4, eVbc3;
-real eVb1c4VDC, eVb2c2VDC, eVbc3VDC, eVb2c1VDC;
-
-// Help variables
-
-// RvdT, November 2008, lntN introduced to speed up T-scaling:
-// Acknowledgements due to Geoffrey Coram
-real lntN ;
-
-// RvdT, November 2008 variables for local use; may be re-used globally:
-real x, y ;
-
-real dxa, sqr_arg;
-real eps2, x2;
-real alpha1, vdif, Ic1c2_Iqs, gp0_help;
-real EmEav_Em, Vb2e1Vfe, termE, termC;
-real Vex_bias;
-real eps_VDC, a_VDE, a_VDC;
-
-real expl, tmpExp, tmpV;
-
-
-`ifdef SUBSTRATE
-real a_VDS;
-`endif
-
-// Noise variables
-real common;
-real powerREC, powerRBC, powerRCCxx, powerRCCex, powerRCCin, powerRBV;
-real powerCCS;
-real powerFBCS, powerFBC1fB1, exponentFBC1fB2, powerFBC1fB2;
-real powerEBSCS, powerEBSC1f;
-real powerRBCS, powerRBC1f;
-real powerExCS, powerExCSMOD, powerExC1f, powerExC1fMOD;
-real powerIIS;
-
-`ifdef SUBSTRATE
-real powerSubsCS_B1S, powerSubsCS_BS;
-`endif
-
-// noise correlation help variables
-real In_N, Gem_N, Taub_N, taun, Qbe_qs_eff;
-
-real my_gmin;
-
diff --git a/src/spicelib/devices/adms/psp102/admsva/Common102_macrodefs.include b/src/spicelib/devices/adms/psp102/admsva/Common102_macrodefs.include
deleted file mode 100644
index 6f1ae5040..000000000
--- a/src/spicelib/devices/adms/psp102/admsva/Common102_macrodefs.include
+++ /dev/null
@@ -1,135 +0,0 @@
-//======================================================================================
-//======================================================================================
-// Filename: Common102_macrodefs.include
-//======================================================================================
-//======================================================================================
-//
-// (c) Copyright notice
-//
-// Since 2012 until today, PSP has been co-developed by NXP Semiconductors and
-// Delft University of Technology. For this part of the model, each claim undivided
-// ownership and copyrights
-// Until and including 2011, PSP has been co-developed by NXP Semiconductors and
-// Arizona State University. For this part of the model, NXP Semiconductors claims
-// undivided ownership and copyrights.
-//
-//
-// Version: 102.5.0 (PSP), 200.4.0 (JUNCAP), December 2013
-//
-//======================================================================================
-//======================================================================================
-//
-// Further information can be found in the file releasenotesPSP102.txt
-//
-
-//////////////////////////////////////////////////////////////
-//
-// General macros and constants for compact va-models
-//
-//////////////////////////////////////////////////////////////
-
-`define VERS "0.0"
-`define VREV "0.0"
-`define VERSreal 0.0
-`define VREVreal 0.0
-
-`define CLIP_LOW(val,min) ((val)>(min)?(val):(min))
-`define CLIP_HIGH(val,max) ((val)<(max)?(val):(max))
-`define CLIP_BOTH(val,min,max) ((val)>(min)?((val)<(max)?(val):(max)):(min))
-
-`define PGIVEN(p) $param_given(p)
-// Note 1: In this va-code, the `P-macro is defined such that its argument
-// is ignored during compilation; in this source code it acts as
-// a comment
-// Note 2: In this va-code, the "from" keyword in the parameter
-// list is not used. Silent clipping is used instead. One could enable
-// the Verilog-A range checking by redefining the `from-macro below.
-`ifdef insideADMS
- `define P(txt) (*txt*)
- `define INITIAL_MODEL @(initial_model)
- `define INITIAL_INSTANCE @(initial_instance)
- `define from(lower,upper) from [lower:upper]
-`else
- `define P(txt)
- `define INITIAL_MODEL
- `define INITIAL_INSTANCE
- `define from(lower,upper)
-`endif
-
-// Some functions
-`define MAX(x,y) ((x)>(y)?(x):(y))
-`define MIN(x,y) ((x)<(y)?(x):(y))
-
-// Mathematical constants
-`define PI 3.1415926535897931
-`define SQRTPI 1.77245385090551603
-
-// Physical constants
-`define KELVINCONVERSION 273.15
-`define KBOL 1.3806505E-23
-`define QELE 1.6021918E-19
-`define HBAR 1.05457168E-34
-`define MELE 9.1093826E-31
-`define EPSO 8.8541878176E-12
-`define EPSRSI 11.8
-
-// Other constants
-`define oneThird 3.3333333333333333e-01
-`define twoThirds 6.6666666666666667e-01
-
-// Constants needed in safe exponential function (called "expl")
-`define se 4.6051701859880916e+02
-`define se05 2.3025850929940458e+02
-`define ke 1.0e-200
-`define ke05 1.0e-100
-`define keinv 1.0e200
-`define ke05inv 1.0e100
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Macro definitions.
-//
-// Note that because variables in macros are not locally scoped,
-// the intermediate variables used in the macros below must be
-// explicitly declared in the main code.
-//
-/////////////////////////////////////////////////////////////////////////////
-
-
-// P3 3rd order polynomial expansion of exp()
-`define P3(u) (1.0 + (u) * (1.0 + 0.5 * ((u) * (1.0 + (u) * `oneThird))))
-
-
-// expl exp() with 3rd order polynomial extrapolation
-// for very low values (exp_low), very high
-// values (exp_high), or both (expl), to avoid overflows
-// and underflows and retain C-3 continuity
-`define expl(x, res) \
- if (abs(x) < `se05) begin\
- res = exp(x); \
- end else begin \
- if ((x) < -`se05) begin\
- res = `ke05 / `P3(-`se05 - (x)); \
- end else begin\
- res = `ke05inv * `P3((x) - `se05); \
- end \
- end
-
-`define expl_low(x, res) \
- if ((x) > -`se05) begin\
- res = exp(x); \
- end else begin\
- res = `ke05 / `P3(-`se05 - (x)); \
- end
-
-`define expl_high(x, res) \
- if ((x) < `se05) begin\
- res = exp(x); \
- end else begin \
- res = `ke05inv * `P3((x) - `se05); \
- end
-
-`define swap(a, b) \
- temp = a; \
- a = b; \
- b = temp;
diff --git a/src/spicelib/devices/adms/psp102/admsva/IP_ACKNOWLEDGMENT b/src/spicelib/devices/adms/psp102/admsva/IP_ACKNOWLEDGMENT
deleted file mode 100644
index b6c9b96d6..000000000
--- a/src/spicelib/devices/adms/psp102/admsva/IP_ACKNOWLEDGMENT
+++ /dev/null
@@ -1,12 +0,0 @@
-PSP Acknowledgement and Copyright Notice
-========================================
-
-Copyrights of PSP are with NXP Semiconductors, Delft University of
-Technology (since 2012) and Arizona State University (until and
-including 2011).
-
-Since 2012 until today PSP has been co-developed by NXP Semiconductors
-and Delft University of Technology. Until and including 2011 PSP has
-been co-developed by NXP Semiconductors and Arizona State University.
-
-See also: http://psp.ewi.tudelft.nl/page_Copyright_Disclaimer.php
diff --git a/src/spicelib/devices/adms/psp102/admsva/IP_NOTICE_DISCLAIMER_LICENSE b/src/spicelib/devices/adms/psp102/admsva/IP_NOTICE_DISCLAIMER_LICENSE
deleted file mode 100644
index 093caf280..000000000
--- a/src/spicelib/devices/adms/psp102/admsva/IP_NOTICE_DISCLAIMER_LICENSE
+++ /dev/null
@@ -1,62 +0,0 @@
-INTELLECTUAL PROPERTY NOTICE, DISCLAIMER AND LICENSE
-
-The compact model software and documentation presented at this website
-form a whole that will henceforth be denoted as the "Model".
-
-The Model presented at this website has been co-developed by NXP
-Semiconductors and Arizona State University until and including 2011.
-For this part of the Model, NXP Semiconductors claims undivided
-ownership and copyrights.
-
-Since 2012 until today the Model has been co-developed by
-NXP Semiconductors and Delft University of Technology and
-for this part each claim undivided ownership and copyrights.
-
-
-DISCLAIMER
-
-The owners are fully free to further develop, adapt and extend the
-Model as they judge necessary or desirable.
-
-The Model is distributed as is, completely without any express or
-implied warranty, or service support. The owners and their employees
-are not liable in any way for the condition or performance of the
-Model. The owners hereby disclaim all implied warranties.
-
-
-LICENSE
-
-
-NXP Semiconductors and Delft University of Technology hereby grant
-users a perpetual, irrevocable, worldwide, non-exclusive, royalty-free
-license with respect to Versions of the Model which have been released
-through this website http://psp.ewi.tudelft.nl.
-
-NXP Semiconductors and Delft University of Technology grant the users
-the right to modify, copy and redistribute the Model, both within the
-user's organization and externally, subject to the following
-restrictions.
-
-
-RESTRICTIONS
-
-1. The users agree not to charge for the Model itself but may
-charge for additions, extensions, or support.
-
-2. In any product based on the Model, the users agree to acknowledge
-the owners as developers of the Model. This acknowledgment shall
-appear in the product documentation.
-
-3. The users agree to only use the name of CMC standard models to
-identify implementations of the CMC standard models which produce the
-same outputs as Standard code for the same inputs passing all CMC QA
-tests.
-
-4. The users agree to obey all government restrictions governing
-redistribution or export of the software.
-
-5. The users agree to reproduce any copyright notice which appears on
-the software and documentation on any copy or modification of such
-made available to others.
-
-
diff --git a/src/spicelib/devices/adms/psp102/admsva/JUNCAP200_InitModel.include b/src/spicelib/devices/adms/psp102/admsva/JUNCAP200_InitModel.include
deleted file mode 100644
index af095a22b..000000000
--- a/src/spicelib/devices/adms/psp102/admsva/JUNCAP200_InitModel.include
+++ /dev/null
@@ -1,404 +0,0 @@
-//======================================================================================
-//======================================================================================
-// Filename: JUNCAP200_InitModel.include
-//======================================================================================
-//======================================================================================
-//
-// (c) Copyright notice
-//
-// Since 2012 until today, PSP has been co-developed by NXP Semiconductors and
-// Delft University of Technology. For this part of the model, each claim undivided
-// ownership and copyrights
-// Until and including 2011, PSP has been co-developed by NXP Semiconductors and
-// Arizona State University. For this part of the model, NXP Semiconductors claims
-// undivided ownership and copyrights.
-//
-//
-// Version: 102.5.0 (PSP), 200.4.0 (JUNCAP), December 2013
-//
-//======================================================================================
-//======================================================================================
-//
-// Further information can be found in the file releasenotesPSP102.txt
-//
-
-//////////////////////////////////////////////////////////////
-//
-// Calculation of internal parameters which are independent
-// on instance parameters
-//
-//////////////////////////////////////////////////////////////
-
-TRJ_i = `CLIP_LOW( TRJ , `TRJ_cliplow);
-IMAX_i = `CLIP_LOW( IMAX , `IMAX_cliplow);
-
-CJORBOT_i = `CLIP_LOW( CJORBOT , `CJORBOT_cliplow);
-CJORSTI_i = `CLIP_LOW( CJORSTI , `CJORSTI_cliplow);
-CJORGAT_i = `CLIP_LOW( CJORGAT , `CJORGAT_cliplow);
-VBIRBOT_i = `CLIP_LOW( VBIRBOT , `VBIR_cliplow);
-VBIRSTI_i = `CLIP_LOW( VBIRSTI , `VBIR_cliplow);
-VBIRGAT_i = `CLIP_LOW( VBIRGAT , `VBIR_cliplow);
-PBOT_i = `CLIP_BOTH(PBOT , `P_cliplow,`P_cliphigh);
-PSTI_i = `CLIP_BOTH(PSTI , `P_cliplow,`P_cliphigh);
-PGAT_i = `CLIP_BOTH(PGAT , `P_cliplow,`P_cliphigh);
-PHIGBOT_i = PHIGBOT;
-PHIGSTI_i = PHIGSTI;
-PHIGGAT_i = PHIGGAT;
-IDSATRBOT_i = `CLIP_LOW( IDSATRBOT , `IDSATR_cliplow);
-IDSATRSTI_i = `CLIP_LOW( IDSATRSTI , `IDSATR_cliplow);
-IDSATRGAT_i = `CLIP_LOW( IDSATRGAT , `IDSATR_cliplow);
-CSRHBOT_i = `CLIP_LOW( CSRHBOT , `CSRH_cliplow);
-CSRHSTI_i = `CLIP_LOW( CSRHSTI , `CSRH_cliplow);
-CSRHGAT_i = `CLIP_LOW( CSRHGAT , `CSRH_cliplow);
-XJUNSTI_i = `CLIP_LOW( XJUNSTI , `XJUN_cliplow);
-XJUNGAT_i = `CLIP_LOW( XJUNGAT , `XJUN_cliplow);
-CTATBOT_i = `CLIP_LOW( CTATBOT , `CTAT_cliplow);
-CTATSTI_i = `CLIP_LOW( CTATSTI , `CTAT_cliplow);
-CTATGAT_i = `CLIP_LOW( CTATGAT , `CTAT_cliplow);
-MEFFTATBOT_i = `CLIP_LOW( MEFFTATBOT , `MEFFTAT_cliplow);
-MEFFTATSTI_i = `CLIP_LOW( MEFFTATSTI , `MEFFTAT_cliplow);
-MEFFTATGAT_i = `CLIP_LOW( MEFFTATGAT , `MEFFTAT_cliplow);
-CBBTBOT_i = `CLIP_LOW( CBBTBOT , `CBBT_cliplow);
-CBBTSTI_i = `CLIP_LOW( CBBTSTI , `CBBT_cliplow);
-CBBTGAT_i = `CLIP_LOW( CBBTGAT , `CBBT_cliplow);
-FBBTRBOT_i = FBBTRBOT;
-FBBTRSTI_i = FBBTRSTI;
-FBBTRGAT_i = FBBTRGAT;
-STFBBTBOT_i = STFBBTBOT;
-STFBBTSTI_i = STFBBTSTI;
-STFBBTGAT_i = STFBBTGAT;
-VBRBOT_i = `CLIP_LOW( VBRBOT , `VBR_cliplow);
-VBRSTI_i = `CLIP_LOW( VBRSTI , `VBR_cliplow);
-VBRGAT_i = `CLIP_LOW( VBRGAT , `VBR_cliplow);
-PBRBOT_i = `CLIP_LOW( PBRBOT , `PBR_cliplow);
-PBRSTI_i = `CLIP_LOW( PBRSTI , `PBR_cliplow);
-PBRGAT_i = `CLIP_LOW( PBRGAT , `PBR_cliplow);
-
-SWJUNEXP_i = 0.0;
-if (SWJUNEXP > 0.5) begin
- SWJUNEXP_i = 1.0;
-end else begin
- SWJUNEXP_i = 0.0;
-end
-
-VJUNREF_i = `CLIP_LOW( VJUNREF , `VJUNREF_cliplow);
-FJUNQ_i = `CLIP_LOW( FJUNQ , `FJUNQ_cliplow);
-
-`ifdef JUNCAP_StandAlone
- // do nothing
-`else // JUNCAP_StandAlone
- if (SWJUNASYM == 0.0) begin
- CJORBOTD_i = CJORBOT_i;
- CJORSTID_i = CJORSTI_i;
- CJORGATD_i = CJORGAT_i;
- VBIRBOTD_i = VBIRBOT_i;
- VBIRSTID_i = VBIRSTI_i;
- VBIRGATD_i = VBIRGAT_i;
- PBOTD_i = PBOT_i;
- PSTID_i = PSTI_i;
- PGATD_i = PGAT_i;
- PHIGBOTD_i = PHIGBOT_i;
- PHIGSTID_i = PHIGSTI_i;
- PHIGGATD_i = PHIGGAT_i;
- IDSATRBOTD_i = IDSATRBOT_i;
- IDSATRSTID_i = IDSATRSTI_i;
- IDSATRGATD_i = IDSATRGAT_i;
- CSRHBOTD_i = CSRHBOT_i;
- CSRHSTID_i = CSRHSTI_i;
- CSRHGATD_i = CSRHGAT_i;
- XJUNSTID_i = XJUNSTI_i;
- XJUNGATD_i = XJUNGAT_i;
- CTATBOTD_i = CTATBOT_i;
- CTATSTID_i = CTATSTI_i;
- CTATGATD_i = CTATGAT_i;
- MEFFTATBOTD_i = MEFFTATBOT_i;
- MEFFTATSTID_i = MEFFTATSTI_i;
- MEFFTATGATD_i = MEFFTATGAT_i;
- CBBTBOTD_i = CBBTBOT_i;
- CBBTSTID_i = CBBTSTI_i;
- CBBTGATD_i = CBBTGAT_i;
- FBBTRBOTD_i = FBBTRBOT_i;
- FBBTRSTID_i = FBBTRSTI_i;
- FBBTRGATD_i = FBBTRGAT_i;
- STFBBTBOTD_i = STFBBTBOT_i;
- STFBBTSTID_i = STFBBTSTI_i;
- STFBBTGATD_i = STFBBTGAT_i;
- VBRBOTD_i = VBRBOT_i;
- VBRSTID_i = VBRSTI_i;
- VBRGATD_i = VBRGAT_i;
- PBRBOTD_i = PBRBOT_i;
- PBRSTID_i = PBRSTI_i;
- PBRGATD_i = PBRGAT_i;
- VJUNREFD_i = VJUNREF_i;
- FJUNQD_i = FJUNQ_i;
- end else begin
- CJORBOTD_i = `CLIP_LOW( CJORBOTD , `CJORBOT_cliplow);
- CJORSTID_i = `CLIP_LOW( CJORSTID , `CJORSTI_cliplow);
- CJORGATD_i = `CLIP_LOW( CJORGATD , `CJORGAT_cliplow);
- VBIRBOTD_i = `CLIP_LOW( VBIRBOTD , `VBIR_cliplow);
- VBIRSTID_i = `CLIP_LOW( VBIRSTID , `VBIR_cliplow);
- VBIRGATD_i = `CLIP_LOW( VBIRGATD , `VBIR_cliplow);
- PBOTD_i = `CLIP_BOTH(PBOTD , `P_cliplow,`P_cliphigh);
- PSTID_i = `CLIP_BOTH(PSTID , `P_cliplow,`P_cliphigh);
- PGATD_i = `CLIP_BOTH(PGATD , `P_cliplow,`P_cliphigh);
- PHIGBOTD_i = PHIGBOTD;
- PHIGSTID_i = PHIGSTID;
- PHIGGATD_i = PHIGGATD;
- IDSATRBOTD_i = `CLIP_LOW( IDSATRBOTD , `IDSATR_cliplow);
- IDSATRSTID_i = `CLIP_LOW( IDSATRSTID , `IDSATR_cliplow);
- IDSATRGATD_i = `CLIP_LOW( IDSATRGATD , `IDSATR_cliplow);
- CSRHBOTD_i = `CLIP_LOW( CSRHBOTD , `CSRH_cliplow);
- CSRHSTID_i = `CLIP_LOW( CSRHSTID , `CSRH_cliplow);
- CSRHGATD_i = `CLIP_LOW( CSRHGATD , `CSRH_cliplow);
- XJUNSTID_i = `CLIP_LOW( XJUNSTID , `XJUN_cliplow);
- XJUNGATD_i = `CLIP_LOW( XJUNGATD , `XJUN_cliplow);
- CTATBOTD_i = `CLIP_LOW( CTATBOTD , `CTAT_cliplow);
- CTATSTID_i = `CLIP_LOW( CTATSTID , `CTAT_cliplow);
- CTATGATD_i = `CLIP_LOW( CTATGATD , `CTAT_cliplow);
- MEFFTATBOTD_i = `CLIP_LOW( MEFFTATBOTD, `MEFFTAT_cliplow);
- MEFFTATSTID_i = `CLIP_LOW( MEFFTATSTID, `MEFFTAT_cliplow);
- MEFFTATGATD_i = `CLIP_LOW( MEFFTATGATD, `MEFFTAT_cliplow);
- CBBTBOTD_i = `CLIP_LOW( CBBTBOTD , `CBBT_cliplow);
- CBBTSTID_i = `CLIP_LOW( CBBTSTID , `CBBT_cliplow);
- CBBTGATD_i = `CLIP_LOW( CBBTGATD , `CBBT_cliplow);
- FBBTRBOTD_i = FBBTRBOTD;
- FBBTRSTID_i = FBBTRSTID;
- FBBTRGATD_i = FBBTRGATD;
- STFBBTBOTD_i = STFBBTBOTD;
- STFBBTSTID_i = STFBBTSTID;
- STFBBTGATD_i = STFBBTGATD;
- VBRBOTD_i = `CLIP_LOW( VBRBOTD , `VBR_cliplow);
- VBRSTID_i = `CLIP_LOW( VBRSTID , `VBR_cliplow);
- VBRGATD_i = `CLIP_LOW( VBRGATD , `VBR_cliplow);
- PBRBOTD_i = `CLIP_LOW( PBRBOTD , `PBR_cliplow);
- PBRSTID_i = `CLIP_LOW( PBRSTID , `PBR_cliplow);
- PBRGATD_i = `CLIP_LOW( PBRGATD , `PBR_cliplow);
- VJUNREFD_i = `CLIP_LOW( VJUNREFD , `VJUNREF_cliplow);
- FJUNQD_i = `CLIP_LOW( FJUNQD , `FJUNQ_cliplow);
- end
-`endif // JUNCAP_StandAlone
-
-tkr = `KELVINCONVERSION + TRJ_i;
-tkd = max($temperature + DTA, `KELVINCONVERSION + `MINTEMP);
-auxt = tkd / tkr;
-KBOL_over_QELE = `KBOL / `QELE;
-phitr = KBOL_over_QELE * tkr;
-phitrinv = 1.0 / phitr;
-phitd = KBOL_over_QELE * tkd;
-phitdinv = 1.0 / phitd;
-
-// bandgap voltages at reference temperature
-deltaphigr = -(7.02e-4 * tkr * tkr) / (1108.0 + tkr);
-phigrbot = PHIGBOT_i + deltaphigr;
-phigrsti = PHIGSTI_i + deltaphigr;
-phigrgat = PHIGGAT_i + deltaphigr;
-
-// bandgap voltages at device temperature
-deltaphigd = -(7.02e-4 * tkd * tkd) / (1108.0 + tkd);
-phigdbot = PHIGBOT_i + deltaphigd;
-phigdsti = PHIGSTI_i + deltaphigd;
-phigdgat = PHIGGAT_i + deltaphigd;
-
-// factors ftd for ideal-current model
-ftdbot = (pow(auxt, 1.5)) * exp(0.5 * ((phigrbot * phitrinv) - (phigdbot * phitdinv)));
-ftdsti = (pow(auxt, 1.5)) * exp(0.5 * ((phigrsti * phitrinv) - (phigdsti * phitdinv)));
-ftdgat = (pow(auxt, 1.5)) * exp(0.5 * ((phigrgat * phitrinv) - (phigdgat * phitdinv)));
-
-// temperature-scaled saturation current for ideal-current model
-idsatbot = IDSATRBOT_i * ftdbot * ftdbot;
-idsatsti = IDSATRSTI_i * ftdsti * ftdsti;
-idsatgat = IDSATRGAT_i * ftdgat * ftdgat;
-
-// built-in voltages before limiting
-ubibot = VBIRBOT_i * auxt - 2 * phitd * ln(ftdbot);
-ubisti = VBIRSTI_i * auxt - 2 * phitd * ln(ftdsti);
-ubigat = VBIRGAT_i * auxt - 2 * phitd * ln(ftdgat);
-
-// built-in voltages limited to phitd
-vbibot = ubibot + phitd * ln(1 + exp((`vbilow - ubibot) * phitdinv));
-vbisti = ubisti + phitd * ln(1 + exp((`vbilow - ubisti) * phitdinv));
-vbigat = ubigat + phitd * ln(1 + exp((`vbilow - ubigat) * phitdinv));
-
-// inverse values of built-in voltages
-vbiinvbot = 1.0 / vbibot;
-vbiinvsti = 1.0 / vbisti;
-vbiinvgat = 1.0 / vbigat;
-
-// one minus the grading coefficient
-one_minus_PBOT = 1 - PBOT_i;
-one_minus_PSTI = 1 - PSTI_i;
-one_minus_PGAT = 1 - PGAT_i;
-
-// one over "one minus the grading coefficient"
-one_over_one_minus_PBOT = 1 / one_minus_PBOT;
-one_over_one_minus_PSTI = 1 / one_minus_PSTI;
-one_over_one_minus_PGAT = 1 / one_minus_PGAT;
-
-// temperature-scaled zero-bias capacitance
-cjobot = CJORBOT_i * pow((VBIRBOT_i * vbiinvbot), PBOT_i);
-cjosti = CJORSTI_i * pow((VBIRSTI_i * vbiinvsti), PSTI_i);
-cjogat = CJORGAT_i * pow((VBIRGAT_i * vbiinvgat), PGAT_i);
-
-// prefactor in physical part of charge model
-qprefbot = cjobot * vbibot * one_over_one_minus_PBOT;
-qprefsti = cjosti * vbisti * one_over_one_minus_PSTI;
-qprefgat = cjogat * vbigat * one_over_one_minus_PGAT;
-
-// prefactor in mathematical extension of charge model
-qpref2bot = `a * cjobot;
-qpref2sti = `a * cjosti;
-qpref2gat = `a * cjogat;
-
-// zero-bias depletion widths at reference temperature, needed in SRH and TAT model
-wdepnulrbot = EPSSI / CJORBOT_i;
-wdepnulrsti = XJUNSTI_i * EPSSI / CJORSTI_i;
-wdepnulrgat = XJUNGAT_i * EPSSI / CJORGAT_i;
-
-// inverse values of "wdepnulr", used in BBT model
-wdepnulrinvbot = 1 / wdepnulrbot;
-wdepnulrinvsti = 1 / wdepnulrsti;
-wdepnulrinvgat = 1 / wdepnulrgat;
-
-// inverse values of built-in voltages at reference temperature, needed in SRH and BBT model
-VBIRBOTinv = 1 / VBIRBOT_i;
-VBIRSTIinv = 1 / VBIRSTI_i;
-VBIRGATinv = 1 / VBIRGAT_i;
-
-// some constants needed in erfc-approximation, needed in TAT model
-perfc = (`SQRTPI * `aerfc);
-berfc = ((-5 * (`aerfc) + 6 - pow((perfc), -2)) / 3.0);
-cerfc = (1.0 - (`aerfc) - (berfc));
-
-// half the bandgap energy, limited to values > phitd, needed in TAT model
-deltaEbot = max(0.5 * phigdbot, phitd);
-deltaEsti = max(0.5 * phigdsti, phitd);
-deltaEgat = max(0.5 * phigdgat, phitd);
-
-// values of atat, needed in TAT model
-atatbot = deltaEbot * phitdinv;
-atatsti = deltaEsti * phitdinv;
-atatgat = deltaEgat * phitdinv;
-
-// values of btatpart, needed in TAT model
-btatpartbot = sqrt(32 * MEFFTATBOT_i * `MELE * `QELE * (deltaEbot * deltaEbot * deltaEbot)) / (3 * `HBAR);
-btatpartsti = sqrt(32 * MEFFTATSTI_i * `MELE * `QELE * (deltaEsti * deltaEsti * deltaEsti)) / (3 * `HBAR);
-btatpartgat = sqrt(32 * MEFFTATGAT_i * `MELE * `QELE * (deltaEgat * deltaEgat * deltaEgat)) / (3 * `HBAR);
-
-// temperature-scaled values of FBBT, needed in BBT model
-fbbtbot = FBBTRBOT_i * (1 + STFBBTBOT_i * (tkd - tkr));
-fbbtsti = FBBTRSTI_i * (1 + STFBBTSTI_i * (tkd - tkr));
-fbbtgat = FBBTRGAT_i * (1 + STFBBTGAT_i * (tkd - tkr));
-fbbtbot = `CLIP_LOW(fbbtbot, 0);
-fbbtsti = `CLIP_LOW(fbbtsti, 0);
-fbbtgat = `CLIP_LOW(fbbtgat, 0);
-
-// values of fstop, needed in avalanche/breakdown model
-fstopbot = 1 / (1 - pow(`alphaav, PBRBOT_i));
-fstopsti = 1 / (1 - pow(`alphaav, PBRSTI_i));
-fstopgat = 1 / (1 - pow(`alphaav, PBRGAT_i));
-
-// inverse values of breakdown voltages, needed in avalanche/breakdown model
-VBRinvbot = 1 / VBRBOT_i;
-VBRinvsti = 1 / VBRSTI_i;
-VBRinvgat = 1 / VBRGAT_i;
-
-// slopes for linear extrapolation close to and beyond breakdown, needed in avalanche/breakdown model
-slopebot = -(fstopbot * fstopbot * pow(`alphaav, (PBRBOT_i - 1))) * PBRBOT_i * VBRinvbot;
-slopesti = -(fstopsti * fstopsti * pow(`alphaav, (PBRSTI_i - 1))) * PBRSTI_i * VBRinvsti;
-slopegat = -(fstopgat * fstopgat * pow(`alphaav, (PBRGAT_i - 1))) * PBRGAT_i * VBRinvgat;
-
-
-`ifdef JUNCAP_StandAlone
- // do nothing
-`else // JUNCAP_StandAlone
- phigrbot_d = PHIGBOTD_i + deltaphigr;
- phigrsti_d = PHIGSTID_i + deltaphigr;
- phigrgat_d = PHIGGATD_i + deltaphigr;
-
- phigdbot_d = PHIGBOTD_i + deltaphigd;
- phigdsti_d = PHIGSTID_i + deltaphigd;
- phigdgat_d = PHIGGATD_i + deltaphigd;
-
- ftdbot_d = (pow(auxt, 1.5)) * exp(0.5 * ((phigrbot_d * phitrinv) - (phigdbot_d * phitdinv)));
- ftdsti_d = (pow(auxt, 1.5)) * exp(0.5 * ((phigrsti_d * phitrinv) - (phigdsti_d * phitdinv)));
- ftdgat_d = (pow(auxt, 1.5)) * exp(0.5 * ((phigrgat_d * phitrinv) - (phigdgat_d * phitdinv)));
-
- idsatbot_d = IDSATRBOTD_i * ftdbot_d * ftdbot_d;
- idsatsti_d = IDSATRSTID_i * ftdsti_d * ftdsti_d;
- idsatgat_d = IDSATRGATD_i * ftdgat_d * ftdgat_d;
-
- ubibot_d = VBIRBOTD_i * auxt - 2 * phitd * ln(ftdbot_d);
- ubisti_d = VBIRSTID_i * auxt - 2 * phitd * ln(ftdsti_d);
- ubigat_d = VBIRGATD_i * auxt - 2 * phitd * ln(ftdgat_d);
-
- vbibot_d = ubibot_d + phitd * ln(1 + exp((`vbilow - ubibot_d) * phitdinv));
- vbisti_d = ubisti_d + phitd * ln(1 + exp((`vbilow - ubisti_d) * phitdinv));
- vbigat_d = ubigat_d + phitd * ln(1 + exp((`vbilow - ubigat_d) * phitdinv));
-
- vbiinvbot_d = 1.0 / vbibot_d;
- vbiinvsti_d = 1.0 / vbisti_d;
- vbiinvgat_d = 1.0 / vbigat_d;
-
- one_minus_PBOT_d = 1 - PBOTD_i;
- one_minus_PSTI_d = 1 - PSTID_i;
- one_minus_PGAT_d = 1 - PGATD_i;
-
- one_over_one_minus_PBOT_d = 1 / one_minus_PBOT_d;
- one_over_one_minus_PSTI_d = 1 / one_minus_PSTI_d;
- one_over_one_minus_PGAT_d = 1 / one_minus_PGAT_d;
-
- cjobot_d = CJORBOTD_i * pow((VBIRBOTD_i * vbiinvbot_d), PBOTD_i);
- cjosti_d = CJORSTID_i * pow((VBIRSTID_i * vbiinvsti_d), PSTID_i);
- cjogat_d = CJORGATD_i * pow((VBIRGATD_i * vbiinvgat_d), PGATD_i);
-
- qprefbot_d = cjobot_d * vbibot_d * one_over_one_minus_PBOT_d;
- qprefsti_d = cjosti_d * vbisti_d * one_over_one_minus_PSTI_d;
- qprefgat_d = cjogat_d * vbigat_d * one_over_one_minus_PGAT_d;
-
- qpref2bot_d = `a * cjobot_d;
- qpref2sti_d = `a * cjosti_d;
- qpref2gat_d = `a * cjogat_d;
-
- wdepnulrbot_d= EPSSI / CJORBOTD_i;
- wdepnulrsti_d= XJUNSTID_i * EPSSI / CJORSTID_i;
- wdepnulrgat_d= XJUNGATD_i * EPSSI / CJORGATD_i;
-
- wdepnulrinvbot_d = 1 / wdepnulrbot_d;
- wdepnulrinvsti_d = 1 / wdepnulrsti_d;
- wdepnulrinvgat_d = 1 / wdepnulrgat_d;
-
- VBIRBOTinv_d = 1 / VBIRBOTD_i;
- VBIRSTIinv_d = 1 / VBIRSTID_i;
- VBIRGATinv_d = 1 / VBIRGATD_i;
-
- deltaEbot_d = max(0.5 * phigdbot_d, phitd);
- deltaEsti_d = max(0.5 * phigdsti_d, phitd);
- deltaEgat_d = max(0.5 * phigdgat_d, phitd);
-
- atatbot_d = deltaEbot_d * phitdinv;
- atatsti_d = deltaEsti_d * phitdinv;
- atatgat_d = deltaEgat_d * phitdinv;
-
- btatpartbot_d= sqrt(32 * MEFFTATBOTD_i * `MELE * `QELE * (deltaEbot_d * deltaEbot_d * deltaEbot_d)) / (3 * `HBAR);
- btatpartsti_d= sqrt(32 * MEFFTATSTID_i * `MELE * `QELE * (deltaEsti_d * deltaEsti_d * deltaEsti_d)) / (3 * `HBAR);
- btatpartgat_d= sqrt(32 * MEFFTATGATD_i * `MELE * `QELE * (deltaEgat_d * deltaEgat_d * deltaEgat_d)) / (3 * `HBAR);
-
- fbbtbot_d = FBBTRBOTD_i * (1 + STFBBTBOTD_i * (tkd - tkr));
- fbbtsti_d = FBBTRSTID_i * (1 + STFBBTSTID_i * (tkd - tkr));
- fbbtgat_d = FBBTRGATD_i * (1 + STFBBTGATD_i * (tkd - tkr));
- fbbtbot_d = `CLIP_LOW(fbbtbot_d, 0);
- fbbtsti_d = `CLIP_LOW(fbbtsti_d, 0);
- fbbtgat_d = `CLIP_LOW(fbbtgat_d, 0);
-
- fstopbot_d = 1 / (1 - pow(`alphaav, PBRBOTD_i));
- fstopsti_d = 1 / (1 - pow(`alphaav, PBRSTID_i));
- fstopgat_d = 1 / (1 - pow(`alphaav, PBRGATD_i));
-
- VBRinvbot_d = 1 / VBRBOTD_i;
- VBRinvsti_d = 1 / VBRSTID_i;
- VBRinvgat_d = 1 / VBRGATD_i;
-
- slopebot_d = -(fstopbot_d * fstopbot_d * pow(`alphaav, (PBRBOTD_i - 1))) * PBRBOTD_i * VBRinvbot_d;
- slopesti_d = -(fstopsti_d * fstopsti_d * pow(`alphaav, (PBRSTID_i - 1))) * PBRSTID_i * VBRinvsti_d;
- slopegat_d = -(fstopgat_d * fstopgat_d * pow(`alphaav, (PBRGATD_i - 1))) * PBRGATD_i * VBRinvgat_d;
-`endif // JUNCAP_StandAlone
diff --git a/src/spicelib/devices/adms/psp102/admsva/JUNCAP200_macrodefs.include b/src/spicelib/devices/adms/psp102/admsva/JUNCAP200_macrodefs.include
deleted file mode 100644
index e26f0a821..000000000
--- a/src/spicelib/devices/adms/psp102/admsva/JUNCAP200_macrodefs.include
+++ /dev/null
@@ -1,476 +0,0 @@
-//======================================================================================
-//======================================================================================
-// Filename: JUNCAP200_macrodefs.include
-//======================================================================================
-//======================================================================================
-//
-// (c) Copyright notice
-//
-// Since 2012 until today, PSP has been co-developed by NXP Semiconductors and
-// Delft University of Technology. For this part of the model, each claim undivided
-// ownership and copyrights
-// Until and including 2011, PSP has been co-developed by NXP Semiconductors and
-// Arizona State University. For this part of the model, NXP Semiconductors claims
-// undivided ownership and copyrights.
-//
-//
-// Version: 102.5.0 (PSP), 200.4.0 (JUNCAP), December 2013
-//
-//======================================================================================
-//======================================================================================
-//
-// Further information can be found in the file releasenotesPSP102.txt
-//
-
-///////////////////////////////////////////
-//
-// Macros and constants used in JUNCAP2
-//
-///////////////////////////////////////////
-
-// Other constants
-`define MINTEMP -250
-`define vbilow 0.050
-`define a 2
-`define epsch 0.1
-`define dvbi 0.050
-`define epsav 1E-6
-`define vbrmax 1000
-`define alphaav 0.999
-`define vmaxlarge 1E8
-`define aerfc 0.29214664
-`define twothirds 0.666666666666667
-
-// Clipping values
-`define levelnumber 200
-`define AB_cliplow 0
-`define LS_cliplow 0
-`define LG_cliplow 0
-`define MULT_cliplow 0
-`define TRJ_cliplow `MINTEMP
-`define IMAX_cliplow 1E-12
-`define CJORBOT_cliplow 1E-12
-`define CJORSTI_cliplow 1E-18
-`define CJORGAT_cliplow 1E-18
-`define VBIR_cliplow `vbilow
-`define P_cliplow 0.05
-`define P_cliphigh 0.95
-`define IDSATR_cliplow 0
-`define CSRH_cliplow 0
-`define XJUN_cliplow 1E-9
-`define CTAT_cliplow 0
-`define MEFFTAT_cliplow 0.01
-`define CBBT_cliplow 0
-`define VBR_cliplow 0.1
-`define PBR_cliplow 0.1
-`define VJUNREF_cliplow 0.5
-`define FJUNQ_cliplow 0.0
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Macro definitions.
-//
-// Note that because at present locally scoped variables
-// can only be in named blocks, the intermediate variables
-// used in the macros below must be explicitly declared
-// as variables.
-//
-/////////////////////////////////////////////////////////////////////////////
-
-// Variable declarations of variables that need to be *local* in juncap-express initialization
-
-`define LocalGlobalVars \
- /* declaration of variables needed in macro "calcerfcexpmtat" */ \
- real ysq, terfc, erfcpos; \
- \
- /* declaration of variables needed in hypfunction 5 */ \
- real h1, h2, h2d, h3, h4, h5; \
- \
- /* declaration of variables calculated outside macro "juncapfunction", voltage-dependent part */ \
- real idmult, vj, z, zinv, two_psistar, vjlim, vjsrh, vbbt, vav; \
- \
- /* declaration of variables used within macro "juncapfunction" */ \
- real tmp, id; \
- real isrh, vbi_minus_vjsrh, wsrhstep, dwsrh, wsrh, wdep, asrh; \
- real itat, btat, twoatatoverthreebtat, umaxbeforelimiting, umax, sqrtumax, umaxpoweronepointfive; \
- real wgamma, wtat, ktat, ltat, mtat, xerfc, erfctimesexpmtat, gammamax; \
- real ibbt, Fmaxr; \
- real fbreakdown;
-
-
-// Instance parameter dependent initialization
-
-`define JuncapInitInstance(AB_i, LS_i, LG_i, idsatbot, idsatsti, idsatgat, vbibot, vbisti, vbigat, PBOT_i, PSTI_i, PGAT_i, VBIRBOT_i, VBIRSTI_i, VBIRGAT_i, VMAX, exp_VMAX_over_phitd, vbimin, vch, vfmin, vbbtlim) \
- if (idsatbot * AB_i > 0) begin \
- vmaxbot = phitd * ln(IMAX_i / (idsatbot * AB_i) + 1); \
- end else begin \
- vmaxbot = `vmaxlarge; \
- end \
- if (idsatsti * LS_i > 0) begin \
- vmaxsti = phitd * ln(IMAX_i / (idsatsti * LS_i) + 1); \
- end else begin \
- vmaxsti = `vmaxlarge; \
- end \
- if (idsatgat * LG_i > 0) begin \
- vmaxgat = phitd * ln(IMAX_i / (idsatgat * LG_i) + 1); \
- end else begin \
- vmaxgat = `vmaxlarge; \
- end \
- VMAX = min(min(vmaxbot, vmaxsti), vmaxgat); \
- `expl(VMAX * phitdinv, exp_VMAX_over_phitd) \
- \
- /* determination of minimum value of the relevant built-in voltages */ \
- /* and determination of limiting value of conditioned voltage for BBT calculation */ \
- vbibot2 = vbibot; \
- vbisti2 = vbisti; \
- vbigat2 = vbigat; \
- pbot2 = PBOT_i; \
- psti2 = PSTI_i; \
- pgat2 = PGAT_i; \
- vbibot2r = VBIRBOT_i; \
- vbisti2r = VBIRSTI_i; \
- vbigat2r = VBIRGAT_i; \
- if (AB_i == 0) begin \
- vbibot2 = vbisti + vbigat; \
- pbot2 = 0.9 * min(PSTI_i, PGAT_i); \
- vbibot2r = VBIRSTI_i + VBIRGAT_i; \
- end \
- if (LS_i == 0) begin \
- vbisti2 = vbibot + vbigat; \
- psti2 = 0.9 * min(PBOT_i, PGAT_i); \
- vbisti2r = VBIRBOT_i + VBIRGAT_i; \
- end \
- if (LG_i == 0) begin \
- vbigat2 = vbibot + vbisti; \
- pgat2 = 0.9 * min(PBOT_i, PSTI_i); \
- vbigat2r = VBIRBOT_i + VBIRSTI_i; \
- end \
- vbimin = min(min(vbibot2, vbisti2), vbigat2); \
- vch = vbimin * `epsch; \
- pmax = max(max(pbot2, psti2), pgat2); \
- vfmin = vbimin * (1 - (pow(`a, (-1.0 / (pmax))))); \
- vbbtlim = min(min(vbibot2r, vbisti2r), vbigat2r) - `dvbi;
-
-
-// Special power-functions
-
-`define mypower(x,power,result) \
- if (power == 0.5) begin \
- result = sqrt(x); \
- end else begin \
- result = pow(x, power); \
- end
-
-`define mypower2(x,power,result) \
- if (power == -1) begin \
- result = 1 / (x); \
- end else begin \
- result = pow(x, power); \
- end
-
-`define mypower3(x,power,result) \
- if (power == 4) begin \
- result = (x) * (x) * (x) * (x); \
- end else begin \
- result = pow(x, power); \
- end
-
-
-// Smoothing functions
-
-`define hypfunction2(x,x0,eps,hyp2) \
- hyp2 = 0.5 * ((x) + (x0) - sqrt(((x) - (x0)) * ((x) - (x0)) + 4 * (eps) * (eps)));
-
-`define hypfunction5(x,x0,eps,hyp5) \
- h1 = 4.0 * (eps) * (eps); \
- h2 = (eps) / (x0); \
- h2d = (x) + (eps) * h2; \
- h3 = (x0) + h2d; \
- h4 = (x0) - h2d; \
- h5 = sqrt(h4 * h4 + h1); \
- hyp5 = 2.0 * ((x) * (x0) / (h3 + h5));
-
-
-// A special function used to calculate TAT-currents,
-// including an approximation of the erfc-function
-
-`define calcerfcexpmtat(y,m,result) \
- ysq = y * y; \
- if (y > 0) begin \
- terfc = 1 / (1 + perfc * y); \
- end else begin \
- terfc = 1 / (1 - perfc * y); \
- end \
- `expl_low(-ysq + m, tmp) \
- erfcpos = (`aerfc * terfc + berfc * (terfc * terfc) + cerfc * (terfc * terfc * terfc)) * tmp; \
- if (y > 0) begin \
- result = erfcpos; \
- end else begin\
- `expl_low(m, tmp) \
- result = 2 * tmp - erfcpos; \
- end
-
-
-// This is the main function of the JUNCAP2-model. It returns the current and charge
-// for a single diode
-
-`define juncapfunction(VAK,qpref,qpref2,vbiinv,one_minus_P,idsat,CSRH,CTAT,vbi,wdepnulr,VBIRinv,P,ftd,btatpart,atat,one_over_one_minus_P,CBBT,VBIR,wdepnulrinv,fbbt,VBR,VBRinv,PBR,fstop,slope,Ijprime,Qjprime) \
- `mypower((1 - vj * vbiinv), one_minus_P, tmp) \
- Qjprime = qpref * (1 - tmp) + qpref2 * (VAK - vj); \
- id = idsat * idmult; \
- if ((CSRH == 0) && (CTAT == 0)) begin \
- isrh = 0; \
- end else begin \
- vbi_minus_vjsrh = vbi-vjsrh; \
- wsrhstep = 1 - sqrt(1 - two_psistar / vbi_minus_vjsrh); \
- if (P == 0.5) begin \
- dwsrh = 0; \
- end else begin \
- dwsrh = ((wsrhstep * wsrhstep * ln(wsrhstep) / (1 - wsrhstep)) + wsrhstep) * (1 - 2 * P); \
- end \
- wsrh = wsrhstep + dwsrh; \
- `mypower(vbi_minus_vjsrh * VBIRinv, P, tmp) \
- wdep = wdepnulr * tmp; \
- asrh = ftd * ((zinv - 1) * wdep); \
- isrh = CSRH * (asrh * wsrh); \
- end \
- if (CTAT == 0) begin \
- itat = 0; \
- end else begin \
- btat = btatpart * ((wdep * one_minus_P) / vbi_minus_vjsrh); \
- twoatatoverthreebtat = (`twothirds * atat) / btat; \
- umaxbeforelimiting = twoatatoverthreebtat * twoatatoverthreebtat; \
- umax = sqrt(umaxbeforelimiting * umaxbeforelimiting / (umaxbeforelimiting * umaxbeforelimiting + 1)); \
- sqrtumax = sqrt(abs(umax)); \
- umaxpoweronepointfive = umax * sqrtumax; \
- `mypower2((1 + btat * umaxpoweronepointfive), (-P * one_over_one_minus_P), wgamma) \
- wtat = wsrh * wgamma / (wsrh + wgamma); \
- ktat = sqrt(0.375 * (btat / sqrtumax)); \
- ltat = 2 * (twoatatoverthreebtat * sqrtumax) - umax; \
- mtat = atat * twoatatoverthreebtat * sqrtumax - atat * umax + 0.5 * (btat * umaxpoweronepointfive); \
- xerfc = (ltat - 1) * ktat; \
- `calcerfcexpmtat(xerfc, mtat, erfctimesexpmtat) \
- gammamax = `SQRTPI * 0.5 * (atat * erfctimesexpmtat / ktat); \
- itat = CTAT * (asrh * gammamax * wtat); \
- end \
- if (CBBT == 0) begin \
- ibbt = 0; \
- end else begin \
- `mypower(((VBIR - vbbt) * VBIRinv), P, tmp) \
- Fmaxr = one_over_one_minus_P * ((VBIR - vbbt) * wdepnulrinv / tmp); \
- `expl(-fbbt / Fmaxr, tmp) \
- ibbt = CBBT * (VAK * Fmaxr * Fmaxr * tmp); \
- end \
- if (VBR > `vbrmax) begin \
- fbreakdown = 1; \
- end else begin \
- if (vav > -`alphaav * VBR) begin \
- `mypower3(abs(vav * VBRinv), PBR, tmp) \
- fbreakdown = 1 / (1 - tmp); \
- end else begin \
- fbreakdown = fstop + (vav + `alphaav * VBR) * slope; \
- end \
- end \
- Ijprime = (id + isrh + itat + ibbt) * fbreakdown;
-
-
-// The following code is written as a macro because the naming of the instance parameters is
-// different for JUNCAP2 stand-alone and JUNCAP2-in-PSP: AB, LS, LG for JUNCAP2 stand-alone,
-// ABSOURCE, LSSOURCE, LGSOURCE for source junction in PSP and ABDRAIN, LSDRAIN, LGDRAIN for
-// drain junction in PSP
-
-`define juncapcommon(V, AB_i, LS_i, LG_i, qprefbot, qpref2bot, vbiinvbot, one_minus_PBOT, idsatbot, CSRHBOT_i, CTATBOT_i, vbibot, wdepnulrbot, VBIRBOTinv, PBOT_i, ftdbot, btatpartbot, atatbot, one_over_one_minus_PBOT, CBBTBOT_i, VBIRBOT_i, wdepnulrinvbot, fbbtbot, VBRBOT_i, VBRinvbot, PBRBOT_i, fstopbot, slopebot, qprefsti, qpref2sti, vbiinvsti, one_minus_PSTI, idsatsti, CSRHSTI_i, CTATSTI_i, vbisti, wdepnulrsti, VBIRSTIinv, PSTI_i, ftdsti, btatpartsti, atatsti, one_over_one_minus_PSTI, CBBTSTI_i, VBIRSTI_i, wdepnulrinvsti, fbbtsti, VBRSTI_i, VBRinvsti, PBRSTI_i, fstopsti, slopesti, qprefgat, qpref2gat, vbiinvgat, one_minus_PGAT, idsatgat, CSRHGAT_i, CTATGAT_i, vbigat, wdepnulrgat, VBIRGATinv, PGAT_i, ftdgat, btatpartgat, atatgat, one_over_one_minus_PGAT, CBBTGAT_i, VBIRGAT_i, wdepnulrinvgat, fbbtgat, VBRGAT_i, VBRinvgat, PBRGAT_i, fstopgat, slopegat, VMAX, exp_VMAX_over_phitd, vbimin, vch, vfmin, vbbtlim, ijunbot, qjunbot, ijunsti, qjunsti, ijungat, qjungat) \
- vbbt = 0.0; \
- two_psistar = 0.0; \
- if ( !( ((AB_i) == 0) && ((LS_i) == 0) && ((LG_i) == 0) ) ) begin \
- `hypfunction5(V, vfmin, vch, vj) \
- if (V < VMAX) begin \
- `expl(0.5 * (V * phitdinv), zinv) \
- idmult = zinv * zinv; \
- end else begin \
- idmult = (1 + (V - VMAX) * phitdinv) * exp_VMAX_over_phitd; \
- zinv = sqrt(idmult); \
- end \
- idmult = idmult - 1.0; \
- z = 1 / zinv; \
- if (V > 0) begin \
- two_psistar = 2.0 * (phitd * ln(2.0 + z + sqrt((z + 1.0) * (z + 3.0)))); \
- end else begin \
- two_psistar = -V + 2.0 * (phitd * ln(2 * zinv + 1 + sqrt((1 + zinv) * (1 + 3 * zinv)))); \
- end \
- vjlim = vbimin - two_psistar; \
- `hypfunction2(V, vjlim, phitd, vjsrh) \
- `hypfunction2(V, vbbtlim, phitr, vbbt) \
- `hypfunction2(V, 0, `epsav, vav) \
- end \
- if ((AB_i) == 0) begin \
- ijunbot = 0; \
- qjunbot = 0; \
- end else begin \
- `juncapfunction(V, qprefbot, qpref2bot, vbiinvbot, one_minus_PBOT, idsatbot, CSRHBOT_i, CTATBOT_i, vbibot, wdepnulrbot, VBIRBOTinv, PBOT_i, ftdbot, btatpartbot, atatbot, one_over_one_minus_PBOT, CBBTBOT_i, VBIRBOT_i, wdepnulrinvbot, fbbtbot, VBRBOT_i, VBRinvbot, PBRBOT_i, fstopbot, slopebot, ijunbot, qjunbot) \
- end \
- if ((LS_i) == 0) begin \
- ijunsti = 0; \
- qjunsti = 0; \
- end else begin \
- `juncapfunction(V, qprefsti, qpref2sti, vbiinvsti, one_minus_PSTI, idsatsti, CSRHSTI_i, CTATSTI_i, vbisti, wdepnulrsti, VBIRSTIinv, PSTI_i, ftdsti, btatpartsti, atatsti, one_over_one_minus_PSTI, CBBTSTI_i, VBIRSTI_i, wdepnulrinvsti, fbbtsti, VBRSTI_i, VBRinvsti, PBRSTI_i, fstopsti, slopesti, ijunsti, qjunsti) \
- end \
- if ((LG_i) == 0) begin \
- ijungat = 0; \
- qjungat = 0; \
- end else begin \
- `juncapfunction(V, qprefgat, qpref2gat, vbiinvgat, one_minus_PGAT, idsatgat, CSRHGAT_i, CTATGAT_i, vbigat, wdepnulrgat, VBIRGATinv, PGAT_i, ftdgat, btatpartgat, atatgat, one_over_one_minus_PGAT, CBBTGAT_i, VBIRGAT_i, wdepnulrinvgat, fbbtgat, VBRGAT_i, VBRinvgat, PBRGAT_i, fstopgat, slopegat, ijungat, qjungat) \
- end
-
-
-//============================================================================================================
-// JUNCAP-express
-//
-// The macros below are used in the express-version of JUNCAP2
-//============================================================================================================
-
-`define relerr 0.001
-
-`define P1(x) ((x) + 1)
-
-`define expll(x, xlow, expxlow, xhigh, expxhigh) \
- ((x) < (xlow)) ? (expxlow) / `P1((xlow) - (x)) : (((x) > (xhigh)) ? (expxhigh) * `P1((x) - (xhigh)) : exp(x))
-
-
-// The "JuncapExpressInit"-macro below is split into three parts, as some verilog-A compilers cannot handle
-// macros beyond a certain size. Moreover, it is useful to limit the list of input and output variables.
-
-// Part 1
-`define JuncapExpressInit1(AB_i, LS_i, LG_i, VJUNREF_i, qprefbot, qpref2bot, vbiinvbot, one_minus_PBOT, idsatbot, CSRHBOT_i, CTATBOT_i, vbibot, wdepnulrbot, VBIRBOTinv, PBOT_i, ftdbot, btatpartbot, atatbot, one_over_one_minus_PBOT, CBBTBOT_i, VBIRBOT_i, wdepnulrinvbot, fbbtbot, VBRBOT_i, VBRinvbot, PBRBOT_i, fstopbot, slopebot, qprefsti, qpref2sti, vbiinvsti, one_minus_PSTI, idsatsti, CSRHSTI_i, CTATSTI_i, vbisti, wdepnulrsti, VBIRSTIinv, PSTI_i, ftdsti, btatpartsti, atatsti, one_over_one_minus_PSTI, CBBTSTI_i, VBIRSTI_i, wdepnulrinvsti, fbbtsti, VBRSTI_i, VBRinvsti, PBRSTI_i, fstopsti, slopesti, qprefgat, qpref2gat, vbiinvgat, one_minus_PGAT, idsatgat, CSRHGAT_i, CTATGAT_i, vbigat, wdepnulrgat, VBIRGATinv, PGAT_i, ftdgat, btatpartgat, atatgat, one_over_one_minus_PGAT, CBBTGAT_i, VBIRGAT_i, wdepnulrinvgat, fbbtgat, VBRGAT_i, VBRinvgat, PBRGAT_i, fstopgat, slopegat, VMAX, exp_VMAX_over_phitd, vbimin, vch, vfmin, vbbtlim) \
- FRACNA = 0.4; \
- FRACNB = 0.65; \
- FRACI = 0.8; \
- /* Sample voltages */ \
- V1 = -FRACNA * VJUNREF_i; \
- V2 = -FRACNB * VJUNREF_i; \
- V3 = -FRACI * VJUNREF_i; \
- V4 = 0.1; \
- V5 = 0.2; \
- /* evaluate full JUNCAP-model at five voltages */ \
- `juncapcommon(V1, AB_i, LS_i, LG_i, qprefbot, qpref2bot, vbiinvbot, one_minus_PBOT, idsatbot, CSRHBOT_i, CTATBOT_i, vbibot, wdepnulrbot, VBIRBOTinv, PBOT_i, ftdbot, btatpartbot, atatbot, one_over_one_minus_PBOT, CBBTBOT_i, VBIRBOT_i, wdepnulrinvbot, fbbtbot, VBRBOT_i, VBRinvbot, PBRBOT_i, fstopbot, slopebot, qprefsti, qpref2sti, vbiinvsti, one_minus_PSTI, idsatsti, CSRHSTI_i, CTATSTI_i, vbisti, wdepnulrsti, VBIRSTIinv, PSTI_i, ftdsti, btatpartsti, atatsti, one_over_one_minus_PSTI, CBBTSTI_i, VBIRSTI_i, wdepnulrinvsti, fbbtsti, VBRSTI_i, VBRinvsti, PBRSTI_i, fstopsti, slopesti, qprefgat, qpref2gat, vbiinvgat, one_minus_PGAT, idsatgat, CSRHGAT_i, CTATGAT_i, vbigat, wdepnulrgat, VBIRGATinv, PGAT_i, ftdgat, btatpartgat, atatgat, one_over_one_minus_PGAT, CBBTGAT_i, VBIRGAT_i, wdepnulrinvgat, fbbtgat, VBRGAT_i, VBRinvgat, PBRGAT_i, fstopgat, slopegat, VMAX, exp_VMAX_over_phitd, vbimin, vch, vfmin, vbbtlim, ijunbot, qjunbot, ijunsti, qjunsti, ijungat, qjungat) \
- I1 = AB_i * ijunbot + LS_i * ijunsti + LG_i * ijungat; \
- `juncapcommon(V2, AB_i, LS_i, LG_i, qprefbot, qpref2bot, vbiinvbot, one_minus_PBOT, idsatbot, CSRHBOT_i, CTATBOT_i, vbibot, wdepnulrbot, VBIRBOTinv, PBOT_i, ftdbot, btatpartbot, atatbot, one_over_one_minus_PBOT, CBBTBOT_i, VBIRBOT_i, wdepnulrinvbot, fbbtbot, VBRBOT_i, VBRinvbot, PBRBOT_i, fstopbot, slopebot, qprefsti, qpref2sti, vbiinvsti, one_minus_PSTI, idsatsti, CSRHSTI_i, CTATSTI_i, vbisti, wdepnulrsti, VBIRSTIinv, PSTI_i, ftdsti, btatpartsti, atatsti, one_over_one_minus_PSTI, CBBTSTI_i, VBIRSTI_i, wdepnulrinvsti, fbbtsti, VBRSTI_i, VBRinvsti, PBRSTI_i, fstopsti, slopesti, qprefgat, qpref2gat, vbiinvgat, one_minus_PGAT, idsatgat, CSRHGAT_i, CTATGAT_i, vbigat, wdepnulrgat, VBIRGATinv, PGAT_i, ftdgat, btatpartgat, atatgat, one_over_one_minus_PGAT, CBBTGAT_i, VBIRGAT_i, wdepnulrinvgat, fbbtgat, VBRGAT_i, VBRinvgat, PBRGAT_i, fstopgat, slopegat, VMAX, exp_VMAX_over_phitd, vbimin, vch, vfmin, vbbtlim, ijunbot, qjunbot, ijunsti, qjunsti, ijungat, qjungat) \
- I2 = AB_i * ijunbot + LS_i * ijunsti + LG_i * ijungat; \
- `juncapcommon(V3, AB_i, LS_i, LG_i, qprefbot, qpref2bot, vbiinvbot, one_minus_PBOT, idsatbot, CSRHBOT_i, CTATBOT_i, vbibot, wdepnulrbot, VBIRBOTinv, PBOT_i, ftdbot, btatpartbot, atatbot, one_over_one_minus_PBOT, CBBTBOT_i, VBIRBOT_i, wdepnulrinvbot, fbbtbot, VBRBOT_i, VBRinvbot, PBRBOT_i, fstopbot, slopebot, qprefsti, qpref2sti, vbiinvsti, one_minus_PSTI, idsatsti, CSRHSTI_i, CTATSTI_i, vbisti, wdepnulrsti, VBIRSTIinv, PSTI_i, ftdsti, btatpartsti, atatsti, one_over_one_minus_PSTI, CBBTSTI_i, VBIRSTI_i, wdepnulrinvsti, fbbtsti, VBRSTI_i, VBRinvsti, PBRSTI_i, fstopsti, slopesti, qprefgat, qpref2gat, vbiinvgat, one_minus_PGAT, idsatgat, CSRHGAT_i, CTATGAT_i, vbigat, wdepnulrgat, VBIRGATinv, PGAT_i, ftdgat, btatpartgat, atatgat, one_over_one_minus_PGAT, CBBTGAT_i, VBIRGAT_i, wdepnulrinvgat, fbbtgat, VBRGAT_i, VBRinvgat, PBRGAT_i, fstopgat, slopegat, VMAX, exp_VMAX_over_phitd, vbimin, vch, vfmin, vbbtlim, ijunbot, qjunbot, ijunsti, qjunsti, ijungat, qjungat) \
- I3 = AB_i * ijunbot + LS_i * ijunsti + LG_i * ijungat;
-
-// Part 2
-`define JuncapExpressInit2(AB_i, LS_i, LG_i, qprefbot, qpref2bot, vbiinvbot, one_minus_PBOT, idsatbot, CSRHBOT_i, CTATBOT_i, vbibot, wdepnulrbot, VBIRBOTinv, PBOT_i, ftdbot, btatpartbot, atatbot, one_over_one_minus_PBOT, CBBTBOT_i, VBIRBOT_i, wdepnulrinvbot, fbbtbot, VBRBOT_i, VBRinvbot, PBRBOT_i, fstopbot, slopebot, qprefsti, qpref2sti, vbiinvsti, one_minus_PSTI, idsatsti, CSRHSTI_i, CTATSTI_i, vbisti, wdepnulrsti, VBIRSTIinv, PSTI_i, ftdsti, btatpartsti, atatsti, one_over_one_minus_PSTI, CBBTSTI_i, VBIRSTI_i, wdepnulrinvsti, fbbtsti, VBRSTI_i, VBRinvsti, PBRSTI_i, fstopsti, slopesti, qprefgat, qpref2gat, vbiinvgat, one_minus_PGAT, idsatgat, CSRHGAT_i, CTATGAT_i, vbigat, wdepnulrgat, VBIRGATinv, PGAT_i, ftdgat, btatpartgat, atatgat, one_over_one_minus_PGAT, CBBTGAT_i, VBIRGAT_i, wdepnulrinvgat, fbbtgat, VBRGAT_i, VBRinvgat, PBRGAT_i, fstopgat, slopegat, VMAX, exp_VMAX_over_phitd, vbimin, vch, vfmin, vbbtlim) \
- /* forward currents */ \
- `juncapcommon(V4, AB_i, LS_i, LG_i, qprefbot, qpref2bot, vbiinvbot, one_minus_PBOT, idsatbot, CSRHBOT_i, CTATBOT_i, vbibot, wdepnulrbot, VBIRBOTinv, PBOT_i, ftdbot, btatpartbot, atatbot, one_over_one_minus_PBOT, CBBTBOT_i, VBIRBOT_i, wdepnulrinvbot, fbbtbot, VBRBOT_i, VBRinvbot, PBRBOT_i, fstopbot, slopebot, qprefsti, qpref2sti, vbiinvsti, one_minus_PSTI, idsatsti, CSRHSTI_i, CTATSTI_i, vbisti, wdepnulrsti, VBIRSTIinv, PSTI_i, ftdsti, btatpartsti, atatsti, one_over_one_minus_PSTI, CBBTSTI_i, VBIRSTI_i, wdepnulrinvsti, fbbtsti, VBRSTI_i, VBRinvsti, PBRSTI_i, fstopsti, slopesti, qprefgat, qpref2gat, vbiinvgat, one_minus_PGAT, idsatgat, CSRHGAT_i, CTATGAT_i, vbigat, wdepnulrgat, VBIRGATinv, PGAT_i, ftdgat, btatpartgat, atatgat, one_over_one_minus_PGAT, CBBTGAT_i, VBIRGAT_i, wdepnulrinvgat, fbbtgat, VBRGAT_i, VBRinvgat, PBRGAT_i, fstopgat, slopegat, VMAX, exp_VMAX_over_phitd, vbimin, vch, vfmin, vbbtlim, ijunbot, qjunbot, ijunsti, qjunsti, ijungat, qjungat) \
- I4 = AB_i * ijunbot + LS_i * ijunsti + LG_i * ijungat; \
- `juncapcommon(V5, AB_i, LS_i, LG_i, qprefbot, qpref2bot, vbiinvbot, one_minus_PBOT, idsatbot, CSRHBOT_i, CTATBOT_i, vbibot, wdepnulrbot, VBIRBOTinv, PBOT_i, ftdbot, btatpartbot, atatbot, one_over_one_minus_PBOT, CBBTBOT_i, VBIRBOT_i, wdepnulrinvbot, fbbtbot, VBRBOT_i, VBRinvbot, PBRBOT_i, fstopbot, slopebot, qprefsti, qpref2sti, vbiinvsti, one_minus_PSTI, idsatsti, CSRHSTI_i, CTATSTI_i, vbisti, wdepnulrsti, VBIRSTIinv, PSTI_i, ftdsti, btatpartsti, atatsti, one_over_one_minus_PSTI, CBBTSTI_i, VBIRSTI_i, wdepnulrinvsti, fbbtsti, VBRSTI_i, VBRinvsti, PBRSTI_i, fstopsti, slopesti, qprefgat, qpref2gat, vbiinvgat, one_minus_PGAT, idsatgat, CSRHGAT_i, CTATGAT_i, vbigat, wdepnulrgat, VBIRGATinv, PGAT_i, ftdgat, btatpartgat, atatgat, one_over_one_minus_PGAT, CBBTGAT_i, VBIRGAT_i, wdepnulrinvgat, fbbtgat, VBRGAT_i, VBRinvgat, PBRGAT_i, fstopgat, slopegat, VMAX, exp_VMAX_over_phitd, vbimin, vch, vfmin, vbbtlim, ijunbot, qjunbot, ijunsti, qjunsti, ijungat, qjungat) \
- I5 = AB_i * ijunbot + LS_i * ijunsti + LG_i * ijungat;
-
-// Part 3
-`define JuncapExpressInit3(AB_i, LS_i, LG_i, idsatbot, idsatsti, idsatgat, ISATFOR1, MFOR1, ISATFOR2, MFOR2, ISATREV, MREV, m0flag) \
- /* compute internal parameters from these five (I,V)-values */ \
- ISATFOR1 = AB_i * idsatbot + LS_i * idsatsti + LG_i * idsatgat; \
- I4_cor = I4 - ISATFOR1 * (exp(V4 * phitdinv * MFOR1) - 1.0); \
- I5_cor = I5 - ISATFOR1 * (exp(V5 * phitdinv * MFOR1) - 1.0); \
- if ( !( ((AB_i) == 0) && ((LS_i) == 0) && ((LG_i) == 0) ) ) begin \
- if ((I4 > 0) && (I5 > 0)) begin \
- if ((((I4_cor / I4) > `relerr) || ((I5_cor / I5) > `relerr)) && (I4_cor > 0) && (I5_cor > 0)) begin \
- alphaje = I4_cor / I5_cor; \
- MFOR2 = phitd * ln(alphaje) / (V4 - V5); \
- ISATFOR2 = I4_cor / (exp(V4 * phitdinv * MFOR2) - 1); \
- end \
- end \
- I1_cor = I1 - ISATFOR1 * (exp(V1 * phitdinv * MFOR1) - 1.0) - ISATFOR2 * (exp(V1 * phitdinv * MFOR2) - 1.0); \
- I2_cor = I2 - ISATFOR1 * (exp(V2 * phitdinv * MFOR1) - 1.0) - ISATFOR2 * (exp(V2 * phitdinv * MFOR2) - 1.0); \
- I3_cor = I3 - ISATFOR1 * (exp(V3 * phitdinv * MFOR1) - 1.0) - ISATFOR2 * (exp(V3 * phitdinv * MFOR2) - 1.0); \
- if ((I1 < 0) && (I2 < 0) && (I3 < 0)) begin \
- if ((((I1_cor / I1) > `relerr) || ((I2_cor / I2) > `relerr) || ((I3_cor / I3) > `relerr)) \
- && (I1_cor < 0) && (I2_cor < 0) && (I3_cor < 0)) begin \
- alphaje = I1_cor / I2_cor; \
- m0_rev = -phitd * ln(alphaje) / (V1 - V2); /* zeroth order approximation */ \
- tt0 = V2 / (V2 - V1); \
- tt1 = phitd * (alphaje - 1) * (pow(alphaje, tt0) - 1); \
- tt0 = V1 / (V1 - V2); \
- tt2 = pow(alphaje, tt0) * (V2 - V1) + alphaje * V1 - V2; \
- mcor_rev = tt1 / tt2; /* first order Newton correction */ \
- MREV = m0_rev + mcor_rev; \
- if (abs(V3 * phitdinv * MREV) < 1e-6) begin \
- /* Taylor approximation needed */ \
- /* Note: ISATREV and MREV have different meaning in this situation!! */ \
- m0flag = 1.0; \
- ISATREV = I3_cor * (1 / V3 + 0.5 * phitdinv * MREV); \
- MREV = -0.5 * I3_cor * MREV * phitdinv / V3; \
- end else begin \
- m0flag = 0.0; \
- ISATREV = -I3_cor / (exp(-V3 * phitdinv * MREV) - 1); \
- end \
- end \
- end \
- end
-
-// Part 4
-`define JuncapExpressInit4(AB_i, LS_i, LG_i, FJUNQ_i, cjobot, cjosti, cjogat, zflagbot, zflagsti, zflaggat) \
- /* charge model initialization */ \
- zfrac = FJUNQ_i * (AB_i * cjobot + LS_i * cjosti + LG_i * cjogat); \
- if ((AB_i * cjobot) <= zfrac) begin \
- zflagbot = 0.0; \
- end \
- if ((LS_i * cjosti) <= zfrac) begin \
- zflagsti = 0.0; \
- end \
- if ((LG_i * cjogat) <= zfrac) begin \
- zflaggat = 0.0; \
- end
-
-// Part 5
-`define JuncapExpressInit5(AB_i, LS_i, LG_i, ISATFOR1, ISATFOR2, ISATREV, xhighf1, expxhf1, xhighf2, expxhf2, xhighr, expxhr) \
- /* calculate limits beyond which exponentials are linearly extrapolated */ \
- if ( !( ((AB_i) == 0) && ((LS_i) == 0) && ((LG_i) == 0) ) ) begin \
- xhighf1 = ln(0.5 * IMAX_i / (ISATFOR1 + 1e-21)); \
- xhighf2 = ln(0.5 * IMAX_i / (ISATFOR2 + 1e-21)); \
- xhighr = ln(0.5 * IMAX_i / (abs(ISATREV) + 1e-21)); \
- end \
- xhighf1 = min(xhighf1, `se05); \
- expxhf1 = exp(xhighf1); \
- xhighf2 = min(xhighf2, `se05); \
- expxhf2 = exp(xhighf2); \
- xhighr = min(xhighr, `se05); \
- expxhr = exp(xhighr);
-
-`define JuncapExpressCurrent(V, MFOR1, ISATFOR1, MFOR2, ISATFOR2, MREV, ISATREV, m0flag, xhighf1, expxhf1, xhighf2, expxhf2, xhighr, expxhr, ijun) \
- tm0 = V * phitdinv * MFOR1; \
- tm1 = `expll(tm0, -`se05, `ke05, xhighf1, expxhf1); \
- ijunfor1 = ISATFOR1 * (tm1 - 1.0); \
- tm0 = V * phitdinv * MFOR2; \
- tm1 = `expll(tm0, -`se05, `ke05, xhighf2, expxhf2); \
- ijunfor2 = ISATFOR2 * (tm1 - 1.0); \
- ijunrev = 0.0; \
- if (m0flag > 0) begin \
- ijunrev = V * (ISATREV + V * MREV); \
- end else begin \
- tm0 = -V * phitdinv * MREV; \
- tm1 = `expll(tm0, -`se05, `ke05, xhighr, expxhr); \
- ijunrev = -ISATREV * (tm1 - 1.0); \
- end \
- ijun = ijunfor1 + ijunfor2 + ijunrev;
-
-
-`define JuncapExpressCharge(V, AB_i, LS_i, LG_i, qprefbot, qprefsti, qprefgat, qpref2bot, qpref2sti, qpref2gat, vbiinvbot, vbiinvsti, vbiinvgat, one_minus_PBOT, one_minus_PSTI, one_minus_PGAT, vfmin, vch, zflagbot, zflagsti, zflaggat, qjunbot, qjunsti, qjungat) \
- tmpv = 0.0; \
- vjv = 0.0; \
- `hypfunction5(V, vfmin, vch, vjv) \
- if (zflagbot > 0.5) begin \
- `mypower((1 - vjv * vbiinvbot), one_minus_PBOT, tmpv) \
- qjunbot = qprefbot * (1 - tmpv) + qpref2bot * (V - vjv); \
- end \
- if (zflagsti > 0.5) begin \
- `mypower((1 - vjv * vbiinvsti), one_minus_PSTI, tmpv) \
- qjunsti = qprefsti * (1 - tmpv) + qpref2sti * (V - vjv); \
- end \
- if (zflaggat > 0.5) begin \
- `mypower((1 - vjv * vbiinvgat), one_minus_PGAT, tmpv) \
- qjungat = qprefgat * (1 - tmpv) + qpref2gat * (V - vjv); \
- end
-
diff --git a/src/spicelib/devices/adms/psp102/admsva/JUNCAP200_parlist.include b/src/spicelib/devices/adms/psp102/admsva/JUNCAP200_parlist.include
deleted file mode 100644
index c9f2f685b..000000000
--- a/src/spicelib/devices/adms/psp102/admsva/JUNCAP200_parlist.include
+++ /dev/null
@@ -1,178 +0,0 @@
-//======================================================================================
-//======================================================================================
-// Filename: JUNCAP200_parlist.include
-//======================================================================================
-//======================================================================================
-//
-// (c) Copyright notice
-//
-// Since 2012 until today, PSP has been co-developed by NXP Semiconductors and
-// Delft University of Technology. For this part of the model, each claim undivided
-// ownership and copyrights
-// Until and including 2011, PSP has been co-developed by NXP Semiconductors and
-// Arizona State University. For this part of the model, NXP Semiconductors claims
-// undivided ownership and copyrights.
-//
-//
-// Version: 102.5.0 (PSP), 200.4.0 (JUNCAP), December 2013
-//
-//======================================================================================
-//======================================================================================
-//
-// Further information can be found in the file releasenotesPSP102.txt
-//
-
-//////////////////////////////////////////
-//
-// JUNCAP2 - Reduced parameterlist
-//
-//////////////////////////////////////////
-
-parameter real IMAX = 1000 `from(`IMAX_cliplow ,inf ) `P(info="Maximum current up to which forward current behaves exponentially" unit="A");
-parameter real TRJ = 21 `from(`TRJ_cliplow ,inf ) `P(info="reference temperature" unit="C");
-
-// Parameters for source-bulk junction
-`ifdef JUNCAP_StandAlone
- parameter real CJORBOT = 1E-3 `from(`CJORBOT_cliplow ,inf ) `P(info="Zero-bias capacitance per unit-of-area of bottom component" unit="Fm^-2");
- parameter real CJORSTI = 1E-9 `from(`CJORSTI_cliplow ,inf ) `P(info="Zero-bias capacitance per unit-of-length of STI-edge component" unit="Fm^-1");
- parameter real CJORGAT = 1E-9 `from(`CJORGAT_cliplow ,inf ) `P(info="Zero-bias capacitance per unit-of-length of gate-edge component" unit="Fm^-1");
- parameter real VBIRBOT = 1 `from(`VBIR_cliplow ,inf ) `P(info="Built-in voltage at the reference temperature of bottom component" unit="V");
- parameter real VBIRSTI = 1 `from(`VBIR_cliplow ,inf ) `P(info="Built-in voltage at the reference temperature of STI-edge component" unit="V");
- parameter real VBIRGAT = 1 `from(`VBIR_cliplow ,inf ) `P(info="Built-in voltage at the reference temperature of gate-edge component" unit="V");
- parameter real PBOT = 0.5 `from(`P_cliplow ,`P_cliphigh ) `P(info="Grading coefficient of bottom component" unit="");
- parameter real PSTI = 0.5 `from(`P_cliplow ,`P_cliphigh ) `P(info="Grading coefficient of STI-edge component" unit="");
- parameter real PGAT = 0.5 `from(`P_cliplow ,`P_cliphigh ) `P(info="Grading coefficient of gate-edge component" unit="");
- parameter real PHIGBOT = 1.16 `P(info="Zero-temperature bandgap voltage of bottom component" unit="V");
- parameter real PHIGSTI = 1.16 `P(info="Zero-temperature bandgap voltage of STI-edge component" unit="V");
- parameter real PHIGGAT = 1.16 `P(info="Zero-temperature bandgap voltage of gate-edge component" unit="V");
- parameter real IDSATRBOT = 1E-12 `from(`IDSATR_cliplow ,inf ) `P(info="Saturation current density at the reference temperature of bottom component" unit="Am^-2");
- parameter real IDSATRSTI = 1E-18 `from(`IDSATR_cliplow ,inf ) `P(info="Saturation current density at the reference temperature of STI-edge component" unit="Am^-1");
- parameter real IDSATRGAT = 1E-18 `from(`IDSATR_cliplow ,inf ) `P(info="Saturation current density at the reference temperature of gate-edge component" unit="Am^-1");
- parameter real CSRHBOT = 1E2 `from(`CSRH_cliplow ,inf ) `P(info="Shockley-Read-Hall prefactor of bottom component" unit="Am^-3");
- parameter real CSRHSTI = 1E-4 `from(`CSRH_cliplow ,inf ) `P(info="Shockley-Read-Hall prefactor of STI-edge component" unit="Am^-2");
- parameter real CSRHGAT = 1E-4 `from(`CSRH_cliplow ,inf ) `P(info="Shockley-Read-Hall prefactor of gate-edge component" unit="Am^-2");
- parameter real XJUNSTI = 100E-9 `from(`XJUN_cliplow ,inf ) `P(info="Junction depth of STI-edge component" unit="m");
- parameter real XJUNGAT = 100E-9 `from(`XJUN_cliplow ,inf ) `P(info="Junction depth of gate-edge component" unit="m");
- parameter real CTATBOT = 1E2 `from(`CTAT_cliplow ,inf ) `P(info="Trap-assisted tunneling prefactor of bottom component" unit="Am^-3");
- parameter real CTATSTI = 1E-4 `from(`CTAT_cliplow ,inf ) `P(info="Trap-assisted tunneling prefactor of STI-edge component" unit="Am^-2");
- parameter real CTATGAT = 1E-4 `from(`CTAT_cliplow ,inf ) `P(info="Trap-assisted tunneling prefactor of gate-edge component" unit="Am^-2");
- parameter real MEFFTATBOT = 0.25 `from(`MEFFTAT_cliplow ,inf ) `P(info="Effective mass (in units of m0) for trap-assisted tunneling of bottom component" unit="");
- parameter real MEFFTATSTI = 0.25 `from(`MEFFTAT_cliplow ,inf ) `P(info="Effective mass (in units of m0) for trap-assisted tunneling of STI-edge component" unit="");
- parameter real MEFFTATGAT = 0.25 `from(`MEFFTAT_cliplow ,inf ) `P(info="Effective mass (in units of m0) for trap-assisted tunneling of gate-edge component" unit="");
- parameter real CBBTBOT = 1E-12 `from(`CBBT_cliplow ,inf ) `P(info="Band-to-band tunneling prefactor of bottom component" unit="AV^-3");
- parameter real CBBTSTI = 1E-18 `from(`CBBT_cliplow ,inf ) `P(info="Band-to-band tunneling prefactor of STI-edge component" unit="AV^-3m");
- parameter real CBBTGAT = 1E-18 `from(`CBBT_cliplow ,inf ) `P(info="Band-to-band tunneling prefactor of gate-edge component" unit="AV^-3m");
- parameter real FBBTRBOT = 1E9 `P(info="Normalization field at the reference temperature for band-to-band tunneling of bottom component" unit="Vm^-1");
- parameter real FBBTRSTI = 1E9 `P(info="Normalization field at the reference temperature for band-to-band tunneling of STI-edge component" unit="Vm^-1");
- parameter real FBBTRGAT = 1E9 `P(info="Normalization field at the reference temperature for band-to-band tunneling of gate-edge component" unit="Vm^-1");
- parameter real STFBBTBOT = -1E-3 `P(info="Temperature scaling parameter for band-to-band tunneling of bottom component" unit="K^-1");
- parameter real STFBBTSTI = -1E-3 `P(info="Temperature scaling parameter for band-to-band tunneling of STI-edge component" unit="K^-1");
- parameter real STFBBTGAT = -1E-3 `P(info="Temperature scaling parameter for band-to-band tunneling of gate-edge component" unit="K^-1");
- parameter real VBRBOT = 10 `from(`VBR_cliplow ,inf ) `P(info="Breakdown voltage of bottom component" unit="V");
- parameter real VBRSTI = 10 `from(`VBR_cliplow ,inf ) `P(info="Breakdown voltage of STI-edge component" unit="V");
- parameter real VBRGAT = 10 `from(`VBR_cliplow ,inf ) `P(info="Breakdown voltage of gate-edge component" unit="V");
- parameter real PBRBOT = 4 `from(`PBR_cliplow ,inf ) `P(info="Breakdown onset tuning parameter of bottom component" unit="V");
- parameter real PBRSTI = 4 `from(`PBR_cliplow ,inf ) `P(info="Breakdown onset tuning parameter of STI-edge component" unit="V");
- parameter real PBRGAT = 4 `from(`PBR_cliplow ,inf ) `P(info="Breakdown onset tuning parameter of gate-edge component" unit="V");
-`else // JUNCAP_StandAlone
- parameter real CJORBOT = 1E-3 `from(`CJORBOT_cliplow ,inf ) `P(info="Zero-bias capacitance per unit-of-area of bottom component for source-bulk junction" unit="Fm^-2");
- parameter real CJORSTI = 1E-9 `from(`CJORSTI_cliplow ,inf ) `P(info="Zero-bias capacitance per unit-of-length of STI-edge component for source-bulk junction" unit="Fm^-1");
- parameter real CJORGAT = 1E-9 `from(`CJORGAT_cliplow ,inf ) `P(info="Zero-bias capacitance per unit-of-length of gate-edge component for source-bulk junction" unit="Fm^-1");
- parameter real VBIRBOT = 1 `from(`VBIR_cliplow ,inf ) `P(info="Built-in voltage at the reference temperature of bottom component for source-bulk junction" unit="V");
- parameter real VBIRSTI = 1 `from(`VBIR_cliplow ,inf ) `P(info="Built-in voltage at the reference temperature of STI-edge component for source-bulk junction" unit="V");
- parameter real VBIRGAT = 1 `from(`VBIR_cliplow ,inf ) `P(info="Built-in voltage at the reference temperature of gate-edge component for source-bulk junction" unit="V");
- parameter real PBOT = 0.5 `from(`P_cliplow ,`P_cliphigh ) `P(info="Grading coefficient of bottom component for source-bulk junction" unit="");
- parameter real PSTI = 0.5 `from(`P_cliplow ,`P_cliphigh ) `P(info="Grading coefficient of STI-edge component for source-bulk junction" unit="");
- parameter real PGAT = 0.5 `from(`P_cliplow ,`P_cliphigh ) `P(info="Grading coefficient of gate-edge component for source-bulk junction" unit="");
- parameter real PHIGBOT = 1.16 `P(info="Zero-temperature bandgap voltage of bottom component for source-bulk junction" unit="V");
- parameter real PHIGSTI = 1.16 `P(info="Zero-temperature bandgap voltage of STI-edge component for source-bulk junction" unit="V");
- parameter real PHIGGAT = 1.16 `P(info="Zero-temperature bandgap voltage of gate-edge component for source-bulk junction" unit="V");
- parameter real IDSATRBOT = 1E-12 `from(`IDSATR_cliplow ,inf ) `P(info="Saturation current density at the reference temperature of bottom component for source-bulk junction" unit="Am^-2");
- parameter real IDSATRSTI = 1E-18 `from(`IDSATR_cliplow ,inf ) `P(info="Saturation current density at the reference temperature of STI-edge component for source-bulk junction" unit="Am^-1");
- parameter real IDSATRGAT = 1E-18 `from(`IDSATR_cliplow ,inf ) `P(info="Saturation current density at the reference temperature of gate-edge component for source-bulk junction" unit="Am^-1");
- parameter real CSRHBOT = 1E2 `from(`CSRH_cliplow ,inf ) `P(info="Shockley-Read-Hall prefactor of bottom component for source-bulk junction" unit="Am^-3");
- parameter real CSRHSTI = 1E-4 `from(`CSRH_cliplow ,inf ) `P(info="Shockley-Read-Hall prefactor of STI-edge component for source-bulk junction" unit="Am^-2");
- parameter real CSRHGAT = 1E-4 `from(`CSRH_cliplow ,inf ) `P(info="Shockley-Read-Hall prefactor of gate-edge component for source-bulk junction" unit="Am^-2");
- parameter real XJUNSTI = 100E-9 `from(`XJUN_cliplow ,inf ) `P(info="Junction depth of STI-edge component for source-bulk junction" unit="m");
- parameter real XJUNGAT = 100E-9 `from(`XJUN_cliplow ,inf ) `P(info="Junction depth of gate-edge component for source-bulk junction" unit="m");
- parameter real CTATBOT = 1E2 `from(`CTAT_cliplow ,inf ) `P(info="Trap-assisted tunneling prefactor of bottom component for source-bulk junction" unit="Am^-3");
- parameter real CTATSTI = 1E-4 `from(`CTAT_cliplow ,inf ) `P(info="Trap-assisted tunneling prefactor of STI-edge component for source-bulk junction" unit="Am^-2");
- parameter real CTATGAT = 1E-4 `from(`CTAT_cliplow ,inf ) `P(info="Trap-assisted tunneling prefactor of gate-edge component for source-bulk junction" unit="Am^-2");
- parameter real MEFFTATBOT = 0.25 `from(`MEFFTAT_cliplow ,inf ) `P(info="Effective mass (in units of m0) for trap-assisted tunneling of bottom component for source-bulk junction" unit="");
- parameter real MEFFTATSTI = 0.25 `from(`MEFFTAT_cliplow ,inf ) `P(info="Effective mass (in units of m0) for trap-assisted tunneling of STI-edge component for source-bulk junction" unit="");
- parameter real MEFFTATGAT = 0.25 `from(`MEFFTAT_cliplow ,inf ) `P(info="Effective mass (in units of m0) for trap-assisted tunneling of gate-edge component for source-bulk junction" unit="");
- parameter real CBBTBOT = 1E-12 `from(`CBBT_cliplow ,inf ) `P(info="Band-to-band tunneling prefactor of bottom component for source-bulk junction" unit="AV^-3");
- parameter real CBBTSTI = 1E-18 `from(`CBBT_cliplow ,inf ) `P(info="Band-to-band tunneling prefactor of STI-edge component for source-bulk junction" unit="AV^-3m");
- parameter real CBBTGAT = 1E-18 `from(`CBBT_cliplow ,inf ) `P(info="Band-to-band tunneling prefactor of gate-edge component for source-bulk junction" unit="AV^-3m");
- parameter real FBBTRBOT = 1E9 `P(info="Normalization field at the reference temperature for band-to-band tunneling of bottom component for source-bulk junction" unit="Vm^-1");
- parameter real FBBTRSTI = 1E9 `P(info="Normalization field at the reference temperature for band-to-band tunneling of STI-edge component for source-bulk junction" unit="Vm^-1");
- parameter real FBBTRGAT = 1E9 `P(info="Normalization field at the reference temperature for band-to-band tunneling of gate-edge component for source-bulk junction" unit="Vm^-1");
- parameter real STFBBTBOT = -1E-3 `P(info="Temperature scaling parameter for band-to-band tunneling of bottom component for source-bulk junction" unit="K^-1");
- parameter real STFBBTSTI = -1E-3 `P(info="Temperature scaling parameter for band-to-band tunneling of STI-edge component for source-bulk junction" unit="K^-1");
- parameter real STFBBTGAT = -1E-3 `P(info="Temperature scaling parameter for band-to-band tunneling of gate-edge component for source-bulk junction" unit="K^-1");
- parameter real VBRBOT = 10 `from(`VBR_cliplow ,inf ) `P(info="Breakdown voltage of bottom component for source-bulk junction" unit="V");
- parameter real VBRSTI = 10 `from(`VBR_cliplow ,inf ) `P(info="Breakdown voltage of STI-edge component for source-bulk junction" unit="V");
- parameter real VBRGAT = 10 `from(`VBR_cliplow ,inf ) `P(info="Breakdown voltage of gate-edge component for source-bulk junction" unit="V");
- parameter real PBRBOT = 4 `from(`PBR_cliplow ,inf ) `P(info="Breakdown onset tuning parameter of bottom component for source-bulk junction" unit="V");
- parameter real PBRSTI = 4 `from(`PBR_cliplow ,inf ) `P(info="Breakdown onset tuning parameter of STI-edge component for source-bulk junction" unit="V");
- parameter real PBRGAT = 4 `from(`PBR_cliplow ,inf ) `P(info="Breakdown onset tuning parameter of gate-edge component for source-bulk junction" unit="V");
-`endif
-
-`ifdef JUNCAP_StandAlone
- // do nothing
-`else // JUNCAP_StandAlone
- // Parameters for drain-bulk junction
- parameter real CJORBOTD = 1E-3 `from(`CJORBOT_cliplow ,inf ) `P(info="Zero-bias capacitance per unit-of-area of bottom component for drain-bulk junction" unit="Fm^-2");
- parameter real CJORSTID = 1E-9 `from(`CJORSTI_cliplow ,inf ) `P(info="Zero-bias capacitance per unit-of-length of STI-edge component for drain-bulk junction" unit="Fm^-1");
- parameter real CJORGATD = 1E-9 `from(`CJORGAT_cliplow ,inf ) `P(info="Zero-bias capacitance per unit-of-length of gate-edge component for drain-bulk junction" unit="Fm^-1");
- parameter real VBIRBOTD = 1 `from(`VBIR_cliplow ,inf ) `P(info="Built-in voltage at the reference temperature of bottom component for drain-bulk junction" unit="V");
- parameter real VBIRSTID = 1 `from(`VBIR_cliplow ,inf ) `P(info="Built-in voltage at the reference temperature of STI-edge component for drain-bulk junction" unit="V");
- parameter real VBIRGATD = 1 `from(`VBIR_cliplow ,inf ) `P(info="Built-in voltage at the reference temperature of gate-edge component for drain-bulk junction" unit="V");
- parameter real PBOTD = 0.5 `from(`P_cliplow ,`P_cliphigh ) `P(info="Grading coefficient of bottom component for drain-bulk junction" unit="");
- parameter real PSTID = 0.5 `from(`P_cliplow ,`P_cliphigh ) `P(info="Grading coefficient of STI-edge component for drain-bulk junction" unit="");
- parameter real PGATD = 0.5 `from(`P_cliplow ,`P_cliphigh ) `P(info="Grading coefficient of gate-edge component for drain-bulk junction" unit="");
- parameter real PHIGBOTD = 1.16 `P(info="Zero-temperature bandgap voltage of bottom component for drain-bulk junction" unit="V");
- parameter real PHIGSTID = 1.16 `P(info="Zero-temperature bandgap voltage of STI-edge component for drain-bulk junction" unit="V");
- parameter real PHIGGATD = 1.16 `P(info="Zero-temperature bandgap voltage of gate-edge component for drain-bulk junction" unit="V");
- parameter real IDSATRBOTD = 1E-12 `from(`IDSATR_cliplow ,inf ) `P(info="Saturation current density at the reference temperature of bottom component for drain-bulk junction" unit="Am^-2");
- parameter real IDSATRSTID = 1E-18 `from(`IDSATR_cliplow ,inf ) `P(info="Saturation current density at the reference temperature of STI-edge component for drain-bulk junction" unit="Am^-1");
- parameter real IDSATRGATD = 1E-18 `from(`IDSATR_cliplow ,inf ) `P(info="Saturation current density at the reference temperature of gate-edge component for drain-bulk junction" unit="Am^-1");
- parameter real CSRHBOTD = 1E2 `from(`CSRH_cliplow ,inf ) `P(info="Shockley-Read-Hall prefactor of bottom component for drain-bulk junction" unit="Am^-3");
- parameter real CSRHSTID = 1E-4 `from(`CSRH_cliplow ,inf ) `P(info="Shockley-Read-Hall prefactor of STI-edge component for drain-bulk junction" unit="Am^-2");
- parameter real CSRHGATD = 1E-4 `from(`CSRH_cliplow ,inf ) `P(info="Shockley-Read-Hall prefactor of gate-edge component for drain-bulk junction" unit="Am^-2");
- parameter real XJUNSTID = 100E-9 `from(`XJUN_cliplow ,inf ) `P(info="Junction depth of STI-edge component for drain-bulk junction" unit="m");
- parameter real XJUNGATD = 100E-9 `from(`XJUN_cliplow ,inf ) `P(info="Junction depth of gate-edge component for drain-bulk junction" unit="m");
- parameter real CTATBOTD = 1E2 `from(`CTAT_cliplow ,inf ) `P(info="Trap-assisted tunneling prefactor of bottom component for drain-bulk junction" unit="Am^-3");
- parameter real CTATSTID = 1E-4 `from(`CTAT_cliplow ,inf ) `P(info="Trap-assisted tunneling prefactor of STI-edge component for drain-bulk junction" unit="Am^-2");
- parameter real CTATGATD = 1E-4 `from(`CTAT_cliplow ,inf ) `P(info="Trap-assisted tunneling prefactor of gate-edge component for drain-bulk junction" unit="Am^-2");
- parameter real MEFFTATBOTD= 0.25 `from(`MEFFTAT_cliplow ,inf ) `P(info="Effective mass (in units of m0) for trap-assisted tunneling of bottom component for drain-bulk junction" unit="");
- parameter real MEFFTATSTID= 0.25 `from(`MEFFTAT_cliplow ,inf ) `P(info="Effective mass (in units of m0) for trap-assisted tunneling of STI-edge component for drain-bulk junction" unit="");
- parameter real MEFFTATGATD= 0.25 `from(`MEFFTAT_cliplow ,inf ) `P(info="Effective mass (in units of m0) for trap-assisted tunneling of gate-edge component for drain-bulk junction" unit="");
- parameter real CBBTBOTD = 1E-12 `from(`CBBT_cliplow ,inf ) `P(info="Band-to-band tunneling prefactor of bottom component for drain-bulk junction" unit="AV^-3");
- parameter real CBBTSTID = 1E-18 `from(`CBBT_cliplow ,inf ) `P(info="Band-to-band tunneling prefactor of STI-edge component for drain-bulk junction" unit="AV^-3m");
- parameter real CBBTGATD = 1E-18 `from(`CBBT_cliplow ,inf ) `P(info="Band-to-band tunneling prefactor of gate-edge component for drain-bulk junction" unit="AV^-3m");
- parameter real FBBTRBOTD = 1E9 `P(info="Normalization field at the reference temperature for band-to-band tunneling of bottom component for drain-bulk junction" unit="Vm^-1");
- parameter real FBBTRSTID = 1E9 `P(info="Normalization field at the reference temperature for band-to-band tunneling of STI-edge component for drain-bulk junction" unit="Vm^-1");
- parameter real FBBTRGATD = 1E9 `P(info="Normalization field at the reference temperature for band-to-band tunneling of gate-edge component for drain-bulk junction" unit="Vm^-1");
- parameter real STFBBTBOTD = -1E-3 `P(info="Temperature scaling parameter for band-to-band tunneling of bottom component for drain-bulk junction" unit="K^-1");
- parameter real STFBBTSTID = -1E-3 `P(info="Temperature scaling parameter for band-to-band tunneling of STI-edge component for drain-bulk junction" unit="K^-1");
- parameter real STFBBTGATD = -1E-3 `P(info="Temperature scaling parameter for band-to-band tunneling of gate-edge component for drain-bulk junction" unit="K^-1");
- parameter real VBRBOTD = 10 `from(`VBR_cliplow ,inf ) `P(info="Breakdown voltage of bottom component for drain-bulk junction" unit="V");
- parameter real VBRSTID = 10 `from(`VBR_cliplow ,inf ) `P(info="Breakdown voltage of STI-edge component for drain-bulk junction" unit="V");
- parameter real VBRGATD = 10 `from(`VBR_cliplow ,inf ) `P(info="Breakdown voltage of gate-edge component for drain-bulk junction" unit="V");
- parameter real PBRBOTD = 4 `from(`PBR_cliplow ,inf ) `P(info="Breakdown onset tuning parameter of bottom component for drain-bulk junction" unit="V");
- parameter real PBRSTID = 4 `from(`PBR_cliplow ,inf ) `P(info="Breakdown onset tuning parameter of STI-edge component for drain-bulk junction" unit="V");
- parameter real PBRGATD = 4 `from(`PBR_cliplow ,inf ) `P(info="Breakdown onset tuning parameter of gate-edge component for drain-bulk junction" unit="V");
-`endif // JUNCAP_StandAlone
-
-// JUNCAP2-express parameters
-parameter real SWJUNEXP = 0.0 `from( 0.0,1.0 ) `P(info="Flag for JUNCAP-express; 0=full model, 1=express model" unit="");
-`ifdef JUNCAP_StandAlone
- parameter real VJUNREF = 2.5 `from(`VJUNREF_cliplow ,inf ) `P(info="Typical maximum junction voltage; usually about 2*VSUP" unit="");
- parameter real FJUNQ = 0.03 `from(`FJUNQ_cliplow ,inf ) `P(info="Fraction below which junction capacitance components are considered negligible" unit="");
-`else // JUNCAP_StandAlone
- parameter real VJUNREF = 2.5 `from(`VJUNREF_cliplow ,inf ) `P(info="Typical maximum source-bulk junction voltage; usually about 2*VSUP" unit="");
- parameter real FJUNQ = 0.03 `from(`FJUNQ_cliplow ,inf ) `P(info="Fraction below which source-bulk junction capacitance components are considered negligible" unit="");
- parameter real VJUNREFD = 2.5 `from(`VJUNREF_cliplow ,inf ) `P(info="Typical maximum drain-bulk junction voltage; usually about 2*VSUP" unit="");
- parameter real FJUNQD = 0.03 `from(`FJUNQ_cliplow ,inf ) `P(info="Fraction below which drain-bulk junction capacitance components are considered negligible" unit="");
-`endif // JUNCAP_StandAlone
diff --git a/src/spicelib/devices/adms/psp102/admsva/JUNCAP200_varlist1.include b/src/spicelib/devices/adms/psp102/admsva/JUNCAP200_varlist1.include
deleted file mode 100644
index 481e12bbc..000000000
--- a/src/spicelib/devices/adms/psp102/admsva/JUNCAP200_varlist1.include
+++ /dev/null
@@ -1,102 +0,0 @@
-//======================================================================================
-//======================================================================================
-// Filename: JUNCAP200_varlist1.include
-//======================================================================================
-//======================================================================================
-//
-// (c) Copyright notice
-//
-// Since 2012 until today, PSP has been co-developed by NXP Semiconductors and
-// Delft University of Technology. For this part of the model, each claim undivided
-// ownership and copyrights
-// Until and including 2011, PSP has been co-developed by NXP Semiconductors and
-// Arizona State University. For this part of the model, NXP Semiconductors claims
-// undivided ownership and copyrights.
-//
-//
-// Version: 102.5.0 (PSP), 200.4.0 (JUNCAP), December 2013
-//
-//======================================================================================
-//======================================================================================
-//
-// Further information can be found in the file releasenotesPSP102.txt
-//
-
-// declaration of clipped parameters
-real TRJ_i, IMAX_i;
-real CJORBOT_i, CJORSTI_i, CJORGAT_i, VBIRBOT_i, VBIRSTI_i, VBIRGAT_i;
-real PBOT_i, PSTI_i, PGAT_i, PHIGBOT_i, PHIGSTI_i, PHIGGAT_i;
-real IDSATRBOT_i, IDSATRSTI_i, IDSATRGAT_i, XJUNSTI_i, XJUNGAT_i;
-real CSRHBOT_i, CSRHSTI_i, CSRHGAT_i, CTATBOT_i, CTATSTI_i, CTATGAT_i;
-real MEFFTATBOT_i, MEFFTATSTI_i, MEFFTATGAT_i;
-real CBBTBOT_i, CBBTSTI_i, CBBTGAT_i, FBBTRBOT_i, FBBTRSTI_i, FBBTRGAT_i;
-real STFBBTBOT_i, STFBBTSTI_i, STFBBTGAT_i;
-real VBRBOT_i, VBRSTI_i, VBRGAT_i, PBRBOT_i, PBRSTI_i, PBRGAT_i;
-
-real SWJUNEXP_i, VJUNREF_i, FJUNQ_i;
-
-// declaration of variables calculated outside macro "juncapfunction", voltage-independent part
-real tkr, tkd, auxt, KBOL_over_QELE, phitr, phitrinv, phitd, phitdinv;
-real perfc, berfc, cerfc;
-real deltaphigr, deltaphigd, pmax;
-
-real phigrbot, phigrsti, phigrgat, phigdbot, phigdsti, phigdgat;
-real ftdbot, ftdsti, ftdgat, idsatbot, idsatsti, idsatgat;
-real ubibot, ubisti, ubigat, vbibot, vbisti, vbigat;
-real vbibot2, vbisti2, vbigat2, pbot2, psti2, pgat2, vbibot2r, vbisti2r, vbigat2r;
-real vbiinvbot, vbiinvsti, vbiinvgat;
-real one_minus_PBOT, one_minus_PSTI, one_minus_PGAT;
-real one_over_one_minus_PBOT, one_over_one_minus_PSTI, one_over_one_minus_PGAT;
-real cjobot, cjosti, cjogat;
-real qprefbot, qprefsti, qprefgat, qpref2bot, qpref2sti, qpref2gat;
-real wdepnulrbot, wdepnulrsti, wdepnulrgat, wdepnulrinvbot, wdepnulrinvsti, wdepnulrinvgat;
-real VBIRBOTinv, VBIRSTIinv, VBIRGATinv;
-real deltaEbot, deltaEsti, deltaEgat, atatbot, atatsti, atatgat;
-real btatpartbot, btatpartsti, btatpartgat;
-real fbbtbot, fbbtsti, fbbtgat;
-real fstopbot, fstopsti, fstopgat, VBRinvbot, VBRinvsti, VBRinvgat;
-real slopebot, slopesti, slopegat;
-real vmaxbot, vmaxsti, vmaxgat;
-
-// JUNCAP-Express variables
-real I1, I2, I3, I4, I5;
-real I1_cor, I2_cor, I3_cor, I4_cor, I5_cor;
-real V1, V2, V3, V4, V5;
-real alphaje, m0_rev, mcor_rev;
-real tt0, tt1, tt2, tm0, tm1;
-real FRACNA, FRACNB, FRACI;
-real zfrac;
-real ijunfor1, ijunfor2, ijunrev;
-
-`ifdef JUNCAP_StandAlone
- // do nothing
-`else // JUNCAP_StandAlone
- real CJORBOTD_i, CJORSTID_i, CJORGATD_i, VBIRBOTD_i, VBIRSTID_i, VBIRGATD_i;
- real PBOTD_i, PSTID_i, PGATD_i, PHIGBOTD_i, PHIGSTID_i, PHIGGATD_i;
- real IDSATRBOTD_i, IDSATRSTID_i, IDSATRGATD_i, XJUNSTID_i, XJUNGATD_i;
- real CSRHBOTD_i, CSRHSTID_i, CSRHGATD_i, CTATBOTD_i, CTATSTID_i, CTATGATD_i;
- real MEFFTATBOTD_i, MEFFTATSTID_i, MEFFTATGATD_i;
- real CBBTBOTD_i, CBBTSTID_i, CBBTGATD_i, FBBTRBOTD_i, FBBTRSTID_i, FBBTRGATD_i;
- real STFBBTBOTD_i, STFBBTSTID_i, STFBBTGATD_i;
- real VBRBOTD_i, VBRSTID_i, VBRGATD_i, PBRBOTD_i, PBRSTID_i, PBRGATD_i;
-
- real VJUNREFD_i, FJUNQD_i;
-
- real phigrbot_d, phigrsti_d, phigrgat_d, phigdbot_d, phigdsti_d, phigdgat_d;
- real ftdbot_d, ftdsti_d, ftdgat_d, idsatbot_d, idsatsti_d, idsatgat_d;
- real ubibot_d, ubisti_d, ubigat_d, vbibot_d, vbisti_d, vbigat_d;
- real vbiinvbot_d, vbiinvsti_d, vbiinvgat_d;
- real one_minus_PBOT_d, one_minus_PSTI_d, one_minus_PGAT_d;
- real one_over_one_minus_PBOT_d, one_over_one_minus_PSTI_d, one_over_one_minus_PGAT_d;
- real cjobot_d, cjosti_d, cjogat_d;
- real qprefbot_d, qprefsti_d, qprefgat_d, qpref2bot_d, qpref2sti_d, qpref2gat_d;
- real wdepnulrbot_d, wdepnulrsti_d, wdepnulrgat_d, wdepnulrinvbot_d, wdepnulrinvsti_d, wdepnulrinvgat_d;
- real VBIRBOTinv_d, VBIRSTIinv_d, VBIRGATinv_d;
- real deltaEbot_d, deltaEsti_d, deltaEgat_d, atatbot_d, atatsti_d, atatgat_d;
- real btatpartbot_d, btatpartsti_d, btatpartgat_d;
- real fbbtbot_d, fbbtsti_d, fbbtgat_d;
- real fstopbot_d, fstopsti_d, fstopgat_d, VBRinvbot_d, VBRinvsti_d, VBRinvgat_d;
- real slopebot_d, slopesti_d, slopegat_d;
-`endif
-
-`LocalGlobalVars
diff --git a/src/spicelib/devices/adms/psp102/admsva/JUNCAP200_varlist2.include b/src/spicelib/devices/adms/psp102/admsva/JUNCAP200_varlist2.include
deleted file mode 100644
index ff1ec8a15..000000000
--- a/src/spicelib/devices/adms/psp102/admsva/JUNCAP200_varlist2.include
+++ /dev/null
@@ -1,59 +0,0 @@
-//======================================================================================
-//======================================================================================
-// Filename: JUNCAP200_varlist2.include
-//======================================================================================
-//======================================================================================
-//
-// (c) Copyright notice
-//
-// Since 2012 until today, PSP has been co-developed by NXP Semiconductors and
-// Delft University of Technology. For this part of the model, each claim undivided
-// ownership and copyrights
-// Until and including 2011, PSP has been co-developed by NXP Semiconductors and
-// Arizona State University. For this part of the model, NXP Semiconductors claims
-// undivided ownership and copyrights.
-//
-//
-// Version: 102.5.0 (PSP), 200.4.0 (JUNCAP), December 2013
-//
-//======================================================================================
-//======================================================================================
-//
-// Further information can be found in the file releasenotesPSP102.txt
-//
-//================================================================
-// Variables that are different for source and drain side junction
-// and have a scope larger than a single macro-call
-//================================================================
-
-`ifdef JUNCAP_StandAlone
- real AB_i, LS_i, LG_i;
- real zflagbot, zflagsti, zflaggat;
- real VMAX, exp_VMAX_over_phitd, vbimin, vch, vfmin, vbbtlim;
-
- // JUNCAP-express variables
- real xhighf1, expxhf1, xhighf2, expxhf2, xhighr, expxhr;
-
- // JUNCAP2-express intermediate parameters
- real ISATFOR1, MFOR1, ISATFOR2, MFOR2, ISATREV, MREV, m0flag;
-`else // JUNCAP_StandAlone
- real ABSOURCE_i, LSSOURCE_i, LGSOURCE_i, AS_i, PS_i;
- real zflagbot_s, zflagsti_s, zflaggat_s;
- real VMAX_s, exp_VMAX_over_phitd_s, vbimin_s, vch_s, vfmin_s, vbbtlim_s;
-
- // JUNCAP-express variables
- real xhighf1_s, expxhf1_s, xhighf2_s, expxhf2_s, xhighr_s, expxhr_s, m0flag_s;
-
- // JUNCAP2-express intermediate parameters
- real ISATFOR1_s, MFOR1_s, ISATFOR2_s, MFOR2_s, ISATREV_s, MREV_s;
-
- real ABDRAIN_i, LSDRAIN_i, LGDRAIN_i, AD_i, PD_i;
- real zflagbot_d, zflagsti_d, zflaggat_d;
- real VMAX_d, exp_VMAX_over_phitd_d, vbimin_d, vch_d, vfmin_d, vbbtlim_d;
-
- // JUNCAP-express variables
- real xhighf1_d, expxhf1_d, xhighf2_d, expxhf2_d, xhighr_d, expxhr_d, m0flag_d;
-
- // JUNCAP2-express intermediate parameters
- real ISATFOR1_d, MFOR1_d, ISATFOR2_d, MFOR2_d, ISATREV_d, MREV_d;
-`endif // JUNCAP_StandAlone
diff --git a/src/spicelib/devices/adms/psp102/admsva/PSP102_ChargesNQS.include b/src/spicelib/devices/adms/psp102/admsva/PSP102_ChargesNQS.include
deleted file mode 100644
index c74c94f47..000000000
--- a/src/spicelib/devices/adms/psp102/admsva/PSP102_ChargesNQS.include
+++ /dev/null
@@ -1,309 +0,0 @@
-//======================================================================================
-//======================================================================================
-// Filename: PSP102_ChargesNQS.include
-//======================================================================================
-//======================================================================================
-//
-// (c) Copyright notice
-//
-// Since 2012 until today, PSP has been co-developed by NXP Semiconductors and
-// Delft University of Technology. For this part of the model, each claim undivided
-// ownership and copyrights
-// Until and including 2011, PSP has been co-developed by NXP Semiconductors and
-// Arizona State University. For this part of the model, NXP Semiconductors claims
-// undivided ownership and copyrights.
-//
-//
-// Version: 102.5.0, December 2013
-//
-//======================================================================================
-//======================================================================================
-//
-// Further information can be found in the file releasenotesPSP102.txt
-//
-
-///////////////////////////////////////////////
-//
-// Calculate NQS-charge contributions
-//
-///////////////////////////////////////////////
-
-Qp1 = vnorm * V(SPLINE1);
-Qp2 = vnorm * V(SPLINE2);
-Qp3 = vnorm * V(SPLINE3);
-Qp4 = vnorm * V(SPLINE4);
-Qp5 = vnorm * V(SPLINE5);
-Qp6 = vnorm * V(SPLINE6);
-Qp7 = vnorm * V(SPLINE7);
-Qp8 = vnorm * V(SPLINE8);
-Qp9 = vnorm * V(SPLINE9);
-
-Tnorm = 0.0;
-
-if (SWNQS_i != 0) begin
- // Dimension and mobility information is included in Tnorm
- Tnorm = MUNQS_i * phit1 * BET_i / (COX_qm * Gmob_dL);
- thesat2 = thesat1 * thesat1 * phit1 * phit1;
-
- if (SWNQS_i == 1) begin
- dQy = QpN - Qp0;
- d2Qy = 6.0 * (Qp0 + QpN) - 12.0 * Qp1;
- end else if (SWNQS_i == 2) begin
- dQy = (-7.0 * Qp0 - 3.0 * Qp1 + 12.0 * Qp2 - 2.0 * QpN) / 5.0;
- d2Qy = -18.0 / 5.0 * (-4.0 * Qp0 + 9.0 * Qp1 - 6.0 * Qp2 + QpN);
- end else if (SWNQS_i == 3) begin
- dQy = (-13.0 * Qp0 - 6.0 * Qp1 + 24.0 * Qp2 - 6.0 * Qp3 + QpN) / 7.0;
- d2Qy = (180.0 * Qp0 - 408.0 * Qp1 + 288.0 * Qp2 - 72.0 * Qp3 + 12.0 * QpN) / 7.0;
- end else if (SWNQS_i == 5) begin
- dQy = (-181.0 * Qp0 - 84.0 * Qp1 + 24.0 * Qp4 - 6.0 * Qp5 - 90.0 * Qp3 + QpN
- + 336.0 * Qp2) / 65.0;
- d2Qy = (432.0 * Qp4 - 108.0 * Qp5 - 1620.0 * Qp3 + 18.0 * QpN + 3762.0 * Qp0
- - 8532.0 * Qp1 + 6048.0 * Qp2) / 65.0;
- end else if (SWNQS_i == 9) begin
- dQy = (1680.0 * Qp6 + 23400.0 * Qp4 + 5.0 * QpN - 87330.0 * Qp3 + 120.0 * Qp8
- - 450.0 * Qp7 - 81480.0 * Qp1 + 325920.0 * Qp2
- -175565.0 * Qp0 - 30.0 * Qp9) / 37829.0 - 30.0 / 181.0 * Qp5;
- d2Qy = (-13500.0 * Qp7 + 702000.0 * Qp4 - 2619900 * Qp3 - 13793100.0 * Qp1
- + 9777600.0 * Qp2 + 6081750.0 * Qp0 + 150.0 * QpN + 3600.0 * Qp8
- - 900.0 * Qp9 + 50400 * Qp6) / 37829.0 - 900.0 / 181.0 * Qp5;
- end else begin
- dQy = 0;
- d2Qy = 0;
- end
- `fq(Qp1, xg, dQy, d2Qy, fk1)
-end
-
-if (SWNQS_i >= 2) begin
- if (SWNQS_i == 2) begin
- dQy = (2.0 * Qp0 - 12.0 * Qp1 + 3.0 * Qp2 + 7.0 * QpN) / 5.0;
- d2Qy = -18.0 / 5.0 * (-4.0 * QpN + 9.0 * Qp2 - 6.0 * Qp1 + Qp0);
- end else if (SWNQS_i == 3) begin
- dQy = 0.5 * Qp0 - 3.0 * Qp1 + 3.0 * Qp3 - 0.5 * QpN;
- d2Qy = (-48.0 * Qp0 + 288.0 * Qp1 - 480.0 * Qp2 + 288.0 * Qp3 - 48.0 * QpN) / 7.0;
- end else if (SWNQS_i == 5) begin
- dQy = (-291.0 * Qp1 - 6.0 * Qp2 - 84.0 * Qp4 + 21.0 * Qp5) / 65.0
- + (630.0 * Qp3 - 7.0 * QpN + 97.0 * Qp0) / 130.0;
- d2Qy = (-1728.0 * Qp4 + 432.0 * Qp5 + 6480.0 * Qp3 - 72.0 * QpN - 1008 * Qp0
- + 6048 * Qp1 - 10152 * Qp2) / 65.0;
- end else if (SWNQS_i == 9) begin
- dQy = (-5880.0 * Qp6 - 81900.0 * Qp4 + 305655.0 * Qp3 - 420.0 * Qp8
- + 105.0 * Qp9 - 282255.0 * Qp1 + 1575.0 * Qp7 - 5850.0 * Qp2) / 37829.0
- + 105.0 / 181.0 * Qp5 + (94085.0 * Qp0 - 35.0 * QpN) / 75658.0;
- d2Qy = (9777600.0 * Qp1 + 54000.0 * Qp7 - 2808000.0 * Qp4 + 10479600.0 * Qp3
- - 16413000.0 * Qp2 - 1629600.0 * Qp0 - 600.0 * QpN - 14400.0 * Qp8
- + 3600.0 * Qp9 - 201600.0 * Qp6) / 37829.0 + 3600.0 * Qp5 / 181.0;
- end else begin
- dQy = 0;
- d2Qy = 0;
- end
- `fq(Qp2, xg, dQy, d2Qy, fk2)
-end
-
-if (SWNQS_i >= 3) begin
- if (SWNQS_i == 3) begin
- dQy = (13.0 * QpN + 6.0 * Qp3 - 24.0 * Qp2 + 6.0 * Qp1 - Qp0) / 7.0;
- d2Qy = (180.0 * QpN - 408.0 * Qp3 + 288.0 * Qp2 - 72.0 * Qp1 + 12.0 * Qp0) / 7.0;
- end else if (SWNQS_i == 5) begin
- dQy = (QpN - 6.0 * Qp5 + 24.0 * Qp4 - 24.0 * Qp2 + 6.0 * Qp1 - Qp0) / 5.0;
- d2Qy = (1296.0 * (Qp4 + Qp2) - 324.0 * (Qp5 + Qp1) - 2052.0 * Qp3
- + 54.0 * (QpN + Qp0)) / 13.0;
- end else if (SWNQS_i == 9) begin
- dQy = (21840.0 * Qp6 + 304200.0 * Qp4 + 65.0 * QpN - 420.0 * Qp3 + 1560.0 * Qp8
- - 12605.0 * Qp0-390.0 * Qp9 + 75630.0 * Qp1 - 5850.0 * Qp7
- - 302520.0 * Qp2) / 37829.0 - 390.0 / 181.0 * Qp5;
- d2Qy = (-2619900.0 * Qp1 - 202500.0 * Qp7 + 10530000.0 * Qp4 - 16601100.0 * Qp3
- + 10479600.0 * Qp2 + 436650.0 * Qp0 + 2250.0 * QpN + 54000.0 * Qp8
- - 13500.0 * Qp9 + 756000.0 * Qp6) / 37829.0 - 13500.0 * Qp5 / 181.0;
- end else begin
- dQy = 0;
- d2Qy = 0;
- end
- `fq(Qp3, xg, dQy, d2Qy, fk3)
-end
-
-if (SWNQS_i >= 4) begin
- if (SWNQS_i == 5) begin
- dQy = (-630.0 * Qp3 + 12.0 * Qp4 + 582.0 * Qp5 - 97.0 * QpN + 7.0 * Qp0
- - 42.0 * Qp1 + 168.0 * Qp2)/130.0;
- d2Qy = (-10152.0 * Qp4 + 6048.0 * Qp5 + 6480.0 * Qp3 - 1008.0 * QpN
- - 72.0 * Qp0 + 432.0 * Qp1 - 1728.0 * Qp2) / 65.0;
- end
- else if (SWNQS_i == 9) begin
- dQy = (-81480.0 * Qp6 - 30.0 * Qp4 - 303975.0 * Qp3 - 5820.0 * Qp8
- + 1455.0 * Qp9 - 20265.0 * Qp1 + 21825.0 * Qp7 + 81060.0 * Qp2) / 37829.0
- - 485.0 / 75658.0 * QpN + 1455.0 * Qp5 / 181.0 + 6755.0 * Qp0 / 75658.0;
- d2Qy = (702000.0 * Qp1 + 756000.0 * Qp7 - 16614600.0 * Qp4 + 10530000.0 * Qp3
- - 2808000.0 * Qp2 - 117000.0 * Qp0 - 8400.0 * QpN - 201600.0 * Qp8
- + 50400.0 * Qp9 - 2822400.0 * Qp6) / 37829.0 + 50400.0 * Qp5 / 181.0;
- end else begin
- dQy = 0;
- d2Qy = 0;
- end
- `fq(Qp4, xg, dQy, d2Qy, fk4)
-end
-
-if (SWNQS_i >= 5) begin
- if (SWNQS_i == 5) begin
- dQy = (-336.0 * Qp4 + 84.0 * Qp5 + 90.0 * Qp3 + 181.0 * QpN - Qp0 + 6.0 * Qp1
- - 24.0 * Qp2) / 65.0;
- d2Qy = (18.0 * Qp0 + 3762.0 * QpN + 6048.0 * Qp4 + 432.0 * Qp2 - 1620.0 * Qp3
- - 108.0 * Qp1 - 8532.0 * Qp5) / 65.0;
- end else if (SWNQS_i == 9) begin
- dQy = (1680.0 * (Qp6 - Qp4) + 5.0 * (QpN - Qp0) + 450.0 * (Qp3 - Qp7)
- + 120.0 * (Qp8 - Qp2) - 30.0 * (Qp9 - Qp1)) / 209.0;
- d2Qy = (-900.0 * (Qp1 + Qp9) - 13500.0 * (Qp7 + Qp3) - 79500.0 * Qp5
- + 50400.0 * (Qp4 + Qp6) + 3600.0 * (Qp2 + Qp8) + 150.0 * (Qp0 + QpN)) / 181.0;
- end else begin
- dQy = 0;
- d2Qy = 0;
- end
- `fq(Qp5, xg, dQy, d2Qy, fk5)
-end
-
-if (SWNQS_i >= 6) begin
- if (SWNQS_i == 9) begin
- dQy = (30.0 * Qp6 + 81480.0 * Qp4 - 21825.0 * Qp3 - 81060.0 * Qp8 + 20265.0 * Qp9
- - 1455.0 * Qp1 + 303975.0 * Qp7 + 5820.0 * Qp2) / 37829.0
- -(6755.0 * QpN - 485.0 * Qp0) / 75658.0 - 1455.0 / 181.0 * Qp5;
- d2Qy = (50400.0 * Qp1 + 10530000.0 * Qp7 - 2822400.0 * Qp4 + 756000.0 * Qp3
- - 201600.0 * Qp2 - 8400.0 * Qp0 - 117000.0 * QpN - 2808000.0 * Qp8
- + 702000.0 * Qp9 - 16614600.0 * Qp6) / 37829.0 + 50400.0 * Qp5 / 181.0;
- end else begin
- dQy = 0;
- d2Qy = 0;
- end
- `fq(Qp6, xg, dQy, d2Qy, fk6)
-end
-
-if (SWNQS_i >= 7) begin
- if (SWNQS_i == 9) begin
- dQy = (-304200.0 * Qp6 - 21840.0 * Qp4 + 12605.0 * QpN + 5850.0 * Qp3
- + 302520.0 * Qp8 - 65.0 * Qp0 - 75630.0 * Qp9 + 390.0 * Qp1 + 420.0 * Qp7
- - 1560.0 * Qp2) / 37829.0 + 390.0 / 181.0 * Qp5;
- d2Qy = (-13500.0 * Qp1 - 16601100.0 * Qp7 + 756000.0 * Qp4 - 202500.0 * Qp3
- + 54000.0 * Qp2 + 2250.0 * Qp0 + 436650.0 * QpN + 10479600.0 * Qp8
- - 2619900.0 * Qp9 + 10530000.0 * Qp6) / 37829.0 - 13500.0 * Qp5 / 181.0;
- end else begin
- dQy = 0;
- d2Qy = 0;
- end
- `fq(Qp7, xg, dQy, d2Qy, fk7)
-end
-
-if (SWNQS_i >= 8) begin
- if (SWNQS_i == 9) begin
- dQy = (81900.0 * Qp6 + 5880.0 * Qp4 - 1575.0 * Qp3 + 5850.0 * Qp8 + 282255.0 * Qp9
- - 105.0 * Qp1 - 305655.0 * Qp7 + 420.0 * Qp2) / 37829.0 + (35.0 * Qp0
- - 94085.0 * QpN) / 75658.0 - 105.0 / 181.0 * Qp5;
- d2Qy = (3600.0 * Qp1 + 10479600.0 * Qp7 - 201600.0 * Qp4 + 54000.0 * Qp3
- - 14400.0 * Qp2 - 600.0 * Qp0 - 1629600.0 * QpN - 16413000.0 * Qp8
- + 9777600.0 * Qp9 - 2808000.0 * Qp6) / 37829.0 + 3600.0 * Qp5 / 181.0;
- end else begin
- dQy = 0;
- d2Qy = 0;
- end
- `fq(Qp8, xg, dQy, d2Qy, fk8)
-end
-
-if (SWNQS_i >= 9) begin
- if (SWNQS_i == 9) begin
- dQy = (-23400.0 * Qp6 - 1680.0 * Qp4 + 175565.0 * QpN + 450.0 * Qp3
- - 325920.0 * Qp8 - 5.0 * Qp0 + 81480.0 * Qp9 + 30.0 * Qp1
- + 87330.0 * Qp7 - 120.0 * Qp2) / 37829.0 + 30.0 * Qp5 / 181.0;
- d2Qy = (-900.0 * Qp1 - 2619900.0 * Qp7 + 50400.0 * Qp4 - 13500.0 * Qp3
- + 3600.0 * Qp2 + 150.0 * Qp0 + 6081750.0 * QpN + 9777600.0 * Qp8
- - 13793100.0 * Qp9 + 702000.0 * Qp6) / 37829.0 - 900.0 * Qp5 / 181.0;
- end else begin
- dQy = 0;
- d2Qy = 0;
- end
- `fq(Qp9, xg, dQy, d2Qy, fk9)
-end
-
-//--------------------------------------------------------------------
-
-// Terminal charges for NQS
-if (SWNQS_i != 0) begin
- if (SWNQS_i == 1) begin
- QS_NQS = (17.0 * Qp0 + 30.0 * Qp1 + QpN) / 96.0;
- QD_NQS = (Qp0 + 30.0 * Qp1 + 17.0 * QpN) / 96.0;
- `QiToPhi(Qp1,xg, temp1)
- QG_NQS = xg - (x_sp + 4.0 * temp1 + x_dp) * `oneSixth;
- end else if (SWNQS_i == 2) begin
- QS_NQS = (11.0 * Qp0 + 24.0 * Qp1 + 9.0 * Qp2 + QpN) / 90.0;
- QD_NQS = (11.0 * QpN + 24.0 * Qp2 + 9.0 * Qp1 + Qp0) / 90.0;
- `QiToPhi(Qp1, xg, temp1)
- `QiToPhi(Qp2, xg, temp2)
- QG_NQS = xg - (x_sp + 3.0 * (temp1 + temp2) + x_dp) * 0.125;
- end else if (SWNQS_i == 3) begin
- QS_NQS = (251.0 * Qp0 + 594.0 * Qp1 + 312.0 * Qp2 + 174.0 * Qp3 + 13.0 * QpN) / 2688.0;
- QD_NQS = (251.0 * QpN + 594.0 * Qp3 + 312.0 * Qp2 + 174.0 * Qp1 + 13.0 * Qp0) / 2688.0;
- `QiToPhi(Qp1, xg, temp1)
- `QiToPhi(Qp2, xg, temp2)
- `QiToPhi(Qp3, xg, temp3)
- QG_NQS = xg - (x_sp + 4.0 * temp1 + 2.0 * temp2 + 4.0 * temp3 + x_dp) / 12.0;
- end else if (SWNQS_i == 5) begin
- QS_NQS = (1187.0 * Qp0 + 43.0 * QpN) / 18720.0 + (503.0 * Qp1 + 172.0 * Qp4
- + 87.0 * Qp5 + 265.0 * Qp3 + 328.0 * Qp2) / 3120.0;
- QD_NQS = (1187.0 * QpN + 43.0 * Qp0) / 18720.0 + (503.0 * Qp5 + 172.0 * Qp2
- + 87.0 * Qp1 + 265.0 * Qp3 + 328.0 * Qp4) / 3120.0;
- `QiToPhi(Qp1, xg, temp1)
- `QiToPhi(Qp2, xg, temp2)
- `QiToPhi(Qp3, xg, temp3)
- `QiToPhi(Qp4, xg, temp4)
- `QiToPhi(Qp5, xg, temp5)
- QG_NQS = xg - (x_sp + 4.0 * (temp1 + temp3 + temp5) + 2.0 * (temp2 + temp4) + x_dp) / 18.0;
- end else if (SWNQS_i == 9) begin
- QS_NQS = (75653.0 * Qp8 + 225999.0 * Qp4) / 3782900.0 + (151321.0 * Qp9
- + 454023.0 * Qp7 + 1073767.0 * Qp3 + 1564569.0 * Qp1) / 15131600.0
- + 75623.0 * Qp6 / 1891450.0 + 145.0 * Qp5 / 2896.0 + 72263.0 * Qp2 / 945725.0
- + (3504517.0 * Qp0 + 75653.0 * QpN) / 90789600.0;
- QD_NQS = (75653.0 * Qp2 + 225999.0 * Qp6) / 3782900.0 + (151321.0 * Qp1
- + 454023.0 * Qp3 + 1073767.0 * Qp7 + 1564569.0 * Qp9) / 15131600.0
- + 75623.0 * Qp4 / 1891450.0 + 145.0 * Qp5 / 2896.0 + 72263.0 * Qp8 / 945725.0
- + (3504517.0 * QpN + 75653.0 * Qp0) / 90789600.0;
- `QiToPhi(Qp1, xg, temp1)
- `QiToPhi(Qp2, xg, temp2)
- `QiToPhi(Qp3, xg, temp3)
- `QiToPhi(Qp4, xg, temp4)
- `QiToPhi(Qp5, xg, temp5)
- `QiToPhi(Qp6, xg, temp6)
- `QiToPhi(Qp7, xg, temp7)
- `QiToPhi(Qp8, xg, temp8)
- `QiToPhi(Qp9, xg, temp9)
- QG_NQS = xg - (x_sp + 4.0 * (temp1 + temp3 + temp5 + temp7 + temp9)
- + 2.0 * (temp2 + temp4 + temp6 + temp8) + x_dp) / 30.0;
- end
- QG_NQS = pd * QG_NQS;
-
- if (sigVds > 0) begin
- Qs = COX_qm * phit1 * QS_NQS;
- Qd = COX_qm * phit1 * QD_NQS;
- end else begin
- Qs = COX_qm * phit1 * QD_NQS;
- Qd = COX_qm * phit1 * QS_NQS;
- end
- Qg = COX_qm * phit1 * QG_NQS;
- Qb = -Qg - Qs - Qd;
-end
-
-// Update internal nodes
-V(RES1) <+ vnorm_inv * I(RES1) * r_nqs;
-V(SPLINE1) <+ vnorm_inv * idt(-Tnorm * fk1, Qp1_0);
-V(RES2) <+ vnorm_inv * I(RES2) * r_nqs;
-V(SPLINE2) <+ vnorm_inv * idt(-Tnorm * fk2, Qp2_0);
-V(RES3) <+ vnorm_inv * I(RES3) * r_nqs;
-V(SPLINE3) <+ vnorm_inv * idt(-Tnorm * fk3, Qp3_0);
-V(RES4) <+ vnorm_inv * I(RES4) * r_nqs;
-V(SPLINE4) <+ vnorm_inv * idt(-Tnorm * fk4, Qp4_0);
-V(RES5) <+ vnorm_inv * I(RES5) * r_nqs;
-V(SPLINE5) <+ vnorm_inv * idt(-Tnorm * fk5, Qp5_0);
-V(RES6) <+ vnorm_inv * I(RES6) * r_nqs;
-V(SPLINE6) <+ vnorm_inv * idt(-Tnorm * fk6, Qp6_0);
-V(RES7) <+ vnorm_inv * I(RES7) * r_nqs;
-V(SPLINE7) <+ vnorm_inv * idt(-Tnorm * fk7, Qp7_0);
-V(RES8) <+ vnorm_inv * I(RES8) * r_nqs;
-V(SPLINE8) <+ vnorm_inv * idt(-Tnorm * fk8, Qp8_0);
-V(RES9) <+ vnorm_inv * I(RES9) * r_nqs;
-V(SPLINE9) <+ vnorm_inv * idt(-Tnorm * fk9, Qp9_0);
-
diff --git a/src/spicelib/devices/adms/psp102/admsva/PSP102_InitNQS.include b/src/spicelib/devices/adms/psp102/admsva/PSP102_InitNQS.include
deleted file mode 100644
index 3bdd3c858..000000000
--- a/src/spicelib/devices/adms/psp102/admsva/PSP102_InitNQS.include
+++ /dev/null
@@ -1,197 +0,0 @@
-//======================================================================================
-//======================================================================================
-// Filename: PSP102_InitNQS.include
-//======================================================================================
-//======================================================================================
-//
-// (c) Copyright notice
-//
-// Since 2012 until today, PSP has been co-developed by NXP Semiconductors and
-// Delft University of Technology. For this part of the model, each claim undivided
-// ownership and copyrights
-// Until and including 2011, PSP has been co-developed by NXP Semiconductors and
-// Arizona State University. For this part of the model, NXP Semiconductors claims
-// undivided ownership and copyrights.
-//
-//
-// Version: 102.5.0, December 2013
-//
-//======================================================================================
-//======================================================================================
-//
-// Further information can be found in the file releasenotesPSP102.txt
-//
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Computing initial (dc) values for internal nodes.
-// This code is independent of internal-node voltages
-//
-/////////////////////////////////////////////////////////////////////////////
-
-Qp1_0 = 0.0;
-Qp2_0 = 0.0;
-Qp3_0 = 0.0;
-Qp4_0 = 0.0;
-Qp5_0 = 0.0;
-Qp6_0 = 0.0;
-Qp7_0 = 0.0;
-Qp8_0 = 0.0;
-Qp9_0 = 0.0;
-fk1 = 0.0;
-fk2 = 0.0;
-fk3 = 0.0;
-fk4 = 0.0;
-fk5 = 0.0;
-fk6 = 0.0;
-fk7 = 0.0;
-fk8 = 0.0;
-fk9 = 0.0;
-if (SWNQS_i != 0) begin
- dQis = 0.0;
- dQy = 0.0;
- dfQi = 0.0;
- fQi = 0.0;
- d2Qy = 0.0;
-
- Qp1 = 0.0;
- Qp2 = 0.0;
- Qp3 = 0.0;
- Qp4 = 0.0;
- Qp5 = 0.0;
- Qp6 = 0.0;
- Qp7 = 0.0;
- Qp8 = 0.0;
- Qp9 = 0.0;
-
- phi_p1 = 0.0;
- phi_p2 = 0.0;
- phi_p3 = 0.0;
- phi_p4 = 0.0;
- phi_p5 = 0.0;
- phi_p6 = 0.0;
- phi_p7 = 0.0;
- phi_p8 = 0.0;
- phi_p9 = 0.0;
-
- // Setting initial values for charge along the channel
- // from interpolated DC-solution
- if (xg > 0) begin
- if (SWNQS_i == 1) begin
- phi_p1 = `Phiy(0.5);
- `PhiToQb(phi_p1,Qb_tmp)
- Qp1_0 = -pd * (xg - phi_p1) - Qb_tmp;
- end else if (SWNQS_i == 2) begin
- phi_p1 = `Phiy(`oneThird);
- `PhiToQb(phi_p1,Qb_tmp)
- Qp1_0 = -pd * (xg - phi_p1) - Qb_tmp;
-
- phi_p2 = `Phiy(`twoThirds);
- `PhiToQb(phi_p2,Qb_tmp)
- Qp2_0 = -pd * (xg - phi_p2) - Qb_tmp;
- if (sigVds < 0) begin
- `swap(Qp1_0, Qp2_0)
- end
- end else if (SWNQS_i == 3) begin
- phi_p1 = `Phiy(0.25);
- `PhiToQb(phi_p1,Qb_tmp)
- Qp1_0 = -pd * (xg - phi_p1) - Qb_tmp;
-
- phi_p2 = `Phiy(0.5);
- `PhiToQb(phi_p2,Qb_tmp)
- Qp2_0 = -pd * (xg - phi_p2) - Qb_tmp;
-
- phi_p3 = `Phiy(0.75);
- `PhiToQb(phi_p3,Qb_tmp)
- Qp3_0 = -pd * (xg - phi_p3) - Qb_tmp;
- if (sigVds < 0) begin
- `swap(Qp1_0, Qp3_0)
- end
- end else if (SWNQS_i == 5) begin
- phi_p1 = `Phiy(`oneSixth);
- `PhiToQb(phi_p1,Qb_tmp)
- Qp1_0 = -pd * (xg - phi_p1) - Qb_tmp;
-
- phi_p2 = `Phiy(`oneThird);
- `PhiToQb(phi_p2,Qb_tmp)
- Qp2_0 = -pd * (xg - phi_p2) - Qb_tmp;
-
- phi_p3 = `Phiy(0.5);
- `PhiToQb(phi_p3,Qb_tmp)
- Qp3_0 = -pd * (xg - phi_p3) - Qb_tmp;
-
- phi_p4 = `Phiy(`twoThirds);
- `PhiToQb(phi_p4,Qb_tmp)
- Qp4_0 = -pd * (xg - phi_p4) - Qb_tmp;
-
- phi_p5 = `Phiy(0.8333333333333333);
- `PhiToQb(phi_p5,Qb_tmp)
- Qp5_0 = -pd * (xg - phi_p5) - Qb_tmp;
- if (sigVds < 0) begin
- `swap(Qp1_0, Qp5_0)
- `swap(Qp2_0, Qp4_0)
- end
- end else if (SWNQS_i == 9) begin
- phi_p1 = `Phiy(0.1);
- `PhiToQb(phi_p1,Qb_tmp)
- Qp1_0 = -pd * (xg - phi_p1) - Qb_tmp;
-
- phi_p2 = `Phiy(0.2);
- `PhiToQb(phi_p2,Qb_tmp)
- Qp2_0 = -pd * (xg - phi_p2) - Qb_tmp;
-
- phi_p3 = `Phiy(0.3);
- `PhiToQb(phi_p3,Qb_tmp)
- Qp3_0 = -pd * (xg - phi_p3) - Qb_tmp;
-
- phi_p4 = `Phiy(0.4);
- `PhiToQb(phi_p4,Qb_tmp)
- Qp4_0 = -pd * (xg - phi_p4) - Qb_tmp;
-
- phi_p5 = `Phiy(0.5);
- `PhiToQb(phi_p5,Qb_tmp)
- Qp5_0 = -pd * (xg - phi_p5) - Qb_tmp;
-
- phi_p6 = `Phiy(0.6);
- `PhiToQb(phi_p6,Qb_tmp)
- Qp6_0 = -pd * (xg - phi_p6) - Qb_tmp;
-
- phi_p7 = `Phiy(0.7);
- `PhiToQb(phi_p7,Qb_tmp)
- Qp7_0 = -pd * (xg - phi_p7) - Qb_tmp;
-
- phi_p8 = `Phiy(0.8);
- `PhiToQb(phi_p8,Qb_tmp)
- Qp8_0 = -pd * (xg - phi_p8) - Qb_tmp;
-
- phi_p9 = `Phiy(0.9);
- `PhiToQb(phi_p9,Qb_tmp)
- Qp9_0 = -pd * (xg - phi_p9) - Qb_tmp;
- if (sigVds < 0) begin
- `swap(Qp1_0, Qp9_0)
- `swap(Qp2_0, Qp8_0)
- `swap(Qp3_0, Qp7_0)
- `swap(Qp4_0, Qp6_0)
- end
- end
- end // (x_g >0)
-end // (SWNQS_i != 0)
-
-x_sp = 0.0;
-x_dp = 0.0;
-Qp0 = 0.0;
-QpN = 0.0;
-if (SWNQS_i != 0.0) begin
- x_sp = x_m - sigVds * 0.5 * dps * inv_phit1;
- x_dp = x_m + sigVds * 0.5 * dps * inv_phit1;
- Qp0 = 0.0;
- QpN = 0.0;
- if (x_sp > 0) begin
- `PhiToQb(x_sp, QbSIGN)
- Qp0 = -pd * (xg - x_sp) - QbSIGN;
- end
- if (x_dp > 0) begin
- `PhiToQb(x_dp, QbSIGN)
- QpN = -pd * (xg - x_dp) - QbSIGN;
- end
-end
diff --git a/src/spicelib/devices/adms/psp102/admsva/PSP102_binning.include b/src/spicelib/devices/adms/psp102/admsva/PSP102_binning.include
deleted file mode 100644
index 65c95e896..000000000
--- a/src/spicelib/devices/adms/psp102/admsva/PSP102_binning.include
+++ /dev/null
@@ -1,152 +0,0 @@
-//======================================================================================
-//======================================================================================
-// Filename: PSP102_binning.include
-//======================================================================================
-//======================================================================================
-//
-// (c) Copyright notice
-//
-// Since 2012 until today, PSP has been co-developed by NXP Semiconductors and
-// Delft University of Technology. For this part of the model, each claim undivided
-// ownership and copyrights
-// Until and including 2011, PSP has been co-developed by NXP Semiconductors and
-// Arizona State University. For this part of the model, NXP Semiconductors claims
-// undivided ownership and copyrights.
-//
-//
-// Version: 102.5.0, December 2013
-//
-//======================================================================================
-//======================================================================================
-//
-// Further information can be found in the file releasenotesPSP102.txt
-//
-
-// auxiliary variables
-iLEWE = iLE * iWE;
-iiLE = LE / LEN;
-iiWE = WE / WEN;
-iiLEWE = iiLE * iiWE;
-iiiLEWE = iiWE / iiLE;
-
-// auxiliary variables for COX only
-iiLEcv = LEcv / LEN;
-iiWEcv = WEcv / WEN;
-iiLEWEcv = iiLEcv * iiWEcv;
-
-// auxiliary variables for CGOV only
-iLEcv = LEN / LEcv;
-iiiLEWEcv = iiWEcv / iiLEcv;
-
-// auxiliary variables for CGBOV only
-iiLcv = Lcv / LEN;
-iiWcv = Wcv / WEN;
-iiLWcv = iiLcv * iiWcv;
-
-// auxiliary variables for CFR only
-iLcv = LEN / Lcv;
-iiiLWcv = iiWcv / iiLcv;
-
-// Process parameters
-VFB = POVFB + iLE * PLVFB + iWE * PWVFB + iLEWE * PLWVFB;
-STVFB = POSTVFB + iLE * PLSTVFB + iWE * PWSTVFB + iLEWE * PLWSTVFB;
-TOX = POTOX;
-EPSROX = POEPSROX;
-NEFF = PONEFF + iLE * PLNEFF + iWE * PWNEFF + iLEWE * PLWNEFF;
-VNSUB = POVNSUB;
-NSLP = PONSLP;
-DNSUB = PODNSUB;
-DPHIB = PODPHIB + iLE * PLDPHIB + iWE * PWDPHIB + iLEWE * PLWDPHIB;
-NP = PONP + iLE * PLNP + iWE * PWNP + iLEWE * PLWNP;
-CT = POCT + iLE * PLCT + iWE * PWCT + iLEWE * PLWCT;
-TOXOV = POTOXOV;
-TOXOVD = POTOXOVD;
-NOV = PONOV + iLE * PLNOV + iWE * PWNOV + iLEWE * PLWNOV;
-NOVD = PONOVD + iLE * PLNOVD + iWE * PWNOVD + iLEWE * PLWNOVD;
-
-// DIBL parameters
-CF = POCF + iLE * PLCF + iWE * PWCF + iLEWE * PLWCF;
-CFB = POCFB;
-
-// Mobility parameters
-BETN = POBETN + iLE * PLBETN + iiWE * PWBETN + iiiLEWE * PLWBETN;
-
-
-STBET = POSTBET + iLE * PLSTBET + iWE * PWSTBET + iLEWE * PLWSTBET;
-MUE = POMUE + iLE * PLMUE + iWE * PWMUE + iLEWE * PLWMUE;
-STMUE = POSTMUE;
-THEMU = POTHEMU;
-STTHEMU = POSTTHEMU;
-CS = POCS + iLE * PLCS + iWE * PWCS + iLEWE * PLWCS;
-STCS = POSTCS;
-XCOR = POXCOR + iLE * PLXCOR + iWE * PWXCOR + iLEWE * PLWXCOR;
-STXCOR = POSTXCOR;
-FETA = POFETA;
-
-// Series resistance parameters
-RS = PORS + iLE * PLRS + iWE * PWRS + iLEWE * PLWRS;
-STRS = POSTRS;
-RSB = PORSB;
-RSG = PORSG;
-
-// Velocity saturation parameters
-THESAT = POTHESAT + iLE * PLTHESAT + iWE * PWTHESAT + iLEWE * PLWTHESAT;
-STTHESAT = POSTTHESAT + iLE * PLSTTHESAT + iWE * PWSTTHESAT + iLEWE * PLWSTTHESAT;
-THESATB = POTHESATB + iLE * PLTHESATB + iWE * PWTHESATB + iLEWE * PLWTHESATB;
-THESATG = POTHESATG + iLE * PLTHESATG + iWE * PWTHESATG + iLEWE * PLWTHESATG;
-
-// Saturation voltage parameters
-AX = POAX + iLE * PLAX + iWE * PWAX + iLEWE * PLWAX;
-
-// Channel length modulation (CLM) parameters
-ALP = POALP + iLE * PLALP + iWE * PWALP + iLEWE * PLWALP;
-ALP1 = POALP1 + iLE * PLALP1 + iWE * PWALP1 + iLEWE * PLWALP1;
-ALP2 = POALP2 + iLE * PLALP2 + iWE * PWALP2 + iLEWE * PLWALP2;
-VP = POVP;
-
-// Impact ionization parameters
-A1 = POA1 + iLE * PLA1 + iWE * PWA1 + iLEWE * PLWA1;
-A2 = POA2;
-STA2 = POSTA2;
-A3 = POA3 + iLE * PLA3 + iWE * PWA3 + iLEWE * PLWA3;
-A4 = POA4 + iLE * PLA4 + iWE * PWA4 + iLEWE * PLWA4;
-GCO = POGCO;
-
-// Gate current parameters
-IGINV = POIGINV + iiLE * PLIGINV + iiWE * PWIGINV + iiLEWE * PLWIGINV;
-IGOV = POIGOV + iLE * PLIGOV + iiWE * PWIGOV + iiiLEWE * PLWIGOV;
-IGOVD = POIGOVD + iLE * PLIGOVD + iiWE * PWIGOVD + iiiLEWE * PLWIGOVD;
-STIG = POSTIG;
-GC2 = POGC2;
-GC3 = POGC3;
-CHIB = POCHIB;
-
-// Gate-induced drain leakage (GIDL) parameters
-AGIDL = POAGIDL + iLE * PLAGIDL + iiWE * PWAGIDL + iiiLEWE * PLWAGIDL;
-AGIDLD = POAGIDLD + iLE * PLAGIDLD + iiWE * PWAGIDLD + iiiLEWE * PLWAGIDLD;
-BGIDL = POBGIDL;
-BGIDLD = POBGIDLD;
-STBGIDL = POSTBGIDL;
-STBGIDLD = POSTBGIDLD;
-CGIDL = POCGIDL;
-CGIDLD = POCGIDLD;
-
-// Charge model parameters
-COX = POCOX + iiLEcv * PLCOX + iiWEcv * PWCOX + iiLEWEcv * PLWCOX;
-CGOV = POCGOV + iLEcv * PLCGOV + iiWEcv * PWCGOV + iiiLEWEcv * PLWCGOV;
-CGOVD = POCGOVD + iLEcv * PLCGOVD + iiWEcv * PWCGOVD + iiiLEWEcv * PLWCGOVD;
-CGBOV = POCGBOV + iiLcv * PLCGBOV + iiWcv * PWCGBOV + iiLWcv * PLWCGBOV;
-CFR = POCFR + iLcv * PLCFR + iiWcv * PWCFR + iiiLWcv * PLWCFR;
-CFRD = POCFRD + iLcv * PLCFRD + iiWcv * PWCFRD + iiiLWcv * PLWCFRD;
-
-// Noise model parameters
-FNT = POFNT;
-FNTEXC = iLE * iLE * (POFNTEXC + iLE * PLFNTEXC + iWE * PWFNTEXC + iLEWE * PLWFNTEXC);
-NFA = PONFA + iLE * PLNFA + iWE * PWNFA + iLEWE * PLWNFA;
-NFB = PONFB + iLE * PLNFB + iWE * PWNFB + iLEWE * PLWNFB;
-NFC = PONFC + iLE * PLNFC + iWE * PWNFC + iLEWE * PLWNFC;
-EF = POEF;
-
-// Well proximity effect parameters
-KVTHOWE = POKVTHOWE + iLE * PLKVTHOWE + iWE * PWKVTHOWE + iLEWE * PLWKVTHOWE;
-KUOWE = POKUOWE + iLE * PLKUOWE + iWE * PWKUOWE + iLEWE * PLWKUOWE;
diff --git a/src/spicelib/devices/adms/psp102/admsva/PSP102_binpars.include b/src/spicelib/devices/adms/psp102/admsva/PSP102_binpars.include
deleted file mode 100644
index a02b837f3..000000000
--- a/src/spicelib/devices/adms/psp102/admsva/PSP102_binpars.include
+++ /dev/null
@@ -1,287 +0,0 @@
-//======================================================================================
-//======================================================================================
-// Filename: PSP102_binpars.include
-//======================================================================================
-//======================================================================================
-//
-// (c) Copyright notice
-//
-// Since 2012 until today, PSP has been co-developed by NXP Semiconductors and
-// Delft University of Technology. For this part of the model, each claim undivided
-// ownership and copyrights
-// Until and including 2011, PSP has been co-developed by NXP Semiconductors and
-// Arizona State University. For this part of the model, NXP Semiconductors claims
-// undivided ownership and copyrights.
-//
-//
-// Version: 102.5.0, December 2013
-//
-//======================================================================================
-//======================================================================================
-//
-// Further information can be found in the file releasenotesPSP102.txt
-//
-
-///////////////////////////////////////////////////
-// PSP global model parameters (binning)
-///////////////////////////////////////////////////
-
-parameter real LEVEL = 1021 `P(info="Model level" unit="");
-parameter real TYPE = 1 `from( -1.0,1.0 ) `P(info="Channel type parameter, +1=NMOS -1=PMOS" unit="");
-parameter real TR = 21 `from( -273.0,inf ) `P(info="nominal (reference) temperature" unit="C");
-
-// Switch parameters
-parameter real SWIGATE = 0 `from( 0.0,1.0 ) `P(info="Flag for gate current, 0=turn off IG" unit="");
-parameter real SWIMPACT = 0 `from( 0.0,1.0 ) `P(info="Flag for impact ionization current, 0=turn off II" unit="");
-parameter real SWGIDL = 0 `from( 0.0,1.0 ) `P(info="Flag for GIDL current, 0=turn off IGIDL" unit="");
-parameter real SWJUNCAP = 0 `from( 0.0,3.0 ) `P(info="Flag for juncap, 0=turn off juncap" unit="");
-parameter real SWJUNASYM = 0 `P(info="Flag for asymmetric junctions; 0=symmetric, 1=asymmetric" unit="");
-parameter real QMC = 1 `from( 0.0,inf ) `P(info="Quantum-mechanical correction factor" unit="");
-
-// Process parameters
-parameter real LVARO = 0 `P(info="Geometry independent difference between actual and programmed poly-silicon gate length" unit="m");
-parameter real LVARL = 0 `P(info="Length dependence of difference between actual and programmed poly-silicon gate length" unit="");
-parameter real LAP = 0 `P(info="Effective channel length reduction per side due to lateral diffusion of source/drain dopant ions" unit="m");
-parameter real WVARO = 0 `P(info="Geometry independent difference between actual and programmed field-oxide opening" unit="m");
-parameter real WVARW = 0 `P(info="Width dependence of difference between actual and programmed field-oxide opening" unit="");
-parameter real WOT = 0 `P(info="Effective reduction of channel width per side due to lateral diffusion of channel-stop dopant ions" unit="m");
-parameter real DLQ = 0 `P(info="Effective channel length reduction for CV" unit="m");
-parameter real DWQ = 0 `P(info="Effective channel width reduction for CV" unit="m");
-parameter real POVFB = -1 `P(info="Coefficient for the geometry independent part of VFB" unit="V");
-parameter real PLVFB = 0.0 `P(info="Coefficient for the length dependence of VFB" unit="V");
-parameter real PWVFB = 0.0 `P(info="Coefficient for the width dependence of VFB" unit="V");
-parameter real PLWVFB = 0.0 `P(info="Coefficient for the length times width dependence of VFB" unit="V");
-parameter real POSTVFB = 0.0005 `P(info="Coefficient for the geometry independent part of STVFB" unit="V/K");
-parameter real PLSTVFB = 0.0 `P(info="Coefficient for the length dependence of STVFB" unit="V/K");
-parameter real PWSTVFB = 0.0 `P(info="Coefficient for the width dependence of STVFB" unit="V/K");
-parameter real PLWSTVFB = 0.0 `P(info="Coefficient for the length times width dependence of STVFB" unit="V/K");
-parameter real POTOX = 2E-09 `P(info="Coefficient for the geometry independent part of TOX" unit="m");
-parameter real POEPSROX = 3.9 `P(info="Coefficient for the geometry independent part of EPSOX" unit="");
-parameter real PONEFF = 5E+23 `P(info="Coefficient for the geometry independent part of NEFF" unit="m^-3");
-parameter real PLNEFF = 0.0 `P(info="Coefficient for the length dependence of NEFF" unit="m^-3");
-parameter real PWNEFF = 0.0 `P(info="Coefficient for the width dependence of NEFF" unit="m^-3");
-parameter real PLWNEFF = 0.0 `P(info="Coefficient for the length times width dependence of NEFF" unit="m^-3");
-parameter real POVNSUB = 0 `P(info="Coefficient for the geometry independent part of VNSUB" unit="V");
-parameter real PONSLP = 0.05 `P(info="Coefficient for the geometry independent part of NSLP" unit="V");
-parameter real PODNSUB = 0 `P(info="Coefficient for the geometry independent part of DNSUB" unit="V^-1");
-parameter real PODPHIB = 0 `P(info="Coefficient for the geometry independent part of DPHIB" unit="V");
-parameter real PLDPHIB = 0.0 `P(info="Coefficient for the length dependence of DPHIB" unit="V");
-parameter real PWDPHIB = 0.0 `P(info="Coefficient for the width dependence of DPHIB" unit="V");
-parameter real PLWDPHIB = 0.0 `P(info="Coefficient for the length times width dependence of DPHIB" unit="V");
-parameter real PONP = 1E+26 `P(info="Coefficient for the geometry independent part of NP" unit="m^-3");
-parameter real PLNP = 0.0 `P(info="Coefficient for the length dependence of NP" unit="m^-3");
-parameter real PWNP = 0.0 `P(info="Coefficient for the width dependence of NP" unit="m^-3");
-parameter real PLWNP = 0.0 `P(info="Coefficient for the length times width dependence of NP" unit="m^-3");
-parameter real POCT = 0 `P(info="Coefficient for the geometry independent part of CT" unit="");
-parameter real PLCT = 0.0 `P(info="Coefficient for the length dependence of CT" unit="");
-parameter real PWCT = 0.0 `P(info="Coefficient for the width dependence of CT" unit="");
-parameter real PLWCT = 0.0 `P(info="Coefficient for the length times width dependence of CT" unit="");
-parameter real POTOXOV = 2E-09 `P(info="Coefficient for the geometry independent part of TOXOV" unit="m");
-parameter real POTOXOVD = 2E-09 `P(info="Coefficient for the geometry independent part of TOXOV for drain side" unit="m");
-parameter real PONOV = 5E+25 `P(info="Coefficient for the geometry independent part of NOV" unit="m^-3");
-parameter real PLNOV = 0.0 `P(info="Coefficient for the length dependence of NOV" unit="m^-3");
-parameter real PWNOV = 0.0 `P(info="Coefficient for the width dependence of NOV" unit="m^-3");
-parameter real PLWNOV = 0.0 `P(info="Coefficient for the length times width dependence of NOV" unit="m^-3");
-parameter real PONOVD = 5E+25 `P(info="Coefficient for the geometry independent part of NOV for drain side" unit="m^-3");
-parameter real PLNOVD = 0.0 `P(info="Coefficient for the length dependence of NOV for drain side" unit="m^-3");
-parameter real PWNOVD = 0.0 `P(info="Coefficient for the width dependence of NOV for drain side" unit="m^-3");
-parameter real PLWNOVD = 0.0 `P(info="Coefficient for the length times width dependence of NOV for drain side" unit="m^-3");
-
-// DIBL parameters
-parameter real POCF = 0 `P(info="Coefficient for the geometry independent part of CF" unit="");
-parameter real PLCF = 0.0 `P(info="Coefficient for the length dependence of CF" unit="");
-parameter real PWCF = 0.0 `P(info="Coefficient for the width dependence of CF" unit="");
-parameter real PLWCF = 0.0 `P(info="Coefficient for the length times width dependence of CF" unit="");
-parameter real POCFB = 0 `P(info="Coefficient for the geometry independent part of CFB" unit="V^-1");
-
-// Mobility parameters
-parameter real POBETN = 0.07 `P(info="Coefficient for the geometry independent part of BETN" unit="m^2/V/s");
-parameter real PLBETN = 0.0 `P(info="Coefficient for the length dependence of BETN" unit="m^2/V/s");
-parameter real PWBETN = 0.0 `P(info="Coefficient for the width dependence of BETN" unit="m^2/V/s");
-parameter real PLWBETN = 0.0 `P(info="Coefficient for the length times width dependence of BETN" unit="m^2/V/s");
-parameter real POSTBET = 1 `P(info="Coefficient for the geometry independent part of STBET" unit="");
-parameter real PLSTBET = 0.0 `P(info="Coefficient for the length dependence of STBET" unit="");
-parameter real PWSTBET = 0.0 `P(info="Coefficient for the width dependence of STBET" unit="");
-parameter real PLWSTBET = 0.0 `P(info="Coefficient for the length times width dependence of STBET" unit="");
-parameter real POMUE = 0.5 `P(info="Coefficient for the geometry independent part of MUE" unit="m/V");
-parameter real PLMUE = 0.0 `P(info="Coefficient for the length dependence of MUE" unit="m/V");
-parameter real PWMUE = 0.0 `P(info="Coefficient for the width dependence of MUE" unit="m/V");
-parameter real PLWMUE = 0.0 `P(info="Coefficient for the length times width dependence of MUE" unit="m/V");
-parameter real POSTMUE = 0 `P(info="Coefficient for the geometry independent part of STMUE" unit="");
-parameter real POTHEMU = 1.5 `P(info="Coefficient for the geometry independent part of THEMU" unit="");
-parameter real POSTTHEMU = 1.5 `P(info="Coefficient for the geometry independent part of STTHEMU" unit="");
-parameter real POCS = 0 `P(info="Coefficient for the geometry independent part of CS" unit="");
-parameter real PLCS = 0.0 `P(info="Coefficient for the length dependence of CS" unit="");
-parameter real PWCS = 0.0 `P(info="Coefficient for the width dependence of CS" unit="");
-parameter real PLWCS = 0.0 `P(info="Coefficient for the length times width dependence of CS" unit="");
-parameter real POSTCS = 0 `P(info="Coefficient for the geometry independent part of STCS" unit="");
-parameter real POXCOR = 0 `P(info="Coefficient for the geometry independent part of XCOR" unit="V^-1");
-parameter real PLXCOR = 0.0 `P(info="Coefficient for the length dependence of XCOR" unit="V^-1");
-parameter real PWXCOR = 0.0 `P(info="Coefficient for the width dependence of XCOR" unit="V^-1");
-parameter real PLWXCOR = 0.0 `P(info="Coefficient for the length times width dependence of XCOR" unit="V^-1");
-parameter real POSTXCOR = 0 `P(info="Coefficient for the geometry independent part of STXCOR" unit="");
-parameter real POFETA = 1 `P(info="Coefficient for the geometry independent part of FETA" unit="");
-
-// Series resistance parameters
-parameter real PORS = 30 `P(info="Coefficient for the geometry independent part of RS" unit="Ohm");
-parameter real PLRS = 0.0 `P(info="Coefficient for the length dependence of RS" unit="Ohm");
-parameter real PWRS = 0.0 `P(info="Coefficient for the width dependence of RS" unit="Ohm");
-parameter real PLWRS = 0.0 `P(info="Coefficient for the length times width dependence of RS" unit="Ohm");
-parameter real POSTRS = 1 `P(info="Coefficient for the geometry independent part of STRS" unit="");
-parameter real PORSB = 0 `P(info="Coefficient for the geometry independent part of RSB" unit="V^-1");
-parameter real PORSG = 0 `P(info="Coefficient for the geometry independent part of RSG" unit="V^-1");
-
-// Velocity saturation parameters
-parameter real POTHESAT = 1 `P(info="Coefficient for the geometry independent part of THESAT" unit="V^-1");
-parameter real PLTHESAT = 0.0 `P(info="Coefficient for the length dependence of THESAT" unit="V^-1");
-parameter real PWTHESAT = 0.0 `P(info="Coefficient for the width dependence of THESAT" unit="V^-1");
-parameter real PLWTHESAT = 0.0 `P(info="Coefficient for the length times width dependence of THESAT" unit="V^-1");
-parameter real POSTTHESAT = 1 `P(info="Coefficient for the geometry independent part of STTHESAT" unit="");
-parameter real PLSTTHESAT = 0.0 `P(info="Coefficient for the length dependence of STTHESAT" unit="");
-parameter real PWSTTHESAT = 0.0 `P(info="Coefficient for the width dependence of STTHESAT" unit="");
-parameter real PLWSTTHESAT = 0.0 `P(info="Coefficient for the length times width dependence of STTHESAT" unit="");
-parameter real POTHESATB = 0 `P(info="Coefficient for the geometry independent part of THESATB" unit="V^-1");
-parameter real PLTHESATB = 0.0 `P(info="Coefficient for the length dependence of THESATB" unit="V^-1");
-parameter real PWTHESATB = 0.0 `P(info="Coefficient for the width dependence of THESATB" unit="V^-1");
-parameter real PLWTHESATB = 0.0 `P(info="Coefficient for the length times width dependence of THESATB" unit="V^-1");
-parameter real POTHESATG = 0 `P(info="Coefficient for the geometry independent part of THESATG" unit="V^-1");
-parameter real PLTHESATG = 0.0 `P(info="Coefficient for the length dependence of THESATG" unit="V^-1");
-parameter real PWTHESATG = 0.0 `P(info="Coefficient for the width dependence of THESATG" unit="V^-1");
-parameter real PLWTHESATG = 0.0 `P(info="Coefficient for the length times width dependence of THESATG" unit="V^-1");
-
-// Saturation voltage parameters
-parameter real POAX = 3 `P(info="Coefficient for the geometry independent part of AX" unit="");
-parameter real PLAX = 0.0 `P(info="Coefficient for the length dependence of AX" unit="");
-parameter real PWAX = 0.0 `P(info="Coefficient for the width dependence of AX" unit="");
-parameter real PLWAX = 0.0 `P(info="Coefficient for the length times width dependence of AX" unit="");
-
-// Channel length modulation (CLM) parameters
-parameter real POALP = 0.01 `P(info="Coefficient for the geometry independent part of ALP" unit="");
-parameter real PLALP = 0.0 `P(info="Coefficient for the length dependence of ALP" unit="");
-parameter real PWALP = 0.0 `P(info="Coefficient for the width dependence of ALP" unit="");
-parameter real PLWALP = 0.0 `P(info="Coefficient for the length times width dependence of ALP" unit="");
-parameter real POALP1 = 0 `P(info="Coefficient for the geometry independent part of ALP1" unit="V");
-parameter real PLALP1 = 0.0 `P(info="Coefficient for the length dependence of ALP1" unit="V");
-parameter real PWALP1 = 0.0 `P(info="Coefficient for the width dependence of ALP1" unit="V");
-parameter real PLWALP1 = 0.0 `P(info="Coefficient for the length times width dependence of ALP1" unit="V");
-parameter real POALP2 = 0 `P(info="Coefficient for the geometry independent part of ALP2" unit="V^-1");
-parameter real PLALP2 = 0.0 `P(info="Coefficient for the length dependence of ALP2" unit="V^-1");
-parameter real PWALP2 = 0.0 `P(info="Coefficient for the width dependence of ALP2" unit="V^-1");
-parameter real PLWALP2 = 0.0 `P(info="Coefficient for the length times width dependence of ALP2" unit="V^-1");
-parameter real POVP = 0.05 `P(info="Coefficient for the geometry independent part of VP" unit="V");
-
-// Impact ionization parameters
-parameter real POA1 = 1 `P(info="Coefficient for the geometry independent part of A1" unit="");
-parameter real PLA1 = 0.0 `P(info="Coefficient for the length dependence of A1" unit="");
-parameter real PWA1 = 0.0 `P(info="Coefficient for the width dependence of A1" unit="");
-parameter real PLWA1 = 0.0 `P(info="Coefficient for the length times width dependence of A1" unit="");
-parameter real POA2 = 10 `P(info="Coefficient for the geometry independent part of A2" unit="V");
-parameter real POSTA2 = 0 `P(info="Coefficient for the geometry independent part of STA2" unit="V");
-parameter real POA3 = 1 `P(info="Coefficient for the geometry independent part of A3" unit="");
-parameter real PLA3 = 0.0 `P(info="Coefficient for the length dependence of A3" unit="");
-parameter real PWA3 = 0.0 `P(info="Coefficient for the width dependence of A3" unit="");
-parameter real PLWA3 = 0.0 `P(info="Coefficient for the length times width dependence of A3" unit="");
-parameter real POA4 = 0 `P(info="Coefficient for the geometry independent part of A4" unit="V^-0.5");
-parameter real PLA4 = 0.0 `P(info="Coefficient for the length dependence of A4" unit="V^-0.5");
-parameter real PWA4 = 0.0 `P(info="Coefficient for the width dependence of A4" unit="V^-0.5");
-parameter real PLWA4 = 0.0 `P(info="Coefficient for the length times width dependence of A4" unit="V^-0.5");
-parameter real POGCO = 0 `P(info="Coefficient for the geometry independent part of GCO" unit="");
-
-// Gate current parameters
-parameter real POIGINV = 0 `P(info="Coefficient for the geometry independent part of IGINV" unit="A");
-parameter real PLIGINV = 0.0 `P(info="Coefficient for the length dependence of IGINV" unit="A");
-parameter real PWIGINV = 0.0 `P(info="Coefficient for the width dependence of IGINV" unit="A");
-parameter real PLWIGINV = 0.0 `P(info="Coefficient for the length times width dependence of IGINV" unit="A");
-parameter real POIGOV = 0 `P(info="Coefficient for the geometry independent part of IGOV" unit="A");
-parameter real PLIGOV = 0.0 `P(info="Coefficient for the length dependence of IGOV" unit="A");
-parameter real PWIGOV = 0.0 `P(info="Coefficient for the width dependence of IGOV" unit="A");
-parameter real PLWIGOV = 0.0 `P(info="Coefficient for the length times width dependence of IGOV" unit="A");
-parameter real POIGOVD = 0 `P(info="Coefficient for the geometry independent part of IGOV for drain side" unit="A");
-parameter real PLIGOVD = 0.0 `P(info="Coefficient for the length dependence of IGOV for drain side" unit="A");
-parameter real PWIGOVD = 0.0 `P(info="Coefficient for the width dependence of IGOV for drain side" unit="A");
-parameter real PLWIGOVD = 0.0 `P(info="Coefficient for the length times width dependence of IGOV for drain side" unit="A");
-parameter real POSTIG = 2 `P(info="Coefficient for the geometry independent part of STIG" unit="");
-parameter real POGC2 = 0.375 `P(info="Coefficient for the geometry independent part of GC2" unit="");
-parameter real POGC3 = 0.063 `P(info="Coefficient for the geometry independent part of GC3" unit="");
-parameter real POCHIB = 3.1 `P(info="Coefficient for the geometry independent part of CHIB" unit="V");
-
-// Gate-induced drain leakage (GIDL) parameters
-parameter real POAGIDL = 0 `P(info="Coefficient for the geometry independent part of AGIDL" unit="A/V^3");
-parameter real PLAGIDL = 0.0 `P(info="Coefficient for the length dependence of AGIDL" unit="A/V^3");
-parameter real PWAGIDL = 0.0 `P(info="Coefficient for the width dependence of AGIDL" unit="A/V^3");
-parameter real PLWAGIDL = 0.0 `P(info="Coefficient for the length times width dependence of AGIDL" unit="A/V^3");
-parameter real POAGIDLD = 0 `P(info="Coefficient for the geometry independent part of AGIDL for drain side" unit="A/V^3");
-parameter real PLAGIDLD = 0.0 `P(info="Coefficient for the length dependence of AGIDL for drain side" unit="A/V^3");
-parameter real PWAGIDLD = 0.0 `P(info="Coefficient for the width dependence of AGIDL for drain side" unit="A/V^3");
-parameter real PLWAGIDLD = 0.0 `P(info="Coefficient for the length times width dependence of AGIDL for drain side" unit="A/V^3");
-parameter real POBGIDL = 41 `P(info="Coefficient for the geometry independent part of BGIDL" unit="V");
-parameter real POBGIDLD = 41 `P(info="Coefficient for the geometry independent part of BGIDL for drain side" unit="V");
-parameter real POSTBGIDL = 0 `P(info="Coefficient for the geometry independent part of STBGIDL" unit="V/K");
-parameter real POSTBGIDLD = 0 `P(info="Coefficient for the geometry independent part of STBGIDL for drain side" unit="V/K");
-parameter real POCGIDL = 0 `P(info="Coefficient for the geometry independent part of CGIDL" unit="");
-parameter real POCGIDLD = 0 `P(info="Coefficient for the geometry independent part of CGIDL for drain side" unit="");
-
-// Charge model parameters
-parameter real POCOX = 1E-14 `P(info="Coefficient for the geometry independent part of COX" unit="F");
-parameter real PLCOX = 0.0 `P(info="Coefficient for the length dependence of COX" unit="F");
-parameter real PWCOX = 0.0 `P(info="Coefficient for the width dependence of COX" unit="F");
-parameter real PLWCOX = 0.0 `P(info="Coefficient for the length times width dependence of COX" unit="F");
-parameter real POCGOV = 1E-15 `P(info="Coefficient for the geometry independent part of CGOV" unit="F");
-parameter real PLCGOV = 0.0 `P(info="Coefficient for the length dependence of CGOV" unit="F");
-parameter real PWCGOV = 0.0 `P(info="Coefficient for the width dependence of CGOV" unit="F");
-parameter real PLWCGOV = 0.0 `P(info="Coefficient for the length times width dependence of CGOV" unit="F");
-parameter real POCGOVD = 1E-15 `P(info="Coefficient for the geometry independent part of CGOV for drain side" unit="F");
-parameter real PLCGOVD = 0.0 `P(info="Coefficient for the length dependence of CGOV for drain side" unit="F");
-parameter real PWCGOVD = 0.0 `P(info="Coefficient for the width dependence of CGOV for drain side" unit="F");
-parameter real PLWCGOVD = 0.0 `P(info="Coefficient for the length times width dependence of CGOV for drain side" unit="F");
-parameter real POCGBOV = 0 `P(info="Coefficient for the geometry independent part of CGBOV" unit="F");
-parameter real PLCGBOV = 0.0 `P(info="Coefficient for the length dependence of CGBOV" unit="F");
-parameter real PWCGBOV = 0.0 `P(info="Coefficient for the width dependence of CGBOV" unit="F");
-parameter real PLWCGBOV = 0.0 `P(info="Coefficient for the length times width dependence of CGBOV" unit="F");
-parameter real POCFR = 0 `P(info="Coefficient for the geometry independent part of CFR" unit="F");
-parameter real PLCFR = 0.0 `P(info="Coefficient for the length dependence of CFR" unit="F");
-parameter real PWCFR = 0.0 `P(info="Coefficient for the width dependence of CFR" unit="F");
-parameter real PLWCFR = 0.0 `P(info="Coefficient for the length times width dependence of CFR" unit="F");
-parameter real POCFRD = 0 `P(info="Coefficient for the geometry independent part of CFR for drain side" unit="F");
-parameter real PLCFRD = 0.0 `P(info="Coefficient for the length dependence of CFR for drain side" unit="F");
-parameter real PWCFRD = 0.0 `P(info="Coefficient for the width dependence of CFR for drain side" unit="F");
-parameter real PLWCFRD = 0.0 `P(info="Coefficient for the length times width dependence of CFR for drain side" unit="F");
-
-// Noise model parameters
-parameter real POFNT = 1 `P(info="Coefficient for the geometry independent part of FNT" unit="");
-parameter real POFNTEXC = 0.0 `P(info="Coefficient for the geometry independent part of FNTEXC" unit="");
-parameter real PLFNTEXC = 0.0 `P(info="Coefficient for the length dependence of FNTEXC" unit="");
-parameter real PWFNTEXC = 0.0 `P(info="Coefficient for the width dependence of FNTEXC" unit="");
-parameter real PLWFNTEXC = 0.0 `P(info="Coefficient for the length times width dependence of FNTEXC" unit="");
-parameter real PONFA = 8E+22 `P(info="Coefficient for the geometry independent part of NFA" unit="V^-1/m^4");
-parameter real PLNFA = 0.0 `P(info="Coefficient for the length dependence of NFA" unit="V^-1/m^4");
-parameter real PWNFA = 0.0 `P(info="Coefficient for the width dependence of NFA" unit="V^-1/m^4");
-parameter real PLWNFA = 0.0 `P(info="Coefficient for the length times width dependence of NFA" unit="V^-1/m^4");
-parameter real PONFB = 3E+07 `P(info="Coefficient for the geometry independent part of NFB" unit="V^-1/m^2");
-parameter real PLNFB = 0.0 `P(info="Coefficient for the length dependence of NFB" unit="V^-1/m^2");
-parameter real PWNFB = 0.0 `P(info="Coefficient for the width dependence of NFB" unit="V^-1/m^2");
-parameter real PLWNFB = 0.0 `P(info="Coefficient for the length times width dependence of NFB" unit="V^-1/m^2");
-parameter real PONFC = 0 `P(info="Coefficient for the geometry independent part of NFC" unit="V^-1");
-parameter real PLNFC = 0.0 `P(info="Coefficient for the length dependence of NFC" unit="V^-1");
-parameter real PWNFC = 0.0 `P(info="Coefficient for the width dependence of NFC" unit="V^-1");
-parameter real PLWNFC = 0.0 `P(info="Coefficient for the length times width dependence of NFC" unit="V^-1");
-parameter real POEF = 1.0 `P(info="Coefficient for the flicker noise frequency exponent" unit="");
-
-// Other parameters
-parameter real DTA = 0 `P(info="Temperature offset w.r.t. ambient temperature" unit="K");
-
-// Well proximity effect parameters
-parameter real POKVTHOWE = 0 `P(info="Coefficient for the geometry independent part of KVTHOWE" unit="");
-parameter real PLKVTHOWE = 0 `P(info="Coefficient for the length dependence part of KVTHOWE" unit="");
-parameter real PWKVTHOWE = 0 `P(info="Coefficient for the width dependence part of KVTHOWE" unit="");
-parameter real PLWKVTHOWE = 0 `P(info="Coefficient for the length times width dependence part of KVTHOWE" unit="");
-parameter real POKUOWE = 0 `P(info="Coefficient for the geometry independent part of KUOWE" unit="");
-parameter real PLKUOWE = 0 `P(info="Coefficient for the length dependence part of KUOWE" unit="");
-parameter real PWKUOWE = 0 `P(info="Coefficient for the width dependence part of KUOWE" unit="");
-parameter real PLWKUOWE = 0 `P(info="Coefficient for the length times width dependence part of KUOWE" unit="");
-
-// `Dummy' parameters for binning-set labeling
-parameter real LMIN = 0 `P(info="Dummy parameter to label binning set" unit="m");
-parameter real LMAX = 1.0 `P(info="Dummy parameter to label binning set" unit="m");
-parameter real WMIN = 0 `P(info="Dummy parameter to label binning set" unit="m");
-parameter real WMAX = 1.0 `P(info="Dummy parameter to label binning set" unit="m");
diff --git a/src/spicelib/devices/adms/psp102/admsva/PSP102_macrodefs.include b/src/spicelib/devices/adms/psp102/admsva/PSP102_macrodefs.include
deleted file mode 100644
index 0c7800e39..000000000
--- a/src/spicelib/devices/adms/psp102/admsva/PSP102_macrodefs.include
+++ /dev/null
@@ -1,274 +0,0 @@
-//======================================================================================
-//======================================================================================
-// Filename: PSP102_macrodefs.include
-//======================================================================================
-//======================================================================================
-//
-// (c) Copyright notice
-//
-// Since 2012 until today, PSP has been co-developed by NXP Semiconductors and
-// Delft University of Technology. For this part of the model, each claim undivided
-// ownership and copyrights
-// Until and including 2011, PSP has been co-developed by NXP Semiconductors and
-// Arizona State University. For this part of the model, NXP Semiconductors claims
-// undivided ownership and copyrights.
-//
-//
-// Version: 102.5.0, December 2013
-//
-//======================================================================================
-//======================================================================================
-//
-// Further information can be found in the file releasenotesPSP102.txt
-//
-
-/////////////////////////////////////////////
-//
-// Macros and constants used in PSP
-//
-/////////////////////////////////////////////
-
-// Explicit Gmin
-`define GMIN $simparam("gmin")
-
-`define PMOS -1
-`define NMOS +1
-
-// Some functions
-`define MINA(x,y,a) 0.5*((x)+(y)-sqrt(((x)-(y))*((x)-(y))+(a)))
-`define MAXA(x,y,a) 0.5*((x)+(y)+sqrt(((x)-(y))*((x)-(y))+(a)))
-
-// Physical constants
-`define QMN 5.951993
-`define QMP 7.448711
-
-// Other constants (PSP-mos)
-`define DELTA1 0.02
-`define invSqrt2 7.0710678118654746e-01
-`define oneSixth 1.6666666666666667e-01
-
-
-`define OPdef(OPvarname, OPdesc, OPunit) (*desc=OPdesc*) real OPvarname;
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Macro definitions.
-//
-// Note that because at present locally scoped variables
-// can only be in named blocks, the intermediate variables
-// used in the macros below must be explicitly declared
-// as variables in the main code.
-//
-/////////////////////////////////////////////////////////////////////////////
-
-
-// sigma function used in surface potential and other calculations
-// (one call uses expressions for arguments so parentheses
-// around the arguments in the expressions are necessary)
-`define sigma(a,c,tau,eta,y) \
- nu = (a) + (c); \
- mutau = nu * nu + (tau) * (0.5 * ((c) * (c)) - (a)); \
- y = (eta) + (a) * nu * (tau) / (mutau + (nu / mutau) * (tau) * (tau) * (c) * ((c) * (c) * `oneThird - (a)));
-
-// modified version of sigma, which takes 4 arguments
-`define sigma2(a,b,c,tau,eta,y) \
- nu = (a) + (c); \
- mutau = (nu) * (nu) + (tau) * (0.5 * ((c) * (c)) - (a) * (b)); \
- y = (eta) + (a) * nu * (tau) / (mutau + (nu / mutau) * (tau) * (tau) * (c) * ((c) * (c) * `oneThird - (a) * (b)));
-
-//
-// sp_s surface potential calculation
-//
-`define sp_s(sp,xg,xn,delta) \
- if (abs(xg) <= margin) begin \
- SP_S_temp1 = inv_xi * inv_xi * `oneSixth * `invSqrt2; \
- sp = xg * inv_xi * (1.0 + xg * (1.0 - (delta)) * Gf * SP_S_temp1); \
- end else begin \
- if (xg < -margin) begin \
- SP_S_yg = -xg; \
- SP_S_ysub = 1.25 * (SP_S_yg * inv_xi); \
- SP_S_eta = 0.5 * (SP_S_ysub + 10 - sqrt((SP_S_ysub - 6.0) * (SP_S_ysub - 6.0) + 64.0)); \
- SP_S_temp = SP_S_yg - SP_S_eta; \
- SP_S_a = SP_S_temp * SP_S_temp + Gf2*(SP_S_eta + 1.0);\
- SP_S_c = 2.0 * SP_S_temp - Gf2; \
- SP_S_tau = -SP_S_eta + ln(SP_S_a * inv_Gf2); \
- `sigma(SP_S_a, SP_S_c, SP_S_tau, SP_S_eta, SP_S_y0) \
- `expl_high(SP_S_y0, SP_S_delta0) \
- SP_S_delta1 = 1.0 / SP_S_delta0; \
- SP_S_temp = 1.0 / (2.0 + SP_S_y0 * SP_S_y0); \
- SP_S_xi0 = SP_S_y0 * SP_S_y0 * SP_S_temp; \
- SP_S_xi1 = 4.0 * (SP_S_y0 * SP_S_temp * SP_S_temp); \
- SP_S_xi2 = (8.0 * SP_S_temp - 12.0 * SP_S_xi0) * SP_S_temp * SP_S_temp; \
- SP_S_temp = SP_S_yg - SP_S_y0; \
- SP_S_temp1 = (delta) * SP_S_delta1; \
- SP_S_pC = 2.0 * SP_S_temp + Gf2 * (SP_S_delta0 - 1.0 - SP_S_temp1 + (delta) * (1.0 - SP_S_xi1)); \
- SP_S_qC = SP_S_temp * SP_S_temp - Gf2 * (SP_S_delta0 - SP_S_y0 - 1.0 + SP_S_temp1 + (delta) * (SP_S_y0 - 1.0 - SP_S_xi0)); \
- SP_S_temp = 2.0 - Gf2 * (SP_S_delta0 + SP_S_temp1 - (delta) * SP_S_xi2); \
- SP_S_temp = SP_S_pC * SP_S_pC - 2.0 * (SP_S_qC * SP_S_temp); \
- sp = -SP_S_y0 - 2.0 * (SP_S_qC / (SP_S_pC + sqrt(SP_S_temp))); \
- end else begin \
- SP_xg1 = 1.0 / (x1 + Gf * 7.324648775608221e-001); \
- SP_S_A_fac= (xi * x1 * SP_xg1 - 1.0) * SP_xg1; \
- SP_S_xbar = xg * inv_xi * (1.0 + SP_S_A_fac * xg); \
- `expl_low(-SP_S_xbar, SP_S_temp) \
- SP_S_w = 1.0 - SP_S_temp; \
- SP_S_x1 = xg + Gf2 * 0.5 - Gf * sqrt(xg + Gf2 * 0.25 - SP_S_w); \
- SP_S_bx = (xn) + 3.0; \
- SP_S_eta = `MINA(SP_S_x1, SP_S_bx, 5.0) - 0.5 * (SP_S_bx - sqrt(SP_S_bx * SP_S_bx + 5.0)); \
- SP_S_temp = xg - SP_S_eta; \
- SP_S_temp1= exp(-SP_S_eta); \
- SP_S_temp2= 1.0 / (2.0 + SP_S_eta * SP_S_eta); \
- SP_S_xi0 = SP_S_eta * SP_S_eta * SP_S_temp2; \
- SP_S_xi1 = 4.0 * (SP_S_eta * SP_S_temp2 * SP_S_temp2); \
- SP_S_xi2 = (8.0 * SP_S_temp2 - 12.0 * SP_S_xi0) * SP_S_temp2 * SP_S_temp2; \
- SP_S_a = max(1.0e-40, SP_S_temp * SP_S_temp - Gf2 * (SP_S_temp1 + SP_S_eta - 1.0 - (delta) * (SP_S_eta + 1.0 + SP_S_xi0))); \
- SP_S_b = 1.0 - 0.5 * (Gf2 * (SP_S_temp1 - (delta) * SP_S_xi2)); \
- SP_S_c = 2.0 * SP_S_temp + Gf2 * (1.0 - SP_S_temp1 - (delta) * (1.0 + SP_S_xi1)); \
- SP_S_tau = (xn) - SP_S_eta + ln(SP_S_a / Gf2); \
- `sigma2(SP_S_a, SP_S_b, SP_S_c, SP_S_tau, SP_S_eta, SP_S_x0) \
- if (SP_S_x0 < `se05) begin \
- SP_S_delta0 = exp(SP_S_x0); \
- SP_S_delta1 = 1.0 / SP_S_delta0; \
- SP_S_delta0 = (delta) * SP_S_delta0; \
- end else begin \
- if (SP_S_x0 > (xn) - `se05) begin \
- SP_S_delta0 = exp(SP_S_x0 - (xn)); \
- SP_S_delta1 = (delta) / SP_S_delta0; \
- end else begin \
- SP_S_delta0 = `ke05 / `P3((xn) - SP_S_x0 - `se05); \
- SP_S_delta1 = `ke05 / `P3(SP_S_x0 - `se05); \
- end \
- end \
- SP_S_temp = 1.0 / (2.0 + SP_S_x0 * SP_S_x0); \
- SP_S_xi0 = SP_S_x0 * SP_S_x0 * SP_S_temp; \
- SP_S_xi1 = 4.0 * (SP_S_x0 * SP_S_temp * SP_S_temp); \
- SP_S_xi2 = (8.0 * SP_S_temp - 12.0 * SP_S_xi0) * SP_S_temp * SP_S_temp; \
- SP_S_temp = xg - SP_S_x0; \
- SP_S_pC = 2.0 * SP_S_temp + Gf2 * (1.0 - SP_S_delta1 + SP_S_delta0 - (delta) * (1.0 + SP_S_xi1)); \
- SP_S_qC = SP_S_temp * SP_S_temp - Gf2 * (SP_S_delta1 + SP_S_x0 - 1.0 + SP_S_delta0 - (delta) * (SP_S_x0 + 1.0 + SP_S_xi0)); \
- SP_S_temp = 2.0 - Gf2 * (SP_S_delta1 + SP_S_delta0 - (delta) * SP_S_xi2); \
- SP_S_temp = SP_S_pC * SP_S_pC - 2.0 * (SP_S_qC * SP_S_temp); \
- sp = SP_S_x0 + 2.0 * (SP_S_qC / (SP_S_pC + sqrt(SP_S_temp))); \
- end \
- end
-
-//
-// sp_s_d surface potential calculation at drain (subset of function sp_s)
-//
-`define sp_s_d(sp,xg,xn,delta) \
- if (abs(xg) <= margin) begin \
- SP_S_temp1 = inv_xi * inv_xi * `oneSixth * `invSqrt2; \
- sp = xg * inv_xi * (1.0 + xg * (1.0 - (delta)) * Gf * SP_S_temp1); \
- end else begin \
- SP_S_bx = (xn) + 3; \
- SP_S_eta = `MINA(SP_S_x1, SP_S_bx, 5.0) - 0.5 * (SP_S_bx - sqrt(SP_S_bx * SP_S_bx + 5.0)); \
- SP_S_temp = xg - SP_S_eta; \
- SP_S_temp1= exp(-SP_S_eta); \
- SP_S_temp2= 1.0 / (2.0 + SP_S_eta * SP_S_eta); \
- SP_S_xi0 = SP_S_eta * SP_S_eta * SP_S_temp2; \
- SP_S_xi1 = 4.0 * (SP_S_eta * SP_S_temp2 * SP_S_temp2); \
- SP_S_xi2 = (8.0 * SP_S_temp2 - 12.0 * SP_S_xi0) * SP_S_temp2 * SP_S_temp2; \
- SP_S_a = max(1.0e-40, SP_S_temp * SP_S_temp - Gf2 * (SP_S_temp1 + SP_S_eta - 1.0 - (delta) * (SP_S_eta + 1.0 + SP_S_xi0))); \
- SP_S_b = 1.0 - 0.5 * (Gf2 * (SP_S_temp1 - (delta) * SP_S_xi2)); \
- SP_S_c = 2.0 * SP_S_temp + Gf2 * (1.0 - SP_S_temp1 - (delta) * (1.0 + SP_S_xi1)); \
- SP_S_tau = (xn) - SP_S_eta + ln(SP_S_a / Gf2); \
- `sigma2(SP_S_a, SP_S_b, SP_S_c, SP_S_tau, SP_S_eta, SP_S_x0) \
- if (SP_S_x0 < `se05) begin \
- SP_S_delta0 = exp(SP_S_x0); \
- SP_S_delta1 = 1.0 / SP_S_delta0; \
- SP_S_delta0 = (delta) * SP_S_delta0; \
- end else begin \
- if (SP_S_x0 > (xn) - `se05) begin \
- SP_S_delta0 = exp(SP_S_x0 - (xn)); \
- SP_S_delta1 = (delta) / SP_S_delta0; \
- end else begin \
- SP_S_delta0 = `ke05 / `P3((xn) - SP_S_x0 - `se05); \
- SP_S_delta1 = `ke05 / `P3(SP_S_x0 - `se05); \
- end \
- end \
- SP_S_temp = 1.0 / (2.0 + SP_S_x0 * SP_S_x0); \
- SP_S_xi0 = SP_S_x0 * SP_S_x0 * SP_S_temp; \
- SP_S_xi1 = 4.0 * (SP_S_x0 * SP_S_temp * SP_S_temp); \
- SP_S_xi2 = (8.0 * SP_S_temp-12.0 * SP_S_xi0) * SP_S_temp * SP_S_temp; \
- SP_S_temp = xg - SP_S_x0; \
- SP_S_pC = 2.0 * SP_S_temp + Gf2 * (1.0 - SP_S_delta1 + SP_S_delta0 - (delta) * (1.0 + SP_S_xi1)); \
- SP_S_qC = SP_S_temp * SP_S_temp - Gf2 * (SP_S_delta1 + SP_S_x0 - 1.0 + SP_S_delta0 - (delta) * (SP_S_x0 + 1.0 + SP_S_xi0)); \
- SP_S_temp = 2.0 - Gf2*(SP_S_delta1+SP_S_delta0-(delta)*SP_S_xi2); \
- SP_S_temp = SP_S_pC * SP_S_pC - 2.0 * (SP_S_qC * SP_S_temp); \
- sp = SP_S_x0 + 2.0 * (SP_S_qC / (SP_S_pC + sqrt(SP_S_temp)));\
- end
-
-//
-// sp_ov surface potential calculation for the overlap regions
-//
-`define sp_ov(sp,xg) \
- if (abs(xg) <= x_mrg_ov) begin \
- sp = (-(xg) * inv_xi_ov); \
- end else begin \
- if (xg < -x_mrg_ov) begin \
- SP_OV_yg = -xg; \
- SP_OV_z = x1 * SP_OV_yg * inv_xi_ov; \
- SP_OV_eta = 0.5 * (SP_OV_z + 10.0 - sqrt((SP_OV_z - 6.0) * (SP_OV_z - 6.0) + 64.0)); \
- SP_OV_a = (SP_OV_yg - SP_OV_eta) * (SP_OV_yg - SP_OV_eta) + GOV2 * (SP_OV_eta + 1.0); \
- SP_OV_c = 2.0 * (SP_OV_yg - SP_OV_eta) - GOV2; \
- SP_OV_tau = ln(SP_OV_a / GOV2) - SP_OV_eta; \
- `sigma(SP_OV_a, SP_OV_c, SP_OV_tau, SP_OV_eta, SP_OV_y0) \
- SP_OV_D0 = exp(SP_OV_y0); \
- SP_OV_temp = SP_OV_yg - SP_OV_y0; \
- SP_OV_p = 2.0 * SP_OV_temp + GOV2 * (SP_OV_D0 - 1.0); \
- SP_OV_q = SP_OV_temp * SP_OV_temp + GOV2 * (SP_OV_y0 + 1.0 - SP_OV_D0); \
- SP_OV_xi = 1.0 - GOV2 * 0.5 * SP_OV_D0; \
- SP_OV_temp = SP_OV_p * SP_OV_p - 4.0 * (SP_OV_xi * SP_OV_q); \
- SP_OV_w = 2.0 * (SP_OV_q / (SP_OV_p + sqrt(SP_OV_temp))); \
- sp = -(SP_OV_y0 + SP_OV_w); \
- end else begin \
- SP_OV_Afac = (xi_ov * x1 * inv_xg1 - 1.0) * inv_xg1; \
- SP_OV_xbar = xg * inv_xi_ov * (1.0 + SP_OV_Afac * xg); \
- `expl_low(-SP_OV_xbar, SP_OV_temp) \
- SP_OV_w = 1.0 - SP_OV_temp; \
- SP_OV_x0 = xg + GOV2 * 0.5 - GOV * sqrt(xg + GOV2 * 0.25 - SP_OV_w); \
- `expl_low(-SP_OV_x0, SP_OV_D0) \
- SP_OV_p = 2.0 * (xg - SP_OV_x0) + GOV2 * (1 - SP_OV_D0); \
- SP_OV_q = (xg - SP_OV_x0) * (xg - SP_OV_x0) - GOV2 * (SP_OV_x0 - 1.0 + SP_OV_D0); \
- SP_OV_xi = 1.0 - GOV2 * 0.5 * SP_OV_D0; \
- SP_OV_temp = SP_OV_p * SP_OV_p - 4.0 * (SP_OV_xi * SP_OV_q); \
- SP_OV_u = 2.0 * (SP_OV_q / (SP_OV_p + sqrt(SP_OV_temp))); \
- sp = SP_OV_x0 + SP_OV_u; \
- end \
- sp = -sp; \
- end
-
-// This construct is used for parasitic resistances.
-// If R=0, the Verilog-A compiler should recognize
-// that the corresponding nodes can be collapsed
-`define CollapsableR(G, R, SN, N1, N2) \
- if ((R) > 0.0) begin \
- I(N1, N2) <+ MULT_i * (G) * V(N1, N2); \
- I(N1, N2) <+ white_noise(MULT_i * SN); \
- end else begin \
- V(N1, N2) <+ 0.0; \
- end
-
-`define NonCollapsableR(G, R, SN, N1, N2) \
- I(N1, N2) <+ MULT_i * (G) * V(N1, N2); \
- I(N1, N2) <+ white_noise(MULT_i * SN, "thermal noise");
-
-// This macro is used for asymmetric overlap regions.
-// The following variables are changed to those for source/drain side.
-`define ChangeToSource \
- GOV = GOV_s; \
- GOV2 = GOV2_s; \
- xi_ov = xi_ov_s; \
- inv_xi_ov = inv_xi_ov_s; \
- x_mrg_ov = x_mrg_ov_s; \
- inv_xg1 = inv_xg1_s;
-
-
-`define ChangeToDrain \
- GOV = GOV_d; \
- GOV2 = GOV2_d; \
- xi_ov = xi_ov_d; \
- inv_xi_ov = inv_xi_ov_d; \
- x_mrg_ov = x_mrg_ov_d; \
- inv_xg1 = inv_xg1_d;
diff --git a/src/spicelib/devices/adms/psp102/admsva/PSP102_module.include b/src/spicelib/devices/adms/psp102/admsva/PSP102_module.include
deleted file mode 100644
index 4b1e716d9..000000000
--- a/src/spicelib/devices/adms/psp102/admsva/PSP102_module.include
+++ /dev/null
@@ -1,3097 +0,0 @@
-//======================================================================================
-//======================================================================================
-// Filename: PSP102_module.include
-//======================================================================================
-//======================================================================================
-//
-// (c) Copyright notice
-//
-// Since 2012 until today, PSP has been co-developed by NXP Semiconductors and
-// Delft University of Technology. For this part of the model, each claim undivided
-// ownership and copyrights
-// Until and including 2011, PSP has been co-developed by NXP Semiconductors and
-// Arizona State University. For this part of the model, NXP Semiconductors claims
-// undivided ownership and copyrights.
-//
-//
-// Version: 102.5.0, December 2013
-//
-//======================================================================================
-//======================================================================================
-//
-// Further information can be found in the file releasenotesPSP102.txt
-//
-
-// Node definitions
-inout D, G, S, B;
-electrical D;
-electrical G;
-electrical S;
-electrical B;
-
-// Extra internal nodes for correlated drain and gate noise
-electrical NOI;
-electrical NOI2;
-
-// Extra branches for correlated drain and gate noise
-branch (NOI) NOII;
-branch (NOI) NOIR;
-branch (NOI) NOIC;
-
-// Internal nodes for gate and bulk resistors
-electrical GP;
-electrical BP;
-electrical BI;
-electrical BS;
-electrical BD;
-
-`ifdef NQSmodel
-
- // Internal nodes for spline collocation
- electrical INT1;
- electrical INT2;
- electrical INT3;
- electrical INT4;
- electrical INT5;
- electrical INT6;
- electrical INT7;
- electrical INT8;
- electrical INT9;
-
- branch(INT1) SPLINE1;
- branch(INT2) SPLINE2;
- branch(INT3) SPLINE3;
- branch(INT4) SPLINE4;
- branch(INT5) SPLINE5;
- branch(INT6) SPLINE6;
- branch(INT7) SPLINE7;
- branch(INT8) SPLINE8;
- branch(INT9) SPLINE9;
-
- branch(INT1) RES1;
- branch(INT2) RES2;
- branch(INT3) RES3;
- branch(INT4) RES4;
- branch(INT5) RES5;
- branch(INT6) RES6;
- branch(INT7) RES7;
- branch(INT8) RES8;
- branch(INT9) RES9;
-
-`endif // NQSmodel
-
-//////////////////////////
-//
-// Model parameters
-//
-//////////////////////////
-
-`ifdef LocalModel
- ///////////////////////////////////////////////////
- // PSP local model parameters
- ///////////////////////////////////////////////////
-
- // Special model parameters, some are also simulator global variables
- parameter real LEVEL = 102 `P(info="Model level" unit="");
-
- parameter integer TYPE = 1 `from( -1 ,1 ) `P(info="Channel type parameter, +1=NMOS -1=PMOS" unit="");
- parameter integer nmos = 1 `from( 0, 1 ) `P(desc="MOS channel type");
- parameter integer pmos = 1 `from( 0, 1 ) `P(desc="MOS channel type");
- parameter real TR = 21.0 `from( -273.0,inf ) `P(info="nominal (reference) temperature" unit="C");
-
- // Switch parameters that turn models or effects on or off
- parameter real SWIGATE = 0.0 `from( 0.0,1.0 ) `P(info="Flag for gate current, 0=turn off IG" unit="");
- parameter real SWIMPACT = 0.0 `from( 0.0,1.0 ) `P(info="Flag for impact ionization current, 0=turn off II" unit="");
- parameter real SWGIDL = 0.0 `from( 0.0,1.0 ) `P(info="Flag for GIDL current, 0=turn off IGIDL" unit="");
- parameter real SWJUNCAP = 0.0 `from( 0.0,3.0 ) `P(info="Flag for juncap, 0=turn off juncap" unit="");
- parameter real SWJUNASYM= 0.0 `P(info="Flag for asymmetric junctions; 0=symmetric, 1=asymmetric" unit="");
- parameter real QMC = 1.0 `from( 0.0,inf ) `P(info="Quantum-mechanical correction factor" unit="");
-
- // Process parameters
- parameter real VFB = -1.0 `P(info="Flatband voltage at TR" unit="V");
- parameter real STVFB = 5.0e-4 `P(info="Temperature dependence of VFB" unit="V/K");
- parameter real TOX = 2.0e-09 `from( 1e-10,inf ) `P(info="Gate oxide thickness" unit="m");
- parameter real EPSROX = 3.9 `from( 1.0,inf ) `P(info="Relative permittivity of gate dielectric" unit="");
- parameter real NEFF = 5.0e+23 `from( 1e20,1e26 ) `P(info="Effective substrate doping" unit="m^-3");
- parameter real VNSUB = 0.0 `P(info="Effective doping bias-dependence parameter" unit="V");
- parameter real NSLP = 0.05 `from( 1e-3,inf ) `P(info="Effective doping bias-dependence parameter" unit="V");
- parameter real DNSUB = 0.0 `from( 0.0,1.0 ) `P(info="Effective doping bias-dependence parameter" unit="V^-1");
- parameter real DPHIB = 0.0 `P(info="Offset parameter for PHIB" unit="V");
- parameter real NP = 1.0e+26 `from( 0.0,inf ) `P(info="Gate poly-silicon doping" unit="m^-3");
- parameter real CT = 0.0 `from( 0.0,inf ) `P(info="Interface states factor" unit="");
- parameter real TOXOV = 2.0e-09 `from( 1e-10,inf ) `P(info="Overlap oxide thickness" unit="m");
- parameter real TOXOVD = 2.0e-09 `from( 1e-10,inf ) `P(info="Overlap oxide thickness for drain side" unit="m");
- parameter real NOV = 5.0e+25 `from( 1e20,1e27 ) `P(info="Effective doping of overlap region" unit="m^-3");
- parameter real NOVD = 5.0e+25 `from( 1e20,1e27 ) `P(info="Effective doping of overlap region for drain side" unit="m^-3");
-
- // DIBL parameters
- parameter real CF = 0.0 `from( 0.0,inf ) `P(info="DIBL-parameter" unit="");
- parameter real CFB = 0.0 `from( 0.0,1.0 ) `P(info="Back bias dependence of CF" unit="V^-1");
-
- // Mobility parameters
- parameter real BETN = 7e-2 `from( 0.0,inf ) `P(info="Channel aspect ratio times zero-field mobility" unit="m^2/V/s");
- parameter real STBET = 1.0 `P(info="Temperature dependence of BETN" unit="");
- parameter real MUE = 0.5 `from( 0.0,inf ) `P(info="Mobility reduction coefficient at TR" unit="m/V");
- parameter real STMUE = 0.0 `P(info="Temperature dependence of MUE" unit="");
- parameter real THEMU = 1.5 `from( 0.0,inf ) `P(info="Mobility reduction exponent at TR" unit="");
- parameter real STTHEMU = 1.5 `P(info="Temperature dependence of THEMU" unit="");
- parameter real CS = 0.0 `from( 0.0,inf ) `P(info="Coulomb scattering parameter at TR" unit="");
- parameter real STCS = 0.0 `P(info="Temperature dependence of CS" unit="");
- parameter real XCOR = 0.0 `from( 0.0,inf ) `P(info="Non-universality factor" unit="V^-1");
- parameter real STXCOR = 0.0 `P(info="Temperature dependence of XCOR" unit="");
- parameter real FETA = 1.0 `from( 0.0,inf ) `P(info="Effective field parameter" unit="");
-
- // Series-resistance parameters (for resistance modeling as part of intrinsic mobility reduction)
- parameter real RS = 30 `from( 0.0,inf ) `P(info="Series resistance at TR" unit="Ohm");
- parameter real STRS = 1.0 `P(info="Temperature dependence of RS" unit="");
- parameter real RSB = 0.0 `from( -0.5,1.0 ) `P(info="Back-bias dependence of series resistance" unit="V^-1");
- parameter real RSG = 0.0 `from( -0.5,inf ) `P(info="Gate-bias dependence of series resistance" unit="V^-1");
-
- // Velocity saturation parameters
- parameter real THESAT = 1.0 `from( 0.0,inf ) `P(info="Velocity saturation parameter at TR" unit="V^-1");
- parameter real STTHESAT = 1.0 `P(info="Temperature dependence of THESAT" unit="");
- parameter real THESATB = 0.0 `from( -0.5,1.0 ) `P(info="Back-bias dependence of velocity saturation" unit="V^-1");
- parameter real THESATG = 0.0 `from( -0.5,inf ) `P(info="Gate-bias dependence of velocity saturation" unit="V^-1");
-
- // Saturation voltage parameters
- parameter real AX = 3.0 `from( 2.0,inf ) `P(info="Linear/saturation transition factor" unit="");
-
- // Channel length modulation (CLM) parameters
- parameter real ALP = 0.01 `from( 0.0,inf ) `P(info="CLM pre-factor" unit="");
- parameter real ALP1 = 0.00 `from( 0.0,inf ) `P(info="CLM enhancement factor above threshold" unit="V");
- parameter real ALP2 = 0.00 `from( 0.0,inf ) `P(info="CLM enhancement factor below threshold" unit="V^-1");
- parameter real VP = 0.05 `from( 1e-10,inf ) `P(info="CLM logarithm dependence factor" unit="V");
-
- // Impact ionization (II) parameters
- parameter real A1 = 1.0 `from( 0.0,inf ) `P(info="Impact-ionization pre-factor" unit="");
- parameter real A2 = 10.0 `from( 0.0,inf ) `P(info="Impact-ionization exponent at TR" unit="V");
- parameter real STA2 = 0.0 `P(info="Temperature dependence of A2" unit="V");
- parameter real A3 = 1.0 `from( 0.0,inf ) `P(info="Saturation-voltage dependence of impact-ionization" unit="");
- parameter real A4 = 0.0 `from( 0.0,inf ) `P(info="Back-bias dependence of impact-ionization" unit="V^-0.5");
-
- // Gate current parameters
- parameter real GCO = 0.0 `from( -10.0,10.0 ) `P(info="Gate tunnelling energy adjustment" unit="");
- parameter real IGINV = 0.0 `from( 0.0,inf ) `P(info="Gate channel current pre-factor" unit="A");
- parameter real IGOV = 0.0 `from( 0.0,inf ) `P(info="Gate overlap current pre-factor" unit="A");
- parameter real IGOVD = 0.0 `from( 0.0,inf ) `P(info="Gate overlap current pre-factor for drain side" unit="A");
- parameter real STIG = 2.0 `P(info="Temperature dependence of IGINV and IGOV" unit="");
- parameter real GC2 = 0.375 `from( 0.0,10.0 ) `P(info="Gate current slope factor" unit="");
- parameter real GC3 = 0.063 `from( -2.0,2.0 ) `P(info="Gate current curvature factor" unit="");
- parameter real CHIB = 3.1 `from( 1.0,inf ) `P(info="Tunnelling barrier height" unit="V");
-
- // Gate Induced Drain/Source Leakage (GIDL) parameters
- parameter real AGIDL = 0.0 `from( 0.0,inf ) `P(info="GIDL pre-factor" unit="A/V^3");
- parameter real AGIDLD = 0.0 `from( 0.0,inf ) `P(info="GIDL pre-factor for drain side" unit="A/V^3");
- parameter real BGIDL = 41.0 `from( 0.0,inf ) `P(info="GIDL probability factor at TR" unit="V");
- parameter real BGIDLD = 41.0 `from( 0.0,inf ) `P(info="GIDL probability factor at TR for drain side" unit="V");
- parameter real STBGIDL = 0.0 `P(info="Temperature dependence of BGIDL" unit="V/K");
- parameter real STBGIDLD = 0.0 `P(info="Temperature dependence of BGIDL for drain side" unit="V/K");
- parameter real CGIDL = 0.0 `P(info="Back-bias dependence of GIDL" unit="");
- parameter real CGIDLD = 0.0 `P(info="Back-bias dependence of GIDL for drain side" unit="");
-
- // Charge model parameters
- parameter real COX = 1.0e-14 `from( 0.0,inf ) `P(info="Oxide capacitance for intrinsic channel" unit="F");
- parameter real CGOV = 1.0e-15 `from( 0.0,inf ) `P(info="Oxide capacitance for gate-drain/source overlap" unit="F");
- parameter real CGOVD = 1.0e-15 `from( 0.0,inf ) `P(info="Oxide capacitance for gate-drain overlap" unit="F");
- parameter real CGBOV = 0.0 `from( 0.0,inf ) `P(info="Oxide capacitance for gate-bulk overlap" unit="F");
- parameter real CFR = 0.0 `from( 0.0,inf ) `P(info="Outer fringe capacitance" unit="F");
- parameter real CFRD = 0.0 `from( 0.0,inf ) `P(info="Outer fringe capacitance for drain side" unit="F");
-
- // Noise parameters
- parameter real FNT = 1.0 `from( 0.0,inf ) `P(info="Thermal noise coefficient" unit="");
- parameter real FNTEXC = 0.0 `from( 0.0,inf ) `P(info="Excess noise coefficient" unit="");
- parameter real NFA = 8.0e+22 `from( 0.0,inf ) `P(info="First coefficient of flicker noise" unit="V^-1/m^4");
- parameter real NFB = 3.0e+07 `from( 0.0,inf ) `P(info="Second coefficient of flicker noise" unit="V^-1/m^2");
- parameter real NFC = 0.0 `from( 0.0,inf ) `P(info="Third coefficient of flicker noise" unit="V^-1");
- parameter real EF = 1.0 `from( 0.0,inf ) `P(info="Flicker noise frequency exponent" unit="");
-
-`ifdef NQSmodel
- // NQS parameters
- parameter real SWNQS = 0.0 `from( 0.0,9.0 ) `P(info="Flag for NQS, 0=off, 1, 2, 3, 5, or 9=number of collocation points" unit="");
- parameter real MUNQS = 1.0 `from( 0.0,inf ) `P(info="Relative mobility for NQS modelling");
-`endif // NQSmodel
-
- // Parasitic resistance parameters
- parameter real RG = 0.0 `from( 0.0,inf ) `P(info="Gate resistance" unit="Ohm");
- parameter real RBULK = 0.0 `from( 0.0,inf ) `P(info="Bulk resistance between node BP and BI" unit="Ohm");
- parameter real RWELL = 0.0 `from( 0.0,inf ) `P(info="Well resistance between node BI and B" unit="Ohm");
- parameter real RJUNS = 0.0 `from( 0.0,inf ) `P(info="Source-side bulk resistance between node BI and BS" unit="Ohm");
- parameter real RJUND = 0.0 `from( 0.0,inf ) `P(info="Drain-side bulk resistance between node BI and BD" unit="Ohm");
-
- // JUNCAP Parameters
- `include "JUNCAP200_parlist.include"
-
- // Other parameters
- parameter real DTA = 0.0 `P(info="Temperature offset w.r.t. ambient temperature" unit="K");
-
- // Instance parameters
- parameter real DELVTO = 0.0 `P(type="instance" info="Threshold voltage shift parameter" unit="V");
- parameter real FACTUO = 1.0 `from( 0.0,inf ) `P(type="instance" info="Zero-field mobility pre-factor" unit="");
- parameter real ABSOURCE = 1e-12 `from(`AB_cliplow,inf) `P(type="instance" info="Bottom area of source junction" unit="m^2");
- parameter real LSSOURCE = 1e-6 `from(`LS_cliplow,inf) `P(type="instance" info="STI-edge length of source junction" unit="m");
- parameter real LGSOURCE = 1e-6 `from(`LG_cliplow,inf) `P(type="instance" info="Gate-edge length of source junction" unit="m");
- parameter real ABDRAIN = 1e-12 `from(`AB_cliplow,inf) `P(type="instance" info="Bottom area of drain junction" unit="m^2");
- parameter real LSDRAIN = 1e-6 `from(`LS_cliplow,inf) `P(type="instance" info="STI-edge length of drain junction" unit="m");
- parameter real LGDRAIN = 1e-6 `from(`LG_cliplow,inf) `P(type="instance" info="Gate-edge length of drain junction" unit="m");
- parameter real AS = 1E-12 `from(`AB_cliplow,inf) `P(type="instance" info="Bottom area of source junction" unit="m^2");
- parameter real PS = 1E-6 `from(`LS_cliplow,inf) `P(type="instance" info="Perimeter of source junction" unit="m");
- parameter real AD = 1E-12 `from(`AB_cliplow,inf) `P(type="instance" info="Bottom area of drain junction" unit="m^2");
- parameter real PD = 1E-6 `from(`LS_cliplow,inf) `P(type="instance" info="Perimeter of drain junction" unit="m");
- parameter real JW = 1E-6 `from(`LG_cliplow,inf) `P(type="instance" info="Gate-edge length of source/drain junction" unit="m");
- parameter real MULT = 1.0 `from( 0.0,inf ) `P(type="instance" info="Number of devices in parallel" unit="");
-`else // LocalModel
-`ifdef Binning
-
- `include "PSP102_binpars.include"
-
-`else // Binning
- ///////////////////////////////////////////////////
- // PSP global model parameters
- ///////////////////////////////////////////////////
-
- // Special model parameters
- parameter real LEVEL = 1020 `P(info="Model level" unit="");
-
- parameter integer TYPE = 1 `from( -1, 1 ) `P(info="Channel type parameter, +1=NMOS -1=PMOS" unit="");
- parameter integer nmos = 1 `from( 0, 1 ) `P(desc="MOS channel type");
- parameter integer pmos = 1 `from( 0, 1 ) `P(desc="MOS channel type");
-
- // Reference Temperature
- parameter real TR = 21.0 `from( -273.0,inf ) `P(info="nominal (reference) temperature" unit="C");
-
- // Switch parameters that turn models or effects on or off
- parameter real SWIGATE = 0.0 `from( 0.0,1.0 ) `P(info="Flag for gate current, 0=turn off IG" unit="");
- parameter real SWIMPACT = 0.0 `from( 0.0,1.0 ) `P(info="Flag for impact ionization current, 0=turn off II" unit="");
- parameter real SWGIDL = 0.0 `from( 0.0,1.0 ) `P(info="Flag for GIDL current, 0=turn off IGIDL" unit="");
- parameter real SWJUNCAP = 0.0 `from( 0.0,3.0 ) `P(info="Flag for juncap, 0=turn off juncap" unit="");
- parameter real SWJUNASYM= 0.0 `P(info="Flag for asymmetric junctions; 0=symmetric, 1=asymmetric" unit="");
- parameter real QMC = 1.0 `from( 0.0,inf ) `P(info="Quantum-mechanical correction factor" unit="");
-
- // Process Parameters
- parameter real LVARO = 0.0 `P(info="Geom. independent difference between actual and programmed gate length" unit="m");
- parameter real LVARL = 0.0 `P(info="Length dependence of LVAR" unit="");
- parameter real LVARW = 0.0 `P(info="Width dependence of LVAR" unit="");
- parameter real LAP = 0.0 `P(info="Effective channel length reduction per side" unit="m");
- parameter real WVARO = 0.0 `P(info="Geom. independent difference between actual and programmed field-oxide opening" unit="m");
- parameter real WVARL = 0.0 `P(info="Length dependence of WVAR" unit="");
- parameter real WVARW = 0.0 `P(info="Width dependence of WVAR" unit="");
- parameter real WOT = 0.0 `P(info="Effective channel width reduction per side" unit="m");
- parameter real DLQ = 0.0 `P(info="Effective channel length reduction for CV" unit="m");
- parameter real DWQ = 0.0 `P(info="Effective channel width reduction for CV" unit="m");
- parameter real VFBO = -1.0 `P(info="Geometry-independent flat-band voltage at TR" unit="V");
- parameter real VFBL = 0.0 `P(info="Length dependence of flat-band voltage" unit="");
- parameter real VFBW = 0.0 `P(info="Width dependence of flat-band voltage" unit="");
- parameter real VFBLW = 0.0 `P(info="Area dependence of flat-band voltage" unit="");
- parameter real STVFBO = 5e-4 `P(info="Geometry-independent temperature dependence of VFB" unit="V/K");
- parameter real STVFBL = 0.0 `P(info="Length dependence of temperature dependence of VFB" unit="");
- parameter real STVFBW = 0.0 `P(info="Width dependence of temperature dependence of VFB" unit="");
- parameter real STVFBLW = 0.0 `P(info="Area dependence of temperature dependence of VFB" unit="");
- parameter real TOXO = 2e-9 `from( 1e-10,inf ) `P(info="Gate oxide thickness" unit="m");
- parameter real EPSROXO = 3.9 `from( 1.0,inf ) `P(info="Relative permittivity of gate dielectric" unit="");
- parameter real NSUBO = 3e23 `from( 1e20,inf ) `P(info="Geometry independent substrate doping" unit="m^-3");
- parameter real NSUBW = 0.0 `P(info="Width dependence of background doping NSUBO due to segregation" unit="");
- parameter real WSEG = 1e-8 `from( 1e-10,inf ) `P(info="Char. length of segregation of background doping NSUBO" unit="m");
- parameter real NPCK = 1e24 `from( 0.0,inf ) `P(info="Pocket doping level" unit="m^-3");
- parameter real NPCKW = 0.0 `P(info="Width dependence of pocket doping NPCK due to segregation" unit="");
- parameter real WSEGP = 1e-8 `from( 1e-10,inf ) `P(info="Char. length of segregation of pocket doping NPCK" unit="m");
- parameter real LPCK = 1e-8 `from( 1e-10,inf ) `P(info="Char. length of lateral doping profile" unit="m");
- parameter real LPCKW = 0.0 `P(info="Width dependence of char. length of lateral doping profile" unit="");
- parameter real FOL1 = 0.0 `P(info="First length dependence coefficient for short channel body effect" unit="");
- parameter real FOL2 = 0.0 `P(info="Second length dependence coefficient for short channel body effect" unit="");
- parameter real VNSUBO = 0.0 `P(info="Effective doping bias-dependence parameter" unit="V");
- parameter real NSLPO = 0.05 `P(info="Effective doping bias-dependence parameter" unit="V");
- parameter real DNSUBO = 0.0 `P(info="Effective doping bias-dependence parameter" unit="V^-1");
- parameter real DPHIBO = 0.0 `P(info="Geometry independent offset of PHIB" unit="V");
- parameter real DPHIBL = 0.0 `P(info="Length dependence offset of PHIB" unit="V");
- parameter real DPHIBLEXP= 1.0 `P(info="Exponent for length dependence of offset of PHIB" unit="");
- parameter real DPHIBW = 0.0 `P(info="Width dependence of offset of PHIB" unit="");
- parameter real DPHIBLW = 0.0 `P(info="Area dependence of offset of PHIB" unit="");
- parameter real NPO = 1e26 `P(info="Geometry-independent gate poly-silicon doping" unit="m^-3");
- parameter real NPL = 0.0 `P(info="Length dependence of gate poly-silicon doping" unit="");
- parameter real CTO = 0.0 `P(info="Geometry-independent interface states factor" unit="");
- parameter real CTL = 0.0 `P(info="Length dependence of interface states factor" unit="");
- parameter real CTLEXP = 1.0 `P(info="Exponent for length dependence of interface states factor" unit="");
- parameter real CTW = 0.0 `P(info="Width dependence of interface states factor" unit="");
- parameter real CTLW = 0.0 `P(info="Area dependence of interface states factor" unit="");
- parameter real TOXOVO = 2e-9 `from( 1e-10,inf ) `P(info="Overlap oxide thickness" unit="m");
- parameter real TOXOVDO = 2e-9 `from( 1e-10,inf ) `P(info="Overlap oxide thickness for drain side" unit="m");
- parameter real LOV = 0 `from( 0.0,inf ) `P(info="Overlap length for gate/drain and gate/source overlap capacitance" unit="m");
- parameter real LOVD = 0 `from( 0.0,inf ) `P(info="Overlap length for gate/drain overlap capacitance" unit="m");
- parameter real NOVO = 5e25 `P(info="Effective doping of overlap region" unit="m^-3");
- parameter real NOVDO = 5e25 `P(info="Effective doping of overlap region for drain side" unit="m^-3");
-
- // DIBL Parameters
- parameter real CFL = 0.0 `P(info="Length dependence of DIBL-parameter" unit="");
- parameter real CFLEXP = 2.0 `P(info="Exponent for length dependence of CF" unit="");
- parameter real CFW = 0.0 `P(info="Width dependence of CF" unit="");
- parameter real CFBO = 0.0 `P(info="Back-bias dependence of CF" unit="V^-1");
-
- // Mobility Parameters
- parameter real UO = 5e-2 `P(info="Zero-field mobility at TR" unit="m^2/V/s");
- parameter real FBET1 = 0.0 `P(info="Relative mobility decrease due to first lateral profile" unit="");
- parameter real FBET1W = 0.0 `P(info="Width dependence of relative mobility decrease due to first lateral profile" unit="");
- parameter real LP1 = 1e-8 `from( 1e-10,inf ) `P(info="Mobility-related characteristic length of first lateral profile" unit="m");
- parameter real LP1W = 0.0 `P(info="Width dependence of mobility-related characteristic length of first lateral profile" unit="");
- parameter real FBET2 = 0.0 `P(info="Relative mobility decrease due to second lateral profile" unit="");
- parameter real LP2 = 1e-8 `from( 1e-10,inf ) `P(info="Mobility-related characteristic length of second lateral profile" unit="m");
- parameter real BETW1 = 0.0 `P(info="First higher-order width scaling coefficient of BETN" unit="");
- parameter real BETW2 = 0.0 `P(info="Second higher-order width scaling coefficient of BETN" unit="");
- parameter real WBET = 1e-9 `from( 1e-10,inf ) `P(info="Characteristic width for width scaling of BETN" unit="m");
- parameter real STBETO = 1.0 `P(info="Geometry independent temperature dependence of BETN" unit="");
- parameter real STBETL = 0.0 `P(info="Length dependence of temperature dependence of BETN" unit="");
- parameter real STBETW = 0.0 `P(info="Width dependence of temperature dependence of BETN" unit="");
- parameter real STBETLW = 0.0 `P(info="Area dependence of temperature dependence of BETN" unit="");
- parameter real MUEO = 0.5 `P(info="Geometry independent mobility reduction coefficient at TR" unit="m/V");
- parameter real MUEW = 0.0 `P(info="Width dependence of mobility reduction coefficient at TR" unit="");
- parameter real STMUEO = 0.0 `P(info="Temperature dependence of MUE" unit="");
- parameter real THEMUO = 1.5 `P(info="Mobility reduction exponent at TR" unit="");
- parameter real STTHEMUO = 1.5 `P(info="Temperature dependence of THEMU" unit="");
- parameter real CSO = 0.0 `P(info="Geometry independent coulomb scattering parameter at TR" unit="");
- parameter real CSL = 0.0 `P(info="Length dependence of CS" unit="");
- parameter real CSLEXP = 0.0 `P(info="Exponent for length dependence of CS" unit="");
- parameter real CSW = 0.0 `P(info="Width dependence of CS" unit="");
- parameter real CSLW = 0.0 `P(info="Area dependence of CS" unit="");
- parameter real STCSO = 0.0 `P(info="Temperature dependence of CS" unit="");
- parameter real XCORO = 0.0 `P(info="Geometry independent non-universality parameter" unit="V^-1");
- parameter real XCORL = 0.0 `P(info="Length dependence of non-universality parameter" unit="");
- parameter real XCORW = 0.0 `P(info="Width dependence of non-universality parameter" unit="");
- parameter real XCORLW = 0.0 `P(info="Area dependence of non-universality parameter" unit="");
- parameter real STXCORO = 0.0 `P(info="Temperature dependence of XCOR" unit="");
- parameter real FETAO = 1.0 `P(info="Effective field parameter" unit="");
-
- // Series Resistance
- parameter real RSW1 = 2.5e3 `P(info="Source/drain series resistance for 1 um wide channel at TR" unit="Ohm");
- parameter real RSW2 = 0.0 `P(info="Higher-order width scaling of RS" unit="");
- parameter real STRSO = 1.0 `P(info="Temperature dependence of RS" unit="");
- parameter real RSBO = 0.0 `P(info="Back-bias dependence of series resistance" unit="V^-1");
- parameter real RSGO = 0.0 `P(info="Gate-bias dependence of series resistance" unit="V^-1");
-
- // Velocity Saturation
- parameter real THESATO = 0.0 `P(info="Geometry independent velocity saturation parameter at TR" unit="V^-1");
- parameter real THESATL = 0.05 `P(info="Length dependence of THESAT" unit="V^-1");
- parameter real THESATLEXP= 1.0 `P(info="Exponent for length dependence of THESAT" unit="");
- parameter real THESATW = 0.0 `P(info="Width dependence of velocity saturation parameter" unit="");
- parameter real THESATLW = 0.0 `P(info="Area dependence of velocity saturation parameter" unit="");
- parameter real STTHESATO= 1.0 `P(info="Geometry independent temperature dependence of THESAT" unit="");
- parameter real STTHESATL= 0.0 `P(info="Length dependence of temperature dependence of THESAT" unit="");
- parameter real STTHESATW= 0.0 `P(info="Width dependence of temperature dependence of THESAT" unit="");
- parameter real STTHESATLW= 0.0 `P(info="Area dependence of temperature dependence of THESAT" unit="");
- parameter real THESATBO = 0.0 `P(info="Back-bias dependence of velocity saturation" unit="V^-1");
- parameter real THESATGO = 0.0 `P(info="Gate-bias dependence of velocity saturation" unit="V^-1");
-
- // Saturation Voltage
- parameter real AXO = 18 `P(info="Geometry independent linear/saturation transition factor" unit="");
- parameter real AXL = 0.4 `from( 0.0,inf ) `P(info="Length dependence of AX" unit="");
-
- // Channel Length Modulation
- parameter real ALPL = 5e-4 `P(info="Length dependence of ALP" unit="");
- parameter real ALPLEXP = 1.0 `P(info="Exponent for length dependence of ALP" unit="");
- parameter real ALPW = 0.0 `P(info="Width dependence of ALP" unit="");
- parameter real ALP1L1 = 0.0 `P(info="Length dependence of CLM enhancement factor above threshold" unit="V");
- parameter real ALP1LEXP = 0.5 `P(info="Exponent for length dependence of ALP1" unit="");
- parameter real ALP1L2 = 0.0 `from( 0.0,inf ) `P(info="Second_order length dependence of ALP1" unit="");
- parameter real ALP1W = 0.0 `P(info="Width dependence of ALP1" unit="");
- parameter real ALP2L1 = 0.0 `P(info="Length dependence of CLM enhancement factor below threshold" unit="V^-1");
- parameter real ALP2LEXP = 0.5 `P(info="Exponent for length dependence of ALP2" unit="");
- parameter real ALP2L2 = 0.0 `from( 0.0,inf ) `P(info="Second_order length dependence of ALP2" unit="");
- parameter real ALP2W = 0.0 `P(info="Width dependence of ALP2" unit="");
- parameter real VPO = 0.05 `P(info="CLM logarithmic dependence parameter" unit="V");
-
- // Weak-avalanche parameters
- parameter real A1O = 1.0 `P(info="Geometry independent impact-ionization pre-factor" unit="");
- parameter real A1L = 0.0 `P(info="Length dependence of A1" unit="");
- parameter real A1W = 0.0 `P(info="Width dependence of A1" unit="");
- parameter real A2O = 10 `P(info="Impact-ionization exponent at TR" unit="V");
- parameter real STA2O = 0.0 `P(info="Temperature dependence of A2" unit="V");
- parameter real A3O = 1.0 `P(info="Geometry independent saturation-voltage dependence of II" unit="");
- parameter real A3L = 0.0 `P(info="Length dependence of A3" unit="");
- parameter real A3W = 0.0 `P(info="Width dependence of A3" unit="");
- parameter real A4O = 0.0 `P(info="Geometry independent back-bias dependence of II" unit="V^-0.5");
- parameter real A4L = 0.0 `P(info="Length dependence of A4" unit="");
- parameter real A4W = 0.0 `P(info="Width dependence of A4" unit="");
-
- // Gate current parameters
- parameter real GCOO = 0.0 `P(info="Gate tunnelling energy adjustment" unit="");
- parameter real IGINVLW = 0.0 `P(info="Gate channel current pre-factor for 1 um^2 channel area" unit="A");
- parameter real IGOVW = 0.0 `P(info="Gate overlap current pre-factor for 1 um wide channel" unit="A");
- parameter real IGOVDW = 0.0 `P(info="Gate overlap current pre-factor for 1 um wide channel for drain side" unit="A");
- parameter real STIGO = 2.0 `P(info="Temperature dependence of IGINV and IGOV" unit="");
- parameter real GC2O = 0.375 `P(info="Gate current slope factor" unit="");
- parameter real GC3O = 0.063 `P(info="Gate current curvature factor" unit="");
- parameter real CHIBO = 3.1 `P(info="Tunnelling barrier height" unit="V");
-
- // Gate-induced drain leakage parameters
- parameter real AGIDLW = 0.0 `P(info="Width dependence of GIDL pre-factor" unit="A/V^3");
- parameter real AGIDLDW = 0.0 `P(info="Width dependence of GIDL pre-factor for drain side" unit="A/V^3");
- parameter real BGIDLO = 41 `P(info="GIDL probability factor at TR" unit="V");
- parameter real BGIDLDO = 41 `P(info="GIDL probability factor at TR for drain side" unit="V");
- parameter real STBGIDLO = 0.0 `P(info="Temperature dependence of BGIDL" unit="V/K");
- parameter real STBGIDLDO= 0.0 `P(info="Temperature dependence of BGIDL for drain side" unit="V/K");
- parameter real CGIDLO = 0.0 `P(info="Back-bias dependence of GIDL" unit="");
- parameter real CGIDLDO = 0.0 `P(info="Back-bias dependence of GIDL for drain side" unit="");
-
- // Charge Model Parameters
- parameter real CGBOVL = 0.0 `P(info="Oxide capacitance for gate-bulk overlap for 1 um long channel" unit="F");
- parameter real CFRW = 0.0 `P(info="Outer fringe capacitance for 1 um wide channel" unit="F");
- parameter real CFRDW = 0.0 `P(info="Outer fringe capacitance for 1 um wide channel for drain side" unit="F");
-
- // Noise Model Parameters
- parameter real FNTO = 1.0 `P(info="Thermal noise coefficient" unit="");
- parameter real FNTEXCL = 0.0 `from( 0.0,inf ) `P(info="Length dependence coefficient of excess noise" unit="");
- parameter real NFALW = 8e22 `P(info="First coefficient of flicker noise for 1 um^2 channel area" unit="V^-1/m^4");
- parameter real NFBLW = 3e7 `P(info="Second coefficient of flicker noise for 1 um^2 channel area" unit="V^-1/m^2");
- parameter real NFCLW = 0.0 `P(info="Third coefficient of flicker noise for 1 um^2 channel area" unit="V^-1");
- parameter real EFO = 1.0 `P(info="Flicker noise frequency exponent" unit="");
- parameter real LINTNOI = 0.0 `P(info="Length offset for flicker noise" unit="m");
- parameter real ALPNOI = 2.0 `P(info="Exponent for length offset for flicker noise" unit="");
-
- // Other Parameters
- parameter real DTA = 0 `P(info="Temperature offset w.r.t. ambient circuit temperature" unit="K");
-
- // Well proximity effect Parameters
- parameter real KVTHOWEO = 0 `P(info="Geometrical independent threshold shift parameter" unit="");
- parameter real KVTHOWEL = 0 `P(info="Length dependent threshold shift parameter" unit="");
- parameter real KVTHOWEW = 0 `P(info="Width dependent threshold shift parameter" unit="");
- parameter real KVTHOWELW= 0 `P(info="Area dependent threshold shift parameter" unit="");
- parameter real KUOWEO = 0 `P(info="Geometrical independent mobility degradation factor" unit="");
- parameter real KUOWEL = 0 `P(info="Length dependent mobility degradation factor" unit="");
- parameter real KUOWEW = 0 `P(info="Width dependent mobility degradation factor" unit="");
- parameter real KUOWELW = 0 `P(info="Area dependent mobility degradation factor" unit="");
-`endif // Binning
-`ifdef NQSmodel
- parameter real SWNQS = 0.0 `from( 0.0,9.0 ) `P(info="Flag for NQS, 0=off, 1, 2, 3, 5, or 9=number of collocation points" unit="");
- parameter real MUNQSO = 1.0 `P(info="Relative mobility for NQS modelling");
-`endif // NQSmodel
-
- // Parasitic resistance parameters
- parameter real RGO = 0.0 `P(info="Gate resistance" unit="Ohm");
- parameter real RBULKO = 0.0 `P(info="Bulk resistance between node BP and BI" unit="Ohm");
- parameter real RWELLO = 0.0 `P(info="Well resistance between node BI and B" unit="Ohm");
- parameter real RJUNSO = 0.0 `P(info="Source-side bulk resistance between node BI and BS" unit="Ohm");
- parameter real RJUNDO = 0.0 `P(info="Drain-side bulk resistance between node BI and BD" unit="Ohm");
- parameter real RINT = 0.0 `from( 0.0,inf ) `P(info="Contact resistance between silicide and ploy" unit="Ohm/Sqr");
- parameter real RVPOLY = 0.0 `from( 0.0,inf ) `P(info="Vertical poly resistance" unit="Ohm/Sqr");
- parameter real RSHG = 0.0 `from( 0.0,inf ) `P(info="Gate electrode diffusion sheet resistance" unit="Ohm/Sqr");
- parameter real DLSIL = 0.0 `P(info="Silicide extension over the physical gate length" unit="m");
-
- // Stress Model Parameters
- parameter real SAREF = 1.0e-6 `from( 1e-9,inf ) `P(info="Reference distance between OD-edge and poly from one side" unit="m");
- parameter real SBREF = 1.0e-6 `from( 1e-9,inf ) `P(info="Reference distance between OD-edge and poly from other side" unit="m");
- parameter real WLOD = 0 `P(info="Width parameter" unit="m");
- parameter real KUO = 0 `P(info="Mobility degradation/enhancement coefficient" unit="m");
- parameter real KVSAT = 0 `from( -1.0,1.0 ) `P(info="Saturation velocity degradation/enhancement coefficient" unit="m");
- parameter real TKUO = 0 `P(info="Temperature dependence of KUO" unit="");
- parameter real LKUO = 0 `P(info="Length dependence of KUO" unit="m^LLODKUO");
- parameter real WKUO = 0 `P(info="Width dependence of KUO" unit="m^WLODKUO");
- parameter real PKUO = 0 `P(info="Cross-term dependence of KUO" unit="m^(LLODKUO+WLODKUO)");
- parameter real LLODKUO = 0 `from( 0.0,inf ) `P(info="Length parameter for UO stress effect" unit="");
- parameter real WLODKUO = 0 `from( 0.0,inf ) `P(info="Width parameter for UO stress effect" unit="");
- parameter real KVTHO = 0 `P(info="Threshold shift parameter" unit="Vm");
- parameter real LKVTHO = 0 `P(info="Length dependence of KVTHO" unit="m^LLODVTH");
- parameter real WKVTHO = 0 `P(info="Width dependence of KVTHO" unit="m^WLODVTH");
- parameter real PKVTHO = 0 `P(info="Cross-term dependence of KVTHO" unit="m^(LLODVTH+WLODVTH)");
- parameter real LLODVTH = 0 `from( 0.0,inf ) `P(info="Length parameter for VTH-stress effect" unit="");
- parameter real WLODVTH = 0 `from( 0.0,inf ) `P(info="Width parameter for VTH-stress effect" unit="");
- parameter real STETAO = 0 `P(info="eta0 shift factor related to VTHO change" unit="m");
- parameter real LODETAO = 1.0 `from( 0.0,inf ) `P(info="eta0 shift modification factor for stress effect" unit="");
-
- // Well proximity effect Parameters
- parameter real SCREF = 1e-6 `from( 0.0,inf ) `P(info="Distance between OD-edge and well edge of a reference device" unit="m");
- parameter real WEB = 0 `P(info="Coefficient for SCB" unit="");
- parameter real WEC = 0 `P(info="Coefficient for SCC" unit="");
-
- // JUNCAP Parameters
- `include "JUNCAP200_parlist.include"
-
- // Instance parameters
- parameter real L = 10e-6 `from( 1e-9,inf ) `P(type="instance" info="Design length" unit="m");
- parameter real W = 10e-6 `from( 1e-9,inf ) `P(type="instance" info="Design width" unit="m");
- parameter real SA = 0.0 `P(type="instance" info="Distance between OD-edge and poly from one side" unit="m");
- parameter real SB = 0.0 `P(type="instance" info="Distance between OD-edge and poly from other side" unit="m");
- parameter real SD = 0.0 `P(type="instance" info="Distance between neighbouring fingers" unit="m");
- parameter real SCA = 0.0 `from( 0.0,inf ) `P(type="instance" info="Integral of the first distribution function for scattered well dopants" unit="");
- parameter real SCB = 0.0 `from( 0.0,inf ) `P(type="instance" info="Integral of the second distribution function for scattered well dopants" unit="");
- parameter real SCC = 0.0 `from( 0.0,inf ) `P(type="instance" info="Integral of the third distribution function for scattered well dopants" unit="");
- parameter real SC = 0.0 `P(type="instance" info="Distance between OD-edge and nearest well edge" unit="m");
- parameter real DELVTO = 0.0 `P(type="instance" info="Threshold voltage shift parameter" unit="V");
- parameter real FACTUO = 1.0 `from( 0.0,inf ) `P(type="instance" info="Zero-field mobility pre-factor" unit="");
- parameter real ABSOURCE = 1E-12 `from(`AB_cliplow,inf) `P(type="instance" info="Bottom area of source junction" unit="m^2");
- parameter real LSSOURCE = 1E-6 `from(`LS_cliplow,inf) `P(type="instance" info="STI-edge length of source junction" unit="m");
- parameter real LGSOURCE = 1E-6 `from(`LG_cliplow,inf) `P(type="instance" info="Gate-edge length of source junction" unit="m");
- parameter real ABDRAIN = 1E-12 `from(`AB_cliplow,inf) `P(type="instance" info="Bottom area of drain junction" unit="m^2");
- parameter real LSDRAIN = 1E-6 `from(`LS_cliplow,inf) `P(type="instance" info="STI-edge length of drain junction" unit="m");
- parameter real LGDRAIN = 1E-6 `from(`LG_cliplow,inf) `P(type="instance" info="Gate-edge length of drain junction" unit="m");
- parameter real AS = 1E-12 `from(`AB_cliplow,inf) `P(type="instance" info="Bottom area of source junction" unit="m^2");
- parameter real PS = 1E-6 `from(`LS_cliplow,inf) `P(type="instance" info="Perimeter of source junction" unit="m");
- parameter real AD = 1E-12 `from(`AB_cliplow,inf) `P(type="instance" info="Bottom area of drain junction" unit="m^2");
- parameter real PD = 1E-6 `from(`LS_cliplow,inf) `P(type="instance" info="Perimeter of drain junction" unit="m");
- parameter real MULT = 1.0 `from( 0.0,inf ) `P(type="instance" info="Number of devices in parallel" unit="");
- parameter real NF = 1.0 `from( 1.0,inf ) `P(type="instance" info="Number of fingers" unit="");
- parameter real NGCON = 1.0 `from( 1.0,2.0 ) `P(type="instance" info="Number of gate contacts" unit="");
- parameter real XGW = 1.0E-7 `P(type="instance" info="Distance from the gate contact to the channel edge" unit="m");
-
- //////////////////////////
- //
- // Variables
- //
- //////////////////////////
-
- // Variables for geometrical scaling rules
- real L_i, W_i, L_f, L_slif, W_f, SA_i, SB_i, SD_i, SC_i;
- real LEN, WEN, iL, iW, delLPS, delWOD, LE, WE, iLE, iWE, Lcv, Wcv, LEcv, WEcv;
-
-`ifdef Binning
- // Auxiliary variables for binning-rules
- real iLEWE, iiLE, iiWE, iiLEWE, iiiLEWE;
- real iLEcv, iiLEcv, iiWEcv, iiLEWEcv, iiiLEWEcv;
- real iLcv, iiLcv, iiWcv, iiLWcv, iiiLWcv;
-`else // Binning
- // Intermediate variables used for geometry-scaling
- real NSUBO_i, WSEG_i, NPCK_i, WSEGP_i, LPCK_i, LOV_i, LOVD_i;
- real LP1_i, LP2_i, WBET_i, AXL_i, ALP1L2_i, ALP2L2_i;
- real NSUB, AA, BB, NSUB0e, NPCKe, LPCKe;
- real FBET1e, LP1e, GPE, GWE, tmpx;
- real Lnoi, Lred;
-`endif // Binning
-
- // List of local parameters
- real VFB, STVFB, TOX, EPSROX, NEFF, VNSUB, NSLP, DNSUB, DPHIB, NP, CT;
- real TOXOV, TOXOVD, NOV, NOVD, CF, CFB;
- real BETN, STBET, MUE, STMUE, THEMU, STTHEMU, CS, STCS, XCOR, STXCOR, FETA;
- real RS, STRS, RSB, RSG;
- real THESAT, STTHESAT, THESATB, THESATG;
- real AX;
- real ALP, ALP1, ALP2, VP;
- real A1, A2, STA2, A3, A4;
- real GCO, IGINV, IGOV, IGOVD, STIG, GC2, GC3, CHIB;
- real AGIDL, BGIDL, STBGIDL, CGIDL;
- real AGIDLD, BGIDLD, CGIDLD, STBGIDLD;
- real COX, CGOV, CGBOV, CGOVD, CFR, CFRD;
- real FNT, NFA, NFB, NFC, EF;
- real FNTEXC;
-`ifdef NQSmodel
- real MUNQS;
-`endif // NQSmodel
- real RG, RBULK, RWELL, RJUNS, RJUND;
-
- real NF_i, invNF;
- real RINT_i, RVPOLY_i, RSHG_i, NGCON_i, XGW_i, XGWE;
-
- // Variables for stress-model
- real SAREF_i, SBREF_i, KVSAT_i, LLODKUO_i, WLODKUO_i, LLODVTH_i, WLODVTH_i, LODETAO_i;
- real Invsa, Invsb, Invsaref, Invsbref, Kstressu0, rhobeta, rhobetaref, Kstressvth0;
- real temp0, temp00, templ, tempw, Lx, Wx;
- real loop, tmpa, tmpb;
-
- // Variables for well proximity effect model
- real SCA_i, SCB_i, SCC_i, SCREF_i, WEB_i, WEC_i, KVTHOWE, KUOWE;
-`endif // LocalModel
-
-real ABS_i, LSS_i, LGS_i, ABD_i, LSD_i, LGD_i;
-
-// Variables used in electrical equations
-real FACTUO_i, DELVTO_i, VFB_i, STVFB_i, TOX_i, EPSROX_i, NEFF_i, VNSUB_i, NSLP_i, DNSUB_i, NP_i, QMC_i, CT_i, TOXOV_i, TOXOVD_i, NOV_i, NOVD_i;
-real CF_i, CFB_i, DPHIB_i;
-real BETN_i, STBET_i, MUE_i, STMUE_i, THEMU_i, STTHEMU_i, CS_i, STCS_i, XCOR_i, STXCOR_i, FETA_i;
-real RS_i, THER_i, STRS_i, RSB_i, RSG_i;
-real THESAT_i, STTHESAT_i, THESATB_i, THESATG_i;
-real AX_i, ALP_i, ALP1_i, ALP2_i, VP_i;
-real A1_i, A2_i, STA2_i, A3_i, A4_i;
-real GCO_i, IGINV_i, IGOV_i, IGOVD_i, STIG_i, GC2_i, GC3_i, CHIB_i;
-real AGIDL_i, BGIDL_i, STBGIDL_i, CGIDL_i;
-real AGIDLD_i, BGIDLD_i, STBGIDLD_i, CGIDLD_i;
-real COX_i, CGOV_i, CGOVD_i, CGBOV_i, CFR_i, CFRD_i;
-real FNT_i, NFA_i, NFB_i, NFC_i, EF_i;
-real FNTEXC_i;
-real TR_i, MULT_i;
-real vth_i, vts_i;
-
-real temp, temp1, temp2, tempM;
-real help;
-real jwcorr;
-
-real TKR, TKD, TKD_sq, dT, rT, rTn;
-real EPSOX, EPSSI;
-real BET_i, phit, inv_phit, Eg, phibFac, CoxPrime, tox_sq;
-real delVg, CoxovPrime, GOV, GOV2;
-real np, kp, qq, qb0, dphibq, qlim2;
-real E_eff0, eta_mu, BCH, BOV, inv_CHIB, GCQ, Dch, Dov;
-real tf_bet, tf_mue, tf_cs, tf_xcor, tf_ther, tf_thesat, tf_ig;
-real xi_ov, inv_xi_ov, x_mrg_ov, x1, inv_xg1, Vdsat_lim;
-real nt, Cox_over_q;
-
-real CoxovPrime_d, GOV_s, GOV_d, GOV2_s, GOV2_d;
-real BOV_d, xi_ov_s, xi_ov_d, inv_xi_ov_s, inv_xi_ov_d, x_mrg_ov_s, x_mrg_ov_d, inv_xg1_s, inv_xg1_d;
-real AGIDLs, AGIDLDs, BGIDLs, BGIDLDs, BGIDL_T, BGIDLD_T;
-
-real phib, sqrt_phib, phix, aphi, bphi, phix1, phix2, G_0, phit1, inv_phit1, alpha_b;
-real inv_VP, inv_AX, Sfl_prefac;
-
-real Vgs, Vds, Vsb, Vsbstar;
-real Vgb, Vgb1, Vgbstar, Vdb, Vdsx, Vsbx;
-
-real VgsPrime, VgdPrime, VsbPrime, VdbPrime;
-
-real Dnsub;
-real Igidl, Igisl, Vtovd, Vtovs;
-real x_s, sqm, alpha1, phi_inf, za, rhob;
-real thesat1, wsat, ysat, zsat, r1, r2, dL, GdL, dL1, GR, QCLM;
-real xgm, Voxm, qim1_1, xgs_ov, xgd_ov;
-real Ux;
-real mutau, nu, xn_s, delta_ns;
-real Gf, Gf2, inv_Gf2, xi, inv_xi, margin;
-real qeff;
-
-real SP_xg1, SP_S_temp,SP_S_temp1,SP_S_temp2;
-real SP_S_yg, SP_S_ysub, SP_S_y0, SP_S_a, SP_S_b, SP_S_c;
-real SP_S_bx, SP_S_tau, SP_S_eta, SP_S_delta0, SP_S_delta1;
-real SP_S_pC, SP_S_qC, SP_S_A_fac;
-real SP_S_x1, SP_S_w, SP_S_xbar, SP_S_x0;
-real SP_S_xi0, SP_S_xi1, SP_S_xi2;
-real SP_OV_yg, SP_OV_z, SP_OV_eta, SP_OV_a, SP_OV_c;
-real SP_OV_tau, SP_OV_D0, SP_OV_y0, SP_OV_xi, SP_OV_temp;
-real SP_OV_p, SP_OV_q, SP_OV_w, SP_OV_Afac, SP_OV_xbar;
-real SP_OV_x0, SP_OV_u;
-
-real x_d, x_m, x_ds, Rxcor, delta_1s, xi0s, xi1s, xi2s, xi0d;
-real Es, Em, Ed, Ds, Dm, Dd, Ps, xgs, qis, qbs, qbm, Eeffm, Vm;
-real Phi_0, Phi_2, asat, Phi_0_2, Phi0_Phi2;
-real Vdsat, xn_d, k_ds, Udse;
-real Mutmp, Phi_sat, delta_nd;
-real pC, qC, Pm;
-real d0, D_bar, km, x_pm, xi_pd, p_pd, u_pd, q_pd;
-real xs_ov, xd_ov, Vovs, Vovd, psi_t;
-real zg, delVsat, TP, Dsi, Dgate, u0, u0_div_H, x, xsq, inv_x, ex, inv_ex, Ag, Bg, Sg;
-real Fj, Fj2;
-real N1, Nm1, Delta_N1, Sfl;
-real t1, t2, sqt2, r, lc, lcinv2, g_ideal, CGeff, mid, mig, migid, c_igid, sqid, sqig;
-real H0;
-
-// excess noise variables
-real fac_exc, temp2_exc, wsat_exc, temp_exc, thesat1_exc, zsat_exc, Gvsat_exc, gfac, Sidexc;
-
-real shot_igs, shot_igd, shot_iavl;
-real shot_igcsx, shot_igcdx, shot_igsov, shot_igdov;
-
-real Igc0, igc, igcd_h;
-real Igc, Igb;
-real QI, QD, QB, QG, Qg, Qd, Qb, Qs, Qgs_ov, Qgd_ov;
-real Qfgs, Qfgd, Qgb_ov;
-
-real arg1, arg2max, arg2mina;
-
-real RG_i, RBULK_i, RWELL_i, RJUNS_i, RJUND_i;
-real ggate, gbulk, gwell, gjund, gjuns, nt0;
-real rgatenoise, rbulknoise, rwellnoise, rjundnoise, rjunsnoise;
-
-integer CHNL_TYPE;
-
-`ifdef NQSmodel
- // Variables used in NQS-calculations
- real SWNQS_i, MUNQS_i;
- real Qp1_0, Qp2_0, Qp3_0, Qp4_0, Qp5_0, Qp6_0, Qp7_0, Qp8_0, Qp9_0;
- real fk1, fk2, fk3, fk4, fk5, fk6, fk7, fk8, fk9;
-
- real phi_p1, phi_p2, phi_p3;
- real phi_p4, phi_p5, phi_p6;
- real phi_p7, phi_p8, phi_p9;
-
- real Qp1, Qp2, Qp3;
- real Qp4, Qp5, Qp6;
- real Qp7, Qp8, Qp9;
- real Qp0, QpN;
-
- real QG_NQS, QS_NQS, QD_NQS;
- real pd, Gp, Gp2, a_factrp, marginp, x_sp, x_dp;
-
- real dfQi, fQi, dQis, dQis_1, d2Qis, dQbs, dQy, d2Qy, dpsy2;
- real ym, inorm, Tnorm, Qb_tmp, QbSIGN;
- real r_nqs, vnorm, vnorm_inv;
- real NQS_xg1, NQS_yg, NQS_z, NQS_eta, NQS_a, NQS_c, NQS_tau, NQS_D0, NQS_xi, NQS_p;
- real NQS_q, NQS_temp, NQS_A_fac, NQS_xbar, NQS_w, NQS_x0, NQS_u, NQS_y0;
- real xphi, fk0, thesat2, Fvsat;
- real temp3, temp4, temp5, temp6, temp7, temp8, temp9;
-`endif // NQSmodel
-
-// JUNCAP2 variables
-`include "JUNCAP200_varlist1.include"
-`include "JUNCAP200_varlist2.include"
-real jnoisex_s, jnoisex_d;
-real Vjun_s, Vjun_d;
-`ifdef LocalModel
- real JW_i;
-`endif // LocalModel
-
-real ijunbot, ijunsti, ijungat, qjunbot, qjunsti, qjungat;
-real alpha, eta_p, xitsb, FdL, Gmob, Gmob_dL, Gvsat, Gvsatinv, dps, qim, qim1;
-real H, Iimpact, mavl, Ids, Vdse, Igsov, Igdov, Igcs, Igcd, xg, sigVds;
-real COX_qm;
-real ijun_s, ijunbot_s, ijunsti_s, ijungat_s;
-real ijun_d, ijunbot_d, ijunsti_d, ijungat_d;
-real qjun_s, qjunbot_s, qjunsti_s, qjungat_s;
-real qjun_d, qjunbot_d, qjunsti_d, qjungat_d;
-real jnoise_s, jnoise_d;
-real tmpv, vjv;
-real sf;
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Variables for operating point info
-//
-/////////////////////////////////////////////////////////////////////////////
-
-real id_op, is, ig, ib, P_D, facvsb, facvsb0, sig1k;
-
-`OPdef(ctype ,"Flag for channel type" ,"")
-`OPdef(sdint ,"Flag for source-drain interchange" ,"")
-
-`OPdef(ise ,"Total source current" ,"A")
-`OPdef(ige ,"Total gate current" ,"A")
-`OPdef(ide ,"Total drain current" ,"A")
-`OPdef(ibe ,"Total bulk current" ,"A")
-`OPdef(ids ,"Drain current, excl. avalanche, tunnel, GISL, GIDL, and junction currents" ,"A")
-`OPdef(idb ,"Drain to bulk current" ,"A")
-`OPdef(isb ,"Source to bulk current" ,"A")
-`OPdef(igs ,"Gate-source tunneling current" ,"A")
-`OPdef(igd ,"Gate-drain tunneling current" ,"A")
-`OPdef(igb ,"Gate-bulk tunneling current" ,"A")
-`OPdef(igcs ,"Gate-channel tunneling current (source component)" ,"A")
-`OPdef(igcd ,"Gate-channel tunneling current (drain component)" ,"A")
-`OPdef(iavl ,"Substrate current due to weak avelanche" ,"A")
-`OPdef(igisl ,"Gate-induced source leakage current" ,"A")
-`OPdef(igidl ,"Gate-induced drain leakage current" ,"A")
-
-`OPdef(ijs ,"Total source junction current" ,"A")
-`OPdef(ijsbot ,"Source junction current (bottom component)" ,"A")
-`OPdef(ijsgat ,"Source junction current (gate-edge component)" ,"A")
-`OPdef(ijssti ,"Source junction current (STI-edge component)" ,"A")
-`OPdef(ijd ,"Total drain junction current" ,"A")
-`OPdef(ijdbot ,"Drain junction current (bottom component)" ,"A")
-`OPdef(ijdgat ,"Drain junction current (gate-edge component)" ,"A")
-`OPdef(ijdsti ,"Drain junction current (STI-edge component)" ,"A")
-
-`OPdef(vds ,"Drain-source voltage" ,"V")
-`OPdef(vgs ,"Gate-source voltage" ,"V")
-`OPdef(vsb ,"Source-bulk voltage" ,"V")
-`OPdef(vto ,"Zero-bias threshold voltage" ,"V")
-`OPdef(vts ,"Threshold voltage including back bias effects" ,"V")
-`OPdef(vth ,"Threshold voltage including back bias and drain bias effects" ,"V")
-`OPdef(vgt ,"Effective gate drive voltage including back bias and drain bias effects" ,"V")
-`OPdef(vdss ,"Drain saturation voltage at actual bias" ,"V")
-`OPdef(vsat ,"Saturation limit" ,"V")
-
-`OPdef(gm ,"Transconductance" ,"1/Ohm")
-`OPdef(gmb ,"Substrate transconductance" ,"1/Ohm")
-`OPdef(gds ,"Output conductance" ,"1/Ohm")
-`OPdef(gjs ,"Source junction conductance" ,"1/Ohm")
-`OPdef(gjd ,"Drain junction conductance" ,"1/Ohm")
-
-`OPdef(cdd ,"Drain capacitance" ,"F")
-`OPdef(cdg ,"Drain-gate capacitance" ,"F")
-`OPdef(cds ,"Drain-source capacitance" ,"F")
-`OPdef(cdb ,"Drain-bulk capacitance" ,"F")
-`OPdef(cgd ,"Gate-drain capacitance" ,"F")
-`OPdef(cgg ,"Gate capacitance" ,"F")
-`OPdef(cgs ,"Gate-source capacitance" ,"F")
-`OPdef(cgb ,"Gate-bulk capacitance" ,"F")
-`OPdef(csd ,"Source-drain capacitance" ,"F")
-`OPdef(csg ,"Source-gate capacitance" ,"F")
-`OPdef(css ,"Source capacitance" ,"F")
-`OPdef(csb ,"Source-bulk capacitance" ,"F")
-`OPdef(cbd ,"Bulk-drain capacitance" ,"F")
-`OPdef(cbg ,"Bulk-gate capacitance" ,"F")
-`OPdef(cbs ,"Bulk-source capacitance" ,"F")
-`OPdef(cbb ,"Bulk capacitance" ,"F")
-`OPdef(cgsol ,"Total gate-source overlap capacitance" ,"F")
-`OPdef(cgdol ,"Total gate-drain overlap capacitance" ,"F")
-
-`OPdef(cjs ,"Total source junction capacitance" ,"F")
-`OPdef(cjsbot ,"Source junction capacitance (bottom component)" ,"F")
-`OPdef(cjsgat ,"Source junction capacitance (gate-edge component)" ,"F")
-`OPdef(cjssti ,"Source junction capacitance (STI-edge component)" ,"F")
-`OPdef(cjd ,"Total drain junction capacitance" ,"F")
-`OPdef(cjdbot ,"Drain junction capacitance (bottom component)" ,"F")
-`OPdef(cjdgat ,"Drain junction capacitance (gate-edge component)" ,"F")
-`OPdef(cjdsti ,"Drain junction capacitance (STI-edge component)" ,"F")
-
-`OPdef(weff ,"Effective channel width for geometrical models" ,"m")
-`OPdef(leff ,"Effective channel length for geometrical models" ,"m")
-`OPdef(u ,"Transistor gain" ,"")
-`OPdef(rout ,"Small-signal output resistance" ,"Ohm")
-`OPdef(vearly ,"Equivalent Early voltage" ,"V")
-`OPdef(beff ,"Gain factor" ,"A/V^2")
-`OPdef(fug ,"Unity gain frequency at actual bias" ,"Hz")
-`OPdef(rg_op ,"Gate resistance" ,"Ohm")
-
-`OPdef(sfl ,"Flicker noise current spectral density at 1 Hz" ,"A^2/Hz")
-`OPdef(sqrtsff ,"Input-referred RMS white noise voltage spectral density at 1 kHz" ,"V/sqrt(Hz)")
-`OPdef(sqrtsfw ,"Input-referred RMS white noise voltage spectral density" ,"V/sqrt(Hz)")
-`OPdef(sid ,"White noise current spectral density" ,"A^2/Hz")
-`OPdef(sig ,"Induced gate noise current spectral density at 1 Hz" ,"A^2/Hz")
-`OPdef(cigid ,"Imaginary part of correlation coefficient between Sig and Sid" ,"")
-`OPdef(fknee ,"Cross-over frequency above which white noise is dominant" ,"Hz")
-`OPdef(sigs ,"Gate-source current noise spectral density" ,"A^2/Hz")
-`OPdef(sigd ,"Gate-drain current noise spectral density" ,"A^2/Hz")
-`OPdef(siavl ,"Impact ionization current noise spectral density" ,"A^2/Hz")
-`OPdef(ssi ,"Total source junction current noise spectral density" ,"A^2/Hz")
-`OPdef(sdi ,"Total drain junction current noise spectral density" ,"A^2/Hz")
-
-// local parameters after scaling, T-scaling, and clipping
-`OPdef(lp_vfb , "Local parameter VFB after T-scaling and clipping", "V")
-`OPdef(lp_stvfb , "Local parameter STVFB after clipping", "V/K")
-`OPdef(lp_tox , "Local parameter TOX after clipping", "m")
-`OPdef(lp_epsrox , "Local parameter EPSROX after clipping", "")
-`OPdef(lp_neff , "Local parameter NEFF after clipping", "m^-3")
-`OPdef(lp_vnsub , "Local parameter VNSUB after clipping", "V")
-`OPdef(lp_nslp , "Local parameter NSLP after clipping", "V")
-`OPdef(lp_dnsub , "Local parameter DNSUB after clipping", "V^-1")
-`OPdef(lp_dphib , "Local parameter DPHIB after clipping", "V")
-`OPdef(lp_np , "Local parameter NP after clipping", "m^-3")
-`OPdef(lp_ct , "Local parameter CT after clipping", "")
-`OPdef(lp_toxov , "Local parameter TOXOV after clipping", "m")
-`OPdef(lp_toxovd , "Local parameter TOXOVD after clipping", "m")
-`OPdef(lp_nov , "Local parameter NOV after clipping", "m^-3")
-`OPdef(lp_novd , "Local parameter NOVD after clipping", "m^-3")
-`OPdef(lp_cf , "Local parameter CF after clipping", "")
-`OPdef(lp_cfb , "Local parameter CFB after clipping", "V^-1")
-`OPdef(lp_betn , "Local parameter BETN after T-scaling and clipping", "m^2/(V s)")
-`OPdef(lp_stbet , "Local parameter STBET after clipping", "")
-`OPdef(lp_mue , "Local parameter MUE after T-scaling and clipping", "m/V")
-`OPdef(lp_stmue , "Local parameter STMUE after clipping", "")
-`OPdef(lp_themu , "Local parameter THEMU after T-scaling and clipping", "")
-`OPdef(lp_stthemu , "Local parameter STTHEMU after clipping", "")
-`OPdef(lp_cs , "Local parameter CS after T-scaling and clipping", "")
-`OPdef(lp_stcs , "Local parameter STCS after clipping", "")
-`OPdef(lp_xcor , "Local parameter XCOR after T-scaling and clipping", "V^-1")
-`OPdef(lp_stxcor , "Local parameter STXCOR after clipping", "")
-`OPdef(lp_feta , "Local parameter FETA after clipping", "")
-`OPdef(lp_rs , "Local parameter RS after T-scaling and clipping", "Ohm")
-`OPdef(lp_strs , "Local parameter STRS after clipping", "")
-`OPdef(lp_rsb , "Local parameter RSB after clipping", "V^-1")
-`OPdef(lp_rsg , "Local parameter RSG after clipping", "V^-1")
-`OPdef(lp_thesat , "Local parameter THESAT after T-scaling and clipping", "V^-1")
-`OPdef(lp_stthesat , "Local parameter STTHESAT after clipping", "")
-`OPdef(lp_thesatb , "Local parameter THESATB after clipping", "V^-1")
-`OPdef(lp_thesatg , "Local parameter THESATG after clipping", "V^-1")
-`OPdef(lp_ax , "Local parameter AX after clipping", "")
-`OPdef(lp_alp , "Local parameter ALP after clipping", "")
-`OPdef(lp_alp1 , "Local parameter ALP1 after clipping", "V")
-`OPdef(lp_alp2 , "Local parameter ALP2 after clipping", "V^-1")
-`OPdef(lp_vp , "Local parameter VP after clipping", "V")
-`OPdef(lp_a1 , "Local parameter A1 after clipping", "")
-`OPdef(lp_a2 , "Local parameter A2 after T-scaling and clipping", "V")
-`OPdef(lp_sta2 , "Local parameter STA2 after clipping", "")
-`OPdef(lp_a3 , "Local parameter A3 after clipping", "")
-`OPdef(lp_a4 , "Local parameter A4 after clipping", "1/sqrt(V)")
-`OPdef(lp_gco , "Local parameter GCO after clipping", "")
-`OPdef(lp_iginv , "Local parameter IGINV after T-scaling and clipping", "A")
-`OPdef(lp_igov , "Local parameter IGOV after T-scaling and clipping", "A")
-`OPdef(lp_igovd , "Local parameter IGOVD after T-scaling and clipping", "A")
-`OPdef(lp_stig , "Local parameter STIG after clipping", "")
-`OPdef(lp_gc2 , "Local parameter GC2 after clipping", "")
-`OPdef(lp_gc3 , "Local parameter GC3 after clipping", "")
-`OPdef(lp_chib , "Local parameter CHIB after clipping", "V")
-`OPdef(lp_agidl , "Local parameter AGIDL after clipping", "A/V^3")
-`OPdef(lp_agidld , "Local parameter AGIDLD after clipping", "A/V^3")
-`OPdef(lp_bgidl , "Local parameter BGIDL after T-scaling and clipping", "V")
-`OPdef(lp_bgidld , "Local parameter BGIDLD after T-scaling and clipping", "V")
-`OPdef(lp_stbgidl , "Local parameter STBGIDL after clipping", "V/K")
-`OPdef(lp_stbgidld , "Local parameter STBGIDLD after clipping", "V/K")
-`OPdef(lp_cgidl , "Local parameter CGIDL after clipping", "")
-`OPdef(lp_cgidld , "Local parameter CGIDLD after clipping", "")
-`OPdef(lp_cox , "Local parameter COX after clipping", "F")
-`OPdef(lp_cgov , "Local parameter CGOV after clipping", "F")
-`OPdef(lp_cgovd , "Local parameter CGOVD after clipping", "F")
-`OPdef(lp_cgbov , "Local parameter CGBOV after clipping", "F")
-`OPdef(lp_cfr , "Local parameter CFR after clipping", "F")
-`OPdef(lp_cfrd , "Local parameter CFRD after clipping", "F")
-`OPdef(lp_fnt , "Local parameter FNT after clipping", "")
-`OPdef(lp_fntexc , "Local parameter FNTEXC after clipping", "")
-`OPdef(lp_nfa , "Local parameter NFA after clipping", "1/(V m^4)")
-`OPdef(lp_nfb , "Local parameter NFB after clipping", "1/(V m^2)")
-`OPdef(lp_nfc , "Local parameter NFC after clipping", "V^-1")
-`OPdef(lp_ef , "Local parameter EF after clipping", "")
-`OPdef(lp_rg , "Local parameter RG after clipping", "Ohm")
-`OPdef(lp_rbulk , "Local parameter RBULK after clipping", "Ohm")
-`OPdef(lp_rwell , "Local parameter RWELL after clipping", "Ohm")
-`OPdef(lp_rjuns , "Local parameter RJUNS after clipping", "Ohm")
-`OPdef(lp_rjund , "Local parameter RJUND after clipping", "Ohm")
-`OPdef(tk , "Device Temperature", "K")
-`OPdef(cjosbot , "Bottom component of total zero-bias source junction capacitance at device temperature", "F")
-`OPdef(cjossti , "STI-edge component of total zero-bias source junction capacitance at device temperature", "F")
-`OPdef(cjosgat , "Gate-edge component of total zero-bias source junction capacitance at device temperature", "F")
-`OPdef(vbisbot , "Built-in voltage of source-side bottom junction at device temperature", "V")
-`OPdef(vbissti , "Built-in voltage of source-side STI-edge junction at device temperature", "V")
-`OPdef(vbisgat , "Built-in voltage of source-side gate-edge junction at device temperature", "V")
-`OPdef(idsatsbot , "Total source-side bottom junction saturation current", "A")
-`OPdef(idsatssti , "Total source-side STI-edge junction saturation current", "A")
-`OPdef(idsatsgat , "Total source-side gate-edge junction saturation current", "A")
-`OPdef(cjosbotd , "Bottom component of total zero-bias drain junction capacitance at device temperature", "F")
-`OPdef(cjosstid , "STI-edge component of total zero-bias drain junction capacitance at device temperature", "F")
-`OPdef(cjosgatd , "Gate-edge component of total zero-bias drain junction capacitance at device temperature", "F")
-`OPdef(vbisbotd , "Built-in voltage of drain-side bottom junction at device temperature", "V")
-`OPdef(vbisstid , "Built-in voltage of drain-side STI-edge junction at device temperature", "V")
-`OPdef(vbisgatd , "Built-in voltage of drain-side gate-edge junction at device temperature", "V")
-`OPdef(idsatsbotd , "Total drain-side bottom junction saturation current", "A")
-`OPdef(idsatsstid , "Total drain-side STI-edge junction saturation current", "A")
-`OPdef(idsatsgatd , "Total drain-side gate-edge junction saturation current", "A")
-`ifdef NQSmodel
- `OPdef(lp_munqs , "Local parameter MUNQS after clipping", "")
-`endif // NQSmodel
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Analog block with all calculations and contribs
-//
-/////////////////////////////////////////////////////////////////////////////
-
-analog begin
-
- `INITIAL_MODEL
- begin : initial_model
- // Code independent of bias or instance parameters
- // This block needs to be evaluated only once
-
-`ifdef LocalModel
- // Do nothing
-`else // LocalModel
-`ifdef Binning
- // There are no binning parameters that need clipping
-`else // Binning
- // Clipping of global model parameters
- TOX_i = `CLIP_LOW(TOXO, 1e-10);
- TOXOVD_i = `CLIP_LOW(TOXOVDO, 1e-10);
- EPSROX_i = `CLIP_LOW(EPSROXO, 1.0);
- NSUBO_i = `CLIP_LOW(NSUBO, 1e20);
- WSEG_i = `CLIP_LOW(WSEG, 1e-10);
- NPCK_i = `CLIP_LOW(NPCK, 0.0);
- WSEGP_i = `CLIP_LOW(WSEGP, 1e-10);
- LPCK_i = `CLIP_LOW(LPCK, 1e-10);
- TOXOV_i = `CLIP_LOW(TOXOVO, 1e-10);
- LOV_i = `CLIP_LOW(LOV, 0.0);
- LOVD_i = `CLIP_LOW(LOVD, 0.0);
- LP1_i = `CLIP_LOW(LP1, 1e-10);
- LP2_i = `CLIP_LOW(LP2, 1e-10);
- WBET_i = `CLIP_LOW(WBET, 1e-10);
- AXL_i = `CLIP_LOW(AXL, 0.0);
- ALP1L2_i = `CLIP_LOW(ALP1L2, 0.0);
- ALP2L2_i = `CLIP_LOW(ALP2L2, 0.0);
-`endif // Binning
-
- SAREF_i = `CLIP_LOW(SAREF, 1e-9);
- SBREF_i = `CLIP_LOW(SBREF, 1e-9);
- KVSAT_i = `CLIP_BOTH(KVSAT, -1.0, 1.0);
- LLODKUO_i = `CLIP_LOW(LLODKUO, 0.0);
- WLODKUO_i = `CLIP_LOW(WLODKUO, 0.0);
- LLODVTH_i = `CLIP_LOW(LLODVTH, 0.0);
- WLODVTH_i = `CLIP_LOW(WLODVTH, 0.0);
- LODETAO_i = `CLIP_LOW(LODETAO, 0.0);
- SCREF_i = `CLIP_LOW(SCREF, 0.0);
- WEB_i = WEB;
- WEC_i = WEC;
- RINT_i = `CLIP_LOW(RINT, 0.0);
- RVPOLY_i = `CLIP_LOW(RVPOLY, 0.0);
-`endif // LocalModel
-
- // 4.1 Internal parameters (including temperature scaling)
- // (only internal parameters independent on instance parameters
- // are calculated in this section)
- if (`PGIVEN(nmos)) begin
- CHNL_TYPE = `NMOS;
- end else if (`PGIVEN(pmos)) begin
- CHNL_TYPE = `PMOS;
- end else begin
- CHNL_TYPE = (`PGIVEN(TYPE)) ? TYPE : `NMOS;
- end
- //$strobe("CHNL_TYPE %d", CHNL_TYPE);
-
- // Transistor temperature
- TR_i = `CLIP_LOW(TR, -273);
- TKR = `KELVINCONVERSION + TR_i;
- TKD = $temperature + DTA;
- TKD_sq = TKD * TKD;
- dT = TKD - TKR;
- rT = TKD / TKR;
- rTn = TKR / TKD;
- phit = TKD * `KBOL / `QELE;
- inv_phit = 1.0 / phit;
-
- // Local process parameters
- Eg = 1.179 - 9.025e-5 * TKD - 3.05e-7 * TKD_sq;
- phibFac = (1.045 + 4.5e-4 * TKD) * (0.523 + 1.4e-3 * TKD - 1.48e-6 * TKD_sq) * TKD_sq / 9.0E4;
- phibFac = `MAX(phibFac, 1.0E-3);
- EPSSI = `EPSO * `EPSRSI;
-
-`ifdef NQSmodel
- // Round SWNQS to nearest allowed value
- if (SWNQS < 0.5) begin
- SWNQS_i = 0.0;
- end else begin
- if (SWNQS < 1.5) begin
- SWNQS_i = 1.0;
- end else begin
- if (SWNQS < 2.5) begin
- SWNQS_i = 2.0;
- end else begin
- if (SWNQS < 4.0) begin
- SWNQS_i = 3.0;
- end else begin
- if (SWNQS < 7.0) begin
- SWNQS_i = 5.0;
- end else begin
- SWNQS_i = 9.0;
- end
- end
- end
- end
- end
- inorm = 1.0e-12;
- r_nqs = 1.0e+3;
- vnorm = 10.0;
- vnorm_inv = 1.0 / vnorm;
-
-`endif // NQSmodel
-
- nt0 = 4 * `KBOL * TKD; // parameter for white noise of parasitic resistances
-
- // JUNCAP2
- `include "JUNCAP200_InitModel.include"
-
- end // initial_model
-
- `INITIAL_INSTANCE
- begin : initial_instance
- // Code independent of bias, but dependent on instance parameters,
- // (including code dependent on parameters which could IN PRINCIPLE be scaled)
- // This block needs to be evaluated only once for each instance
-
-
- ABSOURCE_i = ABSOURCE;
- LSSOURCE_i = LSSOURCE;
- LGSOURCE_i = LGSOURCE;
- ABDRAIN_i = ABDRAIN;
- LSDRAIN_i = LSDRAIN;
- LGDRAIN_i = LGDRAIN;
- AS_i = AS;
- PS_i = PS;
- AD_i = AD;
- PD_i = PD;
-
-
-`ifdef LocalModel
- JW_i = JW;
-`else // LocalModel
-
- L_i = L;
- W_i = W;
- SA_i = SA;
- SB_i = SB;
- SD_i = SD;
- SC_i = SC;
- XGW_i = XGW;
-
- // Clipping of the instance parameters
- NF_i = `CLIP_LOW(NF, 1.0);
- NF_i = floor(NF_i + 0.5); // round to nearest integer
- invNF = 1.0 / NF_i;
- L_i = `CLIP_LOW(L_i, 1e-9);
- W_i = `CLIP_LOW(W_i * invNF, 1e-9);
- SCA_i = `CLIP_LOW(SCA, 0.0);
- SCB_i = `CLIP_LOW(SCB, 0.0);
- SCC_i = `CLIP_LOW(SCC, 0.0);
- RSHG_i = `CLIP_LOW(RSHG, 0.0);
- NGCON_i = (NGCON < 1.5) ? 1.0 : 2.0;
-
- ///////////////////////////////////////////
- // GEOMETRICAL PARAMETERSCALING
- ///////////////////////////////////////////
-
- // 3.2 Transistor geometry
- LEN = 1e-6;
- WEN = 1e-6;
- iL = LEN / L_i;
- iW = WEN / W_i;
-`ifdef Binning
- delLPS = LVARO * (1.0 + LVARL * iL);
- delWOD = WVARO * (1.0 + WVARW * iW);
-`else // Binning
- delLPS = LVARO * (1.0 + LVARL * iL) * (1.0 + LVARW * iW);
- delWOD = WVARO * (1.0 + WVARL * iL) * (1.0 + WVARW * iW);
-`endif // Binning
- LE = `CLIP_LOW(L_i + delLPS - 2.0 * LAP, 1e-9);
- WE = `CLIP_LOW(W_i + delWOD - 2.0 * WOT, 1e-9);
- LEcv = `CLIP_LOW(L_i + delLPS - 2.0 * LAP + DLQ, 1e-9);
- WEcv = `CLIP_LOW(W_i + delWOD - 2.0 * WOT + DWQ, 1e-9);
- Lcv = `CLIP_LOW(L_i + delLPS + DLQ, 1e-9);
- Wcv = `CLIP_LOW(W_i + delWOD + DWQ, 1e-9);
- iLE = LEN / LE;
- iWE = WEN / WE;
- jwcorr = 0.0;
- ABS_i = 0.0;
- LSS_i = 0.0;
- LGS_i = 0.0;
- ABD_i = 0.0;
- LSD_i = 0.0;
- LGD_i = 0.0;
- if (SWJUNCAP == 3.0) begin
- jwcorr = WE;
- end
- if ((SWJUNCAP == 2.0) || (SWJUNCAP == 3.0)) begin
- ABS_i = AS_i * invNF;
- LSS_i = PS_i * invNF - jwcorr;
- LGS_i = WE;
- ABD_i = AD_i * invNF;
- LSD_i = PD_i * invNF - jwcorr;
- LGD_i = WE;
- end else begin
- ABS_i = ABSOURCE_i * invNF;
- LSS_i = LSSOURCE_i * invNF;
- LGS_i = LGSOURCE_i * invNF;
- ABD_i = ABDRAIN_i * invNF;
- LSD_i = LSDRAIN_i * invNF;
- LGD_i = LGDRAIN_i * invNF;
- end
-
- // Geometry for multi-finger devices
- L_f = `CLIP_LOW(L_i + delLPS, 1e-9);
- L_slif = `CLIP_LOW(L_f + DLSIL, 1e-9);
- W_f = `CLIP_LOW(W_i + delWOD, 1e-9);
- XGWE = `CLIP_LOW(XGW_i - 0.5 * delWOD, 1e-9);
-
-`ifdef Binning
- // 3.3 Geometry scaling with binning scaling rules
- `include "PSP102_binning.include"
-
-`else // Binning
- // 3.2 Geometry scaling with physical scaling rules
-
- // Process parameters
- VFB = VFBO * (1.0 + VFBL * iLE) * (1.0 + VFBW * iWE) * (1.0 + VFBLW * iLE * iWE);
- STVFB = STVFBO * (1.0 + STVFBL * iLE) * (1.0 + STVFBW * iWE) * (1.0 + STVFBLW * iLE * iWE);
- TOX = TOXO;
- EPSROX = EPSROXO;
- NSUB0e = NSUBO_i * `MAX(( 1.0 + NSUBW * iWE * ln( 1.0 + WE / WSEG_i )), 1.0E-03);
- NPCKe = NPCK_i * `MAX(( 1.0 + NPCKW * iWE * ln( 1.0 + WE / WSEGP_i )), 1.0E-03);
- LPCKe = LPCK_i * `MAX(( 1.0 + LPCKW * iWE * ln( 1.0 + WE / WSEGP_i )), 1.0E-03);
- if (LE > (2 * LPCKe)) begin
- AA = 7.5e10;
- BB = sqrt(NSUB0e + 0.5 * NPCKe) - sqrt(NSUB0e);
- NSUB = sqrt(NSUB0e) + AA * ln(1 + 2 * LPCKe / LE * (exp(BB / AA) - 1));
- NSUB = NSUB * NSUB;
- end else begin
- if (LE >= LPCKe) begin
- NSUB = NSUB0e + NPCKe * LPCKe / LE;
- end else begin // LE < LPCK
- NSUB = NSUB0e + NPCKe * (2 - LE / LPCKe);
- end
- end
- NEFF = NSUB * (1 - FOL1 * iLE - FOL2 * iLE * iLE);
- VNSUB = VNSUBO;
- NSLP = NSLPO;
- DNSUB = DNSUBO;
- DPHIB = (DPHIBO + DPHIBL * pow(iLE, DPHIBLEXP)) * (1.0 + DPHIBW * iWE) * (1.0 + DPHIBLW * iLE * iWE);
- NP = NPO * `MAX(1e-6, (1.0 + NPL * iLE));
- CT = (CTO + CTL * pow(iLE, CTLEXP)) * (1.0 + CTW * iWE) * (1.0 + CTLW * iLE * iWE);
- TOXOV = TOXOVO;
- TOXOVD = TOXOVDO;
- NOV = NOVO;
- NOVD = NOVDO;
-
- // DIBL parameters
- CF = CFL * pow(iLE, CFLEXP) * (1.0 + CFW * iWE);
- CFB = CFBO;
-
- // Mobility parameters
- FBET1e = FBET1 * (1.0 + FBET1W * iWE);
- LP1e = LP1_i * `MAX(1.0 + LP1W * iWE, 1.0E-03);
- GPE = 1.0 + FBET1e * LP1e / LE * (1.0 - exp(-LE / LP1e)) + FBET2 * LP2_i / LE * (1.0 - exp(-LE / LP2_i));
- GPE = `MAX(GPE, 1e-15);
- GWE = 1.0 + BETW1 * iWE + BETW2 * iWE * ln(1.0 + WE / WBET_i);
- BETN = UO * WE / (GPE * LE) * GWE;
- STBET = STBETO * (1.0 + STBETL * iLE) * (1.0 + STBETW * iWE) * (1.0 + STBETLW * iLE * iWE);
- MUE = MUEO * (1.0 + MUEW * iWE);
- STMUE = STMUEO;
- THEMU = THEMUO;
- STTHEMU = STTHEMUO;
- CS = (CSO + CSL * pow(iLE, CSLEXP)) * (1.0 + CSW * iWE) * (1.0 + CSLW * iLE * iWE);
- STCS = STCSO;
- XCOR = XCORO * (1.0 + XCORL * iLE) * (1.0 + XCORW * iWE) * (1.0 + XCORLW * iLE * iWE);
- STXCOR = STXCORO;
- FETA = FETAO;
-
- // Series resistance
- RS = RSW1 * iWE * (1.0 + RSW2 * iWE);
- STRS = STRSO;
- RSB = RSBO;
- RSG = RSGO;
-
- // Velocity saturation
- THESAT = (THESATO + THESATL* GWE / GPE * pow(iLE, THESATLEXP)) * (1.0 + THESATW * iWE) * (1.0 + THESATLW * iLE * iWE);
- STTHESAT = STTHESATO * (1.0 + STTHESATL * iLE) * (1.0 + STTHESATW * iWE) * (1.0 + STTHESATLW * iLE * iWE);
- THESATB = THESATBO;
- THESATG = THESATGO;
-
- // Saturation voltage
- AX = AXO / (1.0 + AXL_i * iLE);
-
- // Channel length modulation
- ALP = ALPL * pow(iLE, ALPLEXP) * (1.0 + ALPW * iWE);
- tmpx = pow(iLE, ALP1LEXP);
- ALP1 = ALP1L1 * tmpx * (1.0 + ALP1W * iWE) / (1.0 + ALP1L2_i * iLE * tmpx);
- tmpx = pow(iLE, ALP2LEXP);
- ALP2 = ALP2L1 * tmpx * (1.0 + ALP2W * iWE) / (1.0 + ALP2L2_i * iLE * tmpx);
- VP = VPO;
-
- // Impact ionization
- A1 = A1O * (1.0 + A1L * iLE) * (1.0 + A1W * iWE);
- A2 = A2O;
- STA2 = STA2O;
- A3 = A3O * (1.0 + A3L * iLE) * (1.0 + A3W * iWE);
- A4 = A4O * (1.0 + A4L * iLE) * (1.0 + A4W * iWE);
-
- // Gate current
- GCO = GCOO;
- IGINV = IGINVLW / (iWE * iLE);
- IGOV = IGOVW * LOV_i / (LEN * iWE);
- IGOVD = IGOVDW * LOVD_i / (LEN * iWE);
- STIG = STIGO;
- GC2 = GC2O;
- GC3 = GC3O;
- CHIB = CHIBO;
-
- // GIDL
- AGIDL = AGIDLW * LOV_i / (LEN * iWE);
- AGIDLD = AGIDLDW * LOVD_i / (LEN * iWE);
- BGIDL = BGIDLO;
- BGIDLD = BGIDLDO;
- STBGIDL = STBGIDLO;
- STBGIDLD = STBGIDLDO;
- CGIDL = CGIDLO;
- CGIDLD = CGIDLDO;
-
- // Charge model parameters
- COX = `EPSO * EPSROX_i * WEcv * LEcv / TOX_i;
- CGOV = `EPSO * EPSROX_i * WEcv * LOV_i / TOXOV_i;
- CGOVD = `EPSO * EPSROX_i * WEcv * LOVD_i / TOXOVD_i;
- CGBOV = CGBOVL * Lcv / LEN;
- CFR = CFRW * Wcv / WEN;
- CFRD = CFRDW * Wcv / WEN;
-
- // Noise model parameters
- temp0 = 1.0 - 2.0 * LINTNOI * iLE / LEN;
- Lnoi = `MAX(temp0, 1.0e-3);
- Lred = 1.0 / pow(Lnoi, ALPNOI);
-
- FNT = FNTO;
- FNTEXC = FNTEXCL * BETN * BETN * iWE * iWE;
- NFA = Lred * iWE * iLE * NFALW;
- NFB = Lred * iWE * iLE * NFBLW;
- NFC = Lred * iWE * iLE * NFCLW;
- EF = EFO;
-
- // Well proximity effect parameters
- KVTHOWE = KVTHOWEO + KVTHOWEL * iLE + KVTHOWEW * iWE + KVTHOWELW * iLE * iWE;
- KUOWE = KUOWEO + KUOWEL * iLE + KUOWEW * iWE + KUOWELW * iLE * iWE;
-`endif // Binning
-
- // Parasitic resistance parameters
- RG = RSHG_i * (`oneThird * W_f / NGCON_i + XGWE) / (NGCON_i * L_slif)
- + (RINT_i + RVPOLY_i) / (W_f * L_f) + NF_i * RGO;
- RWELL = NF_i * RWELLO;
- RBULK = NF_i * RBULKO;
- RJUNS = NF_i * RJUNSO;
- RJUND = NF_i * RJUNDO;
-
-`ifdef NQSmodel
- MUNQS = MUNQSO;
-`endif // NQSModel
-
- ///////////////////////////////////////////
- // STRESSMODEL
- ///////////////////////////////////////////
-
- // 3.4 Stress equations
- tmpa = 0.0;
- tmpb = 0.0;
- loop = 0.0;
- if ((SA_i > 0.0) && (SB_i > 0.0) && ((NF_i == 1.0) || ((NF_i > 1.0) && (SD_i > 0.0)))) begin
- // Auxiliary variables
-
- // Note: some verilog-A compilers will (unnecesarily) cause the while-loop
- // below to be executed at every bias step; this has a negative impact on
- // the simulation speed of PSP.
- while (loop < (NF_i - 0.5)) begin
- tmpa = tmpa + 1.0 / (SA_i + 0.5 * L_i + loop * (SD_i + L_i));
- tmpb = tmpb + 1.0 / (SB_i + 0.5 * L_i + loop * (SD_i + L_i));
- loop = loop + 1.0;
- end
- Invsa = tmpa * invNF;
- Invsb = tmpb * invNF;
- Invsaref = 1.0 / (SAREF_i + 0.5 * L_i);
- Invsbref = 1.0 / (SBREF_i + 0.5 * L_i);
- Lx = `MAX(L_i + delLPS, 1e-9);
- Wx = `MAX(W_i + delWOD + WLOD, 1e-9);
- templ = 1.0 / pow(Lx, LLODKUO_i);
- tempw = 1.0 / pow(Wx, WLODKUO_i);
- Kstressu0 = (1.0 + LKUO * templ + WKUO * tempw + PKUO * templ * tempw) * (1.0 + TKUO * (rT - 1.0));
- rhobeta = KUO * (Invsa + Invsb) / Kstressu0;
- rhobetaref = KUO * (Invsaref + Invsbref) / Kstressu0;
- templ = 1.0 / pow(Lx, LLODVTH_i);
- tempw = 1.0 / pow(Wx, WLODVTH_i);
- Kstressvth0= 1.0 + LKVTHO * templ + WKVTHO * tempw + PKVTHO * templ * tempw;
- temp0 = Invsa + Invsb - Invsaref - Invsbref;
-
- // Parameter adaptations
- BETN = BETN * (1.0 + rhobeta) / (1.0 + rhobetaref);
- THESAT = THESAT * (1.0 + rhobeta) * (1.0 + KVSAT_i * rhobetaref) / ((1.0 + rhobetaref) * (1.0 + KVSAT_i * rhobeta));
- VFB = VFB + KVTHO * temp0 / Kstressvth0;
- CF = CF + STETAO * temp0 / pow(Kstressvth0, LODETAO_i);
- end
-
- ///////////////////////////////////////////
- // WELL PROXIMITY EFFECT MODEL
- ///////////////////////////////////////////
-
- // 3.5 Well proximity effect equations
- if ((SCA_i > 0.0) || (SCB_i > 0.0) || (SCC_i > 0.0) || (SC_i > 0.0)) begin
- if ((SCA_i == 0.0) && (SCB_i == 0.0) && (SCC_i == 0.0)) begin
- temp0 = SC_i + W_i;
- temp00 = 1.0 / SCREF_i;
- SCA_i = SCREF_i * SCREF_i / (SC_i * temp0);
- SCB_i = ((0.1 * SC_i + 0.01 * SCREF_i) * exp(-10.0 * SC_i * temp00)
- - (0.1 * temp0 + 0.01 * SCREF_i) * exp(-10.0 * temp0 * temp00)) / W_i;
- SCC_i = ((0.05 * SC_i + 0.0025 * SCREF_i) * exp(-20.0 * SC_i * temp00)
- - (0.05 * temp0 + 0.0025 * SCREF_i) * exp(-20.0 * temp0 * temp00)) / W_i;
- end
-
- // Parameter adaptations
- temp0 = SCA_i + WEB_i * SCB_i + WEC_i * SCC_i;
- VFB = VFB + KVTHOWE * temp0;
- BETN = BETN * (1.0 + KUOWE * temp0);
- end
-
- /////////////////////////////////////////////
- // END OF SCALINGRULES AND STRESS/WPE MODELS
- /////////////////////////////////////////////
-
-`endif // LocalModel
- // 4.1 Internal parameters (including temperature scaling)
-
- // Clipping of the local model parameters
- VFB_i = VFB;
- STVFB_i = STVFB;
- TOX_i = `CLIP_LOW(TOX, 1e-10);
- EPSROX_i = `CLIP_LOW(EPSROX, 1.0);
- NEFF_i = `CLIP_BOTH(NEFF, 1e20, 1e26);
- VNSUB_i = VNSUB;
- NSLP_i = `CLIP_LOW(NSLP, 1e-3);
- DNSUB_i = `CLIP_BOTH(DNSUB, 0.0, 1.0);
- DPHIB_i = DPHIB;
- NP_i = `CLIP_LOW(NP, 0.0);
- QMC_i = `CLIP_LOW(QMC, 0.0);
- CT_i = `CLIP_LOW(CT, 0.0);
- TOXOV_i = `CLIP_LOW(TOXOV, 1e-10);
- TOXOVD_i = `CLIP_LOW(TOXOVD, 1e-10);
- NOV_i = `CLIP_BOTH(NOV, 1e20, 1e27);
- NOVD_i = `CLIP_BOTH(NOVD, 1e20, 1e27);
- CF_i = `CLIP_LOW(CF, 0.0);
- CFB_i = `CLIP_BOTH(CFB, 0.0, 1.0);
- BETN_i = `CLIP_LOW(BETN, 0.0);
- STBET_i = STBET;
- MUE_i = `CLIP_LOW(MUE, 0.0);
- STMUE_i = STMUE;
- THEMU_i = `CLIP_LOW(THEMU, 0.0);
- STTHEMU_i = STTHEMU;
- CS_i = `CLIP_LOW(CS, 0.0);
- STCS_i = STCS;
- XCOR_i = `CLIP_LOW(XCOR, 0.0);
- STXCOR_i = STXCOR;
- FETA_i = `CLIP_LOW(FETA, 0.0);
- RS_i = `CLIP_LOW(RS, 0.0);
- STRS_i = STRS;
- RSB_i = `CLIP_BOTH(RSB, -0.5, 1.0);
- RSG_i = `CLIP_LOW(RSG, -0.5);
- THESAT_i = `CLIP_LOW(THESAT, 0.0);
- STTHESAT_i = STTHESAT;
- THESATB_i = `CLIP_BOTH(THESATB, -0.5, 1.0);
- THESATG_i = `CLIP_LOW(THESATG, -0.5);
- AX_i = `CLIP_LOW(AX, 2.0);
- ALP_i = `CLIP_LOW(ALP, 0.0);
- ALP1_i = `CLIP_LOW(ALP1, 0.0);
- ALP2_i = `CLIP_LOW(ALP2, 0.0);
- VP_i = `CLIP_LOW(VP, 1.0e-10);
- A1_i = `CLIP_LOW(A1, 0.0);
- A2_i = `CLIP_LOW(A2, 0.0);
- STA2_i = STA2;
- A3_i = `CLIP_LOW(A3, 0.0);
- A4_i = `CLIP_LOW(A4, 0.0);
- GCO_i = `CLIP_BOTH(GCO, -10.0, 10.0);
- IGINV_i = `CLIP_LOW(IGINV, 0.0);
- IGOV_i = `CLIP_LOW(IGOV, 0.0);
- IGOVD_i = `CLIP_LOW(IGOVD, 0.0);
- STIG_i = STIG;
- GC2_i = `CLIP_BOTH(GC2, 0.0, 10.0);
- GC3_i = `CLIP_BOTH(GC3, -10.0, 10.0);
- CHIB_i = `CLIP_LOW(CHIB, 1.0);
- AGIDL_i = `CLIP_LOW(AGIDL, 0.0);
- AGIDLD_i = `CLIP_LOW(AGIDLD, 0.0);
- BGIDL_i = `CLIP_LOW(BGIDL, 0.0);
- BGIDLD_i = `CLIP_LOW(BGIDLD, 0.0);
- STBGIDL_i = STBGIDL;
- STBGIDLD_i = STBGIDLD;
- CGIDL_i = CGIDL;
- CGIDLD_i = CGIDLD;
- COX_i = `CLIP_LOW(COX, 0.0);
- CGOV_i = `CLIP_LOW(CGOV, 0.0);
- CGOVD_i = `CLIP_LOW(CGOVD, 0.0);
- CGBOV_i = `CLIP_LOW(CGBOV, 0.0);
- CFR_i = `CLIP_LOW(CFR, 0.0);
- CFRD_i = `CLIP_LOW(CFRD, 0.0);
- FNT_i = `CLIP_LOW(FNT, 0.0);
- FNTEXC_i = `CLIP_LOW(FNTEXC, 0.0);
- NFA_i = `CLIP_LOW(NFA, 0.0);
- NFB_i = `CLIP_LOW(NFB, 0.0);
- NFC_i = `CLIP_LOW(NFC, 0.0);
- EF_i = `CLIP_LOW(EF, 0.0);
- FACTUO_i = `CLIP_LOW(FACTUO, 0.0);
- DELVTO_i = DELVTO;
- // Parasitic resistances
- RG_i = `CLIP_LOW(RG, 1.0e-3);
- RBULK_i = `CLIP_LOW(RBULK, 1.0e-3);
- RJUNS_i = `CLIP_LOW(RJUNS, 1.0e-3);
- RJUND_i = `CLIP_LOW(RJUND, 1.0e-3);
- RWELL_i = `CLIP_LOW(RWELL, 1.0e-3);
-`ifdef LocalModel
- MULT_i = `CLIP_LOW(MULT, 0.0);
-`else // LocalModel
- MULT_i = `CLIP_LOW(MULT * NF_i, 0.0);
-`endif // LocalModel
-`ifdef NQSmodel
- MUNQS_i = `CLIP_LOW(MUNQS, 0.0);
-`endif // NQSmodel
-
- // ignore drain-side values in case of symmetric junctions
- if (SWJUNASYM == 0.0) begin
- TOXOVD_i = TOXOV_i;
- NOVD_i = NOV_i;
- AGIDLD_i = AGIDL_i;
- BGIDLD_i = BGIDL_i;
- STBGIDLD_i = STBGIDL_i;
- CGIDLD_i = CGIDL_i;
- IGOVD_i = IGOV_i;
- CGOVD_i = CGOV_i;
- CFRD_i = CFR_i;
- end
-
-`ifdef LocalModel
- // JUNCAP instance parameters (local model)
- jwcorr = 0.0;
- ABS_i = 0.0;
- LSS_i = 0.0;
- LGS_i = 0.0;
- ABD_i = 0.0;
- LSD_i = 0.0;
- LGD_i = 0.0;
- if (SWJUNCAP == 3.0) begin
- jwcorr = JW_i;
- end
- if ((SWJUNCAP == 2.0) || (SWJUNCAP == 3.0)) begin
- ABS_i = AS_i;
- LSS_i = PS_i - jwcorr;
- LGS_i = JW_i;
- ABD_i = AD_i;
- LSD_i = PD_i - jwcorr;
- LGD_i = JW_i;
- end else begin
- ABS_i = ABSOURCE_i;
- LSS_i = LSSOURCE_i;
- LGS_i = LGSOURCE_i;
- ABD_i = ABDRAIN_i;
- LSD_i = LSDRAIN_i;
- LGD_i = LGDRAIN_i;
- end
-`endif // LocalModel
- if ((SWJUNCAP == 1.0) || (SWJUNCAP == 2.0) || (SWJUNCAP == 3.0)) begin
- ABSOURCE_i = `CLIP_LOW(ABS_i, `AB_cliplow);
- LSSOURCE_i = `CLIP_LOW(LSS_i, `LS_cliplow);
- LGSOURCE_i = `CLIP_LOW(LGS_i, `LG_cliplow);
- ABDRAIN_i = `CLIP_LOW(ABD_i, `AB_cliplow);
- LSDRAIN_i = `CLIP_LOW(LSD_i, `LS_cliplow);
- LGDRAIN_i = `CLIP_LOW(LGD_i, `LG_cliplow);
- end else begin
- ABSOURCE_i = 0.0;
- LSSOURCE_i = 0.0;
- LGSOURCE_i = 0.0;
- ABDRAIN_i = 0.0;
- LSDRAIN_i = 0.0;
- LGDRAIN_i = 0.0;
- end
-
- // Local process parameters
- EPSOX = `EPSO * EPSROX_i;
- phit1 = phit * (1.0 + CT_i * rTn);
- inv_phit1 = 1.0 / phit1;
-
- VFB_i = VFB_i + STVFB_i * dT + DELVTO_i;
- phib = Eg + DPHIB_i + 2.0 * phit * ln(NEFF_i * pow(phibFac, -0.75) * 4.0e-26);
- phib = `MAX(phib, 5.0E-2);
- CoxPrime = EPSOX / TOX_i;
- tox_sq = TOX_i * TOX_i;
- G_0 = sqrt(2.0 * `QELE * NEFF_i * EPSSI * inv_phit) / CoxPrime;
-
- // Poly-silicon depletion
- kp = 0.0;
- if (NP_i > 0.0) begin
- arg2max = 8.0e7 / tox_sq;
- np = `MAX(NP_i, arg2max);
- np = `MAX(5.0e24, np);
- kp = 2.0 * CoxPrime * CoxPrime * phit / (`QELE * np * EPSSI);
- end
-
- // QM corrections
- qlim2 = 100.0 * phit * phit;
- qq = 0.0;
- if (QMC_i > 0.0) begin
- qq = 0.4 * `QMN * QMC_i * pow(CoxPrime, `twoThirds);
- if (CHNL_TYPE==`PMOS) begin
- qq = `QMP / `QMN * qq;
- end
- qb0 = sqrt(phit * G_0 * G_0 * phib);
- dphibq = 0.75 * qq * pow(qb0, `twoThirds);
- phib = phib + dphibq;
- G_0 = G_0 * (1.0 + 2.0 * `twoThirds * dphibq / qb0);
- end
- sqrt_phib = sqrt(phib);
- phix = 0.95 * phib;
- aphi = 0.0025 * phib * phib;
- bphi = aphi;
- phix2 = 0.5 * sqrt(bphi);
- phix1 = `MINA(phix - phix2, 0, aphi);
-
- // Gate overlap
- CoxovPrime = EPSOX / TOXOV_i;
- CoxovPrime_d = EPSOX / TOXOVD_i;
- GOV_s = sqrt(2.0 * `QELE * NOV_i * EPSSI * inv_phit) / CoxovPrime;
- GOV_d = sqrt(2.0 * `QELE * NOVD_i * EPSSI * inv_phit) / CoxovPrime_d;
- GOV2_s = GOV_s * GOV_s;
- GOV2_d = GOV_d * GOV_d;
- xi_ov_s = 1.0 + GOV_s * `invSqrt2;
- xi_ov_d = 1.0 + GOV_d * `invSqrt2;
- inv_xi_ov_s = 1.0 / xi_ov_s;
- inv_xi_ov_d = 1.0 / xi_ov_d;
- x_mrg_ov_s = 1.0e-5 * xi_ov_s;
- x_mrg_ov_d = 1.0e-5 * xi_ov_d;
-
- // Mobility parameters
- tf_bet = pow(rTn, STBET_i);
- BET_i = FACTUO_i * BETN_i * CoxPrime * tf_bet;
- BETN_i = BETN_i * tf_bet;
- THEMU_i = THEMU_i * pow(rTn, STTHEMU_i);
- tf_mue = pow(rTn, STMUE_i);
- MUE_i = MUE_i * tf_mue;
- tf_cs = pow(rTn, STCS_i);
- CS_i = CS_i * tf_cs;
- tf_xcor = pow(rTn, STXCOR_i);
- XCOR_i = XCOR_i * tf_xcor;
- E_eff0 = 1.0e-8 * CoxPrime / EPSSI;
- eta_mu = 0.5 * FETA_i;
- if (CHNL_TYPE == `PMOS) begin
- eta_mu = `oneThird * FETA_i;
- end
-
- // Series resistance
- tf_ther = pow(rTn, STRS_i);
- RS_i = RS_i * tf_ther;
- THER_i = 2 * BET_i * RS_i;
-
- // Velocity saturation
- tf_thesat = pow(rTn, STTHESAT_i);
- THESAT_i = THESAT_i * tf_thesat;
- Vdsat_lim = 3.912023005 * phit1;
-
- inv_AX = 1.0 / AX_i;
- inv_VP = 1.0 / VP_i;
-
- // Impact ionization
- A2_i = A2_i * pow(rT, STA2_i);
-
- // Gate current
- tf_ig = pow(rT, STIG_i);
- IGINV_i = IGINV_i * tf_ig;
- IGOV_i = IGOV_i * tf_ig;
- IGOVD_i = IGOVD_i * tf_ig;
- inv_CHIB = 1.0 / CHIB_i;
- tempM = 4.0 * `oneThird * sqrt(2 * `QELE * `MELE * CHIB_i) / `HBAR;
- BCH = tempM * TOX_i;
- BOV = tempM * TOXOV_i;
- BOV_d = tempM * TOXOVD_i;
- GCQ = 0;
- if (GC3_i < 0) begin
- GCQ = -0.495 * GC2_i / GC3_i;
- end
- alpha_b = 0.5 * (phib + Eg);
- Dch = GCO_i * phit1;
- Dov = GCO_i * phit;
-
- // GIDL
- AGIDLs = AGIDL_i * 4e-18 / (TOXOV_i * TOXOV_i);
- AGIDLDs = AGIDLD_i * 4e-18 / (TOXOVD_i * TOXOVD_i);
- tempM = `MAX(1.0 + STBGIDL_i * dT, 0);
- BGIDL_T = BGIDL_i * tempM;
- BGIDLs = BGIDL_T * TOXOV_i * 5e8;
- tempM = `MAX(1.0 + STBGIDLD_i * dT, 0);
- BGIDLD_T = BGIDLD_i * tempM;
- BGIDLDs = BGIDLD_T * TOXOVD_i * 5e8;
-
- // Noise
- nt = FNT_i * 4 * `KBOL * TKD;
- Cox_over_q = CoxPrime / `QELE;
- Sfl_prefac = phit * phit * BET_i / Cox_over_q;
- fac_exc = `MELE * 1e9 * FNTEXC_i;
-
- // Additional internal parameters
- x1 = 1.25;
- inv_xg1_s = 1.0 / (x1 + GOV_s * 7.324648775608221e-1); // = 1.0/(x1+GOV*sqrt(exp(-x1)+x1-1));
- inv_xg1_d = 1.0 / (x1 + GOV_d * 7.324648775608221e-1);
-
- // Conductance of parasitic resistance
- if (RG_i > 0.0) begin
- ggate = 1.0 / RG_i;
- end else begin
- ggate = 0.0;
- end
- if (RBULK_i > 0.0) begin
- gbulk = 1.0 / RBULK_i;
- end else begin
- gbulk = 0.0;
- end
- if (RJUNS_i > 0.0) begin
- gjuns = 1.0 / RJUNS_i;
- end else begin
- gjuns = 0.0;
- end
- if (RJUND_i > 0.0) begin
- gjund = 1.0 / RJUND_i;
- end else begin
- gjund = 0.0;
- end
- if (RWELL_i > 0.0) begin
- gwell = 1.0 / RWELL_i;
- end else begin
- gwell = 0.0;
- end
-
-
- // JUNCAP2
-
- // Initialization of JUNCAP (global) variables; required for some verilog-A compilers
- vbimin_s = 0.0;
- vbimin_d = 0.0;
- vfmin_s = 0.0;
- vfmin_d = 0.0;
- vch_s = 0.0;
- vch_d = 0.0;
- vbbtlim_s = 0.0;
- vbbtlim_d = 0.0;
- VMAX_s = 0.0;
- VMAX_d = 0.0;
- exp_VMAX_over_phitd_s = 0.0;
- exp_VMAX_over_phitd_d = 0.0;
- ISATFOR1_s = 0.0;
- ISATFOR1_d = 0.0;
- MFOR1_s = 1.0;
- MFOR1_d = 1.0;
- ISATFOR2_s = 0.0;
- ISATFOR2_d = 0.0;
- MFOR2_s = 1.0;
- MFOR2_d = 1.0;
- ISATREV_s = 0.0;
- ISATREV_d = 0.0;
- MREV_s = 1.0;
- MREV_d = 1.0;
- m0flag_s = 0.0;
- m0flag_d = 0.0;
- xhighf1_s = 0.0;
- xhighf1_d = 0.0;
- expxhf1_s = 0.0;
- expxhf1_d = 0.0;
- xhighf2_s = 0.0;
- xhighf2_d = 0.0;
- expxhf2_s = 0.0;
- expxhf2_d = 0.0;
- xhighr_s = 0.0;
- xhighr_d = 0.0;
- expxhr_s = 0.0;
- expxhr_d = 0.0;
- zflagbot_s = 1.0;
- zflagbot_d = 1.0;
- zflagsti_s = 1.0;
- zflagsti_d = 1.0;
- zflaggat_s = 1.0;
- zflaggat_d = 1.0;
-
- m0_rev = 0.0;
- mcor_rev = 0.0;
- I1_cor = 0.0;
- I2_cor = 0.0;
- I3_cor = 0.0;
- I4_cor = 0.0;
- I5_cor = 0.0;
- tt0 = 0.0;
- tt1 = 0.0;
- tt2 = 0.0;
- zfrac = 0.0;
- alphaje = 0.0;
-
- if (SWJUNCAP > 0) begin
- `JuncapInitInstance(ABSOURCE_i, LSSOURCE_i, LGSOURCE_i, idsatbot, idsatsti, idsatgat, vbibot, vbisti, vbigat, PBOT_i, PSTI_i, PGAT_i, VBIRBOT_i, VBIRSTI_i, VBIRGAT_i, VMAX_s, exp_VMAX_over_phitd_s, vbimin_s, vch_s, vfmin_s, vbbtlim_s)
- `JuncapInitInstance(ABDRAIN_i, LSDRAIN_i, LGDRAIN_i, idsatbot_d, idsatsti_d, idsatgat_d, vbibot_d, vbisti_d, vbigat_d, PBOTD_i, PSTID_i, PGATD_i, VBIRBOTD_i, VBIRSTID_i, VBIRGATD_i, VMAX_d, exp_VMAX_over_phitd_d, vbimin_d, vch_d, vfmin_d, vbbtlim_d)
-
- if (SWJUNEXP_i == 1.0) begin : JUNCAPexpressInit
- // The variables in the macro below are (re-)declared LOCALLY, to keep
- // them separated from their globally declared counterparts. This trick
- // allows one to use the "juncapcommon" macro both in the JUNCAP-express
- // initialization and in the full-JUNCAP evaluation, while in the former
- // the verilog-A compiler can still consider the variables as
- // voltage-INdependent. This is essential to avoid recomputation of the
- // JUNCAP-express initialization at each bias-step.
-// `LocalGlobalVars
- // results computed here are not used elsewhere
-// real ijunbot, ijunsti, ijungat, qjunbot, qjunsti, qjungat;
-
- // Initialization of (local) variables; required for some verilog-A compilers
- ysq = 0.0;
- terfc = 0.0;
- erfcpos = 0.0;
- h1 = 0.0;
- h2 = 0.0;
- h2d = 0.0;
- h3 = 0.0;
- h4 = 0.0;
- h5 = 0.0;
- idmult = 0.0;
- vj = 0.0;
- z = 0.0;
- zinv = 0.0;
- two_psistar = 0.0;
- vjlim = 0.0;
- vjsrh = 0.0;
- vbbt = 0.0;
- vav = 0.0;
- tmp = 0.0;
- id = 0.0;
- isrh = 0.0;
- vbi_minus_vjsrh = 0.0;
- wsrhstep = 0.0;
- dwsrh = 0.0;
- wsrh = 0.0;
- wdep = 0.0;
- asrh = 0.0;
- itat = 0.0;
- btat = 0.0;
- twoatatoverthreebtat = 0.0;
- umaxbeforelimiting = 0.0;
- umax = 0.0;
- sqrtumax = 0.0;
- umaxpoweronepointfive = 0.0;
- wgamma = 0.0;
- wtat = 0.0;
- ktat = 0.0;
- ltat = 0.0;
- mtat = 0.0;
- xerfc = 0.0;
- erfctimesexpmtat = 0.0;
- gammamax = 0.0;
- ibbt = 0.0;
- Fmaxr = 0.0;
- fbreakdown = 0.0;
- qjunbot = 0.0;
- qjunsti = 0.0;
- qjungat = 0.0;
-
- // Computation of JUNCAP-express internal parameters
- `JuncapExpressInit1(ABSOURCE_i, LSSOURCE_i, LGSOURCE_i, VJUNREF_i, qprefbot, qpref2bot, vbiinvbot, one_minus_PBOT, idsatbot, CSRHBOT_i, CTATBOT_i, vbibot, wdepnulrbot, VBIRBOTinv, PBOT_i, ftdbot, btatpartbot, atatbot, one_over_one_minus_PBOT, CBBTBOT_i, VBIRBOT_i, wdepnulrinvbot, fbbtbot, VBRBOT_i, VBRinvbot, PBRBOT_i, fstopbot, slopebot, qprefsti, qpref2sti, vbiinvsti, one_minus_PSTI, idsatsti, CSRHSTI_i, CTATSTI_i, vbisti, wdepnulrsti, VBIRSTIinv, PSTI_i, ftdsti, btatpartsti, atatsti, one_over_one_minus_PSTI, CBBTSTI_i, VBIRSTI_i, wdepnulrinvsti, fbbtsti, VBRSTI_i, VBRinvsti, PBRSTI_i, fstopsti, slopesti, qprefgat, qpref2gat, vbiinvgat, one_minus_PGAT, idsatgat, CSRHGAT_i, CTATGAT_i, vbigat, wdepnulrgat, VBIRGATinv, PGAT_i, ftdgat, btatpartgat, atatgat, one_over_one_minus_PGAT, CBBTGAT_i, VBIRGAT_i, wdepnulrinvgat, fbbtgat, VBRGAT_i, VBRinvgat, PBRGAT_i, fstopgat, slopegat, VMAX_s, exp_VMAX_over_phitd_s, vbimin_s, vch_s, vfmin_s, vbbtlim_s)
- `JuncapExpressInit2(ABSOURCE_i, LSSOURCE_i, LGSOURCE_i, qprefbot, qpref2bot, vbiinvbot, one_minus_PBOT, idsatbot, CSRHBOT_i, CTATBOT_i, vbibot, wdepnulrbot, VBIRBOTinv, PBOT_i, ftdbot, btatpartbot, atatbot, one_over_one_minus_PBOT, CBBTBOT_i, VBIRBOT_i, wdepnulrinvbot, fbbtbot, VBRBOT_i, VBRinvbot, PBRBOT_i, fstopbot, slopebot, qprefsti, qpref2sti, vbiinvsti, one_minus_PSTI, idsatsti, CSRHSTI_i, CTATSTI_i, vbisti, wdepnulrsti, VBIRSTIinv, PSTI_i, ftdsti, btatpartsti, atatsti, one_over_one_minus_PSTI, CBBTSTI_i, VBIRSTI_i, wdepnulrinvsti, fbbtsti, VBRSTI_i, VBRinvsti, PBRSTI_i, fstopsti, slopesti, qprefgat, qpref2gat, vbiinvgat, one_minus_PGAT, idsatgat, CSRHGAT_i, CTATGAT_i, vbigat, wdepnulrgat, VBIRGATinv, PGAT_i, ftdgat, btatpartgat, atatgat, one_over_one_minus_PGAT, CBBTGAT_i, VBIRGAT_i, wdepnulrinvgat, fbbtgat, VBRGAT_i, VBRinvgat, PBRGAT_i, fstopgat, slopegat, VMAX_s, exp_VMAX_over_phitd_s, vbimin_s, vch_s, vfmin_s, vbbtlim_s)
- `JuncapExpressInit3(ABSOURCE_i, LSSOURCE_i, LGSOURCE_i, idsatbot, idsatsti, idsatgat, ISATFOR1_s, MFOR1_s, ISATFOR2_s, MFOR2_s, ISATREV_s, MREV_s, m0flag_s)
- `JuncapExpressInit4(ABSOURCE_i, LSSOURCE_i, LGSOURCE_i, FJUNQ_i, cjobot, cjosti, cjogat, zflagbot_s, zflagsti_s, zflaggat_s)
- `JuncapExpressInit5(ABSOURCE_i, LSSOURCE_i, LGSOURCE_i, ISATFOR1_s, ISATFOR2_s, ISATREV_s, xhighf1_s, expxhf1_s, xhighf2_s, expxhf2_s, xhighr_s, expxhr_s)
-
- `JuncapExpressInit1(ABDRAIN_i, LSDRAIN_i, LGDRAIN_i, VJUNREFD_i, qprefbot_d, qpref2bot_d, vbiinvbot_d, one_minus_PBOT_d, idsatbot_d, CSRHBOTD_i, CTATBOTD_i, vbibot_d, wdepnulrbot_d, VBIRBOTinv_d, PBOTD_i, ftdbot_d, btatpartbot_d, atatbot_d, one_over_one_minus_PBOT_d, CBBTBOTD_i, VBIRBOTD_i, wdepnulrinvbot_d, fbbtbot_d, VBRBOTD_i, VBRinvbot_d, PBRBOTD_i, fstopbot_d, slopebot_d, qprefsti_d, qpref2sti_d, vbiinvsti_d, one_minus_PSTI_d, idsatsti_d, CSRHSTID_i, CTATSTID_i, vbisti_d, wdepnulrsti_d, VBIRSTIinv_d, PSTID_i, ftdsti_d, btatpartsti_d, atatsti_d, one_over_one_minus_PSTI_d, CBBTSTID_i, VBIRSTID_i, wdepnulrinvsti_d, fbbtsti_d, VBRSTID_i, VBRinvsti_d, PBRSTID_i, fstopsti_d, slopesti_d, qprefgat_d, qpref2gat_d, vbiinvgat_d, one_minus_PGAT_d, idsatgat_d, CSRHGATD_i, CTATGATD_i, vbigat_d, wdepnulrgat_d, VBIRGATinv_d, PGATD_i, ftdgat_d, btatpartgat_d, atatgat_d, one_over_one_minus_PGAT_d, CBBTGATD_i, VBIRGATD_i, wdepnulrinvgat_d, fbbtgat_d, VBRGATD_i, VBRinvgat_d, PBRGATD_i, fstopgat_d, slopegat_d, VMAX_d, exp_VMAX_over_phitd_d, vbimin_d, vch_d, vfmin_d, vbbtlim_d)
- `JuncapExpressInit2(ABDRAIN_i, LSDRAIN_i, LGDRAIN_i, qprefbot_d, qpref2bot_d, vbiinvbot_d, one_minus_PBOT_d, idsatbot_d, CSRHBOTD_i, CTATBOTD_i, vbibot_d, wdepnulrbot_d, VBIRBOTinv_d, PBOTD_i, ftdbot_d, btatpartbot_d, atatbot_d, one_over_one_minus_PBOT_d, CBBTBOTD_i, VBIRBOTD_i, wdepnulrinvbot_d, fbbtbot_d, VBRBOTD_i, VBRinvbot_d, PBRBOTD_i, fstopbot_d, slopebot_d, qprefsti_d, qpref2sti_d, vbiinvsti_d, one_minus_PSTI_d, idsatsti_d, CSRHSTID_i, CTATSTID_i, vbisti_d, wdepnulrsti_d, VBIRSTIinv_d, PSTID_i, ftdsti_d, btatpartsti_d, atatsti_d, one_over_one_minus_PSTI_d, CBBTSTID_i, VBIRSTID_i, wdepnulrinvsti_d, fbbtsti_d, VBRSTID_i, VBRinvsti_d, PBRSTID_i, fstopsti_d, slopesti_d, qprefgat_d, qpref2gat_d, vbiinvgat_d, one_minus_PGAT_d, idsatgat_d, CSRHGATD_i, CTATGATD_i, vbigat_d, wdepnulrgat_d, VBIRGATinv_d, PGATD_i, ftdgat_d, btatpartgat_d, atatgat_d, one_over_one_minus_PGAT_d, CBBTGATD_i, VBIRGATD_i, wdepnulrinvgat_d, fbbtgat_d, VBRGATD_i, VBRinvgat_d, PBRGATD_i, fstopgat_d, slopegat_d, VMAX_d, exp_VMAX_over_phitd_d, vbimin_d, vch_d, vfmin_d, vbbtlim_d)
- `JuncapExpressInit3(ABDRAIN_i, LSDRAIN_i, LGDRAIN_i, idsatbot_d, idsatsti_d, idsatgat_d, ISATFOR1_d, MFOR1_d, ISATFOR2_d, MFOR2_d, ISATREV_d, MREV_d, m0flag_d)
- `JuncapExpressInit4(ABDRAIN_i, LSDRAIN_i, LGDRAIN_i, FJUNQD_i, cjobot_d, cjosti_d, cjogat_d, zflagbot_d, zflagsti_d, zflaggat_d)
- `JuncapExpressInit5(ABDRAIN_i, LSDRAIN_i, LGDRAIN_i, ISATFOR1_d, ISATFOR2_d, ISATREV_d, xhighf1_d, expxhf1_d, xhighf2_d, expxhf2_d, xhighr_d, expxhr_d)
- end // JUNCAPexpressInit
-
- end
-
-
- end // initial_instance
-
- /////////////////////////////////////////////////////////////////////////////
- //
- // DC bias dependent quantities (calculations for current contribs)
- //
- /////////////////////////////////////////////////////////////////////////////
-
- begin : evaluateblock
-// real alpha, eta_p, xitsb, FdL, Gmob, Gmob_dL, Gvsat, Gvsatinv, dps, qim, qim1;
-// real H, Iimpact, mavl, Ids, Vdse, Igsov, Igdov, Igcs, Igcd, xg, sigVds;
-// real COX_qm;
-// real ijun_s, ijunbot_s, ijunsti_s, ijungat_s;
-// real ijun_d, ijunbot_d, ijunsti_d, ijungat_d;
-// real qjun_s, qjunbot_s, qjunsti_s, qjungat_s;
-// real qjun_d, qjunbot_d, qjunsti_d, qjungat_d;
-// real jnoise_s, jnoise_d;
-
- begin : evaluateStatic
-
- // Initialisation of some variables
- SP_S_x1 = 0.0;
- x_s = 0.0;
- sqm = 0.0;
- alpha = 0.0;
- eta_p = 1.0;
- xitsb = 0.0;
- rhob = 0.0;
- GdL = 1.0;
- FdL = 1.0;
- Gmob = 1.0;
- Gmob_dL = 1.0;
- Udse = 0.0;
- QCLM = 0.0;
- thesat1 = 0.0;
- Gvsat = 1.0;
- Gvsatinv = 1.0;
- xgm = 0.0;
- dps = 0.0;
- qim = 0.0;
- qim1 = 0.0;
- H = 1.0;
- xs_ov = 0.0;
- xd_ov = 0.0;
- Vovs = 0.0;
- Vovd = 0.0;
- Iimpact = 0.0;
- mavl = 0.0;
-`ifdef NQSmodel
- // Initialization of variables for NQS model
- pd = 1.0;
- ym = 0.0;
-`endif // NQSmodel
-
- if (CHNL_TYPE == `NMOS) begin
- Vgs = V(GP, S);
- Vds = V(D, S);
- Vsb = V(S, BP);
- Vjun_s = -V(S, BS);
- Vjun_d = -V(D, BD);
- end else begin
- Vgs = -V(GP, S);
- Vds = -V(D, S);
- Vsb = -V(S, BP);
- Vjun_s = V(S, BS);
- Vjun_d = V(D, BD);
- end
-
- // Voltages NOT subject to S/D-interchange
- VgsPrime = Vgs;
- VsbPrime = Vsb;
- VdbPrime = Vds + Vsb;
- VgdPrime = Vgs - Vds;
- xgs_ov = -VgsPrime * inv_phit;
- xgd_ov = -VgdPrime * inv_phit;
-
- // Source-drain interchange
- sigVds = 1.0;
- if (Vds < 0.0) begin
- sigVds = -1.0;
- Vgs = Vgs - Vds;
- Vsb = Vsb + Vds;
- Vds = -Vds;
- end
-
- Vdb = Vds + Vsb;
-
- // 4.2.1 Conditioning of terminal voltages
- temp = `MINA(Vdb, Vsb, bphi) + phix;
- Vsbstar = Vsb - `MINA(temp, 0, aphi) + phix1;
- Vgbstar = Vgs + Vsbstar;
- Vgb1 = Vgbstar - VFB_i;
- Vdsx = sqrt(Vds * Vds + 0.01) - 0.1;
- Vsbx = Vsbstar + 0.5 * (Vds - Vdsx);
- delVg = CF_i * (Vdsx * (1 + CFB_i * Vsbx)); // DIBL
- Vgb1 = Vgb1 + delVg;
- xg = Vgb1 * inv_phit1;
-
-
- // 4.2.2 Bias dependent body factor
- if (DNSUB_i > 0.0) begin
- Dnsub = DNSUB_i * `MAXA(0, Vgs + Vsb - VNSUB_i, NSLP_i);
- Gf = G_0 * sqrt(1.0 + Dnsub);
- end else begin
- Gf = G_0;
- end
-
- // 4.2.3 Surface potential at source side
- Gf2 = Gf * Gf;
- inv_Gf2 = 1.0 / Gf2;
- xi = 1.0 + Gf * `invSqrt2;
- inv_xi = 1.0 / xi;
- Ux = Vsbstar * inv_phit1;
- xn_s = phib * inv_phit1 + Ux;
- if (xn_s < `se)
- delta_ns = exp(-xn_s);
- else
- delta_ns = `ke / `P3(xn_s - `se);
- margin = 1e-5 * xi;
-
- `sp_s(x_s, xg, xn_s, delta_ns)
- x_d = x_s;
- x_m = x_s;
- x_ds = 0.0;
-
- //
- // Core PSP current calculation
- //
- if (xg <= 0.0) begin
- qis = 0.0;
- Ids = 0.0;
- xgm = xg - x_s;
- Voxm = xgm * phit1;
- qeff = Voxm;
- Vdsat = Vdsat_lim;
- Vdse = Vds;
- end else begin // (xg > 0)
- delta_1s = 0.0;
- temp = 1.0 / (2.0 + x_s * x_s);
- xi0s = x_s * x_s * temp;
- xi1s = 4.0 * (x_s * temp * temp);
- xi2s = (8.0 * temp - 12.0 * xi0s) * temp * temp;
- if (x_s < `se05) begin
- delta_1s = exp(x_s);
- Es = 1.0 / delta_1s;
- delta_1s = delta_ns * delta_1s;
- end else if (x_s > (xn_s - `se05)) begin
- delta_1s = exp(x_s - xn_s);
- Es = delta_ns / delta_1s;
- end else begin
- delta_1s = `ke05 / `P3(xn_s - x_s - `se05);
- Es = `ke05 / `P3(x_s - `se05);
- end
- Ds = delta_1s - delta_ns * (x_s + 1.0 + xi0s);
- if (x_s < 1.0e-5) begin
- Ps = 0.5 * (x_s * x_s * (1.0 - `oneThird * (x_s * (1.0 - 0.25 * x_s))));
- Ds = `oneSixth * (delta_ns * x_s * x_s * x_s * (1.0 + 1.75 * x_s));
- temp = sqrt(1.0 - `oneThird * (x_s * (1.0 - 0.25 * x_s)));
- sqm = `invSqrt2 * (x_s * temp);
- alpha = 1.0 + Gf * `invSqrt2 * (1.0 - 0.5 * x_s + `oneSixth * (x_s * x_s)) / temp;
- end else begin
- Ps = x_s - 1.0 + Es;
- sqm = sqrt(Ps);
- alpha = 1.0 + 0.5 * (Gf * (1.0 - Es) / sqm);
- end
- Em = Es;
- Ed = Em;
- Dm = Ds;
- Dd = Dm;
-
- // 4.2.4 Drain saturation voltage
- Rxcor = (1.0 + 0.2 * XCOR_i * Vsbx) / (1.0 + XCOR_i * Vsbx);
- if ( Ds > `ke05) begin
- xgs = Gf * sqrt(Ps + Ds);
- qis = Gf2 * Ds * phit1 / (xgs + Gf * sqm);
- qbs = sqm * Gf * phit1;
- if (RSB_i < 0) begin
- rhob = 1.0 / (1.0 - RSB_i * Vsbx);
- end else begin
- rhob = 1.0 + RSB_i * Vsbx;
- end
- if (RSG_i < 0) begin
- temp = 1.0 - RSG_i * qis;
- end else begin
- temp = 1.0 / (1.0 + RSG_i * qis);
- end
- GR = THER_i * (rhob * temp * qis);
- Eeffm = E_eff0 * (qbs + eta_mu * qis);
- Mutmp = pow(Eeffm * MUE_i, THEMU_i) + CS_i * (Ps / (Ps + Ds + 1.0e-14));
- Gmob = (1.0 + Mutmp + GR) * Rxcor;
- if (THESATB_i < 0) begin
- xitsb = 1.0 / (1.0 - THESATB_i * Vsbx);
- end else begin
- xitsb = 1.0 + THESATB_i * Vsbx;
- end
- temp2 = qis * xitsb;
- wsat = 100.0 * (temp2 / (100.0 + temp2));
- if (THESATG_i < 0) begin
- temp = 1 / (1 - THESATG_i * wsat);
- end else begin
- temp = 1 + THESATG_i * wsat;
- end
- thesat1 = THESAT_i * (temp / Gmob);
- phi_inf = qis / alpha + phit1;
- ysat = thesat1 * phi_inf * `invSqrt2;
- if (CHNL_TYPE==`PMOS) begin
- ysat = ysat / sqrt(1.0 + ysat);
- end
- za = 2.0 / (1.0 + sqrt(1.0 + 4.0 * ysat));
- temp1 = za * ysat;
- Phi_0 = phi_inf * za * (1.0 + 0.86 * (temp1 * (1.0 - temp1 * za) / (1.0 + 4.0 * (temp1 * temp1 * za))));
- asat = xgs + 0.5 * Gf2;
- Phi_2 = 0.98 * (Gf2 * Ds * phit1 / (asat + sqrt(asat * asat - Gf2 * Ds * 0.98)));
- Phi_0_2 = Phi_0 + Phi_2;
- Phi0_Phi2 = 2.0 * (Phi_0 * Phi_2);
- Phi_sat = Phi0_Phi2 / (Phi_0_2 + sqrt(Phi_0_2 * Phi_0_2 - 1.98 * Phi0_Phi2));
- Vdsat = Phi_sat - phit1 * ln(1.0 + Phi_sat * (Phi_sat - 2.0 * asat * phit1) * inv_Gf2 / (phit1 * phit1 * Ds));
- end else begin
- Vdsat = Vdsat_lim;
- end
- temp = pow(Vds / Vdsat, AX_i);
- Vdse = Vds * pow(1.0 + temp, -inv_AX);
-
- // 4.2.5 Surface potential at drain side
- Udse = Vdse * inv_phit1;
- xn_d = xn_s + Udse;
- if (Udse < `se) begin
- k_ds = exp(-Udse);
- end else begin
- k_ds = `ke / `P3(Udse - `se);
- end
- delta_nd = delta_ns * k_ds;
-
- `sp_s_d(x_d, xg, xn_d, delta_nd)
- x_ds = x_d - x_s;
-
- //
- // Approximations for extremely small x_ds: capacitance calulation
- //
- if (x_ds < 1.0E-10) begin
- pC = 2.0 * (xg - x_s) + Gf2 * (1.0 - Es + delta_1s * k_ds - delta_nd * (1.0 + xi1s));
- qC = Gf2 * (1.0 - k_ds) * Ds;
- temp = 2.0 - Gf2 * (Es + delta_1s * k_ds - delta_nd * xi2s);
- temp = pC * pC - 2.0 * (temp * qC);
- x_ds = 2.0 * (qC / (pC + sqrt(temp)));
- x_d = x_s + x_ds;
- end
- dps = x_ds * phit1; // deltaPsi
-
- xi0d = x_d * x_d / (2.0 + x_d * x_d);
- if (x_d < `se05) begin
- Ed = exp(-x_d);
- if (x_d < 1.0e-5) begin
- Dd = `oneSixth * delta_nd * x_d * x_d * x_d * (1.0 + 1.75 * x_d);
- end else begin
- Dd = delta_nd * (1.0 / Ed - x_d - 1.0 - xi0d);
- end
- end else begin
- if (x_d > (xn_d - `se05)) begin
- temp = exp(x_d - xn_d);
- Ed = delta_nd / temp;
- Dd = temp - delta_nd * (x_d + 1.0 + xi0d);
- end else begin
- Ed = `ke05 / `P3(x_d - `se05);
- temp = `ke05 / `P3(xn_d - x_d - `se05);
- Dd = temp - delta_nd * (x_d + 1.0 + xi0d);
- end
- end
-
- // 4.2.6 Mid-point surface potential
- x_m = 0.5 * (x_s + x_d);
- Em = 0.0;
- temp = Ed * Es;
- if (temp > 0.0) begin
- Em = sqrt(temp);
- end
- D_bar = 0.5 * (Ds + Dd);
- Dm = D_bar + 0.125 * (x_ds * x_ds * (Em - 2.0 * inv_Gf2));
-
- if (x_m < 1.0e-5) begin
- Pm = 0.5 * (x_m * x_m * (1.0 - `oneThird * (x_m * (1.0 - 0.25 * x_m))));
- xgm = Gf * sqrt(Dm + Pm);
-
- // 4.2.7 Polysilicon depletion
- if (kp > 0.0) begin
- eta_p = 1.0 / sqrt(1.0 + kp * xgm);
- end // (kp > 0.0)
- temp = sqrt(1.0 - `oneThird * (x_m * (1.0 - 0.25 * x_m)));
- sqm = `invSqrt2 * (x_m * temp);
- alpha = eta_p + `invSqrt2 * (Gf * (1.0 - 0.5 * x_m + `oneSixth * (x_m * x_m)) / temp);
- end else begin
- Pm = x_m - 1.0 + Em;
- xgm = Gf * sqrt(Dm + Pm);
-
- // 4.2.7 Polysilicon depletion
- if (kp > 0.0) begin
- d0 = 1.0 - Em + 2.0 * (xgm * inv_Gf2);
- eta_p = 1.0 / sqrt(1.0 + kp * xgm);
- temp = eta_p / (eta_p + 1.0);
- x_pm = kp * (temp * temp * Gf2 * Dm);
- p_pd = 2.0 * (xgm - x_pm) + Gf2 * (1.0 - Em + Dm);
- q_pd = x_pm * (x_pm - 2.0 * xgm);
- xi_pd = 1.0 - 0.5 * (Gf2 * (Em + Dm));
- u_pd = q_pd * p_pd / (p_pd * p_pd - xi_pd * q_pd);
- x_m = x_m + u_pd;
- km = exp(u_pd);
- Em = Em / km;
- Dm = Dm * km;
- Pm = x_m - 1.0 + Em;
- xgm = Gf * sqrt(Dm + Pm);
- help = 1.0 - Em + 2.0 * (xgm * eta_p * inv_Gf2);
- x_ds = x_ds * km * (d0 + D_bar) / (help + km * D_bar);
- dps = x_ds * phit1;
- end // (kp > 0.0)
- sqm = sqrt(Pm);
- alpha = eta_p + 0.5 * (Gf * (1.0 - Em) / sqm);
- end
-
- // 4.2.8 Potential midpoint inversion charge
- qim = phit1 * (Gf2 * Dm / (xgm + Gf * sqm));
-
- // 4.2.8 Potential midpoint inversion charge (continued)
- qim1 = qim + phit1 * alpha;
- qim1_1 = 1.0 / qim1;
- qbm = sqm * Gf * phit1;
- // Series resistance
- if (RSG_i < 0) begin
- temp = 1.0 - RSG_i * qim;
- end else begin
- temp = 1.0 / (1.0 + RSG_i * qim);
- end
- GR = THER_i * (rhob * temp * qim);
- // Mobility reduction
- qeff = qbm + eta_mu * qim;
- Eeffm = E_eff0 * qeff;
- Mutmp = pow(Eeffm * MUE_i, THEMU_i) + CS_i * (Pm / (Pm + Dm + 1.0e-14));
- Gmob = (1.0 + Mutmp + GR) * Rxcor;
-
- // 4.2.9 Drain-source channel current
- // Channel length modulation
- r1 = qim * qim1_1;
- r2 = phit1 * (alpha * qim1_1);
- temp = ln((1.0 + (Vds - dps) * inv_VP) / (1.0 + (Vdse - dps) * inv_VP));
- temp1 = ln(1.0 + Vdsx * inv_VP);
- dL = ALP_i * temp;
- GdL = 1.0 / (1.0 + dL + dL * dL);
- dL1 = dL + ALP1_i * (qim1_1 * r1 * temp) + ALP2_i * (qbm * r2 * r2 * temp1);
- FdL = (1.0 + dL1 + dL1 * dL1) * GdL;
- // Velocity saturation
- temp2 = qim * xitsb;
- wsat = 100.0 * (temp2 / (100.0 + temp2));
- Gmob_dL = Gmob * GdL;
- if (THESATG_i < 0) begin
- temp = 1 / (1 - THESATG_i * wsat);
- end else begin
- temp = 1 + THESATG_i * wsat;
- end
- thesat1 = THESAT_i * (temp / Gmob_dL);
- zsat = thesat1 * thesat1 * dps * dps;
- if (CHNL_TYPE == `PMOS) begin
- zsat = zsat / (1.0 + thesat1 * dps);
- end
- Gvsat = 0.5 * (Gmob_dL * (1.0 + sqrt(1.0 + 2.0 * zsat)));
- Gvsatinv = 1.0 / Gvsat;
- // Drain-source current
- Ids = BET_i * (FdL * qim1 * dps * Gvsatinv);
-
- // 4.2.10 Variables for calculation of intrinsic charges and gate current
- Voxm = xgm * phit1;
- temp = Gmob_dL * Gvsatinv;
- alpha1 = alpha * (1.0 + 0.5 * (zsat * temp * temp));
- H = temp * qim1 / alpha1;
-
- // 4.2.11 Impact-Ionization
- if (SWIMPACT != 0) begin
- delVsat = Vds - A3_i * dps;
- if (delVsat > 0) begin
- temp2 = A2_i * ((1.0 + A4_i * (sqrt(phib + Vsbstar) - sqrt_phib)) / (delVsat + 1e-30));
- `expl(-temp2, temp)
- mavl = A1_i * (delVsat * temp);
- Iimpact = Ids * mavl;
- end
- end
- end // (xg > 0)
-
- // 4.2.12 Surface potential in gate overlap regions
- if (((SWIGATE != 0) && ((IGOV_i > 0) || (IGOVD_i > 0))) || ((SWGIDL != 0) && ((AGIDL_i > 0) || (AGIDLD_i > 0))) || (CGOV_i > 0) || (CGOVD_i > 0)) begin
- `ChangeToSource
- `sp_ov(xs_ov, xgs_ov)
- `ChangeToDrain
- `sp_ov(xd_ov, xgd_ov)
- Vovs = -phit * (xgs_ov + xs_ov);
- Vovd = -phit * (xgd_ov + xd_ov);
- end
-
- // 4.2.13 Gate current
- Igsov = 0.0;
- Igdov = 0.0;
- Igc = 0.0;
- Igb = 0.0;
- Igcs = 0.0;
- Igcd = 0.0;
- if (SWIGATE != 0) begin
- if (IGOV_i > 0) begin
-
- // Gate-source overlap component of gate current
- arg2mina = Vovs + Dov;
- psi_t = `MINA(0.0, arg2mina, 0.01);
- zg = sqrt(Vovs * Vovs + 1.0e-6) * inv_CHIB;
- if (GC3_i < 0) begin
- zg = `MINA(zg, GCQ, 1.0e-6);
- end
- arg1 = (3.0 + xs_ov + psi_t * inv_phit);
- `expl(arg1, Dsi)
- arg1 = -VgsPrime * inv_phit;
- `expl(arg1, temp)
- Dgate = Dsi * temp;
- temp = BOV * (-1.5 + zg * (GC2_i + GC3_i * zg));
- if (temp > 0) begin
- TP = `P3(temp);
- end else begin
- `expl_low(temp, TP)
- end
- Igsov = IGOV_i * (TP * ln((1.0 + Dsi) / (1.0 + Dgate)));
- end
-
- if (IGOVD_i > 0) begin
-
- // Gate-drain overlap component of gate current
- arg2mina = Vovd + Dov;
- psi_t = `MINA(0.0, arg2mina, 0.01);
- zg = sqrt(Vovd * Vovd + 1.0e-6) * inv_CHIB;
- if (GC3_i < 0) begin
- zg = `MINA(zg, GCQ, 1.0e-6);
- end
- arg1 = (3.0 + xd_ov + psi_t * inv_phit);
- `expl(arg1, Dsi)
- arg1 = -VgdPrime * inv_phit;
- `expl(arg1, temp)
- Dgate = Dsi * temp;
- temp = BOV_d * (-1.5 + zg * (GC2_i + GC3_i * zg));
- if (temp > 0) begin
- TP = `P3(temp);
- end else begin
- `expl_low(temp, TP)
- end
- Igdov = IGOVD_i * (TP * ln((1.0 + Dsi) / (1.0 + Dgate)));
- end
-
- // Gate-channel component of gate current
- if (IGINV_i > 0) begin
- if (xg <= 0.0) begin
- temp = pow(Vds / Vdsat_lim, AX_i);
- Udse = Vds * pow(1.0 + temp, -inv_AX) * inv_phit1;
- end
- `expl_low(x_ds-Udse, temp)
- Vm = Vsbstar + phit1 * (0.5 * x_ds - ln(0.5 * (1.0 + temp)));
-
- arg2mina = Voxm + Dch;
- psi_t = `MINA(0.0, arg2mina, 0.01);
- zg = sqrt(Voxm * Voxm + 1.0e-6) * inv_CHIB;
- if (GC3_i < 0) begin
- zg = `MINA(zg, GCQ, 1.0e-06);
- end
- arg1 = (x_m + (psi_t - alpha_b - Vm) * inv_phit1);
- `expl(arg1,Dsi)
- arg1 = -(Vgs + Vsbstar - Vm) * inv_phit1;
- `expl(arg1,temp)
- Dgate = Dsi * temp;
- temp = BCH * (-1.5 + zg * (GC2_i + GC3_i * zg));
- if (temp > 0) begin
- TP = `P3(temp);
- end else begin
- `expl_low(temp, TP)
- end
- Igc0 = IGINV_i * (TP * ln((1.0 + Dsi) / (1.0 + Dgate)));
-
- // Source/drain partitioning of gate-channel current
- if ((xg <= 0) || ((GC2_i == 0) && (GC3_i == 0))) begin
- igc = 1.0;
- igcd_h = 0.5;
- end else begin
- temp = GC2_i + 2.0 * GC3_i * zg;
- u0 = CHIB_i / (temp * BCH);
- x = 0.5 * (dps / u0);
- u0_div_H = u0 / H;
- Bg = u0_div_H * (1.0 - u0_div_H) * 0.5;
- Ag = 0.5 - 3.0 * Bg;
- if (x < 1.0e-3) begin
- xsq = x * x;
- igc = 1.0 + xsq * (`oneSixth + u0_div_H * `oneThird + `oneSixth * (xsq * (0.05 + 0.2 * u0_div_H)));
- igcd_h = 0.5 * igc - `oneSixth * (x * (1.0 + xsq * (0.4 * (Bg + 0.25) + 0.0285714285714 * (xsq * (0.125 + Bg)))));
- end else begin
- inv_x = 1.0 / x;
- `expl(x, ex)
- inv_ex = 1.0 / ex;
- temp = ex - inv_ex;
- temp2 = ex + inv_ex;
- igc = 0.5 * ((1.0 - u0_div_H) * temp * inv_x + u0_div_H * temp2);
- igcd_h = 0.5 * (igc - temp * (Bg - Ag * inv_x * inv_x) - Ag * temp2 * inv_x);
- end
- end
- Sg = 0.5 * (1.0 + xg / sqrt(xg * xg + 1.0e-6));
- Igc = Igc0 * igc * Sg;
- Igcd = Igc0 * igcd_h * Sg;
- Igcs = Igc - Igcd;
- Igb = Igc0 * igc * (1.0 - Sg);
- end // (IGINV >0)
- end // (SWIGATE != 0)
-
- // 4.2.14 GIDL/GISL current
- Igidl = 0.0;
- Igisl = 0.0;
- if (SWGIDL != 0) begin
-
- // GIDL current computation
- if ((AGIDLD_i > 0) && (Vovd < 0)) begin
- Vtovd = sqrt(Vovd * Vovd + CGIDLD_i * CGIDLD_i * (VdbPrime * VdbPrime) + 1.0e-6);
- temp = -BGIDLDs / Vtovd;
- `expl_low(temp, temp2)
- Igidl = -AGIDLDs * (VdbPrime * Vovd * Vtovd * temp2);
- end
-
- // GISL current computation
- if ((AGIDL_i > 0) && (Vovs < 0)) begin
- Vtovs = sqrt(Vovs * Vovs + CGIDL_i * CGIDL_i * (VsbPrime * VsbPrime) + 1.0e-6);
- temp = -BGIDLs / Vtovs;
- `expl_low(temp, temp2)
- Igisl = -AGIDLs * (VsbPrime * Vovs * Vtovs * temp2);
- end
- end // (SWGIDL != 0)
-
- P_D = 1 + 0.25 * (Gf * kp);
- facvsb0 = phib + 2 * phit1;
- facvsb = Vsbstar + facvsb0;
- vts_i = VFB_i + P_D * facvsb - Vsbstar + Gf * sqrt(phit1 * facvsb );
- vth_i = vts_i - delVg;
- end // evaluateStatic
-
-
- /////////////////////////////////////////////////////////////////////////////
- //
- // AC bias dependent quantities (calculations for charge contribs)
- //
- /////////////////////////////////////////////////////////////////////////////
-
-
-
- begin : evaluateDynamic
-
- // 4.2.16 Quantum mechanical corrections
- Vgb = Vgs + Vsb;
- COX_qm = COX_i;
- if (qq > 0.0) begin
- COX_qm = COX_i / (1.0 + qq * pow(qeff * qeff + qlim2, -1.0 * `oneSixth));
- end
-
- // 4.2.17 Intrinsic charge model
- if (xg <= 0.0) begin
- QG = Voxm;
- QI = 0.0;
- QD = 0.0;
- QB = QG;
- end else begin
- Fj = 0.5 * (dps / H);
- Fj2 = Fj * Fj;
- QCLM = (1.0 - GdL) * (qim - 0.5 * (alpha * dps));
- QG = Voxm + 0.5 * (eta_p * dps * (Fj * GdL * `oneThird - 1.0 + GdL));
- temp = alpha * dps * `oneSixth;
- QI = GdL * (qim + temp * Fj) + QCLM;
- QD = 0.5 * (GdL * GdL * (qim - temp * (1.0 - Fj - 0.2 * Fj2)) + QCLM * (1.0 + GdL));
- QB = QG - QI;
- end
- Qg = QG * COX_qm;
- Qd = -QD * COX_qm;
- Qb = -QB * COX_qm;
-
- // 4.2.18 Extrinsic charge model
- Qgs_ov = CGOV_i * Vovs;
- Qgd_ov = CGOVD_i * Vovd;
- Qgb_ov = CGBOV_i * Vgb;
-
- // Outer fringe charge
- Qfgs = CFR_i * VgsPrime;
- Qfgd = CFRD_i * VgdPrime;
-
-`ifdef NQSmodel
- // Variables for NQS model
- Gp = 0.0;
- Gp2 = 0.0;
- a_factrp = 0.0;
- marginp = 0.0;
- if (SWNQS_i != 0) begin
- if (xg <= 0.0) begin
- ym = 0.5;
- pd = 1.0;
- Gp = Gf;
- end else begin
- ym = 0.5 * ( 1.0 + 0.25 * (dps / H));
- pd = xgm / (xg - x_m);
- Gp = Gf / pd;
- end
- Gp2 = Gp * Gp;
- a_factrp = 1.0 + Gp * `invSqrt2;
- marginp = 1e-5 * a_factrp;
- end
-`endif // NQSmodel
-
- end // evaluateDynamic
-
-
- /////////////////////////////////////////////////////////////////////////////
- //
- // JUNCAP2 contribs
- //
- /////////////////////////////////////////////////////////////////////////////
-
-
- ijun_s = 0.0;
- ijunbot_s = 0.0;
- ijunsti_s = 0.0;
- ijungat_s = 0.0;
-
- ijun_d = 0.0;
- ijunbot_d = 0.0;
- ijunsti_d = 0.0;
- ijungat_d = 0.0;
-
- qjun_s = 0.0;
- qjunbot_s = 0.0;
- qjunsti_s = 0.0;
- qjungat_s = 0.0;
-
- qjun_d = 0.0;
- qjunbot_d = 0.0;
- qjunsti_d = 0.0;
- qjungat_d = 0.0;
-
- begin : evaluateStaticDynamic
-
- if (SWJUNCAP > 0.0) begin
- if (SWJUNEXP_i == 1.0) begin
- `JuncapExpressCurrent(Vjun_s, MFOR1_s, ISATFOR1_s, MFOR2_s, ISATFOR2_s, MREV_s, ISATREV_s, m0flag_s, xhighf1_s, expxhf1_s, xhighf2_s, expxhf2_s, xhighr_s, expxhr_s, ijun_s)
- `JuncapExpressCurrent(Vjun_d, MFOR1_d, ISATFOR1_d, MFOR2_d, ISATFOR2_d, MREV_d, ISATREV_d, m0flag_d, xhighf1_d, expxhf1_d, xhighf2_d, expxhf2_d, xhighr_d, expxhr_d, ijun_d)
- begin : evaluateDynamic
-// real tmpv, vjv;
- `JuncapExpressCharge(Vjun_s, ABSOURCE_i, LSSOURCE_i, LGSOURCE_i, qprefbot, qprefsti, qprefgat, qpref2bot, qpref2sti, qpref2gat, vbiinvbot, vbiinvsti, vbiinvgat, one_minus_PBOT, one_minus_PSTI, one_minus_PGAT, vfmin_s, vch_s, zflagbot_s, zflagsti_s, zflaggat_s, qjunbot_s, qjunsti_s, qjungat_s)
- `JuncapExpressCharge(Vjun_d, ABDRAIN_i, LSDRAIN_i, LGDRAIN_i, qprefbot_d, qprefsti_d, qprefgat_d, qpref2bot_d, qpref2sti_d, qpref2gat_d, vbiinvbot_d, vbiinvsti_d, vbiinvgat_d, one_minus_PBOT_d, one_minus_PSTI_d, one_minus_PGAT_d, vfmin_d, vch_d, zflagbot_d, zflagsti_d, zflaggat_d, qjunbot_d, qjunsti_d, qjungat_d)
- end
- end else begin
- `juncapcommon(Vjun_s, ABSOURCE_i, LSSOURCE_i, LGSOURCE_i, qprefbot, qpref2bot, vbiinvbot, one_minus_PBOT, idsatbot, CSRHBOT_i, CTATBOT_i, vbibot, wdepnulrbot, VBIRBOTinv, PBOT_i, ftdbot, btatpartbot, atatbot, one_over_one_minus_PBOT, CBBTBOT_i, VBIRBOT_i, wdepnulrinvbot, fbbtbot, VBRBOT_i, VBRinvbot, PBRBOT_i, fstopbot, slopebot, qprefsti, qpref2sti, vbiinvsti, one_minus_PSTI, idsatsti, CSRHSTI_i, CTATSTI_i, vbisti, wdepnulrsti, VBIRSTIinv, PSTI_i, ftdsti, btatpartsti, atatsti, one_over_one_minus_PSTI, CBBTSTI_i, VBIRSTI_i, wdepnulrinvsti, fbbtsti, VBRSTI_i, VBRinvsti, PBRSTI_i, fstopsti, slopesti, qprefgat, qpref2gat, vbiinvgat, one_minus_PGAT, idsatgat, CSRHGAT_i, CTATGAT_i, vbigat, wdepnulrgat, VBIRGATinv, PGAT_i, ftdgat, btatpartgat, atatgat, one_over_one_minus_PGAT, CBBTGAT_i, VBIRGAT_i, wdepnulrinvgat, fbbtgat, VBRGAT_i, VBRinvgat, PBRGAT_i, fstopgat, slopegat, VMAX_s, exp_VMAX_over_phitd_s, vbimin_s, vch_s, vfmin_s, vbbtlim_s, ijunbot_s, qjunbot_s, ijunsti_s, qjunsti_s, ijungat_s, qjungat_s)
- ijun_s = ABSOURCE_i * ijunbot_s + LSSOURCE_i * ijunsti_s + LGSOURCE_i * ijungat_s;
- `juncapcommon(Vjun_d, ABDRAIN_i, LSDRAIN_i, LGDRAIN_i, qprefbot_d, qpref2bot_d, vbiinvbot_d, one_minus_PBOT_d, idsatbot_d, CSRHBOTD_i, CTATBOTD_i, vbibot_d, wdepnulrbot_d, VBIRBOTinv_d, PBOTD_i, ftdbot_d, btatpartbot_d, atatbot_d, one_over_one_minus_PBOT_d, CBBTBOTD_i, VBIRBOTD_i, wdepnulrinvbot_d, fbbtbot_d, VBRBOTD_i, VBRinvbot_d, PBRBOTD_i, fstopbot_d, slopebot_d, qprefsti_d, qpref2sti_d, vbiinvsti_d, one_minus_PSTI_d, idsatsti_d, CSRHSTID_i, CTATSTID_i, vbisti_d, wdepnulrsti_d, VBIRSTIinv_d, PSTID_i, ftdsti_d, btatpartsti_d, atatsti_d, one_over_one_minus_PSTI_d, CBBTSTID_i, VBIRSTID_i, wdepnulrinvsti_d, fbbtsti_d, VBRSTID_i, VBRinvsti_d, PBRSTID_i, fstopsti_d, slopesti_d, qprefgat_d, qpref2gat_d, vbiinvgat_d, one_minus_PGAT_d, idsatgat_d, CSRHGATD_i, CTATGATD_i, vbigat_d, wdepnulrgat_d, VBIRGATinv_d, PGATD_i, ftdgat_d, btatpartgat_d, atatgat_d, one_over_one_minus_PGAT_d, CBBTGATD_i, VBIRGATD_i, wdepnulrinvgat_d, fbbtgat_d, VBRGATD_i, VBRinvgat_d, PBRGATD_i, fstopgat_d, slopegat_d, VMAX_d, exp_VMAX_over_phitd_d, vbimin_d, vch_d, vfmin_d, vbbtlim_d, ijunbot_d, qjunbot_d, ijunsti_d, qjunsti_d, ijungat_d, qjungat_d)
- ijun_d = ABDRAIN_i * ijunbot_d + LSDRAIN_i * ijunsti_d + LGDRAIN_i * ijungat_d;
- end
- end
-
-`ifdef NQSmodel
- // Set initial conditions for NQS model
- `include "PSP102_InitNQS.include"
-
-`endif // NQSmodel
- // Parasitic resistances (including noise)
- rgatenoise = nt0 * ggate;
- rbulknoise = nt0 * gbulk;
- rjunsnoise = nt0 * gjuns;
- rjundnoise = nt0 * gjund;
- rwellnoise = nt0 * gwell;
- end // evaluateStaticDynamic
-
-
- /////////////////////////////////////////////////////////////////////////////
- //
- // Current contribs
- //
- /////////////////////////////////////////////////////////////////////////////
-
- begin : loadStatic
-
- // 4.2.15 Total terminal currents
-
- // Convert back for NMOS-PMOS and Source-Drain interchange
- if (sigVds > 0) begin
- I(D, BP) <+ CHNL_TYPE * MULT_i * Iimpact;
- I(D, S) <+ CHNL_TYPE * MULT_i * Ids;
- I(GP, S) <+ CHNL_TYPE * MULT_i * Igcs;
- I(GP, D) <+ CHNL_TYPE * MULT_i * Igcd;
- end else begin
- I(S, BP) <+ CHNL_TYPE * MULT_i * Iimpact;
- I(S, D) <+ CHNL_TYPE * MULT_i * Ids;
- I(GP, D) <+ CHNL_TYPE * MULT_i * Igcs;
- I(GP, S) <+ CHNL_TYPE * MULT_i * Igcd;
- end
- I(GP, BP) <+ CHNL_TYPE * MULT_i * Igb;
- I(GP, S) <+ CHNL_TYPE * MULT_i * Igsov;
- I(GP, D) <+ CHNL_TYPE * MULT_i * Igdov;
- I(S, BP) <+ CHNL_TYPE * MULT_i * Igisl;
- I(D, BP) <+ CHNL_TYPE * MULT_i * Igidl;
- I(BS, S) <+ CHNL_TYPE * MULT_i * ijun_s;
- I(BD, D) <+ CHNL_TYPE * MULT_i * ijun_d;
-
- `NonCollapsableR(ggate, RG_i, rgatenoise, G, GP)
- `NonCollapsableR(gbulk, RBULK_i, rbulknoise, BP, BI)
- `NonCollapsableR(gjuns, RJUNS_i, rjunsnoise, BS, BI)
- `NonCollapsableR(gjund, RJUND_i, rjundnoise, BD, BI)
- `NonCollapsableR(gwell, RWELL_i, rwellnoise, B, BI)
-
- I(D, S) <+ `GMIN * V(D, S);
-
- end // loadStatic
-
- /////////////////////////////////////////////////////////////////////////////
- //
- // ddt() contribs from charges (Note: MULT is handled explicitly)
- //
- /////////////////////////////////////////////////////////////////////////////
-
-`ifdef NQSmodel
- begin : loadStaticDynamic
- // Calculate NQS charge contributions
- `include "PSP102_ChargesNQS.include"
- end
-`endif // NQSmodel
-
- begin : loadDynamic
-
- // 4.2.19 Total terminal charges
-
- // Intrinsic MOSFET charges
- Qs = -(Qg + Qb + Qd);
-
- // Total outerFringe + overlap for
- // gate-source and gate-drain.
- Qfgs = Qfgs + Qgs_ov;
- Qfgd = Qfgd + Qgd_ov;
-
- // JUNCAP2
- qjun_s = ABSOURCE_i * qjunbot_s + LSSOURCE_i * qjunsti_s + LGSOURCE_i * qjungat_s;
- qjun_d = ABDRAIN_i * qjunbot_d + LSDRAIN_i * qjunsti_d + LGDRAIN_i * qjungat_d;
-
- // Convert back (undo S-D interchange)
- if (sigVds < 0) begin
- temp = Qd; // Qd <--> Qs
- Qd = Qs;
- Qs = temp;
- end
-
- I(GP, S) <+ ddt(CHNL_TYPE * MULT_i * Qg);
- I(BP, S) <+ ddt(CHNL_TYPE * MULT_i * Qb);
- I(D, S) <+ ddt(CHNL_TYPE * MULT_i * Qd);
- I(GP, S) <+ ddt(CHNL_TYPE * MULT_i * Qfgs);
- I(GP, D) <+ ddt(CHNL_TYPE * MULT_i * Qfgd);
- I(GP, BP) <+ ddt(CHNL_TYPE * MULT_i * Qgb_ov);
- I(BS, S) <+ ddt(CHNL_TYPE * MULT_i * qjun_s);
- I(BD, D) <+ ddt(CHNL_TYPE * MULT_i * qjun_d);
-
- end // loadDynamic
-
-
- /////////////////////////////////////////////////////////////////////////////
- //
- // Noise
- //
- /////////////////////////////////////////////////////////////////////////////
-
- begin : noise
-// real sf;
-
- // 4.2.20 Noise variable calculation
- Sfl = 0.0;
- mid = 0.0;
- mig = 0.0;
- migid = 0.0;
- c_igid = 0.0;
- CGeff = COX_qm * eta_p;
- sqid = 0.0;
- sqig = 0.0;
- if ((xg > 0.0) && (MULT_i > 0.0) && (BET_i > 0.0)) begin
- N1 = Cox_over_q * alpha * phit;
- Nm1 = Cox_over_q * qim1;
- Delta_N1 = Cox_over_q * (alpha * dps);
- Sfl = (NFA_i - NFB_i * N1 + NFC_i * (N1 * N1)) * ln((Nm1 + 0.5 * Delta_N1) / (Nm1 - 0.5 * Delta_N1));
- Sfl = Sfl + (NFB_i + NFC_i * (Nm1 - 2.0 * N1)) * Delta_N1;
- Sfl = Sfl_prefac * Ids * Gvsatinv * Sfl / N1;
- Sfl = `CLIP_LOW(Sfl, 0.0);
-
- H0 = qim1 / alpha;
- t1 = qim / qim1;
- sqt2 = 0.5 * `oneSixth * (dps / H0);
- t2 = sqt2 * sqt2;
- r = H0 / H - 1.0;
- lc = `CLIP_LOW(1.0 - 12 * (r * t2), 1e-20);
- lcinv2 = 1 / (lc * lc);
- g_ideal = BET_i * (FdL * qim1 * Gvsatinv);
- CGeff = Gvsat * Gvsat * COX_qm * eta_p / (Gmob_dL * Gmob_dL);
- mid = t1 + 12 * t2 - 24 * ((1.0 + t1) * t2 * r);
- mid = `CLIP_LOW(mid, 1e-40);
- mid = g_ideal * lcinv2 * mid;
- mig = t1 / 12.0 - t2 * (t1 + 0.2 - 12 * t2) - 1.6 * (t2 * (t1 + 1.0 - 12 * t2) * r);
- mig = `CLIP_LOW(mig, 1e-40);
- mig = lcinv2 / g_ideal * mig;
- migid = lcinv2 * sqt2 * (1.0 - 12 * t2 - (t1 + 19.2 * t2 - 12 * (t1 * t2)) * r);
-
- // excess noise calculation
- if (FNTEXC_i > 0) begin
- // recalculate Gvsat, excluding Gmob-effect
- temp2_exc = qim * xitsb;
- wsat_exc = 100.0 * (temp2_exc / (100.0 + temp2_exc));
- if (THESATG_i < 0) begin
- temp_exc = 1 / (1 - THESATG_i * wsat_exc);
- end else begin
- temp_exc = 1 + THESATG_i * wsat_exc;
- end
- thesat1_exc= THESAT_i * (temp_exc / Gmob);
- zsat_exc = thesat1_exc * thesat1_exc * dps * dps;
- if (CHNL_TYPE == `PMOS) begin
- zsat_exc = zsat_exc / (1.0 + thesat1_exc * dps);
- end
- Gvsat_exc = 0.5 * (Gmob * (1.0 + sqrt(1.0 + 2.0 * zsat_exc)));
-
- gfac = Gmob / (Gvsat_exc * lc);
- Sidexc = fac_exc * Ids * Vdse * gfac * gfac;
-
- // add excess noise to conventional thermal noise
- mid = mid + Sidexc / nt0;
- mig = mig + Sidexc * (1 + 12 * t2) / (12 * g_ideal * g_ideal * nt0);
- migid = migid - Sidexc * sqt2 * (1 + r) / (g_ideal * nt0);
- end
- sqid = sqrt(nt * mid);
- sqig = sqrt(nt / mig);
- if (sqid == 0) begin
- c_igid = 0.0;
- end else begin
- c_igid = migid * sqig / sqid; // = migid / sqrt(mig * mid);
- end
- c_igid = `CLIP_BOTH(c_igid, 0.0, 1.0);
- end
- shot_igcsx = 2.0 * `QELE * abs(Igcs);
- shot_igcdx = 2.0 * `QELE * abs(Igcd);
- shot_igsov = 2.0 * `QELE * abs(Igsov);
- shot_igdov = 2.0 * `QELE * abs(Igdov);
- shot_iavl = 2.0 * `QELE * ((mavl + 1) * abs(Iimpact));
- // JUNCAP2
- jnoisex_s = 2.0 * `QELE * abs(ijun_s);
- jnoisex_d = 2.0 * `QELE * abs(ijun_d);
- if (sigVds > 0) begin
- shot_igs = shot_igcsx + shot_igsov;
- shot_igd = shot_igcdx + shot_igdov;
- jnoise_s = jnoisex_s;
- jnoise_d = jnoisex_d + shot_iavl;
- end else begin
- shot_igs = shot_igcdx + shot_igsov;
- shot_igd = shot_igcsx + shot_igdov;
- jnoise_s = jnoisex_s + shot_iavl;
- jnoise_d = jnoisex_d;
- end
-
- sf = 1e6 * CGeff * mig; // scale-factor to keep noise at NOI2 at reasonable level
-
- // Important note:
- // In Verilog-A, correlated noise sources can only be implemented by using two additional
- // internal nodes (NOI and NOI2). When implementing PSP in a circuit simlutor, it is
- // generally not necessary to retain these internal nodes and therefore (for execution
- // speed reasons) should be avoided.
-
- // Noise contribs
- I(NOI2) <+ V(NOI2);
- I(NOI2) <+ white_noise(sqig * sqig * sf * sf, "igig");
- I(NOII) <+ -V(NOI2) / sf;
- I(NOIR) <+ V(NOIR) / mig;
- I(NOIC) <+ ddt(CGeff * V(NOIC));
- I(D,S) <+ flicker_noise(MULT_i * Sfl, EF_i, "flicker");
- I(D,S) <+ white_noise(MULT_i * sqid * sqid * (1.0 - c_igid * c_igid), "idid");
-// I(D,S) <+ sigVds * sqrt(MULT_i) * migid * V(NOI2) / sf;
-// I(GP,S) <+ ddt(sqrt(MULT_i) * 0.5 * CGeff * V(NOIC));
-// I(GP,D) <+ ddt(sqrt(MULT_i) * 0.5 * CGeff * V(NOIC));
- I(GP,S) <+ white_noise(MULT_i * shot_igs, "igs");
- I(GP,D) <+ white_noise(MULT_i * shot_igd, "igd");
- // JUNCAP2
- I(BS,S) <+ white_noise(MULT_i * jnoise_s, "ibs");
- I(BD,D) <+ white_noise(MULT_i * jnoise_d, "ibd");
- end // noise
-
-
- /////////////////////////////////////////////////////////////////////////////
- //
- // Operating point info
- //
- /////////////////////////////////////////////////////////////////////////////
-
- begin : OPinfo
-// real temp;
-
- // Auxiliary variables
- id_op = Ids + Iimpact - Igcd;
- is = -Ids - Igcs;
- ig = Igcs + Igcd + Igsov + Igdov + Igb;
- ib = -Iimpact - Igb - Igidl - Igisl;
-
- sig1k = 2 * `PI * 1000 * CGeff;
- sig1k = sig1k * sig1k * mig;
-
-
- ////////////////////////////////////////////////////////////////////////////////////
- //
- // Actual operation point output variables
- //
- ////////////////////////////////////////////////////////////////////////////////////
-
- // Note: In this section (and ONLY in this section) `drain' always refers to
- // the highest-potential end of the channel. Therefore, care has to be
- // taken for derivatives w.r.t. terminal voltages when sigVds == -1.
-
- sdint = sigVds;
-
- ctype = CHNL_TYPE;
-
- if (sigVds < 0) begin
- // All variables in the actual model refering to junctions are
- // not subject to SD-interchange. In the OP-output variables,
- // SD-interchange is also done for the junctions, so that's
- // what is happening here. Similar precautions have to be taken
- // for those variables that are derivatives w.r.t. voltage branches
- ise = MULT_i * (is - Igdov + Igidl - ijun_d);
- ige = MULT_i * ig;
- ide = MULT_i * (id_op - Igsov + Igisl - ijun_s);
- ibe = MULT_i * (ib + ijun_s + ijun_d);
- ids = MULT_i * Ids;
- idb = MULT_i * (Iimpact + Igisl - ijun_s);
- isb = MULT_i * (Igidl - ijun_d);
- igs = MULT_i * (Igcs + Igdov);
- igd = MULT_i * (Igcd + Igsov);
- igb = MULT_i * Igb;
- igcs = MULT_i * Igcs;
- igcd = MULT_i * Igcd;
- iavl = MULT_i * Iimpact;
- igisl = MULT_i * Igidl;
- igidl = MULT_i * Igisl;
- if (SWJUNEXP_i == 1) begin
- ijsbot = 0.0;
- ijsgat = 0.0;
- ijssti = 0.0;
- ijdbot = 0.0;
- ijdgat = 0.0;
- ijdsti = 0.0;
- idsatsbot = 0.0;
- idsatssti = 0.0;
- idsatsgat = 0.0;
- idsatsbotd = 0.0;
- idsatsstid = 0.0;
- idsatsgatd = 0.0;
- end else begin
- ijsbot = MULT_i * ABDRAIN_i * ijunbot_d;
- ijsgat = MULT_i * LGDRAIN_i * ijungat_d;
- ijssti = MULT_i * LSDRAIN_i * ijunsti_d;
- ijdbot = MULT_i * ABSOURCE_i * ijunbot_s;
- ijdgat = MULT_i * LGSOURCE_i * ijungat_s;
- ijdsti = MULT_i * LSSOURCE_i * ijunsti_s;
- idsatsbot = MULT_i * ABSOURCE_i * idsatbot;
- idsatssti = MULT_i * LSSOURCE_i * idsatsti;
- idsatsgat = MULT_i * LGSOURCE_i * idsatgat;
- idsatsbotd = MULT_i * ABDRAIN_i * idsatbot_d;
- idsatsstid = MULT_i * LSDRAIN_i * idsatsti_d;
- idsatsgatd = MULT_i * LGDRAIN_i * idsatgat_d;
- end
- ijs = MULT_i * ijun_d;
- ijd = MULT_i * ijun_s;
-
- vds = Vds;
- vgs = Vgs;
- vsb = Vsb;
- vto = VFB_i + P_D * facvsb0 + Gf * sqrt(phit1 * facvsb0);
- vts = vts_i;
- vth = vth_i;
- vgt = vgs - vth;
- vdss = Vdsat;
- vsat = Vds - vdss;
-
- temp = Ids + Iimpact + Igisl - Igcd - Igsov - ijun_s; // Total drain-current
-`ifdef OPderiv
- gm = CHNL_TYPE * MULT_i * ddx(temp, V(GP));
- gmb = CHNL_TYPE * MULT_i * ddx(temp, V(BP));
- gds = CHNL_TYPE * MULT_i * ddx(temp, V(S));
-
- gjs = MULT_i * ddx(ijun_d, V(BD));
- gjd = MULT_i * ddx(ijun_s, V(BS));
-
- css = CHNL_TYPE * MULT_i * ddx(Qd, V(D));
- csg = -CHNL_TYPE * MULT_i * ddx(Qd, V(GP));
- csb = -CHNL_TYPE * MULT_i * ddx(Qd, V(BP));
- csd = css - csg - csb;
- cgs = -CHNL_TYPE * MULT_i * ddx(Qg, V(D));
- cgg = CHNL_TYPE * MULT_i * ddx(Qg, V(GP));
- cgb = -CHNL_TYPE * MULT_i * ddx(Qg, V(BP));
- cgd = cgg - cgs - cgb;
- cds = -CHNL_TYPE * MULT_i * ddx(Qs, V(D));
- cdg = -CHNL_TYPE * MULT_i * ddx(Qs, V(GP));
- cdb = -CHNL_TYPE * MULT_i * ddx(Qs, V(BP));
- cdd = cdg + cds + cdb;
- cbs = -CHNL_TYPE * MULT_i * ddx(Qb, V(D));
- cbg = -CHNL_TYPE * MULT_i * ddx(Qb, V(GP));
- cbb = CHNL_TYPE * MULT_i * ddx(Qb, V(BP));
- cbd = cbb - cbs - cbg;
- cgsol = CHNL_TYPE * MULT_i * ddx(Qfgd, V(GP));
- cgdol = CHNL_TYPE * MULT_i * ddx(Qfgs, V(GP));
-
- cjsbot = -MULT_i * CHNL_TYPE * ABDRAIN_i * ddx(qjunbot_d, V(D));
- cjsgat = -MULT_i * CHNL_TYPE * LGDRAIN_i * ddx(qjungat_d, V(D));
- cjssti = -MULT_i * CHNL_TYPE * LSDRAIN_i * ddx(qjunsti_d, V(D));
- cjs = cjsbot + cjsgat + cjssti;
- cjdbot = -MULT_i * CHNL_TYPE * ABSOURCE_i * ddx(qjunbot_s, V(S));
- cjdgat = -MULT_i * CHNL_TYPE * LGSOURCE_i * ddx(qjungat_s, V(S));
- cjdsti = -MULT_i * CHNL_TYPE * LSSOURCE_i * ddx(qjunsti_s, V(S));
- cjd = cjdbot + cjdgat + cjdsti;
-`endif // OPderiv
- end else begin
- ise = MULT_i * (is - Igsov + Igisl - ijun_s);
- ige = MULT_i * ig;
- ide = MULT_i * (id_op - Igdov + Igidl - ijun_d);
- ibe = MULT_i * (ib + ijun_s + ijun_d);
- ids = MULT_i * Ids;
- idb = MULT_i * (Iimpact + Igidl - ijun_d);
- isb = MULT_i * (Igisl - ijun_s);
- igs = MULT_i * (Igcs + Igsov);
- igd = MULT_i * (Igcd + Igdov);
- igb = MULT_i * Igb;
- igcs = MULT_i * Igcs;
- igcd = MULT_i * Igcd;
- iavl = MULT_i * Iimpact;
- igisl = MULT_i * Igisl;
- igidl = MULT_i * Igidl;
- if (SWJUNEXP_i == 1) begin
- ijsbot = 0.0;
- ijsgat = 0.0;
- ijssti = 0.0;
- ijdbot = 0.0;
- ijdgat = 0.0;
- ijdsti = 0.0;
- idsatsbot = 0.0;
- idsatssti = 0.0;
- idsatsgat = 0.0;
- idsatsbotd = 0.0;
- idsatsstid = 0.0;
- idsatsgatd = 0.0;
- end else begin
- ijsbot = MULT_i * ABSOURCE_i * ijunbot_s;
- ijsgat = MULT_i * LGSOURCE_i * ijungat_s;
- ijssti = MULT_i * LSSOURCE_i * ijunsti_s;
- ijdbot = MULT_i * ABDRAIN_i * ijunbot_d;
- ijdgat = MULT_i * LGDRAIN_i * ijungat_d;
- ijdsti = MULT_i * LSDRAIN_i * ijunsti_d;
- idsatsbot = MULT_i * ABSOURCE_i * idsatbot;
- idsatssti = MULT_i * LSSOURCE_i * idsatsti;
- idsatsgat = MULT_i * LGSOURCE_i * idsatgat;
- idsatsbotd = MULT_i * ABDRAIN_i * idsatbot_d;
- idsatsstid = MULT_i * LSDRAIN_i * idsatsti_d;
- idsatsgatd = MULT_i * LGDRAIN_i * idsatgat_d;
- end
- ijs = MULT_i * ijun_s;
- ijd = MULT_i * ijun_d;
-
- vds = Vds;
- vgs = Vgs;
- vsb = Vsb;
- vto = VFB_i + P_D * facvsb0 + Gf * sqrt(phit1 * facvsb0);
- vts = vts_i;
- vth = vth_i;
- vgt = vgs - vth;
- vdss = Vdsat;
- vsat = Vds - vdss;
-
- temp = Ids + Iimpact + Igidl - Igcd - Igdov - ijun_d;
-`ifdef OPderiv
- gm = CHNL_TYPE * MULT_i * ddx(temp, V(GP));
- gmb = CHNL_TYPE * MULT_i * ddx(temp, V(BP));
- gds = CHNL_TYPE * MULT_i * ddx(temp, V(D));
-
- gjs = -MULT_i * ddx(ijun_s, V(S));
- gjd = -MULT_i * ddx(ijun_d, V(D));
-
- cdd = CHNL_TYPE * MULT_i * ddx(Qd, V(D));
- cdg = -CHNL_TYPE * MULT_i * ddx(Qd, V(GP));
- cdb = -CHNL_TYPE * MULT_i * ddx(Qd, V(BP));
- cds = cdd - cdg - cdb;
- cgd = -CHNL_TYPE * MULT_i * ddx(Qg, V(D));
- cgg = CHNL_TYPE * MULT_i * ddx(Qg, V(GP));
- cgb = -CHNL_TYPE * MULT_i * ddx(Qg, V(BP));
- cgs = cgg - cgd - cgb;
- csd = -CHNL_TYPE * MULT_i * ddx(Qs, V(D));
- csg = -CHNL_TYPE * MULT_i * ddx(Qs, V(GP));
- csb = -CHNL_TYPE * MULT_i * ddx(Qs, V(BP));
- css = csg + csd + csb;
- cbd = -CHNL_TYPE * MULT_i * ddx(Qb, V(D));
- cbg = -CHNL_TYPE * MULT_i * ddx(Qb, V(GP));
- cbb = CHNL_TYPE * MULT_i * ddx(Qb, V(BP));
- cbs = cbb - cbd - cbg;
- cgsol = CHNL_TYPE * MULT_i * ddx(Qfgs, V(GP));
- cgdol = CHNL_TYPE * MULT_i * ddx(Qfgd, V(GP));
-
- cjsbot = -MULT_i * CHNL_TYPE * ABSOURCE_i * ddx(qjunbot_s, V(S));
- cjsgat = -MULT_i * CHNL_TYPE * LGSOURCE_i * ddx(qjungat_s, V(S));
- cjssti = -MULT_i * CHNL_TYPE * LSSOURCE_i * ddx(qjunsti_s, V(S));
- cjs = cjsbot + cjsgat + cjssti;
- cjdbot = -MULT_i * CHNL_TYPE * ABDRAIN_i * ddx(qjunbot_d, V(D));
- cjdgat = -MULT_i * CHNL_TYPE * LGDRAIN_i * ddx(qjungat_d, V(D));
- cjdsti = -MULT_i * CHNL_TYPE * LSDRAIN_i * ddx(qjunsti_d, V(D));
- cjd = cjdbot + cjdgat + cjdsti;
-`endif // OPderiv
- end
-`ifdef LocalModel
- weff = 0;
- leff = 0;
-`else // LocalModel
- weff = WE;
- leff = LE;
-`endif // LocalModel
-
-`ifdef OPderiv
- if (abs(gds) < 1e-18) begin
- u = 0;
- rout = 0;
- vearly = 0;
- end else begin
- u = gm / gds;
- rout = 1.0 / gds;
- vearly = ide / gds;
- end
- if (abs(vgt) < 1e-12) begin
- beff = 0;
- end else begin
- beff = 2 * abs(ide) / (vgt * vgt);
- end
- if (abs(cgg + cgsol + cgdol) < 1e-30) begin
- fug = 0.0;
- end else begin
- fug = gm / (2 * `PI * (cgg + cgsol + cgdol));
- end
- rg_op = RG_i / MULT_i;
-
- sfl = MULT_i * Sfl;
- if (abs(gm) < 1e-18) begin
- sqrtsff = 0;
- sqrtsfw = 0;
- end else begin
- sqrtsff = sqrt(MULT_i * Sfl / 1000.0) / gm;
- sqrtsfw = sqrt(MULT_i) * sqid / gm;
- end
- sid = MULT_i * sqid * sqid;
- sig = MULT_i * nt * sig1k / (1 + sig1k * mig);
- cigid = c_igid;
- if (sid == 0) begin
- fknee = 0;
- end else begin
- fknee = sfl / sid;
- end
- siavl = MULT_i * shot_iavl;
- if (sigVds < 0) begin
- sigs = MULT_i * (shot_igcsx + shot_igdov);
- sigd = MULT_i * (shot_igcdx + shot_igsov);
- ssi = MULT_i * jnoisex_d;
- sdi = MULT_i * jnoisex_s;
- end else begin
- sigs = MULT_i * (shot_igcsx + shot_igsov);
- sigd = MULT_i * (shot_igcdx + shot_igdov);
- ssi = MULT_i * jnoisex_s;
- sdi = MULT_i * jnoisex_d;
- end
-`endif // OPderiv
-
- lp_vfb = VFB_i;
- lp_stvfb = STVFB_i;
- lp_tox = TOX_i;
- lp_epsrox = EPSROX_i;
- lp_neff = NEFF_i;
- lp_vnsub = VNSUB_i;
- lp_nslp = NSLP_i;
- lp_dnsub = DNSUB_i;
- lp_dphib = DPHIB_i;
- lp_np = NP_i;
- lp_ct = CT_i;
- lp_toxov = TOXOV_i;
- lp_toxovd = TOXOVD_i;
- lp_nov = NOV_i;
- lp_novd = NOVD_i;
- lp_cf = CF_i;
- lp_cfb = CFB_i;
- lp_betn = BETN_i;
- lp_stbet = STBET_i;
- lp_mue = MUE_i;
- lp_stmue = STMUE_i;
- lp_themu = THEMU_i;
- lp_stthemu = STTHEMU_i;
- lp_cs = CS_i;
- lp_stcs = STCS_i;
- lp_xcor = XCOR_i;
- lp_stxcor = STXCOR_i;
- lp_feta = FETA_i;
- lp_rs = RS_i;
- lp_strs = STRS_i;
- lp_rsb = RSB_i;
- lp_rsg = RSG_i;
- lp_thesat = THESAT_i;
- lp_stthesat = STTHESAT_i;
- lp_thesatb = THESATB_i;
- lp_thesatg = THESATG_i;
- lp_ax = AX_i;
- lp_alp = ALP_i;
- lp_alp1 = ALP1_i;
- lp_alp2 = ALP2_i;
- lp_vp = VP_i;
- lp_a1 = A1_i;
- lp_a2 = A2_i;
- lp_sta2 = STA2_i;
- lp_a3 = A3_i;
- lp_a4 = A4_i;
- lp_gco = GCO_i;
- lp_iginv = IGINV_i;
- lp_igov = IGOV_i;
- lp_igovd = IGOVD_i;
- lp_stig = STIG_i;
- lp_gc2 = GC2_i;
- lp_gc3 = GC3_i;
- lp_chib = CHIB_i;
- lp_agidl = AGIDL_i;
- lp_agidld = AGIDLD_i;
- lp_bgidl = BGIDL_T;
- lp_bgidld = BGIDLD_T;
- lp_stbgidl = STBGIDL_i;
- lp_stbgidld = STBGIDLD_i;
- lp_cgidl = CGIDL_i;
- lp_cgidld = CGIDLD_i;
- lp_cox = COX_i;
- lp_cgov = CGOV_i;
- lp_cgovd = CGOVD_i;
- lp_cgbov = CGBOV_i;
- lp_cfr = CFR_i;
- lp_cfrd = CFRD_i;
- lp_fnt = FNT_i;
- lp_fntexc = FNTEXC_i;
- lp_nfa = NFA_i;
- lp_nfb = NFB_i;
- lp_nfc = NFC_i;
- lp_ef = EF_i;
- lp_rg = RG_i;
- lp_rbulk = RBULK_i;
- lp_rwell = RWELL_i;
- lp_rjuns = RJUNS_i;
- lp_rjund = RJUND_i;
- tk = TKD;
- cjosbot = MULT_i * ABSOURCE_i * cjobot;
- cjossti = MULT_i * LSSOURCE_i * cjosti;
- cjosgat = MULT_i * LGSOURCE_i * cjogat;
- vbisbot = vbibot;
- vbissti = vbisti;
- vbisgat = vbigat;
- cjosbotd = MULT_i * ABDRAIN_i * cjobot_d;
- cjosstid = MULT_i * LSDRAIN_i * cjosti_d;
- cjosgatd = MULT_i * LGDRAIN_i * cjogat_d;
- vbisbotd = vbibot_d;
- vbisstid = vbisti_d;
- vbisgatd = vbigat_d;
-`ifdef NQSmodel
- lp_munqs = MUNQS_i;
-`endif // NQSmodel
- end // OPinfo
-
- end // evaluateblock
-
-end // analogBlock
diff --git a/src/spicelib/devices/adms/psp102/admsva/PSP102_nqs_macrodefs.include b/src/spicelib/devices/adms/psp102/admsva/PSP102_nqs_macrodefs.include
deleted file mode 100644
index ac83f4e6d..000000000
--- a/src/spicelib/devices/adms/psp102/admsva/PSP102_nqs_macrodefs.include
+++ /dev/null
@@ -1,121 +0,0 @@
-//======================================================================================
-//======================================================================================
-// Filename: PSP102_nqs_macrodefs.include
-//======================================================================================
-//======================================================================================
-//
-// (c) Copyright notice
-//
-// Since 2012 until today, PSP has been co-developed by NXP Semiconductors and
-// Delft University of Technology. For this part of the model, each claim undivided
-// ownership and copyrights
-// Until and including 2011, PSP has been co-developed by NXP Semiconductors and
-// Arizona State University. For this part of the model, NXP Semiconductors claims
-// undivided ownership and copyrights.
-//
-//
-// Version: 102.5.0, December 2013
-//
-//======================================================================================
-//======================================================================================
-//
-// Further information can be found in the file releasenotesPSP102.txt
-//
-
-//////////////////////////////////////////
-//
-// Macros used in PSP-NQS
-//
-//////////////////////////////////////////
-
-// Function to calculate bulk charge from surface potential
-`define PhiToQb(phi,Qb_tmp) \
- if (abs(phi) <= margin) \
- Qb_tmp = -0.70710678 * phi * Gf * (1.0 - `oneSixth * phi * (1.0 - `oneSixth * phi)); \
- else begin \
- `expl((-phi), temp) \
- Qb_tmp = Gf * sqrt(temp + phi - 1.0); \
- if (phi > margin) \
- Qb_tmp = -Qb_tmp; \
- end
-
-// Function used in fq-macro
-`define PhiTod2Qis(xphi,d2Qis) \
- if (abs(xphi) <= margin) begin \
- Qb_tmp = -0.70710678 * xphi * Gf * (1.0 - `oneSixth * xphi * (1.0 - `oneSixth * xphi)); \
- dQbs = -0.70710678 * Gf * (1.0 - `oneThird * xphi * (1.0 - 0.25 * xphi)); \
- d2Qis = -0.235702 * Gf * (1.0 - 0.5 * xphi); \
- end else begin \
- `expl((-xphi),temp) \
- Qb_tmp = Gf * sqrt(temp + xphi - 1.0); \
- if (xphi > margin) \
- Qb_tmp = -Qb_tmp; \
- dQbs = 0.5 * Gf2 * (1.0 - temp) / Qb_tmp; \
- d2Qis = (dQbs * dQbs - 0.5 * Gf * Gf) / Qb_tmp + dQbs; \
- end
-
-
-// Function used in QiToPhi
-`define sps(sp, xg) \
- if (abs(xg) <= marginp) begin \
- sp = xg / a_factrp; \
- end else begin \
- if (xg < -marginp) begin \
- NQS_yg = -xg; \
- NQS_z = 1.25 * NQS_yg / a_factrp; \
- NQS_eta = (NQS_z + 10.0 - sqrt((NQS_z - 6.0) * (NQS_z - 6.0) + 64.0)) * 0.5; \
- NQS_a = (NQS_yg - NQS_eta) * (NQS_yg - NQS_eta) + Gp2 * (NQS_eta + 1.0); \
- NQS_c = 2.0 * (NQS_yg - NQS_eta) - Gp2; \
- NQS_tau = ln(NQS_a / Gp2) - NQS_eta; \
- `sigma(NQS_a, NQS_c, NQS_tau, NQS_eta, NQS_y0) \
- `expl(NQS_y0, NQS_D0) \
- NQS_xi = 1.0 - Gp2 * NQS_D0 * 0.5; \
- NQS_p = 2.0 * (NQS_yg - NQS_y0) + Gp2 * (NQS_D0 - 1.0); \
- NQS_q = (NQS_yg - NQS_y0) * (NQS_yg - NQS_y0) + Gp2 * (NQS_y0 + 1.0 - NQS_D0); \
- NQS_temp = NQS_p * NQS_p - 4.0 * NQS_xi * NQS_q; \
- NQS_w = 2.0 * NQS_q / (NQS_p + sqrt(NQS_temp)); \
- sp = -(NQS_y0 + NQS_w); \
- end else begin \
- NQS_xg1 = 1.0 / ( 1.25 + 7.32464877560822e-01 * Gp); \
- NQS_A_fac = (1.25 * a_factrp * NQS_xg1 - 1.0) * NQS_xg1; \
- NQS_xbar = xg / a_factrp * (1.0 + NQS_A_fac * xg); \
- `expl(-NQS_xbar, NQS_temp) \
- NQS_w = 1.0 - NQS_temp; \
- NQS_x0 = xg + Gp2 * 0.5 - Gp * sqrt(xg + Gp2 * 0.25 - NQS_w); \
- `expl((-NQS_x0), NQS_D0) \
- NQS_xi = 1.0 - Gp2 * 0.5 * NQS_D0; \
- NQS_p = 2.0 * (xg - NQS_x0) + Gp2 * (1.0 - NQS_D0); \
- NQS_q = (xg - NQS_x0) * (xg - NQS_x0) - Gp2 * (NQS_x0 - 1.0 + NQS_D0); \
- NQS_temp = NQS_p * NQS_p - 4.0 * NQS_xi * NQS_q; \
- NQS_u = 2.0 * NQS_q / (NQS_p + sqrt(NQS_temp)); \
- sp = NQS_x0 + NQS_u; \
- end \
- end
-
-
-// Function to calculate surface potential from inversion charge
-`define QiToPhi(Qi,xg,xphi) \
- temp = Qi / pd + xg; \
- `sps(xphi,temp)
-
-// Calculation of fk
-`define fq(Qi,xg,dQy,d2Qy,fk) \
- `QiToPhi(Qi, xg, xphi) \
- `PhiTod2Qis(xphi, d2Qis) \
- dQis = pd - dQbs; \
- dQis_1 = 1.0 / dQis; \
- fQi = Qi * dQis_1 - 1.0; \
- dfQi = (1.0 - Qi * d2Qis * dQis_1 * dQis_1) * dQis_1; \
- fk0 = dfQi * dQy * dQy + fQi * d2Qy; \
- dpsy2 = dQy * dQy * dQis_1 * dQis_1; \
- zsat = thesat2 * dpsy2; \
- if (CHNL_TYPE == `PMOS) \
- zsat = zsat / (1.0 + thesat1 * dps); \
- temp = sqrt(1.0 + 2.0 * zsat); \
- Fvsat = 2.0 / (1.0 + temp); \
- temp1 = d2Qy - dpsy2 * d2Qis; \
- fk = Fvsat * (fk0 - zsat * fQi * temp1 * Fvsat / temp);
-
-// Interpolation of surface potential along channel
-`define Phiy(y) \
- x_m + H * (1.0 - sqrt(1.0 - 2.0 * dps / H * ((y) - ym))) * inv_phit1
diff --git a/src/spicelib/devices/adms/psp102/admsva/psp102.va b/src/spicelib/devices/adms/psp102/admsva/psp102.va
deleted file mode 100644
index ab4fb88b4..000000000
--- a/src/spicelib/devices/adms/psp102/admsva/psp102.va
+++ /dev/null
@@ -1,53 +0,0 @@
-//======================================================================================
-//======================================================================================
-// Filename: psp102.va
-//======================================================================================
-//======================================================================================
-//
-// (c) Copyright notice
-//
-// Since 2012 until today, PSP has been co-developed by NXP Semiconductors and
-// Delft University of Technology. For this part of the model, each claim undivided
-// ownership and copyrights
-// Until and including 2011, PSP has been co-developed by NXP Semiconductors and
-// Arizona State University. For this part of the model, NXP Semiconductors claims
-// undivided ownership and copyrights.
-//
-//
-// Version: 102.5.0, December 2013
-//
-//======================================================================================
-//======================================================================================
-//
-// Further information can be found in the file releasenotesPSP102.txt
-//
-
-`include "discipline.h"
-
-`include "Common102_macrodefs.include"
-
-`include "JUNCAP200_macrodefs.include"
-
-`include "PSP102_macrodefs.include"
-
-//`define Binning true
-//`define LocalModel true
-//`define NQSmodel true
-
-// Note: some verilog-A compilers have problems handling the ddx-operator,
-// which occurs in definition of OP-output variables. If the line below is
-// commented out, all OP-output variables using the ddx-operator are skipped.
-`define OPderiv
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// PSP global model code
-//
-/////////////////////////////////////////////////////////////////////////////
-
-
-module PSP102VA(D, G, S, B);
-
-`include "PSP102_module.include"
-
-endmodule
diff --git a/src/spicelib/devices/adms/psp102/admsva/releasenotesPSP102.txt b/src/spicelib/devices/adms/psp102/admsva/releasenotesPSP102.txt
deleted file mode 100644
index e2dbbc93a..000000000
--- a/src/spicelib/devices/adms/psp102/admsva/releasenotesPSP102.txt
+++ /dev/null
@@ -1,102 +0,0 @@
-======================================================================================
-======================================================================================
-
- ---------------------------
- Verilog-A definition of PSP
- ---------------------------
-
-
- (c) Copyright notice
-
- Since 2012 until today, PSP has been co-developed by NXP Semiconductors and
- Delft University of Technology. For this part of the model, each claim undivided
- ownership and copyrights
- Until and including 2011, PSP has been co-developed by NXP Semiconductors and
- Arizona State University. For this part of the model, NXP Semiconductors claims
- undivided ownership and copyrights.
-
-
- Version: PSP 102.5.0 (including JUNCAP2 200.4.0), December 2013
-
- This version of PSP is contained in SiMKit 4.2
-
-======================================================================================
-======================================================================================
-
- Authors: G.D.J. Smit, A.J. Scholten, and D.B.M. Klaassen (NXP Semiconductors)
- R. van der Toorn (Delft University of Technology)
-
- Former contributers:
- G. Gildenblat, W. Yao, Z. Zhu, X. Li and W. Wu (Arizona State University)
- R. van Langevelde (Philips Research)
-
- The most recent version of the model code, the documentation, and contact
- information can be found on:
-
- http://psp.ewi.tudelft.nl/
-
-======================================================================================
-======================================================================================
-
-This package consists of the following files:
-
- - releasenotesPSP102.txt This file
-
- - psp102.va Main file for global ("geometrical") model
- - psp102b.va Main file for global binning model
- - psp102e.va Main file for local ("electrical") model
- - psp102_nqs.va Main file for global ("geometrical") model with NQS-effects
- - psp102b_nqs.va Main file for global binning model with NQS-effects
- - psp102e_nqs.va Main file for local ("electrical") model with NQS-effects
-
- - Common102_macrodefs.include Common macro definitions
- - PSP102_macrodefs.include Macro definitions for PSP
- - PSP102_module.include Actual model code for intrinsic MOS model
- - PSP102_binning.include Geometry scaling equation for binning
- - PSP102_binpars.include Parameterlist for global PSP binning model
- - PSP102_nqs_macrodefs.include Macro definitions for PSP-NQS
- - PSP102_InitNQS.include PSP-NQS initialization code
- - PSP102_ChargesNQS.include Calculation of NQS-charge contributions
- - JUNCAP200_macrodefs.include Macro definitions for JUNCAP2 model
- - JUNCAP200_parlist.include JUNCAP2 parameter list
- - JUNCAP200_varlist1.include JUNCAP2 variable declarations
- - JUNCAP200_varlist2.include JUNCAP2 variable declarations
- - JUNCAP200_InitModel.include JUNCAP2 model initialization code
-
-======================================================================================
-======================================================================================
-
-Usage
------
-
-Depending which model one wants to use, one should compile one of the seven .va-files
-(psp102.va, psp102b.va, psp102e.va, psp102_nqs.va, psp102b_nqs.va, and psp102e_nqs.va).
-The module names are "PSP102VA" and "PSPNQS102VA" for the global PSP-model (QS and
-NQS, respectively), and similarly "PSP102BVA" and "PSPNQS102BVA" for the binning
-PSP-model, "PSP102EVA" and "PSPNQS102EVA" for the local PSP-model.
-
-For the stand-alone version of JUNCAP2, version 200.4.0, please refer to the distribution
-of PSP103.
-
-======================================================================================
-======================================================================================
-
-Release notes vA-code of PSP 102.5.0 (December 2013)
-----------------------------------------------------
-
-Changes:
-
-- Added excess noise model.
-- Solved minor numerical issue in avalanche current calculation (occurring when A4 is
- large and the body is forward biased).
-- Fixed missing T-scaling in OP-output variables lp_bgidl and lp_bgidld.
-
-PSP 102.5.0 is backwards compatible with the previous version, PSP 102.4.0.
-
-======================================================================================
-======================================================================================
-
-The authors want to thank Laurent Lemaitre and Colin McAndrew (Freescale)
-for their help with ADMS and the implementation of the model code. Geoffrey
-Coram (Analog Devices) is acknowledged for input concerning the Verilog-A
-implementation of the model.
diff --git a/src/spicelib/devices/adms/psp103/admsva/Common103_macrodefs.include b/src/spicelib/devices/adms/psp103/admsva/Common103_macrodefs.include
deleted file mode 100644
index 9f86b8c8d..000000000
--- a/src/spicelib/devices/adms/psp103/admsva/Common103_macrodefs.include
+++ /dev/null
@@ -1,176 +0,0 @@
-//======================================================================================
-//======================================================================================
-// Filename: Common103_macrodefs.include
-//======================================================================================
-//======================================================================================
-//
-// (c) Copyright notice
-//
-// Since 2015 until today, PSP has been co-developed by NXP Semiconductors and
-// CEA-Leti. For this part of the model, each claim undivided ownership and copyrights
-// Since 2012 until 2015, PSP has been co-developed by NXP Semiconductors and
-// Delft University of Technology. For this part of the model, each claim undivided
-// ownership and copyrights
-// Until and including 2011, PSP has been co-developed by NXP Semiconductors and
-// Arizona State University. For this part of the model, NXP Semiconductors claims
-// undivided ownership and copyrights.
-//
-//
-// Version: 103.7.0 (PSP), 200.6.0 (JUNCAP), April 2019
-//
-//======================================================================================
-//======================================================================================
-//
-// Further information can be found in the file releasenotesPSP103.txt
-//
-
-//////////////////////////////////////////////////////////////
-//
-// General macros and constants for compact va-models
-//
-//////////////////////////////////////////////////////////////
-
-// Clipping functions
-`define CLIP_LOW(val,min) ((val)>(min)?(val):(min))
-`define CLIP_HIGH(val,max) ((val)<(max)?(val):(max))
-`define CLIP_BOTH(val,min,max) ((val)>(min)?((val)<(max)?(val):(max)):(min))
-
-`ifdef insideADMS
- `define INITIAL_MODEL @(initial_model)
- `define INITIAL_INSTANCE @(initial_instance)
- `define from(lower,upper) from [lower:upper]
-`else
- `define INITIAL_MODEL
- `define INITIAL_INSTANCE
- `define from(lower,upper)
-`endif
-
-// Min/Max functions
-`define MAX(x,y) ((x)>(y)?(x):(y))
-`define MIN(x,y) ((x)<(y)?(x):(y))
-
-// Mathematical constants
-`define PI 3.1415926535897931
-`define SQRTPI 1.77245385090551603
-
-// Physical constants
-`define KELVINCONVERSION 273.15
-`define KBOL 1.3806505E-23
-`define QELE 1.6021918E-19
-`define HBAR 1.05457168E-34
-`define MELE 9.1093826E-31
-`define EPSO 8.8541878176E-12
-`define EPSRSI 11.8
-
-// Other constants
-`define oneThird 3.3333333333333333e-01
-`define twoThirds 6.6666666666666667e-01
-
-// Constants needed in safe exponential function (called "expl")
-`define se 4.6051701859880916e+02
-`define se05 2.3025850929940458e+02
-`define ke 1.0e-200
-`define ke05 1.0e-100
-`define keinv 1.0e200
-`define ke05inv 1.0e100
-
-// P3 3rd order polynomial expansion of exp()
-`define P3(u) (1.0 + (u) * (1.0 + 0.5 * ((u) * (1.0 + (u) * `oneThird))))
-
-// expl exp() with 3rd order polynomial extrapolation for very low values (exp_low),
-// very high values (exp_high), or both (expl)
-`define expl(x, res) \
- if (abs(x) < `se05) begin\
- res = exp(x); \
- end else begin \
- if ((x) < 0.0) begin\
- res = `ke05 / `P3(-`se05 - (x)); \
- end else begin\
- res = `ke05inv * `P3((x) - `se05); \
- end \
- end
-
-`define expl_low(x, res) \
- if ((x) > -`se05) begin\
- res = exp(x); \
- end else begin\
- res = `ke05 / `P3(-`se05 - (x)); \
- end
-
-`define expl_high(x, res) \
- if ((x) < `se05) begin\
- res = exp(x); \
- end else begin \
- res = `ke05inv * `P3((x) - `se05); \
- end
-
-// Exchange function
-`define swap(a, b) \
- temp = a; \
- a = b; \
- b = temp;
-
-// Parameter definition macros: "des" description argument is intended to
-// be a short description, the "inf" information argument is intended to be
-// a detailed description (e.g. for display as part of on-line help).
-//
-// MPR model parameter real
-// MPI model parameter integer
-// IPR instance parameter real
-// IPI instance parameter integer
-// OPP operating point parameter, includes units and description for printing
-// OPM operating point parameter, scales with $mfactor
-// OPD operating point parameter, scales with 1/$mfactor
-//
-// Instance parameters have the attribute *type="instance"* and note that
-// compilers treat these as both instance and model parameters, with a
-// specified instance value taking precedence over a specified model card value.
-//
-// There are some issues with passing range directives with some compilers,
-// so for each parameter declaration there are multiple versions:
-// cc closed lower bound, closed upper bound
-// co closed lower bound, open upper bound
-// cz closed lower bound of zero (no upper bound)
-// oc open lower bound, closed upper bound
-// oo open lower bound, open upper bound
-// oz open lower bound of zero (no upper bound)
-// nb no bounds
-// sw switch (integer only, values 0=false and >0=true)
-// ty switch (integer only, values -1=n-type and +1=p-type)
-//
-
-`define ALIAS(alias,paramName) aliasparam alias = paramName;
-`define OPP(nam,uni,des) (*units=uni, desc=des*) real nam;
-`define OPM(nam,uni,des) (*units=uni, multiplicity="multiply", desc=des*) real nam;
-`define OPD(nam,uni,des) (*units=uni, multiplicity="divide", desc=des*) real nam;
-`define MPRcc(nam,def,uni,lwr,upr,des) (*units=uni , desc=des*) parameter real nam=def from[lwr:upr];
-`define MPRco(nam,def,uni,lwr,upr,des) (*units=uni , desc=des*) parameter real nam=def from[lwr:upr);
-`define MPRcz(nam,def,uni, des) (*units=uni , desc=des*) parameter real nam=def from[ 0:inf);
-`define MPRoc(nam,def,uni,lwr,upr,des) (*units=uni , desc=des*) parameter real nam=def from(lwr:upr];
-`define MPRoo(nam,def,uni,lwr,upr,des) (*units=uni , desc=des*) parameter real nam=def from(lwr:upr);
-`define MPRoz(nam,def,uni, des) (*units=uni , desc=des*) parameter real nam=def from( 0:inf);
-`define MPRnb(nam,def,uni, des) (*units=uni , desc=des*) parameter real nam=def;
-`define MPIcc(nam,def,uni,lwr,upr,des) (*units=uni , desc=des*) parameter integer nam=def from[lwr:upr];
-`define MPIco(nam,def,uni,lwr,upr,des) (*units=uni , desc=des*) parameter integer nam=def from[lwr:upr);
-`define MPIcz(nam,def,uni, des) (*units=uni , desc=des*) parameter integer nam=def from[ 0:inf);
-`define MPIoc(nam,def,uni,lwr,upr,des) (*units=uni , desc=des*) parameter integer nam=def from(lwr:upr];
-`define MPIoo(nam,def,uni,lwr,upr,des) (*units=uni , desc=des*) parameter integer nam=def from(lwr:upr);
-`define MPIoz(nam,def,uni, des) (*units=uni , desc=des*) parameter integer nam=def from( 0:inf);
-`define MPInb(nam,def,uni, des) (*units=uni , desc=des*) parameter integer nam=def;
-`define MPIsw(nam,def,uni, des) (*units=uni , desc=des*) parameter integer nam=def from[ 0:inf);
-`define MPIty(nam,def,uni, des) (*units=uni , desc=des*) parameter integer nam=def from[ -1: 1] exclude 0;
-`define IPRcc(nam,def,uni,lwr,upr,des) (*units=uni, type="instance", desc=des*) parameter real nam=def from[lwr:upr];
-`define IPRco(nam,def,uni,lwr,upr,des) (*units=uni, type="instance", desc=des*) parameter real nam=def from[lwr:upr);
-`define IPRcz(nam,def,uni, des) (*units=uni, type="instance", desc=des*) parameter real nam=def from[ 0:inf);
-`define IPRoc(nam,def,uni,lwr,upr,des) (*units=uni, type="instance", desc=des*) parameter real nam=def from(lwr:upr];
-`define IPRoo(nam,def,uni,lwr,upr,des) (*units=uni, type="instance", desc=des*) parameter real nam=def from(lwr:upr);
-`define IPRoz(nam,def,uni, des) (*units=uni, type="instance", desc=des*) parameter real nam=def from( 0:inf);
-`define IPRnb(nam,def,uni, des) (*units=uni, type="instance", desc=des*) parameter real nam=def;
-`define IPIcc(nam,def,uni,lwr,upr,des) (*units=uni, type="instance", desc=des*) parameter integer nam=def from[lwr:upr];
-`define IPIco(nam,def,uni,lwr,upr,des) (*units=uni, type="instance", desc=des*) parameter integer nam=def from[lwr:upr);
-`define IPIcz(nam,def,uni, des) (*units=uni, type="instance", desc=des*) parameter integer nam=def from[ 0:inf);
-`define IPIoc(nam,def,uni,lwr,upr,des) (*units=uni, type="instance", desc=des*) parameter integer nam=def from(lwr:upr];
-`define IPIoo(nam,def,uni,lwr,upr,des) (*units=uni, type="instance", desc=des*) parameter integer nam=def from(lwr:upr);
-`define IPIoz(nam,def,uni, des) (*units=uni, type="instance", desc=des*) parameter integer nam=def from( 0:inf);
-`define IPInb(nam,def,uni, des) (*units=uni, type="instance", desc=des*) parameter integer nam=def;
-`define IPIsw(nam,def,uni, des) (*units=uni, type="instance", desc=des*) parameter integer nam=def from[ 0:inf);
diff --git a/src/spicelib/devices/adms/psp103/admsva/JUNCAP200_InitModel.include b/src/spicelib/devices/adms/psp103/admsva/JUNCAP200_InitModel.include
deleted file mode 100644
index 3326002f5..000000000
--- a/src/spicelib/devices/adms/psp103/admsva/JUNCAP200_InitModel.include
+++ /dev/null
@@ -1,406 +0,0 @@
-//======================================================================================
-//======================================================================================
-// Filename: JUNCAP200_InitModel.include
-//======================================================================================
-//======================================================================================
-//
-// (c) Copyright notice
-//
-// Since 2015 until today, PSP has been co-developed by NXP Semiconductors and
-// CEA-Leti. For this part of the model, each claim undivided ownership and copyrights
-// Since 2012 until 2015, PSP has been co-developed by NXP Semiconductors and
-// Delft University of Technology. For this part of the model, each claim undivided
-// ownership and copyrights
-// Until and including 2011, PSP has been co-developed by NXP Semiconductors and
-// Arizona State University. For this part of the model, NXP Semiconductors claims
-// undivided ownership and copyrights.
-//
-//
-// Version: 200.6.0, April 2019
-//
-//======================================================================================
-//======================================================================================
-//
-// Further information can be found in the file releasenotesPSP103.txt
-//
-
-// --------------------------------------------------------------------------------------------------------------
-// Calculation of internal parameters which are independent on instance parameters
-// --------------------------------------------------------------------------------------------------------------
-
-TRJ_i = `CLIP_LOW( TRJ ,`TRJ_cliplow);
-IMAX_i = `CLIP_LOW( IMAX ,`IMAX_cliplow);
-FREV_i = `CLIP_BOTH(FREV ,`FREV_cliplow,`FREV_cliphigh);
-//IFACTOR_i = `CLIP_LOW( IFACTOR ,`IFACTOR_cliplow);
-//CFACTOR_i = `CLIP_LOW( CFACTOR ,`CFACTOR_cliplow);
-
-CJORBOT_i = `CLIP_LOW( CJORBOT ,`CJORBOT_cliplow);
-CJORSTI_i = `CLIP_LOW( CJORSTI ,`CJORSTI_cliplow);
-CJORGAT_i = `CLIP_LOW( CJORGAT ,`CJORGAT_cliplow);
-VBIRBOT_i = `CLIP_LOW( VBIRBOT ,`VBIR_cliplow);
-VBIRSTI_i = `CLIP_LOW( VBIRSTI ,`VBIR_cliplow);
-VBIRGAT_i = `CLIP_LOW( VBIRGAT ,`VBIR_cliplow);
-PBOT_i = `CLIP_BOTH(PBOT ,`P_cliplow,`P_cliphigh);
-PSTI_i = `CLIP_BOTH(PSTI ,`P_cliplow,`P_cliphigh);
-PGAT_i = `CLIP_BOTH(PGAT ,`P_cliplow,`P_cliphigh);
-PHIGBOT_i = PHIGBOT;
-PHIGSTI_i = PHIGSTI;
-PHIGGAT_i = PHIGGAT;
-IDSATRBOT_i = `CLIP_LOW( IDSATRBOT ,`IDSATR_cliplow);
-IDSATRSTI_i = `CLIP_LOW( IDSATRSTI ,`IDSATR_cliplow);
-IDSATRGAT_i = `CLIP_LOW( IDSATRGAT ,`IDSATR_cliplow);
-CSRHBOT_i = `CLIP_LOW( CSRHBOT ,`CSRH_cliplow);
-CSRHSTI_i = `CLIP_LOW( CSRHSTI ,`CSRH_cliplow);
-CSRHGAT_i = `CLIP_LOW( CSRHGAT ,`CSRH_cliplow);
-XJUNSTI_i = `CLIP_LOW( XJUNSTI ,`XJUN_cliplow);
-XJUNGAT_i = `CLIP_LOW( XJUNGAT ,`XJUN_cliplow);
-CTATBOT_i = `CLIP_LOW( CTATBOT ,`CTAT_cliplow);
-CTATSTI_i = `CLIP_LOW( CTATSTI ,`CTAT_cliplow);
-CTATGAT_i = `CLIP_LOW( CTATGAT ,`CTAT_cliplow);
-MEFFTATBOT_i = `CLIP_LOW( MEFFTATBOT ,`MEFFTAT_cliplow);
-MEFFTATSTI_i = `CLIP_LOW( MEFFTATSTI ,`MEFFTAT_cliplow);
-MEFFTATGAT_i = `CLIP_LOW( MEFFTATGAT ,`MEFFTAT_cliplow);
-CBBTBOT_i = `CLIP_LOW( CBBTBOT ,`CBBT_cliplow);
-CBBTSTI_i = `CLIP_LOW( CBBTSTI ,`CBBT_cliplow);
-CBBTGAT_i = `CLIP_LOW( CBBTGAT ,`CBBT_cliplow);
-FBBTRBOT_i = FBBTRBOT;
-FBBTRSTI_i = FBBTRSTI;
-FBBTRGAT_i = FBBTRGAT;
-STFBBTBOT_i = STFBBTBOT;
-STFBBTSTI_i = STFBBTSTI;
-STFBBTGAT_i = STFBBTGAT;
-VBRBOT_i = `CLIP_LOW( VBRBOT ,`VBR_cliplow);
-VBRSTI_i = `CLIP_LOW( VBRSTI ,`VBR_cliplow);
-VBRGAT_i = `CLIP_LOW( VBRGAT ,`VBR_cliplow);
-PBRBOT_i = `CLIP_LOW( PBRBOT ,`PBR_cliplow);
-PBRSTI_i = `CLIP_LOW( PBRSTI ,`PBR_cliplow);
-PBRGAT_i = `CLIP_LOW( PBRGAT ,`PBR_cliplow);
-
-SWJUNEXP_i = 0.0;
-if (SWJUNEXP > 0.5) begin
- SWJUNEXP_i = 1.0;
-end else begin
- SWJUNEXP_i = 0.0;
-end
-
-VJUNREF_i = `CLIP_LOW( VJUNREF ,`VJUNREF_cliplow);
-FJUNQ_i = `CLIP_LOW( FJUNQ ,`FJUNQ_cliplow);
-
-`ifdef JUNCAP_StandAlone
- // do nothing
-`else // JUNCAP_StandAlone
- if (SWJUNASYM == 0.0) begin
- CJORBOTD_i = CJORBOT_i;
- CJORSTID_i = CJORSTI_i;
- CJORGATD_i = CJORGAT_i;
- VBIRBOTD_i = VBIRBOT_i;
- VBIRSTID_i = VBIRSTI_i;
- VBIRGATD_i = VBIRGAT_i;
- PBOTD_i = PBOT_i;
- PSTID_i = PSTI_i;
- PGATD_i = PGAT_i;
- PHIGBOTD_i = PHIGBOT_i;
- PHIGSTID_i = PHIGSTI_i;
- PHIGGATD_i = PHIGGAT_i;
- IDSATRBOTD_i = IDSATRBOT_i;
- IDSATRSTID_i = IDSATRSTI_i;
- IDSATRGATD_i = IDSATRGAT_i;
- CSRHBOTD_i = CSRHBOT_i;
- CSRHSTID_i = CSRHSTI_i;
- CSRHGATD_i = CSRHGAT_i;
- XJUNSTID_i = XJUNSTI_i;
- XJUNGATD_i = XJUNGAT_i;
- CTATBOTD_i = CTATBOT_i;
- CTATSTID_i = CTATSTI_i;
- CTATGATD_i = CTATGAT_i;
- MEFFTATBOTD_i = MEFFTATBOT_i;
- MEFFTATSTID_i = MEFFTATSTI_i;
- MEFFTATGATD_i = MEFFTATGAT_i;
- CBBTBOTD_i = CBBTBOT_i;
- CBBTSTID_i = CBBTSTI_i;
- CBBTGATD_i = CBBTGAT_i;
- FBBTRBOTD_i = FBBTRBOT_i;
- FBBTRSTID_i = FBBTRSTI_i;
- FBBTRGATD_i = FBBTRGAT_i;
- STFBBTBOTD_i = STFBBTBOT_i;
- STFBBTSTID_i = STFBBTSTI_i;
- STFBBTGATD_i = STFBBTGAT_i;
- VBRBOTD_i = VBRBOT_i;
- VBRSTID_i = VBRSTI_i;
- VBRGATD_i = VBRGAT_i;
- PBRBOTD_i = PBRBOT_i;
- PBRSTID_i = PBRSTI_i;
- PBRGATD_i = PBRGAT_i;
- VJUNREFD_i = VJUNREF_i;
- FJUNQD_i = FJUNQ_i;
- end else begin
- CJORBOTD_i = `CLIP_LOW( CJORBOTD ,`CJORBOT_cliplow);
- CJORSTID_i = `CLIP_LOW( CJORSTID ,`CJORSTI_cliplow);
- CJORGATD_i = `CLIP_LOW( CJORGATD ,`CJORGAT_cliplow);
- VBIRBOTD_i = `CLIP_LOW( VBIRBOTD ,`VBIR_cliplow);
- VBIRSTID_i = `CLIP_LOW( VBIRSTID ,`VBIR_cliplow);
- VBIRGATD_i = `CLIP_LOW( VBIRGATD ,`VBIR_cliplow);
- PBOTD_i = `CLIP_BOTH(PBOTD ,`P_cliplow,`P_cliphigh);
- PSTID_i = `CLIP_BOTH(PSTID ,`P_cliplow,`P_cliphigh);
- PGATD_i = `CLIP_BOTH(PGATD ,`P_cliplow,`P_cliphigh);
- PHIGBOTD_i = PHIGBOTD;
- PHIGSTID_i = PHIGSTID;
- PHIGGATD_i = PHIGGATD;
- IDSATRBOTD_i = `CLIP_LOW( IDSATRBOTD ,`IDSATR_cliplow);
- IDSATRSTID_i = `CLIP_LOW( IDSATRSTID ,`IDSATR_cliplow);
- IDSATRGATD_i = `CLIP_LOW( IDSATRGATD ,`IDSATR_cliplow);
- CSRHBOTD_i = `CLIP_LOW( CSRHBOTD ,`CSRH_cliplow);
- CSRHSTID_i = `CLIP_LOW( CSRHSTID ,`CSRH_cliplow);
- CSRHGATD_i = `CLIP_LOW( CSRHGATD ,`CSRH_cliplow);
- XJUNSTID_i = `CLIP_LOW( XJUNSTID ,`XJUN_cliplow);
- XJUNGATD_i = `CLIP_LOW( XJUNGATD ,`XJUN_cliplow);
- CTATBOTD_i = `CLIP_LOW( CTATBOTD ,`CTAT_cliplow);
- CTATSTID_i = `CLIP_LOW( CTATSTID ,`CTAT_cliplow);
- CTATGATD_i = `CLIP_LOW( CTATGATD ,`CTAT_cliplow);
- MEFFTATBOTD_i = `CLIP_LOW( MEFFTATBOTD,`MEFFTAT_cliplow);
- MEFFTATSTID_i = `CLIP_LOW( MEFFTATSTID,`MEFFTAT_cliplow);
- MEFFTATGATD_i = `CLIP_LOW( MEFFTATGATD,`MEFFTAT_cliplow);
- CBBTBOTD_i = `CLIP_LOW( CBBTBOTD ,`CBBT_cliplow);
- CBBTSTID_i = `CLIP_LOW( CBBTSTID ,`CBBT_cliplow);
- CBBTGATD_i = `CLIP_LOW( CBBTGATD ,`CBBT_cliplow);
- FBBTRBOTD_i = FBBTRBOTD;
- FBBTRSTID_i = FBBTRSTID;
- FBBTRGATD_i = FBBTRGATD;
- STFBBTBOTD_i = STFBBTBOTD;
- STFBBTSTID_i = STFBBTSTID;
- STFBBTGATD_i = STFBBTGATD;
- VBRBOTD_i = `CLIP_LOW( VBRBOTD ,`VBR_cliplow);
- VBRSTID_i = `CLIP_LOW( VBRSTID ,`VBR_cliplow);
- VBRGATD_i = `CLIP_LOW( VBRGATD ,`VBR_cliplow);
- PBRBOTD_i = `CLIP_LOW( PBRBOTD ,`PBR_cliplow);
- PBRSTID_i = `CLIP_LOW( PBRSTID ,`PBR_cliplow);
- PBRGATD_i = `CLIP_LOW( PBRGATD ,`PBR_cliplow);
- VJUNREFD_i = `CLIP_LOW( VJUNREFD ,`VJUNREF_cliplow);
- FJUNQD_i = `CLIP_LOW( FJUNQD ,`FJUNQ_cliplow);
- end
-`endif // JUNCAP_StandAlone
-
-tkr = `KELVINCONVERSION + TRJ_i;
-tkd = max($temperature + DTA, `KELVINCONVERSION + `MINTEMP);
-auxt = tkd / tkr;
-KBOL_over_QELE = `KBOL / `QELE;
-phitr = KBOL_over_QELE * tkr;
-phitrinv = 1.0 / phitr;
-phitd = KBOL_over_QELE * tkd;
-phitdinv = 1.0 / phitd;
-
-// bandgap voltages at reference temperature
-deltaphigr = -(7.02e-4 * tkr * tkr) / (1108.0 + tkr);
-phigrbot = PHIGBOT_i + deltaphigr;
-phigrsti = PHIGSTI_i + deltaphigr;
-phigrgat = PHIGGAT_i + deltaphigr;
-
-// bandgap voltages at device temperature
-deltaphigd = -(7.02e-4 * tkd * tkd) / (1108.0 + tkd);
-phigdbot = PHIGBOT_i + deltaphigd;
-phigdsti = PHIGSTI_i + deltaphigd;
-phigdgat = PHIGGAT_i + deltaphigd;
-
-// factors ftd for ideal-current model
-ftdbot = (pow(auxt, 1.5)) * exp(0.5 * ((phigrbot * phitrinv) - (phigdbot * phitdinv)));
-ftdsti = (pow(auxt, 1.5)) * exp(0.5 * ((phigrsti * phitrinv) - (phigdsti * phitdinv)));
-ftdgat = (pow(auxt, 1.5)) * exp(0.5 * ((phigrgat * phitrinv) - (phigdgat * phitdinv)));
-
-// temperature-scaled saturation current for ideal-current model
-idsatbot = IDSATRBOT_i * ftdbot * ftdbot;
-idsatsti = IDSATRSTI_i * ftdsti * ftdsti;
-idsatgat = IDSATRGAT_i * ftdgat * ftdgat;
-
-// built-in voltages before limiting
-ubibot = VBIRBOT_i * auxt - 2.0 * phitd * ln(ftdbot);
-ubisti = VBIRSTI_i * auxt - 2.0 * phitd * ln(ftdsti);
-ubigat = VBIRGAT_i * auxt - 2.0 * phitd * ln(ftdgat);
-
-// built-in voltages limited to phitd
-vbibot = ubibot + phitd * ln(1 + exp((`vbilow - ubibot) * phitdinv));
-vbisti = ubisti + phitd * ln(1 + exp((`vbilow - ubisti) * phitdinv));
-vbigat = ubigat + phitd * ln(1 + exp((`vbilow - ubigat) * phitdinv));
-
-// inverse values of built-in voltages
-vbiinvbot = 1.0 / vbibot;
-vbiinvsti = 1.0 / vbisti;
-vbiinvgat = 1.0 / vbigat;
-
-// one minus the grading coefficient
-one_minus_PBOT = 1.0 - PBOT_i;
-one_minus_PSTI = 1.0 - PSTI_i;
-one_minus_PGAT = 1.0 - PGAT_i;
-
-// one over "one minus the grading coefficient"
-one_over_one_minus_PBOT = 1.0 / one_minus_PBOT;
-one_over_one_minus_PSTI = 1.0 / one_minus_PSTI;
-one_over_one_minus_PGAT = 1.0 / one_minus_PGAT;
-
-// temperature-scaled zero-bias capacitance
-cjobot = CJORBOT_i * pow((VBIRBOT_i * vbiinvbot), PBOT_i);
-cjosti = CJORSTI_i * pow((VBIRSTI_i * vbiinvsti), PSTI_i);
-cjogat = CJORGAT_i * pow((VBIRGAT_i * vbiinvgat), PGAT_i);
-
-// prefactor in physical part of charge model
-qprefbot = cjobot * vbibot * one_over_one_minus_PBOT;
-qprefsti = cjosti * vbisti * one_over_one_minus_PSTI;
-qprefgat = cjogat * vbigat * one_over_one_minus_PGAT;
-
-// prefactor in mathematical extension of charge model
-qpref2bot = `a * cjobot;
-qpref2sti = `a * cjosti;
-qpref2gat = `a * cjogat;
-
-// zero-bias depletion widths at reference temperature, needed in SRH and TAT model
-wdepnulrbot = EPSSI / CJORBOT_i;
-wdepnulrsti = XJUNSTI_i * EPSSI / CJORSTI_i;
-wdepnulrgat = XJUNGAT_i * EPSSI / CJORGAT_i;
-
-// inverse values of "wdepnulr", used in BBT model
-wdepnulrinvbot = 1.0 / wdepnulrbot;
-wdepnulrinvsti = 1.0 / wdepnulrsti;
-wdepnulrinvgat = 1.0 / wdepnulrgat;
-
-// inverse values of built-in voltages at reference temperature, needed in SRH and BBT model
-VBIRBOTinv = 1.0 / VBIRBOT_i;
-VBIRSTIinv = 1.0 / VBIRSTI_i;
-VBIRGATinv = 1.0 / VBIRGAT_i;
-
-// some constants needed in erfc-approximation, needed in TAT model
-perfc = (`SQRTPI * `aerfc);
-berfc = ((-5.0 * (`aerfc) + 6.0 - pow((perfc), -2.0)) / 3.0);
-cerfc = (1.0 - (`aerfc) - (berfc));
-
-// half the bandgap energy, limited to values > phitd, needed in TAT model
-deltaEbot = max(0.5 * phigdbot, phitd);
-deltaEsti = max(0.5 * phigdsti, phitd);
-deltaEgat = max(0.5 * phigdgat, phitd);
-
-// values of atat, needed in TAT model
-atatbot = deltaEbot * phitdinv;
-atatsti = deltaEsti * phitdinv;
-atatgat = deltaEgat * phitdinv;
-
-// values of btatpart, needed in TAT model
-btatpartbot = sqrt(32.0 * MEFFTATBOT_i * `MELE * `QELE * (deltaEbot * deltaEbot * deltaEbot)) / (3.0 * `HBAR);
-btatpartsti = sqrt(32.0 * MEFFTATSTI_i * `MELE * `QELE * (deltaEsti * deltaEsti * deltaEsti)) / (3.0 * `HBAR);
-btatpartgat = sqrt(32.0 * MEFFTATGAT_i * `MELE * `QELE * (deltaEgat * deltaEgat * deltaEgat)) / (3.0 * `HBAR);
-
-// temperature-scaled values of FBBT, needed in BBT model
-fbbtbot = FBBTRBOT_i * (1.0 + STFBBTBOT_i * (tkd - tkr));
-fbbtsti = FBBTRSTI_i * (1.0 + STFBBTSTI_i * (tkd - tkr));
-fbbtgat = FBBTRGAT_i * (1.0 + STFBBTGAT_i * (tkd - tkr));
-fbbtbot = `CLIP_LOW(fbbtbot, 0.0);
-fbbtsti = `CLIP_LOW(fbbtsti, 0.0);
-fbbtgat = `CLIP_LOW(fbbtgat, 0.0);
-
-// values of fstop, needed in avalanche/breakdown model
-alphaav = 1.0 - 1.0 / FREV_i;
-fstopbot = 1.0 / (1.0 - pow(alphaav, PBRBOT_i));
-fstopsti = 1.0 / (1.0 - pow(alphaav, PBRSTI_i));
-fstopgat = 1.0 / (1.0 - pow(alphaav, PBRGAT_i));
-
-// inverse values of breakdown voltages, needed in avalanche/breakdown model
-VBRinvbot = 1.0 / VBRBOT_i;
-VBRinvsti = 1.0 / VBRSTI_i;
-VBRinvgat = 1.0 / VBRGAT_i;
-
-// slopes for linear extrapolation close to and beyond breakdown, needed in avalanche/breakdown model
-slopebot = -(fstopbot * fstopbot * pow(alphaav, (PBRBOT_i - 1.0))) * PBRBOT_i * VBRinvbot;
-slopesti = -(fstopsti * fstopsti * pow(alphaav, (PBRSTI_i - 1.0))) * PBRSTI_i * VBRinvsti;
-slopegat = -(fstopgat * fstopgat * pow(alphaav, (PBRGAT_i - 1.0))) * PBRGAT_i * VBRinvgat;
-
-`ifdef JUNCAP_StandAlone
- // do nothing
-`else // JUNCAP_StandAlone
- phigrbot_d = PHIGBOTD_i + deltaphigr;
- phigrsti_d = PHIGSTID_i + deltaphigr;
- phigrgat_d = PHIGGATD_i + deltaphigr;
-
- phigdbot_d = PHIGBOTD_i + deltaphigd;
- phigdsti_d = PHIGSTID_i + deltaphigd;
- phigdgat_d = PHIGGATD_i + deltaphigd;
-
- ftdbot_d = (pow(auxt, 1.5)) * exp(0.5 * ((phigrbot_d * phitrinv) - (phigdbot_d * phitdinv)));
- ftdsti_d = (pow(auxt, 1.5)) * exp(0.5 * ((phigrsti_d * phitrinv) - (phigdsti_d * phitdinv)));
- ftdgat_d = (pow(auxt, 1.5)) * exp(0.5 * ((phigrgat_d * phitrinv) - (phigdgat_d * phitdinv)));
-
- idsatbot_d = IDSATRBOTD_i * ftdbot_d * ftdbot_d;
- idsatsti_d = IDSATRSTID_i * ftdsti_d * ftdsti_d;
- idsatgat_d = IDSATRGATD_i * ftdgat_d * ftdgat_d;
-
- ubibot_d = VBIRBOTD_i * auxt - 2.0 * phitd * ln(ftdbot_d);
- ubisti_d = VBIRSTID_i * auxt - 2.0 * phitd * ln(ftdsti_d);
- ubigat_d = VBIRGATD_i * auxt - 2.0 * phitd * ln(ftdgat_d);
-
- vbibot_d = ubibot_d + phitd * ln(1.0 + exp((`vbilow - ubibot_d) * phitdinv));
- vbisti_d = ubisti_d + phitd * ln(1.0 + exp((`vbilow - ubisti_d) * phitdinv));
- vbigat_d = ubigat_d + phitd * ln(1.0 + exp((`vbilow - ubigat_d) * phitdinv));
-
- vbiinvbot_d = 1.0 / vbibot_d;
- vbiinvsti_d = 1.0 / vbisti_d;
- vbiinvgat_d = 1.0 / vbigat_d;
-
- one_minus_PBOT_d = 1.0 - PBOTD_i;
- one_minus_PSTI_d = 1.0 - PSTID_i;
- one_minus_PGAT_d = 1.0 - PGATD_i;
-
- one_over_one_minus_PBOT_d = 1.0 / one_minus_PBOT_d;
- one_over_one_minus_PSTI_d = 1.0 / one_minus_PSTI_d;
- one_over_one_minus_PGAT_d = 1.0 / one_minus_PGAT_d;
-
- cjobot_d = CJORBOTD_i * pow((VBIRBOTD_i * vbiinvbot_d), PBOTD_i);
- cjosti_d = CJORSTID_i * pow((VBIRSTID_i * vbiinvsti_d), PSTID_i);
- cjogat_d = CJORGATD_i * pow((VBIRGATD_i * vbiinvgat_d), PGATD_i);
-
- qprefbot_d = cjobot_d * vbibot_d * one_over_one_minus_PBOT_d;
- qprefsti_d = cjosti_d * vbisti_d * one_over_one_minus_PSTI_d;
- qprefgat_d = cjogat_d * vbigat_d * one_over_one_minus_PGAT_d;
-
- qpref2bot_d = `a * cjobot_d;
- qpref2sti_d = `a * cjosti_d;
- qpref2gat_d = `a * cjogat_d;
-
- wdepnulrbot_d = EPSSI / CJORBOTD_i;
- wdepnulrsti_d = XJUNSTID_i * EPSSI / CJORSTID_i;
- wdepnulrgat_d = XJUNGATD_i * EPSSI / CJORGATD_i;
-
- wdepnulrinvbot_d = 1.0 / wdepnulrbot_d;
- wdepnulrinvsti_d = 1.0 / wdepnulrsti_d;
- wdepnulrinvgat_d = 1.0 / wdepnulrgat_d;
-
- VBIRBOTinv_d = 1.0 / VBIRBOTD_i;
- VBIRSTIinv_d = 1.0 / VBIRSTID_i;
- VBIRGATinv_d = 1.0 / VBIRGATD_i;
-
- deltaEbot_d = max(0.5 * phigdbot_d, phitd);
- deltaEsti_d = max(0.5 * phigdsti_d, phitd);
- deltaEgat_d = max(0.5 * phigdgat_d, phitd);
-
- atatbot_d = deltaEbot_d * phitdinv;
- atatsti_d = deltaEsti_d * phitdinv;
- atatgat_d = deltaEgat_d * phitdinv;
-
- btatpartbot_d = sqrt(32.0 * MEFFTATBOTD_i * `MELE * `QELE * (deltaEbot_d * deltaEbot_d * deltaEbot_d)) / (3.0 * `HBAR);
- btatpartsti_d = sqrt(32.0 * MEFFTATSTID_i * `MELE * `QELE * (deltaEsti_d * deltaEsti_d * deltaEsti_d)) / (3.0 * `HBAR);
- btatpartgat_d = sqrt(32.0 * MEFFTATGATD_i * `MELE * `QELE * (deltaEgat_d * deltaEgat_d * deltaEgat_d)) / (3.0 * `HBAR);
-
- fbbtbot_d = FBBTRBOTD_i * (1.0 + STFBBTBOTD_i * (tkd - tkr));
- fbbtsti_d = FBBTRSTID_i * (1.0 + STFBBTSTID_i * (tkd - tkr));
- fbbtgat_d = FBBTRGATD_i * (1.0 + STFBBTGATD_i * (tkd - tkr));
- fbbtbot_d = `CLIP_LOW(fbbtbot_d, 0.0);
- fbbtsti_d = `CLIP_LOW(fbbtsti_d, 0.0);
- fbbtgat_d = `CLIP_LOW(fbbtgat_d, 0.0);
-
- fstopbot_d = 1.0 / (1.0 - pow(alphaav, PBRBOTD_i));
- fstopsti_d = 1.0 / (1.0 - pow(alphaav, PBRSTID_i));
- fstopgat_d = 1.0 / (1.0 - pow(alphaav, PBRGATD_i));
-
- VBRinvbot_d = 1.0 / VBRBOTD_i;
- VBRinvsti_d = 1.0 / VBRSTID_i;
- VBRinvgat_d = 1.0 / VBRGATD_i;
-
- slopebot_d = -(fstopbot_d * fstopbot_d * pow(alphaav, (PBRBOTD_i - 1.0))) * PBRBOTD_i * VBRinvbot_d;
- slopesti_d = -(fstopsti_d * fstopsti_d * pow(alphaav, (PBRSTID_i - 1.0))) * PBRSTID_i * VBRinvsti_d;
- slopegat_d = -(fstopgat_d * fstopgat_d * pow(alphaav, (PBRGATD_i - 1.0))) * PBRGATD_i * VBRinvgat_d;
-`endif // JUNCAP_StandAlone
diff --git a/src/spicelib/devices/adms/psp103/admsva/JUNCAP200_macrodefs.include b/src/spicelib/devices/adms/psp103/admsva/JUNCAP200_macrodefs.include
deleted file mode 100644
index 037edf40a..000000000
--- a/src/spicelib/devices/adms/psp103/admsva/JUNCAP200_macrodefs.include
+++ /dev/null
@@ -1,471 +0,0 @@
-//======================================================================================
-//======================================================================================
-// Filename: JUNCAP200_macrodefs.include
-//======================================================================================
-//======================================================================================
-//
-// (c) Copyright notice
-//
-// Since 2015 until today, PSP has been co-developed by NXP Semiconductors and
-// CEA-Leti. For this part of the model, each claim undivided ownership and copyrights
-// Since 2012 until 2015, PSP has been co-developed by NXP Semiconductors and
-// Delft University of Technology. For this part of the model, each claim undivided
-// ownership and copyrights
-// Until and including 2011, PSP has been co-developed by NXP Semiconductors and
-// Arizona State University. For this part of the model, NXP Semiconductors claims
-// undivided ownership and copyrights.
-//
-//
-// Version: 200.6.0, April 2019
-//
-//======================================================================================
-//======================================================================================
-//
-// Further information can be found in the file releasenotesPSP103.txt
-//
-
-///////////////////////////////////////////
-//
-// Macros and constants used in JUNCAP2
-//
-///////////////////////////////////////////
-
-// Other constants
-`define MINTEMP -2.5e2
-`define vbilow 5.0e-2
-`define a 2.0
-`define epsch 0.1
-`define dvbi 5.0e-2
-`define epsav 1.0e-6
-`define vbrmax 1.0e3
-`define vmaxlarge 1.0e8
-`define aerfc 0.29214664
-`define twothirds 0.666666666666667
-
-// Clipping values
-`define levelnumber 2.0e2
-`define AB_cliplow 0.0
-`define LS_cliplow 0.0
-`define LG_cliplow 0.0
-`define MULT_cliplow 0.0
-`define TRJ_cliplow `MINTEMP
-`define IMAX_cliplow 1.0e-12
-`define FREV_cliplow 1.0e1
-`define FREV_cliphigh 1.0e10
-`define IFACTOR_cliplow 0.0
-`define CFACTOR_cliplow 0.0
-`define CJORBOT_cliplow 1.0e-12
-`define CJORSTI_cliplow 1.0e-18
-`define CJORGAT_cliplow 1.0e-18
-`define VBIR_cliplow `vbilow
-`define P_cliplow 5.0e-2
-`define P_cliphigh 0.95
-`define IDSATR_cliplow 0.0
-`define CSRH_cliplow 0.0
-`define XJUN_cliplow 1.0e-9
-`define CTAT_cliplow 0.0
-`define MEFFTAT_cliplow 1.0e-2
-`define CBBT_cliplow 0.0
-`define VBR_cliplow 0.1
-`define PBR_cliplow 0.1
-`define VJUNREF_cliplow 0.5
-`define FJUNQ_cliplow 0.0
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Macro definitions.
-//
-// Note that because at present locally scoped variables
-// can only be in named blocks, the intermediate variables
-// used in the macros below must be explicitly declared
-// as variables.
-//
-/////////////////////////////////////////////////////////////////////////////
-
-// Variable declarations of variables that need to be *local* in juncap-express initialization
-
-//`define LocalGlobalVars \
-// /* declaration of variables needed in macro "calcerfcexpmtat" */ \
-// real ysq, terfc, erfcpos; \
-// \
-// /* declaration of variables needed in hypfunction 5 */ \
-// real h1, h2, h2d, h3, h4, h5; \
-// \
-// /* declaration of variables calculated outside macro "juncapfunction", voltage-dependent part */ \
-// real idmult, vj, z, zinv, two_psistar, vjlim, vjsrh, vbbt, vav; \
-// \
-// /* declaration of variables used within macro "juncapfunction" */ \
-// real tmp, id; \
-// real isrh, vbi_minus_vjsrh, wsrhstep, dwsrh, wsrh, wdep, asrh; \
-// real itat, btat, twoatatoverthreebtat, umaxbeforelimiting, umax, sqrtumax, umaxpoweronepointfive; \
-// real wgamma, wtat, ktat, ltat, mtat, xerfc, erfctimesexpmtat, gammamax; \
-// real ibbt, Fmaxr; \
-// real fbreakdown;
-
-// Instance parameter dependent initialization
-`define JuncapInitInstance(AB_i, LS_i, LG_i, idsatbot, idsatsti, idsatgat, vbibot, vbisti, vbigat, PBOT_i, PSTI_i, PGAT_i, VBIRBOT_i, VBIRSTI_i, VBIRGAT_i, VMAX, exp_VMAX_over_phitd, vbimin, vch, vfmin, vbbtlim) \
- if (idsatbot * AB_i > 0.0) begin \
- vmaxbot = phitd * ln(IMAX_i / (idsatbot * AB_i) + 1.0); \
- end else begin \
- vmaxbot = `vmaxlarge; \
- end \
- if (idsatsti * LS_i > 0.0) begin \
- vmaxsti = phitd * ln(IMAX_i / (idsatsti * LS_i) + 1.0); \
- end else begin \
- vmaxsti = `vmaxlarge; \
- end \
- if (idsatgat * LG_i > 0.0) begin \
- vmaxgat = phitd * ln(IMAX_i / (idsatgat * LG_i) + 1.0); \
- end else begin \
- vmaxgat = `vmaxlarge; \
- end \
- VMAX = min(min(vmaxbot, vmaxsti), vmaxgat); \
- `expl(VMAX * phitdinv, exp_VMAX_over_phitd) \
- \
- /* determination of minimum value of the relevant built-in voltages */ \
- /* and determination of limiting value of conditioned voltage for BBT calculation */ \
- vbibot2 = vbibot; \
- vbisti2 = vbisti; \
- vbigat2 = vbigat; \
- pbot2 = PBOT_i; \
- psti2 = PSTI_i; \
- pgat2 = PGAT_i; \
- vbibot2r = VBIRBOT_i; \
- vbisti2r = VBIRSTI_i; \
- vbigat2r = VBIRGAT_i; \
- if (AB_i == 0.0) begin \
- vbibot2 = vbisti + vbigat; \
- pbot2 = 0.9 * min(PSTI_i, PGAT_i); \
- vbibot2r = VBIRSTI_i + VBIRGAT_i; \
- end \
- if (LS_i == 0.0) begin \
- vbisti2 = vbibot + vbigat; \
- psti2 = 0.9 * min(PBOT_i, PGAT_i); \
- vbisti2r = VBIRBOT_i + VBIRGAT_i; \
- end \
- if (LG_i == 0.0) begin \
- vbigat2 = vbibot + vbisti; \
- pgat2 = 0.9 * min(PBOT_i, PSTI_i); \
- vbigat2r = VBIRBOT_i + VBIRSTI_i; \
- end \
- vbimin = min(min(vbibot2, vbisti2), vbigat2); \
- vch = vbimin * `epsch; \
- pmax = max(max(pbot2, psti2), pgat2); \
- vfmin = vbimin * (1.0 - (pow(`a, (-1.0 / (pmax))))); \
- vbbtlim = min(min(vbibot2r, vbisti2r), vbigat2r) - `dvbi;
-
-
-// Special power-functions
-
-`define mypower(x,power,result) \
- if (power == 0.5) begin \
- result = sqrt(x); \
- end else begin \
- result = pow(x, power); \
- end
-
-`define mypower2(x,power,result) \
- if (power == -1.0) begin \
- result = 1.0 / (x); \
- end else begin \
- result = pow(x, power); \
- end
-
-`define mypower3(x,power,result) \
- if (power == 4.0) begin \
- result = (x) * (x) * (x) * (x); \
- end else begin \
- result = pow(abs(x), power); \
- end
-
-// Smoothing functions
-`define hypfunction2(x,x0,eps,hyp2) \
- hyp2 = 0.5 * ((x) + (x0) - sqrt(((x) - (x0)) * ((x) - (x0)) + 4.0 * (eps) * (eps)));
-
-`define hypfunction5(x,x0,eps,hyp5) \
- h1 = 4.0 * (eps) * (eps); \
- h2 = (eps) / (x0); \
- h2d = (x) + (eps) * h2; \
- h3 = (x0) + h2d; \
- h4 = (x0) - h2d; \
- h5 = sqrt(h4 * h4 + h1); \
- hyp5 = 2.0 * ((x) * (x0) / (h3 + h5));
-
-
-// A special function used to calculate TAT-currents,
-// including an approximation of the erfc-function
-
-`define calcerfcexpmtat(y,m,result) \
- ysq = y * y; \
- if (y > 0.0) begin \
- terfc = 1.0 / (1.0 + perfc * y); \
- end else begin \
- terfc = 1.0 / (1.0 - perfc * y); \
- end \
- `expl_low(-ysq + m, tmp) \
- erfcpos = (`aerfc * terfc + berfc * (terfc * terfc) + cerfc * (terfc * terfc * terfc)) * tmp; \
- if (y > 0.0) begin \
- result = erfcpos; \
- end else begin\
- `expl_low(m, tmp) \
- result = 2.0 * tmp - erfcpos; \
- end
-
-// This is the main function of the JUNCAP2-model. It returns the current and charge
-// for a single diode
-`define juncapfunction(VAK,qpref,qpref2,vbiinv,one_minus_P,idsat,CSRH,CTAT,vbi,wdepnulr,VBIRinv,P,ftd,btatpart,atat,one_over_one_minus_P,CBBT,VBIR,wdepnulrinv,fbbt,VBR,VBRinv,PBR,fstop,slope,Ijprime,Qjprime) \
- `mypower((1.0 - vj * vbiinv), one_minus_P, tmp) \
- Qjprime = CFACTOR_i * (qpref * (1.0 - tmp) + qpref2 * (VAK - vj)); \
- id = idsat * idmult; \
- if ((CSRH == 0.0) && (CTAT == 0.0)) begin \
- isrh = 0.0; \
- end else begin \
- vbi_minus_vjsrh = vbi-vjsrh; \
- wsrhstep = 1.0 - sqrt(1.0 - two_psistar / vbi_minus_vjsrh); \
- if (P == 0.5) begin \
- dwsrh = 0.0; \
- end else begin \
- dwsrh = ((wsrhstep * wsrhstep * ln(wsrhstep) / (1.0 - wsrhstep)) + wsrhstep) * (1.0 - 2.0 * P); \
- end \
- wsrh = wsrhstep + dwsrh; \
- `mypower(vbi_minus_vjsrh * VBIRinv, P, tmp) \
- wdep = wdepnulr * tmp; \
- asrh = ftd * ((zinv - 1.0) * wdep); \
- isrh = CSRH * (asrh * wsrh); \
- end \
- if (CTAT == 0.0) begin \
- itat = 0.0; \
- end else begin \
- btat = btatpart * ((wdep * one_minus_P) / vbi_minus_vjsrh); \
- twoatatoverthreebtat = (`twothirds * atat) / btat; \
- umaxbeforelimiting = twoatatoverthreebtat * twoatatoverthreebtat; \
- umax = sqrt(umaxbeforelimiting * umaxbeforelimiting / (umaxbeforelimiting * umaxbeforelimiting + 1.0)); \
- sqrtumax = sqrt(abs(umax)); \
- umaxpoweronepointfive = umax * sqrtumax; \
- `mypower2((1.0 + btat * umaxpoweronepointfive), (-P * one_over_one_minus_P), wgamma) \
- wtat = wsrh * wgamma / (wsrh + wgamma); \
- ktat = sqrt(0.375 * (btat / sqrtumax)); \
- ltat = 2.0 * (twoatatoverthreebtat * sqrtumax) - umax; \
- mtat = atat * twoatatoverthreebtat * sqrtumax - atat * umax + 0.5 * (btat * umaxpoweronepointfive); \
- xerfc = (ltat - 1.0) * ktat; \
- `calcerfcexpmtat(xerfc, mtat, erfctimesexpmtat) \
- gammamax = `SQRTPI * 0.5 * (atat * erfctimesexpmtat / ktat); \
- itat = CTAT * (asrh * gammamax * wtat); \
- end \
- if (CBBT == 0.0) begin \
- ibbt = 0.0; \
- end else begin \
- `mypower(((VBIR - vbbt) * VBIRinv), P, tmp) \
- Fmaxr = one_over_one_minus_P * ((VBIR - vbbt) * wdepnulrinv / tmp); \
- `expl(-fbbt / Fmaxr, tmp) \
- ibbt = CBBT * (VAK * Fmaxr * Fmaxr * tmp); \
- end \
- if (VBR > `vbrmax) begin \
- fbreakdown = 1.0; \
- end else begin \
- if (vav > -alphaav * VBR) begin \
- `mypower3(vav * VBRinv, PBR, tmp) \
- fbreakdown = 1.0 / (1.0 - tmp); \
- end else begin \
- fbreakdown = fstop + (vav + alphaav * VBR) * slope; \
- end \
- end \
- Ijprime = IFACTOR_i * (id + isrh + itat + ibbt) * fbreakdown;
-
-
-// The following code is written as a macro because the naming of the instance parameters is
-// different for JUNCAP2 stand-alone and JUNCAP2-in-PSP: AB, LS, LG for JUNCAP2 stand-alone,
-// ABSOURCE, LSSOURCE, LGSOURCE for source junction in PSP and ABDRAIN, LSDRAIN, LGDRAIN for
-// drain junction in PSP
-`define juncapcommon(V, AB_i, LS_i, LG_i, qprefbot, qpref2bot, vbiinvbot, one_minus_PBOT, idsatbot, CSRHBOT_i, CTATBOT_i, vbibot, wdepnulrbot, VBIRBOTinv, PBOT_i, ftdbot, btatpartbot, atatbot, one_over_one_minus_PBOT, CBBTBOT_i, VBIRBOT_i, wdepnulrinvbot, fbbtbot, VBRBOT_i, VBRinvbot, PBRBOT_i, fstopbot, slopebot, qprefsti, qpref2sti, vbiinvsti, one_minus_PSTI, idsatsti, CSRHSTI_i, CTATSTI_i, vbisti, wdepnulrsti, VBIRSTIinv, PSTI_i, ftdsti, btatpartsti, atatsti, one_over_one_minus_PSTI, CBBTSTI_i, VBIRSTI_i, wdepnulrinvsti, fbbtsti, VBRSTI_i, VBRinvsti, PBRSTI_i, fstopsti, slopesti, qprefgat, qpref2gat, vbiinvgat, one_minus_PGAT, idsatgat, CSRHGAT_i, CTATGAT_i, vbigat, wdepnulrgat, VBIRGATinv, PGAT_i, ftdgat, btatpartgat, atatgat, one_over_one_minus_PGAT, CBBTGAT_i, VBIRGAT_i, wdepnulrinvgat, fbbtgat, VBRGAT_i, VBRinvgat, PBRGAT_i, fstopgat, slopegat, VMAX, exp_VMAX_over_phitd, vbimin, vch, vfmin, vbbtlim, ijunbot, qjunbot, ijunsti, qjunsti, ijungat, qjungat) \
- vbbt = 0.0; \
- two_psistar = 0.0; \
- if ( !( ((AB_i) == 0.0) && ((LS_i) == 0.0) && ((LG_i) == 0.0) ) ) begin \
- `hypfunction5(V, vfmin, vch, vj) \
- if (V < VMAX) begin \
- `expl(0.5 * (V * phitdinv), zinv) \
- idmult = zinv * zinv; \
- end else begin \
- idmult = (1.0 + (V - VMAX) * phitdinv) * exp_VMAX_over_phitd; \
- zinv = sqrt(idmult); \
- end \
- idmult = idmult - 1.0; \
- z = 1.0 / zinv; \
- if (V > 0.0) begin \
- two_psistar = 2.0 * (phitd * ln(2.0 + z + sqrt((z + 1.0) * (z + 3.0)))); \
- end else begin \
- two_psistar = -V + 2.0 * (phitd * ln(2.0 * zinv + 1.0 + sqrt((1.0 + zinv) * (1.0 + 3.0 * zinv)))); \
- end \
- vjlim = vbimin - two_psistar; \
- `hypfunction2(V, vjlim, phitd, vjsrh) \
- `hypfunction2(V, vbbtlim, phitr, vbbt) \
- `hypfunction2(V, 0.0, `epsav, vav) \
- end \
- if ((AB_i) == 0.0) begin \
- ijunbot = 0.0; \
- qjunbot = 0.0; \
- end else begin \
- `juncapfunction(V, qprefbot, qpref2bot, vbiinvbot, one_minus_PBOT, idsatbot, CSRHBOT_i, CTATBOT_i, vbibot, wdepnulrbot, VBIRBOTinv, PBOT_i, ftdbot, btatpartbot, atatbot, one_over_one_minus_PBOT, CBBTBOT_i, VBIRBOT_i, wdepnulrinvbot, fbbtbot, VBRBOT_i, VBRinvbot, PBRBOT_i, fstopbot, slopebot, ijunbot, qjunbot) \
- end \
- if ((LS_i) == 0.0) begin \
- ijunsti = 0.0; \
- qjunsti = 0.0; \
- end else begin \
- `juncapfunction(V, qprefsti, qpref2sti, vbiinvsti, one_minus_PSTI, idsatsti, CSRHSTI_i, CTATSTI_i, vbisti, wdepnulrsti, VBIRSTIinv, PSTI_i, ftdsti, btatpartsti, atatsti, one_over_one_minus_PSTI, CBBTSTI_i, VBIRSTI_i, wdepnulrinvsti, fbbtsti, VBRSTI_i, VBRinvsti, PBRSTI_i, fstopsti, slopesti, ijunsti, qjunsti) \
- end \
- if ((LG_i) == 0.0) begin \
- ijungat = 0.0; \
- qjungat = 0.0; \
- end else begin \
- `juncapfunction(V, qprefgat, qpref2gat, vbiinvgat, one_minus_PGAT, idsatgat, CSRHGAT_i, CTATGAT_i, vbigat, wdepnulrgat, VBIRGATinv, PGAT_i, ftdgat, btatpartgat, atatgat, one_over_one_minus_PGAT, CBBTGAT_i, VBIRGAT_i, wdepnulrinvgat, fbbtgat, VBRGAT_i, VBRinvgat, PBRGAT_i, fstopgat, slopegat, ijungat, qjungat) \
- end
-
-//============================================================================================================
-// JUNCAP-express
-//
-// The macros below are used in the express-version of JUNCAP2
-//============================================================================================================
-
-`define relerr 1.0e-3
-`define P1(x) ((x) + 1.0)
-
-`define expll(x, xlow, expxlow, xhigh, expxhigh) \
- ((x) < (xlow)) ? (expxlow) / `P1((xlow) - (x)) : (((x) > (xhigh)) ? (expxhigh) * `P1((x) - (xhigh)) : exp(x))
-
-
-// The "JuncapExpressInit"-macro below is split into three parts, as some verilog-A compilers cannot handle
-// macros beyond a certain size. Moreover, it is useful to limit the list of input and output variables.
-
-// Part 1
-`define JuncapExpressInit1(AB_i, LS_i, LG_i, VJUNREF_i, qprefbot, qpref2bot, vbiinvbot, one_minus_PBOT, idsatbot, CSRHBOT_i, CTATBOT_i, vbibot, wdepnulrbot, VBIRBOTinv, PBOT_i, ftdbot, btatpartbot, atatbot, one_over_one_minus_PBOT, CBBTBOT_i, VBIRBOT_i, wdepnulrinvbot, fbbtbot, VBRBOT_i, VBRinvbot, PBRBOT_i, fstopbot, slopebot, qprefsti, qpref2sti, vbiinvsti, one_minus_PSTI, idsatsti, CSRHSTI_i, CTATSTI_i, vbisti, wdepnulrsti, VBIRSTIinv, PSTI_i, ftdsti, btatpartsti, atatsti, one_over_one_minus_PSTI, CBBTSTI_i, VBIRSTI_i, wdepnulrinvsti, fbbtsti, VBRSTI_i, VBRinvsti, PBRSTI_i, fstopsti, slopesti, qprefgat, qpref2gat, vbiinvgat, one_minus_PGAT, idsatgat, CSRHGAT_i, CTATGAT_i, vbigat, wdepnulrgat, VBIRGATinv, PGAT_i, ftdgat, btatpartgat, atatgat, one_over_one_minus_PGAT, CBBTGAT_i, VBIRGAT_i, wdepnulrinvgat, fbbtgat, VBRGAT_i, VBRinvgat, PBRGAT_i, fstopgat, slopegat, VMAX, exp_VMAX_over_phitd, vbimin, vch, vfmin, vbbtlim) \
- FRACNA = 0.4; \
- FRACNB = 0.65; \
- FRACI = 0.8; \
- /* Sample voltages */ \
- V1 = -FRACNA * VJUNREF_i; \
- V2 = -FRACNB * VJUNREF_i; \
- V3 = -FRACI * VJUNREF_i; \
- V4 = 0.1; \
- V5 = 0.2; \
- /* evaluate full JUNCAP-model at five voltages */ \
- `juncapcommon(V1, AB_i, LS_i, LG_i, qprefbot, qpref2bot, vbiinvbot, one_minus_PBOT, idsatbot, CSRHBOT_i, CTATBOT_i, vbibot, wdepnulrbot, VBIRBOTinv, PBOT_i, ftdbot, btatpartbot, atatbot, one_over_one_minus_PBOT, CBBTBOT_i, VBIRBOT_i, wdepnulrinvbot, fbbtbot, VBRBOT_i, VBRinvbot, PBRBOT_i, fstopbot, slopebot, qprefsti, qpref2sti, vbiinvsti, one_minus_PSTI, idsatsti, CSRHSTI_i, CTATSTI_i, vbisti, wdepnulrsti, VBIRSTIinv, PSTI_i, ftdsti, btatpartsti, atatsti, one_over_one_minus_PSTI, CBBTSTI_i, VBIRSTI_i, wdepnulrinvsti, fbbtsti, VBRSTI_i, VBRinvsti, PBRSTI_i, fstopsti, slopesti, qprefgat, qpref2gat, vbiinvgat, one_minus_PGAT, idsatgat, CSRHGAT_i, CTATGAT_i, vbigat, wdepnulrgat, VBIRGATinv, PGAT_i, ftdgat, btatpartgat, atatgat, one_over_one_minus_PGAT, CBBTGAT_i, VBIRGAT_i, wdepnulrinvgat, fbbtgat, VBRGAT_i, VBRinvgat, PBRGAT_i, fstopgat, slopegat, VMAX, exp_VMAX_over_phitd, vbimin, vch, vfmin, vbbtlim, ijunbot, qjunbot, ijunsti, qjunsti, ijungat, qjungat) \
- I1 = AB_i * ijunbot + LS_i * ijunsti + LG_i * ijungat; \
- `juncapcommon(V2, AB_i, LS_i, LG_i, qprefbot, qpref2bot, vbiinvbot, one_minus_PBOT, idsatbot, CSRHBOT_i, CTATBOT_i, vbibot, wdepnulrbot, VBIRBOTinv, PBOT_i, ftdbot, btatpartbot, atatbot, one_over_one_minus_PBOT, CBBTBOT_i, VBIRBOT_i, wdepnulrinvbot, fbbtbot, VBRBOT_i, VBRinvbot, PBRBOT_i, fstopbot, slopebot, qprefsti, qpref2sti, vbiinvsti, one_minus_PSTI, idsatsti, CSRHSTI_i, CTATSTI_i, vbisti, wdepnulrsti, VBIRSTIinv, PSTI_i, ftdsti, btatpartsti, atatsti, one_over_one_minus_PSTI, CBBTSTI_i, VBIRSTI_i, wdepnulrinvsti, fbbtsti, VBRSTI_i, VBRinvsti, PBRSTI_i, fstopsti, slopesti, qprefgat, qpref2gat, vbiinvgat, one_minus_PGAT, idsatgat, CSRHGAT_i, CTATGAT_i, vbigat, wdepnulrgat, VBIRGATinv, PGAT_i, ftdgat, btatpartgat, atatgat, one_over_one_minus_PGAT, CBBTGAT_i, VBIRGAT_i, wdepnulrinvgat, fbbtgat, VBRGAT_i, VBRinvgat, PBRGAT_i, fstopgat, slopegat, VMAX, exp_VMAX_over_phitd, vbimin, vch, vfmin, vbbtlim, ijunbot, qjunbot, ijunsti, qjunsti, ijungat, qjungat) \
- I2 = AB_i * ijunbot + LS_i * ijunsti + LG_i * ijungat; \
- `juncapcommon(V3, AB_i, LS_i, LG_i, qprefbot, qpref2bot, vbiinvbot, one_minus_PBOT, idsatbot, CSRHBOT_i, CTATBOT_i, vbibot, wdepnulrbot, VBIRBOTinv, PBOT_i, ftdbot, btatpartbot, atatbot, one_over_one_minus_PBOT, CBBTBOT_i, VBIRBOT_i, wdepnulrinvbot, fbbtbot, VBRBOT_i, VBRinvbot, PBRBOT_i, fstopbot, slopebot, qprefsti, qpref2sti, vbiinvsti, one_minus_PSTI, idsatsti, CSRHSTI_i, CTATSTI_i, vbisti, wdepnulrsti, VBIRSTIinv, PSTI_i, ftdsti, btatpartsti, atatsti, one_over_one_minus_PSTI, CBBTSTI_i, VBIRSTI_i, wdepnulrinvsti, fbbtsti, VBRSTI_i, VBRinvsti, PBRSTI_i, fstopsti, slopesti, qprefgat, qpref2gat, vbiinvgat, one_minus_PGAT, idsatgat, CSRHGAT_i, CTATGAT_i, vbigat, wdepnulrgat, VBIRGATinv, PGAT_i, ftdgat, btatpartgat, atatgat, one_over_one_minus_PGAT, CBBTGAT_i, VBIRGAT_i, wdepnulrinvgat, fbbtgat, VBRGAT_i, VBRinvgat, PBRGAT_i, fstopgat, slopegat, VMAX, exp_VMAX_over_phitd, vbimin, vch, vfmin, vbbtlim, ijunbot, qjunbot, ijunsti, qjunsti, ijungat, qjungat) \
- I3 = AB_i * ijunbot + LS_i * ijunsti + LG_i * ijungat;
-
-// Part 2
-`define JuncapExpressInit2(AB_i, LS_i, LG_i, qprefbot, qpref2bot, vbiinvbot, one_minus_PBOT, idsatbot, CSRHBOT_i, CTATBOT_i, vbibot, wdepnulrbot, VBIRBOTinv, PBOT_i, ftdbot, btatpartbot, atatbot, one_over_one_minus_PBOT, CBBTBOT_i, VBIRBOT_i, wdepnulrinvbot, fbbtbot, VBRBOT_i, VBRinvbot, PBRBOT_i, fstopbot, slopebot, qprefsti, qpref2sti, vbiinvsti, one_minus_PSTI, idsatsti, CSRHSTI_i, CTATSTI_i, vbisti, wdepnulrsti, VBIRSTIinv, PSTI_i, ftdsti, btatpartsti, atatsti, one_over_one_minus_PSTI, CBBTSTI_i, VBIRSTI_i, wdepnulrinvsti, fbbtsti, VBRSTI_i, VBRinvsti, PBRSTI_i, fstopsti, slopesti, qprefgat, qpref2gat, vbiinvgat, one_minus_PGAT, idsatgat, CSRHGAT_i, CTATGAT_i, vbigat, wdepnulrgat, VBIRGATinv, PGAT_i, ftdgat, btatpartgat, atatgat, one_over_one_minus_PGAT, CBBTGAT_i, VBIRGAT_i, wdepnulrinvgat, fbbtgat, VBRGAT_i, VBRinvgat, PBRGAT_i, fstopgat, slopegat, VMAX, exp_VMAX_over_phitd, vbimin, vch, vfmin, vbbtlim) \
- /* forward currents */ \
- `juncapcommon(V4, AB_i, LS_i, LG_i, qprefbot, qpref2bot, vbiinvbot, one_minus_PBOT, idsatbot, CSRHBOT_i, CTATBOT_i, vbibot, wdepnulrbot, VBIRBOTinv, PBOT_i, ftdbot, btatpartbot, atatbot, one_over_one_minus_PBOT, CBBTBOT_i, VBIRBOT_i, wdepnulrinvbot, fbbtbot, VBRBOT_i, VBRinvbot, PBRBOT_i, fstopbot, slopebot, qprefsti, qpref2sti, vbiinvsti, one_minus_PSTI, idsatsti, CSRHSTI_i, CTATSTI_i, vbisti, wdepnulrsti, VBIRSTIinv, PSTI_i, ftdsti, btatpartsti, atatsti, one_over_one_minus_PSTI, CBBTSTI_i, VBIRSTI_i, wdepnulrinvsti, fbbtsti, VBRSTI_i, VBRinvsti, PBRSTI_i, fstopsti, slopesti, qprefgat, qpref2gat, vbiinvgat, one_minus_PGAT, idsatgat, CSRHGAT_i, CTATGAT_i, vbigat, wdepnulrgat, VBIRGATinv, PGAT_i, ftdgat, btatpartgat, atatgat, one_over_one_minus_PGAT, CBBTGAT_i, VBIRGAT_i, wdepnulrinvgat, fbbtgat, VBRGAT_i, VBRinvgat, PBRGAT_i, fstopgat, slopegat, VMAX, exp_VMAX_over_phitd, vbimin, vch, vfmin, vbbtlim, ijunbot, qjunbot, ijunsti, qjunsti, ijungat, qjungat) \
- I4 = AB_i * ijunbot + LS_i * ijunsti + LG_i * ijungat; \
- `juncapcommon(V5, AB_i, LS_i, LG_i, qprefbot, qpref2bot, vbiinvbot, one_minus_PBOT, idsatbot, CSRHBOT_i, CTATBOT_i, vbibot, wdepnulrbot, VBIRBOTinv, PBOT_i, ftdbot, btatpartbot, atatbot, one_over_one_minus_PBOT, CBBTBOT_i, VBIRBOT_i, wdepnulrinvbot, fbbtbot, VBRBOT_i, VBRinvbot, PBRBOT_i, fstopbot, slopebot, qprefsti, qpref2sti, vbiinvsti, one_minus_PSTI, idsatsti, CSRHSTI_i, CTATSTI_i, vbisti, wdepnulrsti, VBIRSTIinv, PSTI_i, ftdsti, btatpartsti, atatsti, one_over_one_minus_PSTI, CBBTSTI_i, VBIRSTI_i, wdepnulrinvsti, fbbtsti, VBRSTI_i, VBRinvsti, PBRSTI_i, fstopsti, slopesti, qprefgat, qpref2gat, vbiinvgat, one_minus_PGAT, idsatgat, CSRHGAT_i, CTATGAT_i, vbigat, wdepnulrgat, VBIRGATinv, PGAT_i, ftdgat, btatpartgat, atatgat, one_over_one_minus_PGAT, CBBTGAT_i, VBIRGAT_i, wdepnulrinvgat, fbbtgat, VBRGAT_i, VBRinvgat, PBRGAT_i, fstopgat, slopegat, VMAX, exp_VMAX_over_phitd, vbimin, vch, vfmin, vbbtlim, ijunbot, qjunbot, ijunsti, qjunsti, ijungat, qjungat) \
- I5 = AB_i * ijunbot + LS_i * ijunsti + LG_i * ijungat;
-
-// Part 3
-`define JuncapExpressInit3(AB_i, LS_i, LG_i, idsatbot, idsatsti, idsatgat, ISATFOR1, MFOR1, ISATFOR2, MFOR2, ISATREV, MREV, m0flag) \
- /* compute internal parameters from these five (I,V)-values */ \
- ISATFOR1 = AB_i * idsatbot + LS_i * idsatsti + LG_i * idsatgat; \
- I4_cor = I4 - ISATFOR1 * (exp(V4 * phitdinv * MFOR1) - 1.0); \
- I5_cor = I5 - ISATFOR1 * (exp(V5 * phitdinv * MFOR1) - 1.0); \
- if ( !( ((AB_i) == 0.0) && ((LS_i) == 0.0) && ((LG_i) == 0.0) ) ) begin \
- if ((I4 > 0.0) && (I5 > 0.0)) begin \
- if ((((I4_cor / I4) > `relerr) || ((I5_cor / I5) > `relerr)) && (I4_cor > 0.0) && (I5_cor > 0.0) && (I5_cor > I4_cor)) begin \
- alphaje = I4_cor / I5_cor; \
- MFOR2 = phitd * ln(alphaje) / (V4 - V5); \
- ISATFOR2 = I4_cor / (exp(V4 * phitdinv * MFOR2) - 1.0); \
- end \
- end \
- I1_cor = I1 - ISATFOR1 * (exp(V1 * phitdinv * MFOR1) - 1.0) - ISATFOR2 * (exp(V1 * phitdinv * MFOR2) - 1.0); \
- I2_cor = I2 - ISATFOR1 * (exp(V2 * phitdinv * MFOR1) - 1.0) - ISATFOR2 * (exp(V2 * phitdinv * MFOR2) - 1.0); \
- I3_cor = I3 - ISATFOR1 * (exp(V3 * phitdinv * MFOR1) - 1.0) - ISATFOR2 * (exp(V3 * phitdinv * MFOR2) - 1.0); \
- if ((I1 < 0.0) && (I2 < 0.0) && (I3 < 0.0)) begin \
- if ((((I1_cor / I1) > `relerr) || ((I2_cor / I2) > `relerr) || ((I3_cor / I3) > `relerr)) \
- && (I1_cor < 0.0) && (I2_cor < 0.0) && (I3_cor < 0.0)) begin \
- alphaje = I1_cor / I2_cor; \
- m0_rev = -phitd * ln(alphaje) / (V1 - V2); /* zeroth order approximation */ \
- tt0 = V2 / (V2 - V1); \
- tt1 = phitd * (alphaje - 1.0) * (pow(alphaje, tt0) - 1.0); \
- tt0 = V1 / (V1 - V2); \
- tt2 = pow(alphaje, tt0) * (V2 - V1) + alphaje * V1 - V2; \
- mcor_rev = tt1 / tt2; /* first order Newton correction */ \
- MREV = m0_rev + mcor_rev; \
- if (abs(V3 * phitdinv * MREV) < 1.0e-6) begin \
- /* Taylor approximation needed */ \
- /* Note: ISATREV and MREV have different meaning in this situation!! */ \
- m0flag = 1.0; \
- ISATREV = I3_cor * (1.0 / V3 + 0.5 * phitdinv * MREV); \
- MREV = -0.5 * I3_cor * MREV * phitdinv / V3; \
- end else begin \
- m0flag = 0.0; \
- ISATREV = -I3_cor / (exp(-V3 * phitdinv * MREV) - 1.0); \
- end \
- end \
- end \
- end
-
-// Part 4
-`define JuncapExpressInit4(AB_i, LS_i, LG_i, FJUNQ_i, cjobot, cjosti, cjogat, zflagbot, zflagsti, zflaggat) \
- /* charge model initialization */ \
- zfrac = FJUNQ_i * (AB_i * cjobot + LS_i * cjosti + LG_i * cjogat); \
- if ((AB_i * cjobot) <= zfrac) begin \
- zflagbot = 0.0; \
- end \
- if ((LS_i * cjosti) <= zfrac) begin \
- zflagsti = 0.0; \
- end \
- if ((LG_i * cjogat) <= zfrac) begin \
- zflaggat = 0.0; \
- end
-
-// Part 5
-`define JuncapExpressInit5(AB_i, LS_i, LG_i, ISATFOR1, ISATFOR2, ISATREV, xhighf1, expxhf1, xhighf2, expxhf2, xhighr, expxhr) \
- /* calculate limits beyond which exponentials are linearly extrapolated */ \
- if ( !( ((AB_i) == 0.0) && ((LS_i) == 0.0) && ((LG_i) == 0.0) ) ) begin \
- xhighf1 = ln(0.5 * IMAX_i / (ISATFOR1 + 1.0e-21)); \
- xhighf2 = ln(0.5 * IMAX_i / (ISATFOR2 + 1.0e-21)); \
- xhighr = ln(0.5 * IMAX_i / (abs(ISATREV) + 1.0e-21)); \
- end \
- xhighf1 = min(xhighf1, `se05); \
- expxhf1 = exp(xhighf1); \
- xhighf2 = min(xhighf2, `se05); \
- expxhf2 = exp(xhighf2); \
- xhighr = min(xhighr, `se05); \
- expxhr = exp(xhighr);
-
-`define JuncapExpressCurrent(V, MFOR1, ISATFOR1, MFOR2, ISATFOR2, MREV, ISATREV, m0flag, xhighf1, expxhf1, xhighf2, expxhf2, xhighr, expxhr, ijun) \
- tm0 = V * phitdinv * MFOR1; \
- tm1 = `expll(tm0, -`se05, `ke05, xhighf1, expxhf1); \
- ijunfor1 = ISATFOR1 * (tm1 - 1.0); \
- tm0 = V * phitdinv * MFOR2; \
- tm1 = `expll(tm0, -`se05, `ke05, xhighf2, expxhf2); \
- ijunfor2 = ISATFOR2 * (tm1 - 1.0); \
- ijunrev = 0.0; \
- if (m0flag > 0.0) begin \
- ijunrev = V * (ISATREV + V * MREV); \
- end else begin \
- tm0 = -V * phitdinv * MREV; \
- tm1 = `expll(tm0, -`se05, `ke05, xhighr, expxhr); \
- ijunrev = -ISATREV * (tm1 - 1.0); \
- end \
- ijun = ijunfor1 + ijunfor2 + ijunrev;
-
-`define JuncapExpressCharge(V, AB_i, LS_i, LG_i, qprefbot, qprefsti, qprefgat, qpref2bot, qpref2sti, qpref2gat, vbiinvbot, vbiinvsti, vbiinvgat, one_minus_PBOT, one_minus_PSTI, one_minus_PGAT, vfmin, vch, zflagbot, zflagsti, zflaggat, qjunbot, qjunsti, qjungat) \
- tmpv = 0.0; \
- vjv = 0.0; \
- `hypfunction5(V, vfmin, vch, vjv) \
- if (zflagbot > 0.5) begin \
- `mypower((1.0 - vjv * vbiinvbot), one_minus_PBOT, tmpv) \
- qjunbot = qprefbot * (1.0 - tmpv) + qpref2bot * (V - vjv); \
- end \
- if (zflagsti > 0.5) begin \
- `mypower((1.0 - vjv * vbiinvsti), one_minus_PSTI, tmpv) \
- qjunsti = qprefsti * (1.0 - tmpv) + qpref2sti * (V - vjv); \
- end \
- if (zflaggat > 0.5) begin \
- `mypower((1.0 - vjv * vbiinvgat), one_minus_PGAT, tmpv) \
- qjungat = qprefgat * (1.0 - tmpv) + qpref2gat * (V - vjv); \
- end
-
diff --git a/src/spicelib/devices/adms/psp103/admsva/JUNCAP200_parlist.include b/src/spicelib/devices/adms/psp103/admsva/JUNCAP200_parlist.include
deleted file mode 100644
index d953fd91c..000000000
--- a/src/spicelib/devices/adms/psp103/admsva/JUNCAP200_parlist.include
+++ /dev/null
@@ -1,181 +0,0 @@
-//======================================================================================
-//======================================================================================
-// Filename: JUNCAP200_parlist.include
-//======================================================================================
-//======================================================================================
-//
-// (c) Copyright notice
-//
-// Since 2015 until today, PSP has been co-developed by NXP Semiconductors and
-// CEA-Leti. For this part of the model, each claim undivided ownership and copyrights
-// Since 2012 until 2015, PSP has been co-developed by NXP Semiconductors and
-// Delft University of Technology. For this part of the model, each claim undivided
-// ownership and copyrights
-// Until and including 2011, PSP has been co-developed by NXP Semiconductors and
-// Arizona State University. For this part of the model, NXP Semiconductors claims
-// undivided ownership and copyrights.
-//
-//
-// Version: 200.6.0, April 2019
-//
-//======================================================================================
-//======================================================================================
-//
-// Further information can be found in the file releasenotesPSP103.txt
-//
-
-// --------------------------------------------------------------------------------------------------------------
-// JUNCAP2 - Reduced parameter list
-// --------------------------------------------------------------------------------------------------------------
-
-`MPRco(IMAX ,1000.0 ,"A" ,`IMAX_cliplow ,inf ,"Maximum current up to which forward current behaves exponentially")
-`MPRco(TRJ ,21.0 ,"degC" ,`TRJ_cliplow ,inf ,"Reference temperature")
-`MPRcc(FREV ,1.0e3 ,"" ,`FREV_cliplow ,`FREV_cliphigh ,"Coefficient for reverse breakdown current limitation")
-`IPRcz(IFACTOR ,1.0 ,"" ,"Multiplier for current")
-`IPRcz(CFACTOR ,1.0 ,"" ,"Multiplier for depletion capacitance")
-
-// Parameters for source-bulk junction
-`ifdef JUNCAP_StandAlone
- `MPRco(CJORBOT ,1.0e-3 ,"Fm^-2" ,`CJORBOT_cliplow ,inf ,"Zero-bias capacitance per unit-of-area of bottom component")
- `MPRco(CJORSTI ,1.0e-9 ,"Fm^-1" ,`CJORSTI_cliplow ,inf ,"Zero-bias capacitance per unit-of-length of STI-edge component")
- `MPRco(CJORGAT ,1.0e-9 ,"Fm^-1" ,`CJORGAT_cliplow ,inf ,"Zero-bias capacitance per unit-of-length of gate-edge component")
- `MPRco(VBIRBOT ,1.0 ,"V" ,`VBIR_cliplow ,inf ,"Built-in voltage at the reference temperature of bottom component")
- `MPRco(VBIRSTI ,1.0 ,"V" ,`VBIR_cliplow ,inf ,"Built-in voltage at the reference temperature of STI-edge component")
- `MPRco(VBIRGAT ,1.0 ,"V" ,`VBIR_cliplow ,inf ,"Built-in voltage at the reference temperature of gate-edge component")
- `MPRcc(PBOT ,0.5 ,"" ,`P_cliplow ,`P_cliphigh ,"Grading coefficient of bottom component")
- `MPRcc(PSTI ,0.5 ,"" ,`P_cliplow ,`P_cliphigh ,"Grading coefficient of STI-edge component")
- `MPRcc(PGAT ,0.5 ,"" ,`P_cliplow ,`P_cliphigh ,"Grading coefficient of gate-edge component")
- `MPRnb(PHIGBOT ,1.16 ,"V" ,"Zero-temperature bandgap voltage of bottom component")
- `MPRnb(PHIGSTI ,1.16 ,"V" ,"Zero-temperature bandgap voltage of STI-edge component")
- `MPRnb(PHIGGAT ,1.16 ,"V" ,"Zero-temperature bandgap voltage of gate-edge component")
- `MPRco(IDSATRBOT ,1.0e-12 ,"Am^-2" ,`IDSATR_cliplow ,inf ,"Saturation current density at the reference temperature of bottom component")
- `MPRco(IDSATRSTI ,1.0e-18 ,"Am^-1" ,`IDSATR_cliplow ,inf ,"Saturation current density at the reference temperature of STI-edge component")
- `MPRco(IDSATRGAT ,1.0e-18 ,"Am^-1" ,`IDSATR_cliplow ,inf ,"Saturation current density at the reference temperature of gate-edge component")
- `MPRco(CSRHBOT ,1.0e2 ,"Am^-3" ,`CSRH_cliplow ,inf ,"Shockley-Read-Hall prefactor of bottom component")
- `MPRco(CSRHSTI ,1.0e-4 ,"Am^-2" ,`CSRH_cliplow ,inf ,"Shockley-Read-Hall prefactor of STI-edge component")
- `MPRco(CSRHGAT ,1.0e-4 ,"Am^-2" ,`CSRH_cliplow ,inf ,"Shockley-Read-Hall prefactor of gate-edge component")
- `MPRco(XJUNSTI ,1.0e-7 ,"m" ,`XJUN_cliplow ,inf ,"Junction depth of STI-edge component")
- `MPRco(XJUNGAT ,1.0e-7 ,"m" ,`XJUN_cliplow ,inf ,"Junction depth of gate-edge component")
- `MPRco(CTATBOT ,1.0e2 ,"Am^-3" ,`CTAT_cliplow ,inf ,"Trap-assisted tunneling prefactor of bottom component")
- `MPRco(CTATSTI ,1.0e-4 ,"Am^-2" ,`CTAT_cliplow ,inf ,"Trap-assisted tunneling prefactor of STI-edge component")
- `MPRco(CTATGAT ,1.0e-4 ,"Am^-2" ,`CTAT_cliplow ,inf ,"Trap-assisted tunneling prefactor of gate-edge component")
- `MPRco(MEFFTATBOT ,0.25 ,"" ,`MEFFTAT_cliplow ,inf ,"Effective mass (in units of m0) for trap-assisted tunneling of bottom component")
- `MPRco(MEFFTATSTI ,0.25 ,"" ,`MEFFTAT_cliplow ,inf ,"Effective mass (in units of m0) for trap-assisted tunneling of STI-edge component")
- `MPRco(MEFFTATGAT ,0.25 ,"" ,`MEFFTAT_cliplow ,inf ,"Effective mass (in units of m0) for trap-assisted tunneling of gate-edge component")
- `MPRco(CBBTBOT ,1.0e-12 ,"AV^-3" ,`CBBT_cliplow ,inf ,"Band-to-band tunneling prefactor of bottom component")
- `MPRco(CBBTSTI ,1.0e-18 ,"AV^-3m" ,`CBBT_cliplow ,inf ,"Band-to-band tunneling prefactor of STI-edge component")
- `MPRco(CBBTGAT ,1.0e-18 ,"AV^-3m" ,`CBBT_cliplow ,inf ,"Band-to-band tunneling prefactor of gate-edge component")
- `MPRnb(FBBTRBOT ,1.0e9 ,"Vm^-1" ,"Normalization field at the reference temperature for band-to-band tunneling of bottom component")
- `MPRnb(FBBTRSTI ,1.0e9 ,"Vm^-1" ,"Normalization field at the reference temperature for band-to-band tunneling of STI-edge component")
- `MPRnb(FBBTRGAT ,1.0e9 ,"Vm^-1" ,"Normalization field at the reference temperature for band-to-band tunneling of gate-edge component")
- `MPRnb(STFBBTBOT ,-1.0e-3 ,"K^-1" ,"Temperature scaling parameter for band-to-band tunneling of bottom component")
- `MPRnb(STFBBTSTI ,-1.0e-3 ,"K^-1" ,"Temperature scaling parameter for band-to-band tunneling of STI-edge component")
- `MPRnb(STFBBTGAT ,-1.0e-3 ,"K^-1" ,"Temperature scaling parameter for band-to-band tunneling of gate-edge component")
- `MPRco(VBRBOT ,10.0 ,"V" ,`VBR_cliplow ,inf ,"Breakdown voltage of bottom component")
- `MPRco(VBRSTI ,10.0 ,"V" ,`VBR_cliplow ,inf ,"Breakdown voltage of STI-edge component")
- `MPRco(VBRGAT ,10.0 ,"V" ,`VBR_cliplow ,inf ,"Breakdown voltage of gate-edge component")
- `MPRco(PBRBOT ,4.0 ,"V" ,`PBR_cliplow ,inf ,"Breakdown onset tuning parameter of bottom component")
- `MPRco(PBRSTI ,4.0 ,"V" ,`PBR_cliplow ,inf ,"Breakdown onset tuning parameter of STI-edge component")
- `MPRco(PBRGAT ,4.0 ,"V" ,`PBR_cliplow ,inf ,"Breakdown onset tuning parameter of gate-edge component")
-`else // JUNCAP_StandAlone
- `MPRco(CJORBOT ,1.0e-3 ,"Fm^-2" ,`CJORBOT_cliplow ,inf ,"Zero-bias capacitance per unit-of-area of bottom component for source-bulk junction")
- `MPRco(CJORSTI ,1.0e-9 ,"Fm^-1" ,`CJORSTI_cliplow ,inf ,"Zero-bias capacitance per unit-of-length of STI-edge component for source-bulk junction")
- `MPRco(CJORGAT ,1.0e-9 ,"Fm^-1" ,`CJORGAT_cliplow ,inf ,"Zero-bias capacitance per unit-of-length of gate-edge component for source-bulk junction")
- `MPRco(VBIRBOT ,1.0 ,"V" ,`VBIR_cliplow ,inf ,"Built-in voltage at the reference temperature of bottom component for source-bulk junction")
- `MPRco(VBIRSTI ,1.0 ,"V" ,`VBIR_cliplow ,inf ,"Built-in voltage at the reference temperature of STI-edge component for source-bulk junction")
- `MPRco(VBIRGAT ,1.0 ,"V" ,`VBIR_cliplow ,inf ,"Built-in voltage at the reference temperature of gate-edge component for source-bulk junction")
- `MPRcc(PBOT ,0.5 ,"" ,`P_cliplow ,`P_cliphigh ,"Grading coefficient of bottom component for source-bulk junction")
- `MPRcc(PSTI ,0.5 ,"" ,`P_cliplow ,`P_cliphigh ,"Grading coefficient of STI-edge component for source-bulk junction")
- `MPRcc(PGAT ,0.5 ,"" ,`P_cliplow ,`P_cliphigh ,"Grading coefficient of gate-edge component for source-bulk junction")
- `MPRnb(PHIGBOT ,1.16 ,"V" ,"Zero-temperature bandgap voltage of bottom component for source-bulk junction")
- `MPRnb(PHIGSTI ,1.16 ,"V" ,"Zero-temperature bandgap voltage of STI-edge component for source-bulk junction")
- `MPRnb(PHIGGAT ,1.16 ,"V" ,"Zero-temperature bandgap voltage of gate-edge component for source-bulk junction")
- `MPRco(IDSATRBOT ,1.0e-12 ,"Am^-2" ,`IDSATR_cliplow ,inf ,"Saturation current density at the reference temperature of bottom component for source-bulk junction")
- `MPRco(IDSATRSTI ,1.0e-18 ,"Am^-1" ,`IDSATR_cliplow ,inf ,"Saturation current density at the reference temperature of STI-edge component for source-bulk junction")
- `MPRco(IDSATRGAT ,1.0e-18 ,"Am^-1" ,`IDSATR_cliplow ,inf ,"Saturation current density at the reference temperature of gate-edge component for source-bulk junction")
- `MPRco(CSRHBOT ,1.0e2 ,"Am^-3" ,`CSRH_cliplow ,inf ,"Shockley-Read-Hall prefactor of bottom component for source-bulk junction")
- `MPRco(CSRHSTI ,1.0e-4 ,"Am^-2" ,`CSRH_cliplow ,inf ,"Shockley-Read-Hall prefactor of STI-edge component for source-bulk junction")
- `MPRco(CSRHGAT ,1.0e-4 ,"Am^-2" ,`CSRH_cliplow ,inf ,"Shockley-Read-Hall prefactor of gate-edge component for source-bulk junction")
- `MPRco(XJUNSTI ,1.0e-7 ,"m" ,`XJUN_cliplow ,inf ,"Junction depth of STI-edge component for source-bulk junction")
- `MPRco(XJUNGAT ,1.0e-7 ,"m" ,`XJUN_cliplow ,inf ,"Junction depth of gate-edge component for source-bulk junction")
- `MPRco(CTATBOT ,1.0e2 ,"Am^-3" ,`CTAT_cliplow ,inf ,"Trap-assisted tunneling prefactor of bottom component for source-bulk junction")
- `MPRco(CTATSTI ,1.0e-4 ,"Am^-2" ,`CTAT_cliplow ,inf ,"Trap-assisted tunneling prefactor of STI-edge component for source-bulk junction")
- `MPRco(CTATGAT ,1.0e-4 ,"Am^-2" ,`CTAT_cliplow ,inf ,"Trap-assisted tunneling prefactor of gate-edge component for source-bulk junction")
- `MPRco(MEFFTATBOT ,0.25 ,"" ,`MEFFTAT_cliplow ,inf ,"Effective mass (in units of m0) for trap-assisted tunneling of bottom component for source-bulk junction")
- `MPRco(MEFFTATSTI ,0.25 ,"" ,`MEFFTAT_cliplow ,inf ,"Effective mass (in units of m0) for trap-assisted tunneling of STI-edge component for source-bulk junction")
- `MPRco(MEFFTATGAT ,0.25 ,"" ,`MEFFTAT_cliplow ,inf ,"Effective mass (in units of m0) for trap-assisted tunneling of gate-edge component for source-bulk junction")
- `MPRco(CBBTBOT ,1.0e-12 ,"AV^-3" ,`CBBT_cliplow ,inf ,"Band-to-band tunneling prefactor of bottom component for source-bulk junction")
- `MPRco(CBBTSTI ,1.0e-18 ,"AV^-3m" ,`CBBT_cliplow ,inf ,"Band-to-band tunneling prefactor of STI-edge component for source-bulk junction")
- `MPRco(CBBTGAT ,1.0e-18 ,"AV^-3m" ,`CBBT_cliplow ,inf ,"Band-to-band tunneling prefactor of gate-edge component for source-bulk junction")
- `MPRnb(FBBTRBOT ,1.0e9 ,"Vm^-1" ,"Normalization field at the reference temperature for band-to-band tunneling of bottom component for source-bulk junction")
- `MPRnb(FBBTRSTI ,1.0e9 ,"Vm^-1" ,"Normalization field at the reference temperature for band-to-band tunneling of STI-edge component for source-bulk junction")
- `MPRnb(FBBTRGAT ,1.0e9 ,"Vm^-1" ,"Normalization field at the reference temperature for band-to-band tunneling of gate-edge component for source-bulk junction")
- `MPRnb(STFBBTBOT ,-1.0e-3 ,"K^-1" ,"Temperature scaling parameter for band-to-band tunneling of bottom component for source-bulk junction")
- `MPRnb(STFBBTSTI ,-1.0e-3 ,"K^-1" ,"Temperature scaling parameter for band-to-band tunneling of STI-edge component for source-bulk junction")
- `MPRnb(STFBBTGAT ,-1.0e-3 ,"K^-1" ,"Temperature scaling parameter for band-to-band tunneling of gate-edge component for source-bulk junction")
- `MPRco(VBRBOT ,10.0 ,"V" ,`VBR_cliplow ,inf ,"Breakdown voltage of bottom component for source-bulk junction")
- `MPRco(VBRSTI ,10.0 ,"V" ,`VBR_cliplow ,inf ,"Breakdown voltage of STI-edge component for source-bulk junction")
- `MPRco(VBRGAT ,10.0 ,"V" ,`VBR_cliplow ,inf ,"Breakdown voltage of gate-edge component for source-bulk junction")
- `MPRco(PBRBOT ,4.0 ,"V" ,`PBR_cliplow ,inf ,"Breakdown onset tuning parameter of bottom component for source-bulk junction")
- `MPRco(PBRSTI ,4.0 ,"V" ,`PBR_cliplow ,inf ,"Breakdown onset tuning parameter of STI-edge component for source-bulk junction")
- `MPRco(PBRGAT ,4.0 ,"V" ,`PBR_cliplow ,inf ,"Breakdown onset tuning parameter of gate-edge component for source-bulk junction")
-`endif // JUNCAP_StandAlone
-
-// Parameters for drain-bulk junction
-`ifdef JUNCAP_StandAlone
- // do nothing
-`else // JUNCAP_StandAlone
- `MPRco(CJORBOTD ,1.0e-3 ,"Fm^-2" ,`CJORBOT_cliplow ,inf ,"Zero-bias capacitance per unit-of-area of bottom component for drain-bulk junction")
- `MPRco(CJORSTID ,1.0e-9 ,"Fm^-1" ,`CJORSTI_cliplow ,inf ,"Zero-bias capacitance per unit-of-length of STI-edge component for drain-bulk junction")
- `MPRco(CJORGATD ,1.0e-9 ,"Fm^-1" ,`CJORGAT_cliplow ,inf ,"Zero-bias capacitance per unit-of-length of gate-edge component for drain-bulk junction")
- `MPRco(VBIRBOTD ,1.0 ,"V" ,`VBIR_cliplow ,inf ,"Built-in voltage at the reference temperature of bottom component for drain-bulk junction")
- `MPRco(VBIRSTID ,1.0 ,"V" ,`VBIR_cliplow ,inf ,"Built-in voltage at the reference temperature of STI-edge component for drain-bulk junction")
- `MPRco(VBIRGATD ,1.0 ,"V" ,`VBIR_cliplow ,inf ,"Built-in voltage at the reference temperature of gate-edge component for drain-bulk junction")
- `MPRcc(PBOTD ,0.5 ,"" ,`P_cliplow ,`P_cliphigh ,"Grading coefficient of bottom component for drain-bulk junction")
- `MPRcc(PSTID ,0.5 ,"" ,`P_cliplow ,`P_cliphigh ,"Grading coefficient of STI-edge component for drain-bulk junction")
- `MPRcc(PGATD ,0.5 ,"" ,`P_cliplow ,`P_cliphigh ,"Grading coefficient of gate-edge component for drain-bulk junction")
- `MPRnb(PHIGBOTD ,1.16 ,"V" ,"Zero-temperature bandgap voltage of bottom component for drain-bulk junction")
- `MPRnb(PHIGSTID ,1.16 ,"V" ,"Zero-temperature bandgap voltage of STI-edge component for drain-bulk junction")
- `MPRnb(PHIGGATD ,1.16 ,"V" ,"Zero-temperature bandgap voltage of gate-edge component for drain-bulk junction")
- `MPRco(IDSATRBOTD ,1.0e-12 ,"Am^-2" ,`IDSATR_cliplow ,inf ,"Saturation current density at the reference temperature of bottom component for drain-bulk junction")
- `MPRco(IDSATRSTID ,1.0e-18 ,"Am^-1" ,`IDSATR_cliplow ,inf ,"Saturation current density at the reference temperature of STI-edge component for drain-bulk junction")
- `MPRco(IDSATRGATD ,1.0e-18 ,"Am^-1" ,`IDSATR_cliplow ,inf ,"Saturation current density at the reference temperature of gate-edge component for drain-bulk junction")
- `MPRco(CSRHBOTD ,1.0e2 ,"Am^-3" ,`CSRH_cliplow ,inf ,"Shockley-Read-Hall prefactor of bottom component for drain-bulk junction")
- `MPRco(CSRHSTID ,1.0e-4 ,"Am^-2" ,`CSRH_cliplow ,inf ,"Shockley-Read-Hall prefactor of STI-edge component for drain-bulk junction")
- `MPRco(CSRHGATD ,1.0e-4 ,"Am^-2" ,`CSRH_cliplow ,inf ,"Shockley-Read-Hall prefactor of gate-edge component for drain-bulk junction")
- `MPRco(XJUNSTID ,1.0e-7 ,"m" ,`XJUN_cliplow ,inf ,"Junction depth of STI-edge component for drain-bulk junction")
- `MPRco(XJUNGATD ,1.0e-7 ,"m" ,`XJUN_cliplow ,inf ,"Junction depth of gate-edge component for drain-bulk junction")
- `MPRco(CTATBOTD ,1.0e2 ,"Am^-3" ,`CTAT_cliplow ,inf ,"Trap-assisted tunneling prefactor of bottom component for drain-bulk junction")
- `MPRco(CTATSTID ,1.0e-4 ,"Am^-2" ,`CTAT_cliplow ,inf ,"Trap-assisted tunneling prefactor of STI-edge component for drain-bulk junction")
- `MPRco(CTATGATD ,1.0e-4 ,"Am^-2" ,`CTAT_cliplow ,inf ,"Trap-assisted tunneling prefactor of gate-edge component for drain-bulk junction")
- `MPRco(MEFFTATBOTD ,0.25 ,"" ,`MEFFTAT_cliplow ,inf ,"Effective mass (in units of m0) for trap-assisted tunneling of bottom component for drain-bulk junction")
- `MPRco(MEFFTATSTID ,0.25 ,"" ,`MEFFTAT_cliplow ,inf ,"Effective mass (in units of m0) for trap-assisted tunneling of STI-edge component for drain-bulk junction")
- `MPRco(MEFFTATGATD ,0.25 ,"" ,`MEFFTAT_cliplow ,inf ,"Effective mass (in units of m0) for trap-assisted tunneling of gate-edge component for drain-bulk junction")
- `MPRco(CBBTBOTD ,1.0e-12 ,"AV^-3" ,`CBBT_cliplow ,inf ,"Band-to-band tunneling prefactor of bottom component for drain-bulk junction")
- `MPRco(CBBTSTID ,1.0e-18 ,"AV^-3m" ,`CBBT_cliplow ,inf ,"Band-to-band tunneling prefactor of STI-edge component for drain-bulk junction")
- `MPRco(CBBTGATD ,1.0e-18 ,"AV^-3m" ,`CBBT_cliplow ,inf ,"Band-to-band tunneling prefactor of gate-edge component for drain-bulk junction")
- `MPRnb(FBBTRBOTD ,1.0e9 ,"Vm^-1" ,"Normalization field at the reference temperature for band-to-band tunneling of bottom component for drain-bulk junction")
- `MPRnb(FBBTRSTID ,1.0e9 ,"Vm^-1" ,"Normalization field at the reference temperature for band-to-band tunneling of STI-edge component for drain-bulk junction")
- `MPRnb(FBBTRGATD ,1.0e9 ,"Vm^-1" ,"Normalization field at the reference temperature for band-to-band tunneling of gate-edge component for drain-bulk junction")
- `MPRnb(STFBBTBOTD ,-1.0e-3 ,"K^-1" ,"Temperature scaling parameter for band-to-band tunneling of bottom component for drain-bulk junction")
- `MPRnb(STFBBTSTID ,-1.0e-3 ,"K^-1" ,"Temperature scaling parameter for band-to-band tunneling of STI-edge component for drain-bulk junction")
- `MPRnb(STFBBTGATD ,-1.0e-3 ,"K^-1" ,"Temperature scaling parameter for band-to-band tunneling of gate-edge component for drain-bulk junction")
- `MPRco(VBRBOTD ,10.0 ,"V" ,`VBR_cliplow ,inf ,"Breakdown voltage of bottom component for drain-bulk junction")
- `MPRco(VBRSTID ,10.0 ,"V" ,`VBR_cliplow ,inf ,"Breakdown voltage of STI-edge component for drain-bulk junction")
- `MPRco(VBRGATD ,10.0 ,"V" ,`VBR_cliplow ,inf ,"Breakdown voltage of gate-edge component for drain-bulk junction")
- `MPRco(PBRBOTD ,4.0 ,"V" ,`PBR_cliplow ,inf ,"Breakdown onset tuning parameter of bottom component for drain-bulk junction")
- `MPRco(PBRSTID ,4.0 ,"V" ,`PBR_cliplow ,inf ,"Breakdown onset tuning parameter of STI-edge component for drain-bulk junction")
- `MPRco(PBRGATD ,4.0 ,"V" ,`PBR_cliplow ,inf ,"Breakdown onset tuning parameter of gate-edge component for drain-bulk junction")
-`endif // JUNCAP_StandAlone
-
-// JUNCAP2-express parameters
-`MPRcc(SWJUNEXP ,0.0 ,"" ,0.0 ,1.0 ,"Flag for JUNCAP-express; 0=full model, 1=express model")
-`ifdef JUNCAP_StandAlone
- `MPRco(VJUNREF ,2.5 ,"V" ,`VJUNREF_cliplow ,inf ,"Typical maximum junction voltage; usually about 2*VSUP")
- `MPRco(FJUNQ ,0.03 ,"" ,`FJUNQ_cliplow ,inf ,"Fraction below which junction capacitance components are considered negligible")
-`else // JUNCAP_StandAlone
- `MPRco(VJUNREF ,2.5 ,"V" ,`VJUNREF_cliplow ,inf ,"Typical maximum source-bulk junction voltage; usually about 2*VSUP")
- `MPRco(FJUNQ ,0.03 ,"" ,`FJUNQ_cliplow ,inf ,"Fraction below which source-bulk junction capacitance components are considered negligible")
- `MPRco(VJUNREFD ,2.5 ,"V" ,`VJUNREF_cliplow ,inf ,"Typical maximum drain-bulk junction voltage; usually about 2*VSUP")
- `MPRco(FJUNQD ,0.03 ,"" ,`FJUNQ_cliplow ,inf ,"Fraction below which drain-bulk junction capacitance components are considered negligible")
-`endif // JUNCAP_StandAlone
diff --git a/src/spicelib/devices/adms/psp103/admsva/JUNCAP200_varlist.include b/src/spicelib/devices/adms/psp103/admsva/JUNCAP200_varlist.include
deleted file mode 100644
index ddb410eac..000000000
--- a/src/spicelib/devices/adms/psp103/admsva/JUNCAP200_varlist.include
+++ /dev/null
@@ -1,141 +0,0 @@
-//======================================================================================
-//======================================================================================
-// Filename: JUNCAP200_varlist.include
-//======================================================================================
-//======================================================================================
-//
-// (c) Copyright notice
-//
-// Since 2015 until today, PSP has been co-developed by NXP Semiconductors and
-// CEA-Leti. For this part of the model, each claim undivided ownership and copyrights
-// Since 2012 until 2015, PSP has been co-developed by NXP Semiconductors and
-// Delft University of Technology. For this part of the model, each claim undivided
-// ownership and copyrights
-// Until and including 2011, PSP has been co-developed by NXP Semiconductors and
-// Arizona State University. For this part of the model, NXP Semiconductors claims
-// undivided ownership and copyrights.
-//
-//
-// Version: 200.6.0, April 2019
-//
-//======================================================================================
-//======================================================================================
-//
-// Further information can be found in the file releasenotesPSP103.txt
-//
-
-// declaration of clipped parameters
-real TRJ_i, IMAX_i, FREV_i, IFACTOR_i, CFACTOR_i;
-real CJORBOT_i, CJORSTI_i, CJORGAT_i, VBIRBOT_i, VBIRSTI_i, VBIRGAT_i;
-real PBOT_i, PSTI_i, PGAT_i, PHIGBOT_i, PHIGSTI_i, PHIGGAT_i;
-real IDSATRBOT_i, IDSATRSTI_i, IDSATRGAT_i, XJUNSTI_i, XJUNGAT_i;
-real CSRHBOT_i, CSRHSTI_i, CSRHGAT_i, CTATBOT_i, CTATSTI_i, CTATGAT_i;
-real MEFFTATBOT_i, MEFFTATSTI_i, MEFFTATGAT_i;
-real CBBTBOT_i, CBBTSTI_i, CBBTGAT_i, FBBTRBOT_i, FBBTRSTI_i, FBBTRGAT_i;
-real STFBBTBOT_i, STFBBTSTI_i, STFBBTGAT_i;
-real VBRBOT_i, VBRSTI_i, VBRGAT_i, PBRBOT_i, PBRSTI_i, PBRGAT_i;
-
-real SWJUNEXP_i, VJUNREF_i, FJUNQ_i;
-
-// declaration of variables calculated outside macro "juncapfunction", voltage-independent part
-real tkr, tkd, auxt, KBOL_over_QELE, phitr, phitrinv, phitd, phitdinv;
-real perfc, berfc, cerfc;
-real deltaphigr, deltaphigd, pmax;
-
-real phigrbot, phigrsti, phigrgat, phigdbot, phigdsti, phigdgat;
-real ftdbot, ftdsti, ftdgat, idsatbot, idsatsti, idsatgat;
-real ubibot, ubisti, ubigat, vbibot, vbisti, vbigat;
-real vbibot2, vbisti2, vbigat2, pbot2, psti2, pgat2, vbibot2r, vbisti2r, vbigat2r;
-real vbiinvbot, vbiinvsti, vbiinvgat;
-real one_minus_PBOT, one_minus_PSTI, one_minus_PGAT;
-real one_over_one_minus_PBOT, one_over_one_minus_PSTI, one_over_one_minus_PGAT;
-real cjobot, cjosti, cjogat;
-real qprefbot, qprefsti, qprefgat, qpref2bot, qpref2sti, qpref2gat;
-real wdepnulrbot, wdepnulrsti, wdepnulrgat, wdepnulrinvbot, wdepnulrinvsti, wdepnulrinvgat;
-real VBIRBOTinv, VBIRSTIinv, VBIRGATinv;
-real deltaEbot, deltaEsti, deltaEgat, atatbot, atatsti, atatgat;
-real btatpartbot, btatpartsti, btatpartgat;
-real fbbtbot, fbbtsti, fbbtgat;
-real alphaav, fstopbot, fstopsti, fstopgat, VBRinvbot, VBRinvsti, VBRinvgat;
-real slopebot, slopesti, slopegat;
-real vmaxbot, vmaxsti, vmaxgat;
-
-// JUNCAP-Express variables
-real I1, I2, I3, I4, I5;
-real I1_cor, I2_cor, I3_cor, I4_cor, I5_cor;
-real V1, V2, V3, V4, V5;
-real alphaje, m0_rev, mcor_rev;
-real tt0, tt1, tt2, tm0, tm1;
-real FRACNA, FRACNB, FRACI;
-real zfrac;
-real ijunfor1, ijunfor2, ijunrev;
-
-`ifdef JUNCAP_StandAlone
- // do nothing
-`else // JUNCAP_StandAlone
- real CJORBOTD_i, CJORSTID_i, CJORGATD_i, VBIRBOTD_i, VBIRSTID_i, VBIRGATD_i;
- real PBOTD_i, PSTID_i, PGATD_i, PHIGBOTD_i, PHIGSTID_i, PHIGGATD_i;
- real IDSATRBOTD_i, IDSATRSTID_i, IDSATRGATD_i, XJUNSTID_i, XJUNGATD_i;
- real CSRHBOTD_i, CSRHSTID_i, CSRHGATD_i, CTATBOTD_i, CTATSTID_i, CTATGATD_i;
- real MEFFTATBOTD_i, MEFFTATSTID_i, MEFFTATGATD_i;
- real CBBTBOTD_i, CBBTSTID_i, CBBTGATD_i, FBBTRBOTD_i, FBBTRSTID_i, FBBTRGATD_i;
- real STFBBTBOTD_i, STFBBTSTID_i, STFBBTGATD_i;
- real VBRBOTD_i, VBRSTID_i, VBRGATD_i, PBRBOTD_i, PBRSTID_i, PBRGATD_i;
-
- real VJUNREFD_i, FJUNQD_i;
-
- real phigrbot_d, phigrsti_d, phigrgat_d, phigdbot_d, phigdsti_d, phigdgat_d;
- real ftdbot_d, ftdsti_d, ftdgat_d, idsatbot_d, idsatsti_d, idsatgat_d;
- real ubibot_d, ubisti_d, ubigat_d, vbibot_d, vbisti_d, vbigat_d;
- real vbiinvbot_d, vbiinvsti_d, vbiinvgat_d;
- real one_minus_PBOT_d, one_minus_PSTI_d, one_minus_PGAT_d;
- real one_over_one_minus_PBOT_d, one_over_one_minus_PSTI_d, one_over_one_minus_PGAT_d;
- real cjobot_d, cjosti_d, cjogat_d;
- real qprefbot_d, qprefsti_d, qprefgat_d, qpref2bot_d, qpref2sti_d, qpref2gat_d;
- real wdepnulrbot_d, wdepnulrsti_d, wdepnulrgat_d, wdepnulrinvbot_d, wdepnulrinvsti_d, wdepnulrinvgat_d;
- real VBIRBOTinv_d, VBIRSTIinv_d, VBIRGATinv_d;
- real deltaEbot_d, deltaEsti_d, deltaEgat_d, atatbot_d, atatsti_d, atatgat_d;
- real btatpartbot_d, btatpartsti_d, btatpartgat_d;
- real fbbtbot_d, fbbtsti_d, fbbtgat_d;
- real fstopbot_d, fstopsti_d, fstopgat_d, VBRinvbot_d, VBRinvsti_d, VBRinvgat_d;
- real slopebot_d, slopesti_d, slopegat_d;
-`endif // JUNCAP_StandAlone
-
-//`LocalGlobalVars
-
-//================================================================
-// Variables that are different for source and drain side junction
-// and have a scope larger than a single macro-call
-//================================================================
-
-`ifdef JUNCAP_StandAlone
- real AB_i, LS_i, LG_i;
- real zflagbot, zflagsti, zflaggat;
- real VMAX, exp_VMAX_over_phitd, vbimin, vch, vfmin, vbbtlim;
-
- // JUNCAP-express variables
- real xhighf1, expxhf1, xhighf2, expxhf2, xhighr, expxhr;
-
- // JUNCAP2-express intermediate parameters
- real ISATFOR1, MFOR1, ISATFOR2, MFOR2, ISATREV, MREV, m0flag;
-`else // JUNCAP_StandAlone
- real ABSOURCE_i, LSSOURCE_i, LGSOURCE_i, AS_i, PS_i;
- real zflagbot_s, zflagsti_s, zflaggat_s;
- real VMAX_s, exp_VMAX_over_phitd_s, vbimin_s, vch_s, vfmin_s, vbbtlim_s;
-
- // JUNCAP-express variables
- real xhighf1_s, expxhf1_s, xhighf2_s, expxhf2_s, xhighr_s, expxhr_s, m0flag_s;
-
- // JUNCAP2-express intermediate parameters
- real ISATFOR1_s, MFOR1_s, ISATFOR2_s, MFOR2_s, ISATREV_s, MREV_s;
-
- real ABDRAIN_i, LSDRAIN_i, LGDRAIN_i, AD_i, PD_i;
- real zflagbot_d, zflagsti_d, zflaggat_d;
- real VMAX_d, exp_VMAX_over_phitd_d, vbimin_d, vch_d, vfmin_d, vbbtlim_d;
-
- // JUNCAP-express variables
- real xhighf1_d, expxhf1_d, xhighf2_d, expxhf2_d, xhighr_d, expxhr_d, m0flag_d;
-
- // JUNCAP2-express intermediate parameters
- real ISATFOR1_d, MFOR1_d, ISATFOR2_d, MFOR2_d, ISATREV_d, MREV_d;
-`endif // JUNCAP_StandAlone
diff --git a/src/spicelib/devices/adms/psp103/admsva/PSP103_ChargesNQS.include b/src/spicelib/devices/adms/psp103/admsva/PSP103_ChargesNQS.include
deleted file mode 100644
index c992f3591..000000000
--- a/src/spicelib/devices/adms/psp103/admsva/PSP103_ChargesNQS.include
+++ /dev/null
@@ -1,314 +0,0 @@
-//======================================================================================
-//======================================================================================
-// Filename: PSP103_ChargesNQS.include
-//======================================================================================
-//======================================================================================
-//
-// (c) Copyright notice
-//
-// Since 2015 until today, PSP has been co-developed by NXP Semiconductors and
-// CEA-Leti. For this part of the model, each claim undivided ownership and copyrights
-// Since 2012 until 2015, PSP has been co-developed by NXP Semiconductors and
-// Delft University of Technology. For this part of the model, each claim undivided
-// ownership and copyrights
-// Until and including 2011, PSP has been co-developed by NXP Semiconductors and
-// Arizona State University. For this part of the model, NXP Semiconductors claims
-// undivided ownership and copyrights.
-//
-//
-// Version: 103.7.0 (PSP), 200.6.0 (JUNCAP), April 2019
-//
-//======================================================================================
-//======================================================================================
-//
-// Further information can be found in the file releasenotesPSP103.txt
-//
-
-// --------------------------------------------------------------------------------------------------------------
-// Calculate NQS-charge contributions
-// --------------------------------------------------------------------------------------------------------------
-
-Qp1 = vnorm * V(SPLINE1);
-Qp2 = vnorm * V(SPLINE2);
-Qp3 = vnorm * V(SPLINE3);
-Qp4 = vnorm * V(SPLINE4);
-Qp5 = vnorm * V(SPLINE5);
-Qp6 = vnorm * V(SPLINE6);
-Qp7 = vnorm * V(SPLINE7);
-Qp8 = vnorm * V(SPLINE8);
-Qp9 = vnorm * V(SPLINE9);
-
-Tnorm = 0.0;
-
-if (SWNQS_i != 0) begin
- // Dimension and mobility information is included in Tnorm
- Tnorm = MUNQS_i * phit1 * BET_i / (COX_qm * Gmob_dL_ac);
- thesat2 = thesat1_ac * thesat1_ac * phit1 * phit1;
-
- if (SWNQS_i == 1) begin
- dQy = QpN - Qp0;
- d2Qy = 6.0 * (Qp0 + QpN) - 12.0 * Qp1;
- end else if (SWNQS_i == 2) begin
- dQy = (-7.0 * Qp0 - 3.0 * Qp1 + 12.0 * Qp2 - 2.0 * QpN) / 5.0;
- d2Qy = -18.0 / 5.0 * (-4.0 * Qp0 + 9.0 * Qp1 - 6.0 * Qp2 + QpN);
- end else if (SWNQS_i == 3) begin
- dQy = (-13.0 * Qp0 - 6.0 * Qp1 + 24.0 * Qp2 - 6.0 * Qp3 + QpN) / 7.0;
- d2Qy = (180.0 * Qp0 - 408.0 * Qp1 + 288.0 * Qp2 - 72.0 * Qp3 + 12.0 * QpN) / 7.0;
- end else if (SWNQS_i == 5) begin
- dQy = (-181.0 * Qp0 - 84.0 * Qp1 + 24.0 * Qp4 - 6.0 * Qp5 - 90.0 * Qp3 + QpN
- + 336.0 * Qp2) / 65.0;
- d2Qy = (432.0 * Qp4 - 108.0 * Qp5 - 1620.0 * Qp3 + 18.0 * QpN + 3762.0 * Qp0
- - 8532.0 * Qp1 + 6048.0 * Qp2) / 65.0;
- end else if (SWNQS_i == 9) begin
- dQy = (1680.0 * Qp6 + 23400.0 * Qp4 + 5.0 * QpN - 87330.0 * Qp3 + 120.0 * Qp8
- - 450.0 * Qp7 - 81480.0 * Qp1 + 325920.0 * Qp2
- -175565.0 * Qp0 - 30.0 * Qp9) / 37829.0 - 30.0 / 181.0 * Qp5;
- d2Qy = (-13500.0 * Qp7 + 702000.0 * Qp4 - 2619900 * Qp3 - 13793100.0 * Qp1
- + 9777600.0 * Qp2 + 6081750.0 * Qp0 + 150.0 * QpN + 3600.0 * Qp8
- - 900.0 * Qp9 + 50400.0 * Qp6) / 37829.0 - 900.0 / 181.0 * Qp5;
- end else begin
- dQy = 0.0;
- d2Qy = 0.0;
- end
- `fq(Qp1, xg_ac, dQy, d2Qy, fk1)
-end else begin
- thesat2 = 0.0;
-end
-
-if (SWNQS_i >= 2) begin
- if (SWNQS_i == 2) begin
- dQy = (2.0 * Qp0 - 12.0 * Qp1 + 3.0 * Qp2 + 7.0 * QpN) / 5.0;
- d2Qy = -18.0 / 5.0 * (-4.0 * QpN + 9.0 * Qp2 - 6.0 * Qp1 + Qp0);
- end else if (SWNQS_i == 3) begin
- dQy = 0.5 * Qp0 - 3.0 * Qp1 + 3.0 * Qp3 - 0.5 * QpN;
- d2Qy = (-48.0 * Qp0 + 288.0 * Qp1 - 480.0 * Qp2 + 288.0 * Qp3 - 48.0 * QpN) / 7.0;
- end else if (SWNQS_i == 5) begin
- dQy = (-291.0 * Qp1 - 6.0 * Qp2 - 84.0 * Qp4 + 21.0 * Qp5) / 65.0
- + (630.0 * Qp3 - 7.0 * QpN + 97.0 * Qp0) / 130.0;
- d2Qy = (-1728.0 * Qp4 + 432.0 * Qp5 + 6480.0 * Qp3 - 72.0 * QpN - 1008.0 * Qp0
- + 6048.0 * Qp1 - 10152.0 * Qp2) / 65.0;
- end else if (SWNQS_i == 9) begin
- dQy = (-5880.0 * Qp6 - 81900.0 * Qp4 + 305655.0 * Qp3 - 420.0 * Qp8
- + 105.0 * Qp9 - 282255.0 * Qp1 + 1575.0 * Qp7 - 5850.0 * Qp2) / 37829.0
- + 105.0 / 181.0 * Qp5 + (94085.0 * Qp0 - 35.0 * QpN) / 75658.0;
- d2Qy = (9777600.0 * Qp1 + 54000.0 * Qp7 - 2808000.0 * Qp4 + 10479600.0 * Qp3
- - 16413000.0 * Qp2 - 1629600.0 * Qp0 - 600.0 * QpN - 14400.0 * Qp8
- + 3600.0 * Qp9 - 201600.0 * Qp6) / 37829.0 + 3600.0 * Qp5 / 181.0;
- end else begin
- dQy = 0.0;
- d2Qy = 0.0;
- end
- `fq(Qp2, xg_ac, dQy, d2Qy, fk2)
-end
-
-if (SWNQS_i >= 3) begin
- if (SWNQS_i == 3) begin
- dQy = (13.0 * QpN + 6.0 * Qp3 - 24.0 * Qp2 + 6.0 * Qp1 - Qp0) / 7.0;
- d2Qy = (180.0 * QpN - 408.0 * Qp3 + 288.0 * Qp2 - 72.0 * Qp1 + 12.0 * Qp0) / 7.0;
- end else if (SWNQS_i == 5) begin
- dQy = (QpN - 6.0 * Qp5 + 24.0 * Qp4 - 24.0 * Qp2 + 6.0 * Qp1 - Qp0) / 5.0;
- d2Qy = (1296.0 * (Qp4 + Qp2) - 324.0 * (Qp5 + Qp1) - 2052.0 * Qp3
- + 54.0 * (QpN + Qp0)) / 13.0;
- end else if (SWNQS_i == 9) begin
- dQy = (21840.0 * Qp6 + 304200.0 * Qp4 + 65.0 * QpN - 420.0 * Qp3 + 1560.0 * Qp8
- - 12605.0 * Qp0 - 390.0 * Qp9 + 75630.0 * Qp1 - 5850.0 * Qp7
- - 302520.0 * Qp2) / 37829.0 - 390.0 / 181.0 * Qp5;
- d2Qy = (-2619900.0 * Qp1 - 202500.0 * Qp7 + 10530000.0 * Qp4 - 16601100.0 * Qp3
- + 10479600.0 * Qp2 + 436650.0 * Qp0 + 2250.0 * QpN + 54000.0 * Qp8
- - 13500.0 * Qp9 + 756000.0 * Qp6) / 37829.0 - 13500.0 * Qp5 / 181.0;
- end else begin
- dQy = 0.0;
- d2Qy = 0.0;
- end
- `fq(Qp3, xg_ac, dQy, d2Qy, fk3)
-end
-
-if (SWNQS_i >= 4) begin
- if (SWNQS_i == 5) begin
- dQy = (-630.0 * Qp3 + 12.0 * Qp4 + 582.0 * Qp5 - 97.0 * QpN + 7.0 * Qp0
- - 42.0 * Qp1 + 168.0 * Qp2) / 130.0;
- d2Qy = (-10152.0 * Qp4 + 6048.0 * Qp5 + 6480.0 * Qp3 - 1008.0 * QpN
- - 72.0 * Qp0 + 432.0 * Qp1 - 1728.0 * Qp2) / 65.0;
- end
- else if (SWNQS_i == 9) begin
- dQy = (-81480.0 * Qp6 - 30.0 * Qp4 - 303975.0 * Qp3 - 5820.0 * Qp8
- + 1455.0 * Qp9 - 20265.0 * Qp1 + 21825.0 * Qp7 + 81060.0 * Qp2) / 37829.0
- - 485.0 / 75658.0 * QpN + 1455.0 * Qp5 / 181.0 + 6755.0 * Qp0 / 75658.0;
- d2Qy = (702000.0 * Qp1 + 756000.0 * Qp7 - 16614600.0 * Qp4 + 10530000.0 * Qp3
- - 2808000.0 * Qp2 - 117000.0 * Qp0 - 8400.0 * QpN - 201600.0 * Qp8
- + 50400.0 * Qp9 - 2822400.0 * Qp6) / 37829.0 + 50400.0 * Qp5 / 181.0;
- end else begin
- dQy = 0.0;
- d2Qy = 0.0;
- end
- `fq(Qp4, xg_ac, dQy, d2Qy, fk4)
-end
-
-if (SWNQS_i >= 5) begin
- if (SWNQS_i == 5) begin
- dQy = (-336.0 * Qp4 + 84.0 * Qp5 + 90.0 * Qp3 + 181.0 * QpN - Qp0 + 6.0 * Qp1
- - 24.0 * Qp2) / 65.0;
- d2Qy = (18.0 * Qp0 + 3762.0 * QpN + 6048.0 * Qp4 + 432.0 * Qp2 - 1620.0 * Qp3
- - 108.0 * Qp1 - 8532.0 * Qp5) / 65.0;
- end else if (SWNQS_i == 9) begin
- dQy = (1680.0 * (Qp6 - Qp4) + 5.0 * (QpN - Qp0) + 450.0 * (Qp3 - Qp7)
- + 120.0 * (Qp8 - Qp2) - 30.0 * (Qp9 - Qp1)) / 209.0;
- d2Qy = (-900.0 * (Qp1 + Qp9) - 13500.0 * (Qp7 + Qp3) - 79500.0 * Qp5
- + 50400.0 * (Qp4 + Qp6) + 3600.0 * (Qp2 + Qp8) + 150.0 * (Qp0 + QpN)) / 181.0;
- end else begin
- dQy = 0.0;
- d2Qy = 0.0;
- end
- `fq(Qp5, xg_ac, dQy, d2Qy, fk5)
-end
-
-if (SWNQS_i >= 6) begin
- if (SWNQS_i == 9) begin
- dQy = (30.0 * Qp6 + 81480.0 * Qp4 - 21825.0 * Qp3 - 81060.0 * Qp8 + 20265.0 * Qp9
- - 1455.0 * Qp1 + 303975.0 * Qp7 + 5820.0 * Qp2) / 37829.0
- -(6755.0 * QpN - 485.0 * Qp0) / 75658.0 - 1455.0 / 181.0 * Qp5;
- d2Qy = (50400.0 * Qp1 + 10530000.0 * Qp7 - 2822400.0 * Qp4 + 756000.0 * Qp3
- - 201600.0 * Qp2 - 8400.0 * Qp0 - 117000.0 * QpN - 2808000.0 * Qp8
- + 702000.0 * Qp9 - 16614600.0 * Qp6) / 37829.0 + 50400.0 * Qp5 / 181.0;
- end else begin
- dQy = 0.0;
- d2Qy = 0.0;
- end
- `fq(Qp6, xg_ac, dQy, d2Qy, fk6)
-end
-
-if (SWNQS_i >= 7) begin
- if (SWNQS_i == 9) begin
- dQy = (-304200.0 * Qp6 - 21840.0 * Qp4 + 12605.0 * QpN + 5850.0 * Qp3
- + 302520.0 * Qp8 - 65.0 * Qp0 - 75630.0 * Qp9 + 390.0 * Qp1 + 420.0 * Qp7
- - 1560.0 * Qp2) / 37829.0 + 390.0 / 181.0 * Qp5;
- d2Qy = (-13500.0 * Qp1 - 16601100.0 * Qp7 + 756000.0 * Qp4 - 202500.0 * Qp3
- + 54000.0 * Qp2 + 2250.0 * Qp0 + 436650.0 * QpN + 10479600.0 * Qp8
- - 2619900.0 * Qp9 + 10530000.0 * Qp6) / 37829.0 - 13500.0 * Qp5 / 181.0;
- end else begin
- dQy = 0.0;
- d2Qy = 0.0;
- end
- `fq(Qp7, xg_ac, dQy, d2Qy, fk7)
-end
-
-if (SWNQS_i >= 8) begin
- if (SWNQS_i == 9) begin
- dQy = (81900.0 * Qp6 + 5880.0 * Qp4 - 1575.0 * Qp3 + 5850.0 * Qp8 + 282255.0 * Qp9
- - 105.0 * Qp1 - 305655.0 * Qp7 + 420.0 * Qp2) / 37829.0 + (35.0 * Qp0
- - 94085.0 * QpN) / 75658.0 - 105.0 / 181.0 * Qp5;
- d2Qy = (3600.0 * Qp1 + 10479600.0 * Qp7 - 201600.0 * Qp4 + 54000.0 * Qp3
- - 14400.0 * Qp2 - 600.0 * Qp0 - 1629600.0 * QpN - 16413000.0 * Qp8
- + 9777600.0 * Qp9 - 2808000.0 * Qp6) / 37829.0 + 3600.0 * Qp5 / 181.0;
- end else begin
- dQy = 0.0;
- d2Qy = 0.0;
- end
- `fq(Qp8, xg_ac, dQy, d2Qy, fk8)
-end
-
-if (SWNQS_i >= 9) begin
- if (SWNQS_i == 9) begin
- dQy = (-23400.0 * Qp6 - 1680.0 * Qp4 + 175565.0 * QpN + 450.0 * Qp3
- - 325920.0 * Qp8 - 5.0 * Qp0 + 81480.0 * Qp9 + 30.0 * Qp1
- + 87330.0 * Qp7 - 120.0 * Qp2) / 37829.0 + 30.0 * Qp5 / 181.0;
- d2Qy = (-900.0 * Qp1 - 2619900.0 * Qp7 + 50400.0 * Qp4 - 13500.0 * Qp3
- + 3600.0 * Qp2 + 150.0 * Qp0 + 6081750.0 * QpN + 9777600.0 * Qp8
- - 13793100.0 * Qp9 + 702000.0 * Qp6) / 37829.0 - 900.0 * Qp5 / 181.0;
- end else begin
- dQy = 0.0;
- d2Qy = 0.0;
- end
- `fq(Qp9, xg_ac, dQy, d2Qy, fk9)
-end
-
-//--------------------------------------------------------------------
-
-// Terminal charges for NQS
-QS_NQS = 0.0;
-QD_NQS = 0.0;
-QG_NQS = 0.0;
-if (SWNQS_i != 0) begin
- if (SWNQS_i == 1) begin
- QS_NQS = (17.0 * Qp0 + 30.0 * Qp1 + QpN) / 96.0;
- QD_NQS = (Qp0 + 30.0 * Qp1 + 17.0 * QpN) / 96.0;
- `QiToPhi(Qp1,xg_ac, temp1)
- QG_NQS = xg_ac - (x_sp + 4.0 * temp1 + x_dp) * `oneSixth;
- end else if (SWNQS_i == 2) begin
- QS_NQS = (11.0 * Qp0 + 24.0 * Qp1 + 9.0 * Qp2 + QpN) / 90.0;
- QD_NQS = (11.0 * QpN + 24.0 * Qp2 + 9.0 * Qp1 + Qp0) / 90.0;
- `QiToPhi(Qp1, xg_ac, temp1)
- `QiToPhi(Qp2, xg_ac, temp2)
- QG_NQS = xg_ac - (x_sp + 3.0 * (temp1 + temp2) + x_dp) * 0.125;
- end else if (SWNQS_i == 3) begin
- QS_NQS = (251.0 * Qp0 + 594.0 * Qp1 + 312.0 * Qp2 + 174.0 * Qp3 + 13.0 * QpN) / 2688.0;
- QD_NQS = (251.0 * QpN + 594.0 * Qp3 + 312.0 * Qp2 + 174.0 * Qp1 + 13.0 * Qp0) / 2688.0;
- `QiToPhi(Qp1, xg_ac, temp1)
- `QiToPhi(Qp2, xg_ac, temp2)
- `QiToPhi(Qp3, xg_ac, temp3)
- QG_NQS = xg_ac - (x_sp + 4.0 * temp1 + 2.0 * temp2 + 4.0 * temp3 + x_dp) / 12.0;
- end else if (SWNQS_i == 5) begin
- QS_NQS = (1187.0 * Qp0 + 43.0 * QpN) / 18720.0 + (503.0 * Qp1 + 172.0 * Qp4
- + 87.0 * Qp5 + 265.0 * Qp3 + 328.0 * Qp2) / 3120.0;
- QD_NQS = (1187.0 * QpN + 43.0 * Qp0) / 18720.0 + (503.0 * Qp5 + 172.0 * Qp2
- + 87.0 * Qp1 + 265.0 * Qp3 + 328.0 * Qp4) / 3120.0;
- `QiToPhi(Qp1, xg_ac, temp1)
- `QiToPhi(Qp2, xg_ac, temp2)
- `QiToPhi(Qp3, xg_ac, temp3)
- `QiToPhi(Qp4, xg_ac, temp4)
- `QiToPhi(Qp5, xg_ac, temp5)
- QG_NQS = xg_ac - (x_sp + 4.0 * (temp1 + temp3 + temp5) + 2.0 * (temp2 + temp4) + x_dp) / 18.0;
- end else if (SWNQS_i == 9) begin
- QS_NQS = (75653.0 * Qp8 + 225999.0 * Qp4) / 3782900.0 + (151321.0 * Qp9
- + 454023.0 * Qp7 + 1073767.0 * Qp3 + 1564569.0 * Qp1) / 15131600.0
- + 75623.0 * Qp6 / 1891450.0 + 145.0 * Qp5 / 2896.0 + 72263.0 * Qp2 / 945725.0
- + (3504517.0 * Qp0 + 75653.0 * QpN) / 90789600.0;
- QD_NQS = (75653.0 * Qp2 + 225999.0 * Qp6) / 3782900.0 + (151321.0 * Qp1
- + 454023.0 * Qp3 + 1073767.0 * Qp7 + 1564569.0 * Qp9) / 15131600.0
- + 75623.0 * Qp4 / 1891450.0 + 145.0 * Qp5 / 2896.0 + 72263.0 * Qp8 / 945725.0
- + (3504517.0 * QpN + 75653.0 * Qp0) / 90789600.0;
- `QiToPhi(Qp1, xg_ac, temp1)
- `QiToPhi(Qp2, xg_ac, temp2)
- `QiToPhi(Qp3, xg_ac, temp3)
- `QiToPhi(Qp4, xg_ac, temp4)
- `QiToPhi(Qp5, xg_ac, temp5)
- `QiToPhi(Qp6, xg_ac, temp6)
- `QiToPhi(Qp7, xg_ac, temp7)
- `QiToPhi(Qp8, xg_ac, temp8)
- `QiToPhi(Qp9, xg_ac, temp9)
- QG_NQS = xg_ac - (x_sp + 4.0 * (temp1 + temp3 + temp5 + temp7 + temp9)
- + 2.0 * (temp2 + temp4 + temp6 + temp8) + x_dp) / 30.0;
- end
- QG_NQS = pd * QG_NQS;
-
- if (sigVds > 0) begin
- Qs = COX_qm * phit1 * QS_NQS;
- Qd = COX_qm * phit1 * QD_NQS;
- end else begin
- Qs = COX_qm * phit1 * QD_NQS;
- Qd = COX_qm * phit1 * QS_NQS;
- end
- Qg = COX_qm * phit1 * QG_NQS;
- Qb = -Qg - Qs - Qd;
-end
-
-// Update internal nodes
-V(RES1) <+ vnorm_inv * I(RES1) * r_nqs;
-V(SPLINE1) <+ vnorm_inv * idt(-Tnorm * fk1, Qp1_0);
-V(RES2) <+ vnorm_inv * I(RES2) * r_nqs;
-V(SPLINE2) <+ vnorm_inv * idt(-Tnorm * fk2, Qp2_0);
-V(RES3) <+ vnorm_inv * I(RES3) * r_nqs;
-V(SPLINE3) <+ vnorm_inv * idt(-Tnorm * fk3, Qp3_0);
-V(RES4) <+ vnorm_inv * I(RES4) * r_nqs;
-V(SPLINE4) <+ vnorm_inv * idt(-Tnorm * fk4, Qp4_0);
-V(RES5) <+ vnorm_inv * I(RES5) * r_nqs;
-V(SPLINE5) <+ vnorm_inv * idt(-Tnorm * fk5, Qp5_0);
-V(RES6) <+ vnorm_inv * I(RES6) * r_nqs;
-V(SPLINE6) <+ vnorm_inv * idt(-Tnorm * fk6, Qp6_0);
-V(RES7) <+ vnorm_inv * I(RES7) * r_nqs;
-V(SPLINE7) <+ vnorm_inv * idt(-Tnorm * fk7, Qp7_0);
-V(RES8) <+ vnorm_inv * I(RES8) * r_nqs;
-V(SPLINE8) <+ vnorm_inv * idt(-Tnorm * fk8, Qp8_0);
-V(RES9) <+ vnorm_inv * I(RES9) * r_nqs;
-V(SPLINE9) <+ vnorm_inv * idt(-Tnorm * fk9, Qp9_0);
-
diff --git a/src/spicelib/devices/adms/psp103/admsva/PSP103_InitNQS.include b/src/spicelib/devices/adms/psp103/admsva/PSP103_InitNQS.include
deleted file mode 100644
index afa95af47..000000000
--- a/src/spicelib/devices/adms/psp103/admsva/PSP103_InitNQS.include
+++ /dev/null
@@ -1,205 +0,0 @@
-//======================================================================================
-//======================================================================================
-// Filename: PSP103_InitNQS.include
-//======================================================================================
-//======================================================================================
-//
-// (c) Copyright notice
-//
-// Since 2015 until today, PSP has been co-developed by NXP Semiconductors and
-// CEA-Leti. For this part of the model, each claim undivided ownership and copyrights
-// Since 2012 until 2015, PSP has been co-developed by NXP Semiconductors and
-// Delft University of Technology. For this part of the model, each claim undivided
-// ownership and copyrights
-// Until and including 2011, PSP has been co-developed by NXP Semiconductors and
-// Arizona State University. For this part of the model, NXP Semiconductors claims
-// undivided ownership and copyrights.
-//
-//
-// Version: 103.7.0 (PSP), 200.6.0 (JUNCAP), April 2019
-//
-//======================================================================================
-//======================================================================================
-//
-// Further information can be found in the file releasenotesPSP103.txt
-//
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Computing initial (dc) values for internal nodes.
-// This code is independent of internal-node voltages
-//
-/////////////////////////////////////////////////////////////////////////////
-
-Qp1_0 = 0.0;
-Qp2_0 = 0.0;
-Qp3_0 = 0.0;
-Qp4_0 = 0.0;
-Qp5_0 = 0.0;
-Qp6_0 = 0.0;
-Qp7_0 = 0.0;
-Qp8_0 = 0.0;
-Qp9_0 = 0.0;
-fk1 = 0.0;
-fk2 = 0.0;
-fk3 = 0.0;
-fk4 = 0.0;
-fk5 = 0.0;
-fk6 = 0.0;
-fk7 = 0.0;
-fk8 = 0.0;
-fk9 = 0.0;
-if (SWNQS_i != 0) begin
- dQis = 0.0;
- dQy = 0.0;
- dfQi = 0.0;
- fQi = 0.0;
- d2Qy = 0.0;
-
- Qp1 = 0.0;
- Qp2 = 0.0;
- Qp3 = 0.0;
- Qp4 = 0.0;
- Qp5 = 0.0;
- Qp6 = 0.0;
- Qp7 = 0.0;
- Qp8 = 0.0;
- Qp9 = 0.0;
-
- phi_p1 = 0.0;
- phi_p2 = 0.0;
- phi_p3 = 0.0;
- phi_p4 = 0.0;
- phi_p5 = 0.0;
- phi_p6 = 0.0;
- phi_p7 = 0.0;
- phi_p8 = 0.0;
- phi_p9 = 0.0;
-
- // Setting initial values for charge along the channel
- // from interpolated DC-solution
- if (xg_ac > 0) begin
- if (SWNQS_i == 1) begin
-
- phi_p1 = `Phiy(0.5);
- `PhiToQb(phi_p1,Qb_tmp)
- Qp1_0 = -pd * (xg_ac - phi_p1) - Qb_tmp;
-
- end else if (SWNQS_i == 2) begin
- phi_p1 = `Phiy(`oneThird);
- `PhiToQb(phi_p1,Qb_tmp)
- Qp1_0 = -pd * (xg_ac - phi_p1) - Qb_tmp;
-
- phi_p2 = `Phiy(`twoThirds);
- `PhiToQb(phi_p2,Qb_tmp)
- Qp2_0 = -pd * (xg_ac - phi_p2) - Qb_tmp;
-
- if (sigVds < 0) begin
- `swap(Qp1_0, Qp2_0)
- end
- end else if (SWNQS_i == 3) begin
- phi_p1 = `Phiy(0.25);
- `PhiToQb(phi_p1,Qb_tmp)
- Qp1_0 = -pd * (xg_ac - phi_p1) - Qb_tmp;
-
- phi_p2 = `Phiy(0.5);
- `PhiToQb(phi_p2,Qb_tmp)
- Qp2_0 = -pd * (xg_ac - phi_p2) - Qb_tmp;
-
- phi_p3 = `Phiy(0.75);
- `PhiToQb(phi_p3,Qb_tmp)
- Qp3_0 = -pd * (xg_ac - phi_p3) - Qb_tmp;
-
- if (sigVds < 0) begin
- `swap(Qp1_0, Qp3_0)
- end
- end else if (SWNQS_i == 5) begin
- phi_p1 = `Phiy(`oneSixth);
- `PhiToQb(phi_p1,Qb_tmp)
- Qp1_0 = -pd * (xg_ac - phi_p1) - Qb_tmp;
-
- phi_p2 = `Phiy(`oneThird);
- `PhiToQb(phi_p2,Qb_tmp)
- Qp2_0 = -pd * (xg_ac - phi_p2) - Qb_tmp;
-
- phi_p3 = `Phiy(0.5);
- `PhiToQb(phi_p3,Qb_tmp)
- Qp3_0 = -pd * (xg_ac - phi_p3) - Qb_tmp;
-
- phi_p4 = `Phiy(`twoThirds);
- `PhiToQb(phi_p4,Qb_tmp)
- Qp4_0 = -pd * (xg_ac - phi_p4) - Qb_tmp;
-
- phi_p5 = `Phiy(0.8333333333333333);
- `PhiToQb(phi_p5,Qb_tmp)
- Qp5_0 = -pd * (xg_ac - phi_p5) - Qb_tmp;
-
- if (sigVds < 0) begin
- `swap(Qp1_0, Qp5_0)
- `swap(Qp2_0, Qp4_0)
- end
- end else if (SWNQS_i == 9) begin
- phi_p1 = `Phiy(0.1);
- `PhiToQb(phi_p1,Qb_tmp)
- Qp1_0 = -pd * (xg_ac - phi_p1) - Qb_tmp;
-
- phi_p2 = `Phiy(0.2);
- `PhiToQb(phi_p2,Qb_tmp)
- Qp2_0 = -pd * (xg_ac - phi_p2) - Qb_tmp;
-
- phi_p3 = `Phiy(0.3);
- `PhiToQb(phi_p3,Qb_tmp)
- Qp3_0 = -pd * (xg_ac - phi_p3) - Qb_tmp;
-
- phi_p4 = `Phiy(0.4);
- `PhiToQb(phi_p4,Qb_tmp)
- Qp4_0 = -pd * (xg_ac - phi_p4) - Qb_tmp;
-
- phi_p5 = `Phiy(0.5);
- `PhiToQb(phi_p5,Qb_tmp)
- Qp5_0 = -pd * (xg_ac - phi_p5) - Qb_tmp;
-
- phi_p6 = `Phiy(0.6);
- `PhiToQb(phi_p6,Qb_tmp)
- Qp6_0 = -pd * (xg_ac - phi_p6) - Qb_tmp;
-
- phi_p7 = `Phiy(0.7);
- `PhiToQb(phi_p7,Qb_tmp)
- Qp7_0 = -pd * (xg_ac - phi_p7) - Qb_tmp;
-
- phi_p8 = `Phiy(0.8);
- `PhiToQb(phi_p8,Qb_tmp)
- Qp8_0 = -pd * (xg_ac - phi_p8) - Qb_tmp;
-
- phi_p9 = `Phiy(0.9);
- `PhiToQb(phi_p9,Qb_tmp)
- Qp9_0 = -pd * (xg_ac - phi_p9) - Qb_tmp;
-
- if (sigVds < 0) begin
- `swap(Qp1_0, Qp9_0)
- `swap(Qp2_0, Qp8_0)
- `swap(Qp3_0, Qp7_0)
- `swap(Qp4_0, Qp6_0)
- end
- end
- end // (x_g >0)
-end // (SWNQS_i != 0)
-
-x_sp = 0.0;
-x_dp = 0.0;
-Qp0 = 0.0;
-QpN = 0.0;
-if (SWNQS_i != 0.0) begin
- x_sp = x_m_ac - sigVds * 0.5 * dps_ac * inv_phit1;
- x_dp = x_m_ac + sigVds * 0.5 * dps_ac * inv_phit1;
- Qp0 = 0.0;
- QpN = 0.0;
- if (x_sp > 0) begin
- `PhiToQb(x_sp, QbSIGN)
- Qp0 = -pd * (xg_ac - x_sp) - QbSIGN;
- end
- if (x_dp > 0) begin
- `PhiToQb(x_dp, QbSIGN)
- QpN = -pd * (xg_ac - x_dp) - QbSIGN;
- end
-end
diff --git a/src/spicelib/devices/adms/psp103/admsva/PSP103_macrodefs.include b/src/spicelib/devices/adms/psp103/admsva/PSP103_macrodefs.include
deleted file mode 100644
index 0f8ee5c7d..000000000
--- a/src/spicelib/devices/adms/psp103/admsva/PSP103_macrodefs.include
+++ /dev/null
@@ -1,763 +0,0 @@
-//======================================================================================
-//======================================================================================
-// Filename: PSP103_macrodefs.include
-//======================================================================================
-//======================================================================================
-//
-// (c) Copyright notice
-//
-// Since 2015 until today, PSP has been co-developed by NXP Semiconductors and
-// CEA-Leti. For this part of the model, each claim undivided ownership and copyrights
-// Since 2012 until 2015, PSP has been co-developed by NXP Semiconductors and
-// Delft University of Technology. For this part of the model, each claim undivided
-// ownership and copyrights
-// Until and including 2011, PSP has been co-developed by NXP Semiconductors and
-// Arizona State University. For this part of the model, NXP Semiconductors claims
-// undivided ownership and copyrights.
-//
-//
-// Version: 103.7.0 (PSP), 200.6.0 (JUNCAP), April 2019
-//
-//======================================================================================
-//======================================================================================
-//
-// Further information can be found in the file releasenotesPSP103.txt
-//
-
-/////////////////////////////////////////////
-//
-// Macros and constants used in PSP
-//
-/////////////////////////////////////////////
-
-// Explicit Gmin
-`define GMIN $simparam("gmin",1e-15)
-`define PGIVEN(p) $param_given(p)
-
-`define PMOS -1
-`define NMOS +1
-
-// Some functions
-`define MINA(x,y,a) 0.5*((x)+(y)-sqrt(((x)-(y))*((x)-(y))+(a)))
-`define MAXA(x,y,a) 0.5*((x)+(y)+sqrt(((x)-(y))*((x)-(y))+(a)))
-
-`define MNE(x,y,a,mne) \
- tme1 = 4.0 - (a); \
- tme2 = (x) + (y); \
- mne = 2.0 / tme1 * (tme2 - sqrt(tme2 * tme2 - tme1 * (x) * (y)));
-
-`define MXE(x,y,a,mxe) \
- tme1 = 4.0 - (a); \
- tme2 = (x) + (y); \
- mxe = 2.0 / tme1 * (tme2 + sqrt(tme2 * tme2 - tme1 * (x) * (y)));
-
-// Physical constants
-`define QMN 5.951993
-`define QMP 7.448711
-
-// Other constants (PSP-mos)
-`define DELTA1 0.02
-`define invSqrt2 7.0710678118654746e-01
-`define oneSixth 1.6666666666666667e-01
-`define LEN 1.0e-6
-`define WEN 1.0e-6
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Macro definitions.
-//
-// Note that because at present locally scoped variables
-// can only be in named blocks, the intermediate variables
-// used in the macros below must be explicitly declared
-// as variables in the main code.
-//
-/////////////////////////////////////////////////////////////////////////////
-
-// Function for parameter definition in the case of separate calculation of charge model in saturation
-// --------------------------------------------------------------------------------------------------------------
-`define DefACparam(param_i,param_dc,param_ac) \
- param_i = (param_dc); \
- if ($param_given(param_ac) == 1) \
- param_i = (param_ac);
-
-// sigma function used in surface potential and other calculations
-// --------------------------------------------------------------------------------------------------------------
-// Note: one call uses expressions for arguments so parentheses around the arguments in the expressions are necessary
-`define sigma(a,c,tau,eta,y) \
- nu = (a) + (c); \
- mutau = nu * nu + (tau) * (0.5 * ((c) * (c)) - (a)); \
- y = (eta) + (a) * nu * (tau) / (mutau + (nu / mutau) * (tau) * (tau) * (c) * ((c) * (c) * `oneThird - (a)));
-
-// modified version of sigma function, which takes 4 arguments
-// --------------------------------------------------------------------------------------------------------------
-`define sigma2(a,b,c,tau,eta,y) \
- nu = (a) + (c); \
- mutau = (nu) * (nu) + (tau) * (0.5 * ((c) * (c)) - (a) * (b)); \
- y = (eta) + (a) * nu * (tau) / (mutau + (nu / mutau) * (tau) * (tau) * (c) * ((c) * (c) * `oneThird - (a) * (b)));
-
-// sp_s function: surface potential calculation
-// --------------------------------------------------------------------------------------------------------------
-`define sp_s(sp,xg,xn,delta) \
- if (abs(xg) <= margin) begin \
- SP_S_temp1 = inv_xi * inv_xi * `oneSixth * `invSqrt2; \
- sp = xg * inv_xi * (1.0 + xg * (1.0 - (delta)) * Gf * SP_S_temp1); \
- end else begin \
- if (xg < -margin) begin \
- SP_S_yg = -xg; \
- SP_S_ysub = 1.25 * (SP_S_yg * inv_xi); \
- SP_S_eta = 0.5 * (SP_S_ysub + 10 - sqrt((SP_S_ysub - 6.0) * (SP_S_ysub - 6.0) + 64.0)); \
- SP_S_temp = SP_S_yg - SP_S_eta; \
- SP_S_a = SP_S_temp * SP_S_temp + Gf2*(SP_S_eta + 1.0);\
- SP_S_c = 2.0 * SP_S_temp - Gf2; \
- SP_S_tau = -SP_S_eta + ln(SP_S_a * inv_Gf2); \
- `sigma(SP_S_a, SP_S_c, SP_S_tau, SP_S_eta, SP_S_y0) \
- `expl_high(SP_S_y0, SP_S_delta0) \
- SP_S_delta1 = 1.0 / SP_S_delta0; \
- SP_S_temp = 1.0 / (2.0 + SP_S_y0 * SP_S_y0); \
- SP_S_xi0 = SP_S_y0 * SP_S_y0 * SP_S_temp; \
- SP_S_xi1 = 4.0 * (SP_S_y0 * SP_S_temp * SP_S_temp); \
- SP_S_xi2 = (8.0 * SP_S_temp - 12.0 * SP_S_xi0) * SP_S_temp * SP_S_temp; \
- SP_S_temp = SP_S_yg - SP_S_y0; \
- SP_S_temp1 = (delta) * SP_S_delta1; \
- SP_S_pC = 2.0 * SP_S_temp + Gf2 * (SP_S_delta0 - 1.0 - SP_S_temp1 + (delta) * (1.0 - SP_S_xi1)); \
- SP_S_qC = SP_S_temp * SP_S_temp - Gf2 * (SP_S_delta0 - SP_S_y0 - 1.0 + SP_S_temp1 + (delta) * (SP_S_y0 - 1.0 - SP_S_xi0)); \
- SP_S_temp = 2.0 - Gf2 * (SP_S_delta0 + SP_S_temp1 - (delta) * SP_S_xi2); \
- SP_S_temp = SP_S_pC * SP_S_pC - 2.0 * (SP_S_qC * SP_S_temp); \
- sp = -SP_S_y0 - 2.0 * (SP_S_qC / (SP_S_pC + sqrt(SP_S_temp))); \
- end else begin \
- SP_xg1 = 1.0 / (1.25 + Gf * 7.324648775608221e-001); \
- SP_S_A_fac= (xi * 1.25 * SP_xg1 - 1.0) * SP_xg1; \
- SP_S_xbar = xg * inv_xi * (1.0 + SP_S_A_fac * xg); \
- `expl_low(-SP_S_xbar, SP_S_temp) \
- SP_S_w = 1.0 - SP_S_temp; \
- SP_S_x1 = xg + Gf2 * 0.5 - Gf * sqrt(xg + Gf2 * 0.25 - SP_S_w); \
- SP_S_bx = (xn) + 3.0; \
- SP_S_eta = `MINA(SP_S_x1, SP_S_bx, 5.0) - 0.5 * (SP_S_bx - sqrt(SP_S_bx * SP_S_bx + 5.0)); \
- SP_S_temp = xg - SP_S_eta; \
- SP_S_temp1= exp(-SP_S_eta); \
- SP_S_temp2= 1.0 / (2.0 + SP_S_eta * SP_S_eta); \
- SP_S_xi0 = SP_S_eta * SP_S_eta * SP_S_temp2; \
- SP_S_xi1 = 4.0 * (SP_S_eta * SP_S_temp2 * SP_S_temp2); \
- SP_S_xi2 = (8.0 * SP_S_temp2 - 12.0 * SP_S_xi0) * SP_S_temp2 * SP_S_temp2; \
- SP_S_a = max(1.0e-40, SP_S_temp * SP_S_temp - Gf2 * (SP_S_temp1 + SP_S_eta - 1.0 - (delta) * (SP_S_eta + 1.0 + SP_S_xi0))); \
- SP_S_b = 1.0 - 0.5 * (Gf2 * (SP_S_temp1 - (delta) * SP_S_xi2)); \
- SP_S_c = 2.0 * SP_S_temp + Gf2 * (1.0 - SP_S_temp1 - (delta) * (1.0 + SP_S_xi1)); \
- SP_S_tau = (xn) - SP_S_eta + ln(SP_S_a / Gf2); \
- `sigma2(SP_S_a, SP_S_b, SP_S_c, SP_S_tau, SP_S_eta, SP_S_x0) \
- if (SP_S_x0 < `se05) begin \
- SP_S_delta0 = exp(SP_S_x0); \
- SP_S_delta1 = 1.0 / SP_S_delta0; \
- SP_S_delta0 = (delta) * SP_S_delta0; \
- end else begin \
- if (SP_S_x0 > (xn) - `se05) begin \
- SP_S_delta0 = exp(SP_S_x0 - (xn)); \
- SP_S_delta1 = (delta) / SP_S_delta0; \
- end else begin \
- SP_S_delta0 = `ke05 / `P3((xn) - SP_S_x0 - `se05); \
- SP_S_delta1 = `ke05 / `P3(SP_S_x0 - `se05); \
- end \
- end \
- SP_S_temp = 1.0 / (2.0 + SP_S_x0 * SP_S_x0); \
- SP_S_xi0 = SP_S_x0 * SP_S_x0 * SP_S_temp; \
- SP_S_xi1 = 4.0 * (SP_S_x0 * SP_S_temp * SP_S_temp); \
- SP_S_xi2 = (8.0 * SP_S_temp - 12.0 * SP_S_xi0) * SP_S_temp * SP_S_temp; \
- SP_S_temp = xg - SP_S_x0; \
- SP_S_pC = 2.0 * SP_S_temp + Gf2 * (1.0 - SP_S_delta1 + SP_S_delta0 - (delta) * (1.0 + SP_S_xi1)); \
- SP_S_qC = SP_S_temp * SP_S_temp - Gf2 * (SP_S_delta1 + SP_S_x0 - 1.0 + SP_S_delta0 - (delta) * (SP_S_x0 + 1.0 + SP_S_xi0)); \
- SP_S_temp = 2.0 - Gf2 * (SP_S_delta1 + SP_S_delta0 - (delta) * SP_S_xi2); \
- SP_S_temp = SP_S_pC * SP_S_pC - 2.0 * (SP_S_qC * SP_S_temp); \
- sp = SP_S_x0 + 2.0 * (SP_S_qC / (SP_S_pC + sqrt(SP_S_temp))); \
- end \
- end
-
-// sp_s_d function: surface potential calculation at drain (subset of function sp_s)
-// --------------------------------------------------------------------------------------------------------------
-`define sp_s_d(sp,xg,xn,delta) \
- if (abs(xg) <= margin) begin \
- SP_S_temp1 = inv_xi * inv_xi * `oneSixth * `invSqrt2; \
- sp = xg * inv_xi * (1.0 + xg * (1.0 - (delta)) * Gf * SP_S_temp1); \
- end else begin \
- SP_S_bx = (xn) + 3; \
- SP_S_eta = `MINA(SP_S_x1, SP_S_bx, 5.0) - 0.5 * (SP_S_bx - sqrt(SP_S_bx * SP_S_bx + 5.0)); \
- SP_S_temp = xg - SP_S_eta; \
- SP_S_temp1= exp(-SP_S_eta); \
- SP_S_temp2= 1.0 / (2.0 + SP_S_eta * SP_S_eta); \
- SP_S_xi0 = SP_S_eta * SP_S_eta * SP_S_temp2; \
- SP_S_xi1 = 4.0 * (SP_S_eta * SP_S_temp2 * SP_S_temp2); \
- SP_S_xi2 = (8.0 * SP_S_temp2 - 12.0 * SP_S_xi0) * SP_S_temp2 * SP_S_temp2; \
- SP_S_a = max(1.0e-40, SP_S_temp * SP_S_temp - Gf2 * (SP_S_temp1 + SP_S_eta - 1.0 - (delta) * (SP_S_eta + 1.0 + SP_S_xi0))); \
- SP_S_b = 1.0 - 0.5 * (Gf2 * (SP_S_temp1 - (delta) * SP_S_xi2)); \
- SP_S_c = 2.0 * SP_S_temp + Gf2 * (1.0 - SP_S_temp1 - (delta) * (1.0 + SP_S_xi1)); \
- SP_S_tau = (xn) - SP_S_eta + ln(SP_S_a / Gf2); \
- `sigma2(SP_S_a, SP_S_b, SP_S_c, SP_S_tau, SP_S_eta, SP_S_x0) \
- if (SP_S_x0 < `se05) begin \
- SP_S_delta0 = exp(SP_S_x0); \
- SP_S_delta1 = 1.0 / SP_S_delta0; \
- SP_S_delta0 = (delta) * SP_S_delta0; \
- end else begin \
- if (SP_S_x0 > (xn) - `se05) begin \
- SP_S_delta0 = exp(SP_S_x0 - (xn)); \
- SP_S_delta1 = (delta) / SP_S_delta0; \
- end else begin \
- SP_S_delta0 = `ke05 / `P3((xn) - SP_S_x0 - `se05); \
- SP_S_delta1 = `ke05 / `P3(SP_S_x0 - `se05); \
- end \
- end \
- SP_S_temp = 1.0 / (2.0 + SP_S_x0 * SP_S_x0); \
- SP_S_xi0 = SP_S_x0 * SP_S_x0 * SP_S_temp; \
- SP_S_xi1 = 4.0 * (SP_S_x0 * SP_S_temp * SP_S_temp); \
- SP_S_xi2 = (8.0 * SP_S_temp-12.0 * SP_S_xi0) * SP_S_temp * SP_S_temp; \
- SP_S_temp = xg - SP_S_x0; \
- SP_S_pC = 2.0 * SP_S_temp + Gf2 * (1.0 - SP_S_delta1 + SP_S_delta0 - (delta) * (1.0 + SP_S_xi1)); \
- SP_S_qC = SP_S_temp * SP_S_temp - Gf2 * (SP_S_delta1 + SP_S_x0 - 1.0 + SP_S_delta0 - (delta) * (SP_S_x0 + 1.0 + SP_S_xi0)); \
- SP_S_temp = 2.0 - Gf2*(SP_S_delta1+SP_S_delta0-(delta)*SP_S_xi2); \
- SP_S_temp = SP_S_pC * SP_S_pC - 2.0 * (SP_S_qC * SP_S_temp); \
- sp = SP_S_x0 + 2.0 * (SP_S_qC / (SP_S_pC + sqrt(SP_S_temp)));\
- end
-
-// sp_ovInit function: surface potential calculation for the overlap regions initialization
-// --------------------------------------------------------------------------------------------------------------
-`define sp_ovInit(GOV, GOV2, SP_OV_eps2, SP_OV_a, SP_OV_delta1) \
- inv_GOV = 1.0 / GOV; \
- SP_OV_eps = 3.1 * GOV + 8.5; \
- SP_OV_eps2 = SP_OV_eps * SP_OV_eps; \
- SP_OV_delta = 0.5 * SP_OV_eps; \
- if (inv_GOV < 0.06) begin \
- SP_OV_a = 64.0 * inv_GOV; \
- end else begin \
- if (inv_GOV <= 0.45) begin \
- SP_OV_a = 22.0 * inv_GOV + 3.0; \
- end else begin \
- if (inv_GOV <= 1.6) begin \
- SP_OV_a = -7.2 * inv_GOV + 15.5; \
- end else begin \
- SP_OV_a = GOV; \
- end \
- end \
- end \
- SP_OV_delta1 = SP_OV_delta + GOV2 * 0.5 - GOV * sqrt(SP_OV_delta + GOV2 * 0.25 + SP_OV_a);
-
-// qi_edge charge calculation for the edge transistor
-// --------------------------------------------------------------------------------------------------------------
-`define qi_edge(qieff_edge,xg_edge,xn_edge) \
- Q_EDGE_xsth = xbedge + xn_edge; \
- Q_EDGE_xth0 = Q_EDGE_xsth + Gfedge * sqrt(Q_EDGE_xsth); \
- Q_EDGE_xth = Q_EDGE_xth0 + dxthedge; \
- Q_EDGE_n = 1.0 + Gfedge / (2.0 * sqrt(Q_EDGE_xsth)); \
- Q_EDGE_n_inv = 1.0 / Q_EDGE_n; \
- Q_EDGE_xgt = xg_edge - Q_EDGE_xth; \
- if (Q_EDGE_xgt > -12.0) begin \
- Q_EDGE_xgt0 = Q_EDGE_xgt + lnGfedge2 - 1.0; \
- Q_EDGE_xgt0e = 0.5 * (Q_EDGE_xgt0 + sqrt(Q_EDGE_xgt0 * Q_EDGE_xgt0 + 10.0)); \
- Q_EDGE_qi0si = Q_EDGE_xgt - Q_EDGE_n * ln(Q_EDGE_xgt0e) + lnGfedge2; \
- Q_EDGE_qi0 = 0.5 * (Q_EDGE_qi0si + sqrt(Q_EDGE_qi0si * Q_EDGE_qi0si + 2.0)); \
- `expl_high((Q_EDGE_xgt - Q_EDGE_qi0), Q_EDGE_exp_x) \
- Q_EDGE_d0 = Gfedge2 * Q_EDGE_exp_x; \
- Q_EDGE_d0p = pow(Q_EDGE_d0, Q_EDGE_n_inv); \
- Q_EDGE_sqerr = Q_EDGE_n * Q_EDGE_n + (2.0 * (Q_EDGE_qi0 + Q_EDGE_n) - Q_EDGE_d0p) * Q_EDGE_d0p; \
- Q_EDGE_errq = Q_EDGE_n * ((sqrt(Q_EDGE_sqerr) - Q_EDGE_n) / Q_EDGE_d0p - 1.0); \
- qieff_edge = Q_EDGE_qi0 - Q_EDGE_errq; \
- end else begin \
- `expl_low((Q_EDGE_n_inv * (Q_EDGE_xgt + lnGfedge2)), qieff_edge) \
- end
-
-// CollapsableR macro: used for parasitic resistances
-// --------------------------------------------------------------------------------------------------------------
-// Note: if R=0, the Verilog-A compiler should recognize that the corresponding nodes can be collapsed
-`define CollapsableR(G, R, SN, N1, N2, Rname) \
- if ((R) > 0.0) begin \
- I(N1, N2) <+ MULT_i * (G) * V(N1, N2); \
- /* line below can be removed if compiler issue occurs */ \
- I(N1, N2) <+ white_noise(MULT_i * SN, Rname); \
- end else begin \
- V(N1, N2) <+ 0.0; \
- end
-
-//ngspice-adms: can't node collapse
-`define NonCollapsableR(G, R, SN, N1, N2, Rname) \
- I(N1, N2) <+ MULT_i * (G) * V(N1, N2); \
- I(N1, N2) <+ white_noise(MULT_i * SN, Rname);
-
-// Local variable declaration (used in SPcalc_dc/SPcalc_ac sections, PSP103_SPCalculation.include and SP macro)
-// --------------------------------------------------------------------------------------------------------------
-//`define SPcalcLocalVarDecl \
-// real phib, G_0, Vsbstar, cfloc, thesatloc, axloc, alploc; \
-// real Vsbx, xg, Dnsub, Gf, Gf2, inv_Gf2, xi, inv_xi, Ux, xn_s, delta_ns, margin, x_s, delta_1s, xi0s, xi1s; \
-// real xi2s, Es, Ds, Ps, Rxcor, xgs, qis, qbs, rhob, GR, Eeffm, Mutmp, Gmob, xitsb, wsat, thesat1, phi_inf; \
-// real ysat, za, Phi_0, asat, Phi_2, Phi_0_2, Phi0_Phi2, Phi_sat, Vdse, Udse, xn_d, k_ds, delta_nd, x_d, x_ds; \
-// real pC, qC, dps, xi0d, Ed, Dd, x_m, Em, D_bar, Dm, Pm, xgm, eta_p, sqm, alpha, d0, x_pm, p_pd, q_pd, xi_pd; \
-// real u_pd, km, km0, qim, qim1, qbm, qeff, qeff1, s1, dL, GdL, Gmob_dL, zsat, Gvsat, Gvsatinv, Voxm, alpha1, H; \
-// real SP_S_temp, SP_S_temp1, SP_S_temp2; \
-// real SP_S_yg, SP_S_ysub, SP_S_eta, SP_S_a, SP_S_c, SP_S_tau, SP_S_y0, SP_S_delta0, SP_S_delta1, SP_S_xi0; \
-// real SP_S_xi1, SP_S_xi2, SP_S_pC, SP_S_qC, SP_xg1, SP_S_A_fac, SP_S_xbar, SP_S_w, SP_S_x1, SP_S_bx, SP_S_b; \
-// real SP_S_x0;
-
-// TempInitialize macro: initialize the temperature dependent variables
-// --------------------------------------------------------------------------------------------------------------
-`define TempInitialize \
- TKD_sq = TKD * TKD; \
- delT = TKD - TKR; \
- rTn = TKR / TKD; \
- ln_rTn = ln(rTn); \
- phit = TKD * `KBOL / `QELE; \
- inv_phit = 1.0 / phit; \
- Eg = 1.179 - 9.025e-5 * TKD - 3.05e-7 * TKD_sq; \
- phibFac = (1.045 + 4.5e-4 * TKD) * (0.523 + 1.4e-3 * TKD - 1.48e-6 * TKD_sq) * TKD_sq / 9.0E4; \
- phibFac = `MAX(phibFac, 1.0E-3); \
- \
- /* parameter for white noise of parasitic resistances */ \
- nt0 = 4.0 * `KBOL * TKD;
-
-// TempScaling macro: calculation of temperature dependent variables
-// --------------------------------------------------------------------------------------------------------------
-`define TempScaling \
- phib_dc = Eg + DPHIB_i + 2.0 * phit * ln(NEFF_i * pow(phibFac, -0.75) * 4.0e-26); \
- phib_dc = `MAX(phib_dc, 5.0E-2); \
- G_0_dc = sqrt(2.0 * `QELE * NEFF_i * EPSSI * inv_phit) / CoxPrime; \
- \
- /* Poly-silicon depletion */ \
- kp = 0.0; \
- np = 0.0; \
- if (NP_i > 0.0) begin \
- arg2max = 8.0e7 / tox_sq; \
- np = `MAX(NP_i, arg2max); \
- np = `MAX(5.0e24, np); \
- kp = 2.0 * CoxPrime * CoxPrime * phit / (`QELE * np * EPSSI); \
- end \
- \
- /* QM corrections */ \
- qlim2 = 100.0 * phit * phit; \
- if (QMC_i > 0.0) begin \
- qb0 = sqrt(phit * G_0_dc * G_0_dc * phib_dc); \
- dphibq = 0.75 * qq * pow(qb0, `twoThirds); \
- phib_dc = phib_dc + dphibq; \
- G_0_dc = G_0_dc * (1.0 + 2.0 * `twoThirds * dphibq / qb0); \
- end \
- sqrt_phib_dc = sqrt(phib_dc); \
- phix_dc = 0.95 * phib_dc; \
- aphi_dc = 0.0025 * phib_dc * phib_dc; \
- bphi_dc = aphi_dc; \
- phix2 = 0.5 * sqrt(bphi_dc); \
- phix1_dc = `MINA(phix_dc - phix2, 0.0, aphi_dc); \
- alpha_b = 0.5 * (phib_dc + Eg); \
- us1 = sqrt(VSBNUD_i + phib_dc) - sqrt_phib_dc; \
- us21 = sqrt(VSBNUD_i + DVSBNUD_i + phib_dc) - sqrt_phib_dc - us1; \
- \
- /* Additional variables for separate surface potential calculation for CV */ \
- phib_ac = Eg + DPHIB_i + DELVTAC_i + 2.0 * phit * ln(NEFFAC_i * pow(phibFac, -0.75) * 4.0e-26); \
- phib_ac = `MAX(phib_ac, 5.0E-2); \
- G_0_ac = sqrt(2.0 * `QELE * NEFFAC_i * EPSSI * inv_phit) / CoxPrime; \
- \
- if (QMC_i > 0.0) begin \
- qb0 = sqrt(phit * G_0_ac * G_0_ac * phib_ac); \
- dphibq = 0.75 * qq * pow(qb0, `twoThirds); \
- phib_ac = phib_ac + dphibq; \
- G_0_ac = G_0_ac * (1.0 + 2.0 * `twoThirds * dphibq / qb0); \
- end \
- \
- phix_ac = 0.95 * phib_ac; \
- aphi_ac = 0.0025 * phib_ac * phib_ac; \
- bphi_ac = aphi_ac; \
- phix2 = 0.5 * sqrt(bphi_ac); \
- phix1_ac = `MINA(phix_ac - phix2, 0.0, aphi_ac); \
- \
- /* Temperature scaling of parameters*/ \
- VFB_T = VFB_i + STVFB_i * delT * (1.0 + ST2VFB_i * delT)+ DELVTO_i; \
- \
- /* Interface states parameters*/ \
- tf_ct = exp(STCT_i * ln_rTn); \
- CT_T = CT_i * tf_ct; \
- CTG_T = CTG_i / rTn; \
- \
- /* Mobility parameters */ \
- tf_bet = exp(STBET_i * ln_rTn); \
- BETN_T = BETN_i * tf_bet; \
- BET_i = FACTUO_i * BETN_T * CoxPrime; \
- THEMU_T = THEMU_i * exp(STTHEMU_i * ln_rTn); \
- tf_mue = exp(STMUE_i * ln_rTn); \
- MUE_T = MUE_i * tf_mue; \
- THECS_T = THECS_i * exp(STTHECS_i * ln_rTn); \
- tf_cs = exp(STCS_i * ln_rTn); \
- CS_T = CS_i * tf_cs; \
- tf_xcor = exp(STXCOR_i * ln_rTn); \
- XCOR_T = XCOR_i * tf_xcor; \
- \
- /* Series resistance */ \
- tf_ther = exp(STRS_i * ln_rTn); \
- RS_T = RS_i * tf_ther; \
- THER_i = 2.0 * BET_i * RS_T; \
- \
- /* Velocity saturation */ \
- tf_thesat = exp(STTHESAT_i * ln_rTn); \
- THESAT_T = THESAT_i * tf_thesat; \
- THESATAC_T = THESATAC_i * tf_thesat; \
- \
- /* Impact ionization */ \
- A2_T = A2_i * exp(-STA2_i * ln_rTn); \
- \
- /* Noise */ \
- nt = FNT_i * 4.0 * `KBOL * TKD; \
- Sfl_prefac = phit * phit * BET_i / Cox_over_q; \
- \
- /* Edge transistor */ \
- if ((SWEDGE_i != 0.0) && (BETNEDGE_i > 0.0)) begin \
- VFBEDGE_T = VFBEDGE_i + STVFBEDGE_i * delT + DELVTOEDGE_i; \
- tf_betedge = exp(STBETEDGE_i * ln_rTn); \
- BETNEDGE_T = BETNEDGE_i * tf_betedge; \
- BETEDGE_i = FACTUOEDGE_i * BETNEDGE_T * CoxPrime; \
- phit0edge = phit * (1.0 + CTEDGE_i * rTn); \
- phibedge = Eg + DPHIBEDGE_i + 2.0 * phit0edge * ln(NEFFEDGE_i * pow(phibFac, -0.75) * 4.0e-26); \
- phibedge = `MAX(phibedge, 5.0E-2); \
- Gfedge = sqrt(2.0 * `QELE * NEFFEDGE_i * EPSSI * inv_phit) / CoxPrime; \
- Gfedge2 = Gfedge * Gfedge; \
- lnGfedge2 = ln(Gfedge2); \
- phixedge = 0.95 * phibedge; \
- aphiedge = 0.0025 * phibedge * phibedge; \
- bphiedge = aphiedge; \
- phix2edge = 0.5 * sqrt(bphiedge); \
- phix1edge = `MINA(phixedge - phix2edge, 0.0, aphiedge); \
- Sfl_prefac_edge = phit * phit * BETEDGE_i / Cox_over_q; \
- ntedge = FNTEDGE_i * 4.0 * `KBOL * TKD; \
- end else begin \
- VFBEDGE_T = 0.0; \
- tf_betedge = 1.0; \
- BETNEDGE_T = 0.0; \
- BETEDGE_i = 0.0; \
- phit0edge = phit; \
- phibedge = 0.0; \
- Gfedge = 1.0; \
- Gfedge2 = 1.0; \
- lnGfedge2 = 0.0; \
- phixedge = 0.0; \
- aphiedge = 0.0; \
- bphiedge = 0.0; \
- phix2edge = 0.0; \
- phix1edge = 0.0; \
- Sfl_prefac_edge = 0.0; \
- ntedge = 1.0; \
- end
-
-// Model's core for currents and charges calculation (initially into PSP103_SPCalculation.include)
-// --------------------------------------------------------------------------------------------------------------
-`define SPCalculation \
- \
- /* Initialisation of some variables */ \
- alpha = 0.0; \
- GdL = 1.0; \
- dL = 0.0; \
- qbm = 0.0; \
- dps = 0.0; \
- qim = 0.0; \
- qim1 = 0.0; \
- H = 1.0; \
- s1 = 0.0; \
- eta_p = 1.0; \
- Gvsat = 1.0; \
- Gvsatinv = 1.0; \
- SP_S_x1 = 0.0; \
- x_s = 0.0; \
- sqm = 0.0; \
- xitsb = 0.0; \
- rhob = 0.0; \
- Gmob = 1.0; \
- Gmob_dL = 1.0; \
- Udse = 0.0; \
- thesat1 = 0.0; \
- xgm = 0.0; \
- \
- /* Bias definition */ \
- Vgb1 = Vgs + Vsbstar - VFB_T; \
- Vsbx = Vsbstar + 0.5 * (Vds - Vdsx); \
- Vdsp = 2.0 * Vdsx / (1.0 + sqrt(1.0 + CFD_i * Vdsx)); \
- delVg = cfloc * Vdsp * (1.0 + CFB_i * Vsbx); \
- dphit1 = PSCE_i * (1.0 + PSCED_i * Vdsx) * (1.0 + PSCEB_i * Vsbx); \
- Vgb1 = Vgb1 + delVg; \
- \
- /* Bias dependent body factor */ \
- if (DNSUB_i > 0.0) begin \
- Dnsub = DNSUB_i * `MAXA(0.0, Vgs + Vsb - VNSUB_i, NSLP_i); \
- Gf = G_0 * sqrt(1.0 + Dnsub); \
- end else begin \
- Gf = G_0; \
- end \
- Gf2 = Gf * Gf; \
- inv_Gf2 = 1.0 / Gf2; \
- \
- /* Bias dependence of interface states */ \
- dCTG = 1.0; \
- if (CTG_i > 0.0) begin \
- xgct = 2.0 * Vgb1 * inv_phit; \
- temp1 = Gf2 + xgct; \
- temp2 = `MAXA((temp1 + xgct), 0.0, 5.0); \
- xsct0 = 0.5 * (temp1 - Gf * sqrt(temp2)); \
- xbct = phib * inv_phit; \
- xsbstar = Vsbx * inv_phit; \
- temp1 = xbct + xsbstar + 2.0; \
- xsct = `MINA(xsct0, temp1, 5.0); \
- temp2 = CTG_T * (xsct - (1.0 + CTB_i) * (0.5 * xbct + xsbstar)); \
- `expl_low(temp2, dCTG) \
- end \
- ct_fact = 1.0 + CT_T * dCTG; \
- phit1 = phit * ct_fact * (1.0 + dphit1); \
- inv_phit1 = 1.0 / phit1; \
- xg = Vgb1 * inv_phit1; \
- \
- /* Surface potential at source side */ \
- xi = 1.0 + Gf * `invSqrt2; \
- inv_xi = 1.0 / xi; \
- Ux = Vsbstar * inv_phit1; \
- xn_s = phib * inv_phit1 + Ux; \
- if (xn_s < `se) \
- delta_ns = exp(-xn_s); \
- else \
- delta_ns = `ke / `P3(xn_s - `se); \
- margin = 1.0e-5 * xi; \
- \
- `sp_s(x_s, xg, xn_s, delta_ns) \
- x_d = x_s; \
- x_m = x_s; \
- x_ds = 0.0; \
- \
- /* Core PSP current calculation */ \
- Vdsat_lim = 3.912023005 * phit1; \
- if (xg <= 0.0) begin \
- qis = 0.0; \
- xgm = xg - x_s; \
- Voxm = xgm * phit1; \
- qeff1 = Voxm; \
- Vdsat = Vdsat_lim; \
- Vdse = Vds; \
- end else begin /* (xg > 0) */ \
- delta_1s = 0.0; \
- temp = 1.0 / (2.0 + x_s * x_s); \
- xi0s = x_s * x_s * temp; \
- xi1s = 4.0 * (x_s * temp * temp); \
- xi2s = (8.0 * temp - 12.0 * xi0s) * temp * temp; \
- if (x_s < `se05) begin \
- delta_1s = exp(x_s); \
- Es = 1.0 / delta_1s; \
- delta_1s = delta_ns * delta_1s; \
- end else if (x_s > (xn_s - `se05)) begin \
- delta_1s = exp(x_s - xn_s); \
- Es = delta_ns / delta_1s; \
- end else begin \
- delta_1s = `ke05 / `P3(xn_s - x_s - `se05); \
- Es = `ke05 / `P3(x_s - `se05); \
- end \
- Ds = delta_1s - delta_ns * (x_s + 1.0 + xi0s); \
- if (x_s < 1.0e-5) begin \
- Ps = 0.5 * (x_s * x_s * (1.0 - `oneThird * (x_s * (1.0 - 0.25 * x_s)))); \
- Ds = `oneSixth * (delta_ns * x_s * x_s * x_s * (1.0 + 1.75 * x_s)); \
- temp = sqrt(1.0 - `oneThird * (x_s * (1.0 - 0.25 * x_s))); \
- sqm = `invSqrt2 * (x_s * temp); \
- alpha = 1.0 + Gf * `invSqrt2 * (1.0 - 0.5 * x_s + `oneSixth * (x_s * x_s)) / temp; \
- end else begin \
- Ps = x_s - 1.0 + Es; \
- sqm = sqrt(Ps); \
- alpha = 1.0 + 0.5 * (Gf * (1.0 - Es) / sqm); \
- end \
- Em = Es; \
- Ed = Em; \
- Dm = Ds; \
- Dd = Dm; \
- \
- /* Drain saturation voltage */ \
- Rxcor = (1.0 + 0.2 * XCOR_T * Vsbx) / (1.0 + XCOR_T * Vsbx); \
- if (Ds > `ke05) begin \
- xgs = Gf * sqrt(Ps + Ds); \
- qis = Gf2 * Ds * phit1 / (xgs + Gf * sqm); \
- qbs = sqm * Gf * phit1; \
- if (RSB_i < 0.0) begin \
- rhob = 1.0 / (1.0 - RSB_i * Vsbx); \
- end else begin \
- rhob = 1.0 + RSB_i * Vsbx; \
- end \
- if (RSG_i < 0.0) begin \
- temp = 1.0 - RSG_i * qis; \
- end else begin \
- temp = 1.0 / (1.0 + RSG_i * qis); \
- end \
- GR = THER_i * (rhob * temp * qis); \
- Eeffm = E_eff0 * (qbs + eta_mu * qis); \
- temp1 = ln(Ps / (Ps + Ds + 1.0e-14)); \
- Mutmp = pow(Eeffm * MUE_T, THEMU_T) + CS_T * exp(0.5 * THECS_T * temp1); \
- Gmob = (1.0 + Mutmp + GR) * Rxcor; \
- if (THESATB_i < 0.0) begin \
- xitsb = 1.0 / (1.0 - THESATB_i * Vsbx); \
- end else begin \
- xitsb = 1.0 + THESATB_i * Vsbx; \
- end \
- temp2 = qis * xitsb; \
- wsat = 100.0 * (temp2 / (100.0 + temp2)); \
- if (THESATG_i < 0.0) begin \
- temp = 1.0 / (1.0 - THESATG_i * wsat); \
- end else begin \
- temp = 1.0 + THESATG_i * wsat; \
- end \
- thesat1 = thesatloc * (temp / Gmob); \
- phi_inf = qis / alpha + phit1; \
- ysat = thesat1 * phi_inf * `invSqrt2; \
- if (CHNL_TYPE==`PMOS) begin \
- ysat = ysat / sqrt(1.0 + ysat); \
- end \
- za = 2.0 / (1.0 + sqrt(1.0 + 4.0 * ysat)); \
- temp1 = za * ysat; \
- Phi_0 = phi_inf * za * (1.0 + 0.86 * (temp1 * (1.0 - temp1 * za) / (1.0 + 4.0 * (temp1 * temp1 * za)))); \
- asat = xgs + 0.5 * Gf2; \
- Phi_2 = 0.98 * (Gf2 * Ds * phit1 / (asat + sqrt(asat * asat - Gf2 * Ds * 0.98))); \
- Phi_0_2 = Phi_0 + Phi_2; \
- Phi0_Phi2 = 2.0 * (Phi_0 * Phi_2); \
- Phi_sat = Phi0_Phi2 / (Phi_0_2 + sqrt(Phi_0_2 * Phi_0_2 - 1.98 * Phi0_Phi2)); \
- Vdsat = Phi_sat - phit1 * ln(1.0 + Phi_sat * (Phi_sat - 2.0 * asat * phit1) * inv_Gf2 / (phit1 * phit1 * Ds)); \
- end else begin \
- Vdsat = Vdsat_lim; \
- end \
- temp = pow(Vds / Vdsat, axloc); \
- temp1 = -1.0 / axloc; \
- Vdse = Vds * pow(1.0 + temp, temp1); \
- \
- /* Surface potential at drain side */ \
- Udse = Vdse * inv_phit1; \
- xn_d = xn_s + Udse; \
- if (Udse < `se) begin \
- k_ds = exp(-Udse); \
- end else begin \
- k_ds = `ke / `P3(Udse - `se); \
- end \
- delta_nd = delta_ns * k_ds; \
- \
- `sp_s_d(x_d, xg, xn_d, delta_nd) \
- x_ds = x_d - x_s; \
- \
- /* Approximations for extremely small x_ds: capacitance calculation */ \
- if (x_ds < 1.0e-10) begin \
- pC = 2.0 * (xg - x_s) + Gf2 * (1.0 - Es + delta_1s * k_ds - delta_nd * (1.0 + xi1s)); \
- qC = Gf2 * (1.0 - k_ds) * Ds; \
- temp = 2.0 - Gf2 * (Es + delta_1s * k_ds - delta_nd * xi2s); \
- temp = pC * pC - 2.0 * (temp * qC); \
- x_ds = 2.0 * (qC / (pC + sqrt(temp))); \
- x_d = x_s + x_ds; \
- end \
- dps = x_ds * phit1; \
- \
- xi0d = x_d * x_d / (2.0 + x_d * x_d); \
- if (x_d < `se05) begin \
- Ed = exp(-x_d); \
- if (x_d < 1.0e-5) begin \
- Dd = `oneSixth * delta_nd * x_d * x_d * x_d * (1.0 + 1.75 * x_d); \
- end else begin \
- Dd = delta_nd * (1.0 / Ed - x_d - 1.0 - xi0d); \
- end \
- end else begin \
- if (x_d > (xn_d - `se05)) begin \
- temp = exp(x_d - xn_d); \
- Ed = delta_nd / temp; \
- Dd = temp - delta_nd * (x_d + 1.0 + xi0d); \
- end else begin \
- Ed = `ke05 / `P3(x_d - `se05); \
- temp = `ke05 / `P3(xn_d - x_d - `se05); \
- Dd = temp - delta_nd * (x_d + 1.0 + xi0d); \
- end \
- end \
- \
- /* Mid-point surface potential */ \
- x_m = 0.5 * (x_s + x_d); \
- Em = 0.0; \
- temp = Ed * Es; \
- if (temp > 0.0) begin \
- Em = sqrt(temp); \
- end \
- D_bar = 0.5 * (Ds + Dd); \
- Dm = D_bar + 0.125 * (x_ds * x_ds * (Em - 2.0 * inv_Gf2)); \
- \
- if (x_m < 1.0e-5) begin \
- Pm = 0.5 * (x_m * x_m * (1.0 - `oneThird * (x_m * (1.0 - 0.25 * x_m)))); \
- xgm = Gf * sqrt(Dm + Pm); \
- \
- /* Polysilicon depletion */ \
- if (kp > 0.0) begin \
- eta_p = 1.0 / sqrt(1.0 + kp * xgm); \
- end /* (kp > 0.0) */ \
- temp = sqrt(1.0 - `oneThird * (x_m * (1.0 - 0.25 * x_m))); \
- sqm = `invSqrt2 * (x_m * temp); \
- alpha = eta_p + `invSqrt2 * (Gf * (1.0 - 0.5 * x_m + `oneSixth * (x_m * x_m)) / temp); \
- end else begin \
- Pm = x_m - 1.0 + Em; \
- xgm = Gf * sqrt(Dm + Pm); \
- \
- /* Polysilicon depletion */ \
- if (kp > 0.0) begin \
- d0 = 1.0 - Em + 2.0 * (xgm * inv_Gf2); \
- eta_p = 1.0 / sqrt(1.0 + kp * xgm); \
- temp = eta_p / (eta_p + 1.0); \
- x_pm = kp * (temp * temp * Gf2 * Dm); \
- p_pd = 2.0 * (xgm - x_pm) + Gf2 * (1.0 - Em + Dm); \
- q_pd = x_pm * (x_pm - 2.0 * xgm); \
- xi_pd = 1.0 - 0.5 * (Gf2 * (Em + Dm)); \
- u_pd = q_pd * p_pd / (p_pd * p_pd - xi_pd * q_pd); \
- x_m = x_m + u_pd; \
- km = exp(u_pd); \
- Em = Em / km; \
- Dm = Dm * km; \
- Pm = x_m - 1.0 + Em; \
- xgm = Gf * sqrt(Dm + Pm); \
- km0 = 1.0 - Em + 2.0 * (xgm * eta_p * inv_Gf2); \
- x_ds = x_ds * km * (d0 + D_bar) / (km0 + km * D_bar); \
- dps = x_ds * phit1; \
- end /* (kp > 0.0) */ \
- sqm = sqrt(Pm); \
- alpha = eta_p + 0.5 * (Gf * (1.0 - Em) / sqm); \
- end \
- \
- /* Potential midpoint inversion charge */ \
- qim = phit1 * (Gf2 * Dm / (xgm + Gf * sqm)); \
- qim1 = qim + phit1 * alpha; \
- qbm = sqm * Gf * phit1; \
- \
- /* Series resistance */ \
- if (RSG_i < 0.0) begin \
- temp = 1.0 - RSG_i * qim; \
- end else begin \
- temp = 1.0 / (1.0 + RSG_i * qim); \
- end \
- GR = THER_i * (rhob * temp * qim); \
- \
- /* Mobility reduction */ \
- qeff = qbm + eta_mu * qim; \
- qeff1 = qbm + eta_mu1 * qim; \
- Eeffm = E_eff0 * qeff; \
- temp1 = ln(Pm / (Pm + Dm + 1.0e-14)); \
- Mutmp = pow(Eeffm * MUE_T, THEMU_T) + CS_T * exp(0.5 * THECS_T * temp1); \
- Gmob = (1.0 + Mutmp + GR) * Rxcor; \
- \
- /* Channel length modulation */ \
- s1 = ln((1.0 + (Vds - dps) * inv_VP) / (1.0 + (Vdse - dps) * inv_VP)); \
- dL = alploc * s1; \
- GdL = 1.0 / (1.0 + dL + dL * dL); \
- \
- /* Velocity saturation */ \
- temp2 = qim * xitsb; \
- wsat = 100.0 * (temp2 / (100.0 + temp2)); \
- Gmob_dL = Gmob * GdL; \
- if (THESATG_i < 0.0) begin \
- temp = 1.0 / (1.0 - THESATG_i * wsat); \
- end else begin \
- temp = 1.0 + THESATG_i * wsat; \
- end \
- thesat1 = thesatloc * (temp / Gmob_dL); \
- zsat = thesat1 * thesat1 * dps * dps; \
- if (CHNL_TYPE == `PMOS) begin \
- zsat = zsat / (1.0 + thesat1 * dps); \
- end \
- Gvsat = 0.5 * (Gmob_dL * (1.0 + sqrt(1.0 + 2.0 * zsat))); \
- Gvsatinv = 1.0 / Gvsat; \
- \
- /* Variables for calculation of intrinsic charges and gate current */ \
- Voxm = xgm * phit1; \
- temp = Gmob_dL * Gvsatinv; \
- alpha1 = alpha * (1.0 + 0.5 * (zsat * temp * temp)); \
- H = temp * qim1 / alpha1; \
- \
- end /* (xg > 0) */
-
diff --git a/src/spicelib/devices/adms/psp103/admsva/PSP103_module.include b/src/spicelib/devices/adms/psp103/admsva/PSP103_module.include
deleted file mode 100644
index c4da68a2e..000000000
--- a/src/spicelib/devices/adms/psp103/admsva/PSP103_module.include
+++ /dev/null
@@ -1,2322 +0,0 @@
-//======================================================================================
-//======================================================================================
-// Filename: PSP103_module.include
-//======================================================================================
-//======================================================================================
-//
-// (c) Copyright notice
-//
-// Since 2015 until today, PSP has been co-developed by NXP Semiconductors and
-// CEA-Leti. For this part of the model, each claim undivided ownership and copyrights
-// Since 2012 until 2015, PSP has been co-developed by NXP Semiconductors and
-// Delft University of Technology. For this part of the model, each claim undivided
-// ownership and copyrights
-// Until and including 2011, PSP has been co-developed by NXP Semiconductors and
-// Arizona State University. For this part of the model, NXP Semiconductors claims
-// undivided ownership and copyrights.
-//
-//
-// Version: 103.7.0 (PSP), 200.6.0 (JUNCAP), April 2019
-//
-//======================================================================================
-//======================================================================================
-//
-// Further information can be found in the file releasenotesPSP103.txt
-//
-// --------------------------------------------------------------------------------------------------------------
-// Node definitions
-// --------------------------------------------------------------------------------------------------------------
-
-`ifdef SelfHeating
- inout D, G, S, B, DT;
-`else // SelfHeating
- inout D, G, S, B;
-`endif // SelfHeating
-electrical D;
-electrical G;
-electrical S;
-electrical B;
-`ifdef SelfHeating
- thermal DT;
- branch (DT) br_rth, br_ith;
-`endif // SelfHeating
-
-// Internal nodes and branches for correlated drain and gate noise
-electrical NOI;
-branch (NOI) NOII;
-branch (NOI) NOIR;
-branch (NOI) NOIC;
-
-// Internal nodes for gate and bulk resistors
-electrical GP;
-electrical SI;
-electrical DI;
-electrical BP;
-electrical BI;
-electrical BS;
-electrical BD;
-
-// Internal nodes and branches for spline collocation (NQS)
-`ifdef NQSmodel
- electrical INT1;
- electrical INT2;
- electrical INT3;
- electrical INT4;
- electrical INT5;
- electrical INT6;
- electrical INT7;
- electrical INT8;
- electrical INT9;
- branch(INT1) SPLINE1;
- branch(INT2) SPLINE2;
- branch(INT3) SPLINE3;
- branch(INT4) SPLINE4;
- branch(INT5) SPLINE5;
- branch(INT6) SPLINE6;
- branch(INT7) SPLINE7;
- branch(INT8) SPLINE8;
- branch(INT9) SPLINE9;
- branch(INT1) RES1;
- branch(INT2) RES2;
- branch(INT3) RES3;
- branch(INT4) RES4;
- branch(INT5) RES5;
- branch(INT6) RES6;
- branch(INT7) RES7;
- branch(INT8) RES8;
- branch(INT9) RES9;
-`endif // NQSmodel
-
-
-
-// --------------------------------------------------------------------------------------------------------------
-// Instance parameters
-// --------------------------------------------------------------------------------------------------------------
-
-// Instance parameters for global and binning models only
-`IPRco(L ,1.0e-5 ,"m" ,1.0e-9 ,inf ,"Design length")
-`IPRco(W ,1.0e-5 ,"m" ,1.0e-9 ,inf ,"Design width")
-`IPRnb(SA ,0.0 ,"m" ,"Distance between OD-edge and poly from one side")
-`IPRnb(SB ,0.0 ,"m" ,"Distance between OD-edge and poly from other side")
-`IPRnb(SD ,0.0 ,"m" ,"Distance between neighbouring fingers")
-`IPRcz(SCA ,0.0 ,"" ,"Integral of the first distribution function for scattered well dopants")
-`IPRcz(SCB ,0.0 ,"" ,"Integral of the second distribution function for scattered well dopants")
-`IPRcz(SCC ,0.0 ,"" ,"Integral of the third distribution function for scattered well dopants")
-`IPRnb(SC ,0.0 ,"m" ,"Distance between OD-edge and nearest well edge")
-`IPRco(NF ,1.0 ,"" ,1.0 ,inf ,"Number of fingers")
-`IPRcc(NGCON ,1.0 ,"" ,1.0 ,2.0 ,"Number of gate contacts")
-`IPRnb(XGW ,1.0e-7 ,"m" ,"Distance from the gate contact to the channel edge")
-`IPRnb(NRS ,0.0 ,"" ,"Number of squares of source diffusion")
-`IPRnb(NRD ,0.0 ,"" ,"Number of squares of drain diffusion")
-
-// Instance parameters for local model only
-`IPRco(JW ,1.0e-6 ,"m" ,`LG_cliplow ,inf ,"Gate-edge length of source/drain junction")
-
-// Instance parameters for global, binning, and local models
-`IPRnb(DELVTO ,0.0 ,"V" ,"Threshold voltage shift parameter")
-`IPRcz(FACTUO ,1.0 ,"" ,"Zero-field mobility pre-factor")
-`IPRnb(DELVTOEDGE ,0.0 ,"V" ,"Threshold voltage shift parameter of edge transistor")
-`IPRcz(FACTUOEDGE ,1.0 ,"" ,"Zero-field mobility pre-factor of edge transistor")
-`IPRco(ABSOURCE ,1.0e-12 ,"m^2" ,`AB_cliplow ,inf ,"Bottom area of source junction")
-`IPRco(LSSOURCE ,1.0e-6 ,"m" ,`LS_cliplow ,inf ,"STI-edge length of source junction")
-`IPRco(LGSOURCE ,1.0e-6 ,"m" ,`LG_cliplow ,inf ,"Gate-edge length of source junction")
-`IPRco(ABDRAIN ,1.0e-12 ,"m^2" ,`AB_cliplow ,inf ,"Bottom area of drain junction")
-`IPRco(LSDRAIN ,1.0e-6 ,"m" ,`LS_cliplow ,inf ,"STI-edge length of drain junction")
-`IPRco(LGDRAIN ,1.0e-6 ,"m" ,`LG_cliplow ,inf ,"Gate-edge length of drain junction")
-`IPRco(AS ,1.0e-12 ,"m^2" ,`AB_cliplow ,inf ,"Bottom area of source junction")
-`IPRco(PS ,1.0e-6 ,"m" ,`LS_cliplow ,inf ,"Perimeter of source junction")
-`IPRco(AD ,1.0e-12 ,"m^2" ,`AB_cliplow ,inf ,"Bottom area of drain junction")
-`IPRco(PD ,1.0e-6 ,"m" ,`LS_cliplow ,inf ,"Perimeter of drain junction")
-`IPRco(MULT ,1.0 ,"" ,0.0 ,inf ,"Number of devices in parallel")
-
-// --------------------------------------------------------------------------------------------------------------
-// PSP Model Parameters
-// --------------------------------------------------------------------------------------------------------------
-`include "PSP103_parlist.include"
-
-// --------------------------------------------------------------------------------------------------------------
-// JUNCAP Model Parameters
-// --------------------------------------------------------------------------------------------------------------
-`include "JUNCAP200_parlist.include"
-
-// --------------------------------------------------------------------------------------------------------------
-// Variables
-// --------------------------------------------------------------------------------------------------------------
-
-// Variables for switch (initial_model parts)
-integer CHNL_TYPE, SWGEO_i, SWIGATE_i, SWIMPACT_i, SWGIDL_i, SWJUNCAP_i, SWJUNASYM_i, SWNUD_i, SWEDGE_i, SWDELVTAC_i;
-integer SWQSAT_i, SWQPART_i, SWIGN_i;
-
-// Instance local variables
-real NF_i, invNF, L_i, W_i, SA_i, SB_i, SD_i, SC_i, XGW_i, JW_i, SCA_i, SCB_i, SCC_i, NGCON_i, MULT_i, FACTUO_i, DELVTO_i;
-real FACTUOEDGE_i, DELVTOEDGE_i;
-
-// Instance local variables for juncap
-real ABS_i, LSS_i, LGS_i, ABD_i, LSD_i, LGD_i, jwcorr, jww;
-
-// Variables of clipped global model parameters
-real TOXO_i, EPSROXO_i, NSUBO_i, WSEG_i, NPCK_i, WSEGP_i, LPCK_i, TOXOVO_i, TOXOVDO_i, LOV_i, LOVD_i, LP1_i, LP2_i, WBET_i;
-real AXL_i, ALP1L2_i, ALP2L2_i, SAREF_i, SBREF_i, KVSAT_i, LLODKUO_i, WLODKUO_i, LLODVTH_i, WLODVTH_i, LODETAO_i, SCREF_i;
-real WEB_i, WEC_i, RSHG_i, RSH_i, RSHD_i, RINT_i, RVPOLY_i, NSUBEDGEO_i, LPEDGE_i;
-
-// Variables of internal global-binning parameters of charge model
-real CFACL_i, CFACW_i, CFACLEXP_i, THESATACO_i, THESATACL_i, THESATACLEXP_i, THESATACW_i, THESATACLW_i, AXACO_i, AXACL_i, ALPACL_i;
-real ALPACLEXP_i, ALPACW_i, POCFAC_i, PLCFAC_i, PWCFAC_i, PLWCFAC_i, POTHESATAC_i, PLTHESATAC_i, PWTHESATAC_i, PLWTHESATAC_i;
-real POAXAC_i, PLAXAC_i, PWAXAC_i, PLWAXAC_i, POALPAC_i, PLALPAC_i, PWALPAC_i, PLWALPAC_i, KVSATAC_i;
-
-// Variables of local model parameters
-real VFB_p, STVFB_p, ST2VFB_p, TOX_p, EPSROX_p, NEFF_p, FACNEFFAC_p, GFACNUD_p, VSBNUD_p, DVSBNUD_p, VNSUB_p, NSLP_p, DNSUB_p;
-real DPHIB_p, DELVTAC_p, NP_p, CT_p, CTG_p, CTB_p, STCT_p, TOXOV_p, TOXOVD_p, NOV_p, NOVD_p, PSCE_p, PSCED_p, PSCEB_p, CF_p, CFAC_p;
-real CFD_p, CFB_p, BETN_p, STBET_p, MUE_p, STMUE_p, THEMU_p, STTHEMU_p, CS_p, STCS_p, THECS_p, STTHECS_p, XCOR_p, STXCOR_p;
-real FETA_p, RS_p, STRS_p, RSB_p, RSG_p, THESAT_p, THESATAC_p, STTHESAT_p, THESATB_p, THESATG_p, AX_p, AXAC_p, ALP_p, ALPAC_p;
-real ALP1_p, ALP2_p, VP_p, A1_p, A2_p, STA2_p, A3_p, A4_p, GCO_p, IGINV_p, IGOV_p, IGOVD_p, STIG_p, GC2_p, GC3_p, GC2OV_p, GC3OV_p;
-real CHIB_p, AGIDL_p, AGIDLD_p, BGIDL_p, BGIDLD_p, STBGIDL_p, STBGIDLD_p, CGIDL_p, CGIDLD_p, COX_p, CGOV_p, CGOVD_p, CGBOV_p, CFR_p;
-real CFRD_p, FNT_p, FNTEXC_p, NFA_p, NFB_p, NFC_p, EF_p, VFBEDGE_p, STVFBEDGE_p, DPHIBEDGE_p, NEFFEDGE_p, CTEDGE_p, BETNEDGE_p;
-real STBETEDGE_p, PSCEEDGE_p, PSCEBEDGE_p, PSCEDEDGE_p, CFEDGE_p, CFDEDGE_p, CFBEDGE_p, FNTEDGE_p, NFAEDGE_p, NFBEDGE_p, NFCEDGE_p;
-real EFEDGE_p, RG_p, RSE_p, RDE_p, RWELL_p, RBULK_p, RJUNS_p, RJUND_p;
-`ifdef SelfHeating
- real RTH_p, CTH_p, STRTH_p;
-`endif // SelfHeating
-`ifdef NQSmodel
- real MUNQS_p;
-`endif // NQSmodel
-
-// Variables of clipped local model parameters
-real TR_i, QMC_i, VFB_i, STVFB_i, ST2VFB_i, STCT_i, TOX_i, EPSROX_i, NEFF_i, FACNEFFAC_i, GFACNUD_i, VSBNUD_i, DVSBNUD_i, VNSUB_i, NSLP_i;
-real DNSUB_i, DPHIB_i, DELVTAC_i, NP_i, CT_i, CTG_i, CTB_i, TOXOV_i, TOXOVD_i, NOV_i, NOVD_i, CF_i, CFAC_i, CFD_i, CFB_i, PSCE_i, PSCEB_i;
-real PSCED_i, BETN_i, STBET_i, MUE_i, STMUE_i, THEMU_i, STTHEMU_i, CS_i, STCS_i, THECS_i, STTHECS_i, XCOR_i, STXCOR_i, FETA_i, RS_i, STRS_i;
-real RSB_i, RSG_i, THESAT_i, THESATAC_i, STTHESAT_i, THESATB_i, THESATG_i, AX_i, AXAC_i, ALP_i, ALPAC_i, ALP1_i, ALP2_i, VP_i, A1_i, A2_i;
-real STA2_i, A3_i, A4_i, GCO_i, IGINV_i, IGOV_i, IGOVD_i, STIG_i, GC2_i, GC3_i, GC2OV_i, GC3OV_i, CHIB_i, AGIDL_i, AGIDLD_i, BGIDL_i;
-real BGIDLD_i, STBGIDL_i, STBGIDLD_i, CGIDL_i, CGIDLD_i, COX_i, CGOV_i, CGOVD_i, CGBOV_i, CFR_i, CFRD_i, FNT_i, FNTEXC_i, NFA_i, NFB_i;
-real NFC_i, EF_i, VFBEDGE_i, STVFBEDGE_i, DPHIBEDGE_i, NEFFEDGE_i, CTEDGE_i, BETNEDGE_i, STBETEDGE_i, PSCEEDGE_i, PSCEBEDGE_i, PSCEDEDGE_i;
-real CFEDGE_i, CFDEDGE_i, CFBEDGE_i, FNTEDGE_i, NFAEDGE_i, NFBEDGE_i, NFCEDGE_i, EFEDGE_i, RG_i, RSE_i, RDE_i, RBULK_i, RJUNS_i, RJUND_i;
-real RWELL_i;
-`ifdef SelfHeating
- real RTH_i, CTH_i, STRTH_i;
-`endif // SelfHeating
-`ifdef NQSmodel
- real MUNQS_i;
-`endif // NQSmodel
-
-// Variables for scaling rules
-real iL, iW, delLPS, delWOD, LE, WE, LEcv, WEcv, Lcv, Wcv, iLE, iWE, L_f, L_slif, W_f, XGWE, NSUB0e, NPCKe, LPCKe, AA, BB, NSUB;
-real FBET1e, LP1e, GPE, GWE, tmpx, Lnoi, Lred, WE_edge, iWE_edge, GPE_edge, KVTHOWE, KUOWE;
-`ifdef SelfHeating
- real deltaRth;
-`endif // SelfHeating
-
-// Variables for binning-rules
-real iLEWE, iiLE, iiWE, iiLEWE, iiiLEWE, iLEcv, iiLEcv, iiWEcv, iiLEWEcv, iiiLEWEcv, iLcv, iiLcv, iiWcv, iiLWcv, iiiLWcv;
-
-// Variables for general temperature scaling
-real TKR, TKA, rTa, delTa, phita, inv_phita, TKD, TKD_sq, delT, rTn, ln_rTn, inv_phit, Eg, phibFac;
-
-// JUNCAP2 variables
-`include "JUNCAP200_varlist.include"
-
-// Local parameters after temperature scaling and variables used in self heating effect
-real VFB_T, CT_T, CTG_T, BETN_T, MUE_T, THEMU_T, CS_T, THECS_T, XCOR_T, RS_T, BGIDL_T, BGIDLD_T, A2_T, VFBEDGE_T, BETNEDGE_T;
-`ifdef SelfHeating
- real RTH_T;
-`else // SelfHeating
- // in the self heating model, these variables are declared locally in the evaluate block
- real phit, BET_i, BETEDGE_i, nt0, nt, THESAT_T, THESATAC_T, Sfl_prefac, phit0edge, Gfedge2, lnGfedge2, Sfl_prefac_edge;
- real ntedge;
-`endif // SelfHeating
-
-// Variables for channel temperature scaling (including self heating effect)
-real phib_dc, G_0_dc, kp, np, arg2max, qlim2, qb0, dphibq, sqrt_phib_dc, phix_dc, aphi_dc, bphi_dc, phix2, phix1_dc, alpha_b;
-real us1, us21, phib_ac, G_0_ac, phix_ac, aphi_ac, bphi_ac, phix1_ac, tf_ct, tf_bet, tf_mue, tf_cs, tf_xcor, tf_ther, THER_i, tf_thesat;
-real tf_betedge, phibedge, Gfedge, phixedge, aphiedge, bphiedge, phix2edge, phix1edge;
-
-// Variables used in instance initializing
-real EPSSI, EPSOX, CoxPrime, tox_sq, Cox_over_q, NEFFAC_i, qq, E_eff0, eta_mu, eta_mu1, inv_AX, inv_VP, CoxovPrime, CoxovPrime_d, GOV_s;
-real GOV_d, GOV2_s, GOV2_d, SP_OV_eps2_s, SP_OV_a_s, SP_OV_delta1_s, SP_OV_eps2_d, SP_OV_a_d, SP_OV_delta1_d, inv_CHIB, B_fact, BCH;
-real BOV, BOV_d, GCQ, GCQOV, tf_ig, AGIDLs, AGIDLDs, BGIDLs, BGIDLDs, fac_exc, ggate, gsource, gdrain, gbulk, gjuns, gjund, gwell;
-
-// Variables for bias affectation
-real Vgs, Vds, Vsb, Vdb, Vgb, Vjun_s, Vjun_d, VgsPrime, VsbPrime, VdbPrime, VgdPrime;
-real Vdsx;
-
-// Global variables used in PSP103_SPCalculation.include
-real Vgb1, Vdsp, delVg, Vdsat_lim, Vdsat;
-
-// Global variables used in current and charge calculations
-real xgs_ov, xgd_ov, Vsbstar_dc, Vsbstar_dc_tmp, Vmb, us, usnew, Vmbnew, qeff1_dc, Voxm_dc, GdL_dc, eta_p_dc, Gvsat_dc, Gmob_dL_dc, x_ds_dc;
-real x_m_dc, Gf_dc, Vdsat_dc, Udse_dc, SP_OV_xg, xs_ov, xd_ov, Vovs, Vovd, zg, TP, Fs1, Fs2, Fs3, Fs, Vm, Dch, arg2mina, psi_t, arg1;
-real Dsi, Dgate, Igc0, igc, igcd_h, u0, x, u0_div_H, Bg, Ag, xsq, inv_x, ex, inv_ex, Sg, Igc, Igb, Vtovd, Igidl, Vtovs, Igisl;
-real delVsat, Vsbstar_ac, xg_ac, qeff1_ac, Voxm_ac, alpha_ac, dps_ac, qim_ac, GdL_ac, H_ac, QG, QI, QD, QB, Fj, Fj2;
-real QCLM, Qg, Qd, Qb, Qs, Qgs_ov, Qgd_ov, Qgb_ov, Qfgs, Qfgd, rgatenoise, rsourcenoise, rdrainnoise, rbulknoise, rwellnoise, rjundnoise;
-real rjunsnoise;
-
-// Global variables used in macros
-real tme1, tme2;
-real inv_GOV, SP_OV_eps, SP_OV_delta, mutau, nu;
-real Q_EDGE_xsth, Q_EDGE_xth0, Q_EDGE_xth, Q_EDGE_n, Q_EDGE_n_inv, Q_EDGE_xgt, Q_EDGE_xgt0, Q_EDGE_xgt0e, Q_EDGE_qi0si, Q_EDGE_qi0;
-real Q_EDGE_exp_x, Q_EDGE_d0, Q_EDGE_d0p, Q_EDGE_sqerr, Q_EDGE_errq;
-
-// Global variables used in noise section
-real N1, Nm1, Delta_N1, Sfl, t1, sqt2, t2, r, lc, lcinv2, g_ideal, mid, temp2_exc, wsat_exc, temp_exc, thesat1_exc, zsat_exc, Gvsat_exc;
-real gfac, Sidexc, sqid, mig, migid0, migid, CGeff, sqig, c_igid, shot_igcsx, shot_igcdx, shot_igsov, shot_igdov, shot_iavl, jnoisex_s, jnoisex_d;
-real shot_igs, shot_igd, anoisedge, N1edge, Nm1edge, Delta_N1edge, H0edge, t1edge, sqt2edge, t2edge, redge, lcedge, lcinv2edge;
-real g_idealedge;
-
-// Variables used in NQS-calculations
-`ifdef NQSmodel
- integer SWNQS_i;
- real Gf_ac, xgm_dc, thesat1_dc, xgm_ac, x_m_ac, thesat1_ac, margin_dc, margin_ac;
- real Qp1_0, Qp2_0, Qp3_0, Qp4_0, Qp5_0, Qp6_0, Qp7_0, Qp8_0, Qp9_0, fk1, fk2, fk3, fk4, fk5, fk6, fk7, fk8, fk9, phi_p1, phi_p2, phi_p3;
- real phi_p4, phi_p5, phi_p6, phi_p7, phi_p8, phi_p9, Qp1, Qp2, Qp3, Qp4, Qp5, Qp6, Qp7, Qp8, Qp9, Qp0, QpN, QG_NQS, QS_NQS, QD_NQS, pd;
- real Gp, Gp2, a_factrp, marginp, x_sp, x_dp, zsat_nqs, dfQi, fQi, dQis, dQis_1, d2Qis, dQbs, dQy, d2Qy, dpsy2, ym, inorm, Tnorm, Qb_tmp;
- real QbSIGN, r_nqs, vnorm, vnorm_inv, NQS_xg1, NQS_yg, NQS_z, NQS_eta, NQS_a, NQS_c, NQS_tau, NQS_D0, NQS_xi, NQS_p, NQS_q, NQS_temp;
- real NQS_A_fac, NQS_xbar, NQS_w, NQS_x0, NQS_u, NQS_y0, xphi, fk0, thesat2, Fvsat, temp3, temp4, temp5, temp6, temp7, temp8, temp9;
-`endif // NQSmodel
-
-//ngspice-adms: move local variables here
-real Invsa, Invsb, Invsaref, Invsbref, Kstressu0, rhobeta, rhobetaref, Kstressvth0;
-real temp0, temp00, templ, tempw, Lx, Wx, loop, tmpa, tmpb;
-
-real ijunbot, ijunsti, ijungat, qjunbot, qjunsti, qjungat;
-
-real sigVds, dphit1, xgct, xsct0, xbct, xsbstar, xsct, dCTG, ct_fact, phit1, inv_phit1, xg_dc, alpha_dc, dps_dc, qim_dc;
-real qim1_dc, H_dc, FdL_dc, Gvsatinv_dc, Ids, Iimpact, mavl, Igdov, Igsov, Igcd, Igcs, eta_p_ac, Gvsat_ac, Gmob_dL_ac, H0;
-real COX_qm, ijun_s, ijunbot_s, ijunsti_s, ijungat_s, ijun_d, ijunbot_d, ijunsti_d, ijungat_d, qjun_s, qjunbot_s, qjunsti_s;
-real qjungat_s, qjun_d, qjunbot_d, qjunsti_d, qjungat_d, jnoise_s, jnoise_d, Gmob_dc, xitsb_dc, Vdse_dc, Vsbstaredge, Vsbxedge;
-real dphit1edge, phit1edge, inv_phit1edge, Vdspedge, delVgedge, xgedge, xbedge, dxthedge, xnedge_s, qseffedge, xnedge_d;
-real qdseffedge, qdeffedge, qmeffedge, dsqredge, alphabmedge, Idsedge, Sfledge, midedge, sqidedge;
-`ifdef SelfHeating
- real Pdiss, phit, BET_i, BETEDGE_i, nt0, nt, THESAT_T, THESATAC_T, Sfl_prefac, phit0edge, Gfedge2, lnGfedge2, Sfl_prefac_edge;
- real ntedge;
-`endif // SelfHeating
-real temp, temp1, temp2;
-
-real FdL, qim1_1, r1, r2, s2, dL1;
-
-real tmpv, vjv;
-
-real Pdiss_s, Pdiss_d;
-
-//`define SPcalcLocalVarDecl
-real phib, G_0, Vsbstar, cfloc, thesatloc, axloc, alploc;
-real Vsbx, xg, Dnsub, Gf, Gf2, inv_Gf2, xi, inv_xi, Ux, xn_s, delta_ns, margin, x_s, delta_1s, xi0s, xi1s;
-real xi2s, Es, Ds, Ps, Rxcor, xgs, qis, qbs, rhob, GR, Eeffm, Mutmp, Gmob, xitsb, wsat, thesat1, phi_inf;
-real ysat, za, Phi_0, asat, Phi_2, Phi_0_2, Phi0_Phi2, Phi_sat, Vdse, Udse, xn_d, k_ds, delta_nd, x_d, x_ds;
-real pC, qC, dps, xi0d, Ed, Dd, x_m, Em, D_bar, Dm, Pm, xgm, eta_p, sqm, alpha, d0, x_pm, p_pd, q_pd, xi_pd;
-real u_pd, km, km0, qim, qim1, qbm, qeff, qeff1, s1, dL, GdL, Gmob_dL, zsat, Gvsat, Gvsatinv, Voxm, alpha1, H;
-real SP_S_temp, SP_S_temp1, SP_S_temp2;
-real SP_S_yg, SP_S_ysub, SP_S_eta, SP_S_a, SP_S_c, SP_S_tau, SP_S_y0, SP_S_delta0, SP_S_delta1, SP_S_xi0;
-real SP_S_xi1, SP_S_xi2, SP_S_pC, SP_S_qC, SP_xg1, SP_S_A_fac, SP_S_xbar, SP_S_w, SP_S_x1, SP_S_bx, SP_S_b;
-real SP_S_x0;
-
-/* declaration of variables needed in macro "calcerfcexpmtat" */
-real ysq, terfc, erfcpos;
-
-/* declaration of variables needed in hypfunction 5 */
-real h1, h2, h2d, h3, h4, h5;
-
-/* declaration of variables calculated outside macro "juncapfunction", voltage-dependent part */
-real idmult, vj, z, zinv, two_psistar, vjlim, vjsrh, vbbt, vav;
-
-/* declaration of variables used within macro "juncapfunction" */
-real tmp, id;
-real isrh, vbi_minus_vjsrh, wsrhstep, dwsrh, wsrh, wdep, asrh;
-real itat, btat, twoatatoverthreebtat, umaxbeforelimiting, umax, sqrtumax, umaxpoweronepointfive;
-real wgamma, wtat, ktat, ltat, mtat, xerfc, erfctimesexpmtat, gammamax;
-real ibbt, Fmaxr;
-real fbreakdown;
-
-// --------------------------------------------------------------------------------------------------------------
-// Variables for operating point info
-// --------------------------------------------------------------------------------------------------------------
-real id_op, is, ig, ib, P_D, facvsb, facvsb0, sig1k, vth_i, vts_i, ids_i;
-`OPP(ctype ,"" ,"Flag for channel type")
-`OPP(sdint ,"" ,"Flag for source-drain interchange")
-`OPP(ise ,"A" ,"Total source current")
-`OPP(ige ,"A" ,"Total gate current")
-`OPP(ide ,"A" ,"Total drain current")
-`OPP(ibe ,"A" ,"Total bulk current")
-`OPP(ids ,"A" ,"Drain current, excl. edge transistor currents, avalanche, tunnel, GISL, GIDL, and junction currents")
-`OPP(idb ,"A" ,"Drain to bulk current")
-`OPP(isb ,"A" ,"Source to bulk current")
-`OPP(igs ,"A" ,"Gate-source tunneling current")
-`OPP(igd ,"A" ,"Gate-drain tunneling current")
-`OPP(igb ,"A" ,"Gate-bulk tunneling current")
-`OPP(idedge ,"A" ,"Drain current of edge transistors")
-`OPP(igcs ,"A" ,"Gate-channel tunneling current (source component)")
-`OPP(igcd ,"A" ,"Gate-channel tunneling current (drain component)")
-`OPP(iavl ,"A" ,"Substrate current due to weak avelanche")
-`OPP(igisl ,"A" ,"Gate-induced source leakage current")
-`OPP(igidl ,"A" ,"Gate-induced drain leakage current")
-`OPP(ijs ,"A" ,"Total source junction current")
-`OPP(ijsbot ,"A" ,"Source junction current (bottom component)")
-`OPP(ijsgat ,"A" ,"Source junction current (gate-edge component)")
-`OPP(ijssti ,"A" ,"Source junction current (STI-edge component)")
-`OPP(ijd ,"A" ,"Total drain junction current")
-`OPP(ijdbot ,"A" ,"Drain junction current (bottom component)")
-`OPP(ijdgat ,"A" ,"Drain junction current (gate-edge component)")
-`OPP(ijdsti ,"A" ,"Drain junction current (STI-edge component)")
-`OPP(vds ,"V" ,"Drain-source voltage")
-`OPP(vgs ,"V" ,"Gate-source voltage")
-`OPP(vsb ,"V" ,"Source-bulk voltage")
-`OPP(vto ,"V" ,"Zero-bias threshold voltage")
-`OPP(vts ,"V" ,"Threshold voltage including back bias effects")
-`OPP(vth ,"V" ,"Threshold voltage including back bias and drain bias effects")
-`OPP(vgt ,"V" ,"Effective gate drive voltage including back bias and drain bias effects")
-`OPP(vdss ,"V" ,"Drain saturation voltage at actual bias")
-`OPP(vsat ,"" ,"Saturation limit")
-`ifdef OPderiv
- `OPP(gm ,"1/Ohm" ,"Transconductance")
- `OPP(gmb ,"1/Ohm" ,"Substrate transconductance")
- `OPP(gds ,"1/Ohm" ,"Output conductance")
- `OPP(gjs ,"1/Ohm" ,"Source junction conductance")
- `OPP(gjd ,"1/Ohm" ,"Drain junction conductance")
- `OPP(cdd ,"F" ,"Drain capacitance")
- `OPP(cdg ,"F" ,"Drain-gate capacitance")
- `OPP(cds ,"F" ,"Drain-source capacitance")
- `OPP(cdb ,"F" ,"Drain-bulk capacitance")
- `OPP(cgd ,"F" ,"Gate-drain capacitance")
- `OPP(cgg ,"F" ,"Gate capacitance")
- `OPP(cgs ,"F" ,"Gate-source capacitance")
- `OPP(cgb ,"F" ,"Gate-bulk capacitance")
- `OPP(csd ,"F" ,"Source-drain capacitance")
- `OPP(csg ,"F" ,"Source-gate capacitance")
- `OPP(css ,"F" ,"Source capacitance")
- `OPP(csb ,"F" ,"Source-bulk capacitance")
- `OPP(cbd ,"F" ,"Bulk-drain capacitance")
- `OPP(cbg ,"F" ,"Bulk-gate capacitance")
- `OPP(cbs ,"F" ,"Bulk-source capacitance")
- `OPP(cbb ,"F" ,"Bulk capacitance")
- `OPP(cgsol ,"F" ,"Total gate-source overlap capacitance")
- `OPP(cgdol ,"F" ,"Total gate-drain overlap capacitance")
- `OPP(cjs ,"F" ,"Total source junction capacitance")
- `OPP(cjsbot ,"F" ,"Source junction capacitance (bottom component)")
- `OPP(cjsgat ,"F" ,"Source junction capacitance (gate-edge component)")
- `OPP(cjssti ,"F" ,"Source junction capacitance (STI-edge component)")
- `OPP(cjd ,"F" ,"Total drain junction capacitance")
- `OPP(cjdbot ,"F" ,"Drain junction capacitance (bottom component)")
- `OPP(cjdgat ,"F" ,"Drain junction capacitance (gate-edge component)")
- `OPP(cjdsti ,"F" ,"Drain junction capacitance (STI-edge component)")
-`endif // OPderiv
-`OPP(weff ,"m" ,"Effective channel width for geometrical models")
-`OPP(leff ,"m" ,"Effective channel length for geometrical models")
-`ifdef OPderiv
- `OPP(u ,"" ,"Transistor gain")
- `OPP(rout ,"Ohm" ,"Small-signal output resistance")
- `OPP(vearly ,"V" ,"Equivalent Early voltage")
- `OPP(beff ,"A/V^2" ,"Gain factor")
- `OPP(fug ,"Hz" ,"Unity gain frequency at actual bias")
- `OPP(rg_op ,"Ohm" ,"Gate resistance")
- `OPP(sfl ,"A^2/Hz" ,"Flicker noise current spectral density at 1 Hz")
- `OPP(sqrtsff ,"V/sqrt(Hz)" ,"Input-referred RMS white noise voltage spectral density at 1 kHz")
- `OPP(sqrtsfw ,"V/sqrt(Hz)" ,"Input-referred RMS white noise voltage spectral density")
- `OPP(sid ,"A^2/Hz" ,"White noise current spectral density")
- `OPP(sig ,"A^2/Hz" ,"Induced gate noise current spectral density at 1 Hz")
- `OPP(cigid ,"" ,"Imaginary part of correlation coefficient between Sig and Sid")
- `OPP(fknee ,"Hz" ,"Cross-over frequency above which white noise is dominant")
- `OPP(sigs ,"A^2/Hz" ,"Gate-source current noise spectral density")
- `OPP(sigd ,"A^2/Hz" ,"Gate-drain current noise spectral density")
- `OPP(siavl ,"A^2/Hz" ,"Impact ionization current noise spectral density")
- `OPP(ssi ,"A^2/Hz" ,"Total source junction current noise spectral density")
- `OPP(sdi ,"A^2/Hz" ,"Total drain junction current noise spectral density")
- `OPP(sfledge ,"A^2/Hz" ,"Flicker noise current spectral density at 1 Hz of edge transistors")
- `OPP(sidedge ,"A^2/Hz" ,"White noise current spectral density of edge transistors")
-`endif // OPderiv
-// local parameters after scaling, T-scaling, and clipping
-`OPP(lp_vfb ,"V" ,"Local parameter VFB after T-scaling and clipping")
-`OPP(lp_stvfb ,"V/K" ,"Local parameter STVFB after clipping")
-`OPP(lp_st2vfb ,"K^-1" ,"Local parameter ST2VFB after clipping")
-`OPP(lp_tox ,"m" ,"Local parameter TOX after clipping")
-`OPP(lp_epsrox ,"" ,"Local parameter EPSROX after clipping")
-`OPP(lp_neff ,"m^-3" ,"Local parameter NEFF after clipping")
-`OPP(lp_facneffac ,"" ,"Local parameter FACNEFFAC after clipping")
-`OPP(lp_gfacnud ,"" ,"Local parameter GFACNUD after clipping")
-`OPP(lp_vsbnud ,"V" ,"Local parameter VSBNUD after clipping")
-`OPP(lp_dvsbnud ,"V" ,"Local parameter DVSBNUD after clipping")
-`OPP(lp_vnsub ,"V" ,"Local parameter VNSUB after clipping")
-`OPP(lp_nslp ,"V" ,"Local parameter NSLP after clipping")
-`OPP(lp_dnsub ,"V^-1" ,"Local parameter DNSUB after clipping")
-`OPP(lp_dphib ,"V" ,"Local parameter DPHIB after clipping")
-`OPP(lp_delvtac ,"V" ,"Local parameter DELVTAC after clipping")
-`OPP(lp_np ,"m^-3" ,"Local parameter NP after clipping")
-`OPP(lp_toxov ,"m" ,"Local parameter TOXOV after clipping")
-`OPP(lp_toxovd ,"m" ,"Local parameter TOXOVD after clipping")
-`OPP(lp_nov ,"m^-3" ,"Local parameter NOV after clipping")
-`OPP(lp_novd ,"m^-3" ,"Local parameter NOVD after clipping")
-`OPP(lp_ct ,"" ,"Local parameter CT after clipping")
-`OPP(lp_ctg ,"" ,"Local parameter CTG after clipping")
-`OPP(lp_ctb ,"" ,"Local parameter CTB after clipping")
-`OPP(lp_stct ,"" ,"Local parameter STCT after clipping")
-`OPP(lp_cf ,"" ,"Local parameter CF after clipping")
-`OPP(lp_cfac ,"" ,"Local parameter CFAC after clipping")
-`OPP(lp_cfd ,"V^-1" ,"Local parameter CFD after clipping")
-`OPP(lp_cfb ,"V^-1" ,"Local parameter CFB after clipping")
-`OPP(lp_psce ,"" ,"Local parameter PSCE after clipping")
-`OPP(lp_psceb ,"V^-1" ,"Local parameter PSCEB after clipping")
-`OPP(lp_psced ,"V^-1" ,"Local parameter PSCED after clipping")
-`OPP(lp_betn ,"m^2/(V s)" ,"Local parameter BETN after T-scaling and clipping")
-`OPP(lp_stbet ,"" ,"Local parameter STBET after clipping")
-`OPP(lp_mue ,"m/V" ,"Local parameter MUE after T-scaling and clipping")
-`OPP(lp_stmue ,"" ,"Local parameter STMUE after clipping")
-`OPP(lp_themu ,"" ,"Local parameter THEMU after T-scaling and clipping")
-`OPP(lp_stthemu ,"" ,"Local parameter STTHEMU after clipping")
-`OPP(lp_cs ,"" ,"Local parameter CS after T-scaling and clipping")
-`OPP(lp_stcs ,"" ,"Local parameter STCS after clipping")
-`OPP(lp_thecs ,"" ,"Local parameter THECS after T-scaling and clipping")
-`OPP(lp_stthecs ,"" ,"Local parameter STTHECS after clipping")
-`OPP(lp_xcor ,"V^-1" ,"Local parameter XCOR after T-scaling and clipping")
-`OPP(lp_stxcor ,"" ,"Local parameter STXCOR after clipping")
-`OPP(lp_feta ,"" ,"Local parameter FETA after clipping")
-`OPP(lp_rs ,"Ohm" ,"Local parameter RS after T-scaling and clipping")
-`OPP(lp_strs ,"" ,"Local parameter STRS after clipping")
-`OPP(lp_rsb ,"V^-1" ,"Local parameter RSB after clipping")
-`OPP(lp_rsg ,"V^-1" ,"Local parameter RSG after clipping")
-`OPP(lp_thesat ,"V^-1" ,"Local parameter THESAT after T-scaling and clipping")
-`OPP(lp_thesatac ,"V^-1" ,"Local parameter THESATAC after T-scaling and clipping")
-`OPP(lp_stthesat ,"" ,"Local parameter STTHESAT after clipping")
-`OPP(lp_thesatb ,"V^-1" ,"Local parameter THESATB after clipping")
-`OPP(lp_thesatg ,"V^-1" ,"Local parameter THESATG after clipping")
-`OPP(lp_ax ,"" ,"Local parameter AX after clipping")
-`OPP(lp_axac ,"" ,"Local parameter AXAC after clipping")
-`OPP(lp_alp ,"" ,"Local parameter ALP after clipping")
-`OPP(lp_alpac ,"" ,"Local parameter ALPAC after clipping")
-`OPP(lp_alp1 ,"V" ,"Local parameter ALP1 after clipping")
-`OPP(lp_alp2 ,"V^-1" ,"Local parameter ALP2 after clipping")
-`OPP(lp_vp ,"V" ,"Local parameter VP after clipping")
-`OPP(lp_a1 ,"" ,"Local parameter A1 after clipping")
-`OPP(lp_a2 ,"V" ,"Local parameter A2 after T-scaling and clipping")
-`OPP(lp_sta2 ,"" ,"Local parameter STA2 after clipping")
-`OPP(lp_a3 ,"" ,"Local parameter A3 after clipping")
-`OPP(lp_a4 ,"1/sqrt(V)" ,"Local parameter A4 after clipping")
-`OPP(lp_gco ,"" ,"Local parameter GCO after clipping")
-`OPP(lp_iginv ,"A" ,"Local parameter IGINV after T-scaling and clipping")
-`OPP(lp_igov ,"A" ,"Local parameter IGOV after T-scaling and clipping")
-`OPP(lp_igovd ,"A" ,"Local parameter IGOVD after T-scaling and clipping")
-`OPP(lp_stig ,"" ,"Local parameter STIG after clipping")
-`OPP(lp_gc2 ,"" ,"Local parameter GC2 after clipping")
-`OPP(lp_gc3 ,"" ,"Local parameter GC3 after clipping")
-`OPP(lp_gc2ov ,"" ,"Local parameter GC2OV after clipping")
-`OPP(lp_gc3ov ,"" ,"Local parameter GC3OV after clipping")
-`OPP(lp_chib ,"V" ,"Local parameter CHIB after clipping")
-`OPP(lp_agidl ,"A/V^3" ,"Local parameter AGIDL after clipping")
-`OPP(lp_agidld ,"A/V^3" ,"Local parameter AGIDLD after clipping")
-`OPP(lp_bgidl ,"V" ,"Local parameter BGIDL after T-scaling and clipping")
-`OPP(lp_bgidld ,"V" ,"Local parameter BGIDLD after T-scaling and clipping")
-`OPP(lp_stbgidl ,"V/K" ,"Local parameter STBGIDL after clipping")
-`OPP(lp_stbgidld ,"V/K" ,"Local parameter STBGIDLD after clipping")
-`OPP(lp_cgidl ,"" ,"Local parameter CGIDL after clipping")
-`OPP(lp_cgidld ,"" ,"Local parameter CGIDLD after clipping")
-`OPP(lp_cox ,"F" ,"Local parameter COX after clipping")
-`OPP(lp_cgov ,"F" ,"Local parameter CGOV after clipping")
-`OPP(lp_cgovd ,"F" ,"Local parameter CGOVD after clipping")
-`OPP(lp_cgbov ,"F" ,"Local parameter CGBOV after clipping")
-`OPP(lp_cfr ,"F" ,"Local parameter CFR after clipping")
-`OPP(lp_cfrd ,"F" ,"Local parameter CFRD after clipping")
-`OPP(lp_fnt ,"" ,"Local parameter FNT after clipping")
-`OPP(lp_fntexc ,"" ,"Local parameter FNTEXC after clipping")
-`OPP(lp_nfa ,"1/(V m^4)" ,"Local parameter NFA after clipping")
-`OPP(lp_nfb ,"1/(V m^4)" ,"Local parameter NFB after clipping")
-`OPP(lp_nfc ,"V^-1" ,"Local parameter NFC after clipping")
-`OPP(lp_ef ,"" ,"Local parameter EF after clipping")
-`OPP(lp_vfbedge ,"V" ,"Local parameter VFBEDGE after T-scaling and clipping")
-`OPP(lp_stvfbedge ,"V/K" ,"Local parameter STVFBEDGE after clipping")
-`OPP(lp_dphibedge ,"V" ,"Local parameter DPHIBEDGE after clipping")
-`OPP(lp_neffedge ,"m^-3" ,"Local parameter NEFFEDGE after clipping")
-`OPP(lp_ctedge ,"" ,"Local parameter CTEDGE after clipping")
-`OPP(lp_betnedge ,"m^2/V/s" ,"Local parameter BETNEDGE after T-scaling and clipping")
-`OPP(lp_stbetedge ,"" ,"Local parameter STBETEDGE after clipping")
-`OPP(lp_psceedge ,"" ,"Local parameter PSCEEDGE after clipping")
-`OPP(lp_pscebedge ,"V^-1" ,"Local parameter PSCEBEDGE after clipping")
-`OPP(lp_pscededge ,"V^-1" ,"Local parameter PSCEDEDGE after clipping")
-`OPP(lp_cfedge ,"V" ,"Local parameter CFEDGE after clipping")
-`OPP(lp_cfdedge ,"V^-1" ,"Local parameter CFDEDGE after clipping")
-`OPP(lp_cfbedge ,"V^-1" ,"Local parameter CFBEDGE after clipping")
-`OPP(lp_fntedge ,"" ,"Local parameter FNTEDGE after clipping")
-`OPP(lp_nfaedge ,"1/(V m^4)" ,"Local parameter NFAEDGE after clipping")
-`OPP(lp_nfbedge ,"1/(V m^4)" ,"Local parameter NFBEDGE after clipping")
-`OPP(lp_nfcedge ,"V^-1" ,"Local parameter NFCEDGE after clipping")
-`OPP(lp_efedge ,"" ,"Local parameter EFEDGE after clipping")
-`OPP(lp_rg ,"Ohm" ,"Local parameter RG after clipping")
-`OPP(lp_rse ,"Ohm" ,"Local parameter RSE after clipping")
-`OPP(lp_rde ,"Ohm" ,"Local parameter RDE after clipping")
-`OPP(lp_rbulk ,"Ohm" ,"Local parameter RBULK after clipping")
-`OPP(lp_rwell ,"Ohm" ,"Local parameter RWELL after clipping")
-`OPP(lp_rjuns ,"Ohm" ,"Local parameter RJUNS after clipping")
-`OPP(lp_rjund ,"Ohm" ,"Local parameter RJUND after clipping")
-`ifdef SelfHeating
- `OPP(lp_rth ,"K/W" ,"Local parameter RTH after T-scaling and clipping")
- `OPP(lp_cth ,"J/K" ,"Local parameter CTH after clipping")
- `OPP(lp_strth ,"" ,"Local parameter STRTH after clipping")
- `OPP(pdiss ,"W" ,"Power dissipation")
- `OPP(dtsh ,"K" ,"Temperature rise due to self heating")
-`endif // SelfHeating
-`OPP(tk ,"K" ,"Device Temperature")
-`OPP(cjosbot ,"F" ,"Bottom component of total zero-bias source junction capacitance at device temperature")
-`OPP(cjossti ,"F" ,"STI-edge component of total zero-bias source junction capacitance at device temperature")
-`OPP(cjosgat ,"F" ,"Gate-edge component of total zero-bias source junction capacitance at device temperature")
-`OPP(vbisbot ,"V" ,"Built-in voltage of source-side bottom junction at device temperature")
-`OPP(vbissti ,"V" ,"Built-in voltage of source-side STI-edge junction at device temperature")
-`OPP(vbisgat ,"V" ,"Built-in voltage of source-side gate-edge junction at device temperature")
-`OPP(idsatsbot ,"A" ,"Total source-side bottom junction saturation current")
-`OPP(idsatssti ,"A" ,"Total source-side STI-edge junction saturation current")
-`OPP(idsatsgat ,"A" ,"Total source-side gate-edge junction saturation current")
-`OPP(cjosbotd ,"F" ,"Bottom component of total zero-bias drain junction capacitance at device temperature")
-`OPP(cjosstid ,"F" ,"STI-edge component of total zero-bias drain junction capacitance at device temperature")
-`OPP(cjosgatd ,"F" ,"Gate-edge component of total zero-bias drain junction capacitance at device temperature")
-`OPP(vbisbotd ,"V" ,"Built-in voltage of drain-side bottom junction at device temperature")
-`OPP(vbisstid ,"V" ,"Built-in voltage of drain-side STI-edge junction at device temperature")
-`OPP(vbisgatd ,"V" ,"Built-in voltage of drain-side gate-edge junction at device temperature")
-`OPP(idsatsbotd ,"A" ,"Total drain-side bottom junction saturation current")
-`OPP(idsatsstid ,"A" ,"Total drain-side STI-edge junction saturation current")
-`OPP(idsatsgatd ,"A" ,"Total drain-side gate-edge junction saturation current")
-`ifdef NQSmodel
- `OPP(lp_munqs ,"" ,"Local parameter MUNQS after clipping")
-`endif // NQSmodel
-
-// --------------------------------------------------------------------------------------------------------------
-// Analog block with all calculations and contribs
-// --------------------------------------------------------------------------------------------------------------
-analog begin
-
- // --------------------------------------------------------------------------------------------------------------
- // Definition of bias/instance independent model variables
- // --------------------------------------------------------------------------------------------------------------
- `INITIAL_MODEL
- begin : initial_model
-
- // Clipping and rounding of switch parameters
- if (`PGIVEN(nmos)) begin
- CHNL_TYPE = `NMOS;
- end else if (`PGIVEN(pmos)) begin
- CHNL_TYPE = `PMOS;
- end else begin
- CHNL_TYPE = (`PGIVEN(TYPE)) ? TYPE : `NMOS;
- end
- //$strobe("CHNL_TYPE %d", CHNL_TYPE);
- EPSSI = `EPSO * `EPSRSI;
- SWGEO_i = floor(`CLIP_BOTH(SWGEO, 0.0, 2.0) + 0.5);
- SWIGATE_i = floor(`CLIP_BOTH(SWIGATE, 0.0, 2.0) + 0.5);
- SWIMPACT_i = floor(`CLIP_BOTH(SWIMPACT, 0.0, 1.0) + 0.5);
- SWGIDL_i = floor(`CLIP_BOTH(SWGIDL, 0.0, 1.0) + 0.5);
- SWJUNCAP_i = floor(`CLIP_BOTH(SWJUNCAP, 0.0, 3.0) + 0.5);
- SWJUNASYM_i = floor(`CLIP_BOTH(SWJUNASYM, 0.0, 1.0) + 0.5);
- SWNUD_i = floor(`CLIP_BOTH(SWNUD, 0.0, 2.0) + 0.5);
- SWEDGE_i = floor(`CLIP_BOTH(SWEDGE, 0.0, 1.0) + 0.5);
- SWDELVTAC_i = floor(`CLIP_BOTH(SWDELVTAC, 0.0, 1.0) + 0.5);
- SWQSAT_i = floor(`CLIP_BOTH(SWQSAT, 0.0, 1.0) + 0.5);
- SWQPART_i = floor(`CLIP_BOTH(SWQPART, 0.0, 1.0) + 0.5);
- SWIGN_i = floor(`CLIP_BOTH(SWIGN, 0.0, 1.0) + 0.5);
- QMC_i = `CLIP_LOW(QMC, 0.0);
- `ifdef NQSmodel
- if (SWNQS < 0.5) begin
- SWNQS_i = 0;
- end else begin
- if (SWNQS < 1.5) begin
- SWNQS_i = 1;
- end else begin
- if (SWNQS < 2.5) begin
- SWNQS_i = 2;
- end else begin
- if (SWNQS < 4.0) begin
- SWNQS_i = 3;
- end else begin
- if (SWNQS < 7.0) begin
- SWNQS_i = 5;
- end else begin
- SWNQS_i = 9;
- end
- end
- end
- end
- end
- inorm = 1.0e-12;
- r_nqs = 1.0e3;
- vnorm = 10.0;
- vnorm_inv = 1.0 / vnorm;
- `endif // NQSmodel
-
- // Clipping of global model parameters
- TOXO_i = `CLIP_LOW(TOXO, 1.0e-10);
- EPSROXO_i = `CLIP_LOW(EPSROXO, 1.0);
- NSUBO_i = `CLIP_LOW(NSUBO, 1.0e20);
- WSEG_i = `CLIP_LOW(WSEG, 1.0e-10);
- NPCK_i = `CLIP_LOW(NPCK, 0.0);
- WSEGP_i = `CLIP_LOW(WSEGP, 1.0e-10);
- LPCK_i = `CLIP_LOW(LPCK, 1.0e-10);
- TOXOVO_i = `CLIP_LOW(TOXOVO, 1.0e-10);
- TOXOVDO_i = `CLIP_LOW(TOXOVDO, 1.0e-10);
- LOV_i = `CLIP_LOW(LOV, 0.0);
- LOVD_i = `CLIP_LOW(LOVD, 0.0);
- LP1_i = `CLIP_LOW(LP1, 1.0e-10);
- LP2_i = `CLIP_LOW(LP2, 1.0e-10);
- WBET_i = `CLIP_LOW(WBET, 1.0e-10);
- AXL_i = `CLIP_LOW(AXL, 0.0);
- ALP1L2_i = `CLIP_LOW(ALP1L2, 0.0);
- ALP2L2_i = `CLIP_LOW(ALP2L2, 0.0);
- SAREF_i = `CLIP_LOW(SAREF, 1.0e-9);
- SBREF_i = `CLIP_LOW(SBREF, 1.0e-9);
- KVSAT_i = `CLIP_BOTH(KVSAT, -1.0, 1.0);
- LLODKUO_i = `CLIP_LOW(LLODKUO, 0.0);
- WLODKUO_i = `CLIP_LOW(WLODKUO, 0.0);
- LLODVTH_i = `CLIP_LOW(LLODVTH, 0.0);
- WLODVTH_i = `CLIP_LOW(WLODVTH, 0.0);
- LODETAO_i = `CLIP_LOW(LODETAO, 0.0);
- SCREF_i = `CLIP_LOW(SCREF, 0.0);
- WEB_i = WEB;
- WEC_i = WEC;
- RSHG_i = `CLIP_LOW(RSHG, 0.0);
- RSH_i = `CLIP_LOW(RSH, 0.0);
- RSHD_i = `CLIP_LOW(RSHD, 0.0);
- RINT_i = `CLIP_LOW(RINT, 0.0);
- RVPOLY_i = `CLIP_LOW(RVPOLY, 0.0);
- NSUBEDGEO_i = `CLIP_LOW(NSUBEDGEO, 1.0e20);
- LPEDGE_i = `CLIP_LOW(LPEDGE, 1.0e-10);
-
- // Definition of global-binning parameters for the charge model in the case of separate calculation in saturation
- `DefACparam(CFACL_i, CFL, CFACL)
- `DefACparam(CFACLEXP_i, CFLEXP, CFACLEXP)
- `DefACparam(CFACW_i, CFW, CFACW)
- `DefACparam(THESATACO_i, THESATO, THESATACO)
- `DefACparam(THESATACL_i, THESATL, THESATACL)
- `DefACparam(THESATACLEXP_i, THESATLEXP, THESATACLEXP)
- `DefACparam(THESATACW_i, THESATW, THESATACW)
- `DefACparam(THESATACLW_i, THESATLW, THESATACLW)
- `DefACparam(AXACO_i, AXO, AXACO)
- `DefACparam(AXACL_i, AXL_i, AXACL)
- AXACL_i = `CLIP_LOW(AXACL_i, 0.0);
- `DefACparam(ALPACL_i, ALPL, ALPACL)
- `DefACparam(ALPACLEXP_i, ALPLEXP, ALPACLEXP)
- `DefACparam(ALPACW_i, ALPW, ALPACW)
- `DefACparam(POCFAC_i, POCF, POCFAC)
- `DefACparam(PLCFAC_i, PLCF, PLCFAC)
- `DefACparam(PWCFAC_i, PWCF, PWCFAC)
- `DefACparam(PLWCFAC_i, PLWCF, PLWCFAC)
- `DefACparam(POTHESATAC_i, POTHESAT, POTHESATAC)
- `DefACparam(PLTHESATAC_i, PLTHESAT, PLTHESATAC)
- `DefACparam(PWTHESATAC_i, PWTHESAT, PWTHESATAC)
- `DefACparam(PLWTHESATAC_i, PLWTHESAT, PLWTHESATAC)
- `DefACparam(POAXAC_i, POAX, POAXAC)
- `DefACparam(PLAXAC_i, PLAX, PLAXAC)
- `DefACparam(PWAXAC_i, PWAX, PWAXAC)
- `DefACparam(PLWAXAC_i, PLWAX, PLWAXAC)
- `DefACparam(POALPAC_i, POALP, POALPAC)
- `DefACparam(PLALPAC_i, PLALP, PLALPAC)
- `DefACparam(PWALPAC_i, PWALP, PWALPAC)
- `DefACparam(PLWALPAC_i, PLWALP, PLWALPAC)
- `DefACparam(KVSATAC_i, KVSAT, KVSATAC)
- KVSATAC_i = `CLIP_BOTH(KVSATAC_i, -1.0, 1.0);
-
- // Transistor temperature
- TR_i = `CLIP_LOW(TR, -273.0);
- TKR = `KELVINCONVERSION + TR_i;
- TKA = $temperature + DTA;
- rTa = TKA / TKR;
- delTa = TKA - TKR;
- phita = TKA * `KBOL / `QELE;
- inv_phita = 1.0 / phita;
- `ifdef SelfHeating
- // do nothing
- `else // SelfHeating
- TKD = TKA;
- `TempInitialize
- `endif // SelfHeating
-
- // JUNCAP2
- `include "JUNCAP200_InitModel.include"
-
- end // initial_model
-
- // --------------------------------------------------------------------------------------------------------------
- // Definition of instance dependent and bias independent variables
- // --------------------------------------------------------------------------------------------------------------
- `INITIAL_INSTANCE
- begin : initial_instance
-
- //ngspice-adms: JUNCAP2 Instance parameter handling
- IFACTOR_i = `CLIP_LOW( IFACTOR ,`IFACTOR_cliplow);
- CFACTOR_i = `CLIP_LOW( CFACTOR ,`CFACTOR_cliplow);
-
- // Declaration of local variables
-// real Invsa, Invsb, Invsaref, Invsbref, Kstressu0, rhobeta, rhobetaref, Kstressvth0;
-// real temp0, temp00, templ, tempw, Lx, Wx, loop, tmpa, tmpb;
-
- // Instance variables
- NF_i = 1.0;
- invNF = 1.0;
- LE = 0.0;
- WE = 0.0;
- L_i = L;
- W_i = W;
- SA_i = SA;
- SB_i = SB;
- SD_i = SD;
- SC_i = SC;
- XGW_i = XGW;
- ABSOURCE_i = ABSOURCE;
- LSSOURCE_i = LSSOURCE;
- LGSOURCE_i = LGSOURCE;
- ABDRAIN_i = ABDRAIN;
- LSDRAIN_i = LSDRAIN;
- LGDRAIN_i = LGDRAIN;
- AS_i = AS;
- PS_i = PS;
- AD_i = AD;
- PD_i = PD;
- JW_i = JW;
-
- // Clipping of the instance parameters
- if ((SWGEO_i == 1) || (SWGEO_i == 2)) begin
- NF_i = `CLIP_LOW(NF, 1.0);
- NF_i = floor(NF_i + 0.5); // round to nearest integer
- invNF = 1.0 / NF_i;
- end
- L_i = `CLIP_LOW(L_i, 1.0e-9);
- W_i = `CLIP_LOW(W_i * invNF, 1.0e-9);
- SCA_i = `CLIP_LOW(SCA, 0.0);
- SCB_i = `CLIP_LOW(SCB, 0.0);
- SCC_i = `CLIP_LOW(SCC, 0.0);
- NGCON_i = (NGCON < 1.5) ? 1.0 : 2.0;
-
- // Internal local parameters
- `include "PSP103_scaling.include"
-
- // Local process parameters
- EPSOX = `EPSO * EPSROX_i;
- CoxPrime = EPSOX / TOX_i;
- tox_sq = TOX_i * TOX_i;
- Cox_over_q = CoxPrime / `QELE;
- NEFFAC_i = FACNEFFAC_i * NEFF_i;
- NEFFAC_i = `CLIP_BOTH(NEFFAC_i, 1.0e20, 1.0e26);
-
- // QM corrections: initially calculated in PSP103_macrodefs.include (PSP103.3)
- qq = 0.0;
- if (QMC_i > 0.0) begin
- qq = 0.4 * `QMN * QMC_i * pow(CoxPrime, `twoThirds);
- if (CHNL_TYPE==`PMOS) begin
- qq = `QMP / `QMN * qq;
- end
- end
-
- // Electrical field parameters
- E_eff0 = 1.0e-8 * CoxPrime / EPSSI;
- eta_mu = 0.5 * FETA_i;
- eta_mu1 = 0.5;
- if (CHNL_TYPE == `PMOS) begin
- eta_mu = `oneThird * FETA_i;
- eta_mu1 = `oneThird;
- end
-
- // Linear-saturation transition parameter
- inv_AX = 1.0 / AX_i;
-
- // CLM parameter
- inv_VP = 1.0 / VP_i;
-
- // Gate overlap
- CoxovPrime = EPSOX / TOXOV_i;
- CoxovPrime_d = EPSOX / TOXOVD_i;
- GOV_s = sqrt(2.0 * `QELE * NOV_i * EPSSI * inv_phita) / CoxovPrime;
- GOV_d = sqrt(2.0 * `QELE * NOVD_i * EPSSI * inv_phita) / CoxovPrime_d;
- GOV2_s = GOV_s * GOV_s;
- GOV2_d = GOV_d * GOV_d;
- `sp_ovInit(GOV_s, GOV2_s, SP_OV_eps2_s, SP_OV_a_s, SP_OV_delta1_s)
- `sp_ovInit(GOV_d, GOV2_d, SP_OV_eps2_d, SP_OV_a_d, SP_OV_delta1_d)
-
- // Temperature scaling variables
- `ifdef SelfHeating
- // do nothing
- `else // SelfHeating
- // Initialize variables of edge transistor
- `TempScaling
- `endif // SelfHeating
-
- // Gate to channel leakage parameters
- inv_CHIB = 1.0 / CHIB_i;
- B_fact = 4.0 * `oneThird * sqrt(2.0 * `QELE * `MELE * CHIB_i) / `HBAR;
- BCH = B_fact * TOX_i;
- BOV = B_fact * TOXOV_i;
- BOV_d = B_fact * TOXOVD_i;
- GCQ = 0.0;
- if (GC3_i < 0) begin
- GCQ = -0.495 * GC2_i / GC3_i;
- end
- GCQOV = GCQ;
- if (SWIGATE_i == 2) begin
- GCQOV = 0.0;
- if (GC3OV_i < 0.0) begin
- GCQOV = -0.495 * GC2OV_i / GC3OV_i;
- end
- end
- tf_ig = pow(rTa, STIG_i);
- IGINV_i = IGINV_i * tf_ig;
- IGOV_i = IGOV_i * tf_ig;
- IGOVD_i = IGOVD_i * tf_ig;
-
- // GIDL parameters
- AGIDLs = AGIDL_i * 4.0e-18 / (TOXOV_i * TOXOV_i);
- AGIDLDs = AGIDLD_i * 4.0e-18 / (TOXOVD_i * TOXOVD_i);
- B_fact = `MAX(1.0 + STBGIDL_i * delTa, 0.0);
- BGIDL_T = BGIDL_i * B_fact;
- BGIDLs = BGIDL_T * TOXOV_i * 5.0e8;
- B_fact = `MAX(1.0 + STBGIDLD_i * delTa, 0.0);
- BGIDLD_T = BGIDLD_i * B_fact;
- BGIDLDs = BGIDLD_T * TOXOVD_i * 5.0e8;
-
- // Self Heating parameters
- `ifdef SelfHeating
- RTH_T = RTH_i * pow(rTa, STRTH_i);
- `endif // SelfHeating
-
- // Noise model parameters
- fac_exc = `MELE * 1.0e9 * FNTEXC_i;
-
- //ngspice-adms: Parasitic resistances - no node collapse
- RG_i = `CLIP_LOW(RG, 1.0e-3);
- RSE_i = `CLIP_LOW(RSE, 1.0e-3);
- RDE_i = `CLIP_LOW(RDE, 1.0e-3);
- RBULK_i = `CLIP_LOW(RBULK, 1.0e-3);
- RJUNS_i = `CLIP_LOW(RJUNS, 1.0e-3);
- RJUND_i = `CLIP_LOW(RJUND, 1.0e-3);
- RWELL_i = `CLIP_LOW(RWELL, 1.0e-3);
-
- // Conductance of parasitic resistance
- if (RG_i > 0.0) begin
- ggate = 1.0 / RG_i;
- end else begin
- ggate = 0.0;
- end
- if (RSE_i > 0.0) begin
- gsource = 1.0 / RSE_i;
- end else begin
- gsource = 0.0;
- end
- if (RDE_i > 0.0) begin
- gdrain = 1.0 / RDE_i;
- end else begin
- gdrain = 0.0;
- end
- if (RBULK_i > 0.0) begin
- gbulk = 1.0 / RBULK_i;
- end else begin
- gbulk = 0.0;
- end
- if (RJUNS_i > 0.0) begin
- gjuns = 1.0 / RJUNS_i;
- end else begin
- gjuns = 0.0;
- end
- if (RJUND_i > 0.0) begin
- gjund = 1.0 / RJUND_i;
- end else begin
- gjund = 0.0;
- end
- if (RWELL_i > 0.0) begin
- gwell = 1.0 / RWELL_i;
- end else begin
- gwell = 0.0;
- end
-
- // JUNCAP instance parameters
- ABS_i = 0.0;
- LSS_i = 0.0;
- LGS_i = 0.0;
- ABD_i = 0.0;
- LSD_i = 0.0;
- LGD_i = 0.0;
- jwcorr = 0.0;
- jww = WE;
- if (SWGEO_i == 0) begin
- jww = `CLIP_LOW(JW_i, `LG_cliplow);
- end
- if (SWJUNCAP_i == 3) begin
- jwcorr = 1.0;
- end
- ABS_i = ABSOURCE_i * invNF;
- LSS_i = LSSOURCE_i * invNF;
- LGS_i = LGSOURCE_i * invNF;
- ABD_i = ABDRAIN_i * invNF;
- LSD_i = LSDRAIN_i * invNF;
- LGD_i = LGDRAIN_i * invNF;
- if ((SWJUNCAP_i == 2) || (SWJUNCAP_i == 3)) begin
- ABS_i = AS_i * invNF;
- LSS_i = PS_i * invNF - jwcorr * jww;
- LGS_i = jww;
- ABD_i = AD_i * invNF;
- LSD_i = PD_i * invNF - jwcorr * jww;
- LGD_i = jww;
- end
- if ((SWJUNCAP_i == 1) || (SWJUNCAP_i == 2) || (SWJUNCAP_i == 3)) begin
- ABSOURCE_i = `CLIP_LOW(ABS_i, `AB_cliplow);
- LSSOURCE_i = `CLIP_LOW(LSS_i, `LS_cliplow);
- LGSOURCE_i = `CLIP_LOW(LGS_i, `LG_cliplow);
- ABDRAIN_i = `CLIP_LOW(ABD_i, `AB_cliplow);
- LSDRAIN_i = `CLIP_LOW(LSD_i, `LS_cliplow);
- LGDRAIN_i = `CLIP_LOW(LGD_i, `LG_cliplow);
- end else begin
- ABSOURCE_i = 0.0;
- LSSOURCE_i = 0.0;
- LGSOURCE_i = 0.0;
- ABDRAIN_i = 0.0;
- LSDRAIN_i = 0.0;
- LGDRAIN_i = 0.0;
- end
-
- // Initialization of JUNCAP (global) variables; required for some verilog-A compilers
- vbimin_s = 0.0;
- vbimin_d = 0.0;
- vfmin_s = 0.0;
- vfmin_d = 0.0;
- vch_s = 0.0;
- vch_d = 0.0;
- vbbtlim_s = 0.0;
- vbbtlim_d = 0.0;
- VMAX_s = 0.0;
- VMAX_d = 0.0;
- exp_VMAX_over_phitd_s = 0.0;
- exp_VMAX_over_phitd_d = 0.0;
- ISATFOR1_s = 0.0;
- ISATFOR1_d = 0.0;
- MFOR1_s = 1.0;
- MFOR1_d = 1.0;
- ISATFOR2_s = 0.0;
- ISATFOR2_d = 0.0;
- MFOR2_s = 1.0;
- MFOR2_d = 1.0;
- ISATREV_s = 0.0;
- ISATREV_d = 0.0;
- MREV_s = 1.0;
- MREV_d = 1.0;
- m0flag_s = 0.0;
- m0flag_d = 0.0;
- xhighf1_s = 0.0;
- xhighf1_d = 0.0;
- expxhf1_s = 0.0;
- expxhf1_d = 0.0;
- xhighf2_s = 0.0;
- xhighf2_d = 0.0;
- expxhf2_s = 0.0;
- expxhf2_d = 0.0;
- xhighr_s = 0.0;
- xhighr_d = 0.0;
- expxhr_s = 0.0;
- expxhr_d = 0.0;
- zflagbot_s = 1.0;
- zflagbot_d = 1.0;
- zflagsti_s = 1.0;
- zflagsti_d = 1.0;
- zflaggat_s = 1.0;
- zflaggat_d = 1.0;
- m0_rev = 0.0;
- mcor_rev = 0.0;
- I1_cor = 0.0;
- I2_cor = 0.0;
- I3_cor = 0.0;
- I4_cor = 0.0;
- I5_cor = 0.0;
- tt0 = 0.0;
- tt1 = 0.0;
- tt2 = 0.0;
- zfrac = 0.0;
- alphaje = 0.0;
-
- if (SWJUNCAP_i > 0) begin
- `JuncapInitInstance(ABSOURCE_i, LSSOURCE_i, LGSOURCE_i, idsatbot, idsatsti, idsatgat, vbibot, vbisti, vbigat, PBOT_i, PSTI_i, PGAT_i, VBIRBOT_i, VBIRSTI_i, VBIRGAT_i, VMAX_s, exp_VMAX_over_phitd_s, vbimin_s, vch_s, vfmin_s, vbbtlim_s)
- `JuncapInitInstance(ABDRAIN_i, LSDRAIN_i, LGDRAIN_i, idsatbot_d, idsatsti_d, idsatgat_d, vbibot_d, vbisti_d, vbigat_d, PBOTD_i, PSTID_i, PGATD_i, VBIRBOTD_i, VBIRSTID_i, VBIRGATD_i, VMAX_d, exp_VMAX_over_phitd_d, vbimin_d, vch_d, vfmin_d, vbbtlim_d)
-
- if (SWJUNEXP_i == 1) begin : JUNCAPexpressInit
- // Local variable declaration
-// `LocalGlobalVars
-
- // results computed here are not used elsewhere
-// real ijunbot, ijunsti, ijungat, qjunbot, qjunsti, qjungat;
-
- // Initialization of (local) variables; required for some verilog-A compilers
- ysq = 0.0;
- terfc = 0.0;
- erfcpos = 0.0;
- h1 = 0.0;
- h2 = 0.0;
- h2d = 0.0;
- h3 = 0.0;
- h4 = 0.0;
- h5 = 0.0;
- idmult = 0.0;
- vj = 0.0;
- z = 0.0;
- zinv = 0.0;
- two_psistar = 0.0;
- vjlim = 0.0;
- vjsrh = 0.0;
- vbbt = 0.0;
- vav = 0.0;
- tmp = 0.0;
- id = 0.0;
- isrh = 0.0;
- vbi_minus_vjsrh = 0.0;
- wsrhstep = 0.0;
- dwsrh = 0.0;
- wsrh = 0.0;
- wdep = 0.0;
- asrh = 0.0;
- itat = 0.0;
- btat = 0.0;
- twoatatoverthreebtat = 0.0;
- umaxbeforelimiting = 0.0;
- umax = 0.0;
- sqrtumax = 0.0;
- umaxpoweronepointfive = 0.0;
- wgamma = 0.0;
- wtat = 0.0;
- ktat = 0.0;
- ltat = 0.0;
- mtat = 0.0;
- xerfc = 0.0;
- erfctimesexpmtat = 0.0;
- gammamax = 0.0;
- ibbt = 0.0;
- Fmaxr = 0.0;
- fbreakdown = 0.0;
- qjunbot = 0.0;
- qjunsti = 0.0;
- qjungat = 0.0;
-
- // Computation of JUNCAP-express internal parameters
- `JuncapExpressInit1(ABSOURCE_i, LSSOURCE_i, LGSOURCE_i, VJUNREF_i, qprefbot, qpref2bot, vbiinvbot, one_minus_PBOT, idsatbot, CSRHBOT_i, CTATBOT_i, vbibot, wdepnulrbot, VBIRBOTinv, PBOT_i, ftdbot, btatpartbot, atatbot, one_over_one_minus_PBOT, CBBTBOT_i, VBIRBOT_i, wdepnulrinvbot, fbbtbot, VBRBOT_i, VBRinvbot, PBRBOT_i, fstopbot, slopebot, qprefsti, qpref2sti, vbiinvsti, one_minus_PSTI, idsatsti, CSRHSTI_i, CTATSTI_i, vbisti, wdepnulrsti, VBIRSTIinv, PSTI_i, ftdsti, btatpartsti, atatsti, one_over_one_minus_PSTI, CBBTSTI_i, VBIRSTI_i, wdepnulrinvsti, fbbtsti, VBRSTI_i, VBRinvsti, PBRSTI_i, fstopsti, slopesti, qprefgat, qpref2gat, vbiinvgat, one_minus_PGAT, idsatgat, CSRHGAT_i, CTATGAT_i, vbigat, wdepnulrgat, VBIRGATinv, PGAT_i, ftdgat, btatpartgat, atatgat, one_over_one_minus_PGAT, CBBTGAT_i, VBIRGAT_i, wdepnulrinvgat, fbbtgat, VBRGAT_i, VBRinvgat, PBRGAT_i, fstopgat, slopegat, VMAX_s, exp_VMAX_over_phitd_s, vbimin_s, vch_s, vfmin_s, vbbtlim_s)
- `JuncapExpressInit2(ABSOURCE_i, LSSOURCE_i, LGSOURCE_i, qprefbot, qpref2bot, vbiinvbot, one_minus_PBOT, idsatbot, CSRHBOT_i, CTATBOT_i, vbibot, wdepnulrbot, VBIRBOTinv, PBOT_i, ftdbot, btatpartbot, atatbot, one_over_one_minus_PBOT, CBBTBOT_i, VBIRBOT_i, wdepnulrinvbot, fbbtbot, VBRBOT_i, VBRinvbot, PBRBOT_i, fstopbot, slopebot, qprefsti, qpref2sti, vbiinvsti, one_minus_PSTI, idsatsti, CSRHSTI_i, CTATSTI_i, vbisti, wdepnulrsti, VBIRSTIinv, PSTI_i, ftdsti, btatpartsti, atatsti, one_over_one_minus_PSTI, CBBTSTI_i, VBIRSTI_i, wdepnulrinvsti, fbbtsti, VBRSTI_i, VBRinvsti, PBRSTI_i, fstopsti, slopesti, qprefgat, qpref2gat, vbiinvgat, one_minus_PGAT, idsatgat, CSRHGAT_i, CTATGAT_i, vbigat, wdepnulrgat, VBIRGATinv, PGAT_i, ftdgat, btatpartgat, atatgat, one_over_one_minus_PGAT, CBBTGAT_i, VBIRGAT_i, wdepnulrinvgat, fbbtgat, VBRGAT_i, VBRinvgat, PBRGAT_i, fstopgat, slopegat, VMAX_s, exp_VMAX_over_phitd_s, vbimin_s, vch_s, vfmin_s, vbbtlim_s)
- `JuncapExpressInit3(ABSOURCE_i, LSSOURCE_i, LGSOURCE_i, idsatbot, idsatsti, idsatgat, ISATFOR1_s, MFOR1_s, ISATFOR2_s, MFOR2_s, ISATREV_s, MREV_s, m0flag_s)
- `JuncapExpressInit4(ABSOURCE_i, LSSOURCE_i, LGSOURCE_i, FJUNQ_i, cjobot, cjosti, cjogat, zflagbot_s, zflagsti_s, zflaggat_s)
- `JuncapExpressInit5(ABSOURCE_i, LSSOURCE_i, LGSOURCE_i, ISATFOR1_s, ISATFOR2_s, ISATREV_s, xhighf1_s, expxhf1_s, xhighf2_s, expxhf2_s, xhighr_s, expxhr_s)
-
- `JuncapExpressInit1(ABDRAIN_i, LSDRAIN_i, LGDRAIN_i, VJUNREFD_i, qprefbot_d, qpref2bot_d, vbiinvbot_d, one_minus_PBOT_d, idsatbot_d, CSRHBOTD_i, CTATBOTD_i, vbibot_d, wdepnulrbot_d, VBIRBOTinv_d, PBOTD_i, ftdbot_d, btatpartbot_d, atatbot_d, one_over_one_minus_PBOT_d, CBBTBOTD_i, VBIRBOTD_i, wdepnulrinvbot_d, fbbtbot_d, VBRBOTD_i, VBRinvbot_d, PBRBOTD_i, fstopbot_d, slopebot_d, qprefsti_d, qpref2sti_d, vbiinvsti_d, one_minus_PSTI_d, idsatsti_d, CSRHSTID_i, CTATSTID_i, vbisti_d, wdepnulrsti_d, VBIRSTIinv_d, PSTID_i, ftdsti_d, btatpartsti_d, atatsti_d, one_over_one_minus_PSTI_d, CBBTSTID_i, VBIRSTID_i, wdepnulrinvsti_d, fbbtsti_d, VBRSTID_i, VBRinvsti_d, PBRSTID_i, fstopsti_d, slopesti_d, qprefgat_d, qpref2gat_d, vbiinvgat_d, one_minus_PGAT_d, idsatgat_d, CSRHGATD_i, CTATGATD_i, vbigat_d, wdepnulrgat_d, VBIRGATinv_d, PGATD_i, ftdgat_d, btatpartgat_d, atatgat_d, one_over_one_minus_PGAT_d, CBBTGATD_i, VBIRGATD_i, wdepnulrinvgat_d, fbbtgat_d, VBRGATD_i, VBRinvgat_d, PBRGATD_i, fstopgat_d, slopegat_d, VMAX_d, exp_VMAX_over_phitd_d, vbimin_d, vch_d, vfmin_d, vbbtlim_d)
- `JuncapExpressInit2(ABDRAIN_i, LSDRAIN_i, LGDRAIN_i, qprefbot_d, qpref2bot_d, vbiinvbot_d, one_minus_PBOT_d, idsatbot_d, CSRHBOTD_i, CTATBOTD_i, vbibot_d, wdepnulrbot_d, VBIRBOTinv_d, PBOTD_i, ftdbot_d, btatpartbot_d, atatbot_d, one_over_one_minus_PBOT_d, CBBTBOTD_i, VBIRBOTD_i, wdepnulrinvbot_d, fbbtbot_d, VBRBOTD_i, VBRinvbot_d, PBRBOTD_i, fstopbot_d, slopebot_d, qprefsti_d, qpref2sti_d, vbiinvsti_d, one_minus_PSTI_d, idsatsti_d, CSRHSTID_i, CTATSTID_i, vbisti_d, wdepnulrsti_d, VBIRSTIinv_d, PSTID_i, ftdsti_d, btatpartsti_d, atatsti_d, one_over_one_minus_PSTI_d, CBBTSTID_i, VBIRSTID_i, wdepnulrinvsti_d, fbbtsti_d, VBRSTID_i, VBRinvsti_d, PBRSTID_i, fstopsti_d, slopesti_d, qprefgat_d, qpref2gat_d, vbiinvgat_d, one_minus_PGAT_d, idsatgat_d, CSRHGATD_i, CTATGATD_i, vbigat_d, wdepnulrgat_d, VBIRGATinv_d, PGATD_i, ftdgat_d, btatpartgat_d, atatgat_d, one_over_one_minus_PGAT_d, CBBTGATD_i, VBIRGATD_i, wdepnulrinvgat_d, fbbtgat_d, VBRGATD_i, VBRinvgat_d, PBRGATD_i, fstopgat_d, slopegat_d, VMAX_d, exp_VMAX_over_phitd_d, vbimin_d, vch_d, vfmin_d, vbbtlim_d)
- `JuncapExpressInit3(ABDRAIN_i, LSDRAIN_i, LGDRAIN_i, idsatbot_d, idsatsti_d, idsatgat_d, ISATFOR1_d, MFOR1_d, ISATFOR2_d, MFOR2_d, ISATREV_d, MREV_d, m0flag_d)
- `JuncapExpressInit4(ABDRAIN_i, LSDRAIN_i, LGDRAIN_i, FJUNQD_i, cjobot_d, cjosti_d, cjogat_d, zflagbot_d, zflagsti_d, zflaggat_d)
- `JuncapExpressInit5(ABDRAIN_i, LSDRAIN_i, LGDRAIN_i, ISATFOR1_d, ISATFOR2_d, ISATREV_d, xhighf1_d, expxhf1_d, xhighf2_d, expxhf2_d, xhighr_d, expxhr_d)
- end // JUNCAPexpressInit
-
- end
-
- end // initial_instance
-
- begin : evaluateblock
-
-// real sigVds, dphit1, xgct, xsct0, xbct, xsbstar, xsct, dCTG, ct_fact, phit1, inv_phit1, xg_dc, alpha_dc, dps_dc, qim_dc;
-// real qim1_dc, H_dc, FdL_dc, Gvsatinv_dc, Ids, Iimpact, mavl, Igdov, Igsov, Igcd, Igcs, eta_p_ac, Gvsat_ac, Gmob_dL_ac, H0;
-// real COX_qm, ijun_s, ijunbot_s, ijunsti_s, ijungat_s, ijun_d, ijunbot_d, ijunsti_d, ijungat_d, qjun_s, qjunbot_s, qjunsti_s;
-// real qjungat_s, qjun_d, qjunbot_d, qjunsti_d, qjungat_d, jnoise_s, jnoise_d, Gmob_dc, xitsb_dc, Vdse_dc, Vsbstaredge, Vsbxedge;
-// real dphit1edge, phit1edge, inv_phit1edge, Vdspedge, delVgedge, xgedge, xbedge, dxthedge, xnedge_s, qseffedge, xnedge_d;
-// real qdseffedge, qdeffedge, qmeffedge, dsqredge, alphabmedge, Idsedge, Sfledge, midedge, sqidedge;
-// `ifdef SelfHeating
-// real Pdiss, phit, BET_i, BETEDGE_i, nt0, nt, THESAT_T, THESATAC_T, Sfl_prefac, phit0edge, Gfedge2, lnGfedge2, Sfl_prefac_edge;
-// real ntedge;
-// `endif // SelfHeating
-// real temp, temp1, temp2;
-
- // --------------------------------------------------------------------------------------------------------------
- // DC bias dependent quantities (calculations for current contribs)
- // --------------------------------------------------------------------------------------------------------------
- begin : evaluateStatic
-
- // Initialize temporary variables
- temp = 0.0;
- temp1 = 0.0;
- temp2 = 0.0;
-
- // Initialization of variables for SHE effect
- `ifdef SelfHeating
- TKD = TKA + Temp(br_rth);
- `TempInitialize
- `TempScaling
- `endif // SelfHeating
- QCLM = 0.0;
- xs_ov = 0.0;
- xd_ov = 0.0;
- Vovs = 0.0;
- Vovd = 0.0;
- Iimpact = 0.0;
- mavl = 0.0;
-
- // Initialization of variables for NQS model
- `ifdef NQSmodel
- pd = 1.0;
- ym = 0.0;
- `endif // NQSmodel
-
- // Voltage affectations
- if (CHNL_TYPE == `NMOS) begin
- Vgs = V(GP, SI);
- Vds = V(DI, SI);
- Vsb = V(SI, BP);
- Vjun_s = -V(SI, BS);
- Vjun_d = -V(DI, BD);
- end else begin
- Vgs = -V(GP, SI);
- Vds = -V(DI, SI);
- Vsb = -V(SI, BP);
- Vjun_s = V(SI, BS);
- Vjun_d = V(DI, BD);
- end
- Vgb = Vgs + Vsb;
-
- // Voltages NOT subject to S/D-interchange
- VgsPrime = Vgs;
- VsbPrime = Vsb;
- VdbPrime = Vds + Vsb;
- VgdPrime = Vgs - Vds;
- xgs_ov = -VgsPrime * inv_phita;
- xgd_ov = -VgdPrime * inv_phita;
-
- // Source-drain interchange
- sigVds = 1.0;
- if (Vds < 0.0) begin
- sigVds = -1.0;
- Vgs = Vgs - Vds;
- Vsb = Vsb + Vds;
- Vds = -Vds;
- end
- Vdb = Vds + Vsb;
- Vdsx = Vds * Vds / (sqrt(Vds * Vds + 0.01) + 0.1);
-
- // Core's model calculation for DC
- begin : SPcalc_dc
-
- // Local variable declaration
-// `SPcalcLocalVarDecl
-// real FdL, qim1_1, r1, r2, s2, dL1;
-
- // Conditioning of terminal voltages
- temp = `MINA(Vdb, Vsb, bphi_dc) + phix_dc;
- Vsbstar_dc = Vsb - `MINA(temp, 0, aphi_dc) + phix1_dc;
- Vsbstar_dc_tmp = Vsbstar_dc;
-
- // Adapt Vsb for NUD-effect
- if ((SWNUD_i != 0) && (GFACNUD_i != 1.0)) begin
- Vmb = Vsbstar_dc + 0.5 * (Vds - Vdsx);
- us = sqrt(Vmb + phib_dc) - sqrt_phib_dc;
- temp = 2.0 * (us - us1) / us21 - 1.0;
- usnew = us - 0.25 * (1.0 - GFACNUD_i) * us21 * (temp + sqrt(temp * temp + 0.4804530139182));
- Vmbnew = usnew * usnew + (2.0 * sqrt_phib_dc) * usnew;
- Vsbstar_dc = Vmbnew - 0.5 * (Vds - Vdsx);
- end
-
- // Set variables needed in PSP_core macro
- phib = phib_dc;
- G_0 = G_0_dc;
- Vsbstar = Vsbstar_dc;
- cfloc = CF_i;
- thesatloc = THESAT_T;
- axloc = AX_i;
- alploc = ALP_i;
- FdL = 1.0;
-
- // Calculation of PSP model's core
- `SPCalculation
-
- if (xg > 0.0) begin
- qim1_1 = 1.0 / qim1;
- r1 = qim * qim1_1;
- r2 = phit1 * (alpha * qim1_1);
- s2 = ln(1.0 + Vdsx * inv_VP);
- dL1 = dL + ALP1_i * (qim1_1 * r1 * s1) + ALP2_i * (qbm * r2 * r2 * s2);
- FdL = (1.0 + dL1 + dL1 * dL1) * GdL;
- end
-
- xg_dc = xg;
- qeff1_dc = qeff1;
- Voxm_dc = Voxm;
- alpha_dc = alpha;
- dps_dc = dps;
- qim_dc = qim;
- qim1_dc = qim1;
- GdL_dc = GdL;
- FdL_dc = FdL;
- H_dc = H;
- eta_p_dc = eta_p;
- Gvsat_dc = Gvsat;
- Gvsatinv_dc = Gvsatinv;
- Gmob_dL_dc = Gmob_dL;
- x_ds_dc = x_ds;
- x_m_dc = x_m;
- Gf_dc = Gf;
- Vdsat_dc = Vdsat;
- Udse_dc = Udse;
- Gmob_dc = Gmob;
- xitsb_dc = xitsb;
- Vdse_dc = Vdse;
- `ifdef NQSmodel
- xgm_dc = xgm;
- thesat1_dc = thesat1;
- margin_dc = margin;
- `endif // NQSmodel
- end // SPcalc_dc
-
- if (xg_dc <= 0) begin
- Ids = 0.0;
- end else begin
- // Drain-source current
- Ids = BET_i * (FdL_dc * qim1_dc * dps_dc * Gvsatinv_dc);
- end
-
- // Surface potential in gate overlap regions
- if (((SWIGATE_i != 0) && ((IGOV_i > 0.0) || (IGOVD_i > 0.0))) || ((SWGIDL_i != 0) && ((AGIDL_i > 0.0) || (AGIDLD_i > 0.0))) || (CGOV_i > 0.0) || (CGOVD_i > 0.0)) begin
- SP_OV_xg = 0.5 * (xgs_ov + sqrt(xgs_ov * xgs_ov + SP_OV_eps2_s));
- xs_ov = -SP_OV_xg - GOV2_s * 0.5 + GOV_s * sqrt(SP_OV_xg + GOV2_s * 0.25 + SP_OV_a_s) + SP_OV_delta1_s;
- SP_OV_xg = 0.5 * (xgd_ov + sqrt(xgd_ov * xgd_ov + SP_OV_eps2_d));
- xd_ov = -SP_OV_xg - GOV2_d * 0.5 + GOV_d * sqrt(SP_OV_xg + GOV2_d * 0.25 + SP_OV_a_d) + SP_OV_delta1_d;
- Vovs = -phita * (xgs_ov + xs_ov);
- Vovd = -phita * (xgd_ov + xd_ov);
- end
-
- // Gate current
- Igsov = 0.0;
- Igdov = 0.0;
- Igc = 0.0;
- Igb = 0.0;
- Igcs = 0.0;
- Igcd = 0.0;
- if (SWIGATE_i != 0) begin
- if (IGOV_i > 0.0) begin
- // Gate-source overlap component of gate current
- zg = sqrt(Vovs * Vovs + 1.0e-6) * inv_CHIB;
- if (GC3OV_i < 0.0) begin
- zg = `MINA(zg, GCQOV, 1.0e-6);
- end
- temp = BOV * (-1.5 + zg * (GC2OV_i + GC3OV_i * zg));
- if (temp > 0.0) begin
- TP = `P3(temp);
- end else begin
- `expl_low(temp, TP)
- end
- Fs1 = 3.0 + xs_ov;
- Fs2 = -3.0 - GCO_i;
- Fs3 = 30.0 * VgsPrime;
- `MNE(Fs1, Fs3, 0.9, temp)
- `MXE(Fs2, temp, 0.3, Fs)
- Igsov = IGOV_i * (TP * Fs);
- end
-
- if (IGOVD_i > 0.0) begin
- // Gate-drain overlap component of gate current
- zg = sqrt(Vovd * Vovd + 1.0e-6) * inv_CHIB;
- if (GC3OV_i < 0.0) begin
- zg = `MINA(zg, GCQOV, 1.0e-6);
- end
- temp = BOV_d * (-1.5 + zg * (GC2OV_i + GC3OV_i * zg));
- if (temp > 0.0) begin
- TP = `P3(temp);
- end else begin
- `expl_low(temp, TP)
- end
- Fs1 = 3.0 + xd_ov;
- Fs2 = -3.0 - GCO_i;
- Fs3 = 30.0 * VgdPrime;
- `MNE(Fs1, Fs3, 0.9, temp)
- `MXE(Fs2, temp, 0.3, Fs)
- Igdov = IGOVD_i * (TP * Fs);
- end
-
- // Gate-channel component of gate current
- if (IGINV_i > 0.0) begin
- if (xg_dc <= 0.0) begin
- temp = pow(Vds / Vdsat_lim, AX_i);
- Udse_dc = Vds * pow(1.0 + temp, -inv_AX) * inv_phit1;
- end
- `expl_low(x_ds_dc-Udse_dc, temp)
- Vm = Vsbstar_dc + phit1 * (0.5 * x_ds_dc - ln(0.5 * (1.0 + temp)));
- Dch = GCO_i * phit1;
- arg2mina = Voxm_dc + Dch;
- psi_t = `MINA(0.0, arg2mina, 0.01);
- zg = sqrt(Voxm_dc * Voxm_dc + 1.0e-6) * inv_CHIB;
- if (GC3_i < 0.0) begin
- zg = `MINA(zg, GCQ, 1.0e-06);
- end
- arg1 = (x_m_dc + (psi_t - alpha_b - Vm) * inv_phit1);
- `expl(arg1,Dsi)
- arg1 = -(Vgs + Vsbstar_dc - Vm) * inv_phit1;
- `expl(arg1,temp)
- Dgate = Dsi * temp;
- temp = BCH * (-1.5 + zg * (GC2_i + GC3_i * zg));
- if (temp > 0) begin
- TP = `P3(temp);
- end else begin
- `expl_low(temp, TP)
- end
- Igc0 = IGINV_i * (TP * ln((1.0 + Dsi) / (1.0 + Dgate)));
-
- // Source/drain partitioning of gate-channel current
- if ((xg_dc <= 0.0) || ((GC2_i == 0.0) && (GC3_i == 0.0))) begin
- igc = 1.0;
- igcd_h = 0.5;
- end else begin
- temp = GC2_i + 2.0 * GC3_i * zg;
- u0 = CHIB_i / (temp * BCH);
- x = 0.5 * (dps_dc / u0);
- u0_div_H = u0 / H_dc;
- Bg = u0_div_H * (1.0 - u0_div_H) * 0.5;
- Ag = 0.5 - 3.0 * Bg;
- if (x < 1.0e-3) begin
- xsq = x * x;
- igc = 1.0 + xsq * (`oneSixth + u0_div_H * `oneThird + `oneSixth * (xsq * (0.05 + 0.2 * u0_div_H)));
- igcd_h = 0.5 * igc - `oneSixth * (x * (1.0 + xsq * (0.4 * (Bg + 0.25) + 0.0285714285714 * (xsq * (0.125 + Bg)))));
- end else begin
- inv_x = 1.0 / x;
- `expl(x, ex)
- inv_ex = 1.0 / ex;
- temp = ex - inv_ex;
- temp2 = ex + inv_ex;
- igc = 0.5 * ((1.0 - u0_div_H) * temp * inv_x + u0_div_H * temp2);
- igcd_h = 0.5 * (igc - temp * (Bg - Ag * inv_x * inv_x) - Ag * temp2 * inv_x);
- end
- end
- Sg = 0.5 * (1.0 + xg_dc / sqrt(xg_dc * xg_dc + 1.0e-6));
- Igc = Igc0 * igc * Sg;
- Igcd = Igc0 * igcd_h * Sg;
- Igcs = Igc - Igcd;
- Igb = Igc0 * igc * (1.0 - Sg);
- end // (IGINV >0)
- end // (SWIGATE != 0)
-
- // GIDL/GISL current
- Igidl = 0.0;
- Igisl = 0.0;
- if (SWGIDL_i != 0) begin
- // GIDL current computation
- if ((AGIDLD_i > 0) && (Vovd < 0)) begin
- Vtovd = sqrt(Vovd * Vovd + CGIDLD_i * CGIDLD_i * (VdbPrime * VdbPrime) + 1.0e-6);
- temp = -BGIDLDs / Vtovd;
- `expl_low(temp, temp2)
- Igidl = -AGIDLDs * (VdbPrime * Vovd * Vtovd * temp2);
- end
-
- // GISL current computation
- if ((AGIDL_i > 0) && (Vovs < 0)) begin
- Vtovs = sqrt(Vovs * Vovs + CGIDL_i * CGIDL_i * (VsbPrime * VsbPrime) + 1.0e-6);
- temp = -BGIDLs / Vtovs;
- `expl_low(temp, temp2)
- Igisl = -AGIDLs * (VsbPrime * Vovs * Vtovs * temp2);
- end
- end // (SWGIDL != 0)
-
- // Drain current of edge transistors: PSP 103.4
- xgedge = 0.0;
- qdseffedge = 0.0;
- qmeffedge = 0.0;
- dsqredge = 1.0e-40;
- alphabmedge = 1.0;
- Idsedge = 0.0;
- if ((SWEDGE_i != 0.0) && (BETNEDGE_i > 0)) begin
- temp = `MINA(Vdb, Vsb, bphiedge) + phixedge;
- Vsbstaredge = Vsb - `MINA(temp, 0, aphiedge) + phix1edge;
- Vsbxedge = Vsbstaredge + 0.5 * (Vds - Vdsx);
- dphit1edge = PSCEEDGE_i * (1 + PSCEDEDGE_i * Vdsx)* (1.0 + PSCEBEDGE_i * Vsbxedge); // SCE on subthreshold slope
- phit1edge = phit0edge * (1.0 + dphit1edge);
- inv_phit1edge = 1.0 / phit1edge;
- Vdspedge = 2.0 * Vdsx / (1.0 + sqrt(1.0 + CFDEDGE_i * Vdsx));
- delVgedge = CFEDGE_i * Vdspedge * (1 + CFBEDGE_i * Vsbxedge); // DIBL effect
- xgedge = inv_phit1edge * (Vgs + Vsbstaredge + delVgedge - VFBEDGE_T);
- xbedge = inv_phit1edge * phibedge;
- dxthedge = 2.0 * ln(xbedge / Gfedge + sqrt(xbedge));
- xnedge_s = inv_phit1edge * Vsbstaredge;
- `qi_edge(qseffedge,xgedge,xnedge_s)
- xnedge_d = inv_phit1edge * (Vdse_dc + Vsbstaredge);
- if ((qseffedge < 1.0e-3) && (Vdse_dc < 1.0e-6)) begin
- `expl_low((-xnedge_d + xnedge_s), temp)
- qdseffedge = qseffedge * (temp - 1.0);
- qdeffedge = qdseffedge + qseffedge;
- end else begin
- `qi_edge(qdeffedge,xgedge,xnedge_d)
- qdseffedge = qdeffedge - qseffedge;
- end
- qmeffedge = 0.5 * (qdeffedge + qseffedge);
- dsqredge = max(xgedge - qmeffedge, 1.0e-40);
- alphabmedge = 1.0 - 0.5 * Gfedge / sqrt(dsqredge + 0.25 * Gfedge2);
- Idsedge = -BETEDGE_i * phit1edge * phit1edge * (alphabmedge * qmeffedge + 1.0) * qdseffedge / Gmob_dc;
- end
-
- // Impact-Ionization
- if ((xg_dc > 0) && (SWIMPACT_i != 0)) begin
- delVsat = Vds - A3_i * dps_dc;
- if (delVsat > 0) begin
- temp2 = A2_T * ((1.0 + A4_i * (sqrt(phib_dc + Vsbstar_dc) - sqrt_phib_dc)) / (delVsat + 1.0e-30));
- `expl(-temp2, temp)
- mavl = A1_i * (delVsat * temp);
- Iimpact = mavl * (Ids + Idsedge);
- end
- end
-
- // Threshold voltage calculation for .OP
- P_D = 1.0 + 0.25 * (Gf_dc * kp);
- facvsb0 = phib_dc + 2.0 * phit1;
- facvsb = Vsbstar_dc + facvsb0;
- vts_i = VFB_T + P_D * facvsb - Vsbstar_dc + Gf_dc * sqrt(phit1 * facvsb );
- vth_i = vts_i - delVg;
-
- end // evaluateStatic
-
- // --------------------------------------------------------------------------------------------------------------
- // AC bias dependent quantities (calculations for charge contribs)
- // --------------------------------------------------------------------------------------------------------------
- begin : evaluateDynamic
-
- // Core's model calculation for AC
- begin : SPcalc_ac
-
- // Local variable declaration
-// `SPcalcLocalVarDecl
-
- // SP calculations
- if ((SWNUD_i == 1) || (SWDELVTAC_i != 0) || (SWQSAT_i == 1)) begin
-
- Vsbstar = Vsbstar_dc_tmp;
- phib = phib_dc;
- G_0 = G_0_dc;
- cfloc = CF_i;
- thesatloc = THESAT_T;
- axloc = AX_i;
- alploc = ALP_i;
-
- if (SWDELVTAC_i != 0) begin
- // Conditioning of terminal voltages
- temp = `MINA(Vdb, Vsb, bphi_ac) + phix_ac;
- Vsbstar_ac = Vsb - `MINA(temp, 0.0, aphi_ac) + phix1_ac;
- Vsbstar = Vsbstar_ac;
- phib = phib_ac;
- G_0 = G_0_ac;
- end
-
- if (SWQSAT_i != 0) begin
- cfloc = CFAC_i;
- thesatloc = THESATAC_T;
- axloc = AXAC_i;
- alploc = ALPAC_i;
- end
-
- // Calculation of PSP model's core
- `SPCalculation
-
- xg_ac = xg;
- qeff1_ac = qeff1;
- Voxm_ac = Voxm;
- alpha_ac = alpha;
- dps_ac = dps;
- qim_ac = qim;
- GdL_ac = GdL;
- H_ac = H;
- eta_p_ac = eta_p;
- Gvsat_ac = Gvsat;
- Gmob_dL_ac = Gmob_dL;
- `ifdef NQSmodel
- Gf_ac = Gf;
- x_m_ac = x_m;
- xgm_ac = xgm;
- thesat1_ac = thesat1;
- margin_ac = margin;
- `endif // NQSmodel
- end else begin
- xg_ac = xg_dc;
- qeff1_ac = qeff1_dc;
- Voxm_ac = Voxm_dc;
- alpha_ac = alpha_dc;
- dps_ac = dps_dc;
- qim_ac = qim_dc;
- GdL_ac = GdL_dc;
- H_ac = H_dc;
- eta_p_ac = eta_p_dc;
- Gvsat_ac = Gvsat_dc;
- Gmob_dL_ac = Gmob_dL_dc;
- `ifdef NQSmodel
- Gf_ac = Gf_dc;
- x_m_ac = x_m_dc;
- xgm_ac = xgm_dc;
- thesat1_ac = thesat1_dc;
- margin_ac = margin_dc;
- `endif // NQSmodel
- end
- end // SPcalc_ac
-
- // Quantum mechanical corrections
- COX_qm = COX_i;
- if (qq > 0.0) begin
- COX_qm = COX_i / (1.0 + qq * pow(qeff1_ac * qeff1_ac + qlim2, -1.0 * `oneSixth));
- end
-
- // Intrinsic charge model
- if (xg_ac <= 0.0) begin
- QG = Voxm_ac;
- QI = 0.0;
- QD = 0.0;
- QB = QG;
- end else begin
- Fj = 0.5 * (dps_ac / H_ac);
- Fj2 = Fj * Fj;
- QG = Voxm_ac + 0.5 * (eta_p_ac * dps_ac * (Fj * GdL_ac * `oneThird - 1.0 + GdL_ac));
- temp = alpha_ac * dps_ac * `oneSixth;
- if (SWQPART_i == 1) begin
- QCLM = 0.0;
- QD = 0.5 * GdL_ac * GdL_ac * (qim_ac - 3.0 * temp * (2.0 - Fj));
- end else begin
- QCLM = (1.0 - GdL_ac) * (qim_ac - 0.5 * (alpha_ac * dps_ac));
- QD = 0.5 * (GdL_ac * GdL_ac * (qim_ac - temp * (1.0 - Fj - 0.2 * Fj2)) + QCLM * (1.0 + GdL_ac));
- end
- QI = GdL_ac * (qim_ac + temp * Fj) + QCLM;
- QB = QG - QI;
- end
- Qg = QG * COX_qm;
- Qd = -QD * COX_qm;
- Qb = -QB * COX_qm;
-
- // Extrinsic charge model
- Qgs_ov = CGOV_i * Vovs;
- Qgd_ov = CGOVD_i * Vovd;
- Qgb_ov = CGBOV_i * Vgb;
-
- // Outer fringe charge
- Qfgs = CFR_i * VgsPrime;
- Qfgd = CFRD_i * VgdPrime;
-
- // Variables for NQS model
- `ifdef NQSmodel
- Gp = 0.0;
- Gp2 = 0.0;
- a_factrp = 0.0;
- marginp = 0.0;
- if (SWNQS_i != 0) begin
- if (xg_ac <= 0.0) begin
- ym = 0.5;
- pd = 1.0;
- Gp = Gf_ac;
- end else begin
- ym = 0.5 * ( 1.0 + 0.25 * (dps_ac / H_ac));
- pd = xgm_ac / (xg_ac - x_m_ac);
- Gp = Gf_ac / pd;
- end
- Gp2 = Gp * Gp;
- a_factrp = 1.0 + Gp * `invSqrt2;
- marginp = 1.0e-5 * a_factrp;
- end
- `endif // NQSmodel
-
- end // evaluateDynamic
-
- // --------------------------------------------------------------------------------------------------------------
- // JUNCAP2 contribs
- // --------------------------------------------------------------------------------------------------------------
- begin : evaluateStaticDynamic
- ijun_s = 0.0;
- ijunbot_s = 0.0;
- ijunsti_s = 0.0;
- ijungat_s = 0.0;
- ijun_d = 0.0;
- ijunbot_d = 0.0;
- ijunsti_d = 0.0;
- ijungat_d = 0.0;
- qjun_s = 0.0;
- qjunbot_s = 0.0;
- qjunsti_s = 0.0;
- qjungat_s = 0.0;
- qjun_d = 0.0;
- qjunbot_d = 0.0;
- qjunsti_d = 0.0;
- qjungat_d = 0.0;
- if (SWJUNCAP_i > 0) begin
- if (SWJUNEXP_i == 1) begin
- `JuncapExpressCurrent(Vjun_s, MFOR1_s, ISATFOR1_s, MFOR2_s, ISATFOR2_s, MREV_s, ISATREV_s, m0flag_s, xhighf1_s, expxhf1_s, xhighf2_s, expxhf2_s, xhighr_s, expxhr_s, ijun_s)
- `JuncapExpressCurrent(Vjun_d, MFOR1_d, ISATFOR1_d, MFOR2_d, ISATFOR2_d, MREV_d, ISATREV_d, m0flag_d, xhighf1_d, expxhf1_d, xhighf2_d, expxhf2_d, xhighr_d, expxhr_d, ijun_d)
- begin : evaluateDynamic
-// real tmpv, vjv;
- `JuncapExpressCharge(Vjun_s, ABSOURCE_i, LSSOURCE_i, LGSOURCE_i, qprefbot, qprefsti, qprefgat, qpref2bot, qpref2sti, qpref2gat, vbiinvbot, vbiinvsti, vbiinvgat, one_minus_PBOT, one_minus_PSTI, one_minus_PGAT, vfmin_s, vch_s, zflagbot_s, zflagsti_s, zflaggat_s, qjunbot_s, qjunsti_s, qjungat_s)
- `JuncapExpressCharge(Vjun_d, ABDRAIN_i, LSDRAIN_i, LGDRAIN_i, qprefbot_d, qprefsti_d, qprefgat_d, qpref2bot_d, qpref2sti_d, qpref2gat_d, vbiinvbot_d, vbiinvsti_d, vbiinvgat_d, one_minus_PBOT_d, one_minus_PSTI_d, one_minus_PGAT_d, vfmin_d, vch_d, zflagbot_d, zflagsti_d, zflaggat_d, qjunbot_d, qjunsti_d, qjungat_d)
- end
- end else begin
- `juncapcommon(Vjun_s, ABSOURCE_i, LSSOURCE_i, LGSOURCE_i, qprefbot, qpref2bot, vbiinvbot, one_minus_PBOT, idsatbot, CSRHBOT_i, CTATBOT_i, vbibot, wdepnulrbot, VBIRBOTinv, PBOT_i, ftdbot, btatpartbot, atatbot, one_over_one_minus_PBOT, CBBTBOT_i, VBIRBOT_i, wdepnulrinvbot, fbbtbot, VBRBOT_i, VBRinvbot, PBRBOT_i, fstopbot, slopebot, qprefsti, qpref2sti, vbiinvsti, one_minus_PSTI, idsatsti, CSRHSTI_i, CTATSTI_i, vbisti, wdepnulrsti, VBIRSTIinv, PSTI_i, ftdsti, btatpartsti, atatsti, one_over_one_minus_PSTI, CBBTSTI_i, VBIRSTI_i, wdepnulrinvsti, fbbtsti, VBRSTI_i, VBRinvsti, PBRSTI_i, fstopsti, slopesti, qprefgat, qpref2gat, vbiinvgat, one_minus_PGAT, idsatgat, CSRHGAT_i, CTATGAT_i, vbigat, wdepnulrgat, VBIRGATinv, PGAT_i, ftdgat, btatpartgat, atatgat, one_over_one_minus_PGAT, CBBTGAT_i, VBIRGAT_i, wdepnulrinvgat, fbbtgat, VBRGAT_i, VBRinvgat, PBRGAT_i, fstopgat, slopegat, VMAX_s, exp_VMAX_over_phitd_s, vbimin_s, vch_s, vfmin_s, vbbtlim_s, ijunbot_s, qjunbot_s, ijunsti_s, qjunsti_s, ijungat_s, qjungat_s)
- ijun_s = ABSOURCE_i * ijunbot_s + LSSOURCE_i * ijunsti_s + LGSOURCE_i * ijungat_s;
- `juncapcommon(Vjun_d, ABDRAIN_i, LSDRAIN_i, LGDRAIN_i, qprefbot_d, qpref2bot_d, vbiinvbot_d, one_minus_PBOT_d, idsatbot_d, CSRHBOTD_i, CTATBOTD_i, vbibot_d, wdepnulrbot_d, VBIRBOTinv_d, PBOTD_i, ftdbot_d, btatpartbot_d, atatbot_d, one_over_one_minus_PBOT_d, CBBTBOTD_i, VBIRBOTD_i, wdepnulrinvbot_d, fbbtbot_d, VBRBOTD_i, VBRinvbot_d, PBRBOTD_i, fstopbot_d, slopebot_d, qprefsti_d, qpref2sti_d, vbiinvsti_d, one_minus_PSTI_d, idsatsti_d, CSRHSTID_i, CTATSTID_i, vbisti_d, wdepnulrsti_d, VBIRSTIinv_d, PSTID_i, ftdsti_d, btatpartsti_d, atatsti_d, one_over_one_minus_PSTI_d, CBBTSTID_i, VBIRSTID_i, wdepnulrinvsti_d, fbbtsti_d, VBRSTID_i, VBRinvsti_d, PBRSTID_i, fstopsti_d, slopesti_d, qprefgat_d, qpref2gat_d, vbiinvgat_d, one_minus_PGAT_d, idsatgat_d, CSRHGATD_i, CTATGATD_i, vbigat_d, wdepnulrgat_d, VBIRGATinv_d, PGATD_i, ftdgat_d, btatpartgat_d, atatgat_d, one_over_one_minus_PGAT_d, CBBTGATD_i, VBIRGATD_i, wdepnulrinvgat_d, fbbtgat_d, VBRGATD_i, VBRinvgat_d, PBRGATD_i, fstopgat_d, slopegat_d, VMAX_d, exp_VMAX_over_phitd_d, vbimin_d, vch_d, vfmin_d, vbbtlim_d, ijunbot_d, qjunbot_d, ijunsti_d, qjunsti_d, ijungat_d, qjungat_d)
- ijun_d = ABDRAIN_i * ijunbot_d + LSDRAIN_i * ijunsti_d + LGDRAIN_i * ijungat_d;
- end
- end
-
- // --------------------------------------------------------------------------------------------------------------
- // NQS and parasitic resistance contribs
- // --------------------------------------------------------------------------------------------------------------
-
- // Set initial conditions for NQS model
- `ifdef NQSmodel
- `include "PSP103_InitNQS.include"
- `endif // NQSmodel
-
- // Parasitic resistances (including noise)
- rgatenoise = nt0 * ggate;
- rsourcenoise = nt0 * gsource;
- rdrainnoise = nt0 * gdrain;
- rbulknoise = nt0 * gbulk;
- rjunsnoise = nt0 * gjuns;
- rjundnoise = nt0 * gjund;
- rwellnoise = nt0 * gwell;
-
- end // evaluateStaticDynamic
-
- // --------------------------------------------------------------------------------------------------------------
- // Current contribs
- // --------------------------------------------------------------------------------------------------------------
- begin : loadStatic
-
- // Convert back for NMOS-PMOS and Source-Drain interchange
- if (sigVds > 0.0) begin
- I(DI, BP) <+ CHNL_TYPE * MULT_i * Iimpact;
- I(DI, SI) <+ CHNL_TYPE * MULT_i * (Ids + Idsedge);
- I(GP, SI) <+ CHNL_TYPE * MULT_i * Igcs;
- I(GP, DI) <+ CHNL_TYPE * MULT_i * Igcd;
- end else begin
- I(SI, BP) <+ CHNL_TYPE * MULT_i * Iimpact;
- I(SI, DI) <+ CHNL_TYPE * MULT_i * (Ids + Idsedge);
- I(GP, DI) <+ CHNL_TYPE * MULT_i * Igcs;
- I(GP, SI) <+ CHNL_TYPE * MULT_i * Igcd;
- end
- I(GP, BP) <+ CHNL_TYPE * MULT_i * Igb;
- I(GP, SI) <+ CHNL_TYPE * MULT_i * Igsov;
- I(GP, DI) <+ CHNL_TYPE * MULT_i * Igdov;
- I(SI, BP) <+ CHNL_TYPE * MULT_i * Igisl;
- I(DI, BP) <+ CHNL_TYPE * MULT_i * Igidl;
- I(BS, SI) <+ CHNL_TYPE * MULT_i * ijun_s;
- I(BD, DI) <+ CHNL_TYPE * MULT_i * ijun_d;
-
- //ngspice-adms: Parasitic resistances - no node collapse
- `NonCollapsableR(ggate, RG_i, rgatenoise, G, GP, "rgate")
- `NonCollapsableR(gsource, RSE_i, rsourcenoise, S, SI, "rsource")
- `NonCollapsableR(gdrain, RDE_i, rdrainnoise, D, DI, "rdrain")
- `NonCollapsableR(gbulk, RBULK_i, rbulknoise, BP, BI, "rbulk")
- `NonCollapsableR(gjuns, RJUNS_i, rjunsnoise, BS, BI, "rjuns")
- `NonCollapsableR(gjund, RJUND_i, rjundnoise, BD, BI, "rjund")
- `NonCollapsableR(gwell, RWELL_i, rwellnoise, B, BI, "rwell")
-
- I(DI, SI) <+ `GMIN * V(DI, SI);
-
- end // loadStatic
-
- // --------------------------------------------------------------------------------------------------------------
- // ddt() contribs from charges (Note: MULT is handled explicitly)
- // --------------------------------------------------------------------------------------------------------------
- begin : loadStaticDynamic
-
- // Implementation of NQS charges
- `ifdef NQSmodel
- `include "PSP103_ChargesNQS.include"
- `endif // NQSmodel
-
- // Implementation of Self heating effect
- `ifdef SelfHeating
- begin : self_heating
-// real Pdiss_s, Pdiss_d;
- Pdiss = 0.0;
- Pdiss_s = 0.0;
- Pdiss_d = 0.0;
- if (RSE_i > 0.0) begin
- Pdiss_s = gsource * V(S, SI) * V(S, SI);
- end
- if (RDE_i > 0.0) begin
- Pdiss_d = gdrain * V(D, DI) * V(D, DI);
- end
- if (RTH_p > 1.0e-3) begin
- Pdiss = ((Ids + Idsedge) * Vds + Iimpact * (Vds + Vsb) + Pdiss_s + Pdiss_d);
- end
- Pwr(br_ith) <+ -MULT_i * Pdiss;
- Pwr(br_rth) <+ ddt(MULT_i * CTH_i * Temp(br_rth));
- Pwr(br_rth) <+ MULT_i * Temp(br_rth) / RTH_T;
- end // self_heating
- `endif // SelfHeating
-
- end // loadStaticDynamic
-
- begin : loadDynamic
-
- // Local variable
-// real temp;
-
- // Intrinsic MOSFET charges
- Qs = -(Qg + Qb + Qd);
-
- // Total outerFringe + overlap for gate-source and gate-drain.
- Qfgs = Qfgs + Qgs_ov;
- Qfgd = Qfgd + Qgd_ov;
-
- // JUNCAP2
- qjun_s = ABSOURCE_i * qjunbot_s + LSSOURCE_i * qjunsti_s + LGSOURCE_i * qjungat_s;
- qjun_d = ABDRAIN_i * qjunbot_d + LSDRAIN_i * qjunsti_d + LGDRAIN_i * qjungat_d;
-
- // Convert back (undo S-D interchange)
- if (sigVds < 0.0) begin
- temp = Qd; // Qd <--> Qs
- Qd = Qs;
- Qs = temp;
- end
-
- I(GP, SI) <+ ddt(CHNL_TYPE * MULT_i * Qg);
- I(BP, SI) <+ ddt(CHNL_TYPE * MULT_i * Qb);
- I(DI, SI) <+ ddt(CHNL_TYPE * MULT_i * Qd);
- I(GP, SI) <+ ddt(CHNL_TYPE * MULT_i * Qfgs);
- I(GP, DI) <+ ddt(CHNL_TYPE * MULT_i * Qfgd);
- I(GP, BP) <+ ddt(CHNL_TYPE * MULT_i * Qgb_ov);
- I(BS, SI) <+ ddt(CHNL_TYPE * MULT_i * qjun_s);
- I(BD, DI) <+ ddt(CHNL_TYPE * MULT_i * qjun_d);
-
- end // loadDynamic
-
- // --------------------------------------------------------------------------------------------------------------
- // Noise
- // --------------------------------------------------------------------------------------------------------------
- begin : noise
-
- // Noise variable calculation
- Sfl = 0.0;
- Sidexc = 0.0;
- mid = 0.0;
- mig = 1.0e-40;
- migid = 0.0;
- c_igid = 0.0;
- CGeff = COX_qm * eta_p_ac;
- sqid = 0.0;
- sqig = 0.0;
- Sfledge = 0.0;
- midedge = 0.0;
- sqidedge = 0.0;
-
- // Channel noise contributions
- if ((xg_dc > 0.0) && (MULT_i > 0.0) && (BET_i > 0.0)) begin
- // Flicker noise
- N1 = Cox_over_q * alpha_dc * phit;
- Nm1 = Cox_over_q * qim1_dc;
- Delta_N1 = Cox_over_q * alpha_dc * dps_dc;
- Sfl = (NFA_i - NFB_i * N1 + NFC_i * (N1 * N1)) * ln((Nm1 + 0.5 * Delta_N1) / (Nm1 - 0.5 * Delta_N1));
- Sfl = Sfl + (NFB_i + NFC_i * (Nm1 - 2.0 * N1)) * Delta_N1;
- Sfl = Sfl_prefac * Ids * Gvsatinv_dc * Sfl / N1;
- Sfl = `CLIP_LOW(Sfl, 0.0);
-
- // Thermal channel noise
- H0 = qim1_dc / alpha_dc;
- t1 = qim_dc / qim1_dc;
- sqt2 = 0.5 * `oneSixth * (dps_dc / H0);
- t2 = sqt2 * sqt2;
- r = H0 / H_dc - 1.0;
- lc = `CLIP_LOW(1.0 - 12.0 * (r * t2), 1.0e-20);
- lcinv2 = 1.0 / (lc * lc);
- g_ideal = BET_i * (FdL_dc * qim1_dc * Gvsatinv_dc);
- mid = t1 + 12.0 * t2 - 24.0 * ((1.0 + t1) * t2 * r);
- mid = `CLIP_LOW(mid, 1.0e-40);
- mid = g_ideal * lcinv2 * mid;
- if (FNTEXC_i > 0.0) begin
- // recalculate Gvsat, excluding Gmob-effect
- temp2_exc = qim_dc * xitsb_dc;
- wsat_exc = 100.0 * (temp2_exc / (100.0 + temp2_exc));
- if (THESATG_i < 0) begin
- temp_exc = 1.0 / (1.0 - THESATG_i * wsat_exc);
- end else begin
- temp_exc = 1.0 + THESATG_i * wsat_exc;
- end
- thesat1_exc = THESAT_T * (temp_exc / Gmob_dc);
- zsat_exc = thesat1_exc * thesat1_exc * dps_dc * dps_dc;
- if (CHNL_TYPE == `PMOS) begin
- zsat_exc = zsat_exc / (1.0 + thesat1_exc * dps_dc);
- end
- Gvsat_exc = 0.5 * (Gmob_dc * (1.0 + sqrt(1.0 + 2.0 * zsat_exc)));
- gfac = Gmob_dc / (Gvsat_exc * lc);
- Sidexc = fac_exc * Ids * Vdse_dc * gfac * gfac;
- mid = mid + Sidexc / nt0;
- end
- sqid = sqrt(nt * mid);
-
- // Induced gate noise
- if ((SWIGN_i == 1) && (nt > 0.0)) begin
- mig = t1 / 12.0 - t2 * (t1 + 0.2 - 12.0 * t2) - 1.6 * (t2 * (t1 + 1.0 - 12.0 * t2) * r);
- mig = `CLIP_LOW(mig, 1.0e-40);
- mig = lcinv2 / g_ideal * mig;
- migid0 = lcinv2 * sqt2 * (1.0 - 12.0 * t2 - (t1 + 19.2 * t2 - 12.0 * (t1 * t2)) * r);
- CGeff = Gvsat_ac * Gvsat_ac * COX_qm * eta_p_ac / (Gmob_dL_ac * Gmob_dL_ac);
- if (FNTEXC_i > 0.0) begin
- mig = mig + Sidexc * (1.0 + 12.0 * t2) / (12.0 * g_ideal * g_ideal * nt0);
- migid0 = migid0 - Sidexc * sqt2 * (1.0 + r) / (g_ideal * nt0);
- end
- sqig = sqrt(nt / mig);
- if (sqid == 0) begin
- c_igid = 0.0;
- end else begin
- c_igid = migid0 * sqig / sqid; // = migid0 / sqrt(mig * mid);
- end
- c_igid = `CLIP_BOTH(c_igid, 0.0, 1.0);
- migid = c_igid * sqid / sqig;
- end
- end
-
- // Noise of gate leakage currents
- shot_igcsx = 2.0 * `QELE * abs(Igcs);
- shot_igcdx = 2.0 * `QELE * abs(Igcd);
- shot_igsov = 2.0 * `QELE * abs(Igsov);
- shot_igdov = 2.0 * `QELE * abs(Igdov);
-
- // Noise of impact ionization currents
- shot_iavl = 2.0 * `QELE * ((mavl + 1) * abs(Iimpact));
-
- // Noise of junctions (JUNCAP2)
- jnoisex_s = 2.0 * `QELE * abs(ijun_s);
- jnoisex_d = 2.0 * `QELE * abs(ijun_d);
- if (sigVds > 0.0) begin
- shot_igs = shot_igcsx + shot_igsov;
- shot_igd = shot_igcdx + shot_igdov;
- jnoise_s = jnoisex_s;
- jnoise_d = jnoisex_d + shot_iavl;
- end else begin
- shot_igs = shot_igcdx + shot_igsov;
- shot_igd = shot_igcsx + shot_igdov;
- jnoise_s = jnoisex_s + shot_iavl;
- jnoise_d = jnoisex_d;
- end
-
- // Noise of edge transistors: PSP 103.4
- if ((SWEDGE_i != 0.0) && (BETNEDGE_i > 0) && (xgedge > 0)) begin
- // Flicker noise of edge transistor
- temp1 = 4.0 * dsqredge / Gfedge2;
- anoisedge = sqrt(temp1 + 1.0) / (sqrt(temp1 + 1.1) - 1.0);
- temp1 = Cox_over_q * phit;
- N1edge = temp1 * anoisedge;
- Nm1edge = temp1 * (qmeffedge + anoisedge);
- Delta_N1edge = -temp1 * anoisedge * alphabmedge * qdseffedge;
- Sfledge = (NFAEDGE_i - (NFBEDGE_i - NFCEDGE_i * N1edge) * N1edge) * ln((Nm1edge + 0.5 * Delta_N1edge) / (Nm1edge - 0.5 * Delta_N1edge));
- Sfledge = Sfledge + (NFBEDGE_i + NFCEDGE_i * (Nm1edge - 2.0 * N1edge)) * Delta_N1edge;
- Sfledge = Sfl_prefac_edge * Idsedge * Gvsatinv_dc * Sfledge / N1edge;
- Sfledge = `CLIP_LOW(Sfledge, 0.0);
-
- // Thermal channel noise of edge transistor
- H0edge = phit * (qmeffedge + anoisedge) / anoisedge;
- t1edge = phit1 / phit * qmeffedge / (qmeffedge + anoisedge);
- sqt2edge = -0.5 * `oneSixth * phit * alphabmedge * qdseffedge / H0edge;
- t2edge = sqt2edge * sqt2edge;
- redge = 0.0;
- temp1 = alpha_dc * H_dc;
- if (temp1 > 1.0e-10) begin
- redge = anoisedge * H0edge / temp1 - 1.0;
- end
- lcedge = `CLIP_LOW(1.0 - 12.0 * (redge * t2edge), 1.0e-20);
- lcinv2edge = 1.0 / (lcedge * lcedge);
- g_idealedge = BETEDGE_i * phit * (qmeffedge + anoisedge) * FdL_dc * Gvsatinv_dc;
- midedge = t1edge + 12.0 * t2edge - 24.0 * ((1.0 + t1edge) * t2edge * redge);
- midedge = `CLIP_LOW(midedge, 1.0e-40);
- midedge = g_idealedge * lcinv2edge * midedge;
- sqidedge = sqrt(ntedge * midedge);
- end
-
- // Noise contributions
- I(NOII) <+ white_noise((nt / mig), "igig");
- I(NOIR) <+ V(NOIR) / mig;
- I(NOIC) <+ ddt(CGeff * V(NOIC));
-//ngspice-adms: can't handle specific noise contributions
-// I(GP,SI) <+ -ddt(sqrt(MULT_i) * 0.5 * CGeff * V(NOIC));
-// I(GP,DI) <+ -ddt(sqrt(MULT_i) * 0.5 * CGeff * V(NOIC));
-// I(DI,SI) <+ sigVds * sqrt(MULT_i) * migid * I(NOII);
- I(DI,SI) <+ white_noise(MULT_i * sqid * sqid * (1.0 - c_igid * c_igid), "idid");
- I(DI,SI) <+ flicker_noise(MULT_i * Sfl, EF_i, "flicker");
- I(GP,SI) <+ white_noise(MULT_i * shot_igs, "igs");
- I(GP,DI) <+ white_noise(MULT_i * shot_igd, "igd");
- I(BS,SI) <+ white_noise(MULT_i * jnoise_s, "ibs");
- I(BD,DI) <+ white_noise(MULT_i * jnoise_d, "ibd");
- I(DI,SI) <+ flicker_noise(MULT_i * Sfledge, EFEDGE_i, "flicker");
- I(DI,SI) <+ white_noise(MULT_i * sqidedge * sqidedge, "ididedge");
-
- end // noise
-
- // --------------------------------------------------------------------------------------------------------------
- // Operating point info
- // --------------------------------------------------------------------------------------------------------------
- begin : OPinfo
-
- // Auxiliary variables
- id_op = Ids + Idsedge + Iimpact - Igcd;
- is = -Ids - Idsedge - Igcs;
- ig = Igcs + Igcd + Igsov + Igdov + Igb;
- ib = -Iimpact - Igb - Igidl - Igisl;
- sig1k = 2.0e3 * `PI * CGeff;
- sig1k = sig1k * sig1k * mig;
-
- // Actual operation point output variables
- sdint = sigVds;
- ctype = CHNL_TYPE;
- if (sigVds < 0.0) begin
- ise = MULT_i * (is - Igdov + Igidl - ijun_d);
- ige = MULT_i * ig;
- ide = MULT_i * (id_op - Igsov + Igisl - ijun_s);
- ibe = MULT_i * (ib + ijun_s + ijun_d);
- ids = MULT_i * Ids;
- idb = MULT_i * (Iimpact + Igisl - ijun_s);
- isb = MULT_i * (Igidl - ijun_d);
- igs = MULT_i * (Igcs + Igdov);
- igd = MULT_i * (Igcd + Igsov);
- igb = MULT_i * Igb;
- idedge = MULT_i * Idsedge;
- igcs = MULT_i * Igcs;
- igcd = MULT_i * Igcd;
- iavl = MULT_i * Iimpact;
- igisl = MULT_i * Igidl;
- igidl = MULT_i * Igisl;
- if (SWJUNEXP_i == 1) begin
- ijsbot = 0.0;
- ijsgat = 0.0;
- ijssti = 0.0;
- ijdbot = 0.0;
- ijdgat = 0.0;
- ijdsti = 0.0;
- idsatsbot = 0.0;
- idsatssti = 0.0;
- idsatsgat = 0.0;
- idsatsbotd = 0.0;
- idsatsstid = 0.0;
- idsatsgatd = 0.0;
- end else begin
- ijsbot = MULT_i * ABDRAIN_i * ijunbot_d;
- ijsgat = MULT_i * LGDRAIN_i * ijungat_d;
- ijssti = MULT_i * LSDRAIN_i * ijunsti_d;
- ijdbot = MULT_i * ABSOURCE_i * ijunbot_s;
- ijdgat = MULT_i * LGSOURCE_i * ijungat_s;
- ijdsti = MULT_i * LSSOURCE_i * ijunsti_s;
- idsatsbot = MULT_i * ABSOURCE_i * idsatbot;
- idsatssti = MULT_i * LSSOURCE_i * idsatsti;
- idsatsgat = MULT_i * LGSOURCE_i * idsatgat;
- idsatsbotd = MULT_i * ABDRAIN_i * idsatbot_d;
- idsatsstid = MULT_i * LSDRAIN_i * idsatsti_d;
- idsatsgatd = MULT_i * LGDRAIN_i * idsatgat_d;
- end
- ijs = MULT_i * ijun_d;
- ijd = MULT_i * ijun_s;
- vds = Vds;
- vgs = Vgs;
- vsb = Vsb;
- vto = VFB_T + P_D * facvsb0 + Gf_dc * sqrt(phit1 * facvsb0);
- vts = vts_i;
- vth = vth_i;
- vgt = vgs - vth;
- vdss = Vdsat_dc;
- vsat = Vds - vdss;
- ids_i = Ids + Idsedge + Iimpact + Igisl - Igcd - Igsov - ijun_s; // Total drain-current
- `ifdef OPderiv
- gm = CHNL_TYPE * MULT_i * ddx(ids_i, V(GP));
- gmb = CHNL_TYPE * MULT_i * ddx(ids_i, V(BP));
- gds = CHNL_TYPE * MULT_i * ddx(ids_i, V(SI));
- gjs = MULT_i * ddx(ijun_d, V(BD));
- gjd = MULT_i * ddx(ijun_s, V(BS));
- css = CHNL_TYPE * MULT_i * ddx(Qd, V(DI));
- csg = -CHNL_TYPE * MULT_i * ddx(Qd, V(GP));
- csb = -CHNL_TYPE * MULT_i * ddx(Qd, V(BP));
- csd = css - csg - csb;
- cgs = -CHNL_TYPE * MULT_i * ddx(Qg, V(DI));
- cgg = CHNL_TYPE * MULT_i * ddx(Qg, V(GP));
- cgb = -CHNL_TYPE * MULT_i * ddx(Qg, V(BP));
- cgd = cgg - cgs - cgb;
- cds = -CHNL_TYPE * MULT_i * ddx(Qs, V(DI));
- cdg = -CHNL_TYPE * MULT_i * ddx(Qs, V(GP));
- cdb = -CHNL_TYPE * MULT_i * ddx(Qs, V(BP));
- cdd = cdg + cds + cdb;
- cbs = -CHNL_TYPE * MULT_i * ddx(Qb, V(DI));
- cbg = -CHNL_TYPE * MULT_i * ddx(Qb, V(GP));
- cbb = CHNL_TYPE * MULT_i * ddx(Qb, V(BP));
- cbd = cbb - cbs - cbg;
- cgsol = CHNL_TYPE * MULT_i * ddx(Qfgd, V(GP));
- cgdol = CHNL_TYPE * MULT_i * ddx(Qfgs, V(GP));
- cjsbot = -MULT_i * CHNL_TYPE * ABDRAIN_i * ddx(qjunbot_d, V(DI));
- cjsgat = -MULT_i * CHNL_TYPE * LGDRAIN_i * ddx(qjungat_d, V(DI));
- cjssti = -MULT_i * CHNL_TYPE * LSDRAIN_i * ddx(qjunsti_d, V(DI));
- cjs = cjsbot + cjsgat + cjssti;
- cjdbot = -MULT_i * CHNL_TYPE * ABSOURCE_i * ddx(qjunbot_s, V(SI));
- cjdgat = -MULT_i * CHNL_TYPE * LGSOURCE_i * ddx(qjungat_s, V(SI));
- cjdsti = -MULT_i * CHNL_TYPE * LSSOURCE_i * ddx(qjunsti_s, V(SI));
- cjd = cjdbot + cjdgat + cjdsti;
- `endif // OPderiv
- end else begin
- ise = MULT_i * (is - Igsov + Igisl - ijun_s);
- ige = MULT_i * ig;
- ide = MULT_i * (id_op - Igdov + Igidl - ijun_d);
- ibe = MULT_i * (ib + ijun_s + ijun_d);
- ids = MULT_i * Ids;
- idb = MULT_i * (Iimpact + Igidl - ijun_d);
- isb = MULT_i * (Igisl - ijun_s);
- igs = MULT_i * (Igcs + Igsov);
- igd = MULT_i * (Igcd + Igdov);
- igb = MULT_i * Igb;
- idedge = MULT_i * Idsedge;
- igcs = MULT_i * Igcs;
- igcd = MULT_i * Igcd;
- iavl = MULT_i * Iimpact;
- igisl = MULT_i * Igisl;
- igidl = MULT_i * Igidl;
- if (SWJUNEXP_i == 1) begin
- ijsbot = 0.0;
- ijsgat = 0.0;
- ijssti = 0.0;
- ijdbot = 0.0;
- ijdgat = 0.0;
- ijdsti = 0.0;
- idsatsbot = 0.0;
- idsatssti = 0.0;
- idsatsgat = 0.0;
- idsatsbotd = 0.0;
- idsatsstid = 0.0;
- idsatsgatd = 0.0;
- end else begin
- ijsbot = MULT_i * ABSOURCE_i * ijunbot_s;
- ijsgat = MULT_i * LGSOURCE_i * ijungat_s;
- ijssti = MULT_i * LSSOURCE_i * ijunsti_s;
- ijdbot = MULT_i * ABDRAIN_i * ijunbot_d;
- ijdgat = MULT_i * LGDRAIN_i * ijungat_d;
- ijdsti = MULT_i * LSDRAIN_i * ijunsti_d;
- idsatsbot = MULT_i * ABSOURCE_i * idsatbot;
- idsatssti = MULT_i * LSSOURCE_i * idsatsti;
- idsatsgat = MULT_i * LGSOURCE_i * idsatgat;
- idsatsbotd = MULT_i * ABDRAIN_i * idsatbot_d;
- idsatsstid = MULT_i * LSDRAIN_i * idsatsti_d;
- idsatsgatd = MULT_i * LGDRAIN_i * idsatgat_d;
- end
- ijs = MULT_i * ijun_s;
- ijd = MULT_i * ijun_d;
- vds = Vds;
- vgs = Vgs;
- vsb = Vsb;
- vto = VFB_T + P_D * facvsb0 + Gf_dc * sqrt(phit1 * facvsb0);
- vts = vts_i;
- vth = vth_i;
- vgt = vgs - vth;
- vdss = Vdsat_dc;
- vsat = Vds - vdss;
- ids_i = Ids + Idsedge + Iimpact + Igidl - Igcd - Igdov - ijun_d; // Total drain-current
- `ifdef OPderiv
- gm = CHNL_TYPE * MULT_i * ddx(ids_i, V(GP));
- gmb = CHNL_TYPE * MULT_i * ddx(ids_i, V(BP));
- gds = CHNL_TYPE * MULT_i * ddx(ids_i, V(DI));
- gjs = -MULT_i * ddx(ijun_s, V(SI));
- gjd = -MULT_i * ddx(ijun_d, V(DI));
- cdd = CHNL_TYPE * MULT_i * ddx(Qd, V(DI));
- cdg = -CHNL_TYPE * MULT_i * ddx(Qd, V(GP));
- cdb = -CHNL_TYPE * MULT_i * ddx(Qd, V(BP));
- cds = cdd - cdg - cdb;
- cgd = -CHNL_TYPE * MULT_i * ddx(Qg, V(DI));
- cgg = CHNL_TYPE * MULT_i * ddx(Qg, V(GP));
- cgb = -CHNL_TYPE * MULT_i * ddx(Qg, V(BP));
- cgs = cgg - cgd - cgb;
- csd = -CHNL_TYPE * MULT_i * ddx(Qs, V(DI));
- csg = -CHNL_TYPE * MULT_i * ddx(Qs, V(GP));
- csb = -CHNL_TYPE * MULT_i * ddx(Qs, V(BP));
- css = csg + csd + csb;
- cbd = -CHNL_TYPE * MULT_i * ddx(Qb, V(DI));
- cbg = -CHNL_TYPE * MULT_i * ddx(Qb, V(GP));
- cbb = CHNL_TYPE * MULT_i * ddx(Qb, V(BP));
- cbs = cbb - cbd - cbg;
- cgsol = CHNL_TYPE * MULT_i * ddx(Qfgs, V(GP));
- cgdol = CHNL_TYPE * MULT_i * ddx(Qfgd, V(GP));
- cjsbot = -MULT_i * CHNL_TYPE * ABSOURCE_i * ddx(qjunbot_s, V(SI));
- cjsgat = -MULT_i * CHNL_TYPE * LGSOURCE_i * ddx(qjungat_s, V(SI));
- cjssti = -MULT_i * CHNL_TYPE * LSSOURCE_i * ddx(qjunsti_s, V(SI));
- cjs = cjsbot + cjsgat + cjssti;
- cjdbot = -MULT_i * CHNL_TYPE * ABDRAIN_i * ddx(qjunbot_d, V(DI));
- cjdgat = -MULT_i * CHNL_TYPE * LGDRAIN_i * ddx(qjungat_d, V(DI));
- cjdsti = -MULT_i * CHNL_TYPE * LSDRAIN_i * ddx(qjunsti_d, V(DI));
- cjd = cjdbot + cjdgat + cjdsti;
- `endif // OPderiv
- end
- weff = WE;
- leff = LE;
- `ifdef OPderiv
- if (abs(gds) < 1.0e-18) begin
- u = 0.0;
- rout = 0.0;
- vearly = 0.0;
- end else begin
- u = gm / gds;
- rout = 1.0 / gds;
- vearly = ide / gds;
- end
- if (abs(vgt) < 1.0e-12) begin
- beff = 0.0;
- end else begin
- beff = 2.0 * abs(ide) / (vgt * vgt);
- end
- if (abs(cgg + cgsol + cgdol) < 1.0e-30) begin
- fug = 0.0;
- end else begin
- fug = gm / (2.0 * `PI * (cgg + cgsol + cgdol));
- end
- rg_op = RG_i / MULT_i;
- sfl = MULT_i * Sfl;
- if (abs(gm) < 1.0e-18) begin
- sqrtsff = 0.0;
- sqrtsfw = 0.0;
- end else begin
- sqrtsff = sqrt(MULT_i * Sfl / 1000.0) / gm;
- sqrtsfw = sqrt(MULT_i) * sqid / gm;
- end
- sid = MULT_i * sqid * sqid;
- sig = MULT_i * nt * sig1k / (1.0 + sig1k * mig);
- cigid = c_igid;
- if (sid == 0.0) begin
- fknee = 0.0;
- end else begin
- fknee = sfl / sid;
- end
- siavl = MULT_i * shot_iavl;
- if (sigVds < 0.0) begin
- sigs = MULT_i * (shot_igcsx + shot_igdov);
- sigd = MULT_i * (shot_igcdx + shot_igsov);
- ssi = MULT_i * jnoisex_d;
- sdi = MULT_i * jnoisex_s;
- end else begin
- sigs = MULT_i * (shot_igcsx + shot_igsov);
- sigd = MULT_i * (shot_igcdx + shot_igdov);
- ssi = MULT_i * jnoisex_s;
- sdi = MULT_i * jnoisex_d;
- end
- sfledge = MULT_i * Sfledge;
- sidedge = MULT_i * sqidedge;
- `endif // OPderiv
-
- lp_vfb = VFB_T;
- lp_stvfb = STVFB_i;
- lp_st2vfb = ST2VFB_i;
- lp_tox = TOX_i;
- lp_epsrox = EPSROX_i;
- lp_neff = NEFF_i;
- lp_facneffac = FACNEFFAC_i;
- lp_gfacnud = GFACNUD_i;
- lp_vsbnud = VSBNUD_i;
- lp_dvsbnud = DVSBNUD_i;
- lp_vnsub = VNSUB_i;
- lp_nslp = NSLP_i;
- lp_dnsub = DNSUB_i;
- lp_dphib = DPHIB_i;
- lp_delvtac = DELVTAC_i;
- lp_np = NP_i;
- lp_toxov = TOXOV_i;
- lp_toxovd = TOXOVD_i;
- lp_nov = NOV_i;
- lp_novd = NOVD_i;
- lp_ct = CT_T;
- lp_ctg = CTG_T;
- lp_ctb = CTB_i;
- lp_stct = STCT_i;
- lp_cf = CF_i;
- lp_cfac = CFAC_i;
- lp_cfd = CFD_i;
- lp_cfb = CFB_i;
- lp_psce = PSCE_i;
- lp_psceb = PSCEB_i;
- lp_psced = PSCED_i;
- lp_betn = BETN_T;
- lp_stbet = STBET_i;
- lp_mue = MUE_T;
- lp_stmue = STMUE_i;
- lp_themu = THEMU_T;
- lp_stthemu = STTHEMU_i;
- lp_cs = CS_T;
- lp_stcs = STCS_i;
- lp_thecs = THECS_T;
- lp_stthecs = STTHECS_i;
- lp_xcor = XCOR_T;
- lp_stxcor = STXCOR_i;
- lp_feta = FETA_i;
- lp_rs = RS_T;
- lp_strs = STRS_i;
- lp_rsb = RSB_i;
- lp_rsg = RSG_i;
- lp_thesat = THESAT_T;
- lp_thesatac = THESATAC_T;
- lp_stthesat = STTHESAT_i;
- lp_thesatb = THESATB_i;
- lp_thesatg = THESATG_i;
- lp_ax = AX_i;
- lp_axac = AXAC_i;
- lp_alp = ALP_i;
- lp_alpac = ALPAC_i;
- lp_alp1 = ALP1_i;
- lp_alp2 = ALP2_i;
- lp_vp = VP_i;
- lp_a1 = A1_i;
- lp_a2 = A2_T;
- lp_sta2 = STA2_i;
- lp_a3 = A3_i;
- lp_a4 = A4_i;
- lp_gco = GCO_i;
- lp_iginv = IGINV_i;
- lp_igov = IGOV_i;
- lp_igovd = IGOVD_i;
- lp_stig = STIG_i;
- lp_gc2 = GC2_i;
- lp_gc3 = GC3_i;
- lp_gc2ov = GC2OV_i;
- lp_gc3ov = GC3OV_i;
- lp_chib = CHIB_i;
- lp_agidl = AGIDL_i;
- lp_agidld = AGIDLD_i;
- lp_bgidl = BGIDL_T;
- lp_bgidld = BGIDLD_T;
- lp_stbgidl = STBGIDL_i;
- lp_stbgidld = STBGIDLD_i;
- lp_cgidl = CGIDL_i;
- lp_cgidld = CGIDLD_i;
- lp_cox = COX_i;
- lp_cgov = CGOV_i;
- lp_cgovd = CGOVD_i;
- lp_cgbov = CGBOV_i;
- lp_cfr = CFR_i;
- lp_cfrd = CFRD_i;
- lp_fnt = FNT_i;
- lp_fntexc = FNTEXC_i;
- lp_nfa = NFA_i;
- lp_nfb = NFB_i;
- lp_nfc = NFC_i;
- lp_ef = EF_i;
- lp_vfbedge = VFBEDGE_T;
- lp_stvfbedge = STVFBEDGE_i;
- lp_dphibedge = DPHIBEDGE_i;
- lp_neffedge = NEFFEDGE_i;
- lp_ctedge = CTEDGE_i;
- lp_betnedge = BETNEDGE_T;
- lp_stbetedge = STBETEDGE_i;
- lp_psceedge = PSCEEDGE_i;
- lp_pscebedge = PSCEBEDGE_i;
- lp_pscededge = PSCEDEDGE_i;
- lp_cfedge = CFEDGE_i;
- lp_cfdedge = CFDEDGE_i;
- lp_cfbedge = CFBEDGE_i;
- lp_fntedge = FNTEDGE_i;
- lp_nfaedge = NFAEDGE_i;
- lp_nfbedge = NFBEDGE_i;
- lp_nfcedge = NFCEDGE_i;
- lp_efedge = EFEDGE_i;
- lp_rg = RG_i;
- lp_rse = RSE_i;
- lp_rde = RDE_i;
- lp_rbulk = RBULK_i;
- lp_rwell = RWELL_i;
- lp_rjuns = RJUNS_i;
- lp_rjund = RJUND_i;
- `ifdef SelfHeating
- lp_rth = RTH_i;
- lp_cth = CTH_i;
- lp_strth = STRTH_i;
- pdiss = MULT_i * Pdiss;
- dtsh = TKD - TKA;
- `endif // SelfHeating
- tk = TKD;
- cjosbot = MULT_i * ABSOURCE_i * cjobot;
- cjossti = MULT_i * LSSOURCE_i * cjosti;
- cjosgat = MULT_i * LGSOURCE_i * cjogat;
- vbisbot = vbibot;
- vbissti = vbisti;
- vbisgat = vbigat;
- cjosbotd = MULT_i * ABDRAIN_i * cjobot_d;
- cjosstid = MULT_i * LSDRAIN_i * cjosti_d;
- cjosgatd = MULT_i * LGDRAIN_i * cjogat_d;
- vbisbotd = vbibot_d;
- vbisstid = vbisti_d;
- vbisgatd = vbigat_d;
- `ifdef NQSmodel
- lp_munqs = MUNQS_i;
- `endif // NQSmodel
-
- end // OPinfo
-
- end // evaluateblock
-
-end // analogBlock
diff --git a/src/spicelib/devices/adms/psp103/admsva/PSP103_nqs_macrodefs.include b/src/spicelib/devices/adms/psp103/admsva/PSP103_nqs_macrodefs.include
deleted file mode 100644
index ddf9d2d81..000000000
--- a/src/spicelib/devices/adms/psp103/admsva/PSP103_nqs_macrodefs.include
+++ /dev/null
@@ -1,123 +0,0 @@
-//======================================================================================
-//======================================================================================
-// Filename: PSP103_nqs_macrodefs.include
-//======================================================================================
-//======================================================================================
-//
-// (c) Copyright notice
-//
-// Since 2015 until today, PSP has been co-developed by NXP Semiconductors and
-// CEA-Leti. For this part of the model, each claim undivided ownership and copyrights
-// Since 2012 until 2015, PSP has been co-developed by NXP Semiconductors and
-// Delft University of Technology. For this part of the model, each claim undivided
-// ownership and copyrights
-// Until and including 2011, PSP has been co-developed by NXP Semiconductors and
-// Arizona State University. For this part of the model, NXP Semiconductors claims
-// undivided ownership and copyrights.
-//
-//
-// Version: 103.7.0 (PSP), 200.6.0 (JUNCAP), April 2019
-//
-//======================================================================================
-//======================================================================================
-//
-// Further information can be found in the file releasenotesPSP103.txt
-//
-
-//////////////////////////////////////////
-//
-// Macros used in PSP-NQS
-//
-//////////////////////////////////////////
-
-// Function to calculate bulk charge from surface potential
-`define PhiToQb(phi,Qb_tmp) \
- if (abs(phi) <= margin_ac) \
- Qb_tmp = -0.70710678 * phi * Gf_ac * (1.0 - `oneSixth * phi * (1.0 - `oneSixth * phi)); \
- else begin \
- `expl((-phi), temp) \
- Qb_tmp = Gf_ac * sqrt(temp + phi - 1.0); \
- if (phi > margin_ac) \
- Qb_tmp = -Qb_tmp; \
- end
-
-// Function used in fq-macro
-`define PhiTod2Qis(xphi,d2Qis) \
- if (abs(xphi) <= margin_ac) begin \
- Qb_tmp = -0.70710678 * xphi * Gf_ac * (1.0 - `oneSixth * xphi * (1.0 - `oneSixth * xphi)); \
- dQbs = -0.70710678 * Gf_ac * (1.0 - `oneThird * xphi * (1.0 - 0.25 * xphi)); \
- d2Qis = -0.235702 * Gf_ac * (1.0 - 0.5 * xphi); \
- end else begin \
- `expl((-xphi),temp) \
- Qb_tmp = Gf_ac * sqrt(temp + xphi - 1.0); \
- if (xphi > margin_ac) \
- Qb_tmp = -Qb_tmp; \
- dQbs = 0.5 * Gf_ac * Gf_ac * (1.0 - temp) / Qb_tmp; \
- d2Qis = (dQbs * dQbs - 0.5 * Gf_ac * Gf_ac) / Qb_tmp + dQbs; \
- end
-
-
-// Function used in QiToPhi
-`define sps(sp, xg) \
- if (abs(xg) <= marginp) begin \
- sp = xg / a_factrp; \
- end else begin \
- if (xg < -marginp) begin \
- NQS_yg = -xg; \
- NQS_z = 1.25 * NQS_yg / a_factrp; \
- NQS_eta = (NQS_z + 10.0 - sqrt((NQS_z - 6.0) * (NQS_z - 6.0) + 64.0)) * 0.5; \
- NQS_a = (NQS_yg - NQS_eta) * (NQS_yg - NQS_eta) + Gp2 * (NQS_eta + 1.0); \
- NQS_c = 2.0 * (NQS_yg - NQS_eta) - Gp2; \
- NQS_tau = ln(NQS_a / Gp2) - NQS_eta; \
- `sigma(NQS_a, NQS_c, NQS_tau, NQS_eta, NQS_y0) \
- `expl(NQS_y0, NQS_D0) \
- NQS_xi = 1.0 - Gp2 * NQS_D0 * 0.5; \
- NQS_p = 2.0 * (NQS_yg - NQS_y0) + Gp2 * (NQS_D0 - 1.0); \
- NQS_q = (NQS_yg - NQS_y0) * (NQS_yg - NQS_y0) + Gp2 * (NQS_y0 + 1.0 - NQS_D0); \
- NQS_temp = NQS_p * NQS_p - 4.0 * NQS_xi * NQS_q; \
- NQS_w = 2.0 * NQS_q / (NQS_p + sqrt(NQS_temp)); \
- sp = -(NQS_y0 + NQS_w); \
- end else begin \
- NQS_xg1 = 1.0 / ( 1.25 + 7.32464877560822e-01 * Gp); \
- NQS_A_fac = (1.25 * a_factrp * NQS_xg1 - 1.0) * NQS_xg1; \
- NQS_xbar = xg / a_factrp * (1.0 + NQS_A_fac * xg); \
- `expl(-NQS_xbar, NQS_temp) \
- NQS_w = 1.0 - NQS_temp; \
- NQS_x0 = xg + Gp2 * 0.5 - Gp * sqrt(xg + Gp2 * 0.25 - NQS_w); \
- `expl((-NQS_x0), NQS_D0) \
- NQS_xi = 1.0 - Gp2 * 0.5 * NQS_D0; \
- NQS_p = 2.0 * (xg - NQS_x0) + Gp2 * (1.0 - NQS_D0); \
- NQS_q = (xg - NQS_x0) * (xg - NQS_x0) - Gp2 * (NQS_x0 - 1.0 + NQS_D0); \
- NQS_temp = NQS_p * NQS_p - 4.0 * NQS_xi * NQS_q; \
- NQS_u = 2.0 * NQS_q / (NQS_p + sqrt(NQS_temp)); \
- sp = NQS_x0 + NQS_u; \
- end \
- end
-
-
-// Function to calculate surface potential from inversion charge
-`define QiToPhi(Qi,xg,xphi) \
- temp = Qi / pd + xg; \
- `sps(xphi,temp)
-
-// Calculation of fk
-`define fq(Qi,xg,dQy,d2Qy,fk) \
- `QiToPhi(Qi, xg, xphi) \
- `PhiTod2Qis(xphi, d2Qis) \
- dQis = pd - dQbs; \
- dQis_1 = 1.0 / dQis; \
- fQi = Qi * dQis_1 - 1.0; \
- dfQi = (1.0 - Qi * d2Qis * dQis_1 * dQis_1) * dQis_1; \
- fk0 = dfQi * dQy * dQy + fQi * d2Qy; \
- dpsy2 = dQy * dQy * dQis_1 * dQis_1; \
- zsat_nqs = thesat2 * dpsy2; \
- if (CHNL_TYPE == `PMOS) \
- zsat_nqs = zsat_nqs / (1.0 + thesat1_ac * dps_ac); \
- temp = sqrt(1.0 + 2.0 * zsat_nqs); \
- Fvsat = 2.0 / (1.0 + temp); \
- temp1 = d2Qy - dpsy2 * d2Qis; \
- fk = Fvsat * (fk0 - zsat_nqs * fQi * temp1 * Fvsat / temp);
-
-// Interpolation of surface potential along channel
-`define Phiy(y) \
- x_m_ac + H_ac * (1.0 - sqrt(1.0 - 2.0 * dps_ac / H_ac * ((y) - ym))) * inv_phit1
diff --git a/src/spicelib/devices/adms/psp103/admsva/PSP103_parlist.include b/src/spicelib/devices/adms/psp103/admsva/PSP103_parlist.include
deleted file mode 100644
index 9f275723f..000000000
--- a/src/spicelib/devices/adms/psp103/admsva/PSP103_parlist.include
+++ /dev/null
@@ -1,916 +0,0 @@
-//======================================================================================
-//======================================================================================
-// Filename: PSP103_parlist.include
-//======================================================================================
-//======================================================================================
-//
-// (c) Copyright notice
-//
-// Since 2015 until today, PSP has been co-developed by NXP Semiconductors and
-// CEA-Leti. For this part of the model, each claim undivided ownership and copyrights
-// Since 2012 until 2015, PSP has been co-developed by NXP Semiconductors and
-// Delft University of Technology. For this part of the model, each claim undivided
-// ownership and copyrights
-// Until and including 2011, PSP has been co-developed by NXP Semiconductors and
-// Arizona State University. For this part of the model, NXP Semiconductors claims
-// undivided ownership and copyrights.
-//
-//
-// Version: 103.7.0 (PSP), 200.6.0 (JUNCAP), April 2019
-//
-//======================================================================================
-//======================================================================================
-//
-// Further information can be found in the file releasenotesPSP103.txt
-//
-// --------------------------------------------------------------------------------------------------------------
-// Special model parameters and switch parameters
-// --------------------------------------------------------------------------------------------------------------
-
-// Special model parameters, some are also simulator global variables
-`MPInb(LEVEL ,103 ,"" ,"Model level")
-`MPIty(TYPE ,1 ,"" ,"Channel type parameter, +1=NMOS -1=PMOS")
-
-`MPIty(nmos ,1 ,"" ,"MOS channel type")
-`MPIty(pmos ,1 ,"" ,"MOS channel type")
-`MPRco(TR ,21.0 ,"degC" ,-273.0 ,inf ,"nominal (reference) temperature")
-
-// Switch parameters that turn models or effects on or off
-`MPIcc(SWGEO ,1 ,"" ,0 ,2 ,"Flag for geometrical model, 0=local, 1=global, 2=binning")
-`MPIcc(SWIGATE ,0 ,"" ,0 ,2 ,"Flag for gate current: 0=off, 1=on, 2=on+overlaps-parameters")
-`MPIcc(SWIMPACT ,0 ,"" ,0 ,1 ,"Flag for impact ionization current, 0=turn off II")
-`MPIcc(SWGIDL ,0 ,"" ,0 ,1 ,"Flag for GIDL current, 0=turn off IGIDL")
-`MPIcc(SWJUNCAP ,0 ,"" ,0 ,3 ,"Flag for juncap, 0=turn off juncap")
-`MPIcc(SWJUNASYM ,0 ,"" ,0 ,1 ,"Flag for asymmetric junctions; 0=symmetric, 1=asymmetric")
-`MPIcc(SWNUD ,0 ,"" ,0 ,2 ,"Flag for NUD-effect; 0=off, 1=on, 2=on+CV-correction")
-`MPIcc(SWEDGE ,0 ,"" ,0 ,1 ,"Flag for drain current of edge transistors; 0=off, 1=on")
-`MPIcc(SWDELVTAC ,0 ,"" ,0 ,1 ,"Flag for separate capacitance calculation; 0=off, 1=on")
-`MPIcc(SWQSAT ,0 ,"" ,0 ,1 ,"Flag for separate capacitance calculation in saturation only: 0=off, 1=on")
-`MPIcc(SWQPART ,0 ,"" ,0 ,1 ,"Flag for drain/source charge partitioning; 0=linear distribution, 1=source")
-`MPIcc(SWIGN ,1 ,"" ,0 ,1 ,"Flag for induced gate noise; 0=off, 1=on")
-`ifdef NQSmodel
- `MPIcc(SWNQS ,0 ,"" ,0 ,9 ,"Flag for NQS, 0=off, 1, 2, 3, 5, or 9=number of collocation points")
-`endif // NQSmodel
-`MPRcz(QMC ,1.0 ,"" ,"Quantum-mechanical correction factor")
-
-// --------------------------------------------------------------------------------------------------------------
-// PSP local model parameters
-// --------------------------------------------------------------------------------------------------------------
-
-// Process parameters
-`MPRnb(VFB ,-1.0 ,"V" ,"Flat band voltage at TR")
-`MPRnb(STVFB ,5.0e-4 ,"V/K" ,"Temperature dependence of VFB")
-`MPRnb(ST2VFB ,0.0 ,"K^-1" ,"Quadratic temperature dependence of VFB")
-`MPRco(TOX ,2.0e-09 ,"m" ,1.0e-10 ,inf ,"Gate oxide thickness")
-`MPRco(EPSROX ,3.9 ,"" ,1.0 ,inf ,"Relative permittivity of gate dielectric")
-`MPRcc(NEFF ,5.0e23 ,"m^-3" ,1.0e20 ,1.0e26 ,"Effective substrate doping")
-`MPRcz(FACNEFFAC ,1.0 ,"" ,"Pre-factor for effective substrate doping in separate charge calculation")
-`MPRco(GFACNUD ,1.0 ,"" ,0.01 ,inf ,"Body-factor change due to NUD-effect")
-`MPRcz(VSBNUD ,0.0 ,"V" ,"Lower Vsb value for NUD-effect")
-`MPRco(DVSBNUD ,1.0 ,"V" ,0.1 ,inf ,"Vsb-range for NUD-effect")
-`MPRnb(VNSUB ,0.0 ,"V" ,"Effective doping bias-dependence parameter")
-`MPRco(NSLP ,0.05 ,"V" ,1.0e-3 ,inf ,"Effective doping bias-dependence parameter")
-`MPRcc(DNSUB ,0.0 ,"V^-1" ,0.0 ,1.0 ,"Effective doping bias-dependence parameter")
-`MPRnb(DPHIB ,0.0 ,"V" ,"Offset parameter for PHIB")
-`MPRnb(DELVTAC ,0.0 ,"V" ,"Offset parameter for PHIB in separate charge calculation")
-`MPRcz(NP ,1.0e26 ,"m^-3" ,"Gate poly-silicon doping")
-`MPRco(TOXOV ,2.0e-09 ,"m" ,1.0e-10 ,inf ,"Overlap oxide thickness")
-`MPRco(TOXOVD ,2.0e-09 ,"m" ,1.0e-10 ,inf ,"Overlap oxide thickness for drain side")
-`MPRcc(NOV ,5.0e25 ,"m^-3" ,1.0e23 ,1.0e27 ,"Effective doping of overlap region")
-`MPRcc(NOVD ,5.0e25 ,"m^-3" ,1.0e23 ,1.0e27 ,"Effective doping of overlap region for drain side")
-
-// Interface states parameters: PSP 103.6
-`MPRcz(CT ,0.0 ,"" ,"Interface states factor")
-`MPRcz(CTG ,0.0 ,"" ,"Gate voltage dependence of interface states factor")
-`MPRnb(CTB ,0.0 ,"" ,"Bulk voltage dependence of interface states factor")
-`MPRnb(STCT ,1.0 ,"" ,"Geometry-independent temperature dependence of CT")
-
-// DIBL parameters
-`MPRcz(CF ,0.0 ,"" ,"DIBL-parameter")
-`MPRcz(CFAC ,0.0 ,"" ,"DIBL-parameter of charge model when SWQSAT=1")
-`MPRcz(CFD ,0.0 ,"V^-1" ,"Drain voltage dependence of CF")
-`MPRcc(CFB ,0.0 ,"V^-1" ,0.0 ,1.0 ,"Back bias dependence of CF")
-
-// Subthreshold slope parameters of short channel transistor
-`MPRcz(PSCE ,0.0 ,"" ,"Subthreshold slope coefficient for short channel transistor")
-`MPRcc(PSCEB ,0.0 ,"V^-1" ,0.0 ,1.0 ,"Bulk voltage dependence parameter of subthreshold slope coefficient for short channel transistor")
-`MPRcz(PSCED ,0.0 ,"V^-1" ,"Drain voltage dependence parameter of subthreshold slope coefficient for short channel transistor")
-
-// Mobility parameters
-`MPRcz(BETN ,7.0e-2 ,"m^2/V/s" ,"Channel aspect ratio times zero-field mobility")
-`MPRnb(STBET ,1.0 ,"" ,"Temperature dependence of BETN")
-`MPRcz(MUE ,0.5 ,"m/V" ,"Mobility reduction coefficient at TR")
-`MPRnb(STMUE ,0.0 ,"" ,"Temperature dependence of MUE")
-`MPRcz(THEMU ,1.5 ,"" ,"Mobility reduction exponent at TR")
-`MPRnb(STTHEMU ,1.5 ,"" ,"Temperature dependence of THEMU")
-`MPRcz(CS ,0.0 ,"" ,"Coulomb scattering parameter at TR")
-`MPRnb(STCS ,0.0 ,"" ,"Temperature dependence of CS")
-`MPRcz(THECS ,2.0 ,"" ,"Coulomb scattering exponent at TR")
-`MPRnb(STTHECS ,0.0 ,"" ,"Temperature dependence of THECS")
-`MPRcz(XCOR ,0.0 ,"V^-1" ,"Non-universality factor")
-`MPRnb(STXCOR ,0.0 ,"" ,"Temperature dependence of XCOR")
-`MPRcz(FETA ,1.0 ,"" ,"Effective field parameter")
-
-// Series-resistance parameters (for resistance modeling as part of intrinsic mobility reduction)
-`MPRcz(RS ,30.0 ,"Ohm" ,"Series resistance at TR")
-`MPRnb(STRS ,1.0 ,"" ,"Temperature dependence of RS")
-`MPRcc(RSB ,0.0 ,"V^-1" ,-0.5 ,1.0 ,"Back-bias dependence of series resistance")
-`MPRco(RSG ,0.0 ,"V^-1" ,-0.5 ,inf ,"Gate-bias dependence of series resistance")
-
-// Velocity saturation parameters
-`MPRcz(THESAT ,1.0 ,"V^-1" ,"Velocity saturation parameter at TR")
-`MPRcz(THESATAC ,1.0 ,"V^-1" ,"Velocity saturation parameter at TR of charge model when SWQSAT=1")
-`MPRnb(STTHESAT ,1.0 ,"" ,"Temperature dependence of THESAT")
-`MPRcc(THESATB ,0.0 ,"V^-1" ,-0.5 ,1.0 ,"Back-bias dependence of velocity saturation")
-`MPRco(THESATG ,0.0 ,"V^-1" ,-0.5 ,inf ,"Gate-bias dependence of velocity saturation")
-
-// Saturation voltage parameters
-`MPRco(AX ,3.0 ,"" ,2.0 ,inf ,"Linear/saturation transition factor")
-`MPRco(AXAC ,3.0 ,"" ,2.0 ,inf ,"Linear/saturation transition factor of charge model when SWQSAT=1")
-
-// Channel length modulation (CLM) parameters
-`MPRcz(ALP ,0.01 ,"" ,"CLM pre-factor")
-`MPRcz(ALPAC ,0.01 ,"" ,"CLM pre-factor of charge model when SWQSAT=1")
-`MPRcz(ALP1 ,0.0 ,"V" ,"CLM enhancement factor above threshold")
-`MPRcz(ALP2 ,0.0 ,"V^-1" ,"CLM enhancement factor below threshold")
-`MPRco(VP ,0.05 ,"V" ,1.0e-10 ,inf ,"CLM logarithm dependence factor")
-
-// Impact ionization (II) parameters
-`MPRcz(A1 ,1.0 ,"" ,"Impact-ionization pre-factor")
-`MPRcz(A2 ,10.0 ,"V" ,"Impact-ionization exponent at TR")
-`MPRnb(STA2 ,0.0 ,"V" ,"Temperature dependence of A2")
-`MPRcz(A3 ,1.0 ,"" ,"Saturation-voltage dependence of impact-ionization")
-`MPRcz(A4 ,0.0 ,"V^-0.5" ,"Back-bias dependence of impact-ionization")
-
-// Gate current parameters
-`MPRcc(GCO ,0.0 ,"" ,-10.0 ,10.0 ,"Gate tunnelling energy adjustment")
-`MPRcz(IGINV ,0.0 ,"A" ,"Gate channel current pre-factor")
-`MPRcz(IGOV ,0.0 ,"A" ,"Gate overlap current pre-factor")
-`MPRcz(IGOVD ,0.0 ,"A" ,"Gate overlap current pre-factor for drain side")
-`MPRnb(STIG ,2.0 ,"" ,"Temperature dependence of IGINV and IGOV")
-`MPRcc(GC2 ,0.375 ,"" ,0.0 ,10.0 ,"Gate current slope factor")
-`MPRcc(GC3 ,0.063 ,"" ,-2.0 ,2.0 ,"Gate current curvature factor")
-`MPRcc(GC2OV ,0.375 ,"" ,0.0 ,10.0 ,"Gate overlap current slope factor, used only when SWIGATE=2")
-`MPRcc(GC3OV ,0.063 ,"" ,-2.0 ,2.0 ,"Gate overlap current curvature factor, used only when SWIGATE=2")
-`MPRco(CHIB ,3.1 ,"V" ,1.0 ,inf ,"Tunnelling barrier height")
-
-// Gate Induced Drain/Source Leakage (GIDL) parameters
-`MPRcz(AGIDL ,0.0 ,"A/V^3" ,"GIDL pre-factor")
-`MPRcz(AGIDLD ,0.0 ,"A/V^3" ,"GIDL pre-factor for drain side")
-`MPRcz(BGIDL ,41.0 ,"V" ,"GIDL probability factor at TR")
-`MPRcz(BGIDLD ,41.0 ,"V" ,"GIDL probability factor at TR for drain side")
-`MPRnb(STBGIDL ,0.0 ,"V/K" ,"Temperature dependence of BGIDL")
-`MPRnb(STBGIDLD ,0.0 ,"V/K" ,"Temperature dependence of BGIDL for drain side")
-`MPRnb(CGIDL ,0.0 ,"" ,"Back-bias dependence of GIDL")
-`MPRnb(CGIDLD ,0.0 ,"" ,"Back-bias dependence of GIDL for drain side")
-
-// Charge model parameters
-`MPRcz(COX ,1.0e-14 ,"F" ,"Oxide capacitance for intrinsic channel")
-`MPRcz(CGOV ,1.0e-15 ,"F" ,"Oxide capacitance for gate-drain/source overlap")
-`MPRcz(CGOVD ,1.0e-15 ,"F" ,"Oxide capacitance for gate-drain overlap")
-`MPRcz(CGBOV ,0.0 ,"F" ,"Oxide capacitance for gate-bulk overlap")
-`MPRcz(CFR ,0.0 ,"F" ,"Outer fringe capacitance")
-`MPRcz(CFRD ,0.0 ,"F" ,"Outer fringe capacitance for drain side")
-
-// Noise parameters
-`MPRcz(FNT ,1.0 ,"" ,"Thermal noise coefficient")
-`MPRcz(FNTEXC ,0.0 ,"" ,"Excess noise coefficient")
-`MPRcz(NFA ,8.0e22 ,"V^-1/m^4" ,"First coefficient of flicker noise")
-`MPRcz(NFB ,3.0e07 ,"V^-1/m^2" ,"Second coefficient of flicker noise")
-`MPRcz(NFC ,0.0 ,"V^-1" ,"Third coefficient of flicker noise")
-`MPRcz(EF ,1.0 ,"" ,"Flicker noise frequency exponent")
-
-// Edge transistor parameters: PSP 103.4
-`MPRnb(VFBEDGE ,-1.0 ,"V" ,"Flat band voltage of edge transistors at TR")
-`MPRnb(STVFBEDGE ,5.0e-4 ,"V/K" ,"Temperature dependence of VFBEDGE")
-`MPRnb(DPHIBEDGE ,0.0 ,"V" ,"Offset parameter for PHIB of edge transistors")
-`MPRcc(NEFFEDGE ,5.0e23 ,"m^-3" ,1.0e20 ,1.0e26 ,"Effective substrate doping of edge transistors")
-`MPRcz(CTEDGE ,0.0 ,"" ,"Interface states factor of edge transistors")
-`MPRcz(BETNEDGE ,5.0e-4 ,"m^2/V/s" ,"Channel aspect ratio times zero-field mobility of edge transistor")
-`MPRnb(STBETEDGE ,1.0 ,"" ,"Temperature dependence of BETNEDGE")
-`MPRcz(PSCEEDGE ,0.0 ,"" ,"Subthreshold slope coefficient for short channel edge transistors")
-`MPRcc(PSCEBEDGE ,0.0 ,"V^-1" ,0.0 ,1.0 ,"Bulk voltage dependence parameter of subthreshold slope coefficient for short channel edge transistors")
-`MPRcz(PSCEDEDGE ,0.0 ,"V^-1" ,"Drain voltage dependence parameter of subthreshold slope coefficient for short channel edge transistors")
-`MPRcz(CFEDGE ,0.0 ,"" ,"DIBL parameter of edge transistors")
-`MPRcz(CFDEDGE ,0.0 ,"V^-1" ,"Drain voltage dependence parameter of DIBL-parameter of edge transistors")
-`MPRcc(CFBEDGE ,0.0 ,"V^-1" ,0.0 ,1.0 ,"Bulk voltage dependence parameter of DIBL-parameter of edge transistors")
-`MPRcz(FNTEDGE ,1.0 ,"" ,"Thermal noise coefficient of edge transistors")
-`MPRcz(NFAEDGE ,8.0e22 ,"V^-1/m^4" ,"First coefficient of flicker noise of edge transistors")
-`MPRcz(NFBEDGE ,3.0e07 ,"V^-1/m^2" ,"Second coefficient of flicker noise of edge transistors")
-`MPRcz(NFCEDGE ,0.0 ,"V^-1" ,"Third coefficient of flicker noise of edge transistors")
-`MPRcz(EFEDGE ,1.0 ,"" ,"Flicker noise frequency exponent of edge transistors")
-
-// NQS parameters
-`ifdef NQSmodel
- `MPRcz(MUNQS ,1.0 ,"" ,"Relative mobility for NQS modelling")
-`endif // NQSmodel
-
-// Parasitic resistance parameters
-`MPRcz(RG ,0.0 ,"Ohm" ,"Gate resistance")
-`MPRcz(RSE ,0.0 ,"Ohm" ,"External source resistance")
-`MPRcz(RDE ,0.0 ,"Ohm" ,"External drain resistance")
-`MPRcz(RBULK ,0.0 ,"Ohm" ,"Bulk resistance between node BP and BI")
-`MPRcz(RWELL ,0.0 ,"Ohm" ,"Well resistance between node BI and B")
-`MPRcz(RJUNS ,0.0 ,"Ohm" ,"Source-side bulk resistance between node BI and BS")
-`MPRcz(RJUND ,0.0 ,"Ohm" ,"Drain-side bulk resistance between node BI and BD")
-
-// Self heating effect parameters
-`ifdef SelfHeating
- `MPRcz(RTH ,0.0 ,"K/W" ,"Thermal resistance")
- `MPRcz(CTH ,0.0 ,"J/K" ,"Thermal capacitance")
- `MPRnb(STRTH ,0.0 ,"" ,"Temperature sensitivity of RTH")
-`endif // SelfHeating
-
-// --------------------------------------------------------------------------------------------------------------
-// PSP global model parameters
-// --------------------------------------------------------------------------------------------------------------
-
-// Process Parameters
-`MPRnb(LVARO ,0.0 ,"m" ,"Geom. independent difference between actual and programmed gate length")
-`MPRnb(LVARL ,0.0 ,"" ,"Length dependence of LVAR")
-`MPRnb(LVARW ,0.0 ,"" ,"Width dependence of LVAR")
-`MPRnb(LAP ,0.0 ,"m" ,"Effective channel length reduction per side")
-`MPRnb(WVARO ,0.0 ,"m" ,"Geom. independent difference between actual and programmed field-oxide opening")
-`MPRnb(WVARL ,0.0 ,"" ,"Length dependence of WVAR")
-`MPRnb(WVARW ,0.0 ,"" ,"Width dependence of WVAR")
-`MPRnb(WOT ,0.0 ,"m" ,"Effective channel width reduction per side")
-`MPRnb(DLQ ,0.0 ,"m" ,"Effective channel length reduction for CV")
-`MPRnb(DWQ ,0.0 ,"m" ,"Effective channel width reduction for CV")
-`MPRnb(VFBO ,-1.0 ,"V" ,"Geometry-independent flat-band voltage at TR")
-`MPRnb(VFBL ,0.0 ,"V" ,"Length dependence of flat-band voltage")
-`MPRnb(VFBW ,0.0 ,"V" ,"Width dependence of flat-band voltage")
-`MPRnb(VFBLW ,0.0 ,"V" ,"Area dependence of flat-band voltage")
-`MPRnb(STVFBO ,5.0e-4 ,"V/K" ,"Geometry-independent temperature dependence of VFB")
-`MPRnb(STVFBL ,0.0 ,"V/K" ,"Length dependence of temperature dependence of VFB")
-`MPRnb(STVFBW ,0.0 ,"V/K" ,"Width dependence of temperature dependence of VFB")
-`MPRnb(STVFBLW ,0.0 ,"V/K" ,"Area dependence of temperature dependence of VFB")
-`MPRnb(ST2VFBO ,0.0 ,"K^-1" ,"Quadratic temperature dependence of VFB")
-`MPRco(TOXO ,2.0e-9 ,"m" ,1.0e-10 ,inf ,"Gate oxide thickness")
-`MPRco(EPSROXO ,3.9 ,"" ,1.0 ,inf ,"Relative permittivity of gate dielectric")
-`MPRco(NSUBO ,3.0e23 ,"m^-3" ,1.0e20 ,inf ,"Geometry independent substrate doping")
-`MPRnb(NSUBW ,0.0 ,"" ,"Width dependence of background doping NSUBO due to segregation")
-`MPRco(WSEG ,1.0e-8 ,"m" ,1.0e-10 ,inf ,"Char. length of segregation of background doping NSUBO")
-`MPRcz(NPCK ,1.0e24 ,"m^-3" ,"Pocket doping level")
-`MPRnb(NPCKW ,0.0 ,"" ,"Width dependence of pocket doping NPCK due to segregation")
-`MPRco(WSEGP ,1.0e-8 ,"m" ,1.0e-10 ,inf ,"Char. length of segregation of pocket doping NPCK")
-`MPRco(LPCK ,1.0e-8 ,"m" ,1.0e-10 ,inf ,"Char. length of lateral doping profile")
-`MPRnb(LPCKW ,0.0 ,"" ,"Width dependence of char. length of lateral doping profile")
-`MPRnb(FOL1 ,0.0 ,"" ,"First length dependence coefficient for short channel body effect")
-`MPRnb(FOL2 ,0.0 ,"" ,"Second length dependence coefficient for short channel body effect")
-`MPRnb(FACNEFFACO ,1.0 ,"" ,"Geom. independent pre-factor for effective substrate doping in separate charge calculation")
-`MPRnb(FACNEFFACL ,0.0 ,"" ,"Length dependence of FACNEFFAC")
-`MPRnb(FACNEFFACW ,0.0 ,"" ,"Width dependence of FACNEFFAC")
-`MPRnb(FACNEFFACLW ,0.0 ,"" ,"Area dependence of FACNEFFAC")
-`MPRnb(GFACNUDO ,1.0 ,"" ,"Geom. independent body-factor change due to NUD-effect")
-`MPRnb(GFACNUDL ,0.0 ,"" ,"Length dependence of GFACNUD")
-`MPRnb(GFACNUDLEXP ,1.0 ,"" ,"Exponent for length dependence of GFACNUD")
-`MPRnb(GFACNUDW ,0.0 ,"" ,"Width dependence of GFACNUD")
-`MPRnb(GFACNUDLW ,0.0 ,"" ,"Area dependence of GFACNUD")
-`MPRnb(VSBNUDO ,0.0 ,"V" ,"Lower Vsb value for NUD-effect")
-`MPRnb(DVSBNUDO ,1.0 ,"V" ,"Vsb range for NUD-effect")
-`MPRnb(VNSUBO ,0.0 ,"V" ,"Effective doping bias-dependence parameter")
-`MPRnb(NSLPO ,0.05 ,"V" ,"Effective doping bias-dependence parameter")
-`MPRnb(DNSUBO ,0.0 ,"V^-1" ,"Effective doping bias-dependence parameter")
-`MPRnb(DPHIBO ,0.0 ,"V" ,"Geometry independent offset of PHIB")
-`MPRnb(DPHIBL ,0.0 ,"V" ,"Length dependence offset of PHIB")
-`MPRnb(DPHIBLEXP ,1.0 ,"" ,"Exponent for length dependence of offset of PHIB")
-`MPRnb(DPHIBW ,0.0 ,"V" ,"Width dependence of offset of PHIB")
-`MPRnb(DPHIBLW ,0.0 ,"V" ,"Area dependence of offset of PHIB")
-`MPRnb(DELVTACO ,0.0 ,"V" ,"Geom. independent offset parameter for PHIB in separate charge calculation")
-`MPRnb(DELVTACL ,0.0 ,"V" ,"Length dependence of DELVTAC")
-`MPRnb(DELVTACLEXP ,1.0 ,"" ,"Exponent for length dependence of offset of DELVTAC")
-`MPRnb(DELVTACW ,0.0 ,"V" ,"Width dependence of DELVTAC")
-`MPRnb(DELVTACLW ,0.0 ,"V" ,"Area dependence of DELVTAC")
-`MPRnb(NPO ,1.0e26 ,"m^-3" ,"Geometry-independent gate poly-silicon doping")
-`MPRnb(NPL ,0.0 ,"" ,"Length dependence of gate poly-silicon doping")
-`MPRco(TOXOVO ,2.0e-9 ,"m" ,1.0e-10 ,inf ,"Overlap oxide thickness")
-`MPRco(TOXOVDO ,2.0e-9 ,"m" ,1.0e-10 ,inf ,"Overlap oxide thickness for drain side")
-`MPRcz(LOV ,0.0 ,"m" ,"Overlap length for gate/drain and gate/source overlap capacitance")
-`MPRcz(LOVD ,0.0 ,"m" ,"Overlap length for gate/drain overlap capacitance")
-`MPRnb(NOVO ,5.0e25 ,"m^-3" ,"Effective doping of overlap region")
-`MPRnb(NOVDO ,5.0e25 ,"m^-3" ,"Effective doping of overlap region for drain side")
-
-// Interface states parameters: PSP 103.6
-`MPRnb(CTO ,0.0 ,"" ,"Geometry-independent interface states factor")
-`MPRnb(CTL ,0.0 ,"" ,"Length dependence of interface states factor")
-`MPRnb(CTLEXP ,1.0 ,"" ,"Exponent for length dependence of interface states factor")
-`MPRnb(CTW ,0.0 ,"" ,"Width dependence of interface states factor")
-`MPRnb(CTLW ,0.0 ,"" ,"Area dependence of interface states factor")
-`MPRcz(CTGO ,0.0 ,"" ,"Gate voltage dependence of interface states factor")
-`MPRnb(CTBO ,0.0 ,"" ,"Bulk voltage dependence of interface states factor")
-`MPRnb(STCTO ,1.0 ,"" ,"Geometry-independent temperature dependence of CT")
-
-// DIBL Parameters
-`MPRnb(CFL ,0.0 ,"" ,"Length dependence of DIBL-parameter")
-`MPRnb(CFLEXP ,2.0 ,"" ,"Exponent for length dependence of CF")
-`MPRnb(CFW ,0.0 ,"" ,"Width dependence of CF")
-`MPRnb(CFACL ,0.0 ,"" ,"Length dependence of DIBL-parameter of charge model when SWQSAT=1")
-`MPRnb(CFACLEXP ,2.0 ,"" ,"Exponent for length dependence of CF")
-`MPRnb(CFACW ,0.0 ,"" ,"Width dependence of CF")
-`MPRcz(CFDO ,0.0 ,"V^-1" ,"Drain voltage dependence of CF")
-`MPRnb(CFBO ,0.0 ,"V^-1" ,"Back-bias dependence of CF")
-
-// Subthreshold slope parameters of short channel transistor
-`MPRnb(PSCEL ,0.0 ,"" ,"Length dependence of subthreshold slope coefficient for short channel transistor")
-`MPRnb(PSCELEXP ,2.0 ,"" ,"Exponent for length dependence of subthreshold slope coefficient for short channel transistor")
-`MPRnb(PSCEW ,0.0 ,"" ,"Exponent for length dependence of subthreshold slope coefficient for short channel transistor")
-`MPRcc(PSCEBO ,0.0 ,"V^-1" ,0.0 ,1.0 ,"Bulk voltage dependence parameter of subthreshold slope coefficient for short channel transistor")
-`MPRcz(PSCEDO ,0.0 ,"V^-1" ,"Drain voltage dependence parameter of subthreshold slope coefficient for short channel transistor")
-
-// Mobility Parameters
-`MPRcz(UO ,5.0e-2 ,"m^2/V/s" ,"Zero-field mobility at TR")
-`MPRnb(FBET1 ,0.0 ,"" ,"Relative mobility decrease due to first lateral profile")
-`MPRnb(FBET1W ,0.0 ,"" ,"Width dependence of relative mobility decrease due to first lateral profile")
-`MPRco(LP1 ,1.0e-8 ,"m" ,1.0e-10 ,inf ,"Mobility-related characteristic length of first lateral profile")
-`MPRnb(LP1W ,0.0 ,"" ,"Width dependence of mobility-related characteristic length of first lateral profile")
-`MPRnb(FBET2 ,0.0 ,"" ,"Relative mobility decrease due to second lateral profile")
-`MPRco(LP2 ,1.0e-8 ,"m" ,1.0e-10 ,inf ,"Mobility-related characteristic length of second lateral profile")
-`MPRnb(BETW1 ,0.0 ,"" ,"First higher-order width scaling coefficient of BETN")
-`MPRnb(BETW2 ,0.0 ,"" ,"Second higher-order width scaling coefficient of BETN")
-`MPRco(WBET ,1.0e-9 ,"m" ,1.0e-10 ,inf ,"Characteristic width for width scaling of BETN")
-`MPRnb(STBETO ,1.0 ,"" ,"Geometry independent temperature dependence of BETN")
-`MPRnb(STBETL ,0.0 ,"" ,"Length dependence of temperature dependence of BETN")
-`MPRnb(STBETW ,0.0 ,"" ,"Width dependence of temperature dependence of BETN")
-`MPRnb(STBETLW ,0.0 ,"" ,"Area dependence of temperature dependence of BETN")
-`MPRnb(MUEO ,0.5 ,"m/V" ,"Geometry independent mobility reduction coefficient at TR")
-`MPRnb(MUEW ,0.0 ,"" ,"Width dependence of mobility reduction coefficient at TR")
-`MPRnb(STMUEO ,0.0 ,"" ,"Temperature dependence of MUE")
-`MPRnb(THEMUO ,1.5 ,"" ,"Mobility reduction exponent at TR")
-`MPRnb(STTHEMUO ,1.5 ,"" ,"Temperature dependence of THEMU")
-`MPRnb(CSO ,0.0 ,"" ,"Geometry independent coulomb scattering parameter at TR")
-`MPRnb(CSL ,0.0 ,"" ,"Length dependence of CS")
-`MPRnb(CSLEXP ,1.0 ,"" ,"Exponent for length dependence of CS")
-`MPRnb(CSW ,0.0 ,"" ,"Width dependence of CS")
-`MPRnb(CSLW ,0.0 ,"" ,"Area dependence of CS")
-`MPRnb(STCSO ,0.0 ,"" ,"Temperature dependence of CS")
-`MPRcz(THECSO ,2.0 ,"" ,"Coulomb scattering exponent at TR")
-`MPRnb(STTHECSO ,0.0 ,"" ,"Temperature dependence of THECS")
-`MPRnb(XCORO ,0.0 ,"V^-1" ,"Geometry independent non-universality parameter")
-`MPRnb(XCORL ,0.0 ,"" ,"Length dependence of non-universality parameter")
-`MPRnb(XCORW ,0.0 ,"" ,"Width dependence of non-universality parameter")
-`MPRnb(XCORLW ,0.0 ,"" ,"Area dependence of non-universality parameter")
-`MPRnb(STXCORO ,0.0 ,"" ,"Temperature dependence of XCOR")
-`MPRnb(FETAO ,1.0 ,"" ,"Effective field parameter")
-
-// Series Resistance
-`MPRnb(RSW1 ,50.0 ,"Ohm" ,"Source/drain series resistance for 1 um wide channel at TR")
-`MPRnb(RSW2 ,0.0 ,"" ,"Higher-order width scaling of RS")
-`MPRnb(STRSO ,1.0 ,"" ,"Temperature dependence of RS")
-`MPRnb(RSBO ,0.0 ,"V^-1" ,"Back-bias dependence of series resistance")
-`MPRnb(RSGO ,0.0 ,"V^-1" ,"Gate-bias dependence of series resistance")
-
-// Velocity Saturation
-`MPRnb(THESATO ,0.0 ,"V^-1" ,"Geometry independent velocity saturation parameter at TR")
-`MPRnb(THESATL ,0.05 ,"V^-1" ,"Length dependence of THESAT")
-`MPRnb(THESATLEXP ,1.0 ,"" ,"Exponent for length dependence of THESAT")
-`MPRnb(THESATW ,0.0 ,"" ,"Width dependence of THESAT")
-`MPRnb(THESATLW ,0.0 ,"" ,"Area dependence of THESAT")
-`MPRnb(THESATACO ,0.0 ,"V^-1" ,"Geometry independent velocity saturation parameter at TR of charge model when SWQSAT=1")
-`MPRnb(THESATACL ,0.05 ,"V^-1" ,"Length dependence of THESATAC")
-`MPRnb(THESATACLEXP ,1.0 ,"" ,"Exponent for length dependence of THESATAC")
-`MPRnb(THESATACW ,0.0 ,"" ,"Width dependence of THESATAC")
-`MPRnb(THESATACLW ,0.0 ,"" ,"Area dependence of THESATAC")
-`MPRnb(STTHESATO ,1.0 ,"" ,"Geometry independent temperature dependence of THESAT")
-`MPRnb(STTHESATL ,0.0 ,"" ,"Length dependence of temperature dependence of THESAT")
-`MPRnb(STTHESATW ,0.0 ,"" ,"Width dependence of temperature dependence of THESAT")
-`MPRnb(STTHESATLW ,0.0 ,"" ,"Area dependence of temperature dependence of THESAT")
-`MPRnb(THESATBO ,0.0 ,"V^-1" ,"Back-bias dependence of velocity saturation")
-`MPRnb(THESATGO ,0.0 ,"V^-1" ,"Gate-bias dependence of velocity saturation")
-
-// Saturation Voltage
-`MPRnb(AXO ,18.0 ,"" ,"Geometry independent linear/saturation transition factor")
-`MPRcz(AXL ,0.4 ,"" ,"Length dependence of AX")
-`MPRnb(AXACO ,18.0 ,"" ,"Geometry independent linear/saturation transition factor of charge model when SWQSAT=1")
-`MPRcz(AXACL ,0.4 ,"" ,"Length dependence of AXAC")
-
-// Channel Length Modulation
-`MPRnb(ALPL ,5.0e-4 ,"" ,"Length dependence of ALP")
-`MPRnb(ALPLEXP ,1.0 ,"" ,"Exponent for length dependence of ALP")
-`MPRnb(ALPW ,0.0 ,"" ,"Width dependence of ALP")
-`MPRnb(ALPACL ,5.0e-4 ,"" ,"Length dependence of ALPAC")
-`MPRnb(ALPACLEXP ,1.0 ,"" ,"Exponent for length dependence of ALPAC")
-`MPRnb(ALPACW ,0.0 ,"" ,"Width dependence of ALPAC")
-`MPRnb(ALP1L1 ,0.0 ,"V" ,"Length dependence of CLM enhancement factor above threshold")
-`MPRnb(ALP1LEXP ,0.5 ,"" ,"Exponent for length dependence of ALP1")
-`MPRcz(ALP1L2 ,0.0 ,"" ,"Second_order length dependence of ALP1")
-`MPRnb(ALP1W ,0.0 ,"" ,"Width dependence of ALP1")
-`MPRnb(ALP2L1 ,0.0 ,"V^-1" ,"Length dependence of CLM enhancement factor below threshold")
-`MPRnb(ALP2LEXP ,0.5 ,"" ,"Exponent for length dependence of ALP2")
-`MPRcz(ALP2L2 ,0.0 ,"" ,"Second_order length dependence of ALP2")
-`MPRnb(ALP2W ,0.0 ,"" ,"Width dependence of ALP2")
-`MPRnb(VPO ,0.05 ,"V" ,"CLM logarithmic dependence parameter")
-
-// Weak-avalanche parameters
-`MPRnb(A1O ,1.0 ,"" ,"Geometry independent impact-ionization pre-factor")
-`MPRnb(A1L ,0.0 ,"" ,"Length dependence of A1")
-`MPRnb(A1W ,0.0 ,"" ,"Width dependence of A1")
-`MPRnb(A2O ,10.0 ,"V" ,"Impact-ionization exponent at TR")
-`MPRnb(STA2O ,0.0 ,"V" ,"Temperature dependence of A2")
-`MPRnb(A3O ,1.0 ,"" ,"Geometry independent saturation-voltage dependence of II")
-`MPRnb(A3L ,0.0 ,"" ,"Length dependence of A3")
-`MPRnb(A3W ,0.0 ,"" ,"Width dependence of A3")
-`MPRnb(A4O ,0.0 ,"V^-0.5" ,"Geometry independent back-bias dependence of II")
-`MPRnb(A4L ,0.0 ,"" ,"Length dependence of A4")
-`MPRnb(A4W ,0.0 ,"" ,"Width dependence of A4")
-
-// Gate current parameters
-`MPRnb(GCOO ,0.0 ,"" ,"Gate tunnelling energy adjustment")
-`MPRnb(IGINVLW ,0.0 ,"A" ,"Gate channel current pre-factor for 1 um^2 channel area")
-`MPRnb(IGOVW ,0.0 ,"A" ,"Gate overlap current pre-factor for 1 um wide channel")
-`MPRnb(IGOVDW ,0.0 ,"A" ,"Gate overlap current pre-factor for 1 um wide channel for drain side")
-`MPRnb(STIGO ,2.0 ,"" ,"Temperature dependence of IGINV and IGOV")
-`MPRnb(GC2O ,0.375 ,"" ,"Gate current slope factor")
-`MPRnb(GC3O ,0.063 ,"" ,"Gate current curvature factor")
-`MPRnb(GC2OVO ,0.375 ,"" ,"Gate overlap current slope factor, used only when SWIGATE=2")
-`MPRnb(GC3OVO ,0.063 ,"" ,"Gate overlap current curvature factor, used only when SWIGATE=2")
-`MPRnb(CHIBO ,3.1 ,"V" ,"Tunnelling barrier height")
-
-// Gate-induced drain leakage parameters
-`MPRnb(AGIDLW ,0.0 ,"A/V^3" ,"Width dependence of GIDL pre-factor")
-`MPRnb(AGIDLDW ,0.0 ,"A/V^3" ,"Width dependence of GIDL pre-factor for drain side")
-`MPRnb(BGIDLO ,41.0 ,"V" ,"GIDL probability factor at TR")
-`MPRnb(BGIDLDO ,41.0 ,"V" ,"GIDL probability factor at TR for drain side")
-`MPRnb(STBGIDLO ,0.0 ,"V/K" ,"Temperature dependence of BGIDL")
-`MPRnb(STBGIDLDO ,0.0 ,"V/K" ,"Temperature dependence of BGIDL for drain side")
-`MPRnb(CGIDLO ,0.0 ,"" ,"Back-bias dependence of GIDL")
-`MPRnb(CGIDLDO ,0.0 ,"" ,"Back-bias dependence of GIDL for drain side")
-
-// Charge Model Parameters
-`MPRnb(CGBOVL ,0.0 ,"F" ,"Oxide capacitance for gate-bulk overlap for 1 um long channel")
-`MPRnb(CFRW ,0.0 ,"F" ,"Outer fringe capacitance for 1 um wide channel")
-`MPRnb(CFRDW ,0.0 ,"F" ,"Outer fringe capacitance for 1 um wide channel for drain side")
-
-// Noise Model Parameters
-`MPRnb(FNTO ,1.0 ,"" ,"Thermal noise coefficient")
-`MPRcz(FNTEXCL ,0.0 ,"" ,"Length dependence coefficient of excess noise")
-`MPRnb(NFALW ,8.0e22 ,"V^-1/m^4" ,"First coefficient of flicker noise for 1 um^2 channel area")
-`MPRnb(NFBLW ,3.0e7 ,"V^-1/m^2" ,"Second coefficient of flicker noise for 1 um^2 channel area")
-`MPRnb(NFCLW ,0.0 ,"V^-1" ,"Third coefficient of flicker noise for 1 um^2 channel area")
-`MPRnb(EFO ,1.0 ,"" ,"Flicker noise frequency exponent")
-`MPRnb(LINTNOI ,0.0 ,"m" ,"Length offset for flicker noise")
-`MPRnb(ALPNOI ,2.0 ,"" ,"Exponent for length offset for flicker noise")
-
-// Edge transistor parameters: PSP 103.4
-`MPRcz(WEDGE ,1.0e-8 ,"m" ,"Electrical width of edge transistor per side")
-`MPRcz(WEDGEW ,0.0 ,"" ,"Width dependence of edge WEDGE")
-`MPRnb(VFBEDGEO ,-1.0 ,"V" ,"Geometry-independent flat-band voltage of edge transistors at TR")
-`MPRnb(STVFBEDGEO ,5.0e-4 ,"V/K" ,"Geometry-independent temperature dependence of VFBEDGE")
-`MPRnb(STVFBEDGEL ,0.0 ,"V/K" ,"Length dependence of temperature dependence of VFBEDGE")
-`MPRnb(STVFBEDGEW ,0.0 ,"V/K" ,"Width dependence of temperature dependence of VFBEDGE")
-`MPRnb(STVFBEDGELW ,0.0 ,"V/K" ,"Area dependence of temperature dependence of VFBEDGE")
-`MPRnb(DPHIBEDGEO ,0.0 ,"V" ,"Geometry independent of edge transistor PHIB offset")
-`MPRnb(DPHIBEDGEL ,0.0 ,"V" ,"Length dependence of edge transistor PHIB offset")
-`MPRnb(DPHIBEDGELEXP ,1.0 ,"" ,"Exponent for length dependence of edge transistor PHIB offset")
-`MPRnb(DPHIBEDGEW ,0.0 ,"V" ,"Width dependence of edge transistor PHIB offset")
-`MPRnb(DPHIBEDGELW ,0.0 ,"V" ,"Area dependence of edge transistor PHIB offset")
-`MPRco(NSUBEDGEO ,5.0e23 ,"m^-3" ,1.0e20 ,inf ,"Geometry independent substrate doping of edge transistors")
-`MPRnb(NSUBEDGEL ,0.0 ,"" ,"Length dependence of edge transistor substrate doping")
-`MPRnb(NSUBEDGELEXP ,1.0 ,"" ,"Exponent for length dependence of edge transistor substrate doping")
-`MPRnb(NSUBEDGEW ,0.0 ,"" ,"Width dependence of edge transistor substrate doping")
-`MPRnb(NSUBEDGELW ,0.0 ,"" ,"Area dependence of edge transistor substrate doping")
-`MPRnb(CTEDGEO ,0.0 ,"" ,"Geometry-independent interface states factor of edge transistors")
-`MPRnb(CTEDGEL ,0.0 ,"" ,"Length dependence of interface states factor of edge transistors")
-`MPRnb(CTEDGELEXP ,1.0 ,"" ,"Exponent for length dependence of interface states factor of edge transistors")
-`MPRnb(FBETEDGE ,0.0 ,"" ,"Length dependence of edge transistor mobility")
-`MPRco(LPEDGE ,1.0e-8 ,"m" ,1.0e-10 ,inf ,"Exponent for length dependence of edge transistor mobility")
-`MPRnb(BETEDGEW ,0.0 ,"" ,"Width scaling coefficient of edge transistor mobility")
-`MPRnb(STBETEDGEO ,1.0 ,"" ,"Geometry independent temperature dependence of BETNEDGE")
-`MPRnb(STBETEDGEL ,0.0 ,"" ,"Length dependence of temperature dependence of BETNEDGE")
-`MPRnb(STBETEDGEW ,0.0 ,"" ,"Width dependence of temperature dependence of BETNEDGE")
-`MPRnb(STBETEDGELW ,0.0 ,"" ,"Area dependence of temperature dependence of BETNEDGE")
-`MPRnb(PSCEEDGEL ,0.0 ,"" ,"Length dependence of subthreshold slope coefficient for short channel edge transistors")
-`MPRnb(PSCEEDGELEXP ,2.0 ,"" ,"Exponent for length dependence of subthreshold slope coefficient for short channel edge transistors")
-`MPRnb(PSCEEDGEW ,0.0 ,"" ,"Exponent for length dependence of subthreshold slope coefficient for short channel edge transistor")
-`MPRcc(PSCEBEDGEO ,0.0 ,"V^-1" ,0.0 ,1.0 ,"Bulk voltage dependence parameter of subthreshold slope coefficient for short channel edge transistors")
-`MPRcz(PSCEDEDGEO ,0.0 ,"V^-1" ,"Drain voltage dependence parameter of subthreshold slope coefficient for short channel edge transistors")
-`MPRnb(CFEDGEL ,0.0 ,"" ,"Length dependence of DIBL-parameter of edge transistors")
-`MPRnb(CFEDGELEXP ,2.0 ,"" ,"Exponent for length dependence of DIBL-parameter of edge transistors")
-`MPRnb(CFEDGEW ,0.0 ,"" ,"Width dependence of DIBL-parameter of edge transistors")
-`MPRcz(CFDEDGEO ,0.0 ,"V^-1" ,"Drain voltage dependence parameter of DIBL-parameter of edge transistors")
-`MPRcc(CFBEDGEO ,0.0 ,"V^-1" ,0.0 ,1.0 ,"Bulk voltage dependence parameter of DIBL-parameter of edge transistors")
-`MPRnb(FNTEDGEO ,1.0 ,"" ,"Thermal noise coefficient")
-`MPRnb(NFAEDGELW ,8.0e22 ,"V^-1/m^4" ,"First coefficient of flicker noise for 1 um^2 channel area")
-`MPRnb(NFBEDGELW ,3.0e7 ,"V^-1/m^2" ,"Second coefficient of flicker noise for 1 um^2 channel area")
-`MPRnb(NFCEDGELW ,0.0 ,"V^-1" ,"Third coefficient of flicker noise for 1 um^2 channel area")
-`MPRnb(EFEDGEO ,1.0 ,"" ,"Flicker noise frequency exponent")
-
-// Well proximity effect Parameters
-`MPRnb(KVTHOWEO ,0.0 ,"" ,"Geometrical independent threshold shift parameter")
-`MPRnb(KVTHOWEL ,0.0 ,"" ,"Length dependent threshold shift parameter")
-`MPRnb(KVTHOWEW ,0.0 ,"" ,"Width dependent threshold shift parameter")
-`MPRnb(KVTHOWELW ,0.0 ,"" ,"Area dependent threshold shift parameter")
-`MPRnb(KUOWEO ,0.0 ,"" ,"Geometrical independent mobility degradation factor")
-`MPRnb(KUOWEL ,0.0 ,"" ,"Length dependent mobility degradation factor")
-`MPRnb(KUOWEW ,0.0 ,"" ,"Width dependent mobility degradation factor")
-`MPRnb(KUOWELW ,0.0 ,"" ,"Area dependent mobility degradation factor")
-
-// --------------------------------------------------------------------------------------------------------------
-// PSP global model parameters (binning)
-// --------------------------------------------------------------------------------------------------------------
-
-// Process parameters
-`MPRnb(POVFB ,-1.0 ,"V" ,"Coefficient for the geometry independent part of VFB")
-`MPRnb(PLVFB ,0.0 ,"V" ,"Coefficient for the length dependence of VFB")
-`MPRnb(PWVFB ,0.0 ,"V" ,"Coefficient for the width dependence of VFB")
-`MPRnb(PLWVFB ,0.0 ,"V" ,"Coefficient for the length times width dependence of VFB")
-`MPRnb(POSTVFB ,5.0e-4 ,"V/K" ,"Coefficient for the geometry independent part of STVFB")
-`MPRnb(PLSTVFB ,0.0 ,"V/K" ,"Coefficient for the length dependence of STVFB")
-`MPRnb(PWSTVFB ,0.0 ,"V/K" ,"Coefficient for the width dependence of STVFB")
-`MPRnb(PLWSTVFB ,0.0 ,"V/K" ,"Coefficient for the length times width dependence of STVFB")
-`MPRnb(POST2VFB ,0.0 ,"K^-1" ,"Coefficient for the geometry independent part of ST2VFB")
-`MPRnb(POTOX ,2.0e-9 ,"m" ,"Coefficient for the geometry independent part of TOX")
-`MPRnb(POEPSROX ,3.9 ,"" ,"Coefficient for the geometry independent part of EPSOX")
-`MPRnb(PONEFF ,5.0e23 ,"m^-3" ,"Coefficient for the geometry independent part of NEFF")
-`MPRnb(PLNEFF ,0.0 ,"m^-3" ,"Coefficient for the length dependence of NEFF")
-`MPRnb(PWNEFF ,0.0 ,"m^-3" ,"Coefficient for the width dependence of NEFF")
-`MPRnb(PLWNEFF ,0.0 ,"m^-3" ,"Coefficient for the length times width dependence of NEFF")
-`MPRnb(POFACNEFFAC ,1.0 ,"" ,"Coefficient for the geometry independent part of FACNEFFAC")
-`MPRnb(PLFACNEFFAC ,0.0 ,"" ,"Coefficient for the length dependence of FACNEFFAC")
-`MPRnb(PWFACNEFFAC ,0.0 ,"" ,"Coefficient for the width dependence of FACNEFFAC")
-`MPRnb(PLWFACNEFFAC ,0.0 ,"" ,"Coefficient for the length times width dependence of FACNEFFAC")
-`MPRnb(POGFACNUD ,1.0 ,"" ,"Coefficient for the geometry independent part of GFACNUD")
-`MPRnb(PLGFACNUD ,0.0 ,"" ,"Coefficient for the length dependence of GFACNUD")
-`MPRnb(PWGFACNUD ,0.0 ,"" ,"Coefficient for the width dependence of GFACNUD")
-`MPRnb(PLWGFACNUD ,0.0 ,"" ,"Coefficient for the length times width dependence of GFACNUD")
-`MPRnb(POVSBNUD ,0.0 ,"V" ,"Coefficient for the geometry independent part of VSBNUD")
-`MPRnb(PODVSBNUD ,1.0 ,"V" ,"Coefficient for the geometry independent part of DVSBNUD")
-`MPRnb(POVNSUB ,0.0 ,"V" ,"Coefficient for the geometry independent part of VNSUB")
-`MPRnb(PONSLP ,0.05 ,"V" ,"Coefficient for the geometry independent part of NSLP")
-`MPRnb(PODNSUB ,0.0 ,"V^-1" ,"Coefficient for the geometry independent part of DNSUB")
-`MPRnb(PODPHIB ,0.0 ,"V" ,"Coefficient for the geometry independent part of DPHIB")
-`MPRnb(PLDPHIB ,0.0 ,"V" ,"Coefficient for the length dependence of DPHIB")
-`MPRnb(PWDPHIB ,0.0 ,"V" ,"Coefficient for the width dependence of DPHIB")
-`MPRnb(PLWDPHIB ,0.0 ,"V" ,"Coefficient for the length times width dependence of DPHIB")
-`MPRnb(PODELVTAC ,0.0 ,"V" ,"Coefficient for the geometry independent part of DELVTAC")
-`MPRnb(PLDELVTAC ,0.0 ,"V" ,"Coefficient for the length dependence of DELVTAC")
-`MPRnb(PWDELVTAC ,0.0 ,"V" ,"Coefficient for the width dependence of DELVTAC")
-`MPRnb(PLWDELVTAC ,0.0 ,"V" ,"Coefficient for the length times width dependence of DELVTAC")
-`MPRnb(PONP ,1.0e26 ,"m^-3" ,"Coefficient for the geometry independent part of NP")
-`MPRnb(PLNP ,0.0 ,"m^-3" ,"Coefficient for the length dependence of NP")
-`MPRnb(PWNP ,0.0 ,"m^-3" ,"Coefficient for the width dependence of NP")
-`MPRnb(PLWNP ,0.0 ,"m^-3" ,"Coefficient for the length times width dependence of NP")
-`MPRnb(POTOXOV ,2.0e-09 ,"m" ,"Coefficient for the geometry independent part of TOXOV")
-`MPRnb(POTOXOVD ,2.0e-09 ,"m" ,"Coefficient for the geometry independent part of TOXOV for drain side")
-`MPRnb(PONOV ,5.0e25 ,"m^-3" ,"Coefficient for the geometry independent part of NOV")
-`MPRnb(PLNOV ,0.0 ,"m^-3" ,"Coefficient for the length dependence of NOV")
-`MPRnb(PWNOV ,0.0 ,"m^-3" ,"Coefficient for the width dependence of NOV")
-`MPRnb(PLWNOV ,0.0 ,"m^-3" ,"Coefficient for the length times width dependence of NOV")
-`MPRnb(PONOVD ,5.0e25 ,"m^-3" ,"Coefficient for the geometry independent part of NOV for drain side")
-`MPRnb(PLNOVD ,0.0 ,"m^-3" ,"Coefficient for the length dependence of NOV for drain side")
-`MPRnb(PWNOVD ,0.0 ,"m^-3" ,"Coefficient for the width dependence of NOV for drain side")
-`MPRnb(PLWNOVD ,0.0 ,"m^-3" ,"Coefficient for the length times width dependence of NOV for drain side")
-
-// Interface states parameters
-`MPRnb(POCT ,0.0 ,"" ,"Coefficient for the geometry independent part of CT")
-`MPRnb(PLCT ,0.0 ,"" ,"Coefficient for the length dependence of CT")
-`MPRnb(PWCT ,0.0 ,"" ,"Coefficient for the width dependence of CT")
-`MPRnb(PLWCT ,0.0 ,"" ,"Coefficient for the length times width dependence of CT")
-`MPRnb(POCTG ,0.0 ,"" ,"Coefficient for the geometry independent part of CTG")
-`MPRnb(POCTB ,0.0 ,"" ,"Coefficient for the geometry independent part of CTB")
-`MPRnb(POSTCT ,1.0 ,"" ,"Coefficient for the geometry independent part of STCT")
-
-// DIBL parameters
-`MPRnb(POCF ,0.0 ,"" ,"Coefficient for the geometry independent part of CF")
-`MPRnb(PLCF ,0.0 ,"" ,"Coefficient for the length dependence of CF")
-`MPRnb(PWCF ,0.0 ,"" ,"Coefficient for the width dependence of CF")
-`MPRnb(PLWCF ,0.0 ,"" ,"Coefficient for the length times width dependence of CF")
-`MPRnb(POCFAC ,0.0 ,"" ,"Coefficient for the geometry independent part of CFAC")
-`MPRnb(PLCFAC ,0.0 ,"" ,"Coefficient for the length dependence of CFAC")
-`MPRnb(PWCFAC ,0.0 ,"" ,"Coefficient for the width dependence of CFAC")
-`MPRnb(PLWCFAC ,0.0 ,"" ,"Coefficient for the length times width dependence of CFAC")
-`MPRnb(POCFD ,0.0 ,"V^-1" ,"Coefficient for the geometry independent part of CFD")
-`MPRnb(POCFB ,0.0 ,"V^-1" ,"Coefficient for the geometry independent part of CFB")
-
-// Subthreshold slope parameters of short channel transistor
-`MPRnb(POPSCE ,0.0 ,"" ,"Coefficient for the geometry independent part of PSCE")
-`MPRnb(PLPSCE ,0.0 ,"" ,"Coefficient for the length dependence of PSCE")
-`MPRnb(PWPSCE ,0.0 ,"" ,"Coefficient for the width dependence of PSCE")
-`MPRnb(PLWPSCE ,0.0 ,"" ,"Coefficient for the length times width dependence of PSCE")
-`MPRnb(POPSCEB ,0.0 ,"V^-1" ,"Coefficient for the geometry independent part of PSCEB")
-`MPRnb(POPSCED ,0.0 ,"V^-1" ,"Coefficient for the geometry independent part of PSCED")
-
-// Mobility parameters
-`MPRnb(POBETN ,7.0e-2 ,"m^2/V/s" ,"Coefficient for the geometry independent part of BETN")
-`MPRnb(PLBETN ,0.0 ,"m^2/V/s" ,"Coefficient for the length dependence of BETN")
-`MPRnb(PWBETN ,0.0 ,"m^2/V/s" ,"Coefficient for the width dependence of BETN")
-`MPRnb(PLWBETN ,0.0 ,"m^2/V/s" ,"Coefficient for the length times width dependence of BETN")
-`MPRnb(POSTBET ,1.0 ,"" ,"Coefficient for the geometry independent part of STBET")
-`MPRnb(PLSTBET ,0.0 ,"" ,"Coefficient for the length dependence of STBET")
-`MPRnb(PWSTBET ,0.0 ,"" ,"Coefficient for the width dependence of STBET")
-`MPRnb(PLWSTBET ,0.0 ,"" ,"Coefficient for the length times width dependence of STBET")
-`MPRnb(POMUE ,0.5 ,"m/V" ,"Coefficient for the geometry independent part of MUE")
-`MPRnb(PLMUE ,0.0 ,"m/V" ,"Coefficient for the length dependence of MUE")
-`MPRnb(PWMUE ,0.0 ,"m/V" ,"Coefficient for the width dependence of MUE")
-`MPRnb(PLWMUE ,0.0 ,"m/V" ,"Coefficient for the length times width dependence of MUE")
-`MPRnb(POSTMUE ,0.0 ,"" ,"Coefficient for the geometry independent part of STMUE")
-`MPRnb(POTHEMU ,1.5 ,"" ,"Coefficient for the geometry independent part of THEMU")
-`MPRnb(POSTTHEMU ,1.5 ,"" ,"Coefficient for the geometry independent part of STTHEMU")
-`MPRnb(POCS ,0.0 ,"" ,"Coefficient for the geometry independent part of CS")
-`MPRnb(PLCS ,0.0 ,"" ,"Coefficient for the length dependence of CS")
-`MPRnb(PWCS ,0.0 ,"" ,"Coefficient for the width dependence of CS")
-`MPRnb(PLWCS ,0.0 ,"" ,"Coefficient for the length times width dependence of CS")
-`MPRnb(POSTCS ,0.0 ,"" ,"Coefficient for the geometry independent part of STCS")
-`MPRnb(POTHECS ,2.0 ,"" ,"Coefficient for the geometry independent part of THECS")
-`MPRnb(POSTTHECS ,0.0 ,"" ,"Coefficient for the geometry independent part of STHTECS")
-`MPRnb(POXCOR ,0.0 ,"V^-1" ,"Coefficient for the geometry independent part of XCOR")
-`MPRnb(PLXCOR ,0.0 ,"V^-1" ,"Coefficient for the length dependence of XCOR")
-`MPRnb(PWXCOR ,0.0 ,"V^-1" ,"Coefficient for the width dependence of XCOR")
-`MPRnb(PLWXCOR ,0.0 ,"V^-1" ,"Coefficient for the length times width dependence of XCOR")
-`MPRnb(POSTXCOR ,0.0 ,"" ,"Coefficient for the geometry independent part of STXCOR")
-`MPRnb(POFETA ,1.0 ,"" ,"Coefficient for the geometry independent part of FETA")
-
-// Series resistance parameters
-`MPRnb(PORS ,30.0 ,"Ohm" ,"Coefficient for the geometry independent part of RS")
-`MPRnb(PLRS ,0.0 ,"Ohm" ,"Coefficient for the length dependence of RS")
-`MPRnb(PWRS ,0.0 ,"Ohm" ,"Coefficient for the width dependence of RS")
-`MPRnb(PLWRS ,0.0 ,"Ohm" ,"Coefficient for the length times width dependence of RS")
-`MPRnb(POSTRS ,1.0 ,"" ,"Coefficient for the geometry independent part of STRS")
-`MPRnb(PORSB ,0.0 ,"V^-1" ,"Coefficient for the geometry independent part of RSB")
-`MPRnb(PORSG ,0.0 ,"V^-1" ,"Coefficient for the geometry independent part of RSG")
-
-// Velocity saturation parameters
-`MPRnb(POTHESAT ,1.0 ,"V^-1" ,"Coefficient for the geometry independent part of THESAT")
-`MPRnb(PLTHESAT ,0.0 ,"V^-1" ,"Coefficient for the length dependence of THESAT")
-`MPRnb(PWTHESAT ,0.0 ,"V^-1" ,"Coefficient for the width dependence of THESAT")
-`MPRnb(PLWTHESAT ,0.0 ,"V^-1" ,"Coefficient for the length times width dependence of THESAT")
-`MPRnb(POTHESATAC ,1.0 ,"V^-1" ,"Coefficient for the geometry independent part of THESATAC")
-`MPRnb(PLTHESATAC ,0.0 ,"V^-1" ,"Coefficient for the length dependence of THESATAC")
-`MPRnb(PWTHESATAC ,0.0 ,"V^-1" ,"Coefficient for the width dependence of THESATAC")
-`MPRnb(PLWTHESATAC ,0.0 ,"V^-1" ,"Coefficient for the length times width dependence of THESATAC")
-`MPRnb(POSTTHESAT ,1.0 ,"" ,"Coefficient for the geometry independent part of STTHESAT")
-`MPRnb(PLSTTHESAT ,0.0 ,"" ,"Coefficient for the length dependence of STTHESAT")
-`MPRnb(PWSTTHESAT ,0.0 ,"" ,"Coefficient for the width dependence of STTHESAT")
-`MPRnb(PLWSTTHESAT ,0.0 ,"" ,"Coefficient for the length times width dependence of STTHESAT")
-`MPRnb(POTHESATB ,0.0 ,"V^-1" ,"Coefficient for the geometry independent part of THESATB")
-`MPRnb(PLTHESATB ,0.0 ,"V^-1" ,"Coefficient for the length dependence of THESATB")
-`MPRnb(PWTHESATB ,0.0 ,"V^-1" ,"Coefficient for the width dependence of THESATB")
-`MPRnb(PLWTHESATB ,0.0 ,"V^-1" ,"Coefficient for the length times width dependence of THESATB")
-`MPRnb(POTHESATG ,0.0 ,"V^-1" ,"Coefficient for the geometry independent part of THESATG")
-`MPRnb(PLTHESATG ,0.0 ,"V^-1" ,"Coefficient for the length dependence of THESATG")
-`MPRnb(PWTHESATG ,0.0 ,"V^-1" ,"Coefficient for the width dependence of THESATG")
-`MPRnb(PLWTHESATG ,0.0 ,"V^-1" ,"Coefficient for the length times width dependence of THESATG")
-
-// Saturation voltage parameters
-`MPRnb(POAX ,3.0 ,"" ,"Coefficient for the geometry independent part of AX")
-`MPRnb(PLAX ,0.0 ,"" ,"Coefficient for the length dependence of AX")
-`MPRnb(PWAX ,0.0 ,"" ,"Coefficient for the width dependence of AX")
-`MPRnb(PLWAX ,0.0 ,"" ,"Coefficient for the length times width dependence of AX")
-`MPRnb(POAXAC ,3.0 ,"" ,"Coefficient for the geometry independent part of AXAC")
-`MPRnb(PLAXAC ,0.0 ,"" ,"Coefficient for the length dependence of AXAC")
-`MPRnb(PWAXAC ,0.0 ,"" ,"Coefficient for the width dependence of AXAC")
-`MPRnb(PLWAXAC ,0.0 ,"" ,"Coefficient for the length times width dependence of AXAC")
-
-// Channel length modulation (CLM) parameters
-`MPRnb(POALP ,1.0e-2 ,"" ,"Coefficient for the geometry independent part of ALP")
-`MPRnb(PLALP ,0.0 ,"" ,"Coefficient for the length dependence of ALP")
-`MPRnb(PWALP ,0.0 ,"" ,"Coefficient for the width dependence of ALP")
-`MPRnb(PLWALP ,0.0 ,"" ,"Coefficient for the length times width dependence of ALP")
-`MPRnb(POALPAC ,1.0e-2 ,"" ,"Coefficient for the geometry independent part of ALPAC")
-`MPRnb(PLALPAC ,0.0 ,"" ,"Coefficient for the length dependence of ALPAC")
-`MPRnb(PWALPAC ,0.0 ,"" ,"Coefficient for the width dependence of ALPAC")
-`MPRnb(PLWALPAC ,0.0 ,"" ,"Coefficient for the length times width dependence of ALPAC")
-`MPRnb(POALP1 ,0.0 ,"V" ,"Coefficient for the geometry independent part of ALP1")
-`MPRnb(PLALP1 ,0.0 ,"V" ,"Coefficient for the length dependence of ALP1")
-`MPRnb(PWALP1 ,0.0 ,"V" ,"Coefficient for the width dependence of ALP1")
-`MPRnb(PLWALP1 ,0.0 ,"V" ,"Coefficient for the length times width dependence of ALP1")
-`MPRnb(POALP2 ,0.0 ,"V^-1" ,"Coefficient for the geometry independent part of ALP2")
-`MPRnb(PLALP2 ,0.0 ,"V^-1" ,"Coefficient for the length dependence of ALP2")
-`MPRnb(PWALP2 ,0.0 ,"V^-1" ,"Coefficient for the width dependence of ALP2")
-`MPRnb(PLWALP2 ,0.0 ,"V^-1" ,"Coefficient for the length times width dependence of ALP2")
-`MPRnb(POVP ,0.05 ,"V" ,"Coefficient for the geometry independent part of VP")
-
-// Impact ionization parameters
-`MPRnb(POA1 ,1.0 ,"" ,"Coefficient for the geometry independent part of A1")
-`MPRnb(PLA1 ,0.0 ,"" ,"Coefficient for the length dependence of A1")
-`MPRnb(PWA1 ,0.0 ,"" ,"Coefficient for the width dependence of A1")
-`MPRnb(PLWA1 ,0.0 ,"" ,"Coefficient for the length times width dependence of A1")
-`MPRnb(POA2 ,10.0 ,"V" ,"Coefficient for the geometry independent part of A2")
-`MPRnb(POSTA2 ,0.0 ,"V" ,"Coefficient for the geometry independent part of STA2")
-`MPRnb(POA3 ,1.0 ,"" ,"Coefficient for the geometry independent part of A3")
-`MPRnb(PLA3 ,0.0 ,"" ,"Coefficient for the length dependence of A3")
-`MPRnb(PWA3 ,0.0 ,"" ,"Coefficient for the width dependence of A3")
-`MPRnb(PLWA3 ,0.0 ,"" ,"Coefficient for the length times width dependence of A3")
-`MPRnb(POA4 ,0.0 ,"V^-0.5" ,"Coefficient for the geometry independent part of A4")
-`MPRnb(PLA4 ,0.0 ,"V^-0.5" ,"Coefficient for the length dependence of A4")
-`MPRnb(PWA4 ,0.0 ,"V^-0.5" ,"Coefficient for the width dependence of A4")
-`MPRnb(PLWA4 ,0.0 ,"V^-0.5" ,"Coefficient for the length times width dependence of A4")
-`MPRnb(POGCO ,0.0 ,"" ,"Coefficient for the geometry independent part of GCO")
-
-// Gate current parameters
-`MPRnb(POIGINV ,0.0 ,"A" ,"Coefficient for the geometry independent part of IGINV")
-`MPRnb(PLIGINV ,0.0 ,"A" ,"Coefficient for the length dependence of IGINV")
-`MPRnb(PWIGINV ,0.0 ,"A" ,"Coefficient for the width dependence of IGINV")
-`MPRnb(PLWIGINV ,0.0 ,"A" ,"Coefficient for the length times width dependence of IGINV")
-`MPRnb(POIGOV ,0.0 ,"A" ,"Coefficient for the geometry independent part of IGOV")
-`MPRnb(PLIGOV ,0.0 ,"A" ,"Coefficient for the length dependence of IGOV")
-`MPRnb(PWIGOV ,0.0 ,"A" ,"Coefficient for the width dependence of IGOV")
-`MPRnb(PLWIGOV ,0.0 ,"A" ,"Coefficient for the length times width dependence of IGOV")
-`MPRnb(POIGOVD ,0.0 ,"A" ,"Coefficient for the geometry independent part of IGOV for drain side")
-`MPRnb(PLIGOVD ,0.0 ,"A" ,"Coefficient for the length dependence of IGOV for drain side")
-`MPRnb(PWIGOVD ,0.0 ,"A" ,"Coefficient for the width dependence of IGOV for drain side")
-`MPRnb(PLWIGOVD ,0.0 ,"A" ,"Coefficient for the length times width dependence of IGOV for drain side")
-`MPRnb(POSTIG ,2.0 ,"" ,"Coefficient for the geometry independent part of STIG")
-`MPRnb(POGC2 ,0.375 ,"" ,"Coefficient for the geometry independent part of GC2")
-`MPRnb(POGC3 ,0.063 ,"" ,"Coefficient for the geometry independent part of GC3")
-`MPRnb(POGC2OV ,0.375 ,"" ,"Coefficient for the geometry independent part of GC2OV, used only when SWIGATE=2")
-`MPRnb(POGC3OV ,0.063 ,"" ,"Coefficient for the geometry independent part of GC3OV, used only when SWIGATE=2")
-`MPRnb(POCHIB ,3.1 ,"V" ,"Coefficient for the geometry independent part of CHIB")
-
-// Gate-induced drain leakage (GIDL) parameters
-`MPRnb(POAGIDL ,0.0 ,"A/V^3" ,"Coefficient for the geometry independent part of AGIDL")
-`MPRnb(PLAGIDL ,0.0 ,"A/V^3" ,"Coefficient for the length dependence of AGIDL")
-`MPRnb(PWAGIDL ,0.0 ,"A/V^3" ,"Coefficient for the width dependence of AGIDL")
-`MPRnb(PLWAGIDL ,0.0 ,"A/V^3" ,"Coefficient for the length times width dependence of AGIDL")
-`MPRnb(POAGIDLD ,0.0 ,"A/V^3" ,"Coefficient for the geometry independent part of AGIDL for drain side")
-`MPRnb(PLAGIDLD ,0.0 ,"A/V^3" ,"Coefficient for the length dependence of AGIDL for drain side")
-`MPRnb(PWAGIDLD ,0.0 ,"A/V^3" ,"Coefficient for the width dependence of AGIDL for drain side")
-`MPRnb(PLWAGIDLD ,0.0 ,"A/V^3" ,"Coefficient for the length times width dependence of AGIDL for drain side")
-`MPRnb(POBGIDL ,41.0 ,"V" ,"Coefficient for the geometry independent part of BGIDL")
-`MPRnb(POBGIDLD ,41.0 ,"V" ,"Coefficient for the geometry independent part of BGIDL for drain side")
-`MPRnb(POSTBGIDL ,0.0 ,"V/K" ,"Coefficient for the geometry independent part of STBGIDL")
-`MPRnb(POSTBGIDLD ,0.0 ,"V/K" ,"Coefficient for the geometry independent part of STBGIDL for drain side")
-`MPRnb(POCGIDL ,0.0 ,"" ,"Coefficient for the geometry independent part of CGIDL")
-`MPRnb(POCGIDLD ,0.0 ,"" ,"Coefficient for the geometry independent part of CGIDL for drain side")
-
-// Charge model parameters
-`MPRnb(POCOX ,1.0e-14 ,"F" ,"Coefficient for the geometry independent part of COX")
-`MPRnb(PLCOX ,0.0 ,"F" ,"Coefficient for the length dependence of COX")
-`MPRnb(PWCOX ,0.0 ,"F" ,"Coefficient for the width dependence of COX")
-`MPRnb(PLWCOX ,0.0 ,"F" ,"Coefficient for the length times width dependence of COX")
-`MPRnb(POCGOV ,1.0e-15 ,"F" ,"Coefficient for the geometry independent part of CGOV")
-`MPRnb(PLCGOV ,0.0 ,"F" ,"Coefficient for the length dependence of CGOV")
-`MPRnb(PWCGOV ,0.0 ,"F" ,"Coefficient for the width dependence of CGOV")
-`MPRnb(PLWCGOV ,0.0 ,"F" ,"Coefficient for the length times width dependence of CGOV")
-`MPRnb(POCGOVD ,1.0e-15 ,"F" ,"Coefficient for the geometry independent part of CGOV for drain side")
-`MPRnb(PLCGOVD ,0.0 ,"F" ,"Coefficient for the length dependence of CGOV for drain side")
-`MPRnb(PWCGOVD ,0.0 ,"F" ,"Coefficient for the width dependence of CGOV for drain side")
-`MPRnb(PLWCGOVD ,0.0 ,"F" ,"Coefficient for the length times width dependence of CGOV for drain side")
-`MPRnb(POCGBOV ,0.0 ,"F" ,"Coefficient for the geometry independent part of CGBOV")
-`MPRnb(PLCGBOV ,0.0 ,"F" ,"Coefficient for the length dependence of CGBOV")
-`MPRnb(PWCGBOV ,0.0 ,"F" ,"Coefficient for the width dependence of CGBOV")
-`MPRnb(PLWCGBOV ,0.0 ,"F" ,"Coefficient for the length times width dependence of CGBOV")
-`MPRnb(POCFR ,0.0 ,"F" ,"Coefficient for the geometry independent part of CFR")
-`MPRnb(PLCFR ,0.0 ,"F" ,"Coefficient for the length dependence of CFR")
-`MPRnb(PWCFR ,0.0 ,"F" ,"Coefficient for the width dependence of CFR")
-`MPRnb(PLWCFR ,0.0 ,"F" ,"Coefficient for the length times width dependence of CFR")
-`MPRnb(POCFRD ,0.0 ,"F" ,"Coefficient for the geometry independent part of CFR for drain side")
-`MPRnb(PLCFRD ,0.0 ,"F" ,"Coefficient for the length dependence of CFR for drain side")
-`MPRnb(PWCFRD ,0.0 ,"F" ,"Coefficient for the width dependence of CFR for drain side")
-`MPRnb(PLWCFRD ,0.0 ,"F" ,"Coefficient for the length times width dependence of CFR for drain side")
-
-// Noise model parameters
-`MPRnb(POFNT ,1.0 ,"" ,"Coefficient for the geometry independent part of FNT")
-`MPRnb(POFNTEXC ,0.0 ,"" ,"Coefficient for the geometry independent part of FNTEXC")
-`MPRnb(PLFNTEXC ,0.0 ,"" ,"Coefficient for the length dependence of FNTEXC")
-`MPRnb(PWFNTEXC ,0.0 ,"" ,"Coefficient for the width dependence of FNTEXC")
-`MPRnb(PLWFNTEXC ,0.0 ,"" ,"Coefficient for the length times width dependence of FNTEXC")
-`MPRnb(PONFA ,8.0e22 ,"V^-1/m^4" ,"Coefficient for the geometry independent part of NFA")
-`MPRnb(PLNFA ,0.0 ,"V^-1/m^4" ,"Coefficient for the length dependence of NFA")
-`MPRnb(PWNFA ,0.0 ,"V^-1/m^4" ,"Coefficient for the width dependence of NFA")
-`MPRnb(PLWNFA ,0.0 ,"V^-1/m^4" ,"Coefficient for the length times width dependence of NFA")
-`MPRnb(PONFB ,3.0e7 ,"V^-1/m^2" ,"Coefficient for the geometry independent part of NFB")
-`MPRnb(PLNFB ,0.0 ,"V^-1/m^2" ,"Coefficient for the length dependence of NFB")
-`MPRnb(PWNFB ,0.0 ,"V^-1/m^2" ,"Coefficient for the width dependence of NFB")
-`MPRnb(PLWNFB ,0.0 ,"V^-1/m^2" ,"Coefficient for the length times width dependence of NFB")
-`MPRnb(PONFC ,0.0 ,"V^-1" ,"Coefficient for the geometry independent part of NFC")
-`MPRnb(PLNFC ,0.0 ,"V^-1" ,"Coefficient for the length dependence of NFC")
-`MPRnb(PWNFC ,0.0 ,"V^-1" ,"Coefficient for the width dependence of NFC")
-`MPRnb(PLWNFC ,0.0 ,"V^-1" ,"Coefficient for the length times width dependence of NFC")
-`MPRnb(POEF ,1.0 ,"" ,"Coefficient for the flicker noise frequency exponent")
-
-// Edge transistor parameters: PSP 103.4
-`MPRnb(POVFBEDGE ,-1.0 ,"V" ,"Coefficient for the geometry independent part of VFBEDGE")
-`MPRnb(POSTVFBEDGE ,0.0 ,"V/K" ,"Coefficient for the geometry independent part of STVFBEDGE")
-`MPRnb(PLSTVFBEDGE ,0.0 ,"V/K" ,"Coefficient for the length dependence of STVFBEDGE")
-`MPRnb(PWSTVFBEDGE ,0.0 ,"V/K" ,"Coefficient for the width dependence of STVFBEDGE")
-`MPRnb(PLWSTVFBEDGE ,0.0 ,"V/K" ,"Coefficient for the length times width dependence of STVFBEDGE")
-`MPRnb(PODPHIBEDGE ,0.0 ,"V" ,"Coefficient for the geometry independent part of DPHIBEDGE")
-`MPRnb(PLDPHIBEDGE ,0.0 ,"V" ,"Coefficient for the length dependence of DPHIBEDGE")
-`MPRnb(PWDPHIBEDGE ,0.0 ,"V" ,"Coefficient for the width dependence of DPHIBEDGE")
-`MPRnb(PLWDPHIBEDGE ,0.0 ,"V" ,"Coefficient for the length times width dependence of DPHIBEDGE")
-`MPRnb(PONEFFEDGE ,5.0e23 ,"m^-3" ,"Coefficient for the geometry independent part of NEFFEDGE")
-`MPRnb(PLNEFFEDGE ,0.0 ,"m^-3" ,"Coefficient for the length dependence of NEFFEDGE")
-`MPRnb(PWNEFFEDGE ,0.0 ,"m^-3" ,"Coefficient for the width dependence of NEFFEDGE")
-`MPRnb(PLWNEFFEDGE ,0.0 ,"m^-3" ,"Coefficient for the length times width dependence of NEFFEDGE")
-`MPRnb(POCTEDGE ,0.0 ,"" ,"Coefficient for the geometry independent part of CTEDGE")
-`MPRnb(PLCTEDGE ,0.0 ,"" ,"Coefficient for the length dependence of CTEDGE")
-`MPRnb(PWCTEDGE ,0.0 ,"" ,"Coefficient for the width dependence of CTEDGE")
-`MPRnb(PLWCTEDGE ,0.0 ,"" ,"Coefficient for the length times width dependence of CTEDGE")
-`MPRnb(POBETNEDGE ,5.0e-4 ,"m^2/V/s" ,"Coefficient for the geometry independent part of BETNEDGE")
-`MPRnb(PLBETNEDGE ,0.0 ,"m^2/V/s" ,"Coefficient for the length dependence of BETNEDGE")
-`MPRnb(PWBETNEDGE ,0.0 ,"m^2/V/s" ,"Coefficient for the width dependence of BETNEDGE")
-`MPRnb(PLWBETNEDGE ,0.0 ,"m^2/V/s" ,"Coefficient for the length times width dependence of BETNEDGE")
-`MPRnb(POSTBETEDGE ,1.0 ,"" ,"Coefficient for the geometry independent part of STBETEDGE")
-`MPRnb(PLSTBETEDGE ,0.0 ,"" ,"Coefficient for the length dependence of STBETEDGE")
-`MPRnb(PWSTBETEDGE ,0.0 ,"" ,"Coefficient for the width dependence of STBETEDGE")
-`MPRnb(PLWSTBETEDGE ,0.0 ,"" ,"Coefficient for the length times width dependence of STBETEDGE")
-`MPRnb(POPSCEEDGE ,0.0 ,"" ,"Coefficient for the geometry independent part of PSCEEDGE")
-`MPRnb(PLPSCEEDGE ,0.0 ,"" ,"Coefficient for the length dependence of PSCEEDGE")
-`MPRnb(PWPSCEEDGE ,0.0 ,"" ,"Coefficient for the width dependence of PSCEEDGE")
-`MPRnb(PLWPSCEEDGE ,0.0 ,"" ,"Coefficient for the length times width dependence of PSCEEDGE")
-`MPRnb(POPSCEBEDGE ,0.0 ,"V^-1" ,"Coefficient for the geometry independent part of PSCEBEDGE")
-`MPRnb(POPSCEDEDGE ,0.0 ,"V^-1" ,"Coefficient for the geometry independent part of PSCEDEDGE")
-`MPRnb(POCFEDGE ,0.0 ,"" ,"Coefficient for the geometry independent part of CFEDGE")
-`MPRnb(PLCFEDGE ,0.0 ,"" ,"Coefficient for the length dependence of CFEDGE")
-`MPRnb(PWCFEDGE ,0.0 ,"" ,"Coefficient for the width dependence of CFEDGE")
-`MPRnb(PLWCFEDGE ,0.0 ,"" ,"Coefficient for the length times width dependence of CFEDGE")
-`MPRnb(POCFDEDGE ,0.0 ,"V^-1" ,"Coefficient for the geometry independent part of CFDEDGE")
-`MPRnb(POCFBEDGE ,0.0 ,"V^-1" ,"Coefficient for the geometry independent part of CFBEDGE")
-`MPRnb(POFNTEDGE ,1.0 ,"" ,"Coefficient for the geometry independent part of FNTEDGE")
-`MPRnb(PONFAEDGE ,8.0e22 ,"V^-1/m^4" ,"Coefficient for the geometry independent part of NFAEDGE")
-`MPRnb(PLNFAEDGE ,0.0 ,"V^-1/m^4" ,"Coefficient for the length dependence of NFAEDGE")
-`MPRnb(PWNFAEDGE ,0.0 ,"V^-1/m^4" ,"Coefficient for the width dependence of NFAEDGE")
-`MPRnb(PLWNFAEDGE ,0.0 ,"V^-1/m^4" ,"Coefficient for the length times width dependence of NFAEDGE")
-`MPRnb(PONFBEDGE ,3.0e7 ,"V^-1/m^2" ,"Coefficient for the geometry independent part of NFBEDGE")
-`MPRnb(PLNFBEDGE ,0.0 ,"V^-1/m^2" ,"Coefficient for the length dependence of NFBEDGE")
-`MPRnb(PWNFBEDGE ,0.0 ,"V^-1/m^2" ,"Coefficient for the width dependence of NFBEDGE")
-`MPRnb(PLWNFBEDGE ,0.0 ,"V^-1/m^2" ,"Coefficient for the length times width dependence of NFBEDGE")
-`MPRnb(PONFCEDGE ,0.0 ,"V^-1" ,"Coefficient for the geometry independent part of NFCEDGE")
-`MPRnb(PLNFCEDGE ,0.0 ,"V^-1" ,"Coefficient for the length dependence of NFCEDGE")
-`MPRnb(PWNFCEDGE ,0.0 ,"V^-1" ,"Coefficient for the width dependence of NFCEDGE")
-`MPRnb(PLWNFCEDGE ,0.0 ,"V^-1" ,"Coefficient for the length times width dependence of NFCEDGE")
-`MPRnb(POEFEDGE ,1.0 ,"" ,"Coefficient for the geometry independent part of EFEDGE")
-
-// Well proximity effect parameters
-`MPRnb(POKVTHOWE ,0.0 ,"" ,"Coefficient for the geometry independent part of KVTHOWE")
-`MPRnb(PLKVTHOWE ,0.0 ,"" ,"Coefficient for the length dependence part of KVTHOWE")
-`MPRnb(PWKVTHOWE ,0.0 ,"" ,"Coefficient for the width dependence part of KVTHOWE")
-`MPRnb(PLWKVTHOWE ,0.0 ,"" ,"Coefficient for the length times width dependence part of KVTHOWE")
-`MPRnb(POKUOWE ,0.0 ,"" ,"Coefficient for the geometry independent part of KUOWE")
-`MPRnb(PLKUOWE ,0.0 ,"" ,"Coefficient for the length dependence part of KUOWE")
-`MPRnb(PWKUOWE ,0.0 ,"" ,"Coefficient for the width dependence part of KUOWE")
-`MPRnb(PLWKUOWE ,0.0 ,"" ,"Coefficient for the length times width dependence part of KUOWE")
-
-// `Dummy' parameters for binning-set labeling
-`MPRnb(LMIN ,0 ,"m" ,"Dummy parameter to label binning set")
-`MPRnb(LMAX ,1.0 ,"m" ,"Dummy parameter to label binning set")
-`MPRnb(WMIN ,0.0 ,"m" ,"Dummy parameter to label binning set")
-`MPRnb(WMAX ,1.0 ,"m" ,"Dummy parameter to label binning set")
-
-// --------------------------------------------------------------------------------------------------------------
-// Parameters that occur in both global and binning model
-// --------------------------------------------------------------------------------------------------------------
-
-// NQS parameters
-`ifdef NQSmodel
- `MPRnb(MUNQSO ,1.0 ,"" ,"Relative mobility for NQS modelling")
-`endif // NQSmodel
-
-// Parasitic resistance parameters
-`MPRnb(RGO ,0.0 ,"Ohm" ,"Gate resistance")
-`MPRcz(RINT ,0.0 ,"Ohm m^2" ,"Contact resistance between silicide and ploy")
-`MPRcz(RVPOLY ,0.0 ,"Ohm m^2" ,"Vertical poly resistance")
-`MPRcz(RSHG ,0.0 ,"Ohm/sq" ,"Gate electrode diffusion sheet resistance")
-`MPRnb(DLSIL ,0.0 ,"m" ,"Silicide extension over the physical gate length")
-`MPRnb(RSH ,0.0 ,"Ohm/sq" ,"Sheet resistance of source diffusion")
-`MPRnb(RSHD ,0.0 ,"Ohm/sq" ,"Sheet resistance of drain diffusion")
-`MPRnb(RBULKO ,0.0 ,"Ohm" ,"Bulk resistance between node BP and BI")
-`MPRnb(RWELLO ,0.0 ,"Ohm" ,"Well resistance between node BI and B")
-`MPRnb(RJUNSO ,0.0 ,"Ohm" ,"Source-side bulk resistance between node BI and BS")
-`MPRnb(RJUNDO ,0.0 ,"Ohm" ,"Drain-side bulk resistance between node BI and BD")
-
-// Self heating effect parameters
-`ifdef SelfHeating
- `MPRnb(RTHO ,0.0 ,"K/W" ,"Geometry independent part of thermal resistance")
- `MPRnb(RTHW1 ,0.0 ,"K/W" ,"Width dependence of thermal resistance")
- `MPRnb(RTHW2 ,0.0 ,"" ,"Offset in width dependence of thermal resistance")
- `MPRnb(RTHLW ,0.0 ,"" ,"Length-correction to width dependence of thermal resistance")
- `MPRnb(CTHO ,0.0 ,"J/K" ,"Geometry independent part of thermal capacitance")
- `MPRnb(CTHW1 ,0.0 ,"J/K" ,"Width dependence of thermal capacitance")
- `MPRnb(CTHW2 ,0.0 ,"" ,"Offset in width dependence of thermal capacitance")
- `MPRnb(CTHLW ,0.0 ,"" ,"Length-correction to width dependence of thermal capacitance")
- `MPRnb(STRTHO ,0.0 ,"" ,"Temperature sensitivity of RTH")
-`endif // SelfHeating
-
-// Stress Model Parameters
-`MPRcc(SAREF ,1.0e-6 ,"m" ,1.0e-9 ,inf ,"Reference distance between OD-edge and poly from one side")
-`MPRcc(SBREF ,1.0e-6 ,"m" ,1.0e-9 ,inf ,"Reference distance between OD-edge and poly from other side")
-`MPRnb(WLOD ,0.0 ,"m" ,"Width parameter")
-`MPRnb(KUO ,0.0 ,"m" ,"Mobility degradation/enhancement coefficient")
-`MPRcc(KVSAT ,0.0 ,"m" ,-1.0 ,1.0 ,"Saturation velocity degradation/enhancement coefficient")
-`MPRcc(KVSATAC ,0.0 ,"m" ,-1.0 ,1.0 ,"Saturation velocity degradation/enhancement coefficient of charge model when SWQSAT=1")
-`MPRnb(TKUO ,0.0 ,"" ,"Temperature dependence of KUO")
-`MPRnb(LKUO ,0.0 ,"m^LLODKUO" ,"Length dependence of KUO")
-`MPRnb(WKUO ,0.0 ,"m^WLODKUO" ,"Width dependence of KUO")
-`MPRnb(PKUO ,0.0 ,"m^(LLODKUO+WLODKUO)" ,"Cross-term dependence of KUO")
-`MPRcz(LLODKUO ,0.0 ,"" ,"Length parameter for UO stress effect")
-`MPRcz(WLODKUO ,0.0 ,"" ,"Width parameter for UO stress effect")
-`MPRnb(KVTHO ,0.0 ,"Vm" ,"Threshold shift parameter")
-`MPRnb(LKVTHO ,0.0 ,"m^LLODVTH" ,"Length dependence of KVTHO")
-`MPRnb(WKVTHO ,0.0 ,"m^WLODVTH" ,"Width dependence of KVTHO")
-`MPRnb(PKVTHO ,0.0 ,"m^(LLODVTH+WLODVTH)" ,"Cross-term dependence of KVTHO")
-`MPRcz(LLODVTH ,0.0 ,"" ,"Length parameter for VTH-stress effect")
-`MPRcz(WLODVTH ,0.0 ,"" ,"Width parameter for VTH-stress effect")
-`MPRnb(STETAO ,0.0 ,"m" ,"Eta0 shift factor related to VTHO change")
-`MPRcz(LODETAO ,1.0 ,"" ,"Eta0 shift modification factor for stress effect")
-
-// Well proximity effect Parameters
-`MPRcz(SCREF ,1.0e-6 ,"m" ,"Distance between OD-edge and well edge of a reference device")
-`MPRnb(WEB ,0.0 ,"" ,"Coefficient for SCB")
-`MPRnb(WEC ,0.0 ,"" ,"Coefficient for SCC")
-
-// --------------------------------------------------------------------------------------------------------------
-// Other Parameters
-// --------------------------------------------------------------------------------------------------------------
-`MPRnb(DTA ,0.0 ,"K" ,"Temperature offset w.r.t. ambient temperature")
-
diff --git a/src/spicelib/devices/adms/psp103/admsva/PSP103_scaling.include b/src/spicelib/devices/adms/psp103/admsva/PSP103_scaling.include
deleted file mode 100644
index b588dfe43..000000000
--- a/src/spicelib/devices/adms/psp103/admsva/PSP103_scaling.include
+++ /dev/null
@@ -1,773 +0,0 @@
-//======================================================================================
-//======================================================================================
-// Filename: PSP103_scaling.include
-//======================================================================================
-//======================================================================================
-//
-// (c) Copyright notice
-//
-// Since 2015 until today, PSP has been co-developed by NXP Semiconductors and
-// CEA-Leti. For this part of the model, each claim undivided ownership and copyrights
-// Since 2012 until 2015, PSP has been co-developed by NXP Semiconductors and
-// Delft University of Technology. For this part of the model, each claim undivided
-// ownership and copyrights
-// Until and including 2011, PSP has been co-developed by NXP Semiconductors and
-// Arizona State University. For this part of the model, NXP Semiconductors claims
-// undivided ownership and copyrights.
-//
-//
-// Version: 103.7.0 (PSP), 200.6.0 (JUNCAP), April 2019
-//
-//======================================================================================
-//======================================================================================
-//
-// Further information can be found in the file releasenotesPSP103.txt
-//
-
-// Transistor geometry
-iL = `LEN / L_i;
-iW = `WEN / W_i;
-delLPS = LVARO * (1.0 + LVARL * iL) * (1.0 + LVARW * iW);
-delWOD = WVARO * (1.0 + WVARL * iL) * (1.0 + WVARW * iW);
-if (SWGEO_i == 2) begin
- delLPS = LVARO * (1.0 + LVARL * iL);
- delWOD = WVARO * (1.0 + WVARW * iW);
-end
-LE = `CLIP_LOW(L_i + delLPS - 2.0 * LAP, 1.0e-9);
-WE = `CLIP_LOW(W_i + delWOD - 2.0 * WOT, 1.0e-9);
-LEcv = `CLIP_LOW(L_i + delLPS - 2.0 * LAP + DLQ, 1.0e-9);
-WEcv = `CLIP_LOW(W_i + delWOD - 2.0 * WOT + DWQ, 1.0e-9);
-Lcv = `CLIP_LOW(L_i + delLPS + DLQ, 1.0e-9);
-Wcv = `CLIP_LOW(W_i + delWOD + DWQ, 1.0e-9);
-iLE = `LEN / LE;
-iWE = `WEN / WE;
-
-// Geometry for multi-finger devices
-L_f = `CLIP_LOW(L_i + delLPS, 1.0e-9);
-L_slif = `CLIP_LOW(L_f + DLSIL, 1.0e-9);
-W_f = `CLIP_LOW(W_i + delWOD, 1.0e-9);
-XGWE = `CLIP_LOW(XGW_i - 0.5 * delWOD, 1.0e-9);
-
-// Local model parameters
-VFB_p = VFB;
-STVFB_p = STVFB;
-ST2VFB_p = ST2VFB;
-TOX_p = TOX;
-EPSROX_p = EPSROX;
-NEFF_p = NEFF;
-FACNEFFAC_p = FACNEFFAC;
-GFACNUD_p = GFACNUD;
-VSBNUD_p = VSBNUD;
-DVSBNUD_p = DVSBNUD;
-VNSUB_p = VNSUB;
-NSLP_p = NSLP;
-DNSUB_p = DNSUB;
-DPHIB_p = DPHIB;
-DELVTAC_p = DELVTAC;
-NP_p = NP;
-TOXOV_p = TOXOV;
-TOXOVD_p = TOXOVD;
-NOV_p = NOV;
-NOVD_p = NOVD;
-CT_p = CT;
-CTG_p = CTG;
-CTB_p = CTB;
-STCT_p = STCT;
-PSCE_p = PSCE;
-PSCED_p = PSCED;
-PSCEB_p = PSCEB;
-CF_p = CF;
-`DefACparam(CFAC_p, CF, CFAC)
-CFD_p = CFD;
-CFB_p = CFB;
-BETN_p = BETN;
-STBET_p = STBET;
-MUE_p = MUE;
-STMUE_p = STMUE;
-THEMU_p = THEMU;
-STTHEMU_p = STTHEMU;
-CS_p = CS;
-STCS_p = STCS;
-THECS_p = THECS;
-STTHECS_p = STTHECS;
-XCOR_p = XCOR;
-STXCOR_p = STXCOR;
-FETA_p = FETA;
-RS_p = RS;
-STRS_p = STRS;
-RSB_p = RSB;
-RSG_p = RSG;
-THESAT_p = THESAT;
-`DefACparam(THESATAC_p, THESAT, THESATAC)
-STTHESAT_p = STTHESAT;
-THESATB_p = THESATB;
-THESATG_p = THESATG;
-AX_p = AX;
-`DefACparam(AXAC_p, AX, AXAC)
-ALP_p = ALP;
-`DefACparam(ALPAC_p, ALP, ALPAC)
-ALP1_p = ALP1;
-ALP2_p = ALP2;
-VP_p = VP;
-A1_p = A1;
-A2_p = A2;
-STA2_p = STA2;
-A3_p = A3;
-A4_p = A4;
-GCO_p = GCO;
-IGINV_p = IGINV;
-IGOV_p = IGOV;
-IGOVD_p = IGOVD;
-STIG_p = STIG;
-GC2_p = GC2;
-GC3_p = GC3;
-GC2OV_p = GC2OV;
-GC3OV_p = GC3OV;
-CHIB_p = CHIB;
-AGIDL_p = AGIDL;
-AGIDLD_p = AGIDLD;
-BGIDL_p = BGIDL;
-BGIDLD_p = BGIDLD;
-STBGIDL_p = STBGIDL;
-STBGIDLD_p = STBGIDLD;
-CGIDL_p = CGIDL;
-CGIDLD_p = CGIDLD;
-COX_p = COX;
-CGOV_p = CGOV;
-CGOVD_p = CGOVD;
-CGBOV_p = CGBOV;
-CFR_p = CFR;
-CFRD_p = CFRD;
-FNT_p = FNT;
-FNTEXC_p = FNTEXC;
-NFA_p = NFA;
-NFB_p = NFB;
-NFC_p = NFC;
-EF_p = EF;
-VFBEDGE_p = VFBEDGE;
-STVFBEDGE_p = STVFBEDGE;
-DPHIBEDGE_p = DPHIBEDGE;
-NEFFEDGE_p = NEFFEDGE;
-CTEDGE_p = CTEDGE;
-BETNEDGE_p = BETNEDGE;
-STBETEDGE_p = STBETEDGE;
-PSCEEDGE_p = PSCEEDGE;
-PSCEBEDGE_p = PSCEBEDGE;
-PSCEDEDGE_p = PSCEDEDGE;
-CFEDGE_p = CFEDGE;
-CFDEDGE_p = CFDEDGE;
-CFBEDGE_p = CFBEDGE;
-FNTEDGE_p = FNTEDGE;
-NFAEDGE_p = NFAEDGE;
-NFBEDGE_p = NFBEDGE;
-NFCEDGE_p = NFCEDGE;
-EFEDGE_p = EFEDGE;
-RG_p = RG;
-RSE_p = RSE;
-RDE_p = RDE;
-RWELL_p = RWELL;
-RBULK_p = RBULK;
-RJUNS_p = RJUNS;
-RJUND_p = RJUND;
-`ifdef SelfHeating
- RTH_p = RTH;
- CTH_p = CTH;
- STRTH_p = STRTH;
-`endif // SelfHeating
-`ifdef NQSmodel
- MUNQS_p = MUNQS;
-`endif // NQSmodel
-
-// Geometry scaling with physical scaling rules
-if (SWGEO_i == 1) begin
- // Process parameters
- VFB_p = VFBO + VFBL * iLE + VFBW * iWE + VFBLW * iLE * iWE;
- STVFB_p = STVFBO + STVFBL * iLE + STVFBW * iWE + STVFBLW * iLE * iWE;
- ST2VFB_p = ST2VFBO;
- TOX_p = TOXO;
- EPSROX_p = EPSROXO;
- NSUB0e = NSUBO_i * `MAX(( 1.0 + NSUBW * iWE * ln( 1.0 + WE / WSEG_i )), 1.0e-03);
- NPCKe = NPCK_i * `MAX(( 1.0 + NPCKW * iWE * ln( 1.0 + WE / WSEGP_i )), 1.0e-03);
- LPCKe = LPCK_i * `MAX(( 1.0 + LPCKW * iWE * ln( 1.0 + WE / WSEGP_i )), 1.0e-03);
- if (LE > (2.0 * LPCKe)) begin
- AA = 7.5e10;
- BB = sqrt(NSUB0e + 0.5 * NPCKe) - sqrt(NSUB0e);
- NSUB = sqrt(NSUB0e) + AA * ln(1.0 + 2.0 * LPCKe / LE * (exp(BB / AA) - 1.0));
- NSUB = NSUB * NSUB;
- end else begin
- if (LE >= LPCKe) begin
- NSUB = NSUB0e + NPCKe * LPCKe / LE;
- end else begin // LE < LPCK
- NSUB = NSUB0e + NPCKe * (2.0 - LE / LPCKe);
- end
- end
- NEFF_p = NSUB * (1.0 - FOL1 * iLE - FOL2 * iLE * iLE);
- FACNEFFAC_p = FACNEFFACO + FACNEFFACL * iLE + FACNEFFACW * iWE + FACNEFFACLW * iLE * iWE;
- GFACNUD_p = GFACNUDO + GFACNUDL * pow(iLE, GFACNUDLEXP) + GFACNUDW * iWE + GFACNUDLW * iLE * iWE;
- VSBNUD_p = VSBNUDO;
- DVSBNUD_p = DVSBNUDO;
- VNSUB_p = VNSUBO;
- NSLP_p = NSLPO;
- DNSUB_p = DNSUBO;
- DPHIB_p = DPHIBO + DPHIBL * pow(iLE, DPHIBLEXP) + DPHIBW * iWE + DPHIBLW * iLE * iWE;
- DELVTAC_p = DELVTACO + DELVTACL * pow(iLE, DELVTACLEXP) + DELVTACW * iWE + DELVTACLW * iLE * iWE;
- NP_p = NPO * `MAX(1.0e-6, (1.0 + NPL * iLE));
- TOXOV_p = TOXOVO;
- TOXOVD_p = TOXOVDO;
- NOV_p = NOVO;
- NOVD_p = NOVDO;
-
- // Interface states parameters
- CT_p = (CTO + CTL * pow(iLE, CTLEXP)) * (1.0 + CTW * iWE) * (1.0 + CTLW * iLE * iWE);
- CTG_p = CTGO;
- CTB_p = CTBO;
- STCT_p = STCTO;
-
- // DIBL parameters
- CF_p = CFL * pow(iLE, CFLEXP) * (1.0 + CFW * iWE);
- CFAC_p = CFACL_i * pow(iLE, CFACLEXP_i) * (1.0 + CFACW_i * iWE);
- CFD_p = CFDO;
- CFB_p = CFBO;
-
- // Subthreshold slope parameters of short channel transistor
- PSCE_p = PSCEL * pow(iLE, PSCELEXP) * (1.0 + PSCEW * iWE);
- PSCED_p = PSCEDO;
- PSCEB_p = PSCEBO;
-
- // Mobility parameters
- FBET1e = FBET1 * (1.0 + FBET1W * iWE);
- LP1e = LP1_i * `MAX(1.0 + LP1W * iWE, 1.0e-03);
- GPE = 1.0 + FBET1e * LP1e / LE * (1.0 - exp(-LE / LP1e)) + FBET2 * LP2_i / LE * (1.0 - exp(-LE / LP2_i));
- GPE = `MAX(GPE, 1.0e-15);
- GWE = 1.0 + BETW1 * iWE + BETW2 * iWE * ln(1.0 + WE / WBET_i);
- BETN_p = UO * WE / (GPE * LE) * GWE;
- STBET_p = STBETO + STBETL * iLE + STBETW * iWE + STBETLW * iLE * iWE;
- MUE_p = MUEO * (1.0 + MUEW * iWE);
- STMUE_p = STMUEO;
- THEMU_p = THEMUO;
- STTHEMU_p = STTHEMUO;
- CS_p = (CSO + CSL * pow(iLE, CSLEXP)) * (1.0 + CSW * iWE) * (1.0 + CSLW * iLE * iWE);
- STCS_p = STCSO;
- THECS_p = THECSO;
- STTHECS_p = STTHECSO;
- XCOR_p = XCORO * (1.0 + XCORL * iLE) * (1.0 + XCORW * iWE) * (1.0 + XCORLW * iLE * iWE);
- STXCOR_p = STXCORO;
- FETA_p = FETAO;
-
- // Series resistance
- RS_p = RSW1 * iWE * (1.0 + RSW2 * iWE);
- STRS_p = STRSO;
- RSB_p = RSBO;
- RSG_p = RSGO;
-
- // Velocity saturation
- THESAT_p = (THESATO + THESATL * GWE / GPE * pow(iLE, THESATLEXP)) * (1.0 + THESATW * iWE) * (1.0 + THESATLW * iLE * iWE);
- THESATAC_p = (THESATACO_i + THESATACL_i * GWE / GPE * pow(iLE, THESATACLEXP_i)) * (1.0 + THESATACW_i * iWE) * (1.0 + THESATACLW_i * iLE * iWE);
- STTHESAT_p = STTHESATO + STTHESATL * iLE + STTHESATW * iWE + STTHESATLW * iLE * iWE;
- THESATB_p = THESATBO;
- THESATG_p = THESATGO;
-
- // Saturation voltage
- AX_p = AXO / (1.0 + AXL_i * iLE);
- AXAC_p = AXACO_i / (1.0 + AXACL_i * iLE);
-
- // Channel length modulation
- ALP_p = ALPL * pow(iLE, ALPLEXP) * (1.0 + ALPW * iWE);
- ALPAC_p = ALPACL_i * pow(iLE, ALPACLEXP_i) * (1.0 + ALPACW_i * iWE);
- tmpx = pow(iLE, ALP1LEXP);
- ALP1_p = ALP1L1 * tmpx * (1.0 + ALP1W * iWE) / (1.0 + ALP1L2_i * iLE * tmpx);
- tmpx = pow(iLE, ALP2LEXP);
- ALP2_p = ALP2L1 * tmpx * (1.0 + ALP2W * iWE) / (1.0 + ALP2L2_i * iLE * tmpx);
- VP_p = VPO;
-
- // Impact ionization
- A1_p = A1O * (1.0 + A1L * iLE) * (1.0 + A1W * iWE);
- A2_p = A2O;
- STA2_p = STA2O;
- A3_p = A3O * (1.0 + A3L * iLE) * (1.0 + A3W * iWE);
- A4_p = A4O * (1.0 + A4L * iLE) * (1.0 + A4W * iWE);
-
- // Gate current
- GCO_p = GCOO;
- IGINV_p = IGINVLW / (iWE * iLE);
- IGOV_p = IGOVW * LOV_i / (`LEN * iWE);
- IGOVD_p = IGOVDW * LOVD_i / (`LEN * iWE);
- STIG_p = STIGO;
- GC2_p = GC2O;
- GC3_p = GC3O;
- GC2OV_p = GC2OVO;
- GC3OV_p = GC3OVO;
- CHIB_p = CHIBO;
-
- // GIDL
- AGIDL_p = AGIDLW * LOV_i / (`LEN * iWE);
- AGIDLD_p = AGIDLDW * LOVD_i / (`LEN * iWE);
- BGIDL_p = BGIDLO;
- BGIDLD_p = BGIDLDO;
- STBGIDL_p = STBGIDLO;
- STBGIDLD_p = STBGIDLDO;
- CGIDL_p = CGIDLO;
- CGIDLD_p = CGIDLDO;
-
- // Charge model parameters
- COX_p = `EPSO * EPSROXO_i * WEcv * LEcv / TOXO_i;
- CGOV_p = `EPSO * EPSROXO_i * WEcv * LOV_i / TOXOVO_i;
- CGOVD_p = `EPSO * EPSROXO_i * WEcv * LOVD_i / TOXOVDO_i;
- CGBOV_p = CGBOVL * Lcv / `LEN;
- CFR_p = CFRW * Wcv / `WEN;
- CFRD_p = CFRDW * Wcv / `WEN;
-
- // Noise model parameters
- temp0 = 1.0 - 2.0 * LINTNOI * iLE / `LEN;
- Lnoi = `MAX(temp0, 1.0e-3);
- Lred = 1.0 / pow(Lnoi, ALPNOI);
- FNT_p = FNTO;
- FNTEXC_p = FNTEXCL * BETN_p * BETN_p * iWE * iWE;
- NFA_p = Lred * iWE * iLE * NFALW;
- NFB_p = Lred * iWE * iLE * NFBLW;
- NFC_p = Lred * iWE * iLE * NFCLW;
- EF_p = EFO;
-
- // Edge transistors: PSP 103.4
- WE_edge = 2.0 * WEDGE + WEDGEW * WE;
- iWE_edge = `WEN / WE_edge;
- VFBEDGE_p = VFBEDGEO;
- STVFBEDGE_p = STVFBEDGEO + STVFBEDGEL * iLE + STVFBEDGEW * iWE + STVFBEDGELW * iLE * iWE;
- DPHIBEDGE_p = DPHIBEDGEO + DPHIBEDGEL * pow(iLE, DPHIBEDGELEXP) + DPHIBEDGEW * iWE + DPHIBEDGELW * iLE * iWE;
- NEFFEDGE_p = NSUBEDGEO_i * (1.0 + NSUBEDGEL * pow(iLE, NSUBEDGELEXP)) * ( 1.0 + NSUBEDGEW * iWE) * ( 1.0 + NSUBEDGELW * iLE * iWE);
- CTEDGE_p = CTEDGEO + CTEDGEL * pow(iLE, CTEDGELEXP);
- GPE_edge = 1.0 + FBETEDGE * LPEDGE_i / LE * (1.0 - exp(-LE / LPEDGE_i));
- GPE_edge = `MAX(GPE_edge, 1.0e-15);
- BETNEDGE_p = UO * WE_edge / (GPE_edge * LE) * (1.0 + BETEDGEW * iWE);
- STBETEDGE_p = STBETEDGEO + STBETEDGEL * iLE + STBETEDGEW * iWE + STBETEDGELW * iLE * iWE;
- PSCEEDGE_p = PSCEEDGEL * pow(iLE, PSCEEDGELEXP) * (1.0 + PSCEEDGEW * iWE);
- PSCEBEDGE_p = PSCEBEDGEO;
- PSCEDEDGE_p = PSCEDEDGEO;
- CFEDGE_p = CFEDGEL * pow(iLE, CFEDGELEXP) * (1.0 + CFEDGEW * iWE);
- CFDEDGE_p = CFDEDGEO;
- CFBEDGE_p = CFBEDGEO;
- FNTEDGE_p = FNTEDGEO;
- NFAEDGE_p = iWE_edge * iLE * NFAEDGELW;
- NFBEDGE_p = iWE_edge * iLE * NFBEDGELW;
- NFCEDGE_p = iWE_edge * iLE * NFCEDGELW;
- EFEDGE_p = EFEDGEO;
-end
-
-// Well proximity effect parameters
-KVTHOWE = KVTHOWEO + KVTHOWEL * iLE + KVTHOWEW * iWE + KVTHOWELW * iLE * iWE;
-KUOWE = KUOWEO + KUOWEL * iLE + KUOWEW * iWE + KUOWELW * iLE * iWE;
-
-// Geometry scaling with binning scaling rules
-if (SWGEO_i == 2) begin
-
- // auxiliary variables
- iLEWE = iLE * iWE;
- iiLE = LE / `LEN;
- iiWE = WE / `WEN;
- iiLEWE = iiLE * iiWE;
- iiiLEWE = iiWE / iiLE;
-
- // auxiliary variables for COX only
- iiLEcv = LEcv / `LEN;
- iiWEcv = WEcv / `WEN;
- iiLEWEcv = iiLEcv * iiWEcv;
-
- // auxiliary variables for CGOV only
- iLEcv = `LEN / LEcv;
- iiiLEWEcv = iiWEcv / iiLEcv;
-
- // auxiliary variables for CGBOV only
- iiLcv = Lcv / `LEN;
- iiWcv = Wcv / `WEN;
- iiLWcv = iiLcv * iiWcv;
-
- // auxiliary variables for CFR only
- iLcv = `LEN / Lcv;
- iiiLWcv = iiWcv / iiLcv;
-
- // Process parameters
- VFB_p = POVFB + iLE * PLVFB + iWE * PWVFB + iLEWE * PLWVFB;
- STVFB_p = POSTVFB + iLE * PLSTVFB + iWE * PWSTVFB + iLEWE * PLWSTVFB;
- ST2VFB_p = POST2VFB;
- TOX_p = POTOX;
- EPSROX_p = POEPSROX;
- NEFF_p = PONEFF + iLE * PLNEFF + iWE * PWNEFF + iLEWE * PLWNEFF;
- FACNEFFAC_p = POFACNEFFAC + iLE * PLFACNEFFAC + iWE * PWFACNEFFAC + iLEWE * PLWFACNEFFAC;
- GFACNUD_p = POGFACNUD + PLGFACNUD * iLE + PWGFACNUD * iWE + PLWGFACNUD * iLE * iWE;
- VSBNUD_p = POVSBNUD;
- DVSBNUD_p = PODVSBNUD;
- VNSUB_p = POVNSUB;
- NSLP_p = PONSLP;
- DNSUB_p = PODNSUB;
- DPHIB_p = PODPHIB + iLE * PLDPHIB + iWE * PWDPHIB + iLEWE * PLWDPHIB;
- DELVTAC_p = PODELVTAC + iLE * PLDELVTAC + iWE * PWDELVTAC + iLEWE * PLWDELVTAC;
- NP_p = PONP + iLE * PLNP + iWE * PWNP + iLEWE * PLWNP;
- TOXOV_p = POTOXOV;
- TOXOVD_p = POTOXOVD;
- NOV_p = PONOV + iLE * PLNOV + iWE * PWNOV + iLEWE * PLWNOV;
- NOVD_p = PONOVD + iLE * PLNOVD + iWE * PWNOVD + iLEWE * PLWNOVD;
-
- // Interface states parameters
- CT_p = POCT + iLE * PLCT + iWE * PWCT + iLEWE * PLWCT;
- CTG_p = POCTG;
- CTB_p = POCTB;
- STCT_p = POSTCT;
-
- // DIBL parameters
- CF_p = POCF + iLE * PLCF + iWE * PWCF + iLEWE * PLWCF;
- CFAC_p = POCFAC_i + iLE * PLCFAC_i + iWE * PWCFAC_i + iLEWE * PLWCFAC_i;
- CFD_p = POCFD;
- CFB_p = POCFB;
-
- // Subthreshold slope parameters of short channel transistor
- PSCE_p = POPSCE + iLE * PLPSCE + iWE * PWPSCE + iLEWE * PLWPSCE;
- PSCEB_p = POPSCEB;
- PSCED_p = POPSCED;
-
- // Mobility parameters
- BETN_p = iiWE * iLE * (POBETN + iLE * PLBETN + iWE * PWBETN + iLEWE * PLWBETN);
- STBET_p = POSTBET + iLE * PLSTBET + iWE * PWSTBET + iLEWE * PLWSTBET;
- MUE_p = POMUE + iLE * PLMUE + iWE * PWMUE + iLEWE * PLWMUE;
- STMUE_p = POSTMUE;
- THEMU_p = POTHEMU;
- STTHEMU_p = POSTTHEMU;
- CS_p = POCS + iLE * PLCS + iWE * PWCS + iLEWE * PLWCS;
- STCS_p = POSTCS;
- THECS_p = POTHECS;
- STTHECS_p = POSTTHECS;
- XCOR_p = POXCOR + iLE * PLXCOR + iWE * PWXCOR + iLEWE * PLWXCOR;
- STXCOR_p = POSTXCOR;
- FETA_p = POFETA;
-
- // Series resistance parameters
- RS_p = PORS + iLE * PLRS + iWE * PWRS + iLEWE * PLWRS;
- STRS_p = POSTRS;
- RSB_p = PORSB;
- RSG_p = PORSG;
-
- // Velocity saturation parameters
- THESAT_p = POTHESAT + iLE * PLTHESAT + iWE * PWTHESAT + iLEWE * PLWTHESAT;
- THESATAC_p = POTHESATAC_i + iLE * PLTHESATAC_i + iWE * PWTHESATAC_i + iLEWE * PLWTHESATAC_i;
- STTHESAT_p = POSTTHESAT + iLE * PLSTTHESAT + iWE * PWSTTHESAT + iLEWE * PLWSTTHESAT;
- THESATB_p = POTHESATB + iLE * PLTHESATB + iWE * PWTHESATB + iLEWE * PLWTHESATB;
- THESATG_p = POTHESATG + iLE * PLTHESATG + iWE * PWTHESATG + iLEWE * PLWTHESATG;
-
- // Saturation voltage parameters
- AX_p = POAX + iLE * PLAX + iWE * PWAX + iLEWE * PLWAX;
- AXAC_p = POAXAC_i + iLE * PLAXAC_i + iWE * PWAXAC_i + iLEWE * PLWAXAC_i;
-
- // Channel length modulation (CLM) parameters
- ALP_p = POALP + iLE * PLALP + iWE * PWALP + iLEWE * PLWALP;
- ALPAC_p = POALPAC_i + iLE * PLALPAC_i + iWE * PWALPAC_i + iLEWE * PLWALPAC_i;
- ALP1_p = POALP1 + iLE * PLALP1 + iWE * PWALP1 + iLEWE * PLWALP1;
- ALP2_p = POALP2 + iLE * PLALP2 + iWE * PWALP2 + iLEWE * PLWALP2;
- VP_p = POVP;
-
- // Impact ionization parameters
- A1_p = POA1 + iLE * PLA1 + iWE * PWA1 + iLEWE * PLWA1;
- A2_p = POA2;
- STA2_p = POSTA2;
- A3_p = POA3 + iLE * PLA3 + iWE * PWA3 + iLEWE * PLWA3;
- A4_p = POA4 + iLE * PLA4 + iWE * PWA4 + iLEWE * PLWA4;
- GCO_p = POGCO;
-
- // Gate current parameters
- IGINV_p = POIGINV + iiLE * PLIGINV + iiWE * PWIGINV + iiLEWE * PLWIGINV;
- IGOV_p = POIGOV + iLE * PLIGOV + iiWE * PWIGOV + iiiLEWE * PLWIGOV;
- IGOVD_p = POIGOVD + iLE * PLIGOVD + iiWE * PWIGOVD + iiiLEWE * PLWIGOVD;
- STIG_p = POSTIG;
- GC2_p = POGC2;
- GC3_p = POGC3;
- GC2OV_p = POGC2OV;
- GC3OV_p = POGC3OV;
- CHIB_p = POCHIB;
-
- // Gate-induced drain leakage (GIDL) parameters
- AGIDL_p = POAGIDL + iLE * PLAGIDL + iiWE * PWAGIDL + iiiLEWE * PLWAGIDL;
- AGIDLD_p = POAGIDLD + iLE * PLAGIDLD + iiWE * PWAGIDLD + iiiLEWE * PLWAGIDLD;
- BGIDL_p = POBGIDL;
- BGIDLD_p = POBGIDLD;
- STBGIDL_p = POSTBGIDL;
- STBGIDLD_p = POSTBGIDLD;
- CGIDL_p = POCGIDL;
- CGIDLD_p = POCGIDLD;
-
- // Charge model parameters
- COX_p = POCOX + iiLEcv * PLCOX + iiWEcv * PWCOX + iiLEWEcv * PLWCOX;
- CGOV_p = POCGOV + iLEcv * PLCGOV + iiWEcv * PWCGOV + iiiLEWEcv * PLWCGOV;
- CGOVD_p = POCGOVD + iLEcv * PLCGOVD + iiWEcv * PWCGOVD + iiiLEWEcv * PLWCGOVD;
- CGBOV_p = POCGBOV + iiLcv * PLCGBOV + iiWcv * PWCGBOV + iiLWcv * PLWCGBOV;
- CFR_p = POCFR + iLcv * PLCFR + iiWcv * PWCFR + iiiLWcv * PLWCFR;
- CFRD_p = POCFRD + iLcv * PLCFRD + iiWcv * PWCFRD + iiiLWcv * PLWCFRD;
-
- // Noise model parameters
- FNT_p = POFNT;
- FNTEXC_p = iLE * iLE * (POFNTEXC + iLE * PLFNTEXC + iWE * PWFNTEXC + iLEWE * PLWFNTEXC);
- NFA_p = PONFA + iLE * PLNFA + iWE * PWNFA + iLEWE * PLWNFA;
- NFB_p = PONFB + iLE * PLNFB + iWE * PWNFB + iLEWE * PLWNFB;
- NFC_p = PONFC + iLE * PLNFC + iWE * PWNFC + iLEWE * PLWNFC;
- EF_p = POEF;
-
- // Edge transistor: PSP 103.4
- VFBEDGE_p = POVFBEDGE;
- STVFBEDGE_p = POSTVFBEDGE + iLE * PLSTVFBEDGE + iWE * PWSTVFBEDGE + iLEWE * PLWSTVFBEDGE;
- DPHIBEDGE_p = PODPHIBEDGE + iLE * PLDPHIBEDGE + iWE * PWDPHIBEDGE + iLEWE * PLWDPHIBEDGE;
- NEFFEDGE_p = PONEFFEDGE + iLE * PLNEFFEDGE + iWE * PWNEFFEDGE + iLEWE * PLWNEFFEDGE;
- CTEDGE_p = POCTEDGE + iLE * PLCTEDGE + iWE * PWCTEDGE + iLEWE * PLWCTEDGE;
- BETNEDGE_p = iLE * (POBETNEDGE + iLE * PLBETNEDGE + iWE * PWBETNEDGE + iLEWE * PLWBETNEDGE);
- STBETEDGE_p = POSTBETEDGE + iLE * PLSTBETEDGE + iWE * PWSTBETEDGE + iLEWE * PLWSTBETEDGE;
- PSCEEDGE_p = POPSCEEDGE + iLE * PLPSCEEDGE + iWE * PWPSCEEDGE + iLEWE * PLWPSCEEDGE;
- PSCEBEDGE_p = POPSCEBEDGE;
- PSCEDEDGE_p = POPSCEDEDGE;
- CFEDGE_p = POCFEDGE + iLE * PLCFEDGE + iWE * PWCFEDGE + iLEWE * PLWCFEDGE;
- CFDEDGE_p = POCFDEDGE;
- CFBEDGE_p = POCFBEDGE;
- FNTEDGE_p = POFNTEDGE;
- NFAEDGE_p = PONFAEDGE + iLE * PLNFAEDGE + iWE * PWNFAEDGE + iLEWE * PLWNFAEDGE;
- NFBEDGE_p = PONFBEDGE + iLE * PLNFBEDGE + iWE * PWNFBEDGE + iLEWE * PLWNFBEDGE;
- NFCEDGE_p = PONFCEDGE + iLE * PLNFCEDGE + iWE * PWNFCEDGE + iLEWE * PLWNFCEDGE;
- EFEDGE_p = POEFEDGE;
-
- // Well proximity effect parameters
- KVTHOWE = POKVTHOWE + iLE * PLKVTHOWE + iWE * PWKVTHOWE + iLEWE * PLWKVTHOWE;
- KUOWE = POKUOWE + iLE * PLKUOWE + iWE * PWKUOWE + iLEWE * PLWKUOWE;
-
-end
-
-// Parasitic resistance parameters
-if ((SWGEO_i == 1) || (SWGEO_i == 2)) begin
- RG_p = RSHG_i * (`oneThird * W_f / NGCON_i + XGWE) / (NGCON_i * L_slif) + (RINT_i + RVPOLY_i) / (W_f * L_f) + NF_i * RGO;
- if (SWJUNASYM == 0) begin
- RSHD_i = RSH_i;
- end
- RSE_p = NRS * RSH_i;
- RDE_p = NRD * RSHD_i;
- RWELL_p = NF_i * RWELLO;
- RBULK_p = NF_i * RBULKO;
- RJUNS_p = NF_i * RJUNSO;
- RJUND_p = NF_i * RJUNDO;
-
- // Self heating effect parameters
- `ifdef SelfHeating
- deltaRth = RTHW2 + WE / `WEN * (1.0 + RTHLW * LE / `LEN);
- deltaRth = `MAX(deltaRth, 1.0e-6);
- RTH_p = RTHO + RTHW1 / deltaRth;
- CTH_p = CTHO + CTHW1 * (CTHW2 + WE / `WEN * (1.0 + CTHLW * LE / `LEN));
- STRTH_p = STRTHO;
- `endif // SelfHeating
-
- // NQS parameters
- `ifdef NQSmodel
- MUNQS_p = MUNQSO;
- `endif // NQSmodel
-
- // Mechanical stress model
- tmpa = 0.0;
- tmpb = 0.0;
- loop = 0.0;
- if ((SA_i > 0.0) && (SB_i > 0.0) && ((NF_i == 1.0) || ((NF_i > 1.0) && (SD_i > 0.0)))) begin
- while (loop < (NF_i - 0.5)) begin
- tmpa = tmpa + 1.0 / (SA_i + 0.5 * L_i + loop * (SD_i + L_i));
- tmpb = tmpb + 1.0 / (SB_i + 0.5 * L_i + loop * (SD_i + L_i));
- loop = loop + 1.0;
- end
- Invsa = tmpa * invNF;
- Invsb = tmpb * invNF;
- Invsaref = 1.0 / (SAREF_i + 0.5 * L_i);
- Invsbref = 1.0 / (SBREF_i + 0.5 * L_i);
- Lx = `MAX(L_i + delLPS, 1.0e-9);
- Wx = `MAX(W_i + delWOD + WLOD, 1.0e-9);
- templ = 1.0 / pow(Lx, LLODKUO_i);
- tempw = 1.0 / pow(Wx, WLODKUO_i);
- Kstressu0 = (1.0 + LKUO * templ + WKUO * tempw + PKUO * templ * tempw) * (1.0 + TKUO * (rTa - 1.0));
- rhobeta = KUO * (Invsa + Invsb) / Kstressu0;
- rhobetaref = KUO * (Invsaref + Invsbref) / Kstressu0;
- templ = 1.0 / pow(Lx, LLODVTH_i);
- tempw = 1.0 / pow(Wx, WLODVTH_i);
- Kstressvth0 = 1.0 + LKVTHO * templ + WKVTHO * tempw + PKVTHO * templ * tempw;
- temp0 = Invsa + Invsb - Invsaref - Invsbref;
- // Parameter adaptations
- temp00 = (1.0 + rhobeta) / (1.0 + rhobetaref);
- BETN_p = BETN_p * temp00;
- THESAT_p = THESAT_p * temp00 * (1.0 + KVSAT_i * rhobetaref) / (1.0 + KVSAT_i * rhobeta);
- THESATAC_p = THESATAC_p * temp00 * (1.0 + KVSATAC_i * rhobetaref) / (1.0 + KVSATAC_i * rhobeta);
- BETNEDGE_p = BETNEDGE_p * temp00;
- temp00 = KVTHO * temp0 / Kstressvth0;
- VFB_p = VFB_p + temp00;
- VFBEDGE_p = VFBEDGE_p + temp00;
- temp00 = STETAO * temp0 / pow(Kstressvth0, LODETAO_i);
- CF_p = CF_p + temp00;
- CFAC_p = CFAC_p + temp00;
- CFEDGE_p = CFEDGE_p + temp00;
- end
-
- // Well proximity effect equations
- if ((SCA_i > 0.0) || (SCB_i > 0.0) || (SCC_i > 0.0) || (SC_i > 0.0)) begin
- if ((SCA_i == 0.0) && (SCB_i == 0.0) && (SCC_i == 0.0)) begin
- temp0 = SC_i + W_i;
- temp00 = 1.0 / SCREF_i;
- SCA_i = SCREF_i * SCREF_i / (SC_i * temp0);
- SCB_i = ((0.1 * SC_i + 0.01 * SCREF_i) * exp(-10.0 * SC_i * temp00) - (0.1 * temp0 + 0.01 * SCREF_i) * exp(-10.0 * temp0 * temp00)) / W_i;
- SCC_i = ((0.05 * SC_i + 0.0025 * SCREF_i) * exp(-20.0 * SC_i * temp00) - (0.05 * temp0 + 0.0025 * SCREF_i) * exp(-20.0 * temp0 * temp00)) / W_i;
- end
- // Parameter adaptations
- temp0 = SCA_i + WEB_i * SCB_i + WEC_i * SCC_i;
- VFB_p = VFB_p + KVTHOWE * temp0;
- BETN_p = BETN_p * (1.0 + KUOWE * temp0);
- VFBEDGE_p = VFBEDGE_p + KVTHOWE * temp0;
- BETNEDGE_p = BETNEDGE_p * (1.0 + KUOWE * temp0);
- end
-end
-
-// Internal parameters (including temperature scaling)
-// Clipping of the local model parameters
-VFB_i = VFB_p;
-STVFB_i = STVFB_p;
-ST2VFB_i = ST2VFB_p;
-TOX_i = `CLIP_LOW(TOX_p, 1.0e-10);
-EPSROX_i = `CLIP_LOW(EPSROX_p, 1.0);
-NEFF_i = `CLIP_BOTH(NEFF_p, 1.0e20, 1.0e26);
-FACNEFFAC_i = `CLIP_LOW(FACNEFFAC_p, 0.0);
-GFACNUD_i = `CLIP_LOW(GFACNUD_p, 0.01);
-VSBNUD_i = `CLIP_LOW(VSBNUD_p, 0.0);
-DVSBNUD_i = `CLIP_LOW(DVSBNUD_p, 0.1);
-VNSUB_i = VNSUB_p;
-NSLP_i = `CLIP_LOW(NSLP_p, 1.0e-3);
-DNSUB_i = `CLIP_BOTH(DNSUB_p, 0.0, 1.0);
-DPHIB_i = DPHIB_p;
-DELVTAC_i = DELVTAC_p;
-NP_i = `CLIP_LOW(NP_p, 0.0);
-TOXOV_i = `CLIP_LOW(TOXOV_p, 1.0e-10);
-TOXOVD_i = `CLIP_LOW(TOXOVD_p, 1.0e-10);
-NOV_i = `CLIP_BOTH(NOV_p, 1.0e23, 1.0e27);
-NOVD_i = `CLIP_BOTH(NOVD_p, 1.0e23, 1.0e27);
-CT_i = `CLIP_LOW(CT_p, 0.0);
-CTG_i = `CLIP_LOW(CTG_p, 0.0);
-CTB_i = CTB_p;
-STCT_i = STCT_p;
-CF_i = `CLIP_LOW(CF_p, 0.0);
-CFAC_i = `CLIP_LOW(CFAC_p, 0.0);
-CFD_i = `CLIP_LOW(CFD_p, 0.0);
-CFB_i = `CLIP_BOTH(CFB_p, 0.0, 1.0);
-PSCE_i = `CLIP_LOW(PSCE_p, 0.0);
-PSCEB_i = `CLIP_BOTH(PSCEB_p, 0.0, 1.0);
-PSCED_i = `CLIP_LOW(PSCED_p, 0.0);
-BETN_i = `CLIP_LOW(BETN_p, 0.0);
-STBET_i = STBET_p;
-MUE_i = `CLIP_LOW(MUE_p, 0.0);
-STMUE_i = STMUE_p;
-THEMU_i = `CLIP_LOW(THEMU_p, 0.0);
-STTHEMU_i = STTHEMU_p;
-CS_i = `CLIP_LOW(CS_p, 0.0);
-STCS_i = STCS_p;
-THECS_i = `CLIP_LOW(THECS_p, 0.0);
-STTHECS_i = STTHECS_p;
-XCOR_i = `CLIP_LOW(XCOR_p, 0.0);
-STXCOR_i = STXCOR_p;
-FETA_i = `CLIP_LOW(FETA_p, 0.0);
-RS_i = `CLIP_LOW(RS_p, 0.0);
-STRS_i = STRS_p;
-RSB_i = `CLIP_BOTH(RSB_p, -0.5, 1.0);
-RSG_i = `CLIP_LOW(RSG_p, -0.5);
-THESAT_i = `CLIP_LOW(THESAT_p, 0.0);
-THESATAC_i = `CLIP_LOW(THESATAC_p, 0.0);
-STTHESAT_i = STTHESAT_p;
-THESATB_i = `CLIP_BOTH(THESATB_p, -0.5, 1.0);
-THESATG_i = `CLIP_LOW(THESATG_p, -0.5);
-AX_i = `CLIP_LOW(AX_p, 2.0);
-AXAC_i = `CLIP_LOW(AXAC_p, 2.0);
-ALP_i = `CLIP_LOW(ALP_p, 0.0);
-ALPAC_i = `CLIP_LOW(ALPAC_p, 0.0);
-ALP1_i = `CLIP_LOW(ALP1_p, 0.0);
-ALP2_i = `CLIP_LOW(ALP2_p, 0.0);
-VP_i = `CLIP_LOW(VP_p, 1.0e-10);
-A1_i = `CLIP_LOW(A1_p, 0.0);
-A2_i = `CLIP_LOW(A2_p, 0.0);
-STA2_i = STA2_p;
-A3_i = `CLIP_LOW(A3_p, 0.0);
-A4_i = `CLIP_LOW(A4_p, 0.0);
-GCO_i = `CLIP_BOTH(GCO_p, -10.0, 10.0);
-IGINV_i = `CLIP_LOW(IGINV_p, 0.0);
-IGOV_i = `CLIP_LOW(IGOV_p, 0.0);
-IGOVD_i = `CLIP_LOW(IGOVD_p, 0.0);
-STIG_i = STIG_p;
-GC2_i = `CLIP_BOTH(GC2_p, 0.0, 10.0);
-GC3_i = `CLIP_BOTH(GC3_p, -10.0, 10.0);
-GC2OV_i = GC2_i;
-GC3OV_i = GC3_i;
-if (SWIGATE_i == 2) begin
- GC2OV_i = `CLIP_BOTH(GC2OV_p, 0.0, 10.0);
- GC3OV_i = `CLIP_BOTH(GC3OV_p, -10.0, 10.0);
-end
-CHIB_i = `CLIP_LOW(CHIB_p, 1.0);
-AGIDL_i = `CLIP_LOW(AGIDL_p, 0.0);
-AGIDLD_i = `CLIP_LOW(AGIDLD_p, 0.0);
-BGIDL_i = `CLIP_LOW(BGIDL_p, 0.0);
-BGIDLD_i = `CLIP_LOW(BGIDLD_p, 0.0);
-STBGIDL_i = STBGIDL_p;
-STBGIDLD_i = STBGIDLD_p;
-CGIDL_i = CGIDL_p;
-CGIDLD_i = CGIDLD_p;
-COX_i = `CLIP_LOW(COX_p, 0.0);
-CGOV_i = `CLIP_LOW(CGOV_p, 0.0);
-CGOVD_i = `CLIP_LOW(CGOVD_p, 0.0);
-CGBOV_i = `CLIP_LOW(CGBOV_p, 0.0);
-CFR_i = `CLIP_LOW(CFR_p, 0.0);
-CFRD_i = `CLIP_LOW(CFRD_p, 0.0);
-FNT_i = `CLIP_LOW(FNT_p, 0.0);
-FNTEXC_i = `CLIP_LOW(FNTEXC_p, 0.0);
-NFA_i = `CLIP_LOW(NFA_p, 0.0);
-NFB_i = `CLIP_LOW(NFB_p, 0.0);
-NFC_i = `CLIP_LOW(NFC_p, 0.0);
-EF_i = `CLIP_LOW(EF_p, 0.0);
-VFBEDGE_i = VFBEDGE_p;
-STVFBEDGE_i = STVFBEDGE_p;
-DPHIBEDGE_i = DPHIBEDGE_p;
-NEFFEDGE_i = `CLIP_BOTH(NEFFEDGE_p, 1.0e20, 1.0e26);
-CTEDGE_i = `CLIP_LOW(CTEDGE_p, 0.0);
-BETNEDGE_i = `CLIP_LOW(BETNEDGE_p, 0.0);
-STBETEDGE_i = STBETEDGE_p;
-PSCEEDGE_i = `CLIP_LOW(PSCEEDGE_p, 0.0);
-PSCEBEDGE_i = `CLIP_BOTH(PSCEBEDGE_p, 0.0, 1.0);
-PSCEDEDGE_i = `CLIP_LOW(PSCEDEDGE_p, 0.0);
-CFEDGE_i = `CLIP_LOW(CFEDGE_p, 0.0);
-CFDEDGE_i = `CLIP_LOW(CFDEDGE_p, 0.0);
-CFBEDGE_i = `CLIP_BOTH(CFBEDGE_p, 0.0, 1.0);
-FNTEDGE_i = `CLIP_LOW(FNTEDGE_p, 0.0);
-NFAEDGE_i = `CLIP_LOW(NFAEDGE_p, 0.0);
-NFBEDGE_i = `CLIP_LOW(NFBEDGE_p, 0.0);
-NFCEDGE_i = `CLIP_LOW(NFCEDGE_p, 0.0);
-EFEDGE_i = `CLIP_LOW(EFEDGE_p, 0.0);
-RG_i = `CLIP_LOW(RG_p, 0.0);
-RSE_i = `CLIP_LOW(RSE_p, 0.0);
-RDE_i = `CLIP_LOW(RDE_p, 0.0);
-RBULK_i = `CLIP_LOW(RBULK_p, 0.0);
-RJUNS_i = `CLIP_LOW(RJUNS_p, 0.0);
-RJUND_i = `CLIP_LOW(RJUND_p, 0.0);
-RWELL_i = `CLIP_LOW(RWELL_p, 0.0);
-`ifdef SelfHeating
- RTH_i = `CLIP_LOW(RTH_p, 1.0e-4);
- CTH_i = `CLIP_LOW(CTH_p, 0.0);
- STRTH_i = STRTH_p;
-`endif // SelfHeating
-MULT_i = `CLIP_LOW(MULT * NF_i, 0.0); // Note: NF_i is set to 1 for local model
-FACTUO_i = `CLIP_LOW(FACTUO, 0.0);
-DELVTO_i = DELVTO;
-FACTUOEDGE_i = `CLIP_LOW(FACTUOEDGE, 0.0);
-DELVTOEDGE_i = DELVTOEDGE;
-`ifdef NQSmodel
- MUNQS_i = `CLIP_LOW(MUNQS_p, 0.0);
-`endif // NQSmodel
-
-// Ignore drain-side values in case of symmetric junctions
-if (SWJUNASYM_i == 0) begin
- TOXOVD_i = TOXOV_i;
- NOVD_i = NOV_i;
- AGIDLD_i = AGIDL_i;
- BGIDLD_i = BGIDL_i;
- STBGIDLD_i = STBGIDL_i;
- CGIDLD_i = CGIDL_i;
- IGOVD_i = IGOV_i;
- CGOVD_i = CGOV_i;
- CFRD_i = CFR_i;
-end
diff --git a/src/spicelib/devices/adms/psp103/admsva/psp103.va b/src/spicelib/devices/adms/psp103/admsva/psp103.va
deleted file mode 100644
index d66a1aca2..000000000
--- a/src/spicelib/devices/adms/psp103/admsva/psp103.va
+++ /dev/null
@@ -1,54 +0,0 @@
-//======================================================================================
-//======================================================================================
-// Filename: psp103.va
-//======================================================================================
-//======================================================================================
-//
-// (c) Copyright notice
-//
-// Since 2015 until today, PSP has been co-developed by NXP Semiconductors and
-// CEA-Leti. For this part of the model, each claim undivided ownership and copyrights
-// Since 2012 until 2015, PSP has been co-developed by NXP Semiconductors and
-// Delft University of Technology. For this part of the model, each claim undivided
-// ownership and copyrights
-// Until and including 2011, PSP has been co-developed by NXP Semiconductors and
-// Arizona State University. For this part of the model, NXP Semiconductors claims
-// undivided ownership and copyrights.
-//
-//
-// Version: 103.7.0 (PSP), 200.6.0 (JUNCAP), April 2019
-//
-//======================================================================================
-//======================================================================================
-//
-// Further information can be found in the file releasenotesPSP103.txt
-//
-
-`include "discipline.h"
-
-//`define NQSmodel true
-
-//`define SelfHeating true
-
-`include "Common103_macrodefs.include"
-
-`include "JUNCAP200_macrodefs.include"
-
-`include "PSP103_macrodefs.include"
-
-// Note: some verilog-A compilers have problems handling the ddx-operator,
-// which occurs in definition of OP-output variables. If the line below is
-// commented out, all OP-output variables using the ddx-operator are skipped.
-`define OPderiv
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// PSP global model code
-//
-/////////////////////////////////////////////////////////////////////////////
-
-module PSP103VA(D, G, S, B);
-
-`include "PSP103_module.include"
-
-endmodule
diff --git a/src/spicelib/devices/adms/psp103/admsva/releasenotesPSP103p7.txt b/src/spicelib/devices/adms/psp103/admsva/releasenotesPSP103p7.txt
deleted file mode 100644
index 2ea7fb9bd..000000000
--- a/src/spicelib/devices/adms/psp103/admsva/releasenotesPSP103p7.txt
+++ /dev/null
@@ -1,206 +0,0 @@
-
-======================================================================================
-======================================================================================
- Silicon Integration Initiative (Si2)
- Compact Model Coalition In-Code Statement
-
- Software is distributed as is, completely without warranty or service support. The
- Commissariat a l'energie atomique et aux energies alternatives (CEA), NXP
- Semiconductors, and Delft University of Technology, along with their employees are
- not liable for the condition or performance of the software.
-
- NXP Semiconductors, Delft University of Technology, and CEA own the copyright and
- grant users a perpetual, irrevocable, worldwide, non-exclusive, royalty-free license
- with respect to the software as set forth below.
-
- NXP Semiconductors, Delft University of Technology, and CEA hereby disclaim all
- implied warranties.
-
- NXP Semiconductors, Delft University of Technology, and CEA grant the users the right
- to modify, copy, and redistribute the software and documentation, both within the
- user's organization and externally, subject to the following restrictions:
-
- 1. The users agree not to charge for the NXP Semiconductors, Delft University of
- Technology, and CEA-developed code itself but may charge for additions,
- extensions, or support.
-
- 2. In any product based on the software, the users agree to acknowledge NXP
- Semiconductors, Delft University of Technology, and CEA that developed the
- software. This acknowledgement shall appear in the product documentation.
-
- 3. Redistributions to others of source code and documentation must retain the
- copyright notice, disclaimer, and list of conditions.
-
- 4. Redistributions to others in binary form must reproduce the copyright notice,
- disclaimer, and list of conditions in the documentation and/or other materials
- provided with the distribution.
-
- CMC In-Code Statement Revision: 103.7.0 (PSP), 04/29/2019
- 200.6.0 (JUNCAP),04/29/2019
-
-======================================================================================
-======================================================================================
-
- Authors: G.D.J. Smit, A.J. Scholten, and D.B.M. Klaassen (NXP Semiconductors)
- O. Rozeau, S. Martinie, T. Poiroux, J.C. Barbé (CEA-Leti)
-
- Former contributers:
- G. Gildenblat, W. Yao, Z. Zhu, X. Li and W. Wu (Arizona State University)
- R. van Langevelde (Philips Research)
- R. van der Toorn (Delft University of Technology)
-
- The most recent version of the model code, the documentation, and contact
- information can be found on:
-
- http://www.cea.fr/cea-tech/leti/pspsupport
-
-======================================================================================
-======================================================================================
-
-This package consists of the following files:
-
- - releasenotesPSP103.txt This file
-
- - psp103.va Main file for PSP model
- - psp103t.va Main file for PSP model with self heating
- - psp103_nqs.va Main file for PSP model with NQS-effects
- - juncap200.va Main file for JUNCAP2 stand-alone model
-
- - Common103_macrodefs.include Common macro definitions
- - PSP103_macrodefs.include Macro definitions for PSP
- - PSP103_module.include Actual model code for intrinsic MOS model
- - PSP103_parlist.include Model parameter list for PSP model
- - PSP103_scaling.include Geometry scaling equations for PSP model
- - PSP103_nqs_macrodefs.include Macro definitions for PSP-NQS
- - PSP103_InitNQS.include PSP-NQS initialization code
- - PSP103_ChargesNQS.include Calculation of NQS-charge contributions
- - JUNCAP200_macrodefs.include Macro definitions for JUNCAP2 model
- - JUNCAP200_parlist.include JUNCAP2 parameter list
- - JUNCAP200_varlist.include JUNCAP2 variable declarations
- - JUNCAP200_InitModel.include JUNCAP2 model initialization code
-
-======================================================================================
-======================================================================================
-
-Usage
------
-
-Depending which model one wants to use, one should compile one of the four .va-files
-(psp103.va, psp103t.va, psp103_nqs.va, and juncap200.va). The module names are
-"PSP103VA", "PSP103TVA", and "PSPNQS103VA" (for QS, self heating, and NQS,
-respectively), and "JUNCAP200" for the JUNCAP2-model.
-
-
-======================================================================================
-======================================================================================
-
-Release notes vA-code of PSP 103.7.0 (April 2019)
----------------------------------------------------------
-
-Changes include
- - More efficient calculations of Vdsp and Vdspedge
- - Additional parameters for overlaps gate leakage currents
- - Charge partitioning: new switch parameter SWQPART to modify the charge
- partitioning between the drain and the source
- - Additional parameters for charge model decoupling to improve CV description
- - Minor modification on code files organization
-
-- PSP103_macrodefs.include:
- - Addition of variable declarations in SPcalcLocalVarDecl macro: line 280
- - Calculation of THESATAC_T: line 390
- - Includes SPCalculation.include file as a new macro called "SPCalculation"
-
-- PSP103_parlist.include:
- - New file including PSP103_binpars.include and model parameter declaration from
- PSP103_module.include
- - Addition of new parameters SWQSAT, SWQPART, CFAC, THESATAC, AXAC, ALPAC, GC2OV,
- GC3OV, CFACL, CFACLEXP, CFACW, THESATACO, THESATACL, THESATACLEXP, THESATACW,
- THESATACLW, AXACO, AXACL, ALPACL, ALPACLEXP, ALPACW, GC2OVO, GC3OVO, POCFAC,
- PLCFAC, PWCFAC, PLWCFAC, POTHESATAC, PLTHESATAC, PWTHESATAC, PLWTHESATAC,
- POAXAC, PLAXAC, PWAXAC, PLWAXAC, POGC2OV, POGC3OV, KVSATAC
-
-- PSP103_scaling.include:
- - New file including PSP103_binning.include and geometry scaling equations from
- PSP103_module.include
- - Addition of new internal local parameters, associated scaling rules and clipped
- variables: CFAC_p, THESATAC_p, AXAC_p, ALPAC_p, GC2OV_p, GC3OV_p, CFAC_i,
- THESATAC_i, AXAC_i, ALPAC_i, GC2OV_i, GC3OV_i
- - Introduction of mechanical stress effect on THESATAC_p and CFAC_p. Minor
- modifications of the stress model using the internal variable temp00.
-
-- PSP103_module.include:
- - New OP-output variables: lp_cfac, lp_thesatac, lp_axac, lp_alpac, lp_gc2ov,
- lp_gc3ov: lines 399, 423, 428, 430, 446, 447, 2128, 2152, 2157, 2159, 2175, 2176.
- - New max clipping value of SWIGATE_i: line 542
- - New variables SWQSAT_i, SWQPART_i: lines 150, 550 and 551
- - Calculation of internal global-binning parameters for the charge model: lines 619
- to 651
- - Calculation of GCQOV variable for overlap gate leakage currents: lines 237, 782
- to 788
- - New variable declaration for charge model THESATAC_T: lines 225 and 1040
- - Vgb is now calculated in line 1089
- - Modifications for overlaps leakage currents GC2_i, GC3_i and GCQ are replaced by
- GC2OV_i, GC3OV_i and GCQOV: lines 1209 to 1246
- - New calculation of Vdspedge: line 1344
- - Calculation of cfloc, thesatloc, axloc and alploc: lines 1136 to 1139, lines 1403 to
- 1406 and lines 1418 to 1421
- - Modification of the condition "SWDELVTAC_i != 0" ("else" case was cancelled): lines
- 1408 to 1415
- - Addition of the condition "SWQSAT_i != 0" for Q-model decoupling in saturation: lines
- 1417 to 1422
- - Addition of the condition "SWQPART_i == 1.0" for charge partitioning and calculation
- of the new charge partitioning: lines 1484 to 1490
-
-- PSP103_SPCalculation.include: cancelled file
-
-- PSP103_binpars.include: cancelled file
-
-- PSP103_binning.include: cancelled file
-
-PSP 103.7.0 is backwards compatible with the previous version, PSP 103.6.0
-
-
-======================================================================================
-======================================================================================
-
-Release notes vA-code of JUNCAP 200.6.0 (April 2019)
----------------------------------------------------------
-
-Change includes:
- - Bug fix on juncap express model (induced by negative values of MFOR2 and
- ISATFOR2 variables)
- - Addition of 2 multiplier factors for current IFACTOR and charge CFACTOR
-
-- JUNCAP200_parlist.include:
- - Declaration of 2 new model parameters IFACTOR and CFACTOR: lines 36 and 37
-
-- JUNCAP200_varlist1.include: cancelled file
-
-- JUNCAP200_varlist2.include: cancelled file
-
-- JUNCAP200_varlist.include:
- - New file including JUNCAP200_varlist1.include and JUNCAP200_varlist2.include
-
-- JUNCAP200_macrodefs.include:
- - Definition of 2 new constants IFACTOR_cliplow and CFACTOR_cliplow: lines 57
- and 58
- - Addition of CFACTOR in the calculation of Qjprime: line 221
- - Addition of IFACTOR in the calculation of Ijprime: line 276
- - Modification of condition for calculation of MFOR2 and ISATFOR2 variables
- to avoid a bug on juncap express model.
-
-- JUNCAP200_InitModel.include:
- - Addition of cliiped variables IFACTOR_i and CFACTOR_i: lines 36 and 37
-
-- juncap200.va:
- - Included new file for variable declarations: line 81
-
-JUNCAP 200.6.0 is backwards compatible with the previous version, JUNCAP 200.5.0
-
-
-=====================================================================================
-======================================================================================
-The authors want to thank Laurent Lemaitre and Colin McAndrew (Freescale)
-for their help with ADMS and the implementation of the model code. Geoffrey
-Coram (Analog Devices) is acknowledged for input concerning the Verilog-A
-implementation of the model.
diff --git a/src/spicelib/devices/adms/r2_cmc/admsva/cmcModels.inc b/src/spicelib/devices/adms/r2_cmc/admsva/cmcModels.inc
deleted file mode 100644
index 9993f0576..000000000
--- a/src/spicelib/devices/adms/r2_cmc/admsva/cmcModels.inc
+++ /dev/null
@@ -1,250 +0,0 @@
-
-//
-// This file is the top-level declaration for the following CMC Verilog-A models:
-//
-// r2_cmc CMC 2-terminal resistor model
-// r2_et_cmc CMC 2-terminal resistor model with self-heating
-//
-
-//
-// Physical constants and other generally useful numbers
-//
-
-`include "discipline.h"
-`define TABS_NIST2004 2.73150000e+02 // (NIST2004) 0C in K
-`define QQ_NIST2004 1.60217653e-19 // (NIST2004) mag. of electronic charge (C)
-`define KB_NIST2004 1.38065050e-23 // (NIST2004) Boltzmann constant (J/K)
-`define oneThird 3.3333333333333333e-01
-
-//
-// Clipping macros, these smoothly limit to lower, upper, or both lower and upper
-// limits. Rather than using a sqrt or log-exp form, which affects values
-// everywhere, these use a conditional form that is continuous in function
-// and derivative. If a value is not clipped then no exp() evaluation occurs.
-// Smooth limiting is preferable to hard limiting (although latter can still
-// be useful for enforcing parameter limits) for bias dependent quantities
-// as derivatives do not become zero or have discontinuities.
-//
-
-`define CLIPL0p1(XCLIP,X,LOWER) \
- if (X<(LOWER+0.1)) \
- XCLIP = LOWER+0.1*exp(10.0*(X-LOWER)-1.0); \
- else \
- XCLIP = X;
-`define CLIPU0p1(XCLIP,X,UPPER) \
- if (X>(UPPER-0.1)) \
- XCLIP = UPPER-0.1*exp(10.0*(UPPER-X)-1.0); \
- else \
- XCLIP = X;
-`define CLIPB0p1(XCLIP,X,LOWER,UPPER) \
- if (X<(LOWER+0.1)) \
- XCLIP = LOWER+0.1*exp(10.0*(X-LOWER)-1.0); \
- else if (X>(UPPER-0.1)) \
- XCLIP = UPPER-0.1*exp(10.0*(UPPER-X)-1.0); \
- else \
- XCLIP = X;
-
-`define CLIPL1p0(XCLIP,X,LOWER) \
- if (X<(LOWER+1.0)) \
- XCLIP = LOWER+exp(X-LOWER-1.0); \
- else \
- XCLIP = X;
-`define CLIPU1p0(XCLIP,X,UPPER) \
- if (X>(UPPER-1.0)) \
- XCLIP = UPPER-exp(UPPER-X-1.0); \
- else \
- XCLIP = X;
-`define CLIPB1p0(XCLIP,X,LOWER,UPPER) \
- if (X<(LOWER+1.0)) \
- XCLIP = LOWER+exp(X-LOWER-1.0); \
- else if (X>(UPPER-1.0)) \
- XCLIP = UPPER-exp(UPPER-X-1.0); \
- else \
- XCLIP = X;
-
-`ifdef insideADMS
- `ifdef notInsideADMS
- `undef notInsideADMS
- `endif
-`else
- `define notInsideADMS
-`endif
-`ifdef __VAMS_COMPACT_MODELING__
- `ifdef not__VAMS_COMPACT_MODELING__
- `undef not__VAMS_COMPACT_MODELING__
- `endif
-`else
- `define not__VAMS_COMPACT_MODELING__
-`endif
-
-//
-// Conditional definitions of macros so that the code will work with
-// Verilog-A 2.1 and 2.2, and ADMS. The "des" description argument is intended to
-// be a short description, the "inf" information argument is intended to be
-// a detailed description (e.g. for display as part of on-line help).
-//
-// MPR model parameter real
-// MPI model parameter integer
-// IPR instance parameter real
-// IPI instance parameter integer
-// IPM instance parameter mFactor (multiplicity, implicit for LRM2.2)
-// OPP operating point parameter, includes units and description for printing
-//
-// There are some issues with passing range directives with some compilers,
-// so for each parameter declaration there are 5 versions:
-// cc closed lower bound, closed upper bound
-// co closed lower bound, open upper bound
-// oc open lower bound, closed upper bound
-// oo open lower bound, open upper bound
-// nb no bounds
-//
-
-//`ifdef __VAMS_COMPACT_MODELING__
- `define ALIAS(alias,parameter) aliasparam alias = parameter;
- `define ERROR(str) \
- begin \
- $strobe(str); \
- $finish(1); \
- end
- `define WARNING(str) $strobe(str);
- `define OPP(nam,uni,des) (*units=uni desc=des*) real nam;
- `define MPRcc(nam,def,uni,lwr,upr,des) (*units=uni, desc=des*) parameter real nam=def from[lwr:upr];
- `define MPRco(nam,def,uni,lwr,upr,des) (*units=uni, desc=des*) parameter real nam=def from[lwr:upr);
- `define MPRoc(nam,def,uni,lwr,upr,des) (*units=uni, desc=des*) parameter real nam=def from(lwr:upr];
- `define MPRoo(nam,def,uni,lwr,upr,des) (*units=uni, desc=des*) parameter real nam=def from(lwr:upr);
- `define MPRnb(nam,def,uni, des) (*units=uni, desc=des*) parameter real nam=def;
- `define MPIcc(nam,def,uni,lwr,upr,des) (*units=uni, desc=des*) parameter integer nam=def from[lwr:upr];
- `define MPIco(nam,def,uni,lwr,upr,des) (*units=uni, desc=des*) parameter integer nam=def from[lwr:upr);
- `define MPIoc(nam,def,uni,lwr,upr,des) (*units=uni, desc=des*) parameter integer nam=def from(lwr:upr];
- `define MPIoo(nam,def,uni,lwr,upr,des) (*units=uni, desc=des*) parameter integer nam=def from(lwr:upr);
- `define MPInb(nam,def,uni, des) (*units=uni, desc=des*) parameter integer nam=def;
- `define IPRcc(nam,def,uni,lwr,upr,des) (*units=uni, type="instance", desc=des*) parameter real nam=def from[lwr:upr];
- `define IPRco(nam,def,uni,lwr,upr,des) (*units=uni, type="instance", desc=des*) parameter real nam=def from[lwr:upr);
- `define IPRoc(nam,def,uni,lwr,upr,des) (*units=uni, type="instance", desc=des*) parameter real nam=def from(lwr:upr];
- `define IPRoo(nam,def,uni,lwr,upr,des) (*units=uni, type="instance", desc=des*) parameter real nam=def from(lwr:upr);
- `define IPRnb(nam,def,uni, des) (*units=uni, type="instance", desc=des*) parameter real nam=def;
- `define IPIcc(nam,def,uni,lwr,upr,des) (*units=uni, type="instance", desc=des*) parameter integer nam=def from[lwr:upr];
- `define IPIco(nam,def,uni,lwr,upr,des) (*units=uni, type="instance", desc=des*) parameter integer nam=def from[lwr:upr);
- `define IPIoc(nam,def,uni,lwr,upr,des) (*units=uni, type="instance", desc=des*) parameter integer nam=def from(lwr:upr];
- `define IPIoo(nam,def,uni,lwr,upr,des) (*units=uni, type="instance", desc=des*) parameter integer nam=def from(lwr:upr);
- `define IPInb(nam,def,uni, des) (*units=uni, type="instance", desc=des*) parameter integer nam=def;
- `define IPM parameter real m=1 from(0:inf);
- `define TESTGIVEN(parameter) $param_given(parameter)
- `define GIVEN(parameter,variable,true,false) \
- begin \
- if ($param_given(parameter)) \
- variable = true; \
- else \
- variable = false; \
- end
-// `define SCALE \
-// begin \
-// if ($param_given(scale)) \
-// scaleFac = scale; \
-// else \
-// scaleFac = $simparam("scale",1.0); \
-// end
-// `define SHRINKL \
-// begin \
-// if ($param_given(shrink)) \
-// shrinkL = 1.0-0.01*shrink; \
-// else \
-// shrinkL = 1.0-0.01*$simparam("shrink",0.0); \
-// end
-// `define RTHRESH \
-// begin \
-// if ($param_given(rthresh)) \
-// rthrR2 = rthresh; \
-// else \
-// rthrR2 = $simparam("rthresh",1.0e-03); \
-// end
-//`else // not__VAMS_COMPACT_MODELING__
-// `define ALIAS(alias,parameter)
-// `ifdef insideADMS
-// `define ERROR(str) \
-// begin \
-// $strobe(str); \
-// $finish(1); \
-// end
-// `define WARNING(str) $strobe(str);
-// `define OPP(nam,uni,des) real nam (*units=uni desc=des ask="yes"*);
-// `define MPRcc(nam,def,uni,lwr,upr,des) parameter real nam=def from[lwr:upr] (*units=uni ask="yes" info=des*);
-// `define MPRco(nam,def,uni,lwr,upr,des) parameter real nam=def from[lwr:upr) (*units=uni ask="yes" info=des*);
-// `define MPRoc(nam,def,uni,lwr,upr,des) parameter real nam=def from(lwr:upr] (*units=uni ask="yes" info=des*);
-// `define MPRoo(nam,def,uni,lwr,upr,des) parameter real nam=def from(lwr:upr) (*units=uni ask="yes" info=des*);
-// `define MPRnb(nam,def,uni, des) parameter real nam=def (*units=uni ask="yes" info=des*);
-// `define MPIcc(nam,def,uni,lwr,upr,des) parameter integer nam=def from[lwr:upr] (*units=uni ask="yes" info=des*);
-// `define MPIco(nam,def,uni,lwr,upr,des) parameter integer nam=def from[lwr:upr) (*units=uni ask="yes" info=des*);
-// `define MPIoc(nam,def,uni,lwr,upr,des) parameter integer nam=def from(lwr:upr] (*units=uni ask="yes" info=des*);
-// `define MPIoo(nam,def,uni,lwr,upr,des) parameter integer nam=def from(lwr:upr) (*units=uni ask="yes" info=des*);
-// `define MPInb(nam,def,uni, des) parameter integer nam=def (*units=uni ask="yes" info=des*);
-// `define IPRcc(nam,def,uni,lwr,upr,des) parameter real nam=def from[lwr:upr] (*units=uni type="instance" ask="yes" info=des*);
-// `define IPRco(nam,def,uni,lwr,upr,des) parameter real nam=def from[lwr:upr) (*units=uni type="instance" ask="yes" info=des*);
-// `define IPRoc(nam,def,uni,lwr,upr,des) parameter real nam=def from(lwr:upr] (*units=uni type="instance" ask="yes" info=des*);
-// `define IPRoo(nam,def,uni,lwr,upr,des) parameter real nam=def from(lwr:upr) (*units=uni type="instance" ask="yes" info=des*);
-// `define IPRnb(nam,def,uni, des) parameter real nam=def (*units=uni type="instance" ask="yes" info=des*);
-// `define IPIcc(nam,def,uni,lwr,upr,des) parameter integer nam=def from[lwr:upr] (*units=uni type="instance" ask="yes" info=des*);
-// `define IPIco(nam,def,uni,lwr,upr,des) parameter integer nam=def from[lwr:upr) (*units=uni type="instance" ask="yes" info=des*);
-// `define IPIoc(nam,def,uni,lwr,upr,des) parameter integer nam=def from(lwr:upr] (*units=uni type="instance" ask="yes" info=des*);
-// `define IPIoo(nam,def,uni,lwr,upr,des) parameter integer nam=def from(lwr:upr) (*units=uni type="instance" ask="yes" info=des*);
-// `define IPInb(nam,def,uni, des) parameter integer nam=def (*units=uni type="instance" ask="yes" info=des*);
-// `define IPM parameter real m=1 from(0:inf) (*units="" type="instance" ask="yes" info="multiplicity factor"*);
-// `define TESTGIVEN(parameter) $given(parameter)
-// `define GIVEN(parameter,variable,true,false) \
-// begin \
-// if ($given(parameter)) \
-// variable = true; \
-// else \
-// variable = false; \
-// end
-// `define SCALE \
-// begin \
-// if ($given(scale)) \
-// scaleFac = scale; \
-// else \
-// scaleFac = $scale; \
-// end
-// `define SHRINKL \
-// begin \
-// if ($given(shrink)) \
-// shrinkL = 1.0-0.01*shrink; \
-// else \
-// shrinkL = $shrinkl("m"); \
-// end
-// `define RTHRESH rthrR2 = rthresh;
-// `else // notInsideADMS
-// `define ERROR(str) \
-// begin \
-// $strobe(str); \
-// $finish(1); \
-// end
-// `define WARNING(str) $strobe(str);
-// `define OPP(nam,uni,des) real nam;
-// `define MPRcc(nam,def,uni,lwr,upr,des) parameter real nam=def from[lwr:upr];
-// `define MPRco(nam,def,uni,lwr,upr,des) parameter real nam=def from[lwr:upr);
-// `define MPRoc(nam,def,uni,lwr,upr,des) parameter real nam=def from(lwr:upr];
-// `define MPRoo(nam,def,uni,lwr,upr,des) parameter real nam=def from(lwr:upr);
-// `define MPRnb(nam,def,uni, des) parameter real nam=def;
-// `define MPIcc(nam,def,uni,lwr,upr,des) parameter integer nam=def from[lwr:upr];
-// `define MPIco(nam,def,uni,lwr,upr,des) parameter integer nam=def from[lwr:upr);
-// `define MPIoc(nam,def,uni,lwr,upr,des) parameter integer nam=def from(lwr:upr];
-// `define MPIoo(nam,def,uni,lwr,upr,des) parameter integer nam=def from(lwr:upr);
-// `define MPInb(nam,def,uni, des) parameter integer nam=def;
-// `define IPRcc(nam,def,uni,lwr,upr,des) parameter real nam=def from[lwr:upr];
-// `define IPRco(nam,def,uni,lwr,upr,des) parameter real nam=def from[lwr:upr);
-// `define IPRoc(nam,def,uni,lwr,upr,des) parameter real nam=def from(lwr:upr];
-// `define IPRoo(nam,def,uni,lwr,upr,des) parameter real nam=def from(lwr:upr);
-// `define IPRnb(nam,def,uni, des) parameter real nam=def;
-// `define IPIcc(nam,def,uni,lwr,upr,des) parameter integer nam=def from[lwr:upr];
-// `define IPIco(nam,def,uni,lwr,upr,des) parameter integer nam=def from[lwr:upr);
-// `define IPIoc(nam,def,uni,lwr,upr,des) parameter integer nam=def from(lwr:upr];
-// `define IPIoo(nam,def,uni,lwr,upr,des) parameter integer nam=def from(lwr:upr);
-// `define IPInb(nam,def,uni, des) parameter integer nam=def;
-// `define IPM parameter real m=1 from(0:inf);
-// `define TESTGIVEN(parameter) 1
-// `define GIVEN(parameter,variable,true,false) variable = true;
- `define SCALE scaleFac = scale;
- `define SHRINKL shrinkL = 1.0-0.01*shrink;
- `define RTHRESH rthrR2 = rthresh;
-// `endif
-//`endif
diff --git a/src/spicelib/devices/adms/r2_cmc/admsva/r2_cmc.va b/src/spicelib/devices/adms/r2_cmc/admsva/r2_cmc.va
deleted file mode 100644
index c225268ec..000000000
--- a/src/spicelib/devices/adms/r2_cmc/admsva/r2_cmc.va
+++ /dev/null
@@ -1,898 +0,0 @@
-`include "cmcModels.inc"
-
-//
-// Set up two versions of the model (which is defined in the
-// file r2_cmc_core.va), an isothermal model and an electrothermal model.
-//
-
-//`define electroThermal
-
-`define LEVEL 1002
-`define GFORM // if GFORM is defined an I=V*g formulation is used, else a V=I*r formulation is used
-`define VERSION 1.0
-`define REVISION 0.0
-
-//
-// r2[_et]_cmc: Compact Model Council (CMC) 2-terminal Resistor Model
-//
-// This is the 2-terminal resistor model developed by the resistor
-// subcommittee of the CMC. The goal was to have a standard 2-terminal
-// resistor model with standard parameter names and a standard,
-// numerically well behaved nonlinearity model.
-//
-// The nonlinearity model is that proposed by Agere Systems
-// (from Kausar Banoo, Kumud Singhal, and Hermann Gummel).
-//
-// A self-heating (electro-thermal) version is included via conditionals.
-// It is anticipated that this will be provided as a separate
-// form of the model (r2_et_cmc where "et" means electro-thermal)
-// and the local temperature rise terminal will be made available
-// optionally, this has been requested for resistors in power
-// technologies. The non-self-heating form, r2_cmc, is expected to
-// be available as a new level model (the level number assigned
-// depending on what level models are already available within
-// a simulator, the value of 2 used here is an example).
-//
-
-//
-// Version 1.0
-// Revision 0.0
-// Date 2005 Nov 12
-// Comments Model as approved at Oct 2005 CMC meeting
-// - notes from Agere systems added to documentation
-//
-// Version 1.0
-// Revision 0.0_preview3
-// Date 2005 Oct 08
-// Comments Updates based on second round of comments
-// - electrothermal model name changed to r2_et_cmc so the
-// _cmc tag would be at the end
-// - top-level calling structure changed to make addition
-// of other models more structured, and have all information
-// directly relevant to r2[_et]_cmc in this file
-// - LEVEL and other parameters moved to this file rather than
-// the top-level file for the same reason, and LEVEL was
-// set to the value 1002
-// - single line if statements have begin ... end added for safety
-// and consistency of style
-// - linear TC added for flicker noise coefficient
-// - notes and documentation added that
-// tc1, tc2, c1, c2, isnoisy
-// should be both instance and model parameters
-// - tc1e and tc2e (the effective temperature coefficients of resistance)
-// were updated to include a width dependence and to
-// have a length dependence that varies with c1 and c2
-// - added an instance parameter switch sw_et to enable the self-heating
-// model to be turned off
-// - added min and max parameters for length and width, and if
-// a drawn geometry is outside these limits then a warning is issued
-// - handling of tmin and tmax changed:
-// specific clipping limits added (used for self-heating)
-// warnings added if ambient temperature is outside the limits
-// clipping of temperature to limits changed to be smooth
-// - temperature coefficient of resistance clamped smoothly
-// rather than having a hard limit
-//
-// Version 1.0
-// Revision 0.0_preview2
-// Date 2005 Sep 02
-// Comments Updates based on first round of comments
-// - changed name to r2_cmc from cmc_r2
-// - fixed up improperly defined variables
-// - modified some names for consistency with documentation
-// - set up a top-level file that up both
-// isoThermal and electroThermal versions are defined
-// - set switch to resistance form to be done based on
-// resistance at tnom, so the form does not change
-// during a temperature sweep
-// - fixed errors in LRM2.2 code
-//
-// Version 1.0
-// Revision 0.0_preview1
-// Date 2005 Jul 01
-// Comments Initial code for review by CMC resistor subcommittee
-//
-
-//
-// Instance parameters are:
-// m multiplicity factor (number in parallel, implicit for LRM2.2)
-// w design width of resistor body
-// l design length of resistor body
-// r resistance (per segment, total resistance is r/m)
-// c1 contact at terminal 1: 0=no 1=yes
-// c2 contact at terminal 2: 0=no 1=yes
-// trise local temperature delta to ambient (before self-heating)
-// isnoisy switch for noise: 0=no 1=yes
-//
-
-//
-// The c1 and c2 parameters control the addition of "end" effects
-// to the model. If these are both zero ("no contact") then no end
-// effects are added. If only one is non-zero 1/2 the end effects are
-// added. If both are non-zero full end effects are added. This
-// is to facilitate the implementation of multi-section models in a
-// subckt. c1=c2=0 for all internal sections, c1=0,c2=1 for the
-// "left" end segment, c1=1,c2=0 for the "right" end segment.
-//
-// The basic nonlinearity is:
-//
-// R=R0*(1-p2-p3+p2*sqrt(1+(q2*E)**2)+p3*cbrt(1+(q3*abs(E))**3))
-//
-// where cbrt() is the cube root operation. The use
-// of abs(E) leads to a singularity in higher order derivatives,
-// but because of the power of the term it does not show up
-// until the 4th derivative of the current.
-//
-// For q3*abs(E) somewhat greater than 1, the p3,q3 term
-// leads a resistance factor of (1+p3*(q3*abs(E)-1)) so p3*q3
-// is in essence a first order field coefficient of
-// resistance.
-// For q2*E somewhat less than 1, the p2,q2 term leads to a
-// resistance factor (1+0.5*p2*(q2*E)**2) so 0.5*p2*q2**2 is in essence
-// a second order field coefficient of resistance.
-// The bias dependent nonlinearity is done via field rather than voltage,
-// to get reasonable scaling with length.
-//
-// There is no explicit handling of end resistances, they are assumed
-// to be accounted for by xl. If there is a difference between the TC's
-// of the end resistance compared to the body resistance, it can be shown that
-// TC_overall=TC_body+Rend*(TC_end-TC_body)/(rsh*(L+xl))
-// therefore a 1/length term is included for the TCs to allow this effect
-// to be modeled.
-//
-// Some Verilog-A compilers have difficulties handling the contrib type
-// switch based on resistance value. Conditional switches have been
-// put in this code to handle this for now. Comment out the `define GFORM
-// line at the top to switch to the resistance form.
-//
-
-//
-// Usage with model:
-// instanceId (n1 n2) modelName l=L w=W [trise=TRISE] [m]
-// model modelName r[esistor]
-// + level=assignedLevelForR2_CmcModel
-// + param=value
-// OR (for simulators that use model names rather than levels)
-// model modelName r2_cmc
-// + param=value
-// (NOTE: specify any two of w,l,r and the other will be calculated).
-//
-// Usage without model:
-// instanceId (n1 n2) r[esistor] r=value [trise=TRISE] [m]
-//
-// If this model is used with only r specified, then the geometry is taken
-// to be w/l=1um/1um and these values are used for 1/f noise calculation.
-// Note that this then means the 1/f noise is not geometry dependent,
-// which is incorrect. For proper modeling of 1/f noise you
-// should use the form where two of w,l,r are specified as instance parameters.
-//
-// The following parameters should be treated as model or instance parameters,
-// with instance parameter specification over-riding model parameter specification:
-// tc1
-// tc2
-// c1
-// c2
-// isnoisy
-// There is no construct in Verilog-A for denoting this, but this should be
-// implemented as such within a simulator.
-//
-
-//
-// Verilog-A Notes:
-//
-// 1. It is expected that, to be able to handle small- and zero-value resistances,
-// the model implementation will transform from an I=G*V form for higher resistance
-// values to a V=I*R form for lower resistance values. The switch should be based
-// on zero-bias resistance, not voltage (and, for the self-heating version temperature)
-// dependent resistance, to avoid changing the model formulation during simulation.
-// The "G" or "R" formulation should be determined once at set-up and kept from then on.
-// The current and voltage calculations are separated from noise calculations,
-// to partition code for implementation efficiency. This causes errors with some
-// Verilog-A compilers, as they think the contribution type can switch between
-// various parts of the code. Therefore the switch is done using the macro `GFORM,
-// and commented equivalent Verilog-A code is included, to indicate the intent.
-//
-// 2. There is no way to implement the LRM2.2 $param_given() function in
-// LRM2.1 code, the concept is not part of the language. Therefore the
-// model ONLY works with w,l specified as instance parameters when run
-// in an LRM2.1 compliant compiler. Also, although the "m" parameter is
-// known for LRM2.2, it apparently still needs to be declared explicity
-// as a model parameter.
-//
-// 3. When testing with the R form of the model, there are some differences in
-// simulation results w.r.t. the G form of the model, which was used to generate
-// the reference test results. These appear to be from slight differences in convergence.
-//
-// Apologies for the nested conditionals. It makes the code hard to read, but is
-// needed as there are different possible forms (isothermal, electrothermal;
-// conductance form, resistance form) as well as different syntax for different
-// language versions.
-//
-// There is no `ifndef XXX in Verilog-A, the "notXXX" macros are defined for convenience.
-//
-
-`ifdef electroThermal
- `ifdef notElectroThermal
- `undef notElectroThermal
- `endif
-`else
- `define notElectroThermal
-`endif
-
-`ifdef electroThermal
- module r2_et_cmc(n1,n2);
-`else
- module r2_cmc(n1,n2);
-`endif
-//`ifdef insideADMS
-// (*
-// info="r2_cmc two-terminal resistor model"
-// version="`VERSION"
-// revision="`REVISION"
-// spice:prefix="r"
-// spice:level="`LEVEL"
-// *)
-//`endif
-//;
-
-//
-// Node definitions (if the self-heating modeling is selected, the
-// local temperature rise node is internal, and not external)
-//
-
-inout n1,n2;
-electrical n1;
-electrical n2;
-`ifdef electroThermal
- electrical dt;
-`endif
-
-//
-// Branch definitions
-//
-
-branch (n1,n2) b_r; // resistance
-branch (n1,n2) b_n; // separate definition for noise, which is always a current contribution
-`ifdef electroThermal
- branch (dt) b_rth; // thermal resistance
- branch (dt) b_ith; // thermal generation, 2nd definition is to fool floating node detection in some compilers
-`endif
-
-//
-// Instance parameters
-//
-
-`IPM
-`IPRco( w , 1.0e-06,"m" , 0.0, inf, "design width of resistor body")
-`IPRco( l , 1.0e-06,"m" , 0.0, inf, "design length of resistor body")
-`IPRco( r , 100.0 ,"Ohm" , 0.0, inf, "resistance (per segment, total resistance is r/m)")
-`IPIcc( c1 , 1 ,"" , 0, 1, "contact at terminal 1: 0=no 1=yes")
-`IPIcc( c2 , 1 ,"" , 0, 1, "contact at terminal 2: 0=no 1=yes")
-`IPRnb( trise , 0.0 ,"degC" , "local temperature delta to ambient (before self-heating)")
-`IPIcc( isnoisy , 1 ,"" , 0, 1, "switch for noise: 0=no and 1=yes")
-`ifdef electroThermal
- `IPIcc( sw_et , 1 ,"" , 0, 1, "switch for turning off self-heating: 0=exclude and 1=include")
-`endif
-
-//
-// Special model parameters, some may be simulator global parameters
-//
-
-`MPRnb( version , `VERSION ,"" , "model version")
-`MPRnb( revision, `REVISION,"" , "model revision (subversion)")
-`MPRoc( scale , 1.0 ,"" , 0.0, 1.0, "scale factor for instance geometries")
-`MPRco( shrink , 0.0 ,"%" , 0.0, 100.0, "shrink percentage for instance geometries")
-`MPRcc( tmin ,-100.0 ,"degC" ,-250.0, 27.0, "minimum ambient temperature")
-`MPRcc( tmax , 500.0 ,"degC" , 27.0,1000.0, "maximum ambient temperature")
-`MPRoo( rthresh , 1.0e-03,"Ohm" , 0.0, inf, "threshold to switch to resistance form")
-
-//
-// Model parameters
-//
-
-`MPRnb( level , `LEVEL ,"" , "model level")
-`MPRcc( tnom , 27.0 ,"degC" ,-250.0,1000.0, "nominal (reference) temperature")
-`MPRoo( rsh , 100.0 ,"Ohm/sq" , 0.0, inf, "sheet resistance")
-`MPRco( lmin , 0.0 ,"um" , 0.0, inf, "minimum allowed drawn length")
-`MPRoo( lmax , 9.9e09 ,"um" , 0.0, inf, "maximum allowed drawn length")
-`MPRco( wmin , 0.0 ,"um" , 0.0, inf, "minimum allowed drawn width")
-`MPRoo( wmax , 9.9e09 ,"um" , 0.0, inf, "maximum allowed drawn width")
-`MPRnb( xw , 0.0 ,"um" , "width offset (total)")
-`MPRnb( xl , 0.0 ,"um" , "length offset (total)")
-`MPRnb( dxle , 0.0 ,"um" , "length delta for field calculation")
-`MPIcc( sw_efgeo, 0 ,"" , 0, 1, "switch for electric field geometry calculation: 0=design and 1=effective")
-`MPRco( q3 , 0.0 ,"um/V" , 0.0, inf, "1/field at which the linear field coefficient activates")
-`MPRco( p3 , 0.0 ,"" , 0.0, 1.0, "linear field coefficient factor: EC1=p3*q3")
-`MPRco( q2 , 0.0 ,"um/V" , 0.0, inf, "1/field at which the quadratic field coefficient activates")
-`MPRco( p2 , 0.0 ,"" , 0.0,1.0-p3, "quadratic field coefficient factor: EC2=0.5*p2*q2^2")
-`MPRco( kfn , 0.0 ,"" , 0.0, inf, "flicker noise coefficient (unit depends on afn)")
-`MPRoo( afn , 2.0 ,"" , 0.0, inf, "flicker noise current exponent")
-`MPRoo( bfn , 1.0 ,"" , 0.0, inf, "flicker noise 1/f exponent")
-`MPIcc( sw_fngeo, 0 ,"" , 0, 1, "switch for flicker noise geometry calculation: 0=design and 1=effective")
-`MPRoo( jmax , 100.0 ,"A/um" , 0.0, inf, "maximum current density")
-`MPRcc( tminclip,-100.0 ,"degC" ,-250.0, 27.0, "clip minimum temperature")
-`MPRcc( tmaxclip, 500.0 ,"degC" , 27.0,1000.0, "clip maximum temperature")
-`MPRnb( tc1 , 0.0 ,"/K" , "resistance linear TC")
-`MPRnb( tc2 , 0.0 ,"/K^2" , "resistance quadratic TC")
-`MPRnb( tc1l , 0.0 ,"um/K" , "resistance linear TC length coefficient")
-`MPRnb( tc2l , 0.0 ,"um/K^2" , "resistance quadratic TC length coefficient")
-`MPRnb( tc1w , 0.0 ,"um/K" , "resistance linear TC width coefficient")
-`MPRnb( tc2w , 0.0 ,"um/K^2" , "resistance quadratic TC width coefficient")
-`MPRnb( tc1kfn , 0.0 ,"" , "flicker noise coefficient linear TC")
-`ifdef electroThermal
- `MPRoo( gth0 , 1.0e+06,"W/K" , 0.0, inf, "thermal conductance fixed component")
- `MPRco( gthp , 0.0 ,"W/K/um" , 0.0, inf, "thermal conductance perimeter component")
- `MPRco( gtha , 0.0 ,"W/K/um^2" , 0.0, inf, "thermal conductance area component")
- `MPRco( cth0 , 0.0 ,"s*W/K" , 0.0, inf, "thermal capacitance fixed component")
- `MPRco( cthp , 0.0 ,"s*W/K/um" , 0.0, inf, "thermal capacitance perimeter component")
- `MPRco( ctha , 0.0 ,"s*W/K/um^2", 0.0, inf, "thermal capacitance area component")
-`endif
-
-//
-// Supported aliases for parameters
-//
-
-`ALIAS(dtemp,trise)
-`ALIAS(dta,trise)
-
-//
-// These variables will be displayed as part of operating point information.
-//
-
-`OPP( v_OP ,"V" ,"voltage across resistor")
-`OPP( i_OP ,"A" ,"current through resistor")
-`OPP( power_OP ,"W" ,"dissipated power")
-`OPP( leff ,"um" ,"effective electrical length in um")
-`OPP( weff ,"um" ,"effective electrical width in um")
-`OPP( r0_OP ,"Ohm" ,"zero-bias resistance (per segment)")
-`OPP( r_dc_OP ,"Ohm" ,"DC resistance (including bias dependence and m)")
-`OPP( r_ac_OP ,"Ohm" ,"AC resistance (including bias dependence and m)")
-`ifdef electroThermal
- `OPP( rth ,"K/W" ,"thermal resistance")
- `OPP( cth ,"s*W/K","thermal capacitance")
- `OPP( dt_et ,"K" ,"self-heating temperature rise")
-`endif
-
-`ifdef notInsideADMS
- analog begin : analogBlock
-`endif
-
- real i, v, power, r0, weff_um, leff_um, r_dc, r_ac;
-
- real tiniK,tdevK,scaleFac,shrinkL,delt,tcr,xleff;
- real lFactor,l_um,w_um,l_umForE,g0,r0_t,g0_t,kfn_t;
- real sqrf,cbrf,tdevC,wn,fn,rthrR2;
- real rFactor,vin,E,q2E,q3E,tc1e,tc2e;
- integer GFORM;
- `ifdef __VAMS_COMPACT_MODELING__
- `ifdef GFORM
- real g_ac;
- `else
- real drfdv;
- `endif
- `else
- real drfdv,g_ac;
- `endif
- `ifdef electroThermal
- real gth,Vrth,Ith,Irth,Qcth,p_um,a_um2,dg0dt,tmp1;
- `endif
-
- //
- // Code independent of bias or instance parameters
- //
-
-`ifdef insideADMS
- analog begin
- @(initial_instance) begin
-`else
- begin : initializeModel
-`endif
- if (level!=`LEVEL) begin
- `ERROR("ERROR: r2 model called with incorrect level parameter")
- end
- `SCALE
- `SHRINKL
- `RTHRESH
- lFactor = shrinkL*scaleFac*1.0e6; // conversion factor from instance l to um
- tiniK = `TABS_NIST2004+tnom;
- tdevC = $temperature+trise-`TABS_NIST2004; // device temperature
- if (tdevCtmax) begin
- `WARNING("WARNING: ambient temperature is higher than allowed maximum");
- end
- `ifdef notElectroThermal
- `CLIPB1p0(tdevC,tdevC,tminclip,tmaxclip);
- tdevK = tdevC+`TABS_NIST2004;
- delt = tdevK-tiniK; // temperature w.r.t. tnom
- kfn_t = (1+delt*tc1kfn)*kfn;
- if (kfn_t<0.0) begin
- kfn_t = 0.0;
- end
- `endif
-// end // initializeModel
-
- //
- // Code independent of bias but dependent on instance parameters
- //
-
-//`ifdef insideADMS
-// @(initial_instance) begin
-//`else
-// begin : initializeInstance
-//`endif
- if (c1&&c2) begin
- xleff = xl; // contacted at both ends, use full xl
- end else if (c1||c2) begin
- xleff = xl*0.5; // contacted at one end, include 1/2 of xl effect
- end else begin
- xleff = 0.0; // not contacted
- end
-
- //
- // For geometric processing, the order of importance is taken to be
- // w,l,r. The evaluation of whether a V contrib should be used, for
- // low resistance, rather than the usual I contrib, is based on
- // calculations at nominal temperature and zero bias, and so will
- // not cause a formulation switch with bias. The cases where
- // conductance or resistance are zero is handled.
- //
-
- if (`TESTGIVEN(l)&&`TESTGIVEN(r)&&!`TESTGIVEN(w)) begin
-
- //
- // If l and r are specified, but w is not, then calculate w
- // (if w is also specified, this over-rides the specified r)
- //
-
- if (r==0.0||l==0.0) begin
- l_um = 0.0;
- leff_um = 0.0;
- w_um = w*lFactor;
- weff_um = w_um+xw; // this could be negative, but has no effect so is not flagged as `ERROR
- r0 = 0.0;
- g0 = 1.0e99; // cannot set to inf
- end else begin
- l_um = l*lFactor;
- leff_um = l_um+xleff;
- if (leff_um<0.0) begin
- `ERROR("ERROR: calculated effective r2_cmc resistor length is < 0.0")
- end
- if (leff_um>0.0) begin
- weff_um = (rsh/r)*leff_um;
- w_um = weff_um-xw;
- if (w_um<=0.0) begin
- `ERROR("ERROR: calculated design r2_cmc resistor width is <= 0.0")
- end
- r0 = r;
- g0 = 1.0/r0;
- end else begin
- w_um = w*lFactor;
- weff_um = w_um+xw; // this could be negative, but has no effect so is not flagged as `ERROR
- r0 = 0.0;
- g0 = 1.0e99; // cannot set to inf
- end
- end
- end else if (`TESTGIVEN(r)&&!`TESTGIVEN(l)) begin
-
- //
- // If r is specified, but l is not, calculate l based on either
- // a specified or the default w (it does not matter which),
- // this also handles the case of usage without a .model card
- //
-
- if (r==0.0) begin
- l_um = 0.0;
- leff_um = 0.0;
- w_um = w*lFactor;
- weff_um = w_um+xw; // this could be negative, but has no effect so is not flagged as `ERROR
- r0 = 0.0;
- g0 = 1.0e99; // cannot set to inf
- end else if (w==0.0) begin
- w_um = 0.0;
- weff_um = 0.0;
- l_um = l*lFactor;
- leff_um = l_um+xleff; // this could be negative, but has no effect so is not flagged as `ERROR
- r0 = 1.0e99; // cannot set to inf
- g0 = 0.0;
- end else begin
- w_um = w*lFactor;
- weff_um = w_um+xw;
- if (weff_um<0.0) begin
- `ERROR("ERROR: calculated effective r2_cmc resistor width is < 0.0")
- end
- if (weff_um>0.0) begin
- leff_um = (r/rsh)*weff_um;
- l_um = leff_um-xleff;
- if (l_um<=0.0) begin
- `ERROR("ERROR: calculated design r2_cmc resistor length is <= 0.0")
- end
- r0 = r;
- g0 = 1.0/r0;
- end else begin
- l_um = l*lFactor;
- leff_um = l_um+xleff; // this could be negative, but has no effect so is not flagged as `ERROR
- r0 = 1.0e99; // cannot set to inf
- g0 = 0.0;
- end
- end
- end else begin
-
- //
- // For all other cases, r is calculated as a function of
- // geometry, either specified or default. Either l and w
- // are both specified, in which case they over-ride
- // specification of r, or else r is not specified.
- //
-
- if (w==0.0) begin
- w_um = 0.0;
- weff_um = 0.0;
- l_um = l*lFactor;
- leff_um = l_um+xleff; // this could be negative, but has no effect so is not flagged as `ERROR
- r0 = 1.0e99; // cannot set to inf
- g0 = 0.0;
- end else if (l==0.0) begin
- l_um = 0.0;
- leff_um = 0.0;
- w_um = w*lFactor;
- weff_um = w_um+xw; // this could be negative, but has no effect so is not flagged as `ERROR
- r0 = 0.0;
- g0 = 1.0e99; // cannot set to inf
- end else begin
- w_um = w*lFactor;
- weff_um = w_um+xw;
- if (weff_um<0.0) begin
- `ERROR("ERROR: calculated effective r2_cmc resistor width is < 0.0")
- end
- l_um = l*lFactor;
- leff_um = l_um+xleff;
- if (weff_um>0.0) begin
- if (leff_um<0.0) begin
- `ERROR("ERROR: calculated effective r2_cmc resistor length is < 0.0")
- end
- if (leff_um>0.0) begin
- r0 = rsh*(leff_um/weff_um);
- g0 = 1.0/r0;
- end else begin
- r0 = 0.0;
- g0 = 1.0e99; // cannot set to inf
- end
- end else begin
- r0 = 1.0e99; // cannot set to inf, also don't need to check if(leff_um>0.0) for this case
- g0 = 0.0;
- end
- end
- end
- if (l_umlmax) begin
- `WARNING("WARNING: drawn length is greater than allowed maximum");
- end
- if (w_umwmax) begin
- `WARNING("WARNING: drawn width is greater than allowed maximum");
- end
- if (sw_efgeo) begin
- l_umForE = leff_um+dxle;
- end else begin
- l_umForE = l_um+dxle;
- end
- if (l_umForE<=0.0&&r0>0.0&&(p2>0.0||p3>0.0)) begin
- `ERROR("ERROR: calculated effective r2_cmc resistor length for E calculation is < 0.0")
- end
- tc1e = tc1;
- tc2e = tc2;
- if (leff_um>0.0) begin
- if (c1&&c2) begin
- tc1e = tc1e+tc1l/leff_um;
- tc2e = tc2e+tc2l/leff_um;
- end else if (c1||c2) begin
- tc1e = tc1e+0.5*tc1l/leff_um;
- tc2e = tc2e+0.5*tc2l/leff_um;
- end
- end
- if (weff_um>0.0) begin
- tc1e = tc1e+tc1w/weff_um;
- tc2e = tc2e+tc2w/weff_um;
- end
- `ifdef __VAMS_COMPACT_MODELING__
- if (r0>(rthrR2/$mfactor)) begin
- `else
- if (r0>(rthrR2/m)) begin
- `endif
- GFORM = 1;
- end else begin
- GFORM = 0;
- end
- `ifdef electroThermal
- if (c1&&c2) begin
- p_um = 2.0*(l_um+w_um);
- end else if (c1||c2) begin
- p_um = 2.0*l_um+w_um;
- end else begin
- p_um = 2.0*l_um;
- end
- a_um2 = l_um*w_um;
- gth = gth0+gthp*p_um+gtha*a_um2;
- cth = cth0+cthp*p_um+ctha*a_um2;
- `else // notElectroThermal
- tcr = (1+delt*(tc1e+delt*tc2e));
- `CLIPL0p1(tcr,tcr,0.01)
- r0_t = r0*tcr;
- g0_t = g0/tcr;
- `endif
- end // initialInstance
-
- //
- // DC bias dependent quantities
- //
- // Note that for the resistance form the expression for v(i)
- // is implicit in v because of the voltage dependence of conductance.
- // For efficiency the nonlinearity is not computed if the
- // field coefficients are zero.
- //
-
- begin : evaluateStatic
- `ifdef electroThermal
- Vrth = sw_et*V(b_rth);
- tdevC = tdevC+Vrth;
- `CLIPB1p0(tdevC,tdevC,tminclip,tmaxclip);
- tdevK = tdevC+`TABS_NIST2004;
- delt = tdevK-tiniK; // temperature w.r.t. tnom
- tcr = (1+delt*(tc1e+delt*tc2e));
- `CLIPL0p1(tcr,tcr,0.01)
- r0_t = r0*tcr;
- g0_t = g0/tcr;
- kfn_t = (1+delt*tc1kfn)*kfn;
- if (kfn_t<0.0) begin
- kfn_t = 0.0;
- end
- `endif
- vin = V(b_r);
- if (r0>0.0&&(p2>0.0||p3>0.0)) begin
- E = vin/l_umForE;
- q2E = q2*E;
- sqrf = sqrt(1.0+q2E*q2E);
- q3E = q3*abs(E);
- cbrf = pow((1.0+q3E*q3E*q3E),`oneThird);
- rFactor = 1.0-p2-p3+p2*sqrf+p3*cbrf;
- end else
- rFactor = 1.0;
- r_dc = r0_t*rFactor;
- `ifdef GFORM // if (GFORM) begin
- v = vin;
- i = v/r_dc;
- `else // end else begin // RFORM
- `ifdef __VAMS_COMPACT_MODELING__
- i = I(b_r);
- `else
- i = I(b_r)/m; // need per-segment value
- `endif
- v = i*r_dc;
- `endif // end
- `ifdef electroThermal
- Ith = -v*i; // power generation, negative as it flows from dt to 0
- Irth = Vrth*gth;
- `endif
- if (weff_um>0.0) begin
- if (abs(i/weff_um)>jmax) begin
- `WARNING("WARNING: current density is greater than specified by jmax");
- end
- end
- end // evaluateStatic
-
- begin : evaluateDynamic
- `ifdef electroThermal
- Qcth = Vrth*cth;
- `endif
- end // evaluateDynamic
-
- begin : loadStatic
- `ifdef GFORM // if (GFORM) begin
- `ifdef __VAMS_COMPACT_MODELING__
- I(b_r) <+ i;
- `else
- I(b_r) <+ i*m;
- `endif
- `else // end else begin // RFORM
- V(b_r) <+ v;
- `endif // end
- `ifdef electroThermal
- `ifdef __VAMS_COMPACT_MODELING__
- I(b_rth) <+ Irth;
- I(b_ith) <+ Ith;
- `else
- I(b_rth) <+ Irth*m;
- I(b_ith) <+ Ith*m;
- `endif
- `endif
- end // loadStatic
-
- begin : loadDynamic
- `ifdef electroThermal
- `ifdef __VAMS_COMPACT_MODELING__
- I(b_rth) <+ ddt(Qcth);
- `else
- I(b_rth) <+ ddt(Qcth*m);
- `endif
- `endif
- end // loadDynamic
-
- //
- // Noise contributions
- //
-
- `ifdef insideADMS
- @(noise) begin
- `else
- begin : noise
- `endif
- if (isnoisy&&r0>0.0&&g0>0.0) begin
- wn = 4.0*`KB_NIST2004*tdevK*g0_t/rFactor;
- if (sw_fngeo&&leff_um>0.0&&weff_um>0.0) begin
- fn = kfn_t*pow(abs(i/weff_um),afn)*weff_um/leff_um;
- end else if (l_um>0.0&&w_um>0.0) begin
- fn = kfn_t*pow(abs(i/w_um),afn)*w_um/l_um;
- end else begin
- fn = 0.0;
- end
- end else begin
- wn = 0.0;
- fn = 0.0;
- end
- `ifdef not__VAMS_COMPACT_MODELING__
- wn = wn*m;
- fn = fn*m;
- `endif
- I(b_n) <+ white_noise(wn,"white noise");
- I(b_n) <+ flicker_noise(fn,bfn,"1/f noise");
- end // noise
-
- //
- // Useful quantities to display for OP and other purposes
- //
- // LRM2.2 allows use of ddx() which means explicit, hand-coded
- // calculation of derivatives is not required. However for the
- // electroThermal model the derivatives need to be calculated
- // as the total derivative is required for display, not just
- // the partial with respect to terminal voltages or branch
- // currents (which is all that is available from ddx()).
- //
- // For: i=v*g0_t/rf(v) (where rf is a short-hand for rFactor)
- // g_ac=di_dv=g0_t/rf-g0_t*v*drf_dv/rf^2=(g0_t-i*drf_dv)/rf
- //
- // For: v=i*r0_t*rf(v)
- // r_ac=dv_di=r0_t*rf+i*r0_t*drf_dv*dv_di=ddx(v,I(b_r))+(v*drf_dv/rf)*r_ac
- // therefore
- // r_ac=ddx(v,I(b_r))/(1-v*drf_dv/rf)
- //
- // For the electroThermal conductance form model:
- // i=v*g0(t)/rf(v)
- // g0(t)=g0/tcr=g0/(1+delt*(tc1e+delt*tc2e))
- // delt=i*v/gth
- // therefore
- // ddelt_dv=i/gth+(v/gth)*di_dv
- // dg0_dt=ddx(g0_t,V(dt))=g0(t)*(tc1e+2*delt*tc2e)/tcr
- // di_dv=ddx(i,V(n1))+(v/rf)*dg0_dt*di_dv
- // g_ac=(ddx(i,V(n1))+i*v*dg0_dt/(gth*rf))/(1-v*v*dg0_dt/(gth*rf))
- // which is what is implemented below.
- //
- // For the electroThermal resistance form model:
- // v=i*r0(t)*rf(v)
- // r0(t)=r0*tcr=r0*(1+delt*(tc1e+delt*tc2e))
- // delt=i*v/gth
- // therefore
- // ddelt_i=v/gth+(i/gth)*dv_di
- // dr0_dt=ddx(r0_t,V(dt))=r0*(tc1e+2*delt*tc2e)
- // dv_di=ddx(v,I(b_r))+i*r0*drf_dv*dv_di+i*rf*dr0_dt*ddelt_di
- // r_ac=(ddx(v,I(b_r))+v*i*rf*dr0_dt/gth)/(1-v*drf_dv/rf-i*i*rf*dr0_dt/gth)
- // which is what is implemented below.
- //
-
- begin : postProcess
- power = i*v;
- if (r0>0.0&&g0>0.0) begin
- r_dc = r0_t*rFactor;
- `ifdef __VAMS_COMPACT_MODELING__
- `ifdef GFORM // if (GFORM) begin
- g_ac = ddx(i,V(n1));
- `ifdef electroThermal
- dg0dt = ddx(g0_t,V(dt));
- tmp1 = v*dg0dt/(gth*rFactor);
- if ((1.0-v*tmp1)!=0.0) begin
- g_ac = (g_ac+i*tmp1)/(1.0-v*tmp1); // denominator is zero in thermal runaway, cannot happen if tcr>0
- end else begin
- g_ac = 1.0e99;
- end
- `endif
- if (g_ac!=0.0) begin
- r_ac = 1.0/g_ac;
- end else begin
- r_ac = 1.0e99;
- end
- `else // end else begin // RFORM
- drfdv = ddx(rFactor,V(n1));
- `ifdef electroThermal
- dg0dt = 1.0/ddx(r0_t,V(dt));
- tmp1 = i*rFactor/(dg0dt*gth);
- if ((1.0-v*drfdv/rFactor-i*tmp1)!=0.0) begin
- r_ac = (ddx(v,I(b_r))+v*tmp1)/(1.0-v*drfdv/rFactor-i*tmp1);
- end else begin
- r_ac = 1.0e99;
- end
- `else // notElectroThermal
- r_ac = ddx(v,I(b_r))/(1.0-v*drfdv/rFactor);
- `endif
- `endif // end
- `else // not__VAMS_COMPACT_MODELING__
- if ((p2>0.0||p3>0.0)) begin
- if (vin>=0.0)
- drfdv = (p2*q2*q2E/sqrf+p3*q3*q3E*q3E/(cbrf*cbrf))/l_umForE;
- else
- drfdv = (p2*q2*q2E/sqrf-p3*q3*q3E*q3E/(cbrf*cbrf))/l_umForE;
- g_ac = (g0_t-i*drfdv)/rFactor;
- end else
- g_ac = 1.0/r_dc;
- `ifdef electroThermal
- dg0dt = -g0_t*(tc1e+2.0*delt*tc2e)/tcr;
- tmp1 = v*dg0dt/(gth*rFactor);
- if ((1.0-v*tmp1)!=0.0) begin
- g_ac = (g_ac+i*tmp1)/(1.0-v*tmp1); // denominator is zero in thermal runaway, cannot happen if tcr>0
- end else begin
- g_ac = 1.0e99;
- end
- `endif
- if (g_ac!=0.0) begin
- r_ac = 1.0/g_ac;
- end else begin
- r_ac = 1.0e99;
- end
- `endif
- end else begin
- r_dc = r0; // this is 1.0e99 if g0==0.0, cannot set to inf
- r_ac = r0; // this is 1.0e99 if g0==0.0, cannot set to inf
- end
- `ifdef __VAMS_COMPACT_MODELING__
- // i = $mfactor*i;
- // power = $mfactor*power;
- // r_dc = r_dc/$mfactor;
- // r_ac = r_ac/$mfactor;
- i = 1*i;
- power = 1*power;
- r_dc = r_dc/1;
- r_ac = r_ac/1;
- `else // not__VAMS_COMPACT_MODELING__
- i = m*i;
- power = m*power;
- r_dc = r_dc/m;
- r_ac = r_ac/m;
- `endif
- `ifdef electroThermal
- dt_et = Vrth;
- `ifdef __VAMS_COMPACT_MODELING__
- // rth = 1.0/(gth*$mfactor);
- // cth = cth*$mfactor;
- rth = 1.0/(gth*1);
- cth = cth*1;
- `else // not__VAMS_COMPACT_MODELING__
- rth = 1.0/(gth*m);
- cth = cth*m;
- `endif
- `endif
- power_OP = power;
- v_OP = v;
- i_OP = i;
- r0_OP = r0;
- weff = weff_um;
- leff = leff_um;
- r_dc_OP = r_dc;
- r_ac_OP = r_ac;
- end // postProcess
-
- end // analog
-endmodule