Numbers
Real numbers in the netlist file can be represented as decimal, exponential, or scaled numbers, or as decibels (exponentially scaled numbers).
A decimal number consists of the numerals 0 through 9, with or without a decimal point, and with or without a leading unary plus or minus: 123, 12.30, +5.0, -20.
An exponential number consists of a decimal number mantissa, the letter e (for “exponent”) and a decimal number exponent. The decimal equivalent is the mantissa multiplied by 10 to the power of the exponent.
|
Exponential Number |
Interpretation |
Decimal Equivalent |
|
1e5 or 1e+5 |
1 ´ 105 |
100000 |
|
1.0e-5 |
1.0 ´ 10-5 (1/105) |
.00001 |
|
-5e4 |
-5 ´ 104 |
-50000 |
|
-2.05e-4 |
-2.05 ´ 10-4 (-2.05/104) |
-.000205 |
A scaled number consists of a decimal number and an alphabetic token representing a scale factor: 20K, 1.5P, -7.25MEG. The following table lists the scale factor tokens and their exponential equivalents.
|
Factor |
Interpretation |
Exponential Multiplier |
|
ATTO |
atto |
1e-18 |
|
F |
femto |
1e-15 |
|
P |
pico |
1e-12 |
|
N |
nano |
1e-9 |
|
U |
micro |
1e-6 |
|
M |
milli |
1e-3 |
|
K |
kilo |
1e+3 |
|
MEG |
mega |
1e+6 |
|
X |
mega |
1e+6 |
|
G |
giga |
1e+9 |
|
T |
tera |
1e+12 |
Note: By default, the single-letter token “A” as a numeric suffix represents amperes
(AMP). If the netlist contains the statement
.OPTIONS UNIT_ATTO, the single-letter
suffix “A” represents
1e-18 (ATTO). In either case, the token
AMP (with or without any trailing characters)
is interpreted as amperes, and the token ATTO
(with or without any trailing characters) is interpreted as 1e-18.
A decibel number uses one of the units DB or DBM. A number (nn in the following examples) with one of these units scales exponentially:
nnDB is scaled as 10 ^ (nn * 0.1).
nnDBM is scaled as 10 ^ (nn * 0.1 - 3).
In both of these examples, the ^ sign denotes exponentiation and the * sign denotes multiplication.
Note: Any extra letters after the DB or DBM prevent a match for DB or DBM (unlike other units, where additional letters are ignored). Here are some examples:
5K = 5000
5KOHM = 5000
5KAPPLES = 5000
5DB = 3.1622777
5DBW = 5
5DBM = 0.0031622777
5DBMW = 5