MC 542 Organizao de Computadores Teoria e Prtica

  • Slides: 36
Download presentation
MC 542 Organização de Computadores Teoria e Prática 2006 Prof. Paulo Cesar Centoducatte@ic. unicamp.

MC 542 Organização de Computadores Teoria e Prática 2006 Prof. Paulo Cesar Centoducatte@ic. unicamp. br www. ic. unicamp. br/~ducatte MC 542 1 S 2006 1. 1

MC 542 Circuitos Lógicos Introdução a Circuitos Lógicos “Fundamentals of Digital Logic with VHDL

MC 542 Circuitos Lógicos Introdução a Circuitos Lógicos “Fundamentals of Digital Logic with VHDL Design” - (Capítulo 2) MC 542 1 S 2006 1. 2

Introdução a Circuitos Lógicos Sumário • • Variáveis e Funções AND, Or e NOT

Introdução a Circuitos Lógicos Sumário • • Variáveis e 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 – – MC 542 Soma-de-Produto-de-Soma 1 S 2006 1. 3

Variáveis e Funções Analogia com chaves controladas x = 0 x = 1 Two

Variáveis e Funções Analogia com chaves controladas x = 0 x = 1 Two states of a switch S x Symbol for a switch MC 542 1 S 2006 1. 4

Variáveis e Funções S Battery x L Light A light controlled by a switch

Variáveis e Funções S Battery x L Light A light controlled by a switch MC 542 1 S 2006 1. 5

Variáveis e Funções - Funções Simples AND e OR Power supply S S x

Variáveis e Funções - Funções Simples AND e OR Power supply S S x x 1 2 L Light The logical AND function S x Power supply 1 S x 2 The logical OR function MC 542 1 S 2006 1. 6

Variáveis e Funções - Funções Complexas S Power supply x 1 S S x

Variáveis e Funções - Funções Complexas S Power supply x 1 S S x 3 L Light x 2 A series-parallel connection MC 542 1 S 2006 1. 7

Variáveis e Funções NOT R Power supply x S L An inverting circuit MC

Variáveis e Funções NOT R Power supply x S L An inverting circuit MC 542 1 S 2006 1. 8

Tabela Verdade A truth table for AND and OR MC 542 1 S 2006

Tabela Verdade A truth table for AND and OR MC 542 1 S 2006 1. 9

Tabela Verdade Three-input AND and OR MC 542 1 S 2006 1. 10

Tabela Verdade Three-input AND and OR MC 542 1 S 2006 1. 10

Portas Lógicas (ou gates) x 1 x 2 x 1 × x 2 ×

Portas Lógicas (ou gates) x 1 x 2 x 1 × x 2 × ¼ × xn x 1 × x 2 xn AND gates x 1 x 2 x 1 + x 2 + ¼ + xn x 1 + x 2 xn OR gates x MC 542 x NOT gate 1 S 2006 1. 11

Rede Lógica x 1 x 2 x 3 f = (x + x )

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 MC 542 1 S 2006 1. 12

Análise de uma Rede Lógica x x 0® 0® 1® 1® 0® 0 1

Análise de uma Rede Lógica x x 0® 0® 1® 1® 0® 0 1 A 2 Network that implements f = x +x ×x 1 x x f (x , x ) 0 0 0 1 1 1 1 2 1 Truth table for MC 542 f B 0® 0® 0® 1® 0® 1 1® 1® 0® 1 1 2 2 f 1 S 2006 1. 13

Diagrama de Tempo 1 x 1 0 x 1 2 0 A 1 0

Diagrama de Tempo 1 x 1 0 x 1 2 0 A 1 0 B 1 0 f 1 0 MC 542 Tempo 1 S 2006 1. 14

Redes Lógicas Funcionalmente Equivalentes x 1 x 2 0® 0® 1® 1® 0® 0

Redes Lógicas Funcionalmente Equivalentes x 1 x 2 0® 0® 1® 1® 0® 0 1® 1® 0® 1 g g = x +x 1 2 x 1 x 2 0® 0® 1® 1® 0® 0 A 0® 1® 0® 1 0® 0® 0® 1 1® 1® 0® 1 f B f = x +x ×x 1 MC 542 1 2 1 S 2006 1. 15

Algebra Booleana Axiomas, Teoremas e Propriedades Demonstração: Indução Perfeita; Manipulação Algébrica e Gráfica (Diagrama

Algebra Booleana Axiomas, Teoremas e Propriedades Demonstração: Indução Perfeita; Manipulação Algébrica e Gráfica (Diagrama de Venn) MC 542 1 S 2006 1. 16

Prova do teorema de De. Morgan x. y = x + y Indução Perfeita

Prova do teorema de De. Morgan x. y = x + y Indução Perfeita MC 542 1 S 2006 1. 17

Diagrama de Venn Precedência dos Operadores 1. Not 2. AND 3. OR MC 542

Diagrama de Venn Precedência dos Operadores 1. Not 2. AND 3. OR MC 542 1 S 2006 1. 18

Síntese Usando Portas And, OR e Not A function to be synthesized 1. Implemente

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 MC 542 1 S 2006 1. 19

Síntese Usando Portas And, OR e Not x 1 x 2 f Canonical sum-of-products

Síntese Usando Portas And, OR e Not x 1 x 2 f Canonical sum-of-products x 1 f x 2 Minimal-cost realization MC 542 1 S 2006 1. 20

Síntese Usando Portas And, OR e Not A function to be synthesized 1. Implemente

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 MC 542 1 S 2006 1. 21

Soma-de-Produtos e Produtos-de-Soma (So. P e Po. S) • Mintermos e Maxtermos – Mintermo:

Soma-de-Produtos e Produtos-de-Soma (So. P e Po. S) • 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) MC 542 1 S 2006 1. 22

Numeração de Mintermos e Maxtermos Three-variable Minterms and Maxterms MC 542 1 S 2006

Numeração de Mintermos e Maxtermos Three-variable Minterms and Maxterms MC 542 1 S 2006 1. 23

Exemplo A three-variable function MC 542 1 S 2006 1. 24

Exemplo A three-variable function MC 542 1 S 2006 1. 24

x 2 f x 3 x 1 A minimal sum-of-products realization x 1 x

x 2 f x 3 x 1 A minimal sum-of-products realization x 1 x 3 f x 2 A minimal product-of-sums realization MC 542 Two realizations of a function 1 S 2006 1. 25

Exemplo Assuma que temos um salão com três portas e próximo a cada uma

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: • x 1; x 2 e x 3 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 MC 542 1 S 2006 1. 26

Exemplo: tabela verdade Truth table for a three-way light controller MC 542 1 S

Exemplo: tabela verdade Truth table for a three-way light controller MC 542 1 S 2006 1. 27

Exemplo f x 1 x 2 x 3 SOP implementation of the three-way light

Exemplo f x 1 x 2 x 3 SOP implementation of the three-way light controller MC 542 1 S 2006 1. 28

Exemplo x 3 x 2 x 1 f POS implementation of the three-way light

Exemplo x 3 x 2 x 1 f POS implementation of the three-way light controller MC 542 1 S 2006 1. 29

Multiplexador s x 1 x 2 f (s, x 1, x 2) 000 0

Multiplexador s x 1 x 2 f (s, x 1, x 2) 000 0 001 0 010 1 011 1 100 0 101 1 110 0 111 1 Truth table x 1 f s x 2 Circuit s s x 1 0 x 2 1 f Graphical symbol MC 542 f (s, x 1, x 2) 0 x 1 1 x 2 More compacttruth-tablerepresentation 1 S 2006 1. 30

Ferramenta de CAD Expecificação da função por Forma de Onda Screen capture of the

Ferramenta de CAD Expecificação da função por Forma de Onda Screen capture of the Waveform Editor MC 542 1 S 2006 1. 31

Ferramenta de CAD Expecificação da função por edição gráfica Screen capture of the Graphic

Ferramenta de CAD Expecificação da função por edição gráfica Screen capture of the Graphic Editor MC 542 1 S 2006 1. 32

VHDL • Very High Speed Integrated Circuit Hardware Description Language – V(VHSIC)HDL – Programa

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) – …… MC 542 1 S 2006 1. 33

Ferramenta de CAD Expecificação da função usando HDL VHDL x 1 x 2 f

Ferramenta de CAD Expecificação da função usando HDL VHDL x 1 x 2 f x 3 A simple logic function and corresponding VHDL code MC 542 1 S 2006 1. 34

Ferramenta de CAD Expecificação da função usando HDL VHDL code for a four-input function

Ferramenta de CAD Expecificação da função usando HDL VHDL code for a four-input function MC 542 1 S 2006 1. 35

x 1 x 3 f x 2 g x 4 MC 542 Logic circuit

x 1 x 3 f x 2 g x 4 MC 542 Logic circuit for four-input function 1 S 2006 1. 36