Академический Документы
Профессиональный Документы
Культура Документы
Leccin 7
Sntesis
ndice
Introduccin
Niveles de abstraccin del modelado con HDL
Estilos descriptivos del modelado con HDL
Ventajas y limitaciones de los HDLs
El lenguaje VHDL
Sntesis
EL LENGUAJE VHDL
SNTESIS VHDL
Sntesis
EL LENGUAJE VHDL
SNTESIS VHDL
Muy flexible
Sntesis
VHDL
sintetizable
4
EL LENGUAJE VHDL
SNTESIS VHDL
Nivel funcional
Sntesis de
comportamiento
Arquitectura
RT
Nivel funcional
Sntesis
RT-lgica
Circuito
lgico
Nivel lgico
Emplazamiento
e interconexin
Implementacin
Retroanotacin
Sntesis
EL LENGUAJE VHDL
SNTESIS VHDL
CUBO DE DISEO
Sntesis
EL LENGUAJE VHDL
SNTESIS VHDL
x1
x2
Sntesis
EL LENGUAJE VHDL
SNTESIS VHDL
entity Registro is
port ( Reloj : in std_logic;
Entrada : in std_logic_vector (7 downto 0);
Salida : out std_logic_vector (7 downto 0):=00001111);
end Registro;
Sntesis
EL LENGUAJE VHDL
SNTESIS VHDL
begin
if(clkevent and clk=0) and ena=0 then
q <= d;
enf if;
end process;
Sntesis
EL LENGUAJE VHDL
SNTESIS VHDL
q <=b;
if (clkevent and clk=1) then
q<=a;
else
q<=b;
end if;
q<=a;
end if;
process
begin
wait until (clkevent and clk=1);
-- sentencias secuenciales
wait until (clkevent and clk=0);
-- sentencias secuenciales
wait until (clk1event and clk1=1);
-- sentencias secuenciales
wait until clk;
-- sentencias secuenciales
VHDL Leccin 2.7
process
begin
wait until (clkevent and clk=1);
-- sentencias secuenciales
wait until (clkevent and clk=1);
-- sentencias secuenciales
wait until (clkevent and clk=1);
-- sentencias secuenciales
wait until clkevent and clk=1);
-- sentencias secuenciales
Sntesis
10
EL LENGUAJE VHDL
SNTESIS VHDL
TIPO DE DATOS
Escalar:
Enteros (si se aceptan)
signal dato1: integer;
signal dato2: integer range 0 to 255;
type byte is range 0 to 255;
signal entrada : byte;
type entero is range -32768 to 32767;
Sntesis
11
EL LENGUAJE VHDL
SNTESIS VHDL
Sntesis
12
EL LENGUAJE VHDL
SNTESIS VHDL
Compuestos
Vectores (si se aceptan)
Vectores multidimensionales
Con ndices de tipo enumerado e ndices negativos
Se recomienda la indexacin descendente (downto)
Rango del vector definido a priori
entity comparador is
port (
A, B : in std_logic_vector (3 downto 0);
EQ : out std_logic);
type nibble is array (3 downto 0) of std_logic;
type Memoria is array (63 downto 0, 7 downto 0) of std_logic;
signal bus : nibble;
signal ram : memoria;
type vector_format is array (positive range < >) of std_logic;
signal bus : vector_format;
Los alias estn soportados
signal vec: std_logic_vector (3 downto 0);
alias mi_bit: std_logic is vec(2);
mi_bit <=0; -- vec(2) <=0;
Sntesis
13
EL LENGUAJE VHDL
SNTESIS VHDL
end loop;
type palabra is array (15 downto 0) of bit;
type puntero is access palabra;
Sntesis
14
EL LENGUAJE VHDL
SNTESIS VHDL
FUNCIONES Y OPERADORES
Divisin:
No suelen ser soportados
Se imponen restricciones en su uso
Sntesis
15
EL LENGUAJE VHDL
SNTESIS VHDL
Sntesis
16
EL LENGUAJE VHDL
SNTESIS VHDL
S<=X nand 1;
S<=X nand true;
Sntesis
enable
17
EL LENGUAJE VHDL
SNTESIS VHDL
Valores metalgicos
U, X, W y - del tipo std_ulogic
Carecen de sentido en sntesis
1. Si uno de los operandos en una igualdad es un valor metalgico
esttico o un vector en el que uno de los elementos es un valor
metalgico esttico, la herramienta de sntesis interpretar esta
relacin de igualdad como FALSE.
signal B: std_ulogic;
signal A: std_ulogic_vector (3 downto 0);
process (A)
begin
if (A=00-0) then
B<= 1 ;
else
B<= 0;
end if;
end process;
B <= 1 when (A=00-0) else 0;
Equivale a : B<=0;
VHDL Leccin 2.7
Sntesis
18
EL LENGUAJE VHDL
SNTESIS VHDL
Equivale a : B<=1;
3. Si en la sentencia case aparece un valor metalgico como una
opcin, o como elemento de una opcin (para el caso de vectores)
el sintetizador debe interpretar que dicha opcin nunca va a
ocurrir.
case select is
when 000 =>
when 001 =>
when 01X =>
when others =>
end case;
case select is
when 000 =>
when 001 =>
when others =>
end case;
S<= 0 ;
S<= 1 ;
S<= 0 ;
S<= 0 ;
Sntesis
S<= 0 ;
S<= 1 ;
S<= 0 ;
19
EL LENGUAJE VHDL
SNTESIS VHDL
Sntesis
20
EL LENGUAJE VHDL
SNTESIS VHDL
PAQUETES ARITMTICOS
El tipo SIGNED especifica un nmero entero codificado en C2, con el bit de signo a la
izquierda.
Sntesis
21
EL LENGUAJE VHDL
SNTESIS VHDL
Resumen paquetes:
signed y unsigned
sobre bit_vector
signed y unsigned
sobre std_logic_vector
numeric_bit
numeric_std
Sntesis
Paquetes estndar
(IEEE 1076.3)
22
EL LENGUAJE VHDL
SNTESIS VHDL
Otros paquetes:
signed y unsigned
sobre std_logic_vector
operaciones unsigned
operaciones signed
std_logic_arith
std_logic_unsigned
std_logic_signed
Desplazamiento
sll
srl
rol
ror
Sntesis
Relacionales
>
<
<=
>=
=
/=
Lgicos
not
and
or
nand
nor
xor
xnor
23