From 838b93e2de94e62fc3f375d75437d3deb92f9872 Mon Sep 17 00:00:00 2001
From: Florian Kaltenberger <florian.kaltenberger@eurecom.fr>
Date: Wed, 1 Apr 2015 11:47:48 +0000
Subject: [PATCH] adding mex file for matlab 64bit linux

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@6971 818b1a75-f10b-46b9-bf7c-635c3b92a50f
---
 .../EMOS/LTE/IMPORT_FILTER/cstruct.mexa64     | Bin 0 -> 17639 bytes
 .../LTE/IMPORT_FILTER/struct_template_new.m   |  39 +++++++++++-------
 2 files changed, 23 insertions(+), 16 deletions(-)
 create mode 100755 openair1/EMOS/LTE/IMPORT_FILTER/cstruct.mexa64

diff --git a/openair1/EMOS/LTE/IMPORT_FILTER/cstruct.mexa64 b/openair1/EMOS/LTE/IMPORT_FILTER/cstruct.mexa64
new file mode 100755
index 0000000000000000000000000000000000000000..1ea42265cf020c52ab324aca5fa6b94a61116cbf
GIT binary patch
literal 17639
zcmeHOeRNdSwLe3EL<vl=h!JeLMJON;`G`OiN`}mY8%#n<5~0;}n9NMb=wy=4+=1W|
zjGe@CJB{#K>qFP-dc3~%T(+)OUSCCOu_mA-ulB=_YH4jNORLTpKM)mTtIqrF^D((I
znX#_7)_Z?(vTpX-zq9w*=j?ONK6mcD=T=v3^#q%ZsZ_we$cSs0Dv(N9P`W~9Kq}c9
zR*3(fWwW^Kq_LuLIp;h9Dax3}0kSa}*Wsm{1=V;)(aHjW>yj$H34lp&Sn3T+Jw;1M
z07=mz!Lo^<bPda{W>eWrrYOl$YIxc3QGVg&oE=BY1<VvxdS8Mbwe!=a5-GSv+RNvc
z2H8JFWp{YrW}pso*T(v0_Ny0u^GxB1UtRJ1>Y+bX{bl);|Kxq@r(}ZE=ipNQFR296
zqv4;xe_XI{%2l`BeS`yf{uQtbS@)F8!sB2s%7i#a{nB#a%g}&a@?VE+E_^VL{BwEa
zf0#%9%X#qGdGNdP;BV)#`>Q<oZF%Ye%rsotDUwJ2R33an9{he(oXellJox%N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RUuAtxW`^r{TtX_eda|qFS;(++Y@5ZnA@NOoa5%{7V9lN1o;oS6S
zAwyK1W%V+g$qjm1s~W}GR_aCd7Dt`S?W%Xud1u}yk<XBHJN>QE9o0e44(9grX9~PM
znbk3Q#<+=|X`mC4PItQ}<fF6F_^<#79z%$u)y(bua=oLjriwN0@^sPn77-NVc(rQB
z#@fvr9JTJv)zyuzCU=tqA4{Nh{E^An3Fl8bo!!x$buu~gSapsg!u%XEeOrOgEx3*G
zr;D>sF;`Zq6T#(B5eKKU&PQ90aP#`;<np*9*EJD&P&<A4IqMvH_91CH%{*ot$BvbC
zF|L+_*ICEJtw+u2M6=Qxe_|VoV<*(rVeOnp*-<FWe!`J>e%w2KKAn!Qle^WK?)2ey
WcgD&2u^!SP>x_fzV?}fp`+oqRA0?jv

literal 0
HcmV?d00001

diff --git a/openair1/EMOS/LTE/IMPORT_FILTER/struct_template_new.m b/openair1/EMOS/LTE/IMPORT_FILTER/struct_template_new.m
index bcd5e90abbf..c633cf8c987 100644
--- a/openair1/EMOS/LTE/IMPORT_FILTER/struct_template_new.m
+++ b/openair1/EMOS/LTE/IMPORT_FILTER/struct_template_new.m
@@ -14,8 +14,8 @@ N_PILOTS_DL_EMOS = 2;  % ofdm symbols with pilots per slot
 N_PILOTS_UL_EMOS = 2;  % ofdm symbols with pilots per subframe
 N_SLOTS_DL_EMOS = 2;     % we take slots 10,11
 N_SUBFRAMES_UL_EMOS = 1;     % we take subframes 3
-NB_ANTENNAS_TX_EMOS = 2;
-NB_ANTENNAS_RX_EMOS = 2;
+NB_ANTENNAS_TX_EMOS = 2; % antennas at eNB
+NB_ANTENNAS_RX_EMOS = 2; % antennas at UE
 
 
 MAX_DCI_PER_FRAME = 20;
@@ -27,20 +27,33 @@ NUMBER_OF_eNB_MAX = 3;
 NUMBER_OF_UE_MAX = 2;
 NUMBER_OF_SUBBANDS = 13;
 
-NB_ANTENNAS_RX = 2;
-NB_ANTENNAS_TX = 2;
+NB_ANTENNAS_RX = 2; % maximum number of antennas (for memory allocation only)
+%NB_ANTENNAS_TX = 2;
 
 MAX_CQI_BITS = 40;
 MAX_DCI_SIZE_BITS = 45;
 
-%EMOS_CHANNEL = 0;
-
 % enable this line to enable error checking
-if isunix
-  get_dump_size
+if exist('check_errors','var') && (check_errors==1) 
+    if isunix
+        get_dump_size
+    else
+        warning('Error checking of sizes only possible in Linux');
+    end
+end
+
+if ~exist('align','var')
+    error('variable align must be specified');
 else
-  warning('Error checking of sizes only possible in Linux');
+    if ((align~=4) && (align~=8))
+        error('variable align must be either 4 or 8');
+    end
+end
+
+if ~exist('EMOS_CHANNEL','var')
+    error('variable EMOS_CHANNEL must be specified');
 end
+    
 
 phy_measurements_struct = struct(...
     'rssi',                 uint32(0),...
@@ -178,12 +191,10 @@ eNb_UE_stats_struct = struct(...
     'timing_advance_update',int32(0),...
     'UE_mode',uint32(0),...
     'sector',uint8(0),...
-
   'dlsch_l2_errors', uint32(zeros(1,8)),...
   'dlsch_trials', uint32(zeros(8,8)),...
   'dlsch_ACK', uint32(zeros(8,8)),...
   'dlsch_NAK', uint32(zeros(8,8)),...
-
   'ulsch_errors', uint32(zeros(1,8)),...
   'ulsch_consecutive_errors', uint32(0),...
   'ulsch_decoding_attempts', uint32(zeros(8,8)),...
@@ -193,19 +204,15 @@ eNb_UE_stats_struct = struct(...
   'ulsch_round_fer', uint32(zeros(8,8)),...
   'sr_received', uint32(0), ...
   'sr_total', uint32(0), ...
-
   'dlsch_sliding_cnt', uint32(0),...
   'dlsch_NAK_round0', uint32(0),...
   'dlsch_mcs_offset', int8(0),...
-
   'dlsch_mcs1', uint8(0),...
   'dlsch_mcs2', uint8(0),...
   'total_TBS_MAC', int32(0),...
   'total_TBS', int32(0),...
   'total_TBS_last', int32(0),...
-  'dlsch_bitrate', uint32(0)
-  %'total_transmitted_bits', uint32(0)
-);
+  'dlsch_bitrate', uint32(0));
 
 
 eNb_UE_stats_struct_a = cstruct(eNb_UE_stats_struct,[],align);
-- 
GitLab