Hello Guys
I need to get the below event control clarification in always_ff.
Statement1–> always_ff @(posedge clk, negedge rst) // this works fine
Statement2–> always_ff @(posedge clk or negedge rst) // same as above
Statement3–> always_ff @(posedge (clk || rst ))
Statement4–> always_ff @(posedge clk || rst) // both the statements executes
Statement5–> always_ff @(posedge clk || negedge rst) //is a syntax error
Question 1 :
Can someone please explain the difference between above 5 statements and why the statemnet5 is an error, is it just a syntax error or some logical error.
Question 2 :
LRM of SV says, “The always_ff procedure imposes the restriction that it contains one and only one event control and no blocking timing controls.”
Then how does it is a single event control for statement 1 and 2 which is getting evaluated on both posedge clk and negedge rst??
Question 3 :
If all the above statements are single event controls, when @ is considered for event trigger, can always block have more than 1 event controls, if so how??
Thanks
Manjush