chisel3.choice.ModuleChoice
Attributes
- Source
-
ModuleChoice.scala
- Graph
-
- Supertypes
-
class Object
trait Matchable
class Any
- Self type
-
Members list
A wrapper method for Module instantiation based on option choices. (necessary to help Chisel track internal state).
A wrapper method for Module instantiation based on option choices. (necessary to help Chisel track internal state).
Value parameters
- choices
-
the mapping from cases to module generators
- default
-
the Module to instantiate if no module is specified
Attributes
- Returns
-
the input module m with Chisel metadata properly set
- Throws
-
java.lang.IllegalArgumentException
if the cases do not belong to the same option.
- See also
-
chisel3.choice.Group on how to declare the options for the alternatives. Example:
val module = ModuleChoice(new DefaultModule)(Seq(
Platform.FPGA -> new FPGATarget,
Platform.ASIC -> new ASICTarget
))
- Inherited from:
-
ModuleChoiceObjIntf (hidden)
- Source
-
ModuleChoiceIntf.scala