Skip to content

Commit

Permalink
More pipeline doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Dolu1990 committed Feb 20, 2024
1 parent d13fec9 commit abef56f
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions source/SpinalHDL/Libraries/Pipeline/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -804,6 +804,27 @@ Then you may want to remove the output register stage :
)
One thing about this example is the necessity intermediate val as `addNode`. I mean :

.. code-block:: scala
val addNode = nodes(addAt)
// sum the r g b values of the color
val adder = new addNode.Area {
...
}
Unfortunatly, scala doesn't allow to replace `new addNode.Area` with `new nodes(addAt).Area`.
One workaround is to define a class as :

.. code-block:: scala
class NodeArea(at : Int) extends NodeMirror(nodes(at))
val adder = new NodeArea(addAt) {
...
}
Depending the scale of your pipeline, it can payoff.

Simple CPU example
================================================
Expand Down

0 comments on commit abef56f

Please sign in to comment.