<?xml-stylesheet type="text/xsl" href="https://community.element14.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>FPGA: Waves 2: Simple Sinewave</title><link>/technologies/fpga-group/b/blog/posts/fpga-waves-2-simple-sinewave</link><description>FPGA: Making Waves Introduction I have a small Brevia 2 development board [1] from Lattice Semiconductor featuring one of their XP2-family FPGAs. I&amp;#39;m using it to explore, in a very simple, basic kind of way, digital signal generation an...</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: FPGA: Waves 2: Simple Sinewave</title><link>https://community.element14.com/technologies/fpga-group/b/blog/posts/fpga-waves-2-simple-sinewave</link><pubDate>Sun, 22 Sep 2019 00:25:39 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:2f9ec3bc-0097-4569-a8ac-a1968f0a8c1f</guid><dc:creator>neuromodulator</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;Taking advantage of the symmetry of sin/cos, and through interpolation you could significantly reduce the LUT size. Alternatively you could also use CORDIC.&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=7817&amp;AppID=19&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: FPGA: Waves 2: Simple Sinewave</title><link>https://community.element14.com/technologies/fpga-group/b/blog/posts/fpga-waves-2-simple-sinewave</link><pubDate>Sat, 21 Sep 2019 10:07:19 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:2f9ec3bc-0097-4569-a8ac-a1968f0a8c1f</guid><dc:creator>michaelkellett</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;Now you&amp;#39;ve done it the hard way - try the other way:&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;a class="jive-link-external-small" href="https://forums.xilinx.com/t5/DSP-IP-and-Tools/Generating-SIne-Wave/td-p/53120" rel="nofollow ugc noopener" target="_blank" title="https://forums.xilinx.com/t5/DSP-IP-and-Tools/Generating-SIne-Wave/td-p/53120"&gt;https://forums.xilinx.com/t5/DSP-IP-and-Tools/Generating-SIne-Wave/td-p/53120&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;(scroll all the way down to Eilert&amp;#39;s reply where you&amp;#39;ll find this gem:&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;BEGIN -- PROCESS sinegen&lt;/p&gt;&lt;p&gt;&amp;nbsp; IF reset = &amp;#39;0&amp;#39; THEN -- asynchronous reset (active low)&lt;/p&gt;&lt;p&gt;&amp;nbsp; mult := (OTHERS =&amp;gt; &amp;#39;0&amp;#39;);&lt;/p&gt;&lt;p&gt;&amp;nbsp; sine := (OTHERS =&amp;gt; &amp;#39;0&amp;#39;);&lt;/p&gt;&lt;p&gt;&amp;nbsp; n1 := (OTHERS =&amp;gt; &amp;#39;0&amp;#39;);&lt;/p&gt;&lt;p&gt;&amp;nbsp; n2 := (OTHERS =&amp;gt; &amp;#39;0&amp;#39;);&lt;/p&gt;&lt;p&gt;&amp;nbsp; alfa := (OTHERS =&amp;gt; &amp;#39;0&amp;#39;);&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; ELSIF clock&amp;#39;event AND clock = &amp;#39;1&amp;#39; THEN -- rising clock edge&lt;/p&gt;&lt;p&gt;&amp;nbsp; IF load=&amp;#39;1&amp;#39; THEN&lt;/p&gt;&lt;p&gt;&amp;nbsp; n2 := beta; --use in port later&lt;/p&gt;&lt;p&gt;&amp;nbsp; alfa := alpha; --use in port later&lt;/p&gt;&lt;p&gt;&amp;nbsp; ELSE&lt;/p&gt;&lt;p&gt;&amp;nbsp; mult := alfa * n1;&lt;/p&gt;&lt;p&gt;&amp;nbsp; sine := mult(45 DOWNTO 45-24) - n2;&lt;/p&gt;&lt;p&gt;&amp;nbsp; n2 := n1;&lt;/p&gt;&lt;p&gt;&amp;nbsp; n1 := sine;&lt;/p&gt;&lt;p&gt;&amp;nbsp; END IF;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; END IF;&lt;/p&gt;&lt;p&gt;&amp;nbsp; END PROCESS sinegen;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;It will give you chance to use the multipliers rather than the look up tables.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;This might help explain a bit better.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;a class="jive-link-external-small" href="https://electronicmission.wordpress.com/2017/06/02/a-digital-sine-wave-oscillator-theory/" rel="nofollow ugc noopener" target="_blank" title="https://electronicmission.wordpress.com/2017/06/02/a-digital-sine-wave-oscillator-theory/"&gt;https://electronicmission.wordpress.com/2017/06/02/a-digital-sine-wave-oscillator-theory/&lt;/a&gt; &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;MK&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=7817&amp;AppID=19&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item></channel></rss>