A Tutorial: Transient Domain Flip-Flop Models For Mixed-Mode Simulation
A Tutorial: Transient Domain Flip-Flop Models For Mixed-Mode Simulation
A Tutorial
Transient Domain Flip-Flop Models for Mixed-Mode
Simulation
Mike Brinson
Copyright
c 2006 Mike Brinson <mbrin72043@yahoo.co.uk>
Permission is granted to copy, distribute and/or modify this document under the
terms of the GNU Free Documentation License, Version 1.1 or any later version
published by the Free Software Foundation. A copy of the license is included in
the section entitled ”GNU Free Documentation License”.
Introduction
One of the primary aims of the Qucs project is the development of a universal
circuit simulator that allows circuit performance to be investigated from DC to
microwave frequencies. Adding performance analysis in the digital domain makes
Qucs a truly universal simulator. Qucs 0.0.8 was the first release to include digi-
tal simulation. Qucs digital simulation centres around VHDL using the FreeHDL
VHDL compiler to generate a machine code simulation of a circuit under test. Re-
lease 0.0.8 includes built-in models for the basic digital gates and a number of the
common sequential flip-flops. The Qucs gate models can be used in both digital
and transient simulation. Unfortunately, the flip-flop models are only available
in digital simulation. The current version of Qucs models flip-flops using VHDL
and does not provide time domain models for transient simulation. This is an
important omission which limits the Qucs simulator mixed-mode simulation ca-
pabilities. Mixed-mode simulation is a term commonly employed to describe the
simulation of circuits that contain both analogue and digital components. In the
real world circuits are, of course, not subdivided into neat boxes labelled analogue,
S-parameter, digital or any other physical domain. So it is of some importance
that Qucs device modelling be developed to allow circuits consisting of a range of
different analogue and digital components, to be simulated at the same time. Nor-
mally such systems are simulated in the time domain using large signal transient
simulation. Performance data being both analogue and digital expressed in tabu-
lar or graphical form. This tutorial note presents a number of transient simulation
models for flip-flops based on structural digital circuits, describes their use, and
outlines a number of example simulations derived from practical circuits.
1
in the transient time domain. In order to keep these models simple the D gated
and edge-triggered devices have been chosen as the fundamental building blocks
for the transient domain Qucs models. Using basic Boolean logic concepts it is
straightforward to show that JK and T edge-triggered flip-flop models can be
derived from the D flip-flop models.
1
Richard S. Sandige, Modern Digital Design, 1990, McGraw-Hill International Editions.
2
D
& Q
&
D
times=20ns; 20ns
Y3
C Y1
QB
&
C &
times=5ns; 5ns
&
Y2
Y4
Y5
transient
simulation
TR1
Type=lin
Start=0
Stop=100 ns
1
D.Vt
0
0 2e-8 4e-8 6e-8 8e-8 1e-7 1.2e-7 1.4e-7 1.6e-7 1.8e-7 2e-7
time
1
C.Vt
0
0 2e-8 4e-8 6e-8 8e-8 1e-7 1.2e-7 1.4e-7 1.6e-7 1.8e-7 2e-7
time
1
Q.Vt
0 2e-8 4e-8 6e-8 8e-8 1e-7 1.2e-7 1.4e-7 1.6e-7 1.8e-7 2e-7
time
1
QB.Vt
0 2e-8 4e-8 6e-8 8e-8 1e-7 1.2e-7 1.4e-7 1.6e-7 1.8e-7 2e-7
time
3
D Q
D Q transient
simulation
D
C QB
TR1
C Q Type=lin
C SUB1 Start=0
Num=2 File=gated_d_latch.sch Stop=200 ns
4
Edge-triggered D type flip-flop
The schematic for a positive edge-triggered D flip-flop is shown in Fig. 42 . Asyn-
chronous set (SET) and reset (RESET) control inputs allow the flip-flop outputs
Q and not Q (QB in Fig. 4) to be set to known values at the start of a simulation.
The nand gates forming each of the cross coupled SR latches have their delay times
set at 0 ns. The edge-triggered D device is a building block for both the JK and
T types of flip-flop. A typical set of transient simulation test results for the D
flip-flop model are illustrated in Fig. 5. These where obtained using the basic test
configuration shown in Fig. 6.
SET
&
SET
Y7
I0
RESET & Q Q
&
I1
RESET Y10
CLOCK Y8
QB
& I2 &
CLOCK
Num=1 QB
Y11 Y2
I3
&
DIN
DIN Y9
Num=2
2
David A. Hodges and Horace G. Jackson, Analysis and Design of Digital Integrated Circuits,
1998, Second edition, McGraw-Hill Book Company.
5
1
R.Vt
0
0 5e-8 1e-7 1.5e-7 2e-7 2.5e-7 3e-7 3.5e-7 4e-7 4.5e-7 5e-7
time
1
DIN.Vt
0
0 5e-8 1e-7 1.5e-7 2e-7 2.5e-7 3e-7 3.5e-7 4e-7 4.5e-7 5e-7
time
CLOCK.Vt
0
0 5e-8 1e-7 1.5e-7 2e-7 2.5e-7 3e-7 3.5e-7 4e-7 4.5e-7 5e-7
time
1
Q.Vt
0 5e-8 1e-7 1.5e-7 2e-7 2.5e-7 3e-7 3.5e-7 4e-7 4.5e-7 5e-7
time
1
QB.Vt
0 5e-8 1e-7 1.5e-7 2e-7 2.5e-7 3e-7 3.5e-7 4e-7 4.5e-7 5e-7
time
1
DIN SUB2
S Q
D Q transient
S4 simulation
times=40ns; 40ns
CLOCK QB TR1
Q Type=lin
R Start=0
S2
times=5ns; 5ns Stop=500 ns
SUB1
R
S3
times=20ns; 1000ns
6
The edge-triggered JK flip-flop
A leading edge-triggered JK flip-flop can be constructed using a positive edge-
triggered D flip-flop and external logic3 . The external logic generates the required
JK flip-flop characteristic equation given by
Q+ = J.Q + K.Q
Were Q, Q, J and K are the current state values of the device signals and Q+ is
the next state value of Q following the rising edge of the device clock pulse. The
schematic diagram for the edge triggered flip flop is shown in Fig. 7 and a typical
set of test waveforms in Fig. 8. These were obtained using the test circuit shown
in Fig. 9.
SET Q
&
1 S
D Q
J Y1 QB
Y2
CLOCK
1 Q
&
R
K
Y4
Y3 SUB1
File=dff_sr.sch
RESET
3
M. Morris Mano and Charles R Kime, Logic and Computer Design Fundamentals, 2004,
Third edition, Pearson Education International, Prentice Hall
7
RESET.Vt 1
0
0 1e-8 2e-8 3e-8 4e-8 5e-8 6e-8 7e-8 8e-8 9e-8 1e-7
time
1
CLOCK.Vt
0
0 1e-8 2e-8 3e-8 4e-8 5e-8 6e-8 7e-8 8e-8 9e-8 1e-7
time
1
Q.Vt
0 1e-8 2e-8 3e-8 4e-8 5e-8 6e-8 7e-8 8e-8 9e-8 1e-7
time
1
QB.Vt
0 1e-8 2e-8 3e-8 4e-8 5e-8 6e-8 7e-8 8e-8 9e-8 1e-7
time
1
SUB2
Q
S
J Q transient
CLOCK simulation
TR1
CLOCK QB Type=lin
Num=1 K Q Start=0
R Stop=100 ns
RESET SUB1
RESET
8
The edge-triggered T flip-flop
The characteristic equation for a leading edge-triggered flip-flop is4
Q+ = T ⊕ Q
where the symbols have the same meaning as the JK flip-flop. The circuit dia-
gram, test waveforms and test circuit for the edge-triggered flip-flop are given in
Figures 10 to 12.
SET
SET
TFF QQ
=1 S
D Q
TFF Y1
CLOCK QB
QB
Q
CLOCK
R
R SUB1
File=dff_sr.sch
4
See footnote 2.
9
1
SET.Vt
0
0 2e-8 4e-8 6e-8 8e-8 1e-7 1.2e-7 1.4e-7 1.6e-7 1.8e-7 2e-7
time
1
CLOCK.Vt
0
0 2e-8 4e-8 6e-8 8e-8 1e-7 1.2e-7 1.4e-7 1.6e-7 1.8e-7 2e-7
time
1
TFF.Vt
0
0 2e-8 4e-8 6e-8 8e-8 1e-7 1.2e-7 1.4e-7 1.6e-7 1.8e-7 2e-7
time
1
Q.Vt
0 2e-8 4e-8 6e-8 8e-8 1e-7 1.2e-7 1.4e-7 1.6e-7 1.8e-7 2e-7
time
1
QB.Vt
0 2e-8 4e-8 6e-8 8e-8 1e-7 1.2e-7 1.4e-7 1.6e-7 1.8e-7 2e-7
time
SET
transient
SET
simulation
times=10 ns; 1000 ns
TFF Q TR1
S
T Q Type=lin
Start=0
T1 QB Stop=200ns
times=30 ns; 60 ns IntegrationMethod=Trapezoidal
Q
CLOCK Order=2
R
CLOCK 1
times=5 ns; 5 ns
SUB2
SUB1 File=Logic_one.sch
File=tff.sch
10
Two example digital circuits
• A synchronous BCD up-counter: Figure 13 shows a synchronous BCD
up-counter constructed from four edge-triggered JK flip flops connected as
toggle flip-flops. The input signal waveforms and the corresponding counter
outputs Q0, Q1, Q2 and Q3 are illustrated in Fig. 14. These simulation
results were obtained using the default trapezoidal integration method with
order 2.
SUB5
& & &
1
File=Logic_one.sch
Y1 Y2 Y3
Q0 Q1 Q2 Q3
S S S S
J Q J Q J Q J Q
CLOCK
K Q K Q K Q K Q
R R R R
CLOCK
times=5 ns; 5ns
COUNT &
SUB1 SUB2 SUB3 SUB4
File=jkff.sch File=jkff.sch File=jkff.sch File=jkff.sch
COUNT Y4
times=5 ns; 1000ns transient
simulation
CLEAR 1
TR1
CLEAR Type=lin
Num=3 Y5 Start=0
times=10 ns; 1000ns Stop=120ns
IntegrationMethod=Trapezoidal
Order=2
At the start of simulation signal CLEAR is set to logic 1 which in turn causes
the counter to be reset to 0000. Similarly signal COUNT has to be set to 1
for counting to take place. Notice that the counter counts from 0 to 9 and
then resets to 0.
J = X, K = 1, Y 1 = Q0.X, Y 2 = Q0
11
CLEAR.Vt
0
0 1e-8 2e-8 3e-8 4e-8 5e-8 6e-8 7e-8 8e-8 9e-8 1e-7 1.1e-7 1.2e-7
time
CLOCK.Vt
0
0 1e-8 2e-8 3e-8 4e-8 5e-8 6e-8 7e-8 8e-8 9e-8 1e-7 1.1e-7 1.2e-7
time
COUNT.Vt
0
0 1e-8 2e-8 3e-8 4e-8 5e-8 6e-8 7e-8 8e-8 9e-8 1e-7 1.1e-7 1.2e-7
time
1
Q0.Vt
0
0 1e-8 2e-8 3e-8 4e-8 5e-8 6e-8 7e-8 8e-8 9e-8 1e-7 1.1e-7 1.2e-7
time
1
Q1.Vt
0
0 1e-8 2e-8 3e-8 4e-8 5e-8 6e-8 7e-8 8e-8 9e-8 1e-7 1.1e-7 1.2e-7
time
1
Q2.Vt
0
0 1e-8 2e-8 3e-8 4e-8 5e-8 6e-8 7e-8 8e-8 9e-8 1e-7 1.1e-7 1.2e-7
time
1
Q3.Vt
0
0 1e-8 2e-8 3e-8 4e-8 5e-8 6e-8 7e-8 8e-8 9e-8 1e-7 1.1e-7 1.2e-7
time
12
1
SUB4
X File=Logic_one.sch
Y2
1 S S
J Q D Q transient
X simulation
Y2 20ns
times=100ns;
TR1
Type=lin
K Q Q
R Start=0
CLOCK R Stop=350 ns
IntegrationMethod=Trapezoidal
SUB2
Order=2
CLOCK File=dff_sr.sch
times=5ns; 5ns
SUB1
File=jkff.sch
Y1
& S
D Q digital
simulation
Y1
Digi1
Type=TimeList
Q time=350 ns
R
RESET
SUB3
File=dff_sr.sch
RESET
times=15ns; 1000ns
13
1
CLOCK.Vt
0
0 2e-8 4e-8 6e-8 8e-8 1e-7 1.2e-7 1.4e-7 1.6e-7 1.8e-7 2e-7 2.2e-7 2.4e-7 2.6e-7 2.8e-7 3e-7 3.2e-7 3.4e-7
time
1
RESET.Vt
0
0 2e-8 4e-8 6e-8 8e-8 1e-7 1.2e-7 1.4e-7 1.6e-7 1.8e-7 2e-7 2.2e-7 2.4e-7 2.6e-7 2.8e-7 3e-7 3.2e-7 3.4e-7
time
1
X.Vt
0
0 2e-8 4e-8 6e-8 8e-8 1e-7 1.2e-7 1.4e-7 1.6e-7 1.8e-7 2e-7 2.2e-7 2.4e-7 2.6e-7 2.8e-7 3e-7 3.2e-7 3.4e-7
time
1
Y1.Vt
0 2e-8 4e-8 6e-8 8e-8 1e-7 1.2e-7 1.4e-7 1.6e-7 1.8e-7 2e-7 2.2e-7 2.4e-7 2.6e-7 2.8e-7 3e-7 3.2e-7 3.4e-7
time
1
Y2.Vt
0 2e-8 4e-8 6e-8 8e-8 1e-7 1.2e-7 1.4e-7 1.6e-7 1.8e-7 2e-7 2.2e-7 2.4e-7 2.6e-7 2.8e-7 3e-7 3.2e-7 3.4e-7
time
14
VHDL code for the transient domain flip-flop mod-
els
Although the primary purpose for developing the transient domain flip-flop mod-
els is the simulation of mixed-mode circuits, it is worth noting that because the
models have been constructed from Qucs gate primitives using a bottom-up de-
sign approach, Qucs can also use the models for digital simulation. Moreover,
provided the circuit being simulated does not contain any purely analogue compo-
nents Qucs will generate a VHDL model testbench that describes the function and
test sequence for the circuit being simulated. Shown in Fig. 17 is a digital timelist
waveform plot for the synchronous BCD up-counter introduced in the previous
section of these notes. Listing 1 lists the VHDL code generated by Qucs for the
synchronous BCD up-counter example.
dtime 0 5n 10n 15n 20n 25n 30n 35n 40n 45n 50n 55n 60n 65n 70n 75n 80n 85n 90n 95n
clear.X
count.X
clock.X
q0.X
q1.X
q2.X
q3.X
Figure 17: Digital TimeList waveforms for the circuit shown in Fig. 13
entity S u b L o g i c o n e i s
port ( nnout L1 : out b i t ) ;
end entity ;
use work . a l l ;
architecture Arch Sub Logic one of S u b L o g i c o n e i s
s i g n a l gnd ,
L1 : b i t ;
begin
gnd <= ’ 0 ’ ;
L1 <= not gnd ;
nnout L1 <= L1 or ’ 0 ’ ;
15
end architecture ;
entity S u b d f f s r i s
port (CLOCK: in b i t ;
DIN : in b i t ;
nnout Q : out b i t ;
nnout QB : out b i t ;
RESET: in b i t ;
SET : in b i t ) ;
end entity ;
use work . a l l ;
architecture A r c h S u b d f f s r of S u b d f f s r i s
s i g n a l I0 ,
I2 ,
I1 ,
I3 ,
QB,
Q : bit ;
begin
nnout QB <= QB or ’ 0 ’ ;
nnout Q <= Q or ’ 0 ’ ;
I 1 <= not (CLOCK and RESET and I 0 ) ;
I 3 <= not (DIN and I 2 and RESET ) ;
QB <= not (RESET and I 2 and Q) ;
Q <= not ( I 1 and QB and SET ) ;
I 0 <= not ( I 3 and I 1 and SET ) ;
I 2 <= not (CLOCK and I 3 and I 1 ) ;
end architecture ;
entity S u b j k f f i s
port ( nnnet6 : in b i t ;
nnnet1 : in b i t ;
nnnet8 : in b i t ;
nnout nnnet3 : out b i t ;
nnout nnnet7 : out b i t ;
nnnet9 : in b i t ;
nnnet10 : in b i t ) ;
end entity ;
16
use work . a l l ;
architecture A r c h S u b j k f f of S u b j k f f i s
s i g n a l nnnet0 ,
nnnet2 ,
nnnet4 ,
nnnet5 ,
nnnet7 ,
nnnet3 : b i t ;
begin
nnnet0 <= not nnnet1 ;
nnnet2 <= nnnet3 and nnnet0 ;
nnnet4 <= nnnet2 or nnnet5 ;
nnnet5 <= nnnet6 and nnnet7 ;
nnout nnnet7 <= nnnet7 or ’ 0 ’ ;
nnout nnnet3 <= nnnet3 or ’ 0 ’ ;
SUB1 : entity S u b d f f s r port map ( nnnet8 , nnnet4 , nnnet3 ,
nnnet7 , nnnet10 , nnnet9 ) ;
end architecture ;
entity TestBench i s
end entity ;
use work . a l l ;
17
nnnet9 : b i t ;
begin
SUB5 : entity S u b L o g i c o n e port map ( nnnet0 ) ;
nnnet1 <= Q0 and nnnet2 ;
nnnet3 <= Q1 and nnnet1 ;
nnnet4 <= Q2 and nnnet3 ;
SUB2 : entity S u b j k f f port map ( nnnet1 , nnnet1 , nnnet5 ,
Q1 , nnnet6 , nnnet0 , nnnet7 ) ;
CLEAR: process
begin
CLEAR <= ’ 1 ’ ; wait for 10 ns ;
CLEAR <= ’ 0 ’ ; wait for 1000 ns ;
end process ;
COUNT: process
begin
COUNT <= ’ 0 ’ ; wait for 5 ns ;
COUNT <= ’ 1 ’ ; wait for 1000 ns ;
end process ;
CLOCK: process
begin
CLOCK <= ’ 0 ’ ; wait for 5 ns ;
CLOCK <= ’ 1 ’ ; wait for 5 ns ;
end process ;
18
Generating a library of mixed-mode digital com-
ponents
The Qucs project facilities offer users a simple and convenient approach to devel-
oping libraries of components that are linked by a common theme; in these notes
this is digital component models for transient simulation. To form a library create
a new folder, at a point on a disk file system that users have read/write access,
giving it a suitable name, for example
f l i p f l o p models t r a n sim p r j .
Next move into the new library folder a copy of each of the schematic capture files
for the flip-flop models introduced in these notes. These are:
d f f s r . sch , j k f f . sch , t f f . sch , and gated d l a t c h . sch .
A copy of the schematic for setting nodes to logic one is also required
( l o g i c one . sch ) .
These models are then freely available for use in any projects which users are
working on. They can be copied into such projects using the ”Add files to Project...”
menu button found under the Qucs Project drop-down menu. Similarly any new
models developed as part of a project can be added to the library and used again
in the future.
19
Order Trapezoidal Euler Gear Adams Moulton
1 1 1.62 1.65 1.62
2 1 1.62 0.44 1
4 1 1.62 1.28 0.39
6 1 1.62 0.28 0.18
Table 2: Number of rejections and average time step data for the Adams Moulton
algorithm
The test results are shown in Table 1. Very little difference was found between
circuits where the cross coupled gates both had zero propagation delays and the
case where one gate had 0.5ns delay and the other zero delay.
One obvious fact emerges from the data given in Table 1; namely that the Adams
Moulton higher order integration routines appear to be faster than the default
trapezoidal algorithm. This is corroborated by the average time step and number
of rejection data points output by Qucs at the end of a simulation. Table 2 lists
this data for the Adams Moulton algorithm tabulated in Table 1.
Table 2 points to the increase in average time step and the dramatic reduction
in the number of simulation solution rejections as the probable reason for the
reduction in transient simulation time when using the higher order Adams Moulton
integration routines. However, other factors may influence the choice of integration
routine. Often speed is not the only criteria that is of importance when simulating
large complex circuits. Consider the following case (the circuit shown in Fig. 13
with order 6 Adams Moulton transient analysis integration); setting one of the
gate delays to 1ns, and the other to 0ns, in each of the RS latches in the edge-
triggered D flip-flop yields the signal waveforms illustrated in Fig. 18. Clearly here
the solution is incorrect pointing to probable numerical instability caused by the
choice of integration routine.
20
CLEAR.Vt
1
0
0 1e-8 2e-8 3e-8 4e-8 5e-8 6e-8 7e-8 8e-8 9e-8 1e-7 1.1e-7 1.2e-7
time
CLOCK.Vt
1
0
0 1e-8 2e-8 3e-8 4e-8 5e-8 6e-8 7e-8 8e-8 9e-8 1e-7 1.1e-7 1.2e-7
time
COUNT.Vt
0
0 1e-8 2e-8 3e-8 4e-8 5e-8 6e-8 7e-8 8e-8 9e-8 1e-7 1.1e-7 1.2e-7
time
1
Q0.Vt
0
0 1e-8 2e-8 3e-8 4e-8 5e-8 6e-8 7e-8 8e-8 9e-8 1e-7 1.1e-7 1.2e-7
time
1
Q1.Vt
0
0 1e-8 2e-8 3e-8 4e-8 5e-8 6e-8 7e-8 8e-8 9e-8 1e-7 1.1e-7 1.2e-7
time
1
Q2.Vt
0
0 1e-8 2e-8 3e-8 4e-8 5e-8 6e-8 7e-8 8e-8 9e-8 1e-7 1.1e-7 1.2e-7
time
1
Q3.Vt
0
0 1e-8 2e-8 3e-8 4e-8 5e-8 6e-8 7e-8 8e-8 9e-8 1e-7 1.1e-7 1.2e-7
time
Figure 18: Digital TimeList waveforms for the circuit shown in Fig. 13
21
circuits often include a wide diversity of components that exhibit widely differing
time constants. This makes the problem of numerical stability versus simulation
run time even more critical. With the explicit numerical integration routines, like
the trapezoidal routine, numerical instability results if the simulation time step be-
comes much larger than the smallest time constant in a circuit. Hence, to achieve
successful completion of a simulation the integration time step must be reduced
which in turn makes the overall simulation time increase significantly. The implicit
Gear algorithm5 does not suffer from this problem and is the natural choice for
circuits with components that have widely differing time constants.
5
The Gear integration algorithm is a powerful method for solving stiff systems of differential
equations, see Donald A. Calahan, Computer Aided Network Design, Revised edition, 1972,
McGraw-Hill.
22
Vin V1 V5D
1 VINP VOUTP
V1
D to A
U=1 V Node
Y1
Bridge
transient
simulation VINN VOUTN
SUB1
TR1 File=a_node_bridge.sch
Type=lin
Start=0
Stop=20us
IntegrationMethod=Gear
Order=6
Figure 19: Analogue waveform driven digital device with output node-bridge
Vin.Vt
0 2e-6 4e-6 6e-6 8e-6 1e-5 1.2e-5 1.4e-5 1.6e-5 1.8e-5 2e-5
time
1
V1.Vt
0 2e-6 4e-6 6e-6 8e-6 1e-5 1.2e-5 1.4e-5 1.6e-5 1.8e-5 2e-5
time
5
V5D.Vt
0
0 2e-6 4e-6 6e-6 8e-6 1e-5 1.2e-5 1.4e-5 1.6e-5 1.8e-5 2e-5
time
Figure 20: Digital TimeList waveforms for the circuit shown in Fig. 19
23
• Example 2: Pulse driven digital inverter with an active node bridge.
Illustrated in Fig. 21 is a similar circuit to the previous example. In Fig. 21
a pulse generator drives a digital inverter. The inverter output signal is
processed by an active node-bridge derived from a basic BJT switching am-
plifier. The output waveforms for this circuit are shown in Fig. 22. Notice
that the pulse rise and fall times are determined by the node-bridge amplifier
and that the resulting analogue signal amplitude is set to 5V.
transient
simulation
V2
TR1
U=5 V
Type=lin
Start=0 R2
Stop=30ns R=4.7 k Ohm
IntegrationMethod=Gear
VC
Order=6
VPIN V1 VB T1 C1
1 Type=npn C=0.1 pF
V3 Is=1e-16
U1=0 V R1 Nf=1
Y1 R=10k Ohm
U2=1 V Vaf=0
T1=5ns Bf=100
T2=20ns
24
1
VPIN.Vt
0
0 2e-9 4e-9 6e-9 8e-9 1e-8 1.2e-8 1.4e-8 1.6e-8 1.8e-8 2e-8 2.2e-8 2.4e-8 2.6e-8 2.8e-8 3e-8
time
1
V1.Vt
0 2e-9 4e-9 6e-9 8e-9 1e-8 1.2e-8 1.4e-8 1.6e-8 1.8e-8 2e-8 2.2e-8 2.4e-8 2.6e-8 2.8e-8 3e-8
time
1
VB.Vt
0 2e-9 4e-9 6e-9 8e-9 1e-8 1.2e-8 1.4e-8 1.6e-8 1.8e-8 2e-8 2.2e-8 2.4e-8 2.6e-8 2.8e-8 3e-8
time
4
VC.Vt
0
0 2e-9 4e-9 6e-9 8e-9 1e-8 1.2e-8 1.4e-8 1.6e-8 1.8e-8 2e-8 2.2e-8 2.4e-8 2.6e-8 2.8e-8 3e-8
time
Figure 22: Digital TimeList waveforms for the circuit shown in Fig. 21
25
CLOCK
SUB5
S1 1
Num=1
SUB9
T
File=tff.sch
R
File=Logic_one.sch
Q
B0
VINP VOUTP
D to A R1
Node
SUB6 Bridge R=10k Ohm A_VOUT
T
File=tff.sch
R
VINN VOUTN
Q
SUB10 R2
File=a_node_bridge.sch R=10k Ohm
B1 SUB14
File=spole_op_amp.sch
VINP VOUTP
D to A R10 V-
Node V1
SUB7 Bridge R=5k Ohm
U=18 V
T
File=tff.sch
R
VINN VOUTN
Q
SUB11
File=a_node_bridge.sch +
B2 V+
V2
VINP VOUTP U=18 V
SUB8
D to A R4
Node
R=2.5k
T
simulation
Q
VINN VOUTN
RESET
SUB12
TR1
File=a_node_bridge.sch
B3 Type=lin
S2 VINP VOUTP Start=0
Num=2 Stop=40 m
D to A R5
Node IntegrationMethod=Gear
Bridge R=1.25k Ohm Order=6
VINN VOUTN
SUB13
File=a_node_bridge.sch
26
RESET.Vt
0
0 0.002 0.004 0.006 0.008 0.01 0.012 0.014 0.016 0.018 0.02 0.022 0.024 0.026 0.028 0.03 0.032 0.034 0.036 0.038 0.04
time
CLOCK.Vt
0
0 0.002 0.004 0.006 0.008 0.01 0.012 0.014 0.016 0.018 0.02 0.022 0.024 0.026 0.028 0.03 0.032 0.034 0.036 0.038 0.04
time
1
B0.Vt
0 0.002 0.004 0.006 0.008 0.01 0.012 0.014 0.016 0.018 0.02 0.022 0.024 0.026 0.028 0.03 0.032 0.034 0.036 0.038 0.04
time
1
B1.Vt
0
0 0.002 0.004 0.006 0.008 0.01 0.012 0.014 0.016 0.018 0.02 0.022 0.024 0.026 0.028 0.03 0.032 0.034 0.036 0.038 0.04
time
1
B2.Vt
0
0 0.002 0.004 0.006 0.008 0.01 0.012 0.014 0.016 0.018 0.02 0.022 0.024 0.026 0.028 0.03 0.032 0.034 0.036 0.038 0.04
time
1
B3.Vt
0
0 0.002 0.004 0.006 0.008 0.01 0.012 0.014 0.016 0.018 0.02 0.022 0.024 0.026 0.028 0.03 0.032 0.034 0.036 0.038 0.04
time
A_VOUT.Vt
-20
0 0.002 0.004 0.006 0.008 0.01 0.012 0.014 0.016 0.018 0.02 0.022 0.024 0.026 0.028 0.03 0.032 0.034 0.036 0.038 0.04
time
Figure 24: Digital TimeList waveforms for the circuit shown in Fig. 23
27
VDCP
Num=4
D1
Is=1e-15 A
N=1
Cj0=10 fF
M=0.5
Vj=0.7 V R5
R=5 Ohm
VOUT
Num=3
R1 C1
VINP R4 R3
R=200k Ohm C=3.2uF R6
Num=1 R=10k Ohm R=50 Ohm
R=5 Ohm
SRC2 SRC1
VINN
G=200k G=1
Num=2
T=0 T=0 D2
Is=1e-15 A
N=1 VDCN
Cj0=10 fF Num=5
M=0.5
Vj=0.7 V
Figure 25: Operational amplifier model with Rin = 200k Ω, pole frequency = 5Hz,
DC differential gain = 200k and Rout = 50 Ω
28
End Note
The examples described in these notes were all simulated using the latest CVS
code version of Qucs. Since release of version 0.0.8, Qucs has matured enough
to allow it to be used for mixed-mode simulation and many of the known bugs
in Qucs 0.0.8 will be corrected with the release of Qucs 0.0.9 some time in the
future. Release 0.0.9 will represent another important step in the development of
a truly universal simulator. However, much more work needs to be done on the
development of models for use across the different physical domains. My thanks
to Michael Margraf and Stefan Jahn for all their hard work in correcting the bugs
which surfaced while the examples presented in this tutorial note where being
tested.
29