Fix CI tests

This commit is contained in:
Colin Schmidt
2020-02-19 17:23:10 -08:00
parent 7de4c478c3
commit db0efd38fc
10 changed files with 197 additions and 192 deletions

View File

@@ -34,11 +34,12 @@ object ResetN extends Pass {
mod.copy(ports = portsx, body = bodyx)
}
def run(c: Circuit): Circuit =
def run(c: Circuit): Circuit = {
c.copy(modules = c.modules map {
case mod: Module if mod.name == c.main => invertReset(mod)
case other => other
})
}
}
class ResetInverterTransform extends Transform {

View File

@@ -22,7 +22,7 @@ class ResetNSpec extends FreeSpec with Matchers {
"Inverting reset needs to be done throughout module" in {
val optionsManager = new ExecutionOptionsManager("dsptools") with HasChiselExecutionOptions with HasFirrtlOptions {
firrtlOptions = firrtlOptions.copy(compilerName = "low")
firrtlOptions = firrtlOptions.copy(compilerName = "low", customTransforms = List(new ResetInverterTransform)),
}
chisel3.Driver.execute(optionsManager, () => new ExampleModuleNeedsResetInverted) match {
case ChiselExecutionSuccess(_, chirrtl, Some(FirrtlExecutionSuccess(_, firrtl))) =>

View File

@@ -27,10 +27,10 @@ class RetimeSpec extends FlatSpec with Matchers {
val dir = uniqueDirName(gen, "RetimeModule")
chisel3.Driver.execute(Array("-td", s"test_run_dir/$dir", "-foaf", s"test_run_dir/$dir/final"), gen) shouldBe a [ChiselExecutionSuccess]
val lines = io.Source.fromFile(s"test_run_dir/$dir/final.anno.json").getLines().map(normalized).mkString("\n")
val lines = io.Source.fromFile(s"test_run_dir/$dir/test_run_dir/$dir/final.anno.json").getLines().map(normalized).mkString("\n")
lines should include("barstools.tapeout.transforms.retime.RetimeTransform")
}
// TODO(azidar): need to fix/add instance annotations
ignore should "pass simple retime instance annotation" in {
val gen = () => new RetimeInstance()