summaryrefslogtreecommitdiff
path: root/src/test/scala/chiselTests/ModuleExplicitResetSpec.scala
blob: c55276ce1e928f744efae9751c435f14d985548f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// SPDX-License-Identifier: Apache-2.0

package chiselTests

import chisel3.stage.ChiselStage

class ModuleExplicitResetSpec extends ChiselFlatSpec  {

  "A Module with an explicit reset in compatibility mode" should "elaborate" in {
    import Chisel._
    val myReset = true.B
    class ModuleExplicitReset(reset: Bool) extends Module(_reset = reset) {
      val io = new Bundle {
        val done = Bool(OUTPUT)
      }

      io.done := false.B
    }

    ChiselStage.elaborate {
      new ModuleExplicitReset(myReset)
    }
  }
}