Electronica

Páginas: 3 (587 palabras) Publicado: 14 de mayo de 2013
Lenguaje VHDL

Código para representar sistemas
digitales en VHDL

JJVS-09

1

Las secciones fundamentales que forman el
código en VHDL son: librería (LIBRARY), entidad
(ENTITY) yarquitectura (ARCHITECTURE).
LIBRARY: contiene un conjunto de librerías que
contienen la definición de datos, estructuras, etc.
ENTITY:
circuito.

Especifica

las

entradas/salidas

delARQUITECTURE: Existen dos formas de de
describir un circuito, estructural y por su
comportamiento. Esta forma a su vez se divide en
flujo de datos y algorítmica.
JJVS-09
2

ENTIDAD

JJVS-09ENTITY MUX IS
PORT ( A:
B:
SELEC:
SALIDA:
END MUX;

IN
IN
IN
OUT

BIT;
BIT;
BIT;
BIT);
3

Arquitectura (estructural)

ARCHITECTURE ESTRUCTURAL OF MUX IS
SIGNAL AX,BX,NOSEL: BIT;BEGIN
U0: ENTITY INV
PORT MAP (E=>SELEC, Y=>NOSEL);
U1: ENTITY AND2 PORT MAP (E1=>A, E2=>NOSEL, Y=>AX);
U2: ENTITY AND2 PORT MAP (B, SELEC, BX);
U3: ENTITY OR2
PORT MAP (E1=>AX, E2=>BX,Y=>SALIDA);END ESTRUCTURAL;
JJVS-09

4

Descripción estructural completa
ENTITY MUX IS
PORT ( A:
B:
SELEC:
SALIDA:
END MUX;

IN
IN

BIT;
BIT;
IN
BIT;
OUT BIT);

ARCHITECTURE ESTRUCTURALOF MUX IS
SIGNAL AX,BX,NOSEL: BIT;
BEGIN
U0: ENTITY
INV
PORT MAP (E=>SELEC, Y=>NOSEL);
U1: ENTITY
AND2 PORT MAP (E1=>A, E2=>NOSEL, Y=>AX);
U2: ENTITY
AND2 PORT MAP (B, SELEC, BX);
U3: ENTITYOR2 PORT MAP (E1=>AX, E2=>BX,Y=>SALIDA);
END ESTRUCTURAL;
JJVS-09

5

Descripción completa
comportamental-algorítmica
ENTITY MUX IS
PORT (
A:
B:
SELEC:
SALIDA:
END MUX;

JJVS-09IN
BIT;
IN
BIT;
IN BIT;
OUT BIT);

architecture Comportamental of MUX is
BEGIN
PROCESS (A,B,selec)
begin
if (selec='0') then
salidaled2);
sseg_unit_3:entity work.hex_to_sseg
portmap(hex=>inc(7 downto 4),dp=>'1',sseg=>led3);
disp_unit:entity work.disp_mux
port map(
clk => clk, reset=>'0',
in0=>led0, in1 => led1, in2=>led2, in3=>led3,
an=>an, sseg=>sseg) ;
end Behavioral;...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Electronica
  • Electron
  • Electronica
  • Electronica
  • Electronica
  • Electronica
  • Electronica
  • Electrones

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS