0% found this document useful (0 votes)
6 views32 pages

11 Digital Systems

Uploaded by

100450848
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views32 pages

11 Digital Systems

Uploaded by

100450848
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 32

Introduction to

digital systems
Universidad Carlos III de Madrid

http://www.dte.uc3m.es

Electrónica Digital. Grado en Ingeniería en Electrónica Industrial y Automática 1


Outline
 Design of Digital Systems
• Design process of digital systems
• Structure of a digital system:
• Data path
• Control unit

 Integrated Circuits
• Digital Technologies
• ASICs
• Programmable devices
• Microprocessors

http://www.dte.uc3m.es

Electrónica Digital. Grado en Ingeniería en Electrónica Industrial y Automática 2


Digital systems
 A digital system processes digital information
according to a particular algorithm
 Algorithm: a finite sequence of operations to solve a
problem
 Goal of this lesson: introduction to digital systems

http://www.dte.uc3m.es

Electrónica Digital. Grado en Ingeniería en Electrónica Industrial y Automática 3


Structure of a digital system

Din Datapath Dout

Cin Control Unit Cout

http://www.dte.uc3m.es

Electrónica Digital. Grado en Ingeniería en Electrónica Industrial y Automática 4


The Datapath
 Any algorithm can be decomposed in a set of basic
operations:
• Arithmetic
• Logic
• Shift & Rotation
 The datapath is the set of functional units that
process the data
 Typical datapath components:
• ALUs: perform operations
• Registers and memories: store temporal data
• Buses: connect datapath elements
• Multiplexers: select data to be processed every moment
http://www.dte.uc3m.es

Electrónica Digital. Grado en Ingeniería en Electrónica Industrial y Automática 5


Datapath example
 ALU performs operations SR R
• F: ALU function F
A
ALU
B

 SR (Status Register), Flag


SI
bits resulting from the ALU
operation, such as : I

• C: Carry RFA
Register
• O: Overflow
RFB
RD Bank
• Z: Zero
WE

• S: Sign SE

 Immediate operands
provided by I and selected
OE
by SI

E/S
http://www.dte.uc3m.es

Electrónica Digital. Grado en Ingeniería en Electrónica Industrial y Automática 6


Datapath example
 Register bank (triple SR R
port memory) stores F
A
ALU
B
temporal data
SI
 Register selection I
• RFA: Source register A
• RFB: Source register B RFA
RFB
Register
• RD: Destination register
RD
WE
Bank

 I/O for external SE

connection
• SE selects RD input
(external o internal) OE

• OE (Output Enable)
E/S
http://www.dte.uc3m.es

Electrónica Digital. Grado en Ingeniería en Electrónica Industrial y Automática 7


The Control Unit
 Determines the correct application and sequencing
of operations on data
 Typical Control Unit components:
• Finite State Machines
• Counters
• Registers and memories to store control data, etc.

http://www.dte.uc3m.es

Electrónica Digital. Grado en Ingeniería en Electrónica Industrial y Automática 8


Control Unit example
 Example: perform the following computation
y = abs(x1 - x2)/2
 Steps:
• 1. Load x1 in register R1
• 2. Load x2 in register R2
• 3. Subtract x2 from x1 and place the result in register R3
(R3 = R1 – R2).
• If the result is positive, go to step 6. Otherwise, continue with
step 4.
• 4. Complement R3 (R3 = NOT R3)
• 5. Increment R3 (R3 = R3 +1)
• 6. Shift right R3 (R3 = R3/2)
• 7. Send R3 to the output

http://www.dte.uc3m.es

Electrónica Digital. Grado en Ingeniería en Electrónica Industrial y Automática 9


Control Unit example
 FSM of the Control Unit

S=1
S1/P S2/P S3/P S4/P S5/P S6/P S7/P
1 2 3 4 5 6 7

S=0

http://www.dte.uc3m.es

Electrónica Digital. Grado en Ingeniería en Electrónica Industrial y Automática 10


Control Unit example
 FSM outputs

Step ALU RFA SI I RFB RD WE SE OE


Function (F)
1 X X X X X R1 0 1 0
2 X X X X X R2 0 1 0
3 SUBTRACT R1 0 X R2 R3 0 0 0
4 NOT R3 0 X X R3 0 0 0
5 ADD X 1 1 R3 R3 0 0 0
6 SHR R3 0 X X R3 0 0 0
7 X X X X R3 X 1 X 1

http://www.dte.uc3m.es

Electrónica Digital. Grado en Ingeniería en Electrónica Industrial y Automática 11


Digital system implementation

 Discrete components (standard)


• 74xx, 54xx

 Application Specific Integrated circuit: ASICs

 Programmable devices
• PLD, SPLD: (Simple) Programmable Logic Devices
• CPLD: Complex Programmable Logic Devices
• FPGA: Field Programmable Gate Array

 Microprocessors

http://www.dte.uc3m.es

Electrónica Digital. Grado en Ingeniería en Electrónica Industrial y Automática 12


ASICs

 ASIC: Aplication Specific


Integrated Circuit
 Layout: set of necessary
masks for the fabrication of
a circuit. It can be obtained
for any circuit from the
design (logic gates ->
transistors -> masks).

http://www.dte.uc3m.es

Electrónica Digital. Grado en Ingeniería en Electrónica Industrial y Automática 13


ASICs
 Size: small
 Speed: very high
• Board: f < 100 MHz
• FPGA: 500 MHz
• ASIC: f < 3 GHz

 Cost: depends on the number of fabricated units


• Initial cost: design and prototyping (100.000€)
• Cost per unit: 1-200€
• Suitable for big quantities (>10.000 units/year)

 Reliability: High; More inmune to noise


 Power consumption: low

http://www.dte.uc3m.es

Electrónica Digital. Grado en Ingeniería en Electrónica Industrial y Automática 14


Programmable Devices
 Programmable Logic Devices (PLD)
• Characteristics
• Size: medium-high
• Speed: medium (10-500 MHz)
• Unit cost: medium-high
• Simple
• PROM: Programmable Read Only Memory
• PLA: Programmable Logic Array
• PAL: Programmable Array Logic
• GAL: Generic Array Logic
• Complex
• CPLD: Complex Programmable Logic Device
• FPGA: Field Programmable Gate Array

http://www.dte.uc3m.es

Electrónica Digital. Grado en Ingeniería en Electrónica Industrial y Automática 15


Programmable devices
tecnologies
 Floating gate MOS transistor (EPROM-FLASH)
• When transistor gate is overvoltaged, the switch is
permanently open or closed, behaving as programmable
connection
 Static RAM (SRAM)
• Memory can be used as combinational logic
• LUTs (Look-Up Tables): 4, 5, 6 inputs
 Antifuse
• When fused, an antifuse produces a short-circuit.
• Fuses offer lower resistance than diodes used in classic
PLDs, and thus better performance

http://www.dte.uc3m.es

Electrónica Digital. Grado en Ingeniería en Electrónica Industrial y Automática 16


FPGAs
 Field Programmable Gate Arrays
 Designed to overcome CPLD size limitations, using
advanced architectures
 High variety of logic resources
• Combinacional logic
• Sequencial logic
• RAM memory
• Clock managers Manufacturers
• Global signals  Xilinx (AMD???)
• Multipliers  Altera (Intel)
 Actel (Microsemi)
 Atmel (Microchip)
 Lattice
http://www.dte.uc3m.es

Electrónica Digital. Grado en Ingeniería en Electrónica Industrial y Automática 17


Microprocessor
 Microprocessor
• Oriented to implement a wide variety of algorithms
 Components:
• Processing Unit or Central Processing Unit (CPU) performs
the required operations
• General purpose datapath
• Programmable control unit, able to perform many differents
algorithms
• Memory to store information
• Input/Output units for external communication

http://www.dte.uc3m.es

Electrónica Digital. Grado en Ingeniería en Electrónica Industrial y Automática 18


Programmable Control Unit
Desp. Salto
1
 Control words are stored in a Salto
memory D F

• Control words are encoded


+ E
to save space
• Encoded control words are PC
C SI

called instructions O
I
D
 Every clock cycle, an
instruction is read (RI) and Program
I RFA

decoded Memoria
Memory F
RFB
RD
de
 The instruction required for programa I WE

each step is determined by C


the Program Counter (PC). A
SE

• Sequence changes are RI D


implemented by means of
instructions, that can O
dynamically depend on the R OE

SR value

http://www.dte.uc3m.es

Electrónica Digital. Grado en Ingeniería en Electrónica Industrial y Automática 19


Microprocessor
Unidad de Control 1 Desp. Salto Ruta de
Datos
Salto SR R
F
D ALU
A B
+ E
C SI
PC O
I
D
I RFA

Program
Memoria F
RFB
Register
Banco de
RD
de
Memory registros
Bank
programa I WE

C
SE
A
RI D
O
R OE

http://www.dte.uc3m.es
E/S

Electrónica Digital. Grado en Ingeniería en Electrónica Industrial y Automática 20


Basic computer
(Harvard architecture)
Desp. Salto
1 Ruta de
Unidad de Control
Datos
Salto D SR R
F
E ALU
A B
+
C
SI
PC O
I
D
I RFA
Memoria
Program F RFB Banco de
Register
RD
de
Memory registros
Bank
I WE
programa
C
SE
A
RI
D
O
OE
R

WE D A WE A D
Memoria de datos
Data Memory E/S

http://www.dte.uc3m.es

Electrónica Digital. Grado en Ingeniería en Electrónica Industrial y Automática 21


Basic computer
(von Neuman architecture)
Desp. Salto
1 Ruta de
Unidad de Control
Datos
Salto D SR R
F
E ALU
A B
+
C
SI
PC O
I
D
I RFA

F RFB Register
Banco de
RD
registros
Bank
I WE

C
SE
A
RI
D
O
OE
R

Bus de datos
Bus de direcciones

WE D A WE A D
Memoria
Memory (Programa
(Program y Datos)
& Data) E/S
http://www.dte.uc3m.es

Electrónica Digital. Grado en Ingeniería en Electrónica Industrial y Automática 22


Operation of the basic computer.
Instructions
 How are instructions executed?
• Instruction cycle
 What are the main types of instructions?
 How are instructions encoded?
• Instruction format
• Addressing modes

http://www.dte.uc3m.es

Electrónica Digital. Grado en Ingeniería en Electrónica Industrial y Automática 23


Instruction cycle
 Every instruction is typically processed in two steps:
• Instruction fetch: load instruction in IR
• Instruction execution: decode instruction and configure the
datapath to execute the operation specified by the
instruction
 Each of these steps can be executed in a single
clock cycle or in many clock cycles, depending on
the microprocessor’s complexity

http://www.dte.uc3m.es

Electrónica Digital. Grado en Ingeniería en Electrónica Industrial y Automática 24


Types of instructions
 Data transfer instructions
• Transfer data between registers, register and memory, or
register and I/O
 Arithmetic and logical instructions
• Set ALU operations: add, subtract, shift, etc.
 Control flow instructions
• Modify the instruction execution sequence
• Modify PC contents
• Examples: branches, subroutine calls, etc.

http://www.dte.uc3m.es

Electrónica Digital. Grado en Ingeniería en Electrónica Industrial y Automática 25


Instruction format
 Organization of instruction information. Instructions
are typically encoded by fields:
• Operation code (Opcode): specifies the operation to be
performed
• Operands: specifies the data (or where the data is located)
 The number of operands and the size of each field
may vary
 Instruction size must be an integer multiple of
memory width

http://www.dte.uc3m.es

Electrónica Digital. Grado en Ingeniería en Electrónica Industrial y Automática 26


Addressing modes
 Operands can be specified in different ways, called
addressing modes
 Some usual addressing modes:
• Immediate: the operand value is given with the instruction
• Register direct: the instruction gives a register that contains
the operand
• Memory direct: the instruction gives a memory address that
contains the operand
• Indirect: the instruction gives a register that contains the
memory address of the operand

http://www.dte.uc3m.es

Electrónica Digital. Grado en Ingeniería en Electrónica Industrial y Automática 27


Instruction format example
 Consider the microprocessor architecture of the
previous slides with the following parameters:
• Opcode field: 5 bits
• Register bank: 8 registers (direct addressing with 3 bits)
 Instruction format

Opcode OpA OpB OpD Other

http://www.dte.uc3m.es

Electrónica Digital. Grado en Ingeniería en Electrónica Industrial y Automática 28


Instruction examples
Operation Mnemonic Operation Code
(Opcode)
Load data from memory LD 00000
Store data in memory ST 00001
Add ADD 01000
Subtract SUB 01001
NOT NOT 01100
AND AND 01101
OR OR 01110
Shift SHL, SHR 01111
Jump JMP 10000
Subroutine call CALL 10100
Subroutine return RET 10101
... ... ...

http://www.dte.uc3m.es

Electrónica Digital. Grado en Ingeniería en Electrónica Industrial y Automática 29


Instruction examples
 Single word instruction
Opcode RFA RFB RD Other
R3 = R1 + R2
01000 001 010 011 00

 Double word instruction


Opcode RFA RFB RD Other
00000 000 000 011 00 Load R3 with data in memory
position ABCDh
Direccion
1010 1011 1100 1101

http://www.dte.uc3m.es

Electrónica Digital. Grado en Ingeniería en Electrónica Industrial y Automática 30


Assembly language or Assembler
 Machine code (binary instruction codes) is
cumbersome
 Assembly Language or Assembler:
• Instructions are specified as mnemonics
• Operands are specified using symbolic names
 Assembler (application): translate instructions in a
program to their equivalent binary codes
 Example:
Assembly language Assembler Machine code

ADD R1, R2, R3 0100000101001100


Mnemonic Operands

http://www.dte.uc3m.es

Electrónica Digital. Grado en Ingeniería en Electrónica Industrial y Automática 31


References
 Manufacturer sites:
• Xilinx: www.xilinx.com
• Altera (Intel): www.intel.es
• Actel (Microsemi): www.microsemi.com
• Lattice: www.latticesemi.com
• Atmel (Microchip): www.microchip.com
 “Principles of Digital Design”. D. Gajski. Ed. Prentice Hall
 “Fundamentals of Digital Systems”. Thomas L. Floyd. Pearson
Prentice Hall
 “Digital Systems: principles and applications”, Tocci, Ronald J.
Pearson Prentice Hall
 “Dispositivos lógicos programables (PLD): diseño práctico de
aplicaciones”. García Iglesias, José Manuel. RaMa
http://www.dte.uc3m.es

Electrónica Digital. Grado en Ingeniería en Electrónica Industrial y Automática 32

You might also like