In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
Editor to share with you how to use matlab to generate sine wave coe files, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
Use matlab to generate sine wave coe file
When we use ROM in xilinx ISE, we often use .coe file, and coe file is the initialization file of xilinx ROM.
Examples of Coe files:
MEMORY_INITIALIZATION_RADIX=10; stands for base 10, 2 for base 2, 8 for base 8, and 16 for base 16.
MEMORY_INITIALIZATION_VECTOR=
2500
2663
2826
2987
...
...
...
2012
2173
2336
Matlab source code:
Clear all
Close all
Clc
Width = 16
Fog1000
Fs=96000;%96KHZ sampling frequency
Nasty 96
T = (0:N-1) / fs
Digits (5)
Sin0=sin (2*pi*f*t) * 3.25-3.25
Fid = fopen ('E:\ ise_project\ audio\ coe\ sim_rom0.coe','w');% file storage path
Fprintf (fid,'MEMORY_INITIALIZATION_RADIX=%d;\ nJournal width)
Fprintf (fid,'MEMORY_INITIALIZATION_VECTOR=\ n')
For (k=1:N-1)
Fprintf (fid,'%d,\ nPhonology sin0 (k))
End
Fprintf (fid,'%d;\ nseparate Chinese 0 (N));% each data is separated by a comma or space or newline character, and the last data is followed by a semicolon
Plot (trecoery sin0 and Zhonghua')
Results:
Use da output oscilloscope to display the results on FPGA:
The above is all the contents of the article "how to use matlab to generate sine wave coe files". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.