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,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.
|
@ -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.
27
libiio_if.m
27
libiio_if.m
|
@ -227,6 +227,16 @@ classdef libiio_if < handle
|
|||
return;
|
||||
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,...
|
||||
|
@ -459,6 +469,23 @@ classdef libiio_if < handle
|
|||
return;
|
||||
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);
|
||||
setdatatype(buffer, 'int16Ptr', obj.iio_buf_size);
|
||||
|
|
Loading…
Reference in New Issue