Electronic – Write into external registers from FPGA

fpgainterfaceserial

I want to initialise a register of an external component with a FPGA. The data is latched by the external component at every falling edge of the clock signal.
You can see in the diagram that the SDATA line is somehow delayed. The falling edge of the clock signal lines up with the SDATA bits center. Could someone give an VHDL code example how I could write into a register some data bits?

enter image description here

Best Answer

The external component is clocked based on the falling edge of SCLK. However, if you notice, the data is changing on the rising edge of SCLK. In your FPGA driving these signals, you should just update the data output on every rising edge of SCLK. There's no need for you to use the falling edge at all in your design.

The only reason you care about the falling edge is when calculating max frequency/duty cycle, ensuring you don't violate the setup/hold time specifications.