BTS_Tests: re-organize configuration of TRX/TS params

Change-Id: I9b225249d135399f63d3c7e4c567121dfea63f75
changes/14/21314/1
Vadim Yanitskiy 2 years ago
parent 802508e696
commit 42d8bd5012
  1. 56
      bts/BTS_Tests.default
  2. 34
      bts/BTS_Tests.ttcn
  3. 8
      bts/BTS_Tests_LAPDm.ttcn
  4. 2
      bts/BTS_Tests_SMSCB.ttcn
  5. 17
      library/GSM_Types.ttcn

@ -31,4 +31,60 @@ mtc.FileMask := LOG_ALL | TTCN_DEBUG | TTCN_MATCHING | DEBUG_ENCDEC;
Osmocom_VTY_Functions.mp_prompt_prefix := "OsmoBTS";
PCUIF_Types.mp_pcuif_version := 10;
# Configuration for each individual transceiver
BTS_Tests.mp_trx_pars := {
{ # TRX0
arfcn := 871,
ts := {
{ config := GSM_PCHAN_CCCH_SDCCH4 },
{ config := GSM_PCHAN_TCHF },
{ config := GSM_PCHAN_TCHF },
{ config := GSM_PCHAN_TCHF_PDCH },
{ config := GSM_PCHAN_TCHH_TCHF_PDCH },
{ config := GSM_PCHAN_TCHH },
{ config := GSM_PCHAN_SDCCH8 },
{ config := GSM_PCHAN_PDCH }
}
},
{ # TRX1
arfcn := 873,
ts := {
{ config := GSM_PCHAN_TCHF },
{ config := GSM_PCHAN_SDCCH8 },
{ config := GSM_PCHAN_PDCH },
{ config := GSM_PCHAN_TCHH_TCHF_PDCH },
{ config := GSM_PCHAN_TCHF_PDCH },
{ config := GSM_PCHAN_SDCCH8 },
{ config := GSM_PCHAN_PDCH },
{ config := GSM_PCHAN_PDCH }
}
},
{ # TRX2
arfcn := 875,
ts := {
{ config := GSM_PCHAN_TCHH },
{ config := GSM_PCHAN_PDCH },
{ config := GSM_PCHAN_SDCCH8 },
{ config := GSM_PCHAN_TCHF },
{ config := GSM_PCHAN_SDCCH8 },
{ config := GSM_PCHAN_TCHF },
{ config := GSM_PCHAN_PDCH },
{ config := GSM_PCHAN_PDCH }
}
},
{ # TRX3
arfcn := 877,
ts := {
{ config := GSM_PCHAN_PDCH },
{ config := GSM_PCHAN_TCHH },
{ config := GSM_PCHAN_TCHH },
{ config := GSM_PCHAN_SDCCH8 },
{ config := GSM_PCHAN_PDCH },
{ config := GSM_PCHAN_TCHF },
{ config := GSM_PCHAN_PDCH },
{ config := GSM_PCHAN_SDCCH8 }
}
}
};
[EXECUTE]

@ -84,10 +84,6 @@ friend module BTS_Tests_perf;
modulepar {
charstring mp_rsl_ip := "127.0.0.2";
integer mp_rsl_port := 3003;
integer mp_trx0_arfcn := 871;
integer mp_trx1_arfcn := 873;
integer mp_trx2_arfcn := 875;
integer mp_trx3_arfcn := 877;
charstring mp_bts_trxc_ip := "127.0.0.1";
integer mp_bts_trxc_port := 5701;
charstring mp_pcu_socket := PCU_SOCK_DEFAULT;
@ -118,6 +114,8 @@ modulepar {
boolean mp_freq_hop_enabled := false;
/* frequency hopping parameters */
FreqHopConfig mp_fh_config;
/* configuration for each individual transceiver */
TrxPars mp_trx_pars; /* see BTS_Tests.default */
}
type record of RslChannelNr ChannelNrs;
@ -256,6 +254,17 @@ private function f_init_rsl(charstring id) runs on test_CT {
}
}
friend type record length(1 .. 256) of TrxParsItem TrxPars;
friend type record TrxParsItem {
GsmArfcn arfcn,
TrxTsPars ts
};
friend type record length(8) of TrxTsParsItem TrxTsPars;
friend type record TrxTsParsItem {
PchanConfig config
};
friend type record FreqHopPars {
/* Whether frequency hopping is in use */
boolean enabled,
@ -584,7 +593,7 @@ friend function f_resolve_fh_params(inout FreqHopPars fhp, uint8_t tn,
/* Compose the actual Mobile Allocation and the bitmask */
for (j := 0; j < lengthof(g.trx_maio); j := j + 1) {
var FreqHopGroupItem gi := g.trx_maio[j];
var GsmArfcn arfcn := c_arfcn_list[gi.trx_nr];
var GsmArfcn arfcn := mp_trx_pars[gi.trx_nr].arfcn;
fhp.ma := fhp.ma & { valueof(ts_GsmBandArfcn(arfcn)) };
fhp.ma_map.ma[gi.trx_nr] := '1'B;
}
@ -636,7 +645,7 @@ private altstep as_Tguard() runs on ConnHdlr {
}
friend function f_l1_tune(L1CTL_PT L1CTL, L1ctlCcchMode ccch_mode := CCCH_MODE_COMBINED) {
var GsmBandArfcn arfcn := valueof(ts_GsmBandArfcn(mp_trx0_arfcn));
var GsmBandArfcn arfcn := valueof(ts_GsmBandArfcn(mp_trx_pars[0].arfcn));
f_L1CTL_FBSB(L1CTL, arfcn, ccch_mode, mp_rxlev_exp);
}
@ -727,12 +736,6 @@ friend function f_rsl_chan_deact() runs on ConnHdlr {
"RF CHAN REL", true);
}
/* TODO: move this to module parameters */
private const GsmArfcn c_arfcn_list[4] := {
mp_trx0_arfcn, mp_trx1_arfcn,
mp_trx2_arfcn, mp_trx3_arfcn
};
friend template ConnHdlrPars t_Pars(template RslChannelNr chan_nr,
template RSL_IE_ChannelMode chan_mode,
float t_guard := 20.0) := {
@ -2145,7 +2148,7 @@ private function f_l1ctl_est_dchan(L1CTL_PT pt, ConnHdlrPars pars) {
if (not pars.fhp.enabled) {
pt.send(ts_L1CTL_DM_EST_REQ_H0(pars.chan_nr,
7 /* TODO: mp_tsc */,
mp_trx0_arfcn));
mp_trx_pars[0].arfcn));
} else {
pt.send(ts_L1CTL_DM_EST_REQ_H1(pars.chan_nr,
7 /* TODO: mp_tsc */,
@ -2172,7 +2175,7 @@ private function f_est_dchan(boolean encr_enable := false, RSL_IE_List more_ies
if (g_pars.fhp.enabled) {
ch_desc := valueof(ts_ChanDescH1(g_pars.chan_nr, g_pars.fhp.maio_hsn));
} else {
ch_desc := valueof(ts_ChanDescH0(g_pars.chan_nr, mp_trx0_arfcn));
ch_desc := valueof(ts_ChanDescH0(g_pars.chan_nr, mp_trx_pars[0].arfcn));
}
/* Send IMM.ASS via CCHAN */
@ -3729,7 +3732,8 @@ private function f_TC_imm_ass(integer num_total, float sleep_s, float exp_pass)
f_l1_tune(L1CTL);
for (var integer i := 0; i < num_total; i := i+1) {
var ChannelDescription ch_desc := valueof(ts_ChanDescH0(ts_RslChanNr_SDCCH4(0, 0), mp_trx0_arfcn));
var ChannelDescription ch_desc := valueof(ts_ChanDescH0(ts_RslChanNr_SDCCH4(0, 0),
mp_trx_pars[0].arfcn));
var GsmRrMessage ia := valueof(ts_IMM_ASS(42, i, 5, ch_desc, c_MA_null));
var octetstring ia_enc := enc_GsmRrMessage(ia);
RSL_CCHAN.send(ts_ASP_RSL_UD(ts_RSL_IMM_ASSIGN(ia_enc, 0)));

@ -43,16 +43,18 @@ function f_lapdm_exit() runs on lapdm_test_CT {
/* master function switching to a dedicated radio channel */
function f_switch_dcch() runs on ConnHdlr {
var GsmBandArfcn arfcn := valueof(ts_GsmBandArfcn(mp_trx0_arfcn));
var GsmBandArfcn arfcn := valueof(ts_GsmBandArfcn(mp_trx_pars[0].arfcn));
var BCCH_tune_req tune_req := { arfcn := arfcn, combined_ccch := true };
var DCCH_switch_req sw_req;
/* Craft channel description (with or without frequency hopping parameters) */
if (g_pars.fhp.enabled) {
sw_req.chan_desc := valueof(ts_ChanDescH1(g_pars.chan_nr, g_pars.fhp.maio_hsn));
sw_req.chan_desc := valueof(ts_ChanDescH1(g_pars.chan_nr,
g_pars.fhp.maio_hsn));
sw_req.ma := g_pars.fhp.ma;
} else {
sw_req.chan_desc := valueof(ts_ChanDescH0(g_pars.chan_nr, mp_trx0_arfcn));
sw_req.chan_desc := valueof(ts_ChanDescH0(g_pars.chan_nr,
mp_trx_pars[0].arfcn));
sw_req.ma := omit;
}

@ -267,7 +267,7 @@ private function f_smscb_setup(inout CbchTestPars pars) runs on test_CT {
} else {
L1CTL.send(ts_L1CTL_DM_EST_REQ_H0(pars.chan_nr,
7 /* TODO: mp_tsc */,
mp_trx0_arfcn));
mp_trx_pars[0].arfcn));
}
}

@ -59,6 +59,23 @@ tr_GsmBandArfcn(template (present) GsmArfcn arfcn,
arfcn := arfcn
};
/* see enum 'gsm_phys_chan_config' in libosmocore */
type enumerated PchanConfig {
GSM_PCHAN_NONE,
GSM_PCHAN_CCCH,
GSM_PCHAN_CCCH_SDCCH4,
GSM_PCHAN_CCCH_SDCCH4_CBCH,
GSM_PCHAN_SDCCH8,
GSM_PCHAN_SDCCH8_CBCH,
GSM_PCHAN_TCHF,
GSM_PCHAN_TCHH,
GSM_PCHAN_PDCH,
/* IPA style dynamic TCH/F+PDCH */
GSM_PCHAN_TCHF_PDCH,
/* Osmocom style dynamic TCH/H+TCH/F+PDCH */
GSM_PCHAN_TCHH_TCHF_PDCH
};
type enumerated GprsCodingScheme {
CS1, CS2, CS3, CS4
};

Loading…
Cancel
Save