DOC PREVIEW
MIT 6 375 - Lab 1- A Simple Audio Pipeline

This preview shows page 1-2-3 out of 8 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 8 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 8 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 8 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 8 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

IntroductionLab OrganizationGetting StartedCompiling and Simulating with the Bluespec WorkbenchWriting FIR Filters in BluespecBackgroundFirst FIR FilterBluespec and Static ElaborationUsing a Multi-Stage MultiplierDiscussion QuestionsWhat to Turn InLab 1: A Simple Audio Pipeline6.375 Laboratory 1Assigned: February 2, 2011Due: February 11 20111 IntroductionThis lab is the beginning of a series of labs in which we will design the hardware for a DigitalSignal Processor (DSP) for audio signals and run it on an FPGA. Audio processing applications aregood candidates for hardware implementations since we are interested both in low power and highthroughput, especially if we are dealing with real-time applications or running on mobile platforms.Figure 1 shows a high-level picture of the audio pipeline and the driving software infrastructurewe will use in a later lab when we run the audio pipeline on an FPGA for real. The softwarecomponent runs on the host processor and is responsible for opening the audio file, streaming itscontents across the serial communication channel to the hardware, retrieving the output of thepipeline, and storing the results. This first lab will not use FPGAs, saving the challenges of usingFPGAs for later labs.Convert toPCMConvert from PCMAudioHardwarePipelineFPGA (XUP v5)InputHost Machine (X86)OutputCommunicationChannelSerialFigure 1: High-level Audio Pipeline DiagramInputPCMOutputPCMPitchModulationIFFTFFTBand-PassFilterHardware Audio PipelineFigure 2: Audio Pipeline Made of BlocksThe box marked Hardware Audio Pipeline in figure 1 contains the digital signal processinghardware which will be our focus in this and following labs. Hardware of this type usually consistsof a series of blocks, as depicted in figure 2. For example, it might begin with a band-pass filter toremove unwanted frequencies. After that, there could be an FFT (Fast Fourier Transform) modulewhich converts the signal from the time domain to the frequency domain. Once in the frequencydomain the signal can be modified by any number of hardware functions such as pitch modulation.The final blocks would include an IFFT (Inverse FFT) to convert it back to the time domain, andpossibly a windowing function.We begin our audio processor with the hardware audio pipeline empty, essentially a loop-backdevice. However, by the end of this lab, we will add a FIR (Finite Impulse Response) filter, servingin place of the band pass filter, which can be used to attenuate specified frequency ranges. Over thenext few weeks, we will augment the pipeline further.1audio/common/AudioProcessorTypes.bsvFilterCoefficients.bsvMultiplier.bsvTestDriver.bsvdata/mitrib_short_filtered.pcmmitrib_short.pcmfir/FIRFilter.bsvfir.bspecFigure 3: Lab1 code directory structure.1.1 Lab OrganizationThe lab begins by describing how to use the Bluespec Workstation to compile and simulate yourdesign. Bluespec code for a trivial audio pipeline which passes through values unchanged is provided.We then walk through an implementation of a simple 8 tap FIR filter written in Bluespec,describing in detail what each part of the code is for. We will ask you some questions to guide yourexploration of some of the features of the Bluespec language.Once you understand the FIR filter and have it running in simulation we provide an opportunityto write your own Bluespec code by challenging you to implement the FIR filter using a multistagemultiplier, which will require a slightly different microarchitecture than the original FIR filter wepresent.2 Getting StartedAll of the 6.375 laboratory assignments should be completed on an Athena/Linux workstation.Please see the course website for more information on the computing resources available for 6.375students. Once you have logged into an Athena/Linux workstation you will need to setup the 6.375toolflow with the following commands.$ add 6.375$ source /mit/6.375/setup.shWe will be using git to manage your 6.375 laboratory assignments. Every student has their ownbare repository on the course locker to use when submitting code. To work on your code start bymaking a local clone of the bare repository using the following command.$ git clone $GITROOT $USERThe repository includes code provided for this lab. After running the clone command you shouldsee this code in a newly created directory with the same name as your username.While we will present you with all the git commands you need to submit your code when youare done with the lab, git has many more valuable features you are welcome to take advantage of.The internet is a good place to learn more about git.3 Compiling and Simulating with the Bluespec WorkbenchThe directory layout for the code provided is shown in figure 3.2common/AudioProcessorTypes.bsv defines the Bluespec interface we will be using for our audiopipeline throughout this series of labs. It defines an audio sample as a 16 bit signed integer, andthe AudioProcessor interface, which contains two methods. The putSampleInput method iscalled with the next input sample data. The getSampleOutput method gets the sample dataprovided by your audio pipeline which is some transformation of the input sample data.common/TestDriver.bsv contains Bluespec code to drive the audio pipeline module in simulation.fir/FIRFilter.bsv defines an initial implementation of an empty audio pipeline which simplypasses the input samples as is to the output without any transformation.We can simulate the hardware described by the Bluespec code to get an idea of how it workswithout having to deal with the complications of real hardware, which are many, even for such asimple design as we are working with.• Navigate to the fir/ directory and start up Bluespec Workstation.audio$ cd firaudio/fir$ bluespec fir.bspec&• The Bluespec Workstation GUI will appear. Select Build->Compile This compiles the Blue-spec source code.• Select Build->Link. This creates the executable out which can be used to simulate thehardware described by the top level module mkTestdriver. The executable file can then berun like any program. The test driver code provided reads input audio file from a PCM (PulseCoded Modulation) file called in.pcm, passes it to your audio pipeline, and writes the outputfrom your pipeline to out.pcm. We have included a sample PCM audio file in the data/ foldercalled mitrib short.pcm, along with the expected output PCM file for the filtered audio usingthe filters we write later in the lab.You can convert your own audio files to and


View Full Document

MIT 6 375 - Lab 1- A Simple Audio Pipeline

Documents in this Course
IP Lookup

IP Lookup

15 pages

Verilog 1

Verilog 1

19 pages

Verilog 2

Verilog 2

23 pages

Encoding

Encoding

21 pages

Quiz

Quiz

10 pages

IP Lookup

IP Lookup

30 pages

Load more
Download Lab 1- A Simple Audio Pipeline
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lab 1- A Simple Audio Pipeline and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lab 1- A Simple Audio Pipeline 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?