Beruflich Dokumente
Kultur Dokumente
1 Introduccion
Objetivos y caractersticas
Ejemplo de diseno
Objetivos:
Normalizar la especificacion de los circuitos integrados de aplicacion
especfica o A.S.I.C.
Especificar el comportamiento de circuitos digitales pero no su construccion.
Origen
VHDL es una sigla que significa VHSIC Hardware Description Language.
VHSIC se refiere a un programa gubernamental del Departamento de
Defensa de EE.UU. que dio su origen y significa Very High Speed
Integrated Circuit.
Su especificacion se encuentra en la NORMA IEEE-1076.
Permite la descripcion de los circuitos en base a tres modelos
Comportamiento
Estructural
Data Flow
Ejemplo de diseno
La entidad de diseno
CONT2 e n t i t y cont2 is
port (
RST Q1 rst : in bit ;
clk : in bit ;
q0 : buffer bit ;
q1 : buffer bit );
CLK Q0 end ;
Pasos a seguir
Indentificar la entidad con un nombre.
Definir parametros de construccion generic.
Indentificar y declarar los puertos de acceso port.
Definir los modos de los puertos in, out, inout, etc.
Diagrama en bloque
Q0
D Q D Q Q1
CLK CK CK
CLR CLR
RST
D0
Q0
D Q D Q Q1
CLK CK CK
CLR CLR
RST
D0 D1
Q0
D Q D Q Q1
CLK CK CK
CLR CLR
RST
D0 D1
Q0
FFD0
D Q D Q Q1
CLK CK CK
CLR CLR
RST
D0 D1
Q0
FFD0
D Q D Q Q1
CLK CK CK
CLR CLR
RST FFD1
Compuertas y componentes
Zocalos
Declaracion de componentes
component f f d
port (
c l r : in bit ;
ck : i n bit ;
d : in bit ;
q : out bit );
end component ;
a r c h i t e c t u r e nombre o f e n t i d a d i s
C o n j u n t o de d e c l a r a c i o n e s
begin
C o n j u n t o de i n s t r u c c i o n e s
end ;
a r c h i t e c t u r e mix o f c o n t 2 i s
s i g n a l d0 , d1 : b i t ;
component f f d
port (
c l r : in b i t ;
ck : i n b i t ;
d : in b i t ;
q : out b i t ) ;
end component ;
begin
f f d 0 : f f d p o r t map ( r s t , c l k , d0 , q0 ) ;
f f d 1 : f f d p o r t map ( r s t , c l k , d1 , q1 ) ;
d0 <= not q0 ;
d1 <= q0 xor q1 ;
end ;
Pasos a seguir
a r c h i t e c t u r e mix o f c o n t 2 i s
s i g n a l d0 , d1 : b i t ;
component f f d
port (
c l r : in bit ;
ck : in bit ;
d : in bit ;
q : out b i t ) ;
end component ;
begin
f f d 0 : f f d p o r t map ( r s t , c l k , d0 , q0 ) ;
f f d 1 : f f d p o r t map ( r s t , c l k , d1 , q1 ) ;
d0 <= no t q0 ;
d1 <= q0 x o r q1 ;
end ;
Entity cont2
Architecture mix
Q0
Q0
D0 Q0 D1 buffer
not xor Q1
FFD0 FFD1
FFD FFD Q1 Q1
D0 D Q Q0 D1 D Q buffer
Modelo de comportamiento
a r c h i t e c t u r e beh o f f f d i s
begin
p r o c e s s ( ck , c l r )
begin
i f c l r = 1 then
q <= 0 ;
e l s i f ck e v e n t and ck = 1 then
q <= d ;
end i f ;
end p r o c e s s ;
end ;
Entidad de simulacion
entity testbench i s
end ;
component c o n t 2
port (
rst : in bit ;
clk : in bit ;
q0 : buffer bit ;
q1 : buffer bit );
end component ;
begin
r e s e t <= 1 , 0 a f t e r 30 n s ;
c l o c k <= no t c l o c k a f t e r 50 n s ;
t e s t c o n t 2 : c o n t 2 p o r t map ( r e s e t , c l o c k , t s t q 0 , t s t q 1 ) ;
end ;
Diagrama de tiempos
entity testbench
/testbench/reset
/testbench/clock
/testbench/tstq0
/testbench/tstq1
component testcont2
/testbench/testcont2/rst
/testbench/testcont2/clk
/testbench/testcont2/q0
/testbench/testcont2/q1
/testbench/testcont2/d0
/testbench/testcont2/d1
component ffd0
/testbench/testcont2/ffd0/clr
/testbench/testcont2/ffd0/ck
/testbench/testcont2/ffd0/d
/testbench/testcont2/ffd0/q
component ffd1
/testbench/testcont2/ffd1/clr
/testbench/testcont2/ffd1/ck
/testbench/testcont2/ffd1/d
/testbench/testcont2/ffd1/q
Entity:testbench Architecture:simul Date: Thu Aug 17 15:49:27 ART 2006 Row: 1 Page: 1
process procedure
function
Las principales instrucciones secuenciales son:
if-then-else loop
case next
asignacion de senales exit
asignacion de variables
de la apertura de una llave {, en ese caso significa el caracter .
Instruccion process
Sintaxis :
Instruccion if-then-elsif-else
Instrucciones secuenciales
Sintaxis :
if condition then
secuencia de instrucciones secuenciales
{ elsif condition then
secuencia de instrucciones secuenciales }
[ else
secuencia de instrucciones secuenciales ]
end if ;
Ejemplo de uso
Instruccion if-then-elsif-else
X0
X2 X1
00 01 11 10
X3
00 1 1
01 1 1
11 1
10 1 1
Entidad de diseno
Ejemplo de uso
FUN e n t i t y FUN is
port (
X0 x0 : in bit ;
x1 : in bit ;
X1
O x2 : in bit ;
X2 x3 : in bit ;
o : out bit );
X3 end ;
Cuerpo de arquitectura
Ejemplo de uso
a r c h i t e c t u r e compt o f f u n i s
begin
p r o c e s s ( x0 , x1 , x2 , x3 )
begin
o <= 0 ;
i f x0 = 0 t h e n X0
i f x2 = 0 X2 X1 0 0 01 11 10
i f x3 = 0 t h e n
o <= 1 ; X3
e l s i f x1 = 1 t h e n ;
o <= 1 ; 00 1 1
end i f ;
e l s i f x3 = 0 and x1 = 0 t h e n
o <= 1 ; 01 1 1
end i f ;
else
i f x1 = 1 t h e n
i f x2 = 0 and x3 = 1 t h e n 11 1
o <= 1 ;
e l s i f x2 = 1 and x3 = 0 t h e n
o <= 1 ; 10 1 1
end i f ;
e l s i f x2 = 1 and x3 = 1 t h e n
o <= 1 ;
end i f ;
end i f ;
end p r o c e s s ;
end ;
Instruccion case
Instrucciones secuenciales
Sintaxis
case expression is
when option { option } =>
secuencia de instrucciones secuenciales
case x i s
when 00 | 11 =>
z <= 1 ;
when o t h e r s =>
z <= 0 ;
end case ;
Tipos enumerados
Introduccion a los tipos de datos
Sintaxis
emumeration literal ::= identifier character literal
identifier es una de las alternativas posibles que puede tener dicho tipo
descripto como un identificador.
character literal es otra forma de representar una alternativa como un
caracter.
Indica los valores que puede tomar un objeto: signal, variable, constant,
declarado con dicho tipo.
Ejemplos:
type bit is ( 0, 1) ;
type boolean is ( FALSE, TRUE ) ;
Variables
Instrucciones secuenciales
Asignacion de variables
Instrucciones secuenciales
C
O
X M O
B
I
N
A
C
I
O
N
A
L
n n+1
Q Q
M
E
M
O
R
I
A
X/O
SEQMLY 0/1
X O
CLK
A
1/0
0/0
e n t i t y seqmly is
port (
clk : in bit ; 1/0
x : in bit ;
o : out b i t ) ; C B 1/0
end ;
0/0
else
end c a s e ;
A A ,1 B ,0
e s t a d o := b ;
end i f ; B C ,0 B ,0
end i f ;
i f x = 0 t h e n
case estado i s C A ,0 B ,0
when a =>
o <= 1 ;
when o t h e r s =>
o <= 0 ;
end c a s e ;
else
o <= 0 ;
end i f ;
end p r o c e s s ;
end ;
Miguel Angel Sagreras () Introduccion al VHDL 23 de octubre de 2011 40 / 123
Descripcion por comportamiento Circuito de Moore
C
O
X M
B
I
N n+1
A
C
Q
I
O
N
A
L
C
O
M
M B
E
I
N
O
n M A
C
Q O I
R O
N
I A
A L
SEQ
00
X Q(0) 1
1
0
0
CLK Q(1)
11 01
e n t i t y seq is 0 0
port (
clk : in bit ;
x : in bit ; 1 1
q : out b i t v e c t o r ( 0 t o 1 ) ) ;
end ; 10
X o
m
Z
b
i
n
a
c
i
o
n
a
y l Y
retardos
ASINC XY
00 01 11 10 Z
Y
Z a b a a 0
X
a b c 0
entity asinc is
port ( d c c c 1
x : in bit ;
y : in bit ;
z : out b i t ) ;
end ; d c a 1
Instruccion loop
Sintaxis
Instruccion next
Sintaxis
Instruccion next
Ejemplo I
etiqueta1: loop
etiqueta2: loop
secuencia_de_instrucciones
If ...... then
next;
end if;
secuencia_de_instrucciones
end loop;
secuencia_de_instrucciones
end loop;
Instruccion next
Ejemplo II
etiqueta1: loop
etiqueta2: loop
secuencia_de_instrucciones
If ...... then
next etiqueta1;
end if;
secuencia_de_instrucciones
end loop;
secuencia_de_instrucciones
end loop;
Instruccion exit
Sintaxis
Instruccion exit
Ejemplo I
etiqueta1: loop
etiqueta2: loop
secuencia_de_instrucciones
If ...... then
exit;
end if;
secuencia_de_instrucciones
end loop;
secuencia_de_instrucciones
end loop;
Instruccion exit
Ejemplo I
etiqueta1: loop
etiqueta2: loop
secuencia_de_instrucciones
If ...... then
exit etiqueta1;
end if;
secuencia_de_instrucciones
end loop;
secuencia_de_instrucciones
end loop;
Instruccion wait
Sintaxis
[ label ] : wait [ on sensitivity clause ] [ until condition ] [ for time expression ];
Diagrama de tiempos
A A
B B
Z Z
A A
B B
Z Z
Descripcion en VHDL
e n t i t y ejemp i s
port (
a : in bit ;
b : in bit ;
z : out b i t ) ;
end ;
a r c h i t e c t u r e beh o f ejemp i s
begin
process
begin
z <= 0 ;
w a i t on a u n t i l a = 1 ;
f o r i i n 0 to 4 loop
w a i t on a , b ;
e x i t when a = 0 ;
z <= 0 ;
i f i = 3 then
z <= 1 ;
end i f ;
end l o o p ;
i f a = 1 t h e n
w a i t on a ;
end i f ;
end p r o c e s s ;
end ;
GAND
E(0)
E O
N
E(n1)
e n t i t y gand is
generic (
n : integer );
port (
e : in b i t v e c t o r ( 0 t o n 1);
o : ou t b i t ) ;
end ;
a r c h i t e c t u r e beh o f gand i s
begin
process ( e )
begin
o <= 1 ;
f o r i i n 0 t o n1 l o o p
i f e ( i )= 0 then
o <= 0 ;
exit ;
end i f ;
end l o o p ;
end p r o c e s s ;
end ;
e n t i t y gand is
generic (
n : integer );
port (
e : in b i t v e c t o r ( 0 t o n 1);
o : ou t b i t ) ;
end ;
a r c h i t e c t u r e beh o f gand i s
begin
process ( e )
v a r i a b l e aux : b i t ;
begin
aux := e ( 0 ) ;
f o r i i n 1 t o n1 l o o p
aux := aux and e ( i ) ;
end l o o p ;
o <= aux ;
end p r o c e s s ;
end ;
Instrucciones concurrentes
Instrucciones concurrentes
Instruccion block
Sintaxsis:
Instrucciones concurrentes
signal . . . . .
PROCESADOR
begin
CONTROLADOR ......
REGISTROS DE BUS ALU
end b l o c k ;
REG_BUS ALU_BUS
memoria : mem p o r t map ( . . . . . .
p e r i f e r i c o s : block
begin
......
UNIDAD DE end b l o c k ;
MEMORIA PERIFERICOS
CONTROL
alu : block
entity procesador i s begin
.... ......
end ; end b l o c k ;
Instrucciones concurrentes
Asignacion concurrente de senal
Instrucciones concurrentes
Asignacion condicional de senal
Sintaxis
Instrucciones concurrentes
Asignacion condicional de senal
Ejemplo
a r c h i t e c t u r e beh o f p r i o m u x i s
e n t i t y priomux i s begin
port ( p r o c e s s ( ena , i n p )
ena : i n b i t v e c t o r (0 to 3 ) ; begin
inp : in b i t v e c t o r (0 to 3 ) ; i f ena ( 0 ) == 1 t h e n
o : out b i t ) ; o <= i n p ( 0 ) ;
end ; e l s i f ena ( 1 ) == 1 t h e n
o <= i n p ( 1 ) ;
a r c h i t e c t u r e df of priomux i s e l s i f ena ( 2 ) == 1 t h e n
begin o <= i n p ( 2 ) ;
o <= e l s i f ena ( 3 ) == 1 t h e n
i n p ( 0 ) when ena ( 0 ) = 1 else o <= i n p ( 3 ) ;
i n p ( 1 ) when ena ( 1 ) = 1 else else
i n p ( 2 ) when ena ( 2 ) = 1 else o <= 0 ;
i n p ( 3 ) when ena ( 3 ) = 1 else end i f ;
0 ; end p r o c e s s ;
end ; end ;
Instrucciones concurrentes
Asignacion seleccionda de senal
Sintaxis :
Instrucciones concurrentes
Asignacion seleccionda de senal
Ejemplo
Instrucciones concurrentes
Equivalencia con un process
Instrucciones concurrentes
component instantiation
Ejemplos:
ffd0 : ffd
p o r t map ( r e s e t , c l o c k , d0 , q0 ) ;
ffd1 : ffd
p o r t map ( c l r => r e s e t , ck => c l o c k , d => d0 , q => q0 ) ;
and8 : gand
g e n e r i c map ( 8 ) ;
p o r t map ( e => i n p , o => s ) ;
Instrucciones concurrentes
Introduccion a la instruccion generate
Registro de desplazamiento
SIN D Q D Q D Q D Q SOUT
CLK CK CK CK CK
Instrucciones concurrentes
Introduccion a la instruccion generate
Registro de desplazamiento
SIN D Q D Q D Q D Q SOUT
CLK CK CK CK CK
Instrucciones concurrentes
Introduccion a la instruccion generate
Registro de desplazamiento
SIN D Q D Q D Q D Q SOUT
CLK CK CK CK CK
Instrucciones concurrentes
Introduccion a la instruccion generate
Registro de desplazamiento
SIN D Q D Q D Q D Q SOUT
CLK CK CK CK CK
Instrucciones concurrentes
Introduccion a la instruccion generate
Registro de desplazamiento
SIN D Q D Q D Q D Q SOUT
CLK CK CK CK CK
Instrucciones concurrentes
Introduccion a la instruccion generate
I=1
D(1) D(2) D(I) D(I+1)
FF(1) FF(I)
D Q D Q
CK CK
Instrucciones concurrentes
Introduccion a la instruccion generate
I=1 I=2
D Q D Q
CK CK
Instrucciones concurrentes
Ejemplo instruccion generate
entity shtreg4 is
port (
clk : in bit ;
sin : in bit ;
sout : out b i t ) ;
end ;
Instrucciones concurrentes
generate
Sintaxis :
if condition
Instrucciones concurrentes
Ejemplo instruccion generate
Instrucciones concurrentes
Ejemplo instruccion generate
Sintaxis :
range ::= simple expression [ to downto ] simple expression
Ejemplo :
type t w o s c o m p l e m e n t i n t e g e r i s range 32768 to 3 2 7 6 7 ;
type b y t e l e n g t h i n t e g e r i s range 0 to 2 5 5 ;
Sintaxis :
Ejemplo :
type r e a l i s 1.0 e38 to 1 . 0 e38
Sintaxis :
Ejemplo :
t y p e b y t e i s a r r a y ( 7 donwto 0 ) o f b i t ;
t y p e mem32kb i s a r r a y ( 0 t o 3 2 7 6 7 ) o f b i t v e c t o r ( 7 t o 0 ) ;
t y p e mat i s a r r a y ( 0 t o 7 , 5 t o 1 0 ) o f b i t ;
Sintaxis :
Ejemplo :
type b i t v e c t o r i s a r r a y ( n a t u r a l r a n g e <>) o f b i t ;
t y p e mem8 i s a r r a y ( n a t u r a l r a n g e <>) o f b y t e ;
t y p e mem32 i s a r r a y ( n a t u r a l r a n g e <>) o f b i t v e c t o r ( 0 t o 3 1 ) ;
architecture ...
signal a : bit ;
signal b : byte ;
signal c : mat ;
signal d : mem32kb ;
begin
Se c o p i a e l b i t 0 de b a a
a <= b ( 0 ) ;
Se c o p i a e l b i t mat ( 1 , 9 ) a l b i t 5 de b
b ( 0 ) <= mat ( 1 , 9 ) ;
Se c o p i a e l b y t e b a l b y t e 0 de d
d ( 0 ) <= b ;
Se c o p i a e l b i t 1 d e l b y t e d ( 0 ) a a
a <= d ( 0 ) ( 1 ) ;
end ;
Miguel Angel Sagreras () Introduccion al VHDL 23 de octubre de 2011 86 / 123
Descripcion por comportamiento Circuito de asincronico
s i g n a l b : byte ;
s i g n a l e : mem32 ( 0 t o 1 5 ) ;
begin
Se c o p i a l o s 4 b i t s s u p e r i o r e s a l o s inferiores
b ( 3 downto 0 ) <= b ( 7 downto 3 ) ;
Se c o p i a l o s 4 b i t s d e l medio de b a
l o s b i t s de 8 a 11 de l a p a l a b r a 0 de d
e ( 0 ) ( 8 t o 1 1 ) <= b ( 6 downto 3 ) ;
end ;
Sintaxis :
t y p e t i m e i s r a n g e 1e18 t o 1 e18
units
fs ; femtosegundo
p s = 1000 f s ; picosegundo
n s = 1000 p s ; nanosegundo
u s = 1000 n s ; microsegundo
ms = 1000 u s ; milisegundo
s e c = 1000 ms ; segundo
min = 60 s e c ; minuto
end u n i t s ;
t y p e d i s t a n c e i s r a n g e 0 t o 1 e16
units
A; a n g s t r o n
u n i d a d e s m e t r i c a s
nm = 10 A ; n a n o m e t e r
um = 1000 nm ; m i c r o m e t e r
mm = 1000 um ; m i l l i m e t e r
cm = 10 mm; i c e n t i m e t e r
m = 10 A ; m e t e r
km = 10 A ; k i l o m e t e r
u n i d a d e s i n g l e s a s
m i l = 254000 A ; m i l
i n c h = 1000 m i l ; p u l g a d a
ft = 12 i n c h ; p i e
yd = 3 ft ; y a r d a
fm = 6 ft ; fhatom
mi = 5280 f t ; m i l l a
lg = 3 mi ; l e g u a
end u n i t s ;
Miguel Angel Sagreras () Introduccion al VHDL 23 de octubre de 2011 90 / 123
Descripcion por comportamiento Circuito de asincronico
....
variable x : distance ;
v a r i a b l e x1 : d i s t a n c e ;
variable y : time ;
variable z : integer ;
begin
E s t o s e puede h a c e r
x := 5 A + 13 f t 25 i n c h ;
y := 3 n s + 5 min ;
z := n s / p s ;
x := z mi ;
y := y / 1 0 ;
z := x / x1 ;
E s t o no s e puede h a c e r s i n
sobre cargar operadores
xx
x/y
end ;
Subtipos
constraint ::=
range constraint
index constraint
Expresiones
Operadores ordenados por precedencia descedente
Expresiones
Sintaxis
expression ::= term::=
relation { and relation } factor { multiplying operator factor }
relation { or relation }
relation { xor relation }
relation [ nand relation ] multiplying operator ::= * / mod rem
relation [ nor relation ]
relation { xnor relation }
factor ::=
primary [ ** primary ]
relation ::=
simple expression abs primary
[ relational operator simple expression ] not primary
simpe expression ::= literal
[ sign ] term { adding operator term }
aggregate
function call
Subprograma
Sintaxis
subprogram declaration ::=
subprogram specification ;
Subprograma
Ejemplo de una funcion
e n t i t y muxn is
generic (n : integer );
port (
s : in b i t v e c t o r ( n1 downto 0 ) ;
e : in b i t v e c t o r (2n1 downto 0 ) ;
o : out b i t ) ;
end ;
a r c h i t e c t u r e d f o f muxn i s
function c o n v i n t e g e r ( arg : b i t v e c t o r ) return i n t e g e r is
v a r i a b l e aux : i n t e g e r ;
begin
aux := 0 ;
f o r i i n arg range loop
aux := aux 2 ;
i f arg ( i )= 1 then
aux := aux +1;
end i f ;
end l o o p ;
end ;
begin
o <= e ( c o n v i n t e g e r ( s ) ) ;
end ;
Subprograma
Ejemplo de una funcion
package f f d p a c k i s
function f f f d ( signal clr : b i t ; s i g n a l ck : b i t ; d : b i t ) r e t u r n b i t ;
package body f f d p a c k i s
f u n c t i o n f f f d ( s i g n a l c l r : b i t ; s i g n a l ck : b i t ; d : b i t ) r e t u r n b i t is
begin
i f c l r = 1 t h e n
return 0 ;
e l s i f ck = 1 and ck e v e n t t h e n
return d ;
end i f ;
end ;
p r o c e d u r e p f f d ( s i g n a l c l r : b i t ; s i g n a l ck : b i t ; d : b i t ; s i g n a l q : out b i t ) i s
begin
q <= f f f d ( c l r , ck , d ) ;
end ;
end ;
Definicion de parametros
Sintaxis
inteface list ::=
interface element { ; interface element }
Funcion de resolucion
C A
Funcion de resolucion
e n t i t y wand is
port (
b : in bit ;
c : in bit ;
d : in bit ;
a : out bit );
end ;
a r c h i t e c t u r e mix o f wand i s
f u n c t i o n reswand ( arg : b i t v e c t o r ) r e t u r n b i t is
v a r i a b l e aux : b i t ;
begin
f o r i i n arg range loop
i f arg ( i ) = 0 then
return 0 ;
end i f ;
end l o o p ;
return 1 ;
end ;
s i g n a l a : reswand b i t ;
begin
a <= b ;
a <= c ;
a <= d ;
end ;
Packages
Ejemplo
package mio i s
type m i b i t ( u , x , 0 , 1 , z ) ;
t y p e m i b i t v e c t o r i s a r r a y ( i n t e g e r r a n g e <>) o f b i t ;
function c o n v i n t e g e r ( arg : m i b i t v e c t o r ) return i n t e g e r ;
component f f d (
p o r t ( c l r : i n b i t ; ck : i n b i t ; d : i n b i t ; q : ou t b i t ) ;
end component ;
end ;
Packages
Sintaxis
Retardo inercial
Ancho de pulso mayor que el retrado de compuerta
E S
10 ns
15 ns 15 ns
10 ns
Retardo inercial
Ancho de pulso menor que el retrado de compuerta
E S
10 ns
5 ns
Retardo inercial
Evento por evento, pulso mayor que el retardo de compuerta
E S E S
10 ns 10 ns
t < 20 ns t = 30 ns
E S E S
10 ns 10 ns
t = 20ns 30 ns < t <35ns
E S E S
10 ns 10 ns
20 ns < t < 30 ns t = 35 ns
E S
t = 30 ns 10 ns
35 ns < t < 45ns
10 ns
E S
E 10 ns
t = 45 ns
S E S
10 ns
t > 45 ns
15 ns
t = 45 ns
t = 20ns
t = 35 ns
Retardo inercial
Evento por evento, pulso menor que el retardo de compuerta
E S E S
t = 25 ns
10 ns 10 ns
t < 20 ns
E S E S
25 ns < t < 30ns
10 ns 10 ns
t = 20ns
E S E S
10 ns t = 30 ns 10 ns
20 ns < t < 25 ns
E S
t = 25 ns t > 30 ns 10 ns
5 ns
t = 20ns
t = 30 ns
Miguel Angel Sagreras () Introduccion al VHDL 23 de octubre de 2011 106 / 123
Descripcion por comportamiento Circuito de asincronico
Retardo inercial
En el retardo inercial :
La compuerta no puede almacenar mas que un cambio.
Todo cambio nuevo en la entrada borra cualquier cambio anterior.
Forma de onda
S
20 ns 40 ns 70 ns 100 ns
Diagrama de tiempos
Elemento de forma de onda
o waveform element
Asignacion inercial
Prueba con pulso de 15 ns
e n t i t y buf i s
port (
e : in bit ;
s : out b i t ) ;
end ;
a r c h i t e c t u r e beh o f b u f i s
begin
process ( e )
begin
s <= e a f t e r 10 n s ;
end p r o c e s s ;
end ;
entity pulse15ns i s
end ;
a r c h i t e c t u r e mix o f p u l s e 1 5 i s
signal e : bit ;
signal s : bit ;
component b u f
port (
e : in bit ;
s : out b i t ) ;
end component ;
begin
e <= 0 , 1 a f t e r 20 ns , 0 a f t e r 35 n s ;
t e s t : b u f p o r t map ( e , s ) ;
end ;
Miguel Angel Sagreras () Introduccion al VHDL 23 de octubre de 2011 109 / 123
Descripcion por comportamiento Circuito de asincronico
Retardo inercial
Evento por evento, pulso mayor que el retardo de compuerta
t = 10 ns
0 1 0 t=0 1 0
E 0 delta 20 ns 35 ns
E 0 20 ns 35 ns
t=0 t = 10 ns 00
0 Se copia el 0 a la
0 Se activa el process 0 cabecera del driver
S 0 10 ns
por primera vez
S 0 10 ns
No hay evento
0 1
0 t = delta 1 t = 20 ns
0 1
0 1 0 No hay 1 0 Se copia el 1 a la
E 0 delta 20 ns 35 ns
evento
E 1 20 ns 35 ns
cabecera.
Hay evento
t = delta t = 20 ns
0 1 Se activa el process
S 0 10 ns
S 0 30 ns
por evento de E
Se anota una
transaccion en S
Retardo inercial
Evento por evento, pulso mayor que el retardo de compuerta
t = 30 ns
0
E 1 35 ns
t = 30 ns 11
Se copia el 1 a la
1 1 cabecera.
S 0 30 ns
Hay evento
No hay ningun process
que dependa de un
evento en S
00 t = 35 ns
0 0
E 0 35 ns
Se procede de acuerdo
a lo visto anteriormente
t = 35 ns
0
S 1 45 ns
t = 45 ns
E 0
t = 45 ns 0
0
0 0
S 0 45 ns
Se procede de acuerdo
a lo visto anteriormente
Asignacion inercial
Prueba con pulso de 5 ns
e n t i t y buf i s
port (
e : in bit ;
s : out b i t ) ;
end ;
a r c h i t e c t u r e beh o f b u f i s
begin
process ( e )
begin
s <= e a f t e r 10 n s ;
end p r o c e s s ;
end ;
entity pulse5ns i s
end ;
a r c h i t e c t u r e mix o f p u l s e 5 i s
signal e : bit ;
signal s : bit ;
component b u f
port (
e : in bit ;
s : out b i t ) ;
end component ;
begin
e <= 0 , 1 a f t e r 20 ns , 0 a f t e r 25 n s ;
t e s t : b u f p o r t map ( e , s ) ;
end ;
Miguel Angel Sagreras () Introduccion al VHDL 23 de octubre de 2011 112 / 123
Descripcion por comportamiento Circuito de asincronico
Retardo inercial
Evento por evento, pulso menor que el retardo de compuerta
0 1 0 t=0
E 0 delta 20 ns 25 ns
t=0
0 Se activa el process
S 0 10 ns
por primera vez
00 t = delta
0 0 1 0
E 0 delta 20 ns 25 ns
No hay
evento
Se copia el 0 a la
t = delta cabecera del driver
0
S 0 10 ns
t = 10 ns
1 0
E 0 20 ns 25 ns
t =10 ns 00 Se copia el 0 a la
0 0 cabecera del driver
S 0 10 ns
No hay evento
Retardo inercial
Evento por evento, pulso menor que el retardo de compuerta
1
1 t = 20 ns
1 1 0 Se copia el 1 a la
E 1 20 ns 25 ns
cabecera.
Hay evento
t = 20 ns
1 Se activa el process
S 0 30 ns
por evento de E
Se anota una
transaccion en S
00 Se copia el 0 a la
t = 25 ns
0 0 cabecera. Hay evento.
E 1 25 ns
Se anota una transaccion
inercial en S. Se tacha
la transaccion en 30 ns
t = 25 ns
1 0
S 0 30 ns 35 ns
t = 35 ns
E 0
t = 35 ns 00
0
0 Se copian el 0 a la
S 0 35 ns
cabecera del driver
No hay evento
Asignacion de senales
Composicion de las senales
Asignacion inercial
Regla a aplicar
Linea de transmision
En una linea de trasnmision, la senal que ingresa sale aproximadamente igual
independientemente del retardo que posea.
Cable coaxil
L
T = L/C
er ur
C= C 0
e r ur
Miguel Angel Sagreras () Introduccion al VHDL 23 de octubre de 2011 117 / 123
Descripcion por comportamiento Circuito de asincronico
E 10 ns S
5 ns 5 ns
10 ns
5 ns
entity coaxil is
port (
e : in bit ;
s : out b i t ) ;
end ;
a r c h i t e c t u r e beh o f c o a x i l i s
begin
process ( e )
begin
s <= t r a n s p o r t e a f t e r 10 n s ;
end p r o c e s s ;
end ;
entity pulse5ns i s
end ;
a r c h i t e c t u r e mix o f p u l s e 5 i s
signal e : bit ;
signal s : bit ;
component b u f
port (
e : in bit ;
s : out b i t ) ;
end component ;
begin
e <= 0 , 1 a f t e r 20 ns , 0 a f t e r 25 n s ;
t e s t : b u f p o r t map ( e , s ) ;
end ;
Miguel Angel Sagreras () Introduccion al VHDL 23 de octubre de 2011 119 / 123
Descripcion por comportamiento Circuito de asincronico
t =10 ns
0 1 0 t=0 1 0
E 0 delta 20 ns 25 ns
E 0 20 ns 25 ns
t=0 t = 10 ns 00
0 Se copia el 0 a la
0 Se activa el process
0 cabecera del driver
S 0 10 ns
por primera vez S 0 delta
No hay evento
00 11
0 t = delta 1 t = 20 ns
0 1 0 1 0
E 0 delta 20 ns 25 ns
No hay
evento
E 1 20 ns 25 ns
t = delta Se copia el 0 a la t = 20 ns
cabecera del driver Se copia el 1 a la
0 1 cabecera.
S 0 10 ns
S 0 30 ns
Hay evento
Se activa el process
por el evento de E
Se anota una
transaccion en S
0 t =25 ns
0 Se copia el 0 a la
0 0 cabecera.
E 0 25 ns
Hay evento
Se activa el process
t =25 ns por el evento de E
Se anota una
1 0 transaccion en S
S 0 30 ns 35 ns
t = 30 ns
Se copia el 1 a la cabecera
E 0 Hay evento.
No hay ningun process
que dependa de un
t = 30 ns 11 evento de S
1 1 0
S 1 30 ns 35 ns
t = 45 ns
E 0
t = 35 ns 00
0
0
S 0 35 ns
Se procede de acuerdo
a lo visto anteriormente
Se anulan todas las transacciones que se encuentran en la cola del driver que
tengan tiempos mayores o iguales que las transacciones que se anotan en el
momento de la asignacion.
No se modifica ninguna otra transaccion.
inertial
target ::=
name
aggregate
waveform ::=
waveform element { , waveform element }