Matrix_YL
Advanced Member level 4
HI all
I meet a weird thing in my design when I want to implement a state machine by use ( if …elsif…elsif…else)
when RNW=1 ModelSim show that logic works fine then state_next will be Recieve. but when RNW=0 the logic will take no account of Finish Failure value and state_next will be Failure.for example Failure =0 and Finish =1 ModelSim will show the state_next will be Failure
now I wondered use if …elsif…elsif…else sentence will meet some problem .
Can you tell me why this would be happen ? any suggestion to substitute this my problem code .
thx in advance
I meet a weird thing in my design when I want to implement a state machine by use ( if …elsif…elsif…else)
Code:
when Waiting =>
if RNW='1' then
state_next<=Receive;
elsif Finish = '1' then
state_next<=Finish;
elsif Failure<='1' then
state_next<=Failure;
else
state_next<=Waiting;
end if;
now I wondered use if …elsif…elsif…else sentence will meet some problem .
Can you tell me why this would be happen ? any suggestion to substitute this my problem code .
thx in advance