FPGA Central - World's 1st FPGA / CPLD Portal

FPGA Central

World's 1st FPGA Portal

 

Go Back   FPGA Groups > NewsGroup > VHDL

VHDL comp.lang.vhdl newsgroup / Usenet

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-25-2007, 07:59 PM
[email protected]
Guest
 
Posts: n/a
Default PLL Lock Detect

Hi,

Not really an (v)HDL specific question, but hopefully there is someone
who can suggest a starting point.

I need to (digitally) generate a lock detect signal for a PLL.

Where do I start?

I assume I would count edges at both the O/P and reference clock and
then compare the two count values. This leads to a couple of
questions.
- I want the counts to be the same when the PLL is locked. Therefore I
need to restart the counts together
- The counts should be the same for N clock cycles before lock becomes
active, but we should loose lock when the counts become different.

Any suggestions or pointers greatly appreciated.

Thanks,

Steven

Reply With Quote
  #2 (permalink)  
Old 09-27-2007, 04:33 PM
A[email protected]
Guest
 
Posts: n/a
Default Re: PLL Lock Detect

On 25 Sep., 19:59, moo...@yahoo.co.uk wrote:
> Hi,
>
> Not really an (v)HDL specific question, but hopefully there is someone
> who can suggest a starting point.
>
> I need to (digitally) generate a lock detect signal for a PLL.
>
> Where do I start?
>
> I assume I would count edges at both the O/P and reference clock and
> then compare the two count values. This leads to a couple of
> questions.
> - I want the counts to be the same when the PLL is locked. Therefore I
> need to restart the counts together
> - The counts should be the same for N clock cycles before lock becomes
> active, but we should loose lock when the counts become different.
>
> Any suggestions or pointers greatly appreciated.
>
> Thanks,
>
> Steven


Is it an FPGA internal PLL or an external ?

Rgds
Andre

Reply With Quote
  #3 (permalink)  
Old 09-28-2007, 12:27 PM
[email protected]
Guest
 
Posts: n/a
Default Re: PLL Lock Detect

On 27 Sep, 16:33, "ALu...@web.de" <ALu...@web.de> wrote:
> On 25 Sep., 19:59, moo...@yahoo.co.uk wrote:
>
>
>
> > Hi,

>
> > Not really an (v)HDL specific question, but hopefully there is someone
> > who can suggest a starting point.

>
> > I need to (digitally) generate a lock detect signal for a PLL.

>
> > Where do I start?

>
> > I assume I would count edges at both the O/P and reference clock and
> > then compare the two count values. This leads to a couple of
> > questions.
> > - I want the counts to be the same when the PLL is locked. Therefore I
> > need to restart the counts together
> > - The counts should be the same for N clock cycles before lock becomes
> > active, but we should loose lock when the counts become different.

>
> > Any suggestions or pointers greatly appreciated.

>
> > Thanks,

>
> > Steven

>
> Is it an FPGA internal PLL or an external ?
>
> Rgds
> Andre


It's not an FPGA, it's an ASIC.

Thanks,

Steven

Reply With Quote
  #4 (permalink)  
Old 09-28-2007, 12:39 PM
Jonathan Bromley
Guest
 
Posts: n/a
Default Re: PLL Lock Detect

On Fri, 28 Sep 2007 03:27:44 -0700, [email protected] wrote:

>> > Not really an (v)HDL specific question, but hopefully there is someone
>> > who can suggest a starting point.

>>
>> > I need to (digitally) generate a lock detect signal for a PLL.

>>
>> > Where do I start?

>>
>> > I assume I would count edges at both the O/P and reference clock and
>> > then compare the two count values. This leads to a couple of
>> > questions.
>> > - I want the counts to be the same when the PLL is locked. Therefore I
>> > need to restart the counts together
>> > - The counts should be the same for N clock cycles before lock becomes
>> > active, but we should loose lock when the counts become different.


[...]

>It's not an FPGA, it's an ASIC.


For a PLL to be in lock, you need at least the following to
be true:
- the rate of change of phase-error (i.e. the frequency slip)
should be very close to zero
- the phase error should be very close to zero
- these two conditions should be stable, i.e. they should
have persisted continuously for the last so long

If it's a reasonably high-speed analog PLL then the first two
values can presumably be extracted analog fashion, and the third
criterion is easy with a simple digital filter.

If it's a purely digital PLL (as used, for example, in recovery
of slow serial data streams) then I would imagine that the
necessary error values are explicit somewhere in the DPLL itself.

If you're trying to do all this from outside the PLL, with no
knowledge of its internals, then (a) shoot the PLL designer for
not providing an in-lock output, (b) pretty much as you suggest:
start two counters at zero, use one of the two clocks to count
each, and then wait for one of them to overflow around to zero;
at that moment, the value of the second counter (treated as
a signed 2s complement number) is proportional to the
average frequency slip. That's a crummy way to detect PLL
lock, though, because it integrates the frequency over
such a long time.

Or have I completely missed the point?
--
Jonathan Bromley, Consultant

DOULOS - Developing Design Know-how
VHDL * Verilog * SystemC * e * Perl * Tcl/Tk * Project Services

Doulos Ltd., 22 Market Place, Ringwood, BH24 1AW, UK
[email protected]
http://www.MYCOMPANY.com

The contents of this message may contain personal views which
are not the views of Doulos Ltd., unless specifically stated.
Reply With Quote
  #5 (permalink)  
Old 10-02-2007, 09:53 AM
[email protected]
Guest
 
Posts: n/a
Default Re: PLL Lock Detect

On 28 Sep, 12:39, Jonathan Bromley <jonathan.brom...@MYCOMPANY.com>
wrote:
> On Fri, 28 Sep 2007 03:27:44 -0700, moo...@yahoo.co.uk wrote:
> >> > Not really an (v)HDL specific question, but hopefully there is someone
> >> > who can suggest a starting point.

>
> >> > I need to (digitally) generate a lock detect signal for a PLL.

>

SNIP
>
> If you're trying to do all this from outside the PLL, with no
> knowledge of its internals, then (a) shoot the PLL designer for
> not providing an in-lock output, (b) pretty much as you suggest:
> start two counters at zero, use one of the two clocks to count
> each, and then wait for one of them to overflow around to zero;
> at that moment, the value of the second counter (treated as
> a signed 2s complement number) is proportional to the
> average frequency slip. That's a crummy way to detect PLL
> lock, though, because it integrates the frequency over
> such a long time.
>
> Or have I completely missed the point?
> --


Hi Jonathan,

You haven't missed the point, and your suggestion pretty much sums up
my thoughts.

Unfortunately, shooting the PLL designer is not an option ;-)

Thanks for the feedback,

Steven

Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can FPGAs inputs detect low currents? Marc Weber FPGA 5 06-27-2007 01:27 PM
Detect failure in Berlekamp algorithm [email protected] FPGA 0 08-22-2006 05:00 PM
Compiler can't detect std_logic_1164 package [email protected] FPGA 7 08-15-2006 11:03 AM
SPD interface(Serial presence detect) [email protected] FPGA 9 06-30-2005 06:01 AM
how to detect inout contention black Verilog 2 10-30-2003 12:24 AM


All times are GMT +1. The time now is 01:08 AM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Copyright 2008 @ FPGA Central. All rights reserved