Altera_Forum
Honored Contributor
8 years agoMAX 10: a clock for SPI
Is using an external clock without a clock buffer causing any problem?
I'm implementing SPI slave. An external SPI clock is directly from a pin(not a clock pin, but just an IOpin) of the FPGA(10M08SAE144C8G). Should I use a clock buffer for this? The reason why I have this question is I got some timing violations. Here are my simple codes. ----------------------------------------------------------------- always @(negedge sclk or posedge in_CSn) if (in_CSn) Cnt <= 3'd7; else if (Cnt == 3'd0) Cnt <= 3'd0; else Cnt <= Cnt - 1'b1; assign out_MISO = (~in_CSn)? pData[Cnt] : 1'b0; ----------------------------------------------------------------- And the timing violations are from "Cnt". These are very simple logics, But I cannot understand why this causes timing violations. Timing report shows this clock's restricted fMax is 250Mhz.