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.
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
"run_target" "local". Other options are "private_cloud" or "plunify_cloud".
"strategy_max_runtime" "12". Up to 48 hours.
"runs_per_round" "5". Customizable but will be automatically limited to the default recipe maximum.
"rounds" "1". This will be ignored for some recipes where the default is 1, e.g. placement.
"concurrent_runs" "2". Limited by your InTime license and the number of CPU cores available.
"goal" "speed_tns" Other available goals: "area".
"goal_based_target" "0". Expressed in nanoseconds (ns), can be a negative number.
"control_stop_when_goal_met" "false". As opposed to "True", which stops the current recipe if the goal is met.

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
"TNS" Total Negative Slack in ns
"WNS" Worst Negative Slack in ns
"WHS" Worst Hold Slack in ns
"Area" Utilization in percentage

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.

Happy template crafting!