A method for generating a sequence of memory addresses for a
multi-dimensional data structure and an address generation unit are
disclosed. The address generation unit includes an ADDRESS register, a
STRIDE register, and a plurality skip generators, each having SKIP, SPAN
and COUNT registers. An address value is initialized to a first address
and each COUNT register is initialized. For each address of the sequence
an address value is output and a stride value is added to the address
value. For each dimension of the data structure the COUNT register
associated with the dimension is updated as each address is generated.
For all dimensions, when the COUNT register value becomes zero, the skip
value associated with the dimension is added to the address value and its
COUNT register is reset to a specified value.