I am trying to modify the Transmit and Receive LTE MIMO code given in the below link.
This code runs perfectly on AD RF SOM.
Now, I am trying the same example to run on ADRV9371.
ad9361_LTE() ( The code that's in the Legacy folder under LTE_MATLAB) uses IIO hence, I modified this code to 9371 and it works for the dummy data which is used in trData. (I was able to see LTE spectrum on the Spectrum Analyzer). Please note that I upsampled the enodeBOutput by 8 (to match 122.88Mhz) for Transnmission.
But, when I modify it to the above image and try to Transmit, MATLAB crashes. After a bit debugging, I understood that the buffer size that I have pre-allocated,is too large and that could be the reason for my Crash. (Not sure though)
Next, I changed the IIO objects to Adi Objects and used adi.AD9371.Tx and could similarly transmit the dummy Data but, when tried to Transmit the full grid, I get an error.
This error is related to SamplesPerFrame. The Final enodeBOutput is much larger than 2^20, Hence,I always get an error.
How, do I transmit this whole grid either using IIO objects or ADI objects?
Please suggest any work around.
Error using adi.AD9371.Base/set.SamplesPerFrame (line 65)Expected SamplesPerFrame to be a scalar with value <= 1.04858e+06.
Error in adi.AD9371.Tx/setupImpl (line 71) obj.SamplesPerFrame = size(data,1);
Error in ad9371_LTE_adi_Tx_3 (line 216)tx(eNodeBOutput);
There is a maximum bound on the samples you can transmit without modify HDL and the linux kernel. The bound we pre-set in the system object is conservative (2^20). You can try increasing this changing the value on this line: https://github.com/analogdevicesinc/MathWorks_tools/blob/master/%2Badi/%2BAD9371/Base.m#L66
It may be possible to extend this to 2^23.
Thanks for your quick reply.
I tried to change the value to 2^23 base.m code as suggested
and got an error as shown below.
Also, In adi documentation,I found the value of SamplesPerFrame to be
an even positive
integer from 2 to 16,777,216 ie:(2^24).Can you please tell, if there is any other place which has to be modified as well?Error :ERROR[-1]: Failed to create buffer for: axi-ad9371-tx-hpcError using matlabshared.libiio.base/cstatusFailed to configure device and buffers.Error in matlabshared.libiio.base/cstatusidError in matlabshared.libiio.base/setupImplError in adi.AD9371.Tx/setupImpl (line 74) setupImpl@matlabshared.libiio.base(obj);Error in ad9371_LTE_adi_Tx_3 (line 216)tx(eNodeBOutput);
Hi Travis, also another question.
How can I modify the HDL and linux kernel? Can you please point me to some documentation?
I would first recommend decreasing the sample rate so you don't need such a large buffer. This can be done through this tool: https://wiki.analog.com/resources/eval/user-guides/mykonos/software/filters
If you need to increase the maximum buffer size, first change the CMA of the kernel.
I don't think I can reduce the Sampling rate. My goal is to simulate an aggregated LTE signal of 60Mhz,so the sampling rate has to be 122.88Mhz.
I was not sure how do to the changes in CMA kernel to increase the buffer size to the said 2^23 or 2^24 as per documentation.
I tried breaking the final waveform into chunks of 5 frames nd transmitted repeatedly in a while loop forever.
tx(signal1); %% 5 frames worth samples 153600*5
tx(signal(2); so on..
collect 6 frames worth samples I;e 153600*6 (I need this to run 8 times as the Sampling rate is 122.88Mhz)
The issue is at the receiver I am not able to reconstruct/decode the original signal. Even the cellID is not getting decoded properly.
I tried increasing the delay between significant reception of bursts but nothing helped.
Can you please suggest any alternative?
If I cannot change buffer size in kernel and don't have the option to reduce Sampling rate, what other options do I have apart from the above said procedure?