if else use in Verilog and event, provide reason

Status
Not open for further replies.

sun_ray

Advanced Member level 3
Joined
Oct 3, 2011
Messages
772
Helped
5
Reputation
10
Reaction score
5
Trophy points
1,298
Visit site
Activity points
6,828
Are these following events allowed in if-else
in Verilog? If not please provide the reason.


If (posedge clk)
q<= d;

Regards
 

Short answer quoted from IEEE 1800-2012:
(...) an edge can trigger a flip-flop, but the state of the edge cannot be
ascertained, i.e., if (posedge clock) is illegal.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…