FPGA Central - World's 1st FPGA / CPLD Portal

FPGA Central

World's 1st FPGA Portal

 

Go Back   FPGA Groups > NewsGroup > FPGA

FPGA comp.arch.fpga newsgroup (usenet)

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-06-2004, 01:48 PM
ALuPin
Guest
 
Posts: n/a
Default Changing clock domain

Hi,

following question:

I have a signal in an 48MHz clock domain, it is high for exactly one clock
cycle.
Now I want to pass it to an 90MHz clock domain where the synchronized signal
should also be high for one 90MHz clock cycle.
Is the following approach reasonable?



signal l_valid_48 : std_logic; -- high for one 48MHz clock cycle
signal l_valid_h1 : std_logic;
signal l_valid_h2 : std_logic;
signal l_valid_h3 : std_logic;
signal l_valid_90 : std_logic; -- should be high for one 90MHz clock cycle

process(Reset, Clk_90)
begin
if Reset='1' then
l_valid_h1 <= '0';
l_valid_h2 <= '0';
l_valid_h3 <= '0';

elsif rising_edge(Clk_90) then
l_valid_h1 <= l_valid_48;
l_valid_h2 <= l_valid_h1;
l_valid_h3 <= l_valid_h2;
end if;
end process;

process(l_valid_h2, l_valid_h3)
begin
l_valid_90 <= '0';

if ((l_valid_h2='1') and (l_valid_h3='0')) then
l_valid_90 <= '1';
end if;
end process;


I would appreciate your opinion.

Rgds
Reply With Quote
  #2 (permalink)  
Old 10-06-2004, 02:05 PM
Pieter Hulshoff
Guest
 
Posts: n/a
Default Re: Changing clock domain

ALuPin wrote:
> process(Reset, Clk_90)
> begin
> if Reset='1' then
> l_valid_h1 <= '0';
> l_valid_h2 <= '0';
> l_valid_h3 <= '0';
>
> elsif rising_edge(Clk_90) then
> l_valid_h1 <= l_valid_48;
> l_valid_h2 <= l_valid_h1;
> l_valid_h3 <= l_valid_h2;
> end if;
> end process;
>
> process(l_valid_h2, l_valid_h3)
> begin
> l_valid_90 <= '0';
>
> if ((l_valid_h2='1') and (l_valid_h3='0')) then
> l_valid_90 <= '1';
> end if;
> end process;


The 3 FF approach is a good one, but you should create the i_valid_90 on the
clock as well. Just put the combinatorial statements within your clocked
process, and I think it should work just fine.

Regards,

Pieter Hulshoff

Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Single clock pulse transfer b/w clock domain himassk Verilog 3 05-18-2007 08:10 AM
Xilinx V2P: DCM and changing input clock Sean Durkin FPGA 8 05-24-2004 05:40 PM
hold violation cause by crossing clock domain BlackSim FPGA 1 02-02-2004 05:24 PM


All times are GMT +1. The time now is 07:16 PM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Copyright 2008 @ FPGA Central. All rights reserved