Skip to content

Commit 42b83bb

Browse files
committed
Merge branch 'master' into release; bump version
2 parents 673aad2 + 734c520 commit 42b83bb

File tree

4 files changed

+51
-7
lines changed

4 files changed

+51
-7
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ ifneq (,$(RM_DIRS))
5757
endif
5858

5959
scaladoc:
60-
$(SBT) $(SBT_FLAGS) doc
60+
$(SBT) $(SBT_FLAGS) unidoc
6161

6262
site:
6363
$(SBT) $(SBT_FLAGS) make-site

build.sbt

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def javacOptionsVersion(scalaVersion: String): Seq[String] = {
3232

3333
lazy val commonSettings = Seq (
3434
organization := "edu.berkeley.cs",
35-
version := "3.0.0-RC1",
35+
version := "3.0.0-RC2",
3636
git.remoteRepo := "[email protected]:freechipsproject/chisel3.git",
3737
autoAPIMappings := true,
3838
scalaVersion := "2.11.11",
@@ -92,7 +92,7 @@ lazy val publishSettings = Seq (
9292
}
9393
)
9494

95-
val defaultVersions = Map("firrtl" -> "1.0.0-RC1")
95+
val defaultVersions = Map("firrtl" -> "1.0.0-RC2")
9696

9797
lazy val chiselSettings = Seq (
9898
name := "chisel3",

chiselFrontend/src/main/scala/chisel3/internal/Builder.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ private[chisel3] object Builder {
166166

167167
// Initialize any singleton objects before user code inadvertently inherits them.
168168
private def initializeSingletons(): Unit = {
169-
val dummy = DontCare
169+
val dummy = core.DontCare
170170
}
171171
def idGen: IdGen = dynamicContext.idGen
172172
def globalNamespace: Namespace = dynamicContext.globalNamespace

src/test/scala/chiselTests/InvalidateAPISpec.scala

+47-3
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,13 @@ class InvalidateAPISpec extends ChiselPropSpec with Matchers {
6666
val nElements = 5
6767
class ModuleWithoutDontCare extends Module {
6868
val io = IO(new Bundle {
69-
val ins = Input(Vec(nElements, Bool()))
69+
val outs = Output(Vec(nElements, Bool()))
7070
})
71-
io.ins <> DontCare
71+
io.outs <> DontCare
7272
}
7373
val firrtlOutput = myGenerateFirrtl(new ModuleWithoutDontCare)
7474
for (i <- 0 until nElements)
75-
firrtlOutput should include(s"io.ins[$i] is invalid")
75+
firrtlOutput should include(s"io.outs[$i] is invalid")
7676
}
7777

7878
property("a Vec with a DontCare should emit a Firrtl \"is invalid\" with Strict CompileOptions and mono connect") {
@@ -161,4 +161,48 @@ class InvalidateAPISpec extends ChiselPropSpec with Matchers {
161161

162162
compileFirrtl(new ModuleWithConditionalAndOtherwiseAssignment)
163163
}
164+
165+
property("an output without a DontCare should NOT emit a Firrtl \"is invalid\" with overriden NotStrict CompileOptions") {
166+
import chisel3.core.ExplicitCompileOptions.NotStrict
167+
class ModuleWithoutDontCare extends Module {
168+
override val compileOptions = chisel3.core.ExplicitCompileOptions.NotStrict.copy(explicitInvalidate = true)
169+
val io = IO(new TrivialInterface)
170+
io.out := io.in
171+
}
172+
val firrtlOutput = myGenerateFirrtl(new ModuleWithoutDontCare)
173+
firrtlOutput should not include("is invalid")
174+
}
175+
176+
property("an output without a DontCare should NOT emit a Firrtl \"is invalid\" with overriden NotStrict CompileOptions module definition") {
177+
import chisel3.core.ExplicitCompileOptions.NotStrict
178+
abstract class ExplicitInvalidateModule extends Module()(chisel3.core.ExplicitCompileOptions.NotStrict.copy(explicitInvalidate = true))
179+
class ModuleWithoutDontCare extends ExplicitInvalidateModule {
180+
val io = IO(new TrivialInterface)
181+
io.out := io.in
182+
}
183+
val firrtlOutput = myGenerateFirrtl(new ModuleWithoutDontCare)
184+
firrtlOutput should not include("is invalid")
185+
}
186+
187+
property("an output without a DontCare should emit a Firrtl \"is invalid\" with overriden Strict CompileOptions") {
188+
import chisel3.core.ExplicitCompileOptions.Strict
189+
class ModuleWithoutDontCare extends Module {
190+
override val compileOptions = chisel3.core.ExplicitCompileOptions.Strict.copy(explicitInvalidate = false)
191+
val io = IO(new TrivialInterface)
192+
io.out := io.in
193+
}
194+
val firrtlOutput = myGenerateFirrtl(new ModuleWithoutDontCare)
195+
firrtlOutput should include("is invalid")
196+
}
197+
198+
property("an output without a DontCare should emit a Firrtl \"is invalid\" with overriden Strict CompileOptions module definition") {
199+
import chisel3.core.ExplicitCompileOptions.Strict
200+
abstract class ImplicitInvalidateModule extends Module()(chisel3.core.ExplicitCompileOptions.NotStrict.copy(explicitInvalidate = false))
201+
class ModuleWithoutDontCare extends ImplicitInvalidateModule {
202+
val io = IO(new TrivialInterface)
203+
io.out := io.in
204+
}
205+
val firrtlOutput = myGenerateFirrtl(new ModuleWithoutDontCare)
206+
firrtlOutput should include("is invalid")
207+
}
164208
}

0 commit comments

Comments
 (0)