VHDL

35
VHDL LENGUAJE DE DESCRIPCION DE HARDWARE PARA CIRCUITOS INTEGRADOS DE MUY ALTA VELOCIDAD Ingeniería en Electrónica Telecomunicaciones y Redes ESPOCH-FIE Profesor: Ing. Wilson Baldeón M.Sc. Octubre 2014

description

VHDL

Transcript of VHDL

Page 1: VHDL

VHDL

LENGUAJE DE DESCRIPCION DE HARDWARE

PARA CIRCUITOS INTEGRADOS DE MUY ALTA

VELOCIDAD

Ingeniería en Electrónica Telecomunicaciones

y Redes

ESPOCH-FIE

Profesor: Ing. Wilson Baldeón M.Sc.

Octubre 2014

Page 2: VHDL

UNIDADES BASICAS DE DISEÑO VHDL

ENTIDAD

ARQUITECTURA

PRIMARIA

PRIMARIA PRIMARIA

SECUNDARIA

SECUNDARIA

Page 3: VHDL

ENTITY

ENTRADAS

SALIDAS

Page 4: VHDL

ENTITY

ENTRADAS

SALIDAS

Page 5: VHDL

ENTITY

Page 6: VHDL
Page 7: VHDL

when C =>CAP<=' 0' ; LIMPIA <= '0'; SIRVE <= '0';

CAMBIO < =

'0'; DEC <= '0';

if MP ='0' then

edo_fut <= D;

else

edo_fut <= A;

end if;

when D => CAP <= '0'; LIMPIA <= '0'; DEC <= '0 *;

if PRECIO ='0' then

edo_fut <= H; CAMBIO <= 'l';

else

edo_fut <= E; SIRVE <= '1";

end if;

when E => LIMPIA <= '0'; CAMBIO <= '0'; DEC <= '0';

Page 8: VHDL
Page 9: VHDL

RED NEURONAL ARTIFICIAL

BEGIN

17 WHILE not endfile(archivo_entrada) LOOP

18 readline(archivo_entrada, buf_in);

19 read(buf_in, xl);

20 read(buf_in, x2);

21 read(buf_in, y);

22 I: = wl*xl+w2*x2;

23 IF I> = the ta THEN —calcula la respuesta del perceptrón

24 respuesta: = 1;

25 ELSE

26 respuesta: = -1;

27 END IF;

Page 10: VHDL

ENTITY

PUERTOS DE ENTRADA Y SALIDA

Page 11: VHDL

ENTITY

PUERTOS DE ENTRADA Y SALIDA

Page 12: VHDL

ENTITY

PUERTOS DE ENTRADA Y SALIDA

Page 13: VHDL

ENTITY

PUERTOS DE ENTRADA Y SALIDA

MODO

DEL PUERTO

IN

OUT

INOUT

BUFFER

•SALIDA

CI

entidad

Page 14: VHDL

ENTITY

PUERTOS DE ENTRADA Y SALIDA

TIPO

de datos

BIT

BOOLEAN

BIT_VECTOR

INTEGER

V, F

1,0

Page 15: VHDL

ENTITY

DECLARACION

Page 16: VHDL

ENTITY

DECLARACION

E N T I T Y entity_name I S

P O R T (

port_name : signal_mode signal_type;

port_name : signal_mode signal_type;

...);

E N D entity_name;

Page 17: VHDL

ARCHITECTURE

The ARCHITECTURE is a description of how the circuit should behave

(function). Its syntax is the following

A R C H I T E C T U R E architecture_name O F entity_name I S

[declarations]

B E G I N

(code)

E N D architecture_name;

Page 18: VHDL

ARCHITECTURE

The ARCHITECTURE is a description of how the circuit should behave

(function). Its syntax is the following

La arquitectura es una descripcion de como el circuito debe trabajar,

funcionar.

A R C H I T E C T U R E architecture_name O F entity_name I S

[declarations]

B E G I N

(code)

E N D architecture_name;

Page 19: VHDL

ARCHITECTURE

The ARCHITECTURE is a description of how the circuit should behave

(function). Its syntax is the following

A R C H I T E C T U R E architecture_name O F entity_name I S

[declarations]

B E G I N

(code)

E N D architecture_name; Translación de código VHDL a un circuito

Page 20: VHDL

EJEMPLOS DE DECLARACIÓN DE ENTIDAD

Diseñe un sumador completo de un bit de información.

Diagrama de bloques del dispositivo a diseñar.

Page 21: VHDL

DECLARACIÓN DE ENTIDAD PARA EL CIRCUITO SUMADOR

- - estos 2 guiones seguidos, solo permiten documentar el

programa y el compilador lo ignora, es decir son solo comentarios

entity sumador is

port (A, B, Cin: in bit;

SUMA, Cout: out bit);

end sumador;

VHDL sigue una sintaxis y una semántica,

punto y coma (;) finaliza una declaración.

dos puntos (:) se asigna nombres a las entradas y

salidas.

Page 22: VHDL

DECLARE LA ENTIDAD PARA EL CIRCUITO

Page 23: VHDL

DECLARACIÓN DE ENTIDAD PARA EL CIRCUITO SUMADOR

- - Declaración de la entidad

Entity circuito is

port( a3,b3,a2,b2,al,bl,aO, bO: in bit;

F: out bit);

end circuito;

Page 24: VHDL

IDENTIFICADORES

Los identificadores son simplemente los

nombres o etiquetas que se usan para

nombrar a las variables, constantes, señales,

procesos, etc.

Pueden ser números, letras del alfabeto y

guiones bajos ( _ _ ) que separen caracteres.

No tienen una restricción en cuanto a su

longitud.

Page 25: VHDL

IDENTIFICADORES

3_ _?

Page 26: VHDL

VECTORES

las palabras binarias = vectores de bits

1 0 0 1

1 0 0 1 1 0 0 1 1 0 0 1

A3 A2 A1 A0

VECTOR A

Page 27: VHDL

VECTORES

las palabras binarias = vectores de bits

1 0 0 1

A3 A2 A1 A0

VECTOR A

port (vector_A: in bit_vector (3 downto 0);

port ( a: in bit_vector (3 downto 0);

Page 28: VHDL

VECTORES

las palabras binarias = vectores de bits

1 0 0 1

A3 A2 A1 A0

VECTOR A

port (A: in bit_vector (3 downto 0);

port ( A: in bit_vector (0 to 3);

1 0 0 1

A0 A1 A2 A3

VECTOR A

Page 29: VHDL

VECTORES

escriba el código VHDL de la entidad del

circuito sumador anterior declarando sus

entradas como vectores.

Page 30: VHDL

VECTORES

entity sumador is

port (

A,B: in bit_vector (3 downto 0);

Cin: in bit;

Cout: out bit;

SUMA: out bit_vector(3 downto 0));

end sumador;

Page 31: VHDL

VECTORES

entity circuito is

port (

a, b: in bit_vector (0 to 3);

F: out bit;

end circuito;

Page 32: VHDL

EJERCICI0S PARA SER RESUELTOS POR LOS

ESTUDIANTES

Unidades básicas de diseño

2.1 Describa los cinco tipos de unidades de

diseño en VHDL.

2.2 Determine cuáles son las unidades de

diseño necesarias para realizar un programa

en VHDL.

2.3 Mencione las unidades de diseño primarias

y secundarias.

Page 33: VHDL

Declaración de entidades

2.4 Describa el significado de una entidad y cuál es su palabra reservada.

2.5 En la siguiente declaración de entidad indique: entity selección is port (

x: in BIT_vector(0 to 3);

f: out BIT);

end selección;

a) El nombre de la entidad

b) Los puertos de entrada

c) Los puertos de salida

d) El tipo de dato

Page 34: VHDL

MARQUE LOS IDENTIFICADORES QUE ESTEN ESCRITOS EN FORMA CORRECTA.

Page 35: VHDL

Declare las entidades para cada uno de los siguientes circuitos (4).