Added models for fmcomms 2,3,4,5

master
acozma 2014-11-20 14:15:35 +02:00
parent fc853be5c7
commit 24f9e05b36
9 changed files with 75 additions and 4 deletions

Binary file not shown.

View File

@ -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,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,

BIN
fmcomms2_3/ad9361_sim.slx Normal file

Binary file not shown.

12
fmcomms4/ad9364.cfg Normal file
View File

@ -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,

BIN
fmcomms4/ad9364_sim.slx Normal file

Binary file not shown.

15
fmcomms5/ad9361-1.cfg Normal file
View File

@ -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,

14
fmcomms5/ad9361-2.cfg Normal file
View File

@ -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,

BIN
fmcomms5/fmcomms5.slx Normal file

Binary file not shown.

View File

@ -221,12 +221,22 @@ classdef libiio_if < handle
% Check if the number of channels in the device
% is greater or equal to the system object
% input channels
if(obj.iio_scan_elm_no < ch_no)
if(obj.iio_scan_elm_no < ch_no)
obj.iio_channel = {};
err_msg = 'The selected device does not have enough output channels!';
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
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,...
@ -457,7 +467,24 @@ classdef libiio_if < handle
% Check if the device type is input
if(~strcmp(obj.dev_type, 'OUT'))
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
buffer = calllib(obj.libname, 'iio_buffer_start', obj.iio_buffer);