Int ern at i onal  Journ al of Ele ctrical  an d  Co mput er  En gin eeri ng   (IJ E C E)   Vo l.   9 , No .   3 ,  J un e   201 9 , pp.  174 2 ~ 174 9   IS S N:  20 88 - 8708 ,  DOI: 10 .11 591/ ijece . v 9 i 3 . pp 1742 - 174 9       1742       Journ al h om e page :  http: // ia es core .c om/ journa ls /i ndex. ph p/IJECE   Improve  perform ance of t he digit al sin usoi dal gene rator in  FPGA   by m emor y usage  optimiz ation       Aiman Z ak w an Jidin ,  Irn a Nadi ra M ah z an ,  A .   S ha m s ul R ah im i  A  S ubki ,  Wan H asz eri la   Wan   H as s an   Ce ntre fo r  Tel e com m un ic at ion  Resea rch &  I nnovat ion, Fa kult i Tek no l og i  Keju ru te raa n E le ktrik   &  Ele ktronik ( FT KEE ),   U niv er s it i Tekn ikal M al ay sia  Mel aka , Mal ay sia       Art ic le  In f o     ABSTR A CT   Art ic le  history:   Re cei ved   A ug  12, 201 8   Re vised Dec  20,  2018   Accepte d  Ja n 2 , 2019       Thi s  pap er  pre s ent ed   the  improvem ent   in   the  per form anc e   of   the   d igi t al  sinusoidal   signal  gene rat or ,   whic h  was  implemen te d  in  FP GA ,   by   opti m iz ing   the   usage   o f  the  ava i la bl e  m emory   onbo ard .   The   s ine   wave   was  ge ner ated  b y   using  a  L ookup  Ta bl e  m et hod,   w her e  i ts  pre - c alc ula t ed  val u es  we re  stored  in   the   onboar d  m emory ,   and  it s  fr eque nc y   c an  be   adj ustable  b y   c hangi ng  th e   inc rement al   st ep   val ue   of  th e  m e m ory   addr ess.  In   thi s  proposed  r e sea rch ,   the   m emory   stores  o nl y   25000  sam pl es  of  th e  f irst  qu art er   from   a   per i od  of  a   sin e   wave   and  thus ,   the   outpu t  sig nal   a cc ur acy   w as  inc re ase d  an d  the   outpu t  fre quency   ran g e   was  expanded,  compare d   to  t he  pre v ious  res ea rch .   The  proposed  design   was  succ essfull y   d eve lop ed  and   implemente d  in   ALTE RA  C y c lone   I II  D E0  FP GA  Deve lopment  Board ,   and  it s  func t i onal ity   was  val id at ed  vi a  func ti on al   sim ula ti on  in  Mode lsim   and  al so  har dware   expe riment al re s ult s observation in  SignalTap   II.   Ke yw or d s :   FPGA   Functi on g e ne r at or   Mem or y o pti m iz at ion   Sinu s oi dal     Copyright   ©   201 9   Instit ut e  o f Ad vanc ed   Engi n ee r ing  and  S cienc e .    Al l   rights re serv ed .   Corres pond in g  Aut h or :   Aim an  Zakw a n  Ji din ,     Ce ntre fo r  Tel e com m u nicat ion  Resea rch &  I nnovat ion,   Fakult i Tek no l og i  Ke j ur utera an   Ele ktrik &  Ele ktronik ( FT KEE ),   Un i ver sit i Te knikal   Ma la ysi a Me la ka ,   Hang T ua h  Jay a, 76 100 D ur ia n  T unggal , Me la ka,  Mal ay sia .   Em a il : aim anzak wa n@utem .ed u.m y       1.   INTROD U CTION   Sign al   ge ne rator   or   s om eti m es  cal le d  as  a  fu nctio n  ge ne ra tor,   is  an  e qu i pm ent  wh ic h  is  ver y  wi dely   us e d  in  orde r  t o  gen e rate  the  input  sig nals  f or   te sts  a nd  e xperim ents  in  m any  industria l  app li cat ions,  li ke  in  el ect ro nics  m e asur em ent,  te le com m un ic at ion   syst e m s  and   m achine  co ntr ols,  as  well   as  it s  ver y  popula r  us a ge   inside  the  la bo rator ie s  for  te achin g  an d  le ar ning  pur poses  [1 ] .  A  si gnal   g ener at or   is  ty pical ly   a  dev ic e  wh ic h  is  capab le   of  c on st ru ct in g  a nd  delive rin g  re petit ive  sign al s ,  w hich  ty pe  c an  be  sel ect ed  for  dif fer e nt  opti ons   avail able  su c h  as  the  sine  w ave,  the  squar e  wav e ,  an d  t he  tria ng ular  wav e .  Be sides ,   it   is  al so   cap able  to  pr oduce  sig nal s  with  a  sp eci fic  fr eq ue ncy  and   am plit ud e  values  accu ra te ly   [2 ] .  This  will   al low  us ers  to   rep li cat e the i nput  sig nal tar ge te d  f or the  ci r cuits u nder test s.   A  f un ct io n  ge ner at or   ca n  be   i m ple m ented  on   pro gr am m a ble  de vices  suc h  as  a  m ic ro c on t ro ll e r  [ 3].  Fo r  e xam ple,  by  us in g  a  hig h - le vel  progr a m m ing   la ngua ge  li ke  C  la ngua ge,   desig ner s  ca n  dep l oy  th e   pr e def i ned   si n  ()   f unct ion   i n  orde r  to  ge ne rate  the  sine  wa ve .  Des pite  it s  design   sim plici t y,  the  execu ti on  tim e   of   m ic ro co ntroll ers  are  ge neral ly   qu it e  slow  and   m ay   deg r ade  the  pe rfo r m ance.  As  the  m at te r  of   fact,  al l  the   instru ct io n  set s  of  the  m ic ro co ntr ollers  a r e  exec uted  se qu e ntial ly   and  in  m os t  of   t he  cases ,  onl y  on e  instru ct io n  ca n  be  e xecu te d  at   a  tim e.  Hen ce,   this  wea kness  can  be  ove rcom e  by  us in g  a  Fiel d  Pro gr am m able  Gate  A rr ay   (FPG A) .   It  is   an  ad eq uate  s olu ti on  f or  hi gh - perform ance  com pu ta ti ons  a nd  i t  is  widely  u se d  m any  high - s pee d  a ppli cat ion s,  owing  t o  it s  low  c os t,  it s  abili ty   to  i m ple m ent  pip el ine d  a nd   par al le l  com puta ti on s,  and it s capa bili ty  to  opera te  at  h ig h - f reque nc y cl ock s  [4],  [5].   Evaluation Warning : The document was created with Spire.PDF for Python.
In t J  Elec  &  C om p  En g     IS S N:  20 88 - 8708       Impr ove  performa nce  of the  d i gital sin usoid al  g ene ra t or  in   FPGA …   ( Aim an Z akw an Jidi n )   1743   In   fact,  the re  a re  di ff e ren t  wa ys  of   de velo pin g  a nd  im ple m enting  the  si gnal   gen e rato r  in  FPGA.  O ne   of   the  popula r   m et ho ds   is  to   gen e rate  sig na ls  by  us in g  the  Direct  Digi ta l  Synthesize r   (DDS),  a  te chn i qu e   whi c h  is  a ble  to  pr oduce  outp ut  sig nals  with   high - fr e quency   range  a nd  acc ur at e  fr e qu e nc y  adjustm ent.  In   this   te chn iq ue,   t he  analo g  outp ut  sign al   is  pr oduc ed  by  gen e rat ing   the  ti m e - var yi ng   si gn al   i n  a  di gital   for m ,  then  conve rted  int o  the  anal og   sig na l  via  dig it al - to - a nalo g  c onve rsion.  Its  pri nc iple  is  to  va ry   the  f reque ncy  of   t he  cl ock ,   w hich   i s  us e d  t o  read  the  pr e - cal cul at ed  wa ve for m   a m p li tud e  dat a  di gital ly   store d  in   a  m e m or y.   The n,  t he data   wh ic h hav e  b e en read  is co nv erted t o becom e the a nalo g  si gn al   [ 6] - [ 8].   Me anwhil e,  re search   in   [ 9]  pro po se d  a   m et hod  wh ic h  i s  al m os t  si m i l ar  to   the   D D S  te ch nique.   Howe ver,  the  f reque ncy  of   th e  op e rati ng   cl oc k  is  fixe d  an d  the  gen e rated  sign al   f reque nc y  is  tun able  sim pl y  by adj us ti ng th e increm ental  step v al ue of  th e ad dr e s s c ount er in  t he pr opose d  si gn al   ge ne rator.   Be sides,  resea rch  in  [ 10 ]   ha d  im ple m ente d  the   wav e for m   gen erato r  i n  Xili nx  Virte x  II  FP GA,   by  us i ng  the   e m bed ded   m ic ro pr ocess or .   I n  this  resea rch,  a  soft  pr ocess or  cal le d  Mi cr oB la ze ,  w hich  c on t ro l   the  syst e m   operati on,  is  inte rf ace d  to  per i pherals  s uc h  as   m e m or ie s  an d  D AC.  Howe ver,  to  ac hieve   high - band width   si gnal   ge ner at or ,  it   is  req uire d  to  us e  high - en d  FP G A  su c h  as  Virtex  FP GA   w hich  c ost   ver y   exp e ns i ve.   This  pa pe r  pre sents  the  im p ro vem ent  of   t he   perform ance  of   t he  di gital   sinu s oid al   ge ne rator   w hich   was  de velo ped  an d  im ple m ented  in  FP GA.  The  im pr ovem ent  wa s  a ble  to   be  m ade  by  optim iz at ion   the   us a ge   of   the  a vaila ble  m e m or y  reso ur ces  on - bo a rd.  In   this  pr opose d  resea rch,  the  sine  wa ve  is  gen e rated  by   us i ng   the  lookup  ta ble  m et ho d,  wh e re  the  pre - cal culat ed  sig nal  data  are  s tore d  in  a  m e m or y  and   the  sign al   fr e qu e ncy  is  a dju sta ble  by  m od i fyi ng   t he  va lue  of  the  a dd ress  c ounter  i nc rem ental   ste ps .  The   sine  wa ve  ca n   be  c onfig ur a bl e  within  a  ra ng e  of  1  kHz  to   10  MHz ,  with  the  f re qu e ncy  r esolutio n  of   1  kH z .  I n  t his  pa per,  no   dig it al - to - anal og   c onve rsion  is  inv ol ved   a nd  thu s ,  the  pro po s ed  res earc h  pr od uce d  the  dig it al   sine  wa ve  with   accurate  fr e que ncy.       2.   SIN E  WA VE  GENER ATIO N MET HO D   2.1.   Loo k up t ab le   The  lo okup  ta ble  co ntains  th e  data  wh ic h  r epr ese nt  the  sa m ples  of   the  sine  wa vefor m ,  wh ic h  wa s   pre - cal culat ed  offli ne  by  us i ng  a  data  pr oce ssing  to ol  li ke  the  Mi cro s oft   Excel.   In  the  previ ou s   resea rc h  [ 9],  the  lo okup  ta bl e  was  util iz ed  to  sto red  20 000  16 - b it   data,   w hich  represe nts  the  1  kHz  sine  wa ve form   data   sam pled  at   ever y  50  ns.  T hus,  al l  the  20 000  sam pling   wi ll   m ake  a  com plete   cy cl e  with  a  per io d  of   1  Ms .  Howe ver,  in  this  pr op os ed  res earch ,  the  look up   ta ble  co ntains  2500 0  data  wh ic h  was  sa m pled  fr om   on ly   the  first  quarte r  of  a  com plete   cy cl e  of   a  sin e  wav e .  As  t he  m atter  of   fact,  this  is  doable  ow i ng   t o  the   char act e risti c of a si ne wave   wh ic h  is sy m m et ric.   By   loo king  at   t he  wa ve  in  Fig ur e   1,  the  re gion  2  of  the  wa ve   is  sy m m e tric   to  the  reg io n  1,   w hile  t he  reg i on   3  a nd   r egio n  4  are  sym m e tric   to  the   reg io n  1  an d  reg i on   2  with  resp ect   to  the  x - a xis,  res pect ively .   Ther e f or e,   the  reg i on  2  of  the   wa vefor m   can   be  obta ined   si m pl y  by  co un t ing   dow n,  inst ead  of   c ou ntin g  up,  the  m e m or y  a ddress  c ounter ,  from   the  m a xi m u m   to  the  m ini m u m   add r ess  of   t he  lo okup  ta ble.  Wh il e  the  wav e f or m   in  r egio n  3  an d  re gion  4  are  sim ply  the  neg at ion   of   the  val ue s  ob ta ine d  from   the  reg io n  1  an d  reg i on 2, r e sp e ct ively .           Fig ure   1 .  The  four  reg i ons  of   a sine  wa ve       Ow i ng   to  this,  the  m e m or y  reso urces  util iz at ion   can  be  opti m iz ed  and   in  this  case,  since  a  qu a rter  of   the  sine  wa ve f or m   is  rep rese nted  by  2500 0  data,  there  a r e  in  fact  a  total   of   10 0000  data  sam ples  fo r  the  com plete   cy cl e   of   t he  sine  wa ve.   In   a ddit ion ,   ever y  pr e - cal culat ed  data   sto red   i n  this  lo ok up   ta ble  are  wri tt en  on ly   in  13  bits.   Ther e f or e ,  in  t he  case  wh e re  it s  a m plit ud e  is  ad j us ta ble  by   +/ - 10,  a  16 - bit  ou t pu t  si gn al   sh al l  be  e nough t o  e ncode t he  m axim u m  o r  the m i nim u m  v al ue  of the  g e ner at e d si gnal .   Evaluation Warning : The document was created with Spire.PDF for Python.
            IS S N :   2088 - 8708   In t J  Elec  &  C om p  En g,   V ol.  9 , N o.   3 ,  June   201 9   :   174 2   -   174 9   1744   2.2.   Mem ory ini tia liz at ion  in   FP GA   In   order   to  use   the  onboar d  m e m or y  in  th e  FPGA  boar d,  a  m e m or y   in it ia li za ti on   file   is  need ed .   This  file   c onta ins  the  necess ary  inf orm ation   s uch  as  t he  m e m or y  dep t h,  the  siz e  of  e ach  data,  a nd  al so   the   data  to  be  sto red   in  the  m e m or y  wh ic h  can  be  w ritt en  ei ther  in  bin a r y  or   hex a deci m al   fo rm a t.   Fo r  this   researc h  pu rpo se,  the  ty pe  of  m e m or y  us ed  i s  the  Re ad - O nly  Mem or y  (ROM)  becau se  al l  the  data  stored   i n  the m e m or y are pre - cal c ulate d  a nd their  v al ues  s hall rem ain   un c ha ng e d w hen the  syst e m  is operate d.       2.3.   Mem ory addr ess counte r   All  the  data  sto red   i n  the   lo okup  ta ble  ca n  be   acce ssed   by  usi ng   t heir  a ddr esses   as  s how n  in  Ta ble  1 .  In   this  pr opos e d  syst e m ,  a  m e m or y  add ress  c ounter  is  us e d  to  increase  t he  address  value  a t  ever y  cl ock   c yc le .  The  co unte r  be ha vi or   dep e nds  o n  the  reg i on   of  the si ne  wa ve form , as  sh own  in Fig ure   1.   I t wil l cou nt up un ti l  it   reaches  or   al m os t  reaches  the  m axi m u m   a ddress  i n  re gion  1  an d  reg i on  3,   w hile  it   will   count  do wn   unti l  it   reaches  or alm os t reac hes  the  m ini m u m  ad dress in  re gi on  3 and re gion  4.       Table  1.   T he   L ookup Ta ble fo r  Si ne Wave  Generati on   Ad d ress   Data   0   0   1   2   2   4   …   …   1 2 4 9 9   3275   1 2 5 0 0   3276   1 2 5 0 1   3275   …   …   2 4 9 9 7   6   2 4 9 9 8   4   2 4 9 9 9   2       Her e ,  the   ch oi ce  of  the   cl oc k  fr e quen cy   is  s ub sta ntial   in  order  to  pro duce   accu rate  sig na l  fr e quency   at   the  ou t pu t.   As  pr e viously   m entioned,  t he   base   sig nal  f r equ e ncy  for  t he   pro posed   sys tem   is  F base = 1  kH z .  Hen ce , th e  b a s e p e rio d  T base = 1  m s.   The refore , in   orde r  to  det erm ine the sa m pl ing  clo ck  perio d:         wh e re  n   is  the   nu m ber   of   sa m ples.  Hen ce,   wh e n  n   is  eq ual  to  10 0000  sam ples,  the  sa m pling   cl oc k  per i od  sh al l  be   eq ual  to  10  ns.  S ubs equ e ntly ,  a  10 0  MH z  sam pli ng  cl oc k  m us t  be  us e d.   In  thi s  cas e,  at   eve r y  10  ns,   the  ad dr e ss  c ounte r  val ue  will   be  cha ng e d  by  an  i ncr em ental   ste p  value ,  w hich  is  e qu al   to  the  f re quency  of  the  sine  wa ve  to  be  ge ne rated  in  kHz.  F or  exam ple,  in  order   to  pro du ce   a  500  kHz  sine  wa ve,   the  a ddre s s   counter  m us t be incr ease d  or  decr ease d by  500 at  ev e ry sa m pl ing  clo ck  c yc le .       3.   PROP OSE D SYSTE M AR CHI TE CT U R E   Figure   2   il lustr at es  the  blo ck  diag ram   of   the   pr op os e d  syst e m   fo r  gen e rat ing   sine  wa ve  dig it al ly   i n   FPGA.  I n  fact ,   it   con sist s  thr ee  m ai n  blo ck s:  ph ase - loc k  loop  ( PLL) ,  ad dr e ss  c ounte r  and   si ne  wa ve   ta ble.     In   t his  project ,  the  PLL   bl ock  serv e s  as  t he  cl ock  f reque ncy  m ul ti plier.  As  t he  m at te r  of   fa ct ,  the  fr e qu e nc y  of   the  cl ock   os ci l la tor  w hich  is  avail able  on  th e  FPGA  bo a rd  us ed  is  50MH z.  The refor e ,  in  orde r  to  pro du ce  a   100  MHz  cl oc k  sig nal  as  the  sa m pling   cl oc k  (clk _100MH z),  the  f re qu e nc y  of   the  50  MHz  cl ock   (s ys_cl k)   needs to  b e  m ulti plied b y  2 by us i ng the  PLL  b loc k.   The  sam pling   cl ock   f ro m   the  PLL  is  con ne ct ed  to  bo t h  th e  address  co unte r  and   the  sin e  wav e  ta ble .   The  f orm e r  wil l i ncr ease o r de crease the a ddr ess b y t he  ste p value it  r ecei ve s f r om  the ex te rn al . Ne xt,  the  ne w   value o f  the  address  is  passe d t o  the lat te r  i n order  to  acc ess  the si ne wave   data w hich  h a d bee n  st or e d  in side.       Evaluation Warning : The document was created with Spire.PDF for Python.
In t J  Elec  &  C om p  En g     IS S N:  20 88 - 8708       Impr ove  performa nce  of the  d i gital sin usoid al  g ene ra t or  in   FPGA …   ( Aim an Z akw an Jidi n )   1745       Figure  2.   The   blo c k diag ram   wh ic h rep rese nt s the  propose d sy stem  arch it ect ur e       The  a ddress  c ounte r  operati on  is  co ntr olled   by  two  finite   sta te   m achines.  The  first  sta te   m achine  is  essenti al   to  ge ner at e  t he  c orr ect   m e m or y  address  a nd  al s o  the   outp ut  si gn al   value   si gn,  de pendin g  on  the  reg i on  of  t he  wav e f or m .  Fig ur e   3   de picts  t he  sta te   diag ra m   of   the  sta te   m achine,  w hich  is  c onsist ed  of  f our   sta te s,  w hich r epr ese nt the  fo ur r e gions:  ONE, T WO, T HR EE and  FOUR.     In   sta te   O NE,   the  ad dress  sta rts  f ro m   0  a nd  it   will   be  inc r eased  by  ste p  value  at   eac h  cl ock   cy cl e .   On ce  the  s um  of   it s  current   address  an d  the  ste p  val ue  is  la rg er  tha n  or   e qu al   to  th e  m axi m u m   me m ory   address ,  w hich   is  24999,  the  sta te   m achine  is  transiti ng  to  sta te   T W O .  At   this  sta te ,  the  counter  will   de creas e   t he  ad dress  by  the  ste p  val ue,   the  s ub tract i on  of  the   cu rr e nt  address  an d  t he   ste p  value   is  le sser  or   e qual   to  0,  wh e re  the  sta te   m achine  is  tra ns it ing   t o  sta te   THREE.   The   sam e  pr oducers  ta ke  place  for  the  tra ns it io n  from   sta te   THREE   to  F O UR  a nd  f r om   sta te   FO U R  to  ONE.   I n  a dd it io n,  duri ng  sta te s  T HREE   an d  FOUR,   th e  dat a   read f ro m  the  m e m or y wil l b e m ult ipli ed  by   - 1  in  ord e r  t o hav e  the  ne gative  value o f  the  g e ner at e d  sin e  w a ve.           Figure  3.  The  fi nite st at e  m ac hin e t o determ i ne  the  cou nter beha vior  base d  on the  r e gion       Wh il e the  seco nd stat e m achi ne,  as   sho wn in F i gure  4 , is  use d  to  en s ure that  the syste m   will  g ene rat e   correct   an d  acc ur at e  sig nal  ou tpu t  w he nev e r  the  ste p  value  is  updated .  Thi s  sta te   m achine  has  th ree  di fferent   sta te s:  COUNT,  UPD ATE  a nd   RE SET.  In  COU NT  sta te ,  the  ad dr es s  counter  is  in  i ts  norm al  op er at ion,   wh e re  it   increa ses  or   de crease d  the  ad dr es s  by  the  giv e n  ste p  value .  The n,  wh e n  the  ste p  value  is  cha ng i ng,   the  sta te   m achine  will   up date  the  ne w  c ount  ste p  val ue  in  UPDAT E  sta te ,  an d  it   will   re set   back   t he  a ddress   value  t o  0  in  t he   RESET  sta te .  It  will   sta y  in  this  sta te   f or   50  ns   befor e   tra ns it ing   t o  th e  COU NT  sta te ,  wh e re   the add ress  c ounte r  re su m es it s nor m al  o perat ion   with t he newly   updated   count ste p valu e.       Evaluation Warning : The document was created with Spire.PDF for Python.
            IS S N :   2088 - 8708   In t J  Elec  &  C om p  En g,   V ol.  9 , N o.   3 ,  June   201 9   :   174 2   -   174 9   1746       Fig ure  4.  The  fi nite  sta te   m ac hin e  w hich  c on trols the   ad dres s cou nter op e ra ti on   wh e n   the step  v al ue  i s updat ed       4.   RESU LT S  AND DI SCUS S ION   The  pro posed  desig n  was  s uc cessf ully   devel op e d  by  us in g  Ver il og  H D L  cod e .  In   or de r  to  validat e  the  co rr ect ne ss   of   th e  pro pose d  syst em   fu nctionalit ie s,  both   functi onal   si m ulati on   a nd   ha r dw a re  e xp e rim ental   te sts  are  perfor m ed.   I n  both  c ases,  validat io n  was  e xec uted  on  f our  dif fe ren t  set s   of  des ired  fr e quency  values:   125 k Hz,   667  kH z , 200 0 kH z , and 7 500 k Hz .     4.1.   Functi onal si mulati on   In   this  r e searc h,   the  sim ulatio n  was  exec ut ed  by  us i ng   M ento r  Grap hic  Mod el Sim   Alt era  Editi on   so ft war e . Bef ore r unni ng the  si m ulati on , th e  test ben c h for t he  te sts  was wr it te n  in V e rilo g.   Fig ur e  5   s hows  th e   resu lt s  of  the  f un ct io nal  sim u la ti on   with  fiv e  diff e ren t  f r e qu e ncy  val ues.  Fr om   these  wav ef or m s,  the  ou t put   sign al   f re qu e nc ie s  can  be  obta ined   by  m e asur i ng   t he  pe rio d  of  eac h  s ign al   usi ng  tw o  di ff e ren t  c urso rs.   The  m easur ed  fr e qu e ncies  ar e  then  c om par ed  to  the  desir ed  f reque ncies,   as  li ste d  in  Table  2 .  Ba se d  on   t his   ob s er vation,  th e  fr eq ue ncy  of   the  gen e rated  s ine  wav e  was  ver y  accu rate  f or   the  fi rst  thre e  sign al s.  H ow ever,  it  p r oduce d  a s m al l erro r  of  1kHz   ( 0.2% )   when gene rati ng t he 750 0 kH z  si ne wave .           (a)   (b)           (c)   (d)     Fig ure  5.  The   wav e f or m  r esu lt s f or fu nctiona l sim ulati on  by  u sin g dif fer e nt freq ue ncy va lues:    (a)   125 k Hz, ( b)  667 kHz,  (c)  2  MHz , (d ) 7. 5 M Hz       Table  2.   C om par iso n betwee n  Desire d Fre qu ency v s Meas ured  Fr e quency   Desired F requ en cy   Measu red Pe riod   Measu red F requ en cy   1 2 5  kHz   8 0 0 0 .0 n s   1 2 5 .0 k Hz   6 6 7  kHz   1 4 9 9 .5 n s   6 6 6 .9 k Hz   2 0 0 0  kHz   5 0 0 .0 n s   2 0 0 0 .0 k Hz   7 5 0 0  kHz   1 3 3 .3 n s   7 5 0 1  kHz   Evaluation Warning : The document was created with Spire.PDF for Python.
In t J  Elec  &  C om p  En g     IS S N:  20 88 - 8708       Impr ove  performa nce  of the  d i gital sin usoid al  g ene ra t or  in   FPGA …   ( Aim an Z akw an Jidi n )   1747   4.2.   Ha rdw are e xper im enta l  tes t   The  de velo ped  Ve rilog  co de   f or  the prop os e d  desig n  was   s uccess fu ll y  co m pi le d  by A lt era Q ua rtus I I   so ft war e   an d  then   im ple m ent ed  i n  Alte ra  C yc lon e  III  DE 0  FP GA  dev el opm ent  bo a rd.  I n  a ddit ion ,   sin ce  there   is  no   dig it al - to - a nalo g  c onve rter  in volve d  in  this  re sear ch,   t he  ge ne ra te d  outp ut  sig nal  was  obser ved  an d  analy zed  by us ing  t he  Si gn al Tap II  Logic  A naly zer.   T he  hard war e  expe rim ental  setup   a s sho wn in Fi gure  6.   The  ou t pu t  res ults  of  the  hardw a re  e xp e rim ental   te sts  in  F PGA  are  sho w n  in  Fig ur e  7 .  By   us ing  the   sam e  m et ho d  us e d  in  t he  si m ula ti on ,  th e  per i od  of  the   ge ner at e d  ou t put  sine  wa ves   a re  m easur ed   a nd  th us ,   the  ge ner at e d  sign al   f re qu e nc ie s  can  be   ob ta ined  a nd   t he n  com par e d  w it h  their  ex pec te d  val ues.   It  can  be   ob s er ved  that  the  res ults  obt ai ned   from   the  ha r dware  e xperim ental   te s t  are  the  sam e  as  the  funct ion al   si m ulati on , as   pr e viously  s hown in T able  2 .           Fig ure  6.  The   hard war e e xpe rim ental  setup         (a)       (b)       (c)       (d)     Fig ure  7.  The   wav e f or m  r esu lt s f r om  the F P GA h a rdwa re t est  observe d  in   Sig nalTap  L ogic  Analy zer  by   us in g dif fer e nt  fr e qu e ncy  valu es:  ( a)  12 5 kH z , (b) 66 7 kH z , (c)  2  M Hz, ( d)  7.5 MHz   Evaluation Warning : The document was created with Spire.PDF for Python.
            IS S N :   2088 - 8708   In t J  Elec  &  C om p  En g,   V ol.  9 , N o.   3 ,  June   201 9   :   174 2   -   174 9   1748   As  the  m at te r  of   fact,  the  sm al l  pr eci sion   e r rors  f or   high - f r equ e ncy  ge ne r at ed  sig nal  obs erv e d  in  th e  hard war e  e xp e rim ental   te sts  are  due  to  t he   lim it at ion   of   the  util iz ed  to ols:  since  the  gen e rated  si gn al   is  a  discrete  si gn al   wh ic h  ha d  bee n  sam pled  e very   10  ns ,  t he  ti m e  un it   reso l ution   is   li m it ed  only   to  10  ns .   H ence,   for  the  7.5 M H z sine  wa ve,  t he  tim e interval  for  a  pe rio d of   the sig nal is s how n   as  13 0 ns, i ns te ad  of  133 ns.   Table  3   sho ws   the  nu m ber   of  the  hard war e   resour ces  us e d  in  the  pro posed  resea rch,  wh ic h  was   ob ta ine d from  the g e ne rated c om pilat ion  r ep or t i n Alt era Quar t us   II   softw are.       Table  3.   FP GA  Ha rdwar e  Res ources  Util iz at i on for Pr op os e d  Syst em  I m ple m entat ion   Desig n   Hardwar e Reso u rc e Usage   Log ic E le m en ts   Reg ister   On b o ard Me m o r y   PLL  Blo ck   Prop o sed  des ig n  w ith o u t Sign alTap   190   (1.2 %)   23   (0.1  %)   3 2 5 0 0 0   (63 .0% )   1   (25 .0% )   Prop o sed  des ig n  w ith  Sign alTap   1008   (7.0 %)   739   (4.8 .0% )   4 3 5 5 9 2   (84 .4% )   1   (25 .0% )       Wh il e  T able 4   com par es  the   overall  p er form ance o f   the   pr opose d  syst em   with the p re vious work [ 9] .   As  ca n  be   see n  f ro m   this  ta ble,  the  f or m e r  co nsum e  le s ser  lo gic  el em ents  tha n  the  l at te r,   but  it s  m e m or y  util iz at ion   is  a  li ttle  bit  hig he r   (b y  1%   m or e)   than  the  la tt er .  H ow e ve r,   the   fr e qu e ncy  ra nge  s upported  by   the  form er,  wh ic h  is  between   1  kHz  to  10  MHz ,  is  m uch   bette r  than  the  la tt er,  w hich  ca n  only   gen e rate  a  sign al   rangin g from  1  kHz to  1 MHz .        Table  4.   C om par iso n  Be twee n  P rop os e d  Sy stem  V s P rev i ous  Wor k   Desig n   Me m o r y   Utilizatio n   (bits )   Log ic E le m en ts   Sa m p lin g  Rate  (M Hz)   Frequ en cy  Ran g e   Prop o sed  Sy ste m   3 2 5 0 0 0  ( 6 3 .0% )   190   (1.2 %)   100   1  kHz  –   1 0  M Hz   Previo u s W o rk   3 2 0 0 0 0  ( 6 .0% )   240   (1.5 %)   20   1  kHz  –   1  M Hz       Fo r   f ur t her  im pro vem ents,  in  orde r  to   im pr ov e   the  te st  a nd  validat io n  of   t he  ge ner at ed  sig nal,   a   dig it al - to - anal og  co nverte r  ( DA C )  c ou l d  be   ad de d  at   t he  ou t pu t   an d  t hus,  the   outp ut  si gn al   can   be   vis ualiz ed   by  us i ng  the  osc il loscop e ,  a  too l  that  is  no rm ally   capab le   of  m easur ing  the  f re qu e ncy   of  the  si gn al   m or e  accuratel y.  Be sides,  the  t otal  har m on ic   dist or ti on  of  the  ge ner at e d  sig nal  cou l d  al so   be  analy zed  in  order   t o  ver ify  it s  fr e qu ency p uri ty .    More ov e r,   m or e  featur es  nee d  to  be  add e d  to  this  propose d  des ig n  to  m a ke  it   m or e  us efu l  to  us e rs .   Fo r   exam ple,  com m on   sign a l  ty pes  li ke  tria ng le ,  sawt oo t h  an d  pu lse   m ay   be  ad de d  a s  an  op ti on.  B esi des,  functi onal it ie s  su c h  as  am plit ud e  a nd  phase  a dju stm e nt  will   be  ve ry  us e fu l  i n  m any  app li cat ion s.  Fu rt her m or e,  it   is  al so   po ssi ble  to  hav e  a  m ulti - channel  fun ct ion   ge ner at or,  wh e re  tw o  or  m or e  sign al s  can  be   gen e rated   sim ultaneo us ly .  B ut,  this   one   m ay   depen d  on  the  FP G A  de vi ce  capa bili ti es   in  te rm   of  ha rdwar e   resou rces.       5.   CONCL US I O N   This  pap e r  ha s  discu ssed   on  the  im pr ov e m ent  of   t he  im ple m entat ion   of   t he  dig it al   sine  w av e   gen e rato r  in  F PGA,  w hich  had   been   ac hieved   by  op ti m iz ing   the  m e m or y  resour c es  util iz at ion .  In   this   pro po se d  rese arch,  the  ge ne rated  f reque nc y  accuracy  and   al s o  it s  frequ e ncy  ra ng e   was  i m pr ove d  by   increas in g  t he  nu m ber   of  sam ples  f or  one  pe rio d  of  t he  sig na l  and  th us ,  i nc reasin g  it s  sam pling  rate.  This   was   achieva ble  owing  t o  the  sym m et ric  char act erist ic   of   the  si ne  wa ve  an d  t hu s ,  only   the  f irst  qu a rter  the   sign al   need  to   be   sam pled  an d  st or e d  in   the   m e m o r y.  T he  pro pos ed  researc h  ha d  been  s uccess fu ll y  im ple m e nted  i n  Alte ra  Cy cl one  II I  D E0  FP GA   a nd   the  co rr ect ne ss  of   it s   fu ncti on al it y  had   been   ver if ie d  by  us in g  both  the   functi onal   sim ulati on   a nd  al s o  the  FP GA   ha rdwar e   ex per i m ental   te st,  where  the  outp ut  pro d uce d  by  th e  la tt er   was obse r ve d  i n  Si gn al Ta p II  Lo gic Analy zer.       ACKN OWLE DGE MENTS   The  a uthors  w ish  to  ac knowl edg e   U niv e rsiti   Tekn i kal  Ma la ysi a  Me la ka  ( UTeM)  a nd  th e  Ma la ysi a  Mi nistry  of   Hi gh e r  Ed ucati on   fo r  the  fi na ncial   fu ndin g  un de r  Gr a nt  N o.   F RGS/1/ 2015/TK0 4/FT K/03/F 00285  and pr ov i ding i ns tr um entat ion  d e vices s uppo rt for  this  pro j e ct .         Evaluation Warning : The document was created with Spire.PDF for Python.
In t J  Elec  &  C om p  En g     IS S N:  20 88 - 8708       Impr ove  performa nce  of the  d i gital sin usoid al  g ene ra t or  in   FPGA …   ( Aim an Z akw an Jidi n )   1749   REFERE NCE S   [1]   S.  Ding,   A.  An,  and  X.  Gou,  " Digit al   W a vef or m   Gene rat or  Based  on  FPGA,"   Re s.  J .   Appl .   S c i.   Eng.   Te chnol ,   vol.   4( 14 ) ,   pp .   2 160 – 2166,   2012 .   [2]   A.  H.  T irmare ,   M.  S.  R.   Mohite,  V.  A .   Sur y avans hi,   T .   C.   Depa rtment,   B .   Vid yape e th,   and  E.   Kolhapur , "   FP GA   Based  Functi on  Gene rat or , "   Inter nati onal  Re sea rch  Journal  of  Engi ne ering  and  Technol ogy  ( IRJ ET) ,   vol.   2( 9 ),   pp.   2394 – 2399 ,   2015.   [3]   V.  M.  Ibr ahi m ,   O.  Ta iwo,   a nd   U.  E.   U y o at a ,   " Microc ontroller   Sy nth esized  Functi on  Gene r at o r, "   Inte rnationa l   Journal  of   Engi n ee ring  Re search   and  Dev e lopmen t ,   vo l. 2( 7 ) ,   pp.   1 9 – 25,   2012 .   [4]   G.  Brebne r  and   W .   Jiang,   " High - Speed  Packet  Proce ss ing  Usi ng  Rec onfigur a ble   Com puti ng, "   IEE E  Mic ro ,   vol.   34( 1 ) ,   pp .   8 – 18,   2014 .   [5]   W .   Zhe ng ,   R .   L i u,   M.  Zha ng ,   G.   Zhua ng,   and   T.  Yuan,   " Design  o f  FP GA   Based  High - Speed  Dat a  Acquisi ti on  an d  Rea l - Ti m e  Da ta  Proce ss ing  S y st e m   on  J - TE XT T okamak, "   Fusio n  Eng. Des . ,   vol .   89( 5 ) ,   pp.   698 – 701,   2014 .   [6]   S.   Yanbin,   G.  Jian ,   and  C.   Ning,   " High  Prec ision  Digit al   Freque n c y   Signa l  Source   Based  on  FPGA,"   in  Phy sics  Proce dia ,   vo l. 2 5,   pp .   1342 – 134 7,   2012   [7]   X.  Ye,   M.   Gao,  and  J .   Huang ,   " 12  - W a y   High  Acc ura c y   S ine   Signal   Gene r at o r  S y stem  Based  on  FP GA , "   IEEE   16th  Int ernati on al  Conf ere nce o n  Comm unic ati o n  Technol og y  ( ICCT ) ,   Hangz hou,   pp .   833 – 836 ,   2015.   [8]   M.  Herre ro,  J.  J.   Ro drígue z - Andi na,   and   J.  Fariñ a ,   " FPGA - base d  Design,   Im ple m ent a ti on  and  Evaluat ion   of   Digita l  Sinus oida l  Gen e rat ors,"   in  I ECON  Proceedi ngs ( Industrial  E le c tronic s   Conf ere nc e) ,   pp.   2459 – 246 4,   2008 .   [9]   A.  Z.   Jidin ,   I.   N.  Mahz an ,   N.  Hass im,  and  A.  F.  Kadm in,   " Low - Cost  and  Portabl e  Inte r active   Si nusoidal   Digita l   Signal   Gen erato r  b y   Us ing  FPG A,"   Journal  of  T el e communic ation,  El e ct ronic  a nd  Computer  Engi nee ring  ( JTEC) ,  vol.   10( 1 ) ,   pp .   1 9 – 24,   2018 .   [10]   A.  Gom an,   " W a vef orm   Gene rator  Im ple m ent ed  in  F PGA  with  an  Embedde d  Pro ce ss or, "   Master  Thesis,  Linköpi ng  Unive rs it y ,   Sw e den,   no .   LIT H - I SY - EX - 3412 - 20 03,   2003 .       BIOGR AP H I ES   OF  A UTH ORS        Aiman  Z a kw an  Jidin   obta ine d   his  MEng  in  Elec tron ic   and   Microe l ec tron ic   S ystem  Engi nee r in g  from   ESIEE   Engi nee r ing  Paris  Franc e  in  2011.   He  has  2  y ea rs  o f  working  expe ri enc e  in  design in g   digi tal  IC   and  d igi tal  s y s te m   in   FP GA   at   Alte ra   Corpora t ion  M al a y si a,   b efo re   j oini ng  Univ ersiti  Te knik al   Ma lays ia   Mela k a  (U Te M)  as  l ectur er  and  r ese ar ch er,   in  Elec tronics  and  Com put er   Engi ne eri ng.   His   rese a rch   intere st s inc lud e  FP GA   Design  and  D igital S y st em Design           Irna  Nad ir a  Mah z an   i s  cur ren t l y   in  her   fin al   y e ar  of  studie s  in  Bac he lor   of  Com pute r  Engi ne er ing  Te chno log y   in  Univer siti   T eknikal  Malay si a  Mela k a  (UTe M).  Rec en tly ,   she  ha d  bee n  working  on  the   developm ent  of  a  low - cost  p orta bl e  signal   ge ner at or  b y   using  FPGA  as   her   fina l  y ea r  proj ec t .   Curre ntly ,   she  is  under going   her   final  y e a r  int er nship  at   U TAC  Manufa ct ur ing  Servic es  Sdn  Bh d,   which  is  expect e d  to  b e complete d  in  Jul y   2018.           A  S hams ul  Ra himi  A  S ubki   o bta in ed  his  MS c   in  Microe le c tro nic s  from   Unive rsiti   Keba ngsaa n   Malay s ia   in  201 1.   He  has  2  y e a rs  of  working  expe rie n ce   as  Photoli thogr aph y   a nd  W et   Et chi ng   Proce ss   Engi ne e r  at   ON   Sem ic o nduct or  Mal a y s i a  and  as  Proce s s  Inte gra t ion  En gine er  at   Si lT e rr a   Malay s ia   foc usi ng  on  m ai ntaini ng  proc ess  par a m et ers  for  CMO S  0. 16  nm   t e chnol og y ,   bef or e  joi ning  Univer si ti   Te knik al   Mal a y sia  Mel aka   (U Te M)  as  le ct ur er   and  rese arc h er,   in  El e ct roni cs  and   Com pute r  Enginee ring .   His  re sea rch   in te rests   inc lude   CMO S  proc ess  flow  opti m iz ation  a nd   cha ra cteri z at ion ,   and  pow er el e ctronics.         Wan  H as z er il a   Wan  Hassan   holds  a  Master   of  El e ct r ic a l,   El e ct roni c  &  T el e comm unic at i on  Engi ne eri ng  fro m   UTM  and  Ba che lor   of  E le c trica l  &   E lectr oni c   Engi ne eri ng   fro m   UTM.  She  ha s   pre vious  working  expe ri enc e  in   sem ic onduct or  industr y   at   Infin eon  Technol ogi es  Malay s ia.  She   joi n  Univ ersit i   T ekni ka l  Mal a y s i a  Mel aka  (UTe M)  as  lectur er  o n  2014.   H er  r ese arc h  area  inc lud es  Photonic s,  Opt ical  Com m un ic ati on  and  W ir el ess  Com m unic at ion.        Evaluation Warning : The document was created with Spire.PDF for Python.