DOC PREVIEW
Toronto ECE 532 - Nerdy Musical Keyboard

This preview shows page 1-2-3-4-5-6 out of 19 pages.

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

Unformatted text preview:

ECE532 Group ReportNerdy Musical KeyboardEdward S. Rogers Sr. Department of Electrical and Computer EngineeringUniversity of TorontoApril 7th, 2009 Sida [email protected] ShiKuan [email protected] [email protected] 11 IntroductionIn this report, we documented the work completed for our ECE532 project - “Nerdy Musical Keyboard”. We designed and implemented a system on FPGA that allows the user to play a game on keyboard that simulates playing the piano. In the game, the user follows the “karaoke-like” prompts on the monitor, and enters the key that is displayed. As user enters the key, a corresponding musical tone is generated in hardware and played on the speakers using the AC97 Codec. The game keeps track of how well the user follows the displayed prompts by keeping score, which is displayed throughout the game. The remainder of this report is organized as follows. Section 2 documents the goals of our project. A block diagram is included to introduce the overall system. IPs that used in the system are briefly described and summarized in a table. Section 3 presents the outcome of our project. All basic functions set in project goals were successfully completed. In addition to the basic functions, one of the optional features, game mode, was completed. Moreover, further improvements are suggested. Section 4 provides a detail description of the hardware components in this project, focusing on the developed Audio Output Controller. Section 5 presents a detail description of the software components including the Game Module, Keyboard Input Handler, Video Output Controller, and Audio Output Controller. Finally, section 6 provides the details about the software structure of our project. 2 Overview2.1 Goals of the ProjectThe goal of the project is to implement a musical keyboard system on FPGA that allows the user to play a game on keyboard that simulates playing the piano. The system involves three input and output devices. They are computer keyboard, speakers, and a monitor. Communications among the devices are controlled by three function modules. They are Keyboard Input Handler, Audio Output 2controller, and Video Output Controller. Requirements for these function modules are defined as the following:The Keyboard Input Handler should be implemented in software. It must be capable of storing the input data from a keyboard whenever a key is pressed by the user. The data is then processed and past to the Audio Output Controller by the handler.The Audio Output Controller should be designed in hardware. It must be able to receive the data past from the Keyboard Input Handler, and then generate the corresponding musical tone. The musical tone must be played for a set duration, and the duration must not be affected by other inputs of the same time period. Finally, the generated tone must be played using the AC97 Codec.The Video Output Controller should also be implemented in software. It must be able to prepare the contents that need to be outputted and send them to On-board XSGA Output for displaying. Prepared contents should include location and colour information as well.In addition to these basic function modules, some optional features are proposed and listed below that can be added on later to make the system fancier if time permits.• Game Mode that scores player if the key he/she pressed matches with what has been displayed on the screen. Game Mode also keeps the score and displays it at the end of game. • Music Composer which allows user to compose music by typing a sequence of letters• Options for user to adjust music’s tempo, key, and instrument tones2.2 System OverviewThe overview of the system that was initially proposed is shown in Figure 1. Keyboard inputs are received from RS232 serial port. Whenever there is an input appears in the serial port, an interrupt is requested. Then an interrupt handler function is invoked, in this case is the Keyboard Input Handler module. This module stores the input data, process it and send it to Audio Output Controller. The Audio Output Controller receives user input from the Keyboard Input Handler, generates the 3corresponding tone, and provides a synchronous interface to the AC97 Codec by sampling the playback data and control signals. The video Output Controller prepares displaying contents and sends it to Port A of BRAM through a BRAM Interface Controller for temporary storage. Then the SVGA controller reads the stored displaying contents through Port B of the BRAM, and outputs them on to the monitor through the XSGA Output chip on the board. The Game Modules keeps track of how well the user follows the displayed prompts by score the correct inputs, and display the total score at the end of the game. All the modules that implemented in software are complied by MicroBlaze Processor. Complied instructions and data are stored on two BRAMs (for simplicity only one BRAM is shown in the figure). Information on BRAMs is accessed using BRAM Interface block. Communications among the hardware components are done through the PLB bus. Brief descriptions of IPs used in the system are summarized in Table 1. However, as the Audio Output Controller IP was not implemented successfully in hardware, a modified implementation in software was adopted. The overview of the modified system is shown in Figure 2. Hardware components that got replaced are highlighted in dashed box. Sounds are outputted using a hardware controller, opb_ac97_v2_00_a, provided on the Xilinx website. Since this core was designed to communicate with OPB bus, a bridge IP is used to connect the two buses together, so that the data can be sent to the ac97 core through PLB bus. In addition to these changes, Audio Output Controller is now implemented in software, which takes inputs from the Keyboard input handler, generates a tone in samples accordingly, and output the sound through AC97 Controller.4Figure 1 Proposed System Block DiagramIP NameHardware/ SoftwareUsed/ Modified/ CreatedFunctionMicroBlaze Processor Hardware Used Drives the system, see section 4.1Processor Local Bus (PLB) Hardware Used System Backbone, see section 4.2Game Module Software Created score the correct inputs, see section 5.4Keyboard Input Handler Software CreatedHandles user input from the keyboard, see section 5.1Video Output Controller Software ModifiedPrepare displaying contents, see section 5.3Audio Output Controller Hardware CreatedHandles tone generation


View Full Document

Toronto ECE 532 - Nerdy Musical Keyboard

Documents in this Course
Load more
Download Nerdy Musical Keyboard
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 Nerdy Musical Keyboard 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 Nerdy Musical Keyboard 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?