Verification Guild
A Community of Verification Professionals

 Create an AccountHome | Calendar | Downloads | FAQ | Links | Site Admin | Your Account  

Login
Nickname

Password

Security Code: Security Code
Type Security Code
BACKWARD

Don't have an account yet? You can create one. As a registered user you have some advantages like theme manager, comments configuration and post comments with your name.

Modules
· Home
· Downloads
· FAQ
· Feedback
· Recommend Us
· Web Links
· Your Account

Advertising

Who's Online
There are currently, 64 guest(s) and 1 member(s) that are online.

You are Anonymous user. You can register for free by clicking here

  
Verification Guild: Forums

 Forum FAQForum FAQ   SearchSearch   UsergroupsUsergroups   ProfileProfile  ProfileDigest    Log inLog in 

Generation of clock

 
Post new topic   Reply to topic    Verification Guild Forum Index -> Main
View previous topic :: View next topic  
Author Message
naajila
Senior
Senior


Joined: Nov 30, 2010
Posts: 30

PostPosted: Wed Mar 09, 2011 11:27 am    Post subject: Generation of clock Reply with quote

I want to create one Monitor which recieves a clock1 from RTL.
Again i have to reciev eone more signal x from RTL .When x becomes 1, "data" has to be collected at both posedge as well as negedge of clock1.

x may come at any time (either at posedge or negedge or in middle of these edges of clock1)..When it comes 1,immediately at next edge(may be posedge or negedge) i have to collect data.

So i want to generate one more clock clk2 in my monitor whcih has the time period exactly half of clock1.

My intension to generate clk2 ::: To collect the data always at posedge of clk2 so that i dont have any confusion of posedge or negedge of clk1.

Can anybody write a logic to generate this clk2 and it should be in synchronization with clk1.?
Back to top
View user's profile
alexg
Senior
Senior


Joined: Jan 07, 2004
Posts: 586
Location: Ottawa

PostPosted: Wed Mar 09, 2011 1:43 pm    Post subject: Reply with quote

Not sure why you need a second clock.

This code may be sufficient for your needs:

Code:
always @(clk1) if(x) begin
  d1 <= data;
  @(clk1) d2 <= data;
end


-Alex
Back to top
View user's profile Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Verification Guild Forum Index -> Main All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Verification Guild © 2006 Janick Bergeron
Web site engine's code is Copyright © 2003 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.212 Seconds