UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Visitor emilycbenz
Visitor
4,234 Views
Registered: ‎06-17-2015

Clocks on the Cool Runner II

Jump to solution

On my CPLD, I am writing Verilog code to latch incoming data from the SPI communication and then output the data to another SPI communication. In order to output the data, I need a clock. Is it possible to implement a simple ring oscillator inside the CPLD with Verilog code? Or do I need to use an external clock source?

0 Kudos
1 Solution

Accepted Solutions
Professor
Professor
6,374 Views
Registered: ‎08-14-2007

Re: Clocks on the Cool Runner II

Jump to solution

I'm not sure I'd recommend using a ring oscillator, however you can use the Schmitt trigger input option to easily make an R-C oscillator using just two pins, two macrocells, one resistor and one capacitor.  On the other hand, clock oscillators have become very small and inexpensive these days, so you might want to look at that approach instead, especially if you need a reliable frequency.

-- Gabor

View solution in original post

6 Replies
Professor
Professor
6,375 Views
Registered: ‎08-14-2007

Re: Clocks on the Cool Runner II

Jump to solution

I'm not sure I'd recommend using a ring oscillator, however you can use the Schmitt trigger input option to easily make an R-C oscillator using just two pins, two macrocells, one resistor and one capacitor.  On the other hand, clock oscillators have become very small and inexpensive these days, so you might want to look at that approach instead, especially if you need a reliable frequency.

-- Gabor

View solution in original post

Visitor emilycbenz
Visitor
4,212 Views
Registered: ‎06-17-2015

Re: Clocks on the Cool Runner II

Jump to solution

What would be your hesitations with a ring oscillator? Would it be because of its varying frequency?

0 Kudos
Professor
Professor
4,196 Views
Registered: ‎08-14-2007

Re: Clocks on the Cool Runner II

Jump to solution

A ring oscillator would have a variable frequency and also a high frequency which normally leads to higher power consumption.  Lowering the frequency would require more on-chip resources.  So you could look at this as a trade-off between very inexpensive board-level components like a resistor and a capacitor, or more on-chips resources and higher power consumption.

-- Gabor
Visitor emilycbenz
Visitor
4,190 Views
Registered: ‎06-17-2015

Re: Clocks on the Cool Runner II

Jump to solution

If I was to use the Schmitt trigger input, is it there a maximum frequency that the input can handle?

0 Kudos
Professor
Professor
4,184 Views
Registered: ‎08-14-2007

Re: Clocks on the Cool Runner II

Jump to solution

The reason to use hysteresis in this case is to allow you to control the frequency with an R/C circuit.  So I would assume the maximum frequency would not be limited so much by the Schmitt Trigger input as by the R/C time constant.  In any case, the timing model for CoolRunner II shows a small delay adder due to selecting the hysteresis path (Schmit Trigger), so it would reduce the maximum toggle rate allowable on an input.  You can look through the data sheet for the device you want to use for the "Hysteresis input adder" to see how much time it adds.  For example on an XC2C64A-5 at 3.3V the Hysteresis input adder is 2.0 ns, and at 1.5V it is 4.0 ns, so clearly the hysteresis creates more delay at lower interface voltage.

 

What sort of frequency were you trying to produce?  I would think that anything above 50 MHz should probably be done with an external oscillator rather than trying to use an R/C circuit.  The reason is that you want the prop delays through the logic to be small compared to the R/C delay in order to get a more consistent frequency.

-- Gabor
0 Kudos
Visitor emilycbenz
Visitor
4,180 Views
Registered: ‎06-17-2015

Re: Clocks on the Cool Runner II

Jump to solution

Thank  you for your response. After some consideration, we have decided to go with a small external oscillator to make the process easier.

 

Emily

0 Kudos