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.

who can explain this question for me?

Status
Not open for further replies.

dolby.yang

Member level 4
Joined
Mar 2, 2005
Messages
73
Helped
10
Reputation
20
Reaction score
2
Trophy points
1,288
Activity points
1,862
hi:who can explain this question for me?
Q: Given the following snipet of Verilog code,
draw out the waveforms for clk and a

always @(clk) begin
a = 0;
#5 a = 1;
end

A:

10 30 50 70 90 110 130
___ ___ ___ ___ ___ ___ ___
clk ___| |___| |___| |___| |___| |___| |___| |___


a ___________________________________________________________


This obviously is not what we wanted, so to get closer, you could use
"always @ (posedge clk)" instead, and you'd get

10 30 50 70 90 110 130
___ ___ ___ ___ ___ ___ ___
clk ___| |___| |___| |___| |___| |___| |___| |___

___ ___
a _______________________| |___________________| |_______


Thank you!
 

the answer is not correct.
you can simulate it.
 

ok,thanks a lot.i will try to sim it .
i see this Q from h**p://grumpytom.com/Interview_Questions/questions.html
.
 

description is not clear, simulate it then you can find the result is wrong
 

in alway ,it is a good habit to use "<="
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top