diff options
| author | Jack Koenig | 2021-01-20 13:46:48 -0800 |
|---|---|---|
| committer | Jack Koenig | 2021-01-21 15:36:55 -0800 |
| commit | 5ece5aa8ac2716d66a6ed91e38a978049d8bf250 (patch) | |
| tree | f83353530e836491bb9b770712f1b8ff3dac3942 /src/test/scala | |
| parent | 616256c35cb7de8fcd97df56af1986b747abe54d (diff) | |
Rename MultiIOModule to Module
Diffstat (limited to 'src/test/scala')
21 files changed, 82 insertions, 79 deletions
diff --git a/src/test/scala/chiselTests/AnalogIntegrationSpec.scala b/src/test/scala/chiselTests/AnalogIntegrationSpec.scala index 258b22f9..3af54d1d 100644 --- a/src/test/scala/chiselTests/AnalogIntegrationSpec.scala +++ b/src/test/scala/chiselTests/AnalogIntegrationSpec.scala @@ -31,15 +31,19 @@ class AnalogBlackBox(index: Int) extends BlackBox(Map("index" -> index)) { val io = IO(new AnalogBlackBoxIO(1)) } +trait AnalogBlackBoxModuleIntf extends Module { + def io: AnalogBlackBoxIO +} + // AnalogBlackBox wrapper, which extends Module to present the common io._ interface -class AnalogBlackBoxModule(index: Int) extends Module { +class AnalogBlackBoxModule(index: Int) extends AnalogBlackBoxModuleIntf { val io = IO(new AnalogBlackBoxIO(1)) val impl = Module(new AnalogBlackBox(index)) io <> impl.io } // Wraps up n blackboxes, connecing their buses and simply forwarding their ports up -class AnalogBlackBoxWrapper(n: Int, idxs: Seq[Int]) extends Module { +class AnalogBlackBoxWrapper(n: Int, idxs: Seq[Int]) extends AnalogBlackBoxModuleIntf { require(n > 0) val io = IO(new AnalogBlackBoxIO(n)) val bbs = idxs.map(i => Module(new AnalogBlackBoxModule(i))) diff --git a/src/test/scala/chiselTests/AutoClonetypeSpec.scala b/src/test/scala/chiselTests/AutoClonetypeSpec.scala index 6c5fd261..b791297d 100644 --- a/src/test/scala/chiselTests/AutoClonetypeSpec.scala +++ b/src/test/scala/chiselTests/AutoClonetypeSpec.scala @@ -198,7 +198,7 @@ class AutoClonetypeSpec extends ChiselFlatSpec with Utils { } "Wrapped IO construction without parent reference" should "not fail for autoclonetype" in { - class TestModule extends MultiIOModule { + class TestModule extends Module { def thunk[T](f: => T): T = f val works = thunk(IO(new Bundle { val x = Output(UInt(3.W)) @@ -208,7 +208,7 @@ class AutoClonetypeSpec extends ChiselFlatSpec with Utils { } "Wrapped IO construction with parent references" should "not fail for autoclonetype" in { - class TestModule(blah: Int) extends MultiIOModule { + class TestModule(blah: Int) extends Module { // Note that this currently fails only if f: =>T on Scala 2.11.12 // This works successfully with 2.12.11 def thunk[T](f: => T): T = f diff --git a/src/test/scala/chiselTests/BoringUtilsSpec.scala b/src/test/scala/chiselTests/BoringUtilsSpec.scala index 0500ac23..39859581 100644 --- a/src/test/scala/chiselTests/BoringUtilsSpec.scala +++ b/src/test/scala/chiselTests/BoringUtilsSpec.scala @@ -71,7 +71,7 @@ class BoringUtilsSpec extends ChiselFlatSpec with ChiselRunners { out := x } - class Top(val width: Int) extends MultiIOModule { + class Top(val width: Int) extends Module { /* From the perspective of deduplication, all sources are identical and all sinks are identical. */ val sources = Seq.fill(3)(Module(new Source)) val sinks = Seq.fill(6)(Module(new Sink)) diff --git a/src/test/scala/chiselTests/CloneModuleSpec.scala b/src/test/scala/chiselTests/CloneModuleSpec.scala index 7f3ef854..e54ef1c2 100644 --- a/src/test/scala/chiselTests/CloneModuleSpec.scala +++ b/src/test/scala/chiselTests/CloneModuleSpec.scala @@ -8,7 +8,7 @@ import chisel3.util.{Queue, EnqIO, DeqIO, QueueIO, log2Ceil} import chisel3.experimental.{CloneModuleAsRecord, IO} import chisel3.testers.BasicTester -class MultiIOQueue[T <: Data](gen: T, val entries: Int) extends MultiIOModule { +class MultiIOQueue[T <: Data](gen: T, val entries: Int) extends Module { val clk = IO(Input(Clock())) val rst = IO(Input(Reset())) val enq = IO(Flipped(EnqIO(gen))) diff --git a/src/test/scala/chiselTests/DataPrint.scala b/src/test/scala/chiselTests/DataPrint.scala index beb92f0d..b5f96c4d 100644 --- a/src/test/scala/chiselTests/DataPrint.scala +++ b/src/test/scala/chiselTests/DataPrint.scala @@ -34,7 +34,7 @@ class DataPrintSpec extends ChiselFlatSpec with Matchers { } } } - class BoundDataModule extends MultiIOModule { // not in the test to avoid anon naming suffixes + class BoundDataModule extends Module { // not in the test to avoid anon naming suffixes Wire(UInt()).toString should be("UInt(Wire in BoundDataModule)") Reg(SInt()).toString should be("SInt(Reg in BoundDataModule)") val io = IO(Output(Bool())) // needs a name so elaboration doesn't fail @@ -44,7 +44,7 @@ class DataPrintSpec extends ChiselFlatSpec with Matchers { (2.U + 2.U).toString should be("UInt<2>(OpResult in BoundDataModule)") Wire(Vec(3, UInt(2.W))).toString should be ("UInt<2>[3](Wire in BoundDataModule)") - class InnerModule extends MultiIOModule { + class InnerModule extends Module { val io = IO(Output(new Bundle { val a = UInt(4.W) })) diff --git a/src/test/scala/chiselTests/Direction.scala b/src/test/scala/chiselTests/Direction.scala index 570abc68..39ff1f0e 100644 --- a/src/test/scala/chiselTests/Direction.scala +++ b/src/test/scala/chiselTests/Direction.scala @@ -131,7 +131,7 @@ class DirectionSpec extends ChiselPropSpec with Matchers with Utils { import chisel3.experimental.{DataMirror, Direction} property("Directions should be preserved through cloning and binding of Bundles") { - ChiselStage.elaborate(new MultiIOModule { + ChiselStage.elaborate(new Module { class MyBundle extends Bundle { val foo = Input(UInt(8.W)) val bar = Output(UInt(8.W)) @@ -164,11 +164,11 @@ class DirectionSpec extends ChiselPropSpec with Matchers with Utils { for ((data, dir) <- actualDirs) { DataMirror.directionOf(data) shouldBe (dir) } - }.asInstanceOf[MultiIOModule]) // The cast works around weird reflection behavior (bug?) + }.asInstanceOf[Module]) // The cast works around weird reflection behavior (bug?) } property("Directions should be preserved through cloning and binding of Vecs") { - ChiselStage.elaborate(new MultiIOModule { + ChiselStage.elaborate(new Module { val a = Vec(1, Input(UInt(8.W))) val b = Vec(1, a) val c = Vec(1, Flipped(a)) @@ -197,7 +197,7 @@ class DirectionSpec extends ChiselPropSpec with Matchers with Utils { for ((data, dir) <- actualDirs) { DataMirror.directionOf(data) shouldBe (dir) } - }.asInstanceOf[MultiIOModule]) // The cast works around weird reflection behavior (bug?) + }.asInstanceOf[Module]) // The cast works around weird reflection behavior (bug?) } property("Using Vec and Flipped together should calculate directions properly") { diff --git a/src/test/scala/chiselTests/DriverSpec.scala b/src/test/scala/chiselTests/DriverSpec.scala index e78185a1..3a78683b 100644 --- a/src/test/scala/chiselTests/DriverSpec.scala +++ b/src/test/scala/chiselTests/DriverSpec.scala @@ -19,7 +19,7 @@ class DummyModule extends Module { io.out := io.in } -class TypeErrorModule extends chisel3.MultiIOModule { +class TypeErrorModule extends chisel3.Module { val in = IO(Input(UInt(1.W))) val out = IO(Output(SInt(1.W))) out := in diff --git a/src/test/scala/chiselTests/Module.scala b/src/test/scala/chiselTests/Module.scala index 03239785..932c94a5 100644 --- a/src/test/scala/chiselTests/Module.scala +++ b/src/test/scala/chiselTests/Module.scala @@ -143,7 +143,7 @@ class ModuleSpec extends ChiselPropSpec with Utils { property("DataMirror.modulePorts should work") { ChiselStage.elaborate(new Module { val io = IO(new Bundle { }) - val m = Module(new chisel3.MultiIOModule { + val m = Module(new chisel3.Module { val a = IO(UInt(8.W)) val b = IO(Bool()) }) diff --git a/src/test/scala/chiselTests/MultiIOModule.scala b/src/test/scala/chiselTests/MultiIOModule.scala index d9eda807..9abf324b 100644 --- a/src/test/scala/chiselTests/MultiIOModule.scala +++ b/src/test/scala/chiselTests/MultiIOModule.scala @@ -5,7 +5,7 @@ package chiselTests import chisel3._ import chisel3.testers.BasicTester -class MultiIOPlusOne extends MultiIOModule { +class MultiIOPlusOne extends Module { val in = IO(Input(UInt(32.W))) val out = IO(Output(UInt(32.W))) @@ -20,20 +20,20 @@ class MultiIOTester extends BasicTester { } // Demonstrate multiple IOs with inheritance where the IO is assigned to internally -trait LiteralOutputTrait extends MultiIOModule { +trait LiteralOutputTrait extends Module { val myLiteralIO = IO(Output(UInt(32.W))) myLiteralIO := 2.U } // Demonstrate multiple IOs with inheritance where the IO is not assigned // (and must be assigned by what extends this trait). -trait MultiIOTrait extends MultiIOModule { +trait MultiIOTrait extends Module { val myTraitIO = IO(Output(UInt(32.W))) } // Composition of the two above traits, example of IO composition directly using multiple top-level // IOs rather than indirectly by constraining the type of the single .io field. -class ComposedMultiIOModule extends MultiIOModule +class ComposedMultiIOModule extends Module with LiteralOutputTrait with MultiIOTrait { val topModuleIO = IO(Input(UInt(32.W))) myTraitIO := topModuleIO diff --git a/src/test/scala/chiselTests/NamingAnnotationTest.scala b/src/test/scala/chiselTests/NamingAnnotationTest.scala index 43ec837d..2226a48a 100644 --- a/src/test/scala/chiselTests/NamingAnnotationTest.scala +++ b/src/test/scala/chiselTests/NamingAnnotationTest.scala @@ -9,7 +9,7 @@ import chisel3.stage.ChiselStage import scala.collection.mutable.ListBuffer -trait NamedModuleTester extends MultiIOModule { +trait NamedModuleTester extends Module { val expectedNameMap = ListBuffer[(InstanceId, String)]() val expectedModuleNameMap = ListBuffer[(Module, String)]() diff --git a/src/test/scala/chiselTests/QueueSpec.scala b/src/test/scala/chiselTests/QueueSpec.scala index ad14ea15..9dc7f120 100644 --- a/src/test/scala/chiselTests/QueueSpec.scala +++ b/src/test/scala/chiselTests/QueueSpec.scala @@ -272,7 +272,7 @@ class QueueSpec extends ChiselPropSpec { } property("Queue.irrevocable should elaborate") { - class IrrevocableQueue extends MultiIOModule { + class IrrevocableQueue extends Module { val in = Wire(Decoupled(Bool())) val iQueue = Queue.irrevocable(in, 1) } diff --git a/src/test/scala/chiselTests/ResetSpec.scala b/src/test/scala/chiselTests/ResetSpec.scala index 77c90814..0e535964 100644 --- a/src/test/scala/chiselTests/ResetSpec.scala +++ b/src/test/scala/chiselTests/ResetSpec.scala @@ -73,14 +73,14 @@ class ResetSpec extends ChiselFlatSpec with Utils { behavior of "Users" they should "be able to force implicit reset to be synchronous" in { - val fir = ChiselStage.emitChirrtl(new MultiIOModule with RequireSyncReset { + val fir = ChiselStage.emitChirrtl(new Module with RequireSyncReset { reset shouldBe a [Bool] }) fir should include ("input reset : UInt<1>") } they should "be able to force implicit reset to be asynchronous" in { - val fir = ChiselStage.emitChirrtl(new MultiIOModule with RequireAsyncReset { + val fir = ChiselStage.emitChirrtl(new Module with RequireAsyncReset { reset shouldBe an [AsyncReset] }) fir should include ("input reset : AsyncReset") @@ -88,8 +88,8 @@ class ResetSpec extends ChiselFlatSpec with Utils { "Chisel" should "error if sync and async modules are nested" in { a [ChiselException] should be thrownBy extractCause[ChiselException] { - ChiselStage.elaborate(new MultiIOModule with RequireAsyncReset { - val mod = Module(new MultiIOModule with RequireSyncReset) + ChiselStage.elaborate(new Module with RequireAsyncReset { + val mod = Module(new Module with RequireSyncReset) }) } } diff --git a/src/test/scala/chiselTests/StrongEnum.scala b/src/test/scala/chiselTests/StrongEnum.scala index d742903c..bf0eb2fe 100644 --- a/src/test/scala/chiselTests/StrongEnum.scala +++ b/src/test/scala/chiselTests/StrongEnum.scala @@ -77,7 +77,7 @@ class CastFromNonLit extends Module { class CastFromNonLitWidth(w: Option[Int] = None) extends Module { val width = if (w.isDefined) w.get.W else UnknownWidth() - override val io = IO(new Bundle { + val io = IO(new Bundle { val in = Input(UInt(width)) val out = Output(EnumExample()) }) diff --git a/src/test/scala/chiselTests/Util.scala b/src/test/scala/chiselTests/Util.scala index d5929dcb..e8354b8d 100644 --- a/src/test/scala/chiselTests/Util.scala +++ b/src/test/scala/chiselTests/Util.scala @@ -20,7 +20,7 @@ trait AbstractPassthroughModule extends RawModule { } class PassthroughModule extends Module with AbstractPassthroughModule -class PassthroughMultiIOModule extends MultiIOModule with AbstractPassthroughModule +class PassthroughMultiIOModule extends Module with AbstractPassthroughModule class PassthroughRawModule extends RawModule with AbstractPassthroughModule case class ScalaIntervalSimulator(intervalRange: IntervalRange) { diff --git a/src/test/scala/chiselTests/experimental/ForceNames.scala b/src/test/scala/chiselTests/experimental/ForceNames.scala index d4ad4d67..b3534f11 100644 --- a/src/test/scala/chiselTests/experimental/ForceNames.scala +++ b/src/test/scala/chiselTests/experimental/ForceNames.scala @@ -14,7 +14,7 @@ import logger.{LogLevel, LogLevelAnnotation} /** Object containing Modules used for testing */ object ForceNamesHierarchy { - class WrapperExample extends MultiIOModule { + class WrapperExample extends Module { val in = IO(Input(UInt(3.W))) val out = IO(Output(UInt(3.W))) val inst = Module(new Wrapper) @@ -22,7 +22,7 @@ object ForceNamesHierarchy { out := inst.out forceName(out, "outt") } - class Wrapper extends MultiIOModule with InlineInstance { + class Wrapper extends Module with InlineInstance { val in = IO(Input(UInt(3.W))) val out = IO(Output(UInt(3.W))) val inst = Module(new MyLeaf) @@ -30,12 +30,12 @@ object ForceNamesHierarchy { inst.in := in out := inst.out } - class MyLeaf extends MultiIOModule { + class MyLeaf extends Module { val in = IO(Input(UInt(3.W))) val out = IO(Output(UInt(3.W))) out := in } - class RenamePortsExample extends MultiIOModule { + class RenamePortsExample extends Module { val in = IO(Input(UInt(3.W))) val out = IO(Output(UInt(3.W))) val inst = Module(new MyLeaf) @@ -43,13 +43,13 @@ object ForceNamesHierarchy { out := inst.out forceName(inst.in, "inn") } - class ConflictingName extends MultiIOModule { + class ConflictingName extends Module { val in = IO(Input(UInt(3.W))) val out = IO(Output(UInt(3.W))) out := in forceName(out, "in") } - class BundleName extends MultiIOModule { + class BundleName extends Module { val in = IO(new Bundle { val a = Input(UInt(3.W)) val b = Input(UInt(3.W)) diff --git a/src/test/scala/chiselTests/experimental/ProgrammaticPortsSpec.scala b/src/test/scala/chiselTests/experimental/ProgrammaticPortsSpec.scala index ffbdb814..ffe3a37f 100644 --- a/src/test/scala/chiselTests/experimental/ProgrammaticPortsSpec.scala +++ b/src/test/scala/chiselTests/experimental/ProgrammaticPortsSpec.scala @@ -52,12 +52,11 @@ class ProgrammaticPortsSpec extends ChiselFlatSpec with Utils { doTest(new PortsWinTester) } - "LegacyModule" should "ignore suggestName on ports" in { + "Module" should "ignore suggestName on clock and reset" in { doTest(new Module with NamedModuleTester { val io = IO(new Bundle { val foo = Output(UInt(8.W)) }) - expectName(io.suggestName("cheese"), "io") expectName(clock.suggestName("tart"), "clock") expectName(reset.suggestName("teser"), "reset") }) @@ -65,7 +64,7 @@ class ProgrammaticPortsSpec extends ChiselFlatSpec with Utils { "SuggestName collisions on ports" should "be illegal" in { a [ChiselException] should be thrownBy extractCause[ChiselException] { - ChiselStage.elaborate(new MultiIOModule { + ChiselStage.elaborate(new Module { val foo = IO(UInt(8.W)).suggestName("apple") val bar = IO(UInt(8.W)).suggestName("apple") }) diff --git a/src/test/scala/chiselTests/naming/NamePluginSpec.scala b/src/test/scala/chiselTests/naming/NamePluginSpec.scala index 5e7133d1..3a539bd4 100644 --- a/src/test/scala/chiselTests/naming/NamePluginSpec.scala +++ b/src/test/scala/chiselTests/naming/NamePluginSpec.scala @@ -11,7 +11,7 @@ class NamePluginSpec extends ChiselFlatSpec with Utils { implicit val minimumScalaVersion: Int = 12 "Scala plugin" should "name internally scoped components" in { - class Test extends MultiIOModule { + class Test extends Module { { val mywire = Wire(UInt(3.W))} } aspectTest(() => new Test) { @@ -20,8 +20,8 @@ class NamePluginSpec extends ChiselFlatSpec with Utils { } "Scala plugin" should "name internally scoped instances" in { - class Inner extends MultiIOModule { } - class Test extends MultiIOModule { + class Inner extends Module { } + class Test extends Module { { val myinstance = Module(new Inner) } } aspectTest(() => new Test) { @@ -30,7 +30,7 @@ class NamePluginSpec extends ChiselFlatSpec with Utils { } "Scala plugin" should "interact with prefixing" in { - class Test extends MultiIOModule { + class Test extends Module { def builder() = { val wire = Wire(UInt(3.W)) } @@ -47,7 +47,7 @@ class NamePluginSpec extends ChiselFlatSpec with Utils { } "Scala plugin" should "interact with prefixing so last val name wins" in { - class Test extends MultiIOModule { + class Test extends Module { def builder() = { val wire1 = Wire(UInt(3.W)) val wire2 = Wire(UInt(3.W)) @@ -71,7 +71,7 @@ class NamePluginSpec extends ChiselFlatSpec with Utils { "Naming on option" should "work" in { - class Test extends MultiIOModule { + class Test extends Module { def builder(): Option[UInt] = { val a = Wire(UInt(3.W)) Some(a) @@ -88,7 +88,7 @@ class NamePluginSpec extends ChiselFlatSpec with Utils { "Naming on iterables" should "work" in { - class Test extends MultiIOModule { + class Test extends Module { def builder(): Seq[UInt] = { val a = Wire(UInt(3.W)) val b = Wire(UInt(3.W)) @@ -108,7 +108,7 @@ class NamePluginSpec extends ChiselFlatSpec with Utils { "Naming on nested iterables" should "work" in { - class Test extends MultiIOModule { + class Test extends Module { def builder(): Seq[Seq[UInt]] = { val a = Wire(UInt(3.W)) val b = Wire(UInt(3.W)) @@ -137,7 +137,7 @@ class NamePluginSpec extends ChiselFlatSpec with Utils { "Naming on custom case classes" should "not work" in { case class Container(a: UInt, b: UInt) - class Test extends MultiIOModule { + class Test extends Module { def builder(): Container = { val a = Wire(UInt(3.W)) val b = Wire(UInt(3.W)) @@ -167,7 +167,7 @@ class NamePluginSpec extends ChiselFlatSpec with Utils { } "Multiple names on a non-IO" should "get the first name" in { - class Test extends MultiIOModule { + class Test extends Module { { val a = Wire(UInt(3.W)) val b = a @@ -234,7 +234,7 @@ class NamePluginSpec extends ChiselFlatSpec with Utils { "autoSeed" should "override automatic naming for non-IO" in { - class Test extends MultiIOModule { + class Test extends Module { { val a = Wire(UInt(3.W)) a.autoSeed("b") @@ -248,7 +248,7 @@ class NamePluginSpec extends ChiselFlatSpec with Utils { } "Unapply assignments" should "still be named" in { - class Test extends MultiIOModule { + class Test extends Module { { val (a, b) = (Wire(UInt(3.W)), Wire(UInt(3.W))) } @@ -261,7 +261,7 @@ class NamePluginSpec extends ChiselFlatSpec with Utils { } "Unapply assignments" should "not override already named things" in { - class Test extends MultiIOModule { + class Test extends Module { { val x = Wire(UInt(3.W)) val (a, b) = (x, Wire(UInt(3.W))) @@ -276,7 +276,7 @@ class NamePluginSpec extends ChiselFlatSpec with Utils { "Case class unapply assignments" should "be named" in { case class Foo(x: UInt, y: UInt) - class Test extends MultiIOModule { + class Test extends Module { { def func() = Foo(Wire(UInt(3.W)), Wire(UInt(3.W))) val Foo(a, b) = func() @@ -291,7 +291,7 @@ class NamePluginSpec extends ChiselFlatSpec with Utils { "Complex unapply assignments" should "be named" in { case class Foo(x: UInt, y: UInt) - class Test extends MultiIOModule { + class Test extends Module { { val w = Wire(UInt(3.W)) def func() = { @@ -320,7 +320,7 @@ class NamePluginSpec extends ChiselFlatSpec with Utils { } "Nested val declarations" should "all be named" in { - class Test extends MultiIOModule { + class Test extends Module { { val a = { val b = { diff --git a/src/test/scala/chiselTests/naming/PrefixSpec.scala b/src/test/scala/chiselTests/naming/PrefixSpec.scala index 83408dea..0712692d 100644 --- a/src/test/scala/chiselTests/naming/PrefixSpec.scala +++ b/src/test/scala/chiselTests/naming/PrefixSpec.scala @@ -10,7 +10,7 @@ import chiselTests.{ChiselPropSpec, Utils} class PrefixSpec extends ChiselPropSpec with Utils { implicit val minimumMajorVersion: Int = 12 property("Scala plugin should interact with prefixing so last plugin name wins?") { - class Test extends MultiIOModule { + class Test extends Module { def builder(): UInt = { val wire1 = Wire(UInt(3.W)) val wire2 = Wire(UInt(3.W)) @@ -34,7 +34,7 @@ class PrefixSpec extends ChiselPropSpec with Utils { } property("Nested prefixes should work") { - class Test extends MultiIOModule { + class Test extends Module { def builder2(): UInt = { val wire1 = Wire(UInt(3.W)) val wire2 = Wire(UInt(3.W)) @@ -68,7 +68,7 @@ class PrefixSpec extends ChiselPropSpec with Utils { } property("Prefixing seeded with signal") { - class Test extends MultiIOModule { + class Test extends Module { def builder(): UInt = { val wire = Wire(UInt(3.W)) wire := 3.U @@ -93,7 +93,7 @@ class PrefixSpec extends ChiselPropSpec with Utils { property("Automatic prefixing should work") { - class Test extends MultiIOModule { + class Test extends Module { def builder(): UInt = { val a = Wire(UInt(3.W)) val b = Wire(UInt(3.W)) @@ -113,7 +113,7 @@ class PrefixSpec extends ChiselPropSpec with Utils { property("No prefixing annotation on defs should work") { - class Test extends MultiIOModule { + class Test extends Module { def builder(): UInt = noPrefix { val a = Wire(UInt(3.W)) val b = Wire(UInt(3.W)) @@ -130,7 +130,7 @@ class PrefixSpec extends ChiselPropSpec with Utils { property("Prefixing on temps should work") { - class Test extends MultiIOModule { + class Test extends Module { def builder(): UInt = { val a = Wire(UInt(3.W)) val b = Wire(UInt(3.W)) @@ -149,13 +149,13 @@ class PrefixSpec extends ChiselPropSpec with Utils { } property("Prefixing should not leak into child modules") { - class Child extends MultiIOModule { + class Child extends Module { { val wire = Wire(UInt()) } } - class Test extends MultiIOModule { + class Test extends Module { { val child = prefix("InTest") { Module(new Child) @@ -169,13 +169,13 @@ class PrefixSpec extends ChiselPropSpec with Utils { } property("Prefixing should not leak into child modules, example 2") { - class Child extends MultiIOModule { + class Child extends Module { { val wire = Wire(UInt()) } } - class Test extends MultiIOModule { + class Test extends Module { val x = IO(Input(UInt(3.W))) val y = { lazy val module = new Child @@ -189,13 +189,13 @@ class PrefixSpec extends ChiselPropSpec with Utils { } property("Instance names should not be added to prefix") { - class Child(tpe: UInt) extends MultiIOModule { + class Child(tpe: UInt) extends Module { { val io = IO(Input(tpe)) } } - class Test extends MultiIOModule { + class Test extends Module { { lazy val module = { val x = UInt(3.W) @@ -212,7 +212,7 @@ class PrefixSpec extends ChiselPropSpec with Utils { property("Prefixing should not be caused by nested Iterable[Iterable[Any]]") { - class Test extends MultiIOModule { + class Test extends Module { { val iia = { val wire = Wire(UInt(3.W)) @@ -227,7 +227,7 @@ class PrefixSpec extends ChiselPropSpec with Utils { } property("Prefixing should be caused by nested Iterable[Iterable[Data]]") { - class Test extends MultiIOModule { + class Test extends Module { { val iia = { val wire = Wire(UInt(3.W)) @@ -242,7 +242,7 @@ class PrefixSpec extends ChiselPropSpec with Utils { } property("Prefixing should be the prefix during the last call to autoName/suggestName") { - class Test extends MultiIOModule { + class Test extends Module { { val wire = { val x = Wire(UInt(3.W)).suggestName("mywire") @@ -258,7 +258,7 @@ class PrefixSpec extends ChiselPropSpec with Utils { } property("Prefixing have intuitive behavior") { - class Test extends MultiIOModule { + class Test extends Module { { val wire = { val x = Wire(UInt(3.W)).suggestName("mywire") @@ -274,7 +274,7 @@ class PrefixSpec extends ChiselPropSpec with Utils { } property("Prefixing on connection to subfields work") { - class Test extends MultiIOModule { + class Test extends Module { { val wire = Wire(new Bundle { val x = UInt(3.W) @@ -301,12 +301,12 @@ class PrefixSpec extends ChiselPropSpec with Utils { } property("Prefixing on connection to IOs should work") { - class Child extends MultiIOModule { + class Child extends Module { val in = IO(Input(UInt(3.W))) val out = IO(Output(UInt(3.W))) out := RegNext(in) } - class Test extends MultiIOModule { + class Test extends Module { { val child = Module(new Child) child.in := RegNext(3.U) @@ -324,12 +324,12 @@ class PrefixSpec extends ChiselPropSpec with Utils { } property("Prefixing on bulk connects should work") { - class Child extends MultiIOModule { + class Child extends Module { val in = IO(Input(UInt(3.W))) val out = IO(Output(UInt(3.W))) out := RegNext(in) } - class Test extends MultiIOModule { + class Test extends Module { { val child = Module(new Child) child.in <> RegNext(3.U) @@ -347,7 +347,7 @@ class PrefixSpec extends ChiselPropSpec with Utils { } property("Connections should use the non-prefixed name of the connected Data") { - class Test extends MultiIOModule { + class Test extends Module { prefix("foo") { val x = Wire(UInt(8.W)) x := { @@ -364,7 +364,7 @@ class PrefixSpec extends ChiselPropSpec with Utils { } property("Connections to aggregate fields should use the non-prefixed aggregate name") { - class Test extends MultiIOModule { + class Test extends Module { prefix("foo") { val x = Wire(new Bundle { val bar = UInt(8.W) }) x.bar := { @@ -382,7 +382,7 @@ class PrefixSpec extends ChiselPropSpec with Utils { property("Prefixing with wires in recursive functions should grow linearly") { - class Test extends MultiIOModule { + class Test extends Module { def func(bools: Seq[Bool]): Bool = { if (bools.isEmpty) true.B else { diff --git a/src/test/scala/chiselTests/stage/ChiselMainSpec.scala b/src/test/scala/chiselTests/stage/ChiselMainSpec.scala index a11b8a44..0fc42fc6 100644 --- a/src/test/scala/chiselTests/stage/ChiselMainSpec.scala +++ b/src/test/scala/chiselTests/stage/ChiselMainSpec.scala @@ -24,7 +24,7 @@ object ChiselMainSpec { } /** A module that connects two of the same types together */ - class SameTypesModule extends MultiIOModule { + class SameTypesModule extends Module { val in = IO(Input(UInt(1.W))) val out = IO(Output(UInt(1.W))) out := in diff --git a/src/test/scala/chiselTests/stage/ChiselStageSpec.scala b/src/test/scala/chiselTests/stage/ChiselStageSpec.scala index fb5698a6..98bbb2ea 100644 --- a/src/test/scala/chiselTests/stage/ChiselStageSpec.scala +++ b/src/test/scala/chiselTests/stage/ChiselStageSpec.scala @@ -15,13 +15,13 @@ import firrtl.options.Dependency object ChiselStageSpec { - class Bar extends MultiIOModule { + class Bar extends Module { val in = IO(Input(UInt(4.W))) val out = IO(Output(UInt(4.W))) out := ~in } - class Foo extends MultiIOModule { + class Foo extends Module { val addr = IO(Input(UInt(4.W))) val out = IO(Output(Bool())) val memory = SyncReadMem(8, Bool()) diff --git a/src/test/scala/chiselTests/util/CatSpec.scala b/src/test/scala/chiselTests/util/CatSpec.scala index 2e52fe63..5565ca51 100644 --- a/src/test/scala/chiselTests/util/CatSpec.scala +++ b/src/test/scala/chiselTests/util/CatSpec.scala @@ -10,7 +10,7 @@ import chiselTests.ChiselFlatSpec object CatSpec { - class JackIsATypeSystemGod extends MultiIOModule { + class JackIsATypeSystemGod extends Module { val in = IO(Input (Vec(0, UInt(8.W)))) val out = IO(Output(UInt(8.W))) |
