EEE3822 – Digital Systems
(Topic: Introduction to Digital Systems)
Fakhrul Zaman Rokhani, PhD, PEng, PTech
Associate Professor
Dept. of Computer & Communication Systems Engineering, Faculty of
Engineering
System-on-Chip Research Center of Excellence (SoC-RCoE)
Malaysian Research Institute on Ageing (MyAgeingTM)
Halal Product Research Institute (HPRI)
Universiti Putra Malaysia
[email protected]Review of Digital Logic and Systems
Review of Digital
Logic and Systems
2
What have we learnt so far?
• Logic function / circuit design
• Basic logic gates
• Number representation / Arithmetic Circuits
• Truth table, SOP / POS
• Optimization – K. Map, Boolean Algebra
• Flip-flop, registers, counter, arithmetic circuits
• Encoder/ Decoder, Mux/Demux, Comparator
• IC Logic families
• Interfacing - ADC / DAC
3
What will we learn in this course?
• Design of Digital Systems using FPGA (Field Programmable
Gate Array)
– How to design? System Specification Physical Design
– How to write effective RTL code for the design? Verilog Coding
Style, Synthesizeable Design
– How to ensure your design work? Simulation, Testing Strategies
• Synchronous and Asynchronous Design Methodology – State
machine, ASM etc.
• Analysis of digital systems
• Testing of digital systems
4
Digital System Design Hierarchy
• Two types of digital logic design
– Combinatorial logic circuits
• No registers, only gates (no memory elements)
• Current output only depends on CURRENT input
• Based on binary logic (AND, OR, NOT)
– Sequential logic circuits
• Has registers (contains memory elements)
• Current output depends on CURRENT and PAST input
5
Ways of Hardware Design
• Dramatic changes in the way industry
does hardware design
– Pervasive use of Computer-Aided Design
tools
• De-emphasis on hand design methods
• Emphasis on abstract design representations
• Hardware design begins to look like software
design
– Emergence of Rapid Implementation
Circuit technology
• Programmable rather than discrete logic: PLD,
FPGA
– Importance of sound design
methodologies
• Synchronous Designs
• Rules of Composition
6
The Elements of Modern Design
Design Representations
Behaviors
Blocks
Waveforms
Gates
Truth Tables
Boolean Algebra
Switches Rapid Prototyping Technologies
Simulation, Synthesis PAL, PLA, ROM, PLD, FPGA
MOS
Computer-Aided Design
TTL
Circuit
Technologies
7
What is a digital system?
• A digital system is a system in which signals have a finite number of discrete
values
• In contrast with analog system in which signals have values from a
continuous (infinite) set
• In digital signals, time may also be discretized, so that signals may change
only at discrete instants, this type of systems is known as synchronous
signals, whereas those in which changes may occur at any instant are called
asynchronous
8
Let’s Begin Thinking Digital
9
Examples of Systems (1/2)
Analog System
Low Pass
Filter
Input signal x Output signal y
Input System Output
10
Examples of Systems (2/2)
Digital System
C
B
AND Function Output signal
Input signals
Input System Output
11
Digital vs. Analog System (1/2)
Voltage
Time, t
– Measure voltage:
• at specific times
• 12
Digital Systems Example
Design an Alarm System for Car
• Spec: (When ignition is ON) AND (Door is OPEN) Alarm is ON!
• Ignition is either ON or OFF
• Ignition Circuit: 5 Volt signal or 0 Volt
• Ignition is a Binary variable: Value 1 or Value 0
• Ignition ON: Logically a TRUE value. Ignition OFF: FALSE
• Door is either OPEN or SHUT. 0 or 1; TRUE or FALSE
• Alarm is also Binary: Alarm is ON or OFF
13
Digital Design & Implementation Issues
• Area, Speed (delay), power, time-to-develop
• Minimize area: Minimize or Optimize Logic (Gates)
• Maximize Speed: Reduce Signal Delay (Tricky)
• Reliability: Related to Target Technology
• Cost of manufacturing: Related to Target Technology and to
Design Methodology
• Rapid Prototyping: Use of CAD/CAE Tools...
• We will study all of these!
14
Digital vs. Analog System (2/2)
Advantages digital: Disadvantages digital:
– easier to design – the real world is
– easier to program analog
– faster processing – need AD/DA
converter
– greater precision
– added complexity
– greater range
– extra time
– memory function
– error handling
– less sensitive to noise, temperature, ...
– cheap
15
Digital Design (1/4)
• Different levels of representation
• Example: Multiplexer design
– Transistor-level circuit diagram
VCC
Multiplexer design using
CMOS transmission gates
B
16
Digital Design (2/4)
• Truth table S A B Z
0 0 0 0
– To describe the logic function
0 0 1 0
of a multiplexer
0 1 0 1
0 1 1 1
– Lists all possible combinations
1 0 0 0
of input values and the
1 0 1 1
corresponding output values
1 1 0 0
1 1 1 1
• Equation
– Use Boolean algebra and well understood minimization methods to
derive
Z = S'an .optimal
A + Stwo-level
. B AND-OR equation
17
Digital Design (3/4)
– Logic diagrams
– Prepackaged building blocks
• 74x157 an MSI that performs
multiplexing on two 4-bit inputs
simultaneously
18
Digital Design (4/4)
module mux
• Various hardware title 'Two-input multiplexer example'
MUX device 'P16V8'
description A, B, S pin 1, 2, 3;
Z pin 13 istype 'com';
languages equations
WHEN S == 0 THEN Z = A; ELSE Z = B;
– ABEL end mux
– Verilog Library IEEE;
use IEEE.std_logic_1164.all;
– VHDL entity Vmux is
port ( A, B, S: in STD_LOGIC;
Z: out STD_LOGIC );
end Vmux;
architecture Vmux_arch of Vmux is
begin
Z <= A when S = '0' else B;
end Vmux_arch;
19
Digital Devices: Gates
• Gates:
– Have one or more inputs and produce an output that is a function of the
current input value(s)
– All inputs and outputs are binary, can take the values 0 or 1
– Are combinational circuits because the output only depends on the
current input combination
• Digital circuits are created by using a number of connected gates such as the
output of a gate is connected to the input of one or more gates in such a
way to achieve specific outputs for input values
• Digital or logic design is concerned with the design of such circuits
20
Logic Gates
Symbol set 1 Symbol set 2
(ANSI/IEEE Standard 91-1984)
a a
AND a.b & a.b
b b
a a
OR a+b 1 a+b
b b
NOT a 1 a'
a a'
a a
(a.b)' & (a.b)'
NAND b b
a a
NOR (a+b)' 1 (a+b)'
b b
a a
EXCLUSIVE OR ab =1 ab
b b
21
Truth Table
• Provides a listing of every possible combination of
binary input values and the corresponding outputs of a
digital circuit
• Example (2 inputs, 2 outputs):
Inputs Outputs
Inputs Outputs
x y x.y x+y
x x.y
0 0 0 0 Digital
y circuit x+y
0 1 0 1
1 0 0 1
1 1 1 1
22
Logic Gates: The Inverter
• NOT operation truth table and circuit symbol
A f A NOT gate
f A
0 1 A Presence of small circle
1 0
denotes inversion
Truth table Circuit symbol
23
Logic Gates: AND
• AND operation truth table and circuit symbol
Output f is at logic 1 A B f = A B
ONLY when all the
0 0 0
inputs are at logic 1.
0 1 0
The output f is 0 for
1 0 0
other input
1 1 1 AND gate
combinations
Truth table Circuit symbol
24
Logic Gates: OR
• OR operation truth table and circuit symbol
Output f is at logic 1 A B f = A+B
when at least one of 0 0 0 A f= A+ B
the inputs is at logic 1. 0 1 1
The output f is 0 1 0 1 B
when both the inputs 1 1 1
are 0.
Truth table Circuit symbol
25
Logic Gates: NOR
• NOR operation truth table and circuit symbol
A f A B
OR NOR B
A B f A B f A B Denotes
inversion
0 0 0 1
0 1 1 0
1 0 1 0
A f A B
1 1 1 0
B
Truth table
Equivalent circuit
NOR Negative-AND
26
Logic Gates: NAND
• NAND operation truth table and circuit symbol
A f A B
AND NAND B
A B f A. B f A. B
Denotes
0 0 0 1 inversion
0 1 0 1
1 0 0 1
1 1 1 0 A f A B
Truth table B
Equivalent circuit
NAND Negative-OR
27
Logic Gates: XOR
• XOR operation truth table and circuit symbol
A B f AB
0 0 0 A f AB
0 1 1
B
1 0 1
1 1 0 XOR gate
Truth table Circuit symbol
28
Logic Gates: XNOR (Exclusive NOR)
• XNOR operation truth table and circuit symbol
A B f A B
A
0 0 1
f
0 1 0
1 0 0
B
1 1 1 XNOR gate
Truth table Circuit symbol
29
Realizing Logic in Hardware
• Boolean algebra and truth tables are important tools to express logical
relationships
– There are two logic values: TRUE and FALSE (T or F)
• In digital electronic circuits, T and F are represented by voltage levels, HIGH
and LOW (H and L)
– The Transistor-Transistor Logic (TTL) 74LS family of digital integrated circuits produces
two voltage levels:
• 0 - 0.8V represents low voltage (L)
• 2.2 - 5.0V represents high voltage (H)
• Two different assignments of signal levels to logic values:
– Positive logic: - Negative logic:
H=1 H=0
L=0 L=1
30
Positive / Negative Logic
X Y Z
L L L
L H L X CMOS
Z
H L L Y Gate
H H H
(a) Truth table (b) Gate block diagram
with H and L
X Y Z
0 0 0 X
Z
0 1 0 Y
1 0 0
1 1 1
(c) Truth table (d) Positive-logic
for positive logic AND gate
X Y Z
X
1 1 1 Z
Y
1 0 1
0 1 1
0 0 0
(e) Truth table (f) Negative-logic
for negative logic OR gate
31
Integrated Circuits (ICs)
• An IC is a silicon semiconductor crystal (chip) that
contains the electronic components of digital gates
• Chip is mounted in a ceramic or plastic container
• Connections are welded from the chip to external pins
• Number of pins varies (depending on the chip’s
functionality)
32
Levels of Integration (1/2)
• Small-scale Integration (SSI)
– Several independent gates (<10) per package
• Medium-scale Integration (MSI)
– Between 10-100 gates per chip. Perform basic digital functions, e.g. 4-bit addition
• Large-scale Integration (LSI)
– Between 100 and a few thousands of gates per chip. Implement digital systems, e.g. small
processors and memories
• Very Large-scale Integration (VLSI)
– Several thousands to over 100 million transistors per chip, e.g. complex microprocessors
• Ultra large scale integration (ULSI)
– Over 100,000,000 transistors on a chip
33
Levels of Integration (2/2)
Complex systems, functional units
Level Five from levels two through four
Level Four More complex functional logic
unit, e.g. microprocessor Third IC level (VLSI)
Level Three Functional logic unit, e.g. Second IC level
adders, counters, multiplexers (MSI and LSI)
Level Two Functional logic unit, e.g. gates,
NOT, AND, NAND First IC level (SSI)
Electronic components, e.g. Components level
Level One
transistors, diodes, resistors, capacitors
34
Digital Logic Families (1/2)
• ICs are also classified based on their specific device
technology, known as digital logic family
• Each family has its own basic electronic components
(NAND, NOR, and NOT gates), used to build complex
digital circuits
• Various digital logic families have been introduced and
used over the years
35
Digital Logic Families (2/2)
• Digital logic families (in chronological order)
– RTL: Resistor-Transistor Logic
earliest, now obsolete
– DTL: Diode-Transistor Logic
– TTL: Transistor-Transistor Logic -> widely used
– ECL: Emitter-coupled Logic -> high-speed operation
– MOS: Metal-Oxide Semiconductor -> compact
– CMOS: Complementary MOS
-> Low power dissipation, currently the MOST DOMINANT
– BiCMOS: Bipolar CMOS
-> CMOS and TTL for additional current/speed
– GaAs: Gallium-Arsenide -> very high-speed operation
36
Defining Characteristics of Digital Logic Families
• Fan-in
– Number of gate inputs
• Fan-out
– Number of standard loads a gate’s output can drive
• Noise margin
– Max external noise tolerated
• Power dissipation
– Power consumed by the gate (dissipated as heat)
• Propagation delay
– Time required for an input signal change to be observed at
an output line
37
Propagation Delay (1/2)
• One of the most important design parameters
• The maximum propagation delay (tpd) determines the
circuit’s speed
• tPHL: high-to-low propagation time
• tPLH: low-to-high propagation time
• tpd = max(tPHL, tPLH)
38
Propagation Delay (2/2)
Propagation delay
measured at the
IN midpoints of transitions
IN OUT
OUT tPHL tPLH
tpd = max (tPHL, tPLH)
Propagation Delay for an Inverter
39
Terima Kasih | Thank You