Article #467

既に発行済みのブログであっても適宜修正・追加することがあります。
We may make changes and additions to blogs already published.
posted by sakurai on February 25, 2022 #467

既存RISC-Vの研究

このページでパイプライン制御の図を見つけたので、以下に示します。これは4ステージのインオーダーパイプラインプロセッサです。

図467.1
図467.1 CV32E40Pパイプライン図

パイプライン制御の論理を追ってみます。EXWBは<EX>と<WB>を分離するレジスタです。通常は<EX>の結果を保持するのでEXパイプラインレジスタと呼びますが、もちろん<WB>の入力でもあるため、この設計ではそれをわかりやすいようにEXWBとしているようです。 ##パイプライン制御のイネーブル論理## まずイネーブル論理を見てみると、 $$ \begin{eqnarray} \text{EXWB.E}&=&\text{ex\_valid}\\ &=&\text{ex\_ready}\\ &=&\text{granted }\cap\text{wb\_ready} \end{eqnarray} \tag{467.1} $$ これは

  • <EX>が正当であるという、後段に対する有効論理、かつ
  • <EX>以降のステージが受け入れ可能という、上段に対するイネーブル(ウエイトの否定)

を同時に意味します。

上段に対するウエイト信号を新たに$\text{ex\_wait}(=\text{!ex\_ready})$とし、<EX>の許可信号である$\text{granted}$の逆論理を、<EX>のステージウエイトとして新たに$\text{exs\_wait}(=\text{!granted})$と名付ければ、

$$ \begin{eqnarray} \text{ex\_wait}&=&\text{!ex\_ready}\\ &=&\text{!(granted }\cap\text{wb\_ready)}\\ &=&\text{!granted }\cup\text{!wb\_ready}\\ &=&\text{exs\_wait} \cup \text{wb\_wait} \end{eqnarray} \tag{467.2} $$ ただし、$\text{wb\_wait}=!\text{wb\_ready}$

前述のように、ウエイトは、当該段のウエイトに下段のウェイト信号のORを取りながら、上段へパイプラインとは逆向きに同一サイクル中に送るので、これは正しいです。


左矢前のブログ 次のブログ右矢

Leave a Comment

Your email address will not be published.

You may use Markdown syntax. If you include an ad such as http://, it will be invalidated by our AI system.

Please enter the numbers as they are shown in the image above.