Skip to content

Commit

Permalink
Fixes for the problem where two TargetDirAnnotation
Browse files Browse the repository at this point in the history
cause Driver.execute to fail.
This eliminates an, I believe, unnecessary call to getAnnotations which is causing the duplication.
getAnnotations is used internally by Driver.execute and it is where the TargetDirAnnotation is added.
  • Loading branch information
chick authored and powerjg committed Feb 14, 2020
1 parent 5871d7b commit 9419f42
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 0 additions & 2 deletions src/main/scala/simulate.scala
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ object simulate {

def build(optionsManager: SimulatorOptionsManager, conf: CPUConfig): String = {
optionsManager.firrtlOptions = optionsManager.firrtlOptions.copy(compilerName = "low")
val annos = firrtl.Driver.getAnnotations(optionsManager)
optionsManager.firrtlOptions = optionsManager.firrtlOptions.copy(annotations = annos.toList)

chisel3.Driver.execute(optionsManager, () => new Top(conf)) match {
case ChiselExecutionSuccess(Some(_), _, Some(firrtlExecutionResult)) =>
Expand Down
4 changes: 1 addition & 3 deletions src/main/scala/testing/CPUTesterDriver.scala
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ class CPUTesterDriver(cpuType: String,
val optionsManager = new SimulatorOptionsManager()

if (optionsManager.targetDirName == ".") {
// TODO: Revert this either by waiting for the chisel guys to fix the CWD bug, or moving the testing system over to
// FIRRTLMain instead of Driver
//optionsManager.setTargetDirName(s"test_run_dir/$cpuType/$binary$extraName")
optionsManager.setTargetDirName(s"test_run_dir/$cpuType/$binary$extraName")
}

val hexName = s"${optionsManager.targetDirName}/${binary}.hex"
Expand Down

0 comments on commit 9419f42

Please sign in to comment.