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

FPGA Central

World's 1st FPGA Portal

 

Go Back   FPGA Groups > NewsGroup > Verilog

Verilog comp.lang.verilog newsgroup / usenet

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-28-2007, 03:50 PM
Amir
Guest
 
Posts: n/a
Default synchronizer in verilog

Hi ,
I am trying to write a synchronizer in verilog, which will synchronize
between 2 clocks,
a signal, lets call it, "set_done" is assreted and driven by a state
machine that works with the high frequency clock and other state
machine that works with the low frquency clock should read it and de-
asseret it.
as much as I know that the state machines can't write-read to/from the
same register.
do you have any ideas how can I implement it ?
thanks in advance
-Amir
Reply With Quote
  #2 (permalink)  
Old 11-28-2007, 05:54 PM
John_H
Guest
 
Posts: n/a
Default Re: synchronizer in verilog

On Nov 28, 6:50 am, Amir <sting...@gmail.com> wrote:
> Hi ,
> I am trying to write a synchronizer in verilog, which will synchronize
> between 2 clocks,
> a signal, lets call it, "set_done" is assreted and driven by a state
> machine that works with the high frequency clock and other state
> machine that works with the low frquency clock should read it and de-
> asseret it.
> as much as I know that the state machines can't write-read to/from the
> same register.
> do you have any ideas how can I implement it ?
> thanks in advance
> -Amir


A technique I've used extensively uses a request and ack approach.
The "set_done" signal you want is an XOR from two flops in the
different clock domains. To assert the set_done, the flop in the set
domain is set to the invert of the flop in the ack domain. To ack
from the other time domain, the flop in that domain is set to the
value of the flop in the first domain. Both domains can look at the
XOR and get the "set_done" polarity. You only need to make sure your
system is designed to avoid issuing a set before the previous set has
been acked.

- John_H
Reply With Quote
  #3 (permalink)  
Old 11-28-2007, 06:24 PM
Mike Treseler
Guest
 
Posts: n/a
Default Re: synchronizer in verilog

Amir wrote:

> I am trying to write a synchronizer in verilog, which will synchronize
> between 2 clocks,
> a signal, lets call it, "set_done" is assreted and driven by a state
> machine that works with the high frequency clock and other state
> machine that works with the low frquency clock should read it and de-
> asseret it.
> as much as I know that the state machines can't write-read to/from the
> same register.
> do you have any ideas how can I implement it ?


I would use a synchronized handshake:

fast _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
data ___-----valid--------_________
ready ___------------------_________

slow __----____----____----____----____----
ack __________----------------____________
ackQ __________________----------------____
data __________________--valid---------

-- Mike Treseler
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
Synchronizer theory and question [email protected] Verilog 7 12-07-2006 06:55 PM
2 FF synchronizer himassk Verilog 1 09-07-2006 06:56 PM


All times are GMT +1. The time now is 01:39 AM.


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