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)