the rrc now only works with the stack latest tti, instead of mac's tti
This commit is contained in:
parent
e3e5b5be11
commit
770f04b92a
|
@ -37,6 +37,7 @@
|
|||
#include "srslte/common/interfaces_common.h"
|
||||
#include "srslte/common/security.h"
|
||||
#include "srslte/common/stack_procedure.h"
|
||||
#include "srslte/common/tti_point.h"
|
||||
#include "srslte/interfaces/rrc_interface_types.h"
|
||||
#include "srslte/phy/channel/channel.h"
|
||||
#include "srslte/phy/rf/rf.h"
|
||||
|
@ -421,8 +422,6 @@ public:
|
|||
/* Instructs the MAC to start receiving an MCH */
|
||||
virtual void mch_start_rx(uint32_t lcid) = 0;
|
||||
|
||||
virtual uint32_t get_current_tti() = 0;
|
||||
|
||||
virtual void set_config(srslte::mac_cfg_t& mac_cfg) = 0;
|
||||
|
||||
virtual void get_rntis(ue_rnti_t* rntis) = 0;
|
||||
|
@ -611,8 +610,9 @@ public:
|
|||
class stack_interface_rrc
|
||||
{
|
||||
public:
|
||||
virtual void start_cell_search() = 0;
|
||||
virtual void start_cell_select(const phy_interface_rrc_lte::phy_cell_t* cell) = 0;
|
||||
virtual void start_cell_search() = 0;
|
||||
virtual void start_cell_select(const phy_interface_rrc_lte::phy_cell_t* cell) = 0;
|
||||
virtual srslte::tti_point get_current_tti() = 0;
|
||||
};
|
||||
|
||||
// Combined interface for PHY to access stack (MAC and RRC)
|
||||
|
|
|
@ -37,7 +37,7 @@ public:
|
|||
phr_proc();
|
||||
void init(phy_interface_mac_lte* phy_h, srslte::log* log_h_, srslte::timer_handler* timers_db_);
|
||||
void set_config(srslte::phr_cfg_t& cfg);
|
||||
void step(uint32_t tti);
|
||||
void step();
|
||||
void reset();
|
||||
|
||||
bool generate_phr_on_ul_grant(float* phr);
|
||||
|
|
|
@ -124,8 +124,9 @@ public:
|
|||
void start_prach_configuration() final;
|
||||
|
||||
// Interface for RRC
|
||||
void start_cell_search() final;
|
||||
void start_cell_select(const phy_interface_rrc_lte::phy_cell_t* cell) final;
|
||||
void start_cell_search() final;
|
||||
void start_cell_select(const phy_interface_rrc_lte::phy_cell_t* cell) final;
|
||||
tti_point get_current_tti() final { return current_tti; }
|
||||
|
||||
// Task Handling interface
|
||||
srslte::timer_handler::unique_timer get_unique_timer() override { return timers.get_unique_timer(); }
|
||||
|
@ -143,6 +144,7 @@ private:
|
|||
bool running;
|
||||
srsue::stack_args_t args;
|
||||
std::vector<uint32_t> proc_time;
|
||||
srslte::tti_point current_tti;
|
||||
|
||||
// timers
|
||||
srslte::timer_handler timers;
|
||||
|
|
|
@ -214,7 +214,7 @@ void mac::run_tti(const uint32_t tti)
|
|||
Debug("Running MAC tti=%d\n", tti);
|
||||
mux_unit.step();
|
||||
bsr_procedure.step(tti);
|
||||
phr_procedure.step(tti);
|
||||
phr_procedure.step();
|
||||
|
||||
// Check if BSR procedure need to start SR
|
||||
if (bsr_procedure.need_to_send_sr(tti)) {
|
||||
|
|
|
@ -126,7 +126,7 @@ void phr_proc::timer_expired(uint32_t timer_id)
|
|||
}
|
||||
}
|
||||
|
||||
void phr_proc::step(uint32_t tti)
|
||||
void phr_proc::step()
|
||||
{
|
||||
if (phr_cfg.enabled && initiated) {
|
||||
if (pathloss_changed() && timer_prohibit.is_expired()) {
|
||||
|
|
|
@ -305,7 +305,7 @@ void rrc::si_acquire_proc::start_si_acquire()
|
|||
const uint32_t nof_sib_harq_retxs = 5;
|
||||
|
||||
// Instruct MAC to decode SIB (non-blocking)
|
||||
tti_point tti{rrc_ptr->mac->get_current_tti()};
|
||||
tti_point tti = rrc_ptr->stack->get_current_tti();
|
||||
auto ret = compute_si_window(tti.to_uint(), sib_index, sched_index, period, rrc_ptr->serving_cell->sib1ptr());
|
||||
tti_point si_win_start = tti_point{ret.first};
|
||||
if (si_win_start < tti) {
|
||||
|
|
|
@ -308,8 +308,9 @@ void ue_stack_lte::run_tti_impl(uint32_t tti, uint32_t tti_jump)
|
|||
if (args.have_tti_time_stats) {
|
||||
tti_tprof.start();
|
||||
}
|
||||
current_tti = tti_point{tti};
|
||||
|
||||
// perform tasks in this TTI
|
||||
// perform tasks for the received TTI range
|
||||
for (uint32_t i = 0; i < tti_jump; ++i) {
|
||||
uint32_t next_tti = TTI_SUB(tti, (tti_jump - i - 1));
|
||||
mac.run_tti(next_tti);
|
||||
|
|
Loading…
Reference in New Issue