Skip to content

Commit

Permalink
deploy: b20db61
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigomelo9 committed May 31, 2024
1 parent fc7c94d commit 90d7481
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 176 deletions.
69 changes: 17 additions & 52 deletions _modules/pyfpga/project.html
Original file line number Diff line number Diff line change
Expand Up @@ -86,23 +86,11 @@ <h1>Source code for pyfpga.project</h1><div class="highlight"><pre>
<span class="kn">import</span> <span class="nn">os</span>
<span class="kn">import</span> <span class="nn">subprocess</span>

<span class="kn">from</span> <span class="nn">enum</span> <span class="kn">import</span> <span class="n">Enum</span>
<span class="kn">from</span> <span class="nn">datetime</span> <span class="kn">import</span> <span class="n">datetime</span>
<span class="kn">from</span> <span class="nn">pathlib</span> <span class="kn">import</span> <span class="n">Path</span>
<span class="kn">from</span> <span class="nn">time</span> <span class="kn">import</span> <span class="n">time</span>


<div class="viewcode-block" id="Step">
<a class="viewcode-back" href="../../api.html#pyfpga.project.Step">[docs]</a>
<span class="k">class</span> <span class="nc">Step</span><span class="p">(</span><span class="n">Enum</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Enumeration of supported Steps&quot;&quot;&quot;</span>
<span class="n">PRJ</span> <span class="o">=</span> <span class="s1">&#39;prj&#39;</span>
<span class="n">SYN</span> <span class="o">=</span> <span class="s1">&#39;syn&#39;</span>
<span class="n">PAR</span> <span class="o">=</span> <span class="s1">&#39;par&#39;</span>
<span class="n">BIT</span> <span class="o">=</span> <span class="s1">&#39;bit&#39;</span></div>



<div class="viewcode-block" id="Project">
<a class="viewcode-back" href="../../api.html#pyfpga.project.Project">[docs]</a>
<span class="k">class</span> <span class="nc">Project</span><span class="p">:</span>
Expand Down Expand Up @@ -228,52 +216,29 @@ <h1>Source code for pyfpga.project</h1><div class="highlight"><pre>
<span class="bp">self</span><span class="o">.</span><span class="n">data</span><span class="p">[</span><span class="s1">&#39;top&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="n">name</span></div>


<div class="viewcode-block" id="Project.add_precfg_hook">
<a class="viewcode-back" href="../../api.html#pyfpga.project.Project.add_precfg_hook">[docs]</a>
<span class="k">def</span> <span class="nf">add_precfg_hook</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">content</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Temp placeholder&quot;&quot;&quot;</span>
<span class="k">raise</span> <span class="ne">NotImplementedError</span><span class="p">(</span><span class="s1">&#39;Method is not implemented yet.&#39;</span><span class="p">)</span></div>


<div class="viewcode-block" id="Project.add_postcfg_hook">
<a class="viewcode-back" href="../../api.html#pyfpga.project.Project.add_postcfg_hook">[docs]</a>
<span class="k">def</span> <span class="nf">add_postcfg_hook</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">content</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Temp placeholder&quot;&quot;&quot;</span>
<span class="k">raise</span> <span class="ne">NotImplementedError</span><span class="p">(</span><span class="s1">&#39;Method is not implemented yet.&#39;</span><span class="p">)</span></div>


<div class="viewcode-block" id="Project.add_presyn_hook">
<a class="viewcode-back" href="../../api.html#pyfpga.project.Project.add_presyn_hook">[docs]</a>
<span class="k">def</span> <span class="nf">add_presyn_hook</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">content</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Temp placeholder&quot;&quot;&quot;</span>
<span class="k">raise</span> <span class="ne">NotImplementedError</span><span class="p">(</span><span class="s1">&#39;Method is not implemented yet.&#39;</span><span class="p">)</span></div>


<div class="viewcode-block" id="Project.add_prepar_hook">
<a class="viewcode-back" href="../../api.html#pyfpga.project.Project.add_prepar_hook">[docs]</a>
<span class="k">def</span> <span class="nf">add_prepar_hook</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">content</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Temp placeholder&quot;&quot;&quot;</span>
<span class="k">raise</span> <span class="ne">NotImplementedError</span><span class="p">(</span><span class="s1">&#39;Method is not implemented yet.&#39;</span><span class="p">)</span></div>


<div class="viewcode-block" id="Project.add_prebit_hook">
<a class="viewcode-back" href="../../api.html#pyfpga.project.Project.add_prebit_hook">[docs]</a>
<span class="k">def</span> <span class="nf">add_prebit_hook</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">content</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Temp placeholder&quot;&quot;&quot;</span>
<span class="k">raise</span> <span class="ne">NotImplementedError</span><span class="p">(</span><span class="s1">&#39;Method is not implemented yet.&#39;</span><span class="p">)</span></div>


<div class="viewcode-block" id="Project.add_postbit_hook">
<a class="viewcode-back" href="../../api.html#pyfpga.project.Project.add_postbit_hook">[docs]</a>
<span class="k">def</span> <span class="nf">add_postbit_hook</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">content</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Temp placeholder&quot;&quot;&quot;</span>
<div class="viewcode-block" id="Project.add_hook">
<a class="viewcode-back" href="../../api.html#pyfpga.project.Project.add_hook">[docs]</a>
<span class="k">def</span> <span class="nf">add_hook</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">stage</span><span class="p">,</span> <span class="n">hook</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Add hook for a specific stage.&quot;&quot;&quot;</span>
<span class="n">stages</span> <span class="o">=</span> <span class="p">[</span>
<span class="s1">&#39;precfg&#39;</span><span class="p">,</span> <span class="s1">&#39;postcfg&#39;</span><span class="p">,</span> <span class="s1">&#39;presyn&#39;</span><span class="p">,</span> <span class="s1">&#39;postsyn&#39;</span><span class="p">,</span>
<span class="s1">&#39;prepar&#39;</span><span class="p">,</span> <span class="s1">&#39;postpar&#39;</span><span class="p">,</span> <span class="s1">&#39;prebit&#39;</span><span class="p">,</span> <span class="s1">&#39;postbit&#39;</span>
<span class="p">]</span>
<span class="k">if</span> <span class="n">stage</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">stages</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s1">&#39;Invalid stage.&#39;</span><span class="p">)</span>
<span class="n">_</span> <span class="o">=</span> <span class="bp">self</span>
<span class="n">_</span> <span class="o">=</span> <span class="n">hook</span>
<span class="k">raise</span> <span class="ne">NotImplementedError</span><span class="p">(</span><span class="s1">&#39;Method is not implemented yet.&#39;</span><span class="p">)</span></div>


<div class="viewcode-block" id="Project.make">
<a class="viewcode-back" href="../../api.html#pyfpga.project.Project.make">[docs]</a>
<span class="k">def</span> <span class="nf">make</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">end</span><span class="o">=</span><span class="n">Step</span><span class="o">.</span><span class="n">BIT</span><span class="p">,</span> <span class="n">start</span><span class="o">=</span><span class="n">Step</span><span class="o">.</span><span class="n">PRJ</span><span class="p">,</span> <span class="n">capture</span><span class="o">=</span><span class="kc">False</span><span class="p">):</span>
<span class="k">def</span> <span class="nf">make</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">end</span><span class="o">=</span><span class="s1">&#39;bit&#39;</span><span class="p">,</span> <span class="n">start</span><span class="o">=</span><span class="s1">&#39;prj&#39;</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Temp placeholder&quot;&quot;&quot;</span>
<span class="n">steps</span> <span class="o">=</span> <span class="p">[</span><span class="s1">&#39;prj&#39;</span><span class="p">,</span> <span class="s1">&#39;syn&#39;</span><span class="p">,</span> <span class="s1">&#39;par&#39;</span><span class="p">,</span> <span class="s1">&#39;bit&#39;</span><span class="p">]</span>
<span class="k">if</span> <span class="n">end</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">steps</span> <span class="ow">or</span> <span class="n">start</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">steps</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s1">&#39;Invalid steps.&#39;</span><span class="p">)</span>
<span class="n">_</span> <span class="o">=</span> <span class="bp">self</span>
<span class="k">raise</span> <span class="ne">NotImplementedError</span><span class="p">(</span><span class="s1">&#39;Method is not implemented yet.&#39;</span><span class="p">)</span></div>


Expand Down
2 changes: 2 additions & 0 deletions _sources/hooks.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ Hooks
open project
presyn hook
synthesis
postsyn hook
prepar hook
place_and_route
postpar hook
prebit hook
bitstream
postbit hook
Expand Down
Loading

0 comments on commit 90d7481

Please sign in to comment.