**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!

Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Community Forums
- :
- Forums
- :
- About Our Community
- :
- General Technical Discussion
- :
- Re: Generating a High Precise clock with logic res...

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

jmpg

Contributor

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-24-2009 12:46 AM

12,912 Views

Registered:
03-26-2009

Hi friends,

My apologies if it’s a resolved issue previously but I haven’t found the question/answer in the forum or Internet.

I’m trying to generate a high precise clock of 45.696 MHz (for example) and I need a precision on the order of KHz (it’s not too much ). I have tried using both a Clock Generator within an EDK platform and a DCM component directly. They both generate a clock that is near to the specified but not the most precise: 45.454 MHz.

It has been proved in a Virtex 5 device (in theory, they have the best Clock Management Technology)

It happens because the DCM synthesizes the output frequency by means an integer multiplier (M) and divisor (D).

I think to solve the problem I have to generate the precise clock with custom circuit logic design. I can design a NCO that generate the 45.696 MHz clock from the system clock of 100 MHz and then, I can use it to drive a DCM component which provides its specific clock management features (clock deskew, derived clocks, etc.)

Is this possible? What problems will I have with this approach?

Does anyone have a better idea?? Please, help me!!

Thanks in advance!

Jose

1 Solution

Accepted Solutions

gszakacs

Instructor

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-25-2009 09:57 AM

16,426 Views

Registered:
08-14-2007

What are you really trying to do? If you need a frequency generator that gives you increments

of about 1 KHz, you could use a NCO, but remember that unless you use some sort of analog

filtering technique you will have peak to peak jitter equal to the period of the input clock to the

NCO. This would not be acceptable for driving a DCM. However if the logic that requires the

frequency can live with the jitter you may be able to use it directly.

If you only need to generate one exact frequency or a small number of fixed frequencies,

but you need a clean clock, you can cascade DCMs and PLLs in the Virtex 5. For

example you could use the FX output of a DCM to drive a PLL input and then generate

a frequency based on the product of the two M/D ratios. This gives a much larger

number of achievable frequencies, but requires some work to find the ratios by

factoring the integer ratio you desire.

HTH,

Gabor

-- Gabor

11 Replies

gszakacs

Instructor

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-25-2009 09:57 AM

16,427 Views

Registered:
08-14-2007

What are you really trying to do? If you need a frequency generator that gives you increments

of about 1 KHz, you could use a NCO, but remember that unless you use some sort of analog

filtering technique you will have peak to peak jitter equal to the period of the input clock to the

NCO. This would not be acceptable for driving a DCM. However if the logic that requires the

frequency can live with the jitter you may be able to use it directly.

If you only need to generate one exact frequency or a small number of fixed frequencies,

but you need a clean clock, you can cascade DCMs and PLLs in the Virtex 5. For

example you could use the FX output of a DCM to drive a PLL input and then generate

a frequency based on the product of the two M/D ratios. This gives a much larger

number of achievable frequencies, but requires some work to find the ratios by

factoring the integer ratio you desire.

HTH,

Gabor

-- Gabor

jmpg

Contributor

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-27-2009 01:19 AM - edited 04-27-2009 01:20 AM

12,821 Views

Registered:
03-26-2009

Re: Generating a High Precise clock with logic resources

Thanks a lot for your answer, Gabor.

I have generated the clock with a NCO, and in fact you are right, the jitter is equal to the period of the board clock (100 MHz). I tried to drive a DCM and I obtained the next error:

**************************

*ERROR:NgdBuild:455 - logical net 'clk_65mhz_i' has multiple
driver(s):*

* pin PAD on block
clk_65mhz_i with type PAD,*

* pin DOA<0>
on block*

* Inst_nco_clockgen
/blockXXX/SP.WIDE_PRIM18.SP with*

* type RAMB18 *

* *

*(where 'clk_65mhz_i' is a high precision clock frequency of
65.468 MHz)*

**************************

I only need to generate one exact frequency (and others multiple of this). I’ve already tried with cascade DCMs but I didn’t obtain good results (I think there were errors related to the instantiation of the DCM, the interconnection between them or something like that)

Ok, I will try this approach. I think with a frequency equals to:

*fout = fclk * M1/D1 * M2/D2 * … Mn/Dn *

It will be possible to generate a high precision and clean clock

:smileyhappy:

Best regards,

José MaríaMessage Edited by jmpg on 04-27-2009 01:20 AM

jludvig@sbcglobal.net

Newbie

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-27-2009 09:40 AM

12,800 Views

Registered:
04-27-2009

Re: Generating a High Precise clock with logic resources

Hi,

it sounds like you need to use a classic PLL circuit with a VCO, a charge pump and two dividers.

The latter can be designed with FPGA resources but neither the VCO nor the charge pump can be built

succesfully with circuits available inside FPGAs. Best results can be achieved with VCXOs and RF PLLs

from e.g. Analog Devices etc.. Total cost should be less than $10 and you will get an excellent clock signal.

Alternatively an NCO with sine table and a 16 bit TxDAC plus RF low/bandpass filter plus low noise

RF discriminator can be used. The circuit is widely used in test and measurement equipment but anything

than trivial to design (even though it sounds straight forward, because of its wideband properties it is a lot

harder to clean up than the PLL with VCXO which is by almost all measures easier and better, except that

it does not have the frequency agility of the NCO.

Good luck!

jmpg

Contributor

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-28-2009 05:17 AM

12,776 Views

Registered:
03-26-2009

Re: Generating a High Precise clock with logic resources

Thanks jludvig for your knowledge.

I’ve implemented a clock generator based on two cascade DCM. With only two DCM components it is possible to obtain a frequency with enough precision (error is less than 160 Hz). And this is a clean and stable clock (with a very small jitter)

It wasn’t so difficult (I can say it now), and I’ve written a matlab script to calculate the integer factor (M1/D1*M2/D2) to obtain the high precision frequency

Best regards,

José María

shil_pscies

Visitor

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

09-11-2009 01:43 AM - edited 09-13-2009 10:19 PM

11,897 Views

Registered:
09-11-2009

Re: how to import data to xilinx from matlab

Message Edited by shil_pscies on 09-13-2009 10:19 PM

prabulkanth

Observer

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

01-31-2012 03:49 AM

9,900 Views

Registered:
11-17-2010

Re: Generating a High Precise clock with logic resources

Hi José María,

i am facing trouble in generating precise clocks of 39.2832 Mhz from 100 Mhz input clock.Could you help me with how to go about this using 2 DCM's. Can you share the matlab script to find the M1,M2,D1,D2 integers to achieve this frequency

Prabul

rcingham

Teacher

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

01-31-2012 05:17 AM

9,895 Views

Registered:
09-09-2010

Re: Generating a High Precise clock with logic resources

2 * 9 * 11 * 31 / 5^6

------------------------------------------

"If it don't work in simulation, it won't work on the board."

gszakacs

Instructor

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

01-31-2012 07:42 AM

9,890 Views

Registered:
08-14-2007

Re: Generating a High Precise clock with logic resources

The smallest you can make M and D for a two-DCM cascade would be 93/125 * 66/125

I don't think most DCM's allow numbers this large, but it depends on the FPGA series. The

tough part is to find another integer ratio that may not be exact, but close enough to

the desired ratio that allows smaller M and D. In general it's not a good idea to cascade

more than two DCM's because of jitter.

-- Gabor

-- Gabor

Highlighted
##

Jump to solution

jmpg

Contributor

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

02-01-2012 06:15 AM

9,879 Views

Registered:
03-26-2009

Re: Generating a High Precise clock with logic resources

Hello Prabul,

Depending in with Xilinx family are you using, there may be better options than 2 cascade DCM. I think 2 DCM's option is supported by Vtx4, but for newer FPGA's there are other clock components like PLL's.

Attached is the old / dirty script that I did for this calculation (with 2 DCMs). It uses brute force search of best combination (I think, I don't remember well)

Sorry, it is not commented, but it 's easy to understand :smileywink:

If you can use PLL, I think coregen provides some wizard that automatically calculates the multiplication and division factors.

Best regards,

gszakacs

Instructor

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

02-01-2012 06:27 AM

19,051 Views

Registered:
08-14-2007

Re: Generating a High Precise clock with logic resources

**If you can use PLL, I think coregen provides some wizard that automatically calculates the multiplication and division factors.**

I'm pretty sure that the wizard only calculates factors for a single PLL or DCM. Your script is probably

better when a single ratio doesn't come close enough.

-- Gabor

-- Gabor

zhuzhuxiao

Newbie

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

02-20-2012 12:11 AM

19,033 Views

Registered:
02-20-2012

Re: Generating a High Precise clock with logic resources

but you need a clean clock, you can cascade DCMs and PLLs in the Virtex 5. For

example you could use the FX output of a DCM to drive a PLL input and then generate

a frequency based on the product of the two M/D ratios. This gives a much larger

number of achievable frequencies, but requires some work to find the ratios by

factoring the integer ratio you desire.

______________________________

enjoy game so much!

[url=http://www.storeingame.com/]wow gold[/url] [url=ttp://www.buymaplestory.com/]Buy Maplestory Mesos[/url] [url=http://www.2joygame.com/]WOW Gold[/url]