10. Deciding which recipe to use

The InTime flow is executed using Tcl scripts called Recipes. These scripts abstract the flow details and allows you to run different variations of the InTime flow through a one-button-click approach. For an overview of the InTime flow, see The InTime Flow.

InTime ships with ready-to-use recipes. Each recipe attempts to reach the design goal in a different way, and knowing which recipe to run for a specific design stage or problem is important. To start a recipe in the InTime GUI, just click the Start InTime button.

When using command line mode, use the following commands.

# List the available recipes:
plunify> flow recipes list
"intime_default" "placement_seed_exploration" ...

# Run a recipe:
plunify> flow run_recipe intime_default

10.1. Machine Learning Approach

InTime provides a new approach in achieving timing closure without making changes to a design’s RTL. To demonstrate this approach and how it can be used as a guideline when selecting which recipes to run on your design, consider a common conventional approach which is to try multiple seeds (or otherwise random design space searches) of the vendors’ implementation algorithms.

When using InTime, the way to view randomized approaches like seeds is to see them as probabilities. For example, when exploring 1 to 100 seed values, a variance in the results will occur. This variance determines the probability of meeting timing. For instance, if the original Total Negative Slack (TNS) is -1000 and the variance is 100, then seeds are very unlikely to achieve timing closure.

InTime’s approach is to improve the TNS to a suitable level, for example, -100 and then try Extra Optimization or Placement Seeds. This way, there is a greater chance of meeting timing. This approach is shown in Figure 143.

_images/recipes_multiple_jobs_analysis.png

Figure 143: Demonstrating InTime’s Approach To Timing Closure

Using this approach, the Machine Learning Recipes should be used to improve the original TNS first, followed by Next Steps Recipes.

Note

In FPGA tools where the concept of seeds does not exist, InTime’s machine learning recipes should still be used to improve the original TNS followed by the “Next Steps” recipes (which use techniques other than random seeds).

10.2. Machine Learning Recipes

These recipes, also referred to as educated recipes, uses the InTime machine learning capabilities to learn from previous results’ training data and produce smarter strategies on subsequent runs.

When running these recipes, InTime derives the optimal combination of settings by using machine learning to understand the correlations between your design, the settings, the device and sometimes, your FPGA tool version.

This is enabled by running multiple compilations of the design in parallel and in different stages. With the results, the learning algorithms analyze the data, learn from them and save them into the runs database. This means that the next time an educated recipe is run on a design, InTime already knows which settings are good for that design.

10.2.1. InTime Default Recipe

This recipe performs first time calibration, exploration and optimization on a design. This recipe is a good recipe to use on designs which are run within with InTime for the first time, as well as designs which have previously been run in InTime but still require further machine learning optimization before switching to the Next Steps Recipes.

The expected project history after running this with a default flow configuration (3 rounds, 10 runs per round) can be seen in the project history shown in Figure 144.

_images/project_history_intime_default.png

Figure 144: Expected Results Of InTime Default Recipe

This recipe is a multi-round recipe which runs multiple iterations of the The InTime Flow. The recipe starts off with a calibration round (job 34), followed by an exploration round (job 35) which is then followed by an optimization round (job 36). If more than 3 rounds are run, the subsequent runs will be continue learning rounds. After learning has completed, the recipe will set the best result from the previous round(s) as the parent of the new round (calibrate_1 in the expected results).

After each round InTime’s machine learning algorithms will learn from the newly generated results, causing smarter strategies to be generated for the next round. The effect of machine learning on a design can be visualized using the Multiple Job Analysis plot in InTime’s “Results Analysis” mode. This plot for the expected results shown is shown in Figure 145.

_images/multiple_job_analysis_intime_default.png

Figure 145: Multiple Job Analysis Plot For InTime Default Recipe’s Expected Results

When the machine learning has improved the results’ median enough but has not yet met the design goal, the next step is to use InTime’s Next Steps Recipes.

Tcl execution command: flow run_recipe intime_default

Vendor support: ISE, Quartus-II, Quartus Prime, Vivado

Number of rounds: Uses rounds property

Setting filter considerations:

The following modifications are made to the project’s setting filters during recipe initialization:

  1. Add toolchain specific setting filter entries as detailed below.

    Quartus-II:

    Locklist:
    SEED = 31
    SYNTHESIS_SEED = 31
    ROUTER_EFFORT_MULTIPLIER = 1.0
    PLACEMENT_EFFORT_MULTIPLIER = 3.0
    ADV_NETLIST_OPT_ALLOWED = DEFAULT
    OPTIMIZE_TIMING=NORMAL COMPILATION
    
    Blacklist:
    SLOW_SLEW_RATE
    PHYSICAL_SYNTHESIS_EFFORT = FAST
    

    Vivado:

    Whitelist:
    All synthesis settings
    Directives of all implementation settings
    

10.2.2. InTime Default Extra Recipe

This recipe behaves the same as the InTime Default Recipe, but it runs an additional optimization round if the TNS is less than 1001ns, or if the Worst Slack is less than 0.500ns. The rationale behind this recipe is that if InTime Default gets you close to meeting the Goal, it is worth trying a randomized type of optimization.

10.3. Next Steps Recipes

These recipes can be used when the machine learning recipes has produced a good result which is very close to achieving the design goals. They can be used to “push” the design over the Finish line, achieving the design goal.

Although the Next Steps recipes can be run even if no machine learning recipes have been run first, in practice you will typically use the best result from one or more machine learning jobs as a basis from which the Next Steps recipe’s strategies will be generated. This is referred to as the parent revision of the new jobs.

To select the best result from previous machine learning jobs, right-click on the best strategy and set the result as the parent revision of the next round as shown in Figure 146. When running InTime in command line mode, the flow set parent_revision_name and flow set parent_revision_job_id commands can be used instead.

_images/recipes_set_parent_revision.png

Figure 146: Set Custom Parent Revision

Once the custom parent revision has been set, it will be marked with a star as shown in Figure 147.

_images/recipes_set_parent_revision_done.png

Figure 147: Star Icon Used To Indicate Custom Parent Revision

To illustrate the effect of the custom parent revision, a comparison of the custom parent and one of the generated strategies are shown in Figure 148.

_images/recipes_seed_parent_compare.png

Figure 148: Comparison Of Custom Parent Revision vs. Strategy Settings

The left column shows the settings of the selected place_seed_3 strategy generated by the Placement Seed Exploration Recipe, while the right column shown the settings of the selected cal_speed_tns_low parent. As expected, only the SEED property has a different value and all other values were based on the custom parent.

10.3.1. Deep Dive Recipe

This recipe analyzes existing results and explores regions close to the good results so far.

Tcl execution command: flow run_recipe deep_dive

Vendor support: ISE, Quartus-II, Quartus Prime, Vivado

Number of rounds: 1

Goal considerations:

This recipe supports only the Speed TNS goal at this time.

10.3.2. Extra Optimization Recipe

This recipe iteratively runs placement, physical synthesis, and routing with different switches to guide the results towards the design goal. In a typical scenario, iteratively placing a design makes the tools work harder on optimizing it, improving the timing performance in the process.

Tcl execution command: flow run_recipe extra_opt_exploration

Vendor support: Vivado

Number of rounds: Uses rounds property (Recommended: 1)

10.3.3. Hot Start Recipe

This recipe uses new classification techniques to generate the initial strategies for a project that is being optimized for the first time, improving the timing performance in a fewer number of compilations/iterations.

Tcl execution command: flow run_recipe hot_start

Vendor support: Quartus-II, Vivado

Number of rounds: Uses rounds property (Recommended: 1)

10.3.4. Placement Seed Exploration Recipe

This recipe explores the effect of placement seeds on the design goal.

The expected project history after running this recipe with runs_per_round = 10 and a custom parent revision can be seen in the project history shown in Figure 149 (job 38).

_images/project_history_placement_seed_exploration.png

Figure 149: Expected Results Of Placement Seed Exploration Recipe

Tcl execution command: flow run_recipe placement_seed_exploration

Vendor support: ISE, Quartus-II, Quartus Prime

Number of rounds: 1

Setting filter considerations:

The following modifications are made to the project’s setting filters during recipe initialization:

  1. Clear all name-only entries in the whitelist.

  2. Clear all name-only entries in the blacklist.

  3. Clear complete locklist.

  4. Add toolchain specific setting filter entries as detailed below.

    ISE:

    Supported devices:
    Spartan3, Spartan3A, Spartan3AN, Spartan3E, Virtex4
    

    Quartus-II:

    Whitelist:
    SEED
    

10.3.5. Synthesis Seed Exploration Recipe

This recipe explores the effect of synthesis seeds on the design goal. The expected output of this recipe is similar to the Placement Seed Exploration Recipe, however strategies are named synth_seed instead of place_seed.

Tcl execution command: flow run_recipe synthesis_seed_exploration

Vendor support: Quartus-II

Number of rounds: 1

Setting filter considerations:

The following modifications are made to the project’s setting filters during recipe initialization:

  1. Clear all name-only entries in the whitelist.

  2. Clear all name-only entries in the blacklist.

  3. Clear complete locklist.

  4. Add toolchain specific setting filter entries as detailed below.

    Quartus-II:

    Whitelist:
    SYNTHESIS_SEED
    

10.3.6. Effort Level Exploration Recipe

This recipe explores the effect of different effort levels on the design goal.

The expected project history after running this recipe with a custom parent revision can be seen in the project history shown in Figure 150 (job 40).

_images/project_history_effort_level_exploration.png

Figure 150: Expected Results Of Effort Level Exploration Recipe

Note that the expected project history shows the results for the case where only 1 round was run. In the case where two runs are run, another job with the best result from job 40 set as its parent will be run.

Tcl execution command: flow run_recipe effort_level_exploration

Vendor support: Quartus-II, Quartus Prime

Number of rounds:

Depends on the device family.

Quartus-II:

Stratix-V, Arria-V and Cyclone-V:
Round 1: Fixed runs per round of 20

All other devices:
Round 1: Fixed runs per round of 20
Round 2: Fixed runs per round of 20

Setting filter considerations:

The following modifications are made to the project’s setting filters during recipe initialization:

  1. Clear all entries in project’s setting filters.
  2. Add toolchain specific setting filter entries as detailed below.

Quartus-II:

(Round 1)
Whitelist:
PLACEMENT_EFFORT_MULTIPLIER

(Round 2)
Whitelist:
ROUTER_EFFORT_MULTIPLIER

10.3.7. Seeded Effort Level Exploration Recipe

This recipe performs exploration of seeds on best effort level results using the following steps:

  • Explore placement effort levels on design (20 in total).
  • Selected the best rounds effort level results and run runs_per_round placement seeds on each of them.

The expected project history after running this recipe with a custom parent revision can be seen in the project history shown in Figure 151 (jobs 43, 44 and 45) for a flow configuration with rounds = 2 and runs_per_round = 3.

_images/project_history_seeded_effort_level_exploration.png

Figure 151: Expected Results Of Seeded Effort Level Exploration Recipe

Note

When running this recipe, the runs_per_round property specifies the number of seeds that will be run on the top rounds effort levels found.

Tcl execution command: flow run_recipe seeded_effort_level_exploration

Vendor support: Quartus-II, Quartus Prime

Number of rounds: Uses rounds property + 1

Setting filter considerations:

The following modifications are made to the project’s setting filters during recipe initialization:

  1. Clear all entries in project’s setting filters.

  2. Add toolchain specific setting filter entries as detailed below.

    Quartus-II:

    (Round 1)
    Whitelist:
    PLACEMENT_EFFORT_MULTIPLIER
    
    (Round 2)
    Whitelist:
    SEED
    

10.4. General Recipes

There are general recipes which have different use-cases as described in the description of each recipe.

10.4.1. Just Compile My Design Recipe

This recipe just runs the current active revision in your project on the run target specified by the initial_compilation property.

The expected project history after running this recipe is shown in Figure 152 (job 41).

_images/project_history_implement_base_revision_only.png

Figure 152: Expected Results Of Just Compile My Design Recipe

Note

When the initial_compilation property is set to remote_target, the run target specified by the run_target property will be used.

Tcl execution command: flow run_recipe just_compile_my_design

Vendor support: ISE, Quartus-II, Quartus Prime, Vivado

Number of rounds: 1

Setting filter considerations: Not modified (used as is)

10.4.2. Rerun Strategies Recipe

This recipe allow the user to rerun previously generated strategies. A typical use case is when a design change is required after timing closure was achieved on the design using a previous InTime strategy. After the design was changed, the good strategy can be rerun on the changed design using this recipe.

When this recipe is selected, checkboxes will be shown next to strategies in the project history, allowing the user to select the strategies to rerun. This is illustrated in Figure 153.

_images/project_history_rerun_checkboxes.png

Figure 153: Selecting Strategies To Rerun Using Rerun Strategies recipe.

The expected project history after running this recipe with the selection shown in the above figure is shown in Figure 154 (job 42).

_images/project_history_rerun_job.png

Figure 154: Expected Results Of Rerun Strategies Recipe

Tcl execution command: flow run_recipe rerun_strategies

To select strategies to be rerun using Tcl add the strategies which must be rerun to the run_subset result set (refer to advanced-concepts-working-with-result-sets for more information on result sets).

For example:

results activate_tcl_set "run_subset"
results clear
# Add results to rerun to the run subset:
results add ...
results add ...
results restore_default_tcl_set

Vendor support: Vendor independent

Number of rounds: 1

Setting filter considerations: Not used

10.4.3. Custom Flow Recipe

This recipe runs the InTime flow once with the specified flow configuration. Unlike the other InTime recipes, no properties in the flow configuration are controlled by the recipe, giving full control to the user. When using custom strategy algorithms, this recipe should be used in order to gain control over the strategy_algorithm property which is normally locked and controlled by other InTime recipes.

Tcl execution command: flow run_recipe custom_flow

Vendor support: Vendor independent

Number of rounds: Uses rounds property

Setting filter considerations: Not modified (used as is)