axi_ad9361: Add a TDD enable/disable parameter
parent
be41a8bcaa
commit
e42206e510
|
@ -170,6 +170,7 @@ module axi_ad9361 (
|
||||||
parameter IO_DELAY_GROUP = "dev_if_delay_group";
|
parameter IO_DELAY_GROUP = "dev_if_delay_group";
|
||||||
parameter DAC_DATAPATH_DISABLE = 0;
|
parameter DAC_DATAPATH_DISABLE = 0;
|
||||||
parameter ADC_DATAPATH_DISABLE = 0;
|
parameter ADC_DATAPATH_DISABLE = 0;
|
||||||
|
parameter TDD_CONTROL_EN = 0;
|
||||||
|
|
||||||
// physical interface (receive-lvds)
|
// physical interface (receive-lvds)
|
||||||
|
|
||||||
|
@ -298,10 +299,10 @@ module axi_ad9361 (
|
||||||
reg up_wack = 'd0;
|
reg up_wack = 'd0;
|
||||||
reg up_rack = 'd0;
|
reg up_rack = 'd0;
|
||||||
reg [31:0] up_rdata = 'd0;
|
reg [31:0] up_rdata = 'd0;
|
||||||
reg [15:0] adc_data_i0 = 16'b0;
|
reg [15:0] adc_data_i0_b = 16'b0;
|
||||||
reg [15:0] adc_data_q0 = 16'b0;
|
reg [15:0] adc_data_q0_b = 16'b0;
|
||||||
reg [15:0] adc_data_i1 = 16'b0;
|
reg [15:0] adc_data_i1_b = 16'b0;
|
||||||
reg [15:0] adc_data_q1 = 16'b0;
|
reg [15:0] adc_data_q1_b = 16'b0;
|
||||||
|
|
||||||
// internal clocks and resets
|
// internal clocks and resets
|
||||||
|
|
||||||
|
@ -346,11 +347,6 @@ module axi_ad9361 (
|
||||||
wire up_rack_tdd_s;
|
wire up_rack_tdd_s;
|
||||||
wire [31:0] up_rdata_tdd_s;
|
wire [31:0] up_rdata_tdd_s;
|
||||||
wire tdd_tx_dp_en_s;
|
wire tdd_tx_dp_en_s;
|
||||||
wire tdd_rx_vco_en_s;
|
|
||||||
wire tdd_tx_vco_en_s;
|
|
||||||
wire tdd_rx_rf_en_s;
|
|
||||||
wire tdd_tx_rf_en_s;
|
|
||||||
wire [ 7:0] tdd_status_s;
|
|
||||||
wire tdd_enable_s;
|
wire tdd_enable_s;
|
||||||
wire tdd_txnrx_s;
|
wire tdd_txnrx_s;
|
||||||
wire tdd_mode_s;
|
wire tdd_mode_s;
|
||||||
|
@ -497,15 +493,27 @@ module axi_ad9361 (
|
||||||
end
|
end
|
||||||
endgenerate
|
endgenerate
|
||||||
|
|
||||||
// TDD interface
|
generate
|
||||||
|
if (TDD_CONTROL_EN) begin
|
||||||
|
|
||||||
|
wire tdd_rx_vco_en_s;
|
||||||
|
wire tdd_tx_vco_en_s;
|
||||||
|
wire tdd_rx_rf_en_s;
|
||||||
|
wire tdd_tx_rf_en_s;
|
||||||
|
wire [ 7:0] tdd_status_s;
|
||||||
|
|
||||||
// additional flop to keep control and data synced
|
// additional flop to keep control and data synced
|
||||||
|
|
||||||
|
assign adc_data_i0 = adc_data_i0_b;
|
||||||
|
assign adc_data_q0 = adc_data_q0_b;
|
||||||
|
assign adc_data_i1 = adc_data_i1_b;
|
||||||
|
assign adc_data_q1 = adc_data_q1_b;
|
||||||
|
|
||||||
always @(posedge clk) begin
|
always @(posedge clk) begin
|
||||||
adc_data_i0 <= adc_data_i0_s;
|
adc_data_i0_b <= adc_data_i0_s;
|
||||||
adc_data_q0 <= adc_data_q0_s;
|
adc_data_q0_b <= adc_data_q0_s;
|
||||||
adc_data_i1 <= adc_data_i1_s;
|
adc_data_i1_b <= adc_data_i1_s;
|
||||||
adc_data_q1 <= adc_data_q1_s;
|
adc_data_q1_b <= adc_data_q1_s;
|
||||||
end
|
end
|
||||||
|
|
||||||
axi_ad9361_tdd_if #(.LEVEL_OR_PULSE_N(1)) i_tdd_if (
|
axi_ad9361_tdd_if #(.LEVEL_OR_PULSE_N(1)) i_tdd_if (
|
||||||
|
@ -561,6 +569,35 @@ module axi_ad9361 (
|
||||||
.up_rdata (up_rdata_tdd_s),
|
.up_rdata (up_rdata_tdd_s),
|
||||||
.up_rack (up_rack_tdd_s));
|
.up_rack (up_rack_tdd_s));
|
||||||
|
|
||||||
|
end else begin
|
||||||
|
|
||||||
|
// TDD control bypass
|
||||||
|
|
||||||
|
assign tdd_mode_s = 1'b0;
|
||||||
|
assign tdd_status_s = 8'b0;
|
||||||
|
assign tdd_enable_s = 1'b0;
|
||||||
|
assign tdd_txnrx_s = 1'b0;
|
||||||
|
assign adc_data_i0 = adc_data_i0_s;
|
||||||
|
assign adc_data_q0 = adc_data_q0_s;
|
||||||
|
assign adc_data_i1 = adc_data_i1_s;
|
||||||
|
assign adc_data_q1 = adc_data_q1_s;
|
||||||
|
assign tdd_sync_cntr = 1'b0;
|
||||||
|
assign g_dac_valid_s = dac_valid_s;
|
||||||
|
assign dac_valid_i0 = dac_valid_i0_s;
|
||||||
|
assign dac_valid_q0 = dac_valid_q0_s;
|
||||||
|
assign dac_valid_i1 = dac_valid_i1_s;
|
||||||
|
assign dac_valid_q1 = dac_valid_q1_s;
|
||||||
|
assign adc_valid_i0 = adc_valid_i0_s;
|
||||||
|
assign adc_valid_q0 = adc_valid_q0_s;
|
||||||
|
assign adc_valid_i1 = adc_valid_i1_s;
|
||||||
|
assign adc_valid_q1 = adc_valid_q1_s;
|
||||||
|
assign up_wack_tdd_s = 1'b0;
|
||||||
|
assign up_rack_tdd_s = 1'b0;
|
||||||
|
assign up_rdata_tdd_s = 32'b0;
|
||||||
|
|
||||||
|
end
|
||||||
|
endgenerate
|
||||||
|
|
||||||
// receive
|
// receive
|
||||||
|
|
||||||
axi_ad9361_rx #(
|
axi_ad9361_rx #(
|
||||||
|
|
Loading…
Reference in New Issue