Remove obsolete adms branch
This commit is contained in:
parent
864ee815bc
commit
55189b01fe
|
|
@ -1,674 +0,0 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
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.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
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 <https://www.gnu.org/licenses/>.
|
||||
|
||||
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:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
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
|
||||
<https://www.gnu.org/licenses/>.
|
||||
|
||||
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
|
||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
||||
|
|
@ -1,803 +0,0 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!--
|
||||
This file is part of adms - http://sourceforge.net/projects/mot-adms.
|
||||
|
||||
adms is a code generator for the Verilog-AMS language.
|
||||
|
||||
Copyright (C) 2002-2012 Laurent Lemaitre <r29173@users.sourceforge.net>
|
||||
Copyright (C) 2015-2016 Guilherme Brondani Torri <guitorri@gmail.com>
|
||||
2012 Ryan Fox <ryan.fox@upverter.com>
|
||||
|
||||
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 <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<!-- built-in implicit transforms @GIT_VERSION=unknown@ -->
|
||||
<!-- this file is saved in local working directory, then downloaded prior any -e xml files -->
|
||||
<!-- unless flag '-x' is specified -->
|
||||
|
||||
<!DOCTYPE admst SYSTEM "admst.dtd">
|
||||
<admst version="2.3.0" xmlns:admst="http://mot-adms.sourceforge.net/adms/admst.xml">
|
||||
|
||||
<admst:variable name="globalmodule"/>
|
||||
<admst:variable name="globalassignment"/>
|
||||
<admst:variable name="globalcontribution"/>
|
||||
<admst:variable name="globalexpression"/>
|
||||
<admst:variable name="globalopdependent" string="no"/>
|
||||
<admst:variable name="globalpartitionning"/>
|
||||
<admst:variable name="globaltreenode"/>
|
||||
|
||||
<admst:template match="e:dependency">
|
||||
<admst:choose>
|
||||
<admst:when test="[datatypename='expression']">
|
||||
<admst:variable name="globalexpression" path="."/>
|
||||
<admst:apply-templates select="tree" match="e:dependency"/>
|
||||
<admst:variable name="globalexpression"/>
|
||||
<admst:value-to select="dependency" path="tree/dependency"/>
|
||||
<admst:value-to select="dependency[.='constant' and $globalopdependent='yes']" string="noprobe"/>
|
||||
<admst:choose>
|
||||
<admst:when test="[nilled($globalpartitionning)]">
|
||||
<admst:value-to select="variable/usedinevaluate" string="yes"/>
|
||||
</admst:when>
|
||||
<admst:when test="[$globalpartitionning='initial_model']">
|
||||
<admst:value-to select="variable/usedinmodel" string="yes"/>
|
||||
</admst:when>
|
||||
<admst:when test="[$globalpartitionning='initial_instance']">
|
||||
<admst:value-to select="variable/usedininstance" string="yes"/>
|
||||
</admst:when>
|
||||
<admst:when test="[$globalpartitionning='initial_step']">
|
||||
<admst:value-to select="variable/usedininitial_step" string="yes"/>
|
||||
</admst:when>
|
||||
<admst:when test="[$globalpartitionning='noise']">
|
||||
<admst:value-to select="variable/usedinnoise" string="yes"/>
|
||||
</admst:when>
|
||||
<admst:when test="[$globalpartitionning='final_step']">
|
||||
<admst:value-to select="variable/usedinfinal" string="yes"/>
|
||||
</admst:when>
|
||||
</admst:choose>
|
||||
<admst:reverse select="function"/>
|
||||
<admst:value-to select="math/value" path="tree/math/value"/>
|
||||
</admst:when>
|
||||
<admst:when test="[datatypename='probe']">
|
||||
<admst:value-to select="dependency" string="linear"/>
|
||||
<admst:push into="$globalexpression/probe" select="." onduplicate="ignore"/>
|
||||
</admst:when>
|
||||
<admst:when test="[datatypename='array']">
|
||||
<admst:apply-templates select="variable" match="e:dependency"/>
|
||||
<admst:value-to select="dependency" path="variable/dependency"/>
|
||||
</admst:when>
|
||||
<admst:when test="[datatypename='variable']">
|
||||
<admst:push into="$globalexpression/probe" select="probe" onduplicate="ignore"/>
|
||||
<admst:push into="$globalexpression/variable" select="." onduplicate="ignore"/>
|
||||
<admst:push into="$globaltreenode/@variable" select="." onduplicate="ignore"/>
|
||||
<admst:value-to select="dependency" path="prototype/dependency"/>
|
||||
</admst:when>
|
||||
<admst:when test="[datatypename='mapply_unary']">
|
||||
<admst:apply-templates select="arg1" match="e:dependency"/>
|
||||
<admst:value-to select="dependency" path="arg1/dependency"/>
|
||||
<admst:value-to select="[name='minus']/math/value" string="-%(arg1/math/value)"/>
|
||||
</admst:when>
|
||||
<admst:when test="[datatypename='mapply_binary']">
|
||||
<admst:apply-templates select="arg1|arg2" match="e:dependency"/>
|
||||
<!--
|
||||
+: -: *: /:
|
||||
c np l nl c np l nl c np l nl c np nl nl
|
||||
np np l nl np np l nl np np l nl np np nl nl
|
||||
l l l nl l l l nl l l nl nl l l nl nl
|
||||
nl nl nl nl nl nl nl nl nl nl nl nl nl nl nl nl
|
||||
-->
|
||||
<admst:choose>
|
||||
<admst:when test="[arg1/dependency='nonlinear' or arg2/dependency='nonlinear']">
|
||||
<admst:value-to select="dependency" string="nonlinear"/>
|
||||
</admst:when>
|
||||
<admst:when test="[name='multtime' and (arg1|arg2)/dependency=('linear'|'linear')]">
|
||||
<admst:value-to select="dependency" string="nonlinear"/>
|
||||
</admst:when>
|
||||
<admst:when test="[name='multdiv' and arg2/dependency='linear']">
|
||||
<admst:value-to select="dependency" string="nonlinear"/>
|
||||
</admst:when>
|
||||
<admst:when test="[arg1/dependency='linear' or arg2/dependency='linear']">
|
||||
<admst:value-to select="dependency" string="linear"/>
|
||||
</admst:when>
|
||||
<admst:when test="[arg1/dependency='noprobe' or arg2/dependency='noprobe']">
|
||||
<admst:value-to select="dependency" string="noprobe"/>
|
||||
</admst:when>
|
||||
<admst:otherwise>
|
||||
<admst:value-to select="dependency" string="constant"/>
|
||||
</admst:otherwise>
|
||||
</admst:choose>
|
||||
</admst:when>
|
||||
<admst:when test="[datatypename='mapply_ternary']">
|
||||
<admst:apply-templates select="arg1|arg2|arg3" match="e:dependency"/>
|
||||
<!--
|
||||
?: - arg1=c - - arg1!=c -
|
||||
c np l nl np np l nl
|
||||
np np l nl np np l nl
|
||||
l l l nl l l l nl
|
||||
nl nl nl nl nl nl nl nl
|
||||
-->
|
||||
<admst:choose>
|
||||
<admst:when test="[arg2/dependency='nonlinear' or arg3/dependency='nonlinear']">
|
||||
<admst:value-to select="dependency" string="nonlinear"/>
|
||||
</admst:when>
|
||||
<admst:when test="[arg2/dependency='linear' or arg3/dependency='linear']">
|
||||
<admst:value-to select="dependency" string="linear"/>
|
||||
</admst:when>
|
||||
<admst:when test="[arg1/dependency!='constant' or arg2/dependency='noprobe' or arg3/dependency='noprobe']">
|
||||
<admst:value-to select="dependency" string="noprobe"/>
|
||||
</admst:when>
|
||||
<admst:otherwise>
|
||||
<admst:value-to select="dependency" string="constant"/>
|
||||
</admst:otherwise>
|
||||
</admst:choose>
|
||||
</admst:when>
|
||||
<admst:when test="[datatypename='function']">
|
||||
<admst:choose>
|
||||
<admst:when test="[name='ddx' or name='\$ddx' or name='\$derivate']">
|
||||
<admst:value-to select="$globalassignment/lhs/derivate" string="yes"/>
|
||||
<admst:apply-templates select="arguments[1]" match="e:dependency"/>
|
||||
<admst:push into="$globalexpression/variable/ddxprobe" select="arguments[2]" onduplicate="ignore"/>
|
||||
<admst:choose>
|
||||
<admst:when test="arguments[1]/dependency[.='constant' or .='noprobe']">
|
||||
<admst:value-to select="dependency" path="arguments[1]/dependency"/>
|
||||
</admst:when>
|
||||
<admst:otherwise>
|
||||
<admst:value-to select="dependency" string="nonlinear"/>
|
||||
</admst:otherwise>
|
||||
</admst:choose>
|
||||
</admst:when>
|
||||
<admst:when test="[name='\$port_connected']">
|
||||
<admst:value-to select="dependency" string="constant"/>
|
||||
</admst:when>
|
||||
<admst:otherwise>
|
||||
<admst:apply-templates select="arguments" match="e:dependency"/>
|
||||
<admst:choose>
|
||||
<admst:when test="[(name='ddt' or name='\$ddt')or(name='idt' or name='\$idt')]">
|
||||
<admst:value-to select="dependency" string="nonlinear"/>
|
||||
</admst:when>
|
||||
<admst:when test="arguments/dependency[.='linear' or .='nonlinear']">
|
||||
<admst:value-to select="dependency" string="nonlinear"/>
|
||||
</admst:when>
|
||||
<admst:when test="arguments/dependency[.='noprobe']">
|
||||
<admst:value-to select="dependency" string="noprobe"/>
|
||||
</admst:when>
|
||||
<admst:otherwise>
|
||||
<admst:value-to select="dependency" string="constant"/>
|
||||
</admst:otherwise>
|
||||
</admst:choose>
|
||||
</admst:otherwise>
|
||||
</admst:choose>
|
||||
<admst:value-to test="dependency[.='linear' or .='nonlinear']" select="$globalexpression/hasVoltageDependentFunction" string="yes"/>
|
||||
<admst:value-to select="subexpression/expression" path="$globalexpression"/>
|
||||
<!-- fixme: these flags should be set after all contribs are transformed to ...<+F(...); canonical form -->
|
||||
<admst:value-to test="[name='ddt']" select="$globalcontribution/#fixmedynamic" path="1"/>
|
||||
<admst:value-to test="[name='white_noise']" select="$globalcontribution/#fixmewhitenoise" path="1"/>
|
||||
<admst:value-to test="[name='flicker_noise']" select="$globalcontribution/#fixmeflickernoise" path="1"/>
|
||||
<admst:value-to test="[name='\$temperature']" select="$globalassignment/lhs/TemperatureDependent" string="yes"/>
|
||||
<admst:choose>
|
||||
<admst:when
|
||||
test="[
|
||||
name='\$abstime' or
|
||||
name='\$realtime' or
|
||||
name='\$temperature' or
|
||||
name='\$port_connected' or
|
||||
name='\$vt' or
|
||||
name='idt' or
|
||||
name='ddt' or
|
||||
name='\$param_given' or
|
||||
name='\$given' or
|
||||
name='ddx' or
|
||||
name='flicker_noise' or
|
||||
name='white_noise'
|
||||
]">
|
||||
</admst:when>
|
||||
|
||||
<!-- Table 4-14 - Standard Functions -->
|
||||
<!-- Table 4-15 - Trigonometric and Hyperbolic Functions-->
|
||||
<admst:when
|
||||
test="[name='analysis' or name='\$analysis' or name='\$simparam' or name='simparam' or
|
||||
name='\$shrinka' or name='\$shrinkl' or name='\$limexp' or name='limexp' or name='\$limit' or
|
||||
name='ln' or
|
||||
name='log' or
|
||||
name='exp' or
|
||||
name='sqrt' or
|
||||
name='min' or
|
||||
name='max' or
|
||||
name='abs' or
|
||||
name='pow' or
|
||||
name='floor' or
|
||||
name='ceil' or
|
||||
name='sin' or
|
||||
name='cos' or
|
||||
name='tan' or
|
||||
name='asin' or
|
||||
name='acos' or
|
||||
name='atan' or
|
||||
name='atan2' or
|
||||
name='hypot' or
|
||||
name='sinh' or
|
||||
name='cosh' or
|
||||
name='tanh' or
|
||||
name='asinh' or
|
||||
name='acosh' or
|
||||
name='atanh'
|
||||
]">
|
||||
<admst:push into="$globalexpression/function" select="."/>
|
||||
<admst:value-to select="class" string="builtin"/>
|
||||
</admst:when>
|
||||
<admst:when test="[name='transition']">
|
||||
<admst:push into="$globalexpression/function" select="."/>
|
||||
</admst:when>
|
||||
<admst:otherwise>
|
||||
<admst:assert test="[exists(definition)]" format="%(lexval/(f|':'|l|':'|c)): analog function '%(name)' is undefined\n"/>
|
||||
</admst:otherwise>
|
||||
</admst:choose>
|
||||
</admst:when>
|
||||
<admst:when test="[datatypename='number']">
|
||||
<admst:choose>
|
||||
<admst:when test="[scalingunit='1']">
|
||||
<admst:value-to select="math/value" path="value"/>
|
||||
</admst:when>
|
||||
<admst:when test="[scalingunit='E']">
|
||||
<admst:warning format="%(lexval/(f|':'|l|':'|c)): non-standard scale factor: %(scalingunit)\n"/>
|
||||
<admst:value-to select="math/value" string="%(value)e+18"/>
|
||||
</admst:when>
|
||||
<admst:when test="[scalingunit='P']">
|
||||
<admst:warning format="%(lexval/(f|':'|l|':'|c)): non-standard scale factor: %(scalingunit)\n"/>
|
||||
<admst:value-to select="math/value" string="%(value)e+15"/>
|
||||
</admst:when>
|
||||
<admst:when test="[scalingunit='T']">
|
||||
<admst:value-to select="math/value" string="%(value)e+12"/>
|
||||
</admst:when>
|
||||
<admst:when test="[scalingunit='G']">
|
||||
<admst:value-to select="math/value" string="%(value)e+9"/>
|
||||
</admst:when>
|
||||
<admst:when test="[scalingunit='M']">
|
||||
<admst:value-to select="math/value" string="%(value)e+6"/>
|
||||
</admst:when>
|
||||
<admst:when test="[scalingunit='K']">
|
||||
<admst:value-to select="math/value" string="%(value)e+3"/>
|
||||
</admst:when>
|
||||
<admst:when test="[scalingunit='k']">
|
||||
<admst:value-to select="math/value" string="%(value)e+3"/>
|
||||
</admst:when>
|
||||
<admst:when test="[scalingunit='h']">
|
||||
<admst:value-to select="math/value" string="%(value)e+2"/>
|
||||
<admst:warning format="%(lexval/(f|':'|l|':'|c)): non-standard scale factor: %(scalingunit)\n"/>
|
||||
</admst:when>
|
||||
<admst:when test="[scalingunit='D']">
|
||||
<admst:value-to select="math/value" string="%(value)e+1"/>
|
||||
<admst:warning format="%(lexval/(f|':'|l|':'|c)): non-standard scale factor: %(scalingunit)\n"/>
|
||||
</admst:when>
|
||||
<admst:when test="[scalingunit='d']">
|
||||
<admst:warning format="%(lexval/(f|':'|l|':'|c)): non-standard scale factor: %(scalingunit)\n"/>
|
||||
<admst:value-to select="math/value" string="%(value)e-1"/>
|
||||
</admst:when>
|
||||
<admst:when test="[scalingunit='c']">
|
||||
<admst:value-to select="math/value" string="%(value)e-2"/>
|
||||
</admst:when>
|
||||
<admst:when test="[scalingunit='m']">
|
||||
<admst:value-to select="math/value" string="%(value)e-3"/>
|
||||
</admst:when>
|
||||
<admst:when test="[scalingunit='u']">
|
||||
<admst:value-to select="math/value" string="%(value)e-6"/>
|
||||
</admst:when>
|
||||
<admst:when test="[scalingunit='n']">
|
||||
<admst:value-to select="math/value" string="%(value)e-9"/>
|
||||
</admst:when>
|
||||
<admst:when test="[scalingunit='A']">
|
||||
<admst:warning format="%(lexval/(f|':'|l|':'|c)): non-standard scale factor: %(scalingunit)\n"/>
|
||||
<admst:value-to select="math/value" string="%(value)e-10"/>
|
||||
</admst:when>
|
||||
<admst:when test="[scalingunit='p']">
|
||||
<admst:value-to select="math/value" string="%(value)e-12"/>
|
||||
</admst:when>
|
||||
<admst:when test="[scalingunit='f']">
|
||||
<admst:value-to select="math/value" string="%(value)e-15"/>
|
||||
</admst:when>
|
||||
<admst:when test="[scalingunit='a']">
|
||||
<admst:value-to select="math/value" string="%(value)e-18"/>
|
||||
</admst:when>
|
||||
<admst:otherwise>
|
||||
<admst:error format="%(lexval/(f|':'|l|':'|c)): unit not supported: %(scalingunit)\n"/>
|
||||
</admst:otherwise>
|
||||
</admst:choose>
|
||||
</admst:when>
|
||||
<admst:when test="[datatypename='string']"/>
|
||||
<admst:otherwise>
|
||||
<admst:fatal format="%(datatypename): case not handled\n"/>
|
||||
</admst:otherwise>
|
||||
</admst:choose>
|
||||
</admst:template>
|
||||
|
||||
<admst:template match="dependency">
|
||||
<admst:choose>
|
||||
<admst:when test="[datatypename='callfunction']">
|
||||
<admst:apply-templates select="function/arguments" match="e:dependency"/>
|
||||
<admst:value-to select="dependency" path="function/dependency"/>
|
||||
</admst:when>
|
||||
<admst:when test="[datatypename='whileloop']">
|
||||
<!--
|
||||
w, logic(D,while.d) , d=wb.d
|
||||
c !c
|
||||
c wb,w,!c?(D,wb,!D) D,wb,!D
|
||||
!c wb wb
|
||||
-->
|
||||
<admst:apply-templates select="while" match="e:dependency"/>
|
||||
<admst:apply-templates select="[$globalopdependent='yes' or while/dependency='constant']/whileblock" match="dependency"/>
|
||||
<admst:if test="[$globalopdependent='no']">
|
||||
<admst:apply-templates select="while[dependency='constant']" match="e:dependency"/>
|
||||
<admst:if test="[while/dependency!='constant']">
|
||||
<admst:variable name="globalopdependent" string="yes"/>
|
||||
<admst:apply-templates select="whileblock" match="dependency"/>
|
||||
<admst:variable name="globalopdependent" string="no"/>
|
||||
</admst:if>
|
||||
</admst:if>
|
||||
<!--
|
||||
wl: w=c w!=c
|
||||
c np l nl np np l nl
|
||||
np np l nl np np l nl
|
||||
l l l nl l l l nl
|
||||
nl nl nl nl nl nl nl nl
|
||||
-->
|
||||
<admst:choose>
|
||||
<admst:when test="[whileblock/dependency='nonlinear']">
|
||||
<admst:value-to select="dependency" string="nonlinear"/>
|
||||
</admst:when>
|
||||
<admst:when test="[whileblock/dependency='linear']">
|
||||
<admst:value-to select="dependency" string="linear"/>
|
||||
</admst:when>
|
||||
<admst:when test="[while/dependency!='constant' or whileblock/dependency='noprobe']">
|
||||
<admst:value-to select="dependency" string="noprobe"/>
|
||||
</admst:when>
|
||||
<admst:otherwise>
|
||||
<admst:value-to select="dependency" string="constant"/>
|
||||
</admst:otherwise>
|
||||
</admst:choose>
|
||||
</admst:when>
|
||||
<admst:when test="[datatypename='forloop']">
|
||||
<admst:apply-templates select="initial|update" match="dependency"/>
|
||||
<admst:apply-templates select="condition" match="e:dependency"/>
|
||||
<admst:apply-templates select="[$globalopdependent='yes' or nilled((initial|condition|update)/[dependency!='constant'])]/forblock" match="dependency"/>
|
||||
<admst:if test="[$globalopdependent='no']">
|
||||
<admst:apply-templates select="(initial|update)/[dependency='constant']" match="dependency"/>
|
||||
<admst:apply-templates select="condition[dependency='constant']" match="e:dependency"/>
|
||||
<admst:if test="[condition/dependency!='constant' or initial/dependency!='constant' or update/dependency!='constant']">
|
||||
<admst:variable name="globalopdependent" string="yes"/>
|
||||
<admst:apply-templates select="forblock" match="dependency"/>
|
||||
<admst:variable name="globalopdependent" string="no"/>
|
||||
</admst:if>
|
||||
</admst:if>
|
||||
<!--
|
||||
fl: f=c f!=c
|
||||
c np l nl np np l nl
|
||||
np np l nl np np l nl
|
||||
l l l nl l l l nl
|
||||
nl nl nl nl nl nl nl nl
|
||||
-->
|
||||
<admst:choose>
|
||||
<admst:when test="[forblock/dependency='nonlinear']">
|
||||
<admst:value-to select="dependency" string="nonlinear"/>
|
||||
</admst:when>
|
||||
<admst:when test="[forblock/dependency='linear']">
|
||||
<admst:value-to select="dependency" string="linear"/>
|
||||
</admst:when>
|
||||
<admst:when test="[(condition!='constant' or initial!='constant' or update!='constant') or forblock/dependency='noprobe']">
|
||||
<admst:value-to select="dependency" string="noprobe"/>
|
||||
</admst:when>
|
||||
<admst:otherwise>
|
||||
<admst:value-to select="dependency" string="constant"/>
|
||||
</admst:otherwise>
|
||||
</admst:choose>
|
||||
</admst:when>
|
||||
<admst:when test="[datatypename='case']">
|
||||
<admst:variable name="globaltreenode" path="case"/>
|
||||
<admst:apply-templates select="case" match="e:dependency"/>
|
||||
<admst:variable name="globaltreenode"/>
|
||||
<admst:for-each select="caseitem">
|
||||
<admst:for-each select="condition">
|
||||
<admst:variable name="globaltreenode" path="."/>
|
||||
<admst:apply-templates select="." match="e:dependency"/>
|
||||
<admst:variable name="globaltreenode"/>
|
||||
</admst:for-each>
|
||||
<admst:apply-templates select="code" match="dependency"/>
|
||||
</admst:for-each>
|
||||
</admst:when>
|
||||
<admst:when test="[datatypename='conditional']">
|
||||
<admst:push into="$globalmodule/conditional" select="."/>
|
||||
<admst:apply-templates select="if" match="e:dependency"/>
|
||||
<admst:choose>
|
||||
<admst:when test="[$globalopdependent='no' and if/dependency!='constant']">
|
||||
<admst:variable name="globalopdependent" string="yes"/>
|
||||
<admst:apply-templates select="then|else" match="dependency"/>
|
||||
<admst:variable name="globalopdependent" string="no"/>
|
||||
</admst:when>
|
||||
<admst:otherwise>
|
||||
<admst:apply-templates select="then|else" match="dependency"/>
|
||||
</admst:otherwise>
|
||||
</admst:choose>
|
||||
<!--
|
||||
cd: i=c i!=c
|
||||
c np l nl np np l nl
|
||||
np np l nl np np l nl
|
||||
l l l nl l l l nl
|
||||
nl nl nl nl nl nl nl nl
|
||||
-->
|
||||
<admst:choose>
|
||||
<admst:when test="[then/dependency='nonlinear' or else/dependency='nonlinear']">
|
||||
<admst:value-to select="dependency" string="nonlinear"/>
|
||||
</admst:when>
|
||||
<admst:when test="[then/dependency='linear' or else/dependency='linear']">
|
||||
<admst:value-to select="dependency" string="linear"/>
|
||||
</admst:when>
|
||||
<admst:when test="[if/dependency!='constant' or then/dependency='noprobe' or else/dependency='noprobe']">
|
||||
<admst:value-to select="dependency" string="noprobe"/>
|
||||
</admst:when>
|
||||
<admst:otherwise>
|
||||
<admst:value-to select="dependency" string="constant"/>
|
||||
</admst:otherwise>
|
||||
</admst:choose>
|
||||
</admst:when>
|
||||
<admst:when test="[datatypename='contribution']">
|
||||
<admst:variable name="globalcontribution" path="."/>
|
||||
<admst:apply-templates select="rhs" match="e:dependency"/>
|
||||
<admst:variable name="globalcontribution"/>
|
||||
<admst:push into="lhs/probe" select="rhs/probe" onduplicate="ignore"/>
|
||||
<admst:value-to select="dependency" string="nonlinear"/>
|
||||
</admst:when>
|
||||
<admst:when test="[datatypename='assignment']">
|
||||
<admst:choose>
|
||||
<admst:when test="[lhs/datatypename='array']">
|
||||
<admst:variable name="lhs" path="lhs/variable"/>
|
||||
</admst:when>
|
||||
<admst:otherwise>
|
||||
<admst:variable name="lhs" path="lhs"/>
|
||||
</admst:otherwise>
|
||||
</admst:choose>
|
||||
<admst:choose>
|
||||
<admst:when test="[$globalpartitionning='initial_model']">
|
||||
<admst:value-to select="$lhs/setinmodel" string="yes"/>
|
||||
</admst:when>
|
||||
<admst:when test="[$globalpartitionning='initial_instance']">
|
||||
<admst:value-to select="$lhs/setininstance" string="yes"/>
|
||||
</admst:when>
|
||||
<admst:when test="[$globalpartitionning='initial_step']">
|
||||
<admst:value-to select="$lhs/setininitial_step" string="yes"/>
|
||||
</admst:when>
|
||||
<admst:when test="[$globalpartitionning='noise']">
|
||||
<admst:value-to select="$lhs/setinnoise" string="yes"/>
|
||||
</admst:when>
|
||||
<admst:when test="[$globalpartitionning='final_step']">
|
||||
<admst:value-to select="$lhs/setinfinal" string="yes"/>
|
||||
</admst:when>
|
||||
<admst:otherwise>
|
||||
<admst:value-to select="$lhs/setinevaluate" string="yes"/>
|
||||
</admst:otherwise>
|
||||
</admst:choose>
|
||||
<admst:variable name="globalassignment" path="."/>
|
||||
<admst:apply-templates select="rhs" match="e:dependency"/>
|
||||
<admst:variable name="globalassignment"/>
|
||||
<admst:push into="$lhs/variable" select="rhs/variable" onduplicate="ignore"/>
|
||||
<admst:value-to test="rhs/variable[TemperatureDependent='yes']" select="$lhs/TemperatureDependent" string="yes"/>
|
||||
<!--
|
||||
d=rhs.d,d=(c and D)?np
|
||||
l(l,r,$globalopdependent)
|
||||
$globalopdependent='no' $globalopdependent='yes'
|
||||
c np l nl np np l nl
|
||||
np np l nl np np l nl
|
||||
l l l nl l l l nl
|
||||
nl nl nl nl nl nl nl nl
|
||||
-->
|
||||
<admst:value-to select="dependency" path="rhs/dependency"/>
|
||||
<admst:choose>
|
||||
<admst:when test="[$lhs/prototype/dependency='nonlinear' or rhs/dependency='nonlinear']">
|
||||
<admst:value-to select="$lhs/(.|prototype)/dependency" string="nonlinear"/>
|
||||
</admst:when>
|
||||
<admst:when test="[$lhs/prototype/dependency='linear' or rhs/dependency='linear']">
|
||||
<admst:value-to select="$lhs/(.|prototype)/dependency" string="linear"/>
|
||||
</admst:when>
|
||||
<admst:when test="[$globalopdependent='yes' or $lhs/prototype/dependency='noprobe' or rhs/dependency='noprobe']">
|
||||
<admst:value-to select="$lhs/(.|prototype)/dependency" string="noprobe"/>
|
||||
</admst:when>
|
||||
<admst:otherwise>
|
||||
<admst:value-to select="$lhs/(.|prototype)/dependency" string="constant"/>
|
||||
</admst:otherwise>
|
||||
</admst:choose>
|
||||
<admst:push into="$lhs/probe" select="rhs/probe" onduplicate="ignore"/>
|
||||
</admst:when>
|
||||
<admst:when test="[datatypename='block']">
|
||||
<admst:reverse select="item|variable"/>
|
||||
<admst:variable name="forcepartitionning" string="yes"/>
|
||||
<admst:choose>
|
||||
<admst:when test="[name='initial_model']">
|
||||
<admst:variable name="globalpartitionning" string="initial_model"/>
|
||||
</admst:when>
|
||||
<admst:when test="[name='initial_instance']">
|
||||
<admst:variable name="globalpartitionning" string="initial_instance"/>
|
||||
</admst:when>
|
||||
<admst:when test="[name='initial_step']">
|
||||
<admst:variable name="globalpartitionning" string="initial_step"/>
|
||||
</admst:when>
|
||||
<admst:when test="[name='noise']">
|
||||
<admst:variable name="globalpartitionning" string="noise"/>
|
||||
</admst:when>
|
||||
<admst:when test="[name='final_step']">
|
||||
<admst:variable name="globalpartitionning" string="final_step"/>
|
||||
</admst:when>
|
||||
<admst:otherwise>
|
||||
<admst:variable name="forcepartitionning" string="no"/>
|
||||
</admst:otherwise>
|
||||
</admst:choose>
|
||||
<admst:apply-templates select="item" match="dependency"/>
|
||||
<admst:variable test="[$forcepartitionning='yes']" name="globalpartitionning"/>
|
||||
<admst:choose>
|
||||
<admst:when test="item[dependency='nonlinear']">
|
||||
<admst:value-to select="dependency" string="nonlinear"/>
|
||||
</admst:when>
|
||||
<admst:when test="item[dependency='linear']">
|
||||
<admst:value-to select="dependency" string="linear"/>
|
||||
</admst:when>
|
||||
<admst:when test="item[dependency='noprobe']">
|
||||
<admst:value-to select="dependency" string="noprobe"/>
|
||||
</admst:when>
|
||||
<admst:otherwise>
|
||||
<admst:value-to select="dependency" string="constant"/>
|
||||
</admst:otherwise>
|
||||
</admst:choose>
|
||||
</admst:when>
|
||||
<admst:when test="[datatypename='nilled']"/>
|
||||
<admst:when test="[datatypename='blockvariable']"/>
|
||||
<admst:otherwise>
|
||||
<admst:fatal format="%(datatypename): case not handled\n"/>
|
||||
</admst:otherwise>
|
||||
</admst:choose>
|
||||
</admst:template>
|
||||
|
||||
<admst:template match="adms.implicit.xml.module">
|
||||
<admst:variable name="globalmodule" path="."/>
|
||||
<admst:reverse select="analogfunction|analogfunction/variable|node|variable
|
||||
|instance|instance/terminal|contribution|forloop|whileloop|case|callfunction"/>
|
||||
<admst:value-to select="node[location='ground']/grounded" string="yes"/>
|
||||
<admst:for-each select="branch">
|
||||
<admst:value-to select="discipline" path="pnode/discipline"/>
|
||||
<admst:value-to select="[nnode/grounded='yes']/grounded" string="yes"/>
|
||||
<!-- FIXME: check that pnode/nnode have same discipline -->
|
||||
</admst:for-each>
|
||||
<admst:for-each select="source|probe">
|
||||
<admst:value-to select="discipline" path="branch/discipline"/>
|
||||
<admst:value-to select="[branch/grounded='yes']/grounded" string="yes"/>
|
||||
</admst:for-each>
|
||||
<admst:for-each select="instance">
|
||||
<admst:push into="module/instantiator" select=".." onduplicate="ignore"/>
|
||||
<admst:assert select="terminal" test="terminal[nodefrommodule/location='external']"
|
||||
format="%(../instantiator).%(nodefrommodule/name): is not terminal\n"/>
|
||||
<admst:if test="[count(parameterset)!=0]">
|
||||
<admst:assert select="parameterset" test="parameterset[parameter/input='yes']"
|
||||
format="%(../instantiator).%(parameter/name): is not input parameter\n"/>
|
||||
</admst:if>
|
||||
</admst:for-each>
|
||||
<admst:apply-templates select="(analogfunction/tree)|(analog/code)" match="dependency"/>
|
||||
<admst:for-each select="variable">
|
||||
<admst:value-to select="[dependency!='constant']/OPdependent" string="yes"/>
|
||||
<admst:value-to select="output" path="input"/>
|
||||
<admst:for-each select="attribute">
|
||||
<admst:value-to select="[name='type' and value='instance']/../parametertype" string="instance"/>
|
||||
<admst:value-to select="[name='ask' and value='yes']/../output" string="yes"/>
|
||||
<admst:value-to select="[name='ask' and value='no']/../output" string="no"/>
|
||||
</admst:for-each>
|
||||
<admst:apply-templates select="default" match="e:dependency"/>
|
||||
<admst:value-to
|
||||
select="default[exists(tree[datatypename='mapply_unary' and name='minus' and arg1/datatypename='number' and arg1/value='1.0'])]/value"
|
||||
string="is_neg_one"/>
|
||||
<admst:value-to select="default[exists(tree[datatypename='number' and value='0.0'])]/value" string="is_zero"/>
|
||||
<admst:value-to select="default[exists(tree[datatypename='number' and value='1.0'])]/value" string="is_one"/>
|
||||
<admst:value-to select="scope"
|
||||
test="[(input='yes' and parametertype='model') or (input='no' and (setinmodel='yes' or usedinmodel='yes')
|
||||
and (setininstance='yes' or setininitial_step='yes' or setinevaluate='yes' or setinnoise='yes' or setinfinal='yes'
|
||||
or usedininstance='yes' or usedininitial_step='yes' or usedinevaluate='yes' or usedinnoise='yes' or usedinfinal='yes' or output='yes'))]"
|
||||
string="global_model"/>
|
||||
<admst:value-to select="scope"
|
||||
test="[(input='yes' and parametertype='instance') or
|
||||
(input='no' and setinmodel='no' and usedinmodel='no' and
|
||||
(((setininstance='yes' or usedininstance='yes') and (setininitial_step='yes' or setinevaluate='yes' or setinnoise='yes' or setinfinal='yes'
|
||||
or usedininitial_step='yes' or usedinevaluate='yes' or usedinnoise='yes' or usedinfinal='yes' or output='yes'))
|
||||
or ((setininitial_step='yes' or usedininitial_step='yes') and (setinevaluate='yes' or setinnoise='yes' or setinfinal='yes'
|
||||
or usedinevaluate='yes' or usedinnoise='yes' or usedinfinal='yes' or output='yes'))
|
||||
or ((setinevaluate='yes' or usedinevaluate='yes') and (setinnoise='yes' or setinfinal='yes'
|
||||
or usedinnoise='yes' or usedinfinal='yes' or output='yes'))
|
||||
or ((setinnoise='yes' or usedinnoise='yes') and (setinfinal='yes' or usedinfinal='yes' or output='yes'))
|
||||
or ((setinfinal='yes' or usedinfinal='yes') and output='yes')
|
||||
or (setinmodel='no' and setininstance='no' and setinevaluate='no' and setinnoise='no' and setinfinal='no' and
|
||||
usedinmodel='no' and usedininstance='no' and usedinevaluate='no' and usedinnoise='no' and usedinfinal='no' and output='yes')
|
||||
))]"
|
||||
string="global_instance"/>
|
||||
<admst:value-to select="isstate"
|
||||
test="[input='no' and scope='global_instance' and setininitial_step='yes' and (setinevaluate='yes' or usedinevaluate='yes')]"
|
||||
string="yes"/>
|
||||
</admst:for-each>
|
||||
<admst:template match="modify">
|
||||
<admst:choose>
|
||||
<admst:when test="[datatypename='block']">
|
||||
<admst:apply-templates select="reverse(item)" match="modify"/>
|
||||
<admst:value-to test="item[#modifys=1]" select="#modifys" path="1"/>
|
||||
<admst:value-to test="item[#modifyd=1]" select="#modifyd" path="1"/>
|
||||
<admst:value-to test="item[#modifyn=1]" select="#modifyn" path="1"/>
|
||||
<admst:value-to test="item[#modifyc=1]" select="#modifyc" path="1"/>
|
||||
</admst:when>
|
||||
<admst:when test="[datatypename='conditional']">
|
||||
<admst:apply-templates select="else|then" match="modify"/>
|
||||
<admst:value-to test="[then/#modifys=1 or else/#modifys=1]" select="#modifys|if/#modifys|if/variable/#modifys" path="1"/>
|
||||
<admst:value-to test="[then/#modifyd=1 or else/#modifyd=1]" select="#modifyd|if/#modifyd|if/variable/#modifyd" path="1"/>
|
||||
<admst:value-to test="[then/#modifyn=1 or else/#modifyn=1]" select="#modifyn|if/#modifyn|if/variable/#modifyn" path="1"/>
|
||||
<admst:value-to test="[then/#modifyc=1 or else/#modifyc=1]" select="#modifyc|if/#modifyc|if/variable/#modifyc" path="1"/>
|
||||
</admst:when>
|
||||
<admst:when test="[datatypename='whileloop']">
|
||||
<admst:apply-templates select="whileblock" match="modify"/>
|
||||
<admst:value-to test="[whileblock/#modifys=1]" select="#modifys|while/#modifys|while/variable/#modifys" path="1"/>
|
||||
<admst:value-to test="[whileblock/#modifyd=1]" select="#modifyd|while/#modifyd|while/variable/#modifyd" path="1"/>
|
||||
<admst:value-to test="[whileblock/#modifyn=1]" select="#modifyn|while/#modifyn|while/variable/#modifyn" path="1"/>
|
||||
<admst:value-to test="[whileblock/#modifyc=1]" select="#modifyc|while/#modifyc|while/variable/#modifyc" path="1"/>
|
||||
<admst:apply-templates select="whileblock" match="modify"/>
|
||||
</admst:when>
|
||||
<admst:when test="[datatypename='forloop']">
|
||||
<admst:choose>
|
||||
<admst:when test="[update/lhs/datatypename='array']">
|
||||
<admst:variable name="lhs" path="update/lhs/variable"/>
|
||||
</admst:when>
|
||||
<admst:otherwise>
|
||||
<admst:variable name="lhs" path="update/lhs"/>
|
||||
</admst:otherwise>
|
||||
</admst:choose>
|
||||
<admst:apply-templates select="forblock" match="modify"/>
|
||||
<admst:value-to test="[forblock/#modifys=1]" select="#modifys|(condition|update)/#modifys|(condition|update/rhs)/($lhs|variable)/#modifys" path="1"/>
|
||||
<admst:value-to test="[forblock/#modifyd=1]" select="#modifyd|(condition|update)/#modifyd|(condition|update/rhs)/($lhs|variable)/#modifyd" path="1"/>
|
||||
<admst:value-to test="[forblock/#modifyn=1]" select="#modifyn|(condition|update)/#modifyn|(condition|update/rhs)/($lhs|variable)/#modifyn" path="1"/>
|
||||
<admst:value-to test="[forblock/#modifyc=1]" select="#modifyc|(condition|update)/#modifyc|(condition|update/rhs)/($lhs|variable)/#modifyc" path="1"/>
|
||||
<admst:apply-templates select="forblock" match="modify"/>
|
||||
</admst:when>
|
||||
<admst:when test="[datatypename='case']">
|
||||
<admst:apply-templates select="caseitem/code" match="modify"/>
|
||||
<admst:for-each select="caseitem">
|
||||
<admst:value-to test="[code/#modifys=1 and defaultcase='no']" select="#modifys|condition/#modifys|condition/@variable/#modifys" path="1"/>
|
||||
<admst:value-to test="[code/#modifyd=1 and defaultcase='no']" select="#modifyd|condition/#modifyd|condition/@variable/#modifyd" path="1"/>
|
||||
<admst:value-to test="[code/#modifyn=1 and defaultcase='no']" select="#modifyn|condition/#modifyn|condition/@variable/#modifyn" path="1"/>
|
||||
<admst:value-to test="[code/#modifyc=1 and defaultcase='no']" select="#modifyc|condition/#modifyc|condition/@variable/#modifyc" path="1"/>
|
||||
</admst:for-each>
|
||||
<admst:value-to test="caseitem[#modifys=1]" select="#modifys|case/@variable/#modifys" path="1"/>
|
||||
<admst:value-to test="caseitem[#modifyd=1]" select="#modifyd|case/@variable/#modifyd" path="1"/>
|
||||
<admst:value-to test="caseitem[#modifyn=1]" select="#modifyn|case/@variable/#modifyn" path="1"/>
|
||||
<admst:value-to test="caseitem[#modifyc=1]" select="#modifyc|case/@variable/#modifyc" path="1"/>
|
||||
</admst:when>
|
||||
<admst:when test="[datatypename='assignment']">
|
||||
<admst:choose>
|
||||
<admst:when test="[lhs/datatypename='array']">
|
||||
<admst:variable name="lhs" path="lhs/variable"/>
|
||||
</admst:when>
|
||||
<admst:otherwise>
|
||||
<admst:variable name="lhs" path="lhs"/>
|
||||
</admst:otherwise>
|
||||
</admst:choose>
|
||||
<admst:value-to test="$lhs[exists(prototype/instance[#modifys=1])]" select="#modifys|rhs/#modifys|rhs/variable/#modifys" path="1"/>
|
||||
<admst:value-to test="$lhs[exists(prototype/instance[#modifyd=1])]" select="#modifyd|rhs/#modifys|rhs/variable/#modifyd" path="1"/>
|
||||
<admst:value-to test="$lhs[exists(prototype/instance[#modifyn=1])]" select="#modifyn|rhs/#modifys|rhs/variable/#modifyn" path="1"/>
|
||||
<admst:value-to test="$lhs[exists(prototype/instance[#modifyc=1])]" select="#modifyc|rhs/#modifys|rhs/variable/#modifyc" path="1"/>
|
||||
<admst:value-to test="$lhs/ddxprobe" select="#ddxprobe" string="yes"/>
|
||||
<admst:push into="rhs/variable/ddxprobe" select="$lhs/ddxprobe" onduplicate="ignore"/>
|
||||
</admst:when>
|
||||
<admst:when test="[datatypename='contribution']">
|
||||
<admst:choose>
|
||||
<admst:when test="[#fixmedynamic=1]">
|
||||
<admst:value-to select="#modifyd|(lhs|rhs|rhs/variable)/#modifyd" path="1"/>
|
||||
</admst:when>
|
||||
<admst:when test="[#fixmeflickernoise=1]">
|
||||
<admst:value-to select="flickernoise|lhs/flickernoise" string="yes"/>
|
||||
<admst:value-to select="#modifyn|(lhs|rhs|rhs/variable)/#modifyn" path="1"/>
|
||||
</admst:when>
|
||||
<admst:when test="[#fixmewhitenoise=1]">
|
||||
<admst:value-to select="whitenoise|lhs/whitenoise" string="yes"/>
|
||||
<admst:value-to select="#modifyn|(lhs|rhs|rhs/variable)/#modifyn" path="1"/>
|
||||
</admst:when>
|
||||
<admst:otherwise>
|
||||
<admst:value-to select="#modifys|(lhs|rhs|rhs/variable)/#modifys" path="1"/>
|
||||
</admst:otherwise>
|
||||
</admst:choose>
|
||||
</admst:when>
|
||||
<admst:when test="[datatypename='blockvariable']">
|
||||
</admst:when>
|
||||
<admst:when test="[datatypename='nilled']"/>
|
||||
<admst:when test="[datatypename='callfunction']">
|
||||
<admst:value-to select="#modifyc|function/arguments/variable/#modifyc" path="1"/>
|
||||
</admst:when>
|
||||
<admst:otherwise><admst:fatal format="%(datatypename): case not handled\n"/></admst:otherwise>
|
||||
</admst:choose>
|
||||
</admst:template>
|
||||
<admst:apply-templates select="analog/code" match="modify"/>
|
||||
<admst:push into="@analogitems" select="assignment|assignment/rhs|contribution|contribution/rhs|block|forloop|whileloop|case|callfunction|conditional|conditional/if"/>
|
||||
<admst:value-to select="@analogitems[#modifys=1 or #modifyn=1 or #modifyc=1]/static" string="yes"/>
|
||||
<admst:value-to select="@analogitems[#modifys!=1 and #modifyn!=1 and #modifyc!=1]/dynamic" string="yes"/>
|
||||
|
||||
<admst:value-to select="(.|blockvariable)/variable[exists(instance[#modifys=1])]/#modifys" path="1"/>
|
||||
<admst:value-to select="(.|blockvariable)/variable[exists(instance[#modifyd=1])]/#modifyd" path="1"/>
|
||||
<admst:value-to select="(.|blockvariable)/variable[exists(instance[#modifyn=1])]/#modifyn" path="1"/>
|
||||
<admst:value-to select="(.|blockvariable)/variable[exists(instance[#modifyc=1])]/#modifyc" path="1"/>
|
||||
|
||||
<admst:value-to select="(.|blockvariable)/variable[exists(instance[#modifys=1 or #modifyd=1 or #modifyn=1])]/insource" string="yes"/>
|
||||
<admst:value-to select="(.|blockvariable)/variable[exists(instance[#modifys=1 or #modifyn=1 or #modifyc=1])]/static" string="yes"/>
|
||||
<admst:value-to select="(.|blockvariable)/variable[exists(instance[#modifyd=1])]/dynamic" string="yes"/>
|
||||
<admst:value-to select="source[#modifys=1 or #modifyn=1]/static" string="yes"/>
|
||||
<admst:value-to select="source[#modifyd=1]/dynamic" string="yes"/>
|
||||
|
||||
<!-- jacobian -->
|
||||
<admst:for-each select="contribution">
|
||||
<admst:variable name="mycontribution" path="."/>
|
||||
<admst:variable name="mysource" path="lhs"/>
|
||||
<admst:push into="$mysource/attribute" select="attribute"/>
|
||||
<!-- case I() <+ .V(). -->
|
||||
<admst:for-each select="rhs/probe[(nature=discipline/potential)and($mysource/nature=$mysource/discipline/flow)]">
|
||||
<admst:new datatype="jacobian" inputs="module,$mysource/branch/pnode,branch/pnode">
|
||||
<admst:push into="/@jacobian" select="." onduplicate="ignore"/>
|
||||
</admst:new>
|
||||
<admst:new test="branch/nnode[grounded='no']" datatype="jacobian" inputs="module,$mysource/branch/pnode,branch/nnode">
|
||||
<admst:push into="/@jacobian" select="." onduplicate="ignore"/>
|
||||
</admst:new>
|
||||
<admst:new test="$mysource/branch/nnode[grounded='no']" datatype="jacobian" inputs="module,$mysource/branch/nnode,branch/pnode">
|
||||
<admst:push into="/@jacobian" select="." onduplicate="ignore"/>
|
||||
<admst:new test="../branch/nnode[grounded='no']" datatype="jacobian" inputs="module,$mysource/branch/nnode,../branch/nnode">
|
||||
<admst:push into="/@jacobian" select="." onduplicate="ignore"/>
|
||||
</admst:new>
|
||||
</admst:new>
|
||||
<admst:for-each select="/reverse(@jacobian)">
|
||||
<admst:choose>
|
||||
<admst:when test="module/jacobian[row=../../row and column=../../column]">
|
||||
<admst:variable name="jacobian" path="module/jacobian[row=../../row and column=../../column]"/>
|
||||
</admst:when>
|
||||
<admst:otherwise>
|
||||
<admst:variable name="jacobian" path="."/>
|
||||
<admst:value-to select="[row=column]/diagonal" string="yes"/>
|
||||
<admst:push into="module/jacobian" select="."/>
|
||||
</admst:otherwise>
|
||||
</admst:choose>
|
||||
<admst:value-to test="$mycontribution[dynamic='yes']" select="$jacobian/dynamic" string="yes"/>
|
||||
<admst:value-to test="$mycontribution[dynamic='no']" select="$jacobian/static" string="yes"/>
|
||||
</admst:for-each>
|
||||
<admst:value-to select="/@jacobian"/>
|
||||
</admst:for-each>
|
||||
</admst:for-each>
|
||||
<admst:reverse select="jacobian"/>
|
||||
</admst:template>
|
||||
|
||||
<admst:template match="adms.implicit.xml.nature">
|
||||
<admst:reverse select="/argv|/discipline|/nature"/>
|
||||
<admst:for-each select="/nature">
|
||||
<admst:value-to select="ddt_nature" path="/nature[name='%(../../ddt_name)']"/>
|
||||
<admst:value-to select="idt_nature" path="/nature[name='%(../../idt_name)']"/>
|
||||
</admst:for-each>
|
||||
</admst:template>
|
||||
|
||||
<admst:template match="adms.implicit.xml">
|
||||
<admst:apply-templates select="." match="adms.implicit.xml.nature"/>
|
||||
<admst:apply-templates select="/module" match="adms.implicit.xml.module"/>
|
||||
</admst:template>
|
||||
|
||||
<admst:apply-templates select="." match="adms.implicit.xml"/>
|
||||
|
||||
<!--admst:sendmail>
|
||||
<admst:subject>automatic mailing from %(/simulator/fullname)</admst:subject>
|
||||
<admst:arguments recipient="%(/simulator/fullname)"/>
|
||||
<admst:to recipient="r29173@freescale.com"/>
|
||||
<admst:message>
|
||||
</admst:message>
|
||||
</admst:sendmail-->
|
||||
|
||||
|
||||
</admst>
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,124 +0,0 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
|
||||
<!--
|
||||
Written by Laurent Lemaitre - r29173@users.sourceforge.net
|
||||
Documentation:
|
||||
http://sourceforge.net/docman/display_doc.php?docid=18993&group_id=84289
|
||||
Target Interface: ngspice
|
||||
Supported by adms-1.x.x
|
||||
This file is used by adms - http://sourceforge.net/projects/mot-adms.
|
||||
adms 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 of the License, or
|
||||
(at your option) any later version.
|
||||
adms 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 adms; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
-->
|
||||
|
||||
<!DOCTYPE admst SYSTEM "admst.dtd">
|
||||
<admst version="2.3.0" xmlns:admst="http://mot-adms.sourceforge.net/xml-files/admst">
|
||||
|
||||
|
||||
<admst:template match="code">
|
||||
<admst:value-of select="attribute[name='ngspicename']/value"/>
|
||||
<admst:variable name="module" select="%s"/>
|
||||
|
||||
#include "ngspice/ngspice.h"
|
||||
#include "ngspice/devdefs.h"
|
||||
#include "$(module)defs.h"
|
||||
#include "ngspice/suffix.h"
|
||||
|
||||
IFparm $(module)pTable[] = {
|
||||
<admst:for-each select="variable[parametertype='instance' and input='yes']">
|
||||
<admst:choose>
|
||||
<admst:when test="[type='real']">
|
||||
IOP("%(lower-case(name))",$(module)_instance_%(name),IF_REAL,"%(name)"),
|
||||
</admst:when>
|
||||
<admst:when test="[type='integer']">
|
||||
IOP("%(lower-case(name))",$(module)_instance_%(name),IF_INTEGER,"%(name)"),
|
||||
</admst:when>
|
||||
<admst:otherwise>
|
||||
<admst:fatal format="parameter of type 'string' not supported\n"/>
|
||||
</admst:otherwise>
|
||||
</admst:choose>
|
||||
</admst:for-each>
|
||||
|
||||
<admst:for-each select="variable">
|
||||
<admst:if test="attribute[name='desc']">
|
||||
<admst:if test="[not((input='yes' and (parametertype='model' or parametertype='instance')) or (input='np' and (scope='global_model' or scope='global_instance')))]">
|
||||
<admst:choose>
|
||||
<admst:when test="[type='real']">
|
||||
OP("%(lower-case(name))",$(module)_ask_%(name),IF_REAL,"%(attribute[name='desc']/value)"),
|
||||
</admst:when>
|
||||
<admst:otherwise>
|
||||
<admst:fatal format="parameter of type 'string' not supported\n"/>
|
||||
</admst:otherwise>
|
||||
</admst:choose>
|
||||
</admst:if>
|
||||
</admst:if>
|
||||
</admst:for-each>
|
||||
};
|
||||
|
||||
<admst:text format="IFparm $(module)mPTable[] = {\n"/>
|
||||
<admst:join select="variable[parametertype='model' and input='yes']" separator=",\n">
|
||||
<admst:choose>
|
||||
<admst:when test="[type='real']">
|
||||
<admst:value-of select="name"/>
|
||||
<admst:value-of select="name"/>
|
||||
<admst:value-of select="lower-case(name)"/>
|
||||
<admst:text format=" IOP("%s",$(module)_model_%s,IF_REAL,"%s")"/>
|
||||
</admst:when>
|
||||
<admst:when test="[type='integer']">
|
||||
<admst:value-of select="name"/>
|
||||
<admst:value-of select="name"/>
|
||||
<admst:value-of select="lower-case(name)"/>
|
||||
<admst:text format=" IOP("%s",$(module)_model_%s,IF_INTEGER,"%s")"/>
|
||||
</admst:when>
|
||||
<admst:otherwise>
|
||||
<admst:fatal format="parameter of type 'string' not supported\n"/>
|
||||
</admst:otherwise>
|
||||
</admst:choose>
|
||||
</admst:join>
|
||||
<admst:text format="\n};\n"/>
|
||||
|
||||
char *$(module)names[] = {
|
||||
<admst:join select="node[location='external' and grounded='no']" separator=",\n">
|
||||
<admst:choose>
|
||||
<admst:when test="attribute[name='name']">
|
||||
<admst:for-each select="attribute[name='name']">
|
||||
<admst:value-of select="value"/>
|
||||
</admst:for-each>
|
||||
</admst:when>
|
||||
<admst:otherwise>
|
||||
<admst:value-of select="name"/>
|
||||
</admst:otherwise>
|
||||
</admst:choose>
|
||||
<admst:text format=" "%s""/>
|
||||
</admst:join>
|
||||
};
|
||||
|
||||
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);
|
||||
|
||||
</admst:template>
|
||||
|
||||
<admst:for-each select="/module">
|
||||
<admst:value-of select="attribute[name='ngspicename']/value"/>
|
||||
<admst:open file="%s.c">
|
||||
<admst:text format="/***\n*** Interface: %(/simulator/package_string)\n"/>
|
||||
<admst:text format=" *** created by: %(/simulator/fullname) ***/\n"/>
|
||||
<admst:apply-templates select="." match="code"/>
|
||||
</admst:open>
|
||||
<admst:value-of select="attribute[name='ngspicename']/value"/>
|
||||
<admst:message format="%s.c: file created\n"/>
|
||||
</admst:for-each>
|
||||
|
||||
</admst>
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,95 +0,0 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
|
||||
<!--
|
||||
Written by Laurent Lemaitre - r29173@users.sourceforge.net
|
||||
Documentation:
|
||||
http://sourceforge.net/docman/display_doc.php?docid=18993&group_id=84289
|
||||
Target Interface: ngspice
|
||||
Supported by adms-1.x.x
|
||||
This file is used by adms - http://sourceforge.net/projects/mot-adms.
|
||||
adms 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 of the License, or
|
||||
(at your option) any later version.
|
||||
adms 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 adms; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
-->
|
||||
|
||||
<!DOCTYPE admst SYSTEM "admst.dtd">
|
||||
<admst version="2.3.0" xmlns:admst="http://mot-adms.sourceforge.net/xml-files/admst">
|
||||
|
||||
<admst:template match="dectype">
|
||||
<admst:choose>
|
||||
<admst:when test="[type='real']">
|
||||
<admst:text format=" double "/>
|
||||
</admst:when>
|
||||
<admst:when test="[type='integer']">
|
||||
<admst:text format=" int "/>
|
||||
</admst:when>
|
||||
<admst:otherwise>
|
||||
<admst:text format=" char* "/>
|
||||
</admst:otherwise>
|
||||
</admst:choose>
|
||||
</admst:template>
|
||||
|
||||
<admst:template match="code">
|
||||
<admst:value-of select="attribute[name='ngspicename']/value"/>
|
||||
<admst:variable name="module" select="%s"/>
|
||||
|
||||
#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))
|
||||
{
|
||||
<admst:for-each select="jacobian[static='yes']">
|
||||
<admst:value-of select="column/name"/>
|
||||
<admst:value-of select="row/name"/>
|
||||
<admst:value-of select="column/name"/>
|
||||
<admst:value-of select="row/name"/>
|
||||
<admst:value-of select="column/name"/>
|
||||
<admst:value-of select="row/name"/>
|
||||
<admst:text format=" if(here->PTR_J_%s_%s_required) *(here->PTR_J_%s_%s)+=here->JSVAL_%s_%s;\n"/>
|
||||
</admst:for-each>
|
||||
<admst:for-each select="jacobian[dynamic='yes']">
|
||||
<admst:value-of select="column/name"/>
|
||||
<admst:value-of select="row/name"/>
|
||||
<admst:value-of select="column/name"/>
|
||||
<admst:value-of select="row/name"/>
|
||||
<admst:value-of select="column/name"/>
|
||||
<admst:value-of select="row/name"/>
|
||||
<admst:text format=" if(here->PTR_J_%s_%s_required) *(here->PTR_J_%s_%s+1)+=ckt->CKTomega*here->JDVAL_%s_%s;\n"/>
|
||||
</admst:for-each>
|
||||
} /* End of MOSFET Instance */
|
||||
} /* End of Model Instance */
|
||||
return(OK);
|
||||
}
|
||||
|
||||
</admst:template>
|
||||
|
||||
<admst:for-each select="/module">
|
||||
<admst:value-of select="attribute[name='ngspicename']/value"/>
|
||||
<admst:open file="%sacld.c">
|
||||
<admst:text format="/***\n*** Interface: %(/simulator/package_string)\n"/>
|
||||
<admst:text format=" *** created by: %(/simulator/fullname) ***/\n"/>
|
||||
<admst:apply-templates select="." match="code"/>
|
||||
</admst:open>
|
||||
<admst:value-of select="attribute[name='ngspicename']/value"/>
|
||||
<admst:message format="%sacld.c: file created\n"/>
|
||||
</admst:for-each>
|
||||
|
||||
</admst>
|
||||
|
|
@ -1,101 +0,0 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
|
||||
<!--
|
||||
Written by Laurent Lemaitre - r29173@users.sourceforge.net
|
||||
Documentation:
|
||||
http://sourceforge.net/docman/display_doc.php?docid=18993&group_id=84289
|
||||
Target Interface: ngspice
|
||||
Supported by adms-1.x.x
|
||||
This file is used by adms - http://sourceforge.net/projects/mot-adms.
|
||||
adms 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 of the License, or
|
||||
(at your option) any later version.
|
||||
adms 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 adms; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
-->
|
||||
|
||||
<!DOCTYPE admst SYSTEM "admst.dtd">
|
||||
<admst version="2.3.0" xmlns:admst="http://mot-adms.sourceforge.net/xml-files/admst">
|
||||
|
||||
|
||||
<admst:template match="code">
|
||||
<admst:value-of select="attribute[name='ngspicename']/value"/>
|
||||
<admst:variable name="module" select="%s"/>
|
||||
|
||||
#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) {
|
||||
<admst:for-each select="variable[parametertype='instance' and input='yes']">
|
||||
<admst:value-of select="name"/>
|
||||
<admst:text format=" case $(module)_instance_%s :\n"/>
|
||||
<admst:choose>
|
||||
<admst:when test="[type='real']">
|
||||
<admst:value-of select="name"/>
|
||||
<admst:text format=" value->rValue = instance->%s;\n"/>
|
||||
</admst:when>
|
||||
<admst:when test="[type='integer']">
|
||||
<admst:value-of select="name"/>
|
||||
<admst:text format=" value->iValue = instance->%s;\n"/>
|
||||
</admst:when>
|
||||
<admst:otherwise>
|
||||
<admst:fatal format="parameter of type 'string' not supported\n"/>
|
||||
</admst:otherwise>
|
||||
</admst:choose>
|
||||
<admst:text format=" return OK;\n"/>
|
||||
</admst:for-each>
|
||||
<admst:for-each select="variable">
|
||||
<admst:if test="attribute[name='desc']">
|
||||
<admst:if test="[not((input='yes' and (parametertype='model' or parametertype='instance')) or (input='np' and (scope='global_model' or scope='global_instance')))]">
|
||||
<admst:choose>
|
||||
<admst:when test="[type='real']">
|
||||
case $(module)_ask_%(name) :
|
||||
value->rValue = ckt->CKTstate0[inst->GENstate + hide_%(name)];
|
||||
return OK;
|
||||
</admst:when>
|
||||
<admst:otherwise>
|
||||
<admst:fatal format="parameter of type 'string' not supported\n"/>
|
||||
</admst:otherwise>
|
||||
</admst:choose>
|
||||
</admst:if>
|
||||
</admst:if>
|
||||
</admst:for-each>
|
||||
|
||||
default:
|
||||
return(-1);
|
||||
}
|
||||
return(-1);
|
||||
}
|
||||
|
||||
</admst:template>
|
||||
|
||||
<admst:for-each select="/module">
|
||||
<admst:value-of select="attribute[name='ngspicename']/value"/>
|
||||
<admst:open file="%sask.c">
|
||||
<admst:text format="/***\n*** Interface: %(/simulator/package_string)\n"/>
|
||||
<admst:text format=" *** created by: %(/simulator/fullname) ***/\n"/>
|
||||
<admst:apply-templates select="." match="code"/>
|
||||
</admst:open>
|
||||
<admst:value-of select="attribute[name='ngspicename']/value"/>
|
||||
<admst:message format="%sask.c: file created\n"/>
|
||||
</admst:for-each>
|
||||
|
||||
</admst>
|
||||
|
|
@ -1,161 +0,0 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
|
||||
<!--
|
||||
Written by Laurent Lemaitre - r29173@users.sourceforge.net
|
||||
Documentation:
|
||||
http://sourceforge.net/docman/display_doc.php?docid=18993&group_id=84289
|
||||
Target Interface: ngspice
|
||||
Supported by adms-1.x.x
|
||||
This file is used by adms - http://sourceforge.net/projects/mot-adms.
|
||||
adms 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 of the License, or
|
||||
(at your option) any later version.
|
||||
adms 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 adms; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
-->
|
||||
|
||||
<!DOCTYPE admst SYSTEM "admst.dtd">
|
||||
<admst version="2.3.0" xmlns:admst="http://mot-adms.sourceforge.net/xml-files/admst">
|
||||
|
||||
<admst:template match="dectype">
|
||||
<admst:choose>
|
||||
<admst:when test="[type='real']">
|
||||
<admst:text format=" double "/>
|
||||
</admst:when>
|
||||
<admst:when test="[type='integer']">
|
||||
<admst:text format=" int "/>
|
||||
</admst:when>
|
||||
<admst:otherwise>
|
||||
<admst:text format=" char* "/>
|
||||
</admst:otherwise>
|
||||
</admst:choose>
|
||||
</admst:template>
|
||||
|
||||
<admst:template match="code">
|
||||
<admst:value-of select="attribute[name='ngspicename']/value"/>
|
||||
<admst:variable name="module" select="%s"/>
|
||||
|
||||
/**********
|
||||
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))
|
||||
{
|
||||
<admst:for-each select="jacobian">
|
||||
<admst:value-of select="column/name"/>
|
||||
<admst:value-of select="row/name"/>
|
||||
<admst:value-of select="column/name"/>
|
||||
<admst:value-of select="row/name"/>
|
||||
<admst:value-of select="column/name"/>
|
||||
<admst:value-of select="row/name"/>
|
||||
CREATE_KLU_BINDING_TABLE(PTR_J_%s_%s, $(module)%s%sBinding, %sNode, %sNode);
|
||||
</admst:for-each>
|
||||
}
|
||||
}
|
||||
|
||||
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))
|
||||
{
|
||||
<admst:for-each select="jacobian">
|
||||
<admst:value-of select="column/name"/>
|
||||
<admst:value-of select="row/name"/>
|
||||
<admst:value-of select="column/name"/>
|
||||
<admst:value-of select="row/name"/>
|
||||
<admst:value-of select="column/name"/>
|
||||
<admst:value-of select="row/name"/>
|
||||
CONVERT_KLU_BINDING_TABLE_TO_COMPLEX(PTR_J_%s_%s, $(module)%s%sBinding, %sNode, %sNode);
|
||||
</admst:for-each>
|
||||
}
|
||||
}
|
||||
|
||||
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))
|
||||
{
|
||||
<admst:for-each select="jacobian">
|
||||
<admst:value-of select="column/name"/>
|
||||
<admst:value-of select="row/name"/>
|
||||
<admst:value-of select="column/name"/>
|
||||
<admst:value-of select="row/name"/>
|
||||
<admst:value-of select="column/name"/>
|
||||
<admst:value-of select="row/name"/>
|
||||
CONVERT_KLU_BINDING_TABLE_TO_REAL(PTR_J_%s_%s, $(module)%s%sBinding, %sNode, %sNode);
|
||||
</admst:for-each>
|
||||
}
|
||||
}
|
||||
|
||||
return (OK) ;
|
||||
}
|
||||
|
||||
</admst:template>
|
||||
|
||||
<admst:for-each select="/module">
|
||||
<admst:value-of select="attribute[name='ngspicename']/value"/>
|
||||
<admst:open file="%sbindCSC.c">
|
||||
<admst:value-of select="/simulator/package_string"/>
|
||||
<admst:text format="/***\n*** Interface: %s\n"/>
|
||||
<admst:value-of select="/simulator/currentdate"/>
|
||||
<admst:value-of select="/simulator/fullname"/>
|
||||
<admst:text format=" *** created by: %s - %s ***/\n"/>
|
||||
<admst:apply-templates select="." match="code"/>
|
||||
</admst:open>
|
||||
<admst:value-of select="attribute[name='ngspicename']/value"/>
|
||||
<admst:message format="%sbindCSC.c: file created\n"/>
|
||||
</admst:for-each>
|
||||
|
||||
</admst>
|
||||
|
||||
|
|
@ -1,396 +0,0 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
|
||||
<!--
|
||||
Written by Laurent Lemaitre - r29173@users.sourceforge.net
|
||||
Documentation:
|
||||
http://sourceforge.net/docman/display_doc.php?docid=18993&group_id=84289
|
||||
Target Interface: ngspice
|
||||
Supported by adms-1.x.x
|
||||
This file is used by adms - http://sourceforge.net/projects/mot-adms.
|
||||
adms 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 of the License, or
|
||||
(at your option) any later version.
|
||||
adms 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 adms; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
-->
|
||||
|
||||
<!DOCTYPE admst SYSTEM "admst.dtd">
|
||||
<admst version="2.3.0" xmlns:admst="http://mot-adms.sourceforge.net/xml-files/admst">
|
||||
|
||||
<admst:template match="dectype">
|
||||
<admst:choose>
|
||||
<admst:when test="[type='real']">
|
||||
<admst:text format=" double "/>
|
||||
</admst:when>
|
||||
<admst:when test="[type='integer']">
|
||||
<admst:text format=" int "/>
|
||||
</admst:when>
|
||||
<admst:otherwise>
|
||||
<admst:text format=" char* "/>
|
||||
</admst:otherwise>
|
||||
</admst:choose>
|
||||
</admst:template>
|
||||
|
||||
<admst:template match="code">
|
||||
<admst:value-of select="attribute[name='ngspicename']/value"/>
|
||||
<admst:variable name="module" select="%s"/>
|
||||
|
||||
#ifndef $(module)
|
||||
#define $(module)
|
||||
|
||||
#include "ngspice/cktdefs.h"
|
||||
#include "ngspice/ifsim.h"
|
||||
#include "ngspice/gendefs.h"
|
||||
#include "ngspice/complex.h"
|
||||
#include "ngspice/noisedef.h"
|
||||
|
||||
<admst:for-each select="variable">
|
||||
<admst:value-of select="name"/>
|
||||
<admst:variable name="variable" select="%s"/>
|
||||
#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
|
||||
</admst:for-each>
|
||||
<admst:for-each select="node">
|
||||
<admst:value-of select="name"/>
|
||||
<admst:variable name="node" select="%s"/>
|
||||
#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
|
||||
</admst:for-each>
|
||||
|
||||
#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 */
|
||||
<admst:for-each select="node[grounded='no']">
|
||||
<admst:value-of select="name"/>
|
||||
<admst:text format=" int %sNode;"/>
|
||||
<admst:if test="attribute[name='info']">
|
||||
<admst:value-of select="."/>
|
||||
<admst:text format=" /*%s*/"/>
|
||||
</admst:if>
|
||||
<admst:text format="\n"/>
|
||||
</admst:for-each>
|
||||
<admst:for-each select="node[grounded='no']">
|
||||
<admst:choose>
|
||||
<admst:when test="[location='internal']">
|
||||
<admst:text format=" unsigned %(name)Node_mine :1;\n"/>
|
||||
</admst:when>
|
||||
<admst:otherwise>
|
||||
<admst:text format=" unsigned %(name)Node_mine :1;\n"/>
|
||||
<admst:text format=" unsigned %(name)Node_connected :1;\n"/>
|
||||
</admst:otherwise>
|
||||
</admst:choose>
|
||||
</admst:for-each>
|
||||
/* instance parameters */
|
||||
|
||||
<admst:for-each select="variable[parametertype='instance' and input='yes']">
|
||||
<admst:value-of select="name"/>
|
||||
<admst:text format=" unsigned %s_Given :1;"/>
|
||||
<admst:if test="attribute[name='info']">
|
||||
<admst:value-of select="."/>
|
||||
<admst:text format=" /*%s*/"/>
|
||||
</admst:if>
|
||||
<admst:text format="\n"/>
|
||||
</admst:for-each>
|
||||
<admst:for-each select="variable[parametertype='instance' and input='yes']">
|
||||
<admst:value-of select="name"/>
|
||||
<admst:apply-templates select="." match="dectype"/>
|
||||
<admst:text format="%s;"/>
|
||||
<admst:if test="attribute[name='info']">
|
||||
<admst:value-of select="."/>
|
||||
<admst:text format=" /*%s*/"/>
|
||||
</admst:if>
|
||||
<admst:text format="\n"/>
|
||||
</admst:for-each>
|
||||
// noise\n
|
||||
<admst:text select="$fnoise/item" format=" double fpnoise%(index($fnoise/item,.)), fenoise%(index($fnoise/item,.));\n"/>
|
||||
<admst:text select="$tnoise/item" format=" double tnoise%(index($tnoise/item,.));\n"/>
|
||||
<admst:text select="$wnoise/item" format=" double wnoise%(index($wnoise/item,.));\n"/>
|
||||
|
||||
/* variables */
|
||||
<admst:for-each select="variable[input='no' and scope='global_instance']">
|
||||
<admst:value-of select="name"/>
|
||||
<admst:apply-templates select="." match="dectype"/>
|
||||
<admst:text format="%s;\n"/>
|
||||
<admst:for-each select="attribute[name='info']">
|
||||
<admst:value-of select="."/>
|
||||
<admst:text format=" /*%s*/"/>
|
||||
</admst:for-each>
|
||||
</admst:for-each>
|
||||
/* states */
|
||||
<admst:for-each select="source[dynamic='yes']">
|
||||
<admst:value-of select="branch/nnode/name"/>
|
||||
<admst:value-of select="branch/pnode/name"/>
|
||||
<admst:text format=" int state_%s_%s;\n"/>
|
||||
</admst:for-each>
|
||||
/* pointer to sparse matrix (+ values)*/
|
||||
<admst:for-each select="jacobian">
|
||||
<admst:value-of select="column/name"/>
|
||||
<admst:value-of select="row/name"/>
|
||||
<admst:text format=" unsigned int PTR_J_%s_%s_required : 1;\n"/>
|
||||
</admst:for-each>
|
||||
<admst:for-each select="jacobian">
|
||||
<admst:value-of select="column/name"/>
|
||||
<admst:value-of select="row/name"/>
|
||||
<admst:text format=" double *PTR_J_%s_%s;\n"/>
|
||||
<admst:if test="[static='yes']">
|
||||
<admst:value-of select="column/name"/>
|
||||
<admst:value-of select="row/name"/>
|
||||
<admst:text format=" double JSVAL_%s_%s;\n"/>
|
||||
</admst:if>
|
||||
<admst:if test="[dynamic='yes']">
|
||||
<admst:value-of select="column/name"/>
|
||||
<admst:value-of select="row/name"/>
|
||||
<admst:text format=" double JDVAL_%s_%s;\n"/>
|
||||
</admst:if>
|
||||
</admst:for-each>
|
||||
|
||||
#define $(module)numStates 0
|
||||
|
||||
#ifdef KLU
|
||||
<admst:for-each select="jacobian">
|
||||
<admst:value-of select="column/name"/>
|
||||
<admst:value-of select="row/name"/>
|
||||
BindElement *$(module)%s%sBinding ;
|
||||
</admst:for-each>
|
||||
#endif
|
||||
|
||||
} $(module)instance ;
|
||||
|
||||
enum {
|
||||
<admst:for-each select="variable">
|
||||
<admst:if test="attribute[name='desc']">
|
||||
<admst:if test="[not((input='yes' and (parametertype='model' or parametertype='instance')) or (input='np' and (scope='global_model' or scope='global_instance')))]">
|
||||
hide_%(name),
|
||||
#define %(name) ((struct hides *)hide_%(name))
|
||||
</admst:if>
|
||||
</admst:if>
|
||||
</admst:for-each>
|
||||
$(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 */
|
||||
<admst:for-each select="variable[parametertype='model' and input='yes']">
|
||||
<admst:value-of select="name"/>
|
||||
<admst:text format=" unsigned %s_Given :1;"/>
|
||||
<admst:if test="attribute[name='info']">
|
||||
<admst:value-of select="."/>
|
||||
<admst:text format=" /*%s*/"/>
|
||||
</admst:if>
|
||||
<admst:text format="\n"/>
|
||||
</admst:for-each>
|
||||
<admst:for-each select="variable[parametertype='model' and input='yes']">
|
||||
<admst:value-of select="name"/>
|
||||
<admst:apply-templates select="." match="dectype"/>
|
||||
<admst:text format="%s;"/>
|
||||
<admst:if test="attribute[name='info']">
|
||||
<admst:value-of select="."/>
|
||||
<admst:text format=" /*%s*/"/>
|
||||
</admst:if>
|
||||
<admst:text format="\n"/>
|
||||
</admst:for-each>
|
||||
/* variable */
|
||||
<admst:for-each select="variable[input='no' and scope='global_model']">
|
||||
<admst:value-of select="name"/>
|
||||
<admst:apply-templates select="." match="dectype"/>
|
||||
<admst:text format="%s;\n"/>
|
||||
<admst:for-each select="attribute[name='info']">
|
||||
<admst:value-of select="."/>
|
||||
<admst:text format=" /*%s*/"/>
|
||||
</admst:for-each>
|
||||
</admst:for-each>
|
||||
|
||||
} $(module)model;
|
||||
|
||||
<admst:text format=" /* flags */\n"/>
|
||||
<admst:text format="typedef enum {\n"/>
|
||||
<admst:for-each select="variable[parametertype='model' and input='yes']">
|
||||
<admst:value-of select="name"/>
|
||||
<admst:text format=" $(module)_model_%s,\n"/>
|
||||
</admst:for-each>
|
||||
<admst:text format=" DUMMY_MODEL"/>
|
||||
<admst:text format="\n} e_$(module)_model;\n"/>
|
||||
<admst:text format="typedef enum {\n"/>
|
||||
<admst:for-each select="variable[parametertype='instance' and input='yes']">
|
||||
<admst:value-of select="name"/>
|
||||
<admst:text format=" $(module)_instance_%s,\n"/>
|
||||
</admst:for-each>
|
||||
<admst:for-each select="variable">
|
||||
<admst:if test="attribute[name='desc']">
|
||||
<admst:if test="[not((input='yes' and (parametertype='model' or parametertype='instance')) or (input='np' and (scope='global_model' or scope='global_instance')))]">
|
||||
$(module)_ask_%(name),
|
||||
</admst:if>
|
||||
</admst:if>
|
||||
</admst:for-each>
|
||||
<admst:text format=" DUMMY_INSTANCE"/>
|
||||
<admst:text format="\n} e_$(module)_instance;\n"/>
|
||||
|
||||
<admst:value-of select="attribute[name='ngspicename']/value"/>
|
||||
<admst:variable name="module" select="%s"/>
|
||||
|
||||
#include "$(module)ext.h"
|
||||
<admst:if test="[not(nilled(analogfunction))]">
|
||||
#include "$(module).analogfunction.h"
|
||||
</admst:if>
|
||||
|
||||
#endif /*$(module)*/
|
||||
|
||||
</admst:template>
|
||||
|
||||
<admst:for-each select="/module">
|
||||
<admst:value-of select="attribute[name='ngspicename']/value"/>
|
||||
<admst:open file="%sdefs.h">
|
||||
<admst:text format="/***\n*** Interface: %(/simulator/package_string)\n"/>
|
||||
<admst:text format=" *** created by: %(/simulator/fullname) ***/\n"/>
|
||||
<admst:apply-templates select="." match="code"/>
|
||||
</admst:open>
|
||||
<admst:value-of select="attribute[name='ngspicename']/value"/>
|
||||
<admst:message format="%sdefs.h: file created\n"/>
|
||||
</admst:for-each>
|
||||
|
||||
</admst>
|
||||
|
|
@ -1,67 +0,0 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
|
||||
<!--
|
||||
Written by Laurent Lemaitre - r29173@users.sourceforge.net
|
||||
Documentation:
|
||||
http://sourceforge.net/docman/display_doc.php?docid=18993&group_id=84289
|
||||
Target Interface: ngspice
|
||||
Supported by adms-1.x.x
|
||||
This file is used by adms - http://sourceforge.net/projects/mot-adms.
|
||||
adms 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 of the License, or
|
||||
(at your option) any later version.
|
||||
adms 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 adms; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
-->
|
||||
|
||||
<!DOCTYPE admst SYSTEM "admst.dtd">
|
||||
<admst version="2.3.0" xmlns:admst="http://mot-adms.sourceforge.net/xml-files/admst">
|
||||
|
||||
<admst:template match="dectype">
|
||||
<admst:choose>
|
||||
<admst:when test="[type='real']">
|
||||
<admst:text format=" double "/>
|
||||
</admst:when>
|
||||
<admst:when test="[type='integer']">
|
||||
<admst:text format=" int "/>
|
||||
</admst:when>
|
||||
<admst:otherwise>
|
||||
<admst:text format=" char* "/>
|
||||
</admst:otherwise>
|
||||
</admst:choose>
|
||||
</admst:template>
|
||||
|
||||
<admst:template match="code">
|
||||
<admst:value-of select="attribute[name='ngspicename']/value"/>
|
||||
<admst:variable name="module" select="%s"/>
|
||||
#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;
|
||||
}
|
||||
</admst:template>
|
||||
|
||||
<admst:for-each select="/module">
|
||||
<admst:value-of select="attribute[name='ngspicename']/value"/>
|
||||
<admst:open file="%sdel.c">
|
||||
<admst:text format="/***\n*** Interface: %(/simulator/package_string)\n"/>
|
||||
<admst:text format=" *** created by: %(/simulator/fullname) ***/\n"/>
|
||||
<admst:apply-templates select="." match="code"/>
|
||||
</admst:open>
|
||||
<admst:value-of select="attribute[name='ngspicename']/value"/>
|
||||
<admst:message format="%sdel.c: file created\n"/>
|
||||
</admst:for-each>
|
||||
|
||||
</admst>
|
||||
|
|
@ -1,64 +0,0 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
|
||||
<!--
|
||||
Written by Laurent Lemaitre - r29173@users.sourceforge.net
|
||||
Documentation:
|
||||
http://sourceforge.net/docman/display_doc.php?docid=18993&group_id=84289
|
||||
Target Interface: ngspice
|
||||
Supported by adms-1.x.x
|
||||
This file is used by adms - http://sourceforge.net/projects/mot-adms.
|
||||
adms 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 of the License, or
|
||||
(at your option) any later version.
|
||||
adms 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 adms; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
-->
|
||||
|
||||
<!DOCTYPE admst SYSTEM "admst.dtd">
|
||||
<admst version="2.3.0" xmlns:admst="http://mot-adms.sourceforge.net/xml-files/admst">
|
||||
|
||||
<admst:template match="dectype">
|
||||
<admst:choose>
|
||||
<admst:when test="[type='real']">
|
||||
<admst:text format=" double "/>
|
||||
</admst:when>
|
||||
<admst:when test="[type='integer']">
|
||||
<admst:text format=" int "/>
|
||||
</admst:when>
|
||||
<admst:otherwise>
|
||||
<admst:text format=" char* "/>
|
||||
</admst:otherwise>
|
||||
</admst:choose>
|
||||
</admst:template>
|
||||
|
||||
<admst:template match="code">
|
||||
<admst:value-of select="attribute[name='ngspicename']/value"/>
|
||||
<admst:variable name="module" select="%s"/>
|
||||
#include "ngspice/ngspice.h"
|
||||
#include "$(module)defs.h"
|
||||
#include "ngspice/suffix.h"
|
||||
|
||||
void
|
||||
$(module)destroy(void)
|
||||
{
|
||||
}
|
||||
</admst:template>
|
||||
|
||||
<admst:for-each select="/module">
|
||||
<admst:value-of select="attribute[name='ngspicename']/value"/>
|
||||
<admst:open file="%sdest.c">
|
||||
<admst:text format="/***\n*** Interface: %(/simulator/package_string)\n"/>
|
||||
<admst:text format=" *** created by: %(/simulator/fullname) ***/\n"/>
|
||||
<admst:apply-templates select="." match="code"/>
|
||||
</admst:open>
|
||||
<admst:value-of select="attribute[name='ngspicename']/value"/>
|
||||
<admst:message format="%sdest.c: file created\n"/>
|
||||
</admst:for-each>
|
||||
|
||||
</admst>
|
||||
|
|
@ -1,78 +0,0 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
|
||||
<!--
|
||||
Written by Laurent Lemaitre - r29173@users.sourceforge.net
|
||||
Documentation:
|
||||
http://sourceforge.net/docman/display_doc.php?docid=18993&group_id=84289
|
||||
Target Interface: ngspice
|
||||
Supported by adms-1.x.x
|
||||
This file is used by adms - http://sourceforge.net/projects/mot-adms.
|
||||
adms 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 of the License, or
|
||||
(at your option) any later version.
|
||||
adms 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 adms; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
-->
|
||||
|
||||
<!DOCTYPE admst SYSTEM "admst.dtd">
|
||||
<admst version="2.3.0" xmlns:admst="http://mot-adms.sourceforge.net/xml-files/admst">
|
||||
<admst:template match="code">
|
||||
<admst:value-of select="attribute[name='ngspicename']/value"/>
|
||||
<admst:variable name="module" select="%s"/>
|
||||
|
||||
#ifndef __$(module)EXT_H
|
||||
#define __$(module)EXT_H
|
||||
|
||||
<admst:value-of select="attribute[name='ngspicename']/value"/>
|
||||
<admst:variable name="module" select="%s"/>
|
||||
|
||||
#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
|
||||
|
||||
</admst:template>
|
||||
|
||||
|
||||
<admst:for-each select="/module">
|
||||
<admst:value-of select="attribute[name='ngspicename']/value"/>
|
||||
<admst:open file="%sext.h">
|
||||
<admst:text format="/***\n*** Interface: %(/simulator/package_string)\n"/>
|
||||
<admst:text format=" *** created by: %(/simulator/fullname) ***/\n"/>
|
||||
<admst:apply-templates select="." match="code"/>
|
||||
</admst:open>
|
||||
<admst:value-of select="attribute[name='ngspicename']/value"/>
|
||||
<admst:message format="%sext.h: file created\n"/>
|
||||
</admst:for-each>
|
||||
|
||||
</admst>
|
||||
|
|
@ -1,363 +0,0 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
|
||||
<!--
|
||||
Written by Laurent Lemaitre - r29173@users.sourceforge.net
|
||||
Documentation:
|
||||
http://sourceforge.net/docman/display_doc.php?docid=18993&group_id=84289
|
||||
Target Interface: ngspice
|
||||
Supported by adms-1.x.x
|
||||
This file is used by adms - http://sourceforge.net/projects/mot-adms.
|
||||
adms 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 of the License, or
|
||||
(at your option) any later version.
|
||||
adms 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 adms; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
-->
|
||||
|
||||
<!DOCTYPE admst SYSTEM "admst.dtd">
|
||||
<admst version="2.3.0" xmlns:admst="http://mot-adms.sourceforge.net/xml-files/admst">
|
||||
|
||||
<!-- expression//function: mapping verilog-name == C-name of function -->
|
||||
<admst:template match="fname">
|
||||
<admst:choose>
|
||||
<admst:when test="[name='div']"><admst:return name="fname" value="_f_div1"/></admst:when>
|
||||
<admst:when test="[name='abs']"><admst:return name="fname" value="fabs"/></admst:when>
|
||||
<admst:when test="[name='\$shrinkl']"><admst:return name="fname" value="shrinkl"/></admst:when>
|
||||
<admst:when test="[name='\$shrinka']"><admst:return name="fname" value="shrinka"/></admst:when>
|
||||
<admst:when test="[name='log']"><admst:return name="fname" value="log10"/></admst:when>
|
||||
<admst:when test="[name='ln']"><admst:return name="fname" value="log"/></admst:when>
|
||||
<admst:when test="[name='limexp']"><admst:return name="fname" value="limexp"/></admst:when>
|
||||
<admst:when test="[name='\$limexp']"><admst:return name="fname" value="limexp"/></admst:when>
|
||||
<admst:when test="[name='\$model']"><admst:return name="fname" value="_modelname"/></admst:when>
|
||||
<admst:when test="[name='\$instance']"><admst:return name="fname" value="_instancename"/></admst:when>
|
||||
<admst:when test="[name='\$temperature']"><admst:return name="fname" value="_circuit_temp"/></admst:when>
|
||||
<admst:when test="[name='cos' or name='sin' or name='tan' or
|
||||
name='cosh' or name='sinh' or name='tanh' or
|
||||
name='acos' or name='asin' or name='atan' or name='atan2' or
|
||||
name='acosh' or name='asinh' or name='atanh' or
|
||||
name='ln' or name='log' or name='exp' or name='sqrt' or name='abs' or name='limexp' or
|
||||
name='div' or name='pow' or name='hypot' or name='min' or name='max' or name='\$vt' or
|
||||
name='floor' or name='ceil']">
|
||||
<admst:return name="fname" value="%(name)"/>
|
||||
</admst:when>
|
||||
<admst:otherwise><admst:return name="fname" value="$(module)_%(name)"/></admst:otherwise>
|
||||
</admst:choose>
|
||||
</admst:template>
|
||||
|
||||
<admst:template match="function">
|
||||
<admst:choose>
|
||||
<admst:when test="[name='\$port_connected']">
|
||||
<admst:message format="ZZ 11!! port_connected, this one\n"/>
|
||||
<admst:for-each select="arguments[position(.)=1]">
|
||||
<admst:value-to select="/simulator/tmp" value="(here->%(.)Node_connected /* port_connected 13 */)"/>
|
||||
</admst:for-each>
|
||||
</admst:when>
|
||||
<admst:otherwise>
|
||||
<admst:variable name="function" select="%(name)"/>
|
||||
<admst:variable name="args" select=""/>
|
||||
<admst:for-each select="arguments">
|
||||
<admst:variable test="[$args='']" name="args" select="$args,"/>
|
||||
<admst:apply-templates select="." match="subexpression:stringify:noprobe"/>
|
||||
<admst:variable name="args" select="$args%s"/>
|
||||
</admst:for-each>
|
||||
<admst:choose>
|
||||
<admst:when test="[name='\$simparam']">
|
||||
<admst:apply-templates select="." match="function:simparam"/>
|
||||
</admst:when>
|
||||
<admst:when test="[name='analysis']">
|
||||
<admst:apply-templates select="." match="function:analysis"/>
|
||||
</admst:when>
|
||||
<admst:when test="[name='\$given' or name='\$param_given']">
|
||||
<admst:for-each select="arguments[position(.)=1]">
|
||||
<admst:assert test="[datatypename='variable' and input='yes']" format="%(../name)(%(../arguments[1])): argument is not a parameter\n"/>
|
||||
<admst:choose>
|
||||
<admst:when test="[parametertype='model']">
|
||||
<admst:value-of select="name"/>
|
||||
<admst:value-to select="/simulator/tmp" value="model->%s_Given"/>
|
||||
</admst:when>
|
||||
<admst:when test="[parametertype='instance']">
|
||||
<admst:value-of select="name"/>
|
||||
<admst:value-to select="/simulator/tmp" value="here->%s_Given"/>
|
||||
</admst:when>
|
||||
<admst:otherwise>
|
||||
<admst:error format="%(../name)(%(../arguments[1])): should not be reached\n"/>
|
||||
</admst:otherwise>
|
||||
</admst:choose>
|
||||
</admst:for-each>
|
||||
</admst:when>
|
||||
<!-- fixme, seems to be necessairy only because dependency detection does not drop an unneeded expression requiring $vt -->
|
||||
<admst:when test="[name='\$vt']">
|
||||
<admst:choose>
|
||||
<admst:when test="[nilled(arguments)]">
|
||||
<admst:value-to select="/simulator/tmp" value="((BOLTZMANN/ELECTRON_CHARGE)*ckt->CKTtemp)"/>
|
||||
</admst:when>
|
||||
<admst:when test="arguments[count(.)=1]">
|
||||
<admst:value-to select="/simulator/tmp" value="((BOLTZMANN/ELECTRON_CHARGE)*(%(arguments[1])))"/>
|
||||
</admst:when>
|
||||
</admst:choose>
|
||||
</admst:when>
|
||||
<admst:otherwise>
|
||||
<admst:variable name="mycode" select=""/>
|
||||
<admst:if test="[exists(arguments)]">
|
||||
<admst:for-each select="arguments">
|
||||
<admst:apply-templates select="." match="subexpression:stringify:noprobe"/>
|
||||
<admst:choose>
|
||||
<admst:when test="[$mycode='']">
|
||||
<admst:variable name="mycode" select="%s"/>
|
||||
</admst:when>
|
||||
<admst:otherwise>
|
||||
<admst:variable name="mycode" select="$mycode,%s"/>
|
||||
</admst:otherwise>
|
||||
</admst:choose>
|
||||
</admst:for-each>
|
||||
<admst:variable name="mycode" select="($mycode)"/>
|
||||
</admst:if>
|
||||
<admst:variable name="mycode" select="%(fname(.)/[name='fname']/value)$mycode"/>
|
||||
<admst:value-to select="/simulator/tmp" value="$mycode"/>
|
||||
</admst:otherwise>
|
||||
</admst:choose>
|
||||
</admst:otherwise>
|
||||
</admst:choose>
|
||||
</admst:template>
|
||||
|
||||
<admst:template match="evaluatetopology">
|
||||
<admst:choose>
|
||||
<admst:when test="[datatypename='callfunction']"/>
|
||||
<admst:when test="[datatypename='whileloop']">
|
||||
<admst:apply-templates select="whileblock" match="evaluatetopology"/>
|
||||
<admst:apply-templates select="while" match="evaluatetopology"/>
|
||||
</admst:when>
|
||||
<admst:when test="[datatypename='conditional']">
|
||||
<admst:if test="if[nilled(variable[OPdependent='yes'])]">
|
||||
<admst:apply-templates select="if" match="evaluatetopology"/>
|
||||
<admst:choose>
|
||||
<admst:when test="if/math[dependency='constant']">
|
||||
<admst:apply-templates select="if" match="expression:stringify:noprobe"/>
|
||||
<admst:text format="if\n(%s)\n"/>
|
||||
<admst:text format="{\n"/>
|
||||
<admst:apply-templates select="then" match="evaluatetopology"/>
|
||||
<admst:text format="}\n"/>
|
||||
<admst:if test="[exists(else)]">
|
||||
<admst:text format="else\n"/>
|
||||
<admst:text format="{\n"/>
|
||||
<admst:apply-templates select="else" match="evaluatetopology"/>
|
||||
<admst:text format="}\n"/>
|
||||
</admst:if>
|
||||
</admst:when>
|
||||
<admst:otherwise>
|
||||
<admst:apply-templates select="then" match="evaluatetopology"/>
|
||||
<admst:apply-templates select="else" match="evaluatetopology"/>
|
||||
</admst:otherwise>
|
||||
</admst:choose>
|
||||
</admst:if>
|
||||
</admst:when>
|
||||
<admst:when test="[datatypename='case']">
|
||||
<admst:text format="/* -- CASE BEGIN -- */;\n"/>
|
||||
<admst:variable name="casecondition" path="case"/>
|
||||
<admst:variable name="havedefault" string="no"/>
|
||||
<!-- check for default -->
|
||||
<admst:for-each select="caseitem/[defaultcase='yes']">
|
||||
<admst:variable name="havedefault" string="yes"/>
|
||||
</admst:for-each>
|
||||
<admst:for-each select="caseitem/[defaultcase='no']">
|
||||
<admst:text format="/* CASE ITEM */\n"/>
|
||||
<admst:text format="if\n("/>
|
||||
<admst:join select="condition" separator="||">
|
||||
<admst:apply-templates select="$(casecondition)" match="expression:stringify:noprobe"/>
|
||||
<admst:text format="((%s)==(%(.)))"/>
|
||||
</admst:join>
|
||||
<admst:text format=")\n"/>
|
||||
<admst:text format="{\n"/>
|
||||
<admst:apply-templates select="code" match="evaluatetopology"/>
|
||||
<admst:text format="}\n"/>
|
||||
<admst:text format="else\n"/>
|
||||
</admst:for-each>
|
||||
<admst:text select="[$havedefault='no']" format="{ /* no default */ }\n"/>
|
||||
<admst:for-each select="caseitem/[defaultcase='yes']">
|
||||
<admst:text format="/* CASE DEFAULT */\n"/>
|
||||
<admst:text format="{\n"/>
|
||||
<admst:apply-templates select="code" match="evaluatetopology"/>
|
||||
<admst:text format="}\n"/>
|
||||
</admst:for-each>
|
||||
<admst:text format="/* -- CASE END -- */;\n"/>
|
||||
</admst:when>
|
||||
<admst:when test="[datatypename='contribution']">
|
||||
<admst:if test="lhs[discipline/potential=nature]">
|
||||
<admst:choose>
|
||||
<admst:when test="lhs/branch[grounded='no']">
|
||||
<admst:text test="lhs/branch/nnode[location='internal']"
|
||||
format="here->%(lhs/branch/nnode/name)Node = here->%(lhs/branch/pnode/name)Node; /* nnode collapsed */\n here->%(lhs/branch/nnode/name)Node_mine = 0;\n"/>
|
||||
<admst:text test="lhs/branch/pnode[location='internal']"
|
||||
format="here->%(lhs/branch/pnode/name)Node = here->%(lhs/branch/nnode/name)Node; /* pnode collapsed */\n here->%(lhs/branch/pnode/name)Node_mine = 0;\n"/>
|
||||
</admst:when>
|
||||
<admst:otherwise>
|
||||
<admst:text format="here->%(lhs/branch/pnode/name)Node = 0; /* pnode collapsed to GND */ \n here->%(lhs/branch/pnode/name)Node_mine = 0;\n"/>
|
||||
</admst:otherwise>
|
||||
</admst:choose>
|
||||
</admst:if>
|
||||
<admst:variable name="contribution" select="%(.)"/>
|
||||
<admst:variable name="psource" select="%(lhs/branch/pnode)"/>
|
||||
<admst:variable name="nsource" select="%(lhs/branch/nnode)"/>
|
||||
<admst:for-each select="rhs/probe">
|
||||
<admst:variable name="pprobe" select="%(branch/pnode)"/>
|
||||
<admst:variable name="nprobe" select="%(branch/nnode)"/>
|
||||
<admst:choose>
|
||||
<admst:when test="$contribution[static='yes']"> <admst:text format=" static_"/> </admst:when>
|
||||
<admst:when test="$contribution[dynamic='yes']"> <admst:text format=" dynamic_"/> </admst:when>
|
||||
<admst:when test="$contribution[whitenoise='yes']"> <admst:text format=" whitenoise_"/> </admst:when>
|
||||
<admst:when test="$contribution[flickernoise='yes']"> <admst:text format=" flickernoise_"/> </admst:when>
|
||||
</admst:choose>
|
||||
<admst:choose>
|
||||
<admst:when test="[($nprobe/grounded='no')and($nsource/grounded='no')]">
|
||||
<admst:text format="jacobian4(%($psource/name),%($nsource/name),%($pprobe/name),%($nprobe/name))\n"/>
|
||||
</admst:when>
|
||||
<admst:when test="[($nprobe/grounded='no')and($nsource/grounded='yes')]">
|
||||
<admst:text format="jacobian2p(%($psource/name),%($pprobe/name),%($nprobe/name))\n"/>
|
||||
</admst:when>
|
||||
<admst:when test="[$nsource/grounded='no']">
|
||||
<admst:text format="jacobian2s(%($psource/name),%($nsource/name),%($pprobe/name))\n"/>
|
||||
</admst:when>
|
||||
<admst:when test="[$nsource/grounded='yes']">
|
||||
<admst:text format="jacobian1(%($psource/name),%($pprobe/name))\n"/>
|
||||
</admst:when>
|
||||
</admst:choose>
|
||||
</admst:for-each>
|
||||
</admst:when>
|
||||
<admst:when test="[datatypename='assignment']">
|
||||
<admst:if test="[(lhs/insource='yes') and (lhs/OPdependent='no')]">
|
||||
<admst:apply-templates select="lhs" match="variable:lhs"/>
|
||||
<admst:text format="="/>
|
||||
<admst:apply-templates select="rhs" match="expression:stringify:noprobe"/>
|
||||
<admst:text format="%s;\n"/>
|
||||
</admst:if>
|
||||
</admst:when>
|
||||
<admst:when test="[datatypename='block']">
|
||||
<admst:apply-templates select="item" match="evaluatetopology"/>
|
||||
</admst:when>
|
||||
<admst:when test="[datatypename='expression']"/>
|
||||
<admst:when test="[datatypename='probe']"/>
|
||||
<admst:when test="[datatypename='variable']"/>
|
||||
<admst:when test="[datatypename='mapply_unary']"/>
|
||||
<admst:when test="[datatypename='mapply_binary']"/>
|
||||
<admst:when test="[datatypename='mapply_ternary']"/>
|
||||
<admst:when test="[datatypename='function']"/>
|
||||
<admst:when test="[datatypename='number']"/>
|
||||
<admst:when test="[datatypename='string']"/>
|
||||
<admst:when test="[datatypename='nilled']"/>
|
||||
<admst:when test="[datatypename='blockvariable']"/>
|
||||
<admst:otherwise>
|
||||
<admst:fatal format="%(datatypename): adms element not implemented\n"/>
|
||||
</admst:otherwise>
|
||||
</admst:choose>
|
||||
</admst:template>
|
||||
|
||||
<admst:template match="code">
|
||||
|
||||
#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);
|
||||
|
||||
<admst:template match="evaluate.localvariables">
|
||||
<admst:choose>
|
||||
<admst:when test="[datatypename='assignment']">
|
||||
<admst:if test="[(lhs/insource='yes') and (lhs/OPdependent='no')]">
|
||||
<admst:push select="lhs[scope='local']" into="$localvariables" onduplicate="ignore"/>
|
||||
</admst:if>
|
||||
</admst:when>
|
||||
<admst:when test="[datatypename='block']">
|
||||
<admst:apply-templates select="item" match="evaluate.localvariables"/>
|
||||
</admst:when>
|
||||
<admst:when test="[datatypename='conditional']">
|
||||
<admst:push select="if/variable[scope='local' and OPdependent='no']" into="$localvariables" onduplicate="ignore"/>
|
||||
<admst:apply-templates select="then" match="evaluate.localvariables"/>
|
||||
<admst:apply-templates select="else" match="evaluate.localvariables"/>
|
||||
</admst:when>
|
||||
<admst:when test="[datatypename='whileloop']">
|
||||
<admst:apply-templates select="whileblock" match="evaluate.localvariables"/>
|
||||
</admst:when>
|
||||
<admst:when test="[datatypename='case']">
|
||||
<admst:apply-templates select="caseitem/code" match="evaluate.localvariables"/>
|
||||
</admst:when>
|
||||
<admst:when test="[datatypename='contribution']"/>
|
||||
<admst:when test="[datatypename='nilled']"/>
|
||||
<admst:when test="[datatypename='callfunction']"/>
|
||||
<admst:when test="[datatypename='blockvariable']"/>
|
||||
<admst:otherwise>
|
||||
<admst:error format="'%(datatypename): should not be reached\n"/>
|
||||
</admst:otherwise>
|
||||
</admst:choose>
|
||||
</admst:template>
|
||||
<admst:for-each select="analog/code[datatypename='block']/item">
|
||||
<admst:if test="[(datatypename!='block') or (datatypename='block'
|
||||
and name!='initial_model' and name!='initializeModel' and name!='initial_instance' and name!='initializeInstance')]">
|
||||
<admst:apply-templates select="." match="evaluate.localvariables"/>
|
||||
</admst:if>
|
||||
</admst:for-each>
|
||||
<admst:for-each select="$localvariables">
|
||||
<admst:if test="[type='integer']">int %(name);\n</admst:if>
|
||||
<admst:if test="[type='real']">double %(name)=0.0/0.0;\n</admst:if>
|
||||
<admst:if test="[type='string']">char* %(name);\n</admst:if>
|
||||
</admst:for-each>
|
||||
<admst:for-each select="analog/code[datatypename='block']/item">
|
||||
<admst:if test="[(datatypename!='block') or (datatypename='block'
|
||||
and name!='initial_model' and name!='initializeModel' and name!='initial_instance' and name!='initializeInstance')]">
|
||||
<admst:apply-templates select="." match="evaluatetopology"/>
|
||||
</admst:if>
|
||||
</admst:for-each>
|
||||
return(OK);
|
||||
}
|
||||
|
||||
</admst:template>
|
||||
|
||||
<admst:variable name="localvariables"/>
|
||||
<admst:for-each select="/module">
|
||||
<!-- fixme, this $(module) variable diverts from other usage pattern -->
|
||||
<admst:variable name="module" select="%(attribute[name='ngspicename']/value)"/>
|
||||
<admst:open file="$(module)guesstopology.c">
|
||||
<admst:text format="/***\n*** Interface: %(/simulator/package_string)\n"/>
|
||||
<admst:text format=" *** created by: %(/simulator/fullname) ***/\n"/>
|
||||
<admst:apply-templates select="." match="code"/>
|
||||
</admst:open>
|
||||
<admst:message format="$(module)guesstopology.c: file created\n"/>
|
||||
</admst:for-each>
|
||||
|
||||
</admst>
|
||||
|
|
@ -1,124 +0,0 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
|
||||
<!--
|
||||
Written by Laurent Lemaitre - r29173@users.sourceforge.net
|
||||
Documentation:
|
||||
http://sourceforge.net/docman/display_doc.php?docid=18993&group_id=84289
|
||||
Target Interface: ngspice
|
||||
Supported by adms-1.x.x
|
||||
This file is used by adms - http://sourceforge.net/projects/mot-adms.
|
||||
adms 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 of the License, or
|
||||
(at your option) any later version.
|
||||
adms 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 adms; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
-->
|
||||
|
||||
<!DOCTYPE admst SYSTEM "admst.dtd">
|
||||
<admst version="2.3.0" xmlns:admst="http://mot-adms.sourceforge.net/xml-files/admst">
|
||||
<admst:template match="code">
|
||||
#include "ngspice/config.h"
|
||||
|
||||
#include "ngspice/devdefs.h"
|
||||
|
||||
<admst:value-of select="attribute[name='ngspicename']/value"/>
|
||||
<admst:variable name="module" select="%s"/>
|
||||
|
||||
#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;
|
||||
}
|
||||
</admst:template>
|
||||
|
||||
|
||||
<admst:for-each select="/module">
|
||||
<admst:value-of select="attribute[name='ngspicename']/value"/>
|
||||
<admst:open file="%sinit.c">
|
||||
<admst:text format="/***\n*** Interface: %(/simulator/package_string)\n"/>
|
||||
<admst:text format=" *** created by: %(/simulator/fullname) ***/\n"/>
|
||||
<admst:apply-templates select="." match="code"/>
|
||||
</admst:open>
|
||||
<admst:value-of select="attribute[name='ngspicename']/value"/>
|
||||
<admst:message format="%sinit.c: file created\n"/>
|
||||
</admst:for-each>
|
||||
|
||||
</admst>
|
||||
|
|
@ -1,57 +0,0 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
|
||||
<!--
|
||||
Written by Laurent Lemaitre - r29173@users.sourceforge.net
|
||||
Documentation:
|
||||
http://sourceforge.net/docman/display_doc.php?docid=18993&group_id=84289
|
||||
Target Interface: ngspice
|
||||
Supported by adms-1.x.x
|
||||
This file is used by adms - http://sourceforge.net/projects/mot-adms.
|
||||
adms 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 of the License, or
|
||||
(at your option) any later version.
|
||||
adms 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 adms; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
-->
|
||||
|
||||
<!DOCTYPE admst SYSTEM "admst.dtd">
|
||||
<admst version="2.3.0" xmlns:admst="http://mot-adms.sourceforge.net/xml-files/admst">
|
||||
<admst:template match="code">
|
||||
<admst:value-of select="attribute[name='ngspicename']/value"/>
|
||||
<admst:variable name="module" select="%s"/>
|
||||
|
||||
#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
|
||||
|
||||
</admst:template>
|
||||
|
||||
|
||||
<admst:for-each select="/module">
|
||||
<admst:value-of select="attribute[name='ngspicename']/value"/>
|
||||
<admst:open file="%sinit.h">
|
||||
<admst:text format="/***\n*** Interface: %(/simulator/package_string)\n"/>
|
||||
<admst:text format=" *** created by: %(/simulator/fullname) ***/\n"/>
|
||||
<admst:apply-templates select="." match="code"/>
|
||||
</admst:open>
|
||||
<admst:value-of select="attribute[name='ngspicename']/value"/>
|
||||
<admst:message format="%sinit.h: file created\n"/>
|
||||
</admst:for-each>
|
||||
|
||||
</admst>
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
|
||||
<!--
|
||||
Written by Laurent Lemaitre - r29173@users.sourceforge.net
|
||||
Documentation:
|
||||
http://sourceforge.net/docman/display_doc.php?docid=18993&group_id=84289
|
||||
Target Interface: ngspice
|
||||
Supported by adms-1.x.x
|
||||
This file is used by adms - http://sourceforge.net/projects/mot-adms.
|
||||
adms 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 of the License, or
|
||||
(at your option) any later version.
|
||||
adms 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 adms; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
-->
|
||||
|
||||
<!DOCTYPE admst SYSTEM "admst.dtd">
|
||||
<admst version="2.3.0" xmlns:admst="http://mot-adms.sourceforge.net/xml-files/admst">
|
||||
<admst:template match="code">
|
||||
<admst:value-of select="attribute[name='ngspicename']/value"/>
|
||||
<admst:variable name="module" select="%s"/>
|
||||
|
||||
#ifndef DEV_$(module)
|
||||
#define DEV_$(module)
|
||||
|
||||
extern SPICEdev *get_$(module)_info(void);
|
||||
|
||||
#endif
|
||||
|
||||
</admst:template>
|
||||
|
||||
|
||||
<admst:for-each select="/module">
|
||||
<admst:value-of select="attribute[name='ngspicename']/value"/>
|
||||
<admst:open file="%sitf.h">
|
||||
<admst:text format="/***\n*** Interface: %(/simulator/package_string)\n"/>
|
||||
<admst:text format=" *** created by: %(/simulator/fullname) ***/\n"/>
|
||||
<admst:apply-templates select="." match="code"/>
|
||||
</admst:open>
|
||||
<admst:value-of select="attribute[name='ngspicename']/value"/>
|
||||
<admst:message format="%sitf.h: file created\n"/>
|
||||
</admst:for-each>
|
||||
|
||||
</admst>
|
||||
|
|
@ -1,332 +0,0 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
|
||||
<!--
|
||||
Written by Laurent Lemaitre - r29173@users.sourceforge.net
|
||||
Documentation:
|
||||
http://sourceforge.net/docman/display_doc.php?docid=18993&group_id=84289
|
||||
Target Interface: ngspice
|
||||
Supported by adms-1.x.x
|
||||
This file is used by adms - http://sourceforge.net/projects/mot-adms.
|
||||
adms 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 of the License, or
|
||||
(at your option) any later version.
|
||||
adms 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 adms; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
-->
|
||||
|
||||
<!DOCTYPE admst SYSTEM "admst.dtd">
|
||||
<admst version="2.3.0" xmlns:admst="http://mot-adms.sourceforge.net/xml-files/admst">
|
||||
|
||||
<admst:template match="dectype">
|
||||
<admst:choose>
|
||||
<admst:when test="[type='real']">
|
||||
<admst:text format=" double "/>
|
||||
</admst:when>
|
||||
<admst:when test="[type='integer']">
|
||||
<admst:text format=" int "/>
|
||||
</admst:when>
|
||||
<admst:otherwise>
|
||||
<admst:text format=" char* "/>
|
||||
</admst:otherwise>
|
||||
</admst:choose>
|
||||
</admst:template>
|
||||
|
||||
<admst:template match="code">
|
||||
#define NGSPICE_DEBUG_OK
|
||||
|
||||
<admst:value-of select="attribute[name='ngspicename']/value"/>
|
||||
<admst:variable name="module" select="%s"/>
|
||||
|
||||
#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));
|
||||
|
||||
<admst:apply-templates select="." match="debug:strobe"/>
|
||||
|
||||
#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))
|
||||
{
|
||||
{
|
||||
<admst:for-each select="jacobian[static='yes']">
|
||||
<admst:value-of select="column/name"/>
|
||||
<admst:value-of select="row/name"/>
|
||||
<admst:text format=" here->JSVAL_%s_%s=0.0;\n"/>
|
||||
</admst:for-each>
|
||||
<admst:for-each select="jacobian[dynamic='yes']">
|
||||
<admst:value-of select="column/name"/>
|
||||
<admst:value-of select="row/name"/>
|
||||
<admst:text format=" here->JDVAL_%s_%s=0.0;\n"/>
|
||||
</admst:for-each>
|
||||
}
|
||||
{
|
||||
#include "$module.hxx"
|
||||
}
|
||||
} /* End of Instance */
|
||||
} /* End of Model */
|
||||
return(OK);
|
||||
}
|
||||
|
||||
</admst:template>
|
||||
|
||||
<!-- analog/![initializeModel|initializeInstance|initial_model|initial_instance|initial_step|noise] -->
|
||||
<admst:template match="debug:strobe">
|
||||
<admst:value-of select="attribute[name='ngspicename']/value"/>
|
||||
<admst:variable name="module" select="%s"/>
|
||||
|
||||
<admst:text format="static void $(module)debug (CKTcircuit *ckt, $(module)model *model, $(module)instance *here)\n"/>
|
||||
<admst:text format="{\n"/>
|
||||
<admst:for-each select="node[grounded='no']">
|
||||
<admst:value-of select="name"/>
|
||||
<admst:value-of select="name"/>
|
||||
<admst:text format=" fprintf(stdout,"voltage: %s=%%e\\n",NP(%s));\n"/>
|
||||
</admst:for-each>
|
||||
<admst:for-each select="variable[input='yes']">
|
||||
<admst:choose>
|
||||
<admst:when test="[type='integer']">
|
||||
<admst:apply-templates select="." match="variable"/>
|
||||
<admst:value-of select="/simulator/tmp"/>
|
||||
<admst:value-of select="name"/>
|
||||
<admst:value-of select="parametertype"/>
|
||||
<admst:text format=" fprintf(stdout,"Parameter: %s: %s=%%i\\n",%s);\n"/>
|
||||
</admst:when>
|
||||
<admst:when test="[type='real']">
|
||||
<admst:apply-templates select="." match="variable"/>
|
||||
<admst:value-of select="/simulator/tmp"/>
|
||||
<admst:value-of select="name"/>
|
||||
<admst:value-of select="parametertype"/>
|
||||
<admst:text format=" fprintf(stdout,"Parameter: %s: %s=%%e\\n",%s);\n"/>
|
||||
</admst:when>
|
||||
</admst:choose>
|
||||
</admst:for-each>
|
||||
<admst:for-each select="variable[input='no' and scope='global_model' and setinmodel='yes' and insource='yes']">
|
||||
<admst:choose>
|
||||
<admst:when test="[type='integer']">
|
||||
<admst:apply-templates select="." match="variable"/>
|
||||
<admst:value-of select="/simulator/tmp"/>
|
||||
<admst:value-of select="name"/>
|
||||
<admst:text format=" fprintf(stdout,"model: %s=%%i\\n",%s);\n"/>
|
||||
</admst:when>
|
||||
<admst:when test="[type='real']">
|
||||
<admst:apply-templates select="." match="variable"/>
|
||||
<admst:value-of select="/simulator/tmp"/>
|
||||
<admst:value-of select="name"/>
|
||||
<admst:text format=" fprintf(stdout,"model: %s=%%e\\n",%s);\n"/>
|
||||
</admst:when>
|
||||
</admst:choose>
|
||||
</admst:for-each>
|
||||
<admst:for-each select="variable[input='no' and scope='global_instance' and setininstance='yes' and insource='yes']">
|
||||
<admst:choose>
|
||||
<admst:when test="[type='integer']">
|
||||
<admst:apply-templates select="." match="variable"/>
|
||||
<admst:value-of select="/simulator/tmp"/>
|
||||
<admst:value-of select="name"/>
|
||||
<admst:text format=" fprintf(stdout,"instance: %s=%%i\\n",%s);\n"/>
|
||||
</admst:when>
|
||||
<admst:when test="[type='real']">
|
||||
<admst:apply-templates select="." match="variable"/>
|
||||
<admst:value-of select="/simulator/tmp"/>
|
||||
<admst:value-of select="name"/>
|
||||
<admst:text format=" fprintf(stdout,"instance: %s=%%e\\n",%s);\n"/>
|
||||
</admst:when>
|
||||
</admst:choose>
|
||||
</admst:for-each>
|
||||
<admst:text format="}\n"/>
|
||||
</admst:template>
|
||||
|
||||
<admst:template match="analog:evaluate">
|
||||
<admst:if test="code">
|
||||
<admst:assert test="code/adms[datatypename='block']" format="expecting datatypename=block\n"/>
|
||||
<admst:for-each select="code/item">
|
||||
<admst:if test="adms[datatypename='block']">
|
||||
<admst:if test="[name!='initial_model' and name!='initial_instance' and name!='initializeModel' and name!='initializeInstance'
|
||||
and name!='initial_step']">
|
||||
<admst:apply-templates select="." match="block:local:declaration"/>
|
||||
</admst:if>
|
||||
</admst:if>
|
||||
<admst:if test="adms[datatypename!='block']">
|
||||
<admst:apply-templates select="." match="block:local:declaration"/>
|
||||
</admst:if>
|
||||
</admst:for-each>
|
||||
<admst:apply-templates select="code" match="variable:declaration"/>
|
||||
<admst:for-each select="code/item">
|
||||
<admst:choose>
|
||||
<admst:when test="adms[datatypename!='block']">
|
||||
<admst:value-of select="./adms/datatypename"/>
|
||||
<admst:apply-templates select="." match="%s"/>
|
||||
</admst:when>
|
||||
<admst:otherwise>
|
||||
<admst:if test="[name!='initial_model' and name!='initial_instance' and name!='initializeModel' and name!='initializeInstance'
|
||||
and name!='initial_step']">
|
||||
<admst:apply-templates select="." match="block"/>
|
||||
</admst:if>
|
||||
</admst:otherwise>
|
||||
</admst:choose>
|
||||
</admst:for-each>
|
||||
</admst:if>
|
||||
</admst:template>
|
||||
|
||||
<admst:for-each select="/module">
|
||||
<admst:value-of select="attribute[name='ngspicename']/value"/>
|
||||
<admst:open file="%sload.c">
|
||||
<admst:text format="/***\n*** Interface: %(/simulator/package_string)\n"/>
|
||||
<admst:text format=" *** created by: %(/simulator/fullname) ***/\n"/>
|
||||
<admst:apply-templates select="." match="code"/>
|
||||
</admst:open>
|
||||
<admst:value-of select="attribute[name='ngspicename']/value"/>
|
||||
<admst:message format="%sload.c: file created\n"/>
|
||||
</admst:for-each>
|
||||
|
||||
</admst>
|
||||
|
|
@ -1,82 +0,0 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
|
||||
<!--
|
||||
Written by Laurent Lemaitre - r29173@users.sourceforge.net
|
||||
Documentation:
|
||||
http://sourceforge.net/docman/display_doc.php?docid=18993&group_id=84289
|
||||
Target Interface: ngspice
|
||||
Supported by adms-1.x.x
|
||||
This file is used by adms - http://sourceforge.net/projects/mot-adms.
|
||||
adms 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 of the License, or
|
||||
(at your option) any later version.
|
||||
adms 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 adms; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
-->
|
||||
|
||||
<!DOCTYPE admst SYSTEM "admst.dtd">
|
||||
<admst version="2.3.0" xmlns:admst="http://mot-adms.sourceforge.net/xml-files/admst">
|
||||
|
||||
|
||||
<admst:template match="code">
|
||||
<admst:value-of select="attribute[name='ngspicename']/value"/>
|
||||
<admst:variable name="module" select="%s"/>
|
||||
|
||||
#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) {
|
||||
<admst:for-each select="variable[parametertype='model' and input='yes']">
|
||||
<admst:value-of select="name"/>
|
||||
<admst:text format=" case $(module)_model_%s :\n"/>
|
||||
<admst:choose>
|
||||
<admst:when test="[type='real']">
|
||||
<admst:value-of select="name"/>
|
||||
<admst:text format=" value->rValue = model->%s;\n"/>
|
||||
</admst:when>
|
||||
<admst:when test="[type='integer']">
|
||||
<admst:value-of select="name"/>
|
||||
<admst:text format=" value->iValue = model->%s;\n"/>
|
||||
</admst:when>
|
||||
<admst:otherwise>
|
||||
<admst:fatal format="parameter of type 'string' not supported\n"/>
|
||||
</admst:otherwise>
|
||||
</admst:choose>
|
||||
<admst:text format=" return OK;\n"/>
|
||||
</admst:for-each>
|
||||
default:
|
||||
return(-1);
|
||||
}
|
||||
return(-1);
|
||||
}
|
||||
|
||||
</admst:template>
|
||||
|
||||
<admst:for-each select="/module">
|
||||
<admst:value-of select="attribute[name='ngspicename']/value"/>
|
||||
<admst:open file="%smask.c">
|
||||
<admst:text format="/***\n*** Interface: %(/simulator/package_string)\n"/>
|
||||
<admst:text format=" *** created by: %(/simulator/fullname) ***/\n"/>
|
||||
<admst:apply-templates select="." match="code"/>
|
||||
</admst:open>
|
||||
<admst:value-of select="attribute[name='ngspicename']/value"/>
|
||||
<admst:message format="%smask.c: file created\n"/>
|
||||
</admst:for-each>
|
||||
|
||||
</admst>
|
||||
|
|
@ -1,67 +0,0 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
|
||||
<!--
|
||||
Written by Laurent Lemaitre - r29173@users.sourceforge.net
|
||||
Documentation:
|
||||
http://sourceforge.net/docman/display_doc.php?docid=18993&group_id=84289
|
||||
Target Interface: ngspice
|
||||
Supported by adms-1.x.x
|
||||
This file is used by adms - http://sourceforge.net/projects/mot-adms.
|
||||
adms 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 of the License, or
|
||||
(at your option) any later version.
|
||||
adms 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 adms; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
-->
|
||||
|
||||
<!DOCTYPE admst SYSTEM "admst.dtd">
|
||||
<admst version="2.3.0" xmlns:admst="http://mot-adms.sourceforge.net/xml-files/admst">
|
||||
|
||||
<admst:template match="dectype">
|
||||
<admst:choose>
|
||||
<admst:when test="[type='real']">
|
||||
<admst:text format=" double "/>
|
||||
</admst:when>
|
||||
<admst:when test="[type='integer']">
|
||||
<admst:text format=" int "/>
|
||||
</admst:when>
|
||||
<admst:otherwise>
|
||||
<admst:text format=" char* "/>
|
||||
</admst:otherwise>
|
||||
</admst:choose>
|
||||
</admst:template>
|
||||
|
||||
<admst:template match="code">
|
||||
<admst:value-of select="attribute[name='ngspicename']/value"/>
|
||||
<admst:variable name="module" select="%s"/>
|
||||
#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;
|
||||
}
|
||||
</admst:template>
|
||||
|
||||
<admst:for-each select="/module">
|
||||
<admst:value-of select="attribute[name='ngspicename']/value"/>
|
||||
<admst:open file="%smdel.c">
|
||||
<admst:text format="/***\n*** Interface: %(/simulator/package_string)\n"/>
|
||||
<admst:text format=" *** created by: %(/simulator/fullname) ***/\n"/>
|
||||
<admst:apply-templates select="." match="code"/>
|
||||
</admst:open>
|
||||
<admst:value-of select="attribute[name='ngspicename']/value"/>
|
||||
<admst:message format="%smdel.c: file created\n"/>
|
||||
</admst:for-each>
|
||||
|
||||
</admst>
|
||||
|
|
@ -1,82 +0,0 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
|
||||
<!--
|
||||
Written by Laurent Lemaitre - r29173@users.sourceforge.net
|
||||
Documentation:
|
||||
http://sourceforge.net/docman/display_doc.php?docid=18993&group_id=84289
|
||||
Target Interface: ngspice
|
||||
Supported by adms-1.x.x
|
||||
This file is used by adms - http://sourceforge.net/projects/mot-adms.
|
||||
adms 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 of the License, or
|
||||
(at your option) any later version.
|
||||
adms 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 adms; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
-->
|
||||
|
||||
<!DOCTYPE admst SYSTEM "admst.dtd">
|
||||
<admst version="2.3.0" xmlns:admst="http://mot-adms.sourceforge.net/xml-files/admst">
|
||||
|
||||
|
||||
<admst:template match="code">
|
||||
<admst:value-of select="attribute[name='ngspicename']/value"/>
|
||||
<admst:variable name="module" select="%s"/>
|
||||
|
||||
#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) {
|
||||
|
||||
<admst:for-each select="variable[parametertype='model' and input='yes']">
|
||||
<admst:value-of select="name"/>
|
||||
<admst:text format=" case $(module)_model_%s :\n"/>
|
||||
<admst:choose>
|
||||
<admst:when test="[type='real']">
|
||||
<admst:value-of select="name"/>
|
||||
<admst:text format=" mod->%s = value->rValue;\n"/>
|
||||
</admst:when>
|
||||
<admst:when test="[type='integer']">
|
||||
<admst:value-of select="name"/>
|
||||
<admst:text format=" mod->%s = value->iValue;\n"/>
|
||||
</admst:when>
|
||||
<admst:otherwise>
|
||||
<admst:fatal format="parameter of type 'string' not supported\n"/>
|
||||
</admst:otherwise>
|
||||
</admst:choose>
|
||||
<admst:value-of select="name"/>
|
||||
<admst:text format=" mod->%s_Given = TRUE;\n"/>
|
||||
<admst:text format=" break;\n"/>
|
||||
</admst:for-each>
|
||||
default:
|
||||
return(-1);
|
||||
}
|
||||
return(OK);
|
||||
}
|
||||
|
||||
</admst:template>
|
||||
|
||||
<admst:for-each select="/module">
|
||||
<admst:value-of select="attribute[name='ngspicename']/value"/>
|
||||
<admst:open file="%smpar.c">
|
||||
<admst:text format="/***\n*** Interface: %(/simulator/package_string)\n"/>
|
||||
<admst:text format=" *** created by: %(/simulator/fullname) ***/\n"/>
|
||||
<admst:apply-templates select="." match="code"/>
|
||||
</admst:open>
|
||||
<admst:value-of select="attribute[name='ngspicename']/value"/>
|
||||
<admst:message format="%smpar.c: file created\n"/>
|
||||
</admst:for-each>
|
||||
|
||||
</admst>
|
||||
|
|
@ -1,87 +0,0 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
|
||||
<!--
|
||||
Written by Laurent Lemaitre - r29173@users.sourceforge.net
|
||||
Documentation:
|
||||
http://sourceforge.net/docman/display_doc.php?docid=18993&group_id=84289
|
||||
Target Interface: ngspice
|
||||
Supported by adms-1.x.x
|
||||
This file is used by adms - http://sourceforge.net/projects/mot-adms.
|
||||
adms 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 of the License, or
|
||||
(at your option) any later version.
|
||||
adms 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 adms; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
-->
|
||||
|
||||
<!DOCTYPE admst SYSTEM "admst.dtd">
|
||||
<admst version="2.3.0" xmlns:admst="http://mot-adms.sourceforge.net/xml-files/admst">
|
||||
|
||||
<admst:template match="code">
|
||||
<admst:variable name="module" select="%(attribute[name='ngspicename']/value)"/>
|
||||
|
||||
#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 []= {
|
||||
<admst:text select="contribution[flickernoise='yes']" format=""","/>
|
||||
<admst:text select="contribution[whitenoise='yes']" format=""","/>
|
||||
<admst:text format=""""/>
|
||||
};
|
||||
|
||||
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);
|
||||
}
|
||||
</admst:template>
|
||||
|
||||
<admst:for-each select="/module">
|
||||
<admst:open file="%(attribute[name='ngspicename']/value)noise.c">
|
||||
<admst:text format="/***\n*** Interface: %(/simulator/package_string)\n"/>
|
||||
<admst:text format=" *** created by: %(/simulator/fullname) ***/\n"/>
|
||||
<admst:apply-templates select="." match="code"/>
|
||||
</admst:open>
|
||||
<admst:message format="%(attribute[name='ngspicename']/value)noise.c: file created\n"/>
|
||||
</admst:for-each>
|
||||
|
||||
</admst>
|
||||
|
|
@ -1,83 +0,0 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
|
||||
<!--
|
||||
Written by Laurent Lemaitre - r29173@users.sourceforge.net
|
||||
Documentation:
|
||||
http://sourceforge.net/docman/display_doc.php?docid=18993&group_id=84289
|
||||
Target Interface: ngspice
|
||||
Supported by adms-1.x.x
|
||||
This file is used by adms - http://sourceforge.net/projects/mot-adms.
|
||||
adms 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 of the License, or
|
||||
(at your option) any later version.
|
||||
adms 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 adms; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
-->
|
||||
|
||||
<!DOCTYPE admst SYSTEM "admst.dtd">
|
||||
<admst version="2.3.0" xmlns:admst="http://mot-adms.sourceforge.net/xml-files/admst">
|
||||
|
||||
<admst:template match="code">
|
||||
<admst:value-of select="attribute[name='ngspicename']/value"/>
|
||||
<admst:variable name="module" select="%s"/>
|
||||
|
||||
#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) {
|
||||
<admst:for-each select="variable[parametertype='instance' and input='yes']">
|
||||
<admst:value-of select="name"/>
|
||||
<admst:text format=" case $(module)_instance_%s :\n"/>
|
||||
<admst:choose>
|
||||
<admst:when test="[type='real']">
|
||||
<admst:value-of select="name"/>
|
||||
<admst:text format=" myinstance->%s = value->rValue;\n"/>
|
||||
</admst:when>
|
||||
<admst:when test="[type='integer']">
|
||||
<admst:value-of select="name"/>
|
||||
<admst:text format=" myinstance->%s = value->iValue;\n"/>
|
||||
</admst:when>
|
||||
<admst:otherwise>
|
||||
<admst:fatal format="parameter of type 'string' not supported\n"/>
|
||||
</admst:otherwise>
|
||||
</admst:choose>
|
||||
<admst:value-of select="name"/>
|
||||
<admst:text format=" myinstance->%s_Given = TRUE;\n"/>
|
||||
<admst:text format=" break;\n"/>
|
||||
</admst:for-each>
|
||||
default:
|
||||
return(-1);
|
||||
}
|
||||
return(OK);
|
||||
}
|
||||
|
||||
</admst:template>
|
||||
|
||||
<admst:for-each select="/module">
|
||||
<admst:value-of select="attribute[name='ngspicename']/value"/>
|
||||
<admst:open file="%spar.c">
|
||||
<admst:text format="/***\n*** Interface: %(/simulator/package_string)\n"/>
|
||||
<admst:text format=" *** created by: %(/simulator/fullname) ***/\n"/>
|
||||
<admst:apply-templates select="." match="code"/>
|
||||
</admst:open>
|
||||
<admst:value-of select="attribute[name='ngspicename']/value"/>
|
||||
<admst:message format="%spar.c: file created\n"/>
|
||||
</admst:for-each>
|
||||
|
||||
</admst>
|
||||
|
|
@ -1,106 +0,0 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
|
||||
<!--
|
||||
Written by Laurent Lemaitre - r29173@users.sourceforge.net
|
||||
Documentation:
|
||||
http://sourceforge.net/docman/display_doc.php?docid=18993&group_id=84289
|
||||
Target Interface: ngspice
|
||||
Supported by adms-1.x.x
|
||||
This file is used by adms - http://sourceforge.net/projects/mot-adms.
|
||||
adms 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 of the License, or
|
||||
(at your option) any later version.
|
||||
adms 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 adms; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
-->
|
||||
|
||||
<!DOCTYPE admst SYSTEM "admst.dtd">
|
||||
<admst version="2.3.0" xmlns:admst="http://mot-adms.sourceforge.net/xml-files/admst">
|
||||
|
||||
<admst:template match="dectype">
|
||||
<admst:choose>
|
||||
<admst:when test="[type='real']">
|
||||
<admst:text format=" double "/>
|
||||
</admst:when>
|
||||
<admst:when test="[type='integer']">
|
||||
<admst:text format=" int "/>
|
||||
</admst:when>
|
||||
<admst:otherwise>
|
||||
<admst:text format=" char* "/>
|
||||
</admst:otherwise>
|
||||
</admst:choose>
|
||||
</admst:template>
|
||||
|
||||
<admst:template match="code">
|
||||
<admst:value-of select="attribute[name='ngspicename']/value"/>
|
||||
<admst:variable name="module" select="%s"/>
|
||||
|
||||
#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))
|
||||
{
|
||||
<admst:for-each select="jacobian[static='yes']">
|
||||
<admst:value-of select="column/name"/>
|
||||
<admst:value-of select="row/name"/>
|
||||
<admst:value-of select="column/name"/>
|
||||
<admst:value-of select="row/name"/>
|
||||
<admst:value-of select="column/name"/>
|
||||
<admst:value-of select="row/name"/>
|
||||
<admst:text format=" if(here->PTR_J_%s_%s_required) *(here->PTR_J_%s_%s)+=here->JSVAL_%s_%s *(s->real);\n"/>
|
||||
</admst:for-each>
|
||||
<admst:for-each select="jacobian[dynamic='yes']">
|
||||
<admst:value-of select="column/name"/>
|
||||
<admst:value-of select="row/name"/>
|
||||
<admst:value-of select="column/name"/>
|
||||
<admst:value-of select="row/name"/>
|
||||
<admst:value-of select="column/name"/>
|
||||
<admst:value-of select="row/name"/>
|
||||
<admst:text format=" if(here->PTR_J_%s_%s_required) *(here->PTR_J_%s_%s)+=here->JDVAL_%s_%s *(s->real);\n"/>
|
||||
</admst:for-each>
|
||||
<admst:for-each select="jacobian[dynamic='yes']">
|
||||
<admst:value-of select="column/name"/>
|
||||
<admst:value-of select="row/name"/>
|
||||
<admst:value-of select="column/name"/>
|
||||
<admst:value-of select="row/name"/>
|
||||
<admst:value-of select="column/name"/>
|
||||
<admst:value-of select="row/name"/>
|
||||
<admst:text format=" if(here->PTR_J_%s_%s_required) *(here->PTR_J_%s_%s+1)+=here->JDVAL_%s_%s *(s->imag);\n"/>
|
||||
</admst:for-each>
|
||||
} /* End of MOSFET Instance */
|
||||
} /* End of Model Instance */
|
||||
return(OK);
|
||||
}
|
||||
|
||||
</admst:template>
|
||||
|
||||
<admst:for-each select="/module">
|
||||
<admst:value-of select="attribute[name='ngspicename']/value"/>
|
||||
<admst:open file="%spzld.c">
|
||||
<admst:text format="/***\n*** Interface: %(/simulator/package_string)\n"/>
|
||||
<admst:text format=" *** created by: %(/simulator/fullname) ***/\n"/>
|
||||
<admst:apply-templates select="." match="code"/>
|
||||
</admst:open>
|
||||
<admst:value-of select="attribute[name='ngspicename']/value"/>
|
||||
<admst:message format="%spzld.c: file created\n"/>
|
||||
</admst:for-each>
|
||||
|
||||
</admst>
|
||||
|
|
@ -1,221 +0,0 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
|
||||
<!--
|
||||
Written by Laurent Lemaitre - r29173@users.sourceforge.net
|
||||
Documentation:
|
||||
http://sourceforge.net/docman/display_doc.php?docid=18993&group_id=84289
|
||||
Target Interface: ngspice
|
||||
Supported by adms-1.x.x
|
||||
This file is used by adms - http://sourceforge.net/projects/mot-adms.
|
||||
adms 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 of the License, or
|
||||
(at your option) any later version.
|
||||
adms 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 adms; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
-->
|
||||
|
||||
<!DOCTYPE admst SYSTEM "admst.dtd">
|
||||
<admst version="2.3.0" xmlns:admst="http://mot-adms.sourceforge.net/xml-files/admst">
|
||||
|
||||
<admst:template match="dectype">
|
||||
<admst:choose>
|
||||
<admst:when test="[type='real']">
|
||||
<admst:text format=" double "/>
|
||||
</admst:when>
|
||||
<admst:when test="[type='integer']">
|
||||
<admst:text format=" int "/>
|
||||
</admst:when>
|
||||
<admst:otherwise>
|
||||
<admst:text format=" char* "/>
|
||||
</admst:otherwise>
|
||||
</admst:choose>
|
||||
</admst:template>
|
||||
|
||||
<admst:template match="code">
|
||||
<admst:value-of select="attribute[name='ngspicename']/value"/>
|
||||
<admst:variable name="module" select="%s"/>
|
||||
|
||||
#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) )
|
||||
{
|
||||
<admst:for-each select="variable[parametertype='model' and input='yes']">
|
||||
<admst:if test="default[not(nilled(function[class='builtin']))]">
|
||||
<admst:text format="{\n"/>
|
||||
<admst:for-each select="default/function">
|
||||
<admst:value-of select="position(.)-1"/>
|
||||
<admst:apply-templates select="." match="function:getname"/>
|
||||
<admst:text format="double __%s_%s=0.0;\n"/>
|
||||
</admst:for-each>
|
||||
<admst:apply-templates select="default" match="function:assignment"/>
|
||||
</admst:if>
|
||||
<admst:apply-templates select="default" match="expression:stringify:noprobe"/>
|
||||
<admst:value-of select="name"/>
|
||||
<admst:value-of select="name"/>
|
||||
if(model->%s_Given == FALSE) model->%s=%s;
|
||||
<admst:if test="default[not(nilled(function[class='builtin']))]">
|
||||
<admst:text format="}\n"/>
|
||||
</admst:if>
|
||||
</admst:for-each>
|
||||
for ( here = $(module)instances(model) ;here != NULL ; here = $(module)nextInstance(here) )
|
||||
{
|
||||
<admst:for-each select="variable[parametertype='instance' and input='yes']">
|
||||
<admst:if test="default[not(nilled(function[class='builtin']))]">
|
||||
<admst:text format="{\n"/>
|
||||
<admst:for-each select="default/function">
|
||||
<admst:value-of select="position(.)-1"/>
|
||||
<admst:apply-templates select="." match="function:getname"/>
|
||||
<admst:text format="double __%s_%s=0.0;\n"/>
|
||||
</admst:for-each>
|
||||
<admst:apply-templates select="default" match="function:assignment"/>
|
||||
</admst:if>
|
||||
<admst:apply-templates select="default" match="expression:stringify:noprobe"/>
|
||||
<admst:value-of select="name"/>
|
||||
<admst:value-of select="name"/>
|
||||
if(here->%s_Given == FALSE) here->%s=%s;
|
||||
<admst:if test="default[not(nilled(function[class='builtin']))]">
|
||||
<admst:text format="}\n"/>
|
||||
</admst:if>
|
||||
</admst:for-each>
|
||||
/* External Nodes, connected ? */
|
||||
<admst:for-each select="node[location='external']">
|
||||
here->%(name)Node_connected = (here->%(name)Node >= 0);
|
||||
</admst:for-each>
|
||||
<admst:if test="node[location='internal']">
|
||||
/* Internal Nodes */
|
||||
{
|
||||
<admst:for-each select="node[location='internal']">
|
||||
<admst:variable name="info" select="no info"/>
|
||||
<admst:for-each select="attribute[name='info']">
|
||||
<admst:value-of select="value"/>
|
||||
<admst:variable name="info" select="%s"/>
|
||||
</admst:for-each>
|
||||
<admst:value-of select="name"/>
|
||||
here->%sNode = -1;
|
||||
here->%(name)Node_mine = 0;
|
||||
</admst:for-each>
|
||||
}
|
||||
</admst:if>
|
||||
((GENinstance*)here)->GENstate = *states;
|
||||
*states += $(module)numStates;
|
||||
/* set states */
|
||||
<admst:for-each select="source[dynamic='yes']">
|
||||
<admst:value-of select="branch/nnode/name"/>
|
||||
<admst:value-of select="branch/pnode/name"/>
|
||||
here->state_%s_%s = *states; *states += 2;
|
||||
</admst:for-each>
|
||||
/* set Sparse Matrix Pointers */
|
||||
<admst:for-each select="jacobian">
|
||||
<admst:value-of select="column/name"/>
|
||||
<admst:value-of select="row/name"/>
|
||||
here->PTR_J_%s_%s_required=0;
|
||||
</admst:for-each>
|
||||
|
||||
$(module)guesstopology(matrix,ckt,model,here);
|
||||
|
||||
/* Internal Nodes */
|
||||
{
|
||||
int error;
|
||||
CKTnode *tmp;
|
||||
<admst:for-each select="node[location!='ground']">
|
||||
<admst:variable name="info" select="no info"/>
|
||||
<admst:for-each select="attribute[name='info']">
|
||||
<admst:value-of select="value"/>
|
||||
<admst:variable name="info" select="%s"/>
|
||||
</admst:for-each>
|
||||
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;
|
||||
}
|
||||
</admst:for-each>
|
||||
}
|
||||
<admst:for-each select="jacobian">
|
||||
<admst:value-of select="column/name"/>
|
||||
<admst:value-of select="row/name"/>
|
||||
if(here->PTR_J_%s_%s_required==1)
|
||||
{
|
||||
<admst:value-of select="column/name"/>
|
||||
<admst:value-of select="row/name"/>
|
||||
<admst:value-of select="column/name"/>
|
||||
<admst:value-of select="row/name"/>
|
||||
here->PTR_J_%s_%s=SMPmakeElt(matrix,here->%sNode,here->%sNode);
|
||||
}
|
||||
</admst:for-each>
|
||||
|
||||
}
|
||||
}
|
||||
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) )
|
||||
{
|
||||
<admst:for-each select="node[location='external']">
|
||||
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;
|
||||
</admst:for-each>
|
||||
<admst:for-each select="reverse(node[location='internal'])">
|
||||
if (here->%(name)Node_mine)
|
||||
if (here->%(name)Node > 0)
|
||||
CKTdltNNum(ckt, here->%(name)Node);
|
||||
here->%(name)Node = -1;
|
||||
here->%(name)Node_mine = 0;
|
||||
</admst:for-each>
|
||||
}
|
||||
}
|
||||
return OK;
|
||||
}
|
||||
|
||||
</admst:template>
|
||||
|
||||
<admst:for-each select="/module">
|
||||
<admst:value-of select="attribute[name='ngspicename']/value"/>
|
||||
<admst:open file="%ssetup.c">
|
||||
<admst:text format="/***\n*** Interface: %(/simulator/package_string)\n"/>
|
||||
<admst:text format=" *** created by: %(/simulator/fullname) ***/\n"/>
|
||||
<admst:apply-templates select="." match="code"/>
|
||||
</admst:open>
|
||||
<admst:value-of select="attribute[name='ngspicename']/value"/>
|
||||
<admst:message format="%ssetup.c: file created\n"/>
|
||||
</admst:for-each>
|
||||
|
||||
</admst>
|
||||
|
|
@ -1,88 +0,0 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
|
||||
<!--
|
||||
Written by Laurent Lemaitre - r29173@users.sourceforge.net
|
||||
Documentation:
|
||||
http://sourceforge.net/docman/display_doc.php?docid=18993&group_id=84289
|
||||
Target Interface: ngspice
|
||||
Supported by adms-1.x.x
|
||||
This file is used by adms - http://sourceforge.net/projects/mot-adms.
|
||||
adms 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 of the License, or
|
||||
(at your option) any later version.
|
||||
adms 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 adms; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
-->
|
||||
|
||||
<!DOCTYPE admst SYSTEM "admst.dtd">
|
||||
<admst version="2.3.0" xmlns:admst="http://mot-adms.sourceforge.net/xml-files/admst">
|
||||
|
||||
<admst:template match="dectype">
|
||||
<admst:choose>
|
||||
<admst:when test="[type='real']">
|
||||
<admst:text format=" double "/>
|
||||
</admst:when>
|
||||
<admst:when test="[type='integer']">
|
||||
<admst:text format=" int "/>
|
||||
</admst:when>
|
||||
<admst:otherwise>
|
||||
<admst:text format=" char* "/>
|
||||
</admst:otherwise>
|
||||
</admst:choose>
|
||||
</admst:template>
|
||||
|
||||
<admst:template match="code">
|
||||
<admst:value-of select="attribute[name='ngspicename']/value"/>
|
||||
<admst:variable name="module" select="%s"/>
|
||||
|
||||
#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) )
|
||||
{
|
||||
|
||||
<admst:apply-templates select="analog" match="analog:initial_model" required="yes"/>
|
||||
/* loop through all the instances of the model */
|
||||
for (here = $(module)instances(model); here != NULL ; here = $(module)nextInstance(here))
|
||||
{
|
||||
|
||||
<admst:apply-templates select="analog" match="analog:initial_instance" required="yes"/>
|
||||
} /* End of MOSFET Instance */
|
||||
} /* End of Model Instance */
|
||||
return(OK);
|
||||
}
|
||||
|
||||
</admst:template>
|
||||
|
||||
<admst:for-each select="/module">
|
||||
<admst:value-of select="attribute[name='ngspicename']/value"/>
|
||||
<admst:open file="%stemp.c">
|
||||
<admst:text format="/***\n*** Interface: %(/simulator/package_string)\n"/>
|
||||
<admst:text format=" *** created by: %(/simulator/fullname) ***/\n"/>
|
||||
<admst:apply-templates select="." match="code"/>
|
||||
</admst:open>
|
||||
<admst:value-of select="attribute[name='ngspicename']/value"/>
|
||||
<admst:message format="%stemp.c: file created\n"/>
|
||||
</admst:for-each>
|
||||
|
||||
</admst>
|
||||
|
|
@ -1,100 +0,0 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
|
||||
<!--
|
||||
Written by Laurent Lemaitre - r29173@users.sourceforge.net
|
||||
Documentation:
|
||||
http://sourceforge.net/docman/display_doc.php?docid=18993&group_id=84289
|
||||
Target Interface: ngspice
|
||||
Supported by adms-1.x.x
|
||||
This file is used by adms - http://sourceforge.net/projects/mot-adms.
|
||||
adms 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 of the License, or
|
||||
(at your option) any later version.
|
||||
adms 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 adms; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
-->
|
||||
|
||||
<!DOCTYPE admst SYSTEM "admst.dtd">
|
||||
<admst version="2.3.0" xmlns:admst="http://mot-adms.sourceforge.net/xml-files/admst">
|
||||
|
||||
<admst:template match="dectype">
|
||||
<admst:choose>
|
||||
<admst:when test="[type='real']">
|
||||
<admst:text format=" double "/>
|
||||
</admst:when>
|
||||
<admst:when test="[type='integer']">
|
||||
<admst:text format=" int "/>
|
||||
</admst:when>
|
||||
<admst:otherwise>
|
||||
<admst:text format=" char* "/>
|
||||
</admst:otherwise>
|
||||
</admst:choose>
|
||||
</admst:template>
|
||||
|
||||
<admst:template match="code">
|
||||
<admst:value-of select="attribute[name='ngspicename']/value"/>
|
||||
<admst:variable name="module" select="%s"/>
|
||||
|
||||
#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 */
|
||||
|
||||
<admst:for-each select="source[dynamic='yes']">
|
||||
<admst:value-of select="branch/nnode/name"/>
|
||||
<admst:value-of select="branch/pnode/name"/>
|
||||
CKTterr(here->state_%s_%s, ckt, timeStep);
|
||||
</admst:for-each>
|
||||
|
||||
|
||||
#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);
|
||||
}
|
||||
|
||||
</admst:template>
|
||||
|
||||
<admst:for-each select="/module">
|
||||
<admst:value-of select="attribute[name='ngspicename']/value"/>
|
||||
<admst:open file="%strunc.c">
|
||||
<admst:text format="/***\n*** Interface: %(/simulator/package_string)\n"/>
|
||||
<admst:text format=" *** created by: %(/simulator/fullname) ***/\n"/>
|
||||
<admst:apply-templates select="." match="code"/>
|
||||
</admst:open>
|
||||
<admst:value-of select="attribute[name='ngspicename']/value"/>
|
||||
<admst:message format="%strunc.c: file created\n"/>
|
||||
</admst:for-each>
|
||||
|
||||
</admst>
|
||||
|
|
@ -1,217 +0,0 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
|
||||
<!--
|
||||
Written by Laurent Lemaitre - r29173@users.sourceforge.net
|
||||
Documentation:
|
||||
http://sourceforge.net/docman/display_doc.php?docid=18993&group_id=84289
|
||||
Target Interface: ngspice
|
||||
Supported by adms-1.x.x
|
||||
This file is used by adms - http://sourceforge.net/projects/mot-adms.
|
||||
adms 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 of the License, or
|
||||
(at your option) any later version.
|
||||
adms 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 adms; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
-->
|
||||
|
||||
<!DOCTYPE admst SYSTEM "admst.dtd">
|
||||
<admst version="2.3.0" xmlns:admst="http://mot-adms.sourceforge.net/xml-files/admst">
|
||||
|
||||
|
||||
<admst:template match="code">
|
||||
<admst:value-of select="attribute[name='ngspicename']/value"/>
|
||||
<admst:variable name="module" select="%s"/>
|
||||
## 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
|
||||
|
||||
</admst:template>
|
||||
|
||||
<admst:for-each select="/module">
|
||||
<admst:open file="Makefile.am">
|
||||
<admst:text format="##\n## Interface: %(/simulator/package_string)\n"/>
|
||||
<admst:text format="## created by: %(/simulator/fullname)\n"/>
|
||||
<admst:apply-templates select="." match="code"/>
|
||||
</admst:open>
|
||||
<admst:message format="Makefile.am: file created\n"/>
|
||||
</admst:for-each>
|
||||
|
||||
</admst>
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -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
|
||||
|
||||
|
|
@ -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 ,"" ,"" )
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -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
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -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
|
||||
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -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.
|
||||
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
||||
|
|
@ -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 ;
|
||||
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
||||
|
|
@ -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(<c>); // External DC collector current
|
||||
OP_ic = TYPE*Ic1c2; // External DC collector current
|
||||
//OP_ib = I(<b>); // 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(<e>); // 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(<s>); // 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
|
||||
|
|
@ -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;
|
||||
|
|
@ -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" )
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -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
|
||||
|
|
@ -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;
|
||||
|
||||
|
|
@ -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;
|
||||
|
|
@ -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
|
||||
|
|
@ -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.
|
||||
|
||||
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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);
|
||||
|
||||
|
|
@ -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
|
||||
|
|
@ -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;
|
||||
|
|
@ -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");
|
||||
|
|
@ -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;
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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.
|
||||
|
|
@ -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);
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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);
|
||||
|
||||
|
|
@ -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
|
||||
|
|
@ -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) */
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -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
|
||||
|
|
@ -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")
|
||||
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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.
|
||||
|
|
@ -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
|
||||
|
|
@ -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 (tdevC<tmin) begin
|
||||
`WARNING("WARNING: ambient temperature is lower than allowed minimum");
|
||||
end
|
||||
if (tdevC>tmax) 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_um<lmin) begin
|
||||
`WARNING("WARNING: drawn length is smaller than allowed minimum");
|
||||
end
|
||||
if (l_um>lmax) begin
|
||||
`WARNING("WARNING: drawn length is greater than allowed maximum");
|
||||
end
|
||||
if (w_um<wmin) begin
|
||||
`WARNING("WARNING: drawn width is smaller than allowed minimum");
|
||||
end
|
||||
if (w_um>wmax) 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
|
||||
Loading…
Reference in New Issue