No Slide Title

Download Report

Transcript No Slide Title

MC542
Organização de Computadores
Teoria e Prática
2006
Prof. Paulo Cesar Centoducatte
[email protected]
www.ic.unicamp.br/~ducatte
MC542
1S2006
1.1
MC542
Circuitos Lógicos
Introdução a Circuitos Lógicos
“Fundamentals of Digital Logic with VHDL
Design” - (Capítulo 2)
MC542
1S2006
1.2
Introdução a Circuitos Lógicos
Sumário
•
•
•
•
•
•
•
Variáveis e Funções
Funções AND, Or e NOT
Funções Complexas
Tabela Verrdade
Portas e Redes Lógicas
Algebra Booleana
Síntese Usando AND, OR e NOT
•
•
Exemplos
Introdução a Ferramentas de CAD
–
–
MC542
Soma-de-Produto
Produto-de-Soma
1S2006
1.3
Variáveis e Funções
Analogia com chaves controladas
x = 0
x = 1
Two states of a switch
S
x
Symbol for a switch
MC542
1S2006
1.4
Variáveis e Funções
S
Battery
x
L
Light
A light controlled by a switch
MC542
1S2006
1.5
Variáveis e Funções - Funções Simples
AND e OR
Power
supply
S
S
x
x
1
2
L
Light
L
Light
The logical AND function
S
x
Power
supply
1
S
x
2
The logical OR function
MC542
1S2006
1.6
Variáveis e Funções - Funções Complexas
S
Power
supply
x1
S
S
x3
L
Light
x2
A series-parallel connection
MC542
1S2006
1.7
Variáveis e Funções
NOT
R
Power
supply
x
S
L
An inverting circuit
MC542
1S2006
1.8
Tabela Verdade
A truth table for AND and OR
MC542
1S2006
1.9
Tabela Verdade
Three-input AND and OR
MC542
1S2006
1.10
Portas Lógicas (ou gates)
x1
x2
x1
x2
x1 ×x2 ××xn
x1 ×x2
xn
AND gates
x1
x2
x1
x2
x1 + x2 + + xn
x1 + x2
xn
OR gates
x
x
NOT gate
MC542
1S2006
1.11
Rede Lógica
x
1
x
2
x
3
f = (x + x ) ×x
1
2
3
An OR-AND function
Rede de portas
Circuito lógico
MC542
1S2006
1.12
Análise de uma Rede Lógica
x
x
0 01 1
1 10 0
1
A
0 00 1
0 10 1
f
B
2
Network that implements
f = x + x ×x
1
x
x
f (x , x )
0
0
0
1
1
1
1
0
0
1
1
1
1
2
1
Truth table for
MC542
11 0 1
1
2
2
f
1S2006
1.13
Diagrama de Tempo
1
x
1 0
x 1
2 0
A
1
0
B
1
0
f
1
0
MC542
Tempo
1S2006
1.14
Redes Lógicas Funcionalmente Equivalentes
x
1
x
2
0 01 1
11 00
11 0 1
0 10 1
g
g = x +x
1 2
x
1
x
2
0 01 1
1 10 0
A
0 10 1
0 00 1
11 0 1
f
B
f = x + x ×x
1
MC542
1
2
1S2006
1.15
Algebra Booleana
Axiomas, Teoremas e Propriedades
Demonstração: Indução Perfeita; Manipulação Algébrica e
Gráfica (Diagrama de Venn)
MC542
1S2006
1.16
Prova do teorema de DeMorgan
x.y = x + y
Indução Perfeita
MC542
1S2006
1.17
Diagrama de Venn
Precedência dos Operadores
1. Not
2. AND
3. OR
MC542
1S2006
1.18
Síntese Usando Portas And, OR e Not
A function to be synthesized
1. Implemente cada 1 da tabela verdade com um AND e Nots
2. Faça um OR dos circuitos criados em 1.
3. Opcional: simplifique a função
Soma de Produtos
MC542
1S2006
1.19
Síntese Usando Portas And, OR e Not
x1
x2
f
Canonical sum-of-products
x1
f
x2
Minimal-cost realization
MC542
1S2006
1.20
Síntese Usando Portas And, OR e Not
A function to be synthesized
1. Implemente cada 0 da tabela verdade com um OR e Nots
2. Faça um AND dos circuitos criados em 1.
3. Opcional: simplifique a função
Produto de Somas
MC542
1S2006
1.21
Soma-de-Produtos e Produtos-de-Soma
(SoP e PoS)
• Mintermos e Maxtermos
– Mintermo: Implementa um “1” da tabela verdade
– Maxtermo: Implementa um “0” da tabela verdade
• Forma canônica:
– de Mintermos: a expressão que representa a função possui todos os
mintermos (não simplificada)
– de Maxtermos: a expressão que representa a função possui todos
os maxtermos (não simplificada)
MC542
1S2006
1.22
Numeração de Mintermos e Maxtermos
Three-variable Minterms and Maxterms
MC542
1S2006
1.23
Exemplo
A three-variable function
MC542
1S2006
1.24
x2
f
x3
x1
A minimal sum-of-products realization
x1
x3
f
x2
A minimal product-of-sums realization
MC542
Two realizations of a function
1S2006
1.25
Exemplo
Assuma que temos um salão com três portas e próximo
a cada uma delas temos uma chave para acender/apagar
a luz. Projete o circuito de controle que acende/apaga a
luz do salão.
Solução:
• x1; x2 e x3 váriaveis que indicam o estado das chaves 1, 2 e 3 (1 ->
fechada; 0 -> aberta)
• Monte a tabela verdade que representa a função desejada, ié: ao
acionarmos uma chave (mudar seu estado) se a luz está apagada ela
acende e vice-versa
• Sintetize o circuito de controle
MC542
1S2006
1.26
Exemplo: tabela verdade
Truth table for a three-way light
controller
MC542
1S2006
1.27
Exemplo
f
x
1
x
2
x
3
SOP implementation of the three-way light controller
MC542
1S2006
1.28
Exemplo
x
3
x
2
x
1
f
POS implementation of the three-way light controller
MC542
1S2006
1.29
Multiplexador
s x1 x2
f (s, x1, x2)
000
0
001
0
010
1
011
1
100
0
101
1
110
0
111
1
Truth table
x1
f
s
x2
Circuit
s
s
x1
0
x2
1
f
Graphical symbol
MC542
f (s, x1, x2)
0
x1
1
x2
More compacttruth-tablerepresentation
1S2006
1.30
Ferramenta de CAD
Expecificação da função por Forma de Onda
Screen capture of the Waveform Editor
MC542
1S2006
1.31
Ferramenta de CAD
Expecificação da função por edição gráfica
Screen capture of the Graphic Editor
MC542
1S2006
1.32
VHDL
• Very High Speed Integrated Circuit Hardware
Description Language
– V(VHSIC)HDL
– Programa do Departamento de Defesa dos USA – 1980
– 1983 – Inicio do desenvolvimento de VHDL (IBM, Texas
Instruments e Interrmetrics)
– 1987 – VHDL adotado como padrão IEEE (IEEE-1076)
– 1993 – Revisão (IEEE-1164)
– ……
MC542
1S2006
1.33
Ferramenta de CAD
Expecificação da função usando HDL
VHDL
x1
x2
f
x3
A simple logic function and corresponding VHDL code
MC542
1S2006
1.34
Ferramenta de CAD
Expecificação da função usando HDL
VHDL
VHDL code for a four-input function
MC542
1S2006
1.35
x1
x3
f
x2
g
x4
MC542
Logic circuit for four-input function
1S2006
1.36