samedi 18 avril 2015

Always Blocks with multiple sensitivities


Vote count:

0




I am trying to implement an FSM that reacts to either one of two buttons being pressed. Let's call these buttons A and B. What I want is something like:



always@(posedge A or posedge B) begin
if(A) begin **do one thing**
end else if (B) begin **do another**
end
end


The situation I am scared of is the case when, for example, the user is holding down button A and then presses B. The if statement would detect that A is high, when the actual sensitive parameter I want a reaction to is B. How can I do this in Verilog?



asked 1 min ago







Always Blocks with multiple sensitivities

Aucun commentaire:

Enregistrer un commentaire