Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Interview Question: Verilog Code To Find Duration Of Clock

Status
Not open for further replies.

spartanthewarrior

Full Member level 2
Joined
Jun 13, 2007
Messages
122
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,296
Activity points
2,142
Hi All,

Can anybody help me answering a question.

Note:- Don't as Jitter, Set-Up, Hold Time Values. I need Verilog logic.

How can i find a duration of a given (Clock) using Verilog. There are two cases when

1) Duty Cycle is 50%

2) Duty Cycle is 30%

Please help me it's important
 

It should look something like this:

initial begin
#500; // wait clock to be stable
@(posedge clk) t1 = $time;
@(posedge clk) t2 = $time;
$write ("The period is : %t", t2-t1);
end
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top