I would like to find out how it is possible to initialize a Module
, depending on a value. So I have a config.extend
value which will decide if the core
will instantiate of the Core
or ExtendedCore
module.
However I am getting the error "value := is not a member of Sodor.core".
val extend = 1
val core = Module(new Core(data_address))
if(extend==1){
core := Module(new ExtendedCore(data_address))
}
What is the proper way to intialize a Module depending on the statement, like in this case? Thanks.