Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
16606 Discussions

need help on digital tone generator.

Altera_Forum
Honored Contributor II
969 Views

i need to design a digital generator use quartusII and CPLD. 

i am a begginer of this kind of digital design and i am totally lost. 

i need to generate a song (digital tone), what should i do first? 

and can anyone give me some good website?  

many thx.
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
333 Views

Since you are using cpld then you don't have memory blocks to store any tables. 

The easiest way is to store one small cycle sinusoid on wires(e.g. as HDL constants) then run a clock to read the cycle out continuously. 

You can use several ways to change the tone e.g. different clocks or better different clock enable rate or jump the values using same clock. 

 

The equation for frequency would be this: 

 

f = clk frequency/number of data per cycle. 

 

An example 64 data cycle can be produced as follows: 

 

data = sin(2*pi*(0:63)/64) 

 

you will need to scale up the data to integers in hardware. 

Then sing the tone out...use audio range for your frequency so that human can enjoy the songs
0 Kudos
Altera_Forum
Honored Contributor II
333 Views

how about a CORDIC since there is no memory in a CPLD?

0 Kudos
Reply