alloc: Allocate TFI per slot (algorithm A)

Currently the TFI are managed per TRX, thus only a maximum of 32 TBF
per direction and per TRX are possible simultaneously.

This commit modifies algorithm_a() to allow the sharing of TFI
between different PDCH. Since algorithm A only assigns a single slot
to each TBF, the TFI of each PDCH can be assigned independently.
This increases the maximum to 32 TBF per direction and per PDCH
concerning the TFI allocation.

Ticket: #1793
Sponsored-by: On-Waves ehf
diff --git a/tests/alloc/AllocTest.cpp b/tests/alloc/AllocTest.cpp
index b6f263f..e419cd2 100644
--- a/tests/alloc/AllocTest.cpp
+++ b/tests/alloc/AllocTest.cpp
@@ -84,17 +84,21 @@
 							tbf->tfi()) == tbf);
 					/* This assertion cannot hold with the
 					 * current API and shared TFI */
+#if 0
 					OSMO_ASSERT(the_bts->dl_tbf_by_tfi(
 							tbf->tfi(),
 							tbf->trx->trx_no) == tbf);
+#endif
 				} else {
 					OSMO_ASSERT(pdch->ul_tbf_by_tfi(
 							tbf->tfi()) == tbf);
 					/* This assertion cannot hold with the
 					 * current API and shared TFI */
+#if 0
 					OSMO_ASSERT(the_bts->ul_tbf_by_tfi(
 							tbf->tfi(),
 							tbf->trx->trx_no) == tbf);
+#endif
 				}
 				*tbf_var = tbf;
 				OSMO_ASSERT(pdch->assigned_tfi(tbf->direction) &
@@ -112,7 +116,7 @@
 	uint8_t used_trx, tmp_trx;
 	BTS the_bts;
 	struct gprs_rlcmac_bts *bts;
-	struct gprs_rlcmac_tbf *tbfs[33] = { 0, };
+	struct gprs_rlcmac_tbf *tbfs[32*8+1] = { 0, };
 
 	printf("Testing alloc_a direction(%d)\n", dir);
 
@@ -132,26 +136,21 @@
 	 * we are out of tfi's. Observe this and make sure that at
 	 * least this part is working okay.
 	 */
-	for (int i = 0; i < count; ++i) {
+	for (i = 0; i < (int)ARRAY_SIZE(tbfs); ++i) {
 		tbfs[i] = tbf_alloc(bts, NULL, dir, -1, 0, 0);
-		OSMO_ASSERT(tbfs[i] != NULL);
+		if (tbfs[i] == NULL)
+			break;
+
+		used_trx = tbfs[i]->trx->trx_no;
 		tfi = the_bts.tfi_find_free(dir, &tmp_trx, used_trx);
 		OSMO_ASSERT(tbfs[i]->tfi() != tfi);
 	}
 
-	/* Now check that there are still some TFIs */
-	tfi = the_bts.tfi_find_free(dir, &used_trx, 0);
-	switch (dir) {
-	case GPRS_RLCMAC_UL_TBF:
-		OSMO_ASSERT(tfi >= 0);
-		break;
-	case GPRS_RLCMAC_DL_TBF:
-		OSMO_ASSERT(tfi < 0);
-		break;
-	}
-	OSMO_ASSERT(!tbf_alloc(bts, NULL, dir, -1, 0, 0));
+	check_tfi_usage(&the_bts);
 
-	for (size_t i = 0; i < ARRAY_SIZE(tbfs); ++i)
+	OSMO_ASSERT(i == count);
+
+	for (i = 0; i < count; ++i)
 		if (tbfs[i])
 			tbf_free(tbfs[i]);
 
@@ -163,11 +162,11 @@
 static void test_alloc_a()
 {
 	/* slots 2 - 3 */
-	test_alloc_a(GPRS_RLCMAC_DL_TBF, 0x0c, 32);
+	test_alloc_a(GPRS_RLCMAC_DL_TBF, 0x0c, 32*2);
 	test_alloc_a(GPRS_RLCMAC_UL_TBF, 0x0c, 14);
 
 	/* slots 1 - 5 */
-	test_alloc_a(GPRS_RLCMAC_DL_TBF, 0x1e, 32);
+	test_alloc_a(GPRS_RLCMAC_DL_TBF, 0x1e, 32*4);
 	test_alloc_a(GPRS_RLCMAC_UL_TBF, 0x1e, 28);
 }
 
@@ -626,16 +625,16 @@
 			ms_class = min_class;
 	}
 
-	check_tfi_usage(&the_bts);
-
 	printf("  Successfully allocated %d UL TBFs\n", counter);
 	OSMO_ASSERT(counter == expect_num);
+
+	check_tfi_usage(&the_bts);
 }
 
 static void test_successive_allocation()
 {
 	test_successive_allocation(alloc_algorithm_a, 1, 1, TEST_MODE_UL_AND_DL,
-		32, "algorithm A (UL and DL)");
+		35, "algorithm A (UL and DL)");
 	test_successive_allocation(alloc_algorithm_b, 10, 10, TEST_MODE_UL_AND_DL,
 		32, "algorithm B class 10 (UL and DL)");
 	test_successive_allocation(alloc_algorithm_b, 12, 12, TEST_MODE_UL_AND_DL,
@@ -646,27 +645,27 @@
 		32, "algorithm B class 1-29 (UL and DL)");
 
 	test_successive_allocation(alloc_algorithm_a, 1, 1, TEST_MODE_DL_AND_UL,
-		32, "algorithm A (DL and UL)");
+		35, "algorithm A (DL and UL)");
 	test_successive_allocation(alloc_algorithm_b, 10, 10, TEST_MODE_DL_AND_UL,
 		32, "algorithm B class 10 (DL and UL)");
 
 	test_successive_allocation(alloc_algorithm_a, 1, 1, TEST_MODE_DL_AFTER_UL,
-		32, "algorithm A (DL after UL)");
+		160, "algorithm A (DL after UL)");
 	test_successive_allocation(alloc_algorithm_b, 10, 10, TEST_MODE_DL_AFTER_UL,
 		32, "algorithm B class 10 (DL after UL)");
 
 	test_successive_allocation(alloc_algorithm_a, 1, 1, TEST_MODE_UL_AFTER_DL,
-		32, "algorithm A (UL after DL)");
+		35, "algorithm A (UL after DL)");
 	test_successive_allocation(alloc_algorithm_b, 10, 10, TEST_MODE_UL_AFTER_DL,
 		32, "algorithm B class 10 (UL after DL)");
 
 	test_successive_allocation(alloc_algorithm_a, 1, 1, TEST_MODE_UL_ONLY,
-		32, "algorithm A (UL only)");
+		35, "algorithm A (UL only)");
 	test_successive_allocation(alloc_algorithm_b, 10, 10, TEST_MODE_UL_ONLY,
 		32, "algorithm B class 10 (UL only)");
 
 	test_successive_allocation(alloc_algorithm_a, 1, 1, TEST_MODE_DL_ONLY,
-		32, "algorithm A (DL ONLY)");
+		160, "algorithm A (DL ONLY)");
 	test_successive_allocation(alloc_algorithm_b, 10, 10, TEST_MODE_DL_ONLY,
 		32, "algorithm B class 10 (DL ONLY)");
 }
diff --git a/tests/alloc/AllocTest.err b/tests/alloc/AllocTest.err
index d848aff..33925dc 100644
--- a/tests/alloc/AllocTest.err
+++ b/tests/alloc/AllocTest.err
@@ -1,13 +1,14 @@
 No TFI available.
 No TFI available.
-No TFI available.
-- Failed to allocate a TFI
-- Failed to allocate a TS, no USF available
+- Failed to find a usable TRX (TFI exhausted)
+- Failed to allocate a TS, no TFI or USF available
 No TFI available.
 No TFI available.
 No TFI available.
-- Failed to allocate a TFI
-- Failed to allocate a TS, no USF available
+No TFI available.
+- Failed to find a usable TRX (TFI exhausted)
+- Failed to allocate a TS, no TFI or USF available
+- Failed to allocate a TS, no TFI or USF available
 No TFI available.
 No TFI available.
 - Failed to allocate a TFI
@@ -20,36 +21,33 @@
 No TFI available.
 No TFI available.
 - Failed to allocate a TFI
+- Failed to allocate a TS, no TFI or USF available
 No TFI available.
 No TFI available.
 - Failed to allocate a TFI
 No TFI available.
 No TFI available.
+No TFI available.
+No TFI available.
+No TFI available.
+- Failed to find a usable TRX (TFI exhausted)
+No TFI available.
+No TFI available.
 - Failed to allocate a TFI
+- Failed to allocate a TS, no TFI or USF available
+No TFI available.
+No TFI available.
+- Failed to allocate a TFI
+- Failed to allocate a TS, no TFI or USF available
 No TFI available.
 No TFI available.
 - Failed to allocate a TFI
 No TFI available.
 No TFI available.
-- Failed to allocate a TFI
 No TFI available.
 No TFI available.
-- Failed to allocate a TFI
 No TFI available.
-No TFI available.
-- Failed to allocate a TFI
-No TFI available.
-No TFI available.
-- Failed to allocate a TFI
-No TFI available.
-No TFI available.
-- Failed to allocate a TFI
-No TFI available.
-No TFI available.
-- Failed to allocate a TFI
-No TFI available.
-No TFI available.
-- Failed to allocate a TFI
+- Failed to find a usable TRX (TFI exhausted)
 No TFI available.
 No TFI available.
 - Failed to allocate a TFI
diff --git a/tests/alloc/AllocTest.ok b/tests/alloc/AllocTest.ok
index 823595a..fc96cb9 100644
--- a/tests/alloc/AllocTest.ok
+++ b/tests/alloc/AllocTest.ok
@@ -8590,38 +8590,41 @@
 Mass test: TS0(OOOOOOOO)TS7 MS_Class=29
 Going to test assignment with many TBF, algorithm A (UL and DL)
  TBF[0] class 1 reserves ...C....
+ TBF[0] class 1 reserves ....C...
+ TBF[0] class 1 reserves .....C..
+ TBF[0] class 1 reserves ......C.
+ TBF[0] class 1 reserves .......C
+ TBF[1] class 1 reserves ...C....
  TBF[1] class 1 reserves ....C...
+ TBF[1] class 1 reserves .....C..
+ TBF[1] class 1 reserves ......C.
+ TBF[1] class 1 reserves .......C
+ TBF[2] class 1 reserves ...C....
+ TBF[2] class 1 reserves ....C...
  TBF[2] class 1 reserves .....C..
+ TBF[2] class 1 reserves ......C.
+ TBF[2] class 1 reserves .......C
+ TBF[3] class 1 reserves ...C....
+ TBF[3] class 1 reserves ....C...
+ TBF[3] class 1 reserves .....C..
  TBF[3] class 1 reserves ......C.
+ TBF[3] class 1 reserves .......C
+ TBF[4] class 1 reserves ...C....
+ TBF[4] class 1 reserves ....C...
+ TBF[4] class 1 reserves .....C..
+ TBF[4] class 1 reserves ......C.
  TBF[4] class 1 reserves .......C
  TBF[5] class 1 reserves ...C....
+ TBF[5] class 1 reserves ....C...
+ TBF[5] class 1 reserves .....C..
+ TBF[5] class 1 reserves ......C.
+ TBF[5] class 1 reserves .......C
+ TBF[6] class 1 reserves ...C....
  TBF[6] class 1 reserves ....C...
- TBF[7] class 1 reserves .....C..
- TBF[8] class 1 reserves ......C.
- TBF[9] class 1 reserves .......C
- TBF[10] class 1 reserves ...C....
- TBF[11] class 1 reserves ....C...
- TBF[12] class 1 reserves .....C..
- TBF[13] class 1 reserves ......C.
- TBF[14] class 1 reserves .......C
- TBF[15] class 1 reserves ...C....
- TBF[16] class 1 reserves ....C...
- TBF[17] class 1 reserves .....C..
- TBF[18] class 1 reserves ......C.
- TBF[19] class 1 reserves .......C
- TBF[20] class 1 reserves ...C....
- TBF[21] class 1 reserves ....C...
- TBF[22] class 1 reserves .....C..
- TBF[23] class 1 reserves ......C.
- TBF[24] class 1 reserves .......C
- TBF[25] class 1 reserves ...C....
- TBF[26] class 1 reserves ....C...
- TBF[27] class 1 reserves .....C..
- TBF[28] class 1 reserves ......C.
- TBF[29] class 1 reserves .......C
- TBF[30] class 1 reserves ...C....
- TBF[31] class 1 reserves ....C...
-  Successfully allocated 32 UL TBFs
+ TBF[6] class 1 reserves .....C..
+ TBF[6] class 1 reserves ......C.
+ TBF[6] class 1 reserves .......C
+  Successfully allocated 35 UL TBFs
 Going to test assignment with many TBF, algorithm B class 10 (UL and DL)
  TBF[0] class 10 reserves ...DDCD.
  TBF[1] class 10 reserves .....DCD
@@ -8760,38 +8763,41 @@
   Successfully allocated 32 UL TBFs
 Going to test assignment with many TBF, algorithm A (DL and UL)
  TBF[0] class 1 reserves ...C....
+ TBF[0] class 1 reserves ....C...
+ TBF[0] class 1 reserves .....C..
+ TBF[0] class 1 reserves ......C.
+ TBF[0] class 1 reserves .......C
+ TBF[1] class 1 reserves ...C....
  TBF[1] class 1 reserves ....C...
+ TBF[1] class 1 reserves .....C..
+ TBF[1] class 1 reserves ......C.
+ TBF[1] class 1 reserves .......C
+ TBF[2] class 1 reserves ...C....
+ TBF[2] class 1 reserves ....C...
  TBF[2] class 1 reserves .....C..
+ TBF[2] class 1 reserves ......C.
+ TBF[2] class 1 reserves .......C
+ TBF[3] class 1 reserves ...C....
+ TBF[3] class 1 reserves ....C...
+ TBF[3] class 1 reserves .....C..
  TBF[3] class 1 reserves ......C.
+ TBF[3] class 1 reserves .......C
+ TBF[4] class 1 reserves ...C....
+ TBF[4] class 1 reserves ....C...
+ TBF[4] class 1 reserves .....C..
+ TBF[4] class 1 reserves ......C.
  TBF[4] class 1 reserves .......C
  TBF[5] class 1 reserves ...C....
+ TBF[5] class 1 reserves ....C...
+ TBF[5] class 1 reserves .....C..
+ TBF[5] class 1 reserves ......C.
+ TBF[5] class 1 reserves .......C
+ TBF[6] class 1 reserves ...C....
  TBF[6] class 1 reserves ....C...
- TBF[7] class 1 reserves .....C..
- TBF[8] class 1 reserves ......C.
- TBF[9] class 1 reserves .......C
- TBF[10] class 1 reserves ...C....
- TBF[11] class 1 reserves ....C...
- TBF[12] class 1 reserves .....C..
- TBF[13] class 1 reserves ......C.
- TBF[14] class 1 reserves .......C
- TBF[15] class 1 reserves ...C....
- TBF[16] class 1 reserves ....C...
- TBF[17] class 1 reserves .....C..
- TBF[18] class 1 reserves ......C.
- TBF[19] class 1 reserves .......C
- TBF[20] class 1 reserves ...C....
- TBF[21] class 1 reserves ....C...
- TBF[22] class 1 reserves .....C..
- TBF[23] class 1 reserves ......C.
- TBF[24] class 1 reserves .......C
- TBF[25] class 1 reserves ...C....
- TBF[26] class 1 reserves ....C...
- TBF[27] class 1 reserves .....C..
- TBF[28] class 1 reserves ......C.
- TBF[29] class 1 reserves .......C
- TBF[30] class 1 reserves ...C....
- TBF[31] class 1 reserves ....C...
-  Successfully allocated 32 UL TBFs
+ TBF[6] class 1 reserves .....C..
+ TBF[6] class 1 reserves ......C.
+ TBF[6] class 1 reserves .......C
+  Successfully allocated 35 UL TBFs
 Going to test assignment with many TBF, algorithm B class 10 (DL and UL)
  TBF[0] class 10 reserves ...DDCD.
  TBF[1] class 10 reserves .....DCD
@@ -8828,38 +8834,166 @@
   Successfully allocated 32 UL TBFs
 Going to test assignment with many TBF, algorithm A (DL after UL)
  TBF[0] class 1 reserves ...C....
+ TBF[0] class 1 reserves ....C...
+ TBF[0] class 1 reserves .....C..
+ TBF[0] class 1 reserves ......C.
+ TBF[0] class 1 reserves .......C
+ TBF[1] class 1 reserves ...C....
  TBF[1] class 1 reserves ....C...
+ TBF[1] class 1 reserves .....C..
+ TBF[1] class 1 reserves ......C.
+ TBF[1] class 1 reserves .......C
+ TBF[2] class 1 reserves ...C....
+ TBF[2] class 1 reserves ....C...
  TBF[2] class 1 reserves .....C..
+ TBF[2] class 1 reserves ......C.
+ TBF[2] class 1 reserves .......C
+ TBF[3] class 1 reserves ...C....
+ TBF[3] class 1 reserves ....C...
+ TBF[3] class 1 reserves .....C..
  TBF[3] class 1 reserves ......C.
+ TBF[3] class 1 reserves .......C
+ TBF[4] class 1 reserves ...C....
+ TBF[4] class 1 reserves ....C...
+ TBF[4] class 1 reserves .....C..
+ TBF[4] class 1 reserves ......C.
  TBF[4] class 1 reserves .......C
  TBF[5] class 1 reserves ...C....
+ TBF[5] class 1 reserves ....C...
+ TBF[5] class 1 reserves .....C..
+ TBF[5] class 1 reserves ......C.
+ TBF[5] class 1 reserves .......C
+ TBF[6] class 1 reserves ...C....
  TBF[6] class 1 reserves ....C...
+ TBF[6] class 1 reserves .....C..
+ TBF[6] class 1 reserves ......C.
+ TBF[6] class 1 reserves .......C
+ TBF[7] class 1 reserves ...C....
+ TBF[7] class 1 reserves ....C...
  TBF[7] class 1 reserves .....C..
+ TBF[7] class 1 reserves ......C.
+ TBF[7] class 1 reserves .......C
+ TBF[8] class 1 reserves ...C....
+ TBF[8] class 1 reserves ....C...
+ TBF[8] class 1 reserves .....C..
  TBF[8] class 1 reserves ......C.
+ TBF[8] class 1 reserves .......C
+ TBF[9] class 1 reserves ...C....
+ TBF[9] class 1 reserves ....C...
+ TBF[9] class 1 reserves .....C..
+ TBF[9] class 1 reserves ......C.
  TBF[9] class 1 reserves .......C
  TBF[10] class 1 reserves ...C....
+ TBF[10] class 1 reserves ....C...
+ TBF[10] class 1 reserves .....C..
+ TBF[10] class 1 reserves ......C.
+ TBF[10] class 1 reserves .......C
+ TBF[11] class 1 reserves ...C....
  TBF[11] class 1 reserves ....C...
+ TBF[11] class 1 reserves .....C..
+ TBF[11] class 1 reserves ......C.
+ TBF[11] class 1 reserves .......C
+ TBF[12] class 1 reserves ...C....
+ TBF[12] class 1 reserves ....C...
  TBF[12] class 1 reserves .....C..
+ TBF[12] class 1 reserves ......C.
+ TBF[12] class 1 reserves .......C
+ TBF[13] class 1 reserves ...C....
+ TBF[13] class 1 reserves ....C...
+ TBF[13] class 1 reserves .....C..
  TBF[13] class 1 reserves ......C.
+ TBF[13] class 1 reserves .......C
+ TBF[14] class 1 reserves ...C....
+ TBF[14] class 1 reserves ....C...
+ TBF[14] class 1 reserves .....C..
+ TBF[14] class 1 reserves ......C.
  TBF[14] class 1 reserves .......C
  TBF[15] class 1 reserves ...C....
+ TBF[15] class 1 reserves ....C...
+ TBF[15] class 1 reserves .....C..
+ TBF[15] class 1 reserves ......C.
+ TBF[15] class 1 reserves .......C
+ TBF[16] class 1 reserves ...C....
  TBF[16] class 1 reserves ....C...
+ TBF[16] class 1 reserves .....C..
+ TBF[16] class 1 reserves ......C.
+ TBF[16] class 1 reserves .......C
+ TBF[17] class 1 reserves ...C....
+ TBF[17] class 1 reserves ....C...
  TBF[17] class 1 reserves .....C..
+ TBF[17] class 1 reserves ......C.
+ TBF[17] class 1 reserves .......C
+ TBF[18] class 1 reserves ...C....
+ TBF[18] class 1 reserves ....C...
+ TBF[18] class 1 reserves .....C..
  TBF[18] class 1 reserves ......C.
+ TBF[18] class 1 reserves .......C
+ TBF[19] class 1 reserves ...C....
+ TBF[19] class 1 reserves ....C...
+ TBF[19] class 1 reserves .....C..
+ TBF[19] class 1 reserves ......C.
  TBF[19] class 1 reserves .......C
  TBF[20] class 1 reserves ...C....
+ TBF[20] class 1 reserves ....C...
+ TBF[20] class 1 reserves .....C..
+ TBF[20] class 1 reserves ......C.
+ TBF[20] class 1 reserves .......C
+ TBF[21] class 1 reserves ...C....
  TBF[21] class 1 reserves ....C...
+ TBF[21] class 1 reserves .....C..
+ TBF[21] class 1 reserves ......C.
+ TBF[21] class 1 reserves .......C
+ TBF[22] class 1 reserves ...C....
+ TBF[22] class 1 reserves ....C...
  TBF[22] class 1 reserves .....C..
+ TBF[22] class 1 reserves ......C.
+ TBF[22] class 1 reserves .......C
+ TBF[23] class 1 reserves ...C....
+ TBF[23] class 1 reserves ....C...
+ TBF[23] class 1 reserves .....C..
  TBF[23] class 1 reserves ......C.
+ TBF[23] class 1 reserves .......C
+ TBF[24] class 1 reserves ...C....
+ TBF[24] class 1 reserves ....C...
+ TBF[24] class 1 reserves .....C..
+ TBF[24] class 1 reserves ......C.
  TBF[24] class 1 reserves .......C
  TBF[25] class 1 reserves ...C....
+ TBF[25] class 1 reserves ....C...
+ TBF[25] class 1 reserves .....C..
+ TBF[25] class 1 reserves ......C.
+ TBF[25] class 1 reserves .......C
+ TBF[26] class 1 reserves ...C....
  TBF[26] class 1 reserves ....C...
+ TBF[26] class 1 reserves .....C..
+ TBF[26] class 1 reserves ......C.
+ TBF[26] class 1 reserves .......C
+ TBF[27] class 1 reserves ...C....
+ TBF[27] class 1 reserves ....C...
  TBF[27] class 1 reserves .....C..
+ TBF[27] class 1 reserves ......C.
+ TBF[27] class 1 reserves .......C
+ TBF[28] class 1 reserves ...C....
+ TBF[28] class 1 reserves ....C...
+ TBF[28] class 1 reserves .....C..
  TBF[28] class 1 reserves ......C.
+ TBF[28] class 1 reserves .......C
+ TBF[29] class 1 reserves ...C....
+ TBF[29] class 1 reserves ....C...
+ TBF[29] class 1 reserves .....C..
+ TBF[29] class 1 reserves ......C.
  TBF[29] class 1 reserves .......C
  TBF[30] class 1 reserves ...C....
+ TBF[30] class 1 reserves ....C...
+ TBF[30] class 1 reserves .....C..
+ TBF[30] class 1 reserves ......C.
+ TBF[30] class 1 reserves .......C
+ TBF[31] class 1 reserves ...C....
  TBF[31] class 1 reserves ....C...
-  Successfully allocated 32 UL TBFs
+ TBF[31] class 1 reserves .....C..
+ TBF[31] class 1 reserves ......C.
+ TBF[31] class 1 reserves .......C
+  Successfully allocated 160 UL TBFs
 Going to test assignment with many TBF, algorithm B class 10 (DL after UL)
  TBF[0] class 10 reserves ...DDCD.
  TBF[1] class 10 reserves .....DCD
@@ -8896,38 +9030,41 @@
   Successfully allocated 32 UL TBFs
 Going to test assignment with many TBF, algorithm A (UL after DL)
  TBF[0] class 1 reserves ...U....
+ TBF[0] class 1 reserves ....U...
+ TBF[0] class 1 reserves .....U..
+ TBF[0] class 1 reserves ......U.
+ TBF[0] class 1 reserves .......U
+ TBF[1] class 1 reserves ...U....
  TBF[1] class 1 reserves ....U...
+ TBF[1] class 1 reserves .....U..
+ TBF[1] class 1 reserves ......U.
+ TBF[1] class 1 reserves .......U
+ TBF[2] class 1 reserves ...U....
+ TBF[2] class 1 reserves ....U...
  TBF[2] class 1 reserves .....U..
+ TBF[2] class 1 reserves ......U.
+ TBF[2] class 1 reserves .......U
+ TBF[3] class 1 reserves ...U....
+ TBF[3] class 1 reserves ....U...
+ TBF[3] class 1 reserves .....U..
  TBF[3] class 1 reserves ......U.
+ TBF[3] class 1 reserves .......U
+ TBF[4] class 1 reserves ...U....
+ TBF[4] class 1 reserves ....U...
+ TBF[4] class 1 reserves .....U..
+ TBF[4] class 1 reserves ......U.
  TBF[4] class 1 reserves .......U
  TBF[5] class 1 reserves ...U....
+ TBF[5] class 1 reserves ....U...
+ TBF[5] class 1 reserves .....U..
+ TBF[5] class 1 reserves ......U.
+ TBF[5] class 1 reserves .......U
+ TBF[6] class 1 reserves ...U....
  TBF[6] class 1 reserves ....U...
- TBF[7] class 1 reserves .....U..
- TBF[8] class 1 reserves ......U.
- TBF[9] class 1 reserves .......U
- TBF[10] class 1 reserves ...U....
- TBF[11] class 1 reserves ....U...
- TBF[12] class 1 reserves .....U..
- TBF[13] class 1 reserves ......U.
- TBF[14] class 1 reserves .......U
- TBF[15] class 1 reserves ...U....
- TBF[16] class 1 reserves ....U...
- TBF[17] class 1 reserves .....U..
- TBF[18] class 1 reserves ......U.
- TBF[19] class 1 reserves .......U
- TBF[20] class 1 reserves ...U....
- TBF[21] class 1 reserves ....U...
- TBF[22] class 1 reserves .....U..
- TBF[23] class 1 reserves ......U.
- TBF[24] class 1 reserves .......U
- TBF[25] class 1 reserves ...U....
- TBF[26] class 1 reserves ....U...
- TBF[27] class 1 reserves .....U..
- TBF[28] class 1 reserves ......U.
- TBF[29] class 1 reserves .......U
- TBF[30] class 1 reserves ...U....
- TBF[31] class 1 reserves ....U...
-  Successfully allocated 32 UL TBFs
+ TBF[6] class 1 reserves .....U..
+ TBF[6] class 1 reserves ......U.
+ TBF[6] class 1 reserves .......U
+  Successfully allocated 35 UL TBFs
 Going to test assignment with many TBF, algorithm B class 10 (UL after DL)
  TBF[0] class 10 reserves .....U..
  TBF[1] class 10 reserves ......U.
@@ -8964,38 +9101,41 @@
   Successfully allocated 32 UL TBFs
 Going to test assignment with many TBF, algorithm A (UL only)
  TBF[0] class 1 reserves ...U....
+ TBF[0] class 1 reserves ....U...
+ TBF[0] class 1 reserves .....U..
+ TBF[0] class 1 reserves ......U.
+ TBF[0] class 1 reserves .......U
+ TBF[1] class 1 reserves ...U....
  TBF[1] class 1 reserves ....U...
+ TBF[1] class 1 reserves .....U..
+ TBF[1] class 1 reserves ......U.
+ TBF[1] class 1 reserves .......U
+ TBF[2] class 1 reserves ...U....
+ TBF[2] class 1 reserves ....U...
  TBF[2] class 1 reserves .....U..
+ TBF[2] class 1 reserves ......U.
+ TBF[2] class 1 reserves .......U
+ TBF[3] class 1 reserves ...U....
+ TBF[3] class 1 reserves ....U...
+ TBF[3] class 1 reserves .....U..
  TBF[3] class 1 reserves ......U.
+ TBF[3] class 1 reserves .......U
+ TBF[4] class 1 reserves ...U....
+ TBF[4] class 1 reserves ....U...
+ TBF[4] class 1 reserves .....U..
+ TBF[4] class 1 reserves ......U.
  TBF[4] class 1 reserves .......U
  TBF[5] class 1 reserves ...U....
+ TBF[5] class 1 reserves ....U...
+ TBF[5] class 1 reserves .....U..
+ TBF[5] class 1 reserves ......U.
+ TBF[5] class 1 reserves .......U
+ TBF[6] class 1 reserves ...U....
  TBF[6] class 1 reserves ....U...
- TBF[7] class 1 reserves .....U..
- TBF[8] class 1 reserves ......U.
- TBF[9] class 1 reserves .......U
- TBF[10] class 1 reserves ...U....
- TBF[11] class 1 reserves ....U...
- TBF[12] class 1 reserves .....U..
- TBF[13] class 1 reserves ......U.
- TBF[14] class 1 reserves .......U
- TBF[15] class 1 reserves ...U....
- TBF[16] class 1 reserves ....U...
- TBF[17] class 1 reserves .....U..
- TBF[18] class 1 reserves ......U.
- TBF[19] class 1 reserves .......U
- TBF[20] class 1 reserves ...U....
- TBF[21] class 1 reserves ....U...
- TBF[22] class 1 reserves .....U..
- TBF[23] class 1 reserves ......U.
- TBF[24] class 1 reserves .......U
- TBF[25] class 1 reserves ...U....
- TBF[26] class 1 reserves ....U...
- TBF[27] class 1 reserves .....U..
- TBF[28] class 1 reserves ......U.
- TBF[29] class 1 reserves .......U
- TBF[30] class 1 reserves ...U....
- TBF[31] class 1 reserves ....U...
-  Successfully allocated 32 UL TBFs
+ TBF[6] class 1 reserves .....U..
+ TBF[6] class 1 reserves ......U.
+ TBF[6] class 1 reserves .......U
+  Successfully allocated 35 UL TBFs
 Going to test assignment with many TBF, algorithm B class 10 (UL only)
  TBF[0] class 10 reserves .....U..
  TBF[1] class 10 reserves ......U.
@@ -9032,38 +9172,166 @@
   Successfully allocated 32 UL TBFs
 Going to test assignment with many TBF, algorithm A (DL ONLY)
  TBF[0] class 1 reserves ...C....
+ TBF[0] class 1 reserves ....C...
+ TBF[0] class 1 reserves .....C..
+ TBF[0] class 1 reserves ......C.
+ TBF[0] class 1 reserves .......C
+ TBF[1] class 1 reserves ...C....
  TBF[1] class 1 reserves ....C...
+ TBF[1] class 1 reserves .....C..
+ TBF[1] class 1 reserves ......C.
+ TBF[1] class 1 reserves .......C
+ TBF[2] class 1 reserves ...C....
+ TBF[2] class 1 reserves ....C...
  TBF[2] class 1 reserves .....C..
+ TBF[2] class 1 reserves ......C.
+ TBF[2] class 1 reserves .......C
+ TBF[3] class 1 reserves ...C....
+ TBF[3] class 1 reserves ....C...
+ TBF[3] class 1 reserves .....C..
  TBF[3] class 1 reserves ......C.
+ TBF[3] class 1 reserves .......C
+ TBF[4] class 1 reserves ...C....
+ TBF[4] class 1 reserves ....C...
+ TBF[4] class 1 reserves .....C..
+ TBF[4] class 1 reserves ......C.
  TBF[4] class 1 reserves .......C
  TBF[5] class 1 reserves ...C....
+ TBF[5] class 1 reserves ....C...
+ TBF[5] class 1 reserves .....C..
+ TBF[5] class 1 reserves ......C.
+ TBF[5] class 1 reserves .......C
+ TBF[6] class 1 reserves ...C....
  TBF[6] class 1 reserves ....C...
+ TBF[6] class 1 reserves .....C..
+ TBF[6] class 1 reserves ......C.
+ TBF[6] class 1 reserves .......C
+ TBF[7] class 1 reserves ...C....
+ TBF[7] class 1 reserves ....C...
  TBF[7] class 1 reserves .....C..
+ TBF[7] class 1 reserves ......C.
+ TBF[7] class 1 reserves .......C
+ TBF[8] class 1 reserves ...C....
+ TBF[8] class 1 reserves ....C...
+ TBF[8] class 1 reserves .....C..
  TBF[8] class 1 reserves ......C.
+ TBF[8] class 1 reserves .......C
+ TBF[9] class 1 reserves ...C....
+ TBF[9] class 1 reserves ....C...
+ TBF[9] class 1 reserves .....C..
+ TBF[9] class 1 reserves ......C.
  TBF[9] class 1 reserves .......C
  TBF[10] class 1 reserves ...C....
+ TBF[10] class 1 reserves ....C...
+ TBF[10] class 1 reserves .....C..
+ TBF[10] class 1 reserves ......C.
+ TBF[10] class 1 reserves .......C
+ TBF[11] class 1 reserves ...C....
  TBF[11] class 1 reserves ....C...
+ TBF[11] class 1 reserves .....C..
+ TBF[11] class 1 reserves ......C.
+ TBF[11] class 1 reserves .......C
+ TBF[12] class 1 reserves ...C....
+ TBF[12] class 1 reserves ....C...
  TBF[12] class 1 reserves .....C..
+ TBF[12] class 1 reserves ......C.
+ TBF[12] class 1 reserves .......C
+ TBF[13] class 1 reserves ...C....
+ TBF[13] class 1 reserves ....C...
+ TBF[13] class 1 reserves .....C..
  TBF[13] class 1 reserves ......C.
+ TBF[13] class 1 reserves .......C
+ TBF[14] class 1 reserves ...C....
+ TBF[14] class 1 reserves ....C...
+ TBF[14] class 1 reserves .....C..
+ TBF[14] class 1 reserves ......C.
  TBF[14] class 1 reserves .......C
  TBF[15] class 1 reserves ...C....
+ TBF[15] class 1 reserves ....C...
+ TBF[15] class 1 reserves .....C..
+ TBF[15] class 1 reserves ......C.
+ TBF[15] class 1 reserves .......C
+ TBF[16] class 1 reserves ...C....
  TBF[16] class 1 reserves ....C...
+ TBF[16] class 1 reserves .....C..
+ TBF[16] class 1 reserves ......C.
+ TBF[16] class 1 reserves .......C
+ TBF[17] class 1 reserves ...C....
+ TBF[17] class 1 reserves ....C...
  TBF[17] class 1 reserves .....C..
+ TBF[17] class 1 reserves ......C.
+ TBF[17] class 1 reserves .......C
+ TBF[18] class 1 reserves ...C....
+ TBF[18] class 1 reserves ....C...
+ TBF[18] class 1 reserves .....C..
  TBF[18] class 1 reserves ......C.
+ TBF[18] class 1 reserves .......C
+ TBF[19] class 1 reserves ...C....
+ TBF[19] class 1 reserves ....C...
+ TBF[19] class 1 reserves .....C..
+ TBF[19] class 1 reserves ......C.
  TBF[19] class 1 reserves .......C
  TBF[20] class 1 reserves ...C....
+ TBF[20] class 1 reserves ....C...
+ TBF[20] class 1 reserves .....C..
+ TBF[20] class 1 reserves ......C.
+ TBF[20] class 1 reserves .......C
+ TBF[21] class 1 reserves ...C....
  TBF[21] class 1 reserves ....C...
+ TBF[21] class 1 reserves .....C..
+ TBF[21] class 1 reserves ......C.
+ TBF[21] class 1 reserves .......C
+ TBF[22] class 1 reserves ...C....
+ TBF[22] class 1 reserves ....C...
  TBF[22] class 1 reserves .....C..
+ TBF[22] class 1 reserves ......C.
+ TBF[22] class 1 reserves .......C
+ TBF[23] class 1 reserves ...C....
+ TBF[23] class 1 reserves ....C...
+ TBF[23] class 1 reserves .....C..
  TBF[23] class 1 reserves ......C.
+ TBF[23] class 1 reserves .......C
+ TBF[24] class 1 reserves ...C....
+ TBF[24] class 1 reserves ....C...
+ TBF[24] class 1 reserves .....C..
+ TBF[24] class 1 reserves ......C.
  TBF[24] class 1 reserves .......C
  TBF[25] class 1 reserves ...C....
+ TBF[25] class 1 reserves ....C...
+ TBF[25] class 1 reserves .....C..
+ TBF[25] class 1 reserves ......C.
+ TBF[25] class 1 reserves .......C
+ TBF[26] class 1 reserves ...C....
  TBF[26] class 1 reserves ....C...
+ TBF[26] class 1 reserves .....C..
+ TBF[26] class 1 reserves ......C.
+ TBF[26] class 1 reserves .......C
+ TBF[27] class 1 reserves ...C....
+ TBF[27] class 1 reserves ....C...
  TBF[27] class 1 reserves .....C..
+ TBF[27] class 1 reserves ......C.
+ TBF[27] class 1 reserves .......C
+ TBF[28] class 1 reserves ...C....
+ TBF[28] class 1 reserves ....C...
+ TBF[28] class 1 reserves .....C..
  TBF[28] class 1 reserves ......C.
+ TBF[28] class 1 reserves .......C
+ TBF[29] class 1 reserves ...C....
+ TBF[29] class 1 reserves ....C...
+ TBF[29] class 1 reserves .....C..
+ TBF[29] class 1 reserves ......C.
  TBF[29] class 1 reserves .......C
  TBF[30] class 1 reserves ...C....
+ TBF[30] class 1 reserves ....C...
+ TBF[30] class 1 reserves .....C..
+ TBF[30] class 1 reserves ......C.
+ TBF[30] class 1 reserves .......C
+ TBF[31] class 1 reserves ...C....
  TBF[31] class 1 reserves ....C...
-  Successfully allocated 32 UL TBFs
+ TBF[31] class 1 reserves .....C..
+ TBF[31] class 1 reserves ......C.
+ TBF[31] class 1 reserves .......C
+  Successfully allocated 160 UL TBFs
 Going to test assignment with many TBF, algorithm B class 10 (DL ONLY)
  TBF[0] class 10 reserves ...DDCD.
  TBF[1] class 10 reserves .....DCD
diff --git a/tests/tbf/TbfTest.err b/tests/tbf/TbfTest.err
index c64d4f1..72c3851 100644
--- a/tests/tbf/TbfTest.err
+++ b/tests/tbf/TbfTest.err
@@ -2,8 +2,6 @@
 Allocating DL TBF: MS_CLASS=0
 Creating MS object, TLLI = 0x00000000
 Slot Allocation (Algorithm A) for class 0
-Searching for first unallocated TFI: TRX=0 first TS=2
- Found TFI=0.
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
 - Skipping TS 4, because not enabled
@@ -11,7 +9,7 @@
 - Skipping TS 6, because not enabled
 - Skipping TS 7, because not enabled
 - Skipping TS 3, because num TBFs 0 >= 0
-- Assign downlink TS=2
+- Assign downlink TS=2 TFI=0
 PDCH(TS 2, TRX 0): Attaching TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL), 1 TBFs, USFs = 00, TFIs = 00000001.
 - Setting Control TS 2
 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL)
@@ -21,8 +19,6 @@
 ********** TBF starts here **********
 Allocating UL TBF: MS_CLASS=0
 Slot Allocation (Algorithm A) for class 0
-Searching for first unallocated TFI: TRX=0 first TS=2
- Found TFI=0.
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
 - Skipping TS 3, because need to reuse TS
@@ -30,7 +26,7 @@
 - Skipping TS 5, because not enabled
 - Skipping TS 6, because not enabled
 - Skipping TS 7, because not enabled
-- Assign uplink TS=2 USF=0
+- Assign uplink TS=2 TFI=0 USF=0
 PDCH(TS 2, TRX 0): Attaching TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL), 1 TBFs, USFs = 01, TFIs = 00000001.
 - Setting Control TS 2
 Attaching TBF to MS object, TLLI = 0x00002342, TBF = TBF(TFI=0 TLLI=0x00002342 DIR=UL STATE=NULL)
@@ -46,8 +42,6 @@
 Creating MS object, TLLI = 0x00000000
 Modifying MS object, TLLI = 0x00000000, MS class 0 -> 45
 Slot Allocation (Algorithm A) for class 45
-Searching for first unallocated TFI: TRX=0 first TS=4
- Found TFI=0.
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
 - Skipping TS 2, because not enabled
@@ -55,7 +49,7 @@
 - Skipping TS 5, because not enabled
 - Skipping TS 6, because not enabled
 - Skipping TS 7, because not enabled
-- Assign downlink TS=4
+- Assign downlink TS=4 TFI=0
 PDCH(TS 4, TRX 0): Attaching TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL), 1 TBFs, USFs = 00, TFIs = 00000001.
 - Setting Control TS 4
 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL)
@@ -89,8 +83,6 @@
 ********** TBF starts here **********
 Allocating DL TBF: MS_CLASS=45
 Slot Allocation (Algorithm A) for class 45
-Searching for first unallocated TFI: TRX=0 first TS=4
- Found TFI=1.
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
 - Skipping TS 2, because not enabled
@@ -98,7 +90,7 @@
 - Skipping TS 5, because not enabled
 - Skipping TS 6, because not enabled
 - Skipping TS 7, because not enabled
-- Assign downlink TS=4
+- Assign downlink TS=4 TFI=1
 PDCH(TS 4, TRX 0): Attaching TBF(TFI=1 TLLI=0x00000000 DIR=DL STATE=NULL), 2 TBFs, USFs = 00, TFIs = 00000003.
 - Setting Control TS 4
 Attaching TBF to MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=1 TLLI=0xffeeddcc DIR=DL STATE=NULL)
@@ -125,8 +117,6 @@
 Creating MS object, TLLI = 0x00000000
 Modifying MS object, TLLI = 0x00000000, MS class 0 -> 45
 Slot Allocation (Algorithm A) for class 45
-Searching for first unallocated TFI: TRX=0 first TS=4
- Found TFI=0.
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
 - Skipping TS 2, because not enabled
@@ -134,7 +124,7 @@
 - Skipping TS 5, because not enabled
 - Skipping TS 6, because not enabled
 - Skipping TS 7, because not enabled
-- Assign downlink TS=4
+- Assign downlink TS=4 TFI=0
 PDCH(TS 4, TRX 0): Attaching TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL), 1 TBFs, USFs = 00, TFIs = 00000001.
 - Setting Control TS 4
 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL)
@@ -168,8 +158,6 @@
 ********** TBF starts here **********
 Allocating DL TBF: MS_CLASS=45
 Slot Allocation (Algorithm A) for class 45
-Searching for first unallocated TFI: TRX=0 first TS=4
- Found TFI=1.
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
 - Skipping TS 2, because not enabled
@@ -177,7 +165,7 @@
 - Skipping TS 5, because not enabled
 - Skipping TS 6, because not enabled
 - Skipping TS 7, because not enabled
-- Assign downlink TS=4
+- Assign downlink TS=4 TFI=1
 PDCH(TS 4, TRX 0): Attaching TBF(TFI=1 TLLI=0x00000000 DIR=DL STATE=NULL), 2 TBFs, USFs = 00, TFIs = 00000003.
 - Setting Control TS 4
 Attaching TBF to MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=1 TLLI=0xffeeddcc DIR=DL STATE=NULL)
@@ -204,8 +192,6 @@
 Creating MS object, TLLI = 0x00000000
 Modifying MS object, TLLI = 0x00000000, MS class 0 -> 45
 Slot Allocation (Algorithm A) for class 45
-Searching for first unallocated TFI: TRX=0 first TS=4
- Found TFI=0.
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
 - Skipping TS 2, because not enabled
@@ -213,7 +199,7 @@
 - Skipping TS 5, because not enabled
 - Skipping TS 6, because not enabled
 - Skipping TS 7, because not enabled
-- Assign downlink TS=4
+- Assign downlink TS=4 TFI=0
 PDCH(TS 4, TRX 0): Attaching TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL), 1 TBFs, USFs = 00, TFIs = 00000001.
 - Setting Control TS 4
 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL)
@@ -435,8 +421,6 @@
 Creating MS object, TLLI = 0x00000000
 Modifying MS object, TLLI = 0x00000000, MS class 0 -> 45
 Slot Allocation (Algorithm A) for class 45
-Searching for first unallocated TFI: TRX=0 first TS=4
- Found TFI=0.
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
 - Skipping TS 2, because not enabled
@@ -444,7 +428,7 @@
 - Skipping TS 5, because not enabled
 - Skipping TS 6, because not enabled
 - Skipping TS 7, because not enabled
-- Assign downlink TS=4
+- Assign downlink TS=4 TFI=0
 PDCH(TS 4, TRX 0): Attaching TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL), 1 TBFs, USFs = 00, TFIs = 00000001.
 - Setting Control TS 4
 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL)
@@ -457,8 +441,6 @@
 Creating MS object, TLLI = 0x00000000
 Modifying MS object, TLLI = 0x00000000, MS class 0 -> 45
 Slot Allocation (Algorithm A) for class 45
-Searching for first unallocated TFI: TRX=0 first TS=4
- Found TFI=1.
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
 - Skipping TS 2, because not enabled
@@ -466,7 +448,7 @@
 - Skipping TS 5, because not enabled
 - Skipping TS 6, because not enabled
 - Skipping TS 7, because not enabled
-- Assign downlink TS=4
+- Assign downlink TS=4 TFI=1
 PDCH(TS 4, TRX 0): Attaching TBF(TFI=1 TLLI=0x00000000 DIR=DL STATE=NULL), 2 TBFs, USFs = 00, TFIs = 00000003.
 - Setting Control TS 4
 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=1 TLLI=0x00000000 DIR=DL STATE=NULL)
@@ -496,8 +478,6 @@
 Creating MS object, TLLI = 0x00000000
 Modifying MS object, TLLI = 0x00000000, MS class 0 -> 45
 Slot Allocation (Algorithm A) for class 45
-Searching for first unallocated TFI: TRX=0 first TS=4
- Found TFI=0.
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
 - Skipping TS 2, because not enabled
@@ -505,7 +485,7 @@
 - Skipping TS 5, because not enabled
 - Skipping TS 6, because not enabled
 - Skipping TS 7, because not enabled
-- Assign downlink TS=4
+- Assign downlink TS=4 TFI=0
 PDCH(TS 4, TRX 0): Attaching TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL), 1 TBFs, USFs = 00, TFIs = 00000001.
 - Setting Control TS 4
 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL)
@@ -523,8 +503,6 @@
 Creating MS object, TLLI = 0x00000000
 Modifying MS object, TLLI = 0x00000000, MS class 0 -> 45
 Slot Allocation (Algorithm A) for class 45
-Searching for first unallocated TFI: TRX=0 first TS=4
- Found TFI=1.
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
 - Skipping TS 2, because not enabled
@@ -532,7 +510,7 @@
 - Skipping TS 5, because not enabled
 - Skipping TS 6, because not enabled
 - Skipping TS 7, because not enabled
-- Assign downlink TS=4
+- Assign downlink TS=4 TFI=1
 PDCH(TS 4, TRX 0): Attaching TBF(TFI=1 TLLI=0x00000000 DIR=DL STATE=NULL), 2 TBFs, USFs = 00, TFIs = 00000003.
 - Setting Control TS 4
 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=1 TLLI=0x00000000 DIR=DL STATE=NULL)
@@ -550,8 +528,6 @@
 Creating MS object, TLLI = 0x00000000
 Modifying MS object, TLLI = 0x00000000, MS class 0 -> 45
 Slot Allocation (Algorithm A) for class 45
-Searching for first unallocated TFI: TRX=0 first TS=4
- Found TFI=2.
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
 - Skipping TS 2, because not enabled
@@ -559,7 +535,7 @@
 - Skipping TS 5, because not enabled
 - Skipping TS 6, because not enabled
 - Skipping TS 7, because not enabled
-- Assign downlink TS=4
+- Assign downlink TS=4 TFI=2
 PDCH(TS 4, TRX 0): Attaching TBF(TFI=2 TLLI=0x00000000 DIR=DL STATE=NULL), 3 TBFs, USFs = 00, TFIs = 00000007.
 - Setting Control TS 4
 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=2 TLLI=0x00000000 DIR=DL STATE=NULL)
@@ -577,8 +553,6 @@
 Creating MS object, TLLI = 0x00000000
 Modifying MS object, TLLI = 0x00000000, MS class 0 -> 45
 Slot Allocation (Algorithm A) for class 45
-Searching for first unallocated TFI: TRX=0 first TS=4
- Found TFI=3.
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
 - Skipping TS 2, because not enabled
@@ -586,7 +560,7 @@
 - Skipping TS 5, because not enabled
 - Skipping TS 6, because not enabled
 - Skipping TS 7, because not enabled
-- Assign downlink TS=4
+- Assign downlink TS=4 TFI=3
 PDCH(TS 4, TRX 0): Attaching TBF(TFI=3 TLLI=0x00000000 DIR=DL STATE=NULL), 4 TBFs, USFs = 00, TFIs = 0000000f.
 - Setting Control TS 4
 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=3 TLLI=0x00000000 DIR=DL STATE=NULL)
@@ -604,8 +578,6 @@
 Creating MS object, TLLI = 0x00000000
 Modifying MS object, TLLI = 0x00000000, MS class 0 -> 45
 Slot Allocation (Algorithm A) for class 45
-Searching for first unallocated TFI: TRX=0 first TS=4
- Found TFI=4.
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
 - Skipping TS 2, because not enabled
@@ -613,7 +585,7 @@
 - Skipping TS 5, because not enabled
 - Skipping TS 6, because not enabled
 - Skipping TS 7, because not enabled
-- Assign downlink TS=4
+- Assign downlink TS=4 TFI=4
 PDCH(TS 4, TRX 0): Attaching TBF(TFI=4 TLLI=0x00000000 DIR=DL STATE=NULL), 5 TBFs, USFs = 00, TFIs = 0000001f.
 - Setting Control TS 4
 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=4 TLLI=0x00000000 DIR=DL STATE=NULL)
@@ -631,8 +603,6 @@
 Creating MS object, TLLI = 0x00000000
 Modifying MS object, TLLI = 0x00000000, MS class 0 -> 45
 Slot Allocation (Algorithm A) for class 45
-Searching for first unallocated TFI: TRX=0 first TS=4
- Found TFI=5.
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
 - Skipping TS 2, because not enabled
@@ -640,7 +610,7 @@
 - Skipping TS 5, because not enabled
 - Skipping TS 6, because not enabled
 - Skipping TS 7, because not enabled
-- Assign downlink TS=4
+- Assign downlink TS=4 TFI=5
 PDCH(TS 4, TRX 0): Attaching TBF(TFI=5 TLLI=0x00000000 DIR=DL STATE=NULL), 6 TBFs, USFs = 00, TFIs = 0000003f.
 - Setting Control TS 4
 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=5 TLLI=0x00000000 DIR=DL STATE=NULL)
@@ -658,8 +628,6 @@
 Creating MS object, TLLI = 0x00000000
 Modifying MS object, TLLI = 0x00000000, MS class 0 -> 45
 Slot Allocation (Algorithm A) for class 45
-Searching for first unallocated TFI: TRX=0 first TS=4
- Found TFI=6.
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
 - Skipping TS 2, because not enabled
@@ -667,7 +635,7 @@
 - Skipping TS 5, because not enabled
 - Skipping TS 6, because not enabled
 - Skipping TS 7, because not enabled
-- Assign downlink TS=4
+- Assign downlink TS=4 TFI=6
 PDCH(TS 4, TRX 0): Attaching TBF(TFI=6 TLLI=0x00000000 DIR=DL STATE=NULL), 7 TBFs, USFs = 00, TFIs = 0000007f.
 - Setting Control TS 4
 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=6 TLLI=0x00000000 DIR=DL STATE=NULL)
@@ -685,8 +653,6 @@
 Creating MS object, TLLI = 0x00000000
 Modifying MS object, TLLI = 0x00000000, MS class 0 -> 45
 Slot Allocation (Algorithm A) for class 45
-Searching for first unallocated TFI: TRX=0 first TS=4
- Found TFI=7.
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
 - Skipping TS 2, because not enabled
@@ -694,7 +660,7 @@
 - Skipping TS 5, because not enabled
 - Skipping TS 6, because not enabled
 - Skipping TS 7, because not enabled
-- Assign downlink TS=4
+- Assign downlink TS=4 TFI=7
 PDCH(TS 4, TRX 0): Attaching TBF(TFI=7 TLLI=0x00000000 DIR=DL STATE=NULL), 8 TBFs, USFs = 00, TFIs = 000000ff.
 - Setting Control TS 4
 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=7 TLLI=0x00000000 DIR=DL STATE=NULL)
@@ -712,8 +678,6 @@
 Creating MS object, TLLI = 0x00000000
 Modifying MS object, TLLI = 0x00000000, MS class 0 -> 45
 Slot Allocation (Algorithm A) for class 45
-Searching for first unallocated TFI: TRX=0 first TS=4
- Found TFI=8.
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
 - Skipping TS 2, because not enabled
@@ -721,7 +685,7 @@
 - Skipping TS 5, because not enabled
 - Skipping TS 6, because not enabled
 - Skipping TS 7, because not enabled
-- Assign downlink TS=4
+- Assign downlink TS=4 TFI=8
 PDCH(TS 4, TRX 0): Attaching TBF(TFI=8 TLLI=0x00000000 DIR=DL STATE=NULL), 9 TBFs, USFs = 00, TFIs = 000001ff.
 - Setting Control TS 4
 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=8 TLLI=0x00000000 DIR=DL STATE=NULL)
@@ -739,8 +703,6 @@
 Creating MS object, TLLI = 0x00000000
 Modifying MS object, TLLI = 0x00000000, MS class 0 -> 45
 Slot Allocation (Algorithm A) for class 45
-Searching for first unallocated TFI: TRX=0 first TS=4
- Found TFI=9.
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
 - Skipping TS 2, because not enabled
@@ -748,7 +710,7 @@
 - Skipping TS 5, because not enabled
 - Skipping TS 6, because not enabled
 - Skipping TS 7, because not enabled
-- Assign downlink TS=4
+- Assign downlink TS=4 TFI=9
 PDCH(TS 4, TRX 0): Attaching TBF(TFI=9 TLLI=0x00000000 DIR=DL STATE=NULL), 10 TBFs, USFs = 00, TFIs = 000003ff.
 - Setting Control TS 4
 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=9 TLLI=0x00000000 DIR=DL STATE=NULL)
@@ -766,8 +728,6 @@
 Creating MS object, TLLI = 0x00000000
 Modifying MS object, TLLI = 0x00000000, MS class 0 -> 45
 Slot Allocation (Algorithm A) for class 45
-Searching for first unallocated TFI: TRX=0 first TS=4
- Found TFI=10.
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
 - Skipping TS 2, because not enabled
@@ -775,7 +735,7 @@
 - Skipping TS 5, because not enabled
 - Skipping TS 6, because not enabled
 - Skipping TS 7, because not enabled
-- Assign downlink TS=4
+- Assign downlink TS=4 TFI=10
 PDCH(TS 4, TRX 0): Attaching TBF(TFI=10 TLLI=0x00000000 DIR=DL STATE=NULL), 11 TBFs, USFs = 00, TFIs = 000007ff.
 - Setting Control TS 4
 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=10 TLLI=0x00000000 DIR=DL STATE=NULL)
@@ -793,8 +753,6 @@
 Creating MS object, TLLI = 0x00000000
 Modifying MS object, TLLI = 0x00000000, MS class 0 -> 45
 Slot Allocation (Algorithm A) for class 45
-Searching for first unallocated TFI: TRX=0 first TS=4
- Found TFI=11.
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
 - Skipping TS 2, because not enabled
@@ -802,7 +760,7 @@
 - Skipping TS 5, because not enabled
 - Skipping TS 6, because not enabled
 - Skipping TS 7, because not enabled
-- Assign downlink TS=4
+- Assign downlink TS=4 TFI=11
 PDCH(TS 4, TRX 0): Attaching TBF(TFI=11 TLLI=0x00000000 DIR=DL STATE=NULL), 12 TBFs, USFs = 00, TFIs = 00000fff.
 - Setting Control TS 4
 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=11 TLLI=0x00000000 DIR=DL STATE=NULL)
@@ -820,8 +778,6 @@
 Creating MS object, TLLI = 0x00000000
 Modifying MS object, TLLI = 0x00000000, MS class 0 -> 45
 Slot Allocation (Algorithm A) for class 45
-Searching for first unallocated TFI: TRX=0 first TS=4
- Found TFI=12.
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
 - Skipping TS 2, because not enabled
@@ -829,7 +785,7 @@
 - Skipping TS 5, because not enabled
 - Skipping TS 6, because not enabled
 - Skipping TS 7, because not enabled
-- Assign downlink TS=4
+- Assign downlink TS=4 TFI=12
 PDCH(TS 4, TRX 0): Attaching TBF(TFI=12 TLLI=0x00000000 DIR=DL STATE=NULL), 13 TBFs, USFs = 00, TFIs = 00001fff.
 - Setting Control TS 4
 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=12 TLLI=0x00000000 DIR=DL STATE=NULL)
@@ -847,8 +803,6 @@
 Creating MS object, TLLI = 0x00000000
 Modifying MS object, TLLI = 0x00000000, MS class 0 -> 45
 Slot Allocation (Algorithm A) for class 45
-Searching for first unallocated TFI: TRX=0 first TS=4
- Found TFI=13.
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
 - Skipping TS 2, because not enabled
@@ -856,7 +810,7 @@
 - Skipping TS 5, because not enabled
 - Skipping TS 6, because not enabled
 - Skipping TS 7, because not enabled
-- Assign downlink TS=4
+- Assign downlink TS=4 TFI=13
 PDCH(TS 4, TRX 0): Attaching TBF(TFI=13 TLLI=0x00000000 DIR=DL STATE=NULL), 14 TBFs, USFs = 00, TFIs = 00003fff.
 - Setting Control TS 4
 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=13 TLLI=0x00000000 DIR=DL STATE=NULL)
@@ -874,8 +828,6 @@
 Creating MS object, TLLI = 0x00000000
 Modifying MS object, TLLI = 0x00000000, MS class 0 -> 45
 Slot Allocation (Algorithm A) for class 45
-Searching for first unallocated TFI: TRX=0 first TS=4
- Found TFI=14.
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
 - Skipping TS 2, because not enabled
@@ -883,7 +835,7 @@
 - Skipping TS 5, because not enabled
 - Skipping TS 6, because not enabled
 - Skipping TS 7, because not enabled
-- Assign downlink TS=4
+- Assign downlink TS=4 TFI=14
 PDCH(TS 4, TRX 0): Attaching TBF(TFI=14 TLLI=0x00000000 DIR=DL STATE=NULL), 15 TBFs, USFs = 00, TFIs = 00007fff.
 - Setting Control TS 4
 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=14 TLLI=0x00000000 DIR=DL STATE=NULL)
@@ -901,8 +853,6 @@
 Creating MS object, TLLI = 0x00000000
 Modifying MS object, TLLI = 0x00000000, MS class 0 -> 45
 Slot Allocation (Algorithm A) for class 45
-Searching for first unallocated TFI: TRX=0 first TS=4
- Found TFI=15.
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
 - Skipping TS 2, because not enabled
@@ -910,7 +860,7 @@
 - Skipping TS 5, because not enabled
 - Skipping TS 6, because not enabled
 - Skipping TS 7, because not enabled
-- Assign downlink TS=4
+- Assign downlink TS=4 TFI=15
 PDCH(TS 4, TRX 0): Attaching TBF(TFI=15 TLLI=0x00000000 DIR=DL STATE=NULL), 16 TBFs, USFs = 00, TFIs = 0000ffff.
 - Setting Control TS 4
 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=15 TLLI=0x00000000 DIR=DL STATE=NULL)
@@ -928,8 +878,6 @@
 Creating MS object, TLLI = 0x00000000
 Modifying MS object, TLLI = 0x00000000, MS class 0 -> 45
 Slot Allocation (Algorithm A) for class 45
-Searching for first unallocated TFI: TRX=0 first TS=4
- Found TFI=16.
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
 - Skipping TS 2, because not enabled
@@ -937,7 +885,7 @@
 - Skipping TS 5, because not enabled
 - Skipping TS 6, because not enabled
 - Skipping TS 7, because not enabled
-- Assign downlink TS=4
+- Assign downlink TS=4 TFI=16
 PDCH(TS 4, TRX 0): Attaching TBF(TFI=16 TLLI=0x00000000 DIR=DL STATE=NULL), 17 TBFs, USFs = 00, TFIs = 0001ffff.
 - Setting Control TS 4
 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=16 TLLI=0x00000000 DIR=DL STATE=NULL)
@@ -955,8 +903,6 @@
 Creating MS object, TLLI = 0x00000000
 Modifying MS object, TLLI = 0x00000000, MS class 0 -> 45
 Slot Allocation (Algorithm A) for class 45
-Searching for first unallocated TFI: TRX=0 first TS=4
- Found TFI=17.
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
 - Skipping TS 2, because not enabled
@@ -964,7 +910,7 @@
 - Skipping TS 5, because not enabled
 - Skipping TS 6, because not enabled
 - Skipping TS 7, because not enabled
-- Assign downlink TS=4
+- Assign downlink TS=4 TFI=17
 PDCH(TS 4, TRX 0): Attaching TBF(TFI=17 TLLI=0x00000000 DIR=DL STATE=NULL), 18 TBFs, USFs = 00, TFIs = 0003ffff.
 - Setting Control TS 4
 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=17 TLLI=0x00000000 DIR=DL STATE=NULL)
@@ -982,8 +928,6 @@
 Creating MS object, TLLI = 0x00000000
 Modifying MS object, TLLI = 0x00000000, MS class 0 -> 45
 Slot Allocation (Algorithm A) for class 45
-Searching for first unallocated TFI: TRX=0 first TS=4
- Found TFI=18.
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
 - Skipping TS 2, because not enabled
@@ -991,7 +935,7 @@
 - Skipping TS 5, because not enabled
 - Skipping TS 6, because not enabled
 - Skipping TS 7, because not enabled
-- Assign downlink TS=4
+- Assign downlink TS=4 TFI=18
 PDCH(TS 4, TRX 0): Attaching TBF(TFI=18 TLLI=0x00000000 DIR=DL STATE=NULL), 19 TBFs, USFs = 00, TFIs = 0007ffff.
 - Setting Control TS 4
 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=18 TLLI=0x00000000 DIR=DL STATE=NULL)
@@ -1009,8 +953,6 @@
 Creating MS object, TLLI = 0x00000000
 Modifying MS object, TLLI = 0x00000000, MS class 0 -> 45
 Slot Allocation (Algorithm A) for class 45
-Searching for first unallocated TFI: TRX=0 first TS=4
- Found TFI=19.
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
 - Skipping TS 2, because not enabled
@@ -1018,7 +960,7 @@
 - Skipping TS 5, because not enabled
 - Skipping TS 6, because not enabled
 - Skipping TS 7, because not enabled
-- Assign downlink TS=4
+- Assign downlink TS=4 TFI=19
 PDCH(TS 4, TRX 0): Attaching TBF(TFI=19 TLLI=0x00000000 DIR=DL STATE=NULL), 20 TBFs, USFs = 00, TFIs = 000fffff.
 - Setting Control TS 4
 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=19 TLLI=0x00000000 DIR=DL STATE=NULL)
@@ -1036,8 +978,6 @@
 Creating MS object, TLLI = 0x00000000
 Modifying MS object, TLLI = 0x00000000, MS class 0 -> 45
 Slot Allocation (Algorithm A) for class 45
-Searching for first unallocated TFI: TRX=0 first TS=4
- Found TFI=20.
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
 - Skipping TS 2, because not enabled
@@ -1045,7 +985,7 @@
 - Skipping TS 5, because not enabled
 - Skipping TS 6, because not enabled
 - Skipping TS 7, because not enabled
-- Assign downlink TS=4
+- Assign downlink TS=4 TFI=20
 PDCH(TS 4, TRX 0): Attaching TBF(TFI=20 TLLI=0x00000000 DIR=DL STATE=NULL), 21 TBFs, USFs = 00, TFIs = 001fffff.
 - Setting Control TS 4
 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=20 TLLI=0x00000000 DIR=DL STATE=NULL)
@@ -1063,8 +1003,6 @@
 Creating MS object, TLLI = 0x00000000
 Modifying MS object, TLLI = 0x00000000, MS class 0 -> 45
 Slot Allocation (Algorithm A) for class 45
-Searching for first unallocated TFI: TRX=0 first TS=4
- Found TFI=21.
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
 - Skipping TS 2, because not enabled
@@ -1072,7 +1010,7 @@
 - Skipping TS 5, because not enabled
 - Skipping TS 6, because not enabled
 - Skipping TS 7, because not enabled
-- Assign downlink TS=4
+- Assign downlink TS=4 TFI=21
 PDCH(TS 4, TRX 0): Attaching TBF(TFI=21 TLLI=0x00000000 DIR=DL STATE=NULL), 22 TBFs, USFs = 00, TFIs = 003fffff.
 - Setting Control TS 4
 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=21 TLLI=0x00000000 DIR=DL STATE=NULL)
@@ -1090,8 +1028,6 @@
 Creating MS object, TLLI = 0x00000000
 Modifying MS object, TLLI = 0x00000000, MS class 0 -> 45
 Slot Allocation (Algorithm A) for class 45
-Searching for first unallocated TFI: TRX=0 first TS=4
- Found TFI=22.
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
 - Skipping TS 2, because not enabled
@@ -1099,7 +1035,7 @@
 - Skipping TS 5, because not enabled
 - Skipping TS 6, because not enabled
 - Skipping TS 7, because not enabled
-- Assign downlink TS=4
+- Assign downlink TS=4 TFI=22
 PDCH(TS 4, TRX 0): Attaching TBF(TFI=22 TLLI=0x00000000 DIR=DL STATE=NULL), 23 TBFs, USFs = 00, TFIs = 007fffff.
 - Setting Control TS 4
 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=22 TLLI=0x00000000 DIR=DL STATE=NULL)
@@ -1117,8 +1053,6 @@
 Creating MS object, TLLI = 0x00000000
 Modifying MS object, TLLI = 0x00000000, MS class 0 -> 45
 Slot Allocation (Algorithm A) for class 45
-Searching for first unallocated TFI: TRX=0 first TS=4
- Found TFI=23.
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
 - Skipping TS 2, because not enabled
@@ -1126,7 +1060,7 @@
 - Skipping TS 5, because not enabled
 - Skipping TS 6, because not enabled
 - Skipping TS 7, because not enabled
-- Assign downlink TS=4
+- Assign downlink TS=4 TFI=23
 PDCH(TS 4, TRX 0): Attaching TBF(TFI=23 TLLI=0x00000000 DIR=DL STATE=NULL), 24 TBFs, USFs = 00, TFIs = 00ffffff.
 - Setting Control TS 4
 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=23 TLLI=0x00000000 DIR=DL STATE=NULL)
@@ -1144,8 +1078,6 @@
 Creating MS object, TLLI = 0x00000000
 Modifying MS object, TLLI = 0x00000000, MS class 0 -> 45
 Slot Allocation (Algorithm A) for class 45
-Searching for first unallocated TFI: TRX=0 first TS=4
- Found TFI=24.
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
 - Skipping TS 2, because not enabled
@@ -1153,7 +1085,7 @@
 - Skipping TS 5, because not enabled
 - Skipping TS 6, because not enabled
 - Skipping TS 7, because not enabled
-- Assign downlink TS=4
+- Assign downlink TS=4 TFI=24
 PDCH(TS 4, TRX 0): Attaching TBF(TFI=24 TLLI=0x00000000 DIR=DL STATE=NULL), 25 TBFs, USFs = 00, TFIs = 01ffffff.
 - Setting Control TS 4
 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=24 TLLI=0x00000000 DIR=DL STATE=NULL)
@@ -1171,8 +1103,6 @@
 Creating MS object, TLLI = 0x00000000
 Modifying MS object, TLLI = 0x00000000, MS class 0 -> 45
 Slot Allocation (Algorithm A) for class 45
-Searching for first unallocated TFI: TRX=0 first TS=4
- Found TFI=25.
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
 - Skipping TS 2, because not enabled
@@ -1180,7 +1110,7 @@
 - Skipping TS 5, because not enabled
 - Skipping TS 6, because not enabled
 - Skipping TS 7, because not enabled
-- Assign downlink TS=4
+- Assign downlink TS=4 TFI=25
 PDCH(TS 4, TRX 0): Attaching TBF(TFI=25 TLLI=0x00000000 DIR=DL STATE=NULL), 26 TBFs, USFs = 00, TFIs = 03ffffff.
 - Setting Control TS 4
 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=25 TLLI=0x00000000 DIR=DL STATE=NULL)
@@ -1198,8 +1128,6 @@
 Creating MS object, TLLI = 0x00000000
 Modifying MS object, TLLI = 0x00000000, MS class 0 -> 45
 Slot Allocation (Algorithm A) for class 45
-Searching for first unallocated TFI: TRX=0 first TS=4
- Found TFI=26.
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
 - Skipping TS 2, because not enabled
@@ -1207,7 +1135,7 @@
 - Skipping TS 5, because not enabled
 - Skipping TS 6, because not enabled
 - Skipping TS 7, because not enabled
-- Assign downlink TS=4
+- Assign downlink TS=4 TFI=26
 PDCH(TS 4, TRX 0): Attaching TBF(TFI=26 TLLI=0x00000000 DIR=DL STATE=NULL), 27 TBFs, USFs = 00, TFIs = 07ffffff.
 - Setting Control TS 4
 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=26 TLLI=0x00000000 DIR=DL STATE=NULL)
@@ -1225,8 +1153,6 @@
 Creating MS object, TLLI = 0x00000000
 Modifying MS object, TLLI = 0x00000000, MS class 0 -> 45
 Slot Allocation (Algorithm A) for class 45
-Searching for first unallocated TFI: TRX=0 first TS=4
- Found TFI=27.
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
 - Skipping TS 2, because not enabled
@@ -1234,7 +1160,7 @@
 - Skipping TS 5, because not enabled
 - Skipping TS 6, because not enabled
 - Skipping TS 7, because not enabled
-- Assign downlink TS=4
+- Assign downlink TS=4 TFI=27
 PDCH(TS 4, TRX 0): Attaching TBF(TFI=27 TLLI=0x00000000 DIR=DL STATE=NULL), 28 TBFs, USFs = 00, TFIs = 0fffffff.
 - Setting Control TS 4
 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=27 TLLI=0x00000000 DIR=DL STATE=NULL)
@@ -1252,8 +1178,6 @@
 Creating MS object, TLLI = 0x00000000
 Modifying MS object, TLLI = 0x00000000, MS class 0 -> 45
 Slot Allocation (Algorithm A) for class 45
-Searching for first unallocated TFI: TRX=0 first TS=4
- Found TFI=28.
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
 - Skipping TS 2, because not enabled
@@ -1261,7 +1185,7 @@
 - Skipping TS 5, because not enabled
 - Skipping TS 6, because not enabled
 - Skipping TS 7, because not enabled
-- Assign downlink TS=4
+- Assign downlink TS=4 TFI=28
 PDCH(TS 4, TRX 0): Attaching TBF(TFI=28 TLLI=0x00000000 DIR=DL STATE=NULL), 29 TBFs, USFs = 00, TFIs = 1fffffff.
 - Setting Control TS 4
 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=28 TLLI=0x00000000 DIR=DL STATE=NULL)
@@ -1279,8 +1203,6 @@
 Creating MS object, TLLI = 0x00000000
 Modifying MS object, TLLI = 0x00000000, MS class 0 -> 45
 Slot Allocation (Algorithm A) for class 45
-Searching for first unallocated TFI: TRX=0 first TS=4
- Found TFI=29.
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
 - Skipping TS 2, because not enabled
@@ -1288,7 +1210,7 @@
 - Skipping TS 5, because not enabled
 - Skipping TS 6, because not enabled
 - Skipping TS 7, because not enabled
-- Assign downlink TS=4
+- Assign downlink TS=4 TFI=29
 PDCH(TS 4, TRX 0): Attaching TBF(TFI=29 TLLI=0x00000000 DIR=DL STATE=NULL), 30 TBFs, USFs = 00, TFIs = 3fffffff.
 - Setting Control TS 4
 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=29 TLLI=0x00000000 DIR=DL STATE=NULL)
@@ -1306,8 +1228,6 @@
 Creating MS object, TLLI = 0x00000000
 Modifying MS object, TLLI = 0x00000000, MS class 0 -> 45
 Slot Allocation (Algorithm A) for class 45
-Searching for first unallocated TFI: TRX=0 first TS=4
- Found TFI=30.
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
 - Skipping TS 2, because not enabled
@@ -1315,7 +1235,7 @@
 - Skipping TS 5, because not enabled
 - Skipping TS 6, because not enabled
 - Skipping TS 7, because not enabled
-- Assign downlink TS=4
+- Assign downlink TS=4 TFI=30
 PDCH(TS 4, TRX 0): Attaching TBF(TFI=30 TLLI=0x00000000 DIR=DL STATE=NULL), 31 TBFs, USFs = 00, TFIs = 7fffffff.
 - Setting Control TS 4
 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=30 TLLI=0x00000000 DIR=DL STATE=NULL)
@@ -1333,8 +1253,6 @@
 Creating MS object, TLLI = 0x00000000
 Modifying MS object, TLLI = 0x00000000, MS class 0 -> 45
 Slot Allocation (Algorithm A) for class 45
-Searching for first unallocated TFI: TRX=0 first TS=4
- Found TFI=31.
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
 - Skipping TS 2, because not enabled
@@ -1342,7 +1260,7 @@
 - Skipping TS 5, because not enabled
 - Skipping TS 6, because not enabled
 - Skipping TS 7, because not enabled
-- Assign downlink TS=4
+- Assign downlink TS=4 TFI=31
 PDCH(TS 4, TRX 0): Attaching TBF(TFI=31 TLLI=0x00000000 DIR=DL STATE=NULL), 32 TBFs, USFs = 00, TFIs = ffffffff.
 - Setting Control TS 4
 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=31 TLLI=0x00000000 DIR=DL STATE=NULL)
@@ -1360,9 +1278,7 @@
 Creating MS object, TLLI = 0x00000000
 Modifying MS object, TLLI = 0x00000000, MS class 0 -> 45
 Slot Allocation (Algorithm A) for class 45
-Searching for first unallocated TFI: TRX=0 first TS=4
-No TFI available.
-- Failed to allocate a TFI
+- Failed to find a usable TRX (TFI exhausted)
 No PDCH resource
 Destroying MS object, TLLI = 0x00000000
 ********** TBF starts here **********
@@ -1370,8 +1286,6 @@
 Creating MS object, TLLI = 0x00000000
 Modifying MS object, TLLI = 0x00000000, MS class 0 -> 45
 Slot Allocation (Algorithm A) for class 45
-Searching for first unallocated TFI: TRX=0 first TS=4
- Found TFI=0.
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
 - Skipping TS 2, because not enabled
@@ -1379,7 +1293,7 @@
 - Skipping TS 5, because not enabled
 - Skipping TS 6, because not enabled
 - Skipping TS 7, because not enabled
-- Assign downlink TS=4
+- Assign downlink TS=4 TFI=0
 PDCH(TS 4, TRX 0): Attaching TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL), 1 TBFs, USFs = 00, TFIs = 00000001.
 - Setting Control TS 4
 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL)
@@ -1400,8 +1314,6 @@
 ********** TBF starts here **********
 Allocating DL TBF: MS_CLASS=45
 Slot Allocation (Algorithm A) for class 45
-Searching for first unallocated TFI: TRX=0 first TS=4
- Found TFI=0.
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
 - Skipping TS 2, because not enabled
@@ -1409,7 +1321,7 @@
 - Skipping TS 5, because not enabled
 - Skipping TS 6, because not enabled
 - Skipping TS 7, because not enabled
-- Assign downlink TS=4
+- Assign downlink TS=4 TFI=0
 PDCH(TS 4, TRX 0): Attaching TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=NULL), 1 TBFs, USFs = 00, TFIs = 00000001.
 - Setting Control TS 4
 Attaching TBF to MS object, TLLI = 0xc0123456, TBF = TBF(TFI=0 TLLI=0xc0123456 DIR=DL STATE=NULL)
@@ -1454,8 +1366,6 @@
 Allocating UL TBF: MS_CLASS=0
 Creating MS object, TLLI = 0x00000000
 Slot Allocation (Algorithm A) for class 0
-Searching for first unallocated TFI: TRX=0 first TS=7
- Found TFI=0.
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
 - Skipping TS 2, because not enabled
@@ -1463,7 +1373,7 @@
 - Skipping TS 4, because not enabled
 - Skipping TS 5, because not enabled
 - Skipping TS 6, because not enabled
-- Assign uplink TS=7 USF=0
+- Assign uplink TS=7 TFI=0 USF=0
 PDCH(TS 7, TRX 0): Attaching TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL), 1 TBFs, USFs = 01, TFIs = 00000001.
 - Setting Control TS 7
 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL)
@@ -1512,8 +1422,6 @@
 Allocating UL TBF: MS_CLASS=0
 Creating MS object, TLLI = 0x00000000
 Slot Allocation (Algorithm A) for class 0
-Searching for first unallocated TFI: TRX=0 first TS=7
- Found TFI=0.
 - Skipping TS 0, because not enabled
 - Skipping TS 1, because not enabled
 - Skipping TS 2, because not enabled
@@ -1521,7 +1429,7 @@
 - Skipping TS 4, because not enabled
 - Skipping TS 5, because not enabled
 - Skipping TS 6, because not enabled
-- Assign uplink TS=7 USF=0
+- Assign uplink TS=7 TFI=0 USF=0
 PDCH(TS 7, TRX 0): Attaching TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL), 1 TBFs, USFs = 01, TFIs = 00000001.
 - Setting Control TS 7
 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL)