Deciding which recipe to use

The InTime optimization flow executes Tcl scripts called Recipes. These are different optimization approaches for different design conditions. (For an overview of the InTime flow, see the intime flow page.)

How to run a Recipe

To start a recipe in the InTime GUI, just click the Optimize button.

In Tcl command line mode, use the following commands.

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

# Run the InTime Default recipe:
plunify> flow run_recipe intime_default

What is a Parent Revision?

Multiple recipes can be executed in a hierarchical manner where the a result of the current round (usually the result with the best WNS or TNS) becomes the starting point (usually called the "Parent Revision") of the next round. If the same recipe is running multiple rounds, the parent revision is selected automatically based on the goal target (either WNS or TNS) of the recipe.

Set Custom Parent Revision

To select a recipe, right-click on the best strategy/result so far and set the result as the parent revision of the next round as shown below

Once the custom parent revision has been set, it will be marked with a star as shown below Star Icon Used To Indicate Custom Parent Revision

Tcl Mode

The flow set parent_revision_name and flow set parent_revision_job_id commands can be used.

Understanding InTime Optimization Phases

The FPGA tools offers many build parameters that affect an FPGA design at a global as well as localized block level. InTime determines the optimum build parameters and constraints for your design. To deal with an enormous design space, InTime uses machine learning techniques and domain-specific heuristics to predict and narrow down the best parameters and constraints. To maximize performance closure effectiveness, it is necessary to generate sufficient data points from build results and learn from past results. There are two phases to the optimization process: Phase 1 is the “Learning” cycle and Phase 2, the “Last-Mile”.

Phase 1: Learning
In this phase, the recommended methodology is to progressively optimize a design over several rounds of synthesis and place-and-route builds in an iterative “build-and-learn” cycle.

Phase 2: Last-Mile
The second phase begins when at least one of the Learning results is close to meeting your performance target or if results have stopped improving in Phase 1. In the former, the optimization relies on specific techniques that stimulate relatively non-deterministic (compared to those in Phase 1) variations in the results. There are two types of optimizations in this phase:
1. Random - Running placement exploration, effort levels and exploiting clock uncertainties.
2. Incremental - Using a particular build to run iterative physical optimizations.

Using this approach, run Phase 1 recipes to improve the TNS or WNS first, followed by Phase 2 recipes. The ideal effect is highlighted in the chart below. Demonstrating InTime's Approach To Timing Closure

For more information, refer to our whitepapers here.

List of Recipes

Here is a list of recipes and its alias. Alias are used in the tcl scripts. Not all recipes will be available at the same time. This is dependent on the toolchain and device type.

Recipe Name Alias Vendor
Auto Pilot auto_pilot Xilinx, Intel
Auto Placement auto_placement Intel
Custom Flow custom_flow Xilinx, Intel
Deep Dive deep_dive Xilinx, Intel
Hot Start hot_start Xilinx, Intel
Just Compile My Design just_compile_my_design Xilinx, Intel
InTime Default intime_default Xilinx, Intel
InTime Default Extra intime_default_extra Xilinx, Intel
Rerun Strategies rerun_strategies Xilinx, Intel
Clock Margin Exploration clock_margin_exploration Xilinx
Extra Opt Exploration extra_opt_exploration Xilinx
Compile With a Guide File vivado_incremental_compilation Xilinx
Placement Exploration vivado_placement_exploration Xilinx
SSI Exploration vivado_ssi_exploration Xilinx
Effort Level Exploration effort_level_placement Intel
Placement and Router Effort Level Exploration effort_level_placement_router Intel
Placement Seed Exploration placement_seed_exploration Intel
Seeded Effort Level Exploration seeded_effort_level_exploration Intel
Router Effort Level Exploration routing_effort_exploration Intel

Phase 1: Learning Recipes

Also referred to as educated recipes, InTime machine learning capabilities to learn from previous results' and produce smarter strategies on subsequent runs. There are multiple Learning recipes.

Recipe Availability

Different recipes may be available across different FPGA vendor tools.

Hot Start

This recipe uses Placement and Routing settings to generate the initial strategies for a project that is being optimized for the first time. The intention is to limit the design space and improve the timing performance in fewer number of compilations.

InTime Default

This is a recipe which runs multiple iterations (or rounds). This can be configured under Flow Properties. It will optimize Synthesis, Placement and Routing settings, creating a large variation in results.

The expected project history after running this with a default flow configuration (2 rounds, 3 runs per round) can be seen in the project history shown below. Note that after each round, the recipe will set the best result (TNS) from the current round(s) as the parent of the new round. In the example below, the best result is "Cal_speed_tns_low_1" strategy. InTime automatically uses it as the "Parent" for the next round.

Expected Results Of *InTime Default* Recipe

The effects of machine learning on a design can also be visualized using the Multiple Job Analysis plot in InTime's Results Analysis mode.

InTime Default Extra

This recipe behaves the same as the InTime Default Recipe, but it runs an additional optimization round if the TNS is better than -1000ns, or if the Worst Slack is better than -0.5ns. The rationale behind this recipe is that if InTime Default gets you close to meeting the Goal, it will try to close timing by running Last-Mile recipes.

Deep Dive

This recipe analyzes existing results and explores regions close to the good results so far. Instead of exploring too many settings, this recipe will lock down settings that are already good and only explore a subset of settings. In the figure below, deep dive recipe gives better results over the default recipe. Deep Dive Recipe

Note that there must be a sufficient number of results in order for Deep Dive to work properly.

SSI Exploration (Beta)

Targeted at multi-die devices, this recipe analyzes the current placement and re-distribute resources across dies in order to achieve a good balance in per-die utilization and inter-die crossings.

Phase 2: Last-Mile Recipes

Once the Learning recipes have produced a good result that is very close to achieving your design goals, it is time for Phase 2.

If there are older results from other recipes, you can select a parent revision from it.

Recipe Availability

Not all recipes may be available across different FPGA vendor tools. Some recipes only exist for certain FPGA tools.

Extra Opt Exploration

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.

Placement Exploration

This recipe finds and change the location of a register to stimulate placement variations. The effect is seemingly random like running placement seeds, which Vivado does not provide anymore.

Clock Margin Exploration

This recipe varies the clock uncertainty to trigger variations in the timing. By default, InTime will control the degree of clock margin, increasing or decreasing the value by 0.05ns each time. This can be configured by the user.

Placement Seed Exploration

This recipe explores the effect of placement seeds on the design goal. This recipe changes the placement seed setting on the parent revision.

Effort Level Exploration

This recipe explores the effect of different effort levels on the design goal. This recipe changes the effort level setting on the parent revision.

Seeded Effort Level Exploration

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

Step 1: Explore placement effort levels on design (20 in total).
Step 2: Select the results in the round and set as parent.
Step 3: Run "Placement Seed Exploration" recipe on each of them.

If multiple rounds are specified, this recipe will execute step 2 and 3 on the 2nd best, 3rd best result and so on.

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

Expected Results Of *Seeded Effort Level Exploration* Recipe

Tip

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.

General Recipes

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

Just Compile My Design

This recipe simply builds the current active revision or design run in your project. Note that this happens on the run target specified by the initial_compilation property.

Compile with a Guide File

This recipe uses an existing Design Checkpoint file as a reference, and applies incremental compilation behaviour to re-run placement and routing for logic that has changed compared to the reference netlist. When this recipe is selected, checkboxes will appear next to strategies in your project build history. Check to select the strategy (pick only one) to use as a reference.

Note

When running this recipe, make sure the Design Checkpoint (DCP) exists. InTime typically saves the generated DCP in the working folders, e.g. "plunify.jobs/"

Rerun Strategies

This recipe allows the user to re-run previously built strategies. A typical use-case is when the design changes after timing closure was achieved using a previous InTime strategy. Although the design has changed, good strategies can be re-run using this recipe.

When this recipe is selected, checkboxes will appear next to strategies in your project build history. Check to select the strategies to rerun. This is illustrated in

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 below (job 42).

Expected Results Of *Rerun Strategies* Recipe

Advanced Recipes

Auto Pilot

This recipe is available from InTime version 3.0 onwards. Auto Pilot is a "manager recipe" that reads a pre-defined template file (in JSON format) describing a sequence of optimization steps. The user can customize a specific sequence of recipes, e.g. "Hot Start", followed by "Default" and finally, "Placement Exploration", with specific criteria such as TNS or WNS attaining a particular value. For example, a user can run multiple rounds of Default recipe until TNS < -100 ns (the "criteria").

{
  "cookbook": [
    {
      "id": "1",
      "name": "InTime Default",
      "recipe_name": "intime_default",
      "flow": {
        "run_target": "local",
        "strategy_max_runtime": "12",
        "runs_per_round": "5",
        "rounds": "1",
        "concurrent_runs": "1",
        "goal": "speed_tns",
        "goal_based_target": "0",
        "control_stop_when_goal_met": "false"
      },
      "decisions": [
        {
          "next_recipe_id": "3",
          "criteria": "TNS < -79.72"
        },
        {
          "next_recipe_id": "2",
          "criteria": "WNS < -0.27"
        },
      ],
      "max_same_recipe_attempts": "99",
      "max_retry_if_fail": "10"
    },
    {
      "id": "2",
      "name": "Hot Start",
      "recipe_name": "hot_start",
...
...
...

Run Auto Pilot in Tcl

To run Auto Pilot in Tcl

flow set auto_pilot_json <path>

Create A Template

Please refer to Create Auto Pilot Templates. Note that templates must be saved in <user_home>/.plunify/auto_pilot_templates/

Note

Sample template files for Xilinx and Intel are pre-installed within InTime. To customize one, please create a backup copy first.

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.

To learn more about how to use this, refer to the Custom Strategies page.