# Analysis of 5G Channel Access for Collaboration with TSN Concluding at a 5G Scheduling Mechanism
## 5 Analysis of the Channel Access Prioritization of Packets
### Impact of Slot Boundaries on Packet Forwarding  
The CNC configures the 5G Bridge with GCLs containing time slots for several traffic classes. As a GCL describes the traffic shaping behavior of an egress port, there is one GCL for each UE and one for each UPF connected to the TSN user plane. A GCL responsible for a UPF affects uplink traffic and a GCL responsible for a UE affects downlink traffic. The temporal course of the channel access priority \(g_{i,j}(t)\) of traffic class \(i\) for port \(j\) can be described as follows:  
\[g_{i,j}(t)=\sum_{n=-\infty}^{\infty}\tilde{g}_{i,j}(t-n\cdot T_{\text{GCL}}) \quad,n\in\mathbf{N},t\in\mathbf{R} \tag{1}\]  
Figure 2: Integration Architecture of 5G as a TSN Bridge.  
\[\tilde{g}_{i,j}(t)=\begin{cases}p_{i,j}&,t_{1}^{i,j}\leq t\leq t_{2}^{i,j}\\ 0&,else\end{cases} \tag{2}\]  
where  
* \(T_{GCL}\) is the overall duration of the GCL
* \(t_{1}\) and \(t_{2}\) are the slot boundaries for a traffic class in a GCL, where \(0\leq t_{1}^{i,j}<t_{2}^{i,j}\leq T_{GCL}\)
* \(p_{i,j}\in\mathbf{N}^{+}\) is the priority according to the Transmission Selection between multiple traffic classes with simultaneously open gates  
Here, the traffic classes are granted access to the channel in decreasing priority order, omitting classes with \(g_{i,j}=0\). The expression \(\tilde{g}_{i,j}(t)\) with \(t\in[0,T_{GCL}]\) describes the channel access priority over one period of the GCL.  
A first approach to interpreting the slot boundaries from the perspective of the 5 GS can be to determine the later boundary \(t_{2}^{i,j}\) of a GCL slot as a periodically occurring deadline for forwarding packets of this traffic class on its respective path between UPF and UE. This results in the need for a time-aware and packet-based scheduling mechanism which prioritizes the packets of traffic classes with earlier deadlines. While the time range behind the deadline is cleared when forwarding packets from such a traffic class, the availability of bandwidth and the jitter of ingress packet streams due to the prioritization of other streams with the next deadline may lead to packets being forwarded before the early boundary \(t_{1}^{i,j}\) of their respective GCL slot has occurred.  
Therefore, both the early and the late boundary of every GCL slot has to be attended to when determining the prioritization of packets in the forwarding process. In this way, the forwarding of packets of a specific traffic class can be limited to the period of time between the two slot boundaries. At this point, we assume that the GCL slot of a traffic class occurs only once within the overall GCL period. The two slot boundaries of a traffic class within a GCL divide the GCL period into two intervals. During the first time interval the packets of the respective traffic class are not allowed to be transmitted, while during the second interval those traffic classes can be transmitted. In the case of several traffic classes being allowed to access the channel during a GCL slot, an additional algorithm corresponding to the Transmission Selection of TAS is needed to organize the prioritization of those classes.