1. Field of the Invention
The present invention is generally in the field of processors. More particularly, the invention is in the field of processor architecture.
2. Background Art
Many electronic applications rely on processors for their computing power and flexibility. Product examples of processor-based applications include, but are not limited to, desktop personal computers, laptop computers, personal digital assistants, handheld calculators, laser printers, and fax machines.
Processor-based applications require dedicated instruction memory to operate. Typically, dedicated instruction memory resides in a non-volatile memory such as, for example, read-only memory (ROM) in order to minimize power consumption, enhance reliability, and reduce manufacturing costs. However, a major limitation of using ROM to store dedicated instruction memory is the inability to make any modifications to the dedicated instruction memory once the processor-based application has been fabricated. Patched instructions are commonly used by those skilled in the art to allow changes or upgrades to the processor-based application, thus adding to the flexibility and lifetime of the processor-based application.
“Patched instructions” is a phrase used in the present application to refer to instructions that are to replace outdated and/or defective ROM instructions. Conventionally, the microprocessor fetches the patched instructions from a random access memory (RAM) to replace outdated and/or defective instructions in the ROM. However, the RAM is also used to store data needed by the microprocessor. Thus, one limitation of this conventional approach is that the microprocessor must cease fetching data from the RAM whenever patched instructions are being fetched. As such, this conventional approach reduces the microprocessor's data-fetching efficiency, ultimately lowering the overall performance of the processor-based application.
Thus, there is a need in the art for allowing the fetching of patched instructions without reducing the microprocessor's data-fetching efficiency and overall performance of a processor-based application.
A processor architecture for concurrently fetching data and instructions as shown in and/or described in connection with at least one of the figures, as set forth more completely in the claims.
The present invention is directed to a processor architecture for concurrently fetching data and instructions. The following description contains specific information pertaining to the implementation of the present invention. One skilled in the art will recognize that the present invention may be implemented in a manner different from that specifically discussed in the present application. Moreover, some of the specific details of the invention are not discussed in order not to obscure the invention.
The drawings in the present application and their accompanying detailed description are directed to merely exemplary embodiments of the invention. To maintain brevity, other embodiments of the present invention are not specifically described in the present application and are not specifically illustrated by the present drawings.
The present invention is a processor for fetching patched instructions, i.e. instructions that are to replace outdated and/or defective ROM instructions, without reducing data-fetching efficiency of the processor. As will be discussed in detail below, this advantage is a result of having a processor architecture and technique that allows concurrent fetching of data and patched instructions.
According to the conventional processor architecture, as exemplified by processor architecture 100, dedicated instruction memory typically resides in ROM 110. The dedicated instruction memory cannot be modified after production. Patched instructions, on the other hand, resides in RAM 120 so that it may be modified or re-written as necessary. Patched instructions are typically necessary to accommodate new and/or different features requested by various customers or when ROM 110 has defective bits, columns, or rows. Thus, patched instructions allow easy accommodation of instruction changes and also provide a certain degree of redundancy.
The reading of a dedicated instruction memory, such as ROM 110, by microprocessor 101 during operation is regulated by instruction patch 140. Processor architecture 100 allows patched instructions residing in RAM 120 to be read in seamlessly with the instructions residing in the dedicated instruction memory, i.e. instructions residing in ROM 110. Typically, instruction patch 140 allows dedicated instruction memory ROM 110 to be read by microprocessor 101 via common bus 130 until a patch condition is detected. A patch condition is detected by instruction patch 140 when an instruction address outputted by microprocessor 101 matches a “patched instruction address.” A patched instruction address is an address that is typically stored in or otherwise accessible by instruction patch 140, which address informs instruction patch 140 that a certain ROM 110 address contains an outdated and/or defective instruction. Upon the occurrence of a patch condition, instruction patch 140 will direct and allow a patched instruction from RAM 120 to be read by microprocessor 101.
Common bus 130 is the communication path between microprocessor 101 and RAM 120. Thus, when patched instructions are being read from RAM 120 by microprocessor 101, data residing in RAM 120 cannot be accessed by microprocessor 101. As a result, every patch condition detected by instruction patch 140 reduces the efficiency of data transfer from RAM 120 to microprocessor 101.
According to an embodiment of the present invention depicted by processor architecture 200 of
Instruction patch 240 regulates and directs the reading of the dedicated instruction memory, i.e. ROM 210 in the present embodiment, as well as the separate reading of patched instructions in patch RAM 221, by microprocessor 201. Instruction patch 240 allows for patched instructions residing in patch RAM 221 to be read in seamlessly with instructions residing in ROM 210 upon the detection of a patch condition.
A patch condition is detected by instruction patch 240 when an instruction address outputted by microprocessor 201 matches a patched instruction address. A patched instruction address is an address that is stored in comparators within instruction patch 240 of the present invention, as described in more detail in relation to instruction patch 340 in
Thus, processor architecture 200 advantageously enables microprocessor 201 to fetch patched instructions from patch RAM 221 via instruction bus 232 while leaving data bus 233 available for the transfer of data from dedicated data RAM 222. As such, processor architecture 200 increases parallelism, speed, and data transfer capability by enabling concurrent fetching of data and patched instructions.
It is noted that although patch RAM 221 contains patched instructions, data may be stored in any unused capacity of patch RAM 221 to increase the resource capacity of microprocessor 201 and to augment the data memory available through dedicated data RAM 222. This feature for flexibly augmenting data storage capacity is possible due to the present invention's novel processor architecture 200, allowing patch RAM 221 and microprocessor 201 to communicate via data bus 233, as a data bus separate from instruction bus 232. Thus, the present invention advantageously features the availability of increased data memory depending on the size of patch memory actually utilized to accommodate patched instructions. In other words, for applications where the number of outdated and/or defective ROM instructions is small, a greater amount of patch RAM 221 can be used as data memory.
The present invention provides great flexibility and power saving by providing precise control over the number of active (i.e. enabled) comparators, so that the number of active comparators matches the exact number of defective and/or outdated ROM instructions that are to be patched. For example, when a system designer or a customer knows that only 55 instructions are to be patched, only 55 comparators are needed (where each comparator stores a single patched instruction address). Thus, while a much larger number of comparators, for example 128 comparators, might be present in instruction patch 340, only some of those comparators, i.e. as many as are necessary to accommodate all the patched instructions, are enabled (in this example only 55 comparators are enabled). The disabling of the unnecessary comparators provides great power savings, since each enabled comparator evaluates and compares every bit of a multi-bit instruction address against a corresponding bit of a patched instruction address that is pre-stored in the comparator. Thus, each comparator that is unnecessarily active would consume a large amount of power in comparing a large number of instruction bits to no end since no match would ever be found. As such, the flexibility to disable any number of comparators (1) through (i) in instruction patch 340 results in significant power savings.
According to one embodiment, each comparator may be enabled (or disabled) individually through its respective enable signal, enable (1) through enable (i), also referred to as enable 341E through enable 349E in
As described above, the present invention provides a processor architecture for concurrently fetching patched instructions and data. Advantages of the present invention over conventional processor architectures include increased parallelism, improved processing speed and efficiency, as well as reduced power consumption. From the above description of the invention it is manifest that various techniques can be used for implementing the concepts of the present invention without departing from its scope. Moreover, while the invention has been described with specific reference to certain embodiments, a person of ordinary skill in the art would appreciate that changes can be made in form and detail without departing from the spirit and the scope of the invention. Thus, the described embodiments are to be considered in all respects as illustrative and not restrictive. It should also be understood that the invention is not limited to the particular embodiments described herein but is capable of many rearrangements, modifications, and substitutions without departing from the scope of the invention.
Thus, a processor architecture for concurrently fetching data and instructions has been described.