I nte rna t io na l J o urna l o f   Rec o nfig ura ble a nd   E m bedd e d Sy s t em s   ( I J RE S)   Vo l.   10 ,   No .   3 N o v em b e r   2 0 2 1 ,   p p .   2 3 7 ~ 2 4 8     I SS N : 2 0 8 9 - 4 8 6 4 ,   DOI : 1 0 . 1 1 5 9 1 /ij r es . v 10 .i 3 . p p 2 3 7 - 2 4 8          237       J o ur na l ho m ep a g e h ttp : //ij r es.ia esco r e. co m   So C - FP G A  sy ste ms  f o r t h e acquis i tion a nd proces si ng  of  elect ro enc epha lo g ra phic sig na ls       M a t ía s   J a v ier  O liv a ,   P a blo   Andrés G a rc ía ,   E nri qu M a rio   Sp inelli ,   Alej a nd ro   L uis   Veig a   Bio m e d ica In d u strial  a n d   S c ien ti fic In stru m e n tati o n   g ro u p   (G IBIC),   El e c tro n ic Co n tro l   a n d   S i g n a P ro c e ss in g   In v e stig a ti o n   In stit u te  (LE ICI) ,   E n g i n e e rin g   F a c u lt y ,   La P lata   Na ti o n a Un iv e rsity   (UN LP ),   B u e n o Aire s,  Arg e n ti n a         Art icle  I nfo     AB S T RAC T   A r ticle  his to r y:   R ec eiv ed   Au g   11 ,   2 0 21   R ev is ed   Sep   2 9 2 0 2 1   Acc ep ted   Oct   1 9 2 0 2 1       Re a l - ti m e   a c q u isit io n   a n d   p ro c e ss in g   o e lec tro e n c e p h a l o g ra p h ic si g n a ls h a v e   p ro m isin g   a p p li c a ti o n in   t h e   im p lem e n tatio n   o b ra in - c o m p u ter  in terfa c e s.   Th e se   d e v ice a ll o th e   u se to   c o n tro a   d e v ice   with o u p e rfo rm in g   m o t o r   a c ti o n s,  a n d   a re   u s u a ll y   m a d e   u p   o f   a   b i o p o ten t ial  a c q u isi ti o n   s tag e   a n d   a   p e rso n a c o m p u ter  ( PC ) .   Th is  st r u c tu re   is  v e r y   flex i b le  a n d   a p p r o p riate   fo r   re se a rc h ,   b u t   fo r   fin a l   u se rs  it   is n e c e ss a ry   to   m ig ra te  t o   a n   e m b e d d e d   sy ste m ,   e li m in a ti n g   th e   P fr o m   th e   sc h e m e .   Th e   strict  re a l - ti m e   p ro c e ss in g   re q u irem e n ts  o f   su c h   sy ste m ju s ti fy   t h e   c h o ice   o f   a   sy ste m   o n   a   c h ip   fiel d - p ro g ra m m a b le  g a te  a rra y ( S o C - F P G A )   fo it imp lem e n tatio n .   T h is  a rti c le  p ro p o se a   p latf o rm   fo r   th e   a c q u isi ti o n   a n d   p ro c e ss in g   o f   e lec tro e n c e p h a lo g ra p h ic   sig n a ls  u sin g   t h is  ty p e   o f   d e v ice ,   w h ich   c o m b i n e th e   p a ra ll e li sm   a n d   sp e e d   c a p a b i li ti e s   o f   a n   F P G with   t h e   sim p li c it y   o f   a   g e n e ra l - p u r p o se   p ro c e ss o o n   a   sin g le  c h ip .   In   th is  sc h e m e ,   th e   F P G is  in   c h a rg e   o t h e   re a l - ti m e   o p e ra ti o n ,   a c q u iri n g   a n d   p ro c e ss in g   th e   si g n a ls,  wh il e   th e   p r o c e ss o so lv e t h e   h i g h - le v e tas k s,  with   t h e   in terc o n n e c ti o n   b e twe e n   p ro c e ss in g   e lem e n ts  so l v e d   b y   b u se in teg ra ted   i n to   th e   c h i p .   T h e   p ro p o se d   sc h e m e   wa u se d   t o   im p lem e n a   b ra i n - c o m p u ter  i n terfa c e   b a se d   o n   ste a d y - sta te  v isu a e v o k e d   p o te n ti a ls,  w h ich   wa u se d   t o   c o m m a n d   a   s p e ll e r.   Th e   first  tes ts  o th e   sy ste m   sh o th a t   a   se le c ti o n   ti m e   o 5   se c o n d p e c o m m a n d   c a n   b e   a c h iev e d .   T h e   ti m e   d e lay   b e twe e n   th e   u se r’s  se lec ti o n   a n d   th e   sy ste m   re sp o n se   h a b e e n   e stim a ted   at   3 4 3   µs .   K ey w o r d s :   B io p o ten tials     B r ain - co m p u ter   in ter f ac es    Dig ital sy s tem s   d esig n   So C - FP GA  s y s tem s   Stead y - s tate  ev o k ed   p o ten tials   T h is i a n   o p e n   a c c e ss   a rticle   u n d e r th e   CC B Y - SA   li c e n se .     C o r r e s p o nd ing   A uth o r :   Ma tías   J av ier   Oliv a   B io m ed ical  I n d u s tr ial  an d   Scien tific   I n s tr u m en tatio n   g r o u p   ( GI B I C )   E lectr o n ic  C o n tr o l a n d   Sig n al  Pro ce s s in g   I n v esti g atio n   I n s titu te  ( L E I C I )   E n g in ee r in g   Facu lty ,   L Plata  Natio n al  Un iv er s ity   ( UNL P)   C alle  1   y   4 7 ,   L a   Plata,   B u en o s   Air es,  Ar g en tin a   E m ail: m atias.o liv a@ in g . u n lp . ed u . ar       1.   I NT RO D UCT I O N   S y s tem   o n   ch ip   f ield - p r o g r a m m ab le  g ate  ar r ay s   ( So C - FP GA )   ar d ev ices  th at  co m b in in   s in g le   ch ip   f ield   p r o g r am m a b le  g at ar r ay   ( FP GA)   an d   g en er al - p u r p o s p r o ce s s o r .   T h h ig h   p ar allelis m   ca p ac ity   o f   FP GAs  h as  p lace d   th em   as   f ast  an d   ec o n o m ical  o p tio n ,   h alf way   b etwe en   ap p licatio n - s p ec if ic  in teg r ated   cir cu it  ( ASI C )   d ev ices  an d   g en er al - p u r p o s p r o ce s s o r s   [ 1 ] ,   o u tp er f o r m in g   ev en   d ig ital   s ig n al  p r o ce s s in g   ( DSP)  d ev ices  wh en   r ea l - tim r eq u ir em en ts   b ec o m m o r e   d em an d in g   [ 2 ] .   On   th o th er   h an d ,   h av in g   a   g en er al - p u r p o s p r o ce s s o r   allo ws d esig n er s   to   im p lem en t a   s im p le  an d   in tu itiv u s er   in ter f ac e,   alo n g s id with   an y   o th e r   h ig h - lev el  to o ls   r eq u ir ed ,   o v er co m in g   th e   lim itatio n s   o f   FP GAs  in   th is   r eg ar d .   B y   co m b in in g   th ese  two   p r o ce s s in g   elem en ts ,   So C - FP GA   d ev ices  h av b ec o m v er y   g o o d   o p tio n   f o r   t h d ev elo p m e n o f   s y s tem s   wh er r ea l - tim p r o ce s s in g   is   k ey .   Evaluation Warning : The document was created with Spire.PDF for Python.
                      I SS N :   20 89 - 4 8 6 4   I n t J Reco n f ig u r a b le  &   E m b ed d ed   Sy s t ,   Vo l.  10 ,   No .   3 No v em b er   2 0 2 1 :   237     2 4 8   238   T h ac q u is itio n   an d   r ea l - tim p r o ce s s in g   o f   b io lo g ical  s ig n als,  p ar ticu lar ly   elec tr o en ce p h a lo g r ap h i c   ( E E G) ,   h as  p r o m is in g   ap p licatio n s   in   th e   im p lem en tatio n   o f   b r ain - c o m p u ter   in ter f ac es  ( B C I s ) .   T h ese  ar e   d ev ices  th at  p r o v id t h u s er   with   n ew  ch an n el  o f   c o m m u n icatio n   an d   c o n tr o with o u t   p er f o r m in g   m o t o r   ac tio n s   [ 3 ] ,   wh ich   ca n   b e   v e r y   u s ef u f o r   p eo p le   with   r e d u ce d   m o b ilit y   an d   lo s s   o f   s p ee ch   to   h a v th e   o p p o r tu n ity   to   co m m a n d   s p e ller   [ 4 ] ,   w h ee lch air   o r   co m p u ter   m o u s e,   f o r   ex am p le  [ 5 ] ,   [ 6 ] .   I n   o r d er   to   ac h iev th is   g o al,   B C I s   ac q u ir b r ain   p o ten tials   f r o m   t h u s er ,   co m m o n ly   b y   E E G.   T h e   E E r ec o r d   s u f f er s   d is tu r b an c es,  well  d o cu m en ted   in   t h e   b i b lio g r ap h y ,   i n   th f a ce   o f   d if f er en s tim u li,  wh ich   ca n   b e x ter n al  o r   in te r n al  to   th u s er .   B y   p r o ce s s in g   it,  it  i s   p o s s ib le  to   d etec in   r ea ti m th d is tu r b an ce s   r elate d   to   th e   s tim u li,  an d   t o   u s th is   in f o r m atio n   to   c o n tr o d if f er en t   d ev ices.  T h e r ar e   m an y   d o cu m e n ted   b r ain   p o ten tials ,   s o   th e r is   a   v ar iety   o f   B C I   s y s tem s ,   d ep e n d in g   o n   th e   p o ten tial  t h ey   a cq u ir a n d   p r o ce s s .   So m o f   th m o s co m m o n l y   u s ed   ar e:  s lo co r tical  p o ten tials   [ 7 ] ,   m o to r   im ag er y   [ 8 ] ,   ev e n t - r elate d   s y n ch r o n izatio n   an d   d esy n c h r o n izatio n   ( E R S/ER D)   [ 9 ]   an d   v is u al  ev o k e d   p o te n tials .   T h ese  last   o n es  ca n   b class if ied   as  s tead y - s tate  ( SS VE Ps )   an d   tr an s ien s tate  ( T V E PS )   [ 1 0 ]   p o te n tials .   Mo s o f   th cu r r en r esear c h   o n   th e   s u b ject   m ak es  u s o f   b io p o ten tial  ac q u is itio n   s y s tem   an d   p er s o n al   co m p u ter   ( PC ) .   T h is   g r ea tly   lim its   th p o r ta b ilit y   an d   f lex i b ilit y   o f   th e   s et,   s o   it  is   tim e   t o   m ig r ate  to   an   em b ed d ed   s y s tem ,   elim in atin g   th e   PC   f r o m   th e   s ch em e.   T h e   d esig n   o f   B C I s   ac co r d i n g   to   th e   d i f f er en t p ar ad i g m s   h as  s u b s tan tial  d if f er e n ce s ,   b u t   s ev er al  asp ec ts   in   co m m o n a ll  o f   th em   r eq u ir r ea l - tim a cq u is itio n   an d   p r o ce s s in g   o f   E E s ig n als,  h ig h   co m p u tatio n   s p ee d ,   s o   th at  t h u s er   h as  f ast  f ee d b ac k   to   its   co m m an d s ,   an d   a n   in tu itiv a n d   ea s y - to - u s u s er   in ter f ac e.   Fo r   th ese   r ea s o n s   t h au th o r s   b eliev e   th at   So C -   FP GAs  h av a   lo t   to   c o n tr ib u te  t o   th e   d esig n   o f   B C I   s y s tem s .   Par ticu lar ly ,   SS VE Ps   ar p er io d ic  p o te n tials   th at  ca n   b o b t ain ed   b y   E E r ec o r d in g   in   th o cc ip ital   ar ea .   T h ey   ap p ea r   wh e n   th u s er   is   p r esen ted   with   p er io d ic  v is u al  s tim u li  ab o v 6   Hz,   an d   p r esen th s am p er io d icity   as  th s tim u lu s .   SS VE b ased   B C I s   ar am o n g   th o n es  th at  ca n   ac h iev th h ig h est  in f o r m atio n   tr an s f er   r ate  ( I T R )   [ 4 ] .   T h ey   also   h av th ad v an ta g o f   b e in g   s im p le  to   u s d ev ices,  th a r eq u ir v er y   litt le  tr a in in g ,   h en ce   th ey   h av e   b ee n   wid ely   s tu d ied .   E x am p les  o f   th ese  im p lem e n tatio n s   ca n   b f o u n d   at:  [ 4 ] ,   [ 5 ] ,   [ 1 1 ] - [ 1 3 ] .   T h ese  ty p es  o f   B C I s   im p o s v er y   d e m an d in g   tim co n s tr ain ts ,   s u ch   as  th g en er atio n   o f   s ev er al   v is u al  s tim u li  th at  h av to   b s y n ch r o n ized   with   th s ig n al’ s   ac q u is itio n .   I ts   im p lem en tatio n   with   m icr o co n tr o ller   p o r tin g   r ea tim o p er atio n   s y s tem   ( R T O S),   f o r   ex am p le,   ca n   p r o d u ce   d is p er s io n   o n   th e   laten cy ,   in tr o d u cin g   p h ase  n o i s e.   T h FP GAs  ca n   ad d r ess   t h is   is s u e,   s y n ch r o n izin g   b o th   th ac q u is itio n   a n d   th s tim u li with   s in g le  clo ck ,   r esu ltin g   in   v e r y   lo a n d   co n s tan t la ten cies.   T h im p lem en tatio n   o f   SS VE P - b ased   B C I   s y s tem s   in   FP G As  is   r elativ ely   n ew  s u b ject   o f   s tu d y ,   b u h as  g iv en   r is to   p u b licat io n s   s u ch   as  [ 1 4 ] ,   wh er e   S SVEP - b ased   B C I   with   p h ase  en co d i n g   t h at  ca n   ac h iev 2 0   b its /m in   I T R   ( 5   t o   8   s ec o n d s   p e r   s elec ted   co m m an d )   is   p r esen ted ,   o r   [ 1 5 ] ,   wh ich   r ep o r ts   an   I T R   o f   3 6   b its /m in .   Alth o u g h   th ese  d ev ices  d o   n o r ea ch   th I T R s   ac h iev ed   b y   th e   s y s tem s   r ep o r ted   in   [ 4 ]   o r   [ 1 3 ] ,   th ey   d o   s tan d   o u f o r   th eir   p o r tab ilit y   an d   f lex ib ilit y .   No n e   o f   th ese  wo r k s   u s es  an   a r ch it ec tu r lik th e   o n e   p r o p o s ed ,   wh ich   co m b in es  th co m p u tatio n al  s p ee d   o f   an   FP GA  with   g en er al - p u r p o s e   p r o ce s s o r   f o r   h ig h - lev el  task s   in   s in g le  ch ip .   T h is   a r ticle  d is cu s s es  th u s o f   So C   FP GA  s y s tem s   to   ac q u ir an d   p r o ce s s   E E s i g n als.  T h e   ad v an tag es  o f   u s in g   th is   ty p o f   d ev ice  ar e   ev alu ated ,   a n d   it  is   d is cu s s ed   h o t h d if f er en p r o ce s s in g   elem en ts   ca n   b u s ed   f o r   ea c h   o f   t h task s   in v o lv e d .   Af ter war d s   it  is   s h o wn   th d e v elo p m en o f   SS VE b ased   B C I ,   with   f r eq u e n cy   en co d in g ,   d e v elo p e d   en tire l y   o n   d e1 0 - n an o   b o ar d ,   b ased   o n   C y clo n V   So C - FP GA  p r o v id ed   b y   I n tel  Alter a,   an d   its   u s to   co m m a n d   a   s p eller ,   well  s u ited   f o r   th Sp a n is h   l a n g u a g e.   As  a   r esu lt,  d ev ice  th at  s tan d s   o u f o r   b ein g   co m p ac t,   f lex ib le,   p o r tab le,   lo w - c o s t,  ea s y   to   u s an d   in d ep en d en t   f r o m   h o s PC   f o r   its   o p er ati o n ,   is   o b tain e d .   Alth o u g h   t h im p lem en ted   s y s tem   is   b ased   o n   SS VE Ps ,   lar g p ar t o f   t h to o ls   d ev el o p ed   ca n   b u s ed   t o   im p lem en d if f er e n t ty p es o f   B C I s .         2.   M AT E R I AL S AN M E T H O DS   2 . 1 .   Sy s t em   o chip   W h en   d ev elo p i n g   h ig h - q u alit y   r ea l - tim s y s tem s ,   d ev el o p e r s   m u s ch o o s b etwe en   two   f am ilies   o f   d ig ital  d ev ices.  T h f ir s o p t io n   is   p u r e - s o f twar ap p r o ac h ,   wh er m icr o p r o ce s s o r ,   u s ed   as  th co r e,   co m m u n icate s   with   DSP  o r   o th e r   ex te r n al  d ev ices,  f o r m i n g   a   m u ltip le - c h ip   s y s tem .   T h e   s ec o n d   o p tio n   co n s is ts   o f   s y s tem   o n   ch ip   ( So C ) ,   in   wh ich   all  th n ec ess ar y   elec tr o n ic  cir cu its   f o r   g iv en   s y s tem   ar e   in teg r ated   in   s in g le  cir cu it ( I C ) .   T h r esu lt is   d ev ice  th at  u s es les s   en er g y ,   h as b etter   p e r f o r m a n ce ,   r eq u ir es   less   s p ac e,   ac h iev es  h ig h er   co m m u n icatio n   b an d wid t h   b etwe en   th d if f er en s u b s y s tem s ,   an d   is   m o r r eliab le  th an   s y s tem s   th at  in v o lv m u ltip le  ch ip s   [ 1 ] .   T h co m b in atio n   o f   m icr o p r o ce s s o r   an d   an   FP GA  is   th co r o f   m an y   em b ed d e d   s y s tem s .   As   m en tio n ed ,   th er ar e   p len ty   o f   r ea s o n s   to   in teg r ate   th em ,   alo n g   with   d if f er en p er ip h e r als  th at  ar o f   in ter est,   Evaluation Warning : The document was created with Spire.PDF for Python.
I n t J Reco n f ig u r a b le  &   E m b ed d ed   Sy s t   I SS N:  2089 - 4 8 6 4       SoC - F P GA   s ystems   fo r   th a cq u is itio n   a n d   p r o ce s s in g   o f e le ctro en ce p h a lo g r a p h ic   … ( Ma t ía s   Ja vier O liva )   239   in   s in g le  c h ip .   I n   th is   way ,   it  is   p o s s ib le  to   in teg r ate   th h ig h - lev el   f u n cti o n alities   o f   a   p r o ce s s o r   with   th e   r ea l - tim o p er atio n   o f   an   FP GA ,   en s u r in g   a n   o p tim al  i n ter co n n ec tio n   b etwe en   b o t h   p r o ce s s in g   elem en ts .   I n   th ese  h eter o g en e o u s   s y s tem s ,   FP GA s   ar id ea f o r   h an d lin g   p ar allel  o p e r atio n s   o f   m an y   d ata   ch an n els;   an d ,   b ec au s th ey   im p lem en co m p u tatio n   d ir ec tl y   in   h ar d war e,   th e y   p r o v id e   a   lo w   an d   c o n s tan laten cy   p at h   f o r   task s   s u ch   as  cu s to m   tr ig g er in g   an d   h ig h - s p ee d   clo s ed - l o o p   co n tr o l.   On   t h o t h er   h an d ,   th e y   im p r o v e   th f lex ib ilit y   o f   em b ed d ed   s y s tem s ,   m a k in g   th em   ea s ier   to   u p d ate  th an   s y s tem s   with   f ix ed   l o g ic  a n d   allo win g   th em   to   ad a p to   ch a n g in g   I /O  r e q u ir em e n ts .   I n   th i s   s ch em e,   th d esig n er s   ca n   s o lv th task s   th at  d em an d   lo laten c y   u s in g   th e   FP GA,   wh ile  th em b ed d e d   p r o ce s s o r   tak es  ca r o f   th e   u s er   in ter f ac e   an d   th e   r est o f   th task s   with   less er   tim co n s tr ain ts ,   p o s s ib ly   p o r tin g   an   o p er atin g   s y s tem   f o r   it.   C u r r en tly   th er a r two   m a n u f ac tu r e r s   th at  co n ce n t r ate  alm o s th en tire   o f f e r   o f   S o C - FP G A   s y s tem s .   T h ese  ar Xilin x   an d   I n tel  ( f o r m er ly   Alter a) .   T h d e1 0 - n a n o   b o ar d ,   s elec ted   f o r   t h is   ar ticle,   f ea tu r es  C y clo n V   5 C SEBA6 U2 3 I 7   FP G A - So C ,   p ar o f   th e   lo w - r an g o f   I n tel  Alter a   d ev ices.   T h is   ch ip   co m b i n es  th C y clo n FP GA  with   an   AR M - C o r tex   A9   p r o ce s s o r ,   wh ich   ca r r ies  an   An g s tr o m   d is tr ib u tio n   o f   L i n u x   o p er atin g   s y s tem ,   alo n g s id with   in ter co n n ec tio n   b u s es  b etwe en   th em .   Ad d itio n ally ,   t h b o ar d   p r o v id es  a   L T C   2 3 0 8   ch i p 5 0 0   k s p s ,   1 2 - B it,  s u cc ess iv ap p r o x im atio n   r eg is ter   ( SAR )   an alo g - to - d ig ital  co n v er ter   ( ADC).   T h 1 1 0   lo g ic  elem en ts   o f   th C y clo n 5 C S E B A6 U2 3 I 7   d ev ice  ar m o r e   th an   en o u g h   f o r   th e   ty p o f   p r o ce s s in g   r e q u ir ed   f o r   th is   ap p licatio n ,   as  it  is   to   b s h o wn   in   s ec tio n   3 . 1 ,   an d   th ADC  in clu d ed   in   th b o ar d   is   well  s u ited   f o r   t h a c q u is itio n   o f   th E E s i g n al,   h en ce   th s elec tio n   o f   th d e1 0 n an o   b o ar d   co n s titu tes  co s t - ef f ec tiv e   s o l u tio n .   I n   I n tel   Alter a’ s   d o c u m en tatio n   th e   m icr o p r o ce s s o r   is   o f ten   r ef e r r ed   to   as  h ar d   p r o ce s s o r   s y s tem   ( HPS).   T h is   ac r o n y m   will b u s ed   o n   th is   p ap er   as we ll.      2 . 2 .   B CI im plem ent a t io n us ing   S o C   I n   o r d e r   to   im p lem en B C I   d ev ice  it  is   n ec es s ar y   to   o b tain   elec tr o en ce p h al o g r a p h ic  s ig n als  f r o m   th u s er   an d   p r o ce s s   th em   in   r ea tim e,   in   th s h o r test   p o s s ib le  tim e.   T h p r o ce s s ed   in f o r m atio n   m u s b e   class if ied   b y   s o m cr iter ia  an d   th en   u s ed   to   co n tr o d e v ice.   T h r o u g h o u th p r o ce s s ,   th u s er   m u s b e   p r o v id e d   with   an   i n ter f ac as i n tu itiv as p o s s ib le ,   wh ich   p r o v id es h im   with   f ee d b ac k .   So C - FP GA  s y s tem s   ar id ea f o r   im p lem en tin g   s u ch   s y s tem .   On   th o n h a n d ,   th e   FP GA  i s   av ailab le  to   h an d le  th ac q u is itio n   an d   p r o ce s s in g   o f   th s ig n als  an d ,   o n   th o t h er ,   th m ic r o p r o c ess o r   is   id ea l   to   ca r r y   th u s er   i n ter f ac e.   T h class if icat io n   o f   th s ig n als  an d   th co n tr o o f   th d ev ices  ca n   b h an d led   b y   eith er   o f   th two   m o d u les.  As  cr iter io n   f o r   ch o o s in g   wh ich   o n to   u s e,   ev alu atin g   wh at  t y p o f   d e v ices  will   b co n tr o lled   is   p r o p o s ed .   I f   t h p u r p o s o f   th e   B C I   is   to   co n tr o s o f twar e   ( s p eller ,   f o r   ex am p le)   it  ca n   b e   p r o g r a m m ed   d ir ec tly   i n to   th m icr o p r o ce s s o r ,   to g eth er   with   th s ig n al  class if ier   s y s tem .   Alter n ativ ely ,   if   th id ea   is   to   co n tr o s o m e   ex ter n al  h ar d wa r ( a   wh ee lch air ,   f o r   ex am p le)   it  is   p r ef er a b le  t h at  th FP GA  tak es  ca r o f   b o th   th class if ier   s y s tem   an d   th d e v ice  d r iv er ,   to   m in im ize  th laten c y .   I f   it  is   n ec ess ar y   to   co n tr o l   ex ter n al  s tim u li  to   h a n d le  th e   d ev ice  ( v is u al  s tim u li,  f o r   e x am p le) ,   it  is   p r ef er ab le   to   c o n tr o th e m   b y   th e   FP GA,   to   f ac il itate  th eir   s y n ch r o n is m   with   th ac q u ir ed   s ig n al.   T o   g u ar an tee  th co r r ec ac q u is itio n ,   s to r ag an d   p r o ce s s in g   o f   th s ig n al  th er ar s o m b asic  elem en ts   th at  m u s b s o lv ed   with in   th FP GA.   An   an alo g - to - d ig ital  co n v e r ter   ( ADC)  with   1 2 - b it  r eso lu tio n   ca n   b e   u s ed   to   ac q u ir e   th e   s ig n al,   as  lo n g   as  an   ap p r o p r iate   an alo g   s ig n al  co n d itio n in g   s ta g is   p r o v id e d .   T h is   co n v er ter   m u s b m a n ag ed   b y   d e d icate d   m o d u le  in   th FP GA.   R aw  s am p les  s h o u ld   b f ir s s av e in ter n ally   an d   th en   ex p o r te d   to   s o m m em o r y   s h ar ed   with   th m icr o p r o ce s s o r ,   wh en   ce r tain   n u m b er   o f   s am p les  is   r ea ch ed .   T h is   is   d o n in   o r d er   f o r   th e   p r o ce s s o r   t o   h a v ac ce s s   to   th e   r aw  s am p les;   f o r   g r a p h in g ,   f o r   ex a m p le,   b u t w ith o u h av i n g   to   h an d le  th e m   in   r ea l - tim e .   W h ile  th er ar m an y   p o s s ib le  d ig ital sig n al  p r o ce s s in g   tech n iq u es a n d   m eth o d s   th at  ca n   b u s ef u l in   B C I   s y s tem ,   o n o f   th m ain   o n es is   th d is cr ete  Fo u r ier   tr an s f o r m   ( DFT) .   T h is   tr an s f o r m   p r o v id es a   way   to   an aly ze   s ig n als  in   tim e - in d ep en d en f ash io n ,   an d   th f as Fo u r ier   tr an s f o r m   ( FF T )   im p lem en tatio n   o f   it  d r am atica lly   r ed u ce s   th n u m b er   o f   o p er atio n s   in v o lv ed   o n   its   ca lcu latio n .   Ad d itio n ally ,   u s in g   th is   alg o r ith m ,   co r r elatio n s   an d   c o n v o lu tio n s   ca n   b im p lem e n ted ,   in   g e n er al,   u s in g   f ewe r   o p er atio n s ,   wh ich   allo ws  th e   im p lem en tatio n   o f   d ig ital  f ilter s   in   a n   ef f icien way   [ 1 6 ] .   I n   th is   s ch em e ,   it   is   th FP GA  th at  m u s b e   in   ch ar g o f   ca lcu latin g   t h FF T   o f   th e   s ig n als,  s av in g   th e   r esu l ts   o f   th e   p r o ce s s in g   in   s o m e   m em o r y   s h ar ed   with   th m icr o p r o ce s s o r .   I is   d esira b le  th at  th e   len g th   o f   t h e   FF T   m atch es  th n u m b er   o f   s am p les  th at  th e   m icr o p r o ce s s o r   h as  ac ce s s   to ,   in   o r d er   f o r   it  to   h av ac ce s s   to   th r aw  an d   p r o ce s s ed   s ig n al  in   th last   tim e - win d o at  an y   g iv en   m o m e n t.   W ith   th ac q u is itio n   an d   p r o c ess in g   o f   th s ig n al  r eso lv ed ,   it  is   th m icr o p r o ce s s o r   th at  m u s tak ca r o f   th h ig h - lev el  task s .   T h m o s im p o r tan o n is   th u s er   in ter f ac e,   wh ich   s h o u ld   b as  in tu itiv an d   u s er - f r ien d l y   as  p o s s ib le.   I t   is   d esira b le  th at   th is   in ter f ac e   p r o v i d es  th e   o p er ato r   with   a   way   t o   v e r if y   th e   co r r ec ac q u is itio n   o f   th s ig n al,   b y   g r a p h in g   it,  f o r   e x am p le.   I n   g en e r al,   th ese  d ev ices  ca r r y   an   o p er atin g   s y s tem ,   wh ich   g iv es  d ev elo p e r s   th p o s s ib ilit y   o f   p r o g r am m in g   th in ter f ac with   th h ig h - lev el  d esig n   to o ls   th ey   ar m o s t f am iliar   with .   Evaluation Warning : The document was created with Spire.PDF for Python.
                      I SS N :   20 89 - 4 8 6 4   I n t J Reco n f ig u r a b le  &   E m b ed d ed   Sy s t ,   Vo l.  10 ,   No .   3 No v em b er   2 0 2 1 :   237     2 4 8   240   2 . 3 .   SS VE P - ba s ed  B CI im plem ent a t io n   2 . 3 . 1 .   Ste a dy   s t a t e   v is ua lly   e v o k ed  po t ent ia ls   SS E VP s   ar p er io d ic  p o ten tia ls   th at  ap p ea r   in   u s er ' s   E E r ec o r d   wh en   p r esen ted   with   p er io d ic   f lash in g   lig h ts ,   with   f r eq u en ci es  ab o v 6   Hz,   an d   p r esen th s am p er io d icity   o f   th s tim u lu s .   I m p lem en tin g   s y s tem   th at  u s es  th ese  p o ten tials   to   co n tr o s o m e   ty p o f   d ev ice  in v o lv es  m ea s u r in g   t h E E s ig n al,   an d   p r o ce s s in g   it  in   its   s ea r ch .   T h er ar m ain ly   two   way s   to   u s v is u al  s tim u li  to   e n co d e   in f o r m atio n p h ase  an d   f r eq u e n cy   en co d in g .   I n   th f ir s ca s e,   th u s er   is   p r esen ted   with   m u ltip le  f lash in g   s tim u li  at  th s am e   f r eq u e n cy ,   b u o u o f   p h ase  with   ea ch   o t h er   [ 1 4 ] .   I t   is   th e   task   o f   th class if icatio n   alg o r ith m   to   d etec t h is   d elay   in   o r d er   to   d et er m i n w h ich   s tim u lu s   th e   u s er   is   lo o k in g   at.   I n   t h s ec o n d   ca s e,   t h u s er   is   p r esen ted   with   v is u al  s tim u li  b lin k in g   at  d if f er en f r eq u e n cies  [ 1 2 ] .   T h class if icatio n   alg o r ith m   in   th is   ca s m u s t   d eter m in wh ich   is   th p r e d o m in an f r e q u en c y   in   th e   o b tai n ed   r ec o r d .   Mix ed   s ch em es  m ay   also   b u s ed ,   with   s tim u li f lash in g   in   b o th   d if f e r e n t f r eq u en cies a n d   p h ases   [ 4 ] .     2 . 3 . 2 .   G ener a l schem o f   t he  dev ice   I n   th is   ar ticle  So C - FP GA  was  u s ed   to   im p lem e n SS VE P - b ased   B C I   with   f r eq u en c y   en co d in g .   T h E E s ig n al  is   m ea s u r ed   u s in g   wet  elec tr o d es  in   th u s er ' s   o cc ip ital  ar ea .   I th en   g o e s   th r o u g h   s tag o f   an alo g   s ig n al  co n d itio n in g ,   b e f o r b ein g   d i g itized   b y   t h L T C 2 3 0 8   ADC,  a v ailab le  o n   th d e1 0 - n a n o   b o ar d .   T h s ig n al  is   s to r e d   in ter n ally   an d   p r o ce s s ed   u s in g   FF T   alg o r ith m   in   th FP GA,   an d   is   late r   tr an s f er r e d   to   th e   m icr o p r o ce s s o r   th r o u g h   a n   in t eg r ated   b u s .   T h m icr o p r o ce s s o r   is   r esp o n s ib le  o f   im p lem en t in g   a   s p eller   a n d   a   s ig n al  g r ap h i n g   to o l,  u s in g   th in f o r m atio n   p r o v id e d   b y   th FP GA.   At  th s am tim e,   5   v is u al  s tim u li  o f   d if f er en f r e q u en cies  ar g en e r ated ,   wh ich   allo th u s er   to   co n tr o th d ev ice.   T h d esig n   o f   th s y s tem   was   p lan n ed   in   a   m o d u lar   way ,   s ee k in g   th at   ea ch   m o d u le  s er v es  s p ec if ic  p u r p o s a n d   is   in d ep en d en o f   th e   o th er s .   I n   th is   way ,   wid el y   r eu s ab le  s y s tem   is   ac h iev ed .   Fig u r 1   s h o ws  g en e r al  d iag r am   o f   t h im p lem en ted   d e v ice.           Fig u r 1 .   Gen e r al  s ch em o f   t h d ev ice       2 . 3 . 3 .   Sig na l c o nd it io nin g   s t a g a nd   is o la t io n ba rr ier   T h E E G   s ig n al’ s   am p litu d i s   b etwe en   2 - 1 0 0   µ V,   its   f r e q u en cy   r an g es  f r o m   0 . 5   Hz  to   1 0 0   Hz,   it’s   m o u n ted   o n   DC   co m p o n en th at  ca n   r ea ch   h u n d r ed s   o f   m ( elec tr o d p o ten tials )   an d   it’s im m er s ed   in   n o is e   an d   elec tr o m ag n etic  in ter f er e n ce   [ 1 7 ] .   On ce   th s ig n a is   m ea s u r ed   th r o u g h   t h wet  elec tr o d es  an   an alo g ic   co n d itio n in g   s tag e   n ee d s   to   b p r o v id ed ,   to   en a b le  its   ac q u is itio n   with   th ADC  in teg r at ed   in   th e   b o ar d   ( 1 2   b its ,   s u cc ess iv ap p r o x im atio n s ) .   Fo r   th is   p u r p o s e,   a   o n e   ch an n el  AC   co u p led   d if f er en tial   am p li f ier   was  u s ed   [ 1 8 ] .   T h is   cir cu it  p r o v id es  an   am p lific atio n   o f   5 8 3 2 ,   an d   in c lu d es  f ee d b ac k   s tag th r o u g h   th ir d   elec tr o d e,   with   th p u r p o s o f   r ed u ci n g   t h co m m o n   m o d v o ltag in   t h d if f er e n tial  p air   ( u s u ally   ca lled   d r iv en   r ig h t   leg   cir cu it,   o r   DR L ,   i n   th e   b i b lio g r ap h y   [ 1 9 ] ) .   T h e   s am a m p lific atio n   s tag e,   with   a   lo w er   d if f er en tial  m o d e   g ain ,   ca n   b u s ed   f o r   o b tain i n g   elec tr o m y o g r ap h ic  ( E MG )   [ 2 0 ]   o r   elec tr o ca r d io g r a p h ic   ( E C G)   [ 1 8 ] ,   [ 2 1 ]   s ig n als.  T h am p lifie r   was  c o m p lem en ted   with   an   i n teg r a ted   m ed ical  g r ad is o lato r   A DUM 6 4 0 1 ,   f o r   its   p o wer   s u p p l y ,   an d   an   o p tical  is o latio n   am p lifie r   b ased   o n   t h I L 3 0 0   o p to co u p ler ,   t o   is o late  th s ig n al  at  its   Evaluation Warning : The document was created with Spire.PDF for Python.
I n t J Reco n f ig u r a b le  &   E m b ed d ed   Sy s t   I SS N:  2089 - 4 8 6 4       SoC - F P GA   s ystems   fo r   th a cq u is itio n   a n d   p r o ce s s in g   o f e le ctro en ce p h a lo g r a p h ic   … ( Ma t ía s   Ja vier O liva )   241   o u tp u [ 2 2 ] ,   s af eg u ar d in g   th in teg r ity   o f   th e   u s er .   An   an alo g ic  an ti - aliasin g   ac tiv f ilter   with   cu o f f   f r eq u e n cy   o f   1 6 0   Hz  was a ls o   ad d ed   to   th s et.     2 . 3 . 4 .   Vis ua l st im uli   T o   g e n er ate  th e   v is u al  s tim u li   b y   wh ich   t h u s er   co n t r o ls   th d ev ice,   5   m atr ices  o f   r ed   L E lig h ts ,   f lash in g   at  1 4 ,   1 6 ,   1 8 ,   2 0   an d   2 2   Hz,   wer u s ed .   T h ese  v is u al  s tim u li  wer s u ited   h o r izo n tally ,   in   lin with   th e   o p tio n s   av ailab le  in   th u s er   in ter f ac e,   as  s ee n   in   Fig u r 2 .   I n   o r d er   to   c o r r ec tly   r eg is ter   th SS VE P   p h en o m en o n   it’s  c o n v e n ien t h at  th e   p er io d icity   o f   th e   s tim u li  is   s y n ch r o n ized   with   th s i g n al  s am p lin g   tim s o   th s am t im er ,   s et  at  1 /1 0 2 4   s   an d   g e n er ated   i n   th FP GA,   was u s ed   to   co n tr o l b o t h   m o d u les.           Fig u r 2 .   Vis u al  s tim u li lay o u t       2 . 3 . 5 .   L o lev el  pro ce s s ing   T h ac q u is itio n   a n d   s to r ag e   o f   th s ig n al  an d   th ca lc u latio n   o f   its   FF T   wer im p lem e n ted   in   th e   FP GA,   co d ed   u s in g   th e   Ver ilo g   h a r d war e   d escr ip tio n   lan g u ag ( HDL ) .   Fig u r e   3   s h o ws  in   m o r d etail  th e   d if f er en m o d u les  th at  m ak u p   th d ig ital  d esig n .   T h ese  ar th ADC  d r iv er ,   th v is u al   s tim u li  d r iv er ,   th tim er ,   th e   FF T   m o d u le,   an d   m em o r ies  an d   c o n tr o l   s ig n als  th at  in te r f ac es  th e   s y s tem   wi th   th e   HPS.  I n   th is   d esig n   NI OS  2   s o f p r o ce s s o r   was  also   in clu d e d .   T h wh o le  d esig n   is   s y n ch r o n ized   th r o u g h   5 0   MH z   clo ck ,   av ailab le  in   th d e 1 0 - n a n o   b o a r d .           Fig u r 3 .   FP GA  im p lem en tati o n   d etail       T h v is u al  s tim u li  a r e   c o n tr o l led   th r o u g h   a   m o d u le  th at   co u n ts   p o s itiv e d g es  o n   th e   tim er s   clo ck ,   g en er atin g   s q u ar s ig n als  o f   th d esire d   f r e q u en cies  th a ar s y n ch r o n ized   with   th e   tim er .   T h ADC   L T C 2 3 0 8 ,   ex ter n al  to   th So C   b u in clu d ed   o n   th b o ar d ,   is   d r iv en   b y   SP I   p r o to c o th r o u g h   d ed icate d   m o d u le.   T h tim er   f ix es  th s am p le  r ate  at  1 0 2 4   s am p les  p er   s ec o n d   ( s p s ) .   T h s am p les  f r o m   th ADC  ar f ir s tly   s to r ed   in   an   in ter n al  b u f f er ,   with   ca p ac ity   o f   5 1 2   s a m p les.  On ce   th is   b u f f er   is   f ille d   th ca lcu latio n   o f   th s am p le’ s   5 12 - p o in t   FF T   tak es  p lace ,   a n d   b o t h   th e   r aw   a n d   th e   p r o ce s s ed   s am p les  ar e   s to r ed   in   m em o r ies  s h ar ed   with   th HPS,  wh ic h   i s   n o tifie d .   T h is   p r o ce s s   is   co n tr o lled   an d   m o n ito r e d   b y   th e   NI OS  2   p r o ce s s o r ,   wh ich   is   "so f t"  p r o ce s s o r ,   i. e. ,   p r o g r am m ed   in t o   th e   lo g ic  ce lls   o f   th FP GA.   T h e   u s o f   th is   p r o ce s s o r   wa s   co n s id er ed   v ital  in   th e   s y s tem   d ev elo p m en t   an d   d eb u g g i n g   s tag e,   s in ce   it  p r o v id es  g r ea ter   v er s atility   an d   co n tr o l o v er   th d if f er en t stag es o f   th p r o ce s s ,   an d   ca n   b p r o g r am m ed   ea s ily   th r o u g h   h ar d war ab s tr ac tio n   la y er   ( HAL )   p r o v id e d   b y   I n te Alter a.   I n   f u tu r im p lem en tatio n   o f   th s y s tem ,   it  co u ld   b d is p en s ed   with ,   Evaluation Warning : The document was created with Spire.PDF for Python.
                      I SS N :   20 89 - 4 8 6 4   I n t J Reco n f ig u r a b le  &   E m b ed d ed   Sy s t ,   Vo l.  10 ,   No .   3 No v em b er   2 0 2 1 :   237     2 4 8   242   d ev elo p in g   s o m d ir ec co m m u n icatio n   b etwe en   th ADC  d r iv er   an d   th FF T   m o d u le.   T h is   wo u ld   allo m o r ef f icien s y s tem ,   wh ile  s av in g   s p ac in   th FP GA  lo g ic  ce lls .   No   p r e - p r o ce s s in g   i s   co n d u cted   o n   th e   s am p les  p r o v id e d   b y   th ADC  b ef o r in p u t t in g   th em   to   t h FF T   m o d u le,   s in ce   it  was  c o n s id er ed   u n n ec ess ar y   f o r   t h a p p licatio n   in ten d e d   at  th is   s tag e.   I n   f u tu r e   im p le m en tatio n s   o f   th e   s y s tem   th e   d ata  c o u ld   b e   p r e - p r o ce s s ed   u s in g   FIR [ 2 3 ]   o r   I I R   [ 2 4 ]   f ilter s ,   to   r ed u ce   th o f f - b an d   n o is e,   an d   ad ap tativ f il ter s ,   f o r   ex am p le  least - m ea n   s q u ar f ilter   [ 2 5 ] ,   to   r e d u ce   t h o n - b a n d   n o is e ,   p r o d u ce d   b y   m u s cle  ar t i f ac t s .   T h is   will  s u r ely   r esu lt in   m o r r o b u s t sy s tem .     T h m o d u le  th at  im p lem en t s   th FF T   i s   m ad u p   o f   t wo   p ar ts .   co r p r o v id ed   b y   [ 2 6 ]   is   r esp o n s ib le  f o r   ca lcu latin g   th e   5 1 2 - p o in t   FF T   with   s er ial  i n p u t/o u t p u in ter f ac e,   wh ile  t wo   FIFO  m em o r ies  an d   d ed icate d   lo g ic  s o lv th in p u t/o u tp u in ter f ac with   th e   NI OS  p r o ce s s o r .   T h co r r ec eiv es  in p u t   s am p les  in   1 2 - b it  f o r m at,   co m p u tes  th FF T   an d   p r o v id es   1 6 - b it  o u tp u ts ,   tr u n ca tin g   th e   v alu es  if   n ec ess ar y .   T o   h elp   r ed u ce   t h in ter n al   tr u n ca tio n   er r o r   o f   th e   co r e,   wh ile  k ee p in g   th e   r eso u r ce   u tili za tio n   r ea s o n ab le ,   all  th co m p u tatio n s   in s id o f   it  ar ca r r ied   o u in   2 0 - b it  wo r d s .   T h is   in clu d es  th twid d le  f ac to r s   n ec ess ar y   f o r   co m p u tatio n ,   th at  a r s to r ed   i n   lo o k - u p   tab les  to   a v o id   h av i n g   to   co m p u te   th em   o n   th f ly .   T h e   co m b in atio n   o f   5 1 2 - p o in FF T   with   s a m p li n g   f r eq u en cy   o f   1 0 2 4   s p s   g iv es  th s y s tem   f r eq u en cy   r eso lu tio n   o f   2   Hz,   s o   th at  all  th f r eq u en cies  o f   in ter est  ( 1 4 ,   1 6 ,   1 8 ,   2 0   a n d   2 2   Hz)   co r r esp o n d   to   wh o le  b ea m s   o f   th FF T ,   m in im izin g   th s p ec tr al  leak a g e.   On ce   th co m p u tatio n   is   d o n th o u tp u o f   th FF T   i s   s to r ed   in   3 2 - b it  len g th   wo r d s ,   to   f ac ilit ate  its   in ter f ac with   th r est o f   th s y s tem .   I n   o r d er   to   im p lem en co m m u n icatio n   b etwe en   t h m o d u l es,  two   d if f er en s tan d a r d   Al ter b u s es   wer u s ed ,   as  s h o wn   i n   Fig u r 4 .   W h en   th e   ADC  d r iv er   n o tifie s   th at  th 5 1 2   s am p les  a r av ailab le   in   th e   “Raw  s ig n al  m em o r y ”,   th NI OS  2   p r o ce s s o r   tr an s f er s   th em   to   f ir s in   f ir s o u ( FIFO)   m em o r y   ( FIFO  1   in   th f ig u r e) .   T h ese  tr an s f er s   a r m an ag ed   b y   an   A v alo n   m em o r y   m a p p ed   in te r f ac e,   wh i ch   is   well  s u ited   to   im p lem en r ea d   an d   w r ite  in ter f ac es  f o r   m aster   an d   s lav e   co m p o n en ts   s u ch   as  th is .   T h en   th d ata  f lo ws   th r o u g h   th FF T .   Fo r   th is ,   Av alo n   s tr ea m in g   in ter f ac es,  wh i ch   ar id ea f o r   lo w - laten cy ,   u n id ir ec tio n al  d ata   tr an s f er s ,   wer u s ed .   Fin ally ,   t h p r o ce s s ed   d ata   is   av ailab le  in   an o t h er   FIFO  m e m o r y   ( FIF 2   in   th e   f ig u r e) ,   an d   th e   NI OS  2   p r o ce s s o r   tr a n s f er s   th em   t o   th e   p r o ce s s ed   s ig n al  m em o r y ,   u s in g   Av al o n   m e m o r y   m a p p e d   in ter f ac es  ag ain .     T h is   m em o r y ,   alo n g s id with   th r aw  s ig n al  m em o r y ”  is   av ailab le  to   t h HPS,  th r o u g h   th e   lig h tweig h t - AXI   b u s .   B o th   m em o r ies,  im p lem en ted   with   o n - ch ip   R AM ,   s to r d ata  in   3 2 - b it len g th   wo r d s .   Fo r   m o r in f o r m atio n   ab o u t th A v alo n   in ter f ac es r ef er   to   Alter d o cu m e n tatio n   [ 2 7 ] .             Fig u r 4 .   FF T   m o d u le  d etail       2 . 3 . 6 .   H P S a n d F P G co m mu nica t io n   I n ter f ac in g   th FP GA  an d   th e   HPS  in v o lv es  s elec tin g   o n o f   th th r ee   b u s es  in teg r ated   in   th So C - FP GA.   T h ese  ar e:  th FP GA - to - HPS  B r id g e,   th HPS - to - F PGA  B r id g an d   th L ig h tweig h HPS - to - FP GA   B r id g e.   I n   th is   d esig n   th er e   ar n o   HPS’s  s lav es  th at  n ee d   to   b c o n tr o lled   f r o m   th FP GA,   all  th tr an s ac tio n s   th at  n ee d   to   tak e   p lace   h a v m ax im u m   wid th   o f   3 2   b its ,   an d   th er is   n o   n ee d   f o r   h ig h - b an d wid th   b u s ,   s in ce   all  th e   r ea tim p r o ce s s in g   ta k es  p l ac in   th FP GA  f ab r ic.   Fo r   th ese  r ea s o n s   th lig h tweig h HPS - to - FP GA  B r id g was  s elec ted .   T h is   b u s   is   d r iv en   b y   1 0 0   MH clo c k ,   h as  f ix e d   d ata   wid th   o f   3 2   b its   an d   ex p o s es  an   in ter f ac th at  th u s er   ca n   co n n ec to   A v alo n   Me m o r y   Ma p p ed   s lav e   in ter f ac es.  T h m a n u f ac tu r er   r ec o m m en d s   its   u s f o r   lo w - b a n d wid th   tr af f ic  [ 2 7 ] .         Evaluation Warning : The document was created with Spire.PDF for Python.
I n t J Reco n f ig u r a b le  &   E m b ed d ed   Sy s t   I SS N:  2089 - 4 8 6 4       SoC - F P GA   s ystems   fo r   th a cq u is itio n   a n d   p r o ce s s in g   o f e le ctro en ce p h a lo g r a p h ic   … ( Ma t ía s   Ja vier O liva )   243   2 . 3 . 7 .   H ig h lev el  pro ce s s ing     T h h ig h - lev el  p r o ce s s in g   was  co d ed   in   th h a r d   p r o ce s s o r   s y s tem   ( HPS)  o f   th d e v ice.   T h is   m o d u le   h as  d ir ec ac ce s s   to   th e   r aw  a n d   p r o ce s s ed   s ig n al   in   t h las win d o o f   5 1 2   s am p les.  As   s ee n   in   Fig u r e   5 ,   in f o r m atio n   is   d ir ec tly   m ap p e d   in   th v ir tu al  m em o r y   o f   th e   em b ed d ed   L in u x   r u n n in g   in   t h p r o ce s s o r ,   at  th e   ch ar ac ter   d ev ice  “d e v /m em ”.   p r o g r am   r u n n in g   in   L in u x   m u s ac ce s s   th is   d ev ice  an d   r e ad   th in f o r m atio n ,   wh ich   is   s y n ch r o n ized   b y   t h e   FP G m o d u les  th r o u g h   th co n tr o s ig n als.  I n   th is   s ch em th d e v elo p er   ca n   d esig n   h ig h   lev el  p r o g r am s   u s in g   th to o ls   th at  h o r   s h is   m o r u s ed   to .   Fo r   th is   ar ticle  class if ier   alg o r ith m   an d   a   s p eller   wer p r o g r am m ed   in   C # ,   ex ec u tin g   t h em   th r o u g h   th e   m o n o   im p lem en tatio n   o f   th . NE T   f r am ewo r k   [ 2 8 ] .     I n   ea ch   tim e - win d o ( 5 1 2   s am p les  o r   0 . 5   s ec o n d s )   th class if ier   alg o r ith m   co m p ar es  th m ag n itu d e   o f   th s ig n al’ s   FF T   at  th f r eq u en cies  o f   in ter est  ( 1 4 ,   1 6 ,   1 8 ,   2 0   an d   2 2   Hz) ,   with   ea ch   o t h er   an d   a g ain s th e   m ea n ,   s elec tin g   th b ig g est o n e.   I f   f r eq u e n cy   is   s elec ted   in   th r ee   co n s ec u tiv tim e - win d o ws it’ s   in f er r ed   th at   th u s er   was  lo o k in g   at   th v is u al  s tim u lu s   r elate d   to   th at  f r eq u e n cy .   Usi n g   th is   s y s tem ,   u s er   ca n   s elec t   b etwe en   f iv d if f er en o p tio n s ,   with o u t   m o v in g   an y   o th e r   m u s cle  th an   th ey es.  T h cr iter io n   o f   th th r ee   co n s ec u tiv win d o ws  was  ad o p ted   to   r ed u ce   th p r o b ab ilit y   o f   f alse  p o s itiv es,  with   th d o wn s id o f   r ed u ci n g   th ac h iev ab le  I T R   o f   th s y s t em .     B y   r elatin g   ea ch   o f   th v is u al   s tim u lu s   to   s y m b o in   th s cr ee n   s p eller   was  im p lem e n ted .   T h e   s y s tem   allo ws  th u s er   to   s elec b etwe en   5   s y m b o ls   s o ,   in   f ir s s tag e,   th GUI ,   wh ich   ca n   b s ee n   i n   Fig u r e   1 ,   ask s   th u s er   to   s elec b etwe en   f iv g r o u p s   o f   f i v letter s .   L ater ,   in   s ec o n d   s tag e,   th u s er   is   ask ed   to   s elec b etwe en   th f iv letter s   o f   th s elec ted   g r o u p .   Usi n g   th is   s ch em e,   to tal  am o u n o f   2 5   letter s   ca n   b e   s elec ted ,   with   m in im u m   tim o f   3   s ec o n d s   p er   s elec tio n   ( 1 , 5   s ec o n d   p e r   co m m a n d ) .   T h “Y”   letter   was   o m itted   d u e   to   its   lo ap p ea r an ce   in   th e   Sp an is h   lan g u ag e .   T h GUI   also   p r o v id es  th u s er   with   p r o g r ess   b ar s ,   r elate d   to   th th r ee   s u cc ess iv s elec tio n s ,   an d   th p o s s ib ilit y   o f   o b s er v i n g   th r aw  an d   p r o ce s s ed   s ig n al  g r ap h ics.           Fig u r 5 .   HPS m o d u le  d etail       3.   RE SU L T S AN D I SCU SS I O N   3 . 1 .   Usa g o f   F P G re s o urce s   T h d esig n   was  im p lem e n ted   in   th d e 1 0 - n a n o   b o ar d .   T ab le   1   s u m m ar izes  th r eso u r ce s   u tili ze d   to   f it  it  o n   th b o ar d .   T h is   s u m m ar y   s h o ws  th at  th d esig n   wo u ld   ev en   f it  in   s m aller   FP GA  d ev ices,  an d   th at  th er ar p len t y   o f   r eso u r ce s   lef to   im p lem en f u r th er   s i g n al  p r o c ess in g   elem en ts .   Ad d itio n ally   Fig u r 6   s h o w s   th f lo o r p lan   o f   th p r o p o s ed   s y s tem ,   o b tain ed   f r o m   th ch ip   p lan n e r   p e r s p ec tiv o n   t h s o f twar e   p r o v id e d   b y   Alter a,   f o r   th C y clo n 5 C SEBA6 U2 3 I 7   s y s tem .   T h is   Fig u r illu s tr ates  t h ar ea   co v er e d   b y   th o r ch estra ted   cir c u it,  wh ich   is   th r eg io n   c o v er e d   b y   s q u ar s h ap es b lu er   th a n   th o t h er s .       T ab le  1 .   R eso u r ce   u tili za tio n     U sed   A v a i l a b l e   P e r c e n t a g e   A LM S   6 1 5 7   4 1 9 1 0   1 5 %   M e m o r y   b l o c k s (BI TS)   1 4 3 3 3 6 6   5 6 6 2 7 2 0   2 5 %   M 1 0 K   b l o c k s   2 1 4   5 5 3   3 8 %   D S P   b l o c k s   15   1 1 2   1 3 %   R e g i s t e r s   1 0 6 6 5   8 3 8 2 0   1 2 %     Evaluation Warning : The document was created with Spire.PDF for Python.
                      I SS N :   20 89 - 4 8 6 4   I n t J Reco n f ig u r a b le  &   E m b ed d ed   Sy s t ,   Vo l.  10 ,   No .   3 No v em b er   2 0 2 1 :   237     2 4 8   244       Fig u r 6 .   Flo o r p lan   o f   th p r o p o s ed   s y s tem       3 . 2 .   Reg is t er   t ra ns f er   lev el  dia g r a m   o f   t he  s y s t em   Fig u r 7   s h o ws  th r e g is ter   tr an s f er   lev el  ( R T L )   d iag r a m   o f   th p r o p o s ed   s y s tem .   T h b lo c k   in d icate d   as  “so c_ s y s tem A DC ”  is   g en er ated   b y   th s y s tem   in teg r atio n   to o l   ( k n o w n   as  QSYS)  o f   th e   s o f twar p r o v id e d   b y   I n tel  Alter a,   an d   in clu d es  th ADC  in t er f ac e,   th FF T   co r an d   in ter co n n ec tio n s ,   FIFO   m em o r ies,  th Nio s   2   p r o ce s s o r ,   t h n ec ess ar y   m em o r y   f o r   its   o p er atio n   an d   th HPS  in ter f ac e,   as  well  as   s o m in ter co n n ec tio n   b l o ck s   g en er ated   b y   th to o l.  T h d etail  o f   th is   b lo ck   is   s h o wn   in   Fig u r 8 .           Fig u r 7 .   R T L   d ia g r a m   Evaluation Warning : The document was created with Spire.PDF for Python.
I n t J Reco n f ig u r a b le  &   E m b ed d ed   Sy s t   I SS N:  2089 - 4 8 6 4       SoC - F P GA   s ystems   fo r   th a cq u is itio n   a n d   p r o ce s s in g   o f e le ctro en ce p h a lo g r a p h ic   … ( Ma t ía s   Ja vier O liva )   245       Fig u r 8 .   Deta il o f   th “so c_ s y s tem : A DC ”  m o d u le       3 . 3 .   E s t im a t io n o f   t he  s y s t em’ s   la t ency   Af ter   ea ch   0 . 5   s ec o n d s   tim e - win d o w,   th ca lcu latio n   o f   th e   FF T   i s   co n d u cted   an d   th in f o r m atio n   is   tr an s f er r ed   to   th e   HPS  m o d u l e.   T h is   r esu lts   in   a   laten cy   b et wee n   th f illi n g   o f   th e   m em o r ies  an d   th e   m o m e n wh en   th e   in f o r m atio n   is   av aila b le  to   th u s er .   T h is   laten cy   is   m ad e   u p   o f   th e   tim e   th NI O 2   p r o ce s s o r   tak es   to   tr an s f er   th e   s am p les  f r o m   t h in ter m e d iate  FIFO  m em o r i es  ( FIFO  1   a n d   FIFO  2   in   Fi g u r 4 ) ,   th e   tim it  tak es  th s am p les  to   f lo th r o u g h   th FF T ,   th tim th at  tak es  th L ig h tweig h HPS  t o   FP GA  b r id g to   co n d u ct  t h tr an s ac tio n s   b etw ee n   th m o d u les,  an d   th tim e   it  tak es  th d ec is io n   alg o r ith m   to   d ec id e   b etwe en   th d if f er e n t sti m u li.   T h NI OS 2   p r o ce s s o r   is   d r iv en   b y   th s am 5 0   MH clo ck   t h an   th wh o le  s y s tem ,   b u th clo ck   th at  d r iv es  th h ar d war ab s tr ac tio n   lay er   ( HAL )   f r o m   wh ich   t h in s tr u ctio n s   ar co n d u cted   is   lo wer   [ 2 9 ] .   T h is   clo ck   was  esti m ated   in   1 1   MH z,   u s in g   an   o s cillo s co p an d   s im p le  s o f twar r o u tin e.   T h FF T   m o d u le   o u tp u ts   o n p r o ce s s ed   s am p le  p er   clo ck   af ter   d ela y   o f   1 1 0 5   clo ck s ,   an d   it  is   d r iv en   b y   5 0   MH clo ck .   T h e   d ec is io n   alg o r ith m   tim was  m ea s u r ed   u s in g   th C #   Diag n o s tics   lib r ar y ,   r esu ltin g   in   1 4   µs.  T h tr an s ac tio n s   b etwe en   th HPS  an d   th e   FP GA  in   C y clo n d e v ices  h as  b ee n   th s u b ject  o f   t h s tu d y   [ 3 0 ] .   Alo n g s id with   th is   p ap er   an   E x ce T ab le  is   p r o v id e d   th at  allo ws  th u s er s   to   s ea r ch   th m ea s u r ed   t r an s f er   r ate  f o r   s ev e r al  m o d es  o f   o p er atio n .   Fo r   tr a n s f er r in g   4 0 9 6   B y tes  ( 5 1 2 ,   3 2   b its   r aw  an d   p r o ce s s ed   s am p les)  u s in g   th L ig h tweig h HPS - to - FP GA  b u s ,   th An g s tr o m   L in u x   o p er a tin g   s y s tem   an d   5 0   MH cl o ck   f o r   th e   FP GA  a   2 0 , 0 8   MB/s   tr an s f er   r ate  is   r ep o r ted .   So ,   t h esti m ated   laten c y   ( L )   is   g iv e n   b y   ( 1 ) ,   ( 2 )   an d   ( 3 ) :     L = Ti m e n i o s + Ti m e F F T + Ti m e L W b u s + Ti m e d ecis i o n   ( 1 )     L = 2 512 1 11   MHz + ( 1105 + 512 ) 1 5 0 MHZ + 2 2048 20 . 0 8 MB / s + 14µs   ( 2 )     L = 93µs + 32µs + 204µs + 14µs = 343µs   ( 3 )     T h is   ca lcu latio n   is   an   esti m ate  b u g iv es  an   id ea   o f   th e x p ec ted   laten cy   o f   th s y s tem .   As  it  ca n   b ap p r ec iated   t h co m p o n en ts   t h at  m o s tly   co n tr ib u te   with   th is   tim d elay   ar e   th e   NI OS  2   p r o ce s s o r   a n d   th L ig h tweig h b u s .   T h f ir s o n e   ca n   b d is p en s ed   with   in   f u tu r im p lem en tatio n s ,   wh ile  th s ec o n d   o n ca n   b e   r ep lace d   with   th e   HPS - to - FP GA  b u s   wh ich   s u p p o r 1 2 8 - b it   tr an s ac tio n s ,   ac h iev in g   3 5   MB/s   tr an s f er   r ate  in   th ese  s am co n d itio n s   [ 3 0 ] .   h ig h er   f r eq u e n cy   in   th FP GA  m ay   also   b u s ed .   W ith o u an y   ch an g es  in   th e   d esig n   q u ick   ev al u atio n   wit h   th tim in g   an aly ze r   p r o v id e d   b y   I n tel  Alter s h o ws  th at  a   7 2   MH clo c k   ca n   b ac h ie v ed .   T h is   m a x im u m   f r eq u en c y   is   c o m p u te d   as   th m ax im u m   p o s s ib le  at   wh ich   t h tr an s f er s   b etwe en   r eg is ter s   ar co n d u cted   i n   s in g le  clo ck   cy cle.   I t m ay   b f u r th er   in cr ea s ed   tak in g   s p ec ial  c ar at  s o m r eg is ter   p ath s ,   an d   ev alu atin g   in   wh ic h   p ath s   th is   co n d itio n   m a y   b e   r elax ed .   W ith   th at  b ei n g   s aid ,   t h au th o r s   co n s id er   th at  laten cy   o n   th o r d er   o f   th h u n d r ed s   o f   m icr o s ec o n d s   ( 3 4 3   µs  in   o u r   ca lcu latio n )   is   ac ce p tab le,   as  it  is   alm o s t in d is tin g u is h ab le  f o r   th u s er .     3 . 4 .   Sp eller   t est   I n   o r d er   to   v er if y   th e   s y s tem s   o v er all  p er f o r m a n ce ,   s im p le  h ig h - lev el   ex p er i m en was  co n d u cte d .   T wo   u s er s ,   o n with   n o   p r ev i o u s   ex p er ien ce   i n   h an d lin g   B C I s   ( u s er   A)   an d   o n ex p er ie n ce d   ( u s er   B ) ,   wer e   ask ed   to   s elec t le tter s   r an d o m ly .   I n   th b est ca s es th co m m an d   s elec tio n   tim f o r   u s er   was a b o u t 5   s ec o n d s   Evaluation Warning : The document was created with Spire.PDF for Python.
                      I SS N :   20 89 - 4 8 6 4   I n t J Reco n f ig u r a b le  &   E m b ed d ed   Sy s t ,   Vo l.  10 ,   No .   3 No v em b er   2 0 2 1 :   237     2 4 8   246   b u t,  in   s o m ca s es,  it  to o k   h i m   m o r th an   1 0 0   s ec o n d s   to   s elec co m m an d .   On   th o th e r   h an d ,   u s er   B   was   ab le  to   ex ec u te  a   co m m a n d   ty p ically   b etwe en   5   a n d   1 0   s ec o n d s .     T h ese  r esu lts ,   th at  a r s h o wn   f o r   d e m o n s tr ativ e   p u r p o s es,  ar co m p ar ab le   with   th o s p r esen ted   in   [ 1 4 ] ,   wh er e   th e   ty p ical   u s er   s e lectio n   tim was  b etwe en   5   a n d   8   s ec o n d s .     As  an   e x am p le,   Fig u r 9   s h o ws  th e   E E r ec o r d   o f   u s er   A,   o b tain ed   in   3   co n s ec u tiv e   tim e - win d o ws,  co r r esp o n d in g   to   a   s u c ce s s f u s elec tio n   o f   th o p tio n   r elate d   to   v is u al  s tim u lu s   o f   1 6   Hz.   T h e   f ir s im ag co r r esp o n d s   to   t h r aw  E E s ig n al,   wh ile  th e   s ec o n d   s h o ws its   FF T   tr an s f o r m   in   ea ch   tim e - win d o w.           ( a)   ( b )       Fig u r 9 .   E E s ig n al  i n   th r ee   co n s ec u tiv tim e - win d o ws :   ( a)   R aw  s ig n al  ( b )   Pro ce s s ed   s ig n al       4.   CO NCLU SI O NS   So C   F PGA  s y s tem s   p r esen v er y   attr ac tiv ch ar ac ter is tics   f o r   th d ev elo p m e n o f   s y s tem s   wh er e   r ea l - tim p r o ce s s in g   is   k e y .   U s in g   th ese  d e v ices,  d ed icate d   l o g ic  in   th e   FP GA  ca n   b e   u s ed   to   s o lv e   task s   th at   d em an d   lo laten cy ,   leav i n g   t h p r o ce s s o r   d ed icate d   to   p er f o r m   h ig h - l ev el  task s ,   s u ch   as  th u s er   in ter f ac e.   T h r o u g h o u th is   ar ticle  it  h as  b ee n   d is cu s s ed   h o a   s y s tem   o f   th ese  ch ar ac te r is tics   ca n   b u s ed   to   d e v elo p   a   p latf o r m   f o r   th e   ac q u is itio n   a n d   p r o ce s s in g   o f   elec tr o en ce p h alo g r ap h ic  s ig n als,  s p ec if y in g   h o th e   task s   ca b d is tr ib u ted   in   o r d er   t o   ac h iev h ig h ly   ef f icien B C I .   Fin ally ,   th e   im p lem en tatio n   o f   an   SS VE P - b ased   B C I   s y s tem ,   d ev elo p e d   en tire ly   o n   d e1 0 - n an o   So C   p r o v id e d   b y   Alter a,   h as  b ee n   s h o wn .   T h e   tim d elay   b etwe en   th u s er s   s elec tio n   an d   th s y s tem   r esp o n s h as  b ee n   esti m ated   in   3 4 3   µs,  an d   f ir s ex p er im en tal  test ,   th at  allo wed   to   v er if y   th o p er atio n   o f   th c o m p lete  s y s tem ,   wa s   ca r r ied   o u t.  d etailed   ch a r ac ter izatio n   o f   th e   s y s tem   p er f o r m an ce   an d   th p r o p o s al  o f   s tr ateg ies  to   im p r o v it  r em ain   to   b co n d u cted .   Alth o u g h   th d esig n   h as  b ee n   o r ie n ted   t o   o b tain   an d   p r o ce s s   SS VE Ps   with   f r eq u en cy   en c o d in g ,   th e   m o d u lar ity   o f   th e   d esig n   allo ws m o s t o f   th d ev el o p ed   t o o ls   to   b r e u s ed   in   th im p le m en tatio n   o f   d if f e r en t ty p es o f   B C I s   in   th f u tu r e.       RE F E R E NC E S   [1 ]   A P a ti l   a n d   A.  A.   S h iro l k a r ,   " re v iew   o n   sy ste m - on - c h i p   (S o C)  d e si g n f o re a l. ti m e   i n d u st rial  a p p l ica ti o n , "   In ter n a t io n a J o u rn a o T re n   in   S c ien ti fi c   Res e a rc h   a n d   De v e lo p me n (IJ T S RD) ,   v o 2 ,   n o .   1 ,   p p . 1 5 3 4 - 1 5 3 7 ,   2 0 1 7 ,   d o i:   1 0 . 3 1 1 4 2 / ij tsrd 7 0 7 7 .   [2 ]   E.   M o n m a ss o n   a n d   M .   N.  Cirstea ,   " F P G d e sig n   m e th o d o l o g y   fo r   in d u strial  c o n tr o sy ste m s re v iew , "   in   IE EE   T ra n sa c ti o n o n   In d u stri a El e c tr o n ics ,   v o l .   5 4 ,   n o .   4 ,   p p .   1 8 2 4 - 1 8 4 2 ,   A u g .   2 0 0 7 ,   d o i 1 0 . 1 1 0 9 /T I E. 2 0 0 7 . 8 9 8 2 8 1 .   [3 ]   J W o lp a w ,   N Bir b a u m e r D J .   M c F a rlan d ,   G .   P f u rtsc h e ll e a n d   T.   M .   Va u g h a n ,   " Bra in - c o m p u te in terfa c e fo r   c o m m u n ica ti o n   a n d   c o n tr o l , "   C li n ica Ne u r o p h y sio lo g y ,   v o l.   1 1 3 ,   n o .   6 ,   p p .   7 6 7 7 9 1 ,   2 0 0 2 ,   d o i:   1 0 . 1 0 1 6 / S 1 3 8 8 - 2 4 5 7 ( 0 2 ) 0 0 0 5 7 - 3 .   [4 ]   X Ch e n ,   Y Wa n g ,   M Na k a n is h i,   X G a o ,   T . - P J u n g ,   a n d   S G a o ,   " Hig h   sp e e d   sp e ll in g   with   a   b ra in c o m p u te r   in terfa c e , "   Pr o c e e d in g s   o t h e   Na ti o n a l   Ac a d e my   o S c ien c e s ,   v o l .   1 1 2 ,   n o .   44 ,   2 0 1 5 ,   d o i :   1 0 . 1 0 7 3 / p n a s. 1 5 0 8 0 8 0 1 1 2 .   [5 ]   A.  Ch a b u d a ,   P .   Du r k a   a n d   J.  Ży g iere wic z ,   " Hig h   fre q u e n c y   S S VE P - BCI  wit h   h a rd wa re   stim u li   c o n tro a n d   p h a se - sy n c h r o n ize d   c o m b   fil ter , "   in   IEE T ra n s a c ti o n o n   Ne u ra S y ste ms   a n d   Reh a b il it a ti o n   E n g in e e rin g ,   v o l.   2 6 ,   n o .   2 ,   p p .   3 4 4 - 3 5 2 ,   F e b .   2 0 1 8 ,   d o i:   1 0 . 1 1 0 9 /T NSRE . 2 0 1 7 . 2 7 3 4 1 6 4 .   Evaluation Warning : The document was created with Spire.PDF for Python.