If I have an array with <dimIndex>2, 1, 0</dimIndex><name>REG%s</name>, reg(0) will return the element with REG2, but reg0() will correctly grab REG0. I find this behaviour rather unexpected. As a HAL author I have two options to grab the correct REG based on it's index:
- I can either avoid using 
reg(n) and write a big match that maps n to regn 
- Or I can write a big match that maps 
n to the numeric index and pass it to reg(n)