Skip to content

Commit 7f983aa

Browse files
committed
Merge branch 'master' into 3.6-release
2 parents 9732792 + 81b3761 commit 7f983aa

File tree

277 files changed

+5664
-3880
lines changed

Some content is hidden

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

277 files changed

+5664
-3880
lines changed

.github/workflows/install-circt/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ inputs:
44
version:
55
description: 'version to install'
66
required: false
7-
default: 'sifive/1/24/0'
7+
default: 'firtool-1.30.0'
88

99
runs:
1010
using: composite

.github/workflows/test.yml

Lines changed: 62 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
jvm: ["8"]
2020
scala: ["2.13.10", "2.12.17"]
2121
espresso: ["2.4"]
22-
circt: ["sifive/1/24/0"]
22+
circt: ["firtool-1.30.0"]
2323
runs-on: ${{ matrix.system }}
2424

2525
steps:
@@ -41,16 +41,13 @@ jobs:
4141
uses: ./.github/workflows/install-circt
4242
with:
4343
version: ${{ matrix.circt }}
44-
- name: Use Treadle for Pull Requests
45-
if: github.event_name == 'pull_request'
46-
run: echo "CHISEL3_CI_USE_TREADLE=1" >> $GITHUB_ENV
4744
- name: Test
4845
run: sbt ++${{ matrix.scala }} test
4946
- name: Binary compatibility
5047
run: sbt ++${{ matrix.scala }} mimaReportBinaryIssues
5148

5249
doc:
53-
name: Formatting and Documentation
50+
name: Formatting
5451
runs-on: ubuntu-20.04
5552
steps:
5653
- name: Checkout
@@ -65,8 +62,6 @@ jobs:
6562
uses: ./.github/workflows/install-circt
6663
- name: Check Formatting
6764
run: sbt scalafmtCheckAll
68-
- name: Documentation
69-
run: sbt docs/mdoc unidoc
7065

7166
integration:
7267
name: Integration Tests (w/ chiseltest)
@@ -85,6 +80,11 @@ jobs:
8580
java-version: '11'
8681
cache: 'sbt'
8782
- name: Integration Tests
83+
# This is here instead of on the whole job because, if a job is skipped, so are dependent jobs.
84+
# If this job were skipped, all_tests_passed would be skipped too.
85+
# By having this "if" here, this job returns success so that all_tests_passed will succeed too.
86+
if: github.event_name != 'pull_request' ||
87+
! contains(github.event.pull_request.labels.*.name, 'Skip chiseltest')
8888
run: sbt integrationTests/test
8989

9090
std:
@@ -110,13 +110,46 @@ jobs:
110110
- name: Unit Tests
111111
run: sbt ++${{ matrix.scala }} standardLibrary/test
112112

113+
website:
114+
name: Build Mdoc & Website
115+
runs-on: ubuntu-latest
116+
117+
steps:
118+
- name: Checkout
119+
uses: actions/checkout@v2
120+
- name: Setup Scala
121+
uses: olafurpg/setup-scala@v10
122+
with:
123+
java-version: adopt@1.8
124+
- name: Cache Scala
125+
uses: coursier/cache-action@v5
126+
- name: Setup Ruby
127+
uses: actions/setup-ruby@v1
128+
- name: Setup Jekyll
129+
run: |
130+
gem install jekyll -v 4.2.0
131+
gem install jekyll-redirect-from
132+
- name: Install CIRCT
133+
uses: ./.github/workflows/install-circt
134+
- name: Build the microsite
135+
run: make -C website
136+
env:
137+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
138+
- name: Tar built website
139+
run: tar zcf website.tar.gz website/docs/target/site
140+
- name: Share Built Website
141+
uses: actions/upload-artifact@v3
142+
with:
143+
name: website
144+
path: website.tar.gz
145+
113146
# Sentinel job to simplify how we specify which checks need to pass in branch
114147
# protection and in Mergify. This job checks that all jobs were successful.
115148
#
116149
# When adding new jobs, please add them to `needs` below
117150
check-tests:
118151
name: "check tests"
119-
needs: [ci, integration, std, doc]
152+
needs: [ci, integration, std, doc, website]
120153
runs-on: ubuntu-20.04
121154
if: success() # only run if all tests have passed
122155
outputs:
@@ -153,7 +186,7 @@ jobs:
153186
publish:
154187
needs: [all_tests_passed]
155188
runs-on: ubuntu-20.04
156-
if: github.event_name == 'push'
189+
if: (github.event_name == 'push' && github.ref_name != 'website-test')
157190

158191
steps:
159192
- name: Checkout
@@ -173,3 +206,23 @@ jobs:
173206
PGP_SECRET: ${{ secrets.PGP_SECRET }}
174207
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
175208
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
209+
210+
211+
deploy_website:
212+
name: Deploy Website
213+
runs-on: ubuntu-latest
214+
needs: [all_tests_passed]
215+
if: (github.event_name == 'push') && (github.ref_type == 'branch') && ((github.ref_name == 'website-test') || (github.ref_name == 'master'))
216+
steps:
217+
- name: Download built website
218+
uses: actions/download-artifact@v3
219+
with:
220+
name: website
221+
- name: Untar built website
222+
run: tar zxf website.tar.gz
223+
- name: Deploy Website to GitHub Pages (From Master Branch)
224+
uses: JamesIves/github-pages-deploy-action@3.7.1
225+
with:
226+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
227+
BRANCH: gh-pages
228+
FOLDER: website/docs/target/site

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,8 @@ These simulation-based verification tools are available for Chisel:
246246
* [**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
247247
* [**ScalaDoc**](https://www.chisel-lang.org/api/latest/chisel3/index.html), a listing, description, and examples of the functionality exposed by Chisel
248248
* [**Gitter**](https://gitter.im/freechipsproject/chisel3), where you can ask questions or discuss anything Chisel
249-
* [**Website**](https://www.chisel-lang.org) ([source](https://github.com/freechipsproject/www.chisel-lang.org/))
249+
* [**Website (3.6 and earlier)**](https://www.chisel-lang.org) ([source](https://github.com/freechipsproject/www.chisel-lang.org/))
250+
* [**Website (master)**](https://chipsalliance.github.io/chisel3) ([source](website)) (Note that this will replace the above after the 3.6 release)
250251
* [**Scastie (3.5.3)**](https://scastie.scala-lang.org/O3LqeVH7SWyIxD7bZRH8hA)
251252
* [**asic-world**](http://www.asic-world.com/verilog/veritut.html) If you aren't familiar with verilog, this is a good tutorial.
252253

@@ -330,7 +331,6 @@ While we recommend using the library dependency approach as described above, it
330331

331332
**Caveats**:
332333

333-
* This only works for the "main" configuration; you cannot build the Chisel tests this way because `treadle` is only supported as a library dependency.
334334
* Do not `publishLocal` when building this way. The published artifact will be missing the FIRRTL dependency.
335335

336336
This works by using [sbt-sriracha](http://eed3si9n.com/hot-source-dependencies-using-sbt-sriracha), an SBT plugin for toggling between source and library dependencies.
@@ -392,4 +392,4 @@ You are encouraged to do your development against the latest SNAPSHOT, but note
392392

393393
### Roadmap
394394

395-
See [ROADMAP.md].
395+
See (Roadmap)[https://github.com/chipsalliance/chisel3/blob/master/README.md].

ROADMAP.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ spec and the Chisel APIs. Thus, the 3.6 release will:
4343
- Injecting Aspects
4444
- EnumAnnotations
4545
- RunFirrtlTransformAnnotation
46-
- LoadMemoryFromFile
4746
- ChiselAnnotation/custom annotations
4847
- Publish Roadmap
4948

SETUP.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ Instructions for setting up your environment to run Chisel locally.
33

44
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 on your project configuration.
55

6-
[Verilator](https://www.veripool.org/wiki/verilator) is optional, only if you need to run the Chisel3 regression suite, or simulate your Verilog designs.
7-
Note that both [PeekPokeTester](https://github.com/freechipsproject/chisel-testers) and [testers2](https://github.com/ucb-bar/chisel-testers2) both support using [treadle](https://github.com/freechipsproject/treadle) (a FIRRTL simulator written in Scala) as the simulation engine, which requires no additional installation steps.
6+
[Verilator](https://www.veripool.org/wiki/verilator) is installation is required to simulate your Verilog designs.
87

98
## Ubuntu Linux
109

build.sbt

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ lazy val commonSettings = Seq(
1717
organization := "edu.berkeley.cs",
1818
version := "3.6.0-RC1",
1919
autoAPIMappings := true,
20-
scalaVersion := "2.12.17",
20+
scalaVersion := "2.13.10",
2121
crossScalaVersions := Seq("2.13.10", "2.12.17"),
2222
scalacOptions := Seq("-deprecation", "-feature"),
2323
libraryDependencies += "org.scala-lang" % "scala-reflect" % scalaVersion.value,
@@ -36,6 +36,16 @@ lazy val commonSettings = Seq(
3636
}
3737
)
3838

39+
lazy val warningSuppression = Seq(
40+
scalacOptions += "-Wconf:" + Seq(
41+
"msg=APIs in chisel3.internal:s",
42+
"msg=Importing from firrtl:s",
43+
"msg=migration to the MLIR:s",
44+
"msg=method hasDefiniteSize in trait IterableOnceOps is deprecated:s", // replacement `knownSize` is not in 2.12
45+
"msg=object JavaConverters in package collection is deprecated:s"
46+
).mkString(",")
47+
)
48+
3949
lazy val publishSettings = Seq(
4050
versionScheme := Some("pvp"),
4151
publishMavenStyle := true,
@@ -70,7 +80,7 @@ lazy val publishSettings = Seq(
7080
lazy val chiselSettings = Seq(
7181
name := "chisel3",
7282
libraryDependencies ++= Seq(
73-
"org.scalatest" %% "scalatest" % "3.2.14" % "test",
83+
"org.scalatest" %% "scalatest" % "3.2.15" % "test",
7484
"org.scalatestplus" %% "scalacheck-1-14" % "3.2.2.0" % "test",
7585
"com.lihaoyi" %% "upickle" % "2.0.0"
7686
)
@@ -171,14 +181,14 @@ lazy val core = (project in file("core"))
171181
)
172182
.settings(publishSettings: _*)
173183
.settings(mimaPreviousArtifacts := Set())
184+
.settings(warningSuppression: _*)
174185
.settings(
175186
name := "chisel3-core",
176187
libraryDependencies ++= Seq(
177188
"com.lihaoyi" %% "upickle" % "2.0.0",
178189
"com.lihaoyi" %% "os-lib" % "0.8.1"
179190
),
180191
scalacOptions := scalacOptions.value ++ Seq(
181-
"-deprecation",
182192
"-explaintypes",
183193
"-feature",
184194
"-language:reflectiveCalls",
@@ -202,9 +212,9 @@ lazy val chisel = (project in file("."))
202212
.dependsOn(macros)
203213
.dependsOn(core)
204214
.aggregate(macros, core, plugin)
215+
.settings(warningSuppression: _*)
205216
.settings(
206217
mimaPreviousArtifacts := Set(),
207-
libraryDependencies += defaultVersions("treadle") % "test",
208218
Test / scalacOptions ++= Seq("-language:reflectiveCalls"),
209219
// Forward doc command to unidoc
210220
Compile / doc := (ScalaUnidoc / doc).value,
@@ -242,11 +252,11 @@ lazy val chisel = (project in file("."))
242252
// See https://github.com/sbt/sbt-unidoc/issues/107
243253
(core / Compile / sources).value.map("-P:chiselplugin:INTERNALskipFile:" + _)
244254
++ {
245-
CrossVersion.partialVersion(scalaVersion.value) match {
246-
case Some((2, n)) if n >= 13 => "-implicits" :: Nil
247-
case _ => Nil
248-
}
249-
}
255+
CrossVersion.partialVersion(scalaVersion.value) match {
256+
case Some((2, n)) if n >= 13 => "-implicits" :: Nil
257+
case _ => Nil
258+
}
259+
}
250260
)
251261

252262
// tests elaborating and executing/formally verifying a Chisel circuit with chiseltest

build.sc

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,8 @@ def getVersion(dep: String, org: String = "edu.berkeley.cs") = {
2424

2525
object v {
2626
val firrtl = getVersion("firrtl")
27-
val treadle = getVersion("treadle")
2827
val chiseltest = ivy"edu.berkeley.cs::chiseltest:0.6-SNAPSHOT"
29-
val scalatest = ivy"org.scalatest::scalatest:3.2.14"
28+
val scalatest = ivy"org.scalatest::scalatest:3.2.15"
3029
val scalacheck = ivy"org.scalatestplus::scalacheck-1-14:3.2.2.0"
3130
val osLib = ivy"com.lihaoyi::os-lib:0.8.1"
3231
val upickle = ivy"com.lihaoyi::upickle:2.0.0"
@@ -43,14 +42,6 @@ trait CommonModule extends CrossSbtModule with PublishModule with ScalafmtModule
4342
)
4443
else Agg.empty[Dep]
4544

46-
def treadleModule: Option[PublishModule] = None
47-
48-
def treadleIvyDeps = if (treadleModule.isEmpty)
49-
Agg(
50-
v.chiseltest
51-
)
52-
else Agg.empty[Dep]
53-
5445
def chiseltestModule: Option[PublishModule] = None
5546

5647
def chiseltestIvyDeps = if (chiseltestModule.isEmpty)
@@ -140,19 +131,19 @@ class chisel3CrossModule(val crossScalaVersion: String) extends CommonModule wit
140131
override def ivyDeps = m.ivyDeps() ++ Agg(
141132
v.scalatest,
142133
v.scalacheck
143-
) ++ m.treadleIvyDeps
134+
)
144135

145-
override def moduleDeps = super.moduleDeps ++ treadleModule
136+
override def moduleDeps = super.moduleDeps
146137
}
147138

148139
object `integration-tests` extends Tests with TestModule.ScalaTest with ScalafmtModule {
149140
override def sources = T.sources(millSourcePath / "integration-tests" / "src" / "test" / "scala")
150141
override def ivyDeps = m.ivyDeps() ++ Agg(
151142
v.scalatest,
152143
v.scalacheck
153-
) ++ m.treadleIvyDeps ++ m.chiseltestIvyDeps
144+
) ++ m.chiseltestIvyDeps
154145

155-
override def moduleDeps = super.moduleDeps ++ Seq(stdlib) ++ treadleModule ++ chiseltestModule
146+
override def moduleDeps = super.moduleDeps ++ Seq(stdlib) ++ chiseltestModule
156147
}
157148

158149
override def buildInfoPackageName = Some("chisel3")

0 commit comments

Comments
 (0)