Professional Documents
Culture Documents
ITC
Introduction to Computers (II)
ICE Group
Lesson 6: Memorization elements
Couse 2022-2023
Introduction
1
14/02/2023
Combinational Systems
(Semester 1)
Digital
systems
SYNCHRONOUS
Sequential Systems
(Semester 2)
ASINCHRONOUS
the outputs are dependent on not only
Sequential their current inputs (as in combinational
system circuits), but also on all their past inputs
they contain memory elements.
Engineering Introduction to Computers Lesson 6 Pag. 3
Feedback loop
Combinational Sequential
Systems Systems
How can we build a circuit capable of memorizing one bit of information?
IDEA: Using two inverters connected so the
output of the first inverter is the input of the
second one.
2
14/02/2023
Classification of
sequential systems
The output depends on a
synchronization signal.
ASÍNCRONOS
The output is not dependent on a
synchronization signal.
In the case of synchronous digital systems, the signal that time (or synchronize) its
evolution is called clock.
‘1’ logic
‘0’ logic
Oscillators
SÍNCRONOS
CLOCK signal
3
14/02/2023
The synchronism is often named clock (T). It is only a periodic signal that toggles its value,
so its frequency determines the frequency of the digital system :
Rising edge (positive edge): low‐to‐high transition.
Falling edge (negative edge): high‐to‐low transition.
Memory elements in digital systems:
A one bit of memory BISTABLES
A group of bistables (group of bits) REGISTERS
A group of registers (data) MEMORIES
Basic concepts
Example 1‐ ASINCHRONOUS: Let us assume a non‐synchronous sequential system with
two inputs A and B, and a single output Z. All these variables are initially equal to zero.
Let us suppose the following operation:
The variable Z is set to one when A and B are set to one.
The variable Z is set to zero when A and B are set to zero.
For both cases, if only one variable change, Z keeps whatever value it had.
Assuming the following inputs A and B and since the sequential system is asynchronous,
the timing diagram of Z would be :
4
14/02/2023
Basic concepts
Example 1‐ ASINCHRONOUS: Let us assume a non‐synchronous sequential system with
two inputs A and B, and a single output Z. All these variables are initially equal to zero.
Let us suppose the following operation:
The variable Z is set to one when A and B are set to one.
The variable Z is set to zero when A and B are set to zero.
For both cases, if only one variable change, Z keeps whatever value it had.
Assuming the following inputs A and B and since the sequential system is asynchronous,
the timing diagram of Z would be :
Basic concepts
Example 2‐ SINCHRONOUS: Let us assume a synchronous sequential system with two
inputs A and B, and a single output Z. All these variables are initially equal to zero.
Let us suppose the following operation:
The variable Z is set to one when A and B are set to one.
The variable Z is set to zero when A and B are set to zero.
For both cases, if only one variable change, Z keeps whatever value it had.
Assuming the following inputs A and B and since the sequential system is synchronous,
the timing diagram of Z would be :
5
14/02/2023
Basic concepts
Example 2‐ SINCHRONOUS: Let us assume a synchronous sequential system with two
inputs A and B, and a single output Z. All these variables are initially equal to zero.
Let us suppose the following operation:
The variable Z is set to one when A and B are set to one.
The variable Z is set to zero when A and B are set to zero.
For both cases, if only one variable change, Z keeps whatever value it had.
Assuming the following inputs A and B and since the sequential system is synchronous,
the timing diagram of Z would be :
Basic concepts
Example 2‐ SINCHRONOUS: Let us assume a synchronous sequential system with two
inputs A and B, and a single output Z. All these variables are initially equal to zero.
Let us suppose the following operation:
The variable Z is set to one when A and B are set to one.
The variable Z is set to zero when A and B are set to zero.
For both cases, if only one variable change, Z keeps whatever value it had.
Assuming the following inputs A and B and since the sequential system is synchronous,
the timing diagram of Z would be :
6
14/02/2023
Memory elements in digital systems:
A one bit of memory BISTABLES
A group of bistables (group of bits) REGISTERS
A group of registers (data) MEMORIES
Within the group of bistables, there are different classes:
SR bistable (bistable asynchronous latch).
D flip‐flop (bistable synchronous flip‐flop).
JK bistable (bistable synchronous). (Not covered)
D‐SR bistable (synchronous with asynchronous combination).
SR D D‐SR
bistable bistable bistable
7
14/02/2023
SR bistable
Lesson 6: SR Bistable
SR bistable (Asynchronous)
Inputs:
It has two inputs that allow you to control the value
to be memorized. These inputs are called Set (S)
and Reset (R).
It works by level.
Outputs:
It has two outputs Q y in which a binary value is
Q
memorized according to the asynchronous inputs S
y R (level sensitive).
8
14/02/2023
Lesson 6: SR Bistable
SR bistable (Asynchronous)
Truth table: SR circuit:
Timing diagram
Lesson 6: SR Bistable
SR bistable (Asynchronous)
Truth table: SR circuit:
Timing diagram
9
14/02/2023
Lesson 6: SR Bistable
SR bistable (Asynchronous) (negative logic)
Truth table SR Circuit
SR
bistable
Timing diagram
Lesson 6: SR Bistable
SR bistable (Asynchronous)
Class exercise
10
14/02/2023
Lesson 6: SR Bistable
SR bistable (Asynchronous)
Class exercise (Solution)
D bistable
11
14/02/2023
Lesson 6: D Bistable
D bistable (Synchronous)
Technical features:
It is a synchronous bistable. That means, the output is
updated according to an input named trigger (clock).
It works by edge detection.
For this case, every time there is a rising edge, the value
of input D is passed to output Q.
Truth table:
without
Lesson 6: D Bistable
D bistable (Synchronous)
Special case:
What happens when the rising edge of the clock signal
coincides with the falling edge of the D signal?
Don’t panic!! The clock is considered to be always faster,
so at the output we have Dt‐1.
12
14/02/2023
Lesson 6: D Bistable
D bistable (Synchronous)
D Circuit:
Although the external appearance
looks like an RS bistable, the internal
implementation is more complex.
Lesson 6: D Bistable
D bistable (Synchronous) (negative logic)
Truth table:
D
bistable
without
13
14/02/2023
Lesson 6: D Bistable
D bistable (Synchronous)
Class exercise
Lesson 6: D Bistable
D bistable (Synchronous)
Class exercise (solution)
14
14/02/2023
D-SR bistable
Inputs:
R, if it is activated the output Q is zero.
S, if it is activated the output Q is one.
D, it is the value which update Q when a rising edge is produced in T.
T or synchronism signal (clock).
15
14/02/2023
The complexity is higher since it
is necessary to add a pair of
NAND gates on the internal S‐R
signals.
16
14/02/2023
without
Remember that the
inputs S and R have
priority over T (clock)
and D.
17
14/02/2023
Design of circuits
with multiple
bistables
18
14/02/2023
Example 1: timing diagram analysis for Q1, Q2 and Q3
D‐SR SR D‐SR
bistable bistable bistable
Steps:
Analyse the influence of external signals (in this case R and T)
See how those changes affect the outputs of each bistable
Example 1: timing diagram analysis for Q1, Q2 and Q3
D‐SR SR D‐SR
bistable bistable bistable
Steps:
Analyse the influence of external signals (in this case R and T)
See how those changes affect the outputs of each bistable
19
14/02/2023
Example 1: timing diagram analysis for Q1, Q2 and Q3
D‐SR SR D‐SR
bistable bistable bistable
Example 1: timing diagram analysis for Q1, Q2 and Q3
D‐SR SR D‐SR
bistable bistable bistable
20
14/02/2023
Example 1: timing diagram analysis for Q1, Q2 and Q3
D‐SR SR D‐SR
bistable bistable bistable
Example 1: timing diagram analysis for Q1, Q2 and Q3
D‐SR SR D‐SR
bistable bistable bistable
21
14/02/2023
Example 1: timing diagram analysis for Q1, Q2 and Q3
D‐SR SR D‐SR
bistable bistable bistable
Synchronous and Asynchronous
D‐SR SR D‐SR
bistable bistable bistable
22
14/02/2023
Synchronous and Asynchronous
D‐SR SR D‐SR
bistable bistable bistable
Example 2: draw the signal A
We have to take into account the
signal T (clock) and the feedback D. D‐SR
bistable
A t
23
14/02/2023
Example 2: draw the signal A
We have to take into account the
signal T (clock) and the feedback D. D‐SR
bistable
Example 2: draw the signal A
We have to take into account the
signal T (clock) and the feedback D. D‐SR
bistable
This produces a change in the output
24
14/02/2023
Example 3: analysis A, B and C
The most important
characteristics must be evaluated
first and then the evolution of
outputs A, B and C.
IMPORTANT: take into account the
negative logic.
Example 3: analysis A, B and C
25
14/02/2023
Example 3: analysis A, B and C
A t
B t
C t
Example 3: analysis A, B and C
This produces a change in the
output
26
14/02/2023
Example 3: analysis A, B and C
This produces a change in the
output
Example 3: analysis A, B and C
This produces a change in the
output
27
14/02/2023
Example 4: analysis Y1, Y2, Y3 and Y4
Example 4: analysis Y1, Y2, Y3
and Y4
28
14/02/2023
Example 4: analysis Y1, Y2, Y3
and Y4
Example 4: analysis Y1, Y2, Y3
and Y4
29
14/02/2023
Example 4: analysis Y1, Y2, Y3
and Y4
Example 4: analysis Y1, Y2, Y3
and Y4
30
14/02/2023
Example 4: analysis Y1, Y2, Y3
and Y4
Draw the timing diagram Y1 ,
Y1 , Y1 and Y4, but now using
negative edges for T (15
minutes. Only PDFs are
accepted).
31
14/02/2023
Bistables in VHDL
Introduction
The Quartus Prime has some bistable implementations:
RS bistable: norltch, nandltch.
D‐SR Bistable: DFF, DFF2.
Commercial bistables: 7474,…
32
14/02/2023
Introduction
We can also define our own bistables: using schematics or in VHDL.
As support material, you have available several bistables in VHDL on the
eStudy platform:
SR bistable: RS_FF.
D bistable: D_FF.
D‐SR bistables: DRS_FF
SR bistable in VHDL
SR
bistable
33
14/02/2023
D bistable in VHDL
D
bistable
D‐SR bistable in VHDL
D‐SR
bistable
34
14/02/2023
Introduction
We can also define our own bistables: using schematics or in VHDL.
As support material, you have available several bistables in VHDL on the
eStudy platform:
TO WORK WITH THE BISTABLES AVAILABLE IN ESTUDY:
SR bistable: RS_FF.
You have to: (i) copy the .vhdl
D bistable: D_FF. file(s) to the project folder, (ii) add it to the project, (iii) select it
(compile), (iv) define a symbol for the bistable, and (v) use it in any schematic project.
D‐SR bistables: DRS_FF
Simulation of circuits
with bistables
35
14/02/2023
SR bistable: theory vs practice
Circuit to simulate
Theoretical outputs
SR bistable: theory vs practice
Circuit to simulate
In the simulation, the University Program VWF sometimes does not give the
expected results with undetermined values in the in outputs. Furthermore, R=S=1
cannot be synthesized in reality and the value will depend on the specific
implementation of the circuit.
Theoretical outputs
36
14/02/2023
SR bistable: theory vs practice
D‐SR bistable: theory vs practice
Circuit to simulate
Theoretical outputs
37
14/02/2023
D‐SR bistable: theory vs practice
QUARTUS: simulation
of circuits with
bistables
38
14/02/2023
QUARTUS: Example 1
QUARTUS: Example 1
39
14/02/2023
QUARTUS: Example 1
40