From 78a9c00a4b410eecfa468d65293e224b956ff6e5 Mon Sep 17 00:00:00 2001 From: Jordan Lees Date: Wed, 5 Jul 2023 12:06:40 -0700 Subject: [PATCH] The `lazy val chipyard` bit was out of date in this doc page --- docs/Customization/Custom-Chisel.rst | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/docs/Customization/Custom-Chisel.rst b/docs/Customization/Custom-Chisel.rst index 4ffbafbf..5a60ce4b 100644 --- a/docs/Customization/Custom-Chisel.rst +++ b/docs/Customization/Custom-Chisel.rst @@ -44,7 +44,8 @@ build.sbt. cd generators/ git submodule add https://git-repository.com/yourproject.git -Then add ``yourproject`` to the Chipyard top-level build.sbt file. +Then add ``yourproject`` to the Chipyard top-level build.sbt file. +Make sure it goes above the definition `lazy val chipyard`. .. code-block:: scala @@ -52,8 +53,22 @@ Then add ``yourproject`` to the Chipyard top-level build.sbt file. You can then import the classes defined in the submodule in a new project if you add it as a dependency. For instance, if you want to use this code in -the ``chipyard`` project, change the final line in build.sbt to the following. +the ``chipyard`` project, add your project to the list of sub-projects in the +`.dependsOn()` for `lazy val chipyard`. The original code may change over time, but it +should look something like this: .. code-block:: scala - lazy val chipyard = (project in file(".")).settings(commonSettings).dependsOn(testchipip, yourproject) + lazy val chipyard = (project in file("generators/chipyard")) + .dependsOn(testchipip, rocketchip, boom, hwacha, sifive_blocks, sifive_cache, iocell, + sha3, dsptools, `rocket-dsp-utils`, + gemmini, icenet, tracegen, cva6, nvdla, sodor, ibex, fft_generator, + yourproject, // <- added to the middle of the list for simplicity + constellation, mempress) + .settings(libraryDependencies ++= rocketLibDeps.value) + .settings( + libraryDependencies ++= Seq( + "org.reflections" % "reflections" % "0.10.2" + ) + ) + .settings(commonSettings)