fix README section on adding new submodules

This commit is contained in:
Howard Mao
2019-01-28 14:31:13 -08:00
parent de1ab1d8a9
commit fc06c909c0

View File

@@ -396,7 +396,16 @@ to the project template.
git submodule add https://git-repository.com/yourproject.git
Then add `yourproject` to the `EXTRA_PACKAGES` variable in the Makefrag.
Now your project will be bundled into a jar file alongside the rocket-chip
and testchipip libraries. You can then import the classes defined in the
submodule in a new project.
Then add `yourproject` to the project-template build.sbt file.
```scala
lazy val yourproject = project.settings(commonSettings).dependsOn(rocketchip)
```
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 `example` project, change the final line in build.sbt to the following.
```scala
lazy val example = (project in file(".")).settings(commonSettings).dependsOn(testchipip, yourproject)
```