Вы находитесь на странице: 1из 35

VHDL

LENGUAJE DE DESCRIPCION DE HARDWARE


PARA CIRCUITOS INTEGRADOS DE MUY ALTA
VELOCIDAD
Ingeniera en Electrnica Telecomunicaciones
y Redes
ESPOCH-FIE
Profesor: Ing. Wilson Balden M.Sc.
Octubre 2014

UNIDADES BASICAS DE DISEO VHDL


ENTIDAD
PRIMARIA
PRIMARIA

ARQUITECTURA
SECUNDARIA
SECUNDARIA

PRIMARIA

ENTITY

ENTRADAS
SALIDAS

ENTITY

ENTRADAS
SALIDAS

ENTITY

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';

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 perceptrn
24 respuesta: = 1;
25 ELSE
26 respuesta: = -1;
27 END IF;

ENTITY
PUERTOS DE ENTRADA Y SALIDA

ENTITY
PUERTOS DE ENTRADA Y SALIDA

ENTITY
PUERTOS DE ENTRADA Y SALIDA

ENTITY
PUERTOS DE ENTRADA Y SALIDA
MODO
DEL
PUERTO

CI

IN
OUT

INOUT
BUFFER
SALIDA

entidad

ENTITY
PUERTOS DE ENTRADA Y SALIDA
TIPO
de datos
BIT

BOOLEAN

BIT_VECTOR

INTEGER

1,0

V, F

ENTITY
DECLARACION

ENTITY
DECLARACION
E N T I T Y entity_name I S
PORT (
port_name : signal_mode signal_type;
port_name : signal_mode signal_type;
...);
E N D entity_name;

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]
BEGIN

(code)
E N D architecture_name;

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]
BEGIN

(code)
E N D architecture_name;

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]
BEGIN

(code)
E N D architecture_name;

Translacin de cdigo VHDL a un circuito

EJEMPLOS DE DECLARACIN DE ENTIDAD


Disee un sumador completo de un bit de informacin.
Diagrama de bloques del dispositivo a disear.

DECLARACIN 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 semntica,
punto y coma (;) finaliza una declaracin.
dos puntos (:) se asigna nombres a las entradas y
salidas.

DECLARE LA ENTIDAD PARA EL CIRCUITO

DECLARACIN DE ENTIDAD PARA EL CIRCUITO SUMADOR

- - Declaracin de la entidad
Entity circuito is
port( a3,b3,a2,b2,al,bl,aO, bO: in bit;
F: out bit);
end circuito;

IDENTIFICADORES
Los identificadores son simplemente los
nombres o etiquetas que se usan para
nombrar a las variables, constantes, seales,
procesos, etc.
Pueden ser nmeros, letras del alfabeto y
guiones bajos ( _ _ ) que separen caracteres.
No tienen una restriccin en cuanto a su
longitud.

IDENTIFICADORES

3_ _?

VECTORES

las palabras binarias = vectores de bits


1

1 0 01 1 0 0 1
1
A3

0
A2

0
A1

VECTOR

1
A0

VECTORES

las palabras binarias = vectores de bits


1
A3

0
A2

0
A1

VECTOR

1
A0

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


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

VECTORES

las palabras binarias = vectores de bits


1
A3

0
A2

0
A1

VECTOR

1
A0

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


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

A0

A1

VECTOR

0
A2

1
A3

VECTORES

escriba el cdigo VHDL de la entidad del


circuito sumador anterior declarando sus
entradas como vectores.

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;

VECTORES
entity circuito is
port (
a, b: in bit_vector (0 to 3);
F: out bit;
end circuito;

EJERCICI0S PARA SER RESUELTOS POR LOS


ESTUDIANTES
Unidades bsicas de diseo
2.1 Describa los cinco tipos de unidades de
diseo en VHDL.
2.2 Determine cules son las unidades de
diseo necesarias para realizar un programa
en VHDL.
2.3 Mencione las unidades de diseo primarias
y secundarias.

Declaracin de entidades
2.4 Describa el significado de una entidad y cul
es su palabra reservada.
2.5 En la siguiente declaracin de entidad indique:
entity seleccin is port (
x: in BIT_vector(0 to 3);
f: out BIT);
end seleccin;

a) El nombre de la entidad
b) Los puertos de entrada
c) Los puertos de salida
d) El tipo de dato

MARQUE LOS IDENTIFICADORES QUE ESTEN ESCRITOS EN FORMA CORRECTA

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

Вам также может понравиться