Assembly line structure CORDIC circuit, implementation method thereof, equipment and medium
By adopting a pipelined CORDIC circuit in the communication system, the hardware complexity problem caused by directly calculating complex signal angles is solved, and angle calculation with small area and high throughput is realized, which is suitable for communication systems with differential angle modulation.
Patent Information
- Application Number
- CN202510141526.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-08
- Publication Date
- 2025-06-03
AI Technical Summary
In differential angle modulation communication systems, directly using trigonometric functions to calculate the angle of complex signals requires complex hardware circuits or a large number of table storage, resulting in unoptimized chip area.
The CORDIC circuit adopts a pipeline structure, by obtaining the initial value of the rotation angle and the complex coordinates, quadrant judgment and correction are performed, the rotation angle is iterated and the complex coordinates are updated until the preset number of iterations is reached, and finally the correction is made based on the quadrant and threshold value to obtain the final angle value.
A CORDIC circuit with small area and high throughput is realized. The complex signal can be input in a streaming manner, and the delay can be obtained when passing through the pipeline.
Smart Images

Figure CN120085829A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of COFDM communication systems, and particularly to a pipelined CORDIC circuit and its implementation method, device, and medium. Background Art
[0002] In a communication system with differential angle modulation, a CORDIC circuit is usually required to calculate the angle of a complex signal. Due to the arbitrariness of the angle, if trigonometric functions are directly used for calculation, complex hardware circuits are required, or a large number of tables are needed to store the values of trigonometric functions, which is not conducive to optimizing the chip area.
[0003] Therefore, it is necessary to provide a new method to solve the above technical problems. Summary of the Invention
[0004] To achieve the above objects and other advantages of the present invention, the first object of the present invention is to provide an implementation method of a pipelined CORDIC circuit, including the following steps:
[0005] Obtain the initial value of the rotation angle and the complex coordinates of the input signal;
[0006] Judge the quadrant where the complex coordinates are located to correct the complex coordinates;
[0007] Judge the positive or negative of the ordinate of the complex coordinates to iterate the rotation angle and update the complex coordinates until a preset number of iterations is reached;
[0008] Correct the rotation angle according to the quadrant judgment result;
[0009] Judge whether the rotation angle reaches a threshold value to correct the rotation angle and obtain the final angle value.
[0010] Further, the step of judging the quadrant where the complex coordinates are located to correct the complex coordinates includes:
[0011] If the complex coordinates are in the second or third quadrant, take the opposite of the abscissa of the complex coordinates to flip the complex coordinate point to the first or fourth quadrant;
[0012] If the complex coordinates are in the first or fourth quadrant, directly jump to the step of judging the positive or negative of the ordinate of the complex coordinates.
[0013] Further, the second or third quadrant is configured as the quadrant where the abscissa is less than 0, and the first or fourth quadrant is configured as the quadrant where the abscissa is greater than 0.
[0014] Further, the step of judging the positive or negative of the ordinate of the complex coordinate to iterate the rotation angle and update the complex coordinate until the preset number of iterations is reached includes:
[0015] If the ordinate of the complex coordinate is positive, rotate clockwise by a preset angle, and update the complex coordinate and the rotation angle;
[0016] If the ordinate of the complex coordinate is negative, rotate counterclockwise by a preset angle, and update the complex coordinate and the rotation angle;
[0017] Then, by judging the positive or negative of the ordinate of the updated complex coordinate, continue to iterate the rotation angle until the preset number of iterations is reached.
[0018] Further, the tan value of the preset angle is 1 / 2 of the tan value of the previous preset angle.
[0019] Further, the update formula of the complex coordinate is:
[0020] x(n + 1) = x(n) - y(n) / 2 n
[0021] y(n + 1) = y(n) + x(n) / 2 n .
[0022] Further, the update of the rotation angle includes the following steps:
[0023] If the ordinate of the complex coordinate is positive, calculate the sum of the previous rotation angle and the current preset angle to obtain the updated rotation angle;
[0024] If the ordinate of the complex coordinate is negative, calculate the difference between the previous rotation angle and the current preset angle to obtain the updated rotation angle.
[0025] Further, the preset number of iterations is 7 times.
[0026] Further, the step of correcting the rotation angle according to the quadrant judgment result includes:
[0027] If the quadrant judgment result is in the second quadrant, calculate the difference between the quantization value corresponding to 180° and the current rotation angle to obtain the corrected rotation angle;
[0028] If the quadrant judgment result is in the third quadrant, calculate the difference between the inverse of the quantization value corresponding to 180° and the current rotation angle to obtain the corrected rotation angle;
[0029] If the quadrant judgment result is in the first or fourth quadrant, jump to the step of judging whether the rotation angle reaches the threshold.
[0030] Further, the step of determining whether the rotation angle reaches a threshold value to correct the rotation angle to obtain a final angle value includes:
[0031] If the rotation angle is greater than or equal to the quantization value corresponding to 180°, calculate the difference between the rotation angle and the quantization value corresponding to 360° to obtain the final angle value.
[0032] The second object of the present invention is to provide a pipelined CORDIC circuit implemented by the above method.
[0033] The third object of the present invention is to provide a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the steps of the above method are implemented.
[0034] The fourth object of the present invention is to provide a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above method are implemented.
[0035] Compared with the prior art, the beneficial effects of the present invention are:
[0036] The present invention provides a pipelined CORDIC circuit, its implementation method, device and medium. The CORDIC circuit adopting a pipelined structure not only has a small area but also a high throughput. Complex signals can be input into the CORDIC circuit implemented by this method in a pipelined manner. After a long pipeline delay, continuous conversion results can be obtained.
[0037] The above description is only an overview of the technical solution of the present invention. In order to be able to understand the technical means of the present invention more clearly and implement it in accordance with the content of the specification, the following takes the preferred embodiments of the present invention and combines with the accompanying drawings to explain in detail as follows. The specific implementation manner of the present invention is given in detail by the following embodiments and their accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] The accompanying drawings described herein are used to provide a further understanding of the present invention, and constitute a part of this application. The illustrative embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation to the present invention. In the drawings:
[0039] Figure 1 is a flowchart of the implementation method of the pipelined CORDIC circuit;
[0040] Figure 2 is a flowchart of complex coordinate correction;
[0041] Figure 3 is a flowchart of rotation angle iteration;
[0042] Figure 4 It is a flowchart for rotation angle correction;
[0043] Figure 5 It is a schematic diagram of the principle of angle rotation;
[0044] Figure 6 It is a block diagram of the CORDIC circuit;
[0045] Figure 7 It is a schematic diagram of a computer device;
[0046] Figure 8 It is a schematic diagram of a computer-readable storage medium. Specific embodiments
[0047] Next, in combination with the accompanying drawings and specific embodiments, the present invention will be further described. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. It should be noted that, on the premise of no conflict, the following-described embodiments or technical features can be combined arbitrarily to form new embodiments.
[0048] All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts belong to the scope of protection of the present invention.
[0049] In this application, the accompanying drawing numbers are only used to distinguish each step in the solution and are not used to limit the execution order of each step. The specific execution order shall be subject to the description in the specification.
[0050] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field to which the present invention belongs. The terms used in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention.
[0051] The present invention is applied to a COFDM communication system, with a modulation method of DQPSK, and is implemented by a CORDIC hardware circuit that converts complex coordinates into angles.
[0052] The implementation principle of a method for implementing a pipelined CORDIC circuit provided by the present invention is as Figure 5 shown. Assuming that the complex coordinate of the input signal is (x, y), if (x, y) is rotated clockwise by an angle θ to obtain a new coordinate (x', y'), then according to the trigonometric function relationship:
[0053] x = R * Cosα
[0054] y = R * Sinα
[0055] x' = R * Cos(α + θ) = R[Cosα * Cosθ - Sinα * Sinθ] = x * Cosθ - y * Sinθ
[0056] y' = R * Sin(α + θ) = R[Sinα * Cosθ + Cosα * Sinθ] = y * Cosθ + x * Sinθ
[0057] It can also be written as:
[0058] x' = (x – ytanθ) * Cosθ
[0059] y' = (y + xtanθ) * Cosθ
[0060] Let Cosθ be p(n), then the above formula can be further simplified as:
[0061] x(n + 1) = p(n) * (x(n) – y(n) * tanθ)
[0062] y(n + 1) = p(n) * (y(n) + x(n) * tanθ)
[0063] According to the characteristics of hardware implementation, the power - of - 2 circuit is relatively easy to implement, so tanθ is divided into several 1 / 2 n to represent.
[0064] Also, since the signal of DQPSK modulation only cares about the angle and not about the amplitude p(n), the above formula can be further simplified as:
[0065] x(n + 1) = x(n) – y(n) * tanθ = x(n) - y(n) / 2 n
[0066] y(n + 1) = y(n) + x(n) * tanθ = y(n) + x(n) / 2 n
[0067] Use z(n) to represent the rotation angle z(n) = θ = atan(1 / 2 n ).
[0068] Embodiment 1
[0069] Combined with the above principle, this embodiment provides a method for implementing a pipelined - structure CORDIC circuit, as Figure 1 shown, including the following steps:
[0070] S1. Obtain the initial value of the rotation angle and the complex - number coordinates (x, y) of the input signal;
[0071] Optionally, set the initial value of the rotation angle θ to 0.
[0072] S2. Determine the quadrant in which the complex coordinate is located to correct the complex coordinate;
[0073] In some embodiments, as Figure 2 shown, the step of determining the quadrant in which the complex coordinate is located to correct the complex coordinate includes:
[0074] S21. Determine whether the complex coordinate is in the second or third quadrant; wherein, the second or third quadrant is configured as the quadrant where the abscissa is less than 0, and the first or fourth quadrant is configured as the quadrant where the abscissa is greater than 0.
[0075] Therefore, by determining whether the abscissa of the complex coordinate is less than 0, it is determined whether the complex coordinate is in the second or third quadrant.
[0076] S22. If the complex coordinate is in the second or third quadrant, then take the opposite of the abscissa of the complex coordinate to flip the complex coordinate point to the first or fourth quadrant;
[0077] S23. If the complex coordinate is in the first or fourth quadrant, then directly jump to the step of determining the positive or negative of the ordinate of the complex coordinate, that is, step S3.
[0078] S3. Determine the positive or negative of the ordinate of the complex coordinate to iterate the rotation angle and update the complex coordinate until a preset number of iterations is reached;
[0079] In some embodiments, as Figure 3 shown, the step of determining the positive or negative of the ordinate of the complex coordinate to iterate the rotation angle and update the complex coordinate until a preset number of iterations is reached includes:
[0080] S31. Determine whether the ordinate of the complex coordinate is positive;
[0081] S32. If the ordinate of the complex coordinate is positive, then rotate clockwise by a preset angle, and update the complex coordinate (x(n + 1), y(n + 1)) and the rotation angle θ;
[0082] S33. If the ordinate of the complex coordinate is negative, then rotate counterclockwise by a preset angle, and update the complex coordinate and the rotation angle;
[0083] S34. Determine whether the preset number of iterations is reached;
[0084] Otherwise, by determining the positive or negative of the ordinate of the updated complex coordinate, continue the rotation angle iteration, that is, repeat the above steps S31 to S33 until the preset number of iterations is reached;
[0085] S35. If so, end the rotation angle iteration.
[0086] Combined with the above principle, preferably, the tangent value of the preset angle is 1 / 2 of the tangent value of the previous preset angle.
[0087] Further, the update formula for the complex coordinates is as follows:
[0088] x(n + 1) = x(n) - y(n) / 2 n
[0089] y(n + 1) = y(n) + x(n) / 2 n 。
[0090] Further, the update of the rotation angle includes the following steps:
[0091] If the ordinate of the complex coordinate is positive, calculate the sum of the previous rotation angle and the current preset angle to obtain the updated rotation angle;
[0092] If the ordinate of the complex coordinate is negative, calculate the difference between the previous rotation angle and the current preset angle to obtain the updated rotation angle.
[0093] In this embodiment, the rotation angle is iterated multiple times. The tangent value of the current preset angle is 1 / 2 of the tangent value of the previous preset angle. If the ordinate is positive, rotate clockwise; if the ordinate is negative, rotate counterclockwise. In a gradually approaching manner, x(n + 1) and y(n + 1) gradually approach the positive x-axis. Preferably, the preset number of iterations is 7 times. After 7 iterations, the calculation error is expected to be negligible, so the pipeline stage is set to 7 levels. 7 atan values need to be pre-cured in the circuit, and the cumulative value of the 7 rotation angles is the included angle between the complex coordinate and the positive x-axis. The relevant parameters of the seven rotation angle iterations are shown in Table 1.
[0094] Table 1 Relevant parameters of seven rotation angle iterations
[0095]
[0096]
[0097] The specific steps are as follows:
[0098] Judge whether the ordinate of the complex coordinate is positive or negative. If it is positive, rotate clockwise by 45°, update the coordinates (x(n + 1), y(n + 1)), and update θ = θ + 45 0 ; if it is negative, rotate counterclockwise by 45°, update the coordinates (x(n + 1), y(n + 1)), and update θ = θ - 45 0 ,jump to the next step;
[0099] Determine whether the ordinate of the new complex coordinate (x(n + 1), y(n + 1)) is positive or negative. If it is positive, rotate clockwise by 26.72°, update the coordinate (x(n + 1), y(n + 1)), and update θ = θ + 26.72°; if it is negative, rotate counterclockwise by 26.72°, update the coordinate (x(n + 1), y(n + 1)), and update θ = θ - 26.72°, then jump to the next step;
[0100] Determine whether the ordinate of the new complex coordinate (x(n + 1), y(n + 1)) is positive or negative. If it is positive, rotate clockwise by 14.06°, update the coordinate (x(n + 1), y(n + 1)), and update θ = θ + 14.06°; if it is negative, rotate counterclockwise by 14.06°, update the coordinate (x(n + 1), y(n + 1)), and update θ = θ - 14.06°, then jump to the next step;
[0101] Determine whether the ordinate of the new complex coordinate (x(n + 1), y(n + 1)) is positive or negative. If it is positive, rotate clockwise by 7.03°, update the coordinate (x(n + 1), y(n + 1)), and update θ = θ + 7.03°; if it is negative, rotate counterclockwise by 7.03°, update the coordinate (x(n + 1), y(n + 1)), and update θ = θ - 7.03°, then jump to the next step;
[0102] Determine whether the ordinate of the new complex coordinate (x(n + 1), y(n + 1)) is positive or negative. If it is positive, rotate clockwise by 4.22°, update the coordinate (x(n + 1), y(n + 1)), and update θ = θ + 4.22°; if it is negative, rotate counterclockwise by 4.22°, update the coordinate (x(n + 1), y(n + 1)), and update θ = θ - 4.22°, then jump to the next step;
[0103] Determine whether the ordinate of the new complex coordinate (x(n + 1), y(n + 1)) is positive or negative. If it is positive, rotate clockwise by 1.41°, update the coordinate (x(n + 1), y(n + 1)), and update θ = θ + 1.41°; if it is negative, rotate counterclockwise by 1.41°, update the coordinate (x(n + 1), y(n + 1)), and update θ = θ - 1.41°, then jump to the next step;
[0104] Determine whether the ordinate of the new complex coordinate (x(n + 1), y(n + 1)) is positive or negative. If it is positive, rotate clockwise by 1.41°, update the coordinate (x(n + 1), y(n + 1)), and update θ = θ + 1.41°; if it is negative, rotate counterclockwise by 1.41°, update the coordinate (x(n + 1), y(n + 1)), and update θ = θ - 1.41°, then jump to the next step.
[0105] At this time, correction is performed according to whether the abscissa of the original complex coordinate is positive or negative. Since the coordinate points in the second and third quadrants are flipped to the first and fourth quadrants for processing, an inverse transformation is performed here. The specific steps are as follows:
[0106] S4. Correct the rotation angle according to the quadrant judgment result;
[0107] In some embodiments, as Figure 4 shown, the step of correcting the rotation angle according to the quadrant judgment result includes:
[0108] S41. If the quadrant judgment result is in the second quadrant, calculate the difference between the quantization value corresponding to 180° and the current rotation angle to obtain the corrected rotation angle;
[0109] Combined with Table 1, the 8-bit quantization value corresponding to 180° is 128. Therefore, if in the second quadrant, the angle correction is θ = 128 - θ.
[0110] S42. If the quadrant judgment result is in the third quadrant, calculate the difference between the inverse of the quantization value corresponding to 180° and the current rotation angle to obtain the corrected rotation angle;
[0111] Combined with Table 1, the 8-bit quantization value corresponding to 180° is 128. Therefore, if in the third quadrant, the angle correction is θ = -128 - θ.
[0112] S43. If the quadrant judgment result is in the first or fourth quadrant, jump to the step of judging whether the rotation angle reaches the threshold, that is, jump to S5 step.
[0113] S5. Judge whether the rotation angle reaches the threshold to correct the rotation angle to obtain the final angle value.
[0114] In some embodiments, the step of judging whether the rotation angle reaches the threshold to correct the rotation angle to obtain the final angle value includes:
[0115] If the rotation angle is greater than or equal to the quantization value corresponding to 180°, calculate the difference between the rotation angle and the quantization value corresponding to 360° to obtain the final angle value.
[0116] Combined with Table 1, the 8-bit quantization value corresponding to 180° is 128. If θ >= 128, it means that the rotation exceeds 180°, and the angle correction is θ = θ - 256, and this θ is the final angle value of the complex coordinate.
[0117] The present invention provides a method for implementing a pipelined CORDIC circuit. The pipelined CORDIC circuit not only has a small area but also a high throughput. Complex signals can be input into the CORDIC circuit implemented by this method in a pipelined manner. After a delay equal to the pipeline length, continuous conversion results can be obtained.
[0118] Embodiment 2
[0119] A pipelined CORDIC circuit is implemented by using the method for implementing a pipelined CORDIC circuit provided in Embodiment 1. For a detailed description of the method for implementing the pipelined CORDIC circuit provided in Embodiment 1, reference can be made to the corresponding description in Embodiment 1, which will not be elaborated here. As Figure 6 shown, this CORDIC circuit is implemented using adders, shifters, comparators, and selectors and is written in Verilog scripting language.
[0120] This embodiment provides a pipelined CORDIC circuit implemented by using the method of Embodiment 1. In a specific application scenario (DQPSK modulation mode), simple adders, shifters, comparators, and selectors are used to replace the traditional look-up table method to implement the CORDIC circuit, and only 7 atan values need to be stored. This greatly simplifies the complexity of hardware implementation, retains accuracy, improves throughput, reduces chip area, and enhances competitiveness.
[0121] Embodiment 3
[0122] A computer device 600, as Figure 7 shown, includes a memory 610, a processor 620, and a computer program 630 stored in the memory and executable on the processor. When the processor executes the computer program, the steps of a method for implementing a pipelined CORDIC circuit are realized. For a detailed description of the method, reference can be made to the corresponding description in the above method embodiments, which will not be elaborated here.
[0123] Embodiment 4
[0124] A computer-readable storage medium, as Figure 8 shown, stores a computer program thereon. When the computer program is executed by a processor, the steps of a method for implementing a pipelined CORDIC circuit are realized. For a detailed description of the method, reference can be made to the corresponding description in the above method embodiments, which will not be elaborated here.
[0125] The number of devices and the processing scale described here are used to simplify the description of the present invention. Applications, modifications, and variations of the present invention will be obvious to those skilled in the art.
[0126] Although the embodiments of the present invention have been disclosed as above, they are not limited to the applications listed in the specification and the embodiments. It can be fully applied to various fields suitable for the present invention. For those skilled in the art, additional modifications can be easily made. Therefore, without departing from the general concept defined by the claims and their equivalents, the present invention is not limited to the specific details and the illustrated and described examples here.
[0127] The devices, computer devices, non-volatile computer storage media, and methods provided in the embodiments of this specification are corresponding. Therefore, the devices, computer devices, and non-volatile computer storage media also have beneficial technical effects similar to those of the corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the corresponding devices, computer devices, and non-volatile computer storage media will not be elaborated here.
[0128] Those skilled in the art also know that in addition to implementing the controller in the form of pure computer-readable program code, the method steps can be logically programmed to enable the controller to be implemented in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, embedded microcontrollers, etc. to achieve the same functions. Therefore, such a controller can be regarded as a hardware component, and the devices included therein for implementing various functions can also be regarded as the structures within the hardware component. Or even, the devices for implementing various functions can be regarded as either software units for implementing the method or structures within the hardware component.
[0129] The systems, devices, or units illustrated in the above embodiments can be specifically implemented by computer chips or entities, or by products with certain functions. For the convenience of description, when describing the above devices, they are divided into various units according to functions and described separately. Of course, when implementing one or more embodiments of this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0130] Those skilled in the art should understand that the embodiments of this specification can be provided as methods, systems, or computer program products. Therefore, the embodiments of this specification can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the embodiments of this specification can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memories, CD-ROMs, optical memories, etc.) containing computer-usable program code.
[0131] This specification is described with reference to the flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the specification. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and combinations of flows and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to the processors of general purpose computers, special purpose computers, embedded processors, or other programmable data processing devices to produce a machine, such that the instructions executed by the processors of the computer or other programmable data processing devices produce means for implementing the functions specified in the flow Figure 1 one or more flows and / or blocks Figure 1 or means for implementing the functions specified in a block or multiple blocks.
[0132] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory produce a manufacture including instruction means that implement the functions specified in the flow Figure 1 one or more flows and / or blocks Figure 1 or a block or multiple blocks.
[0133] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in the flow Figure 1 one or more flows and / or blocks Figure 1 or a block or multiple blocks.
[0134] It should also be noted that the term "comprising", "including", or any other variation thereof is intended to cover non-exclusive inclusion, such that a process, method, commodity, or device including a series of elements not only includes those elements but also includes other elements not explicitly listed, or further includes elements inherent to such process, method, commodity, or device. Without further limitation, an element defined by the statement "including a..." does not exclude the existence of additional identical elements in the process, method, commodity, or device including the said element.
[0135] This specification can be described in the general context of computer-executable instructions executed by a computer, such as program units. Generally, program units include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The specification can also be practiced in a distributed computing environment where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program units can be located in local and remote computer storage media including storage devices.
[0136] Each embodiment in this specification is described in a progressive manner. For the same or similar parts among the embodiments, reference can be made to each other. Each embodiment focuses on the differences from other embodiments. In particular, for system embodiments, since they are basically similar to method embodiments, the description is relatively simple, and reference can be made to the relevant parts of the method embodiments for the related content.
[0137] The above is only for the embodiments of this specification and is not used to limit one or more embodiments of this specification. For those skilled in the art, one or more embodiments of this specification can have various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of one or more embodiments of this specification shall be included within the scope of the claims of one or more embodiments of this specification.
Claims
1. A method for implementing a pipeline structure CORDIC circuit, characterized in that: The following steps are involved: Get the initial value of the rotation angle and the complex coordinates of the input signal; Determine the quadrant in which the complex coordinates are located to correct the complex coordinates; Determine whether the ordinate of the complex coordinates is positive or negative, so as to iterate the rotation angle and update the complex coordinates until a preset number of iterations is reached; Correcting the rotation angle according to the quadrant judgment result; It is determined whether the rotation angle reaches a threshold value, so as to correct the rotation angle and obtain a final angle value.
2. The method for implementing a pipeline structure CORDIC circuit according to claim 1, characterized in that: The step of determining the quadrant in which the complex coordinates are located to correct the complex coordinates includes: If the complex coordinate is in the second or third quadrant, the abscissa of the complex coordinate is inverted to flip the complex coordinate point to the first or fourth quadrant; If the complex coordinate is in the first or fourth quadrant, the process directly jumps to the step of determining whether the vertical coordinate of the complex coordinate is positive or negative.
3. The method for implementing a pipeline structure CORDIC circuit according to claim 2, characterized in that: The second or third quadrant is configured as a quadrant with an abscissa less than 0, and the first or fourth quadrant is configured as a quadrant with an abscissa greater than 0.
4. The method for implementing a pipeline structure CORDIC circuit according to claim 1, characterized in that: The step of determining whether the vertical coordinate of the complex coordinate is positive or negative to iterate the rotation angle and update the complex coordinate until a preset number of iterations is reached includes: If the ordinate of the complex coordinate is positive, rotate clockwise by a preset angle, and update the complex coordinate and the rotation angle; If the ordinate of the complex coordinate is negative, rotate counterclockwise by a preset angle, and update the complex coordinate and the rotation angle; Then, by judging whether the updated complex coordinate ordinate is positive or negative, the rotation angle iteration is continued until the preset number of iterations is reached.
5. The method for implementing a pipeline structure CORDIC circuit as claimed in claim 4, characterized in that: The tan value of the preset angle is 1 / 2 of the tan value of the previous preset angle.
6. The method for implementing a pipeline structure CORDIC circuit according to claim 5, characterized in that: The updating formula of the complex coordinates is: x(n+1)=x(n)-y(n) / 2 n y(n+1) = y(n)+x(n) / 2 n 。 7. The method for implementing a pipeline structure CORDIC circuit according to claim 5, characterized in that: The updating of the rotation angle comprises the following steps: If the ordinate of the complex coordinate is positive, the sum of the previous rotation angle and the current preset angle is calculated to obtain an updated rotation angle; If the ordinate of the complex coordinate is negative, the difference between the previous rotation angle and the current preset angle is calculated to obtain an updated rotation angle.
8. The method for implementing a pipeline structure CORDIC circuit according to claim 1, characterized in that: The preset number of iterations is 7 times.
9. The method for implementing a pipeline structure CORDIC circuit according to claim 2, characterized in that: The step of correcting the rotation angle according to the quadrant judgment result comprises: If the quadrant judgment result is that it is in the second quadrant, then the difference between the quantized value corresponding to 180° and the current rotation angle is calculated to obtain a corrected rotation angle; If the quadrant judgment result is that it is in the third quadrant, the difference between the inverse of the quantized value corresponding to 180° and the current rotation angle is calculated to obtain a corrected rotation angle; If the quadrant determination result is that the device is in the first or fourth quadrant, the process proceeds to the step of determining whether the rotation angle reaches a threshold.
10. The method for implementing a pipeline structure CORDIC circuit according to claim 9, characterized in that: The step of determining whether the rotation angle reaches a threshold value to correct the rotation angle and obtain a final angle value includes: If the rotation angle is greater than or equal to the quantized value corresponding to 180°, the difference between the rotation angle and the quantized value corresponding to 360° is calculated to obtain the final angle value.
11. A pipeline structure CORDIC circuit, characterized in that: The method is implemented by the method according to any one of claims 1 to 10.
12. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 10 are implemented.
13. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 10 are implemented.