Ask Question, Ask an Expert


Ask Programming Language Expert

Assignment 01: turn your FPGA into a (simple) music box


You are required to create a finite-state machine design to turn your FPGA development board into a simple programmable music box. The requirements are as follows:

The system should be able to generate melodies, i.e., a sequence of notes. Notes can be selected from a bank of 16 possible sounds: 15 notes and a pause (no sound). A note is generated by a vibration of a definite frequency as shown:

170_Frequency of music.jpg

The overall aim of the project is to create a machine capable of four functions of increasing complexity. The functions are listed below:

2.1 Level 1

Your system should take in a slide switch combination and give out the notes listed above as a square wave output fed to a speaker as the Figure give below.

697_Square wave output.jpg

2.2 Level 2

As the next feature, your system should play a melody based on a given sequence of notes (in appendix 1 you will find some sequences, or you can make up your own). You will need to create a module which can be initialised to contain the desired sequence of notes. Upon pressure of a push button, these notes will be read by your machine and played out through the speaker. Notes should be played out in a "static" manner, i.e., all notes should be sounded for 0.4 seconds followed by a 0.1 second period of silence. This is simple but makes for a rather boring melody!

The four push buttons on the board should have the roles play and pause.

• Play plays the melody from the beginning
• Pause pauses the melody from playing and if pressed again playing will resume from where it stopped

2.3 Level 3

Create a system which can be programmed to make music with a customised melody. Notes can be entered as a slide switch input (as in function 1) and saved into a register one at a time, by pressing a button. Then, when a second button is pressed, the music will be played back to you, in the same "static" manner presented in function 2 (0.4s sound followed by 0.1s silence for each note). Allow for at least 64 notes.

The four push buttons on the board should act as save note, play, pause and reset:

• Play plays the melody from the beginning
• Pause pauses the melody from playing and if pressed again playing will resume from where it stopped
• Save note saves the note in your machine's memory
• Reset clears the memory ready for a new input to be stored

2.4 Level 4

Now the most difficult of all. Create a system which will record your own musical performance with the slide switches (you will start the recording by pressing a push button, play a melody with your slide switches, and finally stop recording by pressing a second push button). Then, the system will play your performance back to you when another button is pressed. Both the notes and the timing must be the same as in your performance.
The four push buttons on the board should act as start recording, stop recording, play from the beginning and reset:

• Start recording tells the machine to commence storing your actions into memory
• Stop recording tells the machine that you have finished playing music
• Play from the beginning plays the sounds from the start
• Reset clears the memory ready for a new performance to be memorised

2.5 Level 5: the overall state machine

The four functions can be implemented as separate designs, but you will get extra marks for creating a single machine which can switch between the different functions. Since most of your buttons are taken up by the four functions, you can consider using the central button [V16] (it has a dial on it, but it also works as a push button if you press down on it) to switch between functions. I also recommend using an informative LED output to make the user aware of what function they are using.


Imagine we were to implement this design using an assembly of multiple hardware components instead of a FPGA chip. In a short exposition (500 words or less), discuss whether memory components such as those you have learned about in the lectures (ROM and RAM) could feature in this state machine and whether they could improve the capability of the design. Consider in particular any limitations of the FPGA approach which could arise if the system were to be interfaced to a real keyboard (up to 96 notes), were to manage melodies of much greater length / timing complexity, and it were required to undergo power on/off cycles.

Programming Language, Programming

  • Category:- Programming Language
  • Reference No.:- M9795

Have any Question? 

Related Questions in Programming Language

Project on grammarsnbspcourseist 230cmpsc

PROJECT ON GRAMMARS   Course: IST 230/CMPSC 360   Deadline: see the calendar in Canvas for the deadline   Objective: To acquire a comprehensive understanding of the application of grammars and formal language theory to c ...

Enable geometricobject comparable modify the

(Enable GeometricObject comparable) Modify the GeometricObject class to implement the Comparable interface, and define a static max method in the GeometricObject class for finding the larger of two GeometricObject object ...

Assignment introduction to computer sciencepart a this

Assignment: Introduction to Computer Science Part A: This question is to be submitted to the instructor in the form of a Word (or OpenOffice) document containing the Java code and appropriate screen capture(s) of the out ...

Programming computer science assignmmentprogramming1

Programming Computer Science Assignmment Programming 1) Explain the difference between an event and an event handler. Provide at least two examples of an event. 2) Explain how an animation uses still images and loops to ...

Assignmentscenariosummaryin this lab you will create one

Assignment Scenario/Summary In this lab, you will create one project that reads from a file, one project that writes to a file, and one project drawing a snowman. Program files for each of the following programs. Write o ...

Assignment- computer applications for businesslearning

Assignment- Computer Applications for Business Learning Objectives: This assignment is designed to practice: 1. Basic understanding of JavaScript variables, including; a The declaration, initialization and assignment pro ...

Write a program which1 asks the user to enter a positive

Write a program which: 1. Asks the user to enter a positive integer greater than or equal to 0 2. Validates that the entry is a positive integer 3. Outputs the digits in reverse order with a space separating the digits 4 ...

Construct a loop which will allow for the daily fan count

Construct a loop which will allow for the daily fan count to be entered for each game. The games number (1-4) should be part of the prompt displayed to the user. Within this loop, you will need other loop(s) to validate ...

Question 1what is overriding please use code to explain it

Question 1: What is overriding? Please use code to explain it. (Cannot use the same code in class) Question 2: What are the benefits when inheritance is used if multiple classes share the same fields and methods? Questio ...

Assignmentscenarioyou are working for an art gallery the

Assignment Scenario: You are working for an Art Gallery. The gallery sells paintings for office rooms. An application is needed to manage all of the paintings available in inventory. The gallery has limited space and can ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Section onea in an atwood machine suppose two objects of

SECTION ONE (a) In an Atwood Machine, suppose two objects of unequal mass are hung vertically over a frictionless

Part 1you work in hr for a company that operates a factory

Part 1: You work in HR for a company that operates a factory manufacturing fiberglass. There are several hundred empl

Details on advanced accounting paperthis paper is intended

DETAILS ON ADVANCED ACCOUNTING PAPER This paper is intended for students to apply the theoretical knowledge around ac

Create a provider database and related reports and queries

Create a provider database and related reports and queries to capture contact information for potential PC component pro

Describe what you learned about the impact of economic

Describe what you learned about the impact of economic, social, and demographic trends affecting the US labor environmen