# Application-Specific Integrated Circuit of an Inter-IC Sound Digital Filter for Audio Systems
## 2 Materials and Methods
### Digital Filter Architecture
#### 2.2.5 Control and Status Register (M5)  
The control and status register (CSR) module controls the audio codec configuration through the I2C bus. This module receives and stores the filter coefficients and the configuration parameters for the main control register (MCR). Table 3 shows the memory map of the CSR, where the address 0h0 to 0h1 contains the configuration bits of the MCR and the slave address of the audio codec; the address 0h2 to 0h5 contains the sensitivity parameters of the adaptive filter, and address 0h6 to 0h45 contains the user-defined filter coefficients stored in 16 bits (high and low bytes). Figure 4: Stereo filtering diagram. Figure 3: Mono filtering diagram. Main Control Register  
The MCR controls the main output configuration options and operation modes based on the value of the eight bits described in Table 4. The output control (OUTC) bits allow four operation modes, as described in Table 5, set to 0h1 by default (bypass mode). The filtering options (FOPTs), Table 6, configure the filter to be used when the OUTC register is configured as filter output mode (0h2), set to 0h0 by default (LPF0). \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**Address** & **B7** & **B6** & **B5** & **B4** & **B3** & **B2** & **B1** & **B0** \\ \hline
0h0 & NU & CS & AFM & FOPT & & OUTC \\ \hline \hline \end{tabular}
\end{table} 
Table 4: MCR configuration bits. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Address** & **B7** & **B6** & **B5** & **B4** & **B3** & **B2** & **B1** & **B0** \\ \hline
0h0 & NU & CS & AFM & FOPT & OUTC & MCR \\ \hline
0h1 & NU & & 12C\_SLAVE & & 12C \\ \hline
0h2 & & & LOW & & SNCL \\ \hline
0h3 & & HIGH & & SNCH \\ \hline
0h4 & & LOW & & SDCL \\ \hline
0h5 & & HIGH & SDCH \\ \hline
0h6 & & LOW & UDP\_L00 \\ \hline
0h7 & & HIGH & UDP\_H00 \\ \hline
0h8 & & LOW & UDP\_L01 \\ \hline
0h9 & & HIGH & UDP\_H01 \\... & &... & UDP\_LHnn \\ \hline
0h24 & & LOW & UDP\_L15 \\
0h25 & & HIGH & UDP\_H15 \\ \hline
0h26 & & LOW & UDP\_L00 \\ \hline
0h27 & & HIGH & UDP\_H00 \\ \hline
0h28 & & LOW & UDP\_L01 \\ \hline
0h29 & & HIGH & UDP\_H01 \\ \hline... & &... & UDP\_LHnn \\ \hline
0h44 & & LOW & UDP\_L15 \\ \hline
0h45 & & HIGH & UDP\_H15 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Memory map. \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**Address** & **B7** & **B6** & **B5** & **B4** & **B3** & **B2** & **B1** & **B0** \\ \hline
0h0 & NU & CS & AFM & FOPT & & OUTC \\ \hline \hline \end{tabular}
\end{table} 
Table 5: OUTC configuration. The adaptive filter mode (AFM) described in Table 7 allows the selection of the algorithm that will be used for the adaptive filtering. The register shown in Table 8 configures the slave address for the I2C module. This register is set to \(0\times 45\) by default. The sensitivity numerator constant (SNC) register in Table 9 sets the LMS and NLMS sensitivity numerator constant (\(\mu\) constant). This register is set to 0x3 FFF by default (0.499969482421875 in Q1.15 fixed-point format). The sensitivity denominator constant (SDC) register in Table 10 sets the NLMS sensitivity numerator constant (\(\beta\) constant). This constant is ignored when the LMS algorithm is selected. This register is set to \(0\times 4000\) by default (0.5 in Q1.15 fixed-point format). \begin{table}
\begin{tabular}{c c c c} \hline
**Binary** & **Hex** & **Configuration** & **Details** \\ \hline  & & & Low-pass filter, calculated for 500 Hz; the minimum cutoff frequency for WL = 16 bits and N = 16 coefficients is 1894.92 Hz 1894.92 Hz 0010 0h1 & LPF1 & Low-pass filter, calculated for 5 kHz Band-pass filter, calculated for 1 kHz-20 kHz 011 0h3 & BPF1 & Band-pass filter, calculated for 4 kHz-10 kHz \\
100 0h4 & UDF0 & First I2C user-writable filter 101 0h5 & UDF1 & Second I2C user-writable filter 110 0h6 & AF & Adaptive filtering function 111 0h7 & NU \\ \hline \end{tabular}
\end{table} 
Table 6: FOPT configuration.