Altera_Forum
Honored Contributor
11 years agoVerilog syntax if statement
what is the correct syntax for if statement with multiple conditions?
I've written(which works):always@(posedge iGO or negedge iRST)//on key press event
begin
if(!iRST)
go_en <= 0;
else if (done == 1)
go_en <= 0;
else
begin
if(iGO) //if go key pressed enable ADC
go_en <= 1;
end
end but i wonder what is the syntax to write it as: always@(posedge iGO or negedge iRST)//on key press event
begin
if(!iRST or (done == 1) )
go_en <= 0;
else
begin
if(iGO) //if go key pressed enable ADC
go_en <= 1;
end
end