summaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorJack Koenig2021-01-21 22:50:12 -0800
committerGitHub2021-01-21 22:50:12 -0800
commitdd6871b8b3f2619178c2a333d9d6083805d99e16 (patch)
tree825776855e7d2fc28ef32ebb05df7339c24e00b3 /src/main
parent616256c35cb7de8fcd97df56af1986b747abe54d (diff)
parent53c24cb0a369d4c4f57c28c098b30e4d3640eac2 (diff)
Merge pull request #1745 from chipsalliance/remove-val-io
Remove "val io" and rename MultiIOModule to Module
Diffstat (limited to 'src/main')
-rw-r--r--src/main/scala/chisel3/aop/injecting/InjectingAspect.scala4
-rw-r--r--src/main/scala/chisel3/compatibility.scala41
-rw-r--r--src/main/scala/chisel3/util/Decoupled.scala2
3 files changed, 7 insertions, 40 deletions
diff --git a/src/main/scala/chisel3/aop/injecting/InjectingAspect.scala b/src/main/scala/chisel3/aop/injecting/InjectingAspect.scala
index f9aaceb1..39590b93 100644
--- a/src/main/scala/chisel3/aop/injecting/InjectingAspect.scala
+++ b/src/main/scala/chisel3/aop/injecting/InjectingAspect.scala
@@ -2,7 +2,7 @@
package chisel3.aop.injecting
-import chisel3.{Module, ModuleAspect, MultiIOModule, RawModule, experimental, withClockAndReset}
+import chisel3.{Module, ModuleAspect, RawModule, withClockAndReset}
import chisel3.aop._
import chisel3.internal.{Builder, DynamicContext}
import chisel3.internal.firrtl.DefModule
@@ -63,7 +63,7 @@ abstract class InjectorAspect[T <: RawModule, M <: RawModule](
RunFirrtlTransformAnnotation(new InjectingTransform) +: modules.map { module =>
val (chiselIR, _) = Builder.build(Module(new ModuleAspect(module) {
module match {
- case x: MultiIOModule => withClockAndReset(x.clock, x.reset) { injection(module) }
+ case x: Module => withClockAndReset(x.clock, x.reset) { injection(module) }
case x: RawModule => injection(module)
}
}), dynamicContext)
diff --git a/src/main/scala/chisel3/compatibility.scala b/src/main/scala/chisel3/compatibility.scala
index 38ef80ba..e62cba7d 100644
--- a/src/main/scala/chisel3/compatibility.scala
+++ b/src/main/scala/chisel3/compatibility.scala
@@ -259,16 +259,7 @@ package object Chisel {
implicit def resetToBool(reset: Reset): Bool = reset.asBool
- import chisel3.experimental.Param
- abstract class BlackBox(params: Map[String, Param] = Map.empty[String, Param]) extends chisel3.BlackBox(params) {
- // This class auto-wraps the BlackBox with IO(...), allowing legacy code (where IO(...) wasn't
- // required) to build.
- override def _compatAutoWrapPorts(): Unit = {
- if (!_compatIoPortBound()) {
- _bindIoInPlace(io)
- }
- }
- }
+ type BlackBox = chisel3.internal.LegacyBlackBox
type MemBase[T <: Data] = chisel3.MemBase[T]
@@ -302,35 +293,11 @@ package object Chisel {
}
import chisel3.CompileOptions
- abstract class CompatibilityModule(implicit moduleCompileOptions: CompileOptions)
- extends chisel3.internal.LegacyModule()(moduleCompileOptions) {
- // This class auto-wraps the Module IO with IO(...), allowing legacy code (where IO(...) wasn't
- // required) to build.
- // Also provides the clock / reset constructors, which were used before withClock happened.
-
- // Provide a non-deprecated constructor
- def this(override_clock: Option[Clock]=None, override_reset: Option[Bool]=None)
- (implicit moduleCompileOptions: CompileOptions) = {
- this()
- this.override_clock = override_clock
- this.override_reset = override_reset
- }
- def this(_clock: Clock)(implicit moduleCompileOptions: CompileOptions) =
- this(Option(_clock), None)(moduleCompileOptions)
- def this(_reset: Bool)(implicit moduleCompileOptions: CompileOptions) =
- this(None, Option(_reset))(moduleCompileOptions)
- def this(_clock: Clock, _reset: Bool)(implicit moduleCompileOptions: CompileOptions) =
- this(Option(_clock), Option(_reset))(moduleCompileOptions)
-
- override def _compatAutoWrapPorts(): Unit = {
- if (!_compatIoPortBound() && io != null) {
- _bindIoInPlace(io)
- }
- }
- }
+ @deprecated("Use Chisel.Module", "Chisel 3.5")
+ type CompatibilityModule = chisel3.internal.LegacyModule
val Module = chisel3.Module
- type Module = CompatibilityModule
+ type Module = chisel3.internal.LegacyModule
val printf = chisel3.printf
diff --git a/src/main/scala/chisel3/util/Decoupled.scala b/src/main/scala/chisel3/util/Decoupled.scala
index c6459455..032d731d 100644
--- a/src/main/scala/chisel3/util/Decoupled.scala
+++ b/src/main/scala/chisel3/util/Decoupled.scala
@@ -21,7 +21,7 @@ abstract class ReadyValidIO[+T <: Data](gen: T) extends Bundle
{
// Compatibility hack for rocket-chip
private val genType = (DataMirror.internal.isSynthesizable(gen), chisel3.internal.Builder.currentModule) match {
- case (true, Some(module: MultiIOModule))
+ case (true, Some(module: Module))
if !module.compileOptions.declaredTypeMustBeUnbound => chiselTypeOf(gen)
case _ => gen
}