## 4 FPGA Implementation of the Optimized Algorithm  
The improved MSD demodulation algorithm for PCM/FM signals is implemented on the Xilinx Kintex-7 xc7k325 ffg676-2 FPGA platform in this study. Taking the five-symbol improved MSD algorithm as an example, the overall demodulation architecture is illustrated in Figure 8. The receiver receives the signal and then performs down conversion to generate the I/Q branches. Subsequently, the receiver demodulates the I/Q signals. The demodulation module adopts a soft demodulation scheme, which consists of the following components: the local reference signal preprocessing, multi-channel multi-coefficient processing, correlation computation, and soft output calculation. The following are the implementation details of the key components.  
1. Local Reference Signal Preprocessing: Based on the steps of the optimized algorithm, all local reference signals are generated on the MATLAB R2021a platform according to the PCM/FM signal modulation process. Then, the generated local reference signals are averaged according to Equation (11) to obtain the optimized local reference signals \(\overset{\sim}{L}(t)\). In addition, following the symmetric structure of the phase, half of the optimized local reference signal is retained, thus reducing both the storage requirements and computational  
Figure 8: FPGA implementation architecture diagram.  
Figure 7: Time-division multiplexing schematic diagram.  
load by half. The real and imaginary parts of the local reference signals are alternately stored in the ROM table (corresponding to the ROM local reference signals in Figure 8), facilitating subsequent multi-coefficient processing.  
2. Multi-Channel Multi-Coefficient Processing: The local reference signal data are read from the ROM table using 16 consecutive addresses, and then these data are loaded as new coefficients into the corresponding FIR filters. The real and imaginary parts of each group are respectively used as coefficient set (1) and coefficient set (2). Additionally, as shown in Figure 7, time-division multiplexing is applied to the \(I\) and \(Q\) branches of the input data (received signal), which increases the sampling rate of the FIR filter input data. The \(I\) and \(Q\) branches are alternately read, transforming the original single-channel data stream into a four-channel data stream. Through multi-channel multi-coefficient processing, we obtain the input data of FIR filters in Figure 8 in different channels and different time slots.  
3. Correlation Computation: As shown in Figure 6, the channel selection and coefficient selection modules work together to map the four processed channels and two sets of coefficients to each other according to Equations (12) and (13). Each group of channels is passed through the FIR filter for correlation computation, and the results are obtained. The data from the four channels are then extracted according to the number of channels. According to Equation (8), the squared absolute value of the correlation is computed. Correlation computation describes the matching relationships between four channels and two sets of coefficients and the computation process of the FIR filters in Figure 8.  
4. Soft Output Calculation: For all local reference signal sequences, they are divided into two groups, \"0\" and \"1\", based on the value of the intermediate symbol (e.g., for the code group \"01 X 01\", the value of the intermediate symbol X can be either \"0\" or \"1\"). The maximum correlation values for both groups are then chosen, and the subtraction of these two maximum values yields the soft output result of intermediate symbol X.