{"id":1509,"date":"2021-01-30T13:23:59","date_gmt":"2021-01-30T13:23:59","guid":{"rendered":"http:\/\/retroramblings.net\/?p=1509"},"modified":"2021-01-30T13:25:30","modified_gmt":"2021-01-30T13:25:30","slug":"mif-is-not-supported-yes-it-is","status":"publish","type":"post","link":"https:\/\/retroramblings.net\/?p=1509","title":{"rendered":"&#8220;MIF is not supported?&#8221;  Yes it is!"},"content":{"rendered":"\n<p><strong>2021-01-30<\/strong><\/p>\n\n\n\n<p>I&#8217;ve just bought a couple of the ridiculously cheap DECA MAX10 dev boards from Arrow and one of the first projects I attempted to port to it gave me an error message I wasn&#8217;t expecting:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Error (276003): Cannot convert all sets of registers into<br>RAM megafunctions when creating nodes. The resulting number<br>of registers remaining in design exceeds the number of<br>registers in the device...<\/pre>\n\n\n\n<p>Hmmm, OK, what&#8217;s going on here?  For some reason the ROM in my project isn&#8217;t getting recognised and implemented as initialised block RAM &#8211; what gives?  <\/p>\n\n\n\n<!--more-->\n\n\n\n<p>Let&#8217;s look at the previous line in the flow messages:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>Info (276013): RAM logic \"VirtualToplevel:mytl|Dhrystone_rom:rom|ram\"<\/code><br><code>is uninferred because MIF is not supported for the selected family<\/code><\/pre>\n\n\n\n<p>Ummmm&#8230; yes it is!<\/p>\n\n\n\n<p>There are several variants of MAX10, and it&#8217;s true that the &#8220;Compact&#8221; variants (10MxxSC or 10MxxDC) don&#8217;t support RAM blocks with initial contents, however the DECA board has a 10M50DA part, which definitely does support RAM blocks with initial contents.<\/p>\n\n\n\n<p>I remember running into this issue with my DE10-lite when I first bought it, but having solved the issue I promptly forgot about it!  Having run into it a second time, I&#8217;m now documenting it (a) to remind myself for next time, and (b) in case it&#8217;s useful for anyone else:<\/p>\n\n\n\n<p>It&#8217;s not the device that doesn&#8217;t support MIF, it&#8217;s the format of the programming file that&#8217;s generated by default.  The MAX10 has some internal flash, some of which is available for user-applications, and to make as much of it available as possible, initial RAM contents is disabled by default.  In Quartus&#8217;s &#8220;Assignments -&gt; Device&#8221; dialog, the &#8220;Device and Pins&#8230;&#8221; dialog contains a &#8220;Configuration&#8221; page, where you can choose between several different configuration modes, and if you select one that allows Memory Initialisation, Quartus will once again allow block RAMs to be inferred for ROMs.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>2021-01-30 I&#8217;ve just bought a couple of the ridiculously cheap DECA MAX10 dev boards from Arrow and one of the first projects I attempted to port to it gave me an error message I wasn&#8217;t expecting: Error (276003): Cannot convert &hellip; <a href=\"https:\/\/retroramblings.net\/?p=1509\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,8],"tags":[],"class_list":["post-1509","post","type-post","status-publish","format-standard","hentry","category-fpga","category-hardware"],"_links":{"self":[{"href":"https:\/\/retroramblings.net\/index.php?rest_route=\/wp\/v2\/posts\/1509","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/retroramblings.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/retroramblings.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/retroramblings.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/retroramblings.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1509"}],"version-history":[{"count":3,"href":"https:\/\/retroramblings.net\/index.php?rest_route=\/wp\/v2\/posts\/1509\/revisions"}],"predecessor-version":[{"id":1513,"href":"https:\/\/retroramblings.net\/index.php?rest_route=\/wp\/v2\/posts\/1509\/revisions\/1513"}],"wp:attachment":[{"href":"https:\/\/retroramblings.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1509"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/retroramblings.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1509"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/retroramblings.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1509"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}