This repository was archived by the owner on Feb 2, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +63
-0
lines changed Expand file tree Collapse file tree 2 files changed +63
-0
lines changed Original file line number Diff line number Diff line change 1+ data_in_device = axi-adrv9009-tx-hpc
2+ data_out_device = axi-adrv9009-rx-hpc
3+ ctrl_device = adrv9009-phy
4+ channel = TRX_LO_FREQ,IN,out_altvoltage0_TRX_LO_frequency,
5+ channel = RX1_RF_BANDWIDTH,IN,in_voltage0_rf_bandwidth,
6+ channel = RX1_GAIN_MODE,IN,in_voltage0_gain_control_mode,
7+ channel = RX1_GAIN,IN,in_voltage0_hardwaregain,
8+ channel = RX2_RF_BANDWIDTH,IN,in_voltage1_rf_bandwidth,
9+ channel = RX2_GAIN_MODE,IN,in_voltage1_gain_control_mode,
10+ channel = RX2_GAIN,IN,in_voltage1_hardwaregain,
11+ channel = TX_RF_BANDWIDTH,IN,out_voltage0_rf_bandwidth,
12+ channel = TX_GAIN,IN,out_voltage0_hardwaregain,
Original file line number Diff line number Diff line change 1+ clear ;
2+ clc ;
3+
4+ s = iio_sys_obj_matlab ; % Constructor
5+ s.ip_address = ' 10.66.99.200' ;
6+ s.dev_name = ' adrv9009' ;
7+ s.in_ch_no = 2 ;
8+ s.out_ch_no = 2 ;
9+ s.in_ch_size = 8192 ;
10+ s.out_ch_size = 8192 ;
11+
12+ s = s .setupImpl();
13+
14+ input = cell(1 , s .in_ch_no + length(s .iio_dev_cfg .cfg_ch ));
15+ Fs = 245.76e6 ;
16+ Fc = 1e6 ;
17+ Bw = 200e6 ;
18+ t = 1 / Fs : 1 / Fs : s .in_ch_size / Fs ;
19+ for i= 1 : s .in_ch_no
20+ input{i } = sin(2 * pi * Fc * t +(i - 1 )*pi / 2 )*2 ^ 15 ;
21+ end
22+
23+ input{s .getInChannel(' TRX_LO_FREQ' )} = 2.45e9 ;
24+ input{s .getInChannel(' RX1_RF_BANDWIDTH' )} = Bw ;
25+ input{s .getInChannel(' RX1_GAIN_MODE' )} = ' slow_attack' ;
26+ input{s .getInChannel(' RX1_GAIN' )} = 0 ;
27+ input{s .getInChannel(' RX2_GAIN_MODE' )} = ' slow_attack' ;
28+ input{s .getInChannel(' RX2_RF_BANDWIDTH' )} = Bw ;
29+ input{s .getInChannel(' RX2_GAIN' )} = 0 ;
30+ input{s .getInChannel(' TX_RF_BANDWIDTH' )} = Bw ;
31+ input{s .getInChannel(' TX_GAIN' )} = - 20 ;
32+
33+ for i = 1 : 20
34+ output = stepImpl(s , input );
35+ end
36+
37+ s .releaseImpl();
38+
39+ figure % new figure
40+ ax1 = subplot(2 ,1 ,1 ); % top subplot
41+ ax2 = subplot(2 ,1 ,2 ); % bottom subplot
42+
43+ plot(ax1 ,output{1 });
44+ title(ax1 ,' I' );
45+ xlabel(' Sample' );
46+ ylabel(' Amplitude' );
47+
48+ plot(ax2 ,output{2 });
49+ title(ax2 ,' Q' );
50+ xlabel(' Sample' );
51+ ylabel(' Amplitude' );
You can’t perform that action at this time.
0 commit comments