Академический Документы
Профессиональный Документы
Культура Документы
Welcome to ADiT !!
CONTENTS
WELCOME TO ADIT !! ........................................................................................................1
COPYRIGHT © 1998-2003 E VERCAD SOFTWARE CORP................................................................1
CONTENTS............................................................................................................................2
ABOUT ADIT..........................................................................................................................4
CHAPTER 1................................................................................................................................8
COMMAND-LINE OF ADIT..........................................................................................................8
CHAPTER 2..............................................................................................................................13
DOT CARD.............................................................................................................................. 13
OVERVIEW .............................................................................................................................. 14
.AC (SMALL-SIGNAL ANALYSIS)........................................................................................... 14
.DATA (DATA DRIVEN ANALYSIS).......................................................................................... 15
.DC (DC ANALYSIS) ............................................................................................................ 17
.END...................................................................................................................................... 18
.ENDS.................................................................................................................................... 19
.FOUR (FOURIER ANALYSIS OF TRANSIENT ANALYSIS OUTPUT )............................................. 20
.GLOBAL .............................................................................................................................. 21
.IC (SET INITIAL CONDITION)............................................................................................... 21
.INCLUDE............................................................................................................................. 23
.LIB ....................................................................................................................................... 23
.NOISE (NOISE ANALYSIS)................................................................................................... 23
.NODESET (SPECIFY INITIAL NODE VOLTAGE GUESSES) ....................................................... 24
.OP (OPERATING POINT ANALYSIS) ....................................................................................... 26
.OPTION................................................................................................................................ 29
.OPTION CARDS FOR TURBO MODE:....................................................................................... 33
to enhance accuracy of turbo mode :................................................................................... 33
.OPTION CARDS FOR TURBO MODE:....................................................................................... 34
to Simulate non-ideal power cases:..................................................................................... 34
.OPTION CARDS FOR TURBO MODE:....................................................................................... 35
to affect circuit partition results:......................................................................................... 35
.OPTION CARDS FOR TURBO MODE:....................................................................................... 36
to set subcircuit latency criterion:....................................................................................... 36
.OPTION CARDS FOR TURBO MODE:....................................................................................... 37
to set output graphic resolution: ......................................................................................... 37
.OPTION CARDS FOR TURBO MODE:....................................................................................... 38
to integrate HDL engine:.................................................................................................... 38
.PARAM................................................................................................................................. 39
.PROBE ................................................................................................................................. 39
(.SAVE).................................................................................................................................. 39
.PROBE DIGIT.........................................................................................................................2
.PZ (P OLE-ZERO ANALYSIS FOR SMALL-SIGNAL AC TRANSFER FUNCTION)............................. 40
.SAVE ALL (SAVE ALL THE NODE INFORMATION) ................................................................. 41
.SUBCKT............................................................................................................................... 42
.TEMP (OPERATING TEMPERATURE OF CIRCUIT ).................................................................... 43
.TF (TRANSFER FUNCTION ANALYSIS) .................................................................................. 43
.TRAN (TRANSIENT ANALYSIS) ............................................................................................ 45
CHAPTER 3..............................................................................................................................48
About ADiT
About ADiT
General Features ADiT (Analog and Digital Turbo Simulator) is the product of
EverCAD Software Corporation. It provides for designers a unique
environment in which a mixed-mode and/or multi- level design can be
simulated. ADiT is characterized by the following distinguished
features :
SPICE Style ADiT originates from the SPICE3 code of U. C. Berkeley. Therefore,
SPICE users will find no difficulty as verifying their original designs
by ADiT.
Mixed-mode Essence The project of ADiT was actually stimulated by the challenge of
blunting the barrier between analog and digital designs. EverCAD
has made the solutions as transparent as possible to keep designers
from being bothered by the trivial interfacing issues.
Multi-level ADiT could be the pioneering tool which successfully steps across
Capability the rigid boundary between electrical- and logic- level simulation. It is
capable of embracing SPICE and Verilog-HDL netlist and libraries in
a single run. Furthermore, the conversation between electrical signal
and digital patterns has been handled properly so that the output
waveforms of logic simulation are no longer discretized.
θ SPICE mode
θ Turbo mode
Turbo subcircuit
Turbo Subcircuit SPICE subcircuit, and
HDL subcircuit.
Netlist, Library
SPICE mode
FALSE
Turbo Mode ?
Circuit Partition
FALSE FALSE
Turbo SCK ? SPICE CKT ?
TRUE TRUE
Output
Waveform Analyzer
Chapter 1
Command-Line of ADiT
ADiT Command
*Xyyy … . SUB1
This option is very useful when the input deck
is generated by layout tool and its file size is
very big. With this option , ADiT can save
memory and CPU time.
ex 1: +define+HAS_SDF
This command defines the HAS_SDF flag. so the
following netlist works:
`ifdef HAS_SDF
...
`endif
ex 2: +define+gate="not"
This command defines the macro:gate as "not". So
the following netlist works:
`gate g1(out, in)
[+delay_mode_path]
[+delay_mode_distributed]
[+delay_mode_unit]
[+delay_mode_zero] These commands set the delay mode for HDL.
The specified delay mode overrides the delay
mode compiler directives in the netlist.
[+incdir+xxx]
[+mindelays]
[+typdelays]
[+maxdelays] These commands set the delay type for
simulation.
MOS Table Model A well-established table- model builder for MOSFET I-V
characteristics has been integrated with ADiT. According to
the command option
.OPTION
mos_tech=”XX” -v tool
$HOME/.EverCADTechFile
Examples:
Turbo mode is in default. Its graphic output naming
adit net.sp convention is XXX.TB0, where XXX is the input file
name without the extention. Its speed is 10 ~ 100 times
faster than that of SPICE.
adit net.sp –h hdl.v With the command option –h XXX, ADiT will turn on
the multi- level mode.
adit –m net.sp
With the comman option, -m , ADiT will turn on MOT
(Macro-Oriented-Tech.) solver.
Chapter 2
Dot Card
Overview
This Chapter describes the ADiT dot cards.
Examples:
.AC DEC 10 1 10k
.AC DEC 10 1k 100Meg
.AC LIN 100 1 100Hz
DEC stands for decade variation, and ND is the number of points per decade. OCT
stands for octave variation, and NO is the number of point per octave. LIN stands
for linear variation, and NP is the number of points. FSTART is the starting
frequency, and FSTOP is the final frequency. If this line is included in the input
file, ADiT –spice mode performs an AC analysis of the circuit over the specified
frequency range. Note that in order for this analysis to be meaningful, at least one
independent source must have been specified with an ac value. After analysis,
ADiT dumps the .AC analysis results into xxx.AC0 files in which both the db
value and phase for variable are recorded.
Circuit Example:
**** RCA3040 Amp. For DC. TRAN. And AC. Analysis ****
.option post=2
Q1 2 30 5 QN1
Q2 2 31 6 QN1
Q3 10 5 7 QN1
Q4 11 6 7 QN1
Q5 14 12 10 QN1
Q6 15 12 11 QN1
Q7 12 12 13 QN1
Q8 13 13 0 QN1
Q9 7 8 9 QN1
Q10 2 15 16 QN1
Q11 2 14 17 QN1
.END
The .DATA card collects the values for parameters user want to modify and then
performs the .DC, .AC, or .TRAN analysis. .DATA cards are referred to by the
‘dataname’ and should be terminated by .ENDDATA card. Pname1, Pname2, …
are the parameter name user want to sweep. Pval1(1), Pval2(1), … .are the first set
of values for Pname1, Pname2, … ., respectively. Pval1(2), Pval2(2) … are the
second set of values for Pname1, Pname2, … , respectively, and so on. Note that,
the .DATA card associates the parameters with the value array, and it replace the
setting by .PARAM card.
Examples:
For DC analysis
.DC Vds 0 5 0.1 SWEEP DATA=vgs_data
For AC analysis
.AC DEC 10 100 100MEG SWEEP DATA=temp_data
Circuit Example:
**** Inverter with data driven analysis ****
.option post=2
.param v_supply=5.0
.global vdd
**** MOSFET model
.model nch nmos level=49
.model pch pmos level=49
.DATA condition
+ Wmask Lmask v_supply temp
+ 10u 0.5u 3.3 25
+ 10u 1.0u 5.0 25
+ 5u 0.5u 3.3 75
+ 10u 0.35u 1.8 75
.ENDDATA
.save all
.end
In this example, ADiT ignores the .PARAM setting for v_supply and does
transient analysis with each set of parameters, i.e.
Run Wmask Lmask v_supply temp output
1 10u 0.5u 3.3 25 xxx.TR0
2 10u 1.0u 5.0 75 xxx.TR1
3 5.0u 0.5u 3.3 75 xxx.TR2
4 10u 0.35u 1.8 75 xxx.TR3
where var1 could be the name of independent source (voltage, current), TEMP
(temperature) or any element or device model parameters. Start1, stop1, and step1
are the starting, final and increment value of var1, respectively. Start2, stop2, and
step2 are the starting, final and increment value of var2, respectively, … and so on.
Dataname is the name for data driven file name (see the description of .DATA
card).
Examples:
.DC TEMP -40 80 10
.DC Vds 0 5 0.1 Vgs 1 5 1
.DC Vds 0 5 0.1 SWEEP Vgs POI 5 1 2 3 4 5
.DC Vds 0 5 0.1 SWEEP Vgs LIN 5 1 5
.DC Vds LIN 51 0 5 SWEEP Vgs POI 5 1 2 3 4 5
.DC Data=Vds_point SWEEP Vgs 1 5 1
.DC Data=bias_point
The first example sweep simulation temperature from –40℃ to 80℃ with
increment 10℃. The 2 ~ 7th examples are the same command with different syntax.
These commands usually used for MOSFET I-V characterization, which sweep
drain voltage (Vds) from 0V to 5V with increment 0.1V using Vgs as parameters
with value 1, 2, 3, 4, and 5V. For data driven .DC analysis, user can list the bias
condition via .DATA card.
Circuit Examples:
**** DC analysis for MOSFET I-V ****
.option post=2
.model mn nmos level=3
.param vd_val=5.0
.param vg_val=5.0
vd d 0 vd_val
vg g 0 vg_val
vb b 0 0
.DC vg 0 5 0.01
.DC vd 0 5 0.1 vg 1 5 1
.DC vd_value POI 3 3 4 5 SWEEP data=size
.DC temp -25 75 25
.DC data=all_condition
.data size
+index wn ln
+ 1 10u 10u
+ 2 10u .5u
+ 3 10u .4u
+ 4 .5u .5u
.enddata
.data all_condition
+ wn ln temp vd_value vg_value
+ 10u 0.4u 25 0.05 3.3
+ 0.5u 0.5u -25 5.0 5.0
+ 20u 20u 125 5.0 5.0
.enddata
.end
.END
SYNTAX:
.END
Examples:
See all the circuit examples given in this chapter.
The .END card is used to signify the termination of a program run. Every input
netlist must have at least one .END card, which must be the last line in the netlist.
.ENDS
SYNTAX:
.ENDS <SUBNAME>
Examples:
**** Single subcircuit ****
.SUBCKT INV OUT INPUT VDD
MP1 OUT INPUT VDD VDD PCH W=10u L=1u
MN1 OUT INPUT GND GND NCH W=10u L=0.6u
.ENDS INV
.ENDS SUB10
The .ENDS. card must be the last one for any subcircuit definition. The subcircuit
name, if included, indicates which subcircuit is being terminated; if omitted, all
subcircuits being defined are terminated. The name may be necessary if nested
subcircuit definitions are being made.
Examples:
.FOUR 100K v(5)
The .FOUR (or Fourier) line controls whether ADiT –spice mode performs a
Fourier analysis as a part of the transient analysis. FREQ is the fundamental
frequency, and OV1, … , are the output variables for which the analysis is desired.
The Fourier analysis is performed over the interval <TSTOP-period, TSTOP>,
where TSTOP is the final time specified for the transient analysis, and period is
one period of the fundamental frequency. The dc component and the first nine
harmonics are determined. For maximum accuracy. TMAX (refer to the .TRAN
card description) should be set to period/100.0 ( or less for every high-Q circuit).
Circuit Example:
VDD d 0 5
VIN INP 0 PULSE( 0 5 0.5u 1u 5u 10u)
X1 INP OUT D INV
.GLOBAL
SYNTAX:
.GLOBAL NODE1 NODE2 NODE3 … .
The .GLOBAL card is used when subcircuits are includes in the netlist. This card
assign a common node name to subcircuit nodes. Ordinarily, in a subcircuit the
node name is given as the subcircuit call number concatenated to the node name.
When a .GLOBAL card is used, the node name is not concatenated with the
subcircuit call number and is only assigned the global name. Note that the
connection of power supply for all subcircuits is often made through
the .GLOBAL card, e.g., .GLOBAL VCC connects all subcircuits with the internal
node name VCC.
Example:
.IC V(BIAS)=3.3 V(12)=-5
.IC loadfile=”save.tb0@30n”
NODENAME2 to val2, and so on. It also can load the file of simulation results
saved in the previous run as the initial solution (see .TRAN card for more
reference). It has two different interpretatio ns, depending on whether the UIC
parameter is specified on the .TRAN card. Also, one should not confuse this line
with the .NODEST line. The .NODESET line is only to help dc convergence, and
does not affect final bias solution (refer to the examples given in the description
of .NOSDESET card).
(1) When the UIC parameter is specified on the .TRAN card, the node voltage
specified on the .IC control line are used as device-based .IC card, i.e. to
compute the capacitor, diode, BJT, JFET, and MOSFET initial conditions (note:
for inductor, branch current is used as initial condition). This is equivalent to
specifying the IC=… parameter on each device line, but is much more
convenient. The IC=… parameters can still be specified and takes precedence
over the .IC values. Since no dc bias (initial transient) solution is computed
before the transient analysis, one should take care to specify all dc source
voltages on the .IC card if they are to be used to compute device initial
conditions.
(2) When the UIC parameter is not specified on the .TRAN card, the dc bias
(initial transient) solution is computed before the transient analysis. In this case,
the node voltage specified on the .IC card is forced to the desired initial values
during the bias solution. During transient analysis, the constraint on these node
voltage is removed. This is the preferred method since it allows ADiT to
compute a consistent dc solution.
Circuit Example1:
**** Parallel RLC Circuit with UIC/IC command ***
.option accurate post=2
L 1 gnd 1MH IC=1M
R 1 gnd 10K
C 1 gnd 1N
IS gnd 1 PWL(0 0 1N 1M 1 1M)
Circuit Example2:
**** Parallel RLC Circuit with UIC/IC command ***
.option accurate post=2
L 1 gnd 1MH
R 1 gnd 10K
C 1 gnd 1N
IS gnd 1 PWL(0 0 1N 1M 1 1M)
Note that omission of the keyword UIC from the .TRAN card results in damped
oscillations, because device-based IC has no effect, as shown in the following
figure.
.INCLUDE
SYNTAX:
.INCLUDE <path name> filename
Example:
.INCLUDE /mydir/infile_name
The .INCLUDE card causes the named (working directory in defaults) file to be
included in the input netlist during simulation is run. Freque ntly, portions of
circuit descriptions or device models could be shared by several input netlists. In
any input netlist, the .INCLUDE card may be used to copy some other file as if
that second file appeared in place of the “.include” line in the original netlist.
.LIB
SYNTAX:
.LIB <PATH NAME> FILE NAME ENTRYNAME
Example:
.LIB /mydir/myfile TT
Call the library, in which PATH NAME indicate the path of this file. The default
path is the working directory. FILENAME is the file name for this library and
ENTRYNAME is used for the section of the library file to be included.
Example:
.NOISE V(5) VIN DEC 10 1KHZ 100MHZ
.NOISE V(5,3) V1 OCT 8 1.0 1.0e6 1
The Noise line does a noise analysis of the circuit. OUTPUT is the node at which
the total output noise is desired; if REF is specified, then the noise voltage
V(OUTPUT) – V(REF) is calculated. By default, REF is assumed to be ground.
SRC is the name of an independent source to which input noise is referred. PTS,
FSTART and FSTOP are .AC type parameters that specify the frequency range
over which plots are desired. PTS_PER_SUMMARY is an optional integer; if
specified, the noise contributions of each noise generator is produced every
PTS_PER_SUMMARY frequency points.
The .NOISE control line produces two plots- one for the Noise Spectral Density
curves (variable name with prefix “O” in the output file xxx.NO0 ) and one for the
total Integrated over the specified frequency range (variable name with prefix “I”
in the output file xxx.NO0). All noise voltage/currents are in squared units (V2/Hz
and A2 /Hz for spectral density, V2 and A 2 for integrated noise).
Circuit Example:
IIN 1 0 1m AC 1
R1 1 0 1K
.END
Example:
.NODESET V(17)=3.888 V(VPP_IN)=4.5
.NODESET loadfile=”save.tr0@47u”
nodes held to the given voltages. The initialization constraint is then removed and
the iteration continues to the final solution. Therefore, the final solution may differ
from the values specified by .NODESET. The .NODESET line may be necessary
for convergence on bistable or astable circuits.
Another approach to node voltage initialization is the .IC card. The major
difference between .NODESET and .IC card is that node voltages are forces to the
values specified by the user in the .IC card and are not corrected after an initial
pass (refer to the description of .IC card). Following is a simple example
demonstrates the usage of .NODESET. The difference between .IC
and .NODESET card are also shown via the .OP analysis. From the operating
point information, user can see that .IC card forced the node voltage V(1) and V(2)
the same as its setting , however, .NODESET card not.
Circuit Example1:
**** Flip-Flop with NODESET/IC ****
.option post=2
vdd 3 0 5V
ml1 2 2 3 3 pch w=10u l=1u
ml2 1 1 3 3 pch w=10u l=1u
mi1 2 1 0 0 nch w=5u l=0.8u
mi2 1 2 0 0 nch w=5u l=0.8u
.model nch nmos level=49
.model pch pmos level=49
**** set initial guess of V(1) , V(2) dc solution with .NODESET ****
.nodeset V(1)=0.25 v(2)=5
.tran 20ns 2us
.save all
.op
.end
Simulation result is :
:
Operating point information:
NodeVoltage
------ ---------
V(1) 8.442843e-01
V(2) 4.152212e+00
V(3) 5.000000e+00
:
:
Circuit Example2:
**** Flip-Flop with NODESET/IC ****
.option post=2
vdd 3 0 5V
ml1 2 2 3 3 pch w=10u l=1u
Simulation result is :
:
Operating point information:
NodeVoltage
------ ---------
V(1) 2.500000e-01
V(2) 5.000000e+00
V(3) 5.000000e+00
:
:
This inclusion of this line in an input file directs ADiT to determine the operating
point of the circuit with inductors shorted and capacitors opened. Note: a dc
analysis is automatically performed prior to a transient analysis to determine the
transient initial conditions, and prior to an AC small-signal, Noise, and Pole-Zero
analysis to determine the linearized, small- signal models for nonlinear devices.
When ADiT finishes all analysis, “.OP” card enable ADiT to dump operating point
biases and element templates into xxx.OP0 file. Note that, each template can
be probed by the PROBE/SAVE card, i.e.
.PROBE @hierachical_name[template]
Circuit Example:
vdd 9 0 dc 5
vs 7 0 pulse(2 0 520n 20n 20n 500n 2000n)
vw 1 0 pulse(0 2 20n 20n 500n 200n 2000n)
vwb 2 0 pulse(2 0 20n 20n 20n 2000n 2000n)
m1 3 1 0 0 mod w=250u l=5u
m2 4 2 0 0 mod w=250u l=5u
m3 9 9 3 0 mod w=5u l=5u
m4 9 9 4 0 mod w=5u l=5u
m5 5 7 3 0 mod w=50u l=5u
m6 6 7 4 0 mod w=50u l=5u
m7 5 6 0 0 mod w=250u l=5u
m8 6 5 0 0 mod w=250u l=5u
m9 9 9 5 0 mod w=5u l=5u
m10 9 9 6 0 mod w=5u l=5u
m11 8 4 0 0 mod w=250u l=5u
m12 9 9 8 0 mod w=5u l=5u
.model mod nmos level=49
.tran 20ns 2us
.save all
.op
.end
In addition to the xxx.OP0 file, user can reference the operating point information
dumped at screen as follows (e.g. operating point information of the above case):
Source Current
-------- ---------
vdd#branch -5.66418e-04
vs#branch 0.000000e+00
vw#branch 0.000000e+00
vwb#branch 0.000000e+00
Version 3.1
Capmod 1
Nqsmod 0
Mobmod 1
:
:
:
.OPTION
SYNTAX:
.OPTION opt1 opt2 opt=val …
Example:
.option reltol=0.005 relq=1.0e-4
.PARAM
SYNTAX:
.PARAM par1=val1 <par2=val2 par3=val3 … .>
.PARAM par1=’algebric expression’
.PARAM f(x,y)=’expression in terms of x and y’
.PARAM card set the value for parameters or user defined functions. It could be
simply a real value or an algebraic expression. .Param card is usually used in
conjunction with the .DATA, .ALTER cards. It will override the other assignment
of parameters in subcircuit call, device model or element parameter value.
Example1:
:
:
.param a=1.4 b=5.5u
.param wn=’a*0.5u’ ln=’5.5u-2.3*1e-6’
m1 d g s b mn w=wn l=ln
:
:
Example2:
.param func(x,y)=’max(0,sgn(y))*(5-x)-min(0,sgn(y))*x’
.PROBE
(.SAVE)
SYNTAX:
.PROBE <digit <(VOL <,VOH>)>> <level=#> NODE_ITEMS
+ <except v(...)>
OPTIONS:
Digit : To perform the digital probing. This option will take no effect for current
probing. For example, “.probe digit v(o1)”.
VOL : Low threshold voltage.
VOH : High threshold voltage.
Level : To indicate the depth of hierachical probing. If level is smaller than 1, it
means no depth limitation.
Except: All nodes that fo llow "except" will be considered as exception nodes.
Exception nodes can be specified as the following format. "v(Xyy.Xzz.*)",
"v(Xyy.Xzz.)", "Xyy.Xzz.", "Xyy.Xzz.*"
NODE_ITEMS:
V(Node) : Node Voltage.
Examples:
.PZ 1 0 3 0 CUR POL
.PZ 2 3 5 0 VOL ZER
.PZ 4 1 4 1 CUR PZ
CUR stands for a transfer function of the type (output voltage)/(input current)
while VOL stands for a transfer function of the type (output voltage)/(input
voltage). POL stands for pole analysis only, ZER for zero analysis only and PZ for
both. This feature is provided mainly because if there is a nonconvergence in
finding poles or zero, then, at least the other can be found. Finally, NODE1 and
NODE2 are the two input nodes and NODE3 and NODE4 are the two output
nodes. Thus, there is complete freedom regarding the output and input ports and
the type of transfer function. To print the results, user should use the command
‘print all’ and ADiT –spice mode will also dump the graphic output into xxx.PZ0
<xxx.PZ1, … >.
Circuit Examples:
**** Test Circuit for Pole-Zero Analysis ****
.OPTION POST=2
R1 1 0 1K
R2 2 0 1K
C1 1 2 1.0E-12
The .SAVE ALL card saves all the node information for graphic outputs. For
ADiT –spice mode, both the node voltage and branch current for all nodes are
saved. For ADiT –turbo mode, only the node voltage for all nodes are saved.
.SUBCKT
SYNTAX:
.SUBCKT subname N1 <N2 N3 … > <P1=VAL1 P2=VAL2 … >
Example:
.SUBCKT OPAMP 1 2 3 4
Circuit Example:
**** Ring Oscillator ****
.option post=2
.option accurate
.global vdd
**** MOSFET model
.lib /mydir/mos/model_035 TT
**** include subckt description
.include inv_subckt
**** Main circuit for 21-stages ring OSC.
Vdd vdd 0 3.3
X1 o1 o5 vdd inv5
X2 o2 o1 vdd inv5
X3 o3 o2 vdd inv5
X4 o4 o3 vdd inv5
X5 o5 o4 vdd inv
.ic v(o1)=3.3
.save all
.tran 0.1n 200n
.end
Examples:
.TEMP 85
The .TEMP card sets the operating temperature of circuit. This statement is the
same as “.option temp=val”.
Examples:
.TF V(5,3) VIN
.TF I(VLOAD) VIN
The TF line defines the small-signal output and input for the dc small-signal
analysis. OUTVAR is the small-signal output variable and INSRC is the
small-signal input source. If this line is included, ADiT –spice mode compute the
dc small-signal value of transfer function (output/input), input resistance, and
output resistance. For the first example, ADiT –spice mode would compute the
ratio of V(5,3) to VIN, the small-signal input resistance at VIN, and the
small-signal output resistance measured across nodes 5 and 3. After analysis.
ADiT dump the results into xxx.TF0 files.
Circuit Examples:
**** A Differential Pair for Transfer Function Analysis ****
.OPTION POST=2
.PARAM VBIAS=0
.END
SYNTAX:
Single/multiple time step I
.TRAN Tstep1 Tstop1 <Tstep2 Tstop2 … > <Tstart=val> <Tmax=val> <UIC >
During the simulation, user can specify which time point user want to save
the simulation results through ‘savetime= savefile=’ command. When user
re-simulate this circuit, he can load the data saved as the initial solution at time=0
( through ‘initfile= ‘ command). He also can load the data saved (through
‘loadfile= ‘ command) and continue the transient analysis from that time point.
The naming convention for the savefile is savename.tr0@tn for SPICE mode and
savename.tb0@tn for TURBO mode.
Examples:
.TRAN 0.1n 100n tmax=0.5n
.TRAN 1n 20n 0.1n 100n UIC
.TRAN 0.1n 20u start=10u
.TRAN 0.1n 100n sweep temp -40 80 20
.TRAN 0.1n 100n sweep vcc LIN 3 3 5
.TRAN 0.1n 100n sweep vcc POI 3 3 4 5
.TRAN 0.1n 100n sweep vcc 3 5 1
.TRAN 0.1n 100n sweep data=v_data
.TRAN 0.1n 100n savefile=save savetime=(50n,90n)
.TRAN 0.1n 200n LoadFile= save.tb0@90n
.TRAN 0.1n 200n InitFile= save.tb0@50n
In the first example, the transient analysis is made with 0.1nsec time step till
100nsec and the maximum time step is 0.5nsec. In the second examples, the
transient analysis is first made with 1nsec time step till 20nsec and then shorten
the time step to 0.1nsec till the final simulation time 100nsec. In the third
examples, the transient analysis is made with time step 0.1nsec till the final time
20 sec, however, only part of the simulation results (time>10 sec) are dumped
to the graphic output file. In the 4-th example, temperature is swept from –40 o C
to 80 o C with increment 20 o C . In the 5~7-th examples, the transient analysis are
made with parameter vcc=3, 4, 5. The 8-th example is the data driven transient
analysis with data file named ‘v_data’. The 9-th example save the simulation
result at time=50ns and 90ns and the corresponding file names are save.tr0@50n
and save.tr0@90n for TURBO mode. The 10-th example loads save.tb0@90n as
the initial solution and continues transient analysis at time=90n, with
timestep=0.1n till 200n. The 11-th example loads save.tb0@50n as the initial
solution and do transient analysis from time=0.
Circuit Examples:
.save all
**** single time step
.tran 0.01n 2000n
**** multiple time step
*.tran 0.01n 30n 5n 2000n
.end
In this example, power supply of the inverter chain change abruptly in the first
30ns simulation time and then latent till the end of transient analysis time. User
can first simulate with 0.01ns and then lengthen the time step setting to 5ns in the
latent region. This multiple time step setting can get the same results as those of
single time step setting, however, the simulation speed can be accelerated
dramatically.
Chapter 3
Overview
This chapter describe the instance and models. Before that, there are some rules
user should keep in mind. These rules define which value ADiT takes if the
instance parameter are in conflict with model or global parameters.
Rule 1:
The instance length (L) and width (W) are scaled by global scaled card, i.e.
‘.OPTION SCALE=val’. However, the instance values (e.g. resistance,
capacitance) are scaled by the instance scale in the instance line. To make things
clear, hereafter, we use SCALE(instance) to represent instance scale, and
SCALE(option) to represent global dimension scale declaration.
Example:
.OPTION SCALE=1u
R1 n1 n2 R=5 SCALE=1k L=0.5 W=20
Rule 2:
If the model name of instance is the same as a parameter name, the model name is
taken.
Example:
.PARAM name=1.5
R1 n1 n2 name TC1=0.1
.MODEL name R RSH=1k
in this example, ‘name’ means the model name of R1., but not the parameter 1.5.
Rule 3:
Some parame ters can be given through instance line or .MODEL cards. If one
parameter is given in both instance line and .MODEL card but with different value,
the value given in the instance line is taken.
Example:
R1 n1 n2 Rmodel 47k TC1=0.08 TC2=0.04
.MODEL Rmodel R DW=0.3u TNOM=27 TC1=0.4 TC2=0.18
Resistors
SYNTAX:
Rxxx N1 N2 <mname> Rval <TC1<TC2>> <SCALE=val>
+ <M=val><C=val><W=val><L=val><AC=val><TEMP=val>
or
Rxxx N1 N2 <mname> R=val TC1=val TC2=val <SCALE=val>
+ <M=val><C=val><W=val><L=val><AC=val><TEMP=val>
or
Rxxx N1 N2 <mname> VALUE=val TC1=val TC2=val <SCALE=val>
+ <M=val><C=val><W=val><L=val><AC=val><TEMP=val>
or
Rxxx N1 N2 <mname> R=’algebric expression’ <SCALE=val><M=val>
+ <C=val><W=val><L=val><AC=val>
Example:
R123 node1 node2 1k
Rw 2 4 R=10 SCALE=1e3 M=3
Rtest 8 0 R=’2.345*1.4’ SCALE=1e6
Rk1 k1 k2 R_model L=10u W=200u
RCC N+ N- R=100k AC=1e10
Rtemp n1 n2 value=10k TC1=0.01 TC2=0.009 TEMP=100
(TC2R)
TC1C 1 / °C 0.0 First order Temp. coefficient for capacitance
TC2C 1 / °C 2 0.0 Second order Temp. coefficient for
capacitance
THICK m 0 Dielectric thickness
-model
CRATIO is the ratio used in the - model of wire RC as shown in the following
figure:
where
if Cox is not given in the model, but THICK is given,
DI ⋅ e 0
CAPeff = , (e 0 = 8.854 × 10 −12 F / m)
THICK
if Cox is not given and THICK=0, default capacitance is used, i.e.
CAPeff = CAP ⋅ SACALE( instance) ⋅ M
Temperature effects:
Note that, if temperature coefficient TC1 and TC2 are given as instance
parameters, they will overwrite the model parameters TC1(TC1R) and
TC2(TC2R). And the temperature-dependent resistance and capacitance for both
DC and AC analysis are :
Capacitor
SYNTAX:
Cxxx n+ n- <mname> Cval <TC1<TC2>> <SCALE=val> <L=val>
+<W=val><M=val><IC=val><TEMP=val>
Or
Cxxx n+ n- <mname> C=val TC1=val TC2=val <SCALE=val> <L=val>
+<W=val><M=val><IC=val><TEMP=val>
Or
Cxxx n+ n- <mname> VALUE=val TC1=val TC2=val <SCALE=val>
<L=val> +<W=val><M=val><IC=val><TEMP=val>
Or
Cxxx n+ n- <mname> C=’expression’ TC1=val TC2=val <SCALE=val>
<L=val> +<W=val><M=val><IC=val><TEMP=val>
IC=val Assign the initial voltage across capacitance in volts. If the input
netlist contains a .IC card, it will override the initial assignment
in the instance line.
Example:
C11 pnode nnode 1pF
Cpp n1 n2 VALUE=10p TC1=0.09 TC2=0.005
Ceq 7 88 c=’22p + 11*4e-12’
Cval 13 4 cmodel L=10u W=20u M=4
Ctt a1 a2 cmodel IC=3.3V
Capacirtance Model:
.MODEL mname C par1=val1 par2=val2 … . Where mname is the model
name, C is the keyword for capacitor model, par1, par2, … list the values of
parameters as shown in the following table.
Capacitance calculation:
otherwise
Weff = Wscale − 2 ⋅ DEL
Leff = Lscale − 2 ⋅ DEL
C eff = ( Leff ⋅ Weff ⋅ Cox + 2 ⋅ ( Leff + Weff ) ⋅ CAPSW ) ⋅ SCALE(instance ) ⋅ M
Temperature effects:
Note that, if temperature coefficient TC1 and TC2 are given as instance
parameters, they will overwrite the model parameters TC1 and TC2. And the
temperature-dependent capacitance is calculated as follows:
in which T-TNOM is the temperature difference between instance and circuit temperature
defined by ‘.temp’ card.
Inductor
Linear Inductor (L-element)
SYNTAX:
Lxxx n+ n- VALUE <SCALE=val><M=val><IC=val>
Example:
Lcouple 72 25 L=10uH M=3
Ls A1 A2 44 SCALE=1e-5
LIC N+ N- 77.8uH IC=0.53mA
SYNTAX:
Kxxx Lyyy Lzzz VALUE
VALUE The coupling coefficient which must be greater than o\0 and less
than 1.
VALUE also can be given as
K=val
Or
K=’expression’
Example:
K12 K1 K2 0.86
K56 K5 K6 K=0.99
Junction Diode
SYNTAX:
Dxxx N+ N- MNAME <OFF><TEMP=val><M=val><IC=VD>
+ <AREA=val><PJ=val><L=val><W=val>
PJ Periphery of junction.
Example:
Diode pnode nnode diode1 M=2
Dclamp in out dmodel area=3 IC=0.4
(1) Diode model LEVEL=1 is a ‘non-geometric’ and ‘scale- less’ junction diode
model; i.e. all the setting of L, W, SCALE(option), SCALE(instance), in both
diode instance and model are ignored.
(2) Parameters (AREA, PJ, L, W) are common in instance and model parameters.
If they are given in both instance and model line, instance parameters take
precedence over model parameters.
AREAeff = AREA ⋅ M
PJ eff = PJ ⋅ M
For LEVEL=3
Case 1: If AREA or PJ are given, L, W are not given
Diode Model:
.MODEL MNAME D <par1=val1 par2=val2 … .>
Where MNAME is the model name, D is the keyword to indicate diode model.
Par1, par2, … list the values of parameters as shown in the following table.
IC=VBE, VCE Initial condition specification. Which is intended for use with
the UIC option on the .TRAN card when a transient analysis is
desired starting from other than the quiescent operating point.
Example:
Q1 C B E Qmodel M=3 IC=0.6, 3.3
Qw 1 23 4 BJTm AREA=3
BJT Model:
.MODEL MNAME NPN <par1=val1 par2=val2 … .>
or
.MODEL MNAME PNP <par1=val1 par2=val2 … .>
Where MNAME is the model name, NPN and PNP are the keywords to indicate
NPN and PNP type transistor model, respectively. Par1, par2, … list the values of
parameters as shown in the following table.
(PT)
XTF 0.0 Coefficient for bias dependence of TF
MOSFET
SYNTAX:
Mxxx ND NG NS NB MNAME <L=>val <W=>val
+ <AS=val><AD=val><PS=val><PD=val><NRD=val><NRS=val>
+ <RDC=val><RSC=val><OFF><IC=VDS, VGS, VBS>
+ <DELVTO=val><TEMP=val><GEO=val><M=val>
ND, NG, NS, The drain, gate, source, and bulk(substrate) nodes, respectively
NB
AS, AD The area of the drain and source diffusions. The unit is m2 .
The default value is DEFAS, DEFAD defined by the .OPTION
card for AS and AD, respectively.
PS, PD The perimeters of the drain and source diffusions. The unit is m.
NRD, NRS The equivalent number of squares of the drain and source
diffusion for resistance calculation. The default value is
DEFNRD, DEFDRS defined by the .OPTION card for NRD and
NRS, respectively.
RDC, RSC Resistance due to drain and source contact , respectively. RDC
and RSC of MOSFET instance will overwrite the RDC, RSC of
MOSFET model parameter. Default=0ohm.
OFF Initial condition OFF for this instance in DC analysis.
Default=ON
IC=VDS, VGS, Initial condition specification. Which is intended for use with
VBS the UIC option on the .TRAN card when a transient analysis is
desired starting from other than the quiescent operating point.
Examples:
M1 d g s b MOD1 L=10u W=5u AD=100p AS=100p
+ PD=40u PS=40u
M2 2 4 0 0 nch 0.5u 10u M=3 TEMP=50
M7 8 9 vdd vdd pch W=4u L=0.8u IC=-3, -1, 0
MOSFET model:
.MODEL MNAME PMOS LEVEL=val <par1=val par2=val… ..>
or
.MODEL MNAME NMOS LEVEL=val <par1=val par2=val… ..>
The PMOS and NMOS are keywords indicate the type of MOSFET. The
MOSFET model supported by ADiT are :
Level=1
Level=2
Level=3
Level=6
Level=4, 13 (BSIM1)
Level=5, 39 (BSIM2)
Level=11, 49 (BSIM3)
The detail descriptions of MOSFET model parameters can be found in the original
Berkeley’s SPICE document. Here we only address some special features of
MOSFET modeling implemented in ADiT.
Non-Quasi-Static Effect
For the modeling of MOSFET valid under the quasi-static static assumption, the
transient time should be long enough for the formation of inversion layer. In this
situation, the finite charging time for inversion layer could be ignored. However,
as the operating frequency of circuit is getting higher and higher, quasi-static
assumption gives erroneous simulation result for signals whose rise or fall times
are comparable to or smaller than the channel transient time. Under the non-quasi
static situation, MOSFET will operate under deep depletion region (as shown in
the following figure) which makes the equivalent capacitance of MOSFET
decrease. For ADiT to turn-on non-quasi-static effect, please use NQSMOD=1 in
the MOSFET BSIM3 model card.
1
E=
2
( )
L
Circuit Example1:
A ring oscillator with MOSFET load is used to demonstrate the non-quasi-static
effect. The following figures are the schematic and simulation results of this ring
OSC. with MOSFET load. From the simulation results we can see that, though the
areas of three cases are the same, case B suffers from series non-quasi-static effect
due to the long channel length of MOSFET load (L=15 m). Therefore, the
equivalent capacitance of case B is much smaller than the other two cases, that is
why the frequency of case B is much higher than the other two cases.
Circuit Example2:
***** Cases to demonstrate NQS effect *****
.option post accurate
.temp 125
vp vref 0 1.2V
vin1 in1 0 pwl(0n 0 23n 0 24n 3.3)
vin2 in2 0 pulse(0 3.3 34n 1n 1n 114n 45n)
vclk clk 0 pulse(3.3 0 18n 0.3n 0.3n 7n 15n)
mn1 out1 in2 0 0 nch w=1u l=250u
mn2 d clk ou1 0 nch w=10u l=0.5u
mp3 vref in1 d vref pch w=10u l=0.5u
This is a small circuit with abrupt change of input voltage v(in1) v(in2) v(clk) and
a large size MOSFET (L=250u). The simulation results with and without NQS
effect are shown in the following figure. Without NQS effect (NQSMOD=0),
peaks of voltage even larger than 100Volts are shown. This abnormal peak is
created by quasi-static charge conservation model. One can find, the longer the
channel length is, the peak is more serious. When NQSMOD=1 and simulated at
SPICE mode, non-quasi-static model is used and the peak value is reduced. When
simulated at turbo mode, one need set the node as SPICE node ( see option card
for spice_node, spice_subckt, and group_node ).
The positive charge near the interface of the poly-silicon gate and the gate
oxide is distributed over a finite depletion region with the thickness Xp. In the
presence of this depletion region, the voltage drop across the gate oxide and the
substrate (vgs_eff) will be reduced. In ADiT BSIM3 model, we use NGATE
( doping concentration of poly-silicon gate) to simulate the poly-depletion effect.
NGATE ranges from 1E18/cm3 to 1E25/cm3 . If the value of NGATE > 1E23 /cm3 ,
ADiT will automatically transfer it from 1/m3 to 1/cm3 , i.e. NGATE ->
NGATE × 1E-6. Therefore, if user define NGATE=1E25, ADiT treats it as 1E19
1/cm3 but not 1E25. Note that, the lighter NGATE is, the thicker Xp is and the
poly-depletion effect is more serious.
Some commercial tools do not implement this effect in their BSIM3 model.
If user want to compare the results simulated by these tools with those simulated
by ADiT, please set the model parameter ‘NGATE=0’ which will force the
poly-depletion effect ‘OFF’ of ADiT.
Independent Source
SYNTAX:
Voltage source
Vxxx N+ N- <<DC=>Dcval><AC<=ACMAG<ACPHASE>>> function
Current source
Ixxx N+ N- <<DC=>Dcval><AC<=ACMAG<ACPHASE>>> function
+ <M=val>
ACMAG AC magnitude.
Example:
Vss Vss 0 gnd
Vdd Vdd DC 1 PULSE(0 5 1n 2n 2n 8n 20n)
Vmeter Iin Iout 0
IG inp out SIN(0 1e-3 10MEG)
Iac 3 6 AC 0.336 45.0 SFFM( 0 1 10k 5 1k)
Functions:
PULSE
SYNTAX:
PULSE (V1 V2 TD TR TF PW PER)
parameter Description
V1 Initial value before the pulse onset.
V2 Pulsed value.
TD Delay time. The default value is 0.
TR Rise time. The default value is TSTEP of .TRAN card.
TF Fall time. The default value is TSTEP of .TRAN card.
PW Pulse width. The default value is TSTOP of .TRAN card.
Note that, if PW =0, this pulse function will generate a
triangular wave.
PER Period. The default value is the TSTOP value of .TRAN card.
Example:
PULSE (0 5 10n 2n 2n 10n 30n)
Piece-Wise-Linear (PWL)
SYNTAX:
PWL (T1 V1 <T2 V2 T3 V3 T4 V4 … ..> <R><TD=delay> )
Or
PWL_file=’filename’
Each pair of (Ti, Vi) specifies that the value of the source is Vi at time=Ti. R
causes the function to repeat till the TSTOP. TD is the delay time. Sometimes, user
includes the experimental data (e.g. from CRT) as input signal. ADiT can declare
the PWL filename to include this input signal.
Example:
V1 n1 n2 PWL (0 0 3n 3.3 15n 3.3 25n 0 38n 3.3 59n
3.3
+ 80n 0 R TD=5n)
V2 d1 d2 PWL_file=’crt.dat’
Sinusoidal (SIN)
SYNTAX:
SIN(VO VA <FREQ <TD <THETA <PHASE>>>>)
parameter Description
TD to TSTOP φ
VO + VAe −( time−TD )⋅θ ⋅ sin( 2p ( FREQ ⋅ (time − TD) + )))
360
Example:
SIN(1 3.3 10MEG 50n 2e6 180)
Exponential (EXP)
SYNTAX:
EXP(V1 V2 TD1 TAU1 TD2 TAU2)
Parameter Description
V1 Initial value.
V2 Pulsed value.
TD1 Rise delay time. The default value is 0.0.
TAU1( 1) Rise time constant. The default value is TSTEP.
TD2 Fall delay time. The default is TD1+TSTEP.
TAU2( 2) Fall time constant. The default value is TSTEP.
Example:
EXP(-5 -1 5ns 30ns 50ns 40ns)
Single-Frequency FM (SFFM)
SYNTAX:
SFFM(VO VA FC MDI FS)
Parameter Description
VO Offset.
VA Amplitude.
FC Carrier frequency in Hz. The default value is 1/TSTOP.
MDI Modulation index. The default value is 0.0.
FS Single frequency in Hz. The default value is 1/TSTOP.
Example:
SFFM(1 3.3 3MEG 18 3MEG)
Dependent Source/Instance
There are five types of dependent source/instance supported by ADiT, they are :
B-element
Arbitrary source dependent source/instance (ASRC)
E-element
Voltage controlled voltage source (VCVS)
F-element
Current control current source (CCCS)
G-element
Voltage controlled current source or resistor or capacitor (VCCS, VCR, VCCAP).
H-element
Current controlled voltage source (CCVS)
The dependency between these elements and their control source can be expressed by
linear, piece-wise- linear (PWL), polynomial (POLY) function or arbitrary mathematic
functions.
Linear function
Use a gain factor to describe the relationship between control source and controlled
element, i.e. val(controlled)=gain×val(control). Also, the final value is clamped by MAX
and MIN assigned in the instance line. Note that, MAX and MIN should be given
simultaneously and MAX should be greater than MIN, otherwise, ADiT ignore the clamp
assignment.
ADiT use pairs of data points (at least two pairs of data points) to describe the
relationship between the control source and controlled element. PWL(1) is the keyword
to declare PWL function and the following pairs of data points x1 y1 x2 y2 x3 y3 …
xi yi list the values of control nodes (xi ) and the corresponding value of the controlled
node (yi ). Note that, the listing of x value must be in increasing order. To make the
derivative continuous, a parameter DELTA is introduced to smooth the corners and
improve the converge nce characteristics. The smaller the DELTA is, the sharper the
corners are. The value of DELTA is set to be 1/4 the smallest breakpoint distance in
defaults and is limited to be 1/2 of the smallest breakpoint distance .
The relationship between the control source and the controlled instance can be expressed
through a polynomial function in terms of one or more voltage or current source.
POLY(ND) is the keyword to declare a polynomial function of ND controlling variables.
The following parameters P0, P1, P2 … .Pn are the polynomial coefficients used to
construct the equation. Here we demonstrate 1-D, 2-D and 3-D polynomial equation for
reference:
Note, if only one polynomial parameter is given, it is set to be P1, and P0 is set to be 0.
the coefficient index i , power of variable x and y can be listed in the following table
i ai bi
0 0 0 0-th order
1 1 0 1-th order
2 0 1
3 2 0 2-th order
4 1 1
5 0 2
6 3 0 3-th order
7 2 1
8 1 2
9 0 3
10 4 0 4-th order
11 3 1
12 2 2
: : :
i.e.
f ( x, y ) = P 0 + ( P1⋅ x) + ( P 2 ⋅ y ) + ( P3 ⋅ x 2 ) + ( P 4 ⋅ xy) + ( P5 ⋅ y 2 ) + ( P6 ⋅ x 3 )
+ ( P7 ⋅ x 2 y) + ( P8 ⋅ xy 2 ) + ( P9 ⋅ y 3 ) + ( P10 ⋅ x 4 ) + ( P11 ⋅ x 3 y) + ...
For example, if a polynomial description is given as
Eele 5 3 POLY(2) 7a 7b 8a 8b 0 4 2.5 5 -7
It means:
V (5) = 0 + 4 ⋅ VA + 2.5 ⋅ VB + 5 ⋅VA 2 + 3 ⋅VA ⋅VB − 7 ⋅ VB 2
where VA = V ( 7a,7b ) VB = V (8a,8b)
i ai bi ci
0 0 0 0 0-th order
1 1 0 0 1-th order
2 0 1 0
3 0 0 1
4 2 0 0 2-th order
5 1 1 0
6 1 0 1
7 0 2 0
8 0 1 1 3-th order
9 0 0 2
10 3 0 0
11 2 1 0
12 2 0 1
13 1 2 0
14 1 1 1
15 1 0 2
16 0 3 0
17 0 2 1
18 0 1 2
19 0 0 3
20 4 0 0 4-th order
: : : :
i.e.
f ( x, y, z ) = P0 + ( P1 ⋅ x) + ( P2 ⋅ y ) + ( P3 ⋅ z ) + ( P 4 ⋅ x 2 )
+ ( P5 ⋅ xy) + ( P6 ⋅ xz) + ( P7 ⋅ y 2 ) + ( P8 ⋅ yz )
+ ( P9 ⋅ z 2 ) + ( P10 ⋅ x 3 ) + ( P11 ⋅ x2 y ) + ( P12 ⋅ x 2 z )
+ ( P13 ⋅ xy2 ) + ( P14 ⋅ xyz) + ( P15 ⋅ xz2 )
+ ( P16 ⋅ y3 ) + ( P17 ⋅ y 2 z ) + ( P18 ⋅ yz 2 )
+ ( P19 ⋅ z 3 ) + ( P20 ⋅ x 4 ) + ......
SYNTAX:
Bxxx N+ N- <I=’expression’><V=’expression’><R=’expression’>
+ <C=’expression’><FREQ=’expression’ AMPL=val OFFSET=val>
I Current source
(CUR)
V Voltage source
(VOL)
R Voltage controlled resistor
The expression given for I, V, R and C can be any combination of the following
mathematic functions in terms of V(node1 <,node2>) or I(Vname). Voltage
controlled oscillator (VCO) can be the combination of functions in terms of
V(node1 <,node2>) .User defined function through .PARAM cards can also be
used as the expression.
Example 4 (VCO):
Example 4 is the special feature supported by ADiT which generate a VCO via
B-element. The voltage dependent frequency and the corresponding oscillation
output is shown in the following figure :
SYNTAX:
linear
Exxx N+ N- <VCVS><lin> in+ in- <gain=>gainval
+ <MAX=val MIN=val>
PWL
Exxx N+ N- <VCVS> PWL(1) in+ in- <DELTA=val>
+ x1,y1 x2,y2 x3,y3 … .x100,y100
POLY
Exxx N+ N- <VCVS> POLY(ND)
+ in1+ in1- in2+ in2- inND+ inND-
+ P0 <P1 P2 P3… ..>
Delay
Exxx N+ N- <VCVS> DELAY in+ in- TD=val
in+, in- … Positive and negative nodes. One pair for each dimension
inND+, inND0-
gainval Value of voltage gain. The default value is 1
x1,x2,… x100 Voltage of controlling nodes. You can specify up to 100 points
TD=val Delay time for delayed instance. The default value is 0.0
Example:
E0 out0 Rvdd DELAY in0 Rvdd TD=20ns
E1 n+ 0 in+ in- gain=5.5 max=3.3 min=0.05
E77 np nn PWL(1) inp1 inp2 1 1.1 2 2.2 3 3.3 DELTA=0.5
Eele 5 3 POLY(2) 7a 7b 8a 8b 0 4 -2.3 3 -7
The first example is a voltage source with the value of voltage difference between
in0 and Rvdd and delay a time constant 20ns. The second example is a VCVS
instance 5.5 times the voltage difference between node in+ and in- and clamped in
the region of 0.05 to 3.3V. The third example is an example of VCVS with value
equal to 1.1 when the voltage difference of inp1 and inp2 is 1, equal to 2.2 when
the voltage difference is 2 … etc. Furthermore, it use DELTA=0.5 to round-off the
corner for derivative continuity sake. The 4-th example is a VCVS instance
depends on both the voltage of V(7a,7b) and V(8a,8b) with polynomial coefficient
0, 4, -2.3 … etc.
SYNTAX:
linear
Fxxx N+ N- <CCCS> vname <lin> <gain=>gainval
+ <MAX=val MIN=val>
PWL
Fxxx N+ N- <CCCS> PWL(1) vname <DELTA=val><M=val>
+ x1,y1 x2,y2 x3,y3 … .x100,y100
POLY
Fxxx N+ N- <CCCS> POLY(ND) vname1 <vname2 … vnameND>
+ <M=val> P0 <P1 P2 P3… ..>
x1,x2,… x100 Current through controlling voltage source vname. You can
specify up to 100 points
y1,y2,… y100 Corresponding current value of controlled instance.
Example:
Fp in out CCCS Vzero gain=0.4 max=1m min=1u M=4
Fil 0 out PWL(1) VSRC 1m 10m -2m 0.1m
F0 out 0 CCCS POLY(2) VA VB 0 0.1 0.2 0 -0.4
The first example is a CCCS connected between in and out. The current that
controls the value of Fp flows through the voltage source Vzero. The value is
0.4×I(Vzero)×4 and is clamped by (1m, 1u). The second example is a CCCS
connected between 0 and out. When the current through VSRC is 1mA, the
current value is 10mA. When the current through VSRC is –2mA, the current
value is 0.1mA. The third example is a CCCS depends on the currents flow
voltage source VA and VB with polynomial coefficient 0, 0.1, 0.2 … etc..
SYNTAX:
linear
Gxxx N+ N- <VCCS> in+ in- transconductance M=val
+ <MAX=val MIN=val>
or
Gxxx N+ N- VCR in+ in- transfactor M=val
+ <MAX=val MIN=val>
PWL
Gxxx N+ N- <VCCS> PWL(1) in+ in- <DELTA=val><M=val>
+ x1,y1 x2,y2 x3,y3 … .x100,y100
or
Gxxx N+ N- VCR PWL(1) in+ in- <DELTA=val><M=val>
+ x1,y1 x2,y2 x3,y3 … .x100,y100
or
Gxxx N+ N- VCCAP PWL(1) in+ in- <DELTA=val><M=val>
+ x1,y1 x2,y2 x3,y3 … .x100,y100
POLY
Gxxx N+ N- <VCCS> POLY(ND) in+ in- <… inND+ inND->
+ <M=val> P0 <P1 P2 P3… ..>
or
Gxxx N+ N- VCR POLY(ND) in+ in- <… inND+ inND->
+ <M=val> P0 <P1 P2 P3… ..>
Delay
Gxxx N+ N- <VCCS> DELAY in+ in- TD=val
VCR Keyword for voltage controlled resistor. Note, VCR can also
be defined using B-element.
x1,x2,… x100 Value of controlling voltage between node in+ and in-. You
can specify up to 100 points.
TD Delay time
Examples:
G2 out 0 VCCS pnode nnode 1e-6 M=2
Gswitch 1 2 VCR PWL(1) Vswitch 0 0, 10MEG 1, 1e-6
Gcap 22 19 VCCAP PWL(1) V+ V-
+ 1 1e-12
+ 2 2e-12
+ 3 3e-12
The first example is a current source connected between out and 0 depends on the
voltage between pnode and nnode and the transconductance is 1e-6 with multiple
equal 2. The second example is a way to describe the operation of switch. That is,
when the controlled voltage is 0, it is off (with high resistance 1e6) and when the
voltage is 1Volt, it is on (with low resistance 1e-6). The third example is a voltage
dependent capacitor with capacitance value 1pF when the controlled voltage is
1Volt and 2pF when the controlled voltage is 2Volt … etc..
SYNTAX:
linear
Hxxx N+ N- <CCVS> vname <lin> transconductance
+ <MAX=val MIN=val>
PWL
Hxxx N+ N- <CCVS> PWL(1) vname <DELTA=val>
+ x1,y1 x2,y2 x3,y3 … .x100,y100
POLY
Exxx N+ N- <CCVS> POLY(ND) vname1 <vname2 … vnameND>
+ P0 <P1 P2 P3… ..>
Examples:
Hqq 2 1 Vsuppply 1000
Hyy in out POLY(3) V1 V2 V3 1 0 2 4 9 8 2 0 0 1
The first example is a voltage source depends on the current through Vsupply and
the transconductance is 1000. The second example is a voltage source connected
between in and out depends on the currents through voltage source V1, V2, and
V3 with polynomial coefficient 1, 0, 2 … etc.. That is
V(in)=1+ 2×V2+4×V3+9×V1 2 +8×V1×V2+2×V1×V3+V3 2
N1 and N2 are the nodes at port 1; N3 and N4 are the nodes at port2. Z0 is the
characteristic impedance. The length of the line may be expressed in either of two
forms. The transmission delay, TD, may be specified directly (as TD=10ns, for
example). Alternatively, a frequency F may be given, together with NL, the
normalized electrical length of the transmission line with respect to the
wavelength in the line at the frequency F. If a frequency is specified but NL is not,
0.25 is assumed ( that is, the frequency is assumed to be the quarter-wave
frequency). Note that although both forms for expressing the line length are
indicated as optional, one of the two must be specified.
Note that this instance models only one propagating mode. If all four nodes
are distinct in the actual circuit, then two modes may be excited. To simulate such
a situation, two transmission- line instances are required.
The initial condition (IC) specification consists of the voltage and current at
each of the transmission line ports. Note that the initial conditions (if any) apply
‘only’ if the UIC option is specified on the .TRAN card.
Note that a lossy transmission line with zero loss may be more accurate than
the lossless transmission line due to implementation details.
Example:
Td 1 0 2 0 Z0=55 TD=12ns
Circuit Examples:
*** Lossless Transmission Line (match) ***
.global dd
.subckt inv y a
mpa y a dd dd p l=0.5u w=100u ad=2.1p as=2.1p ps=1u pd=1u
mna y a 0 0 n l=0.5u w=50u as=2.1p ad=2.1p ps=1u pd=1u
.ends inv
.param dd=3.3
vdd dd 0 dd
vinp inp 0 pulse(0 dd 5n 0.1n 0.1n 5n 10n)
x1 out1 inp inv
This case is a lossless transmission line with impedance match, and the simulation
results is shown in the following figure. Next case shows the results when
impedance is mismatch.
.subckt inv y a
mpa y a dd dd p l=0.5u w=100u ad=2.1p as=2.1p ps=1u pd=1u
mna y a 0 0 n l=0.5u w=50u as=2.1p ad=2.1p ps=1u pd=1u
.ends inv
.param dd=3.3
vdd dd 0 dd
vinp inp 0 pulse(0 dd 5n 0.1n 0.1n 5n 10n)
x1 out1 inp inv
The following types of lines have been implemented so far: RLC (uniform
transmission line with series loss only), RC (uniform RC line), LC(lossless
transmission line), and RG(distributed series resistance and parallel conductance
only). Any other combination will yield erroneous results and should not be tried.
The length LEN of the line must be specified.
The option most worth experimenting with for increasing the speed of
simulation is REL. The default value of 1 is usually safe from the point of view of
accuracy but occasionally increases computation time. A value greater than 2
eliminates all breakpoints and may be worth trying depending on the nature of the
rest of the circuit, keeping in mind that it might not be safe from the viewpoint of
accuracy. Breakpoints may usually be entirely eliminated if it is expected the
circuit will not display sharp discontinuities. Value between 0 and 1 are usually
not required but may be used for setting many breakpoints.
Example:
O12 1 0 2 0 model_loss
Circuit Example:
*** Lossy Transmission Line (O-element) ***
.global dd
.subckt inv y a
mpa y a dd dd p l=0.5u w=100u ad=2.1p as=2.1p ps=1u pd=1u
mna y a 0 0 n l=0.5u w=50u as=2.1p ad=2.1p ps=1u pd=1u
.ends inv
Chapter 4
To read the I/O vector file, one needs to set option card:
In which, the first character ‘;’ means that this line is a comment line and
For example:
Radix 1 1 4 4 4 4 1 4 4;
For example:
Nodename clk out addr[15-0] R data[7:0] ;
For example:
IO i o i i i i x b b ;
out The out statement defines the resistance value for L and H
states, defined in Tabular statements.
For example:
Out 100;
VIH Defines the voltage value of input 1-state. The default value
is 5V.
For example:
Vih 3.3;
VIL Defines the voltage value of input 0-state. The default value
is 0V.
For example:
Vil 0.8;
Tabular Data:
period The period statement defines the time interval of tabular data.
If a period statement is specified, the tabular data contain
only signal values and not include times.
For examples,
period 25 ;
1000 0001 ;
1110 0111 ;
1100 0011 ;
is the same as
0 1000 0001 ;
25 1110 0111 ;
50 1100 0011 ;
Pattern check:
Expected output The program will compare the node defined by 'o' in IO
pattern statement.
The expected output pattern is defined in tabular stament.
state meaning
0 Expected ground
1 Expected one (VIH)
z (not yet supported)
x Don’t care
u Don’t care
Circuit Examples:
There are five inverters with inp ut signal given by IO vector. The first case ‘vec.in’ is the
input signal and output check declaration via IO vector in print-on-change format. The output
check is shown in file ‘vector.chk’. The second case ‘vec.in1’ is the input signal and output
check declaration via IO vector in PWL format. The third case ‘vec.in2’ is the input signal
using cascade tabular data format which is the same as the 4-th case ‘vec.in3’. The following
data lists and figures are the simulation results of each case.
t0 0.01
;tabular data
;time d0 d1 d2 d3 d4 in0 in1 in3 in4 d2 d3
; print on change
5.0 z z z z z 1 0 0 1 x x
10.0 z z z z z 1 0 1 0 x x
13.0 z z z z z 0 1 0 1 x 1
15.0 1 1 0 0 z 0 1 1 1 0 x
28.0 z z z z z 1 0 0 1 1 1
38.0 z z z z 1 1 1 1 1 0 0
45.0 z z 1 z 1 0 0 0 0 1 1
78.0 z z 1 z 1 0 1 0 0 0 x
98.0 z z z 1 0 0 0 1 1 x x
case2 (vec.in1):
Case 3 (vec.in2):
; input node:in1-4
radix 1111
io iiii
nodename in0 in1 in3 in4
tunit 1n;
slope 0.5;
vih 2.5;
vil 0.8;
vh 3.8;
vl 2.0;
t0 0.01
;tabular data
;time in0 in1 in3 in4
0.0 0 0 0 0
5.0 1 0 0 1
10.0 1 0 1 0
cascade
1.0 0 1 0 1
3.0 0 1 1 1
8.0 1 0 0 1
cascade
0.0 1 1 1 1
5.0 0 0 0 0
11.0 0 1 0 0
cascade
3.0 0 0 1 1
5.0 0 0 0 0
case 4 (vec.in3):
; input node:in1-4
radix 1111
io iiii
nodename in0 in1 in3 in4
tunit 1n;
slope 0.5;
vih 2.5;
vil 0.8;
vh 3.8;
vl 2.0;
;skip if del(t) < t0
t0 0.01
;tabular data
;time in0 in1 in3 in4
; same time point as vec.in2
0.0 0 0 0 0
5.0 1 0 0 1
10.0 1 0 1 0
11.0 0 1 0 1
13.0 0 1 1 1
18.0 1 1 1 1
23.0 0 0 0 0
29.0 0 1 0 0
32.0 0 0 1 1
34.0 0 0 0 0
37.0 1 1 0 0
Chapter 5
Post Process
Usually, the results of .MEASURE cards are a unique value, such as the
delay time of a cell, the period of ring oscillator, the ripple of a
vibration signal, etc. It frequently happens that users are very interested
in the variations with time of some signal- to-signal quantities, i.e.
jitters. Jitters profiling is a new feature introduced by ADiT to help
designers perform more subtle data analysis.
Output of Jitters After jitters profiling, the values of varname will be saved in a separate
Profiling file. The naming convention for jitters output is
input_head.varname.JT#
1. Measurement by ALWAYS.
To measure the variation with time of the separation between V(out1) and
V(out2) at the points where V(out1) and V(out2) reach one half of the power
supply value (e.g. parameter vddval) on their first rising edges, the statement is
.param vddval=5.0
.meas tran var1 always v(out1) val='0.5*vddval'
+rise win=100n targ v(out2) val='0.5*vddval' rise=1
.param diffval1=’vddval/1.5’
.param outval2=’0.8*vddval’
.meas tran var2 always v(out1,out2) val='diffval1'
+win=100n fall targ v(out2) val='outval2'
+fall=1
2. Measurement by PERIODIC.
demomeas.var1.JT0,
demomeas.var2.JT0, and
demomeas.var3.JT0.
Post-simulati Post-Simulation
on Measurement
Measurement
Measurement on simulation data can be implemented through two
approaches : instant measurement and post-sim analysis. Instant
measurement means that .MEASURE statements can be executed
immediately after the data is available. Every time when the simulator arrives
at convergence, it compares the solutions with the measurement conditions. If
the trigger/target requirements are met, the measurement results can be
extracted. Otherwise, simulation simply goes on.
ADiT takes the second approach : post-sim analysis. That is, all of
the .MEASURE statements will not be treated until the job is completed.
Therefore, the AUTOSTOP option is not supported by ADiT.
Examples The netlist is described in file demomeas.sp. After ADiT simulation, the
graphic output is demomeas.TR0 (or demomeas.TB0 in turbo mode).
The .MEASURE statements to be applied are :
ameas demomeas.TR0
. AMEAS will then open file demomeas.sp (or demomeas.cir if the .sp file
does not exist) automatically and look for the .MEASURE cards. It is
assumed that the .MEASURE cards are included in demomeas.TR0.
Alternatively, the .MEASURE cards can be located in another file and fed to
AMEAS by the application of –m option. For example, if the
above .MEASURE statements are prepared in file demomeas.inc, the
command is
******************************************************************
*** Copyright 1998 EverCAD Software Corp. All rights reserved. ***
*** AMEAS (Postprocess measurement utility) ***
*** Ver: 98.4, Dec.9, 1998 ***
******************************************************************
Chapter 6
Introduction
HDL are excluded from this context, unless they are tightly
correlated to the integration activities. It is thus assumed that
multi-level users have been quite familiar with Verilog HDL.
The interested users are recommended to fetch the general
reference of Verilog HDL.
`include
analog.sp digital.v
HDL pre-processor
Analog parser
Circuit Partition
Setup
Post Processor
T1 T2 T3 T4 T5’ T5 T8’
Analog time axis
Synch.
Synch.
T6 T7 T8
Digital Time Wheel ...
empty
events
Tm A B C
Tn D E F
Tk G
disabled by event B
created by event C
Tn D F
Tk G
Tm is accepted TW rotates
Tm A B C
Tn D E F
Then, the time step shrinks for another trial. In summary, the
time wheel implemented in a multi-level environment must
be reversible ! ADiT indeed fabricates a reversible time
wheel in the synchronizer to overcome the difficulties raised
by time-point rejection.
Automatic incorporation :
All of the instances gathered in the top-level module will
be absorbed to the SPICE netlist automatically, if possible.
in node1
x1
I2
out
x3 node2 inv.v
inv.sp
**inv.sp //inv.v
... module main;
X1 node1 in inverter //some declaration...
X3 out node2 inverter inv I2(node2, node1);
... endmodule
.end ...
ο
ο Example : comparator
module main;
//Terminal declaration...
wire d1, d2, clk1, clk2;
wire q1, q2;
wire out;
//Module instantiation
dff xdff1(q1, d1, clk1);
dff xdff2(q2, d2, clk2);
comparator xcomp(out, q1, q2);
endmodule
...
in1 out
out
Y
in2 OUT
ABC
ex.v
ex.sp
Nets out and OUT in ex.v are both connected to node out in
ex.sp.
ο
The solution to the problem of case-sensitive port
connection is the declaration of interface signals. See section
Declarations of Interface Signals for details.
<spice_instance_option>
::= //adit spice_instance = “<hdl_instance_list>”
<hdl_instance_list>
::= <hdl_instance_name><,<hdl_instance_name>>*
main
I2 I1
in n1 n2 out
m1 m2 m1
main
I1
I2
in n1 n2
out
m1 m1
.TRAN 1N 200N
...
.end
module main;
wire out, in;
Statement
//adit spice_instance=”main.I1.m2”
A&B
and
clk ? C : D
.
//Application of `timescale
module main;
…
<logic_level_specification>
::= //adit logic_0 = <number>
||= //adit logic_1 = <number>
||= //adit logic_vth = <number>
||= //adit logic_z = <number>
module TEST;
…
endmodule
…
module AND2(out, in1, in2);
…
endmodule
//adit logic_0 = 0
//adit logic_1 = 5
//adit logic_vth = 1.8
//adit logic_z = 2.0
n4
n1 n2 n3
D1 D2 A2
A1
n5
signal insertion
n4
a2d
isolated port
n1 n2 n3
a2d D1 D2 d2a A2
A1
d2a
n5
Actually, the first rule covers the second one because the
top-level module is, by default, the A/D boundary of ADiT.
Besides, the applications of option spice_instance further
create new A/D boundaries in the non-top-level hierarchy.
ο Example : automatic insertion of interface signals
top
I3
X6 I1 I4
I2 I5 X7
interface signal
module top;
. . .
BLK1 I1(. . .);
BLK2 I2(. . .);
BLK3 I3(. . .);
. . .
endmodule
false
port from vector ?
true
false
port with range select ?
true
port name port name + select index port name + declared index
...
module main;
. . .
reg enable;
reg [3:0] A, B;
wire [1:8] out, d;
<vector_symbol_specification>
::= //adit spice_vector = “<vector_prefix>? : <vector_suffix>? “
Similarly, statement
<signal_characteristics>
::= //adit rise_time = <number>
||= //adit fall_time = <number>
||= //adit delay_time = <number>
logic_1
logic_0
delay_time rise_time
module main;
. . .
endmodule
The rise, fall, and delay times for the d2a signals in this
example are 1.5, 2.3, and 0.7 ns, respectively. The unit
comes from the specification of `timescale.
ο
(TR, TF)
out
V(out)
logic_vth
TR TF
V(clk)
rise_time fall_time
<module_item>
::= <net_declaration>
…
||= <a2d_port_declaration>
||= <d2a_port_declaration>
<a2d_port_declaration>
::= a2d_device <a2d_characteristics >? <ad_instance_list> ;
<d2a_port_declaration>
::= d2a_device <d2a_characteristics >? <ad_instance_list> ;
<a2d_characteristics >
::= #(<logic0> <, <logic1> <, <tx> <, <td>>? >? >? )
<d2a_characteristics >
::= (<logic0> <, <logic1> <, <logicX> <, <logicZ> <, <tr> <, <tf> <, <td>>? >? >? >?
>? >?)
<ad_instance_list>
::= <ad_instance > <, <ad_instance >>*
<ad_instance >
::= <instance_name >? ( <hdl_port> <, <spice_port>>? )
<hdl_port>
::= <ad_port_expression>
<spice_port>
::= <ad_port_expression>
<ad_port_expression>
::= <identifier>
||= <spice_hierarchy_name >
||= <port_bit_select>
||= <port_part_select>
<port_bit_select>
::= <identifier>[<constant_expression>]
||= <spice_hierarchy_name >[<constant_expression>]
<port_part_select>
::= <identifier>[<constant_expression> : <constant_expression>]
||= <spice_hierarchy_name >[<constant_expression> :
<constant_expression>]
Connection fails
data
data
CLK
clock
out
result
digital
analog
module top;
reg CLK, data;
wire out;
data
data
CLK
clock A1
out
result D1
digital
analog
Declarations
a2d_device A1(CLK, clock);
and
d2a_device D1(out, result);
build up direct connections from clock to CLK and out to
result. Note that no IFS declaration is added for data, and
hence the rule of port-name identification still works.
module top;
reg wen;
wire out;
. . .
HDL_BLOCK I1(wen, out);
. . .
`ifdef adit
a2d_device A2(wen, x1.x20.act);
d2a_device D2(out, x1.x20.res);
`endif
endmodule
...
x1 A2
x10 x20
x100 x200 wen
out Digital part
act
res
x300 D2
x30
x2
Analog part
module main;
wire [15:0] COL;
. . .
DECODER col_dec(COL[15:8], COL[7:0], . . .);
`ifdef adit
d2a_device D3(COL[15:8], column[0:7]);
`endif
. . .
endmodule
...
column<7> COL[8]
column<6> COL[9]
column<5> COL[10]
column<4> COL[11]
column<3> COL[12]
column<2> COL[13]
column<1> COL[14]
column<0> COL[15]
d2a_device Digital part
Analog part
HDL SPICE
HDL SPICE Rule Example SPICE destination
port port
select select
width width
none scalar-to-scalar a2d (clk, y); y
1
direct replacement
none bit/part scalar-to-bit a2d (clk, y[1]); y<1>
use [msb] a2d (clk, y[2:2]); y<2>
part
>1
only Error a2d (clk, y[1:2]);
and
TEST
n1 N2 Y out
I1 m1 m3
m2
I2
4.5
3.3 V(out)
0.5 V(n1)
0.2
time
module TEST;
reg in;
wire out;
PAT I1(in);
INV3 I2( .Y(out), .A(in));
endmodule
`ifdef adit
d2a_device #(0.2, 3.3) D4(n1);
d2a_device #(0.5, 4.5, 2.7) D5(Y);
`endif
endmodule
V(clk)
2.0 ns 3.0 ns
V(clk)
5.0 ns 7.0 ns
module main;
. . .
`ifdef adit
d2a_device #(0, 3.3, 1.6, 1.7, 5.0, 7.0, 0.0)
D6(clk);
`endif
. . .
endmodule
...
adit_install_directory/examples/xl
.
TOP
n1 n2 Y out
in
I1 m1 m3
m2
I2
SPICE descriptions
.GLOBAL VDD
VDD VDD 0 DC 5.0
.tran 1n 200n
.save all
.end
Verilog
descriptions
/*
* inv3.v : Digital part of inv3.sp
*/
`timescale 1ns/1ps
//adit logic_0=0.5
//adit logic_1=4.0
//adit logic_vth=2.0
//adit rise_time = 0.7
//adit fall_time = 0.9
//adit delay_time = 1.1
module TOP;
wire in;
wire out;
endmodule
reg in;
initial in = 0;
always #5 in = ~in;
endmodule
`ifdef adit
d2a_device #(0.2, 4.3, 1.9, 1.9, 1.2, 1.3) m4(n1);
// v0 v1 vx vz tr tf
a2d_device #(0.5, 4.0, 1.4, -1.5) m5(n2);
// v0 v1 tx td
d2a_device #(0.4, 3.3, 1.2, 1.5, 0.8, 0.8) m6(out);
// v0 v1 vx vz tr tf
`endif
endmodule
specify
(in2 => out) = (0.588, 0.298);
endspecify
endmodule
Simulation Results
ο Example : Comparator
SPICE descriptions
x1 d1 input1 INV
x2 d2 input2 INV
Cq1 q1 0 0.1p
Cq2 q2 0 0.1p
.inc model.lvl3
.tran 1ns 200ns
.save all
.END
Verilog
descriptions
/*
* Copyright 2003 (C) EverCAD SOFTWARE
CORPORATION.
* ALL RIGHTS RESERVED.
*
* HDL part of example "comp_hdl.sp".
*
* comp_hdl.v
*/
`timescale 1 ns / 1 ps
//adit logic_1=5.0
//adit logic_0=0.0
//adit logic_vth=2.5
module main;
endmodule
Simulation Results
wen clk
data[1] row
bit1 0 0 01
data[0] 1 0 1 1 RAM core
bit0
col
SPICE descriptions
** Address select…
Vrow row 0 pulse(0 3.3 100n 0.1n 0.1n 99.8n 200n)
Vcol col 0 pulse(0 3.3 50n 0.1n 0.1n 49.8n 100n)
Verilog
descriptions
//adit logic_0 = 0
//adit logic_1 = 3.3
//adit logic_vth = 1.0
module TOP;
`ifdef adit
a2d_device #(0, 1.7) I2(data);
d2a_device #(0, 1.7, 0.85, 0.85, 2.0, 3.0)
I3(data);
`endif
endmodule
integer i;
initial begin
DATA = 2'bz;
sense_amp = 4'bx;
for (i = 0; i < 1; i = i+1)
mem[i] = 4'bx;
end
Simulation Results
Appendix A
Answer-1:
Before simulation ADiT cuts input circuit into small sub-circuits as possible. In
default, ADiT's CKT partition has two phases:
Phase-1: cut original circuit into many DC-connected subcircuit.
Phase-2: automatically detect strong couple nodes and group them together.
Answer-2:
The CKT partition algorithm is described in Answer-1.
To enhance the accuracy of very analog type subcircuit,
ADiT provides some user specified option cards:
.option group_node='x1.x1..., x2.x1...'
.option spice_subckt='x1...,x2...'
.option spice_node='x1.x1..., x2.x1...'
where
group_node card is to group user specified nodes together and solved by SPICE
solver to enhance accuracy. Spice_subckt card specifies that sub-circuit x1, x2, …
will not be partitioned and are solved by SPICE solver to enhance accuracy.
Spice_node specify the subckt where this node located is solved by SPICE solver.
Note that, sbckt x1, x2… is defined by the .SUBCKT card in the netlist.
However, inappropriate usage will induce side effects of "big-subckt", which has
many nodes ( > 200 ). Therefore, Be careful to use these cards.
The basic rule is that the sub-circuit nodes should be as small as possible.
To use group_node card, only group near-by strong couple nodes if they are not
DC-connected.
To use spice_subckt card, put strong couple nodes together and keep nodes as
small as possible.
Answer-3:
Sometimes, designer will add some RLC circuit in the power line to simulate
non- ideal power effect. In this situation, ADiT need user-added power_node
declaration to improve simulation efficiency.
It is because, if user do not set power_node, ADiT will create 'big' subckt through
the DC-connected RLC circuit. This 'big' subckt will degrade the simulation
efficiency and even more can not simulate at all. ADiT provide several option
cards to solve this problem:
.save all
.tran 0.1n 50n
.end
Question-4: Why ADiT can not converge at first time point of transient analysis?
Answer-4:
Most of these kinds of problems is due to in-appropriate initial condition setting.
When it happens, user should first check if he has given ‘.IC V(xxx)=yyy … ’
cards and whether these values are appropriate ? Following is an simple example
in which the gate input signal and power supply are 1.5V. However, user sets the
initial condition of node OUT as 5V. This setting will make PMOSFET (MP)
forward turn-on its junction which may introduce convergence problem.
Question-5: What Gmin means at ADiT DC analysis and how to improve it?
Answer-5:
It is an important message to indicate the convergence characteristic of DC
analysis. The smaller Gmin value is, the better DC analysis result it is. If this
message is not shown at all or it is shown but the Gmin value is small ( < 1e-11or
0), you can satisfy the DC solution. If Gmin value is large (1e-7 or larger), the DC
analysis result is not good. To eliminate this situation, two methods offer
assistance:
(1) If you know the node voltage exactly at time=0, add some initial values
through .IC card to enhance the convergence characteristic.
(2) If you use ADiT -spice mode and can not get the good DC analysis result,
try the following steps:
step 1: run your netlist with 'adit' mode and there is xx.IC0 file generated.
step 2: rename xx.IC0 as init.dat ( or something else).
step 3: include init.dat as the initial guess of 'adit -spice' mode (add .inc
init.dat in your netlist).
Appendix B
Error Message
(2)
Message: Fatal error! Open file failure:
Meaning: ADiT can not open output file for analysis (e.g. ALTER card).
Check if your file system is write-protected.
(3)
Message: Error: modname(xxx) is not found.
Check the line: xxx
(4)
Message: Warning: unknown subckt: xxx
Fatal error: return NULL deck.
Error: circuit not parsed
(5)
Message: ERROR: MOSFET need 4 terminals, and stop it.
(6)
Message: Fatal error: when read vector file, stop the program.
(7)
Message: Fatal error: infinite loop in Reorder_SubcktID!!
Terminate the program!
(8)
Message: Warning: Stop at time: xxx, delta=xxx, CKTdelmin= xxx
Warning : ADiT gives the warning message and simulation keep going
(1)
Message : Warning! Node(xxx) not found
(2)
Message: Warning on xxx-th : .prot
unimplemented control card - ignored
and
Warning on xxx-th : .unprot
unimplemented control card - ignored
(3)
Message: Warning: the PWL-x values must be in increasing order
(4)
Message: Warning: shunt dangling node, xxx, with 1.0e12.
(5)
Message: unrecognized parameter (xxx) - ignored
(6)
Message: unknown parameter(xxx)
(7)
Message: Warning: failed to determine betaeff for mos-table.!
or
Warning: failed to determine beta at vgst=xxx
(8)
Message: Warning: Negative gds in "MOS model name". W/L= xxx
(9)
Message: Warning: xxx with Ps = 0 is less than W.
or
Warning: xxx with Pd = 0 is less than W.
(10)
Message: Warning: Gmin stepping completed at xxx
(11)
Message: Warning! loop in queue exceeds 10 times at pass 2
or
Warning: DC pass2- iteration exceeds limit(10)
(12)
Message: Warning: delta=xxx <= 0.0 at time=xxx, reset to xxx
(13)
Message: Warning:xxx-th SCK overshoot at xxx now=xxx old=xxx
(14)
Message: Warning: xxx-th sck with xxx nodes and type=xxx: node(xxx)
with xxx devices
or
Warning: xxx-th DC sck(xxx) with xxx nodes
or
Warning: TRAN-vsrc node , xxx , connects xxx devices