Transport Channel Procedures
[Physical Layer Reference Implementation]


Detailed Description

This section deals with the physical layer procedures for all transport channels and pilot channels, namely


Data Structures

struct  CHSCH_data
 CHSCH Variables. More...
struct  SCH_data
 SCH Variables. More...
struct  Transport_data
 Transport Data structure. More...
struct  Macphy_data_req_table_entry
 An entry in the MACPHY_DATA_REQ Table. More...
typedef Macphy_data_req_table_entry MACPHY_DATA_REQ_TABLE_ENTRY
 An entry in the MACPHY_DATA_REQ Table.

Functions

void create_times4_sync_symbol (unsigned char n)
 Initialize a 4 times oversampled version of a CHSCH in the frequency-domain. This is used for initial timing acquisition by a UE/MR.
void phy_chsch_init (unsigned char n, unsigned char nb_antennas_tx)
 This routine initializes the variables for a CHSCH.
void phy_chsch_init_rt_part (unsigned char n)
 This routine initializes the part of the CHSCH requiring processing that is only possible from a real-time context (SSE/MMX).
void phy_sch_init_rt_part (unsigned char n)
 This routine initializes the part of the SCH requiring processing that is only possible from a real-time context (SSE/MMX).
void phy_generate_chbch_top (unsigned char chbch_ind)
 This routine implements the MAC interface for the CHBCH on transmission.
unsigned char phy_generate_chbch (unsigned char chsch_ind, unsigned char extension_switch, unsigned char nb_antennas_tx, unsigned char *chbch_pdu)
 This routine generates the CHBCH.
void phy_decode_chbch_top (void)
int phy_decode_chbch (unsigned char chbch_ind, unsigned char nb_antennas_rx, unsigned char nb_antennas_tx, unsigned char *chbch_mac_pdu, unsigned int chbch_pdu_length_bytes)
 This routine decodes the CHBCH.
void phy_decode_chbch_2streams (unsigned char chbch_ind[2], int mode, unsigned char nb_antennas_rx, unsigned char nb_antennas_tx, unsigned char *chbch_mac_pdu[2], int ret[2], unsigned int chbch_pdu_length_bytes)
 This routine decodes two CHBCHs comming from two different CHs using either MMSE receiver or SIC.
void phy_decode_chbch_2streams_ml (unsigned char chbch_ind[2], int mode, unsigned char nb_antennas_rx, unsigned char nb_antennas_tx, unsigned char *chbch_mac_pdu[2], int ret[2], unsigned int chbch_pdu_length_bytes)
 This routine decodes two CHBCHs comming from two different CHs using a non-linear BICM-MIMO LLR-based receiver.
int phy_chbch_phase_comp (struct complex16 *Rchsch, struct complex16 *Rsymb, int chbch_ind, int nb_antennas_tx, struct complex16 *perror, unsigned char do_rotate)
void phy_generate_mrbch_top (unsigned char sch_index)
 This routine implements the MAC interface for the MRBCH on transmission.
unsigned char phy_generate_mrbch (unsigned char sch_index, unsigned char extension_switch, unsigned char nb_antennas_tx, unsigned char *mrbch_pdu)
 This routine generates the MRBCH for an MR.
int phy_chbch_pilot_init (unsigned char chbch_index, unsigned char nb_antennas_tx)
 This routine initializes PHY_vars->chbch_data[chbch_index].pilot indices and PHY_vars->chbch_data[chbch_index].pilots based on PHY_config->PHY_chbch[chbch_index].Npilot and the pilot symbols. How many pilots do we put per NUMBER_OF_USEFUL_CARRIERS/NUMBER_OF_FREQUENCY_GROUPS scubcarriers. At which position do we put them. Where are those parameteres configured.
void phy_decode_mrbch_top (unsigned char sch_index)
 This routine implements the MAC interface for the MRBCH on reception at CH.
int phy_decode_mrbch (unsigned char sch_index, unsigned char nb_antennas_tx, unsigned char nb_antennas_rx, unsigned char *mrbch_mac_pdu, unsigned int mrbch_pdu_length_bytes)
 This routine implements the MAC interface for the MRBCH on reception at CH.
unsigned char phy_generate_sch (unsigned int stream_index, unsigned int sch_index, unsigned int symbol, unsigned short freq_alloc, unsigned char extension, unsigned char nb_antennas_tx)
 This routine implements the generation of the sch for UE/MR.
void phy_generate_sach_top (unsigned char last_slot, int time_in)
 This routine implements the MAC interface for sach/sacch for UE/MR/CH.
void phy_generate_sach1 (unsigned char ch_index, unsigned int sacch_flag, unsigned char sch_type, unsigned char sch_index, unsigned char *sach_pdu, unsigned char *sacch_pdu, unsigned char time_alloc, unsigned short freq_alloc, unsigned char coding_fmt, unsigned char nb_antennas_tx, unsigned short tb_size_bytes, unsigned int Active_process_map, unsigned int New_process_map, unsigned char first_sach_flag, unsigned char total_groups)
 This routine implements generation of signals for sach/sacch in UE/MR/CH with respect to coding/interleaving/modulation.
unsigned char phy_generate_sach2 (unsigned char extension_switch, unsigned char first_symbol, unsigned char number_of_symbols, unsigned char nb_antennas_tx)
 This routine implements generation of signals for sach/sacch in UE/MR/CH with respect to OFDM (IDFT) and cyclic extension.
int phy_decode_sach_top (unsigned char last_slot)
 This routine implements the generation of signals for sach/sacch in UE/MR/CH with respect to OFDM (IDFT) and cyclic extension.
void phy_decode_sach_common (int first_symbol, int number_of_symbols, unsigned char nb_antennas_rx, unsigned int sach_index)
 This routine implements the frequency-transform portion of SACH detection.
int phy_decode_sach (int sacch_flag, unsigned int first_sach_flag, PHY_RESOURCES *Phy_Resources_ptr, unsigned char *Sach_payload, unsigned char *Sacch_payload, unsigned char nb_antennas_rx, unsigned char nb_antennas_tx, unsigned char sach_index, unsigned char sch_index, unsigned char stream_index, unsigned char num_tb, unsigned short tb_size_bytes, unsigned int active_processes, int *crc_status)
 This routine implements SACH Demodulation/Decoding.
int phy_decode_sach_2streams_ml (int sacch_flag, unsigned int first_sach_flag, PHY_RESOURCES *Phy_Resources_ptr, unsigned char *Sach_payload, unsigned char *Sacch_payload, unsigned char nb_antennas_rx, unsigned char nb_antennas_tx, unsigned char sach_index, unsigned char sch_index, unsigned char stream_index, unsigned char num_tb, unsigned short tb_size_bytes, unsigned int active_processes, int *crc_status)


Typedef Documentation

typedef struct Macphy_data_req_table_entry MACPHY_DATA_REQ_TABLE_ENTRY

An entry in the MACPHY_DATA_REQ Table.


Function Documentation

void create_times4_sync_symbol ( unsigned char  n  ) 

Initialize a 4 times oversampled version of a CHSCH in the frequency-domain. This is used for initial timing acquisition by a UE/MR.

Parameters:
n Index aor the oversampled chsch to be generated.

void phy_chsch_init ( unsigned char  n,
unsigned char  nb_antennas_tx 
)

This routine initializes the variables for a CHSCH.

Parameters:
n Index for the chsch to be generated
nb_antennas_tx Number of TX antennas

void phy_chsch_init_rt_part ( unsigned char  n  ) 

This routine initializes the part of the CHSCH requiring processing that is only possible from a real-time context (SSE/MMX).

Parameters:
n Index for the chsch to be generated.
It is used only in real-time execution of OpenAirInterface under RTAI. In user-space, this is part of phy_chsch_init.

void phy_sch_init_rt_part ( unsigned char  n  ) 

This routine initializes the part of the SCH requiring processing that is only possible from a real-time context (SSE/MMX).

Parameters:
n Index for the chsch to be generated.
It is used only in real-time execution of OpenAirInterface under RTAI. In user-space, this is part of phy_sch_init.

void phy_generate_chbch_top ( unsigned char  chbch_ind  ) 

This routine implements the MAC interface for the CHBCH on transmission.

Parameters:
chbch_ind Index for the chbch to be generated. The index is in correspondance with an associated chsch_ind.
It scans the MACPHY_DATA_REQ_TABLE whenever called (typically towards the end of the TTI $N-1$ for transmission during TTI $N$) in order to check if a pending request for CHBCH has be generated by the MAC.

unsigned char phy_generate_chbch ( unsigned char  chsch_ind,
unsigned char  extension_switch,
unsigned char  nb_antennas_tx,
unsigned char *  chbch_pdu 
)

This routine generates the CHBCH.

Parameters:
chsch_ind Index for an associated CHSCH
extension_switch Flag for generation of cyclic extension
nb_antennas_tx Number of TX antennas to use
chbch_pdu Pointer to memory containing PDU

void phy_decode_chbch_top ( void   ) 

unsigned char phy_decode_chbch ( unsigned char  chbch_ind,
unsigned char  nb_antennas_tx,
unsigned char  nb_antennas_rx,
unsigned char *  chbch_mac_pdu,
unsigned int  chbch_pdu_length_bytes 
)

This routine decodes the CHBCH.

Parameters:
chbch_ind Index of the CHBCH to be processed
nb_antennas_rx Number of RX antennas at UE/MR
nb_antennas_tx Number of TX antennas at CH
chbch_mac_pdu Pointer to CHBCH_PDU (typecasted to char)
chbch_pdu_length_bytes Length of CHBCH_PDU + tail/CRC bits.
Operations

Let $\mathbf{r}_i$ be the $i^{\mathrm{th}}$ symbol of the CHBCH, $i=0,\cdots,N_{s,\mathrm{CHSCH}}-1 $

  1. Loop over the symbols, skipping the extension if the hardware does not strip it out (always done if timing acquisition is not complete),and generate the frequency-domain symbols, $\mathbf{R}_i = \mathrm{DFT}(\mathbf{r}_i)$. These are stored in Transport_data.rx_sig_f[aa] for antenna aa.
  2. Compute carrier phase offset for each symbol, with respect to reference CHSCH (CHSCH_data.rx_sig_f), using the sparse pilots in each symbol as:

void phy_decode_chbch_2streams ( unsigned char  chbch_ind[2],
int  mode,
unsigned char  nb_antennas_rx,
unsigned char  nb_antennas_tx,
unsigned char *  chbch_mac_pdu[2],
int  ret[2],
unsigned int  chbch_pdu_length_bytes 
)

This routine decodes two CHBCHs comming from two different CHs using either MMSE receiver or SIC.

Parameters:
chbch_ind[2] Indices of the CHBCHs to be processed
mode indicates if MMSE or SIC receiver schould be used (currently unused - only MMSE possible)
nb_antennas_rx Number of TX antennas at CH
nb_antennas_tx Number of RX antennas at UE/MR
chbch_mac_pdu[2] Pointers to CHBCH_PDU (typecasted to char)
ret[2] CRCs of both streams
chbch_pdu_length_bytes Length of the MAC layer pdu (to avoid buffer overrun) Operations
Let $\mathbf{r}_{i,k}$ be the $i^{\mathrm{th}}$ symbol of the CHBCH with index chbch_ind[k]

for k=0,1 do

  1. Loop over the symbols $\mathbf{r}_{i,k}$, skipping the extension if the hardware does not strip it out (always done if timing acquisition is not complete), and generate the frequency-domain symbols, $\mathbf{R}_{i,k} = \mathrm{DFT}(\mathbf{r}_{i,k})$. These are stored in chbch_data[chbch_ind[k]].rx_sig_f[aa] for antenna aa.
  2. Compute carrier phase offset for each symbol, with respect to reference CHSCH (CHSCH_data[chbch_ind[k]].rx_sig_f), using the sparse pilots in each symbol. Store it in CHBCH_data[chbch_ind[k]].perror[NB_ANTENNAS_RX][NUMBER_OF_CHBCH_SYMBOLS]
  3. Derotate symbols and store result in CHBCH_data[chbch_ind[k]].rx_sig_f.
  4. Apply MMSE filter to CHBCH_data[chbch_ind[k]].rx_sig_f store result in CHBCH_data[chbch_ind[k]].rx_sig_f2. The equalized stream from CH k is now in CHBCH_data[chbch_ind[k]].rx_sig_f2[k]. (This procedure can be improved, because the full MMSE filter is applied unecessarily twice). The matrix-vector multiplication scales the result by the square root of the energy of the MMSE filter matrix minus 2 bits (log2_maxh).
  5. Clipping
  6. Frequency Deinterleaving & Demodulation
  7. Viterbi Decoding

end do

void phy_decode_chbch_2streams_ml ( unsigned char  chbch_ind[2],
int  mode,
unsigned char  nb_antennas_rx,
unsigned char  nb_antennas_tx,
unsigned char *  chbch_mac_pdu[2],
int  ret[2],
unsigned int  chbch_pdu_length_bytes 
)

This routine decodes two CHBCHs comming from two different CHs using a non-linear BICM-MIMO LLR-based receiver.

Parameters:
chbch_ind[2] Indices of the CHBCHs to be processed
mode indicates if MMSE or SIC receiver schould be used (currently unused - only MMSE possible)
nb_antennas_rx Number of TX antennas at CH
nb_antennas_tx Number of RX antennas at UE/MR
chbch_mac_pdu[2] Pointers to CHBCH_PDU (typecasted to char)
ret[2] CRCs of both streams
chbch_pdu_length_bytes Length of the MAC layer pdu (to avoid buffer overrun) Operations
Let $\mathbf{r}_{i,k}$ be the $i^{\mathrm{th}}$ symbol of the CHBCH with index chbch_ind[k]

for k=0,1 do

  1. Loop over the symbols $\mathbf{r}_{i,k}$, skipping the extension if the hardware does not strip it out (always done if timing acquisition is not complete), and generate the frequency-domain symbols, $\mathbf{R}_{i,k} = \mathrm{DFT}(\mathbf{r}_{i,k})$. These are stored in chbch_data[chbch_ind[k]].rx_sig_f[aa] for antenna aa.
  2. Compute carrier phase offset for each symbol, with respect to reference CHSCH (CHSCH_data[chbch_ind[k]].rx_sig_f), using the sparse pilots in each symbol. Store it in CHBCH_data[chbch_ind[k]].perror[NB_ANTENNAS_RX][NUMBER_OF_CHBCH_SYMBOLS]
  3. Derotate symbols and store result in CHBCH_data[chbch_ind[k]].rx_sig_f.
  4. Apply MMSE filter to CHBCH_data[chbch_ind[k]].rx_sig_f store result in CHBCH_data[chbch_ind[k]].rx_sig_f2. The equalized stream from CH k is now in CHBCH_data[chbch_ind[k]].rx_sig_f2[k]. (This procedure can be improved, because the full MMSE filter is applied unecessarily twice). The matrix-vector multiplication scales the result by the square root of the energy of the MMSE filter matrix minus 2 bits (log2_maxh).
  5. Clipping
  6. Frequency Deinterleaving & Demodulation
  7. Viterbi Decoding

end do

int phy_chbch_phase_comp ( struct complex16 Rchsch,
struct complex16 Rsymb,
int  chbch_ind,
int  nb_antennas_tx,
struct complex16 perror,
unsigned char  do_rotate 
)

void phy_generate_mrbch_top ( unsigned char  sch_index  ) 

This routine implements the MAC interface for the MRBCH on transmission.

Parameters:
sch_index Index for the chbch to be generated. The index is in correspondance with an associated sch_index.
It scans the MACPHY_DATA_REQ_TABLE whenever called (typically towards the middle of TTI $N$ for transmission during TTI $N$, if the MRBCH is located at the end of the TTI) in order to check if a pending request for CHBCH has be generated by the MAC.

unsigned char phy_generate_mrbch ( unsigned char  sch_index,
unsigned char  extension_switch,
unsigned char  nb_antennas_tx,
unsigned char *  mrbch_pdu 
)

This routine generates the MRBCH for an MR.

Parameters:
sch_index Index for an associated SCH
extension_switch Flag for generation of cyclic extension
nb_antennas_tx Number of TX antennas to use
mrbch_pdu Pointer to memory containing PDU

int phy_chbch_pilot_init ( unsigned char  chbch_index,
unsigned char  nb_antennas_tx 
)

This routine initializes PHY_vars->chbch_data[chbch_index].pilot indices and PHY_vars->chbch_data[chbch_index].pilots based on PHY_config->PHY_chbch[chbch_index].Npilot and the pilot symbols. How many pilots do we put per NUMBER_OF_USEFUL_CARRIERS/NUMBER_OF_FREQUENCY_GROUPS scubcarriers. At which position do we put them. Where are those parameteres configured.

Parameters:
chbch_index Index of the CHBCH
nb_antennas_tx Number of TX antennas
Returns:
0 on succes, -1 otherwise

void phy_decode_mrbch_top ( unsigned char  sch_index  ) 

This routine implements the MAC interface for the MRBCH on reception at CH.

Parameters:
sch_index Index for the chbch to be decoded in correspondance with an associated chsch_ind.
It scans the MACPHY_DATA_REQ_TABLE whenever called (typically towards the first quarter of TTI $N$ for transmission during TTI $N-1$, in the case where the MRBCH is at the end of the TTI) in order to check if a pending request for MRBCH has be generated by the CH MAC.

void phy_decode_mrbch ( unsigned char  sch_index,
unsigned char  nb_antennas_tx,
unsigned char  nb_antennas_rx,
unsigned char *  mrbch_mac_pdu,
unsigned int  mrbch_pdu_length_bytes 
)

This routine implements the MAC interface for the MRBCH on reception at CH.

Parameters:
sch_index Index for the mrbch to be decoded in correspondance with an associated sch_ind
nb_antennas_tx Number of transmit antennas
nb_antennas_rx Number of receive antennas
mrbch_mac_pdu Pointer to MRBCH_PDU structure (typcasted to char)
mrbch_pdu_length_bytes 

unsigned char phy_generate_sch ( unsigned int  stream_index,
unsigned int  sch_index,
unsigned int  symbol,
unsigned short  freq_alloc,
unsigned char  extension,
unsigned char  nb_antennas_tx 
)

This routine implements the generation of the sch for UE/MR.

Parameters:
stream_index Stream Index for the sch to be generated
sch_index Index for the sch to be generated
symbol Symbol position in TTI
freq_alloc Frequency group allocation bitmap
extension Flag for cyclic extension inclusion
nb_antennas_tx Number of TX antennas

void phy_generate_sach_top ( unsigned char  last_slot,
int  time_in 
)

This routine implements the MAC interface for sach/sacch for UE/MR/CH.

Parameters:
last_slot Index for the last received slot used for selecting the SACH to be generated.
time_in Timing information at routine entry (for real-time performance statistics) It scans the MACPHY_DATA_REQ_TABLE whenever called and treats the SACH which are pending for the slot (groups of symbols) in question.

void phy_generate_sach1 ( unsigned char  ch_index,
unsigned int  sacch_flag,
unsigned char  sch_type,
unsigned char  sch_index,
unsigned char *  sach_pdu,
unsigned char *  sacch_pdu,
unsigned char  time_alloc,
unsigned short  freq_alloc,
unsigned char  coding_fmt,
unsigned char  nb_antennas_tx,
unsigned short  tb_size_bytes,
unsigned int  Active_process_map,
unsigned int  New_process_map,
unsigned char  first_sach_flag,
unsigned char  total_groups 
)

This routine implements generation of signals for sach/sacch in UE/MR/CH with respect to coding/interleaving/modulation.

Parameters:
ch_index Clusterhead index
sacch_flag Flag to indicated generation of SACCH required
sch_type Type of pilot sequence associated to this SACH (SCH or CHSCH)
sch_index Index of pilot sequence associated to this SACH
sacch_flag Flag to indicated generation of SACCH required
sach_pdu Pointer to MAC SACH PDU
sacch_pdu Pointer to MAC SACCH PDU
time_alloc Time allocation vector indicating first symbol and length of SACH resource
freq_alloc Frequency group allocation vector
coding_fmt Channel Coding and Modulation format for SACH portion
nb_antennas_tx Number of TX antennas
tb_size_bytes Size of transport block in bytes
Active_process_map Bit map containing activation indicators of up to 16 HARQ processes
New_process_map Bit map containing newly created TBs (i.e. round 0 of HARQ protocol) for up to 16 HARQ processes
first_sach_flag Flag indicating that this is the first sach in the slot. This is for FFT buffer initialization
total_groups Number of active groups in this TTI across all SACH. This is to adjust the amplitude of the data carriers properly. Note this function currently being updated for HARQ and multiple-transport block support.

unsigned char phy_generate_sach2 ( unsigned char  extension_switch,
unsigned char  first_symbol,
unsigned char  number_of_symbols,
unsigned char  nb_antennas_tx 
)

This routine implements generation of signals for sach/sacch in UE/MR/CH with respect to OFDM (IDFT) and cyclic extension.

Parameters:
extension_switch Flag to indicate that cyclic extension is required
first_symbol First symbol of the signal to be generated
number_of_symbols Number of symbols in the signal to be generated
nb_antennas_tx Number of TX antennas for which to generate the signals
Returns:
Returns signal strength in dB on generated signal (averaged over the nb_antennas_tx TX antennas)

int phy_decode_sach_top ( unsigned char  last_slot  ) 

This routine implements the generation of signals for sach/sacch in UE/MR/CH with respect to OFDM (IDFT) and cyclic extension.

Parameters:
last_slot Index for the last received slot used for selecting the SACH to be generated.
Returns:
Return
It scans the MACPHY_DATA_REQ_TABLE whenever called and treats the SACH which are pending for the slot (groups of symbols) in question.

void phy_decode_sach_common ( int  first_symbol,
int  number_of_symbols,
unsigned char  nb_antennas_rx,
unsigned int  sach_index 
)

This routine implements the frequency-transform portion of SACH detection.

Parameters:
first_symbol First symbol of the signal to be generated
number_of_symbols Number of symbols in the signal to be generated
nb_antennas_rx Number of RX antennas for which to generate the RX signals
sach_index Index of SACH data for storage

int phy_decode_sach ( int  sacch_flag,
unsigned int  first_sach_flag,
PHY_RESOURCES Phy_Resources_ptr,
unsigned char *  Sach_payload,
unsigned char *  Sacch_payload,
unsigned char  nb_antennas_rx,
unsigned char  nb_antennas_tx,
unsigned char  sach_index,
unsigned char  sch_index,
unsigned char  stream_index,
unsigned char  num_tb,
unsigned short  tb_size_bytes,
unsigned int  active_processes,
int *  crc_status 
)

This routine implements SACH Demodulation/Decoding.

Parameters:
sacch_flag Flag to indicate SACCH detection
first_sach_flag Flag to indicate detection of first sach in TTI
Phy_Resources_ptr Pointer to a PHY_RESOURCES description of SACH
Sach_payload Pointer to SACH PDU buffer for storage
Sacch_payload Pointer to SACCH PDU buffer for storage
nb_antennas_rx Number of RX antennas
nb_antennas_tx Number of TX antennas
sach_index Index of SACH data structure where signal/data temporary variables are stored
sch_index Index of SACH data structure where signal/data temporary variables are stored
stream_index Index of SACH data structure where signal/data temporary variables are stored
num_tb Number of TBs in this generation
tb_size_bytes Size of TBs in bytes
active_processes bit map containing indication of active HARQ processes to be decoded
crc_status A pointer to an array of indications of the decoding status (SACH_OK, SACH_ERROR, SACCH_ERROR) for TBs on active proceses. SACCH ERROR is indicated on bit 0
Returns:
0 on success, a negative status on error (-SACH_PARAM_ERROR,...)

int phy_decode_sach_2streams_ml ( int  sacch_flag,
unsigned int  first_sach_flag,
PHY_RESOURCES Phy_Resources_ptr,
unsigned char *  Sach_payload,
unsigned char *  Sacch_payload,
unsigned char  nb_antennas_rx,
unsigned char  nb_antennas_tx,
unsigned char  sach_index,
unsigned char  sch_index,
unsigned char  stream_index,
unsigned char  num_tb,
unsigned short  tb_size_bytes,
unsigned int  active_processes,
int *  crc_status 
)


Generated on Thu May 14 10:34:28 2009 for OPENAIR by  doxygen 1.4.7