Você está na página 1de 6

FPGA-BASED PLATFORM FOR IMAGE AND VIDEO PROCESSING

EMBEDDED SYSTEMS
F J a v i e r To l e d o , J . J a v i e r Ma r t l n e z a n d J . Ma n u e l Fe r r a n d e z
Dp t o . El e c t r o 6 n i c a , Te c n o l o g i l a
d e
Co m p u t a d o r a s y Pr o ye c t o s
U n i v e r s i d a d Po l i t e c n i c a d e Ca r t a g e n a
P1 . d e l
H o s p i t a l , s / n , 3 0 2 0 2 , Ca r t a g e n a , Sp a i n
e m a i l : j
a v i e r t o l e d o
u p c t . e s
ABSTRACT In t h i s w o r k a n FPGA-b a s e d p l a t f o r m i s d e s c r i b e d . It i s
a i m e d f o r s p e e d i n g u p t h e d e v e l o p m e n t o f e m b e d d e d s ys -
No w a d a ys ,
w a g e
a n d u i e o
p r o e s s i n g a p i c a t i n
t e m s
f o r
i m a g e p r o c e s s i n g a l g o r i t h m s .
Th e
p l a t f o r m a c q u i -
a r e
m o v i n g
t o w r e p l a r s c o n g a s u m e r m f a r k e t s o u t h r
e x i s t s c l e a y r e s v i d e o i n s t a n d a r d a n a l o g f o r m a t s , d i g i t i z e s i t , a n d s t o r e s
t h e d n e e d
o f e p l a c In PCb s s o f t w a r e s o u i n s w i t e -
i t i n e x t e r n a l
m e m o r y d e v i c e s , a n d s o t o o v e r c o m e t h e FPGA
b e d d e d s r o h e s s o d e r .
n
k e l e d
l i m i t e d s t o r a g e c a p a b i l i t y, a m a j o r d r a w b a c k i n i m a g e a p p l i -
r i s t c o f t e
m o e r FG
d e v i e s m a k e p o s i b e
t o s b i l
c a t i o n s . In o r d e r t o c o n f e r
v e r s a t i l i t y
t o t h e e m b e d d e d
s ys -
w h o l e s ys t e m s w i t h
t e m , t h e p l a t f o r m i n c l u d e s a s a k e y c o m p o n e n t a n i n t e r f a c e
In t h i s
p a p e r
w e d e s c r i b e a p l a t f o r m f o r
d e v e l o p i n g f u l l y
w h i c h a l l o w s t h e u s e r i n t e r a c t i o n : t o c h o o s e o p t i o n s , t o c o n -
FPGA-b a s e d e m b e d d e d s ys t e m s d e s i g n e d f o r i m a g e a n d v i -
f i g u r e p a r a m e t e r s , e t c .
d e o
p r o c e s s i n g a p p l i c a t i o n s .
It i s a h a r d w a r e / s o f t w a r e
s ys -
In t h e
f o l l o w i n g
s e c t i o n s t h e
p l a t f o r m
i s
p r e s e n t e d . Fi r s t ,
t e m w h i c h m a k e s t h e
d e s i g n p r o c e s s
e a s i e r a n d f a s t e r . It a l s o
t h e f r a m e g r a b b e r a n d t h e g e n e r a l p u r p o s e u s e r i n t e r f a c e a r e
m a k e s f e a s i b l e t h e i n t e r a c t i o n w i t h t h e u s e r a n d t h e r u n -t i m e
d e s c r i b e d i n Se c t i o n s 2 a n d 3
r e s p e c t i v e l y.
Th e n t h e i n t e -
c u s t o m i z a t i o n o f
p r o c e s s i n g a l g o r i t h m s .
g r a t i o n o f b o t h t h e h a r d w a r e a n d t h e s o f t w a r e t o b u i l d t h e
w h o l e p l a t f o r m i s d e s c r i b e d i n Se c t i o n 4 . In Se c t i o n 5 i s
1 . INTRODU CTION p r e s e n t e d a n a p p l i c a t i o n w h e r e t h e p l a t f o r m h a s b e e n u s e d .
Fi n a l l y, c o n c l u s i o n s a r e r e m a r k e d i n Se c t i o n 6 .
Th e i n t r o d u c t i o n o f t h e Fi e l d -Pr o g r a m m a b l e Ga t e Ar r a y d e -
v i c e s h a v e g i v e n r i s e t o t h e r e c o n f i g u r a b l e c o m p u t i n g c o n -
2 . TH E FRAME GRABBER
c e p t .
Th e FPGA d e v i c e s ' i n t e r n a l s t r u c t u r e m a k e s t h e m
p e r -
f e c t l y s u i t a b l e f o r e x e c u t i n g i n p a r a l l e l e l e m e n t a r y d i g i t a l
In o r d e r t o
p r o c e s s v i d e o , w e h a v e
d e v e l o p e d
a f r a m e
g r a b -
p r o c e s s i n g t a s k s . Th i s , t o g e t h e r w i t h t h e i r r e c o n f i g u r a b i l i t y
b e r w h i c h a c c e p t s s t a n d a r d a n a l o g v i d e o s i g n a l , c o n v e r t s i t
c a p a b i l i t i e s , e x p l a i n s w h y
FPGAs c o n s t i t u t e a
c o m p e t i t i v e
i n t o d i g i t a l a n d s t o r e s i t i n m e m o r y. Ne x t t h e v i d e o a c q u i -
a l t e r n a t i v e f o r
h i g h p e r f o r m a n c e s i g n a l
a n d
i m a g e p r o c e s s - s i t i o n m o d u l e a n d t h e f r a m e b u f f e r a r e d e s c r i b e d . Th e
Fi g -
i n g , e . g . [ 1 ] . Mo r e o v e r , b e c a u s e o f t h e i r f l e x i b i l i t y i t i s
p o s - n r c
1
s h o w s t h e
p r o p o s e d
a r c h i t e c t u r e .
s i b l e t o
i m p l e m e n t
n o t
o n l y s p e c i f i c a l g o r i t h m s
b u t a l s o i n -
t e r f a c e s , c o n t r o l l e r s , g l u e l o g i c , e v e n m i c r o p r o c e s s o r s , a n d
t h e n t o i n t e g r a t e t h e w h o l e s ys t e m i n j u s t o n e s ys t e m o n a
c h i p e a c h d a y m o r e c o m p l e x a n d m o r e p o w e r f u l .
Th e
SAA7 1 1 3 i s a v i d e o
i n p u t p r o c e s s o r
f r o m
Ph i l i p s
Se m i -
Im a g e a n d v i d e o p r o c e s s i n g a p p l i c a t i o n s h a v e p l a ye d a c o n d u c t o r s a b l e t o d e c o d e PAL, SECAM a n d NTSC f r o m
v e r y i m p o r t a n t r o l e , a c t i n g l i k e d r i v e r s o f t h e r e c o n f i g u r a b l e d i f f e r e n t s o u r c e s ( CVBS, S-v i d e o ) i n t o ITU -R BT 6 0 1 . Th e
c o m p u t i n g e v o l u t i o n . Th e n a t u r e o f i m a g e a n d v i d e o p r o -
SAA71 L1 3
i s c o n t r o l l e d
t h r o u g h 1 2 C b u s , s o w e h a v e d e -
c e s s i n g , i n v o l v i n g c o m p u t a t i o n a l l y i n t e n s i v e t a s k s r e p e a t e d v e l o p e d a n I2 C c o n t r o l l e r m o d u l e i n o r d e r t o c o n f i g u r e t h e
u s u a l l y w i t h t h e r e q u i r e m e n t s o f h i g h f r a m e r a t e o n a l a r g e SAA71 1 3 r e g i s t e r s w i t h t h e s u i t a b l e v a l u e s . Th e 1 2 C c o n -
s e t o f i m a g e d a t a , m a k e i t s u i t a b l e f o r i t s FPGA i m p l e m e n - t r o l l e r f i r s t s e n d s t h e a d d r e s s , t h e n t h e s u b a d d r e s s a n d f i n a l l y
t a t i o n , w h e r e i t i s p o s s i b l e t o e x p l o i t p a r a l l e l i s m a t s e v e r a l t h e d a t a . Al l o f t h e s e 8 b i t w i d e v a l u e s a r e s t o r e d i n a ROM
l Le v e l Ls . m e m o r y d e s c r i b e d i n VH DL t o b e i m p l e m e n t e d w i t h LU Ts
Th i r e e a h : : . . -[ . h a s : b e e n f u d e b y Mi n i . s t e Mi n d e Tr . b . : y As n t u i n a d i t r b u e m a n e r A s t a t e m a h n d e l w i t t e a t
So c i a : l e s o f Sp a i n IM[ SERSO 1 RETVIS 1 5 0 / 0 6 . s e r i a l i z a t i o n , t h e t i m i n g a n d t h e a c k n o w l e d g m n e n t s i g n a l s . It
1 -4 2 4 4 -0 6 0 6 -4 / 0 7/ $ 2 0 . OO C2 0 0 7 IEEE. 1 71
w o r k s a t 4 0 0 K b i t / s , t h e d a t a r a t e d e f i n e d a s f a s t m o d e i n t h e
r
1 2 C b u s
s p e c i f i c a t i o n .
Vi d e o SAA71 1 3
i n 3 u t SA
Th e SAA71 1 3 h a s a n 8 b i t d i g i t a l Vi d e o Po r t
Ou t p u t
( VPO) , w h e r e v i d e o d a t a a r e a v a i l a b l e . Th e r e a r e 72 0 a c t i v e
p i x e l s p e r
l i n e i n YU V 4 : 2 2 f o r m a t . Th e n u m b e r o f l i n e s
To s p e c i f i c
o f a f r a m e d e p e n d s o n t h e v i d e o s t a n d a r d ( PAL, NTSC) . Bf f p r o c e s s i n g c o r e
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ p r o c s s i n c r e r
Th e VPO a l s o e n c o d e s
t i m i n g
r e f e r e n c e s . A s t a t e m a c h i n e
h a s b e e n d e s i g n e d t o m a n a g e t h e i n f o r m a t i o n f r o m t h e VPO
-----------------------------------------
Fr a m e g r a b b e r
o f t h e SAA7 1 1 3 , i n o r d e r t o d e t e r m i n e t h e l u m i n a n c e a n d *
Im p l e m e n t e d o n FPGA
~
Ex t e r n a l c o m p o n e n t
c h r o m i n a n c e v a l u e s o f e a c h
p i x e l ,
a n d t o
i d e n t i f y
t h e s t a r t o f
a n e w l i n e , a n e w f i e l d o r a n e w f r a m e , f r o m t h e s e q u e n c e s
Fi g . 1 . Bl o c k d i a g r a m o f t h e h a r d w a r e o f t h e f r a m e g r a b b e r .
o f d a t a v a l u e s o n VPO. Th i s s t a t e m a c h i n e i s c l o c k e d a t
Th e FPGA d e v i c e h o u s e s
t h e
i n t e r f a c e w i t h t h e v i d e o i n -
2 7 MH z , t h e
s ys t e m
c l o c k
o u t p u t
o f t h e SAA71 1 3 , w h i c h
p u t p r o c e s s o r t h e 1 2 C c o n t r o l l e r , t h e f r a m e b u f f e r c o n t r o l l e r
d e t e r m i n e s i t s d a t a
f r e q u e n c y.
w i t h t h e m e m o r y i n t e r f a c e s a n d t h e
c o l o r s p a c e c o n v e r t e r .
Th e YU V
c o l o r s p a c e
i s u s e d
b y
t h e PAL a n d NTSC
c o l o r v i d e o s t a n d a r d s . H o w e v e r , RGB i s t h e m o s t p r e v a -
l e n t c h o i c e f o r c o m p u t e r g r a p h i c s . Th e r e f o r e , w e h a v e i n - u s t c o n s i d e r a U ART t o c o n n e c t w i t h a c o n p u t e r a n d t r a n s -
c l u d e d a c o n v e r t e r f r o m YU V t o RGB i n t h e d e s i g n . It j u s t f e r s o m e i n f o r m a t i o n .
t h a o w e v e r ,
t h e u s e o f a PC s i m p l y f o r
i m p l e m e n t s t h e c o r r e s p 1 o n d r a e i n g n l i n e a r e q u a t i o n s c w l h i h c > a n
r u n n i n g t h e s o f t w a r e t h a t m a n a g e s t h e c o m m u n i c a t i o n s a n d
b e f o u n d , e . c o i n r [ 2 ] o t h e i n t e r f a c e
i s
a p o o r , v e r y l o w e f f i c i e n t s o l u t i o n , e v e n u n -
f e a s i b l e i n e m b e d d e d
s ys t e m s .
W i t h t h e a i m o f o v e r c o m i n g t h i s d r a w b a c k o f FPGA-
2 . 2 . Fr a m e b u f f e r i n g b a s e d
e m b e d d e d s ys t e m s , w e h a v e d e s i g n e d a c o r e h a r d w a r e
w h i c h f a c i l i t a t e s t h e a d d i t i o n o f a u s e r i n t e r f a c e t o FPGA-
Th Du e
i m a g
f r i z m
t h e
SAA71 1 i s s t r e i n a
f r a m e i b u f f e r a
b a s e d
s ys t e m s .
Th e c o r e i s b a s e d o n Mi c r o Bl a z e , a s t a n -
Du e h t o n i t s Si z e , t h e f r m e m o y
b f e v i c e s .
m d e r t o p r e x t e n a
a s yn d a r d 3 2 b i t RISC H a r v a r d -s t yl e s o f t p r o c e s s o r d e v e l o p e d f o r
c h m p o r o n o u t SR m e m y d e v i e s In o a d i f e r t e n t f r o m o a c q u i s i -
X i l i n x FPGA d e v i c e s . Th i s g i v e s f l e x i b i l i t y a n d v e r s a t i l i t y,
t e m p o r i z a t i o n p r e o b s , d e v e n i a d i f f e r e t v e o h a q u i a s i
a n d e n s u r e s f a s t r e -d e s i g n o f t h e h a r d w a r e a r c h i t e c t u r e f o r
b e e n u s e d t o d e s r g n t h e f r a m e b u f f e r . W e t h
d o u b l e -
Le n u e r h a s
e n h a n c e d o r n e w
a p p l i c a t i o n s .
Th e c o r e i s m a d e
u p
o f h a r d -
b e e n u ys t e d
t o
a d e s i n g f r a m e b f f e r t h e W i r s t h d o u b b u f f e r
i n g w a r e c o m p o n e n t s a n d s o f t w a r e f u n c t i o n s i n d i f f e r e n t l e v e l s .
t h e s ys t e m i s r e a d i n g a f r a m e f r o m t h e f i r s t b u f f e r a n d , a t t Th a n k s t o t h e c o r e i t i s
p o s s i b l e
t o
p r e s e n t
t e x t i n f o r m a -
s a m e t i m e , i t i s
w r i t i n g
a n e w f r a m e i n t h e s e c o n d o n e . W i t h
t i o n i n a VGA m o n i t o r t o t h e u s e r , w h o c a n n a v i g a t e t h r o u g h
e a c h n e w f r a m e t h e b u f f e r s a r e
s w a p p e d .
Th e
r e a d i n g
i s a t
7
-- ~ ~ ~ ~ ~ m e n Lu s , s e l e c t o p t i o n Ls a n d u c o n f i g u r e p a r a m e t e r s b y m e a n s o f
t h e f r e q u e n c y
d e t e r m i n e d b y t h e i m a g e p r o c e s s o r , w h i l e t h e
a c
. . . . . ' ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ a p o i n t e r d e v i c e . So , i t p r o v i d e s t h e f l e x i b i l i t y o f a d a p t i n g
w r i t i n g
i s
s e t
b y
t h e
v i d e o
i n p u t p r o c e s s o r
d a t a r a t e . Th e
t h s t o t u e r o r p r f e e c e . o
m e m o r y
i n t e r f a c e f o r
c o n t r o l l i n g
t h e w r i t e a n d r e a d
o p e r a -
e x a m l e
o
t h e u s e r
r o u l d m s e l e c d i f f
e r e n
c e s .
t o
o r
t i o n s i s i m p l e m e t e d o n h e FPGA
e x a m p l e ,
t h e u s e l r c o u l d s e l e c t d i f f e l r e n t m a s k s t o c o n v o l u t e
Ti o n s
i s
2 i m p l e m e t e d f o n a t h o f PGA. SAA71 1 3 i m p l i e s t h a
w i t h t h e a c q u i r e d i m a g e , s e t t h e t h r e s h o l d v a l u e i n a b i n a -
Th e 4 : 2 : 2 o u l t p u t f o r m a t o f t h e C; SAA71 1 3 2 i m p l i e s t a t r i a i n p o e s r a j s h z o s d s r d , Nx t a i
t h e r e i s a l u m i n a n c e Y v a l u e f o r e a c h p i x e l b u t o n l y a c h r o m i -
r e r d
z o o m a s e s r e . e x S a s
n a n c e
p a i r
U V f o r t w o
p i x e l s .
W i t h t h e s e d a t a , RGB c o m -
m o d u l e s a r e d e s c r i b e d .
p o n e n t s c a n b e c a l c u l a t e d w i t h i n t h e c o l o r s p a c e c o n v e r t e r
d e s i g n e d . H o w e v e r , i n RGB e a c h p i x e l i s 2 4 b i t w i d e w h i l e 3 . 1 . Th e t e x t f o n t s
i n YV t w o p i x e l s a r e 3 2 b t X 1 w i d e , Te r e f o r e , i t L i S m o r e
e f f i c i e n t
t w o
s t o e l c o l o r i o t i w i n e . YU Ve c o o r e , i t i s p a c e
In o r d e r t o
d i s p l a y
c h a r a c t e r s t h e f o n t m u s t b e
p r e v i o u s l y
d e -
Ph ys c i c a l l y, s t o r e a c h f r a m e l b r c n f o r m a t i o n s i s t s U Vo f l a r 3 t 2 f i n e d . In i t i a l l y,
t w o 8
p i x e l -w i d e
a n d
1 3 p i x e l -h i g h
t e x t f o n t s
SRMs i t a k l y, e s c h p o s s i b e t o u s t o r e t w o n p i x e l s i n j u s 2 t o n e a d -
a r e a v a i l a b l e . In
t h e m ,
e a c h c h a r a c t e r i s c o d e d i n a
b i t m a p
r e p r e s e n t a t i o n , i n s i d e a n 8 x 1 3 p i x e l s b o x . Th e c h a r a c t e r s
d r e s s , a n d s o h a l v i n g t h e n u m b e r o f a c c e s s t o t h e m e m o r y.
h a v e b e e n d r a w n i n s i d e t h e b o x w i t h 1 ' s f o r t h e f o r e g r o u n d
a n d 0 ' s f o r t h e b a c k g r o u n d . So , e a c h l i n e yi e l d s a b yt e a n d
3 . GENERAL PU RPOSE U SER INTERFACE e a c h c h a r a c t e r i s d e f i n e d b y 1 3 b yt e s . Al l t h i s p r o c e s s h a s
b e e n d o n e w i t h t h e a l p h a n u m e r i c c h a r a c t e r s ( 0 -9 , a -z , A-Z )
U n l i k e PC-b a s e d s o l u t i o n s , w h e r e v i s u a l i z a t i o n o f t e x t i n f o r - a n d s o m e s ym b o l s c o n s i d e r e d a s u s e f u l .
m a t i o n i s c o m p l e t e l y u s u a l , t h i s i s n o t s o n a t u r a l i n h a r d w a r e - Ea c h f o n t b i t m a p a s s o c i a t e d t o a c h a r a c t e r h a s b e e n s t o r e d
b a s e d s o l u t i o n s . Mo s t o f t h e p r e s e n t FPGA-b a s e d e m b e d d e d i n ROM m e m o r y, a s t h e f o n t i s f i x e d a t d e s i g n t i m n e . Ne w
s ys t e m s d o n o t o f f e r a n i n t e r f a c e t o t h e u s e r . So m e t i m e s t h e y c h a r a c t e r s o r s ym b o l s c a n b e e a s i l y a d d e d t o t h e f o n t j u s t b y
1 72
i a
T
p e c i i c Th e t e x t s c r e e n i s c o n n e c t e d t o Mi c r o Bl a z e
m i c r o p r o - NJ
A L AL
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ p r o c e s s i n g
c o r e
r ----{ -----------------------_ _ _ I-. --' . ** .
.
t t c e s s o r
u s i n g
t h e
On -c h i p Pe r i p h e r a l Bu s ( OPB) . So , a n OPB
p e r i p h e r a l w i t h t h e SRAM i n t e r f a c e a n d t h e l o g i c t o m a -
. SRAM
l l l l . _ _ n a g e
d a t a
h a s b e e n
c r e a t e d .
Th e h a r d w a r e o f t h e p e r i p h e r a l
r 1 1 * i n c l u d e s t h e SRAM
m e m o r y
i n t e r f a c e t o c o n t r o l w r i t e a n d
l l l
l _ i r e a d
o p e r a t i o n s ,
a n d t h e
l o g i c
t o
i n t e r p r e t
t h e d a t a f r o m Mi -
_ . * . | c r o Bl a z e i n t o a d d r e s s a n d d a t a b u s e s v a l u e s . It c a r r i e s o u t
OPB b u s
I t w o d i f f e r e n t t a s k s :
c h o o o e l .
i t r e c e i v e s d a t a f r o m Mi c r o Bl a z e , a n d
m a n a g e s
t h e
In t e r r u p t
w r i t e o p e r a t i o n s i n t h e SRAM m e m o r y. Th e s e t a k e
p l a c e o n l y w h e n a m o d i f i c a t i o n i n t h e t e x t i n f o r m a -
U s e r i n t e r f a c e c o r e t i o n d i s p l a ye d i s d o n e .
* Im p l e m e n t e d o n FPGA * Ex t e r n a l c o m p o n e n t
.
i t r e a d s d a t a f r o m t h e
m e m o r y
t o s h o w t h e t e x t s c r e e n
Fi g . 2 . Bl o c k d i a g r a m o f t h e h a r d w a r e o f t h e u s e r i n t e r f a c e i n t h e VGA m o n i t o r . Th e s e d a t a a r e s e n t t o t h e VGA
c o r e . Th e FPGA d e v i c e h o u s e s t h e t e x t s c r e e n c o n t r o l l e r , t h e Ge n e r a t o r Mo d u l e - w h i c h w i l l b e d e s c r i b e d l a t e r . Th i s
VGA g e n e r a t o r m o d u l e , t h e ROM w i t h t h e f o n t s , t h e m o u s e p r o c e s s i s i n d e p e n d e n t o n Mi c r o Bl a z e . It i s c l o c k e d
c o n t r o l l e r t h e u s e r t o l o g i c m o d u l e a n d t h e Mi c r o Bl a z e p r o -
a t t h e VGA f r e q u e n c y: 2 5 . 1 75 MH z ( f o r a 6 4 0 x 4 8 0
c e s s o r . r e s o l u t i o n ) .
To s e t t h e d a t a f o r m a t w i t h w h i c h Mi c r o Bl a z e s e n d s i n -
d r a w i n g t h e m w i t h l ' s a n d 0 ' s a n d a t t a c h i n g t h e d a t a t o t h e f o r m a t i o n t o t h e p e r i p h e r a l i n t h e d r i v e r w r i t e i n s t r u c t i o n ,
s u i t a b l e ROM a d d r e s s . Th e ROM h a s b e e n i m p l e m e n t e d b y w e h a v e t a k e n a d v a n t a g e o f t h e f a c t t h a t t h e 8 p i x e l s o f a
m e a n s o f t h e i n t e r n a l Bl o c k RAM r e s o u r c e i n c l u d e d i n X i l - c h a r a c t e r ' s l i n e a r e s t o r e d i n c o n s e c u t i v e m e m o r y a d d r e s s e s .
i n x FPGAs . Th e Bl o c k RAM m o d u l e h a s b e e n c o n f i g u r e d W i t h i t , Mi c r o Bl a z e s e n d s t h e a d d r e s s i n t h e SRAM o f t h e
a s a s i n g l e p o r t 2 K x 9 b i t m e m o r y. Th e t w o f o n t s s h a r e t h e f i r s t p i x e l o f t h e l i n e a n d a f t e r t h a t t h e c o l o r s o f t h e 8 p i x e l s .
s a m e ROM
m e m o r y, w i t h 1 K B i n t h e m e m o r y s p a c e f o r Si n c e t h e p i x e l c o l o r i s c o d e d w i t h 6 b i t s a n d t h e OPB b u s
e a c h o n e . i s 3 2 b i t w i d e 3 d a t a a r e r e q u i r e d : t h e f i r s t o n e i n d i c a t e s t h e
Th e ROM w i t h t h e f o n t s b i t m a p s h a s b e e n i n t e g r a t e d a d d r e s s a n d t h e o t h e r t w o t h e c o l o r i n f o r m a t i o n . Th e Ta b l e 1
i n t o t h e Mi c r o Bl a z e -b a s e d s ys t e m u s i n g a d e d i c a t e d Fa s t s h o w s t h e d a t a f o r m a t s .
Si m p l e x Li n k ( FSL) c h a n n e l . Mi c r o Bl a z e s e n d s o n t h e FSL Th e h a r d w a r e o f t h e p e r i p h e r a l s e e s a b o u t c o n t r o l l i n g t h e
b u s t h e a d d r e s s e s w h e r e t o r e a d f r o m t h e a p p r o p r i a t e c h a r a c - v a l u e s o n t h e SRAM d a t a a n d a d d r e s s b u s e s , a n d t h e w r i t e
t e r ' s l i n e , a n d r e c e i v e s f r o m t h e p e r i p h e r a l t h e b yt e s t h a t o p e r a t i o n s . Th i s i s d e t e r m i n e d b y t h e SRAM. In o u r s ys t e m ,
c o d e t h e c h a r a c t e r . Si n c e t h e FSL i n t e r f a c e s o n Mi c r o Bl a z e t h e m e m o r y c o n s i s t s o f a 2 5 6 K B 1 6 b i t SRAM m o d u l e , s o
a r e 3 2 b i t w i d e , f o u r b yt e s a n d t h e r e f o r e f o u r d i f f e r e n t l i n e s t h a t t w o n e i g h b o u r p i x e l s c a n b e s t o r e d i n m e m o r y i n o n e
o f a c h a r a c t e r c a n b e r e t u r n e d i n e a c h r e a d i n s t r u c t i o n f r o m a d d r e s s i n j u s t o n e w r i t e c yc l e . W i t h t h i s , t h e n u m b e r o f
t h e p e r i p h e r a l . Th e s t a t e m a c h i n e t h a t c o n t r o l s t h e c o m m u - w r i t i n g s t o s t o r e t h e t e x t s c r e e n i s h a l v e d . It a l s o e x p l a i n s
n i c a t i o n b e t w e e n t h e FSL c h a n n e l a n d t h e ROM a l s o d e a l s w h y i n Ta b l e 1 a 1 8 b i t b u s i s r i g h t t o a d d r e s s t h e 6 4 0 x 4 8 0
w i t h t h e a d d r e s s g e n e r a t i o n a n d d a t a r e a d i n g . Th e ROM i s a r r a y o f t h e t e x t s c r e e n : t h e f i r s t n i n e b i t s c o d e t h e l i n e a n d
c l o c k e d f o u r t i m e s f a s t e r t h a n Mi c r o Bl a z e . So , i n j u s t o n e t h e o t h e r n i n e a r e w i d e e n o u g h t o c o d e t h e c o l u m n .
i n s t r u c t i o n o f Mi c r o Bl a z e f o u r d a t a a r e a v a i l a b l e , a n d t h e Th e r e a d o p e r a t i o n s f r o m t h e SRAM m e m o r y m u s t a l s o
n u m b e r o f a c c e s s t o t h e m e m o r y i s d i v i d e d i n f o u r . Ta k i n g
t a k e i n t o a c c o u n t t h a t t w o p i x e l s h a v e b e e n s t o r e d i n t h e
t h i s i n t o a c c o u n t , t h e s o f t w a r e f u n c t i o n c a l c u l a t e s t h e r i g h t
s a m e m e m o r y a d d r e s s , f o r t h e c o r r e c t s e n d i n g o f d a t a t o t h e
a d d r e s s t o r e a d t h e c h a r a c t e r ' s l i n e s . VGA Ge n e r a t o r Mo d u l e .
W h e n t h e h a r d w a r e i s s w i t c h e d o n , t h e SRAM m e m o r y
3 . 2 . Th e t e x t s c r e e n
i s u n i n i t i a l i z e d . Th e r e f o r e , t h e f i r s t t h i n g t o d o i s t o u s e t h e
p e r i p h e r a l d r i v e r t o w r i t e O' s i n t h e w h o l e t e x t s c r e e n , i n
To d i s p l a y t e x t w e h a v e c o n s i d e r e d a t e x t s c r e e n , w h i c h m a - o r d e r t o e n s u r e t h a t t h e s c r e e n b a c k g r o u n d w i l l b e b l a c k .
n a g e s t h e v i s u a l i z a t i o n o f t h e s t r i n g s . It i s a 6 4 0 x 4 8 0 a r r a y
w h o s e e l e m e n t s c o r r e s p o n d t o t h e p i x e l s i n t h e VGA o u t p u t . 3 . 3 . Th e p o i n t e r d e v i c e i n t e r f a c e
Th e v a l u e o f e a c h e l e m e n t r e p r e s e n t s t h e c o l o r o f t h e p i x e l
a n d d e p e n d s o n t h e c h a r a c t e r s w h i c h f o r m t h e s t r i n g s t o b e A p o i n t e r d e v i c e i s r e q u i r e d t o i n t e l r a c t w i t h t h e u s e l r i n t e r -
d i s p l a ye d a s w e l l a s t h e i r p o s i t i o n s a n d c o l o r s . A 6 4 c o l o r s f a c e . A c o n t r o l l e r f o r a g e n e r i c PS/ 2 m o u s e h a s b e e n i m -
p a l e t t e h a s b e e n c o n s i d e r e d , w h i c h i m p l Li e s 6 b i t s f o r e a c h p l e m e n t e d a n d a d d e d t o t h e Mi c r o Bl La z e s ys t e m a s a n OPB
p i x e l . Du e t o i t s s i z e , t h e a r r a y i s s t o r e d i n e x t e r n a l S1 RAM. p e r i p h e r a l .
1 73
Ta b l e 1 . Fo r m a t o f t h e d a t a f r o m Mi c r o Bl a z e t o t h e t e x t s c r e e n p e r i p h e r a l t h r o u g h t h e OPB b u s . Th e f i r s t w o r d i n d i c a t e s
t h e a d d r e s s , w h i c h c o r r e s p o n d s t o t h e l e f t p i x e l ( w i t h s u b s c r i p t 0 ) o f t h e l i n e . Th e s e c o n d a n d t h i r d w o r d s c o n t a i n t h e c o l o r
i n f o r m a t i o n o f t h e 8 p i x e l s o f t h e c h a r a c t e r l i n e . Bi t s m a r k e d a s ' -' a r e n o t u s e d .
Fi r s t 3 2 b i t w o r d
0 1 7 1 8 3 1
Se c o n d 3 2 b i t w o r d
r o ( 1 : 0 )
Ig o ( : O)
b o ( 1 : O) r i ( 1 : O) g I( 1 : 0 ) b l ( 1 : O) r 2 ( 1 : 0 ) 9 2 ( : O) b 2 ( 1 : 0 ) r 3 ( : O) g 3 ( : O) b 3 ( 1 : 0 )
O 1 2 3 4 5 6 7 8 9 1 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 2 0 2 1 2 2 2 3 2 4 3 1
Th i r d 3 2 b i t w o r d
0 1 2 3 4 5 6 7 8 9 1 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 2 0 2 1 2 2 2 3 2 4 3 1
Th e h a r d w a r e o f t h e p e r i p h e r a l i n t e r p r e t s t h e s i g n a l s f r o m t h i s p e r i p h e r a l w h i c h a c t s l i k e a b r i d g e . Fo r e x a m p l e i f
t h e m o u s e a n d d e t e r m i n e s c o n t i n u o u s l y t h e p o s i t i o n o f t h e t h e m e n u p r e s e n t e d i n t h e s c r e e n o f f e r s t h e u s e r t h e p o s s i -
m o u s e a n d t h e s t a t u s o f t h e b u t t o n s . Th e h a r d w a r e a l s o i n - b i l i t y o f c h a n g i n g a t h r e s h o l d v a l u e , t h e n e w v a l u e f i x e d i n
c l u d e s t h e l o g i c t o d r a w t h e m o u s e c u r s o r o n t h e s c r e e n . Th i s t h e s o f t w a r e a p p l i c a t i o n i s s e n t t o t h e h a r d w a r e t h r o u g h t h i s
i m p l i e s a n o u t p u t o f t h i s p e r i p h e r a l d i r e c t l y c o n n e c t e d t o t h e OPB p e r i p h e r a l .
VGA Ge n e r a t o r m o d u l e .
Th e Mi c r o Bl a z e e x t e r n a l i n t e r r u p t s o u r c e h a s b e e n u s e d 4 . TH E H ARDW ARE/ SOFTW ARE PLATFORM
t o d e t e c t a c l i c k m o u s e . Th e i n t e r r u p t h a n d l e r d e a l s w i t h t h e
d a t a c o m m u n i c a t i o n b e t w e e n Mi c r o Bl a z e a n d t h e m o u s e , 4 . 1 . Th e h a r d w a r e o f t h e p l a t f o r m
w i t h t h e c l a s s i f i c a t i o n o f t h e e v e n t a n d w i t h t h e a s s o c i a t e d
a c t i o n s i n t h e s o f t w a r e a p p l i c a t i o n . W h e n Mi c r o Bl a z e d e - Th e d e s i g n h a s b e e n d e s c r i b e d i n VH DL u s i n g t h e X i l i n x
t e c t s t h e i n t e r r u p t , i t a s k s t h e p e r i p h e r a l a b o u t t h e p o s i t i o n
ISE 8 . 1 d e s i g n s o f t w a r e a n d t h e t o o l s i n t h e X i l i n x Em -
o f t h e m o u s e , a s t h e p o s i t i o n a n d s i z e o f e a c h s t r i n g i n t h e b e d d e d De v e l o p m e n t K i t 8 . 1 . It h a s b e e n i m p l e m e n t e d o n
t e x t s c r e e n i s k n o w n , i t i s k n o w n w h i c h o f t h e m h a s b e e n a X i l i n x X C2 V4 0 0 0 FPGA. Th e Ta b l e 2 s u m m a r i z e s t h e
s e l e c t e d b y t h e u s e r w i t h t h e a c t i v a t i o n o f t h e m o u s e , s o t h a t r e s o u r c e s u s e d i n t h e FPGA i m p l e m e n t a t i o n o f t h e f r a m e
t h e c o r r e s p o n d i n g
a c t i o n s c a n b e p e r f o r m e d b o t h i n t h e h a r d - g r a b b e r ( w h i c h i n c l u d e s t h e i n t e r f a c e w i t h t h e v i d e o i n p u t
w a r e a n d t h e s o f t w a r e . p r o c e s s o r , t h e 1 2 C c o n t r o l l e r , t h e d o u b l e b u f f e r c o n t r o l l e r ,
t h e m e m o r y i n t e r f a c e s a n d t h e c o l o r s p a c e c o n v e r t e r ) a n d t h e
u s e r i n t e r f a c e ( w h i c h i n c l u d e s t h e t e x t s c r e e n p e r i p h e r a l , t h e
VGA g e n e r a t o r m o d u l e , t h e ROM f o r t h e f o n t s , t h e m o u s e
Th e g e n e r a t i o n o f t h e s yn c h r o n i z a t i o n a n d RGB s i g n a l s f o r p e r i p h e r a l , t h e u s e r t o l o g i c m o d u l e a n d t h e Mi c r o Bl a z e
a VGA m o n i t o r i s a c c o m p l i s h e d i n h a r d w a r e , i n t h e VGA p r o c e s s o r ) . Th e p e r c e n t a g e s a r e r e f e r r e d t o t h e a v a i l a b l e
g e n e r a t o r m o d u l e . It p r o d u c e s t h e s i g n a l s w i t h t h e t i m i n g r e s o u r c e s i n t h e X C2 V4 0 0 0 ( 4 6 0 8 0 4 -i n p u t s LU Ts , 4 6 0 8 0
r e q u i r e d t o s h o w a 6 0 H z 6 4 0 x 4 8 0 p i x e l s i m a g e , a n d t h e f l i p -f l o p s
2 3 0 4 0 s l i c e s 1 2 0
m u l t i p l i e r s
a n d 1 2 0 Bl o c k RAMs ) .
RGB v a l u e f o r e a c h p i x e l . Si n c e t h e r e a r e t w o s o u r c e s o f Th e Mi c r o Bl a z e
m e m o r y
f o r d a t a a n d i n s t r u c t i o n s i s 1 6 K B.
c o l o r f o r e a c h p i x e l , t h e t e x t s c r e e n a n d t h e m o u s e p o i n t e r ,
Th e 1 2 C c o n t r o l l e r i n t h e f r a m e g r a b b e r h a s a l s o b e e n
t h e VGA g e n e r a t o r m o d u l e m e r g e s t h e m , s u p e r i m p o s i n g t h e c o n n e c t e d t o Mi c r o Bl a z e t h r o u g h t h e OPB b u s . Th i s m a k e s
c u r s o r o f t h e m o u s e o n t h e t e x t s c r e e n . f e a s i b l e t o
m o d i f y
t h e SAA71 1 3
c o n f i g u r a t i o n
i n t h e s o f t -
w a r e a p p l i c a t i o n r u n n i n g i n Mi c r o Bl a z e , a n d t o a d j u s t t h e
3 . 5 . Co m m u n i c a t i o n w i t h t h e u s e r l o g i c
d e s i r e d
p a r a m e t e r s u s i n g
t h e u s e r i n t e r f a c e .
A f i r s t
p r o t o t yp e
o f t h e
p l a t f o r m
h a s b e e n b u i l t
u s i n g
Th e u s e r ' s a c t i o n e x e c u t e d o n t h e i n t e r f a c e , o n c e i n t e r p r e t e d Av n e t b o a r d s [ 3 ] . Du e t o i t s g r e a t c a p a b i l i t y t o p l u g a d -
i n t h e s o f t w a r e a p p l i c a t i o n , i s i n t e n d e d t o m o d i f y t h e f u n c - d i t i o n a l m o d u l e s , t h e Vi r t e x -I1 Av n e t De v e l o p m e n t K i t h a s
t i o n a l i t y o f t h e h a r d w a r e d e s i g n i m p l e m e n t e d i n t h e FPGA b e e n t h e s e l e c t e d m o t h e r b o a r d . A Vi r t e x -II X C2 V4 0 0 0 i s
f o r a s p e c i f i c a p p l i c a t i o n . To c o n n e c t w i t h t h a t s p e c i f i c u s e r p o p u l a t e d o n i t . Th e SRAM m e m o r i e s w h e r e t o s t o r e t h e
l o g i c , a n OPB p e r i p h e r a l d i r e c t l y c o n n e c t s t h e d a t a r e c e i v e d i m a g e s f r o m t h e c a m e r a a r e t h e Cyp r e s s CY7C1 0 4 1 V3 3 ,
f r o m n Mi c r o Bl a z e o n t h e OPB b u s w i t h a n o u t p u t p o r t . Th i s a v a i l a b l e i n t h e Av u e t M[ e m o r y m o d u l e . On e o f t h e s e m n e m o -
p e r i p h e r a l o u t p u t p o r t i s l i k e a d e d i c a t e d b u s , a s s i g n e d t o r i e s h a s a l s o b e e n u s e f o r t h e t e x t s c r e e n . Th e PS/ 2 c o n n e c -
a n i n p u t p o r t i n t h e u s e r l o g i c . Th e n , t o m o d i f y t h e f u n c t i o - t o r , t h e SAA7 1 1 3 v i d e o i n p u t p r o c e s s o r a n d t h e ADV7 1 2 3
n a l i t y o f t h e u s e r l Lo g i c , i t i s e n o u g h w i t h s e n d i n g t h e s u i t a b l e d i g i t a l t o a n a l o g c o n v e r t e r f o r t h e VGA c o l o r s i g n a l s a r e
d a t a f r o l m t h e s o f t w a r e a p p l i c a t i o n r u n n i n g i n Mi c r o Bl La z e t o p o p u l a t e d i n t h e Au d i o / Vi d e o l m o d u l e , a l s o f r o m Av n e t .
1 74
Fr a m e g r a b b e r U s e r i n t e r f a c e c %
t o c o n t r o l w h e t h e r t h e t e x t s t r i n g i s c o l o r e d i n t h e c o l o r i n -
X i l i n x FPGA: d i c a t e d i n t h e f u n c t i o n o r i n b l a c k . Th u s , d e l e t i n g a s c r e e n
Sl i c e s 4 78 1 8 5 7 1 0 % r e a l l y m e a n s r e w r i t i n g t h e s a m e t e x t i n b l a c k . Th i s m e t h o d
Fl i p f l o p s 3 3 8 1 4 73 4 % r e d u c e s c o n s i d e r a b l y t h e w r i t e o p e r a t i o n s i n t h e SRAM.
4 i n p u t LU Ts 6 3 3 2 8 1 0 8 % On c e t h e s t r i n g s a r e s t o r e d i n t h e t e x t s c r e e n , t h e b a -
Mu l t . 1 8 x 1 8 0 3 3 % s i c u s e r a p p l i c a t i o n w a i t s f o r a n i n t e r r u p t f r o m t h e m o u s e .
Bl o c k RAM 0 9 8 % W h e n i t h a p p e n s , t h e i n t e r r u p t h a n d l e r c l a s s i f i e s t h e i n t e r -
r u p t ( c l i c k o n l e f t o r o n r i g h t b u t t o n ) a n d r e a d s t h e m o u s e c o -
o r d i n a t e s u s i n g t h e f u n c t i o n o f t h e m o u s e p e r i p h e r a l . Si n c e
Ta b l e 2 . Su m m a r y o f
r e s o u r c e s
u s e d . t h e p o s i t i o n o f e a c h t e x t s t r i n g i s k n o w n i t i s p o s s i b l e t o
d e t e r m i n e i n t h e s o f t w a r e a p p l i c a t i o n w h i c h o n e h a s b e e n
4 . 2 . Th e s o f t w a r e o f t h e p l a t f o r m s e l e c t e d b y t h e u s e r , a n d t h e n t o r e p l y w i t h t h e d e s i r e d a c -
t i o n s . Th e s e c a n b e l m a i n l y t w o :
Th e Fi g u r e 3 s h o w s t h e f l o w o f t h e b a s i c s o f t w a r e a p p l i c a -
t i o n o f t h e p l a t f o r m . It h a s b e e n d e s c r i b e d i n C l a n g u a g e . . t o m o d i f y t h e f u n c t i o n a l i t y o f a n y s p e c i f i c p r o c e s s i n g
As m e n t i o n e d b e f o r e , f i r s t o f a l l t h e t e x t s c r e e n m u s t b e c o r e . W i t h t h i s a i m , t h e u s e r t o s p e c i f i c l o g i c p e r i p h -
i n i t i a l i z e d . W i t h t h i s a i m t h e i n i t i a l i z e _ t e x t _ s c r e e n f u n c t i o n e r a l h a s b e e n i n c l u d e d . Th e d e s i g n e r h a s t o d e f i n e
h a s b e e n d e f i n e d . It s i m p l y c o n s i s t s i n c a l l i n g t h e f u n c t i o n t h e f o r m a t o f t h e c o m m u n i c a t i o n b e t w e e n Mi c r o Bl a z e
o f t h e t e x t s c r e e n p e r i p h e r a l t o w r i t e z e r o s i n a l l t h e m e - a n d h i s o w n h a r d w a r e c o r e s .
m o r y p o s i t i o n s .
Th e f u n c t i o n
p a r a m a t e r s
a n d t h e d a t a
f o r -a r
m a t s w e r e d e s c r i b e d i n Se c t i o n 3 . 2 .
t o c r e a t e a n e w s c r e e n w h i c h i m p l i s t h e p r o c e s s d e s c r i -
Af t e r i n i t i a l i z a t i o n , t h e t e x t s c r e e n i s
r e a d y
t o s t o r e a n d
b e d b e f o r e .
d i s p l a y t e x t i n f o r m a t i o n . In o r d e r t o c r e a t e t h e i n t e r f a c e
p r e -
s e n t e d t o t h e u s e r , t h e f u n c t i o n m b _ Ou t Te x t X Y h a s b e e n p r o - 4 . 3 . In t e g r a t i o n o f t h e p l a t f o r m w i t h s p e c i f i c a p p l i c a t i o n s
t o t yp e d . It i s s i m i l a r t o t h e e q u i v a l e n t s t a n d a r d C f u n c t i o n
In o r d e r t o c u s t o m i z e t h e p l a t f o r m f o r a n s p e c i f i c a p p l i c a -
a n d i t a l l o w s t o d e f i n e a t e x t s t r i n g a n d t o s p e c i f y i t s c o l o r
t i o n ,
t h e d e s i g n e r s i m p l y h a s t o c o m p l e t e t h e f o l l o w i n g s t e p s :
a n d
p o s i t i o n
i n t h e s c r e e n . Th e f u n c t i o n p a r a m e t e r s a r e a
c h a r p o i n t e r t o t h e s t r i n g , t h e x a n d y c o o r d i n a t e s o f t h e 1 . To c r e a t e i n t h e s o f t w a r e a p p l i c a t i o n t h e u s e r i n t e r -
u p p e r -l e f t p i x e l o f t h e f i r s t c h a r a c t e r , t h e d i s t a n c e b e t w e e n f a c e s , b y s p e c i f i yi n g t h e t e x t s t r i n g s , t h e i r p o s i t i o n s ,
n e i g h b o u r c h a r a c t e r s , t h e c o l o r o f t h e s t r i n g a n d t h e i d e n t i - t h e i r c o l o u r s , e t c .
f i e r o f t h e f o n t d e s i r e d f o r t h e t e x t .
W h e n t h e m b Ou t Te x t X Y f u n c t i o n i s e x e c u t e d , t h e w r i t -
2 .
To d e f i n e t h e c o m m u n i c a t i o n b e t w e e n Mi c r o Bl a z e a n d
i n g
i n s t r u c t i o n o f t h e t e x t s c r e e n
p e r i p h e r a l
i s c a l l e d t o w r i t e h i s
s p e c i f i c h a r d w a r e c o r e s
t h r o u g h
t h e u s e r s p e c i f i c
i n t h e SRAM t h e c o l o r v a l u e s o f t h e
p i x e l s w h i c h c o r r e -
g e d e f u n c t i o n a l i t y
o f t h e
s p o n d t o e a c h e l e m e n t o f t h e s t r i n g a c c o r d i n g t o i t s p o s i -
t i o n a n d i t s c o l o r . It a l s o t a k e s i n t o a c c o u n t t h e v a l u e o f 3 . To d e f i n e t h e f u n c t i o n a l i t y o f t h e
m o u s e
i n t e r r u p t h a n d -
t h e p a r a m e t e r w h i c h d e f i n e s t h e d i s t a n c e b e t w e e n c o n s e c u -
l e r , w h i c h d e t e r m i n e s t h e
r e s p o n s e s
t o t h e m o u s e a c -
t i v e c h a r a c t e r s i n t h e
s t r i n g ,
s e t i n o r d e r t o
d i s p l a y
t h e t e x t
t i o n s o f b o t h t h e s o f t w a r e a n d t h e h a r d w a r e .
m o r e o r l e s s s p a c e d . Th e a r g u m e n t s o f t h e s u c c e s s i v e c a l l s
t o t h e p e r i p h e r a l w r i t i n g f u n c t i o n a r e d e r i v e d f r o m t h e d a t a Th e Mi c r o Bl a z e f u n c t i o n a l i t y i s n o t l i m i t e d t o t h e c o n -
r e t u r n e d t h r o u g h t h e FSL c h a n n e l b y t h e ROM w i t h t h e f o n t t r o l o f t h e u s e r i n t e r f a c e h e r e i n e x p l a i n e d , b u t i t c a n r u n
b i t m a p . To g e t t h e m , t h e f u n c t i o n g e n e r a t e s t h e a p p r o p r i - a n y o t h e r a p p l i c a t i o n t o o ,
f o r
e x a m p l e , h i g h
l e v e l
p r o c e s s -
a t e a d d r e s s e s o f t h e ROM, d e p e n d e n t o n e a c h c h a r a c t e r i n i n g t a s k s w o r k i n g w i t h i n f o r m a t i o n e x t r a c t e d b y m e a n s o f
t h e s t r i n g a n d o n t h e f o n t s e l e c t e d . U n l i k e t h e i n i t i a l i z a t i o n s p e c i f i c i m a g e p r o c e s s i n g a l g o r i t h m s i m p l e m e n t e d o n t h e
f u n c t i o n , o n l y t h e m e m o r y p o s i t i o n s w h i c h c o r r e s p o n d t o FPGA.
t h e p i x e l s f o r m i n g t h e t e x t s t r i n g s a r e w r i t t e n . As s h o w n i n Ta b l e 2 , t h e p l a t f o r m h a r d l y o c c u p i e s t h e
Al l t h i s p r o c e s s i s m a n a g e d i n t r a n s p a r e n t m o d e t o t h e 1 0 % o o f t h e
FPGA,
s o t h e
r e m a i n i n g 9 0 % i s a v a i l a b l e f o r
s o f t w a r e d e s i g n e r . To c r e a t e t h e s c r e e n , t h e m b _ Ou t Te x t X Y a p p l i c a t i o n s p e c i f i c
h a r d w a r e .
f u n c t i o n m u s t b e c a l l e d a s m a n y t i m e s a s d e s i r e d , s p e c i f yi n g
t h e t e x t s t r i n g , i t s c o l o r , i t s p o s i t i o n , i t s s p a c i n g a n d t h e f o n t . 5 . EX AMVPLE OF APPLICATION
In o r d e r t o s h o w a n e w d i f f e r e n t s c r e e n , t h e p r e v i o u s o n e
m u s t b e d e l e t e d . In s t e a d o f u s i n g t h e p e r i p h e r a l d r i v e r t o W e h a v e v a l i d a t e d t h e u s e f u l n e s s o f t h e d e s c r i b e d p l a t f o r m
w r i t e b l La c k i n t h e e n t i r e t e x t s c r e e n , a s w h e n i n i t i a l i z i n g , a i n a n a p p l i c a t i o n f o r p e o p l e a f f e c t e d b y a v i s u a l d i s o r d e r
p a r a m e t e r h a s b e e n i n c l u d e d i n t h e m b _ Ou t Te x t X Y f u n c t i o n k n o w n a s t u n n e l v i s i o n . Th e t u n n e l v i s i o n c o n s i s t s o f t h e
1 75
H a r d w a r e p e r i p h e r a l s
In i t i a l i z e Te x t Sc r e e n r -----------_ _ _ _ _
; =: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ FSL Te x t Fo n t s
| D-i s p l a y s c r e e n
> q r I ~ ~ ~ ~ ~ INT h a n a l e r --, *
OPB Te x t Sc r e e n
| i
W a i t f o r I NT r -------s r
Fi g . 3 Fl w d i a Re a d m o u s e c o o r d i n a t e a i c w
l s o f h p e p e r t a s i o a n OPB Mo u s e c o n t r o l l e r i
Cl a s s i f y INT ; l , .
r e s o u t i o c e n s l k e l g t h Cl a s s i f y u s e r a c t i o n oa i
l l l ~ ~ ~ ~ ~ OPB U s e r Sp e c i f i c Lo g i c
l o d i f y H W f u n c t i o n a l i t y L Ne v w Sc r e e n
Fi g
3 . Fl o w
d i a g r a m
o f t h e s o f t w a r e
r u n n i n g
i n Mi c r o Bl a z e a n d i t s c o l m m u n i c a t i o n L w i t h t h e h a r d w a r e
p e r i p h e r a l s .
l o s s o f t h e p e r i p h e r a l v i s i o n ,
w h i l e r e t a i n i n g
c l e a r a n d
h i g h
s i t i o n a n d
s t o r a g e .
Th e u s e r i n t e r f a c e a l l o w s t o c u s t o m i z e
r e s o l u t i o n c e n t r a l
v i s i o n ,
i t i s l i k e
l o o k i n g t h r o u g h
a
k e yh o l e o p e r a t i o n o p t i o n s
a n d d e t e r m i n e s t h e
i m a g e p r o c e s s o r
f u n c -
o r a r i n g i n t h e m i d -p e r i p h e r y. Tu n n e l v i s i o n i s a s s o c i a t e d t i o n a l i t y. Th e VGA o u t p u t s , f r o m t h e u s e r i n t e r f a c e m o d u l e
t o s e v e r a l e ye s d i s e a s e s , m a i n l y g l a u c o m a a n d r e t i n i t i s p i g - a n d f r o m t h e i m a g e p r o c e s s o r , a r e c o m b i n e d a n d s e n t t o t h e
m e n t o s a a n d r e d u c e s c o n s i d e r a b l y t h e p a t i e n t ' s a b i l i t y t o So n y Gl a s s t r o n PLMS70 0 E h e a d m o u n t e d d i s p l a y. Th i s i s
l o c a l i z e o b j e c t s , w h i c h i n e v i t a b l y a f f e c t s t h e p a t i e n t ' s r e l a - a b i n o c u l a r a n d
h i g h
r e s o l u t i o n d e v i c e w i t h SVGANGA i n -
t i o n s h i p w i t h p e o p l e a n d t h e e n v i r o n m e n t . p u t a n d a d j u s t a b l e s e e -t h r o u g h c a p a b i l i t y.
To a i d a f f e c t e d p e o p l e , i t i s n e c e s s a r y t o i n c r e a s e t h e p a -
t i e n t ' s f i e l d o f v i e w w i t h o u t r e d u c i n g t h e u s e f u l n e s s o f t h e 6 . CONCLU SION
h i g h r e s o l u t i o n c e n t r a l v i s i o n . W i t h t h i s a i m , w e h a v e p r o -
p o s e d a n o v e l FPGA-b a s e d a u g m e n t e d r e a l i t y s ys t e m [ 4 ] . A p l a t f o r m f o r t h e d e v e l o p m e n t o f e m b e d d e d s ys t e m s i n
It c o n s i s t s o f a c a m e r a , a n FPGA t o p r o c e s s v i d e o i n o r - i m a g e p r o c e s s i n g a p l i c a t i o n s i s p r o p o s e d i n t h i s w o r k . It
d e r t o e x t r a c t c o n t o u r i n f o r m a t i o n a n d a s e e -t h r o u g h h e a d i s a m i x e d s o f t w a r e / h a r d w a r e d e s i g n , b a s e d o n t h e Mi c r o -
m o u n t e d d i s p l a y w h e r e t h a t i n f o r m a t i o n i s s u p e r i m p o s e d o n Bl a z e p r o c e s s o r . It p r o v i d e s a c o r e f o r c r e a t i n g
u s e r i n t e r -
t h e u s e r v i s i o n . Th e FPGA a l l o w s v i d e o f r a m e r a t e a n d l o w f a c e s , w h i c h a l l o w t o i n t e r a c t w i t h t h e s ys t e m i n r u n -t i m e . It
l a t e n c y, b o t h o f t h e m k e y f a c t o r s t o d e t e r m i n e t h e v i a b i l i t y a l s o f a c i l i t a t e s t h e a c q u i s i t i o n o f a n a l o g s t a n d a r d v i d e o a n d
o f t h e s ys t e m , d u e t o i t s i n h e r e n t m o b i l i t y. i t s s t o r a g e . W i t h o u r p l a t f o r m , t h e p r o c e s s o f d e s i g n i n g n e w
No w , t h e p r o p o s e d p l a t f o r m h a s b e e n u s e d t o b u i l d a a p p l i c a t i o n s i s c o n s i d e r a b l y s p e d u p .
f u l l y FPGA-b a s e d s ys t e m f o r t h i s a p p l i c a t i o n . W i t h t h e h a r d - Th e n e x t s t e p i n t h e d e s i g n o f t h e p l a t f o r m i s t o i n c r e a s e
w a r e p l a t f o r m w e s t r e n g t h e n t h e v e r s a t i l i t y o f t h e s o l u t i o n . t h e v e r s a t i l i t y o f t h e s o f t w a r e r o u t i n e s . W i t h t h i s a i m , w e
Th e u s e r i n t e r f a c e c o n f e r s t h e s ys t e m t h e p o s s i b i l i t y o f c u s - a r e d e v e l o p i n g s o f t w a r e l i b r a r i e s w h i c h w i l l p r o v i d e h i g h e r -
t o m i z i n g o p e r a t i o n c h a r a c t e r i s t i c s a t r u n t i m e . So , t h e u s e r l e v e l f u n c t i o n a l i t y. W i t h t h e m , i t w i l l b e p o s s i b l e t h e a d d i -
c a n i n t e r a c t w i t h i t b y s e l e c t i n g o p t i o n s c o n f i g u r i n g p a r a m e -
t i o n t o t h e u s e r i n t e r f a c e o f t e x t w i t h s p e c i f i c f o r m a t s , t e x t
t e r s , e t c . Be s i d e s , a s t h e i m a g e a c q u i s i t i o n a n d s t o r a g e a r e e f f e c t s a n d b a r s t o a d j u s t u s e r p a r a m e t e r s a l l o f t h i s j u s t
c o n t r o l l e d b y t h e p l a t f o r m , d e s i g n e f f o r t s c a n b e f o c u s e d o n b y c a l l i n g t h e r i g h t f u n c t i o n o f t h e l i b r a r y w i t h t h e d e s i r e d
t h e d e v e l o p m e n t o f t h e p r o c e s s i n g a l g o r i t h m , o p t i o n s . W e a r e a l s o w o r k i n g i n t h e d e s i g n o f a " v i r t u a l
Th e Fi g u r e 4 s h o w s t h e o v e r a l l s ys t e m a r c h i t e c t u r e . Th e k e yb o a r d . Th i s w i l l a l l o w t h e u s e r t o m o d i f y t h e d i s p l a ye d
i m a g e p r o c e s s o r e x t r a c t s c o n t o u r i n f o r m a t i o n i n t h e i m a g e s t e x t i n f o r m a t i o n i n r u n -t i m e .
f r o m t h e c a m e r a . Th e f r a m e
g r a b b e r m a n a g e s i m a g e
a c q u i -7. RF
EN S
r ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ . REFERENCE
_ 4 [ 1 ] M. Go k h a l e a n d P. Gr a h a m Re c o n f i g u r a b l e Co n m p u t i n g . Ac c e l -
e r a t i n g c o m p u t a t i o n w i t h Fi e l d -Pr o g r a m m a b l e Ga t e Ar r a ys .
Sp r i n g e r ,
2 0 0 5 .
VGA o u t p u t
| [ 2 ] K .
J a c k ,
Vi d e o
De m ys t i f i e d ,
4 t h e d i t i o n .
El s e v i e r ,
2 0 0 5 .
[ 3 ] Av n e t In c h t t p : / / w w w e m . a v n e t . c o m .
1 l L~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ 4 ] F. J . To l e d o , J . J . MLa r t i n e z , F. J . Ga r r i g o s S a n d J . M: . Fe r r a n Ld e z ,
f o r v i s u a l y i m Ai e p e o p l e . i n Pr o c . 2 0 0 mIt . Co Sn f o n Fi e l d
72 4 .
Fi g . 4 . Ov e r a l l a r c h i t e c t u r e o f t h e AR s ys t e m .
1 76

Você também pode gostar