<?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>The Art of FPGA Design - Post 37</title><link>/technologies/fpga-group/b/blog/posts/the-art-of-fpga-design---post-37</link><description>Recent Advances in Vivado VHDL-2008 Support
 
Previous posts in this blog were made in the 2018-2019 period. Some of the issues presented were an attempt to work around VHDL-2008 support limitations in Vivado at that point in time. Since then, s...</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: The Art of FPGA Design - Post 37</title><link>https://community.element14.com/technologies/fpga-group/b/blog/posts/the-art-of-fpga-design---post-37</link><pubDate>Sun, 31 Oct 2021 17:53:28 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:046ff1d1-0002-4e79-96d6-8172afaa0488</guid><dc:creator>dubya</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;posting this comment on the new vhdl 2008 in Vivado 2021.2 announcement but my question is really about the prior 2018ish work.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;In post 21 with the behavioral FIR model here:&lt;/p&gt;&lt;p&gt;&lt;a class="jive-link-blog-small" href="/technologies/fpga-group/b/blog/posts/the-art-of-fpga-design---post-21"&gt;https://www.element14.com/community/groups/fpga-group/blog/2018/11/27/the-art-of-fpga-design-post-21&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;A function &amp;quot;element()&amp;quot; is used in this context:&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; B&amp;lt;=ELEMENT(CI,K,N);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -- register for the coefficient inputs&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;It takes a sfixed vector and returns an sfixed.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;A few related questions:&lt;/p&gt;&lt;p&gt;1) I can&amp;#39;t find this function defined in the other blogs. Maybe im missing it&lt;/p&gt;&lt;p&gt;2) I&amp;#39;m not sure why we need a function to index an array. Wouldn&amp;#39;t CI(K) work? (Assuming vhdl 2008 support)&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;3) I don&amp;#39;t understand the second argument &amp;quot;N&amp;quot;. Why does indexing the vector need to know the length of the array of vectors?&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Jancumps made a very useful gist here:&lt;/p&gt;&lt;p&gt;&lt;a class="" href="https://gist.github.com/jancumps/622591b9a9a74c24e081a8b7407d7a1a"&gt;https://www.element14.com/community/external-link.jspa?url=https%3A%2F%2Fgist.github.com%2Fjancumps%2F622591b9a9a74c24e081a8b7407d7a1a&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Of the types package. I looked there for a definition of Element () didn&amp;#39;t find one.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Then I tried to write one myself and simulate it with xsim 2021.2. I get the hilarious error that I can&amp;#39;t convert an sfixed vector to type sfixed.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;That&amp;#39;s funny to me because that&amp;#39;s what the function is trying to do. Likely my poor understanding of the 3rd argument N has something to do with it.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Thanks,&lt;/p&gt;&lt;p&gt;Newbie&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=22004&amp;AppID=19&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item></channel></rss>