Académique Documents
Professionnel Documents
Culture Documents
LEVELS OF SIMULATION
From the lowest level to higher levels: * Device-level simulation: + used to test the effect of fabrication parameters; + used by technologists, not by circuit or system designers. * Circuit-level simulation (e.g. SPICE): + analog; + nodal/tableau equations; + numerical integration; + DC analysis. * Timing-level simulation: + analog, but with simplifications (macromodels, look-up tables); + piecewise-linear methods.
comb. logic
* Behavioral-level simulation: + description in high-level language, e.g. VHDL (VHSIC Hardware Description Language).
COMPONENTS OF A SIMULATOR
SIMULATOR KERNEL: * the routines for doing the real simulation. * detailed description for event-driven simulation follows. ROUTINES FOR PROCESSING OF CIRCUIT DESCRIPTION: * input format: either written by the designer or obtained through an interface with a schematic entry tool. * internal format: machine code or tables. * input format has to be compiled into internal format.
GATE-LEVEL SIMULATION
SIGNAL MODELING Signal values are, of course, discrete. The minimum set consists of 0, 1 and X. X means unknown. GATE MODELING * Gate models should deal with multiple-valued logic. * Gate behavior can be represented by truth tables or compiled code. Nand-gate: in 1 in 2 out
0 0 0 1 1 1 X X X 0 1 X 0 1 X 0 1 X 1 1 1 1 0 X 1 X X
GATE-LEVEL SIMULATION
DELAY MODEL * inertial delay: a change to an input signal has to last at least a certain time before it can trigger any reaction. * propagation (or transport) delay: some time passes between the start of a signal change at the gate input and the start of a signal change at its output. * rise/fall delay: due to capacitances that have to be loaded or unloaded, there is a time difference between the moment an output starts to change and the moment the output has reached its final value.
in_2 1 0 in_1 1 0 time 0 1 2 3 4 5 6 7 8 9 Prop. delay = 2: 0 time 0 1 2 3 4 5 6 7 8 9 Rise delay = 2, fall delay = 3: out 1 0 time 0 1 2 3 4 5 6 7 8 9 out
COMPILER-DRIVEN SIMULATION
* Based on making executable-code model of circuit; * Efficient simulation mechanism (few machine instructions per gate); * Applicable to few delay models in synchronous circuits (e.g. zero-delay model). registers
combinational logic
ZERO-DELAY EXAMPLE
A B C D E n1 n2 n3 n4 n5 n6 n8 n7 n9 F
UNIT-DELAY SIMULATION
* Provides some information on signal evolution in time, especially to detect glitches. time 0 1 2 3 4 n 1 1 0 n 2 1 0 n 3 1 0 n 4 1 0 n 5 1 0 n 6 1 0 n 7 1 0 n 8 1 0 n 9 1 0
EVENT-DRIVEN SIMULATION
* Event-driven simulation is a widely-used mechanism in gate-level simulators. * An event is a change of a signal value that may trigger new changes. * There is a queue of events ordered by the time the event is going to happen. * Basic steps: + the output of a gate G changes at time t i. + the fanout of the gate is inspected; it consists of the inputs of the gates G k that are connected to the output of gate G. + if the outputs of the gates G k change, they are scheduled to change at time t i ) D k, where D k is the delay associated with the transition.
Disadvantages: * inefficient use of computation time (search for position where to insert new event);
SWITCH-LEVEL SIMULATION
Basic points: * A circuit is modeled as a network of nodes interconnected by transistors. * Signals have two components <s,v>: + strength (s): associated with impedance. Often the set of values is discrete. + level (v): associated with voltage. Possible values are: 0, 1 and X. * There are two types of nodes: + storage nodes: they have a capacitance value. Often the set of values is discrete. + input nodes: they act as sources of fixed value and can supply unlimited current. * The transistors: + act as bidirectional switches; + have a strength value (signals passing through a transistor have their strength reduced to this value).
STRENGTH MODELS
BRYANTS MODEL OF STRENGTH VALUES There are w distinct strength values: 1, 2, ..., k, ..., w. s = w s is the strength of an input signal. k < s < w s is the strength of a transistor. 1 vs v k s is the strength of a storage node.
* * * *
V dd n 0(5)
(3) (3)
n 0(5)
(3)
f Out
(3)
n 1(1) A n 2(1) B
Out
(3)
n 1(1) A n 2(1) B
(4)
(3)
n 3(1)
(4) (3)
(3)
n 3(5) V ss (a)
n 3(5) V ss (b)
n 4(5) V ss (c)
NODE EVALUATION
HAYES #-OPERATOR * It combines several <s,v>-pairs seen by a node to give one <s,v>-pair, the actual signal on the node. * The signals with maximum s-values determine the new s-value; the new v-value is X unless all maximum signals are 0 or 1.
V ss V ss