From b3092a45fdca9d900164e7404747c7e2b6a0440d Mon Sep 17 00:00:00 2001 From: Sakthivel Velumani Date: Wed, 16 Nov 2022 09:51:04 -0500 Subject: [PATCH] Added documentation for UE_thread design --- executables/docs/nr-ue-design.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 executables/docs/nr-ue-design.md diff --git a/executables/docs/nr-ue-design.md b/executables/docs/nr-ue-design.md new file mode 100644 index 0000000000..0b0b940d5f --- /dev/null +++ b/executables/docs/nr-ue-design.md @@ -0,0 +1,22 @@ +# Multi-threading Design +The `UE_thread` function in `nr-ue.c` is the main top level thread that interacts with the radio unit. Once the thread spawns, it starts the 'Initial Syncronization'. Once its complete, the regular processing of slots commences. + +## Initial Syncronization Block +```mermaid +graph TD + A(Start) -->|UE_thread| B["readFrame
--Reads samples worth 2 frames"] + B --> |Tpool thread| C["UE_synch
--PSS & SSS detection
--PBCH decode"] + B --> |UE_thread| D["readFrame
--trash samples to unblock radio"] + C --> |Tpool thread| E[syncInFrame
--shift first sample to start of frame] + D --> |UE_thread| E +``` +## Regular Slot Processing +```mermaid +graph TD + E[syncInFrame
--shift first sample to start of frame] -->|UE_thread| F["trx_read_func (slot n)"] + F --> |Tpool thread| G["processSlotTX (slot n+4)
--PUSCH encode
--PUCCH encode
--trx_write_func"] + F --> |UE_thread| H["UE_processing (slot n)
--PDCCH decode
--PDSCH decode"] + G --> |Tpool thread| I(Merge) + H --> |UE_thread| I(Merge) + I --> |Go to next slot
UE_thread| F +```