VHDL

Páginas: 6 (1498 palabras) Publicado: 31 de mayo de 2015
PRÁCTICA:
LENGUAJE VHDL

Introducción

Los lenguajes permiten manejar mejor grandes tamaños
Los lenguajes son más flexibles que las tablas
Los lenguajes son légibles por las máquinas más fácilmente que los gráficos
Los lenguajes son más comprensibles que los métodos matemáticos

DOCUMENTACIÓN

SIMULACIÓN

VERIFICACIÓN FORMAL

SÍNTESIS

VHDL
SISTEMAS ANALÓGICOS

Lenguaje
VHDL

MODELADO DERENDIMIENTOS

DIAGNOSIS DE FALLOS Y GENERACIÓN DE TEST

ENTIDAD
A(0)

B(0) A(1)

B(1) A(2)

B(2) A(3)

B(3)

Estructura
Conexión con el
exterior
>2

‘0’

>2
S(0)

>2
S(1)

Propiedades genéricas

>2
S(2)

S(3)

S(4)

ARQUITECTURA
A(0)

B(0) A(1)

B(1) A(2)

B(2) A(3)

B(3)

Descripción estructural
Descripción de
comportamiento
‘0’

Lenguaje
VHDL

>2

>2
S(0)

>2
S(1)

Descripción de
flujo de datos

>2S(2)

S(3)

S(4)

Estructura

Lenguaje
VHDL

entity sumador is
port(
A, B, Cin
suma
end sumador;

: in std_logic_vector(3 downto 0);
: out std_logic_vector(4 downto 0));

architectura estructura of sumador is
signal s1 : std_logic_vector(3 downto 0);
component xor
port(
A, B, C
: in std_logic;
Y
: out std_logic);
end component;
component mayor
port(
A, B, C
: in std_logic;
Y
: out std_logic);
endcomponent;
for all:xor use entity work.xor;
for all:mayor use entity work.mayor;
begin
B1:xor port map (A(0), B(0), ‘0’, suma(0));
M1:mayor port map (A(0), B(0), ‘0’, S1(0));
B2:xor port map (A(1), B(1), S1(0), suma(1));
M2:mayor port map (A(1), B(1), S1(0), S1(1));
B3:xor port map (A(2), B(2), S1(1), suma(2));
M3:mayor port map (A(2), B(2), S1(1), S1(2));
B4:xor port map (A(3), B(3), S1(2),suma(3));
M4:mayor port map (A(3), B(3), S1(2), suma(4));
end;

architectura flujo of sumador is
signal s1 : std_logic_vector(2
downto 0);
begin
suma(0) <= A(0) xor B(0);
S1(0) <= A(0) and B(0);
suma(1) <= A(1) xor B(1) xor S1(0);
S1(1) <= (A(1) and B(1)) or
(A(1) and S1(0)) or (B(1) and S1(0));
suma(2) <= A(2) xor B(2) xor S1(1);
S1(2) <= (A(2) and B(2)) or
(A(2) and S1(1)) or (B(2) and S1(1));
suma(3)<= A(3) xor B(3) xor S1(2);
suma(4) <= (A(3) and B(3)) or
(A(3) and S1(2)) or (B(3) and S1(2));
end;

ESQUEMA GENÉRICO DE LA ENTIDAD
Estructura

entity is
generic(

port(
<, NODO>
<, NODO>
<, NODO>
end ;

: := ;
: := );
: ;
: ;
: );

 SENTIDOS DE SEÑAL
 IN -->SEÑAL DE ENTRADA. NO SE LE PUEDE ASIGNAR NINGÚN VALOR EN EL
INTERIOR DEL MODELO

 OUT --> SEÑAL DE SALIDA. DEBE SER ASIGNADA. NO SE PUEDE TOMAR COMO
DATO DE UN ASIGNAMIENTO

 INOUT --> SEÑAL DE ENTRADA/SALIDA. SE LE PUEDE ASIGNAR UN VALOR, Y SER
DATO DE UN ASIGNAMIENTO.

 TIPOS PREDEFINIDOS
 BIT (VALORES: 0, 1)
 BIT_VECTOR (VECTOR DE N BITS)
 STD_LOGIC (VALORES: 0, 1, X, Z, H, L)
Lenguaje
VHDL STD_LOGIC_VECTOR (VECTOR DE N STD_LOGIC)

tructura

ESQUEMA GENÉRICO DE LA
ARQUITECTURA
architecture of is

begin

end;

PARTE DECLARATIVA
SEÑALES INTERNAS

TIPOS
type is
(,
signal : ;

COMPONENTES
component
port( : );
end component;
for : use entity
.();

Lenguaje
VHDL

CUERPO DE LA ARQUITECTURA

Estructura

OPERADORES

DESCRICPCIÓN DE
FLUJO DE DATOS
Lenguaje
VHDL

DECLARACIONES
CONCURRENTES

DECLARACIONES
SECUENCIALES

DESCRICPCIÓN DE
ESTRUCTURA

DESCRICPCIÓN DE
ALGORITMO

DEFINICIÓN DE NUEVOS TIPOS
Tipos de
señal

Tipos enumerados
type is(<, , );
type bit is (‘0’, ‘1’);
type triestado is (‘0’, ‘1’, ‘Z’);
type estados_sistema is (desocupado, test, evaluando);

type is range to ;
type enteros_pequeños is range 0 to 9;
type reales_pequeños is range 0.0 to 1.0;
type tiempo is range -(2**31-1) to 2**31-1

Tipos matriciales
type is array ( to )...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Vhdl
  • Vhdl
  • vhdl
  • Vhdl
  • vhdl
  • vhdl
  • vhdl
  • vhdl

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS