Академический Документы
Профессиональный Документы
Культура Документы
CONCEPTOS GENERALES
HISTORIA DE VHDL
Nace
Durante
VHDL
QU ES VHDL?
VHDL
es un lenguaje de descripcin y
modelado diseado para describir (en una
forma que los humanos y las maquinas
puedan leer y entender) la funcionalidad
y la organizacin de sistemas hardware
digitales, placas de circuitos, y
componentes.
VHDL fue desarrollado como un lenguaje
para el modelado y simulacin lgica,
dirigida por eventos de sistemas digitales.
Actualmente se lo utiliza tambin para la
sntesis automtica de circuitos.
PRINCIPALES USOS DE
VHDL
Modelado
Sntesis
NIVELES DE
ABSTRACCIN
Estructural
Una
Los
sub-mdulos se conectan
entre si por medio de seales.
Cada
NIVELES DE
ABSTRACCIN
Comportamental
Sin
Inicialmente
la descripcin
comportamental solo se utilizaba en
simulacin.
El
NIVELES DE
ABSTRACCIN
RTL
Transferencia
a Nivel de Registros.
Es
Permite
la paralelizacin de
instrucciones.
Este
NIVELES DE
ABSTRACCIN
Modelo
Una
vez la estructura y el
comportamiento de un mdulo han sido
especificados, es posible simular el
mdulo ejecutando su descripcin
comportamental.
Esto
VHDL
EJECUCIN SERIE
EJECUCIN
CONCURRENTE
En
Ej.
PARALELISMO
El
Se
Entre
Se
EJEMPLO PARALELISMO
Y= A1xB1+A2xB2++ANxBN
A1
B1
A2
B2
AN
BN
Implementacin
Serie
X1
X2
Xn
AN
Xn
BN
Implementacin
Paralela
SINCRONIZACIN
Proceso 1
Unidad
de
Control
Proceso 2
Proceso N
VHDL
SINTAXIS DEL LENGUAJE
Ejemplo :
Las
Ejemplo:
Ejemplos
<=
Para asignar variables se utiliza :=
Para asignar seales se utiliza
TIPOS DE DATOS
Lgicos
STD_LOGIC
STD_LOGIC_VECTOR
BOOLEAN
--'U','X','0','1','Z','W','L','H','-'
--Natural Range of STD_LOGIC
--True or False
Escalares
INTEGER
--32 or 64 bits
NATURAL
--Integers >= 0
POSITIVE
--Integers > 0
REAL
--Floating-point
TIME
fs
OPERADORES
Aritmticos:
Suma
Resta
Multiplicacin
Divisin
Potenciacin
Valor
**
Absoluto abs()
OPERADORES
Desplazamiento:
OPERADORES
Relacionales:
Lgicos:
AND,
OR,
NOT,
NAND,
NOR
XOR
IGUAL QUE =
DIFERENTE QUE /=
Otros:
Concatenacin &
ELEMENTOS
SINTACTICOS
Comentarios:
doble
guin --
Identificadores:
no
Nmeros:
por
otras
bases as:
Binario
Hexa
2#1101110#
6#C9#
ELEMENTOS SINTACTICOS
Carcteres:
entre
comillas simples
Cadenas:
entre
comillas dobles
Cadenas
de bits:
B"11101001",
X"FE".
O"126",
ENTIDAD
SINTAXIS ENTIDAD
entity <entity_name> is
generic ( <generic_name> : <type> := <value>;
<other generics>...
);
port ( <port_name> : <mode> <type>;
<other ports>...
);
end <entity_name>;
EJEMPLO ENTIDAD
entity sumador is
generic ( N : INTEGER := 4
);
port ( A : in STD_LOGIC_VECTOR ( N-1 downto 0);
B : in STD_LOGIC_VECTOR ( N-1 downto 0);
C : out STD_LOGIC_VECTOR ( N-1 downto 0);
);
end sumador;
ARQUITECTURA
SINTAXIS ARQUITECTURA
architecture <arch_name> of <entity_name> is
-- declarative_items (signal declarations,
-- component declarations, etc.)
begin
-- architecture body
end <arch_name>;
EJEMPLO ARQUITECTURA
architecture uno of cont is
signal conteo_aux : STD_LOGIC_VECTOR (4 downto 0);
begin
process (clk,rst)
begin
if (rst = '1) then conteo_aux <= "00000";
elsif (clk'event and clk = '1') then
if (load = '1') then conteo_aux <= ldata;
elsif ( ud= '0') then conteo_aux <= conteo_aux + '1';
else conteo_aux <= conteo_aux - '1';
end if;
end if;
end process;
conteo <= conteo_aux;
end uno;
ESTRUCTURAS DE EJECUCIN
CONCURRENTES
Asignacin Simple
Ejemplo: SUMADOR
S <= A + B;
ESTRUCTURAS DE EJECUCIN
CONCURRENTES
<expression>;
Ejemplo: DEMUX
ESTRUCTURAS DE EJECUCIN
CONCURRENTES
Ejemplo: MUX
D1 when 01,
D2 when 10,
D3 when others;
PROCESOS
PROCESOS
PROCESOS
La sintaxis es la siguiente
Sentencia condicional:
IF..THEN..ELSE
La sintaxis es la siguiente:
IF <condicin> THEN
<sentencias>
ELSIF <condicin> THEN
<sentencias>
ELSE
<sentencias>
END IF;