l w i p t u t o r i a l
play

L w I P t u t o r i a l F e r n a n d o R i n - PowerPoint PPT Presentation

A d v a n c e d Wo r k s h o p o n mo d e r n F P G A - b a s e d t e c h n o l o g y f o r S c i e n t i f i c C o mp u t i n g L w I P t u t o r i a l F e r n a n d


  1. A d v a n c e d Wo r k s h o p o n mo d e r n F P G A - b a s e d t e c h n o l o g y f o r S c i e n t i f i c C o mp u t i n g L w I P t u t o r i a l F e r n a n d o R i n c ó n f e r n a n d o . r i n c o n @u c l m . e s S m r 3 2 8 9 – I C T P ( M a y 2 0 1 9 )

  2. C o n t e n t s ● T h e g u i d e n o t t o g e t l o s t i n t h e h e l l o w o r l d e c h o s e r v e r e x a m p l e ● T h e e x e r c i s e : – C r e a t e a V i v a d o p r o j e c t w i t h a G P I O I P c o r e c o n n e c t e d t o t h e b o a r d l e d s a n d s w i t c h e s – M o d i f y a n U D P e c h o s e r v e r t o s e n d / r e c e i v e d a t a t o / f r o m a r e m o t e c l i e n t ● T h e c l i e n t w i l l s e n d a n u m b e r t h a t w i l l b e d i s p l a y e d i n t h e l e d s ● I n r e t u r n , t h e e c h o s e r v e r w i l l a n s w e r w i t h t h e c u r r e n t c o m b i n a t i o n o f t h e s w i t c h e s – T e s t t h e s e r v e r w i t h n e t c a t – M o d i f y t h e s e r v e r t o u s e T C P ● I n t e r e s t i n g r e f e r e n c e : – h t t p s : / / w w w . x i l i n x . c o m / v i d e o / s o c / n e t w o r k i n g - w i t h - l w i p - f o c u s e d - f r e e - r t o s . h t m l 2 L w I P t u t o r i a l S m r 3 2 8 9 – I C T P ( M a y 2 0 1 9 )

  3. F r e e R T O S n e t w o r k a p p l i c a t i o n H e r e t h e n e t w o r k i n t e r f a c e a n d I p s a r e c o n fi g u r e d b u t s t i l l t w o m o r e t h r e a d s w i l l b e c r e a t e d : ● x e m a c i f _ i n p u t _ t h r e a d ● e c h o _ a p p l i c a t i o n _ t h r e a d T h e y a r e t h e o n l y t w o t h a t w i l l r e m a i n 3 L w I P t u t o r i a l S m r 3 2 8 9 – I C T P ( M a y 2 0 1 9 )

  4. D e e p e r l o o k i n t o t h e n e t w o r k _ t h r e a d M A C a d d r e s s S t a t i c I P a d d r e s s N e t w o r k i n t e r f a c e c o n fi g u r a t i o n L w I P b a c k g r o u n d t a s k T h e e c h o s e r v e r t a s k 4 L w I P t u t o r i a l S m r 3 2 8 9 – I C T P ( M a y 2 0 1 9 )

  5. T h e U D P e c h o s e r v e r We n e e d t o k e e p t r a c k o f t h e c l i e n t s e n d i n g d a t a , s i n c e n o c o n n e c - t i o n i s e s t a b l i s h e d a n d w e n e e d i t f o r t h e r e p l y We s e n d t h e r e p l y t o t h e c l i e n t p r e v i o u s l y s a v e d 5 L w I P t u t o r i a l S m r 3 2 8 9 – I C T P ( M a y 2 0 1 9 )

  6. T h e e x e r c i s e : S t e p 1 – V i v a d o p r o j e c t ● F i r s t c r e a t e a v i v a d o p r o j e c t w i t h a G P I O c o r e c o n n e c t e d t o b u t t o n s a n d l e d s ( c o u l d a l s o b e t w o d i ff e r e n t G P I O s ) 6 L w I P t u t o r i a l S m r 3 2 8 9 – I C T P ( M a y 2 0 1 9 )

  7. S t e p 2 – U D P e c h o s e r v e r ● E x p o r t t h e v i v a d o d e s i g n t o t h e S D K ● C r e a t e a N e w → A p p l i c a t i o n P r o j e c t : – S e l e c t f r e e r t o s 1 0 _ x i l i n x a s t h e O S P l a t f o r m – T h e s e l e c t i o n i n v o l v e s t h e g e n e r a t i o n o f t h e F r e e R T O S b s p – T h e n c l i c k o n N e x t – I n t h e n e x t d i a l o g b o x s e l e c t : ● F r e e R T O S l w I P e c h o s e r v e r – T h e n c l i c k F i n i s h ● N o w w e ’ l l d o a l i t t l e t u n i n g o f t h e g e n e r a t e d c o d e 7 L w I P t u t o r i a l S m r 3 2 8 9 – I C T P ( M a y 2 0 1 9 )

  8. S t e p 2 – U D P e c h o s e r v e r ● T h e g e n e r a t e d c o d e i s u s i n g T C P f o r t h e e c h o i m p l e m e n t a t i o n . We w i l l r e p l a c e w i t h a s i m p l i fi e d U D P v e r s i o n ● T o d o s o , r e p l a c e t h e c o n t e n t s o f t h e m a i n . c a n d e c h o . c fi l e s w i t h t h e o n e p r o v i d e d i n t h e s h a r e d f o l d e r . ● T h e n c o n n e c t t h e b o a r d a r u n t h e c o d e 8 L w I P t u t o r i a l S m r 3 2 8 9 – I C T P ( M a y 2 0 1 9 )

  9. S t e p 3 – T e s t t h e U D P e c h o s e r v e r ● P l u g t h e E t h e r n e t c a b l e t o t h e P C ● O p e n a t e r m i n a l w i n d o w i n t h e P C ( Wi n d o w s K e y + w r i t e “ c m d ” ) ● C d t o t h e l o c a t i o n o f t h e n e t c a t d i r e c t o r y ● R u n a n e t c a t U D P c l i e n t – t h e t a r g e t I P i s s t a t i c : 1 9 2 . 1 6 8 . 1 . 1 0 – T h e s e r v e r i s l i s t e n i n g a t p o r t 7 nc -u 192.168.1.10 7 ● I f e v e r y t h i n g i s O K t h e l i n e s y o u t y p e i n t h e t e r m i n a l w i n d o w w i l l b e c o p i e d b a c k 9 L w I P t u t o r i a l S m r 3 2 8 9 – I C T P ( M a y 2 0 1 9 )

  10. S t e p 4 – s e r v e r m o d i fi c a t i o n ● N o w w e w i l l m o d i f y t h e s e r v e r t o i m p l e m e n t t h e d e s i r e d f u n c t i o n a l i t y t h i s w a y : – We w i l l u s e a q u e u e t o p u s h t h e d a t a r e c e i v e d b y t h e e c h o t h r e a d – I m m e d i a t e l y a f t e r r e c e i v i n g d a t a f r o m a c l i e n t , t h e e c h o t h r e a d w i l l r e p l y t o t h a t s a m e c l i e n t w i t h t h e v a l u e r e a d f r o m t h e s w i t c h e s G P I O – A s e c o n d t a s k w i l l r e c e i v e d a t a f r o m t h e q u e u e a n d w r i t e t h e v a l u e i n t o t h e l e d s G P I O ● I n t h e ma i n . c a t t h e n e t w o r k _ t h r e a d f u n c t i o n C r e a t e a n e w “ l e d s _ t h r e a d ” R e m e m b e r t o i n c l u d e t h e i n t e r f a c e d e fi n i t i o n a t t h e t o p o f t h e fi l e j u s t l i k e t h e e c h o a p p l i c a t i o n t h r e a d 10 L w I P t u t o r i a l S m r 3 2 8 9 – I C T P ( M a y 2 0 1 9 )

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend