If you are using SPI-4.2 version v6.0 or newer:
Edit the "pl4_wrapper.ucf" file generated by the CORE Generator and un-comment out the two lines
highlighted in bold:
###########################################################################
# TSClk DCM Phase Shift
# The PHASE SHIFT of the TSCLK DCM can be modified to change the
# alignment of TSClk relative to the TStat input. Un-comment the following
# section to skew TSClk input to 180 degrees.
# NOTE: The instance name may require modification to reflect your
# design hierarchy and synthesis tools.
######################################################################
#INST "pl4_src_top0/pl4_src_clk0/TSClkFullRate.tsclk_dcm0" CLKOUT_PHASE_SHIFT = FIXED;# For information on selecting the ideal phase shift value for TSClk,
# please see
(Xilinx Answer 15500).
#INST "pl4_src_top0/pl4_src_clk0/TSClkFullRate.tsclk_dcm0" PHASE_SHIFT = 128;If you are using an SPI-4.2 version earlier than v6.0, you must manually add the constraints to your UCF. Using any text editor, open the "pl4_wrapper.ucf" file generated by CORE Generator. (This will be in your project directory.) Add the following statements to the source section of the UCF file:
INST "pl4_src_top0/pl4_src_clk0/tsclk_dcm0" CLKOUT_PHASE_SHIFT = FIXED;
INST "pl4_src_top0/pl4_src_clk0/tsclk_dcm0" PHASE_SHIFT = 128;
Note that the example above is for the v5.0 PL4 release. If you are using a different version of the core, the hierarchy and instance name of the TSClk DCM might be different. (In this example, the "pl4_src_top0/pl4_src_clk0/tsclk_dcm0" is the hierarchy and instance name of the TSClk DCM.)
It has been verified that the above change results in the internal TSClk of the back-annotated timing simulation file being skewed by 180 degrees. As a result, if the TStat changes approximately at the rising edge of the TSClk clock when it enters the core, TStat will be sampled internally at the falling edge of the incoming TSClk clock.