Altera_Forum
Honored Contributor
16 years agoSPI Slave and Timing Constraints
I am currently working on a project where we are using a MAX II EPM570-C5N. I am currently working in Quartus on compiling my HDL and fitting it to the part. While working with my constraints, I have run in to a bit of an interesting issue with constraining a clock. The CPLD is implementing a SPI slave to talk to a DSP Spi master. Our spi protocol dictates that:
1. Data is placed on the MOSI and MISO lines at the falling edge of the clock. 2. Data is sampled on the rising edge of the clock. This makes it a bit difficult to write the input and output delay constraints, because the launch edge and latch edge don’t exactly line up. All negative edges are launch edges, and all positive edges are latch edges. Initially, I just doubled my frequency for the created spi clock. This makes the speed of each transaction correct. However, this is a slightly different model, whereby data is launched and latched at the same time. Anyone tried constraining the spi miso / mosi lines or have some suggestions?