Skip to content

Commit

Permalink
Add something about lte_softmodem on version 0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
joary committed Jul 11, 2017
1 parent b9641fc commit 827f895
Show file tree
Hide file tree
Showing 2 changed files with 107 additions and 25 deletions.
80 changes: 79 additions & 1 deletion v0.6/lte_softmodem.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,81 @@

For the OAI eNodeB application, the file where main function is placed is {{lte-softmodem.c=/targets/RT/USER/lte-softmodem.c:1363}}.
This function just initalize the process, parsing the command line options, creating the data-structures, filling the configurations and starting the threads.
It is possible to make a list of the things it does:

1. Parse the command line options
2. Create the data-structures
1. Initialize the logging system(s)
3. Fill the configurations
1. Configure the eNodeB parameters
2. Configure eNodeB interfaces with RF (or fronthaul) and MAC
4. Start the thread(s).

## Interfaces (MAC and RF/Fronthaul)

In the startup configuration it is possible to find two points where the interface
functions are configured:

- l2_init(): configures the interface between eNodeB and MAC as shown {{l2_init=/openair2/LAYER2/MAC/main.c:435}}
- init_eNB():


Two really important functions are init_eNB() and l2_init().

Functions configured on init_eNB()


| Function | Description | Who Calls |
==========================================================================
| eNB->do_prach | do_prach; | |
| eNB->fep | eNB_fep_full; | |
| eNB->td | ulsch_decoding_data; | |
| eNB->te | dlsch_encoding; | |
| eNB->proc_uespec_rx | phy_procedures_eNB_uespec_RX; | |
| eNB->proc_tx | proc_tx_full; | rxtx (eNB_thread_rxtx, eNB_thread_single) |
| eNB->tx_fh | NULL; | tx_proc_full, tx_proc_high |
| eNB->rx_fh | rx_rf; | eNB_thread_fh, eNB_thread_single |
| eNB->start_rf | start_rf; | |
| eNB->start_if | NULL; | |
| eNB->fh_asynch | NULL; | eNB_thread_asynch_rxtx |
| eNB->rfdevice.host_type | BBU_HOST; | |
| eNB->ifdevice.host_type | BBU_HOST; | |


# eNodeB Start

The init_eNB_proc starts some threads, wich can be listed:

* eNB_thread_prach
* Always created
* Functions called:
* prach_procedures:
* eNB_thread_synch
* Always created
* Functions called:
* Runs initial synchronization like UE
* eNB_thread_single
* Called when the setup process uses single thread (default):
* Functions called:
* start_rf, start_if at the before the loop
* Check if the eNodeB is slave (???)
* On the main loop:
* rx_fh()
* wakeup_slaves()
* rxtx()
* eNB_thread_rxtx
* There are two threads of this type per Component Carrier (CC), one process the even subframes the other process the odd.
* This thread receives the subframe **N** and sends the subframe **N+4**
* Internaly this thread calls:
* eNB->do_prach
* phy_procedures_eNB_common_RX
* proc_uespec_rx
* proc_tx
* eNB_thread_FH
* Actually get the samples from fronthaul, it calls:
- rx_fh
- trx_write_func
- trx_read_func
- wakeup_slaves
- wakeup_rxtx
* eNB_thread_asynch_rxtx
* Started when the functino split is IF5 or IF4p5 and node timing is synch_to_other
52 changes: 28 additions & 24 deletions v0.6/lte_softmodem.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,30 +10,32 @@ main():
Initialize frame parameters

### Now the function will initilize several logging systems
logInit() =>
Initilize logging
get_options() =>
Get comand line opetions
T_init() =>
set_glog =>
set_taus_seed() =>
itti_init() =>

### Now the function will initilize several parameters
init_ul_hoping =>
Initilize system for ul hoping
init_frame_parameters =>
Initialize more frame parameters
phy_init_lte_top =>
Initiliaze tables and signals for PHY: viterby, trelis, scranble, reference signals ...
For each component carrier:
init_lte_eNB =>
Allocate and initilize resources for eNB
compute_prach_seq =>
Conpute the zadoff-chu sequence based on previous parameters
the sequence is hold in Xu vector
fill_modeled_runtime_table =>
Pre calculate a model of the amount of time used on tx and rx
logInit() =>
Initilize logging
get_options() =>
Get comand line opetions
T_init() =>
set_glog =>
set_taus_seed() =>
itti_init() =>

### Now the system

init_ul_hoping =>
Initilize system for ul hoping
init_frame_parameters =>
Initialize more frame parameters
phy_init_lte_top =>
Initiliaze tables and signals for PHY: viterby, trelis, scranble, reference signals ...
For each component carrier:
init_lte_eNB =>
Allocate and initilize resources for eNB
compute_prach_seq =>
Conpute the zadoff-chu sequence based onprevious parameters
the sequence is hold in Xu vector
fill_modeled_runtime_table =>
Pre calculate a model of the amount of time used on tx and rx

dump_frame_parms =>
Show the configured parameters on the stdout
Expand All @@ -47,8 +49,10 @@ main():
Initilize functions to interface between l1 and l2
the list of functions is big, see it in: openair2/LAYER2/MAC/main.c:435=l2_init

### Initialize the eNodeB

init_eNB =>
Hear the eNodeB is configured and started
Here the eNodeB is configured and started
this function calls init_eNB_proc that will create the threads and mutexes
The threads created are:
eNB_thread_rxtx
Expand Down

0 comments on commit 827f895

Please sign in to comment.