High-precision low-power cordic algorithm and device

By mapping the input angle to a preset angle range and using the interval merging iteration method, combined with polarization recoding and combinational logic operations, the problems of high resource consumption and high iteration delay of the CORDIC algorithm in modern high-speed communication systems are solved, achieving high-precision and low-power computing performance.

CN122390972APending Publication Date: 2026-07-14NO 24 RES INST OF CETC

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NO 24 RES INST OF CETC
Filing Date
2026-04-23
Publication Date
2026-07-14

AI Technical Summary

Technical Problem

Existing CORDIC algorithms suffer from high resource consumption, high iteration delay, and severe accumulated errors in modern high-speed communication systems, especially in high-speed communication systems where the requirements for hardware resources, processing speed, and computational accuracy are difficult to meet.

Method used

The high-precision, low-power CORDIC algorithm is adopted. By mapping the input angle to a preset angle range, the intermediate coordinate value is obtained by using a lookup table. The interval merging iteration method is used to merge multiple consecutive iterations into a single combination operation. Combined with polarization recoding and combinational logic operations, resource consumption and truncation error are reduced.

Benefits of technology

A high-precision, low-power CORDIC algorithm was implemented, reducing hardware resource consumption, decreasing iteration latency, and improving computation speed and accuracy. This solved the problems of resource consumption and accumulated error in the CORDIC algorithm.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122390972A_ABST
    Figure CN122390972A_ABST
Patent Text Reader

Abstract

The application discloses a high-precision low-power CORDIC algorithm and device, the high-precision low-power CORDIC algorithm comprises the following steps: mapping input angle to a preset angle interval to obtain a corresponding mapping angle and a mapping relationship; determining an iteration demarcation point according to a set output bit width; for large-angle rotation before the iteration demarcation point, an intermediate coordinate value is directly obtained by querying a pre-stored lookup table; for small-angle rotation after the iteration demarcation point, an interval merging iteration method is adopted, a plurality of continuous iterations are merged into one combined operation, and after at least one iteration merging operation, a final coordinate value corresponding to the mapping angle is obtained; and based on the mapping relationship, the final coordinate value is corrected to obtain a sine value and a cosine value corresponding to the original input angle. The application realizes comprehensive and significant improvement in calculation accuracy, power consumption and operation speed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of integrated circuit design, and in particular to a high-precision, low-power CORDIC algorithm and device. Background Technology

[0002] The CORDIC algorithm approximates various transcendental functions through a series of shift and addition / subtraction operations. It works by rotating the coordinates and superimposing the angles of these rotations to approximate the initial angle, thus obtaining the function value. This algorithm can replace many complex function operations that are difficult to implement directly in hardware circuits with unified addition, subtraction, and shift operations, reducing the complexity of hardware design while significantly improving speed and accuracy. It is widely used in direct digital frequency synthesizers, digitally controlled oscillators, fast Fourier transforms, and other fields.

[0003] However, modern high-speed communication systems (such as DDS and FFT processors) place extremely high demands on the hardware resource consumption, processing speed, and computational accuracy of the CORDIC algorithm. Existing technologies mainly suffer from the following drawbacks: ① Linear convergence requires a large number of iterations (typically the data width N), resulting in numerous pipeline stages, consuming a large number of registers, and causing high latency. ② In traditional iterative structures, each iteration requires a shift operation. To limit the bit width, the shifted data usually needs to be truncated. After a dozen or so iterations, the truncation error accumulates, leading to a significant decrease in the final output accuracy.

[0004] To address the aforementioned technical problems, those skilled in the art have proposed improved algorithms such as three-stage and two-stage algorithms. Although existing improved algorithms reduce latency through hybrid architectures, the three-stage algorithm still retains complex butterfly operations; the two-stage algorithm still uses a step-by-step shifting method in the second truncation, failing to fundamentally solve the resource consumption and cumulative error problems caused by multiple shifts. Summary of the Invention

[0005] In view of the shortcomings of the prior art, the technical problem to be solved by the present invention is to provide a high-precision, low-power CORDIC algorithm and device that can reduce resource consumption and truncation error.

[0006] To solve the above-mentioned technical problems, one technical solution adopted by the present invention is to provide a high-precision, low-power CORDIC algorithm, comprising the following steps: The input angle is mapped to a preset angle range to obtain the corresponding mapped angle and mapping relationship; The iteration boundary point is determined based on the set output bit width. For large-angle rotations before the iteration boundary point, the intermediate coordinate value is directly obtained by querying the pre-stored lookup table. For small angular rotations after the iteration boundary point, the interval merging iteration method is adopted to merge multiple consecutive iterations into a single combination operation. After at least one iteration merging operation, the final coordinate value corresponding to the mapping angle is obtained. Based on the mapping relationship, the final coordinate values ​​are corrected to obtain the sine and cosine values ​​corresponding to the original input angle.

[0007] Furthermore, the step of mapping the input angle to a preset angle range to obtain the corresponding mapped angle and mapping relationship includes the following sub-steps: Extract the high-order bits of the input angle to determine its corresponding peripheral angle range; the high-order bits are the high four bits of binary code. Based on the aforementioned outer angle range, query the pre-stored angle mapping relationship table to obtain the corresponding angle conversion rules and coordinate correction rules; Based on the angle conversion rules, the input angle is calculated to obtain the mapped angle located within the preset angle range, where the preset angle range is... ; The coordinate correction rule is used as a mapping relationship for subsequent correction of coordinate values.

[0008] Furthermore, after obtaining the corresponding mapping angles and mapping relationships, the following steps are also included: The mapping angle is recoded using polarization to obtain the rotation direction factor sequence required for all subsequent iterations.

[0009] Furthermore, the step of performing polarization recoding on the mapping angle includes: converting each bit of the binary representation of the mapping angle into a corresponding rotation direction factor; when the binary number is 1, the corresponding rotation direction factor is 1; when the binary number is 0, the corresponding rotation direction factor is -1.

[0010] Furthermore, for small angular rotations after the iteration boundary point, the interval merging iteration method is used to merge multiple consecutive iterations into a single combination operation. This step includes the following sub-steps: A merging shift factor is calculated based on a series of consecutive rotation direction factors extracted from the rotation direction factor sequence, wherein the number of rotation direction factors is the same as the number of merging iterations. Based on the merging shift factor and the current coordinate value, the new coordinate value after multiple iterations of merging is directly obtained through a single combinational logic operation that includes shifting and addition / subtraction operations.

[0011] Furthermore, the new coordinate values ​​after multiple iterations of merging are calculated using the following formula:

[0012] in, Indicates the intermediate coordinate value. This represents the new coordinate values ​​after merging. Indicates the merged shift factor. Indicates the rotation direction factor. Indicates the number of steps in the merge. Indicates the current iteration number. Greater than or equal to the iteration boundary point, Take values ​​in sequence , , , ..., .

[0013] Furthermore, the step of calculating the merged shift factor is implemented by querying a predefined interval merged iterative calculation table; the interval merged iterative calculation table is indexed by the binary code formed by the consecutive multiple rotation direction factors, and the corresponding shift operation combination is obtained by querying.

[0014] Furthermore, when determining the iteration boundary point based on the set output bit width, the calculation formula for the iteration boundary point is as follows: M=[(B-1) / 2] Where M represents the iteration boundary point, B represents the output bit width, and [·] represents the floor operation.

[0015] Furthermore, the lookup table uses the high-order field of the mapped angle as the address, and each address stores a pre-calculated intermediate coordinate value. This intermediate coordinate value is applicable to the entire angle sub-interval corresponding to that address, and the intermediate coordinate value has been compensated for the modulus. The angle interval is divided into several angle sub-intervals.

[0016] To solve the above-mentioned technical problems, another technical solution adopted by the present invention is: to provide a high-precision, low-power CORDIC algorithm device, comprising: An angle mapping unit is used to map the input angle to a preset angle range to obtain the corresponding mapped angle and mapping relationship; The intermediate value lookup unit is used to determine the iteration boundary point based on the set output bit width. For large-angle rotations before the iteration boundary point, the intermediate coordinate value is directly obtained by querying the pre-stored lookup table. The iterative merging operation unit is used to merge multiple consecutive iterations into a single combination operation for small angle rotations after the iteration boundary point using the interval merging iteration method. After at least one iterative merging operation, the final coordinate value corresponding to the mapped angle is obtained. The output correction unit is used to correct the final coordinate value based on the mapping relationship to obtain the sine and cosine values ​​corresponding to the original input angle.

[0017] The high-precision, low-power CORDIC algorithm and apparatus of this invention have at least the following advantages: By adopting an efficient two-stage pipeline architecture, the first stage completes large-angle rotation in one step using a small-capacity lookup table, and the second stage completes multiple iterative mergings in one step using combinational logic, enabling the entire computation process to be completed within an extremely short clock cycle, achieving high throughput and low latency, far faster than traditional algorithms; by compressing the mapped angle interval, the capacity requirement of the lookup table storing the previous rotation results is drastically reduced; by using polarization recoding to predict all rotation directions, inter-iteration dependencies are eliminated, and interval merging iterations do not require storing a large number of intermediate results, saving register resources. The calculation of the shift factor is transformed into a very small number of fixed shift-addition operations by querying the interval merging iteration calculation table, replacing the general multiplication and accumulation unit. These measures together reduce the circuit area and lower resources and power consumption. By merging multiple consecutive small angle rotations into a single combined calculation through the interval merging iteration method, the data only needs to be truncated once in the final output during the operation, instead of being truncated after each iteration. This fundamentally reduces the cumulative error caused by the limited bit width representation. It achieves a balance between accuracy, speed and power consumption, and overcomes the long-standing problems of limited accuracy, high iteration delay and high resource consumption in the CORDIC algorithm. Attached Figure Description

[0018] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings: Figure 1 This is a flowchart of one embodiment of the high-precision, low-power CORDIC algorithm of the present invention.

[0019] Figure 2 for Figure 1 Flowchart of step S100.

[0020] Figure 3 for Figure 1 Flowchart of S400.

[0021] Figure 4 This is a structural block diagram of one embodiment of the high-precision, low-power CORDIC algorithm device of the present invention. Detailed Implementation

[0022] The following disclosure provides various embodiments or examples for implementing different features of the present invention. Specific examples will be described below to simplify the invention. Of course, these are merely examples and are not intended to limit the invention.

[0023] Although the numerical ranges and parameter settings presented in this invention are approximations, the numerical settings in specific instances are reported as precisely as possible. Any numerical value inherently contains some necessary error arising from the standard deviation found in the respective test measurements. Similarly, as used herein, the term "about" generally refers to within 10%, 5%, 1%, or 0.5% of a given value or range. Alternatively, the term "about" means within an acceptable average standard error that can be conceived by one of ordinary skill in the art. Except in instances of operation / work, or unless expressly stated otherwise, all numerical ranges, totals, values, and percentages, such as those for material quantities, durations, temperatures, operating conditions, amounts, and other similarities disclosed herein, should be understood to be modified by the term "about" in all cases. Therefore, unless otherwise stated, the numerical parameter settings set forth in this invention and the appended claims are approximations that can be changed upon request. At a minimum, each numerical parameter should be interpreted based on the number of significant figures reported and the application of ordinary rounding techniques. A range herein may be expressed as from one endpoint to another or between two endpoints. All scopes disclosed herein include endpoints unless otherwise stated.

[0024] Furthermore, the technical parts described in this invention and the appended claims are primarily the improved technical parts of this invention, and do not limit the object protected by this invention to only having these technical parts. Other known essential components (structures and / or methods) and / or non-essential components of the object protected, besides the technical parts described in this invention and the appended claims, are not included in this invention and the appended claims because they do not fall within the scope of improvements of this invention; however, this does not mean that the object protected by this invention does not possess these known components.

[0025] Please see Figure 1 This is a flowchart of an embodiment of the high-precision, low-power CORDIC algorithm of the present invention. This embodiment includes the following steps: S100: Map the input angle to a preset angle range to obtain the corresponding mapped angle and mapping relationship.

[0026] For details, please refer to Figure 2 This step S100 includes the following sub-steps: S110. Extract the high-order field of the input angle to determine its corresponding peripheral angle range. The high-order field is the high four-bit binary code.

[0027] Specifically, the input angle θ is typically represented by a multi-bit binary number, with its value linearly corresponding to the entire circumference angle [0, 2π]. To quickly determine the quadrant and interval to which θ belongs, the algorithm extracts its most significant bits. In this implementation, for example, when the input is 20 bits, the high four bits are extracted. These four bits can represent 16 states, which precisely divide the entire circumference evenly into 16 sectors (i.e., 16 outer angle intervals), with each sector having an angle span of π / 8. These four bits are used to uniquely determine the outer angle interval of the input angle. This step can be completed through a simple bit selection operation with extremely low latency.

[0028] S120. Query the pre-stored angle mapping relationship table according to the outer angle range to obtain the corresponding angle conversion rules and coordinate correction rules.

[0029] Specifically, the angle mapping table defines the core mapping relationships: 1) how to transform the original angle θ to a preset angle range; 2) how to reconstruct the correct trigonometric function value of the original angle from the calculation results of the preset angle range. See Table 1 for details.

[0030] Table 1 Table 1 fully illustrates the mapping and correction rules after dividing the entire circumference into 16 equal parts, with each row corresponding to a sector of π / 8 (the outer angle interval).

[0031] S130. Based on the angle conversion rule, the input angle is calculated to obtain the mapped angle located within the preset angle range, wherein the preset angle range is... .

[0032] Angle transformation rules indicate how to calculate the position located from the original angle θ. The mapping angle θ' within. Unlike traditional algorithms... or Within the calculation range, this invention further compresses the folding target area (i.e., the preset angle range) to... Within a very small range, the lookup table size can be reduced, thus significantly decreasing the required memory size. Furthermore, it lays the foundation for high-precision iterations; within extremely small intervals, subsequent interval merging iterations handle smaller rotation angles, which helps improve overall computational accuracy.

[0033] S140. The coordinate correction rule is used as the mapping relationship for subsequent correction of coordinate values.

[0034] Specifically, the coordinate correction rule defines how, after calculating the sine and cosine values ​​of the mapped angle θ', the original cosθ and sinθ can be obtained through linear combination, sign inversion, or coordinate exchange.

[0035] For example: Assume the input angle θ = 3.0 rad (approximately 171.9°, located in the second quadrant (7π / 8, π] interval). Extract the high 4 bits of θ to determine that it belongs to the (7π / 8, π] interval. Look up the corresponding row in Table 1 to obtain the conversion rule: θ' = π - θ; correction rule: cosθ = -cosθ', sinθ = sinθ'. Calculate θ' = π - 3.0 ≈ 3.1416 - 3.0 = 0.1416 rad, which is within the angle interval [0, π / 8] (π / 8 ≈ 0.3927 rad). All subsequent core calculations will revolve around this mapped angle θ'.

[0036] This step S100, with extremely low hardware overhead, standardizes the computation problem at any angle into a computation problem within a very small interval. This is an important prerequisite for the present invention to achieve high precision (controllable computation error within a small interval), low power consumption (small lookup table) and low latency.

[0037] S200. The mapping angle is recoded in a two-polarization manner to obtain the rotation direction factor sequence required for all subsequent iterations.

[0038] Specifically, the mapping angle Located within the angle interval [0, π / 8], it can be precisely represented by an n-bit binary number. The relationship between its binary representation and the angle value satisfies the formula:

[0039] in, ∈{0, 1} is the nth binary number of the mapped angle.

[0040] Based on the above relationship, this step performs polarization recoding: each bit of the binary representation of the mapped angle is converted into a corresponding rotation direction factor; when the binary number is 1, the corresponding rotation direction factor is 1; when the binary number is 0, the corresponding rotation direction factor is -1. Thus, we obtain a predetermined sequence of rotation direction factors.

[0041] This enables the prediction of the rotation direction: the direction of all subsequent iterations no longer depends on the remaining angle calculated in real time after each iteration, but is uniquely determined by the binary code of the mapped angle. This eliminates the iteration direction dependency in the traditional CORDIC algorithm, providing the necessary conditions for subsequent interval merging iterations. It should be understood that this step does not necessarily have to be performed before step S300, as long as it is completed before the subsequent merging iteration calculations.

[0042] S300. Determine the iteration boundary point based on the set output bit width. For large-angle rotations before the iteration boundary point, directly obtain the intermediate coordinate value by querying the pre-stored lookup table.

[0043] Specifically, the formula for calculating the iteration boundary point is as follows: M=[(B-1) / 2] Where M represents the iteration boundary point, B represents the output bit width, and [·] represents the floor operation.

[0044] The lookup table uses the high-order bits of the mapped angle as the address. Each address stores a pre-calculated intermediate coordinate value, which is applicable to the entire angle sub-interval corresponding to that address. The intermediate coordinate value has undergone modulus compensation. The angle interval is divided into several angle sub-intervals. The specific number of address bits can be selected according to actual conditions. In this embodiment, the high (M-3) bits of the mapped angle are chosen as the address because large-angle rotations before the iteration boundary point are directly obtained by querying the pre-stored lookup table, i.e., the results of the previous (M-1) rotations are obtained directly through the lookup table. However, in step S100 of this scheme, the mapped angle interval is changed from the traditional... Compress to Considering that two extra bits of binary code will be used here, the high (M-3) bits of the mapping angle are chosen as the address.

[0045] The number of bits in the address directly determines the number of entries in the lookup table. Each additional bit doubles the table capacity, allowing for the storage of more precise intermediate coordinates for different angle sub-intervals, thus improving overall calculation accuracy. However, a larger table capacity also means greater hardware resource consumption and longer access latency. Choosing the high (M-3) bits of the mapped angle as the lookup table address strikes a good balance between accuracy and hardware cost.

[0046] The large-angle rotation before the iteration boundary is achieved using a lookup table. This table not only stores the rotation result but also pre-multiplies it with the result of the modulus compensation factor K. The modulus compensation factor is introduced because in the CORDIC calculation, a multiplication coefficient is eliminated in each iteration. This way, the angles of the x and y coordinates in the polar coordinate system remain unchanged after each rotation, but the modulus will become the original value. We then define a modulus compensation factor K, which represents the x and y coordinates after multiple rotations. and The formula for calculating the modulus compensation factor, which is proportional to the initial value, is as follows:

[0047] Therefore, the intermediate coordinate values ​​obtained by looking up the table are already corrected values, and no further modulus compensation is needed in subsequent iterations.

[0048] S400. For small angle rotations after the iteration boundary point, the interval merging iteration method is adopted to merge multiple consecutive iterations into a single combination operation. After at least one iteration merging operation, the final coordinate value corresponding to the mapping angle is obtained.

[0049] For details, please refer to Figure 3 This step S400 includes the following sub-steps: S410. Calculate a merged shift factor based on a series of consecutive rotation direction factors extracted from the rotation direction factor sequence, wherein the number of rotation direction factors is the same as the number of merging iterations.

[0050] S420. Based on the merging shift factor and the current coordinate value, the new coordinate value after multiple iterations is directly obtained through a combinational logic operation that includes shifting and addition / subtraction operations.

[0051] Specifically, the new coordinate values ​​after multiple iterations of merging are calculated using the following formula:

[0052] in, Indicates the intermediate coordinate value. This represents the new coordinate values ​​after merging. Indicates the merged shift factor. Indicates the rotation direction factor. Indicates the number of steps in the merge. Indicates the current iteration number. Greater than or equal to the iteration boundary point, Take values ​​in sequence , , , ..., .

[0053] For example, if the output bit width is 16 bits, the iteration boundary point ,Right now When entering the merge iteration, the traditional approach is:

[0054] The present invention directly constructs a combinational logic operation network. Assume that the 7th to 10th iterations are required. The combinational logic operation circuit first... , , , The value is used to calculate the total shift factor. :

[0055] here The calculation only requires simple bit concatenation and sign bit manipulation; no multiplier is needed. Then the hardware circuit executes:

[0056] Multiplication here In fact, it is implemented using a small number of shifters and adders, because It is the sum of powers of 2. In this process, the data is not repeatedly truncated, nor does it pass through intermediate registers. This not only saves the number of flip-flops in the actual circuit, but also ensures that the data participates in the intermediate calculations with full precision until the last necessary truncation.

[0057] In a preferred embodiment, the step of calculating the merged shift factor is implemented by querying a predefined interval merge iterative calculation table. The interval merge iterative calculation table uses the binary code formed by the consecutive rotation direction factors as an index to retrieve the corresponding shift operation combination. See Table 2:

[0058] Table 2 The specific number of bits in the index can be set according to actual needs, and can be two-bit, three-bit, etc. In this embodiment, four consecutive rotation direction factors (i.e., four-bit binary codes) from high to low in the rotation direction factor sequence are selected as the index. Assuming that the merging of the 7th to 10th iterations is required (i=7, m=4), the corresponding shift operation combination is first obtained by looking up Table 2 based on the 7th to 10th bits of the binary code after the mapping angle polarization impulse encoding. For example, if the 7th to 10th bits of the binary code are 0001, the shift operation is found to be >>k-1->>k+2+>>k+3, and k=7 is taken to obtain the shift factor S=2. 6 2 9 +2 10 .

[0059] In traditional merging iterations, truncation of the shifted data to save resources introduces errors. After multiple iterations, these accumulated errors severely impact the final accuracy. Table 2 directly maps combinations of continuous rotation direction factors to a finite, optimal sequence of shift-addition operations (e.g., >>k-1->>k+3). This design directly addresses the problem of accumulated errors by proactively planning the merging interval and shifting method, reducing the total number of shift operations and optimizing the number of bits shifted each time, thereby minimizing the accuracy loss caused by truncation at the hardware level.

[0060] S500. Based on the mapping relationship, the final coordinate value is corrected to obtain the sine and cosine values ​​corresponding to the original input angle.

[0061] Specifically, based on the mapping relationship recorded in step S100, the final coordinate value of the mapped angle θ', i.e. (cosθ', sinθ'), is linearly transformed to restore and output the correct trigonometric function value (cosθ, sinθ) corresponding to the original input angle θ.

[0062] Please see Figure 4 This is a structural block diagram of an embodiment of the high-precision, low-power CORDIC algorithm device of the present invention. The high-precision, low-power CORDIC algorithm device of this embodiment is used to implement the high-precision, low-power CORDIC algorithm described in the above embodiment. Specifically, the high-precision, low-power CORDIC algorithm device of this embodiment includes an angle mapping unit 100, an intermediate value lookup unit 300, an iterative merging operation unit 400, and an output correction unit 500. Wherein: The angle mapping unit 100 is used to map the input angle to a preset angle range to obtain the corresponding mapped angle and mapping relationship. The angle mapping unit 100 has an embedded angle mapping relationship table, which can obtain the mapped angle and corresponding mapping relationship of the input angle according to the above steps S110-S140.

[0063] The intermediate value lookup unit 300 is used to determine the iteration boundary point according to the set output bit width. For large-angle rotations before the iteration boundary point, the intermediate coordinate value is directly obtained by querying a pre-stored lookup table. The intermediate value lookup unit 300 includes a lookup table memory, which pre-stores the coordinate values ​​of all angle sub-intervals represented by addresses within the angle interval [0, π / 8] after completing the first (M-1) rotations and performing modulus compensation. The intermediate value lookup unit 300 can directly obtain the intermediate coordinate value after the previous large rotation and modulus compensation by querying the lookup table according to the above step S300.

[0064] The iterative merging operation unit 400 is used to perform interval merging iteration for small angle rotations after the iteration boundary point. It merges multiple consecutive iterations into a single combined operation, and after at least one iterative merging operation, obtains the final coordinate value corresponding to the mapped angle. The iterative merging operation unit 400 internally includes a shifter, an adder, and an accumulator, and has an embedded interval merging iteration calculation table, enabling it to obtain the final coordinate value of the mapped angle according to the steps S410-S420 described above. The output correction unit 500 is used to correct the final coordinate value based on the mapping relationship to obtain the sine and cosine values ​​corresponding to the original input angle.

[0065] In addition, the high-precision, low-power CORDIC algorithm device of this embodiment further includes a polarization recoding unit 200, used to perform polarization recoding on the mapping angle to obtain the rotation direction factor sequence required for all subsequent iterations. The polarization recoding unit 200 can output the rotation direction factor sequence according to the above step S200 to provide a direction control signal for the iterative merging operation unit 400.

[0066] Table 3 shows the output accuracy comparison table, and Table 4 shows the power consumption comparison table. According to Tables 3 and 4, under the same output bit width, the average error of the improved scheme of this invention is lower than that of the traditional basic CORDIC algorithm, the two-stage algorithm, and the three-stage algorithm. For example, with 16-bit output, the error of this scheme is 4.29 × 10⁻⁶. -5 Compared to the basic algorithm's 6.81 × 10 -5 This represents an improvement of approximately 37%. Furthermore, while the improved solution of this invention offers higher computational accuracy, its overall power consumption is comparable to advanced two-stage and three-stage algorithms.

[0067]

[0068] Table 3

[0069] Table 4 This invention employs a highly efficient two-stage pipeline architecture. The first stage completes large-angle rotations in one step using a small-capacity lookup table; the second stage completes multiple iterative mergings in one step using combinational logic. This allows the entire computation process to be completed within an extremely short clock cycle, achieving high throughput and low latency, far faster than traditional algorithms. By compressing the mapped angle range, the capacity requirement of the lookup table storing previous rotation results is drastically reduced. Polarization recoding predicts all rotation directions, eliminating inter-iteration dependencies and eliminating the need to store a large number of intermediate results during interval merging iterations, saving register resources. The calculation of shift factors is transformed into a few fixed shift-addition operations by querying the interval merging iteration calculation table, replacing the general multiplication-accumulation unit. These measures collectively reduce circuit area and lower resource and power consumption. By merging multiple consecutive small-angle rotations into a single combinational calculation using the interval merging iteration method, the data only needs to be truncated once during the final output, rather than after each iteration, fundamentally and significantly reducing the accumulated error caused by finite bit-width representation. This invention achieves a balance between accuracy, speed, and resources, while overcoming the long-standing problems of limited accuracy, high iteration delay, and high resource consumption in the CORDIC algorithm.

Claims

1. A high-precision, low-power CORDIC algorithm, characterized in that, Includes the following steps: The input angle is mapped to a preset angle range to obtain the corresponding mapped angle and mapping relationship; The iteration boundary point is determined based on the set output bit width. For large-angle rotations before the iteration boundary point, the intermediate coordinate value is directly obtained by querying the pre-stored lookup table. For small angular rotations after the iteration boundary point, the interval merging iteration method is adopted to merge multiple consecutive iterations into a single combination operation. After at least one iteration merging operation, the final coordinate value corresponding to the mapping angle is obtained. Based on the mapping relationship, the final coordinate values ​​are corrected to obtain the sine and cosine values ​​corresponding to the original input angle.

2. The high-precision, low-power CORDIC algorithm as described in claim 1, characterized in that, The step of mapping the input angle to a preset angle range to obtain the corresponding mapped angle and mapping relationship includes the following sub-steps: Extract the high-order bits of the input angle to determine its corresponding peripheral angle range; the high-order bits are the high four bits of binary code. Based on the aforementioned outer angle range, query the pre-stored angle mapping relationship table to obtain the corresponding angle conversion rules and coordinate correction rules; Based on the angle conversion rules, the input angle is calculated to obtain the mapped angle located within the preset angle range, where the preset angle range is... ; The coordinate correction rule is used as a mapping relationship for subsequent correction of coordinate values.

3. The high-precision, low-power CORDIC algorithm as described in claim 1, characterized in that, After obtaining the corresponding mapping angles and mapping relationships, the following steps are also included: The mapping angle is recoded using polarization to obtain the rotation direction factor sequence required for all subsequent iterations.

4. The high-precision, low-power CORDIC algorithm as described in claim 3, characterized in that, The step of performing polarization recoding on the mapped angle includes: converting each bit of the binary representation of the mapped angle into a corresponding rotation direction factor; when the binary number is 1, the corresponding rotation direction factor is 1; when the binary number is 0, the corresponding rotation direction factor is -1.

5. The high-precision, low-power CORDIC algorithm as described in claim 3, characterized in that, For small angular rotations after the iteration boundary point, the interval merging iteration method is used to merge multiple consecutive iterations into a single combined operation. This step includes the following sub-steps: A merging shift factor is calculated based on a series of consecutive rotation direction factors extracted from the rotation direction factor sequence, wherein the number of rotation direction factors is the same as the number of merging iterations. Based on the merging shift factor and the current coordinate value, the new coordinate value after multiple iterations of merging is directly obtained through a single combinational logic operation that includes shifting and addition / subtraction operations.

6. The high-precision, low-power CORDIC algorithm as described in claim 5, characterized in that, The new coordinate values ​​after multiple iterations of merging are calculated using the following formula: in, Indicates the intermediate coordinate value. This represents the new coordinate values ​​after merging. Indicates the merged shift factor. Indicates the rotation direction factor. Indicates the number of steps in the merge. Indicates the current iteration number. Greater than or equal to the iteration boundary point, Take values ​​in sequence , , , ..., .

7. The high-precision, low-power CORDIC algorithm as described in claim 5 or claim 6, characterized in that: The step of calculating the merge shift factor is implemented by querying a predefined interval merge iteration calculation table; the interval merge iteration calculation table is indexed by the binary code formed by the consecutive multiple rotation direction factors, and the corresponding shift operation combination is obtained by querying.

8. The high-precision, low-power CORDIC algorithm as described in claim 1, characterized in that: When determining the iteration boundary point based on the set output bit width, the calculation formula for the iteration boundary point is as follows: M=[(B-1) / 2] Where M represents the iteration boundary point, B represents the output bit width, and [·] represents the floor operation.

9. The high-precision, low-power CORDIC algorithm as described in claim 1, characterized in that: The lookup table uses the high-order field of the mapped angle as the address. Each address stores a pre-calculated intermediate coordinate value. This intermediate coordinate value is applicable to the entire angle sub-interval corresponding to that address. The intermediate coordinate value has been compensated for the modulus. The angle interval is divided into several angle sub-intervals.

10. A high-precision, low-power CORDIC algorithm device, characterized in that, include: An angle mapping unit is used to map the input angle to a preset angle range to obtain the corresponding mapped angle and mapping relationship; The intermediate value lookup unit is used to determine the iteration boundary point based on the set output bit width. For large-angle rotations before the iteration boundary point, the intermediate coordinate value is directly obtained by querying the pre-stored lookup table. The iterative merging operation unit is used to merge multiple consecutive iterations into a single combination operation for small angle rotations after the iteration boundary point using the interval merging iteration method. After at least one iterative merging operation, the final coordinate value corresponding to the mapping angle is obtained. The output correction unit is used to correct the final coordinate value based on the mapping relationship to obtain the sine and cosine values ​​corresponding to the original input angle.