Skip to content

Commit

Permalink
Deploying to gh-pages from @ 8b35106 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
Dolu1990 committed Sep 11, 2024
1 parent cdea203 commit 955f18b
Show file tree
Hide file tree
Showing 48 changed files with 65 additions and 29 deletions.
2 changes: 1 addition & 1 deletion master/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 766945666379cf39d35347feb2cf8d9f
config: ecb3fb490b927b476418f720adc714cb
tags: 645f666f9bcd5a90fca523b33c5a78b7
Binary file modified master/.doctrees/VexiiRiscv/BranchPrediction/index.doctree
Binary file not shown.
Binary file modified master/.doctrees/VexiiRiscv/Debug/index.doctree
Binary file not shown.
Binary file modified master/.doctrees/VexiiRiscv/Debug/jtag.doctree
Binary file not shown.
Binary file modified master/.doctrees/VexiiRiscv/Decode/index.doctree
Binary file not shown.
Binary file modified master/.doctrees/VexiiRiscv/Execute/custom.doctree
Binary file not shown.
Binary file modified master/.doctrees/VexiiRiscv/Execute/fpu.doctree
Binary file not shown.
Binary file modified master/.doctrees/VexiiRiscv/Execute/index.doctree
Binary file not shown.
Binary file modified master/.doctrees/VexiiRiscv/Execute/introduction.doctree
Binary file not shown.
Binary file modified master/.doctrees/VexiiRiscv/Execute/lsu.doctree
Binary file not shown.
Binary file modified master/.doctrees/VexiiRiscv/Execute/plugins.doctree
Binary file not shown.
Binary file modified master/.doctrees/VexiiRiscv/Fetch/index.doctree
Binary file not shown.
Binary file modified master/.doctrees/VexiiRiscv/Framework/index.doctree
Binary file not shown.
Binary file modified master/.doctrees/VexiiRiscv/HowToUse/index.doctree
Binary file not shown.
Binary file modified master/.doctrees/VexiiRiscv/Introduction/index.doctree
Binary file not shown.
Binary file modified master/.doctrees/VexiiRiscv/Performance/index.doctree
Binary file not shown.
Binary file modified master/.doctrees/VexiiRiscv/Soc/index.doctree
Binary file not shown.
Binary file modified master/.doctrees/VexiiRiscv/Soc/litex.doctree
Binary file not shown.
Binary file modified master/.doctrees/VexiiRiscv/Soc/microsoc.doctree
Binary file not shown.
Binary file modified master/.doctrees/environment.pickle
Binary file not shown.
Binary file modified master/.doctrees/index.doctree
Binary file not shown.
25 changes: 21 additions & 4 deletions master/VexiiRiscv/BranchPrediction/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -267,29 +267,46 @@ <h2>BtbPlugin<a class="headerlink" href="#btbplugin" title="Permalink to this he
<li><p>Implement a return address stack buffer</p></li>
<li><p>Predict which slices of the fetched word are the last slice of a branch/jump</p></li>
<li><p>Predict the branch/jump target</p></li>
<li><p>Predict if the given instruction is a branch, a jump or something else</p></li>
<li><p>Predict if the given instruction should push or pop the RAS (Return Address Stack)</p></li>
<li><p>Use the FetchConditionalPrediction plugin (GSharePlugin) to know if branch should be taken</p></li>
<li><p>Apply the prediction (flush + pc update + history update)</p></li>
<li><p>Learn using the LearnPlugin interface. Only learn on misprediction. To avoid write to read hazard, the fetch stage is blocked when it learn.</p></li>
<li><p>Implement “ways” named chunks which are statically assigned to groups of word’s slices, allowing to predict multiple branch/jump present in the same word</p></li>
</ul>
<img alt="../../_images/btb.png" src="../../_images/btb.png" />
<p>Note that it may help to not make the BTB learn when there has been a non-taken branch.</p>
<ul class="simple">
<li><p>The BTB don’t need to predict non-taken branch</p></li>
<li><p>Keep the BTB entry for something more usefull</p></li>
<li><p>For configs in which multiple instruction can reside in a single fetch word (ex dual issue with RVC),
multiple branch/jump instruction can reside in a single fetch word =&gt; need for compromises,
and hope that some of the branch/jump in the chunk are rarely taken.</p></li>
</ul>
</section>
<section id="gshareplugin">
<h2>GSharePlugin<a class="headerlink" href="#gshareplugin" title="Permalink to this heading"></a></h2>
<p>Will :</p>
<ul class="simple">
<li><p>Implement a FetchConditionalPrediction (GShare flavor)</p></li>
<li><p>Learn using the LearnPlugin interface. Write to read hazard are handled via a bypass</p></li>
<li><p>Will not apply the prediction via flush / pc change, another plugin will do that</p></li>
<li><p>Will not apply the prediction via flush / pc change, another plugin will do that (ex : BtbPlugin)</p></li>
</ul>
<p>Note that one of the current issue with GShare, is that it take quite a few iterations to learn (depending the branch history)</p>
</section>
<section id="decodepredictionplugin">
<h2>DecodePredictionPlugin<a class="headerlink" href="#decodepredictionplugin" title="Permalink to this heading"></a></h2>
<p>The purpose of this plugin is to ensure that no branch/jump prediction was made for non branch/jump instructions.
In case this is detected, the plugin will just flush the pipeline and set the fetch PC to redo everything, but this time with a “first prediction skip”</p>
In case this is detected, the plugin will :</p>
<ul class="simple">
<li><p>schedule a “REDO trap” which will flush everything and make the CPU jump to the failed instruction</p></li>
<li><p>Make the predictor skip the first incoming prediction</p></li>
<li><p>Make the predictor unlearn the prediction entry which failed</p></li>
</ul>
</section>
<section id="branchplugin">
<h2>BranchPlugin<a class="headerlink" href="#branchplugin" title="Permalink to this heading"></a></h2>
<p>Placed in the execute pipeline, it will ensure that the branch prediction was correct, else it correct it. It also generate a learn interface.</p>
<p>Placed in the execute pipeline, it will ensure that the branch predictions were correct, else it correct them. It also generate a learn interface to feed the LearnPlugin.</p>
</section>
<section id="learnplugin">
<h2>LearnPlugin<a class="headerlink" href="#learnplugin" title="Permalink to this heading"></a></h2>
Expand Down Expand Up @@ -326,7 +343,7 @@ <h2>LearnPlugin<a class="headerlink" href="#learnplugin" title="Permalink to thi
<!-- source/_templates/footer.html -->

<div class="doc-footer-current-version"><p>
Version: master git~d7fa741 2024-09-10
Version: master git~8b35106 2024-09-11
</p></div>


Expand Down
2 changes: 1 addition & 1 deletion master/VexiiRiscv/Debug/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ <h1>Debug<a class="headerlink" href="#debug" title="Permalink to this heading">
<!-- source/_templates/footer.html -->

<div class="doc-footer-current-version"><p>
Version: master git~d7fa741 2024-09-10
Version: master git~8b35106 2024-09-11
</p></div>


Expand Down
2 changes: 1 addition & 1 deletion master/VexiiRiscv/Debug/jtag.html
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ <h1>JTAG<a class="headerlink" href="#jtag" title="Permalink to this heading">
<!-- source/_templates/footer.html -->

<div class="doc-footer-current-version"><p>
Version: master git~d7fa741 2024-09-10
Version: master git~8b35106 2024-09-11
</p></div>


Expand Down
2 changes: 1 addition & 1 deletion master/VexiiRiscv/Decode/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ <h2>DispatchPlugin<a class="headerlink" href="#dispatchplugin" title="Permalink
<!-- source/_templates/footer.html -->

<div class="doc-footer-current-version"><p>
Version: master git~d7fa741 2024-09-10
Version: master git~8b35106 2024-09-11
</p></div>


Expand Down
2 changes: 1 addition & 1 deletion master/VexiiRiscv/Execute/custom.html
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ <h3>Conclusion<a class="headerlink" href="#conclusion" title="Permalink to this
<!-- source/_templates/footer.html -->

<div class="doc-footer-current-version"><p>
Version: master git~d7fa741 2024-09-10
Version: master git~8b35106 2024-09-11
</p></div>


Expand Down
2 changes: 1 addition & 1 deletion master/VexiiRiscv/Execute/fpu.html
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ <h2>Optimized software<a class="headerlink" href="#optimized-software" title="Pe
<!-- source/_templates/footer.html -->

<div class="doc-footer-current-version"><p>
Version: master git~d7fa741 2024-09-10
Version: master git~8b35106 2024-09-11
</p></div>


Expand Down
2 changes: 1 addition & 1 deletion master/VexiiRiscv/Execute/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ <h1>Execute<a class="headerlink" href="#execute" title="Permalink to this headin
<!-- source/_templates/footer.html -->

<div class="doc-footer-current-version"><p>
Version: master git~d7fa741 2024-09-10
Version: master git~8b35106 2024-09-11
</p></div>


Expand Down
2 changes: 1 addition & 1 deletion master/VexiiRiscv/Execute/introduction.html
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ <h1>Introduction<a class="headerlink" href="#introduction" title="Permalink to t
<!-- source/_templates/footer.html -->

<div class="doc-footer-current-version"><p>
Version: master git~d7fa741 2024-09-10
Version: master git~8b35106 2024-09-11
</p></div>


Expand Down
2 changes: 1 addition & 1 deletion master/VexiiRiscv/Execute/lsu.html
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ <h3>PrefetchRptPlugin<a class="headerlink" href="#prefetchrptplugin" title="Perm
<!-- source/_templates/footer.html -->

<div class="doc-footer-current-version"><p>
Version: master git~d7fa741 2024-09-10
Version: master git~8b35106 2024-09-11
</p></div>


Expand Down
2 changes: 1 addition & 1 deletion master/VexiiRiscv/Execute/plugins.html
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ <h3>EnvPlugin<a class="headerlink" href="#envplugin" title="Permalink to this he
<!-- source/_templates/footer.html -->

<div class="doc-footer-current-version"><p>
Version: master git~d7fa741 2024-09-10
Version: master git~8b35106 2024-09-11
</p></div>


Expand Down
2 changes: 1 addition & 1 deletion master/VexiiRiscv/Fetch/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ <h2>HistoryPlugin<a class="headerlink" href="#historyplugin" title="Permalink to
<!-- source/_templates/footer.html -->

<div class="doc-footer-current-version"><p>
Version: master git~d7fa741 2024-09-10
Version: master git~8b35106 2024-09-11
</p></div>


Expand Down
2 changes: 1 addition & 1 deletion master/VexiiRiscv/Framework/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ <h2>Pipeline API<a class="headerlink" href="#pipeline-api" title="Permalink to t
<!-- source/_templates/footer.html -->

<div class="doc-footer-current-version"><p>
Version: master git~d7fa741 2024-09-10
Version: master git~8b35106 2024-09-11
</p></div>


Expand Down
2 changes: 1 addition & 1 deletion master/VexiiRiscv/HowToUse/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ <h2>Synthesis / Inferation<a class="headerlink" href="#synthesis-inferation" tit
<!-- source/_templates/footer.html -->

<div class="doc-footer-current-version"><p>
Version: master git~d7fa741 2024-09-10
Version: master git~8b35106 2024-09-11
</p></div>


Expand Down
2 changes: 1 addition & 1 deletion master/VexiiRiscv/Introduction/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ <h2>Check list<a class="headerlink" href="#check-list" title="Permalink to this
<!-- source/_templates/footer.html -->

<div class="doc-footer-current-version"><p>
Version: master git~d7fa741 2024-09-10
Version: master git~8b35106 2024-09-11
</p></div>


Expand Down
2 changes: 1 addition & 1 deletion master/VexiiRiscv/Performance/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ <h2>Tuning<a class="headerlink" href="#tuning" title="Permalink to this heading"
<!-- source/_templates/footer.html -->

<div class="doc-footer-current-version"><p>
Version: master git~d7fa741 2024-09-10
Version: master git~8b35106 2024-09-11
</p></div>


Expand Down
2 changes: 1 addition & 1 deletion master/VexiiRiscv/Soc/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ <h1>SoC<a class="headerlink" href="#soc" title="Permalink to this heading"></
<!-- source/_templates/footer.html -->

<div class="doc-footer-current-version"><p>
Version: master git~d7fa741 2024-09-10
Version: master git~8b35106 2024-09-11
</p></div>


Expand Down
2 changes: 1 addition & 1 deletion master/VexiiRiscv/Soc/litex.html
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ <h1>Litex<a class="headerlink" href="#litex" title="Permalink to this heading">
<!-- source/_templates/footer.html -->

<div class="doc-footer-current-version"><p>
Version: master git~d7fa741 2024-09-10
Version: master git~8b35106 2024-09-11
</p></div>


Expand Down
2 changes: 1 addition & 1 deletion master/VexiiRiscv/Soc/microsoc.html
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ <h1>MicroSoc<a class="headerlink" href="#microsoc" title="Permalink to this head
<!-- source/_templates/footer.html -->

<div class="doc-footer-current-version"><p>
Version: master git~d7fa741 2024-09-10
Version: master git~8b35106 2024-09-11
</p></div>


Expand Down
Binary file added master/_images/btb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified master/_images/fetch_l1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 22 additions & 3 deletions master/_sources/VexiiRiscv/BranchPrediction/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,30 +22,49 @@ Will :
- Implement a return address stack buffer
- Predict which slices of the fetched word are the last slice of a branch/jump
- Predict the branch/jump target
- Predict if the given instruction is a branch, a jump or something else
- Predict if the given instruction should push or pop the RAS (Return Address Stack)
- Use the FetchConditionalPrediction plugin (GSharePlugin) to know if branch should be taken
- Apply the prediction (flush + pc update + history update)
- Learn using the LearnPlugin interface. Only learn on misprediction. To avoid write to read hazard, the fetch stage is blocked when it learn.
- Implement "ways" named chunks which are statically assigned to groups of word's slices, allowing to predict multiple branch/jump present in the same word


.. image:: /asset/picture/btb.png

Note that it may help to not make the BTB learn when there has been a non-taken branch.

- The BTB don't need to predict non-taken branch
- Keep the BTB entry for something more usefull
- For configs in which multiple instruction can reside in a single fetch word (ex dual issue with RVC),
multiple branch/jump instruction can reside in a single fetch word => need for compromises,
and hope that some of the branch/jump in the chunk are rarely taken.

GSharePlugin
------------

Will :

- Implement a FetchConditionalPrediction (GShare flavor)
- Learn using the LearnPlugin interface. Write to read hazard are handled via a bypass
- Will not apply the prediction via flush / pc change, another plugin will do that
- Will not apply the prediction via flush / pc change, another plugin will do that (ex : BtbPlugin)

Note that one of the current issue with GShare, is that it take quite a few iterations to learn (depending the branch history)

DecodePredictionPlugin
----------------------

The purpose of this plugin is to ensure that no branch/jump prediction was made for non branch/jump instructions.
In case this is detected, the plugin will just flush the pipeline and set the fetch PC to redo everything, but this time with a "first prediction skip"
In case this is detected, the plugin will :

- schedule a "REDO trap" which will flush everything and make the CPU jump to the failed instruction
- Make the predictor skip the first incoming prediction
- Make the predictor unlearn the prediction entry which failed

BranchPlugin
------------

Placed in the execute pipeline, it will ensure that the branch prediction was correct, else it correct it. It also generate a learn interface.
Placed in the execute pipeline, it will ensure that the branch predictions were correct, else it correct them. It also generate a learn interface to feed the LearnPlugin.

LearnPlugin
-----------
Expand Down
Binary file modified master/artefacts/VexiiRiscv_docs-master-SingleHTML.zip
Binary file not shown.
Binary file modified master/artefacts/VexiiRiscv_docs-master.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion master/genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ <h1 id="index">Index</h1>
<!-- source/_templates/footer.html -->

<div class="doc-footer-current-version"><p>
Version: master git~d7fa741 2024-09-10
Version: master git~8b35106 2024-09-11
</p></div>


Expand Down
2 changes: 1 addition & 1 deletion master/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ <h1>VexiiRiscv<a class="headerlink" href="#vexiiriscv" title="Permalink to this
<!-- source/_templates/footer.html -->

<div class="doc-footer-current-version"><p>
Version: master git~d7fa741 2024-09-10
Version: master git~8b35106 2024-09-11
</p></div>


Expand Down
2 changes: 1 addition & 1 deletion master/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@
<!-- source/_templates/footer.html -->

<div class="doc-footer-current-version"><p>
Version: master git~d7fa741 2024-09-10
Version: master git~8b35106 2024-09-11
</p></div>


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

Large diffs are not rendered by default.

0 comments on commit 955f18b

Please sign in to comment.