PROGRAMMABLE INPUT/OUTPUT CIRCUIT

Abstract: In a programmable input/output circuit connected to an input terminal or an output terminal of an integrated circuit, a desirable combination from signals including a signal of the input terminal (1), an input or output signal of a storage element (2, 3, 4), an input or output signal of a combinational logic circuit (15), and input or output signal of another selector and the like is selected by use of at least one programmable selector (6, 7, 8, 9, 10, 11, 12, 14), processed and output into the output terminal (13), so that an input or output circuit for performing a desirable signal process can be provided. Further, at least one dynamic selector circuit (22) is provided, so that an output signal from another input/output circuit can be input into the storage element (2) and an output signal from the storage element (2) can be supplied to another input/output circuit.

Description: The present invention relates to a programmable input/output circuit for connection to an input terminal or an output terminal of an integrated circuit (hereinafter referred to as an "IC") such as a programmable logic device (hereinafter referred to as a "PLD") and capable of programmably performing logical processing of input signals or output signals. A PLD has found use as an IC with which a user can realize a logical function associated with an application to a highly integrated degree. The PLD includes a plurality of programmable logic elements, and outputs and inputs of the respective logic elements can be connected to each other as desired by programmable wirings. In general, an input signal to the PLD from the outside is directly input to specified input terminals of programmable circuit portions (such as an AND plane) of the logic elements. An example of the arrangement of the logic elements in a conventional PLO is disclosed in JP-A-58722/1987, and shown in a block diagram in Fig. 12. The arrangement is such that functional cells 102 for realizing a counter, a shift register and the like are placed after logic outputs of the programmable circuit portions (an AND plane 100 and OR planes 101). The external input signal should be supplied to input terminals 103 of the AND plane 100 in this example. However, a PLD of the above-described type has the following problems. (1) When processing such as removal of a noise component included in the input signal is carried out, the AND plane 100 and the like have to be used, whereby the efficiency of use of the logic element is lowered to a considerable extent; (2) The same use of the AND plane 100 and the like as described above increases the area of the circuit and slows the operating speed. The present invention has been developed in view of the above-described problems. An article in Electronic Design, September 17 1987, pages 83-86, mentions the XC3000 family of programmable logic devices made by Xilinx, Inc. The chip architecture includes a core of configurable logic blocks (CLBs) surrounded by a ring of programmable I/O macrocells. The CLBs have features corresponding to those of the preamble of accompanying claim 1. According to the present invention, there is provided a programmable logic circuit comprising:- at least one input terminal; at least two clocked storage elements; at least one combinational logic circuit; at least one output terminal; and at least two programmable selectors; characterised in that:- said programmable logic circuit is an input/output circuit connected to an input terminal or an output terminal of an integrated circuit and has a configuration such that:- a first said selector is arranged to receive an input signal to the logic circuit and an output signal from a chain of at least first and second said storage elements, said first and second storage elements being arranged in a staggered configuration with a second said selector therebetween, said first storage element receiving an output signal from said first selector, said second storage element receiving an output signal from said second selector, and said combinational logic circuit receiving signals derived from output signals of said chain of storage elements, an output selector being arranged to receive said input signal directly, the output signal from said combinational logic circuit, and a previous output signal from said chain stored in a further storage element. An embodiment of the invention can provide a programmable input/output circuit for connection to an input terminal or an output terminal of an IC, wherein processing of input signals or output signals can be performed programmably, and, when this input/output circuit is used in a PLD, the efficiency of use of a programmable logic element can be improved. Furthermore, an embodiment of the present invention can provide a programmable input/output circuit connectable to other input/output circuits, whereby expansion is made easy. By means of the present invention, in a programmable input/output circuit connected to an input terminal or an output terminal of an IC, a desirable combination from signals including a signal of the input terminal, an input or output signal of the storage element, an input or output signal of the combinational logic circuit, an input or output signal of another selector and the like is selected by use of the programmable selectors, processed and output into the aforesaid output terminal, whereby an input circuit or an output circuit for performing desired signal processing can be provided. In consequence, a direct connection to the input or output terminal of the IC can be made, so that processing of the input signal applied to the input terminal or of the output signal from the output terminal can be directly performed with minimal wiring. Further, the programmable selector and the storage element for holding the input signals and the like make it possible to form the input/output circuit efficiently, thus decreasing the area of the circuit. In addition, the arrangement in which the input or output signal is directly processed, the wiring length is minimised and the area is decreased, allows a high operating speed. When this input/output circuit is used in a PLD, the programmable logic elements can be used purely for arranging the inherent logical function, so that the efficiency of use of the PLD can be enhanced. Moreover, if at least one dynamic selector circuit is provided, an output signal from another input/output circuit can be input into one of the storage elements, and an output signal from the storage element can be supplied to another input/output circuit. It then becomes possible to connect this input/output circuit to other input/output circuits, so that expansion can be made easy. Reference is made, by way of example, to the accompanying drawings in which:- Fig. 1 is a circuit diagram showing a first embodiment of the present invention; Fig. 2 is a circuit diagram showing one example of a programmable selector used in the first embodiment; Fig. 3 is a circuit diagram showing another example of the programmable selector used in the first embodiment; Figs. 4a and 4B are a circuit diagram and a working timing chart of a low-level sensing circuit, which is an example of application of the first embodiment; Figs. 5A and 5B are a circuit diagram and a working timing chart of a high level sensing circuit, which is another example of application of the first embodiment; Figs. 6A and 6B are a circuit diagram and a working timing chart of a falling edge detecting circuit, which is a further example of application of the first embodiment; Figs. 7A and 7B are a circuit diagram and a working timing chart of a rising edge detecting circuit, which is a still further example of application of the first embodiment; Figs. 8a and 8B are a circuit diagram and a working timing chart of a 1/2 frequency dividing circuit, which is a still more further example of application of the first embodiment; Fig. 9A and 9B are a circuit diagram and a working timing chart of a 1/4 frequency dividing circuit, which is a yet further example of applciation of the first embodiment; Fig. 10 is a circuit diagram showing a second embodiment of the present invention; Fig. 11 is a circuit diagram showing an example of the dynamic selector circuit used in the second embodiment; and Fig. 12 is a circuit diagram showing a conventional example of the programmable logic element. The embodiments of the present invention will hereunder be described in detail with reference to the accompanying drawings. Fig. 1 is the circuit diagram showing the first embodiment of the present invention. This first embodiment includes: a input terminal 1; three D type flip-flops 2, 3 and 4 as being storage elements; a combinational logic circuit 5; selectors 6, 7, 8, 9 and 10 for programmably selecting input into the flip-flops 2, 3 and 4; selectors 11 and 12 for programmably selecting an input into the combinational logic circuit 5; a selector 14 for programmably selecting an output to an output terminal 13; and the like. The signal input into a D input terminal of the flip-flop 2 is selected by the selector 6. Connected to three input terminals of the selector 6 are a signal from the input terminal 1, an inverted output Q of the flip-flop 2 itself and an inverted output Q of another flip-flop 3, whereby one of these signals can be desirably selected. A signal input into a clock input terminal CK of the flip-flop 2 is selected by the selector 7. Input into the selector 7 are a high speed clock CLK, a low speed clock CLK2 and the like for example, whereby either one of these signals can be desirable selected. Other examples of these two clocks are those having the mutual relationship, in which the frequency is the same, but is shifted in phase (including the relationship of being inverted from each other), and the like. The signal input into a D input terminal of the fip-flop 3 is selected by the selector 8. Connected to two input terminals of the selector 8 are an output Q from the flip-flop 2 and the selected output by the selector 6, whereby either one of these signals can be desirably selected. Connected to a clock input terminal CK of the flip-flop 3 is a selected ouput by the selector 9, whereby either one of the aforesaid two clocks CLK1 and CLK2 is desirably selcted and input. In this embodiment, the combinational logic circuit 5 is formed into a logical AND circuit, however, ir may be formed into a logical OR circuit, a logical NOR circuit of the like. Two signals input into the combinational logic circuit 5 are selected by the selector 11 and the selector 12, respectively. Connected to two input terminals of the selector 11 are an output Q from the flip-flop 2 and the inverted output Q from the same flip-flop 2, whereby either one of these signals can be desirably selected. Connected to two input terminals of the selector 12 are an output Q from the flip-flop 3 and an inverted output Q from the same flip-flop 3, whereby either one of these signals can be desirably selected. Connected to a D input terminal of the flip-flop 4 is an output from the combinational logic circuit 5. Connected to the clock input terminal CK of the flip-flop 4 is a selected output by the selector 10, whereby either one of the two clocks CLK1 and CLK2 can be desirably selected and input. A signal output to the output terminal 13 is selected by the selector 14. Connected to four input terminals of the selector 14 are the signal from the input terminal 1, the output Q from the flip-flop 2, the output from the combinational logic circuit 5 and the output Q from the flip-flop 4, whereby one of these signals can be desirably selected. Fig. 2 is a circuit diagram showing one example of the programmable selector. This selector is a two input selector consisting of two N channel type MOS transistors 15 and 16. Connected to the input side of the one transistor 15 is a signal A, while, connected to the input side of the other transistor 16 is a signal B, and output sides of the two transistors are commonly connected. Either one of the two transistors is brought into the conductive condition by programming, whereby either one of the input signals A and B is selected as an output C. Fig. 3 is the circuit diagram showing another example of the programmable selector. This selector is a two input selector consisting of three logical NAND gates 17, 18 and 19 and an inverter 20. In the NAND gate 17, when a signal obtained by inverting a gate input I by the inverter 20 is at the high level, the gate 17 is opened, whereby one input A is passed therethrough. In the NAND gate 18, when the gate input I is at the high level, the gate 18 is opened, whereby the other input B is passed therethrough. The NAND gate 19 functions as a logical OR circuit for turning an input from the NAND gate 17 or 18 into a negative logic, and either one of the inputs is turned into an output C of a positive logic. The aforesaid gate input I can be desirably set by the programming and, when the gate input I is set at the high level, the NAND gate 17 is closed and the NAND gate 18 is opened whereby the input B is selected . On the contrary, when the gate input I is set at the low level, the NAND gate 17 is opened and the NAND gate 18 is closed, whereby the input A is selected. In the embodiments of the selector as shown in Figs. 2 and 3, the two input selectors have been described, however, if the number of the gate elements or gate circuits are increased in commensurate to the number of the inputs, then multiple input selectors such as a three input selector and a four input selector can be formed similarly. Furthermore, it is possible that a gate element is formed of complementary transfer gates including an N channel type MOS transistor and a P channel type MOS transistor. An example of application of an input/output circuit formed by use of the first embodiment will hereunder be shown. Figs. 4A and 4B are the input signal low level sensing circuit diagram 4A and the working timing chart 4B thereof. In the circuit diagram 4A, the selector itself is not shown, but the result selected by the selector is shown. Input into the clock input terminal CK of the flip-flop 4 is the clock CLK2 obtained by inverting the clock CLK1 which is input into the clock input terminals CK of the flip-flops 2 and 3. A signal IN input to the input terminal 1 is input into the D input terminal of the flip-flop 2 and the output Q thereof is input into a D input terminal of the flip-flop 3 at the next stage. The inverted outputs Q of the flip-flop 2 and 3 are input together into the combinational logic circuit 5 and a logical AND thereof is input into a D input terminal of the flip-flop 4. An ouput OUT from the output terminal 13 is obtained by selecting an output from the flip-flop 4. As shown in Fig. 4B, in this input/output circuit, only when the input signal IN continues to be held at the low level for 1.5 clocks or more, the low level is sensed by the output OUT through the shift functions of the flip-flops 2, 3 and 4. When the input signal IN continues to be held at the low level for less than 1.5 clocks, the output OUT does not sense the low level, and the input signal IN then is regarded as noises and can be removed. Figs. 5A and 5B are the input signal high level sensing circuit diagram 5A and the timing chart 5B showing the working thereof. The circuit arrangement thereof is similar to the one shown in Fig. 4A except that the inputs into the combinational logic circuit 5 are the outputs Q from the flip-flops 2 and 3. As shown in Fig. 5B, in this input/output circuit, only when the input signal IN continues to be held at the high level for 1.5 clocks or more, the high level is sensed by the output OUT through the functions of the flip-flops 2, 3 and 4. When the input signal IN continues to be held at the high level for less than 1.5 clocks, the high level is not sensed by the output OUT, and the input signal IN then is regarded as noise and can be removed. Figs. 6A and 6B are the input signal falling edge detecting circuit diagram 6A and the timing chart 6B showing the working thereof. In this circuit also, the flip-flops 2 and 3 are connected to each other to form a shift circuit. Both of the inverted output Q of the flip-flop 2 and the output Q of the flip-flop 3 are selected and input into the two input terminals of the combinational logic circuit 5 and a logical AND thereof is output to the output terminal 13. As for set inputs S for the flip-flops 2 and 3, if such an arrangement is adopted that the two flip-flops are connected to each other and SET input can be applied to the flip-flops from the outside, then it is preferable that the SET input may be utilized for locking of the output OUT at the initial time such as the power-on and for an enable input during operation. As shown in Fig. 6B, in this input/output circuit, when the SET input is at the high level, the output OUT can be delivered for one clock from the time the low level of the input signal IN is shifted by the flip-flop 2 at the former stage to the time the signal is shifted by the flip-flop 3 at the latter stage, through the shift functions of the flip-flops 2 and 3. Figs. 7A and 7B are the input signal rising edge detecting circuit diagram 7A and the timing chart 7B showing the working thereof. The circuit arrangement thereof is identical with the one shown in Fig. 6A except that two signals input into the combinational logic circuit 5 are the output Q from the flip-flop 2 and the inverted output Q from the flip-flop 3 and reset terminals of the flip-flops 2 and 3 are connected to each other so that RESET input can be input from the outside. If the RESET input terminal is provided as described above, then it is preferable that the RESET input may be utilized for locking of the output OUT at the initial time such as the power-on and for an enable input during operation. As shown in Fig. 7B, in this input/output circuit, when the RESET input is at the high level, the output OUT can be delivered for one clock from the time the high level of the input signal IN is shifted by the flip-flop 2 at the former stage to the time the signal is shifted by the flip-flop 3 at the latter stage, through the shift functions of the flip-flops 2 and 3. Figs. 8A and 8B are the circuit diagram 8A of a 1/2 frequency dividing circuit of the clock CLK1 and the timing chart 8B showing the working thereof. This dividing circuit is of such an arrangement that, in the flip-flop 2, its inverted output Q is returned to the D input terminal thereof and the output Q is output to the output terminal 13. By doing so, the clock CLK1 can be divided into 1/2 as shown in Fig. 8B. Figs. 9A and 9B are the circuit diagram 9A of a 1/4 frequency dividing circuit of the clock CLK1 and the timing chart 9B showing the working thereof. This dividing circuit is of such an arrangement that, one and the same clock CLK1 is input into the clock input terminals CK of the both flip-flops 2 and 3, the inverted output Q of the flip-flop 3 is input to the D input terminal of the flip-flop 2, and the output Q from the flip-flop 2 is input into the D input terminal of the flip-flop 3. The output Q from the flip-flop 3 is output to the output terminal 13. By doing so, the clock CLK1 can be divided into 1/4 as shown in Fig. 9B. As described above, in the first embodiment, by use of the programmable selector, the input circuit or the output circuit for directly processing the input signal or output signal can be desirably designed. In consequence, the input signal from the input terminal or the output signal into the output terminal can be processed by the shortest wiring, so that the working speed can be raised. Although it is "programmable", the arrangement is suitable for an input/output circuit and the degree of waste is low. Therefore, this embodiment can be formed to be smaller in terms of the occupied area than the case where the input/output circuit is formed by use of programmable logic elements, so that the working speed can be raised to a high speed and the efficiency of use of the elements can be improved. Fig. 10 shows a second embodiment of the circuit diagram according to the present invention, wherein expansion is made easy. Similarly to the first embodiment, according to this second embodiment, in the programmable input/output circuit including the one input terminal 1, the three D type flip-flops 2, 3 and 4, the one combinational logic circuit 5, the eight selectors 6, 7, 8, 9, 10, 11, 12 and 14 and the output terminal 13, there are further added an input terminal 21 from an adjoining input/output circuit (Input Output Block: IOB), a dynamic selector circuit 22 for supplying a signal (c) selected from signals including a signal (A) input from the input terminal 21 and a signal (B) input from the input terminal 1 to the selector 6 for selecting an input D of the flip-flop 2, a parallel-serial switching terminal 23 for inputting a signal (S) to switch the dynamic selector circuit 22, and an output terminal 24 for outputting an output signal from the flip-flop 2 into the other adjoining IOB. A signal input into one of three input terminals of the selector 6 is pre-selected by the dynamic selector circuit 22. Connected to the two input terminals A and B of the dynamic selector circuit 22 are an output signal from the adjoining IOB and an input signal input from the input terminal 1, whereby it can be selected as desired whether the input/output circuits are used in parallel states independent of each other or used in serial states connected to each other, in accordance with the condition of the switching signal S input from the parallel-serial terminal 23. Fig. 11 is the circuit diagram showing an example of the dynamic selector circuit 22. This dynamic selector circuit 22 is a two input selector consisting of two N channel type MOS transistors 25, 26 and an inverter 27. Connected to the input side of the one transistor 25 is the signal A, while, connected to the input side of the other transistor 26 is the signal B, whereby the output sides C of the transistors are commonly connected. By either the switching signal S or a signal obtained by inverting the switching signal S by the inverter 27, either one of the transistors 25 and 26 is brought into the conductive condition and the other is brought into the non-conductive condition, whereby either one of the inputs A and B is turned into the output C. In this embodiment, as the input signal into the flip-flop 2 at the first stage, the output from the adjoining IOB can also be input, so that the expansion by the serial connection of the input/output circuit can be made esay. Incidentally, the storage element, into which the output from the adjoining IOB is inputtable, is not limited to this, and the flip-flops 3 and 4 at the stages from the second stage onwards, or at the last stage, may be adopted. In addition, two or more different signals can be made inputtable into two or more storage elements. Furthermore, in this embodiment, the output from the adjoining IOB can be directly input into the storage element and can be input through the programmable selector 6, so that the scope for selecting the input signals input into the storage element is large. Incidentally, the output from the adjoining IOB can be directly input into the storage element, not through the selector 6. Further, in this embodiment, the output to the other adjoining IOB is outputtable from the flip-flop 2 itself, into which the output from the adjoining IOB can be input, so that expansion can be easily made. Incidentally, the storage element to output the signal to the other adjoining IOB is not limited to this, and the flip-flops 3 and 4 at the stages from the second stage onwards , or at the last stage, may be adopted. Furthermore, two or more storage elements can be made to output such signals. Incidentally, the present invention is not limited to the circuits in the above embodiments, and a circuit with such an arrangement can be desirably adopted that the circuit is provided therein with one or more output terminals, one or more storage elements such as flip-flops, one or more programmable selectors and one or more combinational logic circuits, whereby, for example, a signal output to the output terminal can be selected by the selector from signals including a signal from the input terminal, a signal from an output terminal of the D type flip-flop and a signal from an output terminal of the combinational logic circuit. Further, a signal input into the D input terminal of the D type flip-flop can be selected by the selector from signals including a signal from the output terminal of itself, a signal from the input terminal, a signal from the combinational logic circuit and a signal from the output terminal of another D type flip-flop. Furthermore, such an arrangement may be adopted that a signal input into the combinational logic circuit can be selected by the selector from signals including a signal from the output terminal of another combinational logic circuit, a signal from the input terminal and a signal from the output terminal of the D type flip-flop. Furthermore, a clock input into the D type flip-flop may be desirably selected from a signal from the output terminal of itself in addition to a clock input from the outside.

Claims: A programmable logic circuit comprising:- at least one input terminal (1); at least two clocked storage elements (2, 3, 4); at least one combinational logic circuit (5); at least one output terminal (13); and at least two programmable selectors (6, 7, 8, 9, 10, 11, 12, 14); characterised in that:- said programmable logic circuit is an input/output circuit connected to an input terminal or an output terminal of an integrated circuit and has a configuration such that:- a first said selector (6) is arranged to receive an input signal to the logic circuit and an output signal from a chain of at least first and second said storage elements (2, 3), said first and second storage elements (2, 3) being arranged in a staggered configuration with a second said selector (8) therebetween, said first storage element (2) receiving an output signal from said first selector (6), said second storage element (3) receiving an output signal from said second selector (8), and said combinational logic circuit (5) receiving signals derived from output signals of said chain of storage elements (2, 3), an output selector (14) being arranged to receive said input signal directly, the output signal from said combinational logic circuit (5), and a previous output signal from said chain (2, 3) stored in a further storage element (4). A programmable input/output circuit as set forth in claim 1, wherein first said selector (6) selects one signal from signals including said input signal, an output signal of said first storage element (2), and an output signal of said second storage element (3). A programmable input/output circuit as set forth in claim 1 or 2, wherein each of said clocked storage elements (2, 3, 4) is clocked by one of a plurality of clock signals (CLK1, CLK2) selected for each storage element individually by additional selectors (7, 9, 10). A programmable input/output circuit as set forth in claim 1, 2 or 3, wherein said second selector (8) selects one signal from signals including an output signal from said first storage element (2) and an output signal from said first selector (6). A programmable input/output circuit as set forth in any preceding claim, wherein a further said selector (11) selects one of a plurality of output signals of said first storage element (2) and supplies the selected signal to said combinational logic circuit (5). A programmable input/output circuit as set forth in any preceding claim, wherein said output selector (14) further receives an output signal of said first storage element (2) directly. A programmable input/output circuit as set forth in any preceding claim, wherein said input signal is an input signal received at said input terminal (1). A programmable input/output circuit as set forth in any of claims 1 to 6, further comprising a dynamic selector circuit (22) which supplies said input signal by selecting from signals including at least an output signal from another input/output circuit and a signal received at said input terminal (1); and wherein an output signal from said first storage element (2) can be supplied to another input/output circuit.

Inventors: KAWANA, KEIICHI C/O TECHNICAL RESEARCH DIVISION
Applicants: KAWASAKI STEEL CORPORATION
Application year: 1988
Main classification: H03K19
IPC codes: H03K19, H03K5, G01R29