It was not possible to merge the branch directly, because the history of this branch contains files that cannot be in the repository, namely wireshark from Cisco work on nFAPI. As for Cisco work on nFAPI, a special commit containing all the work is thus created. Below is the output of the command: git log --graph 184d51c6eabe8d76ee0adaefca4c295393bdeb7d..61276d87106465220b1c27424077f244837b4578184d51c6eais the commit ID of the develop branch prior to the merge. 61276d87106465220b1c27424077f244837b4578 is the commit ID of the nfapi-L2-emulator branch prior to the merge. The commit 61276d87106465220b1c27424077f244837b4578 (and all its history) will be removed from the main OAI repository. It is present in the internal OAI repository for those who have access to it. There was also some cleanup done on the code. Some changes were necessary to have the eNB functional. They may have an impact on the FAPI L2 simulator, which may be non-functional and requires some work to be functional (and not break other use cases). The most critical ones are: - in openair2/RRC/LITE/MESSAGES/asn1_msg.c, in the function do_SIB23: SIB 18/18/21 are not included because they make the MAC message to big for the SIB scheduler - in targets/RT/USER/lte-enb.c, in the function eNB_thread_rxtx, the following code has not been included because it breaks the regular eNB: //Panos: NEW ACHECK FOR VNF HERE! //if(nfapi_mode!=2){ if(get_nprocs() >= 8) wakeup_tx(eNB,eNB->proc.ru_proc); else if(get_nprocs() > 4) { LOG_I(PHY, "Panos-D: In eNB_thread_rxtx() before re-calling phy_procedures_eNB_TX() and wakeup_txfh() \n"); phy_procedures_eNB_TX(eNB, proc, no_relay, NULL, 1); wakeup_txfh(proc,eNB->proc.ru_proc); } It is possible to see the differences between this commit and the commit 61276d87106465220b1c27424077f244837b4578 to get all the differences between the two. Use: git diff 61276d87106465220b1c27424077f244837b4578 <this commit> Here is now the output of "git log [...]". ------------------------------------------------------------------------------ * commit 61276d87106465220b1c27424077f244837b4578 | Author: matzakos <panagiotis.matzakos@eurecom.fr> | Date: Fri May 4 15:10:23 2018 +0200 | | Fix before merge | * commit 1d3c88cd0bf4ac80a5fc6e09f106cb81f03a3287 | Author: matzakos <panagiotis.matzakos@eurecom.fr> | Date: Fri May 4 12:41:22 2018 +0200 | | Fixed some warnings and removed redundant files. | * commit ea33b91425005e48bfab99d511f6393cc052ecda | Author: matzakos <panagiotis.matzakos@eurecom.fr> | Date: Mon Apr 30 17:40:03 2018 +0200 | | Modifications related to using single copies of nfapi config. messages for all the UEs at each subframe. | * commit f578c1cf7360cb8bc825b1a1064f9a8b93a0334d | Author: matzakos <panagiotis.matzakos@eurecom.fr> | Date: Mon Apr 30 11:13:23 2018 +0200 | | Updated instructions file for launching nfapi-L2-emulator and polishing the code. | * commit e8180fd6335134c451aab5d557e5824b6dc2cafc | Merge: dc3787d37184d51c6e| Author: matzakos <panagiotis.matzakos@eurecom.fr> | Date: Fri Apr 27 18:48:49 2018 +0200 | | Merge branch develop. | * commit dc3787d37b6dafe03881c386a51325fd4405c6e0 | Author: matzakos <panagiotis.matzakos@eurecom.fr> | Date: Tue Apr 17 14:56:02 2018 +0200 | | Added configuration option for nfapi-L2-emulation mode and updated instructions file. | * commit 4e5b67c412bc8efe809b1ec5f024d789b367d902 | Author: matzakos <panagiotis.matzakos@eurecom.fr> | Date: Thu Apr 5 13:36:21 2018 +0200 | | Added instructions file for launching nfapi-L2-emulator. | * commit 848d5e0aa37ab3402d0d9ed9fea6c3fff351de0d | Author: matzakos <panagiotis.matzakos@eurecom.fr> | Date: Thu Mar 29 19:02:49 2018 +0200 | | Fixed some more issues for running with multiple UEs. Added configuration option for the number of UEs. | * commit 230421bc051b7089af00696d428675c6ae310cfb | Author: matzakos <panagiotis.matzakos@eurecom.fr> | Date: Tue Mar 27 16:17:32 2018 +0200 | | More stable performance of nfapi-L2-emulator with 2 UEs, after dealing with some PNF-VNF synchronization issues. | * commit d74c43bd2fea9729e61465536524ba62e4c3c7a0 | Author: matzakos <panagiotis.matzakos@eurecom.fr> | Date: Wed Mar 21 19:56:26 2018 +0100 | | Minor modifications. | * commit 4f93ef56d52ca6e78d5a09dd0422e282dcb71310 | Author: matzakos <panagiotis.matzakos@eurecom.fr> | Date: Tue Mar 20 18:14:49 2018 +0100 | | Fixed a bug. Now both UEs reaching RRC Connection Reconfiguration state about 90% of the executions. Less frequently appearing issues remain to be fixed. | * commit 1ed57bbffca4e264bcd710fac03c7c01796a4db2 | Author: matzakos <panagiotis.matzakos@eurecom.fr> | Date: Tue Mar 20 12:00:53 2018 +0100 | | Extension to multiple UEs. Currently being tested with two UEs. Second UE doesn't always reach the RRC Connection Reconfiguration stage. | * commit 6cc3fb72b4c6fa63a874f1de54efac2bac37ad32 | Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr> | Date: Tue Mar 6 16:21:55 2018 +0100 | | process SidelinkUEInformation/RRCConnectionReconfiguration (partially) | * commit b3ecd62f4333c13a8b048d38f3bbabda0a0a30be | Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr> | Date: Tue Mar 6 14:17:06 2018 +0100 | | add SIB21/SidelinkUEInformation support | * commit 93052033e2189a171f3831cbc4280203ae648a99 | Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr> | Date: Thu Mar 1 18:35:57 2018 +0100 | | [RRC] add sIB19 support (partially) | * commit 907b4f80c62d357e865d09d748a9ed490d2a7116 |\ Merge: 77072adf9 c64f9cd8c | | Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr> | | Date: Wed Feb 28 19:25:52 2018 +0100 | | | | [RRC] support SIB18 (partially) | | | * commit c64f9cd8ce7540d43ddfc21eeff3523060c9a76e | | Author: matzakos <panagiotis.matzakos@eurecom.fr> | | Date: Tue Feb 27 20:02:05 2018 +0100 | | | | Minor modifications. Some problem appears rarely that prevents the reception of RRCConnectionSetupComplete message at the eNB. | | * | commit 77072adf9a74eff330cf6987d4324e80ce9ed251 |/ Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr> | Date: Wed Feb 28 19:18:20 2018 +0100 | | [RRC] support SIB18 (partially) | * commit 709e59742a91d02b954e1f3e47e95eacd91a29fd |\ Merge: 8b28e71b1 314bf57f5 | | Author: matzakos <panagiotis.matzakos@eurecom.fr> | | Date: Mon Feb 19 12:29:14 2018 +0100 | | | | Merge branch 'master' of gitlab.eurecom.fr:matzakos/LTE-D2D | | | | Merge with latest changes of LTE-D2D/master | | | * commit 314bf57f5ced2bbd5d2a8886b92737ecc708e5da | | Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr> | | Date: Wed Feb 14 13:30:29 2018 +0100 | | | | minor update | | | * commit 84177053ce83ed8b6cb3e4e5e1ca94eaed2bdcdb | | Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr> | | Date: Mon Feb 12 12:13:59 2018 +0100 | | | | update instructions for 1-1, update multicast_link.c | | | * commit c24e4e6d647f9b1794434563d20587b25ab5a223 | | Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr> | | Date: Mon Feb 12 11:32:24 2018 +0100 | | | | update control socket for 1-1 scenario | | | * commit 9cf15c8088d872b864ae3e934cb50e6c8e1a0ddc | | Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr> | | Date: Thu Feb 8 16:02:00 2018 +0100 | | | | polish the code/update instructions | | | * commit f265344390977b1bbbfe8c4842b4ac5192345e27 | | Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr> | | Date: Wed Feb 7 13:45:34 2018 +0100 | | | | passing S+D from PDCP to lower layers (PC5-S) | | | * commit a76a5a564bd4b431004be66fbd260cab2322c4ba | |\ Merge: ff8d9a814 6823e3aa0 | | | Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr> | | | Date: Wed Feb 7 11:55:50 2018 +0100 | | | | | | Merge branch 'master' of gitlab.eurecom.fr:matzakos/LTE-D2D | | | | * | commit ff8d9a814270e8761313fb35bd9b1e618ec0fe14 | | | Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr> | | | Date: Wed Feb 7 11:55:34 2018 +0100 | | | | | | separation of SLRB establishment PC5-U/PC5-S | | | * | | commit 8b28e71b17bdf8332700e0522d00bfb564a8ddbd | |/ Merge: 6823e3aa0be8d32d55|/| Author: matzakos <panagiotis.matzakos@eurecom.fr> | | Date: Mon Feb 19 12:27:21 2018 +0100 | | | | Merge with develop branch of main OAI repository. | | * | commit 6823e3aa093eb72d513e251ff182560d65ac0462 |/ Author: matzakos <panagiotis.matzakos@eurecom.fr> | Date: Tue Feb 6 18:05:52 2018 +0100 | | Successful RRC Connection establishment without any errors, based on testing up to now | * commit 97c2aff91179e9ef2497e3c588a2500d21f0d243 | Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr> | Date: Tue Feb 6 16:44:58 2018 +0100 | | PC5-U - passing (source,destination) down to PDCP/RLC/MAC (first alternative - mapping of L2Ids form IP Addresses | * commit 24d5700c7c2ee21e08933eab7c74cffb0a118c46 | Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr> | Date: Thu Feb 1 11:53:07 2018 +0100 | | change ue-ip.ko to extract L2 Id from IP adress, update PC5-Signalling message | * commit 713e31357f9ef3aec9b55e34a3074399d49b3829 | Author: matzakos <panagiotis.matzakos@eurecom.fr> | Date: Wed Jan 31 19:47:22 2018 +0100 | | Seemed to have fixed pnf(UE) -vnf(eNB) sync issue. Works up to the reception of RRConnectionReconfigurationComplete message at the eNB but crashing after that. | * commit d794f6905a14949bd87370d23a29382d9ea25170 | Author: William Johnson <wjohnson@vencorelabs.com> | Date: Tue Jan 30 11:50:42 2018 -0500 | | Merge cleanup | * commit ee62792135b386450a715b6539cf26ce8a39dd66 | Author: William Johnson <wjohnson@vencorelabs.com> | Date: Tue Jan 30 11:10:33 2018 -0500 | | Merge cleanup | * commit d4102b55a917db80e9c3a59001bd5a67a20e1313 | Author: William Johnson <wjohnson@vencorelabs.com> | Date: Mon Jan 22 15:20:55 2018 -0500 | | Resolved issues with PC5-D implementation. | * commit 7fb0902dbc37c2a91252b7b956d2c0158d3b2ff5 | Author: matzakos <panagiotis.matzakos@eurecom.fr> | Date: Mon Jan 29 18:02:31 2018 +0100 | | Works up to the reception of Msg4 at the eNB. Still sometimes SF sync between PNF and VNF is lost. | * commit 507c1ea9abd5a4ed07f13117f2490afc6fa71e5b | Author: matzakos <panagiotis.matzakos@eurecom.fr> | Date: Wed Jan 24 20:07:09 2018 +0100 | | Added correct handling of HI_DCI0.req + memory management issues | * commit 5dc306ec1dfe05b41ebd42ee763c25d9d01d639b | Author: matzakos <panagiotis.matzakos@eurecom.fr> | Date: Wed Jan 24 11:12:53 2018 +0100 | | Works up to the reception of HI_DCI0.request at the UE-PNF. Sometimes Msg3 arrives later than expected at the eNB-VNF. | * commit 17baaaa132bdcd7b1b522421d1806e2d7f15dd61 | Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr> | Date: Wed Jan 24 09:38:42 2018 +0100 | | update instructions regarding PC5-D | * commit 2403529e7695271beaedc0cbe8700eb972aee7ba | Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr> | Date: Mon Jan 22 16:52:16 2018 +0100 | | fix issues related to PC5D transmission/reception | * commit dd3ed7a5c06147f30d4a0668fd40e2e5f154cba5 | Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr> | Date: Mon Jan 22 11:03:25 2018 +0100 | | minor update PC5DiscoveryAnnouncement -> PC5DiscoveryMessage | * commit ad2da99d46f20923788c6a162821104de591c955 | Author: William Johnson <wjohnson@vencorelabs.com> | Date: Thu Jan 18 17:28:36 2018 -0500 | | testing of Discovery transmission/reception | * commit ccdc09c82415391c2096bb34cc79e30f457346a6 | Author: Rohit Gupta <rohit.gupta@eurecom.fr> | Date: Thu Jan 18 14:08:19 2018 +0100 | | final pieces for SLDCH emulation | * commit a7f212818b251cd74cf53b48e6f84535b250a8b9 | Author: Rohit Gupta <rohit.gupta@eurecom.fr> | Date: Thu Jan 18 13:18:57 2018 +0100 | | force instance 0 for PDCP netlink | * commit 276556acfd0d49da92553a62d6ff976e06baafd8 | Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr> | Date: Tue Jan 16 09:56:39 2018 +0100 | | update instructions | * commit 241aa2bbc006d6e94a3efec6868eb16203d5dda5 | Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr> | Date: Mon Jan 15 16:03:48 2018 +0100 | | support PC5-D (RRC/MAC) | * commit c6aefa310b0503ecb4de51f621bf8eba413fe842 | Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr> | Date: Sun Jan 14 14:59:01 2018 +0100 | | minor update to fix issues related to PC5-S | * commit 9c00f4b782e324832836088dde6fc8fd0ba0f515 | Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr> | Date: Fri Jan 12 11:43:15 2018 +0100 | | update RRC_UE to support PC5-S | * commit 952ec555e7f0630c6963de662e95fad8ac0c3ed0 | Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr> | Date: Thu Jan 11 16:36:37 2018 +0100 | | update instructions | * commit 153af28ddee8e47a05a86e4b113c1eed69bdc10b | Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr> | Date: Thu Jan 11 15:17:24 2018 +0100 | | first version for supporting PC5-S | * commit d5d6ecabd37ea950aa24da391f26f9be70615e79 | Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr> | Date: Fri Jan 5 22:32:50 2018 +0100 | | minor update - d2d-emulator-setup | * commit 7781cd5875013ec1b049a15dd503ed4883846ed5 | Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr> | Date: Fri Jan 5 00:08:49 2018 +0100 | | Configure MAC with Source/groupL2Id, add possiblility to filter at MAC layer | * commit 2e5af5a92d706500af8b118c78990e2af72983a6 | Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr> | Date: Thu Jan 4 15:50:36 2018 +0100 | | add network configuration | * commit c5a3e4048ebf6e692eb4f599a2190b1a092da6bd | Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr> | Date: Thu Jan 4 15:31:43 2018 +0100 | | add instructions to setup emulator | * commit a1c1e9ce3845aad37b1a4ae34872c2a615007ed3 | Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr> | Date: Wed Jan 3 22:54:38 2018 +0100 | | enable control socket | * commit ff6c711973937e04d88447a19ccd88f65025cc9d | Author: Raymond Knopp <raymond.knopp@eurecom.fr> | Date: Wed Jan 3 07:26:05 2018 -0800 | | added MAC header handling for reception. | * commit 532a566c3406ea2ef61aa3b0ac643557c40a7aa8 |\ Merge: 86a308bbd 109d6bb7a | | Author: Raymond Knopp <raymond.knopp@eurecom.fr> | | Date: Wed Jan 3 06:58:58 2018 -0800 | | | | Merge branch 'master' of https://gitlab.eurecom.fr/matzakos/LTE-D2D | | | * commit 109d6bb7a10f114ad6478c874d7a640ba28a5dee | | Author: Raymond Knopp <raymond.knopp@eurecom.fr> | | Date: Mon Dec 25 19:55:21 2017 +0100 | | | | uplink path tested. | | * | commit 86a308bbd6ebb54a930f3bffb3f515cba03d792d |/ Author: Raymond Knopp <raymond.knopp@eurecom.fr> | Date: Wed Jan 3 06:58:28 2018 -0800 | | added MAC header handling for TX | * commit 5b59872dffb4f5c16d6c774b0130a7912eea6a01 | Author: Raymond Knopp <raymond.knopp@eurecom.fr> | Date: Mon Dec 25 04:32:45 2017 -0800 | | added new L1 files for Sidelink | * commit b215b431f018bf1d95f4e52fce901c47209665bf | Author: Raymond Knopp <raymond.knopp@eurecom.fr> | Date: Mon Dec 25 04:25:37 2017 -0800 | | changes to allow configuring multicast interface on command line | * commit 6434e645c8d50e3c8b1bf9917126c300f440bc7d |\ Merge: a33802048 f31928926 | | Author: Raymond Knopp <raymond.knopp@eurecom.fr> | | Date: Sun Dec 24 12:54:29 2017 -0800 | | | | Merge branch 'master' of https://gitlab.eurecom.fr/matzakos/LTE-D2D | | | | Conflicts: | | targets/RT/USER/lte-ue.c | | | * commit f31928926f6c85fc87aeb7cba319e6686d0b7015 | | Author: matzakos <panagiotis.matzakos@eurecom.fr> | | Date: Wed Dec 20 15:29:40 2017 +0100 | | | | Works up to the reception of the RA_RESPONSE at the UE. Crashing at fill_rx_indication_UE_MAC just before sending Msg3. | | | * commit ee61cb5164104005ad0ff495f2e38250c6a6c507 | | Author: matzakos <panagiotis.matzakos@eurecom.fr> | | Date: Mon Dec 18 16:18:00 2017 +0100 | | | | Fixed the issue with synchronization but only for the case o running both eNB (vnf) and UE (pnf) processes in the same machine. Receiving and decoding now all MIBs and SIBs1/2/3. | | * | commit a338020482186470460895a4740d26041a41164a |/ Author: Raymond Knopp <raymond.knopp@eurecom.fr> | Date: Fri Dec 22 20:22:41 2017 -0800 | | addition of Sidelink UE-UE stub and initial MAC scheduling for Sidelink for off-network scenario | * commit d34ac165119ae3447b8a49ca9a94382cf385e830 |\ Merge: 7b6a9c445 63ac8b4c5 | | Author: matzakos <panagiotis.matzakos@eurecom.fr> | | Date: Wed Dec 13 23:58:48 2017 +0100 | | | | Merge branch 'master' of gitlab.eurecom.fr:matzakos/LTE-D2D | | | | Merge with Thin's last commit | | | * commit 63ac8b4c595c418b7c0705d9786596c61aba0578 | |\ Merge: c7c8057fa 93627a4c2 | | | Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr> | | | Date: Wed Dec 6 23:05:13 2017 +0100 | | | | | | Merge branch 'master' of gitlab.eurecom.fr:matzakos/LTE-D2D | | | | * | commit c7c8057fa211943c65e11820fcd0446ab8756195 | | | Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr> | | | Date: Wed Dec 6 23:02:39 2017 +0100 | | | | | | integrate RRC control socket | | | * | | commit 7b6a9c445e2552b13b8ec8f687405c2b33822c83 | |/ Author: matzakos <panagiotis.matzakos@eurecom.fr> |/| Date: Wed Dec 13 23:58:15 2017 +0100 | | | | Testing works up to the reception of SIB1/2/3 from the UE through nfapi, but there is an issue with missing some of the nfapi messages for some frames. | | * | commit 93627a4c22a2bc587553c8f0d8abaa3917913e58 |\ \ Merge: db011d28d a2f8a3665 | | | Author: matzakos <matzakos@eurecom.fr> | | | Date: Wed Dec 6 14:12:23 2017 +0100 | | | | | | Merge branch 'master' of https://gitlab.eurecom.fr/matzakos/LTE-D2D | | | | | | Testing of phy_stub | | | | * | commit a2f8a36651d4672965fc66820ca240f60ba3660e | |/ Author: matzakos <panagiotis.matzakos@eurecom.fr> | | Date: Tue Dec 5 20:27:29 2017 +0100 | | | | Testing works until the call of callback function pnf_p7_subframe_ind. There, it never satisfies the condition if(tx_subframe_buffer->sfn_sf == sfn_sf_tx) so both sides (vnf and pnf are hanging). | | | * commit b3cc16ba752913d2537f29f746583080c39adaa8 | | Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr> | | Date: Tue Dec 5 15:41:50 2017 +0100 | | | | update RRC for SL | | * | commit db011d28ddf2f7583caf50ecde5033d88402721f |/ Author: matzakos <matzakos@eurecom.fr> | Date: Wed Dec 6 14:11:06 2017 +0100 | | Necessary modifications to support noS1 with nfapi and eNB side for testing vnf-pnf up to the stage of previous commit | * commit ec67c1c93c7a18d25875c05d9d36ad3ed7b4b759 | Author: matzakos <panagiotis.matzakos@eurecom.fr> | Date: Fri Dec 1 20:05:40 2017 +0100 | | Introduce new executable for the UE (nfapi pnf in stub mode) lte-softmodem-stub | * commit 9de8b0fc94b9d0b4b28021a66a4fae83c623889d | Author: matzakos <panagiotis.matzakos@eurecom.fr> | Date: Mon Nov 27 16:25:57 2017 +0100 | | Added function to extract nfapi address-port from UE specific configuration file | * commit 3cced60a00e598b24088213ca6348880e39dbd51 | Author: matzakos <panagiotis.matzakos@eurecom.fr> | Date: Thu Nov 23 17:10:48 2017 +0100 | | Connected new callback functions at nfapi_pnf for phy_stub mode + Intorducing new functions initializing UE variables and threads specific to phy_stub mode, instead of extending the existing ones + Direct connection of the timer_thread with UE_phy_stub_thread_rxn_txnp4. | * commit 911ed2280c601820e4db35c370b7471cfa193487 |\ Merge: 83394cd3a c42a59329 | | Author: matzakos <panagiotis.matzakos@eurecom.fr> | | Date: Mon Nov 20 11:42:51 2017 +0100 | | | | Merge with Cisco nfapi-ru-rau-split remote branch | | | * commit c42a593292d8a219deeeb4f7a66fd90f198d02a8 | | Author: David Price <davpric2@cisco.com> | | Date: Tue Nov 14 14:44:25 2017 +0000 | | | | Works in monolithic mode and nFAPI mode | | | * commit 4fea20e710adc22caa636905a5e2285e41b6ddf8 | | Author: David Price <davpric2@cisco.com> | | Date: Tue Nov 14 12:34:36 2017 +0000 | | | | Get logging working - merge changes from develop branch | | | * commit cc02d6c1d0fa9921ba8daba6078bc4a194d23933 | | Merge: 673b2e9f3d915c2089| | Author: David Price <davpric2@cisco.com> | | Date: Fri Nov 10 12:53:22 2017 +0000 | | | | Merge of develop branch as of 10 Nov. Tested with single UE attach. | | | * commit 673b2e9f382cc948b79f86bbdd1c5781a6a385be | | Author: David Price <davpric2@cisco.com> | | Date: Fri Nov 10 09:21:30 2017 +0000 | | | | Turn down logging | | | * commit b9268bc3ad2ca4c18045c980128a4cfaf23ea10e | | Author: David Price <davpric2@cisco.com> | | Date: Fri Nov 10 09:09:07 2017 +0000 | | | | How the hell did that work??? | | | * commit 6482d18c91e9637d95f0f9ed6830521697fd7736 | | Author: David Price <davpric2@cisco.com> | | Date: Mon Nov 6 12:45:58 2017 +0000 | | | | Sample attach | | | * commit d98502d41eab5001de7f70657b0412518f56700d | | Author: David Price <davpric2@cisco.com> | | Date: Mon Nov 6 11:08:57 2017 +0000 | | | | Add wireshark with nfapi | | | * commit e59250841aff9af42da2c25ed5003718ff8848a5 | | Author: David Price <davpric2@cisco.com> | | Date: Sun Nov 5 22:15:50 2017 +0000 | | | | He has only gone and done it. 11th hour and it works. Phone has attached twice | | | * commit 4dfbcf588264a7bd1dc96767c56d582ca6024f04 | | Author: David Price <davpric2@cisco.com> | | Date: Sun Nov 5 21:32:59 2017 +0000 | | | | Update open-nfapi patch - has new dissector in it | | | * commit bcd998ab12be9167c0244c961bcd6db8cc8a14c3 | | Author: David Price <davpric2@cisco.com> | | Date: Sun Nov 5 21:25:57 2017 +0000 | | | | Attach accept and then crash | | | * commit 91aeda82fb2003d66015fb9dca7301eb786af324 | | Author: David Price <davpric2@cisco.com> | | Date: Sun Nov 5 17:53:09 2017 +0000 | | | | Gets late packets during attach | | | * commit 25af68d37f418011cc42be53892aaaf72d02ec77 | | Author: David Price <davpric2@cisco.com> | | Date: Fri Nov 3 06:36:45 2017 +0000 | | | | Logging... | | | * commit 7382d9134f9bcc9254be8a5c15ceee44d5818b89 | | Author: David Price <davpric2@cisco.com> | | Date: Fri Nov 3 06:35:41 2017 +0000 | | | | logging... | | | * commit f90444a1fcbdafa8dbb404ea52bb41240021a346 | | Author: David Price <davpric2@cisco.com> | | Date: Fri Nov 3 06:35:11 2017 +0000 | | | | Cannot run vnf 3 ahead it runs out of space with downlink messages and their harq | | | * commit ebee0e12205733a170482a4cdb2e725eda599013 | | Author: David Price <davpric2@cisco.com> | | Date: Thu Nov 2 16:13:04 2017 +0000 | | | | Now seem to be getting uplink data, but it is error'd | | | * commit 9f781408af1f6c593daa9f04539a7863718ff0df | | Author: David Price <davpric2@cisco.com> | | Date: Wed Nov 1 18:18:12 2017 +0000 | | | | Fails at the point core sends Identity Request to UE | | | * commit 3a7456df7bf6b17e2aa491c235f10fa175cbc026 | | Author: David Price <davpric2@cisco.com> | | Date: Wed Nov 1 17:36:52 2017 +0000 | | | | Bad harq configuration | | | * commit 30c76c6d3c64a9cbc8abebfc9f221cbdd2a96026 | | Author: David Price <davpric2@cisco.com> | | Date: Mon Oct 30 15:21:39 2017 +0000 | | | | Works up to rrc connection setup complete in nfapi mode | | | * commit e10c0c085a04bf1577234ff6ae6f2efe2022d339 | | Author: David Price <davpric2@cisco.com> | | Date: Mon Oct 30 08:40:34 2017 +0000 | | | | Crashes due to clearing out the wrong info from subframe buffer | | | * commit 2ac91f053370848f0bf39b29aab1f9f1a21e008b | | Author: David Price <davpric2@cisco.com> | | Date: Mon Oct 30 07:04:33 2017 +0000 | | | | uplink data from ue received, corrected scheduling of DCI0/UPLINK_CFG. Fails to correctly form (SFNSF) for PHICH ACK | | | * commit 22367109da8a85b7a254f8390027aa782b8f417a | | Author: David Price <davpric2@cisco.com> | | Date: Fri Oct 27 06:49:20 2017 +0100 | | | | Change +4 for tx to a variable and get it to run at +2, this alllows nFAPI to get the reply back for HI_DCI0 to generate the PHICH in time | | | * commit 7a5770947861d354e2e7e56a20ce70aa046b69c2 | | Author: David Price <davpric2@cisco.com> | | Date: Wed Oct 25 14:45:37 2017 +0100 | | | | Crashes around msg4 time, but understand that need to get the ACK for the UE UL of msg3 back to UE within 4ms | | | * commit 74cbde7c2c49fe1bc44bfe16f4146eaa0d25a2e7 | | Author: David Price <davpric2@cisco.com> | | Date: Mon Oct 23 14:16:24 2017 +0100 | | | | Add a gtk wave for pnf | | | * commit 9d5d78f5db99097912791d5506bd05b290e1376a | | Author: David Price <davpric2@cisco.com> | | Date: Mon Oct 23 14:16:07 2017 +0100 | | | | Stack smashing error reported. Fixed by parameter changing int to uint16_t. Not obvious! | | | * commit f7670c4b675e01d27094711733212f1657b2b62b | | Author: David Price <davpric2@cisco.com> | | Date: Fri Oct 20 10:48:30 2017 +0100 | | | | Yet another small tweak still proving that RACH works | | | * commit b9fc5e679f241159000bd37a2c1fdb0955b0f1a3 | | Author: David Price <davpric2@cisco.com> | | Date: Fri Oct 20 09:18:24 2017 +0100 | | | | Small update mostly tweaking. Still RACHs | | | * commit 80aaca76b4261401a84800f5fa694030c8910e81 | | Author: David Price <davpric2@cisco.com> | | Date: Thu Oct 19 16:19:22 2017 +0100 | | | | More tidy up | | | * commit b6a9bb33997124feb8e3d1ba878444b60ec9ae92 | | Author: David Price <davpric2@cisco.com> | | Date: Thu Oct 19 16:08:19 2017 +0100 | | | | Bit of tidy up, rename variables. change some logs | | | * commit 17322170958db70ca3550e6937dec4bc61a1b31e | | Merge: 1ec934f9f599ba826a| | Author: David Price <davpric2@cisco.com> | | Date: Wed Oct 18 09:32:11 2017 +0100 | | | | Merged RU-RAU-split as of 18 Oct | | | * commit 1ec934f9fcb957c9080520d0ecda1c905ef172b8 | | Author: David Price <davpric2@cisco.com> | | Date: Mon Oct 16 14:04:05 2017 +0100 | | | | Works up to message 3 reception at VNF | | | * commit 5be8cf7b77f066f0489f06e7d8c744472408d50d | | Author: David Price <davpric2@cisco.com> | | Date: Tue Oct 10 08:58:21 2017 +0100 | | | | RACH received on VNF. Message 2 created and sent to PNF. Got Message 2 received on PNF. Nothing useful done with it yet | | | * commit 6c519f5bcff0fe160c5fde355beb1cf03f0a5615 | | Author: David Price <davpric2@cisco.com> | | Date: Mon Oct 9 17:11:49 2017 +0100 | | | | Merge from RU-RAU-split and fix of frame/subframe handling. Was very confused with the counter in the main loop, the incrementing from the USRP read library and the nFAPI frame handling. RACH seen on wireshark and something happens on VNF | | | * commit 6559fc199f3739775189ff970b28039022bd7dbd | | Merge: 8da3d5cc28e6cc0190| | Author: David Price <davpric2@cisco.com> | | Date: Mon Oct 9 07:14:17 2017 +0100 | | | | Merge from RU-RAU-split 9th Oct | | | * commit 8da3d5cc220461e52407e359f9571a79129097a7 | | Merge: 483cd5cf8e52c57b89| | Author: David Price <davpric2@cisco.com> | | Date: Fri Oct 6 11:24:35 2017 +0100 | | | | Merge from official RU-RAU-split branch. Tested with san jole and UE - network is seen. Not tried RACH | | | * commit 483cd5cf824b7b3a766cb597fbc2b7dd721ba492 | | Author: David Price <davpric2@cisco.com> | | Date: Thu Oct 5 11:48:01 2017 +0100 | | | | NFAPI RACH now working. Gets sent to VNF. VNF cores currently on receipt. Probably fixed by merge from main RU-RAU-split which I will do next | | | * commit de5bec310d9d983b6297c9227323b865c0f2ab7f | | Author: David Price <davpric2@cisco.com> | | Date: Tue Oct 3 15:12:46 2017 +0100 | | | | Over write Raymond's copy of the open nfapi diff with the one that I am using - it re-orders the processing of dl_config and tx_req | | | * commit 53e7a57297983586d285a392571b0ca2fa01e5d2 | | Author: David Price <davpric2@cisco.com> | | Date: Tue Oct 3 15:06:39 2017 +0100 | | | | Network search working again. Now calling generate_dci_top every subframe, using dummy subframe if no data to transmit. MIB and SIB2/3 coming out. UE sees cell | | | * commit 142d96fdc9be9543c6c61ca44d514adba1f94a4c | | Author: David Price <davpric2@cisco.com> | | Date: Thu Sep 28 09:05:44 2017 +0100 | | | | Store a complete list of DLSCH PDUs because it is possible they might get written over otherwise | | | * commit 3cb04fc32745a094e4a408a6d442622d17846b6e | | Author: David Price <davpric2@cisco.com> | | Date: Fri Sep 22 15:39:30 2017 +0100 | | | | Phone sees network on network search. Need to schedule MIB every frame. Fixed pdu length. fixed number of dcis | | | * commit 0bd5978edc8b5d26db7f18602e1f365e1f1f0e9b | | Author: David Price <davpric2@cisco.com> | | Date: Fri Sep 22 09:22:39 2017 +0100 | | | | Both MIB and SIB1 are coming out on san jole. SIB2/3 is missing | | | * commit fbd450eecc57bb7abe9273a47c7fc32f88ebe767 | | Author: David Price <davpric2@cisco.com> | | Date: Thu Sep 21 12:09:45 2017 +0100 | | | | Missing checkin. | | | * commit 9496696a5d3f11590ac8f081de2f2339dbc8e747 | | Author: David Price <davpric2@cisco.com> | | Date: Thu Sep 21 11:50:04 2017 +0100 | | | | Remove hard coding of my IP address and use config file address | | | * commit 72107411135cc91bbf95cb9072d1f153f5c1b411 | | Merge: 17e158f61b421d467a| | Author: Raymond Knopp <raymond.knopp@eurecom.fr> | | Date: Thu Sep 21 08:48:46 2017 +0200 | | | | Merge branch 'RU-RAU-split' of https://gitlab.eurecom.fr/oai/openairinterface5g into nfapi-ru-rau-split | | | | Conflicts: | | openair2/RRC/LITE/L2_interface.c | | targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210.conf | | | * commit 17e158f61f56b46bd89481af1d57968f0a7cecca | |\ Merge: 16a36ec84 ca96ede83 | | | Author: Raymond Knopp <raymond.knopp@eurecom.fr> | | | Date: Wed Sep 20 14:51:36 2017 +0200 | | | | | | Merge branch 'nfapi-ru-rau-split' of https://gitlab.eurecom.fr/daveprice/openairinterface5g into nfapi-ru-rau-split | | | | | * commit ca96ede83b43cf1e45c6a629096dda455da55f7f | | | Author: David Price <davpric2@cisco.com> | | | Date: Wed Sep 20 11:32:40 2017 +0100 | | | | | | NFAPI_DIR was set to my personal directory | | | | * | commit 16a36ec8491cd70142df149731939fbc515bcd4e | |/ Author: Raymond Knopp <raymond.knopp@eurecom.fr> | | Date: Wed Sep 20 12:49:46 2017 +0200 | | | | removed ITTI message transfer for MAC->RRC | | | * commit 8b12045bccde8a45413690946abd4ee91ff8a8bf | Author: David Price <davpric2@cisco.com> | Date: Wed Sep 20 10:50:09 2017 +0100 | | Trying to get NFAPI working. BCH not being sent out over the air but is being scheduled | * commit 83394cd3a5bd069399a3ea96a9f6e9218b7203f9 | Author: matzakos <panagiotis.matzakos@eurecom.fr> | Date: Fri Nov 17 14:41:34 2017 +0100 | | Small correction wrt the UE_MAC state machine in phy_stub_UE | * commit 725ad9d9e476cacfbd022d404a06d9cf9fe799b3 | Author: matzakos <panagiotis.matzakos@eurecom.fr> | Date: Thu Nov 16 15:59:22 2017 +0100 | | Introduced a new timer_thread within lte-ue. This thread is ticking the subframes and wakes up UE_thread function which is waiting on a condition variable for nfapi_mode=3 (phy_stub) | * commit c3f984d0b6092002feeb30aad07411c17a3a891a | Author: matzakos <panagiotis.matzakos@eurecom.fr> | Date: Tue Nov 14 12:34:55 2017 +0100 | | Introduce nfapi_mode variable to differentiate functionality between phy_stub_ue mode (nfapi_mode=3) and normal full stack mode (nfapi_mode!=3). | * commit 96f18a06d239ee6556cc1ddd344da8a736d33ca8 | Author: matzakos <panagiotis.matzakos@eurecom.fr> | Date: Mon Nov 13 16:58:11 2017 +0100 | | Added functions copying nfapi requests to UE_mac_inst + Substituted calls to phy_procedures_ue rx/tx with phy_stub functions triggering MAC layer Tx/Rx procedures at UE MAC. Changes within UE_thread_rxn_txnp4 | * commit 66ae679d26974801d6e76678f34468f6423dbb8e | Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr> | Date: Thu Nov 9 15:51:45 2017 +0100 | | update SidelinkUEInformation (UE's side), RRCConnectionReconfiguration (eNB's side), add rrc_ue_process_radioResourceConfig to process RPs and configure MAC/PHY | * commit 511c48c7a4e99854fd26e5caa796c110afcca802 |\ Merge: 34f5368cb d91742560 | | Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr> | | Date: Tue Nov 7 16:12:03 2017 +0100 | | | | XMerge branch 'master' of gitlab.eurecom.fr:matzakos/LTE-D2D | | | * commit d91742560408977d46389c057a1f35c9b692ec3b | | Author: matzakos <panagiotis.matzakos@eurecom.fr> | | Date: Mon Nov 6 11:58:59 2017 +0100 | | | | Added handling of HI_DCI0_config requests at UE MAC. Eliminated calls to PHY functions from utilized UE MAC functions (e.g., ue_send_sdu) to support phy_stub operation mode. | | * | commit 34f5368cbc1a11e51393b2ce4b3ee32d58828d10 |/ Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr> | Date: Tue Nov 7 16:11:28 2017 +0100 | | add function to fill MIB_SL | * commit 7e77fb674dd9e7c19c0cc4b307c82e256a8018ac | Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr> | Date: Fri Nov 3 13:56:29 2017 +0100 | | support SidelinkUEInformation (eNB) and RRCConnectionReconfiguration (SL) | * commit 418da5b4011da222c3444c84ed2b9d5e5575e13a | Author: matzakos <panagiotis.matzakos@eurecom.fr> | Date: Thu Nov 2 19:53:40 2017 +0100 | | Updated handling of DL_config and Tx_req pdus in phy_stub_UE to be compliant with nfapi callback functions | * commit a37ff36d357e9b88e832da13f27f4ea3321928f8 | Author: matzakos <panagiotis.matzakos@eurecom.fr> | Date: Thu Nov 2 14:34:58 2017 +0100 | | Added MAC level state variable for the UE and control mechanisms to ensure the correct operation of the UE MAC state machine. | * commit 4757a1b6da19e053695a3e49416cd9df1efce41c | Author: matzakos <panagiotis.matzakos@eurecom.fr> | Date: Sat Oct 28 14:16:33 2017 +0200 | | Added remaining fill_harq indication functions + the functionality to handle ul_config request pdus arriving from nfapi-vnf: trigger the appropriate UE_MAC and fill_indication functions to prepare the UL_indications which will be put into the socket for transfer back to vnf. Main changes within phy_stub_UE(). | * commit 6719eefbcdabe402ec18d045836388bfdc006155 | Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr> | Date: Mon Oct 23 15:40:02 2017 +0200 | | minor update to process SidelinkUEInformation | * commit 136c61ac148b3499b437696559c34a668ee19400 | Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr> | Date: Mon Oct 23 15:31:02 2017 +0200 | | receive SidelinkUEInformation (eNB) | * commit 7abf122701a6a1cb28785887a7e3cbe978ae7c3b | Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr> | Date: Mon Oct 23 15:07:56 2017 +0200 | | generate/process SidelinkUEInformation | * commit afa442bbefa862ba65d87947648a7eab39fc1a61 | Author: matzakos <panagiotis.matzakos@eurecom.fr> | Date: Thu Oct 19 17:20:59 2017 +0200 | | Added fill functions for rach and ulsch_cqi indications. | * commit 8314a2644ee8b75cfc8eded9f5e9dc2a5c9833a1 | Merge: 2d50ccafd2516216d1| Author: matzakos <panagiotis.matzakos@eurecom.fr> | Date: Wed Oct 18 15:53:49 2017 +0200 | | Merge remote-tracking branch 'main/RU-RAU-split' | * commit 2d50ccafd233588507bb895163f75489cef4144a | Author: matzakos <panagiotis.matzakos@eurecom.fr> | Date: Wed Oct 18 15:45:09 2017 +0200 | | Added fill functions for rx, crc and sr indications in phy_stub_UE. These functions will be getting called directly from the MAC layer of the UE. Rest of fill functions remain to be added. | * commit 22bcc7a5135cda7eb55fb2813afec05a94551239 | Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr> | Date: Tue Oct 17 15:14:46 2017 +0200 | | add SIB19 support - eNB | * commit 2de24be284e1703a17678ca49c465ee3f8bb5d01 | Author: Tien-Thinh Nguyen <tien-thinh.nguyen@eurecom.fr> | Date: Mon Oct 16 11:14:28 2017 +0200 | | add SIB18 support - eNB | * commit 931ae713266190fcc05c23a19bf45ce5fc1581fb | Merge: d4e6d45cb493110af7| Author: matzakos <panagiotis.matzakos@eurecom.fr> | Date: Fri Oct 13 11:00:14 2017 +0200 | | Merge with RU-RAU-split | * commit d4e6d45cb9966bf294b76472d6120ea77dc4a048 | Author: matzakos <panagiotis.matzakos@eurecom.fr> | Date: Fri Sep 22 19:57:43 2017 +0200 | | Definition of the UE<->eNB MAC to MAC interface based on nFAPI structures: Currently supporting the triggering of MAC layer Rx operations at the UE side based on the reception of NFAPI DL messages. Partial definition of Sidelink MAC subheaders. | * commit 0422bf8bb9bbf6ff55273f7b9075970230da8514 Author: matzakos <panagiotis.matzakos@eurecom.fr> Date: Mon Sep 4 10:12:55 2017 +0200 Definition of the UE MAC interface: IF_Module_UE.h, IF_Module_UE.c, UE_MAC_interface.h and the supporting functions. ------------------------------------------------------------------------------
1519 lines
48 KiB
C
1519 lines
48 KiB
C
/*
|
|
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
|
* contributor license agreements. See the NOTICE file distributed with
|
|
* this work for additional information regarding copyright ownership.
|
|
* The OpenAirInterface Software Alliance licenses this file to You under
|
|
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
|
* except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.openairinterface.org/?page_id=698
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*-------------------------------------------------------------------------------
|
|
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
|
* contact@openairinterface.org
|
|
*/
|
|
|
|
/*! \file LAYER2/MAC/defs.h
|
|
* \brief MAC data structures, constant, and function prototype
|
|
* \author Navid Nikaein and Raymond Knopp
|
|
* \date 2011
|
|
* \version 0.5
|
|
* \email navid.nikaein@eurecom.fr
|
|
|
|
*/
|
|
/** @defgroup _oai2 openair2 Reference Implementation
|
|
* @ingroup _ref_implementation_
|
|
* @{
|
|
*/
|
|
|
|
/*@}*/
|
|
|
|
#ifndef __LAYER2_MAC_DEFS_H__
|
|
#define __LAYER2_MAC_DEFS_H__
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
|
|
#include "PHY/defs.h"
|
|
#include "PHY/LTE_TRANSPORT/defs.h"
|
|
#include "COMMON/platform_constants.h"
|
|
#include "BCCH-BCH-Message.h"
|
|
#include "RadioResourceConfigCommon.h"
|
|
#include "RadioResourceConfigDedicated.h"
|
|
#include "MeasGapConfig.h"
|
|
#include "SchedulingInfoList.h"
|
|
#include "TDD-Config.h"
|
|
#include "RACH-ConfigCommon.h"
|
|
#include "MeasObjectToAddModList.h"
|
|
#include "MobilityControlInfo.h"
|
|
#if defined(Rel10) || defined(Rel14)
|
|
#include "MBSFN-AreaInfoList-r9.h"
|
|
#include "MBSFN-SubframeConfigList.h"
|
|
#include "PMCH-InfoList-r9.h"
|
|
#include "SCellToAddMod-r10.h"
|
|
#endif
|
|
#ifdef Rel14
|
|
#include "SystemInformationBlockType1-v1310-IEs.h"
|
|
#include "SystemInformationBlockType18-r12.h"
|
|
#endif
|
|
#include "RadioResourceConfigCommonSIB.h"
|
|
#include "nfapi_interface.h"
|
|
#include "PHY_INTERFACE/IF_Module.h"
|
|
|
|
/** @defgroup _mac MAC
|
|
* @ingroup _oai2
|
|
* @{
|
|
*/
|
|
|
|
#define BCCH_PAYLOAD_SIZE_MAX 128
|
|
#define CCCH_PAYLOAD_SIZE_MAX 128
|
|
#define PCCH_PAYLOAD_SIZE_MAX 128
|
|
#define RAR_PAYLOAD_SIZE_MAX 128
|
|
|
|
#define SCH_PAYLOAD_SIZE_MAX 4096
|
|
#define DCH_PAYLOAD_SIZE_MAX 4096
|
|
/// Logical channel ids from 36-311 (Note BCCH is not specified in 36-311, uses the same as first DRB)
|
|
|
|
#if defined(Rel10) || defined(Rel14)
|
|
|
|
// Mask for identifying subframe for MBMS
|
|
#define MBSFN_TDD_SF3 0x80 // for TDD
|
|
#define MBSFN_TDD_SF4 0x40
|
|
#define MBSFN_TDD_SF7 0x20
|
|
#define MBSFN_TDD_SF8 0x10
|
|
#define MBSFN_TDD_SF9 0x08
|
|
#define MBSFN_FDD_SF1 0x80 // for FDD
|
|
#define MBSFN_FDD_SF2 0x40
|
|
#define MBSFN_FDD_SF3 0x20
|
|
#define MBSFN_FDD_SF6 0x10
|
|
#define MBSFN_FDD_SF7 0x08
|
|
#define MBSFN_FDD_SF8 0x04
|
|
|
|
#define MAX_MBSFN_AREA 8
|
|
#define MAX_PMCH_perMBSFN 15
|
|
/*!\brief MAX MCCH payload size */
|
|
#define MCCH_PAYLOAD_SIZE_MAX 128
|
|
//#define MCH_PAYLOAD_SIZE_MAX 16384// this value is using in case mcs and TBS index are high
|
|
#endif
|
|
|
|
#define printk printf
|
|
|
|
/*!\brief Maximum number of logical channl group IDs */
|
|
#define MAX_NUM_LCGID 4
|
|
/*!\brief logical channl group ID 0 */
|
|
#define LCGID0 0
|
|
/*!\brief logical channl group ID 1 */
|
|
#define LCGID1 1
|
|
/*!\brief logical channl group ID 2 */
|
|
#define LCGID2 2
|
|
/*!\brief logical channl group ID 3 */
|
|
#define LCGID3 3
|
|
/*!\brief Maximum number of logical chanels */
|
|
#define MAX_NUM_LCID 11
|
|
/*!\brief Maximum number od control elemenets */
|
|
#define MAX_NUM_CE 5
|
|
/*!\brief Maximum number of random access process */
|
|
#if defined(USRP_REC_PLAY)
|
|
#define NB_RA_PROC_MAX 1
|
|
#else
|
|
#define NB_RA_PROC_MAX 4
|
|
#endif
|
|
/*!\brief size of buffer status report table */
|
|
#define BSR_TABLE_SIZE 64
|
|
/*!\brief The power headroom reporting range is from -23 ...+40 dB and beyond, with step 1 */
|
|
#define PHR_MAPPING_OFFSET 23 // if ( x>= -23 ) val = floor (x + 23)
|
|
/*!\brief maximum number of resource block groups */
|
|
#define N_RBG_MAX 25 // for 20MHz channel BW
|
|
/*!\brief minimum value for channel quality indicator */
|
|
#define MIN_CQI_VALUE 0
|
|
/*!\brief maximum value for channel quality indicator */
|
|
#define MAX_CQI_VALUE 15
|
|
/*!\briefmaximum number of supported bandwidth (1.4, 5, 10, 20 MHz) */
|
|
#define MAX_SUPPORTED_BW 4
|
|
/*!\brief CQI values range from 1 to 15 (4 bits) */
|
|
#define CQI_VALUE_RANGE 16
|
|
|
|
/*!\brief value for indicating BSR Timer is not running */
|
|
#define MAC_UE_BSR_TIMER_NOT_RUNNING (0xFFFF)
|
|
|
|
#define LCID_EMPTY 0
|
|
#define LCID_NOT_EMPTY 1
|
|
|
|
/*!\brief minimum RLC PDU size to be transmitted = min RLC Status PDU or RLC UM PDU SN 5 bits */
|
|
#define MIN_RLC_PDU_SIZE (2)
|
|
|
|
/*!\brief minimum MAC data needed for transmitting 1 min RLC PDU size + 1 byte MAC subHeader */
|
|
#define MIN_MAC_HDR_RLC_SIZE (1 + MIN_RLC_PDU_SIZE)
|
|
|
|
/*!\brief maximum number of slices / groups */
|
|
#define MAX_NUM_SLICES 4
|
|
|
|
|
|
#define U_PLANE_INACTIVITY_VALUE 6000
|
|
|
|
/*
|
|
* eNB part
|
|
*/
|
|
|
|
|
|
/*
|
|
* UE/ENB common part
|
|
*/
|
|
/*!\brief MAC header of Random Access Response for Random access preamble identifier (RAPID) */
|
|
typedef struct {
|
|
uint8_t RAPID:6;
|
|
uint8_t T:1;
|
|
uint8_t E:1;
|
|
} __attribute__ ((__packed__)) RA_HEADER_RAPID;
|
|
|
|
/*!\brief MAC header of Random Access Response for backoff indicator (BI)*/
|
|
typedef struct {
|
|
uint8_t BI:4;
|
|
uint8_t R:2;
|
|
uint8_t T:1;
|
|
uint8_t E:1;
|
|
} __attribute__ ((__packed__)) RA_HEADER_BI;
|
|
/*
|
|
typedef struct {
|
|
uint64_t padding:16;
|
|
uint64_t t_crnti:16;
|
|
uint64_t hopping_flag:1;
|
|
uint64_t rb_alloc:10;
|
|
uint64_t mcs:4;
|
|
uint64_t TPC:3;
|
|
uint64_t UL_delay:1;
|
|
uint64_t cqi_req:1;
|
|
uint64_t Timing_Advance_Command:11; // first/2nd octet LSB
|
|
uint64_t R:1; // octet MSB
|
|
} __attribute__((__packed__))RAR_PDU;
|
|
|
|
typedef struct {
|
|
uint64_t padding:16;
|
|
uint64_t R:1; // octet MSB
|
|
uint64_t Timing_Advance_Command:11; // first/2nd octet LSB
|
|
uint64_t cqi_req:1;
|
|
uint64_t UL_delay:1;
|
|
uint64_t TPC:3;
|
|
uint64_t mcs:4;
|
|
uint64_t rb_alloc:10;
|
|
uint64_t hopping_flag:1;
|
|
uint64_t t_crnti:16;
|
|
} __attribute__((__packed__))RAR_PDU;
|
|
|
|
#define sizeof_RAR_PDU 6
|
|
*/
|
|
/*!\brief MAC subheader short with 7bit Length field */
|
|
typedef struct {
|
|
uint8_t LCID:5; // octet 1 LSB
|
|
uint8_t E:1;
|
|
uint8_t R:2; // octet 1 MSB
|
|
uint8_t L:7; // octet 2 LSB
|
|
uint8_t F:1; // octet 2 MSB
|
|
} __attribute__ ((__packed__)) SCH_SUBHEADER_SHORT;
|
|
/*!\brief MAC subheader long with 15bit Length field */
|
|
typedef struct {
|
|
uint8_t LCID:5; // octet 1 LSB
|
|
uint8_t E:1;
|
|
uint8_t R:2; // octet 1 MSB
|
|
uint8_t L_MSB:7;
|
|
uint8_t F:1; // octet 2 MSB
|
|
uint8_t L_LSB:8;
|
|
uint8_t padding;
|
|
} __attribute__ ((__packed__)) SCH_SUBHEADER_LONG;
|
|
/*!\brief MAC subheader short without length field */
|
|
typedef struct {
|
|
uint8_t LCID:5;
|
|
uint8_t E:1;
|
|
uint8_t R:2;
|
|
} __attribute__ ((__packed__)) SCH_SUBHEADER_FIXED;
|
|
|
|
|
|
|
|
/*!\brief MAC subheader long with 24bit DST field */
|
|
typedef struct {
|
|
uint8_t R0:4;
|
|
uint8_t V:4;//Version number: Possible values "0001", "0010", "0011" based on TS36.321 section 6.2.3.
|
|
uint8_t SRC07; //Prose UE source ID. Size 24 bits.
|
|
uint8_t SRC815; //Prose UE source ID. Size 24 bits.
|
|
uint8_t SRC1623; //Prose UE source ID. Size 24 bits.
|
|
uint8_t DST07; //Prose UE destination ID. Size 24 bits.
|
|
uint8_t DST815; //Prose UE destination ID. Size 24 bits.
|
|
uint8_t DST1623; //Prose UE destination ID. Size 24 bits.
|
|
uint8_t LCID:5;
|
|
uint8_t E:1;
|
|
uint8_t R1:2;
|
|
uint8_t L:7; // Length field indicating the size of the corresponding SDU in bytes.
|
|
uint8_t F:1;
|
|
}__attribute__((__packed__))SLSCH_SUBHEADER_24_Bit_DST_SHORT;
|
|
|
|
/*!\brief MAC subheader long with 24bit DST field */
|
|
typedef struct {
|
|
uint8_t R0:4;
|
|
uint8_t V:4;//Version number: Possible values "0001", "0010", "0011" based on TS36.321 section 6.2.3.
|
|
uint8_t SRC07; //Prose UE source ID. Size 24 bits.
|
|
uint8_t SRC815; //Prose UE source ID. Size 24 bits.
|
|
uint8_t SRC1623; //Prose UE source ID. Size 24 bits.
|
|
uint8_t DST07; //Prose UE destination ID. Size 24 bits.
|
|
uint8_t DST815; //Prose UE destination ID. Size 24 bits.
|
|
uint8_t DST1623; //Prose UE destination ID. Size 24 bits.
|
|
uint8_t LCID:5;
|
|
uint8_t E:1;
|
|
uint8_t R1:2;
|
|
uint8_t L_MSB:7; // Length field indicating the size of the corresponding SDU in bytes.
|
|
uint8_t F:1;
|
|
uint8_t L_LSB:8;
|
|
}__attribute__((__packed__))SLSCH_SUBHEADER_24_Bit_DST_LONG;
|
|
|
|
/*!\brief MAC subheader long with 24bit DST field */
|
|
typedef struct {
|
|
uint8_t R0:4;
|
|
uint8_t V:4;//Version number: Possible values "0001", "0010", "0011" based on TS36.321 section 6.2.3.
|
|
uint8_t SRC07; //Prose UE source ID. Size 24 bits.
|
|
uint8_t SRC815; //Prose UE source ID. Size 24 bits.
|
|
uint8_t DST07; //Prose UE destination ID. Size 16 bits.
|
|
uint8_t DST815; //Prose UE destination ID. Size 16 bits.
|
|
uint8_t LCID:5;
|
|
uint8_t E:1;
|
|
uint8_t R1:2;
|
|
uint8_t L:7; // Length field indicating the size of the corresponding SDU in bytes.
|
|
uint8_t F:1;
|
|
}__attribute__((__packed__))SLSCH_SUBHEADER_16_Bit_DST_SHORT;
|
|
|
|
/*!\brief MAC subheader long with 24bit DST field */
|
|
typedef struct {
|
|
uint8_t R0:4;
|
|
uint8_t V:4;//Version number: Possible values "0001", "0010", "0011" based on TS36.321 section 6.2.3.
|
|
uint8_t SRC07; //Prose UE source ID. Size 24 bits.
|
|
uint8_t SRC815; //Prose UE source ID. Size 24 bits.
|
|
uint8_t SRC1623; //Prose UE source ID. Size 24 bits.
|
|
uint8_t DST07; //Prose UE destination ID. Size 16 bits.
|
|
uint8_t DST815; //Prose UE destination ID. Size 16 bits.
|
|
uint8_t LCID:5;
|
|
uint8_t E:1;
|
|
uint8_t R1:2;
|
|
uint8_t L_MSB:7; // Length field indicating the size of the corresponding SDU in bytes.
|
|
uint8_t F:1;
|
|
uint8_t L_LSB:8;
|
|
}__attribute__((__packed__))SLSCH_SUBHEADER_16_Bit_DST_LONG;
|
|
|
|
/*!\brief mac control element: short buffer status report for a specific logical channel group ID*/
|
|
typedef struct {
|
|
uint8_t Buffer_size:6; // octet 1 LSB
|
|
uint8_t LCGID:2; // octet 1 MSB
|
|
} __attribute__ ((__packed__)) BSR_SHORT;
|
|
|
|
typedef BSR_SHORT BSR_TRUNCATED;
|
|
/*!\brief mac control element: long buffer status report for all logical channel group ID*/
|
|
typedef struct {
|
|
uint8_t Buffer_size3:6;
|
|
uint8_t Buffer_size2:6;
|
|
uint8_t Buffer_size1:6;
|
|
uint8_t Buffer_size0:6;
|
|
} __attribute__ ((__packed__)) BSR_LONG;
|
|
|
|
// Panos:
|
|
/*!\brief mac control element: sidelink buffer status report */
|
|
typedef struct {
|
|
uint8_t DST_1:4;
|
|
uint8_t LCGID_1: 2;
|
|
uint8_t Buffer_size_1:6;
|
|
uint8_t DST_2:4;
|
|
uint8_t LCGID_2: 2;
|
|
uint8_t Buffer_size_2:6;
|
|
}__attribute__((__packed__))SL_BSR;
|
|
|
|
/*!\brief mac control element: truncated sidelink buffer status report */
|
|
typedef struct {
|
|
uint8_t DST:4;
|
|
uint8_t LCGID: 2;
|
|
uint8_t Buffer_size:6;
|
|
uint8_t R1:1;
|
|
uint8_t R2:1;
|
|
uint8_t R3:1;
|
|
uint8_t R4:1;
|
|
}__attribute__((__packed__))SL_BSR_Truncated;
|
|
|
|
|
|
|
|
#define BSR_LONG_SIZE (sizeof(BSR_LONG))
|
|
/*!\brief mac control element: timing advance */
|
|
typedef struct {
|
|
uint8_t TA:6;
|
|
uint8_t R:2;
|
|
} __attribute__ ((__packed__)) TIMING_ADVANCE_CMD;
|
|
/*!\brief mac control element: power headroom report */
|
|
typedef struct {
|
|
uint8_t PH:6;
|
|
uint8_t R:2;
|
|
} __attribute__ ((__packed__)) POWER_HEADROOM_CMD;
|
|
|
|
/*! \brief MIB payload */
|
|
typedef struct {
|
|
uint8_t payload[3];
|
|
} __attribute__ ((__packed__)) MIB_PDU;
|
|
/*! \brief CCCH payload */
|
|
typedef struct {
|
|
uint8_t payload[CCCH_PAYLOAD_SIZE_MAX];
|
|
} __attribute__ ((__packed__)) CCCH_PDU;
|
|
/*! \brief BCCH payload */
|
|
typedef struct {
|
|
uint8_t payload[BCCH_PAYLOAD_SIZE_MAX];
|
|
} __attribute__ ((__packed__)) BCCH_PDU;
|
|
/*! \brief RAR payload */
|
|
typedef struct {
|
|
uint8_t payload[RAR_PAYLOAD_SIZE_MAX];
|
|
} __attribute__ ((__packed__)) RAR_PDU;
|
|
/*! \brief BCCH payload */
|
|
typedef struct {
|
|
uint8_t payload[PCCH_PAYLOAD_SIZE_MAX];
|
|
} __attribute__ ((__packed__)) PCCH_PDU;
|
|
|
|
#if defined(Rel10) || defined(Rel14)
|
|
/*! \brief MCCH payload */
|
|
typedef struct {
|
|
uint8_t payload[MCCH_PAYLOAD_SIZE_MAX];
|
|
} __attribute__ ((__packed__)) MCCH_PDU;
|
|
/*!< \brief MAC control element for activation and deactivation of component carriers */
|
|
typedef struct {
|
|
uint8_t C7:1; /*!< \brief Component carrier 7 */
|
|
uint8_t C6:1; /*!< \brief Component carrier 6 */
|
|
uint8_t C5:1; /*!< \brief Component carrier 5 */
|
|
uint8_t C4:1; /*!< \brief Component carrier 4 */
|
|
uint8_t C3:1; /*!< \brief Component carrier 3 */
|
|
uint8_t C2:1; /*!< \brief Component carrier 2 */
|
|
uint8_t C1:1; /*!< \brief Component carrier 1 */
|
|
uint8_t R:1; /*!< \brief Reserved */
|
|
} __attribute__ ((__packed__)) CC_ELEMENT;
|
|
/*! \brief MAC control element: MCH Scheduling Information */
|
|
typedef struct {
|
|
uint8_t stop_sf_MSB:3; // octet 1 LSB
|
|
uint8_t lcid:5; // octet 2 MSB
|
|
uint8_t stop_sf_LSB:8;
|
|
} __attribute__ ((__packed__)) MSI_ELEMENT;
|
|
#endif
|
|
/*! \brief Values of CCCH LCID for DLSCH */
|
|
#define CCCH_LCHANID 0
|
|
/*!\brief Values of BCCH logical channel (fake)*/
|
|
#define BCCH 3 // SI
|
|
/*!\brief Values of PCCH logical channel (fake)*/
|
|
#define PCCH 4 // Paging
|
|
/*!\brief Values of PCCH logical channel (fake) */
|
|
#define MIBCH 5 // MIB
|
|
/*!\brief Values of BCCH SIB1_BR logical channel (fake) */
|
|
#define BCCH_SIB1_BR 6 // SIB1_BR
|
|
/*!\brief Values of BCCH SIB_BR logical channel (fake) */
|
|
#define BCCH_SI_BR 7 // SI-BR
|
|
/*!\brief Value of CCCH / SRB0 logical channel */
|
|
#define CCCH 0 // srb0
|
|
/*!\brief DCCH / SRB1 logical channel */
|
|
#define DCCH 1 // srb1
|
|
/*!\brief DCCH1 / SRB2 logical channel */
|
|
#define DCCH1 2 // srb2
|
|
/*!\brief DTCH DRB1 logical channel */
|
|
#define DTCH 3 // LCID
|
|
/*!\brief MCCH logical channel */
|
|
#define MCCH 4
|
|
/*!\brief MTCH logical channel */
|
|
#define MTCH 1
|
|
// DLSCH LCHAN ID
|
|
/*!\brief LCID of UE contention resolution identity for DLSCH*/
|
|
#define UE_CONT_RES 28
|
|
/*!\brief LCID of timing advance for DLSCH */
|
|
#define TIMING_ADV_CMD 29
|
|
/*!\brief LCID of discontinous reception mode for DLSCH */
|
|
#define DRX_CMD 30
|
|
/*!\brief LCID of padding LCID for DLSCH */
|
|
#define SHORT_PADDING 31
|
|
|
|
#if defined(Rel10) || defined(Rel14)
|
|
// MCH LCHAN IDs (table6.2.1-4 TS36.321)
|
|
/*!\brief LCID of MCCH for DL */
|
|
#define MCCH_LCHANID 0
|
|
/*!\brief LCID of MCH scheduling info for DL */
|
|
#define MCH_SCHDL_INFO 3
|
|
/*!\brief LCID of Carrier component activation/deactivation */
|
|
#define CC_ACT_DEACT 27
|
|
//TTN (for D2D)
|
|
#define SL_DISCOVERY 8 //LCID (fake)
|
|
#define MAX_NUM_DEST 10
|
|
#endif
|
|
|
|
// ULSCH LCHAN IDs
|
|
/*!\brief LCID of extended power headroom for ULSCH */
|
|
#define EXTENDED_POWER_HEADROOM 25
|
|
/*!\brief LCID of power headroom for ULSCH */
|
|
#define POWER_HEADROOM 26
|
|
/*!\brief LCID of CRNTI for ULSCH */
|
|
#define CRNTI 27
|
|
/*!\brief LCID of truncated BSR for ULSCH */
|
|
#define TRUNCATED_BSR 28
|
|
/*!\brief LCID of short BSR for ULSCH */
|
|
#define SHORT_BSR 29
|
|
/*!\brief LCID of long BSR for ULSCH */
|
|
#define LONG_BSR 30
|
|
/*!\bitmaps for BSR Triggers */
|
|
#define BSR_TRIGGER_NONE (0) /* No BSR Trigger */
|
|
#define BSR_TRIGGER_REGULAR (1) /* For Regular and ReTxBSR Expiry Triggers */
|
|
#define BSR_TRIGGER_PERIODIC (2) /* For BSR Periodic Timer Expiry Trigger */
|
|
#define BSR_TRIGGER_PADDING (4) /* For Padding BSR Trigger */
|
|
|
|
|
|
/*! \brief Downlink SCH PDU Structure */
|
|
typedef struct {
|
|
uint8_t payload[8][SCH_PAYLOAD_SIZE_MAX];
|
|
uint16_t Pdu_size[8];
|
|
} __attribute__ ((__packed__)) DLSCH_PDU;
|
|
|
|
|
|
/*! \brief MCH PDU Structure */
|
|
typedef struct {
|
|
int8_t payload[SCH_PAYLOAD_SIZE_MAX];
|
|
uint16_t Pdu_size;
|
|
uint8_t mcs;
|
|
uint8_t sync_area;
|
|
uint8_t msi_active;
|
|
uint8_t mcch_active;
|
|
uint8_t mtch_active;
|
|
} __attribute__ ((__packed__)) MCH_PDU;
|
|
|
|
/*! \brief Uplink SCH PDU Structure */
|
|
typedef struct {
|
|
int8_t payload[SCH_PAYLOAD_SIZE_MAX]; /*!< \brief SACH payload */
|
|
uint16_t Pdu_size;
|
|
} __attribute__ ((__packed__)) ULSCH_PDU;
|
|
|
|
|
|
/*! \brief Uplink SCH PDU Structure */
|
|
typedef struct {
|
|
int8_t payload[DCH_PAYLOAD_SIZE_MAX]; /*!< \brief SACH payload */
|
|
uint16_t Pdu_size;
|
|
} __attribute__ ((__packed__)) ULDCH_PDU;
|
|
|
|
#include "PHY/impl_defs_top.h"
|
|
|
|
/*!\brief RA process state*/
|
|
typedef enum {
|
|
IDLE = 0,
|
|
MSG2,
|
|
WAITMSG3,
|
|
MSG4,
|
|
WAITMSG4ACK
|
|
} RA_state;
|
|
|
|
/*!\brief UE ULSCH scheduling states*/
|
|
typedef enum {
|
|
S_UL_NONE = 0,
|
|
S_UL_WAITING,
|
|
S_UL_SCHEDULED,
|
|
S_UL_BUFFERED,
|
|
S_UL_NUM_STATUS
|
|
} UE_ULSCH_STATUS;
|
|
|
|
/*!\brief UE DLSCH scheduling states*/
|
|
typedef enum {
|
|
S_DL_NONE = 0,
|
|
S_DL_WAITING,
|
|
S_DL_SCHEDULED,
|
|
S_DL_BUFFERED,
|
|
S_DL_NUM_STATUS
|
|
} UE_DLSCH_STATUS;
|
|
|
|
/*!\brief scheduling policy for the contention-based access */
|
|
typedef enum {
|
|
CBA_ES = 0, /// equal share of RB among groups w
|
|
CBA_ES_S, /// equal share of RB among groups with small allocation
|
|
CBA_PF, /// proportional fair (kind of)
|
|
CBA_PF_S, /// proportional fair (kind of) with small RB allocation
|
|
CBA_RS /// random allocation
|
|
} CBA_POLICY;
|
|
|
|
|
|
/*! \brief temporary struct for ULSCH sched */
|
|
typedef struct {
|
|
rnti_t rnti;
|
|
uint16_t subframe;
|
|
uint16_t serving_num;
|
|
UE_ULSCH_STATUS status;
|
|
} eNB_ULSCH_INFO;
|
|
/*! \brief temp struct for DLSCH sched */
|
|
typedef struct {
|
|
rnti_t rnti;
|
|
uint16_t weight;
|
|
uint16_t subframe;
|
|
uint16_t serving_num;
|
|
UE_DLSCH_STATUS status;
|
|
} eNB_DLSCH_INFO;
|
|
/*! \brief eNB overall statistics */
|
|
typedef struct {
|
|
/// num BCCH PDU per CC
|
|
uint32_t total_num_bcch_pdu;
|
|
/// BCCH buffer size
|
|
uint32_t bcch_buffer;
|
|
/// total BCCH buffer size
|
|
uint32_t total_bcch_buffer;
|
|
/// BCCH MCS
|
|
uint32_t bcch_mcs;
|
|
|
|
/// num CCCH PDU per CC
|
|
uint32_t total_num_ccch_pdu;
|
|
/// BCCH buffer size
|
|
uint32_t ccch_buffer;
|
|
/// total BCCH buffer size
|
|
uint32_t total_ccch_buffer;
|
|
/// BCCH MCS
|
|
uint32_t ccch_mcs;
|
|
|
|
/// num PCCH PDU per CC
|
|
uint32_t total_num_pcch_pdu;
|
|
/// PCCH buffer size
|
|
uint32_t pcch_buffer;
|
|
/// total PCCH buffer size
|
|
uint32_t total_pcch_buffer;
|
|
/// BCCH MCS
|
|
uint32_t pcch_mcs;
|
|
|
|
/// num active users
|
|
uint16_t num_dlactive_UEs;
|
|
/// available number of PRBs for a give SF
|
|
uint16_t available_prbs;
|
|
/// total number of PRB available for the user plane
|
|
uint32_t total_available_prbs;
|
|
/// aggregation
|
|
/// total avilable nccc : num control channel element
|
|
uint16_t available_ncces;
|
|
// only for a new transmission, should be extended for retransmission
|
|
// current dlsch bit rate for all transport channels
|
|
uint32_t dlsch_bitrate;
|
|
//
|
|
uint32_t dlsch_bytes_tx;
|
|
//
|
|
uint32_t dlsch_pdus_tx;
|
|
//
|
|
uint32_t total_dlsch_bitrate;
|
|
//
|
|
uint32_t total_dlsch_bytes_tx;
|
|
//
|
|
uint32_t total_dlsch_pdus_tx;
|
|
|
|
// here for RX
|
|
//
|
|
uint32_t ulsch_bitrate;
|
|
//
|
|
uint32_t ulsch_bytes_rx;
|
|
//
|
|
uint64_t ulsch_pdus_rx;
|
|
|
|
uint32_t total_ulsch_bitrate;
|
|
//
|
|
uint32_t total_ulsch_bytes_rx;
|
|
//
|
|
uint32_t total_ulsch_pdus_rx;
|
|
|
|
|
|
/// MAC agent-related stats
|
|
/// total number of scheduling decisions
|
|
int sched_decisions;
|
|
/// missed deadlines
|
|
int missed_deadlines;
|
|
|
|
} eNB_STATS;
|
|
/*! \brief eNB statistics for the connected UEs*/
|
|
typedef struct {
|
|
/// CRNTI of UE
|
|
rnti_t crnti; ///user id (rnti) of connected UEs
|
|
// rrc status
|
|
uint8_t rrc_status;
|
|
/// harq pid
|
|
uint8_t harq_pid;
|
|
/// harq rounf
|
|
uint8_t harq_round;
|
|
/// total available number of PRBs for a new transmission
|
|
uint16_t rbs_used;
|
|
/// total available number of PRBs for a retransmission
|
|
uint16_t rbs_used_retx;
|
|
/// total nccc used for a new transmission: num control channel element
|
|
uint16_t ncce_used;
|
|
/// total avilable nccc for a retransmission: num control channel element
|
|
uint16_t ncce_used_retx;
|
|
|
|
// mcs1 before the rate adaptaion
|
|
uint8_t dlsch_mcs1;
|
|
/// Target mcs2 after rate-adaptation
|
|
uint8_t dlsch_mcs2;
|
|
// current TBS with mcs2
|
|
uint32_t TBS;
|
|
// total TBS with mcs2
|
|
// uint32_t total_TBS;
|
|
// total rb used for a new transmission
|
|
uint32_t total_rbs_used;
|
|
// total rb used for retransmission
|
|
uint32_t total_rbs_used_retx;
|
|
|
|
/// TX
|
|
/// Num pkt
|
|
uint32_t num_pdu_tx[NB_RB_MAX];
|
|
/// num bytes
|
|
uint32_t num_bytes_tx[NB_RB_MAX];
|
|
/// num retransmission / harq
|
|
uint32_t num_retransmission;
|
|
/// instantaneous tx throughput for each TTI
|
|
// uint32_t tti_throughput[NB_RB_MAX];
|
|
// Number of received MAC SDU
|
|
uint32_t num_mac_sdu_tx;
|
|
// LCID related to SDU
|
|
unsigned char lcid_sdu[NB_RB_MAX];
|
|
// Length of SDU Got from LC DL
|
|
uint32_t sdu_length_tx[NB_RB_MAX];
|
|
|
|
|
|
/// overall
|
|
//
|
|
uint32_t dlsch_bitrate;
|
|
//total
|
|
uint32_t total_dlsch_bitrate;
|
|
/// headers+ CE + padding bytes for a MAC PDU
|
|
uint64_t overhead_bytes;
|
|
/// headers+ CE + padding bytes for a MAC PDU
|
|
uint64_t total_overhead_bytes;
|
|
/// headers+ CE + padding bytes for a MAC PDU
|
|
uint64_t avg_overhead_bytes;
|
|
// MAC multiplexed payload
|
|
uint64_t total_sdu_bytes;
|
|
// total MAC pdu bytes
|
|
uint64_t total_pdu_bytes;
|
|
|
|
// total num pdu
|
|
uint32_t total_num_pdus;
|
|
//
|
|
// uint32_t avg_pdu_size;
|
|
|
|
/// RX
|
|
|
|
/// PUCCH1a/b power (dBm)
|
|
int32_t Po_PUCCH_dBm;
|
|
/// Indicator that Po_PUCCH has been updated by PHY
|
|
int32_t Po_PUCCH_update;
|
|
/// Uplink measured RSSI
|
|
int32_t UL_rssi;
|
|
/// preassigned mcs after rate adaptation
|
|
uint8_t ulsch_mcs1;
|
|
/// adjusted mcs
|
|
uint8_t ulsch_mcs2;
|
|
|
|
/// estimated average pdu inter-departure time
|
|
uint32_t avg_pdu_idt;
|
|
/// estimated average pdu size
|
|
uint32_t avg_pdu_ps;
|
|
///
|
|
uint32_t aggregated_pdu_size;
|
|
uint32_t aggregated_pdu_arrival;
|
|
|
|
/// uplink transport block size
|
|
uint32_t ulsch_TBS;
|
|
|
|
uint32_t total_ulsch_TBS;
|
|
|
|
/// total rb used for a new uplink transmission
|
|
uint32_t num_retransmission_rx;
|
|
/// total rb used for a new uplink transmission
|
|
uint32_t rbs_used_rx;
|
|
/// total rb used for a new uplink retransmission
|
|
uint32_t rbs_used_retx_rx;
|
|
/// total rb used for a new uplink transmission
|
|
uint32_t total_rbs_used_rx;
|
|
/// normalized rx power
|
|
int32_t normalized_rx_power;
|
|
/// target rx power
|
|
int32_t target_rx_power;
|
|
|
|
/// num rx pdu
|
|
uint32_t num_pdu_rx[NB_RB_MAX];
|
|
/// num bytes rx
|
|
uint32_t num_bytes_rx[NB_RB_MAX];
|
|
/// instantaneous rx throughput for each TTI
|
|
// uint32_t tti_goodput[NB_RB_MAX];
|
|
/// errors
|
|
uint32_t num_errors_rx;
|
|
|
|
uint64_t overhead_bytes_rx;
|
|
/// headers+ CE + padding bytes for a MAC PDU
|
|
uint64_t total_overhead_bytes_rx;
|
|
/// headers+ CE + padding bytes for a MAC PDU
|
|
uint64_t avg_overhead_bytes_rx;
|
|
//
|
|
uint32_t ulsch_bitrate;
|
|
//total
|
|
uint32_t total_ulsch_bitrate;
|
|
/// overall
|
|
/// MAC pdu bytes
|
|
uint64_t pdu_bytes_rx;
|
|
/// total MAC pdu bytes
|
|
uint64_t total_pdu_bytes_rx;
|
|
/// total num pdu
|
|
uint32_t total_num_pdus_rx;
|
|
/// num of error pdus
|
|
uint32_t total_num_errors_rx;
|
|
// Number of error PDUS
|
|
uint32_t num_mac_sdu_rx;
|
|
// Length of SDU Got from LC UL - Size array can be refined
|
|
uint32_t sdu_length_rx[NB_RB_MAX];
|
|
|
|
} eNB_UE_STATS;
|
|
/*! \brief eNB template for UE context information */
|
|
typedef struct {
|
|
/// C-RNTI of UE
|
|
rnti_t rnti;
|
|
/// NDI from last scheduling
|
|
uint8_t oldNDI[8];
|
|
/// mcs1 from last scheduling
|
|
uint8_t oldmcs1[8];
|
|
/// mcs2 from last scheduling
|
|
uint8_t oldmcs2[8];
|
|
/// NDI from last UL scheduling
|
|
uint8_t oldNDI_UL[8];
|
|
/// mcs from last UL scheduling
|
|
uint8_t mcs_UL[8];
|
|
/// TBS from last UL scheduling
|
|
int TBS_UL[8];
|
|
/// Flag to indicate UL has been scheduled at least once
|
|
boolean_t ul_active;
|
|
/// Flag to indicate UE has been configured (ACK from RRCConnectionSetup received)
|
|
boolean_t configured;
|
|
|
|
/// MCS from last scheduling
|
|
uint8_t mcs[8];
|
|
|
|
/// TPC from last scheduling
|
|
uint8_t oldTPC[8];
|
|
|
|
// PHY interface info
|
|
|
|
/// Number of Allocated RBs for DL after scheduling (prior to frequency allocation)
|
|
uint16_t nb_rb[8]; // num_max_harq
|
|
|
|
/// Number of Allocated RBs for UL after scheduling
|
|
uint16_t nb_rb_ul[8]; // num_max_harq
|
|
|
|
/// Number of Allocated RBs for UL after scheduling
|
|
uint16_t first_rb_ul[8]; // num_max_harq
|
|
|
|
/// Cyclic shift for DMRS after scheduling
|
|
uint16_t cshift[8]; // num_max_harq
|
|
|
|
/// Number of Allocated RBs by the ulsch preprocessor
|
|
uint8_t pre_allocated_nb_rb_ul[MAX_NUM_SLICES];
|
|
|
|
/// index of Allocated RBs by the ulsch preprocessor
|
|
int8_t pre_allocated_rb_table_index_ul;
|
|
|
|
/// total allocated RBs
|
|
int8_t total_allocated_rbs;
|
|
|
|
/// pre-assigned MCS by the ulsch preprocessor
|
|
uint8_t pre_assigned_mcs_ul;
|
|
|
|
/// assigned MCS by the ulsch scheduler
|
|
uint8_t assigned_mcs_ul;
|
|
|
|
/// DL DAI
|
|
uint8_t DAI;
|
|
|
|
/// UL DAI
|
|
uint8_t DAI_ul[10];
|
|
|
|
/// UL Scheduling Request Received
|
|
uint8_t ul_SR;
|
|
|
|
///Resource Block indication for each sub-band in MU-MIMO
|
|
uint8_t rballoc_subband[8][50];
|
|
|
|
// Logical channel info for link with RLC
|
|
|
|
/// LCGID mapping
|
|
long lcgidmap[11];
|
|
|
|
/// phr information
|
|
int8_t phr_info;
|
|
|
|
/// phr information
|
|
int8_t phr_info_configured;
|
|
|
|
///dl buffer info
|
|
uint32_t dl_buffer_info[MAX_NUM_LCID];
|
|
/// total downlink buffer info
|
|
uint32_t dl_buffer_total;
|
|
/// total downlink pdus
|
|
uint32_t dl_pdus_total;
|
|
/// downlink pdus for each LCID
|
|
uint32_t dl_pdus_in_buffer[MAX_NUM_LCID];
|
|
/// creation time of the downlink buffer head for each LCID
|
|
uint32_t dl_buffer_head_sdu_creation_time[MAX_NUM_LCID];
|
|
/// maximum creation time of the downlink buffer head across all LCID
|
|
uint32_t dl_buffer_head_sdu_creation_time_max;
|
|
/// a flag indicating that the downlink head SDU is segmented
|
|
uint8_t dl_buffer_head_sdu_is_segmented[MAX_NUM_LCID];
|
|
/// size of remaining size to send for the downlink head SDU
|
|
uint32_t dl_buffer_head_sdu_remaining_size_to_send[MAX_NUM_LCID];
|
|
|
|
/// uplink buffer creation time for each LCID
|
|
uint32_t ul_buffer_creation_time[MAX_NUM_LCGID];
|
|
/// maximum uplink buffer creation time across all the LCIDs
|
|
uint32_t ul_buffer_creation_time_max;
|
|
/// uplink buffer size per LCID
|
|
uint32_t ul_buffer_info[MAX_NUM_LCGID];
|
|
|
|
/// uplink bytes that are currently scheduled
|
|
int scheduled_ul_bytes;
|
|
/// estimation of the UL buffer size
|
|
int estimated_ul_buffer;
|
|
|
|
/// UE tx power
|
|
int32_t ue_tx_power;
|
|
|
|
/// stores the frame where the last TPC was transmitted
|
|
uint32_t pusch_tpc_tx_frame;
|
|
uint32_t pusch_tpc_tx_subframe;
|
|
uint32_t pucch_tpc_tx_frame;
|
|
uint32_t pucch_tpc_tx_subframe;
|
|
|
|
#ifdef LOCALIZATION
|
|
eNB_UE_estimated_distances distance;
|
|
#endif
|
|
|
|
#ifdef Rel14
|
|
uint8_t rach_resource_type;
|
|
uint16_t mpdcch_repetition_cnt;
|
|
frame_t Msg2_frame;
|
|
#endif
|
|
sub_frame_t Msg2_subframe;
|
|
|
|
PhysicalConfigDedicated_t *physicalConfigDedicated;
|
|
|
|
} UE_TEMPLATE;
|
|
|
|
/*! \brief scheduling control information set through an API (not used)*/
|
|
typedef struct {
|
|
///UL transmission bandwidth in RBs
|
|
uint8_t ul_bandwidth[MAX_NUM_LCID];
|
|
///DL transmission bandwidth in RBs
|
|
uint8_t dl_bandwidth[MAX_NUM_LCID];
|
|
|
|
//To do GBR bearer
|
|
uint8_t min_ul_bandwidth[MAX_NUM_LCID];
|
|
|
|
uint8_t min_dl_bandwidth[MAX_NUM_LCID];
|
|
|
|
///aggregated bit rate of non-gbr bearer per UE
|
|
uint64_t ue_AggregatedMaximumBitrateDL;
|
|
///aggregated bit rate of non-gbr bearer per UE
|
|
uint64_t ue_AggregatedMaximumBitrateUL;
|
|
///CQI scheduling interval in subframes.
|
|
uint16_t cqiSchedInterval;
|
|
///Contention resolution timer used during random access
|
|
uint8_t mac_ContentionResolutionTimer;
|
|
|
|
uint16_t max_rbs_allowed_slice[MAX_NUM_CCs][MAX_NUM_SLICES];
|
|
uint16_t max_rbs_allowed_slice_uplink[MAX_NUM_CCs][MAX_NUM_SLICES];
|
|
|
|
uint8_t max_mcs[MAX_NUM_LCID];
|
|
|
|
uint16_t priority[MAX_NUM_LCID];
|
|
|
|
// resource scheduling information
|
|
|
|
/// Current DL harq round per harq_pid on each CC
|
|
uint8_t round[MAX_NUM_CCs][10];
|
|
/// Current Active TBs per harq_pid on each CC
|
|
uint8_t tbcnt[MAX_NUM_CCs][10];
|
|
/// Current UL harq round per harq_pid on each CC
|
|
uint8_t round_UL[MAX_NUM_CCs][8];
|
|
uint8_t dl_pow_off[MAX_NUM_CCs];
|
|
uint16_t pre_nb_available_rbs[MAX_NUM_CCs];
|
|
unsigned char rballoc_sub_UE[MAX_NUM_CCs][N_RBG_MAX];
|
|
uint16_t ta_timer;
|
|
int16_t ta_update;
|
|
uint16_t ul_consecutive_errors;
|
|
int32_t context_active_timer;
|
|
int32_t cqi_req_timer;
|
|
int32_t ul_inactivity_timer;
|
|
int32_t ul_failure_timer;
|
|
uint32_t ue_reestablishment_reject_timer;
|
|
uint32_t ue_reestablishment_reject_timer_thres;
|
|
int32_t ul_scheduled;
|
|
int32_t ra_pdcch_order_sent;
|
|
int32_t ul_out_of_sync;
|
|
int32_t phr_received;
|
|
uint8_t periodic_ri_received[NFAPI_CC_MAX];
|
|
uint8_t aperiodic_ri_received[NFAPI_CC_MAX];
|
|
uint8_t pucch1_cqi_update[NFAPI_CC_MAX];
|
|
uint8_t pucch1_snr[NFAPI_CC_MAX];
|
|
uint8_t pucch2_cqi_update[NFAPI_CC_MAX];
|
|
uint8_t pucch2_snr[NFAPI_CC_MAX];
|
|
uint8_t pucch3_cqi_update[NFAPI_CC_MAX];
|
|
uint8_t pucch3_snr[NFAPI_CC_MAX];
|
|
uint8_t pusch_snr[NFAPI_CC_MAX];
|
|
uint16_t feedback_cnt[NFAPI_CC_MAX];
|
|
uint16_t timing_advance;
|
|
uint16_t timing_advance_r9;
|
|
uint8_t periodic_wideband_cqi[NFAPI_CC_MAX];
|
|
uint8_t periodic_wideband_spatial_diffcqi[NFAPI_CC_MAX];
|
|
uint8_t periodic_wideband_pmi[NFAPI_CC_MAX];
|
|
uint8_t periodic_subband_cqi[NFAPI_CC_MAX][16];
|
|
uint8_t periodic_subband_spatial_diffcqi[NFAPI_CC_MAX][16];
|
|
uint8_t aperiodic_subband_cqi0[NFAPI_CC_MAX][25];
|
|
uint8_t aperiodic_subband_pmi[NFAPI_CC_MAX][25];
|
|
uint8_t aperiodic_subband_diffcqi0[NFAPI_CC_MAX][25];
|
|
uint8_t aperiodic_subband_cqi1[NFAPI_CC_MAX][25];
|
|
uint8_t aperiodic_subband_diffcqi1[NFAPI_CC_MAX][25];
|
|
uint8_t aperiodic_wideband_cqi0[NFAPI_CC_MAX];
|
|
uint8_t aperiodic_wideband_pmi[NFAPI_CC_MAX];
|
|
uint8_t aperiodic_wideband_cqi1[NFAPI_CC_MAX];
|
|
uint8_t aperiodic_wideband_pmi1[NFAPI_CC_MAX];
|
|
uint8_t dl_cqi[NFAPI_CC_MAX];
|
|
int32_t uplane_inactivity_timer;
|
|
} UE_sched_ctrl;
|
|
/*! \brief eNB template for the Random access information */
|
|
typedef struct {
|
|
/// Flag to indicate this process is active
|
|
RA_state state;
|
|
/// Subframe where preamble was received
|
|
uint8_t preamble_subframe;
|
|
/// Subframe where Msg2 is to be sent
|
|
uint8_t Msg2_subframe;
|
|
/// Frame where Msg2 is to be sent
|
|
frame_t Msg2_frame;
|
|
/// Subframe where Msg3 is to be sent
|
|
sub_frame_t Msg3_subframe;
|
|
/// Frame where Msg3 is to be sent
|
|
frame_t Msg3_frame;
|
|
/// Subframe where Msg4 is to be sent
|
|
sub_frame_t Msg4_subframe;
|
|
/// Frame where Msg4 is to be sent
|
|
frame_t Msg4_frame;
|
|
/// harq_pid used for Msg4 transmission
|
|
uint8_t harq_pid;
|
|
/// UE RNTI allocated during RAR
|
|
rnti_t rnti;
|
|
/// RA RNTI allocated from received PRACH
|
|
uint16_t RA_rnti;
|
|
/// Received preamble_index
|
|
uint8_t preamble_index;
|
|
/// Received UE Contention Resolution Identifier
|
|
uint8_t cont_res_id[6];
|
|
/// Timing offset indicated by PHY
|
|
int16_t timing_offset;
|
|
/// Timeout for RRC connection
|
|
int16_t RRC_timer;
|
|
/// Msg3 first RB
|
|
uint8_t msg3_first_rb;
|
|
/// Msg3 number of RB
|
|
uint8_t msg3_nb_rb;
|
|
/// Msg3 MCS
|
|
uint8_t msg3_mcs;
|
|
/// Msg3 TPC command
|
|
uint8_t msg3_TPC;
|
|
/// Msg3 ULdelay command
|
|
uint8_t msg3_ULdelay;
|
|
/// Msg3 cqireq command
|
|
uint8_t msg3_cqireq;
|
|
/// Round of Msg3 HARQ
|
|
uint8_t msg3_round;
|
|
/// TBS used for Msg4
|
|
int msg4_TBsize;
|
|
/// MCS used for Msg4
|
|
int msg4_mcs;
|
|
#ifdef Rel14
|
|
uint8_t rach_resource_type;
|
|
uint8_t msg2_mpdcch_repetition_cnt;
|
|
uint8_t msg4_mpdcch_repetition_cnt;
|
|
uint8_t msg2_narrowband;
|
|
uint8_t msg34_narrowband;
|
|
#endif
|
|
} RA_t;
|
|
|
|
|
|
/*! \brief subband bitmap confguration (for ALU icic algo purpose), in test phase */
|
|
typedef struct {
|
|
uint8_t sbmap[13]; //13 = number of SB MAX for 100 PRB
|
|
uint8_t periodicity;
|
|
uint8_t first_subframe;
|
|
uint8_t sb_size;
|
|
uint8_t nb_active_sb;
|
|
} SBMAP_CONF;
|
|
/*! \brief UE list used by eNB to order UEs/CC for scheduling*/
|
|
typedef struct {
|
|
/// Dedicated information for UEs
|
|
struct PhysicalConfigDedicated
|
|
*physicalConfigDedicated[MAX_NUM_CCs][NUMBER_OF_UE_MAX];
|
|
/// DLSCH pdu
|
|
DLSCH_PDU DLSCH_pdu[MAX_NUM_CCs][2][NUMBER_OF_UE_MAX];
|
|
/// DCI template and MAC connection parameters for UEs
|
|
UE_TEMPLATE UE_template[MAX_NUM_CCs][NUMBER_OF_UE_MAX];
|
|
/// DCI template and MAC connection for RA processes
|
|
int pCC_id[NUMBER_OF_UE_MAX];
|
|
/// sorted downlink component carrier for the scheduler
|
|
int ordered_CCids[MAX_NUM_CCs][NUMBER_OF_UE_MAX];
|
|
/// number of downlink active component carrier
|
|
int numactiveCCs[NUMBER_OF_UE_MAX];
|
|
/// sorted uplink component carrier for the scheduler
|
|
int ordered_ULCCids[MAX_NUM_CCs][NUMBER_OF_UE_MAX];
|
|
/// number of uplink active component carrier
|
|
int numactiveULCCs[NUMBER_OF_UE_MAX];
|
|
/// number of downlink active component carrier
|
|
uint8_t dl_CC_bitmap[NUMBER_OF_UE_MAX];
|
|
/// eNB to UE statistics
|
|
eNB_UE_STATS eNB_UE_stats[MAX_NUM_CCs][NUMBER_OF_UE_MAX];
|
|
/// scheduling control info
|
|
UE_sched_ctrl UE_sched_ctrl[NUMBER_OF_UE_MAX];
|
|
int next[NUMBER_OF_UE_MAX];
|
|
int head;
|
|
int next_ul[NUMBER_OF_UE_MAX];
|
|
int head_ul;
|
|
int avail;
|
|
int num_UEs;
|
|
boolean_t active[NUMBER_OF_UE_MAX];
|
|
|
|
/// Sorting criteria for the UE list in the MAC preprocessor
|
|
uint16_t sorting_criteria[MAX_NUM_SLICES][CR_NUM];
|
|
|
|
} UE_list_t;
|
|
|
|
/*! \brief eNB common channels */
|
|
typedef struct {
|
|
int physCellId;
|
|
int p_eNB;
|
|
int Ncp;
|
|
int eutra_band;
|
|
uint32_t dl_CarrierFreq;
|
|
BCCH_BCH_Message_t *mib;
|
|
RadioResourceConfigCommonSIB_t *radioResourceConfigCommon;
|
|
#ifdef Rel14
|
|
RadioResourceConfigCommonSIB_t *radioResourceConfigCommon_BR;
|
|
#endif
|
|
TDD_Config_t *tdd_Config;
|
|
SchedulingInfoList_t *schedulingInfoList;
|
|
ARFCN_ValueEUTRA_t ul_CarrierFreq;
|
|
long ul_Bandwidth;
|
|
/// Outgoing MIB PDU for PHY
|
|
MIB_PDU MIB_pdu;
|
|
/// Outgoing BCCH pdu for PHY
|
|
BCCH_PDU BCCH_pdu;
|
|
/// Outgoing BCCH DCI allocation
|
|
uint32_t BCCH_alloc_pdu;
|
|
/// Outgoing CCCH pdu for PHY
|
|
CCCH_PDU CCCH_pdu;
|
|
/// Outgoing PCCH DCI allocation
|
|
uint32_t PCCH_alloc_pdu;
|
|
/// Outgoing PCCH pdu for PHY
|
|
PCCH_PDU PCCH_pdu;
|
|
/// Outgoing RAR pdu for PHY
|
|
RAR_PDU RAR_pdu;
|
|
/// Template for RA computations
|
|
RA_t ra[NB_RA_PROC_MAX];
|
|
/// VRB map for common channels
|
|
uint8_t vrb_map[100];
|
|
/// VRB map for common channels and retransmissions by PHICH
|
|
uint8_t vrb_map_UL[100];
|
|
/// MBSFN SubframeConfig
|
|
struct MBSFN_SubframeConfig *mbsfn_SubframeConfig[8];
|
|
/// number of subframe allocation pattern available for MBSFN sync area
|
|
uint8_t num_sf_allocation_pattern;
|
|
#if defined(Rel10) || defined(Rel14)
|
|
/// MBMS Flag
|
|
uint8_t MBMS_flag;
|
|
/// Outgoing MCCH pdu for PHY
|
|
MCCH_PDU MCCH_pdu;
|
|
/// MCCH active flag
|
|
uint8_t msi_active;
|
|
/// MCCH active flag
|
|
uint8_t mcch_active;
|
|
/// MTCH active flag
|
|
uint8_t mtch_active;
|
|
/// number of active MBSFN area
|
|
uint8_t num_active_mbsfn_area;
|
|
/// MBSFN Area Info
|
|
struct MBSFN_AreaInfo_r9 *mbsfn_AreaInfo[MAX_MBSFN_AREA];
|
|
/// PMCH Config
|
|
struct PMCH_Config_r9 *pmch_Config[MAX_PMCH_perMBSFN];
|
|
/// MBMS session info list
|
|
struct MBMS_SessionInfoList_r9 *mbms_SessionList[MAX_PMCH_perMBSFN];
|
|
/// Outgoing MCH pdu for PHY
|
|
MCH_PDU MCH_pdu;
|
|
#endif
|
|
#ifdef Rel14
|
|
/// Rel13 parameters from SIB1
|
|
SystemInformationBlockType1_v1310_IEs_t *sib1_v13ext;
|
|
/// Counter for SIB1-BR scheduling
|
|
int SIB1_BR_cnt;
|
|
/// Outgoing BCCH-BR pdu for PHY
|
|
BCCH_PDU BCCH_BR_pdu[20];
|
|
#endif
|
|
} COMMON_channels_t;
|
|
/*! \brief top level eNB MAC structure */
|
|
typedef struct eNB_MAC_INST_s {
|
|
/// Ethernet parameters for northbound midhaul interface
|
|
eth_params_t eth_params_n;
|
|
/// Ethernet parameters for fronthaul interface
|
|
eth_params_t eth_params_s;
|
|
///
|
|
module_id_t Mod_id;
|
|
/// frame counter
|
|
frame_t frame;
|
|
/// subframe counter
|
|
sub_frame_t subframe;
|
|
/// Pointer to IF module instance for PHY
|
|
IF_Module_t *if_inst;
|
|
/// Common cell resources
|
|
COMMON_channels_t common_channels[MAX_NUM_CCs];
|
|
/// current PDU index (BCH,MCH,DLSCH)
|
|
uint16_t pdu_index[MAX_NUM_CCs];
|
|
/// flag to enable phy-test (disables the scheduler)
|
|
uint16_t phy_test;
|
|
|
|
/// NFAPI Config Request Structure
|
|
nfapi_config_request_t config[MAX_NUM_CCs];
|
|
/// Preallocated DL pdu list
|
|
nfapi_dl_config_request_pdu_t
|
|
dl_config_pdu_list[MAX_NUM_CCs][MAX_NUM_DL_PDU];
|
|
/// NFAPI DL Config Request Structure
|
|
nfapi_dl_config_request_t DL_req[MAX_NUM_CCs];
|
|
/// Preallocated UL pdu list
|
|
nfapi_ul_config_request_pdu_t
|
|
ul_config_pdu_list[MAX_NUM_CCs][MAX_NUM_UL_PDU];
|
|
/// Preallocated UL pdu list for ULSCH (n+k delay)
|
|
nfapi_ul_config_request_pdu_t
|
|
ul_config_pdu_list_tmp[MAX_NUM_CCs][10][MAX_NUM_UL_PDU];
|
|
/// NFAPI UL Config Request Structure, send to L1 4 subframes before processing takes place
|
|
nfapi_ul_config_request_t UL_req[MAX_NUM_CCs];
|
|
/// NFAPI "Temporary" UL Config Request Structure, holds future UL_config requests
|
|
nfapi_ul_config_request_t UL_req_tmp[MAX_NUM_CCs][10];
|
|
/// Preallocated HI_DCI0 pdu list
|
|
nfapi_hi_dci0_request_pdu_t
|
|
hi_dci0_pdu_list[MAX_NUM_CCs][MAX_NUM_HI_DCI0_PDU];
|
|
/// NFAPI HI/DCI0 Config Request Structure
|
|
nfapi_hi_dci0_request_t HI_DCI0_req[MAX_NUM_CCs];
|
|
/// Prealocated TX pdu list
|
|
nfapi_tx_request_pdu_t
|
|
tx_request_pdu[MAX_NUM_CCs][MAX_NUM_TX_REQUEST_PDU];
|
|
/// NFAPI DL PDU structure
|
|
nfapi_tx_request_t TX_req[MAX_NUM_CCs];
|
|
/// UL handle
|
|
uint32_t ul_handle;
|
|
UE_list_t UE_list;
|
|
|
|
///subband bitmap configuration
|
|
SBMAP_CONF sbmap_conf;
|
|
/// CCE table used to build DCI scheduling information
|
|
int CCE_table[MAX_NUM_CCs][800];
|
|
/// active flag for Other lcid
|
|
uint8_t lcid_active[NB_RB_MAX];
|
|
/// eNB stats
|
|
eNB_STATS eNB_stats[MAX_NUM_CCs];
|
|
// MAC function execution peformance profiler
|
|
/// processing time of eNB scheduler
|
|
time_stats_t eNB_scheduler;
|
|
/// processing time of eNB scheduler for SI
|
|
time_stats_t schedule_si;
|
|
/// processing time of eNB scheduler for Random access
|
|
time_stats_t schedule_ra;
|
|
/// processing time of eNB ULSCH scheduler
|
|
time_stats_t schedule_ulsch;
|
|
/// processing time of eNB DCI generation
|
|
time_stats_t fill_DLSCH_dci;
|
|
/// processing time of eNB MAC preprocessor
|
|
time_stats_t schedule_dlsch_preprocessor;
|
|
/// processing time of eNB DLSCH scheduler
|
|
time_stats_t schedule_dlsch; // include rlc_data_req + MAC header + preprocessor
|
|
/// processing time of eNB MCH scheduler
|
|
time_stats_t schedule_mch;
|
|
/// processing time of eNB ULSCH reception
|
|
time_stats_t rx_ulsch_sdu; // include rlc_data_ind
|
|
/// processing time of eNB PCH scheduler
|
|
time_stats_t schedule_pch;
|
|
} eNB_MAC_INST;
|
|
|
|
/*
|
|
* UE part
|
|
*/
|
|
|
|
typedef enum {
|
|
TYPE0,
|
|
TYPE1,
|
|
TYPE1A,
|
|
TYPE2,
|
|
TYPE2A,
|
|
TYPEUESPEC
|
|
} MPDCCH_TYPES_t;
|
|
|
|
/*!\brief UE layer 2 status */
|
|
typedef enum {
|
|
CONNECTION_OK = 0,
|
|
CONNECTION_LOST,
|
|
PHY_RESYNCH,
|
|
PHY_HO_PRACH
|
|
} UE_L2_STATE_t;
|
|
|
|
/*!\brief UE scheduling info */
|
|
typedef struct {
|
|
/// buffer status for each lcgid
|
|
uint8_t BSR[MAX_NUM_LCGID]; // should be more for mesh topology
|
|
/// keep the number of bytes in rlc buffer for each lcgid
|
|
int32_t BSR_bytes[MAX_NUM_LCGID];
|
|
/// after multiplexing buffer remain for each lcid
|
|
int32_t LCID_buffer_remain[MAX_NUM_LCID];
|
|
/// sum of all lcid buffer size
|
|
uint16_t All_lcid_buffer_size_lastTTI;
|
|
/// buffer status for each lcid
|
|
uint8_t LCID_status[MAX_NUM_LCID];
|
|
/// SR pending as defined in 36.321
|
|
uint8_t SR_pending;
|
|
/// SR_COUNTER as defined in 36.321
|
|
uint16_t SR_COUNTER;
|
|
/// logical channel group ide for each LCID
|
|
uint8_t LCGID[MAX_NUM_LCID];
|
|
/// retxBSR-Timer, default value is sf2560
|
|
uint16_t retxBSR_Timer;
|
|
/// retxBSR_SF, number of subframe before triggering a regular BSR
|
|
uint16_t retxBSR_SF;
|
|
/// periodicBSR-Timer, default to infinity
|
|
uint16_t periodicBSR_Timer;
|
|
/// periodicBSR_SF, number of subframe before triggering a periodic BSR
|
|
uint16_t periodicBSR_SF;
|
|
/// default value is 0: not configured
|
|
uint16_t sr_ProhibitTimer;
|
|
/// sr ProhibitTime running
|
|
uint8_t sr_ProhibitTimer_Running;
|
|
/// default value to n5
|
|
uint16_t maxHARQ_Tx;
|
|
/// default value is false
|
|
uint16_t ttiBundling;
|
|
/// default value is release
|
|
struct DRX_Config *drx_config;
|
|
/// default value is release
|
|
struct MAC_MainConfig__phr_Config *phr_config;
|
|
///timer before triggering a periodic PHR
|
|
uint16_t periodicPHR_Timer;
|
|
///timer before triggering a prohibit PHR
|
|
uint16_t prohibitPHR_Timer;
|
|
///DL Pathloss change value
|
|
uint16_t PathlossChange;
|
|
///number of subframe before triggering a periodic PHR
|
|
int16_t periodicPHR_SF;
|
|
///number of subframe before triggering a prohibit PHR
|
|
int16_t prohibitPHR_SF;
|
|
///DL Pathloss Change in db
|
|
uint16_t PathlossChange_db;
|
|
|
|
/// default value is false
|
|
uint16_t extendedBSR_Sizes_r10;
|
|
/// default value is false
|
|
uint16_t extendedPHR_r10;
|
|
|
|
//Bj bucket usage per lcid
|
|
int16_t Bj[MAX_NUM_LCID];
|
|
// Bucket size per lcid
|
|
int16_t bucket_size[MAX_NUM_LCID];
|
|
} UE_SCHEDULING_INFO;
|
|
/*!\brief Top level UE MAC structure */
|
|
typedef struct {
|
|
uint16_t Node_id;
|
|
/// RX frame counter
|
|
frame_t rxFrame;
|
|
/// RX subframe counter
|
|
sub_frame_t rxSubframe;
|
|
/// TX frame counter
|
|
frame_t txFrame;
|
|
/// TX subframe counter
|
|
sub_frame_t txSubframe;
|
|
/// C-RNTI of UE
|
|
uint16_t crnti;
|
|
/// C-RNTI of UE before HO
|
|
rnti_t crnti_before_ho; ///user id (rnti) of connected UEs
|
|
/// uplink active flag
|
|
uint8_t ul_active;
|
|
/// pointer to RRC PHY configuration
|
|
RadioResourceConfigCommonSIB_t *radioResourceConfigCommon;
|
|
/// pointer to RACH_ConfigDedicated (NULL when not active, i.e. upon HO completion or T304 expiry)
|
|
struct RACH_ConfigDedicated *rach_ConfigDedicated;
|
|
/// pointer to RRC PHY configuration
|
|
struct PhysicalConfigDedicated *physicalConfigDedicated;
|
|
#if defined(Rel10) || defined(Rel14)
|
|
/// pointer to RRC PHY configuration SCEll
|
|
struct PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10;
|
|
/// Preconfiguration for Sidelink
|
|
struct SL_Preconfiguration_r12 *SL_Preconfiguration;
|
|
/// RX Pool for Sidelink from SIB18
|
|
SL_CommRxPoolList_r12_t commRxPool_r12;
|
|
/// TX Pool Normal for Sidelink from SIB18
|
|
struct SL_CommTxPoolList_r12 *commTxPoolNormalCommon_r12;
|
|
/// TX Pool Exceptional for Sidelink from SIB18
|
|
struct SL_CommTxPoolList_r12 *commTxPoolExceptional_r12;
|
|
/// Common Sync Config for Sidelink from SIB18
|
|
struct SL_SyncConfigList_r12 *commSyncConfig_r12;
|
|
/// Dedicated Sync TX control for Sidelink
|
|
struct SL_SyncTxControl_r12 *sl_SyncTxControl_r12;
|
|
/// Dedicated Discovery TX control for Sidelink
|
|
struct SL_DiscConfig_r12 *sl_DiscConfig_r12;
|
|
/// Dedicated TX config for Sidelink
|
|
struct SL_CommConfig_r12 *sl_CommConfig_r12;
|
|
//SL sourceL2ID
|
|
uint32_t sourceL2Id;
|
|
//SL groupL2Id
|
|
uint32_t groupL2Id;
|
|
//SL destinationL2Id
|
|
uint32_t destinationL2Id;
|
|
//List of destinations
|
|
uint32_t destinationList[MAX_NUM_DEST];
|
|
uint8_t numCommFlows;
|
|
uint32_t SL_LCID[MAX_NUM_LCID];
|
|
|
|
#endif
|
|
/// pointer to TDD Configuration (NULL for FDD)
|
|
TDD_Config_t *tdd_Config;
|
|
/// Number of adjacent cells to measure
|
|
uint8_t n_adj_cells;
|
|
/// Array of adjacent physical cell ids
|
|
uint32_t adj_cell_id[6];
|
|
/// Pointer to RRC MAC configuration
|
|
MAC_MainConfig_t *macConfig;
|
|
/// Pointer to RRC Measurement gap configuration
|
|
MeasGapConfig_t *measGapConfig;
|
|
/// Pointers to LogicalChannelConfig indexed by LogicalChannelIdentity. Note NULL means LCHAN is inactive.
|
|
LogicalChannelConfig_t *logicalChannelConfig[MAX_NUM_LCID];
|
|
|
|
/// Scheduling Information
|
|
UE_SCHEDULING_INFO scheduling_info;
|
|
/// Outgoing CCCH pdu for PHY
|
|
CCCH_PDU CCCH_pdu;
|
|
/// Outgoing RAR pdu for PHY
|
|
RAR_PDU RAR_pdu;
|
|
/// Incoming DLSCH pdu for PHY
|
|
DLSCH_PDU DLSCH_pdu[NUMBER_OF_UE_MAX][2];
|
|
#ifdef Rel14
|
|
int sltx_active;
|
|
SLSCH_t slsch;
|
|
SLDCH_t sldch;
|
|
ULSCH_PDU slsch_pdu;
|
|
int slsch_lcid;
|
|
#endif
|
|
/// number of attempt for rach
|
|
uint8_t RA_attempt_number;
|
|
/// Random-access procedure flag
|
|
uint8_t RA_active;
|
|
/// Random-access window counter
|
|
int8_t RA_window_cnt;
|
|
/// Random-access Msg3 size in bytes
|
|
uint8_t RA_Msg3_size;
|
|
/// Random-access prachMaskIndex
|
|
uint8_t RA_prachMaskIndex;
|
|
/// Flag indicating Preamble set (A,B) used for first Msg3 transmission
|
|
uint8_t RA_usedGroupA;
|
|
/// Random-access Resources
|
|
PRACH_RESOURCES_t RA_prach_resources;
|
|
/// Random-access PREAMBLE_TRANSMISSION_COUNTER
|
|
uint8_t RA_PREAMBLE_TRANSMISSION_COUNTER;
|
|
/// Random-access backoff counter
|
|
int16_t RA_backoff_cnt;
|
|
/// Random-access variable for window calculation (frame of last change in window counter)
|
|
uint32_t RA_tx_frame;
|
|
/// Random-access variable for window calculation (subframe of last change in window counter)
|
|
uint8_t RA_tx_subframe;
|
|
/// Random-access Group B maximum path-loss
|
|
/// Random-access variable for backoff (frame of last change in backoff counter)
|
|
uint32_t RA_backoff_frame;
|
|
/// Random-access variable for backoff (subframe of last change in backoff counter)
|
|
uint8_t RA_backoff_subframe;
|
|
/// Random-access Group B maximum path-loss
|
|
uint16_t RA_maxPL;
|
|
/// Random-access Contention Resolution Timer active flag
|
|
uint8_t RA_contention_resolution_timer_active;
|
|
/// Random-access Contention Resolution Timer count value
|
|
uint8_t RA_contention_resolution_cnt;
|
|
/// power headroom reporitng reconfigured
|
|
uint8_t PHR_reconfigured;
|
|
/// power headroom state as configured by the higher layers
|
|
uint8_t PHR_state;
|
|
/// power backoff due to power management (as allowed by P-MPRc) for this cell
|
|
uint8_t PHR_reporting_active;
|
|
/// power backoff due to power management (as allowed by P-MPRc) for this cell
|
|
uint8_t power_backoff_db[NUMBER_OF_eNB_MAX];
|
|
/// BSR report falg management
|
|
uint8_t BSR_reporting_active;
|
|
/// retxBSR-Timer expires flag
|
|
uint8_t retxBSRTimer_expires_flag;
|
|
/// periodBSR-Timer expires flag
|
|
uint8_t periodBSRTimer_expires_flag;
|
|
|
|
/// MBSFN_Subframe Configuration
|
|
struct MBSFN_SubframeConfig *mbsfn_SubframeConfig[8]; // FIXME replace 8 by MAX_MBSFN_AREA?
|
|
/// number of subframe allocation pattern available for MBSFN sync area
|
|
uint8_t num_sf_allocation_pattern;
|
|
#if defined(Rel10) || defined(Rel14)
|
|
/// number of active MBSFN area
|
|
uint8_t num_active_mbsfn_area;
|
|
/// MBSFN Area Info
|
|
struct MBSFN_AreaInfo_r9 *mbsfn_AreaInfo[MAX_MBSFN_AREA];
|
|
/// PMCH Config
|
|
struct PMCH_Config_r9 *pmch_Config[MAX_PMCH_perMBSFN];
|
|
/// MCCH status
|
|
uint8_t mcch_status;
|
|
/// MSI status
|
|
uint8_t msi_status; // could be an array if there are >1 MCH in one MBSFN area
|
|
#endif
|
|
//#ifdef CBA
|
|
/// CBA RNTI for each group
|
|
uint16_t cba_rnti[NUM_MAX_CBA_GROUP];
|
|
/// last SFN for CBA channel access
|
|
uint8_t cba_last_access[NUM_MAX_CBA_GROUP];
|
|
//#endif
|
|
/// total UE scheduler processing time
|
|
time_stats_t ue_scheduler; // total
|
|
/// UE ULSCH tx processing time inlcuding RLC interface (rlc_data_req) and mac header generation
|
|
time_stats_t tx_ulsch_sdu;
|
|
/// UE DLSCH rx processing time inlcuding RLC interface (mac_rrc_data_ind or mac_rlc_status_ind+mac_rlc_data_ind) and mac header parser
|
|
time_stats_t rx_dlsch_sdu ;
|
|
/// UE query for MCH subframe processing time
|
|
time_stats_t ue_query_mch;
|
|
/// UE MCH rx processing time
|
|
time_stats_t rx_mch_sdu;
|
|
/// UE BCCH rx processing time including RLC interface (mac_rrc_data_ind)
|
|
time_stats_t rx_si;
|
|
/// UE PCCH rx processing time including RLC interface (mac_rrc_data_ind)
|
|
time_stats_t rx_p;
|
|
/// Panos: Mutex for nfapi UL_INFO
|
|
pthread_mutex_t UL_INFO_mutex;
|
|
/// Panos: UE_Mode variable should be used in the case of Phy_stub operation since we won't have access to PHY_VARS_UE
|
|
/// where the UE_mode originally is for the full stack operation mode. The transitions between the states of the UE_Mode
|
|
/// will be triggered within phy_stub_ue.c in this case
|
|
UE_MODE_t UE_mode[NUMBER_OF_CONNECTED_eNB_MAX];
|
|
/// Panos: Phy_stub mode: Boolean variable to distinguish whether a Msg3 or a regular ULSCH data pdu should be generated
|
|
/// after the reception of NFAPI_UL_CONFIG_ULSCH_PDU_TYPE.
|
|
uint8_t first_ULSCH_Tx;
|
|
uint8_t SI_Decoded;
|
|
int ra_frame; // This variable keeps the frame in which the RA started for the specific UE. It is used in order
|
|
// to make sure that different UEs RA starts within a number of frames difference.
|
|
|
|
eth_params_t eth_params_n;
|
|
|
|
} UE_MAC_INST;
|
|
/*! \brief ID of the neighboring cells used for HO*/
|
|
typedef struct {
|
|
uint16_t cell_ids[6];
|
|
uint8_t n_adj_cells;
|
|
} neigh_cell_id_t;
|
|
|
|
|
|
|
|
#include "proto.h"
|
|
/*@}*/
|
|
#endif /*__LAYER2_MAC_DEFS_H__ */
|