firrtl_interpreter
For each instantiation of an ExtModule the interpreter needs a separate instance of a BlackBoxImplementation. This factory provides it.
class ExampleBBFactory extends BlackBoxFactory { override def createInstatnce(instanceName: String, blackBoxName: String): Option[BlackBoxImplementation] = { instanceName match { case "bb1" => Some(add(new BB1Impl)) case "bb2" => Some(add(new BB2Impl)) case "bb3" => Some(add(new BB3Impl)) case _ => throw Exeception(s"ExampleBBBFactory does not know how to create $instanceName}") } } }
the factory remembers the implementations it created so the interpreter uses this method to call the cycle methods of each one
For each instantiation of an ExtModule the interpreter needs a separate instance of a BlackBoxImplementation. This factory provides it.