TIDUE73B April 2018 – February 2026
The CLB is responsible for detecting the response of the encoder and then clocking the SPI to receive the data. First consider the duty and frequency of the clock. Figure 2-15 shows the CLB logic which generates the SPI clock. Figure 2-16 shows the corresponding simulation waveform.
The first step is to generate a clock (called SPI_CLOCK) with the specified frequency and duty. In the generation of SPI_CLOCK on the CLK_GEN_TILE:
The second step is to align the clock with the received data. This is required for the SPI to receive the response of the encoder correctly. There are two challenges to aligning the clock:
To align the clock, LUT_0 monitors the RESPONSE signal for a rising edge. The first rising edge corresponds to the START bit after the acknowledge (ACK) bit. When this edge is detected, LUT_0 resets COUNTER_1 which aligns the SPI_CLOCK to the response.
The third step is to generate the CLB_SPI_CLOCK based on the internal SPI_CLOCK. As shown in Figure 2-16:
This is achieved by using FSM_2 on the FSM_GEN_TILE to generate a SPI_CLOCK_OUTPUT_ENABLE signal. This signal is used by the OUTLUT to allow or block the SPI_CLOCK as required.