annotate documents/AudioProcessing.lyx @ 36:99519a031813 pygar svn.37

[svn r37] moved the server into audioCorePipeline
author punk
date Tue, 04 May 2010 18:54:54 -0400
parents 6d1ff93e3afa
children
rev   line source
rlm@0 1 #LyX 1.6.4 created this file. For more info see http://www.lyx.org/
rlm@0 2 \lyxformat 345
rlm@0 3 \begin_document
rlm@0 4 \begin_header
rlm@0 5 \textclass article
rlm@0 6 \use_default_options true
rlm@0 7 \language english
rlm@0 8 \inputencoding auto
rlm@0 9 \font_roman default
rlm@0 10 \font_sans default
rlm@0 11 \font_typewriter default
rlm@0 12 \font_default_family default
rlm@0 13 \font_sc false
rlm@0 14 \font_osf false
rlm@0 15 \font_sf_scale 100
rlm@0 16 \font_tt_scale 100
rlm@0 17
rlm@0 18 \graphics default
rlm@0 19 \paperfontsize default
rlm@0 20 \use_hyperref false
rlm@0 21 \papersize default
rlm@0 22 \use_geometry false
rlm@0 23 \use_amsmath 1
rlm@0 24 \use_esint 1
rlm@0 25 \cite_engine basic
rlm@0 26 \use_bibtopic false
rlm@0 27 \paperorientation portrait
rlm@0 28 \secnumdepth 3
rlm@0 29 \tocdepth 3
rlm@0 30 \paragraph_separation indent
rlm@0 31 \defskip medskip
rlm@0 32 \quotes_language english
rlm@0 33 \papercolumns 1
rlm@0 34 \papersides 1
rlm@0 35 \paperpagestyle default
rlm@0 36 \tracking_changes false
rlm@0 37 \output_changes false
rlm@0 38 \author ""
rlm@0 39 \end_header
rlm@0 40
rlm@0 41 \begin_body
rlm@0 42
rlm@0 43 \begin_layout Title
rlm@0 44 Multi-Voice Audio Playback
rlm@0 45 \end_layout
rlm@0 46
rlm@0 47 \begin_layout Author
rlm@0 48 Laurel Pardue, Robert McIntyre
rlm@0 49 \end_layout
rlm@0 50
rlm@0 51 \begin_layout Section*
rlm@0 52 Micro-Architecture
rlm@0 53 \end_layout
rlm@0 54
rlm@0 55 \begin_layout Subsection*
rlm@0 56 A quick summary of our system
rlm@0 57 \end_layout
rlm@0 58
rlm@0 59 \begin_layout Standard
rlm@0 60 The audio data (
rlm@0 61 \begin_inset Quotes eld
rlm@0 62 \end_inset
rlm@0 63
rlm@0 64 samples
rlm@0 65 \begin_inset Quotes erd
rlm@0 66 \end_inset
rlm@0 67
rlm@0 68 ) start in the memory, but are soon pulled into action by the DMA (direct
rlm@0 69 memory access).
rlm@0 70 The DMA sends the samples to a chain of 0 or more
rlm@0 71 \emph on
rlm@0 72 soft-cores
rlm@0 73 \emph default
rlm@0 74 , where they are transformed according to the soft-cores' algorithms.
rlm@0 75 After running the gauntlet of soft-cores, the samples flow first to a buffering
rlm@0 76 FIFO, and finally to a
rlm@0 77 \emph on
rlm@0 78 mixer
rlm@0 79 \emph default
rlm@0 80 , which sends the samples off to be played by speakers of stored in a file.
rlm@0 81 \end_layout
rlm@0 82
rlm@0 83 \begin_layout Subsection*
rlm@0 84 A more detailed look a our system
rlm@0 85 \end_layout
rlm@0 86
rlm@0 87 \begin_layout Standard
rlm@0 88 Our audio pipeline starts its life with whatever music we want to play already
rlm@0 89 in memory.
rlm@0 90 The music has multiple tracks, or
rlm@0 91 \begin_inset Quotes eld
rlm@0 92 \end_inset
rlm@0 93
rlm@0 94 voices,
rlm@0 95 \begin_inset Quotes erd
rlm@0 96 \end_inset
rlm@0 97
rlm@0 98 which we arrange on the memory in contiguous sequences.
rlm@0 99 Therefore, each voice starts at its own start-address, and continues on
rlm@0 100 for as long as it needs.
rlm@0 101 We cap each voice with an end-of-file marker.
rlm@0 102 We make every voice the same length to simplify timing issues, even though
rlm@0 103 that might mean that there is a lot of wasted space in the form of dead
rlm@0 104 areas with no sound.
rlm@0 105 \end_layout
rlm@0 106
rlm@0 107 \begin_layout Standard
rlm@0 108 When the processing starts, the DMA reads in each voice and sends the audio
rlm@0 109 data (
rlm@0 110 \begin_inset Quotes eld
rlm@0 111 \end_inset
rlm@0 112
rlm@0 113 samples
rlm@0 114 \begin_inset Quotes erd
rlm@0 115 \end_inset
rlm@0 116
rlm@0 117 ) off to a chain of soft-cores.
rlm@0 118 The DMA knows to which chain the samples should be forwarded by looking
rlm@0 119 up the samples' voice in a hash table read at startup.
rlm@0 120 Once the samples enter the soft-core chain, the first soft-core in line
rlm@0 121 takes the samples and performs some sort of audio operation, producing
rlm@0 122 modified audio samples.
rlm@0 123 These samples feed into the next soft-core which performs a different algorithm.
rlm@0 124 As condition for functional correctness, we require the algorithm that
rlm@0 125 each soft-core contains to be able to produce audio samples at the desired
rlm@0 126 44khz rate, but we allow an arbitrary setup time for the soft-core to get
rlm@0 127 ready.
rlm@0 128 That way, a pipelined processor can take its time and fill up its pipeline
rlm@0 129 completely with no worries.
rlm@0 130 Once the soft-core starts producing samples, it must produce them at a
rlm@0 131 rate of at least 44khz forever.
rlm@0 132 If every soft-core in the chain obeys this timing condition, then the whole
rlm@0 133 chain will as well, so the entire chain of soft-cores can be treated as
rlm@0 134 a single big soft-core for timing purposes.
rlm@0 135 Our soft-cores are just Lab 5 processors preloaded with specific audio
rlm@0 136 processing algorithms.
rlm@0 137 \end_layout
rlm@0 138
rlm@0 139 \begin_layout Standard
rlm@0 140 Eventually, the samples make their way to the end of the chain of soft-cores.
rlm@0 141 Every chain of soft-cores ends in a FIFO.
rlm@0 142 For this project, we will have 12 separate voices.
rlm@0 143 Therefore, there will be 12 soft-core chains, each with a FIFO at its end,
rlm@0 144 one for each voice.
rlm@0 145 Each of the 12 FIFOs leads to the mixer, which only begins operation once
rlm@0 146 all 12 FIFOs are full.
rlm@0 147 Because of the timing constraints we impose on our soft-cores, once every
rlm@0 148 FIFO has at least one sample, all 12 will forever more be able to supply
rlm@0 149 samples at 44khz.
rlm@0 150 The mixer therefore waits until all 12 FIFOs have elements and then reads
rlm@0 151 samples from all FIFOS at a rate of 44khz.
rlm@0 152 The mixer combines the samples through simple addition and scaling, creating
rlm@0 153 a single stream of sample data, which is sent back from the FPGA to the
rlm@0 154 host computer where we play the stream and/or save it to a file.
rlm@0 155 The mixer ensures that it outputs samples at a rate of 44khz by running
rlm@0 156 everything through its own internal buffer FIFO clocked at 44khz.
rlm@0 157 \end_layout
rlm@0 158
rlm@0 159 \end_body
rlm@0 160 \end_document