val reg=RegInit(VecInit(Seq.fill(4)(0.U(32.W))))
both chisel type and scala type can be array index(?)
https://github.com/freechipsproject/chisel3/wiki/Frequently-Asked-Questions
val my_args = Seq(1,2,3,4)
val exe_units = for (i <- 0 until num_units) yield {
val exe_unit = Module(new AluExeUnit(args = my_args(i)))
// any wiring or other logic can go here
exe_unit
}
https://github.com/freechipsproject/chisel3/wiki/Cookbook#how-do-i-create-a-reg-of-type-vec