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

Reply

VHDL - Problems with synchronization

 
Thread Tools Search this Thread
Old 01-13-2005, 02:53 PM   #1
Default Problems with synchronization


Hi people out there,

I want to post my following problem hoping that somebody has an answer
and maybe somebody can use this post later when googling.


To the problem:

First clock : 90MHz
Second clock : 30MHz
The clocks can be out of phase or they can be in phase to each other.

My question:
Is the change from s_wait to s_state1 performed
without any problems ? IMO SETUP and HOLD violations can erase
which under circumstances can lead to an unscheduled change.
What possiblities do I have to avoid that ?
Any synchronization method should consume little amount of time.

Thanks in advance.

Rgds
André

-- Generate_ack is synchronous to Clk_90
process(Reset, Clk_90)
begin
if Reset='1' then
l_enable_generate_ack <= '0';
elsif rising_edge(Clk_90) then
l_enable_generate_ack <= l_enable_generate_ack;

if Generate_ack='1' then
l_enable_generate_ack <= '1';
end if;
if l_eop_sync='1' then
l_enable_generate_ack <= '0';
end if;
end if;
end process;

process(Reset, Clk_30)
begin
if Reset='1' then
l_state <= s_wait;
l_eop <= '0';
elsif rising_edge(Clk_30) then
l_state <= l_state;
l_eop <= '0';

case l_state is

when s_wait =>
if l_enable_generate_ack='1' then
l_state <= s_state1;
end if;
when s_state1 =>
if other_condition_30MHz_domain='1' then
l_state <= s_state2;
end if;
when s_state2 =>
l_state <= s_state3;
l_eop <= '1';
when s_state3 =>
l_state <= s_state4;
when s_state4 =>
l_state <= s_state5;
when s_state5 =>
l_state <= s_wait;
end if;
end process;

l_eop_sync is the synchronized l_eop from the 30MHz into the 90MHz
clock domain.


ALuPin
  Reply With Quote
Old 01-13-2005, 03:19 PM   #2
Pieter Hulshoff
 
Posts: n/a
Default Re: Problems with synchronization
ALuPin wrote:
> Is the change from s_wait to s_state1 performed
> without any problems ? IMO SETUP and HOLD violations can erase
> which under circumstances can lead to an unscheduled change.


No, it is not performed without problems. The signal l_enable_generate_ack
needs to be synchronized to the 30 MHz domain before using it. Otherwise
you can get very unexpected behaviour in your eventual chip.

> What possiblities do I have to avoid that ?
> Any synchronization method should consume little amount of time.


Clock the signal twice on the 30 MHz signal, and use that signal instead.
You can also opt for clocking three times, and use the 2nd and 3rd FF to do
edge detection.

Regards,

Pieter Hulshoff



Pieter Hulshoff
  Reply With Quote
Old 01-14-2005, 07:22 AM   #3
Thomas Reinemann
 
Posts: n/a
Default Re: Problems with synchronization
ALuPin wrote:


> l_enable_generate_ack <= l_enable_generate_ack;
> l_state <= l_state;



What is the intention of this both lines? I assume a signal value will be
unchanged if it isn't assigned a new value.

Bye Tom



Thomas Reinemann
  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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Pioneer DVR-105 and Nero Problems grams@oldtown.com DVD Video 1 08-12-2003 04:17 AM
Re: Pioneer DVR-105 and Nero Problems Ron DVD Video 1 08-08-2003 06:33 PM
Re: Pioneer DVR-105 and Nero Problems Flossie DVD Video 0 08-07-2003 02:25 PM
Re: Pioneer DVR-105 and Nero Problems Flossie DVD Video 0 08-07-2003 08:11 AM
Re: Pioneer DVR-105 and Nero Problems CAM DVD Video 0 08-07-2003 02:30 AM




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