Added models for fmcomms 2,3,4,5
parent
fc853be5c7
commit
24f9e05b36
BIN
ad9361_sim.slx
BIN
ad9361_sim.slx
Binary file not shown.
|
@ -7,6 +7,9 @@ channel = RX_RF_BANDWIDTH,IN,in_voltage_rf_bandwidth,
|
||||||
channel = RX1_GAIN_MODE,IN,in_voltage0_gain_control_mode,
|
channel = RX1_GAIN_MODE,IN,in_voltage0_gain_control_mode,
|
||||||
channel = RX1_GAIN,IN,in_voltage0_hardwaregain,
|
channel = RX1_GAIN,IN,in_voltage0_hardwaregain,
|
||||||
channel = RX1_RSSI,OUT,in_voltage0_rssi,
|
channel = RX1_RSSI,OUT,in_voltage0_rssi,
|
||||||
|
channel = RX2_GAIN_MODE,IN,in_voltage1_gain_control_mode,
|
||||||
|
channel = RX2_GAIN,IN,in_voltage1_hardwaregain,
|
||||||
|
channel = RX2_RSSI,OUT,in_voltage1_rssi,
|
||||||
channel = TX_LO_FREQ,IN,out_altvoltage1_TX_LO_frequency,
|
channel = TX_LO_FREQ,IN,out_altvoltage1_TX_LO_frequency,
|
||||||
channel = TX_SAMPLING_FREQ,IN,out_voltage_sampling_frequency,
|
channel = TX_SAMPLING_FREQ,IN,out_voltage_sampling_frequency,
|
||||||
channel = TX_RF_BANDWIDTH,IN,out_voltage_rf_bandwidth,
|
channel = TX_RF_BANDWIDTH,IN,out_voltage_rf_bandwidth,
|
Binary file not shown.
|
@ -0,0 +1,12 @@
|
||||||
|
data_in_device = cf-ad9361-dds-core-lpc
|
||||||
|
data_out_device = cf-ad9361-lpc
|
||||||
|
ctrl_device = ad9361-phy
|
||||||
|
channel = RX_LO_FREQ,IN,out_altvoltage0_RX_LO_frequency,
|
||||||
|
channel = RX_SAMPLING_FREQ,IN,in_voltage_sampling_frequency,
|
||||||
|
channel = RX_RF_BANDWIDTH,IN,in_voltage_rf_bandwidth,
|
||||||
|
channel = RX_GAIN_MODE,IN,in_voltage0_gain_control_mode,
|
||||||
|
channel = RX_GAIN,IN,in_voltage0_hardwaregain,
|
||||||
|
channel = RX_RSSI,OUT,in_voltage0_rssi,
|
||||||
|
channel = TX_LO_FREQ,IN,out_altvoltage1_TX_LO_frequency,
|
||||||
|
channel = TX_SAMPLING_FREQ,IN,out_voltage_sampling_frequency,
|
||||||
|
channel = TX_RF_BANDWIDTH,IN,out_voltage_rf_bandwidth,
|
Binary file not shown.
|
@ -0,0 +1,15 @@
|
||||||
|
data_in_device = cf-ad9361-dds-core-lpc
|
||||||
|
data_out_device = cf-ad9361-A
|
||||||
|
ctrl_device = ad9361-phy
|
||||||
|
channel = RX_LO_FREQ,IN,out_altvoltage0_RX_LO_frequency,
|
||||||
|
channel = RX_SAMPLING_FREQ,IN,in_voltage_sampling_frequency,
|
||||||
|
channel = RX_RF_BANDWIDTH,IN,in_voltage_rf_bandwidth,
|
||||||
|
channel = RX1_GAIN_MODE,IN,in_voltage0_gain_control_mode,
|
||||||
|
channel = RX1_GAIN,IN,in_voltage0_hardwaregain,
|
||||||
|
channel = RX1_RSSI,OUT,in_voltage0_rssi,
|
||||||
|
channel = RX2_GAIN_MODE,IN,in_voltage1_gain_control_mode,
|
||||||
|
channel = RX2_GAIN,IN,in_voltage1_hardwaregain,
|
||||||
|
channel = RX2_RSSI,OUT,in_voltage1_rssi,
|
||||||
|
channel = TX_LO_FREQ,IN,out_altvoltage1_TX_LO_frequency,
|
||||||
|
channel = TX_SAMPLING_FREQ,IN,out_voltage_sampling_frequency,
|
||||||
|
channel = TX_RF_BANDWIDTH,IN,out_voltage_rf_bandwidth,
|
|
@ -0,0 +1,14 @@
|
||||||
|
data_in_device = cf-ad9361-dds-core-B
|
||||||
|
ctrl_device = ad9361-phy-B
|
||||||
|
channel = RX_LO_FREQ,IN,out_altvoltage0_RX_LO_frequency,
|
||||||
|
channel = RX_SAMPLING_FREQ,IN,in_voltage_sampling_frequency,
|
||||||
|
channel = RX_RF_BANDWIDTH,IN,in_voltage_rf_bandwidth,
|
||||||
|
channel = RX1_GAIN_MODE,IN,in_voltage0_gain_control_mode,
|
||||||
|
channel = RX1_GAIN,IN,in_voltage0_hardwaregain,
|
||||||
|
channel = RX1_RSSI,OUT,in_voltage0_rssi,
|
||||||
|
channel = RX2_GAIN_MODE,IN,in_voltage1_gain_control_mode,
|
||||||
|
channel = RX2_GAIN,IN,in_voltage1_hardwaregain,
|
||||||
|
channel = RX2_RSSI,OUT,in_voltage1_rssi,
|
||||||
|
channel = TX_LO_FREQ,IN,out_altvoltage1_TX_LO_frequency,
|
||||||
|
channel = TX_SAMPLING_FREQ,IN,out_voltage_sampling_frequency,
|
||||||
|
channel = TX_RF_BANDWIDTH,IN,out_voltage_rf_bandwidth,
|
Binary file not shown.
35
libiio_if.m
35
libiio_if.m
|
@ -221,12 +221,22 @@ classdef libiio_if < handle
|
||||||
% Check if the number of channels in the device
|
% Check if the number of channels in the device
|
||||||
% is greater or equal to the system object
|
% is greater or equal to the system object
|
||||||
% input channels
|
% input channels
|
||||||
if(obj.iio_scan_elm_no < ch_no)
|
if(obj.iio_scan_elm_no < ch_no)
|
||||||
obj.iio_channel = {};
|
obj.iio_channel = {};
|
||||||
err_msg = 'The selected device does not have enough output channels!';
|
err_msg = 'The selected device does not have enough output channels!';
|
||||||
return;
|
return;
|
||||||
end
|
end
|
||||||
|
|
||||||
|
% Enable the DAC buffer output
|
||||||
|
obj.if_initialized = 1;
|
||||||
|
ret = writeAttributeString(obj, 'out_altvoltage0_TX1_I_F1_raw', '0');
|
||||||
|
obj.if_initialized = 0;
|
||||||
|
if(ret < 0)
|
||||||
|
obj.iio_channel = {};
|
||||||
|
err_msg = 'Could not enable the DAC buffer output!';
|
||||||
|
return;
|
||||||
|
end
|
||||||
|
|
||||||
% Create the IIO buffer used to write data
|
% Create the IIO buffer used to write data
|
||||||
obj.iio_buf_size = obj.data_ch_size * obj.iio_scan_elm_no;
|
obj.iio_buf_size = obj.data_ch_size * obj.iio_scan_elm_no;
|
||||||
obj.iio_buffer = calllib(obj.libname, 'iio_device_create_buffer', obj.iio_dev,...
|
obj.iio_buffer = calllib(obj.libname, 'iio_device_create_buffer', obj.iio_dev,...
|
||||||
|
@ -457,7 +467,24 @@ classdef libiio_if < handle
|
||||||
% Check if the device type is input
|
% Check if the device type is input
|
||||||
if(~strcmp(obj.dev_type, 'OUT'))
|
if(~strcmp(obj.dev_type, 'OUT'))
|
||||||
return;
|
return;
|
||||||
end
|
end
|
||||||
|
|
||||||
|
% Destroy the buffer
|
||||||
|
calllib(obj.libname, 'iio_buffer_destroy', obj.iio_buffer);
|
||||||
|
obj.iio_buffer = {};
|
||||||
|
|
||||||
|
% Enable the DAC buffer output
|
||||||
|
ret = writeAttributeString(obj, 'out_altvoltage0_TX1_I_F1_raw', '0');
|
||||||
|
if(ret < 0)
|
||||||
|
obj.iio_channel = {};
|
||||||
|
err_msg = 'Could not enable the DAC buffer output!';
|
||||||
|
return;
|
||||||
|
end
|
||||||
|
|
||||||
|
% Create the IIO buffer used to write data
|
||||||
|
obj.iio_buf_size = obj.data_ch_size * obj.iio_scan_elm_no;
|
||||||
|
obj.iio_buffer = calllib(obj.libname, 'iio_device_create_buffer', obj.iio_dev,...
|
||||||
|
obj.data_ch_size, 1);
|
||||||
|
|
||||||
% Transmit the data
|
% Transmit the data
|
||||||
buffer = calllib(obj.libname, 'iio_buffer_start', obj.iio_buffer);
|
buffer = calllib(obj.libname, 'iio_buffer_start', obj.iio_buffer);
|
||||||
|
|
Loading…
Reference in New Issue