Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs] Minor updates to README and SETUP for Chisel 6 #3745

Merged
merged 1 commit into from
Jan 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,8 @@ If you insist on setting up your own project from scratch, your project needs to
For example, in SBT this could be expressed as:
```scala
// build.sbt
scalaVersion := "2.13.10"
val chiselVersion = "5.1.0"
scalaVersion := "2.13.12"
val chiselVersion = "6.0.0"
addCompilerPlugin("org.chipsalliance" % "chisel-plugin" % chiselVersion cross CrossVersion.full)
libraryDependencies += "org.chipsalliance" %% "chisel" % chiselVersion
```
Expand Down Expand Up @@ -261,9 +261,8 @@ These simulation-based verification tools are available for Chisel:
* [**Cheat Sheet**](https://github.com/freechipsproject/chisel-cheatsheet/releases/latest/download/chisel_cheatsheet.pdf), a 2-page reference of the base Chisel syntax and libraries
* [**ScalaDoc (latest)**](https://www.chisel-lang.org/api/latest/index.html), a listing, description, and examples of the functionality exposed by Chisel, [older versions](https://www.chisel-lang.org/api/) are also available
* [**Gitter**](https://gitter.im/freechipsproject/chisel3), where you can ask questions or discuss anything Chisel
* [**Website (3.6 and earlier)**](https://www.chisel-lang.org) ([source](https://github.com/freechipsproject/www.chisel-lang.org/))
* [**Website (main)**](https://chipsalliance.github.io/chisel) ([source](website)) (Note that this will replace the above after the Chisel 5 release)
* [**Scastie (v5.1.0)**](https://scastie.scala-lang.org/FfHRZUF4QuiD7PHTQoWINQ) - cannot generate Verilog (firtool does not work in Scastie)
* [**Website**](https://www.chisel-lang.org) ([source](website))
* [**Scastie (v6.0.0)**](https://scastie.scala-lang.org/CsDO7Q3TQHmBWJfKEB85Tw) - cannot generate Verilog (firtool does not work in Scastie)
* [**Scastie (v3.6.0)**](https://scastie.scala-lang.org/1XICrlaZQs6ZvxpuKdFdDw) - generates Verilog with legacy Scala FIRRTL Compiler
* [**asic-world**](http://www.asic-world.com/verilog/veritut.html) If you aren't familiar with verilog, this is a good tutorial.

Expand Down Expand Up @@ -304,7 +303,6 @@ sbt compile
```

In order to run the following unit tests, you will need several tools on your `PATH`, namely
[firtool](https://github.com/llvm/circt/releases/tag/firtool-1.43.0),
[verilator](https://www.veripool.org/verilator/),
[yosys](https://yosyshq.net/yosys/),
and [espresso](https://github.com/chipsalliance/espresso).
Expand All @@ -320,7 +318,7 @@ sbt test

To use the development version of Chisel (`master` branch), you will need to build from source and publish locally.
The repository version can be found by running `sbt version`.
As of the time of writing it was: `6.0.0-M3+131-ca74d07e-SNAPSHOT`.
As of the time of writing it was: `6.0.0+1-8d92842c-SNAPSHOT`.

To publish your version of Chisel to the local Ivy (sbt's dependency manager) repository, run:

Expand All @@ -334,7 +332,7 @@ If you need to un-publish your local copy of Chisel, remove the directory genera
In order to have your projects use this version of Chisel, you should update the `libraryDependencies` setting in your project's build.sbt file to use the current version, for example:

```scala
val chiselVersion = "6.0.0-M3+131-ca74d07e-SNAPSHOT"
val chiselVersion = "6.0.0+1-8d92842c-SNAPSHOT"
addCompilerPlugin("org.chipsalliance" % "chisel-plugin" % chiselVersion cross CrossVersion.full)
libraryDependencies += "org.chipsalliance" %% "chisel" % chiselVersion
```
Expand Down
38 changes: 0 additions & 38 deletions SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,8 @@ Instructions for setting up your environment to run Chisel locally.

For a minimal setup, you only need to install [SBT (the Scala Build Tool)](http://www.scala-sbt.org), which will automatically fetch the appropriate version of Scala and Chisel based on your project configuration.

[Firtool](https://github.com/llvm/circt) is required to generate Verilog.

[Verilator](https://www.veripool.org/wiki/verilator) Installation is required to simulate your Verilog designs.

For `firrtool` check the following URL to find the latest version: https://github.com/llvm/circt/releases/latest

## Ubuntu Linux

1. Install the JVM
Expand All @@ -18,22 +14,6 @@ For `firrtool` check the following URL to find the latest version: https://githu

1. Install sbt according to the instructions from [sbt download](https://www.scala-sbt.org/download.html).

1. Install Firtool

Choose whatever version is being [used in continuous integration](.github/workflows/install-circt/action.yml)
```bash
wget -q -O - https://github.com/llvm/circt/releases/download/firtool-1.61.0/firrtl-bin-linux-x64.tar.gz | tar -zx
```
This will give you a directory called `firtool-1.38.0` containing the firtool binary, add this to your PATH as appropriate.
```bash
export PATH=$PATH:$PWD/firtool-1.61.0/bin
```
Alternatively, you can install the binary to a standard location by simply moving the binary (if you have root access).
```bash
mv firtool-1.58.0/bin/firtool /usr/local/bin/
```


2. Install Verilator.
We currently recommend Verilator version v4.226.
Follow these instructions to compile it from the source.
Expand Down Expand Up @@ -69,10 +49,6 @@ For `firrtool` check the following URL to find the latest version: https://githu
pacman -Sy verilator sbt
```

1. Install firtool

See the instructions for Ubuntu above; the firtool Ubuntu binary is a "many Linux" mostly statically linked binary.

## Windows
1. [Download and install sbt for Windows](https://www.scala-sbt.org/download.html).

Expand All @@ -86,17 +62,3 @@ There are no issues with generating Verilog from Chisel, which can be pushed to
```bash
brew install sbt verilator
```

1. Install firtool

```bash
wget -q -O - https://github.com/llvm/circt/releases/download/firtool-1.61.0/firrtl-bin-macos-x64.tar.gz | tar -zx
```
This will give you a directory called `firtool-1.58.0` containing the firtool binary, add this to your PATH as appropriate.
```bash
export PATH=$PATH:$PWD/firtool-1.61.0/bin
```
Alternatively, you can install the binary to a standard location by simply moving the binary.
```bash
mv firtool-1.61.0/bin/firtool /usr/local/bin/
```
6 changes: 4 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -507,11 +507,13 @@ lazy val docs = project // new documentation project
writer.close()
},
generateScalaDocLinks := {
val outputFile = "website/src/pages/generated/scaladoc_links.md"
import java.io.{File, PrintWriter}
import java.nio.file.{Files}
val outputFile = new File(s"website/src/pages/generated/scaladoc_links.md")
val snapshot = version.value
val markdown = Releases.generateMarkdown(streams.value.log)(snapshot)
val writer = new PrintWriter(new File(outputFile))
Files.createDirectories(outputFile.toPath.getParent)
val writer = new PrintWriter(outputFile)
writer.write(s"""|<!-- Automatically generated by build.sbt 'generateScalaDocLinks' task -->
|$markdown""".stripMargin)
writer.close()
Expand Down
3 changes: 2 additions & 1 deletion project/Releases.scala
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,13 @@ object Releases {
* Will pick a non-prerelease if one is available, the newest prerelease if not
*/
def getLatestForEachMajorVersion(releases: List[SemanticVersion]): List[SemanticVersion] = {
val filtered = releases.filter(_ > oldestVersion)
// Get major version but cognizant of pre-5.0 versioning
def getMajorVersion(v: SemanticVersion): String = {
if (v.major == 3) s"${v.major}.${v.minor}"
else v.major.toString
}
val grouped = releases.groupBy(getMajorVersion).map { case (_, values) => values.max }
val grouped = filtered.groupBy(getMajorVersion).map { case (_, values) => values.max }
grouped.toList.sorted
}

Expand Down
Loading