An apparatus and method for an improved stack comprises an advantageous indexing scheme and stack arrangement allowing more efficient performance of stack operations. The most-recently-used stack item appears at the top of the stack and the least-recently-used item is at the bottom of the stack. Values in between the top and bottom items are ordered from top to bottom with succeedingly less recently used items. An indexing scheme is used to indirectly reference locations of the stack items in the stack. A set of registers is used to reference the locations of the stack items in an embedded memory array. The registers function as pointers to the memory array locations. To promote an item to the top of the stack, the item is identified as the most-recently-used and the contents of the other registers are changed to specify the new locations, e.g. these pointers are shifted down one. Similarly, to insert a new item on to the top of the stack, the pointers are shifted and a new item is written into the memory array location that contains the least-recently-used item.
|
0. 57. A method of operating a memory apparatus, the method comprising:
storing data in a data memory including a plurality of individually addressable cells;
storing pointers in a pointer memory including a plurality of clocked registers, each pointer stored in one of the clocked registers and pointing at one of the cells; and
changing an order in which data values are retrieved from the cells by reordering the pointers in at least some of the clocked registers without shifting the data values in all of the cells, wherein the pointers are reordered in a single clock cycle.
0. 44. A memory apparatus, comprising:
a data memory including a plurality of individually addressable cells;
a pointer memory including a plurality of clocked registers, each clocked register configured to store a pointer to one of the cells, in one-to-one correspondence with the cells; and
a control module, coupled to the pointer memory and the data memory, and configured to change the order in which data values are retrieved from the cells by reordering the pointers in at least some of the clocked registers without shifting the data values in all of the cells, wherein the pointers are reordered in a single clock cycle.
0. 69. A memory apparatus, comprising:
a data memory including a plurality of individually addressable cells;
a pointer memory including a plurality of clocked registers, each clocked register configured to store a pointer to one of the cells, in one-to-one correspondence with the cells; and
a control module, coupled to the pointer memory and the data memory, and configured to:
change the order in which data values are retrieved from the cells by reordering the pointers in at least some of the clocked registers; and
insert a data value into the data memory by storing the data value in one of the cells and by reordering the pointers in at least some of the clocked registers;
wherein the pointers are reordered without shifting the data values in all of the cells, and wherein the pointers are reordered in a single clock cycle.
39. A method for manipulating data in a stack, said stack including stack data having one or more stack data values, said stack further including a stack pointer list having a set of references, the set of references including one or more stack pointers, each stack pointer uniquely specifying a stack data value in the stack data that includes a set of one or more clocked registers, each clocked register specifying a stack pointer that uniquely references a stack data value in the stack data module, the one or more stack pointers including an a most recently used (mru) stack pointer specifying the most-recently-used stack data value in the stack data and an a least recently used (LRU) stack pointer specifying the least-recently-used stack data value in the stack data, the stack pointers in said set of references being such that stack data values are specified from a most-recently-used data value down to a least-recently-used data value, said method comprising the steps of:
searching for an item in the stack data;
if the item is found in the stack data, then promoting the item such that the item is identified as being the most-recently-used; and
if the item is not found in the stack data, then inserting the item into the stack such that the item is identified as being the most-recently-used.
17. A method for manipulating data in a stack, said stack including stack data having one or more stack data values, said stack further including a stack pointer list having a set of references, the set of references including one or more stack pointers, each stack pointer stored in a clocked register and uniquely specifying a stack data value in the stack data, the one or more stack pointers including an a most recently used (mru) stack pointer specifying the most-recently-used stack data value in the stack data and an a least recently used (LRU) stack pointer specifying the least-recently-used stack data value in the stack data, the stack pointers in said set of references such that stack data values are specified from a most-recently-used data value down to a least-recently-used data value, said method comprising the steps of:
searching for an item in the stack data;
if the item is found in the stack data, then promoting the item such that the item is identified as being the most-recently-used, the promoting of the item occurring during a single clock cycle; and
if the item is not found in the stack data, then inserting the item into the stack such that the item is identified as being the most-recently-used.
19. A method for manipulating data in a stack, said stack including stack data having one or more stack data values, said stack further including a stack pointer list having a set of references, the set of references including one or more stack pointers, each stack pointer stored in a clocked register and uniquely specifying a stack data value in the stack data, the one or more stack pointers including an a most recently used (mru) stack pointer specifying the most-recently-used stack data value in the stack data and an a least recently used (LRU) stack pointer specifying the least-recently-used stack data value in the stack data, the stack pointers in said set of references such that stack data values are specified from a most-recently-used data value down to a least-recently-used data value, said method comprising the steps of:
searching for an item in the stack data;
if the item is found in the stack data, then promoting the item such that the item is identified as being the most-recently-used; and
if the item is not found in the stack data, then inserting the item into the stack such that the item is identified as being the most-recently-used, the inserting of the item occurring during two or less clock cycles.
38. A computer readable medium having stored thereon instructions for causing a computer to implement the following steps:
searching for an item in a stack, the stack including stack data having one or more stack data values, the stack further including a stack pointer list having a set of references, the set of references including one or more stack pointers, each stack pointer uniquely specifying a stack data value in the stack data that includes a set of one or more clocked registers, each clocked register specifying a stack pointer that uniquely references a stack data value in the stack data module, the one or more stack pointers including an a most recently used (mru) slack pointer specifying the most-recently-used stack data value in the stack data and an a least recently used (LRU) stack pointer specifying the least-recently-used stack data value in the stack data, the stack pointers in the set of references such that stack data values are specified from a most-recently-used data value down to a least-recently-used data value;
if the item is found in the stack data, then promoting the item such that the item is identified as being the most-recently-used, pointer manipulation associated with the promoting of the item occurring during a single clock cycle; and
if the item is not found in the stack data, then inserting the item into the stack such that the item is identified as being the most-recently-used.
15. A method for manipulating data in a stack, said stack including stack data having one or more stack data values, said stack further including a stack pointer list having a set of references, the set of references including one or more stack pointers, each stack pointer stored in a clocked register and uniquely specifying a stack data value in the stack data, the one or more stack pointers including an a most recently used (mru) stack pointer specifying the most-recently-used stack data value in the stack data and an a least recently used (LRU) stack pointer specifying the least-recently-used stack data value in the stack data, the stack pointers in said set of references such that stack data values are specified from a most-recently-used data value down to a least-recently-used data value, said method comprising the steps of:
searching for an item in the stack data;
if the item is found in the stack data, then promoting the item such that the item is identified as being the most-recently-used, the promoting of the item occurring during a single clock cycle; and
if the item is not found in the stack data, then inserting the item into the stack such that the item is identified as being the most-recently-used, the inserting of the item occurring during a single clock cycle.
35. A computer readable medium having stored thereon instructions for causing a computer to implement the following steps:
searching for an item in a stack, the stack including stack data having one or more stack data values, the stack further including a stack pointer list having a set of references, the set of references including one or more stack pointers, each stack pointer uniquely specifying a stack data value in the stack data that includes a set of one or more clocked registers, each clocked register specifying a stack pointer that uniquely references a stack data value in the stack data module, the one or more stack pointers including an a most recently used (mru) stack pointer specifying the most-recently-used stack data value in the stack data and an a least recently used (LRU) stack pointer specifying the least-recently-used stack data value in the stack data, the stack pointers in the set of references such that stack data values are specified from a most-recently-used data value down to a least-recently-used data value;
if the item is found in the stack data, then promoting the item such that the item is identified as being the most-recently-used, the promoting of the item occurring during a single clock cycle; and
if the item is not found in the stack data, then inserting the item into the stack such that the item is identified as being the most-recently-used, the inserting of the item occurring during a single clock cycle.
37. A computer readable medium having stored thereon instructions for causing a computer to implement the following steps:
searching for an item in a stack, the stack including stack data having one or more stack data values, the stack further including a stack pointer list having a set of references, the set of references including one or more stack pointers, each stack pointer uniquely specifying a stack data value in the stack data that includes a sets of one or more clocked registers, each clocked register specifying a stack pointer that uniquely references a stack data value in the stack data module, the one or more stack pointers including an a most recently used (mru) stack pointer specifying the most-recently-used stack data value in the stack data and an a least recently used (LRU) stack pointer specifying the least-recently-used stack data value in the stack data, the stack pointers in the set of references such that stack data values are specified from a most-recently-used data value down to a least-recently-used data value;
if the item is found in the stack data, then promoting the item such that the item is identified as being the most-recently-used, pointer manipulation associated with the promoting of the item occurring during a single clock cycle; and
if the item is not found in the stack data, then inserting the item into the stack such that the item is identified as being the most-recently-used, pointer manipulation associated with the inserting of the item occurring during a single clock cycle.
6. A method for manipulating data in a stack, said stack including a stack data module for storing one or more stack data values, said stack further including a stack pointer module, said stack pointer module being coupled to said stack data module to provide as input a reference to one or more stack data values, said method comprising the steps of:
searching for an item in the stack data module using the stack pointer module, the stack pointer module including a set of data multiplexers, including one or more multiplexers, a set of registers, including one or more registers wherein an a most recently used (mru) register specifies, either directly or indirectly, a location of a most-recently-used stack data value and an a least recently used (LRU) register specifies, either directly or indirectly, a location of a least-recently-used stack data value, and an address multiplexer, said data multiplexers and registers configured such that for each register in the set of registers, there is a corresponding multiplexer in the set of data multiplexers, said corresponding multiplexer arranged and coupled to its corresponding register to receive one or more inputs and provide an output to the corresponding register, the registers in said set of registers arranged and interconnected by the multiplexers such that data values arespecified from a most-recently-used data value down to a least-recently-used data value;
if the item is found in the stack data, then promoting the item such that the item is identified as being the most-recently-used; and
if the item is not found in the stack data, then inserting the item into the stack such that the item is identified as being the most-recently-used.
23. A method for manipulating data in a stack, said stack including a stack data module for storing one or more stack data values, said stack further including a stack pointer module, said stack pointer module being coupled to said stack data module to provide as input a reference to one or more stack data values, said method comprising the steps of:
searching for an item in the stack data module using the stack pointer module, the stack pointer module including a set of data multiplexers, including one or more multiplexers, a set of registers, including one or more registers wherein an a most recently used (mru) register specifies, either directly or indirectly, a location of a most-recently-used stack data value and an a least recently used (LRU) register specifies, either directly or indirectly, a location of a least-recently-used stack data value, and an address multiplexer, said data multiplexers and registers configured such that for each register in the set of registers, there is a corresponding multiplexer in the set of data multiplexers, said corresponding multiplexer arranged and coupled to its corresponding register to receive one or more inputs and provide an output to the corresponding register, the registers in said set of registers arranged and interconnected by the multiplexers such that data values are specified from a most-recently-used data value down to a least-recently-used data;
if the item is found in the stack data, then promoting the item such that the item is identified as being the most-recently-used, pointer manipulation associated with the promoting of the item occurring during a single clock cycle; and
if the item is not found in the stack data, then inserting the item into the stack such that the item is identified as being the most-recently-used.
25. A method for manipulating data in a stack, said stack including a stack data module for storing one or more stack data values, said stack further including a stack pointer module, said stack pointer module being coupled to said stack data module to provide as input a reference to one or more stack data values, said method comprising the steps of:
searching for an item in the stack data module using the stack pointer module, the stack pointer module including a set of data multiplexers, including one or more multiplexers, a set of registers, including one or more registers wherein an a most recently used (mru) register specifies, either directly or indirectly, a location of a most-recently-used stack data value and an a least recently used (LRU) register specifies, either directly or indirectly, a location of a least-recently-used stack data value, and an address multiplexer, said data multiplexers and registers configured such that for each register in the set of registers, there is a corresponding multiplexer in the set of data multiplexers, said corresponding multiplexer arranged and coupled to its corresponding register to receive one or more inputs and provide an output to the corresponding register, the registers in said set of registers arranged and interconnected by the multiplexers such that data values are specified from a most-recently-used data value down to a least-recently-used data;
if the item is found in the stack data, then promoting the item such that the item is identified as being the most-recently-used; and
if the item is not found in the stack data, then inserting the item into the stack such that the item is identified as being the most-recently-used, the pointer manipulation associated with the inserting of the item occurring during a single clock cycle.
8. A method for manipulating data in a stack, said stack including a stack data module for storing one or more stack data values, said stack further including a stack pointer module, said stack pointer module being coupled to said stack data module to provide as input a reference to one or more stack data values, said method comprising the steps of:
searching for an item in the stack data module using the stack pointer module, the stack pointer module including a set of data multiplexers, including one or more multiplexers, a set of registers, including one or more registers wherein an a most recently used (mru) register specifics, either directly or indirectly, a location of a most-recently-used stack data value and an a least recently used (LRU) register specifies, either directly or indirectly, a location of a least-recently-used stack data value, and an address multiplexer, said data multiplexers and registers configured such that for each register in the set of registers, there is a corresponding multiplexer in the set of data multiplexers, said corresponding multiplexer arranged and coupled to its corresponding register to receive one or more inputs and provide an output to the corresponding register, the registers in said set of registers arranged and interconnected by the multiplexers such that data values are specified from a most-recently-used data value down to a least-recently-used data value and such that a data value can be inserted into the stack or promoted to the top of the stack within two or less clock cycles;
if the item is found in the stack data, then promoting the item such that the item is identified as being the most-recently-used; and
if the item is not found in the stack data, then inserting the item into the stack such that the item is identified as being the most-recently-used.
7. A method for manipulating data in a stack, said stack including a stack data module for storing one or more stack data values, said stack further including a stack pointer module, said stack pointer module being coupled to said stack data module to provide as input a reference to one or more stack data values, said method comprising the steps of:
searching for an item in the stack data module using the stack pointer module said stack pointer module including a set of data multiplexers, including one or more multiplexers, a set of registers, including one or more registers wherein an a most recently used (mru) register specifies, either directly or indirectly, a location of a most-recently-used stack data value and an a least recently used (LRU) register specifies, either directly or indirectly, a location of a least-recently-used stack data value, and an address multiplexer, said data multiplexers and registers configured such that for each register in the set of registers, there is a corresponding multiplexer in the set of data multiplexers, said corresponding multiplexer arranged and coupled to its corresponding register to receive one or more inputs and provide an output to the corresponding register, said multiplexers further arranged such that the multiplexer corresponding to said mru register receives as input an initialization value and an input from each register in the set of registers, including itself, and the other multiplexers in said set of data multiplexers receive as input an initialization value, data from the preceding register and data from itself;
if the item is found in the stack data, then promoting the item such that the item is identified as being the most-recently-used; and
if the item is not found in the stack data, then inserting the item into the stack such that the item is identified as being the most-recently-used.
41. An apparatus for an a most recently used (mru) stack, said apparatus comprising:
means for receiving a command;
means for receiving a data value;
a stack data module for storing one or more stack data values, said stack data module being coupled to said data value receiving means for receiving a data value as input;
a stack pointer module for referencing stack data values stored in said stack data module, said stack pointer module being coupled to said stack data module to provide as input a reference to one or more stack data values, said stack pointer module including a stack pointer list having a set of references, the set of references including one or more stack pointers, each stack pointer uniquely specifying a stack data value in the stack data that includes a set of one or more clocked registers, each clocked register specifying a stack pointer that uniquely references a stack data value in the stack data module, the one or more stack pointers including an mru stack pointer specifying the most-recently-used stack data value in the stack data and an a least recently used (LRU) stack pointer specifying the least-recently-used stack data value in the stack data, the stack pointers in said set of references being listed such that stack data values are specified from a most-recently-used data value down to a least-recently-used data value; and
a stack control module for the mru stack, said stack control module being coupled to said command receiving means for receiving a command as input and further being arranged to transmit an output to a stack search requesting unit, said stack control module further being coupled to said stack pointer module to provide operational control of the stack pointer module functions, said stack control module further being coupled to said stack data module to provide control of the accessing of data to and from the stack data module and to receive as input a stack data value, said stack control module further being coupled to said data value receiving means for receiving a data value as input.
21. A method for manipulating data in a stack, said stack including a stack data module for storing one or more stack data values, said stack further including a stack pointer module, said stack pointer module being coupled to said stack data module to provide as input a reference to one or more stack data values, said method comprising the steps of:
searching for an item in the stack data module using the stack pointer module, the stack pointer module including a set of data multiplexers, including one or more multiplexers, a set of registers, including one or more registers wherein an a most recently used (mru) register specifies, either directly or indirectly, a location of a most-recently-used stack data value and an a least recently used (LRU) register specifies, either directly or indirectly, a location of a least-recently-used stack data value, and an address multiplexer, said data multiplexers and registers configured such that for each register in the set of registers, there is a corresponding multiplexer in the set of data multiplexers, said corresponding multiplexer arranged and coupled to its corresponding register to receive one or more inputs and provide an output to the corresponding register, the registers in said set of registers arranged and interconnected by the multiplexers such that data values are specified from a most-recently-used data value down to a least-recently-used data;
if the item is found in the stack data, then promoting the item such that the item is identified as being the most-recently-used, the pointer manipulation associated with the promoting of the item occurring during a single clock cycle; and
if the item is not found in the stack data, then inserting the item into the stack such that the item is identified as being the most-recently-used, the pointer manipulation associated with the inserting of the item occurring during a single clock cycle.
32. An apparatus for an a most recently used (mru) stack, said apparatus comprising:
means for receiving a command;
means for receiving a data value;
a stack data module for storing one or more stack data values, said stack data module being coupled to said data value receiving means for receiving a data value as input;
a stack pointer module for referencing stack data values stored in said stack data module, said stack pointer module being coupled to said stack data module to provide as input a reference to one or more stack data values, said stack pointer module including a stack pointer list having a set of references, the set of references including one or more stack pointers, each stack pointer uniquely specifying a stack data value in the stack data that includes a set of one or more clocked registers, each clocked register specifying a stack pointer that uniquely references a stack data value in the stack data module, the one or more stack pointers including an mru stack pointer specifying the most-recently-used stack data value in the stack data and an a least recently used (LRU) stack pointer specifying the least-recently-used stack data value in the stack data, the stack pointers in said set of references such that stack data values are specified from a most-recently-used data value down to a least-recently-used data value, said stack pointer module and said stack data module interconnected to allow a data value to be inserted into the stack in a single clock cycle; and
a stack control module for the mru stack, said stack control module being coupled to said command receiving means for receiving a command as input and further being arranged to transmit an output to a stack search requesting unit, said stack control module further being coupled to said stack pointer module to provide operational control of the stack pointer module functions, said stack control module further being coupled to said stack data module to provide control of the accessing of data to and from the stack data module and to receive as input a stack data value, said stack control module further being coupled to said data value receiving means for receiving a data value as input.
29. An apparatus for an a most recently used (mru) stack, said apparatus comprising:
means for receiving a command;
means for receiving a data value;
a stack data module for storing one or more stack data values, said stack data module being coupled to said data value receiving means for receiving a data value as input;
a stack pointer module for referencing stack data values stored in said stack data module, said stack pointer module being coupled to said stack data module to provide as input a reference to one or more stack data values, said stack pointer module including a stack pointer list having a set of references, the set of references including one or more stack pointers, each stack pointer uniquely specifying a stack data value in the stack data that includes a set of one or more clocked registers, each clocked register specifying a stack pointer that uniquely references a stack data value in the stack data module, the one or more stack pointers including an mru stack pointer specifying the most-recently-used stack data value in the stack data and an a least recently used (LRU) stack pointer specifying the least-recently-used stack data value in the stack data, the stack pointers in said set of references such that stack data values are specified from a most-recently-used data value down to a least-recently-used data value, said stack pointer module and said stack data module interconnected to allow pointer manipulation associated with the promotion of an item to the top of the stack to occur during a single clock; and
a stack control module for the mru stack, said stack control module being coupled to said command receiving means for receiving a command as input and further being arranged to transmit an output to a stack search requesting unit, said stack control module further being coupled to said stack pointer module to provide operational control of the stack pointer module functions, said stack control module further being coupled to said stack data module to provide control of the accessing of data to and from the stack data module and to receive as input a stack data value, said stack control module further being coupled to said data value receiving means for receiving a data value as input.
26. An apparatus for an a most recently used (mru) stack, said apparatus comprising:
means for receiving a command;
means for receiving a data value;
a stack data module for storing one or more stack data values, said stack data module being coupled to said data value receiving means for receiving a data value as input;
a stack pointer module for referencing stack data values stored in said stack data module, said stack pointer module being coupled to said stack data module to provide as input a reference to one or more stack data values, said stack pointer module including a stack pointer list having a set of references, the set of references including one or more stack pointers, each stack pointer uniquely specifying a stack data value in the stack data that includes a set of one or more clocked registers, each clocked register specifying a stack pointer that uniquely references a stack data value in the stack data module, the one or more stack pointers including an mru stack pointer specifying the most-recently-used stack data value in the stack data and an a least recently used (LRU) stack pointer specifying the least-recently-used stack data value in the stack data, the stack pointers in said set of references such that stack data values are specified from a most-recently-used data value down to a least-recently-used data value, said stack pointer module and said stack data module interconnected to allow pointer manipulation associated with the promotion of an item to the top of the stack to occur during a single clock cycle and to allow pointer manipulation associated with the insertion of an item into the stack to occur during a single clock cycle; and
a stack control module for the mru stack, said stack control module being coupled to said command receiving means for receiving a command as input and further being arranged to transmit an output to a stack search requesting unit, said stack control module further being coupled to said stack pointer module to provide operational control of the stack pointer module functions, said stack control module further being coupled to said stack data module to provide control of the accessing of data to and from the stack data module and to receive as input a stack data value, said stack control module further being coupled to said data value receiving means for receiving a data value as input.
1. An apparatus for an a most recently used (mru) stack, said apparatus directly or indirectly connected to a stack search requesting unit, stack search requesting unit specifying a command and a data value to said mru stack, said apparatus comprising:
means for receiving a command;
means for receiving a data value;
a stack data module for storing one or more stack data values, said stack data module being coupled to said data value receiving means for receiving a data value as input;
a stack pointer module for referencing stack data values stored in said stack data module, said stack pointer module being coupled to said stack data module to provide as input a reference to one or more stack data values, said stack pointer module including a set of data multiplexers, including one or more multiplexers, a set of registers, including one or more registers wherein an mru register specifies, either directly or indirectly, a location of a most-recently-used stack data value and an a least recently used (LRU) register specifies, either directly or indirectly, a location of a least-recently-used stack data value, and an address multiplexer, said data multiplexers and registers configured such that for each register in the set of registers, there is a corresponding multiplexer in the set of data multiplexers, said corresponding multiplexer arranged and coupled to its corresponding register to receive one or more inputs and provide an output to the corresponding register, the registers in said set of registers arranged and interconnected by the multiplexers such that data values are specified from a most-recently-used data value down to a least-recently-used data value; and
a stack control module for the mru stack, said stack control module being coupled to said command receiving means for receiving a command as input and further being arranged to transmit an output to the stack search requesting unit, said stack control module further being coupled to said stack pointer module to provide operational control of the stack pointer module functions, said stack control module further being coupled to said stack data module to provide control of the accessing of data to and from the stack data module and to receive as input a stack data value, said stack control module further being coupled to said data value receiving means for receiving a data value as input.
3. An apparatus for an a most recently used (mru) stack, said apparatus comprising:
means for specifying a command;
means for specifying a data value;
a stack data module for storing one or more stack data values, said stack data module being coupled to said data value specifying means for receiving a data value as input;
a stack pointer module for referencing stack data values stored in said stack data module, said stack pointer module being coupled to said stack data module to provide as input a reference to one or more stack data values, said stack pointer module including a set of data multiplexers, including one or more multiplexers, a set of registers, including one or more registers wherein an mru register specifies, either directly or indirectly, a location of a most-recently-used stack data value and an a least recently used (LRU) register specifies, either directly or indirectly, a location of a least-recently-used stack data value, and an address multiplexer, said data multiplexers and registers configured such that for each register in the set of registers, there is a corresponding multiplexer in the set of data multiplexers, said corresponding multiplexer arranged and coupled to its corresponding register to receive one or more inputs and provide an output to the corresponding register, said multiplexers further arranged such that the multiplexer corresponding to said mru register receives as input an initialization value and an input from each register in the set of registers, including itself, and the other multiplexers in said set of data multiplexers receive as input an initialization value, data from the preceding register and data from itself; and
a stack control module for the mru stack, said stack control module being coupled to said command specifying means for receiving a command as input and further being arranged to transmit an output to a stack search requesting unit, said stack control module further being coupled to said stack pointer module to provide operational control of the stack pointer module functions, said stack control module further being coupled to said stack data module to provide control of the accessing of data to and from the stack data module and to receive as input a stack data value, said stack control module further being coupled to said data value specifying means for receiving a data value as input.
4. An apparatus for an a most recently used (mru) stack, said apparatus directly or indirectly connected to a stack search requesting unit, stack search requesting unit specifying a command and a data value to said mru stack, said apparatus comprising:
means for receiving a command;
means for receiving a data value;
a stack data module for storing one or more stack data values, said stack data module being coupled to said data value receiving means for receiving a data value as input;
a stack pointer module for referencing stack data values stored in said stack data module, said stack pointer module being coupled to said stack data module to provide as input a reference to one or more stack data values, said stack pointer module including a set of data multiplexers, including one or more multiplexers, a set of registers, including one or more registers wherein an mru register specifies, either directly or indirectly, a location of a most-recently-used stack data value and an a least recently used (LRU) register specifies, either directly or indirectly, a location of a least-recently-used stack data value, and an address multiplexer, said data multiplexers and registers configured such that for each register in the set of registers, there is a corresponding multiplexer in the set of data multiplexers, said corresponding multiplexer arranged and coupled to its corresponding register to receive one or more inputs and provide an output to the corresponding register, the registers in said set of registers arranged and interconnected by the multiplexers such that data values are specified from a most-recently-used data value down to a least-recently-used data value and such that a data value can be inserted into the stack or promoted to the top of the stack within two or less clock cycles; and
a stack control module for the mru stack, said stack control module being coupled to said command receiving means for receiving a command as input and further being arranged to transmit an output to the stack search requesting unit, said stack control module further being coupled to said stack pointer module to provide operational control of the stack pointer module functions, said stack control module further being coupled to said stack data module to provide control of the accessing of data to and from the stack data module and to receive as input a stack data value, said stack control module further being coupled to said data value receiving means for receiving a data value as input.
2. An apparatus as defined in
5. An apparatus as defined in
9. A method as defined in
10. A method as defined in
11. A method as defined in
12. A method as defined in
13. A method as defined in
setting the mru stack pointer to the value of the stack pointer specifying the stack data value matching the item; and
shifting down one the values of the stack pointers in the stack pointer list between the mru stack pointer and stack pointer specifying the stack data value matching the item, noninclusive, wherein said steps of setting the mru stack pointer and shifting are executed simultaneously.
14. A method as defined in
setting the mru stack pointer to the value specified by the LRU stack pointer;
shifting down one the values of the other stack pointers in the stack pointer list; and
setting the stack data value referenced by the mru stack pointer equal to the item, wherein said steps of setting the mru stack pointer and shifting are performed simultaneously.
16. A method as defined in
setting the mru stack pointer to the value of the stack pointer specifying the stack data value matching the item; and
shifting down one the values of the stack pointers in the stack pointer list between the mru stack pointer and stack pointer specifying the stack data value matching the item, noninclusive, wherein said steps of setting the mru stack pointer and shifting are executed simultaneously.
18. A method as defined in
setting the mru stack pointer to the value of the stack pointer specifying the stack data value matching the item; and
shifting down one the values of the stack pointers in the stack pointer list between the mru stack pointer and stack pointer specifying the stack data value matching the item, noninclusive, wherein said steps of setting the mru stack pointer and shifting are executed simultaneously.
20. A method as defined in
setting the mru stack pointer to the value specified by the LRU stack pointer;
shifting down one the values of the other stack pointers in the stack pointer list; and
setting the stack data value referenced by the mru stack pointer equal to the item, wherein said steps of setting the mru stack pointer and shifting are performed simultaneously.
22. A method as defined in
setting the mru stack pointer to the value of the stack pointer specifying the stack data value matching the item; and
shifting down one the values of the stack pointers in the stack pointer list between the mru stack pointer and stack pointer specifying the stack data value matching the item, noninclusive, wherein said steps of setting the mru stack pointer and shifting are executed simultaneously.
24. A method as defined in
setting the mru stack pointer to the value of the stack pointer specifying the stack data value matching the item; and
shifting down one the values of the stack pointers in the stack pointer list between the mru stack pointer and stack pointer specifying the stack data value matching the item, noninclusive, wherein said steps of setting the mru stack pointer and shifting are executed simultaneously.
0. 27. An apparatus as defined in
28. An apparatus as defined in
0. 30. An apparatus as defined in
31. An apparatus as defined in
0. 33. An apparatus as defined in
34. An apparatus as defined in
36. A computer readable medium as defined in
setting the mru stack pointer to the value of the stack pointer specifying the stack data value matching the item; and
shifting down one the values of the stack pointers in the stack pointer list between the mru stack pointer and stack pointer specifying the stack data value matching the item, noninclusive, wherein said steps of setting the mru stack pointer and shifting are executed simultaneously.
40. A method as defined in
setting the mru stack pointer to the value of the stack pointer specifying the stack data value matching the item; and
shifting down one the values of the stack pointers in the stack pointer list between the mru stack pointer and stack pointer specifying the stack data value matching the item, noninclusive, wherein said steps of setting the mru stack pointer and shifting are executed simultaneously.
0. 42. An apparatus as defined in
43. An apparatus as defined in
0. 45. The apparatus of claim 44, further comprising an address multiplexer with a plurality of inputs and one output, wherein the plurality of address multiplexer inputs are coupled to the outputs of the plurality of clocked registers in one-to-one correspondence with the clocked registers, and wherein the address multiplexer output is coupled to an input of the data memory.
0. 46. The apparatus of claim 44, further comprising a plurality of data multiplexers, each data multiplexer having an output coupled to an input of one of the plurality of clocked registers in one-to-one correspondence with the clocked registers.
0. 47. The apparatus of claim 46, wherein each data multiplexer has a plurality of inputs coupled to the outputs of the plurality of clocked registers in one-to-one correspondence with the clocked registers.
0. 48. The apparatus of claim 44, wherein the control module is further configured to insert a data value into the data memory by storing the data value in one of the cells and by reordering the pointers in at least some of the clocked registers without shifting the data values in all of the cells.
0. 49. The apparatus of claim 44, wherein the clocked registers include a most recently used (mru) clocked register for storing a pointer to a cell storing a most recently used (mru) data value.
0. 50. The apparatus of claim 49, wherein the control module is further configured to insert a data value into the data memory by storing the data value in one of the cells and by updating the pointer in the mru clocked register to point to the cell in which the data value was stored.
0. 51. The apparatus of claim 49, wherein the control module is further configured to promote a data value stored in a current cell in the data memory by storing a pointer to the current cell in the mru clocked register and by reordering the pointers in at least some of the clocked registers without shifting the data values in all of the cells.
0. 52. The apparatus of claim 44, wherein the clocked registers include a least recently used (LRU) clocked register for storing a pointer to a cell storing a least recently used (LRU) data value.
0. 53. The apparatus of claim 52, wherein the control module is further configured to insert a data value into the data memory by storing the data value in the cell pointed at by the LRU clocked register and by reordering the pointers in at least some of the clocked registers without shifting the data values in all of the cells.
0. 54. The apparatus of claim 44, wherein a Tn clocked register is storing a pointer to a current cell, and wherein a T0 clocked register is storing a pointer to a cell storing a most recently used (mru) data value, and wherein the control module is further configured to reorder the pointers by shifting the pointers in the T0 clocked register through a Tn-1 clocked register to a T1 clocked register to the Tn clocked register, respectively.
0. 55. The apparatus of claim 54, wherein the control module is further configured to store the pointer to the current cell in the T0 clocked register.
0. 56. The apparatus of claim 44, wherein the control module is further configured to change the order in which data values are retrieved from the cells by reordering the pointers in at least three of the clocked registers without shifting the data values in all of the cells, wherein the pointers are reordered in a single clock cycle.
0. 58. The method of claim 57, further comprising outputting a pointer from one of the clocked registers and inputting the pointer into the data memory.
0. 59. The method of claim 57, further comprising outputting a pointer from a data multiplexer and inputting the pointer into one of the clocked registers.
0. 60. The method of claim 59, further comprising outputting a pointer from each clocked register and inputting the pointers into the data multiplexer.
0. 61. The method of claim 57, further comprising inserting a data value into the data memory by storing the data value in one of the cells and by reordering the pointers in at least some of the clocked registers without shifting the data values in all of the cells.
0. 62. The method of claim 57, wherein the clocked registers include a most recently used (mru) clocked register for storing a pointer to a cell storing a most recently used (mru) data value.
0. 63. The method of claim 62, further comprising inserting a data value into the data memory by storing the data value in one of the cells and by updating the pointer in the mru clocked register to point to the cell in which the data value was stored.
0. 64. The method of claim 62, further comprising promoting a data value stored in a current cell in the data memory by storing a pointer to the current cell in the mru clocked register and by reordering the pointers in at least some of the clocked registers without shifting the data values in all of the cells.
0. 65. The method of claim 57, wherein the clocked registers include a least recently used (LRU) clocked register for storing a pointer to a cell storing a least recently used (LRU) data value.
0. 66. The method of claim 65, further comprising inserting a data value into the data memory by storing the data value in the cell pointed at by the LRU clocked register and by reordering the pointers in at least some of the clocked registers without shifting the data values in all of the cells.
0. 67. The method of claim 57, wherein a Tn clocked register is storing a pointer to a current cell, and wherein a T0 clocked register is storing a pointer to a cell storing a most recently used (mru) data value, and further comprising reordering the pointers by shifting the pointers in the T0 clocked register through a Tn-1 clocked register to a T1 clocked register to the Tn clocked register, respectively.
0. 68. The method of claim 67, further comprising storing the pointer to the current cell in the T0 clocked register.
|
This is a continuation-in-part of application Ser. No. 08/644,354, filed May 10, 1996 now U.S. Pat. No. 6,028,962.
The present invention relates generally to computer-implemented manipulation of a stack storage model and, more particularly, to an improved computer-implemented stack storage model and operations thereon.
Basic stacks and arrays are data structure and data storage concepts that are commonly known in the computer arts. Among other things, stacks are commonly used as an area in storage that stores temporary register information
In a gate array Application Specific Integrated Circuit (herein referred to as an “ASIC”), stacks can be implemented as either banks of registers or an embedded memory array to store the stack values. Each of these approaches is problematic.
If a stack is implemented using banks of registers in a gate array ASIC, each register comprised of a given number of flip-flop storage elements typically contains one stack value. The registers are generally connected together in such a way as to allow their data to be shifted down to the register below them or moved to the top register location, as directed by the associated control logic. With this approach, an insertion of a new value or a promotion of an existing value to the top of the stack is generally accomplished in one clock cycle, with all registers taking on their new values following the clock edge. However, as the size of the register values grows and/or as the number of registers increases, the efficiency of the ASIC real estate, e.g. size of the gate array, used decreases.
Although using a typical memory array, rather than registers, avoids the real estate problems posed by register use, the memory array provides access to only one value at a time per data port, wherein a typical memory array has approximately one or two access ports. Depending on the number of values in the array, a considerable number of memory accesses may be required to move each value to the next location in order to insert a new value at the top location.
For example, to insert a fourth item D into an array where location 1 is the top of the stack and the array contains three items, namely, A, B and C, at locations 1, 2 and 3 respectively, the following actions occur. Item A is read and rewritten to location 2 Item B is read and rewritten to location 3. Item C is read and rewritten to location 4. Item D is written to location 1. Thus, implementing a stack as an array produces significant overhead when performing stack operations such as inserting and removing items from the stack.
Briefly, the present invention is an apparatus and method for an improved stack, said apparatus and method comprising an advantageous indexing scheme and stack arrangement allowing more efficient performance of stack operations.
According to an aspect of the invention, a most recently used stack arrangement is used, wherein the most-recently-used stack item appears at the top of the stack and the least-recently-used item is at the bottom of the stack. Values in between the top and bottom items are ordered from top to bottom with succeedingly less recently used items.
According to another aspect of the invention, a novel combination of array and register storage, is provided. An indexing scheme is used to indirectly reference locations of the stack items in the stack. In an embodiment of the invention, a set of registers is used to reference the locations of the stack items in an embedded memory array. To promote an item to the top of the stack, the contents of the registers are changed to specify the new locations. In other words, the registers function as pointers to the memory array locations and these pointers are shifted to promote an item to the top of the stack. Similarly, to insert a new item on to the top of the stack, the pointers are shifted and a new item is written into the memory array location that contains the least-recently-used item.
According to another aspect of the invention, an MRU register specifies the most-recently-used stack data value and an LRU register specifies the least-recently-used stack data value. When a stack data value is promoted to the top of the stack, the MRU register is set to specify the stack data value and the values of other registers that lie between the MRU register and the register specifying the stack data value that was promoted are shifted down one. When a stack data value is inserted onto the top of the stack, the MRU register is set to the value of the LRU register and the stack data value referenced formerly by the LRU register and newly by the MRU register is set to the new stack data value being inserted. The values of the other registers are shifted down one. Preferably, the changes in register values, including that of the MRU register, occur simultaneously.
The invention provides the following advantages, among others. Stack operations such as insertion, promotion and other rearrangement of the stack items does not require multiple accesses to the memory array. This reduces the overhead incurred during these stack operations and typically increases the speed of such operations. Since the registers typically need only be large enough to uniquely address each memory location, the register size is typically less than that which would be used in stacks which are purely register-based. Thus, the invention can substantially reduce the “real estate” used on a given gate array ASIC.
These and other features of the present inventions, and the advantages offered thereby, are explained in detail hereinafter with reference to specific embodiments illustrated in the accompanying drawings.
To facilitate an understanding of the invention, its features are described hereinafter with reference to a particular implementation, namely an image encoding application. It will be appreciated, however, that the practical applications of the invention are not limited to this particular environment. Rather, it will be found to have utility in any situation in which arrays of reasonably repetitious data need to be ordered in a way to provide efficient access of the most-recently-used values.
According to the IBM Dictionary of Computing, McGraw-Hill, Inc., 1994, pages 547 and 643, a stack is, among other things, a pushdown list or pushdown storage such that “data is ordered in such a way that the next item to be retrieved is the most recently stored item. This procedure is usually referred to as ‘last-in-first-out’ (LIFO).”
The use of the term stack in this application is intended to encompass other methods of organizing and accessing items, as described herein.
In general, the stack data module 104 contains the stack data, while the stack pointer module is a mechanism for indirectly referencing the stack data in the stack data module. More specifically, the stack data module 104 is a data storage unit, containing one or more stack data values. Stack data module 104 can be, for example, an embedded memory array. The stack pointer module 102 is a data storage unit containing one or more references to locations within the stack data module. For example, stack pointer module 102 can be a set of registers
The stack control module 106 generally includes logic for controlling the operations of the stack pointer module and the stack data module in accordance with the invention. The stack control module 106 is also preferably coupled to receive an input such as a command input from a source (not shown) and to transfer an output such as a stack function output to a destination (not shown). Such input may include, but is not limited to, commands like start a search and initialize the stack. Such output may include, but is not limited to, stack function output indicating situations like search finished, ‘data found’ flag and a position index indicating where the data was found.
The set of connections 108 may be a system bus or other data transfer mechanism. Likewise, the set of connections 108 may be a set of wires arranged and connected to provide the data transfer shown in
Specifically, an embodiment of the set of connections 108 as shown in
The invention can also be implemented using a memory device, e.g. external SRAM, that is external to an ASIC. For example, an address line can be coupled to the external memory (not shown) and the data can be transferred back into the ASIC.
Preferably stack 100 is organized such that the data values are arranged in order from the most-recently-used item down to the least-recently-used item. This allows the most often used items to be available at the top of the stack, while lesser used items might drop off the bottom of the stack. Herein, the term “MRU stack” is used to denote this type of stack.
Preferably, the stack pointer list 144 is implemented as a set of registers 150, including one or more registers 152, each register functioning as a stack pointer. For descriptive ease, the registers 152 are referenced herein by the labels T0 through Tm, the number of registers being equal to m+1. The number of registers is dependent and constrained, if at all, by the hardware, the surrounding environment and the overall goals of a particular implementation. Examples of the possible total number of registers include, but are not limited to, 16, 32, or 64.
The stack data module 104 includes stack data stored in a stack data array 160 having one or more array cells 162, each cell 162 specifying either directly or indirectly a stack data value. Stack data array 160 can be, for example, an embedded memory array.
Each register 152 references, either directly or indirectly, an array cell 162 in stack data array 160. Herein, the terms “MRU register”, “MRU stack pointer” and “MRU stack pointer location” are used interchangeably to denote the register which references the array cell containing the most recently used stack data value and the term “LRU register”, “LRU stack pointer” and “LRU stack pointer location interchangeably to denote the register which references the array cell containing the least recently used stack data value. According to an aspect of the invention, register T0 is the MRU register and register Tm is the LRU register. Preferably, for each array cell 162 in stack data array 160 there is a corresponding register 152 in the set of registers 150.
Preferably, the stack pointer module 102 and the stack data module 104 are initialized prior to use to ensure the consistent initial conditions that may be required by the intended application and also by the ASIC test environment. With reference to
Depending on the particular use of the stack, there may be situations in which a stack is reset/reinitialized to the initial conditions. For example, with reference to the encoding scheme discussed with
Although in the embodiment of
Referring to
Preferably, for each register 206 in the set of registers 204, there is a corresponding MUX 202 in the set of data multiplexers 200. A MUX 202 is arranged and coupled to its corresponding register 206 such that the MUX receives one or more inputs and provides an output to the corresponding register.
As shown in
The address multiplexer 208 routes the address from the selected stack pointer register to the stack data memory, thereby accessing the desired stack data value. Address multiplexer 208 is coupled to provide data to the stack data module and to receive as input data from each of the registers in the set of registers.
At step 404, the stack data referenced by the stack pointer at the stack pointer location specified by current_pointer is compared to the item. If at step 406 it is determined that there is a match, then at step 408 a reference to the current_pointer is returned. For descriptive purposes, such a reference is denoted as Tn.
If at step 406 it is determined that is not a match, then at step 410 it is determined whether there is more data to check. Preferably, this is accomplished by determining whether the current_pointer specifies the LRU stack pointer location. Alternatively, the stack data module can be checked to determine whether there is more stack data to check.
If at step 410 it is determined that there is more data to check, then at step 412, the current_pointer is updated to reference the next slack pointer location in the stack pointer list. For example, if the current_pointer references Tn at step 410, then at step 412 it is updated to reference Tn+1. After step 412, processing continues at step 404.
If at step 410 it is determined that there is no more data to check, then at step 414, an indication that a match was not found is returned. Such an indication may be achieved by setting the current_pointer to a NIL pointer value or it may be achieved by an indication means separate from the current_pointer If a separate indication means is used, then at step 408, such separate indication means is preferably set to indicate that a match was found.
Preferably, blocks 502 and 504 occur simultaneously. This is preferably achieved using the combination of edge-triggered D-type flipflops and the corresponding multiplexers as shown in
If steps 502 and 504 are not executed simultaneously, then a temporary variable can be used in the following manner to avoid the loss of a data item. In this situation, the temporary variable is set to the stack pointer value at stack pointer location Tn. Then step 504 is executed Then, the MRU stack pointer location is set to the value of the temporary variable.
Preferably, steps 602 and 604 occur simultaneously. This is preferably achieved using a D-flipflop. By providing the new stack pointer values as inputs to the D-flipflop, the values can typically be changed within a single clock cycle. Whether the transfer of stack pointer values can occur within a single clock cycle generally depends on the number of stack pointers and the constraints of the technology being used.
If steps 602 and 604 are not executed simultaneously, then a temporary variable can be used in the following manner to avoid the loss of a data item. In this situation, the temporary variable is set to the stack pointer value at stack pointer location Tn. Then step 604 is executed. Then, the MRU stack pointer location is set to the value of the temporary variable.
Any new item inserted into the stack causes the least-recently-used item (LRU) to conceptually fall off the bottom of the stack and all other items to shift down one position.
Advantageously, the insertion and promotion operations shown in
The invention can be employed in a variety of applications. An example of such a use is an encoding system and method as shown in
The functions performed by the compression unit (1002) may be divided into the four following principal tasks: 1) image loading; 2) step rate selection; 3) matching and encoding; and 4) output and formatting. Broadly speaking, the image loading function is performed by the input FIFO (1008) and window load module (1010), and serves to download windows of image data from system DRAM (not shown) for processing by the matching and encoding module (1012). The step rate selection function examines the size of the windows downloaded by the window load module (1010), and changes the window length to coincide with any detected repetition of image data from one window to the next. The matching and encoding function performs the actual task of encoding the windows. And last, the output function converts the coded windows into a format suitable for output. These functions will become clear from the ensuing detailed discussion.
As shown in
When so instructed, the compression unit (1002) downloads a strip of image data from system DRAM (not shown) for storage in the input FIFO (1008). Particularly, the input FIFO (1008) includes two memory sections. The first section of the FIFO (1008) is filled first, upon which a FIFO Valid bit is set. The compression unit (1002) then attempts to fill the second section of the FIFO (1008), depending on the availability of the bus.
Upon detecting a FIFO Valid bit, the window loading module (1010) loads a block of data, referred to as a window, from the input FIFO (1008). A window of image data may be best understood with reference to
Windows are moved across the 4-row strip (1020) of pixels at a step rate of 6, 8 or 10 pixels. The window load module (1010) continues to sequence through the strip (1020) until it has read all of the image data stored in the first section of the input FIFO (1008). The window load module (1010) then resets the FIFO valid bit to instruct the FIFO (1008) to provide more data. If the second half of the FIFO (1008) has been loaded, as described above, the FIFO switches in ping-pong fashion to that data and once again sets the FIFO Valid bit. The window load module (1010) then proceeds to read from the second half of the input FIFO (1008).
Finally, at the end of each strip within a band, the input FIFO (1008) is flushed and reloaded from the start of a new strip.
Once the windows are loaded, the matching and encoding module (1012) comes into play by first checking for an exact match between pixels in a current window (1024) and pixels in the window which immediately preceded the current window—referred to as the previous window (1022). Often, printed data will exhibit a repetitious nature depending on the nature of the font used to generate the text or the half-tone matrix that was used to render the image. Accordingly, the current and previous windows are compared using the different step rates (6, 8 and 10 pixels) in an attempt to identify this natural repetition. FIGS. 12(a),(b) and (c) illustrate the specific basis for comparison using step rates of 6, 8 and 10, respectively
The step rate of the window loading logic may initially be set at 8 pixels per step. If the above comparison step indicates that this step rate is out of sync with the natural cycle of data in the strip, the step rate is changed.
Having chosen the step rate, the matching and encoding module (1012) begins the task of actually coding the windows for transmission. It begins by dividing the window into quadrants, as denoted as step 1030 in
In general, the matching and encoding module (1012) employs three principal hierarchical phases in coding the quadrants. First, the module (1012) compares a current quadrant from the current window with the immediately proceeding quadrant from the previous window. If a match is found, pixel values comprising the current quadrant do not have to be included in the output data stream.
If a match is unavailing, however, the encoding module (1012) enters the second phase of its examination. In the second phase, the unmatched current quadrant is compared with a stored list of previously encountered image quadrants, starting from the second-to-last recently encountered image quadrant (the immediately proceeding image quadrant having already been checked, as described above). If a match is found between the current quadrant, and an entry on the list, then the quadrant is coded by making reference to the entry on the list.
If a match is still unavailing, the encoding module (1012) enters the third phase of its examination. In the third phase, the unmatched current quadrant is examined to determine if it falls into one of the following categories: bilevel text, bilevel image, one-gray value image, and multiple gray value image (to be described in more detail below). If so, the image is assigned a code corresponding to its ascertained classification. For instance, if the text consists only of bilevel text, only the most significant bits of the 3-bit pixels are transmitted, thereby significantly reducing the quantity of information included in the output data stream.
The overall goal of the matching and encoding module (1012) is to assign the shortest code possible to each quadrant. This is accomplished using a form of Huffman encoding, as illustrated in
Having presented an overview of the functions performed by the encoding module (1012), each of the three above-identified principal phases will be discussed in detail.
As part of the first phase, the matching and encoding module ((1012 in
Specific exemplary coding for these two situations follows:
Here, Q1-Q4 represents the pixel data contained within quadrants 1-4, respectively. As noted above, if one of the Quad Match bits indicates that one of the quadrants matches its counterpart from the previous window, that quadrant does not have to be transmitted with the output data stream. For example, if the Quad Match bits are [1010], the image data for the quadrants Q1 and Q3 are not included in the output data stream.
In the case (1) of encoding for the case of unmatched Quad Match bits, the current set of Quad Match bits does not match the previous set of Quad Match bits. Therefore, the new series of Quad Match bits has to be transmitted. In the case (2) of encoding for the case of matched Quad Match bits, the current set of Quad Match bits matches the previous set of Quad Match bits. Therefore, the new series of Quad Match bits does not have to be transmitted. Cases (1) and (2) are distinguished by using the prefix codes [1] and [0].
In attempt to further compress the current window, the unmatched quadrants are compared with a stack (1014) containing a list of most recently used image data (step 1038 of
As illustrated in
As readily understood by those skilled in the art, the stack data is not actually shifted in response to promotion or demotion of entries in the stack. Rather, pointers (1130) to the stack entries are manipulated to indicate the ordering of the stack. For instance, an item may be promoted from any level within the stack to the MRU by loading the pointer from that level, Tn, into the T0 slot, and shifting all the pointers from T0 to Tn−1 down one level. Inserting a new item into the stack is essentially the same as promoting the pointer in T15 to the top and storing the new item's data at that pointer's location.
The matching and encoding module searches the selected stack from the most recently used data to the least recently used data. For instance,
If in fact a quadrant from the current window matches a quadrant stored in the stack, the current quadrant is coded (Step 12) according to the following rules:
Finally, if the quadrant data does not match a previous window and is further not found in the stack, the actual bit data must be sent. However, if all of the data in the quad is bilevel, only the most significant bit of each pixel need to be sent to define the quadrant (steps S1042 and 1044 in
If the bilevel quadrant contains at least one bilevel image pixel, then the entire quadrant is coded as a bilevel image (steps 1046 and 1048). Any bilevel text contained with this quadrant is coded as bilevel image data. From the standpoint of pixel values, bilevel image data is the same as bilevel text data. For example, each pixel in both cases is coded as either black or white. It is possible, therefore, to encode all bilevel image data together. However, in some situations image data undergoes processing that is not carried out on text data, and vice versa. For example, image enhancement techniques, such as anti-aliasing, might be performed on text data after it is decoded, but are typically not carried out with respect to image data. For this reason, it is preferable to encode bilevel image data separately from the text. Bilevel image data may be discriminated from bilevel text by assigning a tag to the data at the time of creation (according to one example). Again it is emphasized that the term “bilevel text” encompasses not only text data, but also text-like data (such as graphical art). Generally speaking, “bilevel text” data is everything that is not “bilevel image” data.
The specific coding for bilevel imaging is a follows:
If the quadrant contains only one gray pixel value among the black and white pixels (step 1050), the coding for the quadrant includes a location index providing the location of the gray value within the quadrant, as well as the gray pixel's least two significant bits (step 1052). Also, the values of the bilevel data must be transmitted. The complete coding is as follows:
Finally, if the quadrant contains more than one gray value, it is more effective to simply transmit the complete quadrant, rather than specifying the location of the gray values within the quadrant (steps 1054 and 1056). Specifically:
In addition to the above basic codes, the matching and encoding module produces two additional special codes. The first is to signal to the decoder (not shown) that a step change is required. This code is indicated as follows:
A second special situation occurs when the Quad Match bits resemble the encode lower or encode higher bits identified above—[1100] or [0011], respectively. To distinguish this situation from the preceding case, the Quad Match bits are followed by a 0-bit to indicate that this really is a normal new tree encoding and not a step rate change. The code is thus as follows:
Once the matching and encoding module has completed its task, it looks to see if the output module has set a barrel_ready signal, indicating that the barrel shifter (not shown) of the output module (1016) is ready to receive the coded data stream. If so, the coded data stream is forwarded to the output module (1016) which packs the data into 32-bit words to be loaded into the output FIFO (1018) using the barrel shifter.
The output module (1016) forwards the expanded codes to the output FIFO (1018), which like the input FIFO, contains two memory sections. While one section is being loaded by the barrel shifter, the other section, if full, is written out to the system DRAM. The output FIFO sets an output FIFO full bit to inform the interface logic to write the output bit stream to the system DRAM.
The order of steps given in
The encoding system described with reference to
Further, various changes and modifications will be apparent to those skilled in art. Unless these modifications and changes depart from the scope and spirit of the present invention, they are considered encompassed by the present invention. Therefore, it is the object of the appended claims to cover all such variations and modifications as come within the true spirit and scope of the invention.
Patent | Priority | Assignee | Title |
9009415, | Nov 13 2008 | International Business Machines Corporation | Memory system including a spiral cache |
9542315, | Nov 13 2008 | International Business Machines Corporation | Tiled storage array with systolic move-to-front organization |
Patent | Priority | Assignee | Title |
3810112, | |||
4245302, | Oct 10 1978 | MAGNUSON COMPUTER SYSTEMS, INC , | Computer and method for executing target instructions |
4546385, | Jun 30 1983 | International Business Machines Corporation | Data compression method for graphics images |
4568983, | Dec 07 1983 | Scitex Digital Printing, Inc | Image data compression/decompression |
4668995, | Apr 12 1985 | International Business Machines Corporation | System for reproducing mixed images |
4757440, | Apr 02 1984 | Unisys Corporation | Pipelined data stack with access through-checking |
4882709, | Aug 25 1988 | Integrated Device Technology, Inc. | Conditional write RAM |
5023828, | Jul 20 1988 | HEWLETT-PACKARD DEVELOPMENT COMPANY, L P | Microinstruction addressing in high-speed CPU |
5043870, | Feb 24 1982 | AT&T Bell Laboratories | Computer with automatic mapping of memory contents into machine registers during program execution |
5257352, | Jul 05 1989 | Hitachi, Ltd.; Hitachi Microcomputer Engineering Ltd. | Input/output control method and system |
5367650, | Jul 31 1992 | Intel Corporation | Method and apparauts for parallel exchange operation in a pipelined processor |
5408542, | May 12 1992 | Apple Inc | Method and apparatus for real-time lossless compression and decompression of image data |
5450562, | Oct 19 1992 | Hewlett-Packard Company | Cache-based data compression/decompression |
5493667, | Feb 09 1993 | Intel Corporation | Apparatus and method for an instruction cache locking scheme |
5530883, | Mar 27 1990 | International Business Machines Corporation | Database engine |
5592297, | Aug 06 1992 | Oce-Nederland B.V. | Method and apparatus for encoding and decoding digital image data |
5594914, | Sep 28 1990 | Texas Instruments Incorporated | Method and apparatus for accessing multiple memory devices |
5914906, | Dec 20 1995 | CAVIUM INTERNATIONAL; MARVELL ASIA PTE, LTD | Field programmable memory array |
Executed on | Assignor | Assignee | Conveyance | Frame | Reel | Doc |
Oct 10 2002 | Apple Inc. | (assignment on the face of the patent) | / |
Date | Maintenance Fee Events |
Mar 14 2012 | ASPN: Payor Number Assigned. |
Mar 14 2012 | RMPN: Payer Number De-assigned. |
Apr 18 2012 | M1553: Payment of Maintenance Fee, 12th Year, Large Entity. |
Date | Maintenance Schedule |
Apr 03 2015 | 4 years fee payment window open |
Oct 03 2015 | 6 months grace period start (w surcharge) |
Apr 03 2016 | patent expiry (for year 4) |
Apr 03 2018 | 2 years to revive unintentionally abandoned end. (for year 4) |
Apr 03 2019 | 8 years fee payment window open |
Oct 03 2019 | 6 months grace period start (w surcharge) |
Apr 03 2020 | patent expiry (for year 8) |
Apr 03 2022 | 2 years to revive unintentionally abandoned end. (for year 8) |
Apr 03 2023 | 12 years fee payment window open |
Oct 03 2023 | 6 months grace period start (w surcharge) |
Apr 03 2024 | patent expiry (for year 12) |
Apr 03 2026 | 2 years to revive unintentionally abandoned end. (for year 12) |