02-07-2018 05:45 PM
I have a problem with 7 series datasheet.
In Master SPI Flash Master Mode Programming Switching Characteristics.
What does Tspiccm & Tspiccfc stands for?
Doest it define as the timing after CCLK falling edge?
02-08-2018 09:08 AM
Setup is time before the clock edge, Hold is time after. So the first column is 3ns setup is required BEFORE the edge, and 0ns HOLD time is required after the edge (data is allowed to change immediately/at the same time as the edge).
02-08-2018 06:10 PM
08-26-2019 03:04 PM
It means from the clock edge to the data (valid), it is not more than 8ns,
Which clock edge does "the clock edge" refer to, though? Is it from the rising edge of CCLK or the falling edge? From figure 2-13 in UG470:
It looks like both MOSI and FCS_B are driven out on the falling edge of CCLK, but I can't find anywhere on either UG470, XAPP586, or DS181 that says whether MOSI and FCS_B are driven from the rising or falling edge of CCLK. Figure 3 in XAPP1233 (for Ultrascale devices), also seems to imply that the MOSI and FCS_B lines are driven by the CCLK falling edge.
It's critical to know which edge these specifications refer to. We need to meet timing from the falling edge of FCS_B to the first rising edge of CCLK. Same for any change on MOSI to the CCLK rising edge. Both T_SPICCM and T_SPICCFC are 8 ns. If these 8 ns are calculated form the falling edge of CCLK, then in the best possible case (memory has a setup requirement of 0 ns, there is no CCLK-MOSI or CCLK-FCS_B skew on the board, and CCLK has perfect 50% duty cycle) the minimum half-clock period for CCLK would be 8ns. This would imply a full-cycle period of 16ns, or 62.5 MHz. With a reasonable set up time of 3ns, and a duty cycle of 40% that goes down to 36MHz.
All of this makes me want to believe that the specification is given from the rising edge of CCLK, despite what the figures above show. After all, the "Configuration Clock Calculation Example" sections of the XAPPs cited above don't consider T_SPICCM and T_SPICCFC at all. If these specifications were given from the falling edge, then the Configuration Clock Calculation Examples are not really looking at the worst-case timing, and it's not really possible to configure the part at anything faster than 62.5MHz.
Could you please clarify which clock-edge these specifications refer to and, if they refer to the falling edge, why aren't T_SPICCM and T_SPICCFC considered in the XAPP calculations?
08-26-2019 05:43 PM
I think that the following text from page-53 of UG470(v1.13.1) will help answer your questions:
The CCLK frequency starts at 3 MHz typical providing sufficient margin for the FCS_B and MOSI activity. The CCLK frequency increases if the ConfigRate option is utilized after the start of the read, where only the SPI clock-to-data output timing and FPGA DIN setup timing need to be considered.
That is, CCLK is slow enough during write-to-flash so that T_SPICCM and T_SPICCFC are not a factor. Then, CCLK speed is fast during read-from-flash and when T_SPICCM and T_SPICCFC do not apply.
08-27-2019 06:46 AM
This makes sense iff the CCLK speed change happens halfway through an endlessly long read. So if I'm understanding correctly, the FPGA will request a read using the slow clock (and MOSI/FCS_B timing is satisfied), then when the FPGA reads the instruction to switch to EMCCLK or to a faster internal CCLK, it does so "on the fly", without issuing a separate read. Is this accurate?
08-27-2019 08:44 AM
…the FPGA will request a read using the slow clock (and MOSI/FCS_B timing is satisfied), then when the FPGA reads the instruction to switch to EMCCLK or to a faster internal CCLK, it does so "on the fly", without issuing a separate read.
This is also my interpretation of the comment from UG470. I think your comment, “without issuing a separate read”, must be true, otherwise (as you say) the interface could not pass timing analysis with some of the faster EMCCLK. We can probably generalize your comment and say that all write-to-flash commands must be done (and are done automatically by the FPGA) before the switch from slow-to-fast CCLK.
I just used an oscope on a Kintex-7 board where we use ConfigRate option to set CCLK frequency to 33MHz. After power-up, I can see that CCLK starts at 3MHz and then, sometime later, automatically switches to 33MHz.