1. Field of the Invention
The present invention relates to a decoding circuit. In particular, this invention relates to an expandable decoding circuit having a new function.
2. Description of the Related Art
In the design of ICs, the quantity of logic gates used for decoding a large number of decoding processes is reduced as much as possible. Therefore, the size of the IC is reduced, and power consumption is lowered. There is now a trend to integrate ICs into a system. A variety of functions are integrated into a single chip. When this is done, the input/output data required for each of the functional units or the data transmitted between different functional units has to be decoded in advance. After the data has been decoded, the control signal or the data can be transmitted between the functional units.
Decoding circuits are popular in circuit application. The organization producing standard cell library usually provides n to 2n decoders to the user. However, because the application becomes complex day after day, the data processed by the system or device and the control logic also becomes complex. Therefore, if the user merely uses n to 2n decoders to deal with the decoding process, the dimensions of the circuit become large, and a large amount of power is required.
In order to solve the described problems, an optimization technology is adopted to obtain an optimization decoding circuit. However, when the optimization decoding circuit needs to be slightly modified or have one or two decoding sets added, the circuit needs to be re-designed. It is time consuming and the time to market for the electronic product is delayed.
One particular aspect of the present invention is to provide an expandable decoding circuit in which the decoding circuit can be flexibly modified. The expandable decoding circuit includes a pre-processing circuit for the input data and a detecting function for detecting whether the input data meets the decoding conditions or not. When the circuit has been finished and an additional function needs to be added, the decoding circuit of the present invention adds the new function while the original circuit is not changed. In other words, when the decoding circuit needs to be slightly modified, the entire functions can be implemented at little cost and with only minor modifications.
The present invention provides an expandable decoding circuit. The expandable decoding circuit includes a latch unit, a latch result selecting unit, and at least one decoding circuit. The latch unit receives raw data and outputs latch values and latch inverse-values of the raw data to the latch result selecting unit. The latch result selecting unit receives the latch values and the latch inverse-values, and composes the latch values and the latch inverse-values according to the target decoding value of the decoding unit to output a pre-decoding value. The decoding circuit receives the pre-decoding value and determines whether the pre-decoding value meets the decoding conditions of the decoding circuit or not to decide whether a decoding signal is outputted or not.
The present invention also provides a decoding method. Firstly, raw data is received. Next, the latch value and the latch inverse-value of the raw data are generated. The latch values and the latch inverse-values compose a pre-decoding value according to a target decoding value of at least one decoding circuit. The pre-decoding value is outputted to the decoding circuit. Finally, the decoding circuit determines whether the pre-decoding value can be decoded or not. If the pre-decoding value can be decoded, the decoding circuit outputs a decoding signal.
Thereby, when a new function needs to be added to the deciding circuit, the present invention does not change the original decoding circuit and implements the decoding unit for the new function. The time required for the design is greatly reduced.
For further understanding of the invention, reference is made to the following detailed description illustrating the embodiments and examples of the invention. The description is only for illustrating the invention and is not intended to be considered limiting of the scope of the claim.
The drawings included herein provide a further understanding of the invention. A brief introduction of the drawings is as follows:
The present invention provides an operating structure for a decoder.
Reference is made to
The decoding units 11, 12, . . . , etc are allocated according to the decoding unit required by the functional units (not shown in the figure). Therefore, when a variety of functional units exist in the system, the same number of decoding units is required. As shown in
When the decoding unit 11 obtains the pre-decoding value An, the decoding unit 11 can use the few logic gates to decode the data because the decoding value has been pre-processed by the pre-processing unit 10. At the same time, the same decoding unit circuit can be used in different functional units. Therefore, the complexity of the IC design and the dimension of the IC are greatly reduced. Because the decoding and composing process are executed by the pre-processing unit 10, the selected and composing process can be increased or decreased by increasing or decreasing the decoding units 11, 12. The decoding and composing process are unchanged. This means that a new functional unit can be added to the system and the originally designed circuit is unchanged.
The decoding switches 11A, 12B located at the decoding units 11, 12 determine whether each of the decoding units 11, 12 is turned on or not. Furthermore, the decoding switches 11A, 12B can control the decoding units 11, 12 and lower power consumption.
Reference is made to
Next, the latch result selecting unit 102 composes and outputs the latch values according to the characteristic value of the decoding target. If the target decoding value of the decoding unit 11 is 2A\H, the latch result selecting unit 102 inversely outputs the bits with 0 of 2A\H in binary. The 2A\H is 101010\B. the output An of the latch result selecting unit 102 is composed of the {Q5, Q4B, Q3, Q2B, Q1, Q0B} and outputs the composed value. The merit is that the forward logic is checked at the next decoding stage (checking whether An is 11111\B), and is unaffected by the target decoding value. If the target decoding value of the decoding unit 12 is 14\H, the output Bm of the latch result selecting unit 102 is composed of the {Q5B, Q4, Q3B, Q2, Q1B, Q0B} and the composed value is output because the 14\H is 010100\B.
Reference is made to
Because the function of the decoding units 11, 12 is to check whether the pre-decoding values from the pre-processing unit 10 are all equal to 1, the decoding units 11, 12 are designed by a logic circuit, referring to
Reference is made to
From the illustration of the pre-processing unit 10, all of the signal wires are 1 if the pre-decoding value meets the decoding condition. Therefore, the operation of all of the decoding units of the functional units is the same as each other. The target is to check whether all of the pre-decoding values are equal to 1. Therefore, the circuit for each of the decoding units is the same as each other, and can be commonly used. Via the design, the present invention uses the few logic gates to implement the decoding unit, and the decoding unit can be commonly used in different functional units. Thereby, the design efficiency is increased and the error rate for the circuit design is lowered.
Moreover, after the latch result selecting unit 102 converts the pre-decoding value, the pre-decoding value can be transmitted to the decoding units 11, 12 of the second stage via two transmitting methods. The first method is that the latch result selecting unit 102 simultaneously outputs An, Bn to the corresponding decoding units 11, 12. Next, the decoding units 11, 12 checks whether An, Bn are equal to 1 or not. If An, Bn are equal to 1, this means the decoding process is finished. For example, when the raw input data Dn is 101010, the An outputted from the latch result selecting unit 102 is composed of {Q5, Q4B, Q3, Q2B, Q1, Q0B}. Therefore, the An is 111111, and is transmitted to the decoding unit 11 so that the decoding unit 11 operates. Bn is composed of {Q5B, Q4, Q3B, Q2, Q1B, Q0B}. Bn is 000001, and is transmitted to the decoding unit 12. The decoding unit 12 doesn't operate because all bits of Bn are not equal to 1. It is simple to implement this circuit.
The second method is that the first method cooperates with the system in turning off the non-relative decoding units via the decoding switches 11A, 11B. By this method, the system resource can be fully utilized and power consumption is reduced.
When the circuit has been finished and an additional function needs to be increased, the decoding circuit of the present invention can increase the functions while the original circuit is not changed. Therefore, the required design period is substantially reduced.
The description above only illustrates specific embodiments and examples of the invention. The invention should therefore cover various modifications and variations made to the herein-described structure and operations of the invention, provided they fall within the scope of the invention as defined in the following appended claims.