Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to solve this frequency comparator task?

Status
Not open for further replies.

ashish.master2

Newbie level 5
Joined
Jan 4, 2010
Messages
9
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,333
problem statement is in the image attached


1.png
 

Re: frequency comparator

a naive approach would be to do make two counters for two clocks and let them count in each clock frequency. Run the counter for a fixed number of cycles of system clock. See if the the two counts are equal or unequal.

I hope it helps. Seniors like FvM and others can correct me.

Kind Regards,
 

Re: frequency comparator

This is likely the function of one of the phase detectors used in the Phase-Locked Loop (PLL), perhaps you can find it by yourself.
 

Operating the counters in different clock domains, although basically possible, creates serious data consistency problems when comparing the values. The fast system clock point suggests to run the logic exclusively in the system clock domain. You have to synchronize both asynchronous clocks to the system clock domain and then detect their edges and count them.

A PFD (phase frequency detector) state machine hasn't the primary purpose to detect frequency differences, because the PLL is mainly controlled by phass difference. The frequency detector is needed to achieve locking with large frequency deviations. But it doesn't directly detect smaller frequency differences.
 

You are right FvM. When I have closely analyzed various edge detectors, I found out that none can solve this problem.
To pass my time, I am trying to build one in my own way. The challenge is to get the exact output in the shortest time. When two frequencies are very close, their phase difference looks as being constant for too many periods.
In general, an optimum solution for a block couldn't be found if its application (its end purpose) is not well defined.
 
  • Like
Reactions: FvM

    FvM

    Points: 2
    Helpful Answer Positive Rating
The challenge is to get the exact output in the shortest time. When two frequencies are very close, their phase difference looks as being constant for too many periods.
In general, an optimum solution for a block couldn't be found if its application (its end purpose) is not well defined.
I agree with the latter. In fact, it doesn't make much sense to discuss the point more detailed without an exact specification. The exercise text doesn't give it.

Perhaps it's useful to refer to general frequency measurement. You get the fastest result by measuring the duration of a single period, the resolution is however limited by the timebase to input clock ratio. To increase it, you have to go for a multi period measurement.
 
  • Like
Reactions: KerimF

    KerimF

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top