Generates an I/Q phaser from an either absolute or relative phase input, in the relative case referenced to another I/Q input pair. The phase is specified as binary input, where full scale wraps to zero phase. There are also negative outputs, as well as a I, Q, -I, -Q ... output referenced to a quadrant input.
Ports | Parameters | Notes | Example
clk | input | The clock input. |
reset | input | The reset input. |
go | input | A multi-bit trigger to start conversions. |
gonow | output | When go is a multi-bit vector providing a multi-level trigger, the gonow output is asserted for one clock cycle when all trigger events have occurred. This pulse initiates the Cordic rotation. |
phase | input | A multi-bit trigger to start conversions. |
phasein | input | The phase to which the phase of the output I/Q vector is to be set or shifted by. |
Iin, Qin | input | The input I/Q pair. In the the relative mode where the parameter mag > 0, the output phase is the phase of this pair shifted by phase. |
Iout, Qout | output | The output I/Q pair. The phase of this pair is phase in absolute mode, and the phase of Iin/Qin in relative mode. |
IoutN, QoutN | output | The twos-complement negative of Iout and Qout. |
quad | input | A two-bit quadrant counter used to generate the upconverted out output from Iout, Qout, IoutN, and QoutN |
busy | output | When asserted, indicates that a Cordic rotation is underway. |
done | output | When asserted, always for one clock pulse, indicates that the Cordic rotation has finished and that data are valid on the Iout, Qout, IoutN, and QoutN outputs. |
out | output | The up-converted (I, Q, −I, −Q ... ) data stream. |
Parameters, their defaults, and descriptions:
wd | 15 | The bit width of the inputs Iin and Qin. Through the Cordic rotation, this vector grows by the factor 1.6468. For this reason, the outputs Iout, Qout, IoutN, and QoutN have one addition bit of width (wd+1) than the inputs. |
wc | 4 | The width of the counter timing the Cordic rotation. The condition 2wc ≥ wd must be met. |
wp | wd | The width of the phase input timing the Cordic rotation. The condition 2wc ≥ wd must be met. |
gobits | 1 | The number of bits of the go trigger vector. |
registered | "no" | Selects whether the output is registered. If registered, then the timing of the outputs is delayed by one clock cycle. |
mag | 32500 | When nonzero, then the absolute-phase mode is selected, and mag sets the magnitude of the starting phaser for the Cordic rotation. It must be in the range 0 to 2wd-1-1. In this mode, the inputs Iin and Qin are not used. If mag is zero, then the relative-phase mode is selected and the starting phaser for the Cordic rotation is set by the inputs Iin and Qin. |
These plots are of a simulated spectrum obtained from the Xilinx ISim simulator showing a single dominant channel. No windowing functions is used; instead, the length of the array from which this spectrum was computed was chosen to be an integral number of signal periods.
localparam wd = 16; wire signed [wd:0] Iout1, Qout1, IoutN1, QoutN1, out1; wire busy1, done1; Rotator #(.wd(wd), .wc(4), .registered("yes")) cr1 ( .clk(clk), .reset(reset), .go(go2), .phasein(phase1), .Iout(Iout1), .Qout(Qout1), .IoutN(IoutN1), .QoutN(QoutN1), .quad(quad), .out(out1), .busy(busy1), .done(done1), .preg(preg) );