[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r7799 - gnuradio/branches/developers/jcorgan/iqb/usrp/
From: |
jcorgan |
Subject: |
[Commit-gnuradio] r7799 - gnuradio/branches/developers/jcorgan/iqb/usrp/fpga/sdr_lib |
Date: |
Sat, 23 Feb 2008 13:40:05 -0700 (MST) |
Author: jcorgan
Date: 2008-02-23 13:40:03 -0700 (Sat, 23 Feb 2008)
New Revision: 7799
Modified:
gnuradio/branches/developers/jcorgan/iqb/usrp/fpga/sdr_lib/iq_balancer.v
Log:
Added magnitude and phase adjustment. Surprisingly, non-registered,
combinatorial multipliers synthesized to a total of 67% (vs. 58%), and met slow
timing requirements. Untested.
Modified:
gnuradio/branches/developers/jcorgan/iqb/usrp/fpga/sdr_lib/iq_balancer.v
===================================================================
--- gnuradio/branches/developers/jcorgan/iqb/usrp/fpga/sdr_lib/iq_balancer.v
2008-02-23 19:54:22 UTC (rev 7798)
+++ gnuradio/branches/developers/jcorgan/iqb/usrp/fpga/sdr_lib/iq_balancer.v
2008-02-23 20:40:03 UTC (rev 7799)
@@ -36,11 +36,11 @@
localparam MAG_ADDR = REGBASE + 1;
localparam PHASE_ADDR = REGBASE + 2;
- wire [15:0] i_offset_adj;
- wire [15:0] q_offset_adj;
- wire [15:0] i_mag_adj;
- wire [15:0] i_phase_adj;
- wire [15:0] q_phase_adj;
+ wire signed [15:0] i_offset_adj;
+ wire signed [15:0] q_offset_adj;
+ wire signed [15:0] i_mag_adj;
+ wire signed [15:0] i_phase_adj;
+ wire signed [15:0] q_phase_adj;
setting_reg #(OFFSET_ADDR) sr_offset
(.clock(clock),
@@ -67,10 +67,15 @@
.out({i_phase_adj,q_phase_adj}) );
// Add in DC offset balance
- wire [15:0] i_offset_bal = i_in + i_offset_adj;
- wire [15:0] q_offset_bal = q_in + q_offset_adj;
+ wire signed [15:0] i_offset_bal = i_in + i_offset_adj;
+ wire signed [15:0] q_offset_bal = q_in + q_offset_adj;
- assign i_out = i_offset_bal;
- assign q_out = q_offset_bal;
+ // Apply magnitude adjustment to I channel
+ wire signed [31:0] i_mag = i_offset_bal*i_mag_adj;
+ assign i_out = i_mag[29:14];
+
+ // Apply phase adjustment to Q channel
+ wire signed [31:0] q_phase = i_out*i_phase_adj + q_offset_bal*q_phase_adj;
+ assign q_out = q_phase[31:16];
endmodule // iq_balancer
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r7799 - gnuradio/branches/developers/jcorgan/iqb/usrp/fpga/sdr_lib,
jcorgan <=