Sunteți pe pagina 1din 26

WCDMA L1 Tutorial

Decoder Overview
2 10/5/2019 WCDMA Layer 1 Tutorial
Decoder

Introduction
• Decoder module is responsible for following action in physical layer software
– CCTrCh table management for mDSP.
– CCTrCh management (enable/disable) with in L1 S/W.
– Maintainance/Computation of various values in CCTrCh table
• Rate matching parameter computation
• TrCh coding parameters computation
• DRM buffer allocation
– Processing of downlink data and passing it to higher layers.
– Blind transport format detection (BTFD) processing.
– Provide input to outer loop power control module in DCH state.
– Estimate DPCCH SIR every radio frame, monitors in-sync and out-of-sync conditions and
maintains its timers.
• Decoder modules interacts with other modules, layers and hardware through
defined interfaces.
• Suggested Reading
– TS 25.211
– TS 25.212
– TS 25.302
– WCDMA Modem DSP-Microprocessor Interface.
3 10/5/2019 WCDMA Layer 1 Tutorial
Decoder

Coded Composite Transport Channel (CCTrCh)

• CCTrCh results after encoding and multiplexing transport blocks from


one or more transport channels (TrCh).
• Each CCTrCh corresponds to one or more physical channels of same
type.
• Each TrCh has one or more transport format (TF). All transport formats
of a TrCh constitute one transport format set (TFS).
• At a given time a specific combination of TF from all TrCh in a CCTrCh
is received. Such a combination is called transport format combination
(TFC). Set of all allowed TFC is called TFCS.
• TFCS is organized as table and index of that table is called (transport
format combination indicator (TFCI).
• Figure on following page shows the CCTrCh architecture. Example is
from typical voice call setup (AMR+DCH).
4 10/5/2019 WCDMA Layer 1 Tutorial
Decoder

Coded Composite Transport Channel (CCTrCh)

Physical channel CCTrCh table

Transport Format Combinition Set


(TFCS) TrCh TrCh TrCh TrCh
TFCI TrCh TrCh TrCh TrCh #0 #1 #2 #3
#0 #1 #2 #3
0 0 0 0 0 TF0 TF0 TF0 TF0
1 1 0 0 0
TF1 TF1 TF1 TF1
2 2 1 1 0
3 0 0 0 1 TF2
4 1 0 0 1
TFS
5 2 1 1 1

• TrCh0, TrCh1 and TrCh2 correspond to Class A, Class B and Class C


in AMR. TrCh3 is the signaling DCH channel.
5 10/5/2019 WCDMA Layer 1 Tutorial
Decoder

Semi-static and dynamic information of TrCh/TF

• Each TrCh/TF has semi-static and dynamic information.


• Semi-static information:
– Transmission time interval (TTI). Values are 10, 20 40, 80 ms.
– Type of channel coding (Convolutional or Turbo coding).
– Coding rate (1/2 or 1/3). Turbo coding only 1/3 is allowed.
– Rate matching attribute. Value range 0 to 256.
– CRC size.
• Dynamic information
– TF in use is the part of dynamic information.
• Other information
– BLER quality target for a TrCh.
6 10/5/2019 WCDMA Layer 1 Tutorial
Decoder

Rate Matching

• Rate matching is important aspect of decoder. It is responsible for


computing rate matching parameters and provide that to mDSP in CCTrCh
table.
• Used to match the number of coded bits in CCTrCh (multiplexed TrChs) to
the number of bits in the radio frame.
• Achieved by puncturing and repetition.
• Two types of rate matching methods
– Fixed position: Each transport channel has fixed DTX position in radio frame.
– Flexible position: Each transport channel DTX position can vary according to TFC in use.

• RM parameters are computed for the worst case. Hence the number of
DTX bits may vary per CCTrCh.
• Repetition leads to better coding gain and the reverse holds true for
puncturing.
• RM attribute of a TrCh specify the relative importance of that TrCh.
7 10/5/2019 WCDMA Layer 1 Tutorial
Decoder

CCTrCh/TFCS Table organization in mDSP

• There are 4 CCTrCh tables in mDSP.


• Each CCTrCh
– Holds all the necessary configuration parameters for a CCTrCh.
– Has 8 TrCh tables entries.
– Has 64 TF table entries.
– Can have associated TFCS table if TFCI existence is indicated TRUE .
– Only one CCTrCh can have TFCS table associated with it.

• There are 2 TFCS tables in mDSP


– These are used to ping pong between TFCS set at reconfigurations.
– TFCS table is specified in terms of TF index. TF index is little different from earlier explained.
mDSP expect TF index relative to TFT (transport format table) base. TFT base of a TrCh is sum
of TF in all TrCh prior to it.
8 10/5/2019 WCDMA Layer 1 Tutorial
Decoder

CCTrCh Table Distribution

• The 4 CCTrCh tables are configured based upon the UE state.


• In ACQ state
– All 4 tables are used for BCH setup, TTI alignment and STTD detection.

• In nonACQ state
– The first two CCTrCh are used for non BCH type channels. Only 1 can be used/configured at a
time. The other is used for reconfiguration purposes.
– Last 2 can be used for any BCH (SBCH/NBCH) setup.
– The NBCH can be setup in DCH state for timing (CFN to SFN diff) measurement.
– The NBCH can be setup in non DCH state for acquiring neighbor cell parameters for cell
reselection.

• DRMB buffer allocation of CCTrCh


– CCTrCh 3 and 4 are for BCH purpose only hence fixed size are allocated at end of DRMB.
– CCTrCh 1 and 2 for non BCH type and are variable
• CCTrCh 1 is start of DRMB with incrementing direction.
• CCTrCh 2 is end of remaining (after 3 and 4 allocation) DRMB in decrementing direction.
• This is done for best use of DRMB.
9 10/5/2019 WCDMA Layer 1 Tutorial
Decoder

Blink transport format detection (BTFD)

• There are many slot format in which TFCI bits are not present or
network may choose not to transmit TFCI bits. In such cases BTFD
processing is used.
• All TrCh on that CCTrCh need to have fixed position rate matching.
• Unlike TFCI’s, the transport format in use has to be determined
indirectly. Requires extra computational effort.
• In BTFD processing there are 2 types of TrCh:
• Explicitly detectable TrCh
– These TrCh must have non zero CRC bits attached to it.
– These may serve as guiding TrCh.
• Guided TrCh
– These TrCh have 0 bits of CRC attached to TrCh.
– Need help from guiding TrCh.
– A TrCh is called guiding TrCh only when it has same TF of guided TrCh in TFCS for each TF of
guiding TrCh. In a figure showing CCTrCh, TrCh #0 can be guiding TrCh for #1 and #2. but not
for #3.
10 10/5/2019 WCDMA Layer 1 Tutorial
Decoder

Blink transport format detection (BTFD)

• BTFD detection process:


• For a BTFD CCTrCh, mDSP provide decision for all TFs of all TrChs
with TTI ending at that radio frame.
• Explicitly detection TrCh
– When there is only one TF which passes CRC, it is declared the winner.
– TF with 0 blocks is ignored.
– If no TF passes CRC or more than one TF passes CRC then no decision can be made for
winning TrCh. It is declared as erasure.
• Guided TrCh
– TF corresponding to winning TF of guided TrCh is declared winner only when guiding TrCh has
successful BTFD decision.
11 10/5/2019 WCDMA Layer 1 Tutorial
Decoder

CCTrCh Setup

• CCTrCh setup by RRC


– RRC initiates full CCTrCh setup by requesting the L1 manager.
– The CCTrCh table is populated with values received from RRC.
– TrCh coding and RM parameters are calculated.
– TrCh table, TFC table and TF table set up accordingly.
• Internal CCTrCh setup by physical layer
– L1 does internal BCH CCTrCh for following purpose.
– SBCH for getting TTI alignment and STTD information in ACQ state.
– NBCH for getting system information during cell reselection.
– NBCH in DCH state for getting CFN to SFN difference measurement.
• CCTrCh tables are uploaded in to the mDSP memory
• CCTrCh enable disable
– Software controls the operation of CCTrCh after setup. It can be enabled/disabled as per the
requests from demod module.
– At initial setup, the CCTrCh is disabled until demod sets up a physical channel after which the
corresponding CCTrCh can be enabled at frame boundary.
– During the time when CCTrCh is disabled, any transport block received is discarded.
12 10/5/2019 WCDMA Layer 1 Tutorial
Decoder

Other CCTrCh operations

• TrCh reference type enable/disable


– The operation is used primarily by RRC to enable or disable one type of TrCh. Typical usage is in
enabling/disabling PCH/FACH TrCh on SCCPCH based on state.
– When disabled, the transport blocks on this transport channel are discarded.
– When enabled, the transport blocks are passed on to the MAC layer.

• Loopback mode enable/disable


– No Loopback: Transport block dropped if CRC errors are present.
– Loopback mode 1: Even if all the transport blocks in the transport block set have CRC errors, the
transport block is not dropped and passed to upper layers.
– Loopback Mode 2: Same as Loopback mode 1 except that along with transport block the CRC
bits are also passed to the upper layers.
13 10/5/2019 WCDMA Layer 1 Tutorial
Decoder

H/W DOB and mDSP DOB status FIFO

• Once CCTrCh table is set in mDSP and corresponding DL combiner


channel is running, TrChs are decoded every TTI.

• mDSP interrupts ARM at every TrCh (also refered to as TBset) decode


done with TB_DECODE_DONE_ISR.

• mDSP maintains DOB status FIFO which is a circular buffer. Decoder


and mDSP are synced up at reset starting at DOB status FIFO index 0.

• At every TB_DECODE_DONE ISR, decoder reads all valid DOB status


FIFO starting from current index and save it in S/W DOB status FIFO.

• DOB status FIFO has following information


– CCTrCh/TrCh/TF index information.

– Time (CFN) at which decode was finished.

– TFCI decode error (if applicable).

– DOB address where the decoded TrCh (TBset) contents resides.


14 10/5/2019 WCDMA Layer 1 Tutorial
Decoder

H/W DOB and mDSP DOB status FIFO

• Example of H/W DOB and mDSP DOB status FIFO

CRC bits
DOB status
Path energy matric
Symbol error/Quality bits
TBset data

TB #0
Padding

TB #1
H/W DOB
Padding

TB #2
CCTrCh table index Padding
DOB status TrCh index
FIFO TF index TB #3
CFN Padding
TFCI decode result
DOB address
mDSP DOB
status FIFO
15 10/5/2019 WCDMA Layer 1 Tutorial
Decoder

Transport block read process

• Decoder accumulates all DOB status FIFO in TB_DECODE_DONE ISR

• It process all DOB status FIFO in 2 events on Rx timeline


– TB header read event.

– TB data read.

• The TB read process is divided into two phases to reduce the fatness of
the event on Rx timeline.
• Transport Block Header Event
– Read DOB status from DOB (first 3 W32).
– DOB status FIFO may belong to CCTrCh that may be internal to L1 (BCH only) or data may need
to be passed to MAC.
– Internal BCH use
• Decodes SFN of BCH block if CRC is good and pass it to demod block as local command.
– CCTrCh for delivery to MAC
• Checks CRC if not in loopback mode.
• If CRC fails drop the block.
16 10/5/2019 WCDMA Layer 1 Tutorial
Decoder

Transport block read process


– For all the blocks that need delivery to MAC, it reads first few W32 to get MAC-d PDU header.
– MAC-d PDU header is passed to MAC layer via function call.
– MAC layer verifies validity of block and if block is desired, if marks it valid and provide following
• TB id for each block.
• MAC-d PDU offset from where actual data starts.
• Indicate if deciphering need to be done and following information in case it is required.
– Deciphering parameters count-C, bearer Id, ciphering keys Id
– Deciphering type – transparent or non-transparent
– Deciphering offset indicating where to start deciphering in MAC-d PDU

• Transport block data read event


– Performs deciphering if required.
– Allocate DSM items for all valid transport blocks.
– Read DOB data for all valid transport blocks from the offset indicated by MAC.
– Free DOB status FIFO in S/W.
– Send data to MAC layer.
17 10/5/2019 WCDMA Layer 1 Tutorial
Decoder

Information flow in TB header and data read event


TB header decode info TB header decode info

mDSP FIFO index


dl_tb_hdr_mdsp_status_fifo_idx
dl_tb_hdr_decode_info DOB status FIFO TB set status dl_tb_hdr_decode_info
0 0 (AMR class A) 0 0 0
1 1 (AMR class B) 1 1 1
2 2 (hole) 2 2 3
3 3 (AMR class C) 3 3 4
4 4 (DCH data) 4 (for demod) 4 6
5 (N_PCCPCH) 5
6 (DCCH)

TB header buffers pool


l1_dl_tb_hdr_struct_type dec_tb_hdr_info

0 (AMR class A) 0 0 TB index 0 0 0 TB Id x0 DSM item


1
1 (AMR class B) 1 0 TB index 0 1 TB Id x1 DSM item
2
3 (AMR class C) 2 0 TB index 0 2 TB Id x2 DSM item
3
4 (DCH data) 0 valid TB Hdr idx 0 3 0 TB index 0 4 3 TB Id x3 DSM item
Has 4 TB blocks 1 TB index 1 TB Id x4 DSM item
1 valid TB Hdr idx 1 5
TB 0, 1, 3 passed 2 TB index 3 TB Id x5 DSM item
2 invalid 6
TB 2 failed CRC
3 valid TB Hdr idx 2
Total TB info
elements #32
63
6 (DCCH) 4 0 TB index 0 4 TB Id x6 DSM item

Data for Data for


l1_phy_dl_trblk_header_ind l1_phy_dl_trblk_data_ind
18 10/5/2019 WCDMA Layer 1 Tutorial
Decoder

F3 Messages

• CCTrCH Setup for internal use by L1


– Initiation of BCH CCTrCH setup internally by L1
• dldec.c 03787 Setting up SBCH CCTrCh for L1 internalMSG
– Configure the SBCH parameters to setup the CCTrCH table
• dldec.c 03713 Setting up SBCH params
– Write the CCTrCH table into mDSP
• dldec.c 04399 CC 2 #TrCh 1 lastTFCI -1
– Setup Auto BLER measurement
• dldec.c 02366 BLER_AUTO_MEAS:CC Id 255 idx 2

• Full CCTrCH Setup as requested by RRC


– Populate the CCTrCH table with values passed by RRC. Compute related parameters and
write the CCTrCH table into mDSP
• dldec.c 04399 CC 0 #TrCh 2 lastTFCI 3
– DMA Transfer to write CCTrCH information to mDSP completed
• dldec.c 04501 DEC_CCSTP_DONE:TFCI<64 is 1
• dldec.c 04575 DEC_CCSTP_DONE:cmd for cc_idx 0 sent
– Setup Auto BLER measurement
• dldec.c 02366 BLER_AUTO_MEAS:CC Id 1 idx 0
19 10/5/2019 WCDMA Layer 1 Tutorial
Decoder

F3 Messages

• CCTrCH Enable/Disable
– Enable CCTrCH, index = 3
• dldec.c 02893 CC_SET_ST:t_idx 3 enable 1 CFN 16MSG
– Disable CCTrCH, index = 2
• dldec.c 02893 CC_SET_ST:t_idx 2 enable 0 CFN 16MSG

• TrCH Ref type Enable/Disable


– Enable PCH type TrCH in CCTrCH table index 0
• dldec.c 02975 CC_SET_ST:CC 0 TrCh 4 state 1
– Disable PCH type TrCH in CCTrCH table index 0
• dldec.c 02975 CC_SET_ST:CC 0 TrCh 4 state 0

• Freeing the CCTrCH table and marking it available


– The last valid TFCI index used is less than 64 written to mDSP
• dldec.c 04201 DEC_CCSTP_DONE:TFCI<64 is 1
– The CCTrCH table at index 0 and TFCI table 0 is freed
• dldec.c 04206 CCTRCH_FREE:idx 0 Id 1 TFCIT 0
20 10/5/2019 WCDMA Layer 1 Tutorial
Decoder

F3 Messages

• Idle State
– No F3 messages

• ACQ State (l1msetup.c 03085 L1 state now ACQ)


– BCH CCTrCH setup internally by L1
– Enable CCTrCH
– Drop TrBlock data if not received at TTI boundary
• dldec.c 05588 Dropping CC 2 Tr 0 block at CFN 15MSG
– Disable CCTrCH
– Free the CCTrCH table

• BCH state (l1msetup.c 03092 L1 state now BCH)


– BCH CCTrCH setup internally by L1
– Enable CCTrCH
– Setup Callback function to check SFN/CFN sanity
• SFN/CFN_SNTY Setting CC_tidx 2 CB func
– SFN/CFN sanity check passed
• dldec.c 02756 SFN/CFN_SNTY Real SFN 3098 mDSP CFN 27 seqSFN 3100
21 10/5/2019 WCDMA Layer 1 Tutorial
Decoder

F3 Messages

• PCH State (l1msetup.c 03096 L1 state now PCH)


– BCH CCTrCH setup internally by L1
– Full CCTrCH table setup requested by RRC
– Enable/Disable CCTrCH
– Drop TrBlock data if not received at TTI boundary
• dldec.c 05588 Dropping CC 2 Tr 0 block at CFN 15MSG
– Free the CCTrCH table
– Setup Callback function to check SFN/CFN sanity
• SFN/CFN_SNTY Setting CC_tidx 2 CB func
– SFN/CFN sanity check passed
• dldec.c 02756 SFN/CFN_SNTY Real SFN 3098 mDSP CFN 27 seqSFN 3100
– Disable TrCH ref type PCH

• PCH_SLEEP State (l1m.c 06874 L1 state now PCH_SLEEP)


– Enable/Disable CCTrCH
– Enable/Disable TrCH ref type
22 10/5/2019 WCDMA Layer 1 Tutorial
Decoder

F3 Messages

• Deep Sleep State (l1msetup.c 03136 L1 state now DEEP_SLEEP)


– Set BLER measurement interval in millisecond
• dldec.c 01290 BLER_AUTO_MEAS:Timer(ms) set 2000

• FACH State (l1msetup.c 03100 L1 state now FACH)


– Enable/Disable CCTrCH
– Free CCTrCH table
– Full CCTrCH table setup requested by RRC

• DCH State (l1msetup.c 03104 L1 state now DCH 1)


– Enable/Disable CCTrCH
– Free CCTrCH table
– Full CCTrCH table setup requested by RRC
– Set power offset value between DPCCH and DPDCH received from RRC
• dldec.c 02376 CCTrCHSetup PO3 0
– Set up DCH radio link existence to TRUE or FALSE
• dldec.c 02868 CC_SET_ST:DCH/DSCH existence=1
• dldec.c 04182 CCTRCH_FREE:DCH/DSCH existence=0
23 10/5/2019 WCDMA Layer 1 Tutorial
Decoder

F3 Messages
– Reconfiguring the CCTrCH table
• dldec.c 01663 Seamless reconfig
– Register Callback functions to query TB size for failed TFCI/BTFD
• dldec.c 07157 Registered CC 1 Tr 0 CBfunc ec0561MSG
– Read TB header from DOB status FIFO
• dldec.c 06220 Retained Blks for CC 1 Tr 0 TF 2

• Few MSG_ERRORS
– Setting up non-existent CCTrCH
• dldec.c 01596 CCTRCH_SETUP:CCTrCh Id 5 non-existing
– Ciphering Key Validation failed
• dldec.c 01356 CIPH_KEY_VLDT: validation failed
– Transport channel not valid for loopback
• CCTRCH_SETUP:CC 2 TrCh 1 type 0 not valid for loopback
– No free TFCI table
• CCTRCH_SETUP:No free TFCI table
– Enabling a already freed CCTrCH table
• dldec.c 02838 CC_SET_ST:t_idx 0 is free
– Freeing a already freed CCTrCH table
• dldec.c 04091 CCTRCH_FREE:t_idx 0 already free
24 10/5/2019 WCDMA Layer 1 Tutorial
Decoder

F3 Messages
– Freeing an invalid CCTrCH table
• dldec.c 02829 CC_SET_ST:t_idx %d invalid
– CCTrCH info pointer NULL
• dldec.c CCSTP_VLDT:CCTrCh info ptr is NULL
– No free NBCH CCTrCH table to set up
• dldec.c 03189 NBCH CCTrCh maxed out.In use 2 max 2
– If DMA transfer timeout counter is being updated by mistake
• dldec.c 04649 DL_DMA_XFER_TOUT:Not counting timeout
25 10/5/2019 WCDMA Layer 1 Tutorial
Decoder

Files/Functions/ISRs

• Decoder Related Files


– dldec.c/dldec.h,
– dec.c/dec.h,
– dlbtfd.c/dlbtfd.h,
– l1dlcctrchcfg.h, l1sapcommon.h, dlrm.h, l1rrcif.h….

• Some Important functions/ISR’s


– dl_cctrch_setup(…): Sets up CCTrCH table.
– dl_set_cctrch_enable_state(…): Enable/Disable CCTrCH table.
– dl_cctrch_free(…): Frees up the CCTrCH table.
– dl_setup_cctrch_ctfc_tables_mdsp(…): Writes the CCTrCH tables to mDSP.
– dec_dma_transfer_done_isr(): ISR called when DMA transfer of CCTrCH tables to
mDSP is completed.
– dl_trblk_header_read_event_handler(): Periodic function to read the TrCh block header.
– dl_trblk_data_read_event_handler(): Periodic function to read the TrCH block data.
– dl_tbset_decode_done_isr(): ISR signaling the completion of decoding by mDSP.
26 10/5/2019 WCDMA Layer 1 Tutorial
Decoder

Q&A

S-ar putea să vă placă și