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, 65 guest(s) and 0 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 

how to check duty cycle?

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


Joined: Sep 06, 2006
Posts: 24

PostPosted: Sun Nov 23, 2008 10:08 pm    Post subject: how to check duty cycle? Reply with quote

Is there a system task that can check the duty cycle?
Back to top
View user's profile
lshj98115
Senior
Senior


Joined: Sep 06, 2006
Posts: 24

PostPosted: Mon Nov 24, 2008 7:42 am    Post subject: Reply with quote

malvika:
I think your suggestion is unresonable.
how can you get the duty cycle check by limiting the minimum value ?


malvika10 wrote:
$period can be used to check the timeperiod voilation
$width can be used to check the high time and low time voilation.

if both are used will give you sort of duty cycle voilation check.
Back to top
View user's profile
alexg
Senior
Senior


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

PostPosted: Mon Nov 24, 2008 9:47 am    Post subject: Reply with quote

Here is an example of duty cycle check:

Code:
module test;

reg clk = 0;
always #10 clk = ~clk;

time rise, fall;
integer duty;

always @(clk) begin
  if (clk) rise <= $time;
  else begin
    fall <= $time;
    duty = ($time - rise)*100/($time - fall);
    if (duty < 45 | duty > 55)
      $display($time, " Duty cycle error, d = %0d", duty);
  end
end

initial #100 $finish;

endmodule


-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.123 Seconds