IF-scheme Example-- Notes Page -- |
The example here uses the IF-scheme GENERATE statement to make a
modification to the and_gate array. The seventh gate of the
array will be an or_gate when the GENERATE statement runs. In
this example, the or_gate will need to have the same type of
interface as the and_gate. The rest of the array is generated
when the G3 generate block runs.
Another example use of the IF-scheme GENERATE is in the conditional
execution of timing checks. Timing checks can be incorporated inside
a GENERATE IF-scheme. For example, the following statement can be
used:
Check_time : IF TimingChecksOn GENERATE
This allows the boolean variable TimingChecksOn to disable
timing check simulation. This parameter can be set in a package or
passed as a generic and can improve simulation speed by shutting off
this computational section.