Comparing IPs in the system

This section describes using the Helix IPLM diff command to compare IPVs to other IPVs on the same line, and IPVs to Workspaces. Comparison is performed between Helix IPLM managed metadata. File content diffs are performed directly in the IP's DM system.

Command line

On the CLI the pi ip diff command is used to compare IPVs. Comparisons can be made between two IPVs (server side diff) or between an IPV and a workspace (workspace diff). The diff output is split into three sections:

  • Resources: The differences between the immediate resources of the two IPVs
  • Files: The differences between the files captured in the two IPVs
  • Metadata: The differences between the metadata attached to the two IPVs. The metadata  compared includes Project Properties (Workspace configuration), the repo_path of the two IPVs, and aliases other than @HEAD or @LATEST.

Note:  If the repo_path is different between diff versions, any file list differences will not be displayed. This is because the files on the two repo_paths, as well as their versions, are totally different between the two IPVs. When comparing IPVs on different lines or belonging to different IPVs where the repo_path is different, no file differences will be reported for this same reason.

The Helix IPLM pi ip diff command compares files at their DM revision numbers, the content of the files is not diffed. Details on file content differences can be found via the DM system managing the files.

Note:  A version number in the diff output with an asterisk immediately after it (for example, 2*) indicates a file version that has been deleted in the data management system. IPLM keeps track of deleted file versions to better handle situations where a file is, for example, created, deleted, and re-created across IP releases.

An example of a server side IPV vs IPV diff is shown below:

Server Side diff

> pi ip diff tutorial.tutorial@8 tutorial.tutorial@1
tutorial.tutorial@8.TRUNK and tutorial.tutorial@1.TRUNK differ on the server.
┌──────────────────────┬───────────────────────────┬───┬───────────────────────────┐
│ RESOURCES            │ tutorial.tutorial@8.TRUNK │   │ tutorial.tutorial@1.TRUNK │
╞══════════════════════╪═══════════════════════════╪═══╪═══════════════════════════╡
│ tutorial.CADenv      │          1.TRUNK          │   │      GOLD.TRUNK [@1]      │
│ tutorial.digital_top │          4.TRUNK          │ ← │          1.TRUNK          │
│ tutorial.padring     │          10.TRUNK         │ ← │          1.TRUNK          │
└──────────────────────┴───────────────────────────┴───┴───────────────────────────┘
┌──────────────────────────────┬───────────────────────────┬───────────────────────────┐
│ FILES                        │ tutorial.tutorial@8.TRUNK │ tutorial.tutorial@1.TRUNK │
╞══════════════════════════════╪═══════════════════════════╪═══════════════════════════╡
│ hw_code/code/mt48lc32m16a2.v │             2             │             1             │
│ hw_code/report/blg.rpt       │             2             │             1             │
│ hw_code/test/test.v          │             2             │             1             │
└──────────────────────────────┴───────────────────────────┴───────────────────────────┘
┌────────────────────┬─────────────────────────────────┬───────────────────────────┐
│ META DATA          │ tutorial.tutorial@8.TRUNK       │ tutorial.tutorial@1.TRUNK │
╞════════════════════╪═════════════════════════════════╪═══════════════════════════╡
│ Project Properties │ * --mode both --path blocks/$IP │ * --path blocks/$IP       │
└────────────────────┴─────────────────────────────────┴───────────────────────────┘

A workspace diff is initiated either from a workspace or using the --wsdir argument to point to the workspace to diff. If no IPV is provided a summary of differences is given, and the comparison is against the current version of the IPs in the workspace.

Workspace diff

> pi ip diff
tutorial.t1@1.TRUNK on the server and tutorial.t1@1.TRUNK in the Workspace differ.
┌────────────────────┬─────────────────────┬───┬───────────┐
│ RESOURCES          │ tutorial.t1@1.TRUNK │   │ Workspace │
╞════════════════════╪═════════════════════╪═══╪═══════════╡
│ tutorial.bist_sram │       1.TRUNK       │ → │  3.TRUNK  │
└────────────────────┴─────────────────────┴───┴───────────┘
tutorial.dbuf@1.TRUNK on the server and tutorial.dbuf@1.TRUNK in the Workspace differ.
┌────────────────────┬───────────────────────┬───┬───────────┐
│ RESOURCES          │ tutorial.dbuf@1.TRUNK │   │ Workspace │
╞════════════════════╪═══════════════════════╪═══╪═══════════╡
│ tutorial.bist_sram │        1.TRUNK        │ → │  3.TRUNK  │
└────────────────────┴───────────────────────┴───┴───────────┘
tutorial.tutorial@8.TRUNK on the server and tutorial.tutorial@8.TRUNK in the Workspace differ.
┌──────────────────────┬───────────────────────────┬───┬───────────┐
│ RESOURCES            │ tutorial.tutorial@8.TRUNK │   │ Workspace │
╞══════════════════════╪═══════════════════════════╪═══╪═══════════╡
│ tutorial.digital_top │          4.TRUNK          │ ← │  1.TRUNK  │
└──────────────────────┴───────────────────────────┴───┴───────────┘
┌──────────────────────────────┬───────────────────────────┬───────────┐
│ FILES                        │ tutorial.tutorial@8.TRUNK │ Workspace │
╞══════════════════════════════╪═══════════════════════════╪═══════════╡
│ hw_code/code/mt48lc32m16a2.v │             2             │  Modified │
│ hw_code/report/blg.rpt       │             2             │     1     │
│ hw_code/test/test.v          │             2             │  Modified │
└──────────────────────────────┴───────────────────────────┴───────────┘

If files have a DM state other than checked in (a file version) that discrepancy is indicated in the pi ip diff output.

IP diff command

The usage of the pi ip diff command is detailed here:

pi ip diff Command
> pi ip diff -h
Usage: pi ip diff [-h] [--ignore-metadata]
                  [--format {long,json,quiet} | --verbose | --quiet]
                  [--wsdir WSDIR]
                  [IPV1] [IPV2]

Detailed information on the arguments to pi ip diff:

Command Option Description
--ignore-metadata Won't compare metadata, only file and resource differences
 --quiet Just display a summary indicating whether the IPVs differ or not, without details what is different. Alias for --format quiet.
--wsdir Use a specific workspace path for the workspace diff. Else workspace diffs are done versus the current workspace
--format long Print all details about what is different between the releases.
--format json Provide a json string showing the differences between the IPVs
--format quiet Summary output only, see --quiet above.

Diff and permissions

If a user does not have permissions to one or more of the resources of an IP that is being diffed, that IP will be omitted from the diff results, and a warning message will be provided to the user to inform them that they don't have permission to all the resources of the IPV.

Diffing IP@HEAD

If Helix IPLM has access to the DM system (as from PiCLI) when asked to diff an IP@HEAD it will pull the latest files from the DM system to perform the diff.

Diffing IP@HEAD
> pi ip diff tutorial@HEAD
tutorial.tutorial@HEAD.TRUNK [@9] on the server and tutorial.tutorial@9.TRUNK in the Workspace differ.
┌─────────────────┬───────────────────────────────────┬───────────┐
│ FILES           │ tutorial.tutorial@HEAD.TRUNK [@9] │ Workspace │
╞═════════════════╪═══════════════════════════════════╪═══════════╡
│ hw_code/test.v  │                 1                 │           │
│ hw_code/timer.v │                 1                 │           │
└─────────────────┴───────────────────────────────────┴───────────┘