Skip to content

Commit

Permalink
Adapt transactron.lib.storage to amaranth.lib.data (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
tilk committed Jan 17, 2025
1 parent ad1c690 commit db4ba56
Show file tree
Hide file tree
Showing 20 changed files with 44 additions and 44 deletions.
Binary file modified .doctrees/api.doctree
Binary file not shown.
Binary file modified .doctrees/environment.pickle
Binary file not shown.
Binary file modified .doctrees/transactron.lib.doctree
Binary file not shown.
Binary file modified .doctrees/transactron.utils.amaranth_ext.doctree
Binary file not shown.
2 changes: 1 addition & 1 deletion api.html
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ <h2>transactron<a class="headerlink" href="#transactron" title="Permalink to thi

<div role="contentinfo">
<p>&#169; Copyright Kuźnia Rdzeni, 2025.
<span class="lastupdated">Last updated on 11:59 2025-01-17.
<span class="lastupdated">Last updated on 12:00 2025-01-17.
</span></p>
</div>

Expand Down
2 changes: 1 addition & 1 deletion development-environment.html
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ <h3>tprof.py<a class="headerlink" href="#tprof-py" title="Permalink to this head

<div role="contentinfo">
<p>&#169; Copyright Kuźnia Rdzeni, 2025.
<span class="lastupdated">Last updated on 11:59 2025-01-17.
<span class="lastupdated">Last updated on 12:00 2025-01-17.
</span></p>
</div>

Expand Down
8 changes: 4 additions & 4 deletions genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ <h2 id="_">_</h2>
<li><a href="transactron.lib.html#transactron.lib.connectors.ManyToOneConnectTrans.__init__">(transactron.lib.connectors.ManyToOneConnectTrans method)</a>
</li>
<li><a href="transactron.lib.html#transactron.lib.connectors.Pipe.__init__">(transactron.lib.connectors.Pipe method)</a>
</li>
<li><a href="transactron.lib.html#transactron.lib.connectors.StableSelectingNetwork.__init__">(transactron.lib.connectors.StableSelectingNetwork method)</a>
</li>
<li><a href="transactron.lib.html#transactron.lib.dependencies.DependencyManager.__init__">(transactron.lib.dependencies.DependencyManager method)</a>
</li>
Expand Down Expand Up @@ -255,8 +257,6 @@ <h2 id="_">_</h2>
<li><a href="transactron.utils.amaranth_ext.html#transactron.utils.amaranth_ext.elaboratables.RoundRobin.__init__">(transactron.utils.amaranth_ext.elaboratables.RoundRobin method)</a>
</li>
<li><a href="transactron.utils.amaranth_ext.html#transactron.utils.amaranth_ext.elaboratables.Scheduler.__init__">(transactron.utils.amaranth_ext.elaboratables.Scheduler method)</a>
</li>
<li><a href="transactron.utils.amaranth_ext.html#transactron.utils.amaranth_ext.elaboratables.StableSelectingNetwork.__init__">(transactron.utils.amaranth_ext.elaboratables.StableSelectingNetwork method)</a>
</li>
<li><a href="transactron.utils.html#transactron.utils.depcache.DependentCache.__init__">(transactron.utils.depcache.DependentCache method)</a>
</li>
Expand Down Expand Up @@ -1352,7 +1352,7 @@ <h2 id="S">S</h2>
<li><a href="transactron.html#transactron.profiler.RunStat.src_loc">(transactron.profiler.RunStat attribute)</a>
</li>
</ul></li>
<li><a href="transactron.utils.amaranth_ext.html#transactron.utils.amaranth_ext.elaboratables.StableSelectingNetwork">StableSelectingNetwork (class in transactron.utils.amaranth_ext.elaboratables)</a>
<li><a href="transactron.lib.html#transactron.lib.connectors.StableSelectingNetwork">StableSelectingNetwork (class in transactron.lib.connectors)</a>
</li>
<li><a href="transactron.core.html#transactron.core.body.Body.stack">stack (transactron.core.body.Body attribute)</a>

Expand Down Expand Up @@ -1897,7 +1897,7 @@ <h2 id="W">W</h2>

<div role="contentinfo">
<p>&#169; Copyright Kuźnia Rdzeni, 2025.
<span class="lastupdated">Last updated on 11:59 2025-01-17.
<span class="lastupdated">Last updated on 12:00 2025-01-17.
</span></p>
</div>

Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ <h1>Transactron<a class="headerlink" href="#transactron" title="Permalink to thi

<div role="contentinfo">
<p>&#169; Copyright Kuźnia Rdzeni, 2025.
<span class="lastupdated">Last updated on 11:59 2025-01-17.
<span class="lastupdated">Last updated on 12:00 2025-01-17.
</span></p>
</div>

Expand Down
2 changes: 1 addition & 1 deletion modules.html
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ <h1>transactron<a class="headerlink" href="#transactron" title="Permalink to thi

<div role="contentinfo">
<p>&#169; Copyright Kuźnia Rdzeni, 2025.
<span class="lastupdated">Last updated on 11:59 2025-01-17.
<span class="lastupdated">Last updated on 12:00 2025-01-17.
</span></p>
</div>

Expand Down
Binary file modified objects.inv
Binary file not shown.
2 changes: 1 addition & 1 deletion py-modindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ <h1>Python Module Index</h1>

<div role="contentinfo">
<p>&#169; Copyright Kuźnia Rdzeni, 2025.
<span class="lastupdated">Last updated on 11:59 2025-01-17.
<span class="lastupdated">Last updated on 12:00 2025-01-17.
</span></p>
</div>

Expand Down
2 changes: 1 addition & 1 deletion search.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@

<div role="contentinfo">
<p>&#169; Copyright Kuźnia Rdzeni, 2025.
<span class="lastupdated">Last updated on 11:59 2025-01-17.
<span class="lastupdated">Last updated on 12:00 2025-01-17.
</span></p>
</div>

Expand Down
2 changes: 1 addition & 1 deletion searchindex.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion transactions.html
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ <h3>Transaction and method nesting<a class="headerlink" href="#transaction-and-m

<div role="contentinfo">
<p>&#169; Copyright Kuźnia Rdzeni, 2025.
<span class="lastupdated">Last updated on 11:59 2025-01-17.
<span class="lastupdated">Last updated on 12:00 2025-01-17.
</span></p>
</div>

Expand Down
2 changes: 1 addition & 1 deletion transactron.core.html
Original file line number Diff line number Diff line change
Expand Up @@ -1020,7 +1020,7 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this

<div role="contentinfo">
<p>&#169; Copyright Kuźnia Rdzeni, 2025.
<span class="lastupdated">Last updated on 11:59 2025-01-17.
<span class="lastupdated">Last updated on 12:00 2025-01-17.
</span></p>
</div>

Expand Down
2 changes: 1 addition & 1 deletion transactron.html
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,7 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this

<div role="contentinfo">
<p>&#169; Copyright Kuźnia Rdzeni, 2025.
<span class="lastupdated">Last updated on 11:59 2025-01-17.
<span class="lastupdated">Last updated on 12:00 2025-01-17.
</span></p>
</div>

Expand Down
28 changes: 27 additions & 1 deletion transactron.lib.html
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,32 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="transactron.lib.connectors.StableSelectingNetwork">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">transactron.lib.connectors.</span></span><span class="sig-name descname"><span class="pre">StableSelectingNetwork</span></span><a class="headerlink" href="#transactron.lib.connectors.StableSelectingNetwork" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">Elaboratable</span></code></p>
<p>A network that groups inputs with a valid bit set.</p>
<p>The circuit takes <cite>n</cite> inputs with a valid signal each and
on the output returns a grouped and consecutive sequence of the provided
input signals. The order of valid inputs is preserved.</p>
<p>For example for input (0 is an invalid input):
0, a, 0, d, 0, 0, e</p>
<p>The circuit will return:
a, d, e, 0, 0, 0, 0</p>
<p>The circuit uses a divide and conquer algorithm.
The recursive call takes two bit vectors and each of them
is already properly sorted, for example:
v1 = [a, b, 0, 0]; v2 = [c, d, e, 0]</p>
<p>Now by shifting left v2 and merging it with v1, we get the result:
v = [a, b, c, d, e, 0, 0, 0]</p>
<p>Thus, the network has depth log_2(n).</p>
<dl class="py method">
<dt class="sig sig-object py" id="transactron.lib.connectors.StableSelectingNetwork.__init__">
<span class="sig-name descname"><span class="pre">__init__</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">n</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.13)"><span class="pre">int</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">layout</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://amaranth-lang.org/docs/amaranth/latest/stdlib/data.html#amaranth.lib.data.StructLayout" title="(in Amaranth language &amp; toolchain v0.6.0.dev72)"><span class="pre">amaranth.lib.data.StructLayout</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/collections.abc.html#collections.abc.Iterable" title="(in Python v3.13)"><span class="pre">collections.abc.Iterable</span></a><span class="p"><span class="pre">[</span></span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#tuple" title="(in Python v3.13)"><span class="pre">tuple</span></a><span class="p"><span class="pre">[</span></span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><span class="pre">str</span></a><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="s"><span class="pre">'ShapeLike</span> <span class="pre">|</span> <span class="pre">LayoutList'</span></span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">]</span></span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#transactron.lib.connectors.StableSelectingNetwork.__init__" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

</dd></dl>

</section>
<section id="module-transactron.lib.dependencies">
<span id="transactron-lib-dependencies-module"></span><h2>transactron.lib.dependencies module<a class="headerlink" href="#module-transactron.lib.dependencies" title="Permalink to this heading"></a></h2>
Expand Down Expand Up @@ -2333,7 +2359,7 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this

<div role="contentinfo">
<p>&#169; Copyright Kuźnia Rdzeni, 2025.
<span class="lastupdated">Last updated on 11:59 2025-01-17.
<span class="lastupdated">Last updated on 12:00 2025-01-17.
</span></p>
</div>

Expand Down
2 changes: 1 addition & 1 deletion transactron.testing.html
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this

<div role="contentinfo">
<p>&#169; Copyright Kuźnia Rdzeni, 2025.
<span class="lastupdated">Last updated on 11:59 2025-01-17.
<span class="lastupdated">Last updated on 12:00 2025-01-17.
</span></p>
</div>

Expand Down
28 changes: 1 addition & 27 deletions transactron.utils.amaranth_ext.html
Original file line number Diff line number Diff line change
Expand Up @@ -586,32 +586,6 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="transactron.utils.amaranth_ext.elaboratables.StableSelectingNetwork">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">transactron.utils.amaranth_ext.elaboratables.</span></span><span class="sig-name descname"><span class="pre">StableSelectingNetwork</span></span><a class="headerlink" href="#transactron.utils.amaranth_ext.elaboratables.StableSelectingNetwork" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">Elaboratable</span></code></p>
<p>A network that groups inputs with a valid bit set.</p>
<p>The circuit takes <cite>n</cite> inputs with a valid signal each and
on the output returns a grouped and consecutive sequence of the provided
input signals. The order of valid inputs is preserved.</p>
<p>For example for input (0 is an invalid input):
0, a, 0, d, 0, 0, e</p>
<p>The circuit will return:
a, d, e, 0, 0, 0, 0</p>
<p>The circuit uses a divide and conquer algorithm.
The recursive call takes two bit vectors and each of them
is already properly sorted, for example:
v1 = [a, b, 0, 0]; v2 = [c, d, e, 0]</p>
<p>Now by shifting left v2 and merging it with v1, we get the result:
v = [a, b, c, d, e, 0, 0, 0]</p>
<p>Thus, the network has depth log_2(n).</p>
<dl class="py method">
<dt class="sig sig-object py" id="transactron.utils.amaranth_ext.elaboratables.StableSelectingNetwork.__init__">
<span class="sig-name descname"><span class="pre">__init__</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">n</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.13)"><span class="pre">int</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">shape</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://amaranth-lang.org/docs/amaranth/latest/reference.html#amaranth.hdl.Shape" title="(in Amaranth language &amp; toolchain v0.6.0.dev72)"><span class="pre">amaranth.hdl._ast.Shape</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://amaranth-lang.org/docs/amaranth/latest/reference.html#amaranth.hdl.ShapeCastable" title="(in Amaranth language &amp; toolchain v0.6.0.dev72)"><span class="pre">amaranth.hdl._ast.ShapeCastable</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.13)"><span class="pre">int</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#range" title="(in Python v3.13)"><span class="pre">range</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/functions.html#type" title="(in Python v3.13)"><span class="pre">type</span></a><span class="p"><span class="pre">[</span></span><a class="reference external" href="https://docs.python.org/3/library/enum.html#enum.Enum" title="(in Python v3.13)"><span class="pre">enum.Enum</span></a><span class="p"><span class="pre">]</span></span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#transactron.utils.amaranth_ext.elaboratables.StableSelectingNetwork.__init__" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

</dd></dl>

</section>
<section id="module-transactron.utils.amaranth_ext.functions">
<span id="transactron-utils-amaranth-ext-functions-module"></span><h2>transactron.utils.amaranth_ext.functions module<a class="headerlink" href="#module-transactron.utils.amaranth_ext.functions" title="Permalink to this heading"></a></h2>
Expand Down Expand Up @@ -1020,7 +994,7 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this

<div role="contentinfo">
<p>&#169; Copyright Kuźnia Rdzeni, 2025.
<span class="lastupdated">Last updated on 11:59 2025-01-17.
<span class="lastupdated">Last updated on 12:00 2025-01-17.
</span></p>
</div>

Expand Down
2 changes: 1 addition & 1 deletion transactron.utils.html
Original file line number Diff line number Diff line change
Expand Up @@ -834,7 +834,7 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this

<div role="contentinfo">
<p>&#169; Copyright Kuźnia Rdzeni, 2025.
<span class="lastupdated">Last updated on 11:59 2025-01-17.
<span class="lastupdated">Last updated on 12:00 2025-01-17.
</span></p>
</div>

Expand Down

0 comments on commit db4ba56

Please sign in to comment.