Tutorials to .com

Tutorials to .com » Mechine » Eda-pld » FPGA-based recording and playback of dynamic organ system

FPGA-based recording and playback of dynamic organ system

Print View , by: iSee ,Total views: 18 ,Word Count: 1784 ,Date: Sun, 21 Jun 2009 Time: 11:16 PM

O INTRODUCTION

Music is composed by a series of notes, so the music followed by music in accordance with the output of these notes corresponding to the frequency of the speaker can be issued for each note of the pitch. Most of the flower design and play every play, but can automatically play music on the recording and playback speed of change in the design of adjustable little. To achieve the recording and playback function, it is necessary to play the notes written in the corresponding value of control signal under the control of internal storage to the FPGA chip random access memory (RAM), while in the corresponding control signal under the control of time, will be stored in RAM read out the note value, corresponding to the voice control module. the mainstream of system design. The design is based on Quartus Ⅱ 6.0 development platform, the use of VHDL language in the FPGA chip on the successful recording and playback of dynamic organ function.

l flower dynamic recording and playback system design

Success has been the design of multi-organ music playing hardware circuit design include: keyboard music, artificial selection and play music, sound recording / playback, music player can control the rhythm of the pace, liquid crystal display features such as the current system state. FPGA chip in which the realization of the circuit design of four modules, namely the keyboard scan module set up and function keys, RoM / RAM controller module, voice control module, LCD driver control module. System block diagram shown in Figure 1.

FPGA-based recording and playback of dynamic organ system

Picture not clear? Click here to view the image (larger).

The working principle is as follows: First of all keys through the keyboard scanning feature set and a module 4 * 4 keyboard keys for each feature set, and then the corresponding operation in accordance with requirements of sound and liquid crystal display. If you check the current state of the playing mode, the voice control module directly to the keys corresponding to notes sent by the sub-frequency coefficients into a corresponding frequency to the speaker sound, subtitles driver information through the liquid crystal display LCD module driver; if the election in the current mode to play mode, the ROM / RAM controller module to pre-stored in the ROM of the music data to the voice module to complete the auto-play functions; If you check the status of current work is a sound recording playback mode, then start ROM / RAM module RAM controller state machine controller to read and write operations.

Here focuses on the ROM / RAM control module state machine design through the recording / playback function to achieve.

2 ROM / RAM control module design

ROM / RAM is the role of the control module of the system through the current model in which to judge, and in accordance with input control signals, the Cyclone Ⅱ FPGA embedded RAM of the read and write signals, read and write and to read and write address clock control. Which ROM / RAM interface control module external symbol map as shown in Figure 2.

FPGA-based recording and playback of dynamic organ system

Picture not clear? Click here to view the image (larger).

This module defines the input port 10, respectively: mode_key (keyboard playing mode), mode_auto (play song mode), mode_tape (audio playback mode), time_up (increased tempo), time_down (the rhythm of decline), song_select (music selection) , tape (recording), playback (playback), reset (system reset), clk (clock). The definition of the 15 output ports: rom_add (ROM address), rom_clk (ROM clock), rom_en (ROM clock enable), ram_wradd (RAM write address), ram_wren (RAM write enable), ram_wrclk (RAM write clock), ram_rdadd (RAM read address), ram_rden (RAM read address), ram_rdclk (RAM read address), full (full audio signal), over (the end playback signal), as well as to provide five-driven LCD display with a signal.

RAM / ROM control module control part of RAM is divided into two small part of the use of finite state machine (FSM), respectively, of RAM, and RAM read-write state of operational control. Current mode when the system is "sound recording / playback mode", if "recording" button is depressed, the RAM write operation, the first address from the beginning of storage. Over 1 024 if the storage address space, it prompted "Full recording", write operation to terminate and wait for user commands to carry out the next step. Current mode when the system is "sound recording / playback mode", if the "replay" button is depressed, the RAM read operation, starting from the first address of the data in the RAM unit to the voice control module for playback. 1 024 if the read address space, it prompted "playback finished", read operation to terminate and wait for user commands to carry out the next step.

Write operation of the FSM state transition process, as well as the transfer of conditions as shown in Figure 3; read the FSM state transition process, as well as the transfer of the conditions shown in Figure 4.

FPGA-based recording and playback of dynamic organ system

Picture not clear? Click here to view the image (larger).

State machine used to read and write control of the RAM part of the source code is as follows:

FPGA-based recording and playback of dynamic organ system

Picture not clear? Click here to view the image (larger).

FPGA-based recording and playback of dynamic organ system

Picture not clear? Click here to view the image (larger).

The simulation waveforms shown in Figure 5. Map from the simulation can be seen, RAM / ROM control module control circuit is generated RAM memory ram_wrclk clock signal, also had a corresponding control of the use of RAM to enable ram_wren and write address signals ram_wradd.

FPGA-based recording and playback of dynamic organ system

Picture not clear? Click here to view the image (larger).

3 RAM random access memory design

The design of a dual-port memory depth of 1 024, storage width of the six random access memory RAM, for storage of music played and broadcast. RAM modules generated as shown in Figure 6. data [5. . O] port for playing electric piano by voice control module data generated notes.

FPGA-based recording and playback of dynamic organ system

Picture not clear? Click here to view the image (larger).

When the system is in "sound recording / playback mode" and "recording" state, will play the current conversion of the notes, the output data as a RAM memory "DATA". wraddress [9. . O] on behalf of 10 the width of the write address port, rdaddress [9. . 0] on behalf of the width of the 10-port read address. wrclock clock for the RAM write, rdclock for the RAM to read out the clock. Q [5. . 0] is read out from the RAM in the storage of data, that is, data. As can be seen from Figure 6, the dual-port RAM with independent read and write and to read and write clock enable. Select the purpose of such a RAM is a fixed frequency in order to wrclock (check the design of 4 Hz) to the clock on the RAM write operation, that is, a fixed sampling frequency of the music playing on the sample storage; On the other hand to the rhythm part of the clock control output rdclock as RAM read clock signal, the playback process can be a different rhythm of the music will be stored broadcast. This is its novelty, so that flower in the playback process even more flexible, more functions.

The simulation waveforms shown in figure 7. Map from the simulation can be seen, RAM memory in the write enable signals and read enable signals under control in order to write data signals, and the order in which they re-write the address read out accurately, the realization of a sound recording and playback of functional requirements .

FPGA-based recording and playback of dynamic organ system

Picture not clear? Click here to view the image (larger).

The design uses a core Electronics Co., Ltd. Hangzhou, Culture and Sport to develop the application of electronic design board (Model: KX-DVP3F) to carry out the system debugging and functional verification. The use of Quartus Ⅱ 6. O software generated. or sol. pof programming file, through the USB device will be programmed to download configuration files to Cyclone Ⅱ EP2C8Q208 chip, after a few of the debugging of multi-organ function of all the technical indicators and well in line with the design requirements, sound accurate, easy-to-use, visual strong.

Finite state machine design practical digital systems technology is an important part in achieving an efficient and reliable high-an important way of logic control. It has a similar high-speed CPU operation and control, structured procedures, the structure of clear, easy to read and understand; in debug, modify and modules are also unique in transplantation.


EDA/PLD Articles


Can't Find What You're Looking For?


Rating: Not yet rated

Comments

No comments posted.