The present invention relates to a novel CORDIC circuit, especially to a simplified CORDIC circuit. The present invention provides a simplified structure for the CORDIC circuit to reduce gate count of the CORDIC circuit.
Among all kinds of signal processing circuits, the CORDIC (coordinate rotation digital computer) circuit is a very useful tool to rotate the positive real number of the coordinate (rectangular coordinate or polar coordinate) representing a sampled signal. The CORDIC calculation is often used in the integration of digital signals. For example, when a CORDIC vector rotation processor receives a digital signal, it may conduct CORDIC processing of the digital signal by referring to the rotation angle of a reference signal, to generate a shifting signal. After such a processing, the sampling phase or sampling frequency of the signal processor may be modified, such that quality of digital signal processing may be improved.
The CORDIC may also be used in other data processing, such as to calculate the angle of an input vector.
When a CORDIC is used to calculate the angle of an input vector, the calculation may be expressed by:
wherein x(i), y(i) represent coordinate value before rotation, x(i+1), y(i+1) represent coordinate value after the i+1th rotation, i is 0 or positive integral, μi represents angel of rotation, μi=sign[x(i)*y(i)]. Thereby, result of the rotation shall make y(i+1)=0.
In addition, the sign operation as described above involves the operation of complex numbers. Components used in the operation of complex numbers will further increase the size of the circuit, while precision of such calculation is limited. In the conventional art it is possible to prepare a look-up-table to replace the complicated circuit. However, the cost of the look-up-table is the memory space needed in recording the table. Using a look-up-table does not solve the problem of high manufacture cost and low operational speed.
It is thus necessary to provide a novel CORDIC circuit to simplify the CORDIC operation, to enhance the operational speed and to save the manufacture cost.
It is also necessary to provide a CORDIC circuit that does not need a multiplier.
It is also necessary to provide a CORDIC circuit with higher precisions.
The objective of this invention is to provide a novel CORDIC circuit to simplify the CORDIC operation, to enhance the operational speed and to save the manufacture cost.
Another objective of this invention is to provide a CORDIC circuit that does not need a multiplier.
Another objective of this invention is to provide a CORDIC circuit with higher precisions.
Another objective of this invention is to provide a CORDIC circuit that is able to conduct CORDIC operation even when the amplitude of a sampled signal is extremely small.
According to this invention, the CORDIC circuit comprises a buffer memory to record a plurality or a plurality of group of coordinate values; a phase selector to determine a rotation direction according to values recorded in said buffer memory; a rotation calculator to rotate an input coordinate for a predetermined angle and to calculate resulting coordinate value after such rotation; a rotation counter to count number of rotation being made to said input coordinate; and an angle accumulator to accumulate total rotation angle being made to said input coordinate according to value recorded by said rotation counter. The CORDIC circuit of this invention may further comprise a bit selector to shift bits of said input coordinate.
The above and other objectives and advantages of this invention may be clearly understood from the detailed description by referring to the following drawings.
The calculation of the CORDIC circuit of this invention will be described in the following.
radians, wherein n represents counts of rotation made to the input coordinate. Direction of the rotation is the positive- or negative-value as determined by the phase selector 20.
In the practical application, the rotation calculator 30 calculates the resulting coordinate of the rotation according to the following equations:
xi+1=xi−μiyi2−1
yi+1=yi+μixi2−1 (2)
wherein x0, y0 represent initial input coordinate, xi+1, yi+1 represent coordinate after the i+1th rotation, μi=sign(xi*yi), i represents number of rotation.
In addition to the above-said method, other rotation processing at predetermined angles may also be used in this invention, as long as complicated circuits such as multiplier are not used in the CORDIC circuit.
At 204 number of rotation processing is recorded in the rotation counter 40 and the current coordinate is recorded in the coordinate buffer memory 10. Then at 205 number of rotation is compared with a threshold value to see whether a predetermined number of rotation has been conducted. If not, the process returns to step 202 and steps 202 to 204 are repeated. Otherwise, at 206 the angle accumulator 50 accumulates the total rotation angle. Calculation of the total rotation angle may be conducted according to the following equation:
R=ΣμiZi (3)
In this equation, R represents the total rotation angle; Z is phase value as recorded in advance. In the accumulation the angle, direction and number of the rotation are taken and accumulated.
In another embodiment of this invention, the relative angle of the rotated coordinate is compared with a base vector. When the difference between the relative angle and the base vector is smaller than a threshold value, the rotation is stopped.
At 207 the total rotation angle and the resulted coordinate are output. In the output data, the x coordinate represents the amplitude of the signal.
By using the above-described circuit, a CORDIC circuit without a multiplier is realized. The rotation angle may be obtained after the iteration and the resulted coordinate and length of the vector are obtained directly after the calculation.
The invented CORDIC circuit may not only rotate an input coordinate to approximate the X axle. It is able to rotate a vector to any angle.
The CORDIC circuit of this invention may further comprise a bit selector 60, to shift the bits of an input coordinate or a resulted coordinate.
According to the present invention, in the operation of a CORDIC circuit, error in operation will become obvious, when amplitude of the input signal is too small. This is because yi2−i and xi2−i decrease tremendously when i becomes greater. To solve such a problem it is necessary to provide more bits to represent values of xi and yi. This, however, makes the circuit complicated and increases the manufacture cost of the CORDIC circuit.
The bit selector 60 of this invention shifts the input coordinate to the direction of the higher bits, according to the most significant bit (MSB), so that the value of the coordinate is enlarged. Such a processing may include shifting the MSB of x0 or y0, whichever is higher, to the bit following the positive- or negative-symbol, followed by shifting the other for the same number of bits. Of course, other methods of bit-shifting may be used in this invention, as long as the x0, y0 coordinate may be enlarged.
After such bit-shifting, the input coordinate is recorded in the buffer memory 10 for further use. After the coordinate is processed by the CORDIC circuit of this invention, the resulted coordinate is shifted in a reversed way by the shift selector 60, so that the true value of the resulted coordinate may be obtained.
In order to prove the effects of this invention, a CORDIC circuit of this invention including a shift selector is prepared. All input coordinates are expressed by 10 bits and angle of the vector is expressed by 12 bits. The experiment shows that error of the CORDIC calculation is limited to less than 5 bits, while in the conventional art, error is always above 900 bits. The effect of this invention is obvious.
Table I shows the maximum error of this invention against the known art.
As the present invention has been shown and described with reference to preferred embodiments thereof, those skilled in the art will recognize that the above and other changes may be made therein without departing form the spirit and scope of the invention.