Abstract:
A control store apparatus having flexibility for reprogramming of microcode. A ROM with predetermined microcode is embedded in a microprocessor. A RAM, into which predetermined microcode may be scanned, is also embedded in the microprocessor. An Address RAM stores addresses of the ROM and RAM which are entry points into the microcode. Selection bits are respectively associated with the addresses stored in the Address RAM for selecting between microcode in the ROM and microcode in the RAM. A remapping circuit provides further flexibility. The remapping circuit includes a storage array into which predetermined ROM addresses and respectively associated RAM address may be scanned. The remapping logic circuit is directly coupled to address generation circuitry in the microprocessor for receiving a first part of the ROM address, and is directly coupled to the storage array. The remapping logic circuit is thereby capable of remapping a ROM address to a RAM address efficiently. A second part of the ROM address, which may be generated later than the first part of the ROM address is routed directly to both the ROM and the RAM.

Description:
BACKGROUND 
     1. Field of the Invention 
     This invention generally relates to control stores for microprocessors and more particularly to a control store apparatus that utilizes both a Read-Only Memory (ROM) and a Random Access Memory (RAM). 
     2. Description of the Related Art 
     The usage of ROMs is popular with logic designers because they are smaller and they consume less power than RAMs. A smaller footprint and less power consumption result in reduced utilization of integrated circuit resources. 
     A disadvantage with using a ROM is that the ROM data cannot be changed after the desired data has been manufactured into the ROM. Therefore, any data stored in the ROM must be of a static nature. For example, look-up tables whose data are assured to be stable may be implemented using a ROM. Microcode is also often stored in a ROM under the assumption that the microcode has been thoroughly tested. 
     Microcode developers would generally prefer to use RAMs for storing microcode because even with impeccable microcode test procedures, program bugs may go undetected in the testing phase and survive into production. However, integrated circuit space, performance., and cost considerations often force microcode developers to use ROMs instead of RAMs for storing the microcode. A RAM allows new microcode to be easily loaded to fix microcode bugs, whereas a ROM does not. 
     U.S. Pat. No. 5,481,713 to Wetmore et al., describes a system in which compiled and assembled operating system software is embedded on a ROM for the purpose of &#34;freeing up&#34; system RAM for use by application programs. Neither the RAM nor the ROM are part of the system&#39;s processor, however, both are accessible to the processor via a system bus. The Wetmore system allows software in system ROM to be remapped to system RAM by vectorizing all references to external routines (i.e., subroutine and function calls). As the ROM code is executing and upon encountering a reference to an external routine, the actual entry point will reference a vector table stored in the system RAM and the corresponding entry in the vector table will point to the actual code to be executed (e.g., have a ROM address or have a jump instruction to the system RAM address). Only the entry points for the ROM code are vectorized (the non-entry point ROM code is not vectorized), thereby requiring that code patches be applied at the subroutine and function level. 
     While the Wetmore approach may be acceptable for deploying and patching operating system software embedded on a system ROM, the approach is not feasible for high-performance applications. For example, Wetmore&#39;s processor may very well have microcode embedded in a ROM within the processor for controlling machine instruction fetching and execution. If Wetmore&#39;s approach was applied to microcode level programming, processor performance would be seriously degraded by way of excess references to a vector table in an external RAM. Not only is extra time required by having to frequently access the vector table, but extra time is required because of the bus type interface between the processor and the ROM and the RAM. 
     Therefore, it is an object of the invention to utilize a ROM as a microcode control store, yet to have the ability to fix microcode logic errors and enhance and/or extend the functionality of the microcode without adversely impacting performance. 
     SUMMARY OF THE INVENTION 
     The present invention overcomes the shortcomings of the prior art by providing a mechanism in which a ROM and a RAM are used in combination to provide a single address space. The single address space allows errant microcode to be corrected by replacing or adding microcode to the existing microcode. New microcode that is stored in the RAM may jump back into the ROM microcode. The RAM allows functionality of the ROM microcode to be extended and new instructions to be added. 
     A single microcode address space is comprised of both ROM and a control store RAM, thereby permitting microcode changes and extensions, even for microcode stored in the ROM. Predetermined microcode is stored in a ROM and other predetermined microcode is stored in a control store RAM. Addresses of control entry points into the microcode are stored in a RAM. The entry point addresses have respectively associated selection bits for selecting either microcode read from the ROM or microcode read from the control store RAM. Microprogrammed control is transferable from the control store RAM back to microcode in the ROM, thereby allowing new microcode to be used in combination with the ROM based microcode. 
     In the exemplary embodiment of the present invention, the microcode implements programmable machine instructions of a data processing system. New machine instructions may be added to the instruction set of the data processing system by storing an additional entry point address in the RAM of addresses which references the control store RAM, and storing microcode for the new instruction in the control store RAM at the entry point address. 
     The invention further provides for remapping of a ROM to a RAM without incurring any performance degradation in performing any required remapping during runtime. Microcode branch conditions, which are generated late in the micro-instruction execution cycle, are preserved. That is, branch conditions that dictate the address of the next microinstruction are preserved even if the referenced ROM block of microcode is remapped to a block of RAM microcode. 
     To accomplish the remapping, a ROM, a RAM, and remapping logic circuitry are embedded within a microprocessor. Prior to runtime operation, microcode patches are loaded into the RAM, and predetermined ROM addresses and RAM addresses corresponding to the patched microcode are stored in an address storage array in the microprocessor. Operationally, the remapping logic circuit receives a generated ROM address, such as from a control logic circuit within the microprocessor. The address storage array is searched for the generated ROM address. If the generated ROM memory address is present, the associated RAM address is provided by the remapping logic circuit to the RAM. Data may then be read from the RAM. 
     The remapping logic circuit is directly coupled to receive the generated ROM address, and both the ROM and the RAM are directly coupled to the remapping logic circuit to receive the address output from the remapping logic circuit. The direct coupling, rather than a bussed coupling, allows high performance processing, even if ROM data has been patched. 
     The invention is also suitable for microcode applications where a first part of the generated ROM address is available early in the execution phase of a micro-instruction, and a second part of the generated ROM address is available later in the execution phase. The early generated first part of the ROM address is remapped, if necessary, and the later generated second part of the ROM address bypasses the remapping logic circuit. This eliminates any time delay that may be associated with any required remapping of a ROM address. The time delay of remapping is eliminated by performing any required remapping in parallel with the generation of the second part of the ROM address. 
     The second part of the ROM address is often the result of conditions that affect the control flow within the microcode. The present invention provides remapping of ROM address to RAM addresses without impacting performance, even where conditions that affect the control flow within the microcode are generated late in the execution of a micro-instruction. 
    
    
     Still other objects and advantages of the present invention will become readily apparent to those skilled in the art from the following detailed description, wherein only the preferred embodiment of the invention is shown, simply by way of illustration of the best mode contemplated for carrying out the invention. As will be realized, the invention is capable of other and different embodiments, and its several details are capable of modifications in various respects, all without departing from the invention. Accordingly, the drawings and description are to be regarded as illustrative in nature, and not as restrictive. 
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a block diagram showing the architecture of a multiprocessor data processing system in which the present invention is embodied; 
     FIG. 2 is a functional block diagram of an Instruction Processor in which the present invention is utilized; 
     FIG. 3 is a logical block diagram of the circuitry embedded in the Control Section of an Instruction Processor for remapping selected portions of a Read-Only Memory (ROM) to a Random Access Memory (RAM); 
     FIG. 4 is a timing diagram that illustrates the operation of the present invention within the exemplary embodiment of executing a micro-instruction; 
     FIG. 5 shows the layout of the generated micro-instruction address from the Control Logic and the ROM Remapping Logic; 
     FIG. 6 is a block diagram that further illustrates that remapping of a ROM address to a RAM address; 
     FIG. 7 is a block diagram that shows the Array of ROM Addresses; 
     FIG. 8 is a block diagram that shows the Array of RAM Addresses; 
     FIG. 9 shows the relationship between FIGS. 9A and 9B, which when combined contain a block diagram of the logic circuitry for remapping an address of ROM to an address of RAM; and 
     FIG. 10 is a block diagram of the logic comprising the RAM Address Selection Logic. 
    
    
     DETAILED DESCRIPTION 
     FIG. 1 is a block diagram showing the architecture of a multiprocessor data processing system in which the present invention is embodied. The system includes eight Instruction Processors, IP 101, IP 102, IP 103, IP 104, IP 105, IP 106, IP 107, and IP 108, each having a dedicated store-through First-Level Cache (FLC). 
     The system of FIG. 1 has two Storage Controllers 112 and 114. Each of Storage Controllers is coupled to four of the IPs. Lines 122, 124, 126, and 128 illustrate the respective point-to-point couplings between the IP 101, IP 102, IP 103, IP 104 and Storage Controller 112. Lines 122, 124, 126, and 128 represent the collection of control, data, and address lines between the IPs and the Storage Controller. Lines 132, 134, 136, and 138 represent similar couplings between Storage Controller 114 and IP 105, IP 106, IP 107, and IP 108 respectively. 
     Memory requests can also come from components within the I/O Subsystem 142 and I/O Subsystem 144. I/O Subsystem 142 is coupled to Storage Controller 112 via Line 146, and I/O Subsystem 144 is coupled to Storage Controller 114 via Line 148. 
     Each of the Storage Controllers 112 and 114 has a respective Second Level Cache (SLC) 152 and 154. The SLCs are global in that each is mapable to the all of system&#39;s addressable memory. That is, the entire address range of the addressable memory is cacheable by each of the SLCs. The total available addressable memory is designated by Shared Main Memory 156. The Shared Main Memory is comprised of two Memory Subsystems, Memory Subsystem 158 and Memory Subsystem 160. 
     Storage Controller 112 is coupled to Storage Controller 114 in a point-to-point fashion as illustrated by Line 162. Line 162 is comprised of data, address, and control lines. SLC 152 may be accessed directly by IP 101, IP 102, IP 103, and IP 104, and indirectly accessed by IP 105, IP 106, IP 107, and IP 108. Similarly, SLC 154 may be accessed directly by IP 105, IP 106, IP 107, and IP 108, and indirectly by IP 101, IP 102, IP 103, and IP 104. If IP 101 issues a read request for an address of Memory Subsystem 160 which is neither in the FLC of IP 101 nor in SLC 152, the request is forwarded to SLC 154. If the requested address is present in SLC 154, the data of the requested address is returned to SLC 152. If the requested address is a miss in SLC 154, the request is forwarded to Memory Subsystem 160. The data is then returned to SLC 152. Note that no replacement of data takes place in SLC 154 as a result of requests from SLC 152. 
     Storage Controller 112 and SLC 152 are &#34;local&#34; relative to IP 101, IP 102, IP 103, IP 104, and I/O Subsystem 142, and are &#34;remote&#34; relative to IP 105, IP 106, IP 107, IP 108, and I/O Subsystem 144. Similarly Storage Controller 114 and SLC 154 are &#34;local&#34; relative to IP 105, IP 106, IP 107, IP 108, and I/O Subsystem 144, and are &#34;remote &#34; relative to IP 101, IP 102, 1P 103, IP 104, and I/O Subsystem 142. The SLCs may be viewed as dedicated to the requests of their respective local IPs and cooperating in servicing requests from the remote IPs. SLC 152 is dedicated to IP 101, IP 102, IP 103, and IP 104 in that the SLC storage is dedicated to caching data based on requests from IPs 101-104. Similarly, SLC 154 is dedicated to IPs 105-108 in that the SLC storage is dedicated to caching data based on requests from IPs 105-108. 
     The system of FIG. 1 further includes a System Control Facility (SCF) 172. The System Control Facility includes a collection of programs that are executable on a Micro-computer 174. The SCF provides for system partitioning and resource allocation, system runtime operation, and also maintenance operations. Maintenance operations in this context is the capability to read and write state information (also referred to as &#34;scan data&#34;) from and to selected circuits in the functional units of the system. 
     The data processing system includes two Network Interface Modules (NIMs) 176 and 178, each coupled to a Local Area Network (LAN) 180. The SCF 172 is also coupled to the LAN, thereby allowing scan data to be transferred between the SCF and each of the NIMs. The NIMs are in turn respectively coupled to predetermined functional units of the system. The NIM 176 provides a scan data interface to IPs 101-104, I/O Subsystem 142, Storage Controller 112, and Memory Subsystem 158. Similarly, NIM 178 provides a scan data interface to IPs 105-108, I/0 Subsystem 144, Storage Controller 114, and Memory Subsystem 160. Line 182 shows the coupling between NIM 176 and its scannable functional units, and Line 184 shows the coupling between NIM 178 and its scannable functional units. The scannable functional units of the system are initialized by system maintenance operations, performed with the SCF 172 and NIMs 176 and 178, when power is first applied to the system 
     FIG. 2 is a functional block diagram of an Instruction Processor in which the present invention is utilized. The Instruction Processor 186 is exemplary of each of IPs 101-108 of FIG. 1. Scan data to and from the SCF 172 is output and input as shown by Line 202. Address and control signals are routed to the respective Storage Controller 112 or 114 via Line 204. Line 206 represents a set of unidirectional data lines for input and output of data from and to the respective Storage Controller. 
     The Request Interface 208 coordinates requests initiated from the IP 186 to the respective Storage Controller 112 or 114. Example types of requests from the IP include reading, writing, and locking selected addresses of the Shared Memory 156. 
     The Control Section 210, along with the Arithmetic Logic Unit (ALU) 212, is the primary section within the IP 186 for executing machine instructions. The Control Section is microcode driven with the microcode being stored in the Control Store 214. Machine instructions fetched from the Instruction Cache 216 or the Shared Memory 156 are decoded in the Control Section and the appropriate microcode from the Control Store is executed. Arithmetic functions are performed by the ALU 212. 
     The IP 186 includes an Instruction Cache 216 and an Operand Cache 218. The I-Cache 216 includes control and RAM storage for caching machine instructions from the Shared Memory for fast access by the Control Section 210. The O-Cache 218 includes control and RAM storage for caching data elements operated upon by the machine instructions that are executed by the Control Section 210 and ALU 212. The Address Generation section 220 generates address information for fetching the next machine instruction, as well as address information for reading and writing data elements, i.e., operands, as specified by the machine instructions. 
     FIG. 3 is a logical block diagram of the circuitry embedded in the Control Section of an Instruction Processor for utilizing a ROM in combination with a RAM for storage of microcode. The ROM and the RAM are viewed as a single address space for storage of the microcode. Eight blocks of Control Store RAM 304 are available in the exemplary embodiment, where a block consists of eight micro-instruction words. Those skilled in the art will recognized that the size of the ROM and RAM could vary according to application requirements. 
     In the exemplary embodiment, the ROM 302 is pre-loaded with micro-instructions which are utilized by the Control Logic 303 in controlling the execution of programmed machine instructions. A set of micro-instructions embody the control mechanism for executing a machine instruction. The micro-instructions of this embodiment are often referred to as microcode or firmware. Other applications of the invention may use the ROM as a data store instead of as a control store. For example, look-up tables may be stored in the ROM instead of micro-instructions. 
     The Control Store RAM 304 provides storage for microcode. The microcode in the Control Store RAM may correct logic errors in the ROM 302 microcode, extend the functionality of the ROM microcode, or it may replace microcode in the ROM. Two mechanisms are used to access the microcode in the ROM and the microcode in the Control Store RAM. The first mechanism provides direct access to the ROM and to the Control Store. RAM, and the second mechanism involves remapping predetermined ROM addresses to predetermined Control Store RAM addresses. 
     The mechanism for directly accessing the ROM 302 or the Control Store RAM 304 includes an Address RAM 305 in which are stored predetermined addresses of the ROM and predetermined addresses of the Control Store RAM. Predetermined selection bits are respectively associated with addresses in the Address RAM. A selection bit indicates whether the associated address references the ROM or the Control Store RAM. Line 306 shows the output of the selection bit that is associated with an address output on Line 307. The selection bit and address are input to the Control Logic 303 as an initial control store address for microcode associated with the machine instruction input on Line 301 to the instruction Decode Logic circuit 309. The Decode Logic circuit decodes the machine instruction and outputs an address for reading from the Address RAM 305. 
     The Control Logic circuit 303 generally initiates the control functions that are specified by the microcode read from the control store ROM 302 and RAM 304. The Control Logic circuit also performs address generation for sequences of micro-instructions. For the initial address provided to the Control Logic 303 by the Address RAM 305, no generation is required. 
     The selection bit on Line 306 is routed to Selector 340 via Line 310 for selecting between a micro-instruction read from the ROM 302 and a micro-instruction read from the Control Store RAM 304. 
     The invention provides for control to be transferred from microcode in the Control Store RAM 304 to microcode in the ROM 302. This may be accomplished by establishing a &#34;jump&#34; or &#34;branch&#34; type micro-instruction in the Control Store RAM, where the target address of the jump is a ROM address. A selector bit in the target address designates either the ROM or the Control Store RAM. The selector bit is carried forward as bit  0! of the eleven bit address that is output from the Control Logic 303 on Line 308. 
     The second mechanism for accessing the microcode in the Control Store RAM 304 involves remapping predetermined addresses of the ROM 302 to predetermined addresses of the Control Store RAM. The remapping logic circuitry is described below. 
     The Control Logic circuit 303 generates an address for reading data (the data in this embodiment is a micro-instruction) from the ROM 302. Eleven bits of address signals are output on Line 308. The nine most-significant bits (designated as  0..8!) are routed to the ROM Remapping Logic circuit 312, and the three least-significant bits (designated as  9..11!) bypass the ROM Remapping Logic circuit. It should be noted that the three least-significant bits  9..11! are generated late in the micro-instruction processing cycle of Control Logic 303, whereas the nine most-significant bits  0..8! are generated early in the cycle. This allows any necessary remapping to be performed in parallel with generation of the three least-significant bits. Note that the three least-significant bits are branch bits that are generated as a result of branch conditions which are evaluated late in the micro-instruction cycle. The three branch bits provide for 8-way branching within the microcode; that is, the branch bits specify an offset (0-7) from bits  0..8! of the generated ROM address. 
     The ROM Remapping Logic circuit 312 receives as inputs: addresses of the ROM 302 designated as being remapped, and addresses of the RAM 304 to which the ROM addresses are remapped. An Array of ROM Addresses 313 contains the ROM addresses designated as being remapped, and an Array of RAM Addresses 314 contains the RAM addresses to which the ROM addresses are remapped. The Array of ROM addresses contains eight registers having nine bits each, and the Array of RAM Addresses contains eight registers of five bits each. Only bits  4..8! are replaced in the exemplary embodiment. The content of the registers of the Array of ROM Addresses 313 is provided by scan data on input Line 316. The scan data is provided to the Instruction Processor 186 as input to Scan Port 320 from the System Control Facility 172. In the illustrated embodiment, microcode patches are applied by scanning the appropriate ROM address into the Array of ROM Addresses, scanning a RAM address into a register in the Array of RAM Addresses (as shown by input Line 322), and scanning new microcode into the proper location in the RAM 304 as shown by scan data input Line 324. 
     The ROM Remapping Logic circuit 312 compares the generated address from the At Control Logic circuit 303 to the addresses stored in the Array of ROM Addresses 313. Input Line 326 represents the eight addresses of nine bits each being input to the ROM Remapping Logic from the Array of ROM Addresses. Input Line 328 represents the eight replacement addresses of five bits each being input to the ROM Remapping Logic. If the ROM Remapping Logic finds that the generated ROM address from the Control Logic 303 is the same as one of the addresses from the Array of ROM Addresses 313, the generated ROM address is replaced with a RAM address from the Array of RAM Addresses 314. Specifically, bits  4..8! from the ROM address are replaced with the five bits of the RAM array. Note that not all of the ROM bits need to be remapped because the RAM is smaller than the ROM and therefore needs fewer address bits. The ROM Remapping Logic outputs nine address bits designated as  0..8! on Line 330. 
     At approximately the same time that the ROM Remapping Logic has completed any necessary remapping of bits  0..8! of the ROM address, the branch bits  9..11! of the ROM address are made available from the Control Logic 303 on Line 332. Selected ones of the combination of bits  0..8! from the ROM Remapping Logic 312 and the branch bits  9..11! from the Control Logic 303 are routed to the ROM 302 and to the RAM 304. 
     Bits   1..11! of the address are routed to the ROM 302. Reading from RAM 304 takes place in parallel with reading from the ROM 302. Bits  4..8! from the ROM Remapping Logic and branch bits  9..11! from the Control Logic 303 are input as an address on Line 342. Forty bits of data are output from the RAM on Line 344 to Selector 340. 
     Bit  0! is generated by the ROM Remapping Logic and is used at Selector 340 to select between data read from the ROM 302 and data read from the RAM 304. Data from the RAM is selected if the ROM address was remapped to a RAM address by the ROM Remapping Logic 312. The selected data is returned to the Control Logic 303 via Line 346. 
     The Control Section 210 is initialized by system maintenance operations, performed with the SCF 172 and NIMs 176 and 178, when power is first applied to the system shown in FIG. 1. The Array of ROM addresses 313, the Array of RAM addresses 314, the Address RAM 305, and the Control Store RAM 304 are initialized through a single serial scan interface to the ASIC. At power on time, the appropriate hardware access files that reside on SCFs hard disk are transferred to the NIM. These files are serially scanned into RAM and both address arrays by the NIM. After power up initialization of the system is complete, the operating system is started. 
     FIG. 4 is a timing diagram that illustrates the operation of the present invention within the exemplary embodiment of executing a micro-instruction. The objective of FIG. 4 is to show the timing relationships between execution of a micro-instruction and reading the next micro-instruction from the ROM 302 or the RAM 304. 
     Line 1 illustrates the duration of a cycle for executing a micro-instruction. Early in the cycle, bits  0..8! of the address of the next instruction are generated as shown by Line 2. The ROM Remapping Logic 312 remaps bits  0..8! during the interval shown on Line 3. Line 4 illustrates that later in the execute cycle, bits  9..11! of the address of the next instruction are generated by the Control Logic 303. When all of bits  0..11! of the micro-instruction address are available, the address is supplied to both the ROM 302 and the RAM 304 for reading the next micro-instruction. The Selector 340 selects between the data read from the RAM 304 and the data read from the ROM as shown by Line 7. 
     FIG. 5 shows the layout of the generated micro-instruction address from the Control Logic 303 and the ROM Remapping Logic 312. The address consists of 11 bits. Bit 0 is used by Selector 340 to select between a micro-instruction read from RAM 304 and a micro-instruction read from ROM 302. Bits  1..8! are generated by the Control Logic 303 early in the execution cycle of a micro-instruction. This is also illustrated as Line 2 in FIG. 4. Branch bits  9..11! are generated late in the execution cycle. Finally, bits  4..8! are replaced with a RAM address if the ROM address bits  1..8! are designated as remapped. 
     FIG. 6 is a block diagram that further illustrates that remapping of a ROM address to a RAM address. The addresses in the ROM are grouped into Blocks, where each Block contains 8 micro-instructions. In the FIG., the micro-instructions in each block are referenced as 0-7. 
     If, for example, Block n+1 of the ROM 302 is remapped to Block x of the RAM 304, as shown by Line 402, the eight bits that address Block n+1 of the ROM are stored in one register of the Array of ROM Addresses 313 during maintenance operations. Correspondingly, the five bits that address Block x of the RAM 304 are stored in one register in the Array of RAM Addresses 314 during maintenance operations. 
     Continuing with the example, execution of micro-instruction 7 of Block n may result in a branch to any of micro-instructions 0-7 within Block n+1. Remapping of Block n+1 of ROM to Block x of RAM may occur in parallel with micro-instruction execution because bits  1..8! of the micro-instruction address are generated early in the execute cycle. The branch bits  9..11! are effective for ROM addresses that are not remapped as well as for ROM addresses that have been remapped to the RAM 304. The present invention thereby preserves the 8-way branching capability without incurring a time delay in having to wait for completion of generation of the branch bits  9..11!. 
     FIG. 7 is a block diagram that shows the Array of ROM Addresses 313. The array consists of eight registers, designated as 313A-H and each available to store an address of ROM 302. Addresses are scanned in to the registers via scan Line 316. Each ROM address consists of nine bits. Outputs from the respective Registers 313A-H are made available on Lines 412, 414, 416, 418, 420, 422, 424, and 426. 
     FIG. 8 is a block diagram that shows the Array of RAM Addresses 314. The array consists of eight registers, designated as 314A-H and each available to store an address of RAM 304. Addresses are scanned in to the registers via scan Line 322. Each RAM address consists of five bits. Outputs from the respective Registers 314A-H are made available on Lines 432, 434, 436, 438, 440, 442, 444, and 446. The outputs from the Registers 314A-314H are collectively referenced as 448. 
     FIG. 9 shows the relationship between FIGS. 9A and 9B, which when combined contain a block diagram of the logic circuitry for remapping an address of ROM 302 to an address of RAM 304. The logic of FIGS. 9A and 9B compares the generated ROM address available on Line 308 to the ROM addresses stored in the Array of ROM Addresses 313, remaps the generated ROM address to a RAM address if the generated ROM address is present in the Array of ROM Addresses, and outputs an address for addressing either the ROM 302 or the RAM 304. 
     Compare Logic circuits 452, 454, 456, 458, 460, 462, 464, and 466 respectively compare the generated ROM address available on Line 308 to the contents of each of the ROM addresses the Registers 313A-313H. The signals for results of the comparisons are respectively output on Lines 452A, 454B, 456C, 458D, 460E, 462F, 464G, and 466H. The results of the comparisons are collectively referenced as 472 and input to both the RAM Address Selection Logic circuit 474 and to the 8-input NOR circuit 476. If the generated ROM address on Line 308 is not present in any Registers 313A-313H signal on Line 478 is activated and routed to the RAM Address Selection Logic 474 to indicate that no remapping is required. 
     If the generated ROM address on Line 308 is present in one of the Registers 313A-314H, the RAM Address Selection Logic replaces bits  4..8! of the generated ROM address with the five bits from the corresponding one of the Registers 314A-314H. Five address bits are output from the RAM Address Selection Logic. The five bits are either bits  4..8! of the generated ROM address or the five bits from one of the Registers 314A-314H. 
     Bits  0..3! of the generated ROM address of Line 308 are respectively routed to AND gates 482, 484, 486, and OR gate 488. The AND gates also receive as input the output on Line 478 from the 8-input NOR circuit 476, and the OR gate receives the output from the 8-input NOR circuit as routed through Inverter 490. Bit 0 controls the selection between data read from the ROM 302 and data read from the RAM 304. Bits  0..3! are respectively routed via Lines 492, 494, 496, and 498 to be combined with bits  4..8! into the Remapped Microcode Address on Line 500. As shown in FIG. 3, bits  1..11! of the Remapped Microcode Address are routed to the ROM 302, bits  4..11! are routed to the RAM 304, and bit  0! is routed to the Selector 340. 
     FIG. 10 is a block diagram of the logic comprising the RAM Address Selection Logic 474. The logic remaps a ROM address to the appropriate RAM address if the generated ROM address compared positively to any of the addresses from the Registers 313A-313H, Bits  4..8! of the generated ROM address are input on Line 308, and the results the comparisons by Compare circuits 452-466 are collectively referenced and input as Line 472. 
     The RAM Address Selection Logic is comprised of a Bit-4 Replace logic circuit 512, a Bit-5 Replace logic circuit 514, Bit-6 Replace logic circuit 516, Bit-7 Replace logic circuit 518, Bit-8 Replace logic circuit 520. Each of the logic circuits 512-520 replaces the respective address bit as necessary. The logic circuits 512-520 are identical in that each includes 9 AND gates with outputs coupled to an OR gate. The output of the OR gate provides the respective address bit. 
     One input to each of eight of the AND gates of the Bit-4 Replace logic circuit 512 is bit  4! from each of the respective Registers 314A-314H (shown as A 4! through H 4!). The other input to each of the respective AND gates is the result from a respective one of the Compare circuits 452-466, such that the output of Compare circuit 452 is compared to bit  4! of Register 314A, the output of Compare circuit 454 is compared to bit  4! of Register 314B, the output of Compare circuit 456 is compared to bit  4! of Register 314C, etc. The remaining AND gate compares bit  4! of the generated ROM address from Line 308 to the No-remap signal on Line 478. 
     The remaining bit replacement logic circuits (514-520) function analogously to Bit-4 Replace logic circuit 512. Bit-5 Replace logic circuit 514 receives as inputs: bit  5! of Register 314A, bit  5! of Registers 314B-314H (designated as B-H 5!), bit  5! from the generated ROM address of Line 308, the outputs from the Compare circuits 452-466, and the No-remap signal of Line 478. Bit-6 Replace logic circuit 516 receives as inputs: bit  6! of Register 314A, bit  6! of Registers 314B-314H (designated as B-H 6!), bit  6! from the generated ROM address of Line 308, the outputs from the Compare circuits 452-466, and the No-remap signal of Line 478. Bit-7 Replace logic circuit 518 receives as inputs: bit  7! of Register 314A, bit  7! of Registers 314B-314H (designated as B-H 7!), bit  7! from the generated ROM address of Line 308, the outputs from the Compare circuits 452-466, and the No-remap signal of Line 478. Bit-8 Replace logic circuit 520 receives as inputs: bit  8! of Register 314A, bit  8! of Registers 314B-314H (designated as B-H 8!), bit  8! from the generated ROM address of Line 308, the outputs from the Compare circuits 452-466, and the No-remap signal of Line 478.