DOC PREVIEW
Toronto ECE 532 - FPGA Implementation of the NES Audio Processing Unit

This preview shows page 1-2-20-21 out of 21 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 21 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 21 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 21 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 21 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 21 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

ECE532 Group ReportFPGA Implementation of the NES Audio Processing UnitCedomir Segulja, Bill DaiEdward S. Rogers Sr. Department of Electrical and Computer EngineeringUniversity of [email protected], [email protected] 31st, 20081 IntroductionIn this report, we describe the work done for our ECE532 class project. We designed and implemented theNintendo Entertainment System (NES) Audio Processing Unit (APU) using an FPGA platform. Further-more, for purposes of testing the developed core and for project demonstration, we have design NSF player,a system capable of playing NSF files using our developed core.The remainder of this report is organized as follows. Section 2 presents our projects goals, covers back-ground material and gives high-level overview of the architecture of our system. Section 3 discuss theoutcome of our project and presents the software architecture of the NSF Player. Section 4 provides a detaildescription of used components, concentrating the most on the developed IP, the OPB APU. Section 5 ex-plaines how we used the NES emulator to extract needed information from NSF files. Section 6 provides thedetails about the software structure of our project. Finally, we include an appendix that provides additionaldetails about the NES APU register organization.2 Overview2.1 Goals of the ProjectThe main goal of the project is to implement the NES Audio Processing Unit on the FPGA of Xilinx XUPVirtexTM-II Pro Development Board. By the ending phase of the project, our APU should be able to demon-strate standalone music playing ability by using MicroBlaze as the NES CPU.12.2 Project BackgroundThe original CPU of Nintendo Entertainment System was 8-bit Ricoh 2A03 microprocessor based on a MOSTechnology 6502 core [2]. This low-cost chip differed from similar product back at year 1983 in that it hadthe ability to handle sound, serving as pseudo Audio Processing Unit (APU). In other words, the CPU andAPU were combined on one chip. The processing speed of this chip is around 1.79MHZ. The APU containsin total twenty 8 bit memory mapped registers.The NES APU is composed of five channels. These included two pulse wave channels of variable dutycycle (12.5%, 25%, 50%, and 75%), with a volume control of sixteen levels, and hardware pitch bendingsupporting frequencies ranging from 54 Hz to 28 kHz. Additional channels included one fixed-volume tri-angle wave channel supporting frequencies from 27 Hz to 56 kHz, one sixteen-volume level white noisechannel supporting two modes (by adjusting inputs on a linear feedback shift register) at sixteen prepro-grammed frequencies, and one delta pulse-width modulation channel (DMC) with six bits of range, using1-bit delta encoding at sixteen preprogrammed sample rates from 4.2 kHz to 33.5 kHz. The DMC channelused DMA to fetch previously stored samples. This final channel was also capable of playing standard pulse-code modulation (PCM) sound by writing individual 7-bit values at timed intervals. The complete functionaldescription of the NES APU can be found in [6, 8, 9, 7].2.3 System DescriptionThe system architecture is shown in Figure 1. The OPB Audio Processing Unit (APU) represents the imple-mentation of the the NES APU. To convert digital output to analog signals, the on-board AC97 codec is used.MicroBlaze, runing the APU Driver simulates the NES CPU and drives the OPB APU. Memory samples forthe DMC channel are stored in the BRAM which is accessed by the OPB APU through the OPB BRAMcontroller. OPB Microprocessor Debug Module (MDM) is used for debugging and download. UART Litewas used through the developement process, it is obsolete in the final design.List of used IPs is shown in Table 1. We have designed and implemented the OPB APU core, which isin detail described in section 4.3. Also, created software (APU Driver) is described in section 4.8.2Figure 1: System Block DiagramIP Name Hardware/Software IPUsed/Modified/CreatedFunctionMicroBlaze Processor Hardware IP Used (Xilinx IP) Drives the OPB APU. See section 4.1On-Chip Peripheral BUS (OPB) Hardware IP Used (Xilinx IP) System backbone. See section 4.2OPB Audio Processing Unit(APU)Hardware IP Created/Modified NES APU implementation. See section4.3OPB Block RAM (BRAM) Inter-face ControllerHardware IP Used (Xilinx IP) Memory controller for the DMC dedi-cated memory. See section 4.4Block RAM (BRAM) Block Hardware IP Used (Xilinx IP) DMC dedicated memory. See section4.4Digital Clock Manager (DCM)ModuleHardware IP Used (Xilinx IP) Used to derive system and NES CPUclock. See section 4.5OPB Microprocessor Debug Mod-ule (MDM)Hardware IP Used (Xilinx IP) Used for debugging and executabledownload. See section 4.6OPB UART Lite Hardware IP Used (Xilinx IP) Used for debugging. See section 4.7APU Driver Software IP Created Simulates the NES CPU. See section4.8Table 1: Brief description of IPs33 OutcomeWe have successfuly implemented the NES Audio Processing Unit on the FPGA. The developed IP wastested using series of microbenchmarks. Furthermore, for in-depth testing and for the purposes of the projectdemo we have designed and implemented NSF player, a system which plays NSF files using our developedIP. NES Sound Format (NSF) file is a sound data file containing instructions for the Nintendo EntertainmentSystem (NES) sound hardware. The overwiev of the NSF Player system is given next.3.1 NSF PlayerNSF Player is the system which utilizes the implemented system for playing NSF files. Software flow chartof the NSF Player is displayed on Figure 2. The input is an NSF file. The file is translated in the formplausible for interpreting by the MicroBlaze. Information about used NSF emulator and modification ofit are described in section 5. The generated file (music.h) is compiled with the apudriver.c, whichimplements the APU Driver. Finally, using the Xilinx Microprocessor Debugger (XMD) and the JTAG cable,the executable is downloaded on the FPGA. MicroBlaze is running XMD Stub which allows as to downloadand run the executable on the fly. The whole process is automatized by the script which as an input takes theNSF file.As shown in Figure 2 the NES emulator also generates the out.wav file. This is a waveform audiofile, and it is used for comparison with the music played on the board. Our final results is that, for manyexamples, the music played on the board is very similar (indentical) to the waveform file played back on thecomputer.Figure 2: NSF Player Software Flow44 Description of the


View Full Document

Toronto ECE 532 - FPGA Implementation of the NES Audio Processing Unit

Documents in this Course
Load more
Download FPGA Implementation of the NES Audio Processing Unit
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 FPGA Implementation of the NES Audio Processing Unit 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 FPGA Implementation of the NES Audio Processing Unit 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?