L1CTL: Try FBSB up to 10 times in f_L1CTL_FBSB()

For some reason, even with a perfectly valid/strong signal, the FBSB
task sometimes fails in the firmware.  Let's wrap a loop around
it and try up to 10 times before failing the test.

Change-Id: I2262278dcd7e2f0cf4d293e0549527866522bece
This commit is contained in:
Harald Welte 2018-03-09 17:03:49 +01:00
parent 344c0cf6cf
commit 8fe9eba3eb
1 changed files with 8 additions and 5 deletions

View File

@ -35,15 +35,18 @@ module L1CTL_PortType {
function f_L1CTL_FBSB(L1CTL_PT pt, Arfcn arfcn, L1ctlCcchMode ccch_mode := CCCH_MODE_COMBINED) {
timer T := 5.0;
pt.send(t_L1CTL_FBSB_REQ(arfcn, t_L1CTL_FBSB_F_ALL, 0, ccch_mode, 0));
T.start
alt {
[] pt.receive(t_L1CTL_FBSB_CONF(0)) {};
[] pt.receive(t_L1CTL_FBSB_CONF(?)) {
for (var integer i := 0; i < 10; i := i+1) {
pt.send(t_L1CTL_FBSB_REQ(arfcn, t_L1CTL_FBSB_F_ALL, 0, ccch_mode, 63));
T.start
alt {
[] pt.receive(t_L1CTL_FBSB_CONF(0)) { return; };
[] pt.receive(t_L1CTL_FBSB_CONF(?)) { }
[i == 9] pt.receive(t_L1CTL_FBSB_CONF(?)) {
setverdict(fail, "FBSB Failed with non-zero return code");
};
[] pt.receive { repeat; };
[] T.timeout { setverdict(fail, "Timeout in FBSB") };
}
}
}