Skip to content

Commit 866aea0

Browse files
committed
Modularize out cores
1 parent 88b0ad7 commit 866aea0

File tree

18 files changed

+176
-171
lines changed

18 files changed

+176
-171
lines changed

build.sbt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,9 @@ lazy val chipyard = {
160160
.dependsOn(
161161
testchipip, rocketchip, boom, rocketchip_blocks, rocketchip_inclusive_cache,
162162
dsptools, rocket_dsp_utils,
163-
radiance, gemmini, icenet, tracegen, cva6, nvdla, sodor, ibex, fft_generator,
163+
radiance, gemmini, icenet, tracegen, nvdla, fft_generator,
164164
constellation, barf, shuttle, rerocc,
165-
firrtl2_bridge, vexiiriscv, tacit
165+
firrtl2_bridge, tacit
166166
)
167167
.settings(libraryDependencies ++= rocketLibDeps.value)
168168
.settings(
@@ -175,6 +175,11 @@ lazy val chipyard = {
175175

176176
// Optional modules discovered via initialized submodules (no env or manifest)
177177
val optionalModules: Seq[(String, ProjectReference)] = Seq(
178+
// Generators with Chipyard-facing glue compiled from their repos
179+
"cva6" -> cva6,
180+
"ibex" -> ibex,
181+
"vexiiriscv" -> vexiiriscv,
182+
"riscv-sodor" -> sodor,
178183
"ara" -> ara,
179184
"saturn" -> saturn,
180185
"caliptra-aes-acc" -> caliptra_aes,

common.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ HELP_COMMANDS += \
7878
include $(base_dir)/generators/tracegen/tracegen.mk
7979
include $(base_dir)/tools/torture.mk
8080
# Optional generator make fragments should not fail build if absent
81-
-include $(base_dir)/generators/cva6/cva6.mk
8281
-include $(base_dir)/generators/ibex/ibex.mk
8382
-include $(base_dir)/generators/nvdla/nvdla.mk
8483
-include $(base_dir)/generators/radiance/radiance.mk

docs/Chipyard-Basics/Configs-Parameters-Mixins.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,3 +123,11 @@ Another description of traits/mixins and config fragments is given in :ref:`Cust
123123
Additionally, a brief explanation of some of these topics (with slightly different naming) is given in the following video: https://www.youtube.com/watch?v=Eko86PGEoDY.
124124

125125
.. Note:: Chipyard uses the name "config fragments" over "config mixins" to avoid confusion between a mixin applying to a config or to the system ``Top`` (even though both are technically Scala mixins).
126+
127+
Optional Generator Injectors
128+
----------------------------
129+
130+
Some generic Chipyard config fragments (for example, trace toggles and tile prefetch settings) are designed to affect optional generators without hard dependencies. Chipyard discovers generator-provided injectors at elaboration time and applies them, allowing fragments like ``WithTraceIO`` and ``WithTilePrefetchers`` to work across different tiles.
131+
132+
- Generators that want to participate implement ``chipyard.config.TilePluginProvider`` under their ``generators/<name>/chipyard`` sources. Chipyard discovers implementations via classpath scanning and applies the provided injectors.
133+
- This keeps the core fragments generic, while enabling per-generator behavior (e.g., mapping a prefetch intent to the correct port parameters for that tile).

docs/Chipyard-Basics/Initial-Repo-Setup.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ See ``./build-setup.sh --help`` for more details on what this does and how to di
9797

9898
.. Note:: If you already have a working conda environment setup, separate Chipyard clones can use that pre-used environment in combination with running the aforementioned scripts yourself (``init-submodules...``, ``build-toolchain...``, etc).
9999

100+
.. Note for power users: Chipyard includes internal scripts that can selectively initialize generator submodules. The default ``./build-setup.sh`` initializes all standard generator submodules and is the recommended path.
101+
100102
.. Note:: If you are a power user and would like to build your own compiler/toolchain, you can refer to the https://github.com/ucb-bar/riscv-tools-feedstock repository (submoduled in the ``toolchains/*`` directories) on how to build the compiler yourself.
101103

102104
By running the following command you should see an environment listed with the path ``$CHIPYARD_DIRECTORY/.conda-env``.

docs/Generators/CVA6.rst

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,19 @@ CVA6 Core
22
====================================
33

44
`CVA6 <https://github.com/openhwgroup/cva6>`__ (previously called Ariane) is a 6-stage in-order scalar processor core, originally developed at ETH-Zurich by F. Zaruba and L. Benini.
5-
The `CVA6 core` is wrapped in an `CVA6 tile` so it can be used as a component within the `Rocket Chip SoC generator`.
5+
The `CVA6 core` is wrapped in a `CVA6 tile` so it can be used as a component within the `Rocket Chip SoC generator`.
66
The core by itself exposes an AXI interface, interrupt ports, and other misc. ports that are connected from within the tile to TileLink buses and other parameterization signals.
77

88
.. Warning:: Since the core uses an AXI interface to connect to memory, it is highly recommended to use the core in a single-core setup (since AXI is a non-coherent memory interface).
99

1010
While the core itself is not a generator, we expose the same parameterization that the CVA6 core provides (i.e. change branch prediction parameters).
1111

12+
Configuration classes and Chipyard glue for CVA6 live under ``generators/cva6/chipyard`` and are compiled directly from the CVA6 repository sources. After running the standard setup (``./build-setup.sh``), you can build a CVA6 config like ``CVA6Config`` with the normal flow:
13+
14+
::
15+
16+
cd sims/vcs && make CONFIG=CVA6Config
17+
1218
.. Warning:: This target does not support Verilator simulation at this time. Please use VCS.
1319

1420
For more information, please refer to the `GitHub repository <https://github.com/openhwgroup/cva6>`__.

docs/Generators/Ibex.rst

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ The core exposes a custom memory interface, interrupt ports, and other misc. por
99

1010
.. Warning:: The Ibex reset vector is located at BOOT_ADDR + 0x80.
1111

12-
While the core itself is not a generator, we expose the same parameterization that the Ibex core provides so that all supported Ibex configurations are available.
13-
12+
While the core itself is not a generator, we expose the same parameterization that the Ibex core provides so that all supported Ibex configurations are available.
13+
1414
For more information, see the `GitHub repository for Ibex <https://github.com/lowRISC/ibex>`__.
15+
16+
Configuration classes and Chipyard glue for Ibex live under ``generators/ibex/chipyard`` and are compiled directly from the Ibex repository sources. After running the standard setup (``./build-setup.sh``), build the example config with:
17+
18+
::
19+
20+
cd sims/vcs && make CONFIG=IbexConfig

docs/Generators/Sodor.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,9 @@ The five available cores and their corresponding generator configuration are:
1515
* "bus"-based micro-coded implementation - ``SodorUCodeConfig``
1616

1717
For more information, please refer to the `GitHub repository <https://github.com/ucb-bar/riscv-sodor>`__.
18+
19+
Configuration classes and Chipyard glue for Sodor live under ``generators/riscv-sodor/chipyard`` and are compiled directly from the Sodor repository sources. After running the standard setup (``./build-setup.sh``), build a config (e.g., 3-stage) with:
20+
21+
::
22+
23+
cd sims/vcs && make CONFIG=Sodor3StageConfig

docs/Generators/VexiiRiscv.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,8 @@ VexiiRiscv implements cache-coherent TileLink L1 data caches and is integrated a
77
The example VexiiRiscv config is ``VexiiRiscvConfig``.
88
When building this Config, Chipyard will call VexiiRiscv's SpinalHDL RTL generator to generate the core's SystemVerilog, before integrating it as a Chisel blackbox.
99

10+
Configuration classes and Chipyard glue for VexiiRiscv live under ``generators/vexiiriscv/chipyard`` and are compiled directly from the VexiiRiscv repository sources. After running the standard setup (``./build-setup.sh``), build the example config with:
11+
12+
::
13+
14+
cd sims/vcs && make CONFIG=VexiiRiscvConfig

generators/chipyard/src/main/scala/config/CVA6Configs.scala

Lines changed: 0 additions & 19 deletions
This file was deleted.

generators/chipyard/src/main/scala/config/IbexConfigs.scala

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)