• Cedric Roux's avatar
    hotfix: correct PHICH generation · 88218d9a
    Cedric Roux authored
    The PHICH generation is wrong.
    HARQ process X is uplink scheduled at TTI n.
    At TTI n+4 the eNB receives the data.
    At TTI n+8 the eNB sends ACK/NACK on the PHICH.
    
    The problem is that PHICH generation is done after scheduling.
    And PHICH generation uses "first_rb" and "n_DMRS" to compute
    "ngroup_PHICH" and "nseq_PHICH".
    
    So at TTI n+8 if the eNB has reused the HARQ process X for
    a new uplink scheduling the values "first_rb" and "n_DMRS"
    may have changed.
    
    We need to use the previous values.
    
    One solution would have been to do PHICH generation before
    scheduling. The problem is that "generate_phich_top" does more
    than PHICH generation. It has to setup parameters to sort of
    "emulate" a DCI0 in case of retransmission scheduled without
    DCI0. So part of it has to be done after scheduling. We would
    have to split the function.
    
    The simple adopted fix is to store old values of "first_rb"
    and "n_DMRS" and use those values in "generate_phich_top".
    
    This fix has only been tested with FDD. TDD may miserably fail.
    88218d9a
phy_procedures_lte_eNb.c 109 KB