Abstract:
A data processor has a microcode memory which is reduced in size by sharing word locations having the same contents. When one of the shared word locations is addressed, a control signal is generated and coupled to a select circuit. The select circuit outputs a predetermined operand in place of the contents of the addressed shared word location which can contain a &#34;do not care&#34; operand value. Selective sharing or combining of the word locations is utilized when structuring the memory to optimize savings in circuit area.

Description:
This application is a continuation of prior application Ser. No. 460,211, filed on Jan. 2, 1990, now abandoned. 
    
    
     FIELD OF THE INVENTION 
     This invention relates to microprocessors with microcoded microsequencers and more specifically to minimizing size requirements of the microstore. 
     BACKGROUND OF THE INVENTION 
     A typical data processor has a microsequencer and an execution unit. Within the execution unit various dam operations are performed. The execution unit typically comprises an arithmetic unit, registers, communication buses, and a shifter. The microsequencer is usually either `hardwired`, i.e. designed using combinatorial logic gates, or `microcoded`, i.e. designed using a programmable memory. A microcode designed microsequencer has the advantage that the microsequencer architecture is more simple and straightforward than a hardwired design, and the microsequences can be easily modified by reprogramming the memory. Microcode thus becomes a collection of microprogram routines which implement the user-visible, macroinstruction set of the data processor. In a microcode design the memory is referred to as the microstore, and is often implemented as read only memory (ROM), or as read/write, random access memory (RAM). 
     There are generally two classes of information contained in a typical microprogram control store ROM word. The first class is actual control information, which controls such things as an arithmetic logic unit (ALU), a Shifter, and register transfer operations; the second class of information in a microprogram control store is commonly referred to as Next Micro Address (NMA) information. NMA information is usually an address which specifies the next access into the control store ROM. Therefore, when a microinstruction is fetched from the control store, the control information is used to control the ALU, Shifter, register transfers, etc., and the NMA information tells the microsequencer where to get the next microinstruction. 
     In U.S. Pat. No. 4,307,445 by Tredennick et al. entitled &#34;Microprogrammed Control Apparatus Having A Two-Level Control Store For Data Processor&#34; and assigned to the assignee herein, a dual ROM control store structure is described in which one ROM contains control information and a second ROM contains NMA information. Both ROMs have their own address decoders and these decoders are configured in such a way so as to &#34;share&#34; a single control ROM word with multiple NMA ROM words. 
     Referring to FIG. 1, a known split level microstore 10 for use in a data processor is shown. An NMA-ROM 17 and a control ROM 18 are illustrated wherein each ROM contains three words. NMA-ROM 17 contains words 11, 12 and 13 having address contents respectively labeled addresses &#34;B&#34;, &#34;C&#34; and &#34;A&#34;. Control ROM 18 contains words 14, 15 and 16 having control operand contents respectively labeled &#34;X&#34;, &#34;X&#34; and &#34;Y&#34;. A Next MicroAddress (NMA) is connected to each of a control ROM address decoder 19 and an NMA-ROM address decoder 20. Address decoder 20 is connected to each of words 11, 12 and 13, and respectively provides addresses labeled A&#39;, B&#39; and C&#39;. Address decoder 19 is connected to each of words 14, 15 and 16, and also respectively provides addresses A&#39;, B&#39; and C&#39;. In the illustrated form, address A&#39; is formed as a portion of the address contents A. Similarly, address B&#39; is formed from a portion of address contents B and address C&#39; is formed from a portion of address contents C. 
     When address A&#39; is issued by each of decoders 19 and 20, each of ROMs 17 and 18 is respectively accessed at words 11 and 14. In response thereto, control information labeled `X` is outputted by control ROM 18. A next microaddress (NMA) labeled B&#39; is derived by using the contents of word 11 of NMA-ROM 17 when addressed by address A&#39;. Information stored within control ROM 18 essentially controls the registers, ALU, etc. of a data processor according to the bit pattern of the control information X and causes the next microinstruction at address B&#39; to be retrieved. When the next microinstruction is fetched from each of words 12 and 15 by using address B&#39;, the microinstruction also is used to control the registers, ALU, etc. of the data processor according to the bit pattern of the control information X. A next microaddress (NMA) labeled C&#39; is derived by using the contents labeled C of word 12 of NMA-ROM 17 when addressed by address B&#39;. When the next microinstruction is fetched from each of words 13 and 16 by using address C&#39;, the microinstruction also is used to control the register, ALU, etc. of the data processor according to a bit pattern of control information labeled &#34;Y&#34;. The NMA-ROM 17 contains within word 13 an address A&#39; which is the address of the next microinstruction to be executed. Note that there are two control ROM words, words 14 and 15, which contain the bit pattern of the control information X. 
     Shown in FIG. 2 is split level microstore 10&#39; which is a known modification of split level microstore 10 of FIG. 1 wherein words 14 and 15 are combined into one word and respond to either address A&#39; or address B&#39;. For convenience of comparison, comparable elements of FIG. 2 are numbered the same as in FIG. 1. In the modified form, a control ROM 18&#39; has only two words, words 21 and 22. Decoder 19 is connected to words 21 and 22 wherein either address A&#39; or address B&#39; may address the contents of word 21 which is control information X. Address C&#39; addresses the contents of word 22 which is control information Y. 
     By combining words 14 and 15 of FIG. 1, control ROM 18&#39; of microstore 10&#39; is reduced in size substantially by one-third. Using this scheme, the control information for addresses A&#39; and B&#39; is still the bit pattern of control information X. Also, the NMA information for each of addresses A&#39;, B&#39; and C&#39; is still unique. Word 21 of control ROM 18&#39; is addressed along with either word 11 or word 12 of NMA ROM 17. 
     There are two important system conditions which must exist to allow the illustrated sharing to exist. First, two or more words in control ROM 18&#39; have to contain identical contents; and second, the addresses for those words which are identical have to be assigned such that an address decoder can easily respond to multiple addresses. For example, if two identical control words are assigned the binary addresses 1000 2  and 1001 2 , the words may be collapsed into one word whose address decoder is 100X 2  (`X` indicates a `do not care` condition, where either a 1 or 0 will match). Therefore, the address decoder for this location only needs to decode the three upper bits. 
     An added complication is the fact that address restrictions may apply to various word placements due to circuit implementation size and speed tradeoffs. For example, when implementing a conditional microbranch, it is often beneficial to restrict both branch paths&#39; addresses such that they differ by only a specific bit(s) as opposed to fully specifying both addresses. An important fact is that it is desirable to have as many control words appear identical as possible because address restrictions might preclude many of the control words from being combine shared. In other words, addresses may not readily be assignable in a manner so that two control words can be shared. Therefore, it is typically required to have more than two control words with identical contents so that alternate address assignments can be made. 
     SUMMARY OF THE INVENTION 
     Accordingly, it is an object of the present invention to provide a data processor with improved ROM microcoding. 
     Another object of the present invention is to provide an improved method of reducing ROM size in a data processor. 
     In carrying out the above and other objects of the present invention, there is provided, in one form, a data processor with microcode memory compression. In one form, a first memory is connected to an address bus for receiving a predetermined address identifying one of a plurality of storage locations in the first memory. The first memory is organized into a plurality of field sections, each field section storing control information for implementing a predetermined control function. At least one of the field sections utilizes a same location for implementing any of multiple predetermined control functions. A second memory is connected to the address bus for also receiving the predetermined address. The predetermined address identifies one of a plurality of storage locations where an address to be used by the data processor is stored. The second memory further comprises a field which when addressed causes a control signal to be outputted by the second memory. A selector is connected to the first and second memory for receiving the control information from the first memory and the control signal from the second memory. The selector outputs one of either the control information or a predetermined control operand for use by the data processor in response to the control signal. 
     These and other objects, features, and advantages, will be more clearly understood from the following detailed description taken in conjunction with the accompanying drawings. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a block diagram of a known split level microstore in a data processor; 
     FIG. 2 is a block diagram of a known split level microstore with a sharing function; and 
     FIG. 3 is a block diagram depicting a data processor with split level microstore in accordance with the present invention. 
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
     The present invention increases the number of control words which have identical control information in a microstore of a data processor. To do this, the control information represented by the control words can be divided within a control ROM into several fields, each field controlling a different set of resources within a microcontroller or execution unit. For example, one field of several bits can control an ALU of a data processor, another field can control a shifter, another field can control a set of registers which gate on or off of an internal bus, etc. After all or most of the microcode has been written, an analysis may be made to determine the most commonly used bit patterns for each of the fields. We have discovered that for any given field, certain bit patterns are frequently used. An example of a representative analysis is shown in Table One. This example shows that for a fifteen-bit field that controls a shifter(not shown), a bit pattern of all zeros occurs in approximately one-third of the control words prior to sharing. Another bit pattern 0300 hex  (hexidecimal) occurs in approximately twenty-two percent of the control words prior to any sharing of control word contents in a control ROM. A similar analysis is made in Table One for all of the bits in a control ROM which can be logically grouped into fields. 
     
                       TABLE 1______________________________________Shifter Control Field Bit Pattern Frequency______________________________________   0000.sub.hex - 126 out of 478 (34%)   0300.sub.hex - 105 out of 478 (22%)   1400.sub.hex - 22 out of 478 (5%)   0310.sub.hex - 22 out of 478 (5%)   0308.sub.hex - 16 out of 478 (3%)   0080.sub.hex - 15 out of 478 (3%)   0040.sub.hex - 12 out of 478 (3%)   4400.sub.hex - 10 out of 478 (2%)   0008.sub.hex - 9 out of 478 (2%)   0010.sub.hex - 8 out of 478 (2%)   others - (less than 2%)______________________________________ 
    
     Using the results of Table one, a microstore in a data processor can be provided wherein the control field information is selectively forced to a most commonly used state of a given field whenever a control word is accessed. The control field information is forced to the most commonly used state when the field&#39;s contents are the most commonly used state as determined by the addition of an extra field added to a Next Microaddress ROM. The extra field within the NMA-ROM can be used by a programmed select circuit which outputs accurate programmed control field information in response to the NMA-ROM&#39;s extra field. Therefore, the actual contents of the field for the addressed word in the control ROM is irrelevant and can be changed to whatever state desired. Specifically, the contents of the field for that control word can be changed such that the control word is identical to other control words, thus dramatically increasing the control word sharing in a control ROM of a data processor. The present invention makes the contents of the shared particular fields essentially a &#34;do not care&#34; field for predetermined control words. 
     In one form, the shared control word fields are forced to a most commonly used state of a field programmed within a select circuit by adding one bit into an NMA-ROM for each field which is to be forced to a predetermined state (the most commonly used state). If this bit is asserted in the NMA-ROM by being addressed concurrently with the shared control ROM field, the output for that particular control ROM field of bits is forced by the select circuit to the most commonly used state, thus ignoring the actual contents of the field in that control word of the control ROM. Since these bits are ignored, they can take on whatever state is most optimum for allowing a predetermined control word to share with another control word. In another form of the present invention, for addresses where all fields of the control ROM are ignored, none of the outputted bits of a control word actually come from the control ROM. 
     In order to take full advantage of this concept, a further analysis of the ROM fields is required. It can be shown that the potential sharing can be increased if the control ROM fields are made more granular (i.e. the number of fields is increased, thus decreasing the number of bits in each field). The tradeoff of this approach is that more bits are required for the extra field in the NMA-ROM (one for each field in most instances). A precaution must be taken to insure that additional control ROM savings enjoyed as a result of the increased sharing is not offset by the extra silicon required to implement the extra bits in the NMA-ROM. Another possibility for increasing the potential share ratio is to have multiple forced values for a single given field. This is particularly useful if there is no particular bit pattern which is used in a majority of control words. As an example, in Table One, there is not a large difference in the frequency of occurrence between the first (0000 hex ) and second (0300 hex ) bit patterns. Therefore, this field is a candidate for having two forced values. Again, the tradeoff is that more microword bits are required in the NMA-ROM, thus reducing size savings gained in the control ROM. 
     Shown in FIG. 3 is a data processor microstore 25 which implements the invention as described above. Data processor microstore 25 generally comprises a Next Microaddress ROM 31, a control ROM 32 and programmable select circuits 33, 34 and 44. A microaddress is connected to both control ROM 32 and NMA-ROM 31. Control ROM 32 has a plurality of fields labeled from &#34;A&#34; thru &#34;F&#34;. Next microaddress ROM 31 has fields for storing addresses and has an additional field of predetermined bit size. NMA-ROM 31 outputs a next microaddress to a microsequencer (not shown). In the illustrated form, Next Microaddress (NMA)-ROM 31 controls all three programmable select circuits 33, 34 and 44. Two control signals are connected from NMA-ROM 31 to each of programmable select circuits 33 and 34, and a single control signal is connected from NMA-ROM 31 to programmable select circuit 44. Programmable select circuits 33 and 34 are each labeled a &#34;ROM/Default One/Default Two Select&#34; circuit meaning that they selectively output either a received word from control ROM 32 or one of two programmed default values in response to the control signal connected thereto from NMA-ROM 31. Programmable select circuit 44 is labeled a &#34;ROM/Default Select&#34; circuit meaning that they selectively output either a received word from control ROM 32 or a programmed default value in response to the control signal connected thereto from NMA-ROM 31. Programmable select circuit 33 is connected to control ROM 32 via a ROM output 36, and programmable select circuit 34 is connected to control ROM 32 via a ROM output 37. Control ROM 32 also has an output 38 and outputs 41, 42 and 43 connected to programmable select circuit 44. Programmable select circuits 33 and 34 respectively have outputs 45 and 46, and programmable select circuit 44 has outputs 47, 48 and 49. 
     In the illustrated form, programmable select circuits 33 and 34 can respectively force a particular value for control ROM 32 field A and field B. Programmable select circuit 44 can force a particular value for fields D, E and F of control ROM 32. Of the five illustrated control signals 35 driven by NMA ROM 31, two signals are used to select output 45 for field A. These two control signals select either: (1) the normal ROM output 36; (2) a first default value which is program forced; or (3) a second default value which is also program forced. From the earlier shifter example of Table One, due to the repetitiveness the &#34;default 1&#34; value is 0000 hex , the &#34;default 2&#34; value is 0300 hex  and the field is fifteen bits long. It should be well understood that any particular bit sizes provided herein are given by way of illustration only and not as a limitation. Field B of control ROM 32 is controlled similarly to field A, wherein the default values are chosen optimally for field B. In the particular example, Field C does not utilize any sharing or compression (dynamic `do not care` control information) as the control ROM 32&#39;s outputs of field C are used directly. Fields D, E and F of control ROM 32 are combined into an effective single field for selective `do not caring` storage of control information, and selector 44 can select either all or some of the control ROM 32&#39;s outputs 41, 42 or 43 or force a default value for a portion of or all of the combined field. It should be noted some control ROM 32 signals or fields may have such tight timing constraints that dynamic `do not care` requires specific design specifications. 
     As an example, it was found that the sharing method taught herein, by itself, reduced the control ROM 32 size by roughly seventeen percent. This figure is given by way of example only and better size improvements may be possible. When considering both the NMA-ROM 31 and control ROM 32, the reduction is equivalent to saving roughly thirteen percent of the total ROM. Using dynamic `do not care` and sharing, the control ROM 32 size is reduced roughly twenty-seven percent and the NMA-ROM 31 size increased roughly fifteen percent, for a savings of roughly seventeen percent for the combined ROM. 
     By now it should be apparent that there has been provided a microcontrol store apparatus and method of use for a data processing system which reduces the size of the apparatus. By taking advantage of commonly repeated bit patterns in a ROM, a large amount of duplication in a data processor&#39;s ROM can be significantly reduced. 
     While the present invention has been shown and described with reference to a particular embodiment thereof, various modifications and changes thereto will be apparent to those skilled in the art and are within the spirit and scope of the present invention.