home *** CD-ROM | disk | FTP | other *** search
/ ftp.pasteur.org/FAQ/ / ftp-pasteur-org-FAQ.zip / FAQ / dsp-faq / part2 < prev    next >
Encoding:
Internet Message Format  |  2004-03-19  |  64.4 KB

  1. Path: senator-bedfellow.mit.edu!bloom-beacon.mit.edu!newsfeed.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!elnk-nf2-pas!elnk-pas-nf1!newsfeed.earthlink.net!sn-xit-02!sn-xit-01!sn-post-02!sn-post-01!supernews.com!corp.supernews.com!bertha.bdti.com!not-for-mail
  2. From: comp-dsp-faq@bdti.com (Kenton Williston)
  3. Newsgroups: comp.dsp,comp.answers,news.answers
  4. Subject: comp.dsp FAQ [2 of 4]
  5. Approved: news-answers-request@MIT.Edu
  6. Supersedes: <compdsp.2_1075850452@bdti.com>
  7. Followup-To: poster
  8. Date: Thu, 18 Mar 2004 18:09:25 +0000 (UTC)
  9. Organization: Berkeley Design Technology, Inc.
  10. Message-ID: <compdsp.2_1079633358@bdti.com>
  11. Sender: williston@bdti.com
  12. Distribution: world
  13. Expires: 1 May 2004 18:09:18 GMT
  14. References: <compdsp.1_1079633358@bdti.com>
  15. Summary: This is a periodic posting to comp.dsp that gives information
  16.          on frequently asked questions asked in this newsgroup.
  17. X-Complaints-To: abuse@supernews.com
  18. Lines: 1323
  19. Xref: senator-bedfellow.mit.edu comp.dsp:155136 comp.answers:56627 news.answers:268476
  20.  
  21. Archive-name: dsp-faq/part2
  22. Last-modified: Thu Mar 18 2004
  23. URL: http://www.bdti.com/faq/
  24.  
  25.                    Previous section (1) Next section (3)
  26.  
  27.                          Q2: Algorithms and standards
  28.  
  29. Q2.1: Where can I get public domain algorithms for general-purpose DSP?
  30.  
  31.    Updated 12/31/96
  32.  
  33.           The   following   archives   contain   things  such  as  matrix
  34.           operations,  FFT's  and  generally  useful things like that, as
  35.           opposed to complete applications.
  36.  
  37.     Netlib
  38.  
  39.           Netlib  serves  some  of  this  software via email. Try mail to
  40.           netlib@ORNL.GOV with "send help" in the subject field.
  41.  
  42.    To Obtain:
  43.           For Europe:
  44.  
  45.           Internet: netlib@nac.no
  46.           EARN/BITNET: netlib%nac.no@norunix.bitnet
  47.           X.400: s=netlib; o=nac; c=no;
  48.           EUNET/uucp: nac!netlib
  49.  
  50.    For more information:
  51.           See   Jack  J.  Dongarra  and  Eric  Grosse,  "Distribution  of
  52.           Mathematical  Software  Via  Electronic Mail," Comm. ACM (1987)
  53.           30,403--407.
  54.  
  55.           A  similar collection of statistical software is available from
  56.           statlib@temper.stat.cmu.edu.
  57.  
  58.           The   symbolic   algebra   system   REDUCE   is   supported  by
  59.           reduce-netlib@rand.org.
  60.  
  61.     NSWC Library
  62.  
  63.           The  Naval Surface Warfare Center has a library of mathematical
  64.           Fortran  subroutines  that may be of use. The NSWC library is a
  65.           library  of  general-purpose Fortran subroutines that provide a
  66.           basic  computational  capability  in  a variety of mathematical
  67.           activities. Emphasis has been placed on the transportability of
  68.           the  codes.  Subroutines  are available in the following areas:
  69.           Elementary    Operations,    Geometry,    Special    Functions,
  70.           Polynomials,  Vectors,  Matrices, Large Dense Systems of Linear
  71.           Equations,  Banded  Matrices,  Sparse Matrices, Eigenvalues and
  72.           Eigenvectors,  l1  Solution  of Linear Equations, Least-Squares
  73.           Solution   of   Linear   Equations,  Optimization,  Transforms,
  74.           Approximation  of  Functions,  Curve  Fitting, Surface Fitting,
  75.           Manifold  Fitting,  Numerical  Integration, Integral Equations,
  76.           Ordinary Differential Equations, Partial Differential Equations
  77.  
  78.    For more information:
  79.           NSWC Library of Mathematical Subroutines
  80.           Report No.: NSWC TR 90-21, January 1990
  81.           by Alfred H. Morris, Jr.
  82.           Naval Surface Warfare Center (E43)
  83.           Dahlgren, VA 22448-5000
  84.           U.S.A.
  85.           [Witold Waldman]
  86.  
  87.     IEEE Press book "Programs For Digital Signal Processing"
  88.  
  89.           You  can  get  the Fortran source code from the IEEE Press book
  90.           "Programs For Digital Signal Processing." See question 1.3.6.
  91.      _________________________________________________________________
  92.  
  93. Q2.2: What are CELP and LPC? Where can I get the source for CELP and LPC?
  94.  
  95.    Updated 09/10/01
  96.  
  97.           CELP  stands  for  "code excited linear prediction". LPC stands
  98.           for "linear predictive coding". They are compression algorithms
  99.           used for low bit rate (2400 and 4800 bps) speech coding.
  100.  
  101.           The  U.S.  DoD's  Federal-Standard-1016  based  4800  bps  code
  102.           excited  linear  prediction  voice coder version 3.2 (CELP 3.2)
  103.           Fortran  and  C  simulation  source  codes  are  available  for
  104.           worldwide  distribution  (on  DOS  diskettes, but configured to
  105.           compile  on  Sun  SPARC  stations)  from NTIS and DTIC. Example
  106.           input  and  processed  speech  files  are included. A Technical
  107.           Information    Bulletin    (TIB),   "Details   to   Assist   in
  108.           Implementation of Federal Standard 1016 CELP," and the official
  109.           standard, "Federal Standard 1016, Telecommunications: Analog to
  110.           Digital  Conversion  of  Radio  Voice  by 4,800 bit/second Code
  111.           Excited Linear Prediction (CELP)," are also available.
  112.  
  113.    To obtain CELP:
  114.           Available through the National Technical Information Service:
  115.  
  116.  
  117.     NTIS
  118.     U.S. Department of Commerce
  119.     5285 Port Royal Road
  120.     Springfield, VA 22161
  121.     USA
  122.     (800) 553-6847
  123.  
  124.           FS-1016    CELP    3.2    may    also    be    obtained    from
  125.           ftp://svr-ftp.eng.cam.ac.uk/pub/comp.speech/coding/celp_3.2a.ta
  126.           r.Z.
  127.  
  128.           LPC-10 (2.4 Kbps) is available from
  129.           ftp://svr-ftp.eng.cam.ac.uk/pub/comp.speech/coding/lpc10-1.0.ta
  130.           r.gz.
  131.  
  132.           LPC    (4.8    Kbps)   can   be   downloaded   in   SpeakFreely
  133.           http://www.speakfreely.org/,        or       in       HawkVoice
  134.           http://www.hawksoft.com/hawkvoice/. HawkVoice includes versions
  135.           of  OpenLPC,  LPC-10,  LPC,  GSM,  and  Intel/DVI  ADPCM. These
  136.           versions  have  been rewritten to support multiple encoding and
  137.           decoding  streams,  and  the interfaces have been standardized.
  138.           [Phil Frisbie, Jr., phil@hawksoft.com]
  139.  
  140.           OpenLPC   (1.4   and   1.8   Kbps)   can   be  downloaded  from
  141.           ftp://ftp.futuredynamics.com/OpenLPC/.
  142.  
  143.           MATLAB     software    for    LPC-10    is    available    from
  144.           http://www.eas.asu.edu/~spanias/srtcrs.html.  Also,  postscript
  145.           copies   of   tutorials  of  speech  coding  can  be  found  at
  146.           http://www.eas.asu.edu/~spanias/papers.html.  [Andreas Spanias,
  147.           spanias@asu.edu]
  148.  
  149.    For more information:
  150.  
  151.      * The following articles describe the Federal-Standard-1016 4.8-kbps
  152.        CELP coder (it's unnecessary to read more than one):
  153.  
  154.      Campbell,  Joseph P. Jr., Thomas E. Tremain and Vanoy C. Welch, The
  155.      Federal  Standard  1016  4800  bps CELP Voice Coder, Digital Signal
  156.      Processing, Academic Press, 1991, Vol. 1, No. 3, p. 145-155.
  157.      Campbell,  Joseph P. Jr., Thomas E. Tremain and Vanoy C. Welch, The
  158.      DoD 4.8 kbps Standard (Proposed Federal Standard 1016), in Advances
  159.      in  Speech  Coding,  ed. Atal, Cuperman and Gersho, Kluwer Academic
  160.      Publishers, 1991, Chapter 12, p. 121-133.
  161.      Campbell,  Joseph P. Jr., Thomas E. Tremain and Vanoy C. Welch, The
  162.      Proposed  Federal  Standard 1016 4800 bps Voice Coder: CELP, Speech
  163.      Technology Magazine, April/May 1990, p. 58-64.
  164.        Additional   information   on  CELP  can  also  be  found  in  the
  165.        comp.speech FAQ.
  166.      * The  voicing  classifier  used in the enhanced LPC-10 (LPC-10e) is
  167.        described  in:  Campbell,  Joseph  P.,  Jr.  and  T.  E.  Tremain,
  168.        Voiced/Unvoiced  Classification of Speech with Applications to the
  169.        U.S.   Government  LPC-10E  Algorithm,  Proceedings  of  the  IEEE
  170.        International   Conference   on   Acoustics,  Speech,  and  Signal
  171.        Processing, 1986, p. 473-6.
  172.        The  U.  S.  Federal Standard 1015 (NATO STANAG 4198) is described
  173.        in:  Thomas  E. Tremain, The Government Standard Linear Predictive
  174.        Coding  Algorithm: LPC-10, Speech Technology Magazine, April 1982,
  175.        pp. 40-49.
  176.  
  177.    [Most of the above from Joe Campbell, jpcampb@afterlife.ncsc.mil, with
  178.    additions  from  Dan  Frankowski,  drankow@winternet.com, and Ed Hall,
  179.    edhall@rand.org]
  180.      _________________________________________________________________
  181.  
  182. Q2.3: What is ADPCM? Where can I get source for it?
  183.  
  184.    Updated: 04/03/01
  185.  
  186.    ADPCM  stands for Adaptive Differential Pulse Code Modulation. It is a
  187.           family  of  speech  compression and decompression algorithms. A
  188.           common  implementation  takes  16-bit  linear  PCM  samples and
  189.           converts  them to 4-bit samples, yielding a compression rate of
  190.           4:1.
  191.  
  192.    To obtain:
  193.           There  is  public  domain C code available via anonymous ftp at
  194.           ftp://ftp.cwi.nl/pub/audio/adpcm.shar  written  by  Jack Jansen
  195.           (email Jack.Jansen@cwi.nl). It is very programmer-friendly. The
  196.           ADPCM  code  used  is  the  Intel/DVI ADPCM code which is being
  197.           recommended  by  the IMA Digital Audio Technical Working Group.
  198.           It allows the following calls:
  199.  
  200. adpcm_coder(short inbuf[], char outbuf[], int nsample,
  201.         struct adpcm_state *state);
  202. adpcm_decoder(char inbuf[], short outbuf[], int nsample,
  203.         struct adpcm_state *state);
  204.  
  205.           Note that this is NOT a G.722 coder. The ADPCM standard is much
  206.           more  complicated,  probably  resulting in better quality sound
  207.           but also in much more computational overhead.
  208.  
  209.    Platforms:
  210.           The  routines  have been tested on numerous platforms, and will
  211.           easily  compress  and decompress millions of samples per second
  212.           on current hardware.
  213.  
  214.    For more information:
  215.           The   G.721/722/723   packages   are   available  from  ITU  at
  216.           http://www.itu.ch/.
  217.  
  218.           This is also available as:
  219.           ftp://svr-ftp.eng.cam.ac.uk/pub/comp.speech/coding/G711_G722_G7
  220.           23.tar.gz
  221.  
  222.           [From  Dan  Frankowski,  dfrankow@winternet.com;  Jack  Jansen,
  223.           Jack.Jansen@cwi.nl]
  224.      _________________________________________________________________
  225.  
  226. Q2.4: What is GSM? Where can I get source for it?
  227.  
  228.    Updated 4/27/00
  229.  
  230.           GSM  (Global System for Mobile Communication) is a standard for
  231.           digital  cellular  telephony used in Europe. GSM also refers to
  232.           the  speech  coder  used  in GSM telephones, which is what this
  233.           section of the FAQ is concerned with.
  234.  
  235.           The  Communications  and Operating Systems Research Group (KBS)
  236.           at the Technische Universitaet Berlin is currently working on a
  237.           set  of  UNIX-based tools for computer-mediated telecooperation
  238.           that will be made freely available.
  239.  
  240.           As part of this effort they are publishing an implementation of
  241.           the  European  GSM  06.10  provisional  standard  for full-rate
  242.           speech   transcoding,  prI-ETS  300  036,  which  uses  RPE/LTP
  243.           (residual  pulse  excitation/long term prediction) coding at 13
  244.           kbit/s.
  245.  
  246.           GSM  06.10  compresses  frames  of  160  13-bit  samples (8 kHz
  247.           sampling  rate,  i.e. a frame rate of 50 Hz) into 260 bits; for
  248.           compatibility    with    typical    UNIX    applications,   our
  249.           implementation  turns  frames of 160 16-bit linear samples into
  250.           33-byte  frames (1650 Bytes/s). The quality of the algorithm is
  251.           good  enough for reliable speaker recognition; even music often
  252.           survives  transcoding in recognizable form (given the bandwidth
  253.           limitations of 8 kHz sampling rate).
  254.  
  255.           The   interfaces   offered   are  a  front  end  modeled  after
  256.           compress(1),  and  a library API. Compression and decompression
  257.           run   faster   than   real  time  on  most  SPARCstations.  The
  258.           implementation has been verified against the ETSI standard test
  259.           patterns.
  260.  
  261.           Jutta    Degener    jutta@cs.tu-berlin.de,    Carsten   Bormann
  262.           cabo@cs.tu-berlin.de)
  263.  
  264.           Communications and Operating Systems Research Group, TU Berlin
  265.           Fax: +49.30.31425156, Phone: +49.30.31424315
  266.  
  267.    To obtain:
  268.           ftp://svr-ftp.eng.cam.ac.uk/pub/comp.speech/coding/gsm-1.0.6.ta
  269.           r.gz. An alternative site is
  270.           ftp://ftp.cwi.nl/pub/audio/gsm-1.0.7.tar.gz.      Try     also:
  271.           http://kbs.cs.tu-berlin.de/~jutta/toast.html.
  272.  
  273.    [From   Dan   Frankowski,   dfrankow@winternet.com;   Jutta   Degener,
  274.    jutta@cs.tu-berlin.de]
  275.      _________________________________________________________________
  276.  
  277. Q2.5: How does pitch perception work, and how do I implement it on my DSP chip?
  278.  
  279.    Updated 04/02/01
  280.  
  281.           Pitch  is  officially  defined  as  "That attribute of auditory
  282.           sensation  in terms of which sounds may be ordered on a musical
  283.           scale."  Several  good  examples illustrating the subtleties of
  284.           pitch  perception  are included in the "Auditory Demonstrations
  285.           CD"  which is available from the Acoustical Society of America,
  286.           Woodbury, NY 10797 for $20.
  287.  
  288.    Books/papers:
  289.           A   good  general  reference  about  the  psychology  of  pitch
  290.           perception is the book:
  291.  
  292.      B.C.J.  Moore,  An  Introduction  to  the  Psychology  of  Hearing,
  293.      Academic Press, London, 1997.
  294.  
  295.           This  book  is  available  in  paperback  and makes a good desk
  296.           reference.
  297.  
  298.           An  algorithm  implementation  that  matches  a  large  body of
  299.           psycho-acoustical  work,  but  which  is  computationally  very
  300.           intensive, is presented in the paper:
  301.  
  302.      Malcolm  Slaney  and  Richard  Lyon, "A Perceptual Pitch Detector,"
  303.      Proceedings  of  the International Conference of Acoustics, Speech,
  304.      and Signal Processing, 1990, Albuquerque, New Mexico. Available for
  305.      ftp at ftp://worldserver.com/pub/malcolm/ICASSP90.psc.Z
  306.  
  307.           The  definitive  papers describing the use of such a perceptual
  308.           pitch  detector as applied to the classical pitch literature is
  309.           in:
  310.  
  311.      Ray  Meddis  and M. J. Hewitt. "Virtual pitch and phase sensitivity
  312.      of  a  computer  model  of the auditory periphery. " Journal of the
  313.      Acoustical   Society   of  America  89  (6  1991):  2866-2682.  and
  314.      2883-2894.
  315.  
  316.           The  current work that argues for a pure spectral method starts
  317.           with the work of Goldstein:
  318.  
  319.      J.   Goldstein,  "An  optimum  processor  theory  for  the  central
  320.      formation of the pitch of complex tones," Journal of the Acoustical
  321.      Society of America 54, 1496-1516, 1973.
  322.  
  323.           Two approaches are worth considering if something approximating
  324.           pitch  is  appropriate.  The  people  at  IRCAM have proposed a
  325.           harmonic analysis approach that can be implemented on a DSP:
  326.  
  327.      Boris  Doval and Xavier Rodet, "Estimation of Fundamental Frequency
  328.      of  Musical  Sound  Signals," Proceedings of the 1991 International
  329.      Conference  on  Acoustics,  Speech, and Signal Processing, Toronto,
  330.      Volume 5, pp. 3657-3660.
  331.  
  332.           The   classic  paper  for  time  domain  (peak  picking)  pitch
  333.           algorithms is:
  334.  
  335.      B.  Gold  and  L.  Rabiner,  "Parallel  processing  techniques  for
  336.      estimating  pitch periods of speech in the time domain," Journal of
  337.      the Acoustical Society of America, 46, pp 441-448, 1969.
  338.  
  339.    Finally, a word of caution:
  340.           Pitch is not single-valued. We can hear a sound and match it to
  341.           several different pitches. Imagine the number of instruments in
  342.           an  orchestra, each with its own pitch. Even a single sound can
  343.           have more than one pitch. See for example Demonstration 27 from
  344.           the ASA Auditory Demonstrations CD.
  345.  
  346.           [The  above  from  Malcolm  Slaney, Interval Research, and John
  347.           Lazzaro, U.C. Berkeley.]
  348.  
  349.           Another  interesting  piece  of information on pitch perception
  350.           can be found at
  351.           http://www.dspdimension.com/html/timepitch.html.   [Stephan  M.
  352.           Sprenger, sms@prosoniq.com]
  353.      _________________________________________________________________
  354.  
  355. Q2.6: What standards exist for digital audio? What is AES/EBU? What is S/PDIF?
  356.  
  357.    Updates 1/8/97
  358.  
  359.   Q2.6.1: Where can I get copies of ITU (formerly CCITT) standards?
  360.  
  361.           Try the ITU (International Telecommunication Union) homepage at
  362.           http://www.itu.ch/.
  363.      _________________________________________________________________
  364.  
  365.   Q2.6.2: What standards are there for digital audio?
  366.  
  367.     AES/EBU
  368.  
  369.           The  "AES/EBU"  (Audio Engineering Society / European Broadcast
  370.           Union)  digital  audio  standard  is  probably the most popular
  371.           digital  audio  standard  today. Most consumer and professional
  372.           digital  audio  devices  (CD  players,  DAT  decks,  etc.) that
  373.           feature digital audio I/O support AES/EBU.
  374.  
  375.           AES/EBU   is   a   bit-serial   communications   protocol   for
  376.           transmitting  digital  audio data through a single transmission
  377.           line. It provides two channels of audio data (up to 24 bits per
  378.           sample),   a   method  for  communication  control  and  status
  379.           information  ("channel  status bits"), and some error detection
  380.           capabilities.  Clocking  information  (i.e.,  sample  rate)  is
  381.           derived  from the AES/EBU bit stream, and is thus controlled by
  382.           the transmitter. The standard mandates use of 32 kHz, 44.1 kHz,
  383.           or 48 kHz sample rates, but some interfaces can be made to work
  384.           at other sample rates.
  385.  
  386.           AES/EBU  provides both "professional" and "consumer" modes. The
  387.           big  difference  is  in  the  format of the channel status bits
  388.           mentioned   above.   The   professional   mode   bits   include
  389.           alphanumeric  channel  origin and destination data, time of day
  390.           codes, sample number codes, word length, and other goodies. The
  391.           consumer  mode  bits have much less information, but do include
  392.           information  on  copy protection (naturally). Additionally, the
  393.           standard  provides  for  "user  data",  which  is  a bit stream
  394.           containing   user-defined  (i.e.,  manufacturer-defined)  data.
  395.           According  to  Tim  Channon,  "CD  user  data  is almost raw CD
  396.           subcode; DAT is StartID and SkipID. In professional mode, there
  397.           is  an SDLC protocol or, if DAT, it may be the same as consumer
  398.           mode."
  399.  
  400.           The  physical  connection media are commonly used with AES/EBU:
  401.           balanced   (differential),   using  two  wires  and  shield  in
  402.           three-wire  microphone  cable  with  XLR connectors; unbalanced
  403.           (single-ended),  using  audio  coax  cable  with RCA jacks; and
  404.           optical (via fiber optics).
  405.  
  406.     S/P-DIF
  407.  
  408.           "S/P-DIF"  (Sony/Philips  Digital  Interface  Format) typically
  409.           refers to AES/EBU operated in consumer mode over unbalanced RCA
  410.           cable.  Note  that  S/P-DIF  and  AES/EBU mean different things
  411.           depending  on how much of a purist you are in the digital audio
  412.           world; see the Finger article below.
  413.  
  414.    References:
  415.           Finger,  Robert,  AES3-199X:  The  Revised  Two Channel Digital
  416.           Audio  Interface  (DRAFT),  presented at the 91st Convention of
  417.           the  Audio  Engineering  Society,  October 4-8, 1991. Reprints:
  418.           AES, 60 East 42nd St., New York, NY, 10165.
  419.  
  420.           [The    above    from    Phil    Lapsley   and   Tim   Channon,
  421.           tchannon@black.demon.co.uk]
  422.  
  423.           Painter,  E.  M., and Spanias, A. S. (1997 and revised 1999). A
  424.           Review  of  Algorithms  for  Perceptual Coding of Digital Audio
  425.           Signals. (PostScript, 3MB)
  426.           http://www.eas.asu.edu/~spanias/papers.html
  427.  
  428.           [Andreas Spanias, spanias@asu.edu]
  429.      _________________________________________________________________
  430.  
  431. Q2.7: What is mu-law encoding? Where can I get source for it?
  432.  
  433.    Updated 9/13/99
  434.  
  435.           Mu-law  (also  "u-law")  encoding  is  a  form  of  logarithmic
  436.           quantization  or companding. It's based on the observation that
  437.           many  signals  are  statistically  more likely to be near a low
  438.           signal level than a high signal level. Therefore, it makes more
  439.           sense  to have more quantization points near a low level than a
  440.           high level. In a typical mu-law system, linear samples of 14 to
  441.           16  bits are companded to 8 bits. Most telephone quality codecs
  442.           (including  the  Sparcstation's audio codec) use mu-law encoded
  443.           samples.
  444.  
  445.           Desktop  Sparc  machines  come with routines to convert between
  446.           linear and mu-law samples. On a desktop Sparc, see the man page
  447.           for audio_ulaw2linear in /usr/demo/SOUND/man.
  448.  
  449.    To obtain:
  450.           Craig  Reese  posted the source of similar routines to comp.dsp
  451.           in August '92. These are archived on
  452.           ftp://mirriwinni.cse.rmit.edu.au/pub/dsp/misc/ulaw_reese.
  453.  
  454.    References:
  455.           ITU-T  (formerly CCITT) Recommendation G.711 (very difficult to
  456.           follow).
  457.  
  458.           Michael   Villeret,   et.  al,  A  New  Digital  Technique  for
  459.           Implementation  of Any Continuous PCM Companding Law, IEEE Int.
  460.           Conf. on Communications, 1973, vol. 1, pp. 11.12-11.17.
  461.  
  462.           MIL-STD-188-113, Interoperability and Performance Standards for
  463.           Analog-to-Digital Conversion Techniques, 17 February 1987.
  464.  
  465.           TI  Digital  Signal  Processing  Applications  with  the TMS320
  466.           Family (TI literature number SPRA012A), pp. 169-198.
  467.  
  468.    [From   Joe   Campbell;   Craig   Reese,   cfreese@super.org;   Sepehr
  469.    Mehrabanzad,     sepehr@falstaff.dev.cdx.mot.com;    Keith    Kendall,
  470.    KLK3%mimi@magic.itg.ti.com]
  471.      _________________________________________________________________
  472.  
  473. Q2.8: How can I do CD <=> DAT sample rate conversion?
  474.  
  475.    Updated 9/13/99
  476.  
  477.           CD  players  use  a 44.1 kHz sample rate, whereas DAT uses a 48
  478.           kHz  sample  rate.  This  means  that  you  must do sample rate
  479.           conversion  before  you  can get data from a CD player directly
  480.           into a DAT deck.
  481.  
  482.           [From Ed Hall, edhall@rand.org:]
  483.  
  484.           For  a  start,  look  at Multirate Digital Signal Processing by
  485.           Crochiere and Rabiner (see FAQ section 1.1).
  486.  
  487.           Almost  any  technique  for  producing  good  digital  low-pass
  488.           filters  will  be  adaptable to sample-rate conversion. 44.1:48
  489.           and  vice-versa  is  pretty  hairy,  though, because the lowest
  490.           whole-number  ratio  is 147:160. To do all that in one go would
  491.           require  a  FIR  with  thousands of coefficients, of which only
  492.           1/147th  or  1/160th are used for each sample--the real problem
  493.           is  memory, not CPU for most DSP chips. You could chain several
  494.           interpolators  and  decimators,  as  suggested by factoring the
  495.           ratio into 3*7*7:2*2*2*2*2*5. This adds complexity, but reduces
  496.           the number of coefficients required by a considerable amount.
  497.  
  498.           [From Lou Scheffer:]
  499.  
  500.           Theory  of  operation: 44.1 and 48 are in the ratio 147/160. To
  501.           convert from 44.1 to 48, for example, we (conceptually):
  502.  
  503.          1. interpolate 159 zeros between every input sample. This raises
  504.             that  data  rate  to  7.056  MHz.  Since  it is equivalent to
  505.             reconstructing  with  delta functions, it also creates images
  506.             of frequency f at 44.1-f, 44.1+f, 88.2-f, 88.2+f, ...
  507.          2. We  remove these with an FIR digital filter, leaving a signal
  508.             containing  only 0-20 KHz information, but still sampled at a
  509.             rate of 7.056 MHz.
  510.          3. We  discard 146 of every 147 output samples. It does not hurt
  511.             to  do so since we have no content above 24 KHz. In practice,
  512.             of course, we never compute the values of the samples we will
  513.             throw out.
  514.  
  515.           So  we need to design an FIR filter that is flat to 20 KHz, and
  516.           down  at  least  X db at 24 KHz. How big does X need to be? You
  517.           might  think about 100 db, since the max signal size is roughly
  518.           +-32767,  and  the  input  quantization  +- 1/2, so we know the
  519.           input  had  a signal to broadband noise ratio of 98 db at most.
  520.           However, the noise in the stopband (20KHz-3.5MHz) is all folded
  521.           into  the  passband  by  the  decimation  in step 3, so we need
  522.           another  22  db  (that's  160  in  db) to account for the noise
  523.           folding.  Thus  120 db rejection yields a broadband noise equal
  524.           to the original quantizing noise. If you are a fanatic, you can
  525.           shoot  for  130  db  to  make  the  original  quantizing errors
  526.           dominate,  and  a 22.05 KHz cutoff to eliminate even ultrasonic
  527.           aliasing.  You  will  pay for your fanaticism with a penance of
  528.           more taps, however.
  529.  
  530.    To obtain:
  531.           There's  a  free  implementation  of  Julius  O.  Smith III and
  532.           someone    else's    "bandwidth-limited   interpolation"   rate
  533.           conversion algorithm.
  534.  
  535.           A paper available as
  536.           ftp://ccrma-ftp.stanford.edu/pub/DSP/Tutorials/BandlimitedInter
  537.           polation.eps.Z  explains  the  algorithm.  Free source code, as
  538.           well  as  an  HTML discussion of the algorithm, is available at
  539.           http://ccrma-www.stanford.edu/~jos/resample/.   It   all  works
  540.           quite well.
  541.  
  542.           [From Kevin Bradley, kb+@andrew.cmu.edu:]
  543.  
  544.           There  is an implementation of polyphase resampling for various
  545.           rates    as    a   part   of   the   Sox   audio   toolkit   at
  546.           http://home.sprynet.com/~cbagwell/sox.html. See file polyphas.c
  547.           for details.
  548.  
  549.           Sox    also   contains   an   implementation   of   bandlimited
  550.           interpolation  and  linear interpolation, and serves as a ready
  551.           vehicle for module experimentation.
  552.  
  553.           [From Fritz M. Rothacher, f.rothacher@ieee.org:]
  554.  
  555.           You  can  add  my Ph.D. thesis on sample-rate conversion to the
  556.           FAQ:
  557.  
  558.           Fritz M. Rothacher, Sample-Rate Conversion: Algorithms and VLSI
  559.           Implementation,  Ph.D.  thesis,  Integrated  Systems Lab, Swiss
  560.           Federal  Institute  of  Technology,  ETH  Zuerich,  1995,  ISBN
  561.           3-89191-873-9
  562.  
  563.           It    can    also   be   downloaded   from   my   homepage   at
  564.           http://www.guest.iis.ee.ethz.ch/~rota.
  565.      _________________________________________________________________
  566.  
  567. Q2.9: Wavelets
  568.  
  569.    Updated 6/3/98
  570.  
  571.   Q2.9.1 What are wavelets? Where can I get more information?
  572.  
  573.           In  short,  wavelets  are  a way to analyze a signal using base
  574.           functions  which  are  localized  both  in time (as diracs, but
  575.           unlike sine waves), and in frequency (as sine waves, but unlike
  576.           diracs).  They  can  be used for efficient numerical algorithms
  577.           and many DSP or compression applications.
  578.  
  579.           Sources of information on wavelets include:
  580.  
  581.           + a  newsletter,  "Wavelet  Digest".  Subscriptions for Wavelet
  582.             Digest: E-mail to wavelet@math.scarolina.edu with "subscribe"
  583.             as   subject.  The  Wavelet  Digest  can  also  be  found  at
  584.             http://www.wavelet.org/.
  585.           + http://www.amara.com/current/wavelet.html
  586.      _________________________________________________________________
  587.  
  588.   Q2.9.2 What are some good books and papers on wavelets
  589.  
  590.           The best introduction to wavelet transforms is in:
  591.  
  592.      Wavelets  and  Signal Processing- Oliver Rioul and Martin Vetterli,
  593.      IEEE Signal Processing magazine, Oct. 91, pp 14-38
  594.  
  595.           A good introductory book on wavelets:
  596.  
  597.      Randy  K.  Young,  Wavelet  Theory  and  Its  Applications,  Kluwer
  598.      Academic Publishers, ISBN 0-7923-9271-X, 1993.
  599.  
  600.           A more thorough book:
  601.  
  602.      Ali  N.  Akansu  and  Richard  A.  Haddad,  Multiresolution  Signal
  603.      Decomposition  Transforms, Subbands, Wavelets Academic Press, Inc.,
  604.      ISBN 0-12-047140-X
  605.  
  606.           A couple more interesting papers:
  607.  
  608.      Wavelets  and Filter banks: Theory and Design, IEEE Transactions on
  609.      Signal Processing, Vol. 40, No.9, Sept. 1992, pp 2207-2232
  610.  
  611.      Mac  Cody's  articles  in  Dr. Dobb's Journal, April 1992 and April
  612.      1993
  613.      Paper by Ingrid Daubechies in IEEE Trans. on Info. theory , vol 36.
  614.      No.5 , Sept 1990 and a book titled " Ten lectures on Wavelets" deal
  615.      with the mathematical aspects of the WT.
  616.      _________________________________________________________________
  617.  
  618.   Q2.9.3: Where can I get some software for wavelets?
  619.  
  620.     ftp://pascal.math.yale.edu/pub/wavelets/software/xwpl
  621.  
  622.           Binaries   are  available  for  the  following  platforms:  Sun
  623.           Sparcstations  running  SunOS 4.1 or Solaris 2.3, NeXT machines
  624.           running  NeXTstep  3.0  or  higher,  with  an X server, Silicon
  625.           Graphics  machines  (IRIS),  DEC Alpha AXP running OSF/1 1.2 or
  626.           higher, i386/i486 PC compatible with Linux 0.99.
  627.  
  628.           There  is  also  a sample data directory containing interesting
  629.           signals.
  630.  
  631.    More information:
  632.           http://www.math.yale.edu/users/majid/
  633.  
  634.           [From Fazal Majid majid@math.yale.edu]:
  635.  
  636.     Rice Wavelet Tools
  637.  
  638.    Description:
  639.           The  Rice  Wavelet  Toolbox  (RWT)  is  a  collection of Matlab
  640.           M-files  and  C MEX-files for 1D and 2D wavelet and filter bank
  641.           design,  analysis,  and  processing. The toolbox provides tools
  642.           for  denoising and interfaces directly with our Matlab code for
  643.           wavelet  domain  hidden  Markov  models and wavelet regularized
  644.           deconvolution.  Also included is a simple converter to the data
  645.           format used by the official Matlab wavelet toolbox.
  646.  
  647.           The  current  distribution, Version 2.3 (Dec 1, 2000), has been
  648.           streamlined  and  packaged  for  different  systems,  including
  649.           Solaris,  Linux,  and  Microsoft  Windows. Functions omitted in
  650.           Version 2.3 can be found in the Version 2.01 distribution.
  651.  
  652.    To obtain:
  653.           See http://www-dsp.rice.edu/software/RWT/.
  654.  
  655.           Send mail to wlet-tools@rice.edu (or ramesh@dsp.rice.edu)
  656.      _________________________________________________________________
  657.  
  658. Q2.10: How do I calculate the coefficients for a Hilbert transformer?
  659.  
  660.    Updated 6/3/98
  661.  
  662.           For  all  the  gory details, I suggest the paper: Andrew Reilly
  663.           and   Gordon  Frazer  and  Boualem  Boashash:  Analytic  signal
  664.           generation---tips   and  traps,  IEEE  Transactions  on  Signal
  665.           Processing, no. 11, vol. 42, Nov. 1994, pp. 3241-3245.
  666.  
  667.           For comp.dsp, the gist is:
  668.  
  669.          1. Design  a  half-bandwidth  real  low-pass  FIR  filter  using
  670.             whatever optimal method you choose, with the principle design
  671.             criterion  being  minimization  of the maximum attenuation in
  672.             the band f_s/4 to f_s/2.
  673.          2. Modulate  this  by  exp(2  pi  f_s/4  t),  so  that  now your
  674.             stop-band  is  the negative frequencies, the pass-band is the
  675.             positive  frequencies,  and the roll-off at each end does not
  676.             extend into the negative frequency band.
  677.          3. either  use it as a complex FIR filter, or a pair of I/Q real
  678.             filters in whatever FIR implementation you have available.
  679.  
  680.           If  your  original  filter  design produced an impulse response
  681.           with  an  even  number  of  taps,  then the filtering in 3 will
  682.           introduce  a  spurious  half-sample  delay (resampling the real
  683.           signal   component),   but   that  does  not  matter  for  many
  684.           applications, and such filters have other features to recommend
  685.           them.
  686.  
  687.           Andrew Reilly [Reilly@zeta.org.au]
  688.      _________________________________________________________________
  689.  
  690. Q2.11: Algorithm implementation: floating-point versus fixed-point
  691.  
  692.           According  to  the  WWWebster  Dictionary,  an  algorithm is "a
  693.           procedure for solving a mathematical problem (as of finding the
  694.           greatest  common  divisor)  in  a  finite  number of steps that
  695.           frequently  involves  repetition  of  an  operation; broadly: a
  696.           step-by-step  procedure  for solving a problem or accomplishing
  697.           some end especially by a computer."
  698.  
  699.           Typical (although by no means the only) operations are those of
  700.           addition and multiplication. When expressing the algorithm with
  701.           pencil  and  paper,  these  operations are commonly taken to be
  702.           within  an  algebraically  complete  number  system such as the
  703.           integers  or  the  reals.  However,  when  the  time  comes  to
  704.           implement  the  algorithm  on  a computer, these "ideal" number
  705.           systems  must be exchanged for something realizable. The number
  706.           systems  available  today  on  common  processors  and  digital
  707.           hardware   are   broadly   categorized  as  floating-point  and
  708.           fixed-point.
  709.  
  710.           In  a  floating-point  representation, the total number of bits
  711.           available  are  partitioned  into  an  exponent  and  mantissa.
  712.           Generally   speaking,  the  mantissa  stores  the  "significant
  713.           digits"  of the value while the exponent scales the significant
  714.           digits  to the desired magnitude. The action of the exponent is
  715.           to  move,  or  "float,"  the  decimal  point  depending  on the
  716.           magnitude being represented; thus the term "floating-point."
  717.  
  718.           Because  floating-point  representations are typically at least
  719.           32  bits  long  (IEEE-754  is a popular standard for 32-bit and
  720.           64-bit  floating-point  numbers),  there  exists simultaneously
  721.           high   precision  and  high  dynamic  range.  These  traits  of
  722.           floating-point  numbers  allow  most  algorithms  to  be ported
  723.           directly  to  floating-point  implementations with little or no
  724.           change,   and   this   is   the   key   reason   floating-point
  725.           representations  are  highly  desirable.  The  disadvantage  of
  726.           floating-point   implementations   is   that   they  require  a
  727.           significant   amount   of   extra   hardware  over  fixed-point
  728.           implementations, which translates to higher parts costs, higher
  729.           power  consumption,  slower  execution,  larger chip area, or a
  730.           combination of these.
  731.  
  732.           As  the term "fixed-point" implies, fixed-point representations
  733.           have  the  binary  point  at  a  fixed  location. There are two
  734.           subsets of fixed-point implementations: fractional and integer.
  735.           In  a  fractional  fixed-point  implementation,  such  as  that
  736.           provided  on  the Motorola 56K series of DSPs, the binary point
  737.           is  always  assumed  to  be to the left of the most-significant
  738.           digit.  In  an integer fixed-point implementation, such as that
  739.           provided  by  the Texas Instruments TMS320C54xx series of DSPs,
  740.           the  binary  point  is  to  the  right of the least-significant
  741.           digit. In either case, the arithmetic operations implemented in
  742.           the  hardware  are essentially integer, which results in a much
  743.           simpler  arithmetic  logic  unit  in hardware that allows lower
  744.           cost,  lower  power consumption, faster execution, smaller chip
  745.           area,  or  a  combination of these, over that of floating-point
  746.           implementations.
  747.  
  748.           For  more  information on the IEEE-754 format, see James Carr's
  749.           "Numerical  Analysis"  class notes at Florida State University,
  750.           http://www.scri.fsu.edu/~jac/MAD3401/Backgrnd/ieee.html.
  751.  
  752.     Fixed-Point Arithmetic: The Basics
  753.  
  754.           In  essence,  a  fixed-point representation is a simple integer
  755.           scaled  (divided)  by  a power of two. If we denote an unscaled
  756.           integer  variable by upper case "X" and the scaled, fixed-point
  757.           variable  by  lower  case  "x,"  then x = X/2^b, where b is the
  758.           number of digits the binary point is shifted left. For example,
  759.           if  X  is a 16-bit, two's complement integer, and b=4, then "X"
  760.           has  values  ranging from -2^(15) to +2^(15)-1 and with minimum
  761.           step  size of 1, while the scaled value "x" ranges from -2^(11)
  762.           to +2^(11) - 1/(2^4) with a minimum step size of 1/(2^4).
  763.  
  764.           Note  that  the value of "b" is not part of the representation.
  765.           You won't see it in a register or as part of the data anywhere;
  766.           it is a parameter that the algorithm implementer must determine
  767.           and maintain.
  768.  
  769.           Fixed-point  representations place some very different rules on
  770.           operations than their floating-point counterparts. For example,
  771.           two  variables must be scaled the same in order to be added (or
  772.           subtracted). Thus it may be necessary to shift one or the other
  773.           operand   prior   to  adding.  Another  example  is  that  when
  774.           multiplying  two N-bit values with scale factors b0 and b1, the
  775.           result  is  scaled  (b0+b1) and requires 2*N bits in general in
  776.           order to avoid overflow and maintain precision.
  777.  
  778.           There   are   several   other   rules  and  considerations  for
  779.           fixed-point  arithmetic  that  are  commonly  encountered  when
  780.           implementing    algorithms.    For    more   information,   see
  781.           http://home.earthlink.net/~yatescr/papers.htm.
  782.  
  783.           Randy Yates [yates@ieee.org]
  784.  
  785.                    Previous section (1) Next section (3)
  786.  
  787.                    Previous section (2) Next section (4)
  788.  
  789.                  Q3: Programmable DSP chips and their software
  790.  
  791. Q3.1: What are the available DSP chips and chip architectures?
  792.  
  793.    Updated 05/07/02
  794.  
  795.           The  "big  four"  programmable DSP chip manufacturers are Texas
  796.           Instruments, with the TMS320C2000, TMS320C5000, and TMS320C6000
  797.           series  of  chips;  Motorola,  with the DSP56300, DSP56800, and
  798.           MSC8100  (StarCore)  series;  Agere  Systems  (formerly  Lucent
  799.           Technologies),  with  the  DSP16000 series; and Analog Devices,
  800.           with  the  ADSP-2100  and  ADSP-21000  ("SHARC") series. A good
  801.           overview of programmable DSP chips is published periodically in
  802.           EDN and Computer Design magazines.
  803.  
  804.           You  may  also  want  to check out Berkeley Design Technology's
  805.           home  page,  which  has  a  number  of articles on choosing DSP
  806.           processors,  as  well  as a "Pocket Guide to DSP Processors and
  807.           Cores" in both HTML and PDF formats. Brief overviews of various
  808.           DSP  processors,  cores,  and general-purpose processors can be
  809.           found at http://www.bdti.com/procsum/index.htm.
  810.  
  811.           Here's a less ambitious chip breakdown by manufacturer:
  812.  
  813.   Agere Systems (formerly Lucent Technologies):
  814.  
  815.    DSP16xxx:
  816.           100  to  170  MHz  16-bit  fixed-point  DSP.  The DSP16000 core
  817.           features  two multipliers with SIMD-like capabilities, a 20-bit
  818.           address   bus,   a   32-bit   address  bus,  and  eight  40-bit
  819.           accumulators.  The  chips  feature  two  serial  ports  and two
  820.           timers.
  821.  
  822.           The first-generation processor, the DSP16210, contains a single
  823.           DSP16000 core and 120 KB of internal RAM. The second-generation
  824.           DSP16410 incorporates two DSP16000 cores and 386 KB of internal
  825.           RAM.
  826.  
  827.   Analog Devices:
  828.  
  829.    ADSP-21xx:
  830.           10  to  80  MHz  16-bit  fixed  point DSPs; 40-bit accumulator;
  831.           24-bit  instructions.  Large  number  of  family  members  with
  832.           different  configurations  of  on-chip memory and serial ports,
  833.           timers, and host ports. ADSP-21mspxx members include an on-chip
  834.           codec.
  835.  
  836.    ADSP-219x:
  837.           160  MHz  16-bit  fixed  point DSPs; 40-bit accumulator; 24-bit
  838.           instructions.  Based on the ADSP-21xx family, and is is mostly,
  839.           but not completely, assembly source-code upward compatible with
  840.           the  ADSP-21xx  Adds  new  addressing  modes and an instruction
  841.           cache,  expands  address  space,  and  lengthens  pipeline (six
  842.           stages  compared  to  three  on  the ADSP21xx). Family includes
  843.           members containing multiple ADSP-219x cores.
  844.  
  845.    ADSP-21xxx ("SHARC"):
  846.           33  to 100 MHz floating-point DSP; Supports 32-bit fixed-point,
  847.           IEEE  format  32-bit floating-point, and 40-bit floating-point;
  848.           40-bit registers plus an 80-bit accumulator that can be divided
  849.           into two 32-bit registers and a 16-bit register.
  850.  
  851.           The  first-generation  SHARC, the ADSP-2106x, features a single
  852.           data  path, a 32-bit address bus, and 40-bit data bus. Versions
  853.           are  available  with  up to 512 KB of on-chip memory, up to six
  854.           communication ports, and up to 10 DMA channels.
  855.  
  856.           The second-generation ADSP-2116x has two parallel data paths, a
  857.           32-bit  address  bus,  and  a  64-bit  data  bus.  Versions are
  858.           available  with  up  to  512  KB  of  on-chip memory; up to six
  859.           communication ports, and up to 14 DMA channels.
  860.  
  861.           Analog  Devices  also  sells  the AD14000 series, which contain
  862.           four ADSP-2106x SHARC processors in a single-chip package.
  863.  
  864.    ADSP-2153x:
  865.           200 to 300 MHz 16-bit fixed point DSPs that can execute two MAC
  866.           instructions per cycle; based on the ADI/Intel MSA core. Uses a
  867.           mix  of  16-,  32-,  and  64-bit instructions. Features include
  868.           ability  to  operate  over  a  wide  range  of  frequencies and
  869.           voltages.
  870.  
  871.   Motorola:
  872.  
  873.    DSP563xx:
  874.           66  to 160 MHz 24-bit fixed-point DSP; most family members have
  875.           24-bit  address  and  data  busses.  The DSP563xx also features
  876.           56-bit   accumulators   (2),  timers,  serial  interface,  host
  877.           interface  port.  The  DSP56307  and  DSP56311 contain a filter
  878.           co-processor. Up to 1 MB of internal RAM.
  879.  
  880.    DSP568xx:
  881.           40  MHz  16-bit fixed point DSP; 36-bit accumulators (2), three
  882.           internal  address buses (two 16-bit, one 19-bit) and one 16-bit
  883.           external  address  bus;  three  16-bit internal data buses, one
  884.           16-bit  external  data  bus;  serial  ports, timers. 4-12 KB of
  885.           internal RAM. Most family members include an on-chip A/D.
  886.  
  887.    DSP5685x:
  888.           160  MHz  16-bit fixed point DSP based on the DSP568xx. Adds an
  889.           exponent detector and two accumulators, extends shifter and the
  890.           logic  unit  to  32  bits, and widens internal address and data
  891.           buses. The DSP5685x uses a 1X master clock rate rather than the
  892.           2X master clock rate used by the DSP568xx.
  893.  
  894.    MSC81xx:
  895.           The  300  MHz  MSC8101  is  the  first  processor  based on the
  896.           StarCore  SC140  core. It contains four parallel ALU units that
  897.           can  execute up to four MAC operations in a single clock cycle.
  898.           The   MSC8101   uses   variable-length  instructions.  Features
  899.           include: 512 KB on-chip RAM; 16 DMA channels; an on-chip filter
  900.           co-processor;  and  interfaces  for  ATM,  Ethernet,  E1/T1 and
  901.           E3/T3, and the PowerPC bus.
  902.  
  903.   Texas Instruments:
  904.  
  905.    TMS320C2xxx:
  906.           20-40  MHz  16-bit  fixed-point  DSPs  oriented toward low-cost
  907.           control applications; 16 bit data, 32 bit registers. The family
  908.           members  have a variety of peripherals, such as A/D converters,
  909.           41  I/O  pins,  and  16  PWM  outputs. A variety of RAM and ROM
  910.           configurations are available
  911.  
  912.           TI  also  sells  the  TMS320C2x family, an older version of the
  913.           chip with fewer features.
  914.  
  915.    TMS320C3x:
  916.           33-75  MHz  floating  point DSPs; 32-bit floating-point, 24-bit
  917.           fixed-point  data,  40-bit  registers;  DMA  controller; serial
  918.           ports; some support for multi-processor arrays. Various ROM and
  919.           RAM configurations.
  920.  
  921.    TMS320C54xx:
  922.           40  to  160  MHz 16-bit fixed-point DSPs with a large number of
  923.           specialized  instructions.  Many family members; the processors
  924.           differ  in  configuration  of  on-chip  ROM/RAM,  serial ports,
  925.           autobuffered   serial  ports,  host  ports,  and  time-division
  926.           multiplexed ports. On-chip RAM ranges from 10 KB to over 1 MB.
  927.  
  928.    TMS320C55xx:
  929.           144  to  200  MHz  dual-ALU variant of the TMS320C54xx that can
  930.           execute  two  MAC  instructions per cycle. Variable instruction
  931.           word  width.  Features include up to 320 KB internal RAM; 6 DMA
  932.           channels; 2 serial ports; and 2 timers.
  933.  
  934.    TMS320C62xx:
  935.           150-300  MHz  16-bit  fixed-point  DSP  with  VLIW  (very large
  936.           instruction   word),   load/store   architecture;   32   32-bit
  937.           registers;  very  deep  pipeline;  two  multipliers,  ALUs, and
  938.           shifters; cache.
  939.  
  940.    TMS320C64xx:
  941.           400-600  MHz  16-bit  fixed-point DSP based on the TMS320C62xx.
  942.           Adds  SIMD support to most execution units, including extensive
  943.           8-bit  SIMD  support. Also doubles data bandwidth and increases
  944.           size of on-chip memory.
  945.  
  946.    TMS320C67xx:
  947.           100-167  MHz 32-bit and 64-bit IEEE-754 floating-point DSP with
  948.           VLIW (very large instruction word), load/store architecture; 32
  949.           32-bit  registers;  very  deep pipeline; two multipliers, ALUs,
  950.           and shifters; cache.
  951.      _________________________________________________________________
  952.  
  953. Q3.2: What is the difference between a DSP and a microprocessor?
  954.  
  955.    Updated 04/02/01
  956.  
  957.           The  essential difference between a DSP and a microprocessor is
  958.           that   a   DSP  processor  has  features  designed  to  support
  959.           high-performance,  repetitive,  numerically intensive tasks. In
  960.           contrast,   general-purpose   processors   or  microcontrollers
  961.           (GPPs/MCUs for short) are either not specialized for a specific
  962.           kind   of   applications   (in   the  case  of  general-purpose
  963.           processors),   or   they   are  designed  for  control-oriented
  964.           applications  (in  the case of microcontrollers). Features that
  965.           accelerate performance in DSP applications include:
  966.  
  967.           + Single-cycle multiply-accumulate capability; high-performance
  968.             DSPs   often   have   two   multipliers   that   enable   two
  969.             multiply-accumulate  operations  per  instruction cycle; some
  970.             DSP have four or more multipliers
  971.           + Specialized   addressing   modes,   for   example,  pre-  and
  972.             post-modification  of  address pointers, circular addressing,
  973.             and bit-reversed addressing
  974.           + Most  DSPs  provide  various configurations of on-chip memory
  975.             and peripherals tailored for DSP applications. DSPs generally
  976.             feature multiple-access memory architectures that enable DSPs
  977.             to   complete   several   accesses  to  memory  in  a  single
  978.             instruction cycle
  979.           + Specialized   execution   control.  Usually,  DSP  processors
  980.             provide  a  loop  instruction  that  allows tight loops to be
  981.             repeated without spending any instruction cycles for updating
  982.             and  testing  the loop counter or for jumping back to the top
  983.             of the loop
  984.           + DSP  processors  are  known  for  their irregular instruction
  985.             sets,  which generally allow several operations to be encoded
  986.             in  a  single instruction. For example, a processor that uses
  987.             32-bit   instructions   may   encode   two   additions,   two
  988.             multiplications,  and  four  16-bit  data moves into a single
  989.             instruction. In general, DSP processor instruction sets allow
  990.             a  data  move  to be performed in parallel with an arithmetic
  991.             operation.  GPPs/MCUs,  in contrast, usually specify a single
  992.             operation per instruction
  993.  
  994.           While the above differences traditionally distinguish DSPs from
  995.           GPPs/MCUs,  in  practice  it  is  not  important  what  kind of
  996.           processor you choose. What is really important is to choose the
  997.           processor  that  is  best  suited  for  your  application; if a
  998.           GPP/MCU  is  better  suited for your DSP application than a DSP
  999.           processor,  the  processor of choice is the GPP/MCU. It is also
  1000.           worth  noting that the difference between DSPs and GPPs/MCUs is
  1001.           fading:  many  GPPs/MCUs now include DSP features, and DSPs are
  1002.           increasingly adding microcontroller features.
  1003.  
  1004.           [Ole Wolf, wolf@bdti.com]
  1005.      _________________________________________________________________
  1006.  
  1007. Q3.3: Software for Analog Devices DSPs
  1008.  
  1009.    Updated 05/08/02
  1010.  
  1011.   Q3.3.1: Where can I get a C compiler for the ADSP-21xx and ADSP-21xxx?
  1012.  
  1013.           The  G21  package  collects the free source code for the Analog
  1014.           Devices  GCC-based C compilers for their 21xxx (SHARC) and 21xx
  1015.           series  DSPs.  These  compilers  are  all  based on GCC version
  1016.           2.3.3.  Full  source  code for the compiler, assembler, linker,
  1017.           etc. is available at http://www.kvaleberg.com/g21.html.
  1018.  
  1019.           The  C  compilers  are available for the 210x series as well as
  1020.           for  the  SHARC.  The assemblers and linkers are only available
  1021.           for  the  SHARC.  The  source code is based on what is released
  1022.           under  GPL  by ADI, but is adapted for use with Linux and other
  1023.           Unix variants.
  1024.  
  1025.           [Egil Kvaleberg, egil@kvaleberg.no]
  1026.      _________________________________________________________________
  1027.  
  1028.   Q3.3.2: Where can I get tools for the ADSP-21xxx?
  1029.  
  1030.           SHARC  development tools are avaiable for Acorn/BSD, Linux, and
  1031.           other  platforms.  The  tools  include  frontend/preprocessor ,
  1032.           assembler,  linker,  archiver, a utility to generate ROM images
  1033.           for  eprom  burners, and other utilities The supplied assembler
  1034.           is  not  part  of  the gnu archive, but is based on a assembler
  1035.           originaly  written  by  P. Lantto. Source code and binaries are
  1036.           available at
  1037.           http://www.ww.tu-freiberg.de/~pberg/fgm/support/index.html.
  1038.  
  1039.           [Theo Markettos atm26@cam.ac.uk]
  1040.      _________________________________________________________________
  1041.  
  1042.   Q3.3.3: Where can I get an assembler for the ADSP-2105?
  1043.  
  1044.           John  Sture  has  developed an assembler for the Analog Devices
  1045.           ADSP-2105.   The   latest   version   can   be   obtained  from
  1046.           http://www.suresoft.ca.  (Follow  the links to the FTP site and
  1047.           select  beta0.4.1src.tar.gz.) Requires Analog Devices' ld21.exe
  1048.           version  5.1  linker  or  equivalent  for  linking executables.
  1049.           Source code to the assembler is included under the terms of the
  1050.           GNU public license.
  1051.  
  1052.           [John Sture, jsture@vcn.bc.ca]
  1053.      _________________________________________________________________
  1054.  
  1055.   Q3.3.4: Where can I get algorithms or libraries for Analog Devices DSPs?
  1056.  
  1057.           The  number  for  the  Analog Devices DSP BBS is (617) 461-4258
  1058.           (300, 1200, 2400, 9600, 14400 bps), 8N1.
  1059.  
  1060.           You  can  also  find  files  on  Analog  Devices'  web  site at
  1061.           http://www.analog.com/support/Design_Support.html,  or at their
  1062.           FTP site at ftp://ftp.analog.com.
  1063.  
  1064.           [Analog Devices DSP Applications, dsp_applications@analog.com]
  1065.      _________________________________________________________________
  1066.  
  1067. Q3.4: Software for Agere Systems (Formerly Lucent Technologies) DSPs
  1068.  
  1069.           Agere  Systems provides application libraries for their DSPs at
  1070.           http://www.lucent.com/micro/wam/tse/.
  1071.      _________________________________________________________________
  1072.  
  1073. Q3.5: Software for Motorola DSPs
  1074.  
  1075.    Updated 05/07/02
  1076.  
  1077.           Motorola  provides  free software development tools that may be
  1078.           downloaded from the Motorola Web site at
  1079.           http://e-www.motorola.com/webapp/sps/site/prod_summary.jsp?code
  1080.           =MSW3SDK000AA&nodeId=01M983916044937.
  1081.  
  1082.   Q3.5.1: Where can I get a free assembler for the Motorola DSP56000?
  1083.  
  1084.           A  free  assembler  for the Motorola DSP56000 exists, thanks to
  1085.           Quinn  Jensen, jensenq@zdomain.com. The current version is 1.2.
  1086.           It  is  also available at ftp://ftp.zdomain.com/pub/jensenq/a56
  1087.           and http://www.zdomain.com/a56.html.
  1088.      _________________________________________________________________
  1089.  
  1090.   Q3.5.2: Where can I get a free C compiler for the Motorola DSP56000?
  1091.  
  1092.           There  are  two  separate  compiler  sources  for  the Motorola
  1093.           DSP56000.  One  is  the port of gcc 1.40 done by Andrew Sterian
  1094.           (asterian@umich.edu) and the other is a port of gcc 1.37.1 done
  1095.           by Motorola and returned to the FSF. Andrew's port has bowed to
  1096.           Motorola's  version. Both may be portable to gcc2.x.x with some
  1097.           effort  required. Neither of these comes with an assembler, but
  1098.           you  can  get a free DSP56000 assembler elsewhere (see question
  1099.           3.5.1,  above).  The  Motorola  gcc source is available for FTP
  1100.           from:
  1101.           ftp://nic.funet.fi/pub/ham/dsp/dsp56k-tools/dsp56k-gcc.tar.Z
  1102.           and
  1103.           ftp://mirriwinni.cse.rmit.edu.au/pub/uP/56k/g56k.tar.gz-1996.
  1104.  
  1105.           From  Andrew  Sterian, asterian@umich.edu: "My DSP56K compiler,
  1106.           while   not   supported  nor  as  well  tested  as  Motorola's,
  1107.           implements  fixed-point  arithmetic  rather than floating-point
  1108.           arithmetic.  This  may  be  suitable for some applications. The
  1109.           5615  compiler  also  implements fixed-point arithmetic. To the
  1110.           best  of  my knowledge, Motorola does not have a C compiler for
  1111.           the  5615  family,  although alternatives may exist. As of this
  1112.           writing  (January 1997) I have not worked with Motorola DSPs or
  1113.           compiler  software for nearly 5 years so questions regarding my
  1114.           compilers may well be met with "Ummm... I have no idea."
  1115.  
  1116.           Both  compilers  were  posted to alt.sources so any Usenet site
  1117.           that  archives  this  newsgroup  will  have a copy. I have also
  1118.           found the 5616 compiler at
  1119.           ftp://ftp.funet.fi/pub/ham/dsp/dsp56k-tools/gcc5616.tar.Z.
  1120.           <<<<<<< 3.htm
  1121.  
  1122.           Pete   gray  has  announced  the  availability  of  a  Small  C
  1123.           cross-compiler  (with  source)  and  assembler for the Motorola
  1124.           DSP56800, available for download from
  1125.           http://home.attbi.com/~petegray.  Targetting  a  simple DOS-box
  1126.           host, developed and tested using djgpp
  1127.           (http://www.delorie.com/djgpp/)  and Metrowerks CodeWarrior, in
  1128.           conjunction  with  NMI's (www.newmicros.com) IsoPod(TM) - based
  1129.           on =======
  1130.           href="http://www.newmicros.com">http://www.newmicros.com
  1131.  
  1132.           )  IsoPod(TM)  -  based  on  >>>>>>>  1.7  the  DSP56F805.  The
  1133.           assembler  generates  output  suitable for Motorola's free JTAG
  1134.           flash loader.
  1135.  
  1136.           Small    C    language    reference    available    online   at
  1137.           http://www.ddjembedded.com/languages/smallc/
  1138.  
  1139.           Pete  also  asks  for  comments  and  feedback  to  be  sent to
  1140.           petegray@ieee.org =======
  1141.  
  1142.           Pete   Gray  has  announced  the  availability  of  a  Small  C
  1143.           cross-compiler  (with  source)  and  assembler for the Motorola
  1144.           DSP56800, available for download from
  1145.           http://home.attbi.com/~petegray.  Targetting  a  simple DOS-box
  1146.           host, developed and tested using djgpp
  1147.           (http://www.delorie.com/djgpp/)  and Metrowerks CodeWarrior, in
  1148.           conjunction  with NMI's (http://www.newmicros.com) IsoPod(TM) -
  1149.           based on the DSP56F805. The assembler generates output suitable
  1150.           for Motorola's free JTAG flash loader.
  1151.  
  1152.           Small    C    language    reference    available    online   at
  1153.           http://www.ddjembedded.com/languages/smallc/
  1154.  
  1155.           Pete  also  asks  for  comments  and  feedback  to  be  sent to
  1156.           petegray@ieee.org >>>>>>> 1.5
  1157.      _________________________________________________________________
  1158.  
  1159.   Q3.5.3 Where can I get a disassembler for the Motorola DSP56000?
  1160.  
  1161.           Miloslaw  Smyk  has  released  an open source (BSD style) 5600x
  1162.           disassembly   library.   It   is   available  for  download  at
  1163.           https://sourceforge.net/projects/lib5600x    [Miloslaw    Smyk,
  1164.           thorgal@wmfh.org.pl]
  1165.      _________________________________________________________________
  1166.  
  1167.   Q3.5.4: Where can I get algorithms and libraries for Motorola DSPs?
  1168.  
  1169.           Motorola  provides  a  software  archive  that is available via
  1170.           World-Wide Web from the software page at
  1171.           http://www.mot.com/SPS/DSP/software/.   The   archive  includes
  1172.           macros  for  filters  (FIR,  IIR,  adaptive) and floating-point
  1173.           functions. [Tim Baggett]
  1174.      _________________________________________________________________
  1175.  
  1176.   Q3.5.5: Where can I get NeXT-compatible Motorola DSP56001 code?
  1177.  
  1178.           Try FTP at ccrma-ftp.stanford.edu. The /pub/ directory contains
  1179.           free  code  for  the  Motorola  DSP56001 and the NeXT platform.
  1180.           [bil@ccrma.Stanford.EDU]
  1181.      _________________________________________________________________
  1182.  
  1183.   Q3.5.6: Where can I get emulators for the 68HC11 (6811) processor?
  1184.  
  1185.           While  the  68HC11  is  not  a  DSP  processor,  emulators  are
  1186.           available  for  those  who  might be interested in doing DSP on
  1187.           these processors:
  1188.  
  1189.           + New   Mexico   State   University  (NMSU)  simulator  engine,
  1190.             ftp://crl.nmsu.edu/pub/non-lexical/6811/   (Unix).  Simulator
  1191.             engine with a command-line interface.
  1192.           + Sim6811,
  1193.             ftp://cherupakha.media.mit.edu/pub/projects/6811/sim6811/
  1194.             (Mac).  Screen-oriented  user  interface  based  on  the NMSU
  1195.             simulator engine (plus bug fixes).
  1196.           + THRSim11,   http://programfiles.com/index.asp?ID=8366  allows
  1197.             you  to  edit,  assemble, simulate and debug programs for the
  1198.             68HC11  on  Windows  95/98.  THRSim11 simulates the CPU, ROM,
  1199.             RAM,   all   memory  mapped  I/O  ports,  and  the  on  board
  1200.             peripherals.
  1201.      _________________________________________________________________
  1202.  
  1203. Q3.6: Software for Texas Instruments DSPs
  1204.  
  1205.    Updated 05/07/02
  1206.  
  1207.   Q3.6.1: Where can I get free algorithms or libraries for TI DSPs?
  1208.  
  1209.           nic.funet.fi  has some old, apparently public domain, assembler
  1210.           and  related tools from TI for the TMS320 family. The directory
  1211.           is /pub/ham/dsp.
  1212.  
  1213.           [Antti-Pekka Virtanen, antsu@utu.fi]
  1214.  
  1215.           TI  has  a number of free algorithms available on their website
  1216.           at
  1217.           http://dspvillage.ti.com/docs/sdstools/sdscommon/showsdsinfo.jh
  1218.           tml?templateId=57&path=templatedata/cm/ccstudio/data/free_tools
  1219.           .
  1220.  
  1221.           TI's  world-wide  web  site  is  http://www.ti.com.  The TI DSP
  1222.           bulletin    board   is   mirrored   on   ftp.ti.com,   and   on
  1223.           mirriwinni.cse.rmit.edu.au.  The  TI  site is the official one,
  1224.           but    has    no   user   contributed   software.   The   file:
  1225.           ftp://mirriwinni.cse.rmit.edu.au/mirrors/tibbs/00readme  (might
  1226.           be  broken)  provides  further  guidance.  Please  restrict FTP
  1227.           session  to  outside  of 8 am to 6 pm local time (10 pm to 8 am
  1228.           GMT). [Brad Hards, bradh@gil.com.au]
  1229.  
  1230.           {  If  anyone  knows  of any other sources for TI DSP software,
  1231.           please let us know at comp-dsp-faq@bdti.com. Thanks! }
  1232.      _________________________________________________________________
  1233.  
  1234.   Q3.6.2: Where can I get free development tools for TI DSPs?
  1235.  
  1236.           TI  development  tools are available for free 30 day evaluation
  1237.           on the TI website. Go to
  1238.           http://www.ti.com/sc/docs/tools/index.htm.
  1239.      _________________________________________________________________
  1240.  
  1241.   Q3.6.3: Where can I get a free C compiler for the TI TMS320C3x/4x?
  1242.  
  1243.           The  GNU  binutils  2.11  and  later have been ported to the TI
  1244.           C54xx/IBM  C54DSP.  Most  of  the binutils tools are supported,
  1245.           including  the  assembler, linker and objdump. The assembler is
  1246.           source-compatible  with  the TI assembler. The GNU binutils are
  1247.           available  from  http://sources.redhat.com/binutils/  GDB ports
  1248.           for c25/c5x/c54x are also available.
  1249.  
  1250.           [Timothy Wall]
  1251.  
  1252.           Dr. Michael P. Hayes has written a GNU C-based compiler for the
  1253.           TMS320C30     and     TMS320C40    families,    available    at
  1254.           http://www.elec.canterbury.ac.nz/c4x.   The   current   version
  1255.           patches  against  gcc-2.8.1; support is moving to egcs-1.2. The
  1256.           compiler  is  freely redistributable under the terms of the GNU
  1257.           Public  License.  Front-ends  are also available for C++, Java,
  1258.           Fortran 77, Pascal, Ada 95, among others.
  1259.  
  1260.           [Dr. Michael P. Hayes, m.hayes@elec.canterbury.ac.nz]
  1261.      _________________________________________________________________
  1262.  
  1263.   Q3.6.4: Where can I get a free assembler for the TI TMS320C3x/4x?
  1264.  
  1265.           Ted  Rossin  has  written  an  assembler  and  linker  for  the
  1266.           TMS320C30.  In  his  words, "It is somewhat limited by the fact
  1267.           that  it can't handle expressions but it has worked fine for me
  1268.           over  the  past  few  years. There is no manual because it is a
  1269.           clone  of  the  TI  assembler  and  linker.  However the linker
  1270.           command  files  use a different (easier to use) syntax. It runs
  1271.           on  HP-UX  workstations, Macs, IBM clones and believe it or not
  1272.           the Atari-ST (because I developed the code on it)."
  1273.  
  1274.           [Ted Rossin, rossin@fc.hp.com]
  1275.  
  1276.           Dr.  Michael P. Hayes has written a GNU-based assembler for the
  1277.           TMS320C30     and     TMS320C40    families,    available    at
  1278.           http://www.elec.canterbury.ac.nz/c4x.   The   current   version
  1279.           patches  against  binutils-2.7. According to Michael Hayes, the
  1280.           assembler  syntax  is  compatible  with  the  Texas Instruments
  1281.           TMS320C30  assembler,  although  not  all the Texas Instruments
  1282.           directives  are  supported. The binutils include a linker (ld),
  1283.           archiver  (ar), disassembler (objdump), and other miscellaneous
  1284.           utilities.  The  object  format  of the assembler is compatible
  1285.           with  the  COFF format used by the Texas Instruments assembler.
  1286.           The   assembler   and   other   binary   utilities  are  freely
  1287.           redistributable under the terms of the GNU Public License.
  1288.  
  1289.           [Dr. Michael P. Hayes, m.hayes@elec.canterbury.ac.nz]
  1290.      _________________________________________________________________
  1291.  
  1292.   Q3.6.5: Where can I get a free simulator for the TI TMS320C3x/4x?
  1293.  
  1294.           A  freely  distributable instruction set architecture simulator
  1295.           is  available  for the TMS320C30 DSP as part of the Web-Enabled
  1296.           Simulation framework from UT Austin at
  1297.           http://anchovy.ece.utexas.edu/~arifler/wetics/.
  1298.  
  1299.           We  have  released  all of the source code, as well as prebuilt
  1300.           C30   simulators   for   Windows   '95/NT   and   Solaris   2.5
  1301.           architectures.
  1302.  
  1303.           The  C30  simulator  is bit-, cycle-, and instruction-accurate.
  1304.           The  behavior of the C30 simulator has been validated against a
  1305.           C30 DSK board. The C30 simulator correctly reports interlocking
  1306.           and  pipeline flushes, so it provides a convenient way to check
  1307.           C30  programs  for  these  hidden  delays. The C30 simulator is
  1308.           based   on   the  C30  DSK  tools  by  Keith  Larson  at  Texas
  1309.           Instruments.
  1310.  
  1311.           [Brian Evans, bevans@combo.ece.utexas.edu]
  1312.  
  1313.           Herman  Ten Brugge (haj.ten.brugge@net.hcc.nl) has also written
  1314.           a  GNU  debugger  (GDB)  based  simulator for the TMS320C30 and
  1315.           TMS320C40,      available      via     anonymous     FTP     at
  1316.           http://www.elec.canterbury.ac.nz/c4x.     This     is    freely
  1317.           redistributable under the terms of the GNU Public License.
  1318.  
  1319.           This simulator allows you to debug your programs without having
  1320.           to  a  connect  to  a  real  C[34]x target system. It will also
  1321.           profile  your code showing you where the pipeline conflicts are
  1322.           occurring.  You  can  connect  I/O  ports  to  files (or TCP/IP
  1323.           sockets),  trigger  interrupts,  examine the cache etc. It will
  1324.           detect  different  threads  of  control  running and generate a
  1325.           profile summary for each thread, annotating both the C code and
  1326.           assembler code with the number of executed cycles.
  1327.  
  1328.           [Dr. Michael P. Hayes, m.hayes@elec.canterbury.ac.nz]
  1329.      _________________________________________________________________
  1330.  
  1331.   Q3.6.6: What is Tick? Where can I get it?
  1332.  
  1333.           Tick  is  a  TMS320C40  parallel  network  detection and loader
  1334.           utility.
  1335.  
  1336.           It is available from:
  1337.           ftp://mirriwinni.cse.rmit.edu.au/mirrors/tibbs/UserContributed.
  1338.  
  1339.           Supports:  Transtech,  Hunt, and Traquair boards hosted by DOS,
  1340.           SunOS, Linux (a PC unix)
  1341.  
  1342.                    Previous section (2) Next section (4)
  1343.