Abstract:
An EPLD having improved routing and arithmetic function implementation characteristics. Cascade and carry logic in macrocells allows for rapid implementation of arithmetic functions without unnecessarily tying up device processing and interconnect resources or unnecessarily delaying processing.

Description:
RELATION TO PRIOR APPLICATIONS 
     This application is a continuation-in-part of Ser. No. 08/452,443, filed May 26, 1995, now U.S. Pat. No. 5,563,529 entitled HIGH SPEED PRODUCT TERM ALLOCATION STRUCTURE SUPPORTING LOGIC ITERATION AFTER COMMITTING DEVICE PIN LOCATIONS to Seltzer, et al., issued Oct. 8, 1996, which is incorporated herein by reference. 
    
    
     BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     This invention relates generally to custom programmable integrated circuit logic devices, and more particularly to an improved Programmable Array Logic-based erasable-programmable logic device (EPLD) including an improved arithmetic function architecture. 
     2. Description of the Background Art 
     In response to the increasing need for flexibility and speed in integrated circuit (IC) design, a class of IC&#39;s known as erasable programmable logic devices (EPLDs) was developed. EPLDs enable the designer to custom program arbitrary logical functions in an IC chip, according relative ease and flexibility in testing prototypes and making design changes. 
     FIG. 1 illustrates one EPLD architecture which includes an array of function blocks 1, 2, 3, 4 interconnected via a universal interconnect matrix (UIM) 5. For simplicity, only one function block is shown in detail. The input lines 6 into function block 1 are programmably combined into a number of AND gates 7 in an AND array 8. The output lines 9 from AND array 8 are called product terms (or bit lines). Product terms 9 of AND gates 7 are provided to one of a plurality of macrocells (MC) 10 in each function block. 
     The architecture of a typical macrocell 10 is shown in FIG. 2. Macrocell 10 configures the outputs of AND array 8 of FIG. 1 and may perform additional logic on the output signals of AND array 8. Macrocell 10 contains an OR gate 11 into which product terms are gated, and a register (flip flop) 12 for storing the output signal of OR gate 11. The signals on output line 13 of OR gate 11 and output lines 13a and 13b of register 12 are programmably routed by setting the multiplexers (MUXs) 14, 15 and 16 with configuration bits on their control terminals, each specifying the output state of the respective MUX. 
     Macrocell 10 advantageously provides a relatively large number of product terms 11.1 per macrocell. However, a fixed product term count is not flexible enough to handle the product term count variability that arises during use of the macrocell. Specifically, user product term requirements for a logic function typically vary widely, anywhere from one to sixteen product terms or more, depending on the complexity of the logic function. In fact, single product term functions are quite common. For logic functions requiring less than eight product terms in macrocell 10, for example, the unused product terms are wasted. For functions requiring more than eight product terms, the function must be split up into two or more subfunctions, each of which can be implemented with the available eight product terms of a macrocell. The results of the subfunction operations must make additional passes through the UIM to be recombined in other macrocells, thus incurring a significant time delay in the execution of complex logic functions. 
     To address the need for a flexible macrocell architecture, more recent EPLDs feature macrocells with the ability to direct their OR gate output signals directly into adjacent macrocell OR gates, without passing through the interconnect matrix, a feature known as cascading. Cascading enables product terms associated with more than one macrocell to be implemented rapidly, without incurring the delay normally associated with routing signals through the interconnect matrix. 
     Cascading can also increase the speed of arithmetic functions. Some macrocells include an arithmetic logic unit (ALU) which provides a convenient cascading tool for quickly calculating multi-bit arithmetic functions over a plurality of macrocells. One available EPLD with an ALU in each macrocell is the Xilinx XC7000™ EPLD. In the XC7000 EPLD, the ALU of FIG. 3 is incorporated into a macrocell similar to the one shown in FIG. 2. A prior art programmable adder circuit including two macrocells which use the ALU of FIG. 3 is shown in FIG. 4. Carry blocks 10 include the dedicated carry function of the ALU of FIG. 3. Adder blocks 15 comprise programmable 2-bit function generators for completing the adder circuit, as shown. 
     The function generator in the ALU of FIG. 3 is identical to function block 15 shown in FIG. 4 and is commonly configured as an XOR block to create the adder circuit shown. Because adder logic is modular, each XC7000 macrocell can contain an identical programmable adder circuit. The equations for the adder module&#39;s arithmetic sum S of two bits a and b with a carry-in bit Cin and carry-out bit Cout are: 
     
         S=a⊕b⊕Cin                                          (Eqn. 1) 
    
     and for the carry out bit, 
     
         Cout=a*b+a*Cin+b*Cin                                       (2) 
    
     where &#34;⊕&#34; represents a logical Exclusive OR (XOR) function, &#34;*&#34; represents a logical AND function, and &#34;+&#34; represents a logical OR function. By passing the carry information across adjacent macrocells including the arithmetic module through a cascading scheme, a fast and efficient adder chain may be implemented for a large number of bits. 
     FIG. 5 provides a partial schematic illustration of an EPLD developed more recently than the XC7000 series, the XILINX XC9000 series. The XC9000 series of devices abandoned the specialized arithmetic carry logic and ALU of the XC7000 series in an effort to maximize the overall speed of combinational logic applications. As a result, any arithmetic function above four bits in size implemented on a XC9000 series device consumes at least twice the macrocell resources of a XC7000 series device performing the same function and incurs even greater propagation delay because of the need to route the function through the UIM or similar interconnect mechanism between macrocells. 
     However, the XC9000 series architecture provides a number of advantages over other available EPLDs. As can be seen from FIG. 5, the XC9000 series architecture contains a product-term cascading circuit, modified from the XC7000 series, that establishes special logic paths between adjacent macrocells (defined as either previous or subsequent) for implementing large combinational logic functions. The XC9000 series architecture utilizes XOR gate logic in each macrocell, useful for implementing counters and other logic functions. The XC9000 series devices also provide product term allocation structure which allows routing of product terms in a bidirectional manner between macrocells, routing of product terms through a plurality of macrocells, routing a selectable and variable number of product terms without a loss of capacity in the macrocell from which the product term is routed, and importing product terms to perform a large function within a local macrocell, while simultaneously exporting product terms from the local macrocell to another macrocell. 
     There is therefore a need in the art for an EPLD which combines the routing capabilities and other advantages of the existing XC9000 series macrocell architecture with a cascadable arithmetic function circuit structure to increase macrocell utility and speed without monopolizing device resources. 
     SUMMARY OF THE INVENTION 
     To address the above-described need in the art, an inventive EPLD macrocell is disclosed which provides increased function density and arithmetic function performance with minimal impact on circuit complexity or the speed of the primary logic paths established through recent EPLD innovations. The macrocell circuit of the present invention utilizes combinational logic paths running between macrocells for the additional purpose of arithmetic ripple-carry and XOR&#39; gates for the additional purpose of forming the sum outputs of arithmetic logic. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     The aforementioned advantages of the present invention as well as additional advantages thereof will be more clearly understood hereinafter as a result of a detailed description of a preferred embodiment of the invention when taken in conjunction with the following drawings in which: 
     FIG. 1 is a block diagram of a prior art PLD architecture; 
     FIG. 2 is a schematic diagram of a prior art macrocell circuit; 
     FIG. 3 is a schematic diagram of an ALU; 
     FIG. 4 is a simplified diagram of a prior art carry chain circuit programmed to implement an adder function; 
     FIG. 5 is a schematic diagram of a macrocell without the inventive means for implementing an arithmetic function of the present invention; 
     FIG. 6 is a schematic diagram of a first embodiment of the improved macrocell of the present invention implementing an addition function; 
     FIG. 7 is a schematic diagram of a first embodiment of the improved macrocell of the present invention implementing a subtraction function; 
     FIG. 8 is a block diagram of a prior art full adder implementation; 
     FIG. 9 is a block diagram of a full adder implemented using the improved macrocell of the present invention; 
     FIG. 10 is a schematic diagram of a second embodiment of the improved macrocell of the present invention implementing an addition function; 
     FIG. 11 is a schematic diagram of a second embodiment of the improved macrocell of the present invention implementing a subtraction function; 
     FIG. 12 is a schematic diagram of a second embodiment of the improved macrocell of the present invention implementing a selectable arithmetic function; 
     FIG. 13 is a schematic diagram of a second embodiment of the improved macrocell of the present invention implementing an XOR function for eight bits. 
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
     FIG. 5 provides a schematic diagram illustrating macrocell 103 from the Xilinx XC9000 EPLD and first described in U.S. patent application Ser. No. 08/452,448. Macrocell 103 includes AND gates 200-204, product term distribution circuits 210-214, 7-input OR gates 220 and 221, and cascade control circuits 251-253. Product terms PT0, PT1, PT2, PT3 and PT4 are provided from logic forming circuitry (not shown) to sense amplifier circuits which are represented as single input AND gates 200, 201, 202, 203 and 204, respectively. As a result, product terms PT0-PT4 are routed to product term distribution circuits 210-214, respectively. Although the present invention is described in connection with product terms, it is understood that other logic signals derived from logic forming circuitry can be used in place of product terms. 
     The logic forming circuitry which provides the product terms is described in more detail and illustrated in U.S. Pat. No. 5,563,529. The logic forming circuitry may form an AND array or a look-up table. 
     FIG. 6 illustrates a first embodiment of the improved macrocell of the present invention including arithmetic cascade circuitry not found in the macrocell in FIG. 5. The macrocell of FIG. 6 is configured for an adder implementation which receives input bits a and b, as well as carry signal Cin and produces output S where 
     
         S=a⊕b⊕Cin,                                         (3) 
    
     and carry out signal Cout where 
     
         Cout=a*b+a*Cin+b*Cin.                                      (4) 
    
     Product terms 212 through 214 provide signals /a*b, a*/b, and a*b, respectively. Control circuit 251 in FIG. 5 is replaced by three-way multiplexer 551 in FIG. 6 to forward a carry-in signal Cin from a previous macrocell to AND gate 505 across line 507. Control bits u and v control multiplexer 551 to ensure signal Cin is forwarded to AND gate 505 when desired. Cascade circuitry for forwarding carry signals between macrocells while bypassing the UIM includes AND gate 505 which provides signal Cin*(a*/b+/a*b) to an input of eight input OR gate 540 which replaces seven input OR gate 220 shown in FIG. 5. Thus, we find Cout defined in equation 5: 
     
         ______________________________________(5)       Cout  = a*b + (a*/b + /a*b) *Cin     = a*b + a*/b * Cin + /a*b * Cin     = a*b + a*/b*Cin + /a*b*Cin + a*Cin + b*Cin     = a*b + a*Cin + b*Cin.______________________________________ 
    
     Sum S of bits a and b is generated by forwarding through OR gate 221 signal a*/b from product term 213 and signal /a*b from product term 212, and the ORed signal through XOR gate 510 where the ORed product terms are XORed with signal Cin, and then forwarded through control circuit 530 from multiplexer 551. Since 
     
         a*/b+/a*b=a⊕b,                                         (6) 
    
     the output S of XOR gate 510 in FIG. 6 is 
     
         S=a⊕b⊕Cin.                                         (7) 
    
     FIG. 7 illustrates the inventive macrocell of FIG. 6 slightly modified to receive the product terms necessary to subtract bit b from bit a wherein difference 
     
         S=(a*b+/a*/b)⊕Cin=a⊕/b⊕Cin                     (8) 
    
     and carry bit 
     
         ______________________________________(9)    Cout     = a*/b +  (a*b + /a */b) * Cin!          = a*/b + a*b *Cin + /a*/b*Cin          = a*/b + a*b*Cin + /a*/b*Cin + a*Cin + /b*Cin          = a*/b + a*Cin + /b*Cin.______________________________________ 
    
     Other than the modification to the product terms, the inventive macrocells of FIGS. 6 and 7 are equivalent. 
     FIGS. 6 and 7 therefore reveal a number of the advantages of the improved macrocell of the present invention. First, device resources are conserved. Where the circuit of FIG. 5 would require two macrocells for each bit of an adder configuration (one to produce a sum and another to produce a carry out), the improved macrocell of the present invention requires only one macrocell to create both sum and carry. Of course, for a 16-bit adder, use of 16 macrocells will be avoided, as will use of the UIM for the 15 additional interconnects between these macrocells. 
     Second, the delay encountered in performing arithmetic functions is significantly reduced since half of the macrocell and all of the UIM delay sources are avoided. For example, for Xilinx device 95108-7PQ160, which includes macrocells not having the advantageous arithmetic cascading structure of the present invention, macrocell delay for performing an arithmetic function is approximately 2.5 ns and UIM delay is approximately 6 ns. Input delay through the P terms is approximately 2.5 ns and output delay is approximately 4.5 ns. Thus, if one were to use the macrocell of FIG. 5 to implement a 16-bit adder, total delay D would be found in equation 10: 
     
         ______________________________________(10)    D      = Tinput + 16(Tmacrocell) + 15(Tuim) + Toutput          = 2.5ns + 16(2.5ns) + 15(6ns) + 4.5ns          = 137ns.______________________________________ 
    
     Using the circuit of FIGS. 6 and 7, delay D can be significantly reduced. Cascade circuitry delay through, for example, selector 252, is 1.5 ns, but provides an excellent substitute for the slower UIM delay of 6 ns. Total delay for a 16 bit arithmetic function using the improved macrocell of the present invention is therefore: 
     
         ______________________________________D        = Tinput + Thacrocell + 15(Tcascade) + Toutput    = 2.5ns + (2.5ns) + 15(1.5ns) + 4.5ns    = 32ns.______________________________________ 
    
     Delay is thereby reduced 76 percent. This percentage will increase, of course, with larger arithmetic functions. Significantly, adding the cascade circuitry of the present invention shown in FIGS. 6 and 7 to the prior art macrocell of FIG. 5 does not affect non-arithmetic function timing of the macrocell. 
     FIGS. 8 and 9 illustrate by comparison the reduced need for macrocell resources when the arithmetic and cascade circuitry of the present invention are incorporated into the macrocell design. FIG. 8 illustrates an adder circuit for adding four bits a1, b1, a2, and b2 utilizing a plurality of the macrocells shown in FIG. 5. The adder of FIG. 8 requires a first macrocell 602 to generate the sum of two bits al and b1 and a second macrocell 604 to generate a carry out signal. Moreover, a UIM must be used to interconnect the two carry-bit macrocells 604 and 606. Four macrocells are therefore required for four bit addition. In contrast, the arithmetic circuit of FIG. 9 requires only two macrocells and no UIM to accomplish the same function as the circuit of FIG. 8. Macrocell 610 generates both the sum S1 of a1 and b1 as well as carry bit Cout. Cout is forwarded through the cascade circuitry of the present invention to macrocell 612 which generates both the sum S2 of a2 and b2 as well as an additional carry bit. 
     FIGS. 10 and 11 illustrate additional embodiments of the cascading and full adder and subtractor implementing circuits of the present invention. P-terms 210-214 in FIG. 10 provide inputs a*b, a*/b and /a*b. Multiplexer 551 forwards Cin to AND gate 505 where it is logically ANDed with the logical value a*/b+/a*b provided by XOR gate 510. The output of AND gate 505 is ORed with the logical value a*b using OR gate 540, and is forwarded to the next macrocell via switch 252. 
     The Cout output from the macrocell therefore has the logic value: 
     
         ______________________________________(11)    Cout     = a*b + a*/b*Cin +/a*b*Cin           = a*b + a*/b*Cin + /a*b*Cin + a*Cin + b*Cin           = a*b + a*Cin +b*Cin______________________________________ 
    
     Furthermore, the S output of the macrocell has the value: 
     
         S=a⊕b⊕Cin                                          (12) 
    
     as shown in the circuit of FIG. 6. The subtractor implementation of FIG. 11 requires only a change in the P-term inputs whereby 
     
         Cout=a*/b+a*Cin+/b*Cin.                                    (13) 
    
     Difference S is 
     
         S=(a*b+/a*/b)⊕Cin,                                     (14) 
    
     as found in the circuit of FIG. 7. 
     By adding an additional input signal and slightly modifying the P-terms of the circuit of FIGS. 10 and 11, we obtain a selectable adder circuit as shown in FIG. 12. Unlike the circuits of FIGS. 6 and 7, the circuit illustrated in FIG. 12 can be switched between addition and subtraction implementations by manipulating signal SU. Signal SU is provided by input 214 to XOR 510 via switch 530. Subtraction of bit b from bit a occurs when input signal SU=1. Addition of the two input bits occurs when SU=0. To create output S, XORing of the input terms with Cin occurs at XOR gate 515 via switch 570. Cout is provided by OR gate 540 to output switch 252 so that 
     
         ______________________________________(15)    Cout     = ((/SU * a * b + SU * a * /b) + (a ⊕ b ⊕            SU)Cin)           = a(/SU *b + SU * /b) + a * /((b ⊕ SU)Cin) +            /a * (b ⊕ SU)Cin           = a(b ⊕ SU) + a * /((b ⊕ SU)Cin) + /a(b ⊕            SU)Cin + a*Cin + (b ⊕ SU)Cin           = a(b ⊕ SU) + a * Cin + (b ⊕ SU)Cin.______________________________________ 
    
     Delay caused by the combined adder/subtractor shown in FIG. 12 as compared to the macrocell of FIG. 5 is considerably reduced. Two of the macrocells of FIG. 5 would be required to produce each bit of the combined arithmetic function. A first prior art macrocell would create sum 
     
         S1=a⊕b⊕SU⊕Cin=(/a*/b*SU+/a*b*/SU+a*/b*/SU+a*b*SU)⊕Cin.(16) 
    
     A second prior art macrocell would supply 
     
         ______________________________________(17)  Cout    = a*b*/SU + a*/b*SU + Cin*b*/SU + Cin*/b*SU +          a*Cin         = a(b ⊕ SU) + a*Cin + Cin(b ⊕ SU)______________________________________ 
    
     The inventive macrocell architecture therefore requires only one macrocell for each two required by the macrocell of FIG. 5. For a 16-bit adder implemented using the circuit of FIG. 12, timing delays are avoided for 16 macrocells and 15 UIM interconnections, resulting in an over 50 percent reduction in delay. 
     The macrocell of FIGS. 10, 11 and 12 can also implement an XOR function far more efficiently than the macrocell of FIG. 5. If, for example, eight bits were to be XORed together using the macrocell architecture of FIG. 5, then three macrocells would be required to find 
     
         ______________________________________(18)    y      = x1 ⊕ x2 ⊕ x3 ⊕ x4 ⊕ x5 ⊕ x6 ⊕ x7          ⊕ x8           = (x1 ⊕ x2 ⊕ x3 ⊕ x4) ⊕ (x5 ⊕ x6          ⊕ x7 ⊕ x8).______________________________________ 
    
     This equation would be implemented in its three constituent parts, wherein two macrocells create first and second intermediate outputs A and B where 
     
         ______________________________________(19)    A       = (x1 ⊕ x2 ⊕ x3 ⊕ x4)           = (x1*x2*x3 + /x1*/x2*x3 + /x1*x2*/x3 +            x1*/x2*/x3) ⊕ x4 and(20)    B       = (x5 ⊕ x6 ⊕ x7 ⊕ x8)           = (x5*x6*x7 + /x5*/x6*x7 + /x5*x6*/x7 +            x5*/x6*/x7) ⊕ x8,______________________________________ 
    
     and a third macrocell receives signals A, B and x8 to create output 
     
         y=A⊕B.                                                 (21) 
    
     The new architecture of the present invention requires only two macrocells to implement the same function and uses the cascade circuitry of the present invention to avoid delay from the UIM. As shown in FIG. 13, a first macrocell implements the equation 
     
         A=(x1*x2*x3+/x1*/x2*x3+/x1*x2*/x3+x1*/x2*/x3)⊕x4.      (22) 
    
     A second macrocell receives signal A via the cascade circuitry and XORs this signal with the remaining terms providing output 
     
         y=A⊕((x5*x6*x7+/x5*/x6*x7+/x5*x6*/x7+x5*/x6*/x7)⊕x8).(23) 
    
     Thus, considerable device resources are preserved for other functions and delay associated without implementation of the XOR function is reduced. 
     The present invention therefore provides an advantageous macrocell architecture which accommodates desirable cascaded arithmetic functions while retaining routing advantages not found in previous devices. While the present invention has been described with reference to certain preferred embodiments, those skilled in the art to which the present invention pertains will now, as a result of the applicant&#39;s teachings herein, recognize that various modifications and other embodiments may be provided. By way of example, the precise structure of the arithmetic and cascade logic may be modified while preserving the advantages of the increased configurability and resources of the invention. These and other variations upon and modifications to the embodiment described herein are deemed to be within the scope of the invention which is to be limited only by the following claims.