08.08.2015 Views

VHDL SECUENCIAL

VHDL SECUENCIAL

VHDL SECUENCIAL

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

1 <strong>VHDL</strong> <strong>SECUENCIAL</strong><strong>VHDL</strong> <strong>SECUENCIAL</strong>Sentencias secuenciales:Sentencias que sólo pueden aparecer dentro de procesosy subprogramas.• Wait• If-then-else• Case• Lazos:• Infinite Loop• While Loop• For Loop


2 <strong>VHDL</strong> <strong>SECUENCIAL</strong>If-Then-Else• Permite desviar el flujo de ejecución dentro deun proceso o subprograma.


3 <strong>VHDL</strong> <strong>SECUENCIAL</strong>If-Then-Else


6 <strong>VHDL</strong> <strong>SECUENCIAL</strong>Case


7 <strong>VHDL</strong> <strong>SECUENCIAL</strong>Case: Null• Case: Asignación de valor para cada posibilidad.• A veces no se requiere ninguna acción para una de lasposibilidades “null”.null_stmt acc = acc + op;when sub => acc = acc – op;when nop => null;end case;


8 <strong>VHDL</strong> <strong>SECUENCIAL</strong>Lazos: : 3 tipos• Lazos:• Infinite Loop• While Loop• For Loop


9 <strong>VHDL</strong> <strong>SECUENCIAL</strong>Lazos: : 3 tipos


11 <strong>VHDL</strong> <strong>SECUENCIAL</strong>Infinite Loop: EXITexit_stmt


12 <strong>VHDL</strong> <strong>SECUENCIAL</strong>Infinite Loop: EXITloop…exit ; -- Sale del lazo más interno.…end loop;…… -- Exit implica seguir en esta sentencia.……exit loop1; -- sale del lazo llamado loop1exit when x = 1; -- sale del lazo más interno cuando se verificacondición.


13 <strong>VHDL</strong> <strong>SECUENCIAL</strong>Infinite Loop: NEXT• Comienza la siguiente iteración del lazo.next_stmt


14 <strong>VHDL</strong> <strong>SECUENCIAL</strong>While Loop• Permite imponer una condición de repetición.• El bucle se repite mientras que la condición queaparece tras “while” sea verdadera.


15 <strong>VHDL</strong> <strong>SECUENCIAL</strong>For Loop• Ejecución de un bucle un número fijo de veces.


16 <strong>VHDL</strong> <strong>SECUENCIAL</strong>For Loop• Resultan necesarias las indicaciones de un índicey un rango.• El índice es una variable discreta, enumerada oentera, que no es preciso declarar.• El índice cambia su valor en una unidad por cadaejecución del bucle a lo largo del rangoespecificado.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!