- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi,
i am facing a problem to generate a .mif file of perticular frecuency for initializing the ROM in my tone generation project...can anybody help me regarding this...Link Copied
- « Previous
-
- 1
- 2
- Next »
26 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi .....
so Kaz...what i have to use...cordic, small rom , large rom or multiplier based.... and in implementation what i hav to select,,,frequency modulation or phase modulation ....i tried each and every one.....some combination generates the mif file but in mif file data is not there.....plz help me in details..- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
The choice is yours depending on your resource, I normally choose small memory. As to modulation you don't want any, you just want a sinusoid. As to mif not having data at all, this is bizarre but may be because of the way you are opening the file to read. there might be two files per sine/cosine e.g. F and C for fine and coarse. Try simulate the design before your verdict. kaz- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hey Kaz..
do u have workable matlab code to generate a tone of perticular frequency mif file....if u have plz send me...- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
VHDL, by the way, has the option of generating sine tables according to your needs from pure HDL code, as shown in previous forum discussions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- Hi, The frequency depends on your Fs i.e. f = Fs/Number of points per cycle. To generate one sinusoid cycle of n points in Matlab and quantising onto 16 bits signed: data = sin(2*pi*[0:n-1]/n); data = round(data* (2^15-1)/max(data)); you can then display data as a column, copy and paste to a mif file(This is quicker than writing mif text) Kaz --- Quote End --- Hi, kaz... in ur matlab code....if we have to quantising onto 8 bit than what i have to change in it..and where i have to put the frequency...actually u r not using it... plz reply me soon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
for 8 bits you can generate one cycle sinusoid as follows: First: what is your Fs(sampling freq or effective clk)? assume it is 50MHz what is your tone freq? assume it is 2MHz Second: decide number of sinusoid points for one cycle: 50/2 = 25 data = sin(2*pi*[0:24]/25); quantise onto 8 bits: data = round(data* (2^7-1)/max(data)); //signed When you store this data as LUT and read it out on your clk, it should generate a tone at 2Mhz. If your DAC uses offset binary as opposed to 2's complemnt then invert the sign bit for the DAC. However, I am a bit disappointed, I thought your tones are ready by now except for that wait for the orchestra director... If it turns out that your LUT is very large because your tone is very low then you can use a slightly different approach using a modulo adder.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- « Previous
-
- 1
- 2
- Next »