feat: PS配置AD9653,PL对AD9653数据进行解包

AD9653采集数据异常,需要进一步调试
This commit is contained in:
2024-11-07 12:58:43 +08:00
parent 25c9dd91a3
commit cc4176e117
125 changed files with 64025 additions and 0 deletions
@@ -0,0 +1,125 @@
`timescale 1ns / 1ps
//////////////////////////////////////////////////////////////////////////////////
// Company:
// Engineer:
//
// Create Date: 2024/10/31 16:49:01
// Design Name:
// Module Name: tx_qpsk_tb
// Project Name:
// Target Devices:
// Tool Versions:
// Description:
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
//////////////////////////////////////////////////////////////////////////////////
module tb_tx_qpsk;
reg clk = 1'b0 ;
reg rst = 1'b1 ;
reg tx_on = 1'b1 ;
reg [31:0] freq_set ;
reg [ 1:0] waveform_sel = 2'b11;
reg [ 1:0] iq_sel = 2'b11 ;
wire [11:0] tx_data_i ;
wire [11:0] tx_data_q ;
reg [ 3:0] bb_rshift = 5'b0 ;
tx_qpsk_v1 u_tx_qpsk_v1
(
.clk (clk ),
.rst (rst ),
.tx_data_i (tx_data_i ),
.tx_data_q (tx_data_q ),
.waveform_sel (waveform_sel ),
.sweep_on (1'b0 ),
// .freq_set (32'd447392426 ),
.freq_set (32'd0 ),
.iq_sel (iq_sel ),
.bb_rshift (bb_rshift )
);
initial begin
#102
rst = 1'b0;
// freq_set = 32'd873813333;
// waveform_sel = 2'b00;
// bb_rshift = 5'd0;
// #5000
// bb_rshift = 5'd1;
// #5000
// bb_rshift = 5'd2;
// #5000
// bb_rshift = 5'd3;
// #5000
// bb_rshift = 5'd4;
// #5000
// bb_rshift = 5'd5;
// #5000
// bb_rshift = 5'd6;
// #5000
// bb_rshift = 5'd7;
// #5000
// bb_rshift = 5'd8;
// #5000
// bb_rshift = 5'd9;
// #5000
// bb_rshift = 5'd14;
// #5000
// bb_rshift = 5'd15;
// #5000
// bb_rshift = 5'd16;
// freq_set = 32'd0;
// func_sel = 3'b010;
// #7777
// freq_set = 32'd536870912;
// func_sel = 3'b100;
// #7777
// freq_set = 32'd0;
// func_sel = 3'b100;
// #7777
// freq_set = 32'd536870912;
// func_sel = 3'b010;
// #7777
// freq_set = 32'd0;
// func_sel = 3'b010;
// freq_set = 32'd536870912;
// iq_sel = 2'b00;
// #7777
// freq_set = 32'd536870912;
// iq_sel = 2'b01;
// #7777
// freq_set = 32'd536870912;
// iq_sel = 2'b10;
// #7777
// freq_set = 32'd536870912;
// iq_sel = 2'b11;
end
always #5 clk = ~clk;
integer i;
integer w_file;
initial begin
w_file = $fopen("D:\\qpsk_josh.txt","w");
for (i = 0; i <= 35000; i = i + 1) begin
wait(clk);
#10;
$fdisplay(w_file,"%d %d",$signed(tx_data_i),
$signed(tx_data_q));
if (i == 35000) begin
$fclose(w_file);
$stop;
end
end
end
endmodule