Moving PUCCH SR parameters to phy

master
Paul Sutton 10 years ago
parent e063d6e06d
commit 3d156140d2

@ -79,6 +79,7 @@ public:
void setup_lcid(uint32_t lcid, uint32_t lcg, uint32_t priority, int PBR_x_tti, uint32_t BSD);
void set_param(mac_params::mac_param_t param, int64_t value);
int64_t get_param(mac_params::mac_param_t param);
void reconfiguration();
void reset();

@ -80,9 +80,6 @@ namespace ue {
RA_INITRECEIVEDPOWER,
RA_CONTENTIONTIMER,
SR_PUCCH_CONFIGURED,
SR_TRANS_MAX,
BSR_TIMER_PERIODIC,
BSR_TIMER_RETX,

@ -516,6 +516,11 @@ void mac::set_param(mac_params::mac_param_t param, int64_t value)
params_db.set_param((uint32_t) param, value);
}
int64_t mac::get_param(mac_params::mac_param_t param)
{
return params_db.get_param((uint32_t) param);
}
void mac::setup_lcid(uint32_t lcid, uint32_t lcg, uint32_t priority, int PBR_x_tti, uint32_t BSD)
{
mux_unit.set_priority(mac_io::MAC_LCH_CCCH_UL+lcid, priority, PBR_x_tti, BSD);

@ -55,7 +55,7 @@ void sr_proc::step(uint32_t tti)
{
if (initiated) {
if (is_pending_sr) {
if (params_db->get_param(mac_params::SR_PUCCH_CONFIGURED)) {
if (phy_h->get_param(phy_params::SR_PUCCH_CONFIGURED)) {
if (sr_counter < dsr_transmax) {
int last_tx_tti = phy_h->sr_last_tx_tti();
if (last_tx_tti >= 0 && last_tx_tti + 4 < tti) {
@ -93,7 +93,7 @@ void sr_proc::start()
sr_counter = 0;
is_pending_sr = true;
}
dsr_transmax = params_db->get_param(mac_params::SR_TRANS_MAX);
dsr_transmax = phy_h->get_param(phy_params::SR_TRANS_MAX);
Info("SR starting dsrTransMax=%d. sr_counter=%d, PHY TTI=%d\n", dsr_transmax, sr_counter, phy_h->get_current_tti());
}
}

@ -206,6 +206,9 @@ void process_connsetup(LIBLTE_RRC_CONNECTION_SETUP_STRUCT *msg, srslte::ue::mac
msg->rr_cnfg.phy_cnfg_ded.sched_request_cnfg.sr_pucch_resource_idx);
phy->set_param(srslte::ue::phy_params::SR_CONFIG_INDEX,
msg->rr_cnfg.phy_cnfg_ded.sched_request_cnfg.sr_cnfg_idx);
phy->set_param(srslte::ue::phy_params::SR_TRANS_MAX, msg->rr_cnfg.phy_cnfg_ded.sched_request_cnfg.dsr_trans_max);
phy->set_param(srslte::ue::phy_params::SR_PUCCH_CONFIGURED, 1);
phy->set_param(srslte::ue::phy_params::UCI_I_OFFSET_ACK, msg->rr_cnfg.phy_cnfg_ded.pusch_cnfg_ded.beta_offset_ack_idx);
phy->set_param(srslte::ue::phy_params::UCI_I_OFFSET_CQI, msg->rr_cnfg.phy_cnfg_ded.pusch_cnfg_ded.beta_offset_cqi_idx);
phy->set_param(srslte::ue::phy_params::UCI_I_OFFSET_RI, msg->rr_cnfg.phy_cnfg_ded.pusch_cnfg_ded.beta_offset_ri_idx);
@ -216,9 +219,7 @@ void process_connsetup(LIBLTE_RRC_CONNECTION_SETUP_STRUCT *msg, srslte::ue::mac
mac->set_param(srslte::ue::mac_params::HARQ_MAXTX,
liblte_rrc_max_harq_tx_num[msg->rr_cnfg.mac_main_cnfg.explicit_value.ulsch_cnfg.max_harq_tx]);
mac->set_param(srslte::ue::mac_params::SR_TRANS_MAX,
liblte_rrc_dsr_trans_max_num[msg->rr_cnfg.phy_cnfg_ded.sched_request_cnfg.dsr_trans_max]);
mac->set_param(srslte::ue::mac_params::SR_PUCCH_CONFIGURED, 1);
mac->set_param(srslte::ue::mac_params::BSR_TIMER_RETX,
liblte_rrc_retransmission_bsr_timer_num[msg->rr_cnfg.mac_main_cnfg.explicit_value.ulsch_cnfg.retx_bsr_timer]);

@ -111,6 +111,7 @@ public:
bool status_is_rxtx();
void set_param(phy_params::phy_param_t param, int64_t value);
int64_t get_param(phy_params::phy_param_t param);
uint32_t get_current_tti();
static uint32_t tti_to_SFN(uint32_t tti);

@ -78,6 +78,8 @@ namespace ue {
PUCCH_N_PUCCH_SR,
SR_CONFIG_INDEX,
SR_TRANS_MAX,
SR_PUCCH_CONFIGURED,
UCI_I_OFFSET_ACK,
UCI_I_OFFSET_RI,

@ -131,6 +131,10 @@ void phy::set_param(phy_params::phy_param_t param, int64_t value) {
params_db.set_param((uint32_t) param, value);
}
int64_t phy::get_param(phy_params::phy_param_t param) {
return params_db.get_param((uint32_t) param);
}
// FIXME: Add PRACH power control
bool phy::send_prach(uint32_t preamble_idx) {
return send_prach(preamble_idx, -1, 0);

Loading…
Cancel
Save