Reference no: EM13393
创建一个有限状态的机器设计将您的FPGA开发板变成一个简单的可编程音乐盒。
要求如下:
该系统应该能够生成旋律,即一系列音符。可以从16个可能的声音的库中选择注释:15个笔记和暂停(无声音)。注释是通过确定频率的振动生成的,如下所示:
该项目的总体目的是创建能够具有增加复杂性的四个功能的机器。功能如下:
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 (Figure 1 below).
图1:从幻灯片开关到声音
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!
板上的四个按钮应具有角色玩andpause。
-Play从一开始就播放旋律
-Pausepauses the melody from playing and if pressed again playing will resume from where it stopped
级别3
创建一个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 assave note,,,,玩,,,,pauseand重置:
-Play从一开始就播放旋律
-Pausepauses the melody from playing and if pressed again playing will resume from where it stopped
- 保存注释将音符保存在计算机的内存中
- 重置clears the memory ready for a new input to be stored
4级
现在是最困难的。创建一个系统,该系统将通过幻灯片开关记录您自己的音乐性能(您将通过按下按钮,使用幻灯片开关播放旋律来启动录制,最后通过按下第二个按钮停止录制)。然后,当按下另一个按钮时,系统将播放您的性能。音符和时机都必须与您的表现相同。
The four push buttons on the board should act asstart recording,,,,停止录音,,,,从一开始and重置:
- 开始录制告诉机器开始将您的动作存储到内存中
- 停止录音告诉机器您已经播放音乐了
-Play from the beginning从一开始就播放声音
- 重置清除记忆准备的记忆,以记住新的表演
Level 5: the overall state machine
这四个函数可以作为单独的设计实现,但是您将获得创建可以在不同功能之间切换的单个计算机的额外标记。由于您的大多数按钮都由四个函数占用,因此您可以考虑使用中央按钮[v16](它上面有一个拨号,但如果按下它,它也可以用作按钮)以在函数之间切换。我还建议使用信息丰富的LED输出来使用户了解他们正在使用的功能。