我试图为下面的程序生成verilog,但它抛出了AssertionError。对应的verilog unroll "io.opcode := io.a + io.b" 语句是5次吗?如果有人能说出 for 循环是如何工作的,那将非常有帮助。
val io = new Bundle {
val a = UInt(INPUT, 2)
val b = UInt(INPUT, 2)
val opcode = UInt(INPUT, 2)
val output = UInt(OUTPUT, 2)
}
for(j <- 0 to 4){
io.opcode := io.a + io.b
}
io.output := io.opcode