Skip to content

Commit

Permalink
Properly invalidate submodule IOs in tests (#745)
Browse files Browse the repository at this point in the history
  • Loading branch information
jackkoenig authored Dec 20, 2017
1 parent d95cb26 commit 0f5ba51
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/test/scala/chiselTests/ConnectSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class PipeInternalWires extends Module {

class CrossConnectTester(inType: Data, outType: Data) extends BasicTester {
val dut = Module(new CrossConnects(inType, outType))
dut.io := DontCare
stop()
}

Expand Down
1 change: 1 addition & 0 deletions src/test/scala/chiselTests/RecordSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ trait RecordSpecUtils {

class RecordQueueTester extends BasicTester {
val queue = Module(new Queue(fooBarType, 4))
queue.io <> DontCare
queue.io.enq.valid := false.B
val (cycle, done) = Counter(true.B, 4)

Expand Down
3 changes: 2 additions & 1 deletion src/test/scala/chiselTests/VectorPacketIO.scala
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ class BrokenVectorPacketModule extends Module {
}

class VectorPacketIOUnitTester extends BasicTester {
val device_under_test = Module(new BrokenVectorPacketModule)
val dut = Module(new BrokenVectorPacketModule)
dut.io <> DontCare

// This counter just makes the test end quicker
val c = Counter(1)
Expand Down

0 comments on commit 0f5ba51

Please sign in to comment.