Skip to content

Commit 2c0928c

Browse files
authored
Merge pull request #482 from ucb-bar/dev
fix literalincludes and other path references in documentation
2 parents 32c957c + ffb9c81 commit 2c0928c

File tree

12 files changed

+48
-47
lines changed

12 files changed

+48
-47
lines changed

docs/Advanced-Concepts/Chip-Communication.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ FireSim FPGA-accelerated simulations use TSI by default as well.
111111

112112
If you would like to build and simulate a Chipyard configuration with a DTM configured for DMI communication, then you must tie-off the TSI interface, and instantiate the `SimDTM`. Note that we use `WithTiedOffSerial ++ WithSimDebug` instead of `WithTiedOffDebug ++ WithSimSerial`.
113113

114-
.. literalinclude:: ../../generators/chipyard/src/main/scala/RocketConfigs.scala
114+
.. literalinclude:: ../../generators/chipyard/src/main/scala/config/RocketConfigs.scala
115115
:language: scala
116116
:start-after: DOC include start: DmiRocket
117117
:end-before: DOC include end: DmiRocket
@@ -141,7 +141,7 @@ The configuration is very similar to a DMI-based configuration. The main differe
141141
is the addition of the ``WithJtagDTM`` config fragment that configures the instantiated DTM to use the JTAG protocol as the
142142
bringup method.
143143

144-
.. literalinclude:: ../../generators/chipyard/src/main/scala/RocketConfigs.scala
144+
.. literalinclude:: ../../generators/chipyard/src/main/scala/config/RocketConfigs.scala
145145
:language: scala
146146
:start-after: DOC include start: JtagRocket
147147
:end-before: DOC include end: JtagRocket

docs/Customization/DMA-Devices.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ having the CPU poll data from the device, we may want to have the device write
1212
directly to the coherent memory system instead. For example, here is a device
1313
that writes zeros to the memory at a configured address.
1414

15-
.. literalinclude:: ../../generators/chipyard/src/main/scala/InitZero.scala
15+
.. literalinclude:: ../../generators/chipyard/src/main/scala/example/InitZero.scala
1616
:language: scala
1717

1818
.. literalinclude:: ../../generators/chipyard/src/main/scala/Top.scala
@@ -26,12 +26,12 @@ For more info on creating TileLink client nodes, take a look at :ref:`Client Nod
2626

2727
Once we've created our top-level module including the DMA widget, we can create a configuration for it as we did before.
2828

29-
.. literalinclude:: ../../generators/chipyard/src/main/scala/InitZero.scala
29+
.. literalinclude:: ../../generators/chipyard/src/main/scala/example/InitZero.scala
3030
:language: scala
3131
:start-after: DOC include start: WithInitZero
3232
:end-before: DOC include end: WithInitZero
3333

34-
.. literalinclude:: ../../generators/chipyard/src/main/scala/RocketConfigs.scala
34+
.. literalinclude:: ../../generators/chipyard/src/main/scala/config/RocketConfigs.scala
3535
:language: scala
3636
:start-after: DOC include start: InitZeroRocketConfig
3737
:end-before: DOC include end: InitZeroRocketConfig

docs/Customization/Heterogeneous-SoCs.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ When used together you can create a heterogeneous system.
1313

1414
The following example shows a dual core BOOM with a single core Rocket.
1515

16-
.. literalinclude:: ../../generators/chipyard/src/main/scala/HeteroConfigs.scala
16+
.. literalinclude:: ../../generators/chipyard/src/main/scala/config/HeteroConfigs.scala
1717
:language: scala
1818
:start-after: DOC include start: DualBoomAndRocket
1919
:end-before: DOC include end: DualBoomAndRocket
@@ -72,7 +72,7 @@ Adding Hwachas
7272
Adding a Hwacha accelerator is as easy as adding the ``DefaultHwachaConfig`` so that it can setup the Hwacha parameters and add itself to the ``BuildRoCC`` parameter.
7373
An example of adding a Hwacha to all tiles in the system is below.
7474

75-
.. literalinclude:: ../../generators/chipyard/src/main/scala/HeteroConfigs.scala
75+
.. literalinclude:: ../../generators/chipyard/src/main/scala/config/HeteroConfigs.scala
7676
:language: scala
7777
:start-after: DOC include start: BoomAndRocketWithHwacha
7878
:end-before: DOC include end: BoomAndRocketWithHwacha
@@ -88,7 +88,7 @@ Named ``MultiRoCCKey``, this key allows you to attach RoCC accelerators based on
8888
For example, using this allows you to create a 8 tile system with a RoCC accelerator on only a subset of the tiles.
8989
An example is shown below with two BOOM cores, and one Rocket tile with a RoCC accelerator (Hwacha) attached.
9090

91-
.. literalinclude:: ../../generators/chipyard/src/main/scala/HeteroConfigs.scala
91+
.. literalinclude:: ../../generators/chipyard/src/main/scala/config/HeteroConfigs.scala
9292
:language: scala
9393
:start-after: DOC include start: DualBoomAndRocketOneHwacha
9494
:end-before: DOC include end: DualBoomAndRocketOneHwacha

docs/Customization/Incorporating-Verilog-Blocks.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ and Verilog sources follow the prescribed directory layout.
5757
build.sbt
5858
src/main/
5959
scala/
60-
GCD.scala
60+
example/
61+
GCD.scala
6162
resources/
6263
vsrc/
6364
GCDMMIOBlackBox.v
@@ -88,7 +89,7 @@ as the bitwidth of the GCD calculation does in this example.
8889

8990
**Chisel BlackBox Definition**
9091

91-
.. literalinclude:: ../../generators/chipyard/src/main/scala/GCD.scala
92+
.. literalinclude:: ../../generators/chipyard/src/main/scala/example/GCD.scala
9293
:language: scala
9394
:start-after: DOC include start: GCD blackbox
9495
:end-before: DOC include end: GCD blackbox
@@ -103,7 +104,7 @@ peripheral-specific traits into a ``TLRegisterRouter``. The ``params``
103104
member and ``HasRegMap`` base trait should look familiar from the
104105
previous memory-mapped GCD device example.
105106

106-
.. literalinclude:: ../../generators/chipyard/src/main/scala/GCD.scala
107+
.. literalinclude:: ../../generators/chipyard/src/main/scala/example/GCD.scala
107108
:language: scala
108109
:start-after: DOC include start: GCD instance regmap
109110
:end-before: DOC include end: GCD instance regmap
@@ -115,7 +116,7 @@ Defining a Chip with a BlackBox
115116
Since we've parameterized the GCD instantiation to choose between the
116117
Chisel and the Verilog module, creating a config is easy.
117118

118-
.. literalinclude:: ../../generators/chipyard/src/main/scala/RocketConfigs.scala
119+
.. literalinclude:: ../../generators/chipyard/src/main/scala/config/RocketConfigs.scala
119120
:language: scala
120121
:start-after: DOC include start: GCDAXI4BlackBoxRocketConfig
121122
:end-before: DOC include end: GCDAXI4BlackBoxRocketConfig

docs/Customization/Keys-Traits-Configs.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ Keys specify some parameter which controls some custom widget. Keys should typic
1616

1717
Keys should be defined and documented in sub-projects, since they generally deal with some specific block, and not system-level integration. (We make an exception for the example GCD widget).
1818

19-
.. literalinclude:: ../../generators/chipyard/src/main/scala/GCD.scala
19+
.. literalinclude:: ../../generators/chipyard/src/main/scala/example/GCD.scala
2020
:language: scala
2121
:start-after: DOC include start: GCD key
2222
:end-before: DOC include end: GCD key
2323

2424
The object within a key is typically a ``case class XXXParams``, which defines a set of parameters which some block accepts. For example, the GCD widget's ``GCDParams`` parameterizes its address, operand widths, whether the widget should be connected by Tilelink or AXI4, and whether the widget should use the blackbox-Verilog implementation, or the Chisel implementation.
2525

2626

27-
.. literalinclude:: ../../generators/chipyard/src/main/scala/GCD.scala
27+
.. literalinclude:: ../../generators/chipyard/src/main/scala/example/GCD.scala
2828
:language: scala
2929
:start-after: DOC include start: GCD params
3030
:end-before: DOC include end: GCD params
@@ -42,7 +42,7 @@ Top-level traits should be defined and documented in subprojects, alongside thei
4242

4343
Below we see the traits for the GCD example. The Lazy trait connects the GCD module to the Diplomacy graph, while the Implementation trait causes the ``Top`` to instantiate an additional port and concretely connect it to the GCD module.
4444

45-
.. literalinclude:: ../../generators/chipyard/src/main/scala/GCD.scala
45+
.. literalinclude:: ../../generators/chipyard/src/main/scala/example/GCD.scala
4646
:language: scala
4747
:start-after: DOC include start: GCD lazy trait
4848
:end-before: DOC include end: GCD imp trait
@@ -61,14 +61,14 @@ Config fragments set the keys to a non-default value. Together, the collection o
6161

6262
For example, the ``WithGCD`` config fragment is parameterized by the type of GCD widget you want to instantiate. When this config fragment is added to a config, the ``GCDKey`` is set to a instance of ``GCDParams``, informing the previously mentioned traits to instantiate and connect the GCD widget appropriately.
6363

64-
.. literalinclude:: ../../generators/chipyard/src/main/scala/GCD.scala
64+
.. literalinclude:: ../../generators/chipyard/src/main/scala/example/GCD.scala
6565
:language: scala
6666
:start-after: DOC include start: GCD config fragment
6767
:end-before: DOC include end: GCD config fragment
6868

6969
We can use this config fragment when composing our configs.
7070

71-
.. literalinclude:: ../../generators/chipyard/src/main/scala/RocketConfigs.scala
71+
.. literalinclude:: ../../generators/chipyard/src/main/scala/config/RocketConfigs.scala
7272
:language: scala
7373
:start-after: DOC include start: GCDTLRocketConfig
7474
:end-before: DOC include end: GCDTLRocketConfig

docs/Customization/MMIO-Peripherals.rst

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@
33
MMIO Peripherals
44
==================
55

6-
The easiest way to create a MMIO peripheral is to use the ``TLRegisterRouter`` or ``AXI4RegisterRouter`` widgets, which abstracts away the details of handling the interconnect protocols and provides a convenient interface for specifying memory-mapped registers. Since Chipyard and Rocket Chip SoCs primarily use Tilelink as the on-chip interconnect protocol, this section will primarily focus on designing Tilelink-based peripherals. However, see ``generators/chipyard/src/main/scala/GCD.scala`` for how an example AXI4 based peripheral is defined and connected to the Tilelink graph through converters.
6+
The easiest way to create a MMIO peripheral is to use the ``TLRegisterRouter`` or ``AXI4RegisterRouter`` widgets, which abstracts away the details of handling the interconnect protocols and provides a convenient interface for specifying memory-mapped registers. Since Chipyard and Rocket Chip SoCs primarily use Tilelink as the on-chip interconnect protocol, this section will primarily focus on designing Tilelink-based peripherals. However, see ``generators/chipyard/src/main/scala/example/GCD.scala`` for how an example AXI4 based peripheral is defined and connected to the Tilelink graph through converters.
77

88
To create a RegisterRouter-based peripheral, you will need to specify a parameter case class for the configuration settings, a bundle trait with the extra top-level ports, and a module implementation containing the actual RTL.
99

1010
For this example, we will show how to connect a MMIO peripheral which computes the GCD.
11-
The full code can be found in ``generators/chipyard/src/main/scala/GCD.scala``.
11+
The full code can be found in ``generators/chipyard/src/main/scala/example/GCD.scala``.
1212

1313
In this case we use a submodule ``GCDMMIOChiselModule`` to actually perform the GCD. The ``GCDModule`` class only creates the registers and hooks them up using ``regmap``.
1414

15-
.. literalinclude:: ../../generators/chipyard/src/main/scala/GCD.scala
15+
.. literalinclude:: ../../generators/chipyard/src/main/scala/example/GCD.scala
1616
:language: scala
1717
:start-after: DOC include start: GCD chisel
1818
:end-before: DOC include end: GCD chisel
1919

20-
.. literalinclude:: ../../generators/chipyard/src/main/scala/GCD.scala
20+
.. literalinclude:: ../../generators/chipyard/src/main/scala/example/GCD.scala
2121
:language: scala
2222
:start-after: DOC include start: GCD instance regmap
2323
:end-before: DOC include end: GCD instance regmap
@@ -51,7 +51,7 @@ The second set of arguments is the IO bundle constructor, which we create by ext
5151
The final set of arguments is the module constructor, which we create by extends ``TLRegModule`` with our module trait.
5252
Notice how we can create an analogous AXI4 version of our peripheral.
5353

54-
.. literalinclude:: ../../generators/chipyard/src/main/scala/GCD.scala
54+
.. literalinclude:: ../../generators/chipyard/src/main/scala/example/GCD.scala
5555
:language: scala
5656
:start-after: DOC include start: GCD router
5757
:end-before: DOC include end: GCD router
@@ -69,7 +69,7 @@ In the Rocket Chip cake, there are two kinds of traits: a ``LazyModule`` trait a
6969
The ``LazyModule`` trait runs setup code that must execute before all the hardware gets elaborated.
7070
For a simple memory-mapped peripheral, this just involves connecting the peripheral's TileLink node to the MMIO crossbar.
7171

72-
.. literalinclude:: ../../generators/chipyard/src/main/scala/GCD.scala
72+
.. literalinclude:: ../../generators/chipyard/src/main/scala/example/GCD.scala
7373
:language: scala
7474
:start-after: DOC include start: GCD lazy trait
7575
:end-before: DOC include end: GCD lazy trait
@@ -82,7 +82,7 @@ Also observe how we have to place additional AXI4 buffers and converters for the
8282
For peripherals which instantiate a concrete module, or which need to be connected to concrete IOs or wires, a matching concrete trait is necessary. We will make our GCD example output a ``gcd_busy`` signal as a top-level port to demonstrate. In the concrete module implementation trait, we instantiate the top level IO (a concrete object) and wire it to the IO of our lazy module.
8383

8484

85-
.. literalinclude:: ../../generators/chipyard/src/main/scala/GCD.scala
85+
.. literalinclude:: ../../generators/chipyard/src/main/scala/example/GCD.scala
8686
:language: scala
8787
:start-after: DOC include start: GCD imp trait
8888
:end-before: DOC include end: GCD imp trait
@@ -105,14 +105,14 @@ The ``TopModule`` class is the actual RTL that gets synthesized.
105105

106106

107107

108-
And finally, we create a configuration class in ``generators/chipyard/src/main/scala/Configs.scala`` that uses the ``WithGCD`` config fragment defined earlier.
108+
And finally, we create a configuration class in ``generators/chipyard/src/main/scala/config/RocketConfigs.scala`` that uses the ``WithGCD`` config fragment defined earlier.
109109

110-
.. literalinclude:: ../../generators/chipyard/src/main/scala/GCD.scala
110+
.. literalinclude:: ../../generators/chipyard/src/main/scala/example/GCD.scala
111111
:language: scala
112-
:start-after: DOC include start: GCD fragment
113-
:end-before: DOC include end: GCD fragment
112+
:start-after: DOC include start: GCD config fragment
113+
:end-before: DOC include end: GCD config fragment
114114

115-
.. literalinclude:: ../../generators/chipyard/src/main/scala/RocketConfigs.scala
115+
.. literalinclude:: ../../generators/chipyard/src/main/scala/config/RocketConfigs.scala
116116
:language: scala
117117
:start-after: DOC include start: GCDTLRocketConfig
118118
:end-before: DOC include end: GCDTLRocketConfig

docs/Customization/Memory-Hierarchy.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ you can only use a single core and you cannot give the design an external DRAM.
2929
Note that these configurations fully remove the L2 cache and mbus.
3030

3131

32-
.. literalinclude:: ../../generators/chipyard/src/main/scala/RocketConfigs.scala
32+
.. literalinclude:: ../../generators/chipyard/src/main/scala/config/RocketConfigs.scala
3333
:language: scala
3434
:start-after: DOC include start: scratchpadrocket
3535
:end-before: DOC include end: scratchpadrocket

docs/Generators/Gemmini.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ To add a Gemmini unit to an SoC, you should add the ``gemmini.DefaultGemminiConf
99

1010
The example Chipyard config includes the following example SoC configuration which includes Gemmini:
1111

12-
.. literalinclude:: ../../generators/chipyard/src/main/scala/RocketConfigs.scala
12+
.. literalinclude:: ../../generators/chipyard/src/main/scala/config/RocketConfigs.scala
1313
:language: scala
1414
:start-after: DOC include start: GemminiRocketConfig
1515
:end-before: DOC include end: GemminiRocketConfig

docs/Generators/SHA3.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ it can be mixed into a Rocket or BOOM core by overriding the
7272
generator. An example configuration highlighting the use of
7373
this config fragment is shown here:
7474

75-
.. literalinclude:: ../../generators/chipyard/src/main/scala/RocketConfigs.scala
75+
.. literalinclude:: ../../generators/chipyard/src/main/scala/config/RocketConfigs.scala
7676
:language: scala
7777
:start-after: DOC include start: Sha3Rocket
7878
:end-before: DOC include end: Sha3Rocket

docs/Generators/SiFive-Generators.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ To integrate one of these devices in your SoC, you will need to define a custom
2020

2121
.. literalinclude:: ../../generators/chipyard/src/main/scala/ConfigFragments.scala
2222
:language: scala
23-
:start-after: DOC include start: gpio mixin
24-
:end-before: DOC include end: gpio mixin
23+
:start-after: DOC include start: gpio config fragment
24+
:end-before: DOC include end: gpio config fragment
2525

2626
Additionally, if the device requires top-level IOs, you will need to define a config fragment to change the top-level configuration of your SoC.
2727
When adding a top-level IO, you should also be aware of whether it interacts with the test-harness.
@@ -31,7 +31,7 @@ This example instantiates a top-level module with include GPIO ports, and then t
3131

3232
Finally, you add the relevant config fragment to the SoC config. For example:
3333

34-
.. literalinclude:: ../../generators/chipyard/src/main/scala/RocketConfigs.scala
34+
.. literalinclude:: ../../generators/chipyard/src/main/scala/config/RocketConfigs.scala
3535
:language: scala
3636
:start-after: DOC include start: GPIORocketConfig
3737
:end-before: DOC include end: GPIORocketConfig

0 commit comments

Comments
 (0)