## 1 Introduction
Due to the components used in an OCDMA network, a PON can be adapted with the OCDMA technique, making it a strong candidate for the next generation of networks. A PON consists of two main sections: the optical line terminals (OLTs) as transmitters and the optical network units (ONUs) as receivers [15]. Recently, the adaptation of OCDMA-PON has been interesting to researchers due to the advantages that it can offer, such as a confidentiality guarantee for data transmission, the same bandwidth for uplink and downlink, and access to networks with great speed and totally asynchronous communication. Nevertheless, the OCDMA-PON system faces multiple obstacles, for instance, algorithm complexity and the diminution of resource management, which should be dealt with. This allows the OCDMA-PON system to guarantee resource allocation on request and adaptively [16]. Initially, studies on encoding began with one dimension (1D). However, one of the drawbacks of the system is that increasing the number of simultaneous users requires an increase in code length [17]. To overcome these drawbacks, researchers aim to design a new code with the objective of having zero cross-correlation between the codes to remove the MAI effect [18]. As a result, the design has shifted from one-dimensional (1D) encoding to having two dimensions (2D), resulting in systems that are spectral/spatial (S/S), spectral/time (S/T), time/polarization (T/P), and so on. There are several proposed codes for OCDMA systems based on diverse mathematical methods, such as eigenvalues [19], identity matrix [20], shifting property [21], and others. In ref. [22], a 3D perfect difference (3D-PD) code that uses a property of MAI cancellation to eliminate MAI and reduce the influence of PINN has been proposed. In ref. [23], a 3D-PD/multi-diagonal (3D-PD/MD) code that uses a cancellation property of MAI to completely minimize MAI and enhance the performance of the system has been suggested. The PD code sequence is used to encode the spectral and temporal components, whereas the MD code sequence is used to encode the spatial component. The authors of [24] proposed a 3D dynamic cyclic shift/multi-diagonal (3D-DCS/MD) code, which depends on the same principle as the 3D-PD/MD code approach but replaces the spectral and temporal components with a DCS code sequence. The authors of [25] proposed a 3 DPascal's triangle ZCC (3D-PTZCC) code for spectral-time and spatial encoding, based on a 1D-PTZCC code that minimizes MAI and removes PINN through the zero cross-correlation (ZCC) property. However, upon comparing the PTZCC code with the MD code, it is noted that both codes share the same characteristics and have similar performance in 3D encoding. Therefore, they lack an innovative element compared to the work presented in [26]. The proposed paper introduces a solution to address the limitations of existing techniques by presenting a three-dimensional single-weight zero cross-correlation (3D-SWZCC) code, which utilizes spectral, temporal, and spatial coding domains as the first, second, and third dimensions, respectively. This work builds on the authors' previous research in [1]. The proposed code is characterized by a large cardinality and a short code length, making it an ideal solution for optical code-division multiple access (OCDMA) systems in next-generation passive optical networks (NG-PONs). The paper provides both analytical and numerical sections to demonstrate the advantages of the proposed code, and the authors claim that this is the first time a 3D-OCDMA system based on a 3D-SWZCC signature has been proposed for NG-PONs. Additionally, the authors note that none of the approaches mentioned above discussed simulation results; they are confined to numerical results. Finally, this paper presents a detailed description of the 3D-SWZCC code design in its second section. The mechanism of the proposed system, along with its matching structure, is elaborated in the third section.