Forum Discussion
Try to compile your design and simulate it in Modelsim. This way, you can see if the code is written in the correct way.
- RRomano0017 years ago
Contributor
Thank for answer, I spent a lot of time to figure what was wrong, this is a long long time ago flash about.. Hmmm A competitor rewrote old Unix workstation code with M$ tools .. COde was creating a lot of similar mess, input where output and signal not coherent. At last solved with some hack then changed CPLD firm on mass production... They rewrote their tool M$ free.
Why "try" to compile? On release 15.0 of Quartus every IP core was fine, new Linux version are slower.
Current 18.1 Release compile fine, then and elsif selector are both false but result are as elsif true.. Is LRM no more valid or i was wrong for a long time?
I never try see windows version, TOOO SLOW and unreliable.
if elsif elsif end if seems as it is ok.
if elsif else endif seems errant.
TO avoid this I changed structure to nested or case selection.
I cannot rewrite all IP core if this is a tool failure.
I MUST rewrite if I am wrong.
So which one s the offending?
LRM section 8.7 If statement
An if statement selects for execution one or none of the enclosed sequences of statements, depending on the value of one or more corresponding conditions.
if_statement ::=
[ if_label : ]
if condition then
sequence_of_statements
{ elsif condition then
sequence_of_statements }
[ else
sequence_of_statements ]
end if [ if_label ] ;
If a label appears at the end of an if statement, it must repeat the if label.
For the execution of an if statement, the condition specified after if,and any conditions specified after elsif, are evaluated in succession(treating a final else as elsif TRUE then) until one evaluates to TRUE or all conditions are evaluated and yield FALSE. If one condition evaluates to TRUE, then the corresponding sequence of statements is executed; otherwise, none of the sequences of statements is executed.
Best regards.
Roberto