Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup deprecated loadAnnotations call. #197

Merged
merged 1 commit into from
Apr 24, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions src/main/scala/chisel3/iotesters/VerilatorBackend.scala
Original file line number Diff line number Diff line change
Expand Up @@ -209,14 +209,13 @@ private[iotesters] object setupVerilatorBackend {
val dut = getTopModule(circuit).asInstanceOf[T]

// This makes sure annotations for command line options get created
firrtl.Driver.loadAnnotations(optionsManager)
val externalAnnotations = firrtl.Driver.getAnnotations(optionsManager)

/*
The following block adds an annotation that tells the black box helper where the
current build directory is, so that it can copy verilog resource files into the right place
*/
val annotations = optionsManager.firrtlOptions.annotations ++
List(BlackBoxTargetDirAnno(optionsManager.targetDirName))
val annotations = externalAnnotations ++ List(BlackBoxTargetDirAnno(optionsManager.targetDirName))

val transforms = optionsManager.firrtlOptions.customTransforms

Expand Down Expand Up @@ -308,7 +307,7 @@ private[iotesters] class VerilatorBackend(dut: MultiIOModule,
case f: FixedPoint => signConvert(bigIntU, f.getWidth)
case _ => bigIntU
}
if (verbose) logger info s" PEEK ${path} -> ${bigIntToStr(result, base)}"
if (verbose) logger info s" PEEK $path -> ${bigIntToStr(result, base)}"
result
}

Expand All @@ -319,7 +318,7 @@ private[iotesters] class VerilatorBackend(dut: MultiIOModule,
val got = peek(signal, None)
val good = got == expected
if (verbose) logger info (
s"""${msg} EXPECT ${path} -> ${bigIntToStr(got, base)} == """ +
s"""${msg} EXPECT $path -> ${bigIntToStr(got, base)} == """ +
s"""${bigIntToStr(expected, base)} ${if (good) "PASS" else "FAIL"}""")
good
}
Expand All @@ -331,7 +330,7 @@ private[iotesters] class VerilatorBackend(dut: MultiIOModule,

def poke(path: String, value: BigInt)
(implicit logger: TestErrorLog, verbose: Boolean, base: Int) {
if (verbose) logger info s" POKE ${path} <- ${bigIntToStr(value, base)}"
if (verbose) logger info s" POKE $path <- ${bigIntToStr(value, base)}"
simApiInterface.poke(path, value)
}

Expand All @@ -343,7 +342,7 @@ private[iotesters] class VerilatorBackend(dut: MultiIOModule,
def peek(path: String)
(implicit logger: TestErrorLog, verbose: Boolean, base: Int): BigInt = {
val result = simApiInterface.peek(path) getOrElse BigInt(rnd.nextInt)
if (verbose) logger info s" PEEK ${path} -> ${bigIntToStr(result, base)}"
if (verbose) logger info s" PEEK $path -> ${bigIntToStr(result, base)}"
result
}

Expand All @@ -352,7 +351,7 @@ private[iotesters] class VerilatorBackend(dut: MultiIOModule,
val got = simApiInterface.peek(path) getOrElse BigInt(rnd.nextInt)
val good = got == expected
if (verbose) logger info (
s"""${msg} EXPECT ${path} got ${bigIntToStr(got, base)} expected""" +
s"""${msg} EXPECT $path got ${bigIntToStr(got, base)} expected""" +
s"""${bigIntToStr(expected, base)} ${if (good) "PASS" else "FAIL"}""")
good
}
Expand Down