Skip to content

Commit dd9ad53

Browse files
committed
Merge branch 'master' into 3.5-release
2 parents 440edc4 + f50f74f commit dd9ad53

File tree

139 files changed

+4400
-1698
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

139 files changed

+4400
-1698
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Please select the item best describing the issue in each category and delete the
1313
**Development Phase**: request | proposal
1414

1515
**Other information**
16-
<!-- include detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. Stack Overflow, gitter, etc -->
16+
<!-- include detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. Stack Overflow, gitter, Scastie (https://scastie.scala-lang.org/KtzZQ3nFTea9KoNh0tRqtg) -->
1717

1818
**If the current behavior is a bug, please provide the steps to reproduce the problem:**
1919

.github/workflows/test.yml

Lines changed: 8 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -17,40 +17,17 @@ jobs:
1717
system: ["ubuntu-20.04"]
1818
jvm: ["adopt@1.8"]
1919
scala: ["2.13.6", "2.12.15"]
20-
verilator: ["4.204"]
2120
espresso: ["2.4"]
2221
runs-on: ${{ matrix.system }}
2322

2423
steps:
2524
- name: Checkout
2625
uses: actions/checkout@v2
2726

28-
- name: Install Z3
29-
if: matrix.system == 'ubuntu-20.04'
30-
run: |
31-
sudo apt-get install -y z3
32-
z3 --version
33-
34-
- name: Cache Verilator ${{ matrix.verilator }}
35-
uses: actions/cache@v2.1.6
36-
id: cache-verilator
27+
- name: Install Tabby OSS Cad Suite (from YosysHQ)
28+
uses: YosysHQ/setup-oss-cad-suite@v1
3729
with:
38-
path: verilator-${{ matrix.verilator }}
39-
key: ${{ matrix.system }}-verilator-${{ matrix.verilator }}
40-
- name: Compile Verilator ${{ matrix.verilator }}
41-
if: steps.cache-verilator.outputs.cache-hit != 'true'
42-
run: |
43-
wget https://github.com/verilator/verilator/archive/refs/tags/v${{ matrix.verilator }}.tar.gz
44-
tar xvf v${{ matrix.verilator }}.tar.gz
45-
cd verilator-${{ matrix.verilator }}
46-
autoconf
47-
./configure
48-
make
49-
- name: Install Verilator ${{ matrix.verilator }}
50-
run: |
51-
cd verilator-${{ matrix.verilator }}
52-
sudo make install
53-
verilator --version
30+
osscadsuite-version: '2021-11-09'
5431

5532
- name: Install Espresso
5633
run: |
@@ -70,7 +47,7 @@ jobs:
7047
if: startsWith(matrix.scala, '2.12')
7148
run: sbt ++${{ matrix.scala }} docs/mdoc
7249
- name: Test
73-
run: sbt ++${{ matrix.scala }} test noPluginTests/test
50+
run: sbt ++${{ matrix.scala }} test
7451
- name: Binary compatibility
7552
run: sbt ++${{ matrix.scala }} mimaReportBinaryIssues
7653

@@ -80,11 +57,10 @@ jobs:
8057
steps:
8158
- name: Checkout
8259
uses: actions/checkout@v2
83-
- name: Install Verilator and Z3
84-
run: |
85-
sudo apt-get install -y verilator z3
86-
verilator --version
87-
z3 --version
60+
- name: Install Tabby OSS Cad Suite (from YosysHQ)
61+
uses: YosysHQ/setup-oss-cad-suite@v1
62+
with:
63+
osscadsuite-version: '2021-11-09'
8864
- name: Install Espresso
8965
run: |
9066
cd /tmp

CONTRIBUTING.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
## GUIDE TO CONTRIBUTING
2+
3+
1. If you need help on making a pull request, follow this [guide](https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests).
4+
5+
2. To understand how to compile and test chisel3 from the source code, follow the instructions in [SETUP.md](https://github.com/chipsalliance/chisel3/blob/master/SETUP.md).
6+
7+
3. In order to contribute to chisel3, you'll need to sign the CLA agreement. You will be asked to sign it upon your first pull request.
8+
9+
<!-- This ones helped me a lot -->
10+
11+
4. To introduce yourself and get help, you can join the [gitter](https://gitter.im/freechipsproject/chisel3) forum. If you have any questions or concerns, you can get help there.
12+
13+
5. You can peruse the [good-first-issues](https://github.com/chipsalliance/chisel3/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) for easy tasks to start with. Another easy thing to start with is doing your own pass of the [website](https://www.chisel-lang.org/chisel3/docs/introduction.html) looking for typos, pages missing their titles, etc. The sources for the website are [here](https://github.com/chipsalliance/chisel3/tree/master/docs).
14+
15+
6. Please make your PRs against the `master` branch. The project admins, when reviewing your PR, will decide which stable version (if any) your change should be backported to. The backports will be opened automatically on your behalf and you may need to do some cleanup, but focus first on your `master` PR.
16+

README.md

Lines changed: 18 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -111,15 +111,24 @@ If you like a textbook to learn Chisel and also a bit of digital design in gener
111111

112112
### Build Your Own Chisel Projects
113113

114-
See [the setup instructions](https://github.com/chipsalliance/chisel3/blob/master/SETUP.md) for how to set up your environment to run Chisel locally.
114+
See [the setup instructions](SETUP.md) for how to set up your environment to build Chisel locally.
115115

116-
When you're ready to build your own circuits in Chisel, **we recommend starting from the [Chisel Template](https://github.com/freechipsproject/chisel-template) repository**, which provides a pre-configured project, example design, and testbench. Follow the [chisel-template readme](https://github.com/freechipsproject/chisel-template) to get started.
116+
When you're ready to build your own circuits in Chisel, **we recommend starting from the [Chisel Template](https://github.com/freechipsproject/chisel-template) repository**, which provides a pre-configured project, example design, and testbench.
117+
Follow the [chisel-template README](https://github.com/freechipsproject/chisel-template) to get started.
117118

118-
If you insist on setting up your own project, the magic SBT lines are:
119+
If you insist on setting up your own project from scratch, your project needs to depend on both the chisel3-plugin (Scalac plugin) and the chisel3 library.
120+
For example, in SBT this could be expressed as:
119121
```scala
120-
libraryDependencies += "edu.berkeley.cs" %% "chisel3" % "3.4.0"
121-
libraryDependencies += "edu.berkeley.cs" %% "chiseltest" % "0.3.0" % "test"
122+
// build.sbt
123+
scalaVersion := "2.12.13"
124+
addCompilerPlugin("edu.berkeley.cs" % "chisel3-plugin" % "3.4.4" cross CrossVersion.full)
125+
libraryDependencies += "edu.berkeley.cs" %% "chisel3" % "3.4.4"
126+
scalacOptions += "-Xsource:2.11"
127+
// We also recommend using chiseltest for writing unit tests
128+
libraryDependencies += "edu.berkeley.cs" %% "chiseltest" % "0.3.4" % "test"
122129
```
130+
### Guide For New Contributors
131+
If you are trying to make a contribution to this project, please read [CONTRIBUTING.md](https://github.com/Burnleydev1/chisel3/blob/recent_PR/CONTRIBUTING.md)
123132

124133
### Design Verification
125134

@@ -136,6 +145,8 @@ These simulation-based verification tools are available for Chisel:
136145
- [**ScalaDoc**](https://www.chisel-lang.org/api/latest/chisel3/index.html), a listing, description, and examples of the functionality exposed by Chisel
137146
- [**Gitter**](https://gitter.im/freechipsproject/chisel3), where you can ask questions or discuss anything Chisel
138147
- [**Website**](https://www.chisel-lang.org) ([source](https://github.com/freechipsproject/www.chisel-lang.org/))
148+
- [**Scastie (3.5.0-RC1)**](https://scastie.scala-lang.org/KtzZQ3nFTea9KoNh0tRqtg)
149+
- [**asic-world**](http://www.asic-world.com/verilog/veritut.html) If you aren't familiar with verilog, this is a good tutorial.
139150

140151
If you are migrating from Chisel2, see [the migration guide](https://www.chisel-lang.org/chisel3/chisel3-vs-chisel2.html).
141152

@@ -155,18 +166,11 @@ The [Useful Resources](#useful-resources) for users are also helpful for contrib
155166

156167
### Compiling and Testing Chisel
157168

158-
First, clone and build the master branch of [FIRRTL](https://github.com/chipsalliance/firrtl) and [Treadle](https://github.com/chipsalliance/treadle), as the master branch of Chisel may depend on unreleased changes in those projects:
159-
160-
```
161-
git clone https://github.com/chipsalliance/firrtl.git
162-
git clone https://github.com/chipsalliance/treadle.git
163-
pushd firrtl; sbt publishLocal; popd
164-
pushd treadle; sbt publishLocal; popd
165-
```
169+
You must first install required dependencies to build Chisel locally, please see [the setup instructions](SETUP.md).
166170

167171
Clone and build the Chisel library:
168172

169-
```
173+
```bash
170174
git clone https://github.com/chipsalliance/chisel3.git
171175
cd chisel3
172176
sbt compile
@@ -185,14 +189,6 @@ If the compilation succeeded and the dependencies noted above are installed, you
185189
sbt test
186190
```
187191

188-
189-
190-
If you would like to run the tests without the compiler plugin (less common), you can do so by first launching `sbt`,
191-
then running `noPluginTests / test`:
192-
```
193-
sbt
194-
> noPluginTests / test
195-
```
196192
### Running Projects Against Local Chisel
197193

198194
To use the development version of Chisel (`master` branch), you will need to build from source and `publishLocal`.

build.sbt

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ lazy val commonSettings = Seq (
1616
organization := "edu.berkeley.cs",
1717
version := "3.5.0-RC2",
1818
autoAPIMappings := true,
19-
scalaVersion := "2.13.6",
19+
scalaVersion := "2.12.15",
2020
crossScalaVersions := Seq("2.13.6", "2.12.15"),
2121
scalacOptions := Seq("-deprecation", "-feature"),
2222
libraryDependencies += "org.scala-lang" % "scala-reflect" % scalaVersion.value,
@@ -71,9 +71,9 @@ lazy val chiselSettings = Seq (
7171
name := "chisel3",
7272

7373
libraryDependencies ++= Seq(
74-
"org.scalatest" %% "scalatest" % "3.2.9" % "test",
74+
"org.scalatest" %% "scalatest" % "3.2.10" % "test",
7575
"org.scalatestplus" %% "scalacheck-1-14" % "3.2.2.0" % "test",
76-
"com.lihaoyi" %% "os-lib" % "0.7.8",
76+
"com.lihaoyi" %% "os-lib" % "0.8.0",
7777
),
7878
) ++ (
7979
// Tests from other projects may still run concurrently
@@ -113,7 +113,8 @@ lazy val pluginScalaVersions = Seq(
113113
"2.13.3",
114114
"2.13.4",
115115
"2.13.5",
116-
"2.13.6"
116+
"2.13.6",
117+
"2.13.7"
117118
)
118119

119120
lazy val plugin = (project in file("plugin")).
@@ -220,15 +221,6 @@ lazy val chisel = (project in file(".")).
220221
)
221222
)
222223

223-
lazy val noPluginTests = (project in file ("no-plugin-tests")).
224-
dependsOn(chisel).
225-
settings(commonSettings: _*).
226-
settings(chiselSettings: _*).
227-
settings(Seq(
228-
// Totally don't know why GitHub Action won't introduce FIRRTL to dependency.
229-
libraryDependencies += defaultVersions("firrtl"),
230-
))
231-
232224
// tests elaborating and executing/formally verifying a Chisel circuit with chiseltest
233225
lazy val integrationTests = (project in file ("integration-tests")).
234226
dependsOn(chisel).
@@ -246,7 +238,11 @@ lazy val docs = project // new documentation project
246238
.settings(usePluginSettings: _*)
247239
.settings(commonSettings)
248240
.settings(
249-
scalacOptions += "-language:reflectiveCalls",
241+
scalacOptions ++= Seq(
242+
"-Xfatal-warnings",
243+
"-language:reflectiveCalls",
244+
"-language:implicitConversions"
245+
),
250246
mdocIn := file("docs/src"),
251247
mdocOut := file("docs/generated"),
252248
// None of our links are hygienic because they're primarily used on the website with .html

build.sc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ trait CommonModule extends CrossSbtModule with PublishModule {
4545
override def moduleDeps = super.moduleDeps ++ firrtlModule
4646

4747
override def ivyDeps = super.ivyDeps() ++ Agg(
48-
ivy"com.lihaoyi::os-lib:0.7.8",
48+
ivy"com.lihaoyi::os-lib:0.8.0",
4949
) ++ firrtlIvyDeps
5050

5151
def publishVersion = "3.5.0-RC2"
@@ -107,7 +107,7 @@ class chisel3CrossModule(val crossScalaVersion: String) extends CommonModule wit
107107
override def scalacPluginClasspath = m.scalacPluginClasspath
108108

109109
override def ivyDeps = m.ivyDeps() ++ Agg(
110-
ivy"org.scalatest::scalatest:3.2.9",
110+
ivy"org.scalatest::scalatest:3.2.10",
111111
ivy"org.scalatestplus::scalacheck-1-14:3.2.2.0",
112112
) ++ m.treadleIvyDeps
113113

0 commit comments

Comments
 (0)