using both rising edge and falling edge of signal

D

denish

i generated a signal that has a frequency of 100 kHz using master
clock.
and now i want to use both the rising and falling edge of this signal
as a condition in states. will this be synthesizable. or i need to use
the level triggering instead of using edge trigerring.
 
T

Tricky

 i generated a signal that has a frequency of 100 kHz using master
clock.
and now i want to use both the rising and falling edge of this signal
as a condition in states. will this be synthesizable. or i need to use
the level triggering instead of using edge trigerring.

Edge triggering implies it is a clock. If you're thinking about using
this on an FPGA you'll run into 2 main problems:

1. FPGAs like to run all their registers off global clocks
2. FPGAs only like to use a single edge of the clock.

I would recommend using your 100KHz signal as an enable to registers,
not actually clocking them.
 
E

Eli Bendersky

 i generated a signal that has a frequency of 100 kHz using master
clock.
and now i want to use both the rising and falling edge of this signal
as a condition in states. will this be synthesizable. or i need to use
the level triggering instead of using edge trigerring.

For the most maintainable and safe code, don't use this signal to
clock your registers directly. Rather, clock all FFs with you FPGA's
(I assume you're not developing an ASIC) main clock, and sample this
signal, detect its rising and falling edges and use this sampled
information as an enable.

Eli
 
M

Mike Treseler

denish said:
i generated a signal that has a frequency of 100 kHz using master
clock.
and now i want to use both the rising and falling edge of this signal
as a condition in states. will this be synthesizable. or i need to use
the level triggering instead of using edge trigerring.

I would use only the master clock, like this

master clk _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-

gen signal -------________--------________-------

shifter 0 1 3 3 2 0 0 0 1 3 3 3 2 0 0 0 1 3 3

rise ___--____________--______________--____

fall _________--______________--____________

-- Mike Treseler
 
A

Andy

1. FPGAs like to run all their registers off global clocks
2. FPGAs only like to use a single edge of the clock.

I would recommend using your 100KHz signal as an enable to registers,
not actually clocking them.

I agree with this except #2. FGPAs can use either edge of a clock just
as easily, just not both edges on the same register. Nor is this
limitation unique to FPGAs.

There are ways to implement dual clock edged behavior using single
clock edged registers, but that is getting too far off topic.

Like the other posters said, sample and detect rising and falling
edges of the slower clock using the faster, master clock.

Andy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top