<p>As mentioned in <codeclass="docutils literal notranslate"><spanclass="pre">cyclone</span></code> handbooks, real-time decompression is not supported by FPGA in JTAG mode.
Keep in mind to disable this option.</p>
</div>
<p>You can have Quartus automatically generate SVF and RBF files by adding these lines to the <codeclass="docutils literal notranslate"><spanclass="pre">qsf</span></code> file, or include them in a <codeclass="docutils literal notranslate"><spanclass="pre">tcl</span></code> file in FuseSoC</p>
<h3>Internal Flash Organization<aclass="headerlink"href="#internal-flash-organization"title="Link to this heading">¶</a></h3>
<p>The internal flash is divided into five sections:</p>
<ulclass="simple">
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">UFM1</span></code> and <codeclass="docutils literal notranslate"><spanclass="pre">UFM0</span></code> for user data</p></li>
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">CFM2</span></code>, <codeclass="docutils literal notranslate"><spanclass="pre">CFM1</span></code>, and <codeclass="docutils literal notranslate"><spanclass="pre">CFM0</span></code> for storing one or two bitstreams</p></li>
<p>Flash usage depends on the configuration mode. In all modes:</p>
<ulclass="simple">
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">CFM0</span></code> is used to store a bitstream</p></li>
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">UFM0</span></code> and <codeclass="docutils literal notranslate"><spanclass="pre">UFM1</span></code> are available for user data</p></li>
<li><p>The remaining <codeclass="docutils literal notranslate"><spanclass="pre">CFMx</span></code> sections (<codeclass="docutils literal notranslate"><spanclass="pre">CFM1</span></code>, <codeclass="docutils literal notranslate"><spanclass="pre">CFM2</span></code>) can be used for
additional bitstreams or user data</p></li>
</ul>
</section>
<sectionid="using-svf">
<h3>Using <codeclass="docutils literal notranslate"><spanclass="pre">svf</span></code><aclass="headerlink"href="#using-svf"title="Link to this heading">¶</a></h3>
<p>This method is the <strong>simplest</strong> (and slowest) way to load or write a bitstream.</p>
<divclass="admonition note">
<pclass="admonition-title">Note</p>
<p>This method is required to load a bitstream into <em>SRAM</em>.</p>
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">boardname</span></code>: One of the boards supported by <codeclass="docutils literal notranslate"><spanclass="pre">openFPGALoader</span></code> (optional).</p></li>
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">cablename</span></code>: One of the supported cables (see <codeclass="docutils literal notranslate"><spanclass="pre">--list-cables</span></code>).</p></li>
</ul>
</section>
<sectionid="using-pof">
<h3>Using <codeclass="docutils literal notranslate"><spanclass="pre">pof</span></code><aclass="headerlink"href="#using-pof"title="Link to this heading">¶</a></h3>
<p>To write a bitstream into the internal flash, using a <codeclass="docutils literal notranslate"><spanclass="pre">pof</span></code> file is the
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">boardname</span></code>: A board supported by <codeclass="docutils literal notranslate"><spanclass="pre">openFPGALoader</span></code> (optional).</p></li>
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">cablename</span></code>: One of the supported cables (see <codeclass="docutils literal notranslate"><spanclass="pre">--list-cables</span></code>).</p></li>
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">--flash-sector</span></code>: Optional. Comma-separated list of sectors to update.
If omitted, the entire flash is erased and reprogrammed.</p></li>
</ul>
<p>Accepted Flash Sectors:</p>
<ulclass="simple">
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">UFM0</span></code>, <codeclass="docutils literal notranslate"><spanclass="pre">UFM1</span></code>: User Flash Memory sections.</p></li>
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">boardname</span></code>: a boards supported by <codeclass="docutils literal notranslate"><spanclass="pre">openFPGALoader</span></code> (optional).</p></li>
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">cablename</span></code>: One of the supported cables (see <codeclass="docutils literal notranslate"><spanclass="pre">--list-cables</span></code>).</p></li>
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">$OFFSET</span></code>: To start writing <codeclass="docutils literal notranslate"><spanclass="pre">$OFFSET</span></code> bytes after <em>User Flash memory</em>
start address (optional, default: 0x00).</p></li>
</ul>
<p>This command erases and writes the contents of <codeclass="docutils literal notranslate"><spanclass="pre">the_bin_file.bin</span></code> into
<codeclass="docutils literal notranslate"><spanclass="pre">UFM1</span></code> and <codeclass="docutils literal notranslate"><spanclass="pre">UFM0</span></code>. If <codeclass="docutils literal notranslate"><spanclass="pre">--offset</span></code> is specified, the binary content is
written starting from that offset.</p>
<p>Depending on the max10 configuration mode (see picture), it’s possible to
extend <em>User Flash Memory</em> area by using <cite>CFM2</cite> and <cite>CFM1</cite>. This is not the
default behavior and user must explictly change this by using
<cite>–flash-sector</cite> argument:</p>
<ulclass="simple">
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">--flash-sector</span><spanclass="pre">UFMx</span></code> or <codeclass="docutils literal notranslate"><spanclass="pre">--flash-sector</span><spanclass="pre">CFMy</span></code> (with x= 1 or 0 and
y = 2 or 1) to specify only one sector</p></li>
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">--flash-sector</span><spanclass="pre">UFM1,UFM0</span></code> is equivalent to the default behavior</p></li>
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">--flash-sector</span><spanclass="pre">UFM1,CFM2</span></code> to erase and update <codeclass="docutils literal notranslate"><spanclass="pre">UFM1</span></code>, <codeclass="docutils literal notranslate"><spanclass="pre">UFM0</span></code>
and <codeclass="docutils literal notranslate"><spanclass="pre">CFM2</span></code> (equivalent to <codeclass="docutils literal notranslate"><spanclass="pre">--flash-sector</span><spanclass="pre">UFM1,UFM0,CFM2</span></code>)</p></li>
</ul>
</section>
</section>
<sectionid="intel-altera-old-boards">
<h2>Intel/Altera (Old Boards)<aclass="headerlink"href="#intel-altera-old-boards"title="Link to this heading">¶</a></h2>
<divclass="admonition note">
<pclass="admonition-title">Note</p>
<ulclass="simple">
<li><p>Cyclone II (FPGA) (Tested OK: EP2C5T144C8N)</p></li>
<li><p>Max II (CPLD) (Tested OK: EPM240T100C5N)</p></li>
</ul>
</div>
<sectionid="loading-a-serial-vector-format-svf">
<h3>Loading a Serial Vector Format (.svf)<aclass="headerlink"href="#loading-a-serial-vector-format-svf"title="Link to this heading">¶</a></h3>