Consider this example
for(x <- 0 until numberOfHWBlocks){
val hw_block = Module(new HW_BLOCK(x)(p :Parameters)).io
}
Each time this creates a new module according to whatever x is. What I want is that I do not want to declare val hw_block each time as a separate entity inside the for loop as this value overrides the previous value. I want a seq of these modules stored in a single val. Something like this
for( x <- 0 until numberOfHWBlocks){
hw_block(x) = Module(new HW_BLOCK(x)(p :Parameters)).io
}
where hw_block is defined as a Seq outside the for loop
val hw_block = Seq.fill(numberOfHWBlocks){//What do I have to instantiate here??//}