vhdl(iniciar)

125
LDD 2004-05 1 eman ta zabal zazu INTRODUCCIÓN AL LENGUAJE VHDL eman ta zabal zazu

Upload: mars1972

Post on 30-Oct-2014

20 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: VHDL(Iniciar)

LDD 2004-05 1

eman ta zabal zazu

INTRODUCCIÓN AL

LENGUAJE VHDL

eman ta zabal zazu

Page 2: VHDL(Iniciar)

LDD 2004-05 2

eman ta zabal zazu

ÍNDICE.

1. Introducción.

2. Conceptos básicos del lenguaje y Aplicaciones.

3. Tipos de datos y Señales.4. Sentencias concurrentes y secuenciales. 5. Registros y máquinas de estados finitos.

Page 3: VHDL(Iniciar)

LDD 2004-05 3

eman ta zabal zazu

Bibliografía:

- VHDL Lenguaje estándar de diseño electrónico. Lluís Terés, Yago Torroja, Serafín Olcoz, Eugenio Villar. Ed, Mc Graw-Hill, 1998

- VHDL Modeling for Digital Design Synthesis

Yu-Chin Hsu, Kevin F. Tsai, Jessie T. Liu, Eric S.Lin. Ed, Kluwer Academic Publishers, 1995

- Hardware Design and Simulation in VAL / VHDL.

Larry M. Augustin, David C. Luckham, beniot A. Gennart, Youmth Huh, Alec G. Stanculescu. Ed, Kluwer Academic Publishers, 1991.

- VHDL Designers Reference.

Jean Michel Bergé, Alain Fonkova, Serge Maginot, Jacques Rovillard. Kluwer Academic Publishers, 1992

Page 4: VHDL(Iniciar)

LDD 2004-05 4

eman ta zabal zazu

INTRODUCCIÓN.

• Circuitos integrados. • Evolución del diseño electrónico• El lenguaje VHDL

Page 5: VHDL(Iniciar)

LDD 2004-05 5

eman ta zabal zazu

CIRCUITOS INTEGRADOS

• Un Circuito Integrado (C.I.) es un circuito electrónico donde tanto los componentes como su conexionado se construyen en un mismo dado de material semiconductor (Si)

chip

• 1958 J. Kilby (Texas Instr.) primer C.I.

Page 6: VHDL(Iniciar)

LDD 2004-05 6

eman ta zabal zazu

• Rápida evolución:Componentes SSI → Procesador VLSI

• Circuitos más complejos • Metodologías nuevas de diseño• Herramientas nuevas de diseño• Desarrollo paralelo

Microelectrónica ↔ Informática

Page 7: VHDL(Iniciar)

LDD 2004-05 7

eman ta zabal zazu

PROCESO BÁSICO DE DISEÑO

Requisitos y especificaciones

DiseñoArquitectural (RTL )

Diseño Lógico(puer tas)

Diseño Físico(transistores-layout)

Diseño Funcional

Fabr icacióny Test

Modeladoy

Síntesis

Configuración del PLD

Programación del PLDy Test

Altera

Diseño modelo VHDL

Simulación

Compilación

Análisis de Timing

Page 8: VHDL(Iniciar)

LDD 2004-05 8

eman ta zabal zazu

• Estas etapas son función de las distintas alternativas de diseño.

• Por analogía PROGRAMACIÓN se busca

SÍNTESIS DE ALTO NIVELChip desde una descripción de alto nivel

• Imprescindible los lenguajes HDL-- VHDL

Page 9: VHDL(Iniciar)

LDD 2004-05 9

eman ta zabal zazu

Síntesis de hardware

Proceso de Transformación de una descripción funcional de un circuito en una descripción estructural:

–Nivel de Transferencias entre registros.–Layout (Caso Ideal)

Síntesis

processbegin

for I in 0 to 10 loop:::

end loop;end process;

descripción funcionaldescripción funcional

descripción estructuraldescripción estructural

Page 10: VHDL(Iniciar)

LDD 2004-05 10

eman ta zabal zazu

Sintesis de Alto Nivel

• Func ión Objetivo : Una función de :– Estimación del área.– Retardos del Circuito

• Restricc iones : Condiciones que debe cumplir el circuito. (p.e. Area estimada < X. Retardo < Y...)

Síntesis

processbegin

for I in 0 to 10 loop

:::end loop;

end process;

Restricciones

FunciónObjetivo

Page 11: VHDL(Iniciar)

LDD 2004-05 11

eman ta zabal zazu

1.Aplication and laguage Introduction

- What is VHDL ?- Aplication areas- Limitations of VHDL- VHDL styles- Main laguages concepts- Entity- Architecture- Hierarchy- Declaration- Processes and types- Packages

Page 12: VHDL(Iniciar)

LDD 2004-05 12

eman ta zabal zazu

What is VHDL?

Page 13: VHDL(Iniciar)

LDD 2004-05 13

eman ta zabal zazu

Limitations

Page 14: VHDL(Iniciar)

LDD 2004-05 14

eman ta zabal zazu

Page 15: VHDL(Iniciar)

LDD 2004-05 15

eman ta zabal zazu

VHDL Styles

Page 16: VHDL(Iniciar)

LDD 2004-05 16

eman ta zabal zazu

Page 17: VHDL(Iniciar)

LDD 2004-05 17

eman ta zabal zazu

Page 18: VHDL(Iniciar)

LDD 2004-05 18

eman ta zabal zazu

Page 19: VHDL(Iniciar)

LDD 2004-05 19

eman ta zabal zazu

Page 20: VHDL(Iniciar)

LDD 2004-05 20

eman ta zabal zazu

Entity

Page 21: VHDL(Iniciar)

LDD 2004-05 21

eman ta zabal zazu

Architecture

Page 22: VHDL(Iniciar)

LDD 2004-05 22

eman ta zabal zazu

Page 23: VHDL(Iniciar)

LDD 2004-05 23

eman ta zabal zazu

Page 24: VHDL(Iniciar)

LDD 2004-05 24

eman ta zabal zazu

Page 25: VHDL(Iniciar)

LDD 2004-05 25

eman ta zabal zazu

Page 26: VHDL(Iniciar)

LDD 2004-05 26

eman ta zabal zazu

Page 27: VHDL(Iniciar)

LDD 2004-05 27

eman ta zabal zazu

Page 28: VHDL(Iniciar)

LDD 2004-05 28

eman ta zabal zazu

Page 29: VHDL(Iniciar)

LDD 2004-05 29

eman ta zabal zazu

Processes

Page 30: VHDL(Iniciar)

LDD 2004-05 30

eman ta zabal zazu

Page 31: VHDL(Iniciar)

LDD 2004-05 31

eman ta zabal zazu

Types

Page 32: VHDL(Iniciar)

LDD 2004-05 32

eman ta zabal zazu

The package

Page 33: VHDL(Iniciar)

LDD 2004-05 33

eman ta zabal zazu

Page 34: VHDL(Iniciar)

LDD 2004-05 34

eman ta zabal zazu

2. Signals and Data Types- The concept of a type- Standard data types- Assignments to signals- Type definition- Multi valued logic- Standard Logic- Using Standard Logic

VHDL Operators- Logical Operators- Relational Operators- Arithmetic Operators

Page 35: VHDL(Iniciar)

LDD 2004-05 35

eman ta zabal zazu

Type definition

Page 36: VHDL(Iniciar)

LDD 2004-05 36

eman ta zabal zazu

Type definition

Page 37: VHDL(Iniciar)

LDD 2004-05 37

eman ta zabal zazu

Type concept and specification

Page 38: VHDL(Iniciar)

LDD 2004-05 38

eman ta zabal zazu

Page 39: VHDL(Iniciar)

LDD 2004-05 39

eman ta zabal zazu

Page 40: VHDL(Iniciar)

LDD 2004-05 40

eman ta zabal zazu

Page 41: VHDL(Iniciar)

LDD 2004-05 41

eman ta zabal zazu

Page 42: VHDL(Iniciar)

LDD 2004-05 42

eman ta zabal zazu

Type std_logic is (

‘ U’, Uninitiliced

‘ X’ Unknown

‘ 0’ Logic 0

‘ 1’ logic 1

‘ Z’ high impedance

‘W’ Unknown

‘ L’ logic 0

‘ H’ logic 1

‘ _ ‘ Don´t care

Strong drive

Weak drive

Page 43: VHDL(Iniciar)

LDD 2004-05 43

eman ta zabal zazu

Page 44: VHDL(Iniciar)

LDD 2004-05 44

eman ta zabal zazu

Page 45: VHDL(Iniciar)

LDD 2004-05 45

eman ta zabal zazu

library IEEE;

use IEEE.Std_logic_1164.all;

entity MULS is

port ( A, B, : in std_logic ;

Z : out std_logic );

end MULS;

Using Standard Logic

Page 46: VHDL(Iniciar)

LDD 2004-05 46

eman ta zabal zazu

OPERADORES EN VHDL

Existen 3 tipos predefinidos:

• Operadores lógicos

• Operadores matemáticos

• Operadores relacionales

Por defecto, cada operador puede usarse con cierto tipo de datos.

El usuario puede definir funciones si precisa usar otros tipos.

Page 47: VHDL(Iniciar)

LDD 2004-05 47

eman ta zabal zazu

OPERADORES LÓGICOS

Son los siguientes:

• AND, NAND, OR, NOR

• XOR, XNOR

• NOT

• Además de desplazamientos lógicos/aritméticos izda/dcha y rotaciones: SLL, SRL, SLA, SRA, ROL, ROR.

Todos misma prioridad (de izda a dcha) salvo NOT que es siempre prioritaria.

Page 48: VHDL(Iniciar)

LDD 2004-05 48

eman ta zabal zazu

OPERADORES LÓGICOSTipos para los que están definidos:

Page 49: VHDL(Iniciar)

LDD 2004-05 49

eman ta zabal zazu

library IEEE;use IEEE.Std_logic_1164.all;entity MULS is

port ( A, B, : in std_logic ;Z : out std_logic );

end MULS;

architecture EX of MULS isbegin

z <= A and not (B or C );end EX;

Page 50: VHDL(Iniciar)

LDD 2004-05 50

eman ta zabal zazu

Signal A_BUS, B_BUS, Z_BUS:

std_logic_vector ( 3 downto 0 );

Equivalente a

ZBUS(3) <= A_BUS(3) and B_BUS(3);

ZBUS(2) <= A_BUS(2) and B_BUS(2);

ZBUS(1) <= A_BUS(1) and B_BUS(1);

ZBUS(0) <= A_BUS(0) and B_BUS(0);

Z_BUS <= A_BUS and B_BUS;

Page 51: VHDL(Iniciar)

LDD 2004-05 51

eman ta zabal zazu

OPERADORES RELACIONALES

Son los siguientes:

• igual (=) , distinto (/=)

• mayor(>), mayor o igual (>=)

• menor(>), menor o igual (>=)

Los operandos pueden ser de cualquier tipo.

El resultado es de tipo boolean.

Page 52: VHDL(Iniciar)

LDD 2004-05 52

eman ta zabal zazu

Page 53: VHDL(Iniciar)

LDD 2004-05 53

eman ta zabal zazu

Page 54: VHDL(Iniciar)

LDD 2004-05 54

eman ta zabal zazu

OPERADORES ARITMÉTICOS

Son los siguientes y para los tipos de datos indicados:

• suma (+), resta (-) --- cualquier tipo numérico

• producto (*), división (/) --- entero/real

• potencias (**) --- entero/real (exponente entero)

• módulo (mod), resto (rem) --- enteros

• valor absoluto (abs) --- entero/real

Page 55: VHDL(Iniciar)

LDD 2004-05 55

eman ta zabal zazu

CONSTANTES

Es un objeto que almacena un único valor durante toda la simulación

Ejemplos:

• constant E:real:=2.7172;

• constant V37:bit_vector (7 downto 0):= “0100110”;

• constant delay:time:=2ns;

Page 56: VHDL(Iniciar)

LDD 2004-05 56

eman ta zabal zazu

Arrays...

Page 57: VHDL(Iniciar)

LDD 2004-05 57

eman ta zabal zazu

Page 58: VHDL(Iniciar)

LDD 2004-05 58

eman ta zabal zazu

Page 59: VHDL(Iniciar)

LDD 2004-05 59

eman ta zabal zazu

3 2 1 0

1 2 3 4

z

c

Page 60: VHDL(Iniciar)

LDD 2004-05 60

eman ta zabal zazu

Page 61: VHDL(Iniciar)

LDD 2004-05 61

eman ta zabal zazu

Concatenation and aggregates

Page 62: VHDL(Iniciar)

LDD 2004-05 62

eman ta zabal zazu

Page 63: VHDL(Iniciar)

LDD 2004-05 63

eman ta zabal zazu

Page 64: VHDL(Iniciar)

LDD 2004-05 64

eman ta zabal zazu

Page 65: VHDL(Iniciar)

LDD 2004-05 65

eman ta zabal zazu

Page 66: VHDL(Iniciar)

LDD 2004-05 66

eman ta zabal zazu

Page 67: VHDL(Iniciar)

LDD 2004-05 67

eman ta zabal zazu

Page 68: VHDL(Iniciar)

LDD 2004-05 68

eman ta zabal zazu

3. Concurrent and secuential Statements

- Concurrent Assignment Statements- The Process- Process execution- Sensitivity lists- The if statement- The case statement-The for loop-Variables

Page 69: VHDL(Iniciar)

LDD 2004-05 69

eman ta zabal zazu

Page 70: VHDL(Iniciar)

LDD 2004-05 70

eman ta zabal zazu

Page 71: VHDL(Iniciar)

LDD 2004-05 71

eman ta zabal zazu

Page 72: VHDL(Iniciar)

LDD 2004-05 72

eman ta zabal zazu

Page 73: VHDL(Iniciar)

LDD 2004-05 73

eman ta zabal zazu

• Es una sentencia concurrente que permite realizar asignaciones condicionales de valores, expresiones u objetos a señales.

• Sintáxis :[etiqueta:]señal<= valor1 when condición1 else

valor2 when condición2 else…………valorn when condiciónn elseunaffected;

SENTENCIA WHEN ... SELECT

Page 74: VHDL(Iniciar)

LDD 2004-05 74

eman ta zabal zazu

• Es una sentencia concurrente que permite realizar asignaciones condicionales de valores, expresiones u objetos a señales (análoga a WHEN..SELECT).

• Sintáxis :[etiqueta:]with expresión select

señal<= valor1 when resultado1 elsevalor2 when resultado2 else

…………valorn when resultadon elseunaffected when others;

SENTENCIA WITH... SELECT

Page 75: VHDL(Iniciar)

LDD 2004-05 75

eman ta zabal zazu

Page 76: VHDL(Iniciar)

LDD 2004-05 76

eman ta zabal zazu

Page 77: VHDL(Iniciar)

LDD 2004-05 77

eman ta zabal zazu

Page 78: VHDL(Iniciar)

LDD 2004-05 78

eman ta zabal zazu

Page 79: VHDL(Iniciar)

LDD 2004-05 79

eman ta zabal zazu

Page 80: VHDL(Iniciar)

LDD 2004-05 80

eman ta zabal zazu

Page 81: VHDL(Iniciar)

LDD 2004-05 81

eman ta zabal zazu

Page 82: VHDL(Iniciar)

LDD 2004-05 82

eman ta zabal zazu

Process execution

Page 83: VHDL(Iniciar)

LDD 2004-05 83

eman ta zabal zazu

Page 84: VHDL(Iniciar)

LDD 2004-05 84

eman ta zabal zazu

Sensitivity Lists

Page 85: VHDL(Iniciar)

LDD 2004-05 85

eman ta zabal zazu

Page 86: VHDL(Iniciar)

LDD 2004-05 86

eman ta zabal zazu

Page 87: VHDL(Iniciar)

LDD 2004-05 87

eman ta zabal zazu

Page 88: VHDL(Iniciar)

LDD 2004-05 88

eman ta zabal zazu

The If Statement

Page 89: VHDL(Iniciar)

LDD 2004-05 89

eman ta zabal zazu

'ZGEWVGU HKTUV�VTWG�DTCPEJ

Page 90: VHDL(Iniciar)

LDD 2004-05 90

eman ta zabal zazu

The Case Statement

Page 91: VHDL(Iniciar)

LDD 2004-05 91

eman ta zabal zazu

Page 92: VHDL(Iniciar)

LDD 2004-05 92

eman ta zabal zazu

The For Loop

Page 93: VHDL(Iniciar)

LDD 2004-05 93

eman ta zabal zazu

Page 94: VHDL(Iniciar)

LDD 2004-05 94

eman ta zabal zazu

Variable usage

Page 95: VHDL(Iniciar)

LDD 2004-05 95

eman ta zabal zazu

4 ODDA ( 3 downto 0 )

Process (A)

variable TMP : std_logic;

begin

TMP:= ‘0’;

for I in A’low to A’high loop

TMP := TMP xor A(I);

end loop;

ODD <= TMP;

end p rocess ;

Page 96: VHDL(Iniciar)

LDD 2004-05 96

eman ta zabal zazu

Page 97: VHDL(Iniciar)

LDD 2004-05 97

eman ta zabal zazu

Page 98: VHDL(Iniciar)

LDD 2004-05 98

eman ta zabal zazu

Page 99: VHDL(Iniciar)

LDD 2004-05 99

eman ta zabal zazu

ARQUITECTURA ESTILOS DE DESCRIPCIÓN

• La arquitectura define la funcionalidad de la entidad.

• Estilos de descripción:– Algorítmico: mediante un conjunto de

instrucciones que se ejecutan secuencialmente (proceso)

– Flujo de datos: mediante funciones u operadores.– Estructural: conjunto de componentes

interconectados

Page 100: VHDL(Iniciar)

LDD 2004-05 100

eman ta zabal zazu

Tema 4: Synthesis Issues

- Specifying registers in VHDL- Detecting a rising clock- Controling transparent latches- Finite State Machines

Page 101: VHDL(Iniciar)

LDD 2004-05 101

eman ta zabal zazu

Specifying registers inVHDL

Page 102: VHDL(Iniciar)

LDD 2004-05 102

eman ta zabal zazu

Entiti Flop is

port (D, Clk : in std_logic;

Q : out st_logic);

end Flop;

architecture A of Flop is

begin

process

begin

wait until Clk’event and Clk = ‘1’;

Q <= D;

end process;

end A;

Page 103: VHDL(Iniciar)

LDD 2004-05 103

eman ta zabal zazu

Page 104: VHDL(Iniciar)

LDD 2004-05 104

eman ta zabal zazu

Page 105: VHDL(Iniciar)

LDD 2004-05 105

eman ta zabal zazu

Page 106: VHDL(Iniciar)

LDD 2004-05 106

eman ta zabal zazu

entity incomp_if is

port (EN, D : in std_logic;

Q : out st_logic);

end incomp_if;

architecture A of incomp_if is

begin

process (EN, D )

begin

if ( EN = ‘1’ ) then ;

Q <= D;

end if ;

end process;

end A;

Page 107: VHDL(Iniciar)

LDD 2004-05 107

eman ta zabal zazu

Controling Transparent Latches

Page 108: VHDL(Iniciar)

LDD 2004-05 108

eman ta zabal zazu

Page 109: VHDL(Iniciar)

LDD 2004-05 109

eman ta zabal zazu

Page 110: VHDL(Iniciar)

LDD 2004-05 110

eman ta zabal zazu

Page 111: VHDL(Iniciar)

LDD 2004-05 111

eman ta zabal zazu

FINITE

STATE

MACHINES

Page 112: VHDL(Iniciar)

LDD 2004-05 112

eman ta zabal zazu

Reset*

E2

E0

E1

E3

S2 S1

S1,S0

X

X

Y

1 0

01

0

1

EJEMPLO

Page 113: VHDL(Iniciar)

LDD 2004-05 113

eman ta zabal zazu

Page 114: VHDL(Iniciar)

LDD 2004-05 114

eman ta zabal zazu

Architecture una of UC is

signal EST_PRES,EST_SIG: integer range 0 to 3;

begin...........

EST_SIGEST_PRES

Page 115: VHDL(Iniciar)

LDD 2004-05 115

eman ta zabal zazu

SEC: process (EST_PRES, X,Y)--- inicialización

case EST_PRES is

when 0 =>if X= ‘0’ then EST_SIG<=1;

else EST_SIG <=2;

end if;

when 1 => EST_SIG<=3; when 2 =>

if Y= ‘1’ then EST_SIG<=3;

else EST_SIG <=2;end if;

when 3 =>

if X= ‘0’ then EST_SIG<=1;

else EST_SIG <=0;end if;

end case;

end process SEC;

Page 116: VHDL(Iniciar)

LDD 2004-05 116

eman ta zabal zazu

REG: process (clk, Reset)

begin

if Reset=‘0’ then EST_PRES <= 0;

if clk’ event and clk=‘1’ then

EST_PRES <= EST_SIG;

end if;

end process REG;

Page 117: VHDL(Iniciar)

LDD 2004-05 117

eman ta zabal zazu

S2 <=‘1’ when EST_PRES=2 else 0;

S1 <=‘1’ when (EST_PRES=1 or (EST_PRES=2 AND Y=‘1’)) else 0;

S0 <=‘1’ when (EST_PRES=2 AND Y=‘1’) else 0;

ESTADO <= EST_PRES;

outputs

Page 118: VHDL(Iniciar)

LDD 2004-05 118

eman ta zabal zazu

DESCRIPCIÓN COMPLETA:architecture una of UC is

signal EST_PRES,EST_SIG: integer range 0 to 3;begin

SEC: process (EST_PRES, X,Y)--- inicializacióncase EST_PRES is

when 0 =>if X= ‘0’ then EST_SIG<=1; else EST_SIG <=2;end if;

when 1 => EST_SIG<=3; when 2 =>

if Y= ‘1’ then EST_SIG<=3; else EST_SIG <=2;end if;

when 3 => if X= ‘0’ then EST_SIG<=1; else EST_SIG <=0;end if;

end case;end process SEC;

REG: process (clk, Reset)begin

if Reset=‘0’ then EST_PRES <= 0;if clk’ event and clk=‘1’ then

EST_PRES <= EST_SIG;end if;

end process REG;S2 <=‘1’ when EST_PRE else 0;S1 <=‘1’ when (EST_PRES=1 or (EST_PRES=2 AND Y=‘1’)) else 0;S0 <=‘1’ when (EST_PRES=2 AND Y=‘1’) else 0;ESTADO <= EST_PRES;

end una;

Page 119: VHDL(Iniciar)

LDD 2004-05 119

eman ta zabal zazu

Lógica combinacional

Registro

Generar estado

siguienteEntradas

Señales salida

Estado siguiente

Clk

Estado presente

Generar señales de

salida

Page 120: VHDL(Iniciar)

LDD 2004-05 120

eman ta zabal zazu

(activar overflow)

INIC SUM

LDR

OVF<--0CLR

SUM +INIC

OVF<--0CLR

OVF<--1

Cout

E0 (00)

E3(11) E1(01)

E2(10)

RESET*

01

0

1

0

1

01

0

1

INIC

(cargar elregistro)

(borrar registro yoverflow)

(borrar registro yoverflow) borrar sumar

EJEMPLO:

Page 121: VHDL(Iniciar)

LDD 2004-05 121

eman ta zabal zazu

library IEEE;

use IEEE.std_logic_1164.all;

use IEEE.std_logic_arith.all;

entity p1_ucV is

port( CLK ,RESETL : in std_logic;

INIC, SUM, COUT : in std_logic;

CLRL, LDRL, OVF1, OVF0L: out std_logic;

ESTADO : out integer range 0 to 3);

end p1_ucV;

Descripc ión en VHDL:

Page 122: VHDL(Iniciar)

LDD 2004-05 122

eman ta zabal zazu

architecture UC of p1_ucV is

signal EST_PRES, EST_SIG_EST integer range 0 to 3;

begin

ES: process (EST_PRES, INIC,SUM,COUT)

begin

EST_SIG <= EST_PRES;

case EST_PRES is

Descripc ión en VHDL:

Page 123: VHDL(Iniciar)

LDD 2004-05 123

eman ta zabal zazu

case EST_PRES is

when E0 => if INIC=' 1' then EST_SIG <= E3;

elsif SUM=' 1' then EST_SIG <= E1;

else EST_SIG <= E0;

end if;

when E1 => if COUT=' 1' then EST_SIG <= E2;

else EST_SIG <= E3;

end if;

when E2 => if INIC=' 0' then EST_SIG <= E2;

else EST_SIG <= E3;

end if;

when E3 => if (INIC or SUM) = ' 1' then EST_SIG <= E3;

else EST_SIG <= E0;

end if;

end case;

end process ES;

Descripc ión en VHDL:

Page 124: VHDL(Iniciar)

LDD 2004-05 124

eman ta zabal zazu

Descripc ión en VHDL:

REG: process (clk, resetL)

begin

if (resetL=' 0' ) thenEST_PRES<=E0;

elsif (clk' event) and (clk=' 1' ) then

EST_PRES<=EST_SIG;

end if;

end process REG;

Page 125: VHDL(Iniciar)

LDD 2004-05 125

eman ta zabal zazu

Descripc ión en VHDL:

LDRL <= ' 0' when EST_PRES=E1 else ' 1' ;

CLRL <= ' 0' when (EST_PRES=E1 OR EST_PRES =E0) AND INIC=' 1' else ' 1' ;

OVF1 <= ' 1' when EST_PRES=E1 AND COUT=' 1' else ' 0' ;

OVF0L <= ‘0' when (EST_PRES=E2 OR EST_PRES =E0) AND INIC=' 1' else ‘1' ;

ESTADO <= EST_PRES;

end UC;