Go Back   Velocity Reviews > Newsgroups > VHDL
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

VHDL - using both rising edge and falling edge of signal

 
Thread Tools Search this Thread
Old 11-14-2008, 01:51 PM   #1
Default using both rising edge and falling edge of signal


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.


denish
  Reply With Quote
Old 11-14-2008, 03:01 PM   #2
Tricky
 
Posts: n/a
Default Re: using both rising edge and falling edge of signal
On 14 Nov, 13:51, denish <dinesh.twanab...@gmail.com> wrote:
> *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.


Tricky
  Reply With Quote
Old 11-14-2008, 04:50 PM   #3
Eli Bendersky
 
Posts: n/a
Default Re: using both rising edge and falling edge of signal
On Nov 14, 3:51*pm, denish <dinesh.twanab...@gmail.com> wrote:
> *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


Eli Bendersky
  Reply With Quote
Old 11-14-2008, 06:29 PM   #4
Mike Treseler
 
Posts: n/a
Default Re: using both rising edge and falling edge of signal
denish wrote:
> 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


Mike Treseler
  Reply With Quote
Old 11-15-2008, 01:15 PM   #5
jeppe
Senior Member
 
Join Date: Mar 2008
Location: Denmark
Posts: 245
Default
How about using a 200 kHz master clock internal - just a suggestion

Jeppe


jeppe
jeppe is offline   Reply With Quote
Old 11-17-2008, 07:12 PM   #6
Andy
 
Posts: n/a
Default Re: using both rising edge and falling edge of signal
On Nov 14, 9:01*am, Tricky <Trickyh...@gmail.com> wrote:
> 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



Andy
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46