Background of the Invention
1. Field of the Invention
The present invention relates to a symbol used in a schematic capture program, and in particular to a multiple function symbol that is configurable during schematic capture.
2 Description of the Related Art
Embedding carry logic in high level components, such as counters, adders, and comparators, for schematic capture programs is well known in the art. For example, FIG. 1 illustrates one high level component, a counter 100, which is provided by a schematic capture symbol library which in turn is incorporated into an FPGA design program. Counter 100, which includes embedded carry logic, has been available to the end user only as a hard macro. A hard macro provides fully partitioned and placed design fragments, thereby optimizing performance for the end user.
However, irrespective of the desirability of known performance, unless this hard macro provides exactly the resources needed by the end user, certain inefficiencies occur. For example, assume the library of the schematic capture program includes 8- and 16-bit counter hard macros. If the end user needs a 10-bit counter, the end user must choose between using the 16-bit counter, thereby wasting 6 bits, or using the 8-bit counter, thereby necessitating the building of 2 extra bits. To build these two extra bits, the end user must access another program to create a new hard macro, and then use a translator to provide the new hard macro in the FPGA design program.
Because of the complexity of designing a new hard macro, a large library of commonly used hard macros is typically provided. However, each hard macro includes substantially the same underlying circuitry, thereby significantly increasing the space needed for the library. Moreover, after a hard macro is selected, it allows no access to its underlying logic, thereby undesirably preventing any simulation of the carry logic during schematic capture. Therefore, a need arises for a method which allows an end user to easily design a carry logic circuit, minimizes library space, and allows simulation during schematic capture.
Summary of the Invention
In accordance with the present invention, logic is represented as a generic symbol in a schematic capture program. The generic symbol represents a single underlying logic circuit, thereby dramatically decreasing library space in comparison to prior art hard macros. In accordance with the present invention, the generic symbol includes a configuration memory which is represented on the symbol by at least one pin. The generic symbol is configured by indicating the logic signals (the bit pattern) placed on the pin(s). In one embodiment, eight pins are provided on the generic symbol, thereby providing 256 logic modes. Therefore, in contrast to the prior art which is limitedly the number of hard macros in the library and the number of hard macros created by the end user in a time-consuming and complicated design process, the present invention significantly increases the design choices available to the end user. Moreover, the generic symbol allows access to the underlying logic via the selected bit pattern, thereby advantageously permitting the end user to perform functional simulation within the schematic environment.
In further accordance with the present invention, a plug is provided to schematically connect to the generic symbol. This plug represents a predetermined bit pattern, thereby significantly simplifying the process of configuring the logic in the schematic capture program. In one embodiment, a plurality of plugs are provided, each plug determining the specific logic mode.
Brief Description of the Drawings
FIG. 1 illustrates a counter, which includes embedded carry logic, provided as a hard macro in a known schematic capture program.
FIG. 2 shows a carry logic circuit which is configured with a plurality of configuration bits.
FIG. 3 illustrates a carry logic symbol in accordance with the present invention.
FIG. 4 shows an illustrative plug for connecting to the carry logic symbol.
FIG. 5 illustrates a UART symbol and a UART configuration plug in accordance with the present invention.
Detailed Description of the Drawings
FIG. 2 illustrates one embodiment of a carry logic circuit 200 which is part of a configurable logic block (CLB) of a field programmable gate array (FPGA). CLBs and FPGAs are explained in detail in pages 2-9 through 2-18 of the 1994 Programmable Logic Data Book, incorporated herein by reference, published by Xilinx, Inc. located at 2100 Logic Drive, San Jose, Calif. 95124. Carry logic circuit 200 includes eight configuration bits CL0-CL7, wherein varying the logic state of these configuration, bits provides a number of different carry logic modes, as described in detail below.
Configuration bit CL0 determines whether carry logic circuit 200 functions in either the increment/add mode, the decrement/subtract mode, or both modes. Configuration bit CL0 controls how the selection between these three modes is made. Note that the selection can be either static (under the control of configuration bit CL1) or dynamic (under the control of the signal on input line F3). In the increment/add mode, the input signal B0 is propagated through inverter I123, then through NOR gate N201, and then through an exclusive NOR (XNOR) gate X101 to XNOR gate X103. To provide this propagation, multiplexer M2, controlled by configuration bit CL0, outputs a logic one. Signal B0 is inverted by inverter I123, then restored to its original value by NOR gate N201. Because of the logic one provided by multiplexer M2, XNOR gate X101 passes this signal without further inversion to exclusive NOR gate X103. Note that configuration bit CL1, which provides an input signal to multiplexer M2, is typically used to provide a static value, whereas input line F3, which provides the other input signal to multiplexer M2, provides a dynamically changing signal. In the decrement/subtract mode, multiplexer M2 outputs a logic zero, thereby inverting the input signal B0 via XNOR gate X101.
For carry logic circuit 200 to operate as an intermediate stage in a multi-bit adder, configuration bits CL2-CL5 are set to provide logic ones. In this manner, the output signal of XNOR gate X103 is transferred to inverter I104, and the combination of XNOR gate X103 and inverter I104 act as an XOR gate.
Setting configuration bit CL4 to a logic one turns off transistor T201 and turns on transistor T200, thereby transferring the signal A0 on input line F1 to line 105. In this manner, if transistor T102 turns on and transistor T101 turns off (i.e. signals A0 and B0 are equal), then signal A0 is propagated to carry out line COUT0. Setting configuration bit CL5 to a logic one prevents the signal provided by configuration bit CL7 from simultaneously being propagated to line 105.
On the other hand, setting configuration bit CL3 to a logic zero turns off transistor T204 and turns on transistor T205. Thus, the signal provided by configuration bit CL2 controls whether transistors T101 and T102 conduct. Specifically, if configuration bit CL2 is set to a logic one, a logic zero is provided to inverter I104 and a logic one is provided to inverter I125. Therefore, a logic one is provided to the gate of transistor T101, thereby turning on this transistor, and a logic zero is provided to the gate of transistor T102, thereby turning off this transistor. In this manner, one of the signals on carry in lines CIN.sub.T or CIN.sub.B propagates to carry out line COUT0. Thus, the signal on carry out line COUT0 skips the carry logic of the F-stage. This configuration is particularly useful if layout constraints require a particular stage in a logic block to be used for something other than a stage in the adder (or counter, etc.).
On the other hand, if configuration bit CL2 is set to a logic zero (still assuming configuration bit CL3 is set to a logic zero signal), transistor T101 turns off and transistor T102 turns on, thereby propagating the signal on line 105 to carry out line COUT0. Note that configuration bits CL4, CL5, and CL7 determine the signal provided on line 105.
For the F-stage to add the least significant bit in a multi-bit adder, the carry-in signal is preset to logic zero by applying a logic zero to either of carry in lines CIN.sub.T or CIN.sub.B, and setting memory cell MC to Propagate that signal. Alternatively, to preset the carry-in signal of the G-stage (i.e. the signal on carry out line COUT0), either the signal on line F3 (inverted by inverter I105), the signal provided by configuration bit CL7, or the signal on input terminal F1 is used. Specifically, if configuration bits CL4 and CL5 are set to logic zeros, the signal of configuration bit CL7 is provided on line 105. If configuration bits CL4 and CL5 are set to a logic zero and a logic one, respectively, the complement of the signal on line F3 is provided on line 105. However, if configuration bits CL4 and CL5 provide logic ones, the signal on input line F1 is provided on line 105. In this configuration, configuration bits CL2 and CL3 are set to logic zeros, thereby turning off transistor T101 and turning on transistor T102. In this manner, the signal on line 105 propagates to carry out line COUT0 (the carry in line for the G-stage).
In addition to functioning as a part of the 3:1 multiplexer M101, configuration bit CL7 provides input signals to NOR gates N201 and N202. For the F-stage to function as an intermediate stage in a multi-bit adder for adding signals A0 and B0 on lines F1 and F2, Configuration bit CL7 is set to a logic one. In this manner, NOR gate N201 outputs signal B0 on input line F2. To add a constant to signal A0 on line F1, configuration bit CL7 is set to a logic zero, thereby forcing the input signal of NOR gate N201 high. Forcing the input signal high in turn forces the output signal of NOR gate N201 low, thereby passing the addend selected by multiplexer M2 to be inverted on the output of XNOR gate X101. Multiplexer M2, controlled by configuration bit CL0, selects either the signal provided by configuration bit CL1 or the signal on input line F3, and provides the selected signal to XNOR gate X101. Thus, by setting configuration bit CL7 to a logic zero, a bit is programmed to a constant value, which in turn is added to an input value without using the interconnect resources (not shown) connected to input line F2, thereby freeing up those resources to carry signals to other CLBs.
As shown in FIG. 2, the F-stage and the G-stage are cascaded together, each stage representing one bit of a multi-bit adder. Much of the carry logic of the G-stage is identical to the carry logic of the F-stage. For example, XNOR gate X102 of the G-stage functions analogously to XNOR gate X101 of the F-stage. Additionally, NOR gate N202 of the G-stage functions similarly to NOR gate N201 of the F-stage. However, instead of configuration bits CL2 and CL3 in the F-stage, the G-stage includes only one configuration bit CL6. If configuration bit CL6 is set high, transistor T105 turns on and transistor T106 turns off. In this manner, the G-stage functions as an intermediate stage in a multi-bit adder. On the other hand, if configuration bit CL6 is set low, transistor T105 turns off and transistor T106 turns on, thereby transferring a low signal to inverter I110. This low signal, inverted by inverter I110, turns off transistor T104 and turns on transistor T103, thereby allowing the signal on carry out line COUT to bypass the carry logic of the G-stage.
Carry logic circuit 200 and the effect of configuration bits CL0--CL7 are described in further detail in U.S. Pat. No. 5,267,187, issued Nov. 30, 1993, which is herein incorporated by reference in its entirety.
In accordance with the present invention, the carry logic which was previously embedded in hard macros or was configurable at the chip editor level (i.e. at a very low level), is now configurable at the primitive symbol level within a schematic, thereby providing an efficient and simple method of designing with carry logic. FIG. 3 illustrates one embodiment of a generic carry logic symbol 300 in accordance with the present invention. Carry logic symbol 300 includes input lines F1, F2, G4, and G1 (receiving signals A0, B0, A1, and B1 of FIG. 2), as well as carry-in line CIN and carry-out lines COUT0 and COUT (see also FIG. 2). Note that because the end user determines whether the carry in signal is provided by the CLB positioned above (via carry in line CIN.sub.T) or below (via carry in line CIN.sub.B) the portion of the CLB shown including the F-stage and the G-stage, only one carry in line CIN is provided. In one embodiment, carry logic symbol 300 also includes an input line ADD/SUB which selectively receives the signals on input lines F3 and G3. These signals, which must be provided to both the F and G function generators, control whether carry logic circuit 200 (FIG. 2) operates in an addition mode or a subtraction mode. Note that input lines G2 and F4 to the G and F generators, respectively, are not included in carry logic symbol 300 because these input lines do not affect the carry logic.
In accordance with the present invention, generic carry logic symbol 300 includes a carry mode programmer 301, thereby completing the generic structure of carry logic circuit 200 (FIG. 2). Carry logic programmer 301 includes pins 302A-302H, each pin having a one to one correspondence with configuration bits CL0-CL7, respectively. Thus, for example, a logic one provided to pin 302A corresponds to the same signal stored by configuration bit CL0 and a logic zero provided to pin 302H corresponds to the same signal stored by configuration bit CL7 (FIG. 2).
In one embodiment, the end user configures generic carry logic symbol 300 by indicating the logic signals to be stored by configuration bits CL0-CL7 by assigning pins 302A-302H, respectively, to either a logic one voltage source VCC or a logic zero voltage source GND (neither shown). After the VCC or GND signals are selectively provided to pins 302A-302H of generic carry logic symbol 300, a particular carry logic mode results. For example, to provide a carry mode "ADD-FG-CI" (explained in detail in Table 1), a bit pattern of "01011111" is provided to pins 302A-302H, respectively. Thus, in this implementation, pins 302A and 302C are connected to ground, and the remaining pins are connected to logic one voltage source VCC. Because the present invention provides a simulation mode for each carry logic mode (via the bit pattern), the end user is able to do functional simulation within the schematic environment, thereby efficiently verifying the FPGA design before place and route operations.
In accordance with another embodiment of the present invention and referring to FIG. 4, a "plug" 401 is provided to schematically "connect" to carry mode programmer 301 of generic carry logic symbol 300. Specifically, plug 401 includes a plurality of pins 402A-402H which have a one to one correspondence to pins 302A-302H, respectively, and to configuration bits CL0-CL7, respectively.
In one embodiment, a plurality of plugs 401 are provided, each plug 401 representing a predetermined pattern of bits to be provided to pins 302A-302H of generic carry logic symbol 300 (FIG. 3). In this embodiment, each plug provides predetermined logic low and high signals on pins 402A-402H in accordance with the carry modes detailed in Appendix Table 1.
Table 1 explains a plurality of carry logic modes corresponding to a plurality of bit patterns provided by plugs 401. Note that although there are theoretically 256 carry logic modes (provided by the eight configuration bits CL0-CL7), only 43 modes have practical functionality in a typical field programmable gate array (FPGA). Thus, in accordance with one embodiment of the present invention, there are 43 plugs provided in the schematic capture program. Thus, in accordance with this embodiment of the present invention, plug 401 and corresponding Table 1 significantly simplify configuring carry logic in a schematic capture symbol library.
To further optimize the schematic capture program, conventional logic trimming of the new carry logic symbol is provided. Logic trimming is well known in the art and therefore is not described herein in detail.
The present invention is applicable to any symbol configurable by a series of bits or by a plug. For example, in one embodiment shown in FIG. 5, a UART 500 is configured with a plug 502. Specifically, plug 502 includes a plurality of pins 503A-503H which have a one to one correspondence to pins 501A-501H, respectively, of UART 500. Each bit provided by pins 501A-501H to pins 501A-501H configures a parameter of UART 500. For example, a logic zero provided to pin 501A indicates that UART 500 has one stop bit, whereas a logic one provided to pin 501A indicates that UART 500 has two stop bits. The bits provided to the following pins indicate other parameters associated with UART 500: a bit provided to pin 501B indicates parity or no parity, a bit provided to pin 501C indicates even parity or odd parity, bits provided to pins 501D-501F indicate the number of or lack of data bits, and bits provided to pins 501G-501H indicate the baud rate. Thus, if UART plug 502 provides the bit pattern "01010001" on pins 503A-503H, respectively, then UART 500 is configured to have one stop bit, even parity, 8 data bits, and operate at 4800 baud.
The embodiments described above are illustrative only and not limiting. Other embodiments of the present invention will be apparent to those skilled in the art of schematic capture. The present invention is set forth in the appended claims.