diff options
Diffstat (limited to 'src/target/firmware/include/layer1')
-rw-r--r-- | src/target/firmware/include/layer1/async.h | 2 | ||||
-rw-r--r-- | src/target/firmware/include/layer1/mframe_sched.h | 2 | ||||
-rw-r--r-- | src/target/firmware/include/layer1/prim.h | 8 | ||||
-rw-r--r-- | src/target/firmware/include/layer1/sync.h | 42 | ||||
-rw-r--r-- | src/target/firmware/include/layer1/tpu_window.h | 2 |
5 files changed, 47 insertions, 9 deletions
diff --git a/src/target/firmware/include/layer1/async.h b/src/target/firmware/include/layer1/async.h index de996a67..b5cc2516 100644 --- a/src/target/firmware/include/layer1/async.h +++ b/src/target/firmware/include/layer1/async.h @@ -33,7 +33,7 @@ int l1a_txq_msgb_count(struct llist_head *queue); void l1a_txq_msgb_flush(struct llist_head *queue); /* request a RACH */ -void l1a_rach_req(uint16_t offset, uint8_t combined, uint8_t ra); +void l1a_rach_req(uint16_t offset, uint8_t combined, uint8_t ra, uint16_t arfcn); /* schedule frequency change */ void l1a_freq_req(uint32_t fn_sched); diff --git a/src/target/firmware/include/layer1/mframe_sched.h b/src/target/firmware/include/layer1/mframe_sched.h index 74e2d271..3c9aa8cb 100644 --- a/src/target/firmware/include/layer1/mframe_sched.h +++ b/src/target/firmware/include/layer1/mframe_sched.h @@ -4,6 +4,8 @@ #include <stdint.h> enum mframe_task { + MF_TASK_TEST1, + MF_TASK_BCCH_NORM, MF_TASK_BCCH_EXT, MF_TASK_CCCH, diff --git a/src/target/firmware/include/layer1/prim.h b/src/target/firmware/include/layer1/prim.h index 30c51ae6..5c2cb963 100644 --- a/src/target/firmware/include/layer1/prim.h +++ b/src/target/firmware/include/layer1/prim.h @@ -20,7 +20,7 @@ void l1s_nb_test(uint8_t base_fn); void l1s_fbsb_req(uint8_t base_fn, struct l1ctl_fbsb_req *req); void l1a_freq_req(uint32_t fn_sched); -void l1a_rach_req(uint16_t offset, uint8_t combined, uint8_t ra); +void l1a_rach_req(uint16_t offset, uint8_t combined, uint8_t ra, uint16_t arfcn); /* Primitives raw scheduling sets */ extern const struct tdma_sched_item nb_sched_set[]; @@ -29,6 +29,10 @@ extern const struct tdma_sched_item nb_sched_set_ul[]; extern const struct tdma_sched_item tch_sched_set[]; extern const struct tdma_sched_item tch_a_sched_set[]; extern const struct tdma_sched_item tch_d_sched_set[]; -extern const struct tdma_sched_item neigh_pm_sched_set[]; +extern const struct tdma_sched_item neigh_pm_idle_sched_set[]; +extern const struct tdma_sched_item neigh_pm_tch_sched_set[]; +extern const struct tdma_sched_item neigh_sync_sched_set[]; + +extern const struct tdma_sched_item test1_sched[]; #endif /* _L1_PRIM_H */ diff --git a/src/target/firmware/include/layer1/sync.h b/src/target/firmware/include/layer1/sync.h index 3565ee20..df3c6fdc 100644 --- a/src/target/firmware/include/layer1/sync.h +++ b/src/target/firmware/include/layer1/sync.h @@ -55,6 +55,17 @@ struct l1s_h1 { }; struct l1s_state { + + //MTZ + int new_dm; + uint32_t orig_tpu_offset; + uint32_t tpu_offsets[64]; + uint32_t nb_freq_diff[64]; + uint32_t nb_frame_diff[64]; + int32_t nb_sb_freq_diff[64]; + uint32_t nb_sb_snr[64]; + uint16_t tpu_offsets_arfcn[64]; + struct gsm_time current_time; /* current GSM time */ struct gsm_time next_time; /* GSM time at next TMDMA irq */ @@ -127,6 +138,7 @@ struct l1s_state { GSM_DCHAN_UNKNOWN, } type; + uint8_t chan_nr; uint8_t scn; uint8_t tsc; uint8_t tn; @@ -145,19 +157,37 @@ struct l1s_state { struct l1s_h0 st_h0; struct l1s_h1 st_h1; }; + + uint8_t rx_only; } dedicated; /* neighbour cell power measurement process */ struct { - uint8_t n, second; - uint8_t pos; - uint8_t running; - uint16_t band_arfcn[64]; - uint8_t tn[64]; - uint8_t level[64]; + uint32_t start_fn; /* frame number of measumrement start */ + uint8_t valid; /* we have a complete set of measurements */ + uint8_t rounds; /* current rounds of complete measurements */ + uint8_t pos; /* current neighbor to measure */ + uint8_t running; /* DSP task running */ + uint8_t n; /* number of neighbors to measure */ + uint16_t band_arfcn[64]; /* list of ARFCNs */ + uint8_t tn[64]; /* list of TS offset for each measurement */ + uint16_t level_sum[64]; /* sum while processing rounds */ + uint8_t level[64]; /* latest results */ + uint32_t tpu_offset[64]; } neigh_pm; + + /* neighbor cell SCH sync process */ + struct { + uint8_t flags_bsic[64]; /* flags + bsic */ + uint8_t count; /* counter for sync process */ + uint8_t index; /* cell of current sync process (0..63) */ + uint8_t running; /* DSP task running */ + } neigh_sb; }; +#define NEIGH_PM_FLAG_SCANNED 0x80 +#define NEIGH_PM_FLAG_BSIC 0x40 + extern struct l1s_state l1s; struct l1s_meas_hdr { diff --git a/src/target/firmware/include/layer1/tpu_window.h b/src/target/firmware/include/layer1/tpu_window.h index 7b146f12..287d8962 100644 --- a/src/target/firmware/include/layer1/tpu_window.h +++ b/src/target/firmware/include/layer1/tpu_window.h @@ -6,6 +6,8 @@ enum l1_rxwin_type { L1_RXWIN_FB, /* FCCH burst detection */ L1_RXWIN_SB, /* SCH burst detection */ L1_RXWIN_NB, /* Normal burst decoding */ + L1_RXWIN_FB26, /* SCH burst detection of neighbour cell */ + L1_RXWIN_SB26, /* SCH burst detection of neighbour cell */ _NUM_L1_RXWIN }; |