Mercurial > pygar
view documents/AudioProcessing.lyx @ 66:6bd9397cd591 pygar svn.67
[svn r67] added a couple sound files
author | punk |
---|---|
date | Tue, 11 May 2010 21:02: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 3453 \begin_document4 \begin_header5 \textclass article6 \use_default_options true7 \language english8 \inputencoding auto9 \font_roman default10 \font_sans default11 \font_typewriter default12 \font_default_family default13 \font_sc false14 \font_osf false15 \font_sf_scale 10016 \font_tt_scale 10018 \graphics default19 \paperfontsize default20 \use_hyperref false21 \papersize default22 \use_geometry false23 \use_amsmath 124 \use_esint 125 \cite_engine basic26 \use_bibtopic false27 \paperorientation portrait28 \secnumdepth 329 \tocdepth 330 \paragraph_separation indent31 \defskip medskip32 \quotes_language english33 \papercolumns 134 \papersides 135 \paperpagestyle default36 \tracking_changes false37 \output_changes false38 \author ""39 \end_header41 \begin_body43 \begin_layout Title44 Multi-Voice Audio Playback45 \end_layout47 \begin_layout Author48 Laurel Pardue, Robert McIntyre49 \end_layout51 \begin_layout Section*52 Micro-Architecture53 \end_layout55 \begin_layout Subsection*56 A quick summary of our system57 \end_layout59 \begin_layout Standard60 The audio data (61 \begin_inset Quotes eld62 \end_inset64 samples65 \begin_inset Quotes erd66 \end_inset68 ) start in the memory, but are soon pulled into action by the DMA (direct69 memory access).70 The DMA sends the samples to a chain of 0 or more71 \emph on72 soft-cores73 \emph default74 , where they are transformed according to the soft-cores' algorithms.75 After running the gauntlet of soft-cores, the samples flow first to a buffering76 FIFO, and finally to a77 \emph on78 mixer79 \emph default80 , which sends the samples off to be played by speakers of stored in a file.81 \end_layout83 \begin_layout Subsection*84 A more detailed look a our system85 \end_layout87 \begin_layout Standard88 Our audio pipeline starts its life with whatever music we want to play already89 in memory.90 The music has multiple tracks, or91 \begin_inset Quotes eld92 \end_inset94 voices,95 \begin_inset Quotes erd96 \end_inset98 which we arrange on the memory in contiguous sequences.99 Therefore, each voice starts at its own start-address, and continues on100 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 though103 that might mean that there is a lot of wasted space in the form of dead104 areas with no sound.105 \end_layout107 \begin_layout Standard108 When the processing starts, the DMA reads in each voice and sends the audio109 data (110 \begin_inset Quotes eld111 \end_inset113 samples114 \begin_inset Quotes erd115 \end_inset117 ) off to a chain of soft-cores.118 The DMA knows to which chain the samples should be forwarded by looking119 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 line121 takes the samples and performs some sort of audio operation, producing122 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 that125 each soft-core contains to be able to produce audio samples at the desired126 44khz rate, but we allow an arbitrary setup time for the soft-core to get127 ready.128 That way, a pipelined processor can take its time and fill up its pipeline129 completely with no worries.130 Once the soft-core starts producing samples, it must produce them at a131 rate of at least 44khz forever.132 If every soft-core in the chain obeys this timing condition, then the whole133 chain will as well, so the entire chain of soft-cores can be treated as134 a single big soft-core for timing purposes.135 Our soft-cores are just Lab 5 processors preloaded with specific audio136 processing algorithms.137 \end_layout139 \begin_layout Standard140 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 once146 all 12 FIFOs are full.147 Because of the timing constraints we impose on our soft-cores, once every148 FIFO has at least one sample, all 12 will forever more be able to supply149 samples at 44khz.150 The mixer therefore waits until all 12 FIFOs have elements and then reads151 samples from all FIFOS at a rate of 44khz.152 The mixer combines the samples through simple addition and scaling, creating153 a single stream of sample data, which is sent back from the FPGA to the154 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 running156 everything through its own internal buffer FIFO clocked at 44khz.157 \end_layout159 \end_body160 \end_document