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.

[help] about CLK in the GAL

Status
Not open for further replies.

hurricane

Newbie level 5
Joined
Mar 16, 2005
Messages
9
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,342
normally, a digital logic should be syncronoused, I want to know it has to be?

I have a case:

input of the logic is mechanical sensor for distance. the value of this very be stable when we read it. the function of the logic is just convert the value out of the sensor into a readable one.

In this case, I think a clock is not necessary since logic is always working when the input siganl is stable. Is my idea right?

what is the basic rule to choose using or not using a clock for GAL?

thanks
 

Hi Hurricane,

If you build a ripple counter (asynchronous), then when the input changes to increase the count, the counter registers will go through a sequence of changes, with each register clocking the next one, until the final result is obtained.

Each of these intermediate register changes lasts for a finite time - if you use the output, you will see values that are not 'correct' until all the registers have finished toggling.

That is where a synchronous counter is useful - all the registers change state together to give a final value - there are no intermediate values.

Whether you need a clock (or synchronous counter) depends on what you are doing with the counter output. If you are driving just an LED display for instance, the brief intermediate results do not matter. If you are using the counter to divide a signal and compare it, to produce another output that could be considered a clock, then you must use a synchronous counter. Also, if you are reading the counter with a microcontroller or similar, you might read the intermediate values unless you have a 'count ready' signal, or clock.

Does this help? If not, please give some more detail of what you are trying to do.

I am learning CPLD's and have just designed from logic gates (not in HDL) a frequency/period counter that uses four 32-bit counters - one synchronous to divide a clock into multiple slower clocks, and three asynchronous with 'count finished' signals to the MCU.

Cheers,
FoxyRick.
 

    hurricane

    Points: 2
    Helpful Answer Positive Rating
Hi,

Nothing is stable in the real world.

You need to think about all kind of noises in your design, especially with mechanical sensors. So if you want stable signal you need some kind of deglitcherizer.

If you use asynchronous signal you to deglitcherize your signal with synchronuos digital circuit or with simple RC circuit. With RC circuit you don't need clock but you need to adjust RC constatnt.

With synchronous circuit design you don't need any RC element. So you decide.
 

    hurricane

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

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top