Patent ID: 8555026

Claim:
A method of storing variable width stack elements in a single, two-dimensional, last-in, first-out memory stack having a number of multi-bit rows of uniform row width, wherein (i) height of the two-dimensional memory stack is the number of rows, each different row along the height of the memory stack having a different address value, and (ii) width of the two-dimensional memory stack is the uniform row width, comprising: splitting a first variable width stack element into two or more sub-elements, (i) the first variable width stack element having a width greater than the uniform row width of the two-dimensional memory stack and (ii) each sub-element having a width less than or equal to the uniform row width of the single memory stack upon receiving a write request; creating a first memory pointer for providing an address of a first read pointer in the single memory stack, the first read pointer providing an address corresponding to a first sub-element of the first variable width stack element; writing the first sub-element in a first available row in the single memory stack; incrementing a write pointer of the single memory stack when the first sub-element is written to the first available row on the single memory stack; and repeating the steps of writing and incrementing for a next sub-element in the two or more sub-elements until each of the two or more sub-elements is stored in a different row along the height of the single memory stack.