Closed tsuhuai closed 2 years ago
It is defined in the same file as `define UPPER (((i+1)*8)-1)
It is used inside of a loop like: for (i = 0; i <= MAX_REG; i = i + 1) begin : auto_regs
So, this is walking the vector of regs. For example, when i=0, it is (((0+1)8)-1) which is 8-1 which is 7. So, this becomes [7-:8] which is same as [7:0]. wo_regs is defined as: output [(8MAX_REG)+7:0] wo_regs, // regs written by Master - raw So, this is valid for the whole loop. If you are connecting output and input that matches your MAX_REG def, you should not have any problem.
Thanks. There is no problem when I try it at home, however it did fail in the office. I will compare the environment between these two.
[`UPPER - : 8 ] The above words appear many times while wreg and _woregs are assigned. (line 217, 219, 223, 224, 228, 231, 232, 235)
I use 'auton_wrap_full' as my top module. The i3c_autotonomous_reg.v did not pass the ncverilog simulator. Did I miss anything?