# Area-Efficient Universal Code Generator for GPS L1C and BDS B1C Signals
## 3 Previous Code Generator Structures  
As described in Table 3, each satellite has a unique phase difference \(\omega\), an insertion point \(\tau\), and a truncation point \(p\), and generates a unique PRN code according to Equations (3)-(6). In order to implement the GNSS receiver in hardware, the implementation of a code generator is essential. Whereas existing studies on code generators were conducted focusing on LFSR-based codes [10; 11; 12; 13], a few studies on Legendre sequence-based codes have recently been conducted [14; 15; 16; 17]. Figures 2-4 show the structure of Legendre sequence-based code generators. Figure 2 shows the structure of memory-based universal code generators (MB UCG) [14; 15], Figure 3 shows the structure of Legendre-generation universal code generators (LG UCG) [16], and Figure 4 shows the structure of Weil-generation universal code generators (WG UCG) [17]. The memory-based universal code generator [14; 15] shown in Figure 2 has a structure where the final PRN codes generated according to Equations (3)-(6) are stored in the memory for its operation. \begin{table}
\begin{tabular}{c c c c c c c} \hline
**Code Property** & & **GPS L1C** & & & **BDS B1C** & \\ \hline Channel & Data & & Pilot & Data & & Pilot \\ Code & Primary & Primary & Secondary & Primary & Secondary \\ Type & Legendre & Legendre & LFSR & Legendre & Legendre & Legendre \\ Code Length \(N_{C}\) & 10,230 & 10,230 & 2047 & 10,230 & 10,230 & 1800 \\ Weil Length \(N_{W}\) & 10,223 & 10,223 & - & 10,243 & 10,243 & 3607 \\ Legendre Length \(N_{L}\) & 10,223 & 10,223 & - & 10,243 & 10,243 & 3607 \\ Phase difference \(w\) & 1–5111 & 1–5111 & - & 1–5121 & 1–5121 & 1–1803 \\ Insertion Point \(\tau\) & 1–10,223 & 1–10,223 & - & - & - & - \\ Truncation Point \(p\) & - & - & - & 1–10,243 & 1–10,243 & 1–3607 \\ \hline \end{tabular}
\end{table} 
Table 3: Code parameters for GPS L1C and BDS B1C signals. Figure 2: Memory-based universal code generator [14; 15] for GPS L1C and BDS BIC. Figure 3: Legendre-generation universal code generator [16] for GPS L1C and BDS BIC. To operate as a universal code generator, the memory-based universal code generator calculates all the PRN sequences by signal (GPS L1C, BDS B1C), by channel (Data, Pilot), and by satellite (1\(\sim\)63), stores the calculated PRN sequences in the ROM, and outputs the bits of the given PRN code sequence according to external control signals. The notations of detailed signals are summarized in Table 4. As shown in Figure 2, when a GPS L1C or BDS B1C signal has been selected by SIG_SEL and the satellite number has been input by STL_SEL, the data channel code \(C_{data}(t)\) and pilot channel code \(C_{pilot}(t)\) are selectively generated. Figure 4: Weil-generation universal code generator [17] for GPS L1C and BDS B1C. Although memory-based universal code generators [14; 15] can select the GNSS signals, channels, and satellites according to control signals to generate desired codes, the required memory size is very large because they store the codes for all the cases. To supplement the foregoing, a structure to generate Legendre sequences on the fly according to Equation (3) and a structure to generate Weil sequences on the fly according to Equation (4) were proposed. Whereas memory-based universal code generators [14; 15] store entire codes by signal (GPS L1C, BDS B1C), by channel (Data, Pilot), and by satellite (1-63) in the ROM in advance, Legendre-generation universal code generators (LG UCG) [16] store the phase differences \(\omega\), insertion points \(\tau\), and truncation points \(p\) required by signal (GPS L1C, BDS B1C), by channel (Data, Pilot), and by satellite (1-63) in the ROM. According to Figure 3, the parameters are selected from the ROM according to the given inputs SIG_SEL and STL_SEL, and the operation for Equation (3) is carried out on the fly using the Legendre-GEN circuit.