Skip to content

Creating Auto Pilot Templates

An Auto Pilot template is a JSON file that describes a sequence of optimization steps.

Each template starts with a root object named "cookbook", followed by a "recipe" step. Each recipe step describes the recipe type, build flow properties, as well as criteria for selecting the next step. All templates must be placed in the folder <user_home>/.plunify/auto_pilot_templates/.

Below is an example.

{
  "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"
    },
    ...
    ...
  }
  ],
  "recipe_start_id": "1"
}

Key Components

There are 3 parts to each recipe step.

  1. Basic descriptors such as recipe ID, name and number of retries.
  2. Flow properties which describes the maximum runtime, rounds, goals etc, of the recipe.
  3. Decisions are how Auto Pilot determines the next recipe to execute, based on user-defined criteria.

Basic Descriptors

Name Value description
id The unique numeric identifier for the recipe.
name Name of this step/recipe.
recipe_name Alias for the recipe - refer to page.
match_max_count Maximum number of results to add to the queue when a condition is met.
max_same_recipe_attempts Maximum number of times the same recipe will run.
max_retry_if_fail Maximum number of times to retry the recipe if it fails.
recipe_start_id The ID of the first recipe to run in this template.

Flow Properties

Auto Pilot supports a subset of InTime flow properties. Refer to the flow properties page for a full property description.

Name Sample Value Description
concurrent_runs 2 Limited by your InTime license and the number of CPU cores available.
control_stop_when_goal_met false As opposed to "true", which stops the current recipe if the goal is met.
goal speed_tns Other available goals: "area".
goal_based_target 0 Expressed in nanoseconds (ns), can be a negative number.
rounds 1 This will be ignored for some recipes where the default is 1, e.g. placement.
runs_per_round 5 Customizable but will be automatically limited to the default recipe maximum.
run_target local Other options are "private_cloud" or "plunify_cloud".
strategy_max_runtime 12 Up to 48 hours.
strategy_reuse_multiplier 0.5 Percentage of good results from Machine Learning to include (none=0, max=1.0).
strategy_use_all_training_data false Reuse all results in the database (even those from other designs).

Note

Note that rounds applies only if it does not conflict with the pre-defined limit of that recipe. For example, if "3" rounds is specified for Placement Exploration, it will be ignored as this recipe only has 1 round.

Decisions

Auto Pilot automatically jumps to different recipe steps based on the criteria.

next_recipe_id
Specify the next recipe step to execute. "ID" and "step" must be defined as well.

Criteria
Specify the criteria and comparison operators.

For example, the snippet below says that if the TNS of this round is less than -80ns, then jump to recipe ID 3.

"decisions": [
{
  "next_recipe_id": "3",
  "criteria": "TNS < -80"
},

Supported Criteria:

Criteria Description
"Area" Logic Utilization (%)
"FEP" Number of Failing Setup Endpoints
"Power" Power Estimate (W)
"TNS" Total Negative Slack (ns)
"WNS" Worst Negative Slack (ns)
"parentArea" Parent revision's Logic Utilization (%)
"parentFEP" Parent revision's number of Failing Setup Endpoints
"parentPower" Parent revision's Power Estimate (W)
"parentTNS" Parent revision's Total Negative Slack (ns)
"parentWNS" Parent revision's Worst Negative Slack (ns)
"bestArea" Best revision's Logic Utilization (%)
"bestFEP" Best revision's number of Failing Setup Endpoints
"bestPower" Best revision's Power Estimate (W)
"bestTNS" Best revision's Total Negative Slack (ns)
"bestWNS" Best revision's Worst Negative Slack (ns)
"deltaParentArea" (Current revision - Parent revision): Difference in Logic Utilization (%)
"deltaParentFEP" (Current revision - Parent revision): Difference in the number of Failing Setup Endpoints
"deltaParentPower" (Current revision - Parent revision): Difference in the Power Estimate (W)
"deltaParentTNS" (Current revision - Parent revision): Difference in Total Negative Slack (ns)
"deltaParentWNS" (Current revision - Parent revision): Difference in Worst Negative Slack (ns)
"deltaBestArea" (Current revision - Best revision): Difference in Logic Utilization (%)
"deltaBestFEP" (Current revision - Best revision): Difference in the number of Failing Setup Endpoints
"deltaBestPower" (Current revision - Best revision): Difference in the Power Estimate (W)
"deltaBestTNS" (Current revision - Best revision): Difference in Total Negative Slack (ns)
"deltaBestWNS" (Current revision - Best revision): Difference in Worst Negative Slack (ns)
"pctDeltaParentArea" (Current revision - Parent revision) / Parent revision: Percentage difference in Logic Utilization (%)
"pctDeltaParentFEP" (Current revision - Parent revision) / Parent revision: Percentage difference in the number of Failing Setup Endpoints (%)
"pctDeltaParentPower" (Current revision - Parent revision) / Parent revision: Percentage difference in the Power Estimate (%)
"pctDeltaParentTNS" (Current revision - Parent revision) / Parent revision: Percentage difference in Total Negative Slack (%)
"pctDeltaParentWNS" (Current revision - Parent revision) / Parent revision: Percentage difference in Worst Negative Slack (%)
"pctDeltaBestArea" (Current revision - Best revision) / Best revision: Percentage difference in Logic Utilization (%)
"pctDeltaBestFEP" (Current revision - Best revision) / Best revision: Percentage difference in the number of Failing Setup Endpoints (%)
"pctDeltaBestPower" (Current revision - Best revision) / Best revision: Percentage difference in the Power Estimate (%)
"pctDeltaBestTNS" (Current revision - Best revision) / Best revision: Percentage difference in Total Negative Slack (%)
"pctDeltaBestWNS" (Current revision - Best revision) / Best revision: Percentage difference in Worst Negative Slack (%)

Supported Comparison Operators:

Operator Description
> Greater Than
>= Greater Than or Equal To
< Smaller Than
<= Smaller Than or Equal To
== Equal To
!= Not Equal To

Rules

  1. Each template has a mandatory field called "recipe_start_id", which tells InTime which recipe step to start first.

  2. If there are multiple rounds in a single recipe step, it will complete the rounds before evaluating a decision/criteria.

  3. In the event where no decision is specified, Auto pilot will select the next available recipe step in the queue. (If a recipe step does not have a "decisions" section, Auto Pilot will terminate after the recipe step is completed.)

  4. If there are multiple criteria, for each criteria that is met, the corresponding recipe step is inserted into a FIFO queue.

  5. If multiple criteria are met, Auto Pilot will prioritize other recipe steps if a recipe step has been executed previously.

  6. In the event that the current round's results are not better than that of the parent round, Auto Pilot will use the parent round's best result as the parent revision.

Built-in Templates

Several templates are included to get you started quickly, and are automatically copied to <user home>/.plunify/auto_pilot_templates/ when you launch InTime.

Naming convention: <template number>_<toolchain name>_<1st recipe>_..._<Nth recipe>.json

Name Supported Toolchain Run Target Description
2001_lib_def_reg_pla.json Libero Local InTime Default -> Region Exploration or Placement Exploration
2002_lib_def_reg_pla.json Libero Private Cloud InTime Default -> Region Exploration or Placement Exploration
5001_viv_hot_ext_pla_def.json Vivado Local Hot Start -> Extra Opt Exploration or Placement Exploration or InTime Default
5002_viv_hot_ext_pla_def.json Vivado Private Cloud Hot Start -> Extra Opt Exploration or Placement Exploration or InTime Default
5011_viv_hot_ext_pla_def.json Vivado Local Hot Start -> Extra Opt Exploration or Placement Exploration or InTime Default with multiple criteria
5012_viv_hot_ext_pla_def.json Vivado Private Cloud Hot Start -> Extra Opt Exploration or Placement Exploration or InTime Default with multiple criteria
5021_viv_hot_ext_pla_def.json Vivado Local Hot Start -> Extra Opt Exploration or Placement Exploration or InTime Default with multiple criteria
5022_viv_hot_ext_pla_def.json Vivado Private Cloud Hot Start -> Extra Opt Exploration or Placement Exploration or InTime Default with multiple criteria
5031_qua_def_see.json Quartus Local InTime Default -> Seeded Effort Level Exploration
5032_qua_def_see.json Quartus Private Cloud InTime Default -> Seeded Effort Level Exploration
5031_viv_def_ext.json Vivado Local InTime Default -> Extra Opt Exploration
5031_viv_def_ext.json Vivado Private Cloud InTime Default -> Extra Opt Exploration

Happy template crafting!