mirror of https://github.com/PentHertz/srsLTE.git
parameterize TTI offset between UL grant and UL tx and UL tx and HARQ rx
This commit is contained in:
parent
20a004a768
commit
c247f1103d
|
@ -300,6 +300,7 @@ public:
|
||||||
uint32_t rv;
|
uint32_t rv;
|
||||||
uint16_t rnti;
|
uint16_t rnti;
|
||||||
uint32_t current_tx_nb;
|
uint32_t current_tx_nb;
|
||||||
|
int32_t tti_offset; // relative offset between grant and UL tx/HARQ rx
|
||||||
srslte_softbuffer_tx_t *softbuffer;
|
srslte_softbuffer_tx_t *softbuffer;
|
||||||
srslte_phy_grant_t phy_grant;
|
srslte_phy_grant_t phy_grant;
|
||||||
uint8_t *payload_ptr;
|
uint8_t *payload_ptr;
|
||||||
|
|
|
@ -128,13 +128,13 @@ public:
|
||||||
|
|
||||||
void new_grant_ul_ack(Tgrant grant, bool ack, Taction *action)
|
void new_grant_ul_ack(Tgrant grant, bool ack, Taction *action)
|
||||||
{
|
{
|
||||||
set_ack(grant.tti, ack);
|
set_ack(grant.tti, ack, action);
|
||||||
new_grant_ul(grant, action);
|
new_grant_ul(grant, action);
|
||||||
}
|
}
|
||||||
|
|
||||||
void harq_recv(uint32_t tti, bool ack, Taction *action)
|
void harq_recv(uint32_t tti, bool ack, Taction *action)
|
||||||
{
|
{
|
||||||
set_ack(tti, ack);
|
set_ack(tti, ack, action);
|
||||||
run_tti(tti, NULL, action);
|
run_tti(tti, NULL, action);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -385,13 +385,13 @@ private:
|
||||||
// Called with UL grant
|
// Called with UL grant
|
||||||
void run_tti(uint32_t tti, Tgrant *grant, Taction* action)
|
void run_tti(uint32_t tti, Tgrant *grant, Taction* action)
|
||||||
{
|
{
|
||||||
uint32_t tti_tx = (tti+4)%10240;
|
uint32_t tti_tx = (tti+action->tti_offset)%10240;
|
||||||
proc[pidof(tti_tx)].run_tti(tti_tx, grant, action);
|
proc[pidof(tti_tx)].run_tti(tti_tx, grant, action);
|
||||||
}
|
}
|
||||||
|
|
||||||
void set_ack(uint32_t tti, bool ack)
|
void set_ack(uint32_t tti, bool ack, Taction *action)
|
||||||
{
|
{
|
||||||
int tti_harq = (int) tti - 4;
|
int tti_harq = (int) tti - action->tti_offset;
|
||||||
if (tti_harq < 0) {
|
if (tti_harq < 0) {
|
||||||
tti_harq += 10240;
|
tti_harq += 10240;
|
||||||
}
|
}
|
||||||
|
|
|
@ -240,6 +240,9 @@ void phch_worker::work_imp()
|
||||||
set_uci_periodic_cqi();
|
set_uci_periodic_cqi();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* TTI offset for UL is always 4 for LTE */
|
||||||
|
ul_action.tti_offset = 4;
|
||||||
|
|
||||||
/* Send UL grant or HARQ information (from PHICH) to MAC */
|
/* Send UL grant or HARQ information (from PHICH) to MAC */
|
||||||
if (ul_grant_available && ul_ack_available) {
|
if (ul_grant_available && ul_ack_available) {
|
||||||
phy->mac->new_grant_ul_ack(ul_mac_grant, ul_ack, &ul_action);
|
phy->mac->new_grant_ul_ack(ul_mac_grant, ul_ack, &ul_action);
|
||||||
|
|
Loading…
Reference in New Issue