The If Generate Statement lists a series of behavioral statements that are activated after the positive evaluation of an arithmetic expression.
The following example shows an If Generate Statement:
IF DEVICE_FAMILY == "FLEX®6000" GENERATE c = 6kadder(a, b, cin); ELSE GENERATE c = otheradder(a, b, cin); END GENERATE;
|This example uses the predefined Altera® parameter
The If Generate Statement has the following characteristics:
enclose the arithmetic expression to be evaluated and are followed by one
or more behavioral statements, each of which ends with a semicolon (
These statements are activated if the expression is true.
ELSE GENERATE are followed by one or more behavioral
statements, each of which ends with a semicolon. These statements are activated
if the arithmetic expression is false.
END GENERATE and a semicolon (
end the If Generate Statement.
Back to Top
- Altera -
|Created by chm2web html help conversion utility.|