view documents/AudioProcessing.lyx @ 28:3958de09a7c1 pygar svn.29

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