Hardware Description Language Aula 2 Prof. Afonso Ferreira Miguel, MSc.

39
Hardware Description Language Aula 2 Prof. Afonso Ferreira Miguel, MSc

Transcript of Hardware Description Language Aula 2 Prof. Afonso Ferreira Miguel, MSc.

Page 1: Hardware Description Language Aula 2 Prof. Afonso Ferreira Miguel, MSc.

Hardware Description Language

Aula 2

Prof. Afonso Ferreira Miguel, MSc

Page 2: Hardware Description Language Aula 2 Prof. Afonso Ferreira Miguel, MSc.

Digital System Design

Functional Design

Register Transfer Level Design

Logic Design

Circuit Design

Physical Design

Description for Manufacture

Behavioral Simulation

RTL Simulation

Requirements

Timing Simulation/Circuit Analysis

Logic Simulation

Design Rule Checking

Page 3: Hardware Description Language Aula 2 Prof. Afonso Ferreira Miguel, MSc.

Digital System Design

Modelo de negócio: Retorno x Tempo

Page 4: Hardware Description Language Aula 2 Prof. Afonso Ferreira Miguel, MSc.

Digital Logic Circuit Definitions

• MOS: metal-oxide-silicon (primeira tecnologia);

• TTL: transistor–transistor logic;

• CMOS: complementary MOS;

• Gates: unidade de medida de densidade de CIs (two-input NAND gate/ four CMOS transistors);

• SSI, MSI, LSI, VLSI: Small, Medium, Large, Veri Large Scale Integration (de portas TTL/CMOS até processadores 64 bits);

• ULSI: Ultra Large Scale Integration;

Page 5: Hardware Description Language Aula 2 Prof. Afonso Ferreira Miguel, MSc.

Digital Logic Circuit Definitions

• ASIC (“a-sick”) application-specific integrated

circuit:different types of ICs different types of applications; (sometimes called ASSPs)

• not ASICs: memory chips ROMs, DRAM, and SRAM; microprocessors; TTL or TTL-equivalent ICs at SSI, MSI, and LSI levels;

• are ASICs: a chip for a toy bear that talks; a chip for a satellite; a chip designed to handle the interface between memory and a microprocessor for a workstation CPU; and a chip containing a microprocessor as a cell together with other logic.

“If you can find it in a data book, then it is probablynot an ASIC, but there are some exceptions.”

Page 6: Hardware Description Language Aula 2 Prof. Afonso Ferreira Miguel, MSc.

Digital Logic Circuit Definitions

• PLD: Programmable logic devices

PLD

SPLD HCPLD

FPGACPLD

PLA PAL

Simple PLD High Capacity PLD

Programmable Logic Array

Programmable Array Logic

Complex PLD Field Programmable Gate Array

Page 7: Hardware Description Language Aula 2 Prof. Afonso Ferreira Miguel, MSc.

Digital Logic Circuit Definitions

• PLD > SPLD– ROM, PROM, EPROM, EEPROM

Page 8: Hardware Description Language Aula 2 Prof. Afonso Ferreira Miguel, MSc.

Digital Logic Circuit Definitions

• PLD > SPLD > PLA (programmable-logic-array): may be configure or programmed to create a part customized to a specific application

Gera funções do tipo SDP – Soma de Produto

Page 9: Hardware Description Language Aula 2 Prof. Afonso Ferreira Miguel, MSc.

Digital Logic Circuit Definitions

Page 10: Hardware Description Language Aula 2 Prof. Afonso Ferreira Miguel, MSc.

Digital Logic Circuit Definitions

• PLD > SPLD > PAL (programmable-array-logic)

• Também gera funções na forma SDP;

• Tecnologia + barata que a PLA, pois são programados apenas as colunas (termos de produto);

Page 11: Hardware Description Language Aula 2 Prof. Afonso Ferreira Miguel, MSc.

Digital Logic Circuit Definitions

• Tecnologia para interconexão lógica– MASC;

– Fuse;

– Anti-fuse;

– open gate (UV-EPROM);

– EEPROM;

– FLASH;

– SRAM.

Page 12: Hardware Description Language Aula 2 Prof. Afonso Ferreira Miguel, MSc.

Digital Logic Circuit Definitions

• PLD > HCPLD > CPLD: Complex PLD (multiple interconnected SPLDs).

Page 13: Hardware Description Language Aula 2 Prof. Afonso Ferreira Miguel, MSc.

Digital Logic Circuit Definitions

• PLD > HCPLD > FPGA: Field programmable gate array

Logic Block

I/O Block

Interconnect

Page 14: Hardware Description Language Aula 2 Prof. Afonso Ferreira Miguel, MSc.

Digital Logic Circuit Definitions

• PLD > HCPLD > FPGA: Field programmable gate array

Page 15: Hardware Description Language Aula 2 Prof. Afonso Ferreira Miguel, MSc.

Digital Logic Circuit Implementation options

• Componentes SSI, MSI, LSI– Custo elevado devido ao grande número de

peças;– Tempo de primeira falha muito pequeno.

• Full-custom VLSI devices (ASIC);

• FPGAs.

Page 16: Hardware Description Language Aula 2 Prof. Afonso Ferreira Miguel, MSc.

Digital Logic Circuit Implementation

• ASIC vs. FPGA– ASIC

• + Lower cost per function for high volume• + Better functional fit• - Design Time• - Nonrecurring engineering cost

– FPGA• + Short design cycle• + Lower cost per function at low volume• - Area penalty• - Slower performance

Page 17: Hardware Description Language Aula 2 Prof. Afonso Ferreira Miguel, MSc.

Digital Logic Circuit Implementation

• ASIC vs. FPGA

• Less expensive at low volume

Volume

Cost

Nonrecurring engineering cost

FPGA

ASIC

Page 18: Hardware Description Language Aula 2 Prof. Afonso Ferreira Miguel, MSc.

Digital Logic Circuit Implementation

FPGA Applications– Glue Logic (replace SSI and MSI parts);– Prototype design;– Dynamic reconfiguration (ISP);– Rapid turnaround;– Emulation;– Custom computing.

Page 19: Hardware Description Language Aula 2 Prof. Afonso Ferreira Miguel, MSc.

HDL - Introdução

• O mundo antes das HDLs

Page 20: Hardware Description Language Aula 2 Prof. Afonso Ferreira Miguel, MSc.

HDL - Introdução

• Tradicional x HDLs

Conversão manualda

descrição do projeto

Page 21: Hardware Description Language Aula 2 Prof. Afonso Ferreira Miguel, MSc.

HDL - Introdução

• HDL - benefícios• Aplicado a vários níveis de abstração

(Interoperability);• Reutilização de código;• Independente de tecnologia

- Application-specific Integrated Circuits (ASICs);- Simple Programmable Logic Devices (SPLDs);- Complex PLDs (CPLDs);- Field-Programmable Gate Arrays (FPGAs).

Page 22: Hardware Description Language Aula 2 Prof. Afonso Ferreira Miguel, MSc.

HDL - Linguagens

• As HDLs mais conhecidas– VHDL– Verilog HDL– AHDL– Abel HDL– PHDL– Handel-C (http://www.celoxica.com)

Page 23: Hardware Description Language Aula 2 Prof. Afonso Ferreira Miguel, MSc.

HDL - Ferramentas

• Algumas ferramentas para HDL (síntese e simulação)– MAXPLUS II

– QUARTUS

– Verilog Mode

– Cypress Warp

– Silos Verilog HDL

– Active-HDL

– Model-Sim

– Synopsys

– Fusion/ViewSim

Page 24: Hardware Description Language Aula 2 Prof. Afonso Ferreira Miguel, MSc.

AHDL – Design Tools

MAXPLUS II

QUARTUS II

Exclusivamente

Page 25: Hardware Description Language Aula 2 Prof. Afonso Ferreira Miguel, MSc.

AHDL

• Modularização

Page 26: Hardware Description Language Aula 2 Prof. Afonso Ferreira Miguel, MSc.

AHDL

• Assinatura (Subdesignd Section)

Page 27: Hardware Description Language Aula 2 Prof. Afonso Ferreira Miguel, MSc.

AHDL

• Assinatura (Subdesignd Section)

Page 28: Hardware Description Language Aula 2 Prof. Afonso Ferreira Miguel, MSc.

AHDL

• Implementado funções lógicas

Page 29: Hardware Description Language Aula 2 Prof. Afonso Ferreira Miguel, MSc.

AHDL

• Pontos intermediários (NÓS)

Page 30: Hardware Description Language Aula 2 Prof. Afonso Ferreira Miguel, MSc.

AHDL

• Exercício 1Implementar e simular um Semi-Somador e um

Somador-Completo no ambiente Quartus II.

Lembrando...•Semi somador:

S = A XOR BC = A AND B

•Somador CompletoS = (A XOR B) XOR CinCout = ((A XOR B) AND Cin) OR (A AND B)

Page 31: Hardware Description Language Aula 2 Prof. Afonso Ferreira Miguel, MSc.

AHDL

• Criando o símbolo de um projetoTools > Create Symbol Files for Entities in Current File

Page 32: Hardware Description Language Aula 2 Prof. Afonso Ferreira Miguel, MSc.

AHDL

• Truth Table

A B S C

0 0 0 0

0 1 1 0

1 0 1 0

1 1 0 1

Page 33: Hardware Description Language Aula 2 Prof. Afonso Ferreira Miguel, MSc.

AHDL

• Exercício 2– Modificar o Somador-Completo para utilizar Truth

Table;

– Criar o símbolo deste módulo;

– Criar um Block Diagram (chamado de SOMA) e incluir um Semi-Somador e dois Somadores-Completos para implementar a função de soma de 3 bits:

– entradas: A2,A1,A0 e B2,B1,B0;

– saídas: Cout, S2,S1,S0.

– Compilar e simular o circuito final;

Page 34: Hardware Description Language Aula 2 Prof. Afonso Ferreira Miguel, MSc.

AHDL

• Incluindo módulos em um arquivo AHDL

1) Abrir arquivo SemiSomador;

2) Tools > Create AHDL Include Files for Entities in Current File;

3) Repetir para o arquivo SomadorCompleto;

4) Incluir no arquivo destino a diretiva “include “nome_do_arquivo.inc”;

5) Adicionar módulos importados na seção Variable.

Page 35: Hardware Description Language Aula 2 Prof. Afonso Ferreira Miguel, MSc.

AHDL

• Array– Entradas e saídas podem ser vetores

– Módulos podem ser vetores também

Page 36: Hardware Description Language Aula 2 Prof. Afonso Ferreira Miguel, MSc.

AHDL

• Array– As atribuições devem

ser com índice

Page 37: Hardware Description Language Aula 2 Prof. Afonso Ferreira Miguel, MSc.

AHDL

• Operação com vetores– Vetores podem ser operados entre vetores do mesmo

tamanho...

– ou com um bit.

Page 38: Hardware Description Language Aula 2 Prof. Afonso Ferreira Miguel, MSc.

AHDL

• Concatenando bits em vetores– Os parênteses podem ser utilizados para concatenar

vetores

Page 39: Hardware Description Language Aula 2 Prof. Afonso Ferreira Miguel, MSc.

AHDL

• Exercício 3Implementar e simular um circuito que multiplique dois

valores de 4 bits (A[3..0] e B[3..0]) gerando um resultado de 8 bits (S[7..0]).

Lembrando...