Syntax
[Label:] if Condition then
SequentialStatements...
[elsif Condition then
SequentialStatements...]
... {any number of elsif parts}
[else
SequentialStatements...]
end if [Label];
NOTE: Be careful about the spelling of elsif and end if.
Synthesis
• Assignments within if statements generally synthesize to multiplexers.
• Incomplete assignments, where outputs remain unchanged for certain input conditions, synthesize to transparent latches in unclocked processes, and to flip-flops in clocked processes.
• In some circumstances, nested if statements synthesize to multiple logic levels. This can be avoided by using a case statement instead.
• A set of elsif branches can be used to impart priority to the conditions tested first.
• To decode a value without giving priority to certain conditions, use a case statement instead.
Example
IF (x
temp := "11110000";
ELSE temp:=(OTHERS =>'0');
information shared by www.irvs.info
No comments:
Post a Comment