In reply to blipton:
When declaring packed array dimensions, the range(size) comes before(left) the variable name and the unpacked dimension range comes after(right) of the variable name. When making a reference to the array, all the selected dimensions are on the right of the variable name.
When you declare adcData as
logic [ 31 : 0 ] adcData [3] [16]; // 3 ADCs, each with 16 Channels and 32 bits wide
You need to know the ordering to select the proper index.
adcData[0][2] is selecting the 32-bit packed data for the 1
st ADC and the 3
rd channel. And
adcData[0] would be selecting an array of 16 channels of the 1
st ADC.
However if you declared it as
logic [ 31 : 0 ] adcData [16] [3]; // 16 Channels, each with 3 ADCs and 32 bits wide
adcData[0][2] is now selecting the 32-bit packed data for the 1
st channel and the 3
rd ADC. And
adcData[0] would be selecting an array of 3 ADCs of the 1
st channel.
For your simple statements where you are always selecting a single packed array of 32-bits, the order that you declare the dimensions does not matter. It start to become more significant when you take slices of the array or need to stream the array reformatting the layout (i.e. an array of 192 bytes).