Update MMIO peripheral docs

This commit is contained in:
Jerry Zhao
2024-01-29 13:40:23 -08:00
parent 69a00c4501
commit 51a67fbd8f
5 changed files with 22 additions and 22 deletions

View File

@@ -99,10 +99,16 @@ Instantiating the BlackBox and Defining MMIO
Next, we must instantiate the blackbox. In order to take advantage of
diplomatic memory mapping on the system bus, we still have to
integrate the peripheral at the Chisel level by mixing
peripheral-specific traits into a ``TLRegisterRouter``. The ``params``
member and ``HasRegMap`` base trait should look familiar from the
previous memory-mapped GCD device example.
integrate the peripheral at the Chisel level by instantiating a LazyModule wrapper
that instantiates a TileLink RegisterNode.
.. literalinclude:: ../../generators/chipyard/src/main/scala/example/GCD.scala
:language: scala
:start-after: DOC include start: GCD router
:end-before: DOC include end: GCD router
Within the LazyModule, the ``regmap`` function can be called to attach wires and
registers to the MMIO port.
.. literalinclude:: ../../generators/chipyard/src/main/scala/example/GCD.scala
:language: scala