Resolving conflicts

This training page discusses IP Hierarchy conflicts, the fact that conflicts will be resolved when a workspace is loaded, and shows how conflicts in the hierarchy can be viewed in Perforce IPLM.

Conflicts and their resolution

An IP Hierarchy may contain the same IP at different versions or on different lines in different locations. Perforce IPLM can manage these multiple versions or lines in the released IP Hierarchy, but once the hierarchy is used to build a workspace, the conflict must be resolved to a single IPV on a single Line. A hierarchy with multiple lines or versions of the same IP is said to have conflicts.

These conflicts can be viewed from IPLM CLI using the 'pi ip tree' command or from IPLM Web on the 'IPV details' page, 'Resources' tab. See the IP Hierarchy page in the User Guide for more information about conflicts and their resolutions.

Viewing Hierarchies with conflicts

The following examples show how hierarchy conflicts are viewed on IPLM Web and IPLM CLI.

IPLM Web

Resolving conflicts using IPLM CLI

pi ip tree tutorial
> pi ip tree tutorial.tutorial@5.TRUNK
tutorial.tutorial@5.TRUNK
├─ tutorial.CADenv@GOLD.TRUNK [@1]
├─ tutorial.analog_top@HEAD.TRUNK [@2]
│  ├─ tutorial.MS90G@1.TRUNK
│  ├─ tutorial.acells_tsmc18@1.TRUNK
│  ├─ tutorial.clkgen@HEAD.TRUNK [@1]
│  ├─ tutorial.intf_ana@HEAD.TRUNK [@2]
│  │  ├─ tutorial.acells_tsmc18@1.TRUNK
│  │  ├─ tutorial.adc@HEAD.TRUNK [@1]
│  │  │  ├─ tutorial.acells_tsmc18@1.TRUNK
│  │  │  └─ tutorial.laysc_tsmc18@1.TRUNK
│  │  ├─ tutorial.dac@HEAD.TRUNK [@0]
│  │  └─ tutorial.laysc_tsmc18@1.TRUNK
│  ├─ tutorial.laysc_tsmc18@1.TRUNK
│  ├─ tutorial.pwr_mgmt_ana@HEAD.TRUNK [@1]
│  ├─ tutorial.stup_ana@HEAD.TRUNK [@1]
│  │  ├─ tutorial.acells_tsmc18@1.TRUNK
│  │  └─ tutorial.laysc_tsmc18@1.TRUNK
│  └─ tutorial.trc@HEAD.TRUNK [@1]
├─ tutorial.digital_top@1.TRUNK
│  ├─ tutorial.aes512@1.TRUNK
│  ├─ tutorial.clk_mux@1.TRUNK
│  │  └─ tutorial.rxtx@1.TRUNK
│  │     └─ tutorial.gen_dig@1.TRUNK (c1)
│  ├─ tutorial.cpu@LATEST.TRUNK [@2]
│  │  ├─ tutorial.bist_sram@1.TRUNK
│  │  │  └─ tutorial.gen_dig@1.TRUNK (c1)
│  │  ├─ tutorial.gen_dig@LATEST.TRUNK [@2] (c1)
│  │  └─ tutorial.proj_tech@1.TRUNK
│  ├─ tutorial.dbuf@1.TRUNK
│  │  ├─ tutorial.bist_sram@1.TRUNK
│  │  │  └─ tutorial.gen_dig@1.TRUNK (c1)
│  │  └─ tutorial.gen_dig@1.TRUNK (c1)
│  ├─ tutorial.events_if@1.TRUNK
│  │  └─ tutorial.gen_dig@1.TRUNK (c1)
│  ├─ tutorial.flash@1.TRUNK
│  │  ├─ tutorial.flash_if@1.TRUNK
│  │  │  └─ tutorial.gen_dig@1.TRUNK (c1)
│  │  ├─ tutorial.gen_dig@1.TRUNK (c1)
│  │  └─ tutorial.proj_tech@1.TRUNK
│  ├─ tutorial.gen_dig@1.TRUNK (c1)
│  ├─ tutorial.interface@1.TRUNK
│  │  └─ tutorial.gen_dig@1.TRUNK (c1)
│  ├─ tutorial.proj_tech@1.TRUNK
│  ├─ tutorial.rx_channel@1.TRUNK
│  │  ├─ tutorial.gen_dig@1.TRUNK (c1)
│  │  └─ tutorial.rxtx@1.TRUNK
│  │     └─ tutorial.gen_dig@1.TRUNK (c1)
│  ├─ tutorial.rxtx@1.TRUNK
│  │  └─ tutorial.gen_dig@1.TRUNK (c1)
│  ├─ tutorial.sys_bus@1.TRUNK
│  │  ├─ tutorial.gen_dig@1.TRUNK (c1)
│  │  └─ tutorial.rxtx@1.TRUNK
│  │     └─ tutorial.gen_dig@1.TRUNK (c1)
│  ├─ tutorial.t0@1.TRUNK
│  │  └─ tutorial.gen_dig@1.TRUNK (c1)
│  ├─ tutorial.t1@1.TRUNK
│  │  ├─ tutorial.bist_sram@1.TRUNK
│  │  │  └─ tutorial.gen_dig@1.TRUNK (c1)
│  │  └─ tutorial.gen_dig@1.TRUNK (c1)
│  └─ tutorial.timers@1.TRUNK
│     └─ tutorial.gen_dig@1.TRUNK (c1)
├─ tutorial.padring@1.TRUNK
│  ├─ tutorial.MS90G@1.TRUNK
│  ├─ tutorial.io5v@1.TRUNK
│  └─ tutorial.io_tsmc18@1.TRUNK
└─ tutorial.verif_config@1.TRUNK

(c1) The IP 'tutorial.gen_dig' occurs with the following versions: 1.TRUNK, LATEST.TRUNK [@2].
Resolved to Version 'LATEST.TRUNK [@2]' automatically.

Conflicts Example

In this example we manually create a conflict by adding IPs with conflicting resources to the same to top level IP. First we edit a test ip and add two resources to it, then we load that IP into a workspace.  

Conflict Example
> pi ip tree tutorial.analog_top
tutorial.analog_top@2.TRUNK
├─ tutorial.MS90G@1.TRUNK
├─ tutorial.acells_tsmc18@1.TRUNK
├─ tutorial.clkgen@HEAD.TRUNK [@1]
├─ tutorial.intf_ana@HEAD.TRUNK [@2]
│  ├─ tutorial.acells_tsmc18@1.TRUNK
│  ├─ tutorial.adc@HEAD.TRUNK [@1]
│  │  ├─ tutorial.acells_tsmc18@1.TRUNK
│  │  └─ tutorial.laysc_tsmc18@1.TRUNK
│  ├─ tutorial.dac@HEAD.TRUNK [@0]
│  └─ tutorial.laysc_tsmc18@1.TRUNK
├─ tutorial.laysc_tsmc18@1.TRUNK
├─ tutorial.pwr_mgmt_ana@HEAD.TRUNK [@1]
├─ tutorial.stup_ana@HEAD.TRUNK [@1]
│  ├─ tutorial.acells_tsmc18@1.TRUNK
│  └─ tutorial.laysc_tsmc18@1.TRUNK
└─ tutorial.trc@HEAD.TRUNK [@1]
 
> pi ip edit testlib.ip1  (add resources 'analog_top' and 'tutorial.stup_ana@1.TRUNK')
Successfully edited IPV 'testlib.ip1@1.TRUNK'

If we look at our new release of 'testlib.ip1' we see a conflict has been created, stup_ana@1.TRUNK and stup_ana@HEAD.TRUNK are both referenced by the same hierarchy.

testlib.ip1 Release
> pi ip tree testlib.ip1
testlib.ip1@1.TRUNK
├─ tutorial.analog_top@2.TRUNK
│  ├─ tutorial.MS90G@1.TRUNK
│  ├─ tutorial.acells_tsmc18@1.TRUNK
│  ├─ tutorial.clkgen@HEAD.TRUNK [@1]
│  ├─ tutorial.intf_ana@HEAD.TRUNK [@2]
│  │  ├─ tutorial.acells_tsmc18@1.TRUNK
│  │  ├─ tutorial.adc@HEAD.TRUNK [@1]
│  │  │  ├─ tutorial.acells_tsmc18@1.TRUNK
│  │  │  └─ tutorial.laysc_tsmc18@1.TRUNK
│  │  ├─ tutorial.dac@HEAD.TRUNK [@0]
│  │  └─ tutorial.laysc_tsmc18@1.TRUNK
│  ├─ tutorial.laysc_tsmc18@1.TRUNK
│  ├─ tutorial.pwr_mgmt_ana@HEAD.TRUNK [@1]
│  ├─ tutorial.stup_ana@HEAD.TRUNK [@1] (c1)
│  │  ├─ tutorial.acells_tsmc18@1.TRUNK
│  │  └─ tutorial.laysc_tsmc18@1.TRUNK
│  └─ tutorial.trc@HEAD.TRUNK [@1]
└─ tutorial.stup_ana@1.TRUNK (c1)
   ├─ tutorial.acells_tsmc18@1.TRUNK
   └─ tutorial.laysc_tsmc18@1.TRUNK

(c1) The IP 'tutorial.stup_ana' occurs with the following versions: 1.TRUNK, HEAD.TRUNK [@1].
Resolved to Version 'HEAD.TRUNK [@1]' automatically.

 Let's load the new testlib.ip1 IP Hierarchy into a workspace.

Viewing and Updating the Workspace
> pi ip load testlib.ip1
Loading IPV 'testlib.ip1@1.TRUNK' into Workspace '/tmp/testlib.ip1'.
INFO:Waiting for 7 PiCache jobs ...
INFO:Waiting for 4 PiCache jobs ...
INFO:Waiting for 2 PiCache jobs ...
INFO:Waiting for 1 PiCache job ...
┌────────────────────────┬─────────────────┬───────────┬───────────────────┬───────────────────────────┐
│ NAME                   │     VERSION     │    MODE   │ RELATIVE PATH     │ CONFLICTS                 │
╞════════════════════════╪═════════════════╪═══════════╪═══════════════════╪═══════════════════════════╡
│ testlib.ip1            │     1.TRUNK     │   Refer   │ testlib.ip1       │                           │
│ tutorial.MS90G         │     1.TRUNK     │   Refer   │ blocks/MS90G      │                           │
│ tutorial.acells_tsmc18 │     1.TRUNK     │   Refer   │ acells_tsmc18     │                           │
│ tutorial.adc           │ HEAD.TRUNK [@1] │   Refer   │ adc               │                           │
│ tutorial.analog_top    │     2.TRUNK     │   Refer   │ blocks/analog_top │                           │
│ tutorial.clkgen        │ HEAD.TRUNK [@1] │   Refer   │ clkgen            │                           │
│ tutorial.dac           │ HEAD.TRUNK [@0] │ Container │                   │                           │
│ tutorial.intf_ana      │ HEAD.TRUNK [@2] │   Refer   │ blocks/intf_ana   │                           │
│ tutorial.laysc_tsmc18  │     1.TRUNK     │   Refer   │ laysc_tsmc18      │                           │
│ tutorial.pwr_mgmt_ana  │ HEAD.TRUNK [@1] │   Refer   │ pwr_mgmt_ana      │                           │
│ tutorial.stup_ana      │ HEAD.TRUNK [@1] │   Refer   │ stup_ana          │ tutorial.stup_ana@1.TRUNK │
│ tutorial.trc           │ HEAD.TRUNK [@1] │   Refer   │ trc               │                           │
└────────────────────────┴─────────────────┴───────────┴───────────────────┴───────────────────────────┘

Perforce IPLM notifies us that there was a conflict in the IP tree that was resolved based on the workspace load. In this case stup_ana@HEAD.TRUNK was chosen by the automatic conflict resolution mechanism in Perforce IPLM over stup_ana@1.TRUNK. Conflict resolution can be specified explicitly or left to automatic conflict resolution. Automatic resolution chooses Aliased IPVs over fixed version IPVs on the theory that an aliased IPV is more significant, and therefore a better choice than a fixed release. Further it considers @HEAD as taking precedence over standard moving aliases. Much of the time the automatic resolver will make the right choice, but not always. It is better to avoid introducing conflicts if possible, where it is not possible (when someone else owns a particular sub-hierarchy for instance) it may be necessary to specify the resolution with the --resolve Project Property.

Running 'pi ws status' shows the same information, noting that 'stup_ana' has a conflict and that testlib.ip1 is in a Modified state. Running pi ip diff shows why.

Check the Workspace Status
> pi ws st
Workspace ID : a0bec5f2-1409-464d-a335-a17a0d5278e7
Directory    : /tmp/testlib.ip1
IP           : testlib.ip1@1.TRUNK
Resources    :
┌───────────────────┬──────────────────┬─────────────────┬───────────┬───────────────┬───────┬───────────────────────────┐
│ NAME              │ EXPECTED VERSION │  LOCAL VERSION  │ WS STATUS │ SERVER STATUS │  MODE │ CONFLICTS                 │
╞═══════════════════╪══════════════════╪═════════════════╪═══════════╪═══════════════╪═══════╪═══════════════════════════╡
│ testlib.ip1       │     1.TRUNK      │     1.TRUNK     │  Modified │       OK      │ Refer │                           │
│ tutorial.stup_ana │ HEAD.TRUNK [@1]  │ HEAD.TRUNK [@1] │     OK    │       OK      │ Refer │ tutorial.stup_ana@1.TRUNK │
└───────────────────┴──────────────────┴─────────────────┴───────────┴───────────────┴───────┴───────────────────────────┘

> pi ip diff testlib.ip1
testlib.ip1@1.TRUNK on the server and testlib.ip1@1.TRUNK in the Workspace differ.
┌───────────────────┬─────────────────────┬───┬─────────────────┐
│ RESOURCES         │ testlib.ip1@1.TRUNK │   │    Workspace    │
╞═══════════════════╪═════════════════════╪═══╪═════════════════╡
│ tutorial.stup_ana │       1.TRUNK       │ → │ HEAD.TRUNK [@1] │
└───────────────────┴─────────────────────┴───┴─────────────────┘

If we make a release of this workspace the conflict will be removed based on the resolution in the workspace.

pi ip tree Command
> pi release --hier -m "new top level"INFO:Waiting for 2 PiCache jobs ...
INFO:Waiting for 1 PiCache job ...
Successfully created 'tutorial.adc@2.TRUNK'.
Successfully created 'testlib.ip1@2.TRUNK'.
> pi ws st -v
Workspace ID : a0bec5f2-1409-464d-a335-a17a0d5278e7
Directory    : /tmp/testlib.ip1
IP           : testlib.ip1@2.TRUNK
Resources    :
┌────────────────────────┬──────────────────┬─────────────────┬───────────┬───────────────┬───────────┐
│ NAME                   │ EXPECTED VERSION │  LOCAL VERSION  │ WS STATUS │ SERVER STATUS │    MODE   │
╞════════════════════════╪══════════════════╪═════════════════╪═══════════╪═══════════════╪═══════════╡
│ testlib.ip1            │     2.TRUNK      │     2.TRUNK     │     OK    │       OK      │   Refer   │
│ tutorial.MS90G         │     1.TRUNK      │     1.TRUNK     │     OK    │       OK      │   Refer   │
│ tutorial.acells_tsmc18 │     1.TRUNK      │     1.TRUNK     │     OK    │       OK      │   Refer   │
│ tutorial.adc           │ HEAD.TRUNK [@2]  │ HEAD.TRUNK [@2] │     OK    │       OK      │   Refer   │
│ tutorial.analog_top    │     2.TRUNK      │     2.TRUNK     │     OK    │       OK      │   Refer   │
│ tutorial.clkgen        │ HEAD.TRUNK [@1]  │ HEAD.TRUNK [@1] │     OK    │       OK      │   Refer   │
│ tutorial.dac           │ HEAD.TRUNK [@0]  │ HEAD.TRUNK [@0] │     OK    │       OK      │ Container │
│ tutorial.intf_ana      │ HEAD.TRUNK [@2]  │ HEAD.TRUNK [@2] │     OK    │       OK      │   Refer   │
│ tutorial.laysc_tsmc18  │     1.TRUNK      │     1.TRUNK     │     OK    │       OK      │   Refer   │
│ tutorial.pwr_mgmt_ana  │ HEAD.TRUNK [@1]  │ HEAD.TRUNK [@1] │     OK    │       OK      │   Refer   │
│ tutorial.stup_ana      │ HEAD.TRUNK [@1]  │ HEAD.TRUNK [@1] │     OK    │       OK      │   Refer   │
│ tutorial.trc           │ HEAD.TRUNK [@1]  │ HEAD.TRUNK [@1] │     OK    │       OK      │   Refer   │
└────────────────────────┴──────────────────┴─────────────────┴───────────┴───────────────┴───────────┘

> pi ip tree testlib.ip1
testlib.ip1@2.TRUNK
├─ tutorial.analog_top@2.TRUNK
│  ├─ tutorial.MS90G@1.TRUNK
│  ├─ tutorial.acells_tsmc18@1.TRUNK
│  ├─ tutorial.clkgen@HEAD.TRUNK [@1]
│  ├─ tutorial.intf_ana@HEAD.TRUNK [@2]
│  │  ├─ tutorial.acells_tsmc18@1.TRUNK
│  │  ├─ tutorial.adc@HEAD.TRUNK [@2]
│  │  │  ├─ tutorial.acells_tsmc18@1.TRUNK
│  │  │  └─ tutorial.laysc_tsmc18@1.TRUNK
│  │  ├─ tutorial.dac@HEAD.TRUNK [@0]
│  │  └─ tutorial.laysc_tsmc18@1.TRUNK
│  ├─ tutorial.laysc_tsmc18@1.TRUNK
│  ├─ tutorial.pwr_mgmt_ana@HEAD.TRUNK [@1]
│  ├─ tutorial.stup_ana@HEAD.TRUNK [@1]
│  │  ├─ tutorial.acells_tsmc18@1.TRUNK
│  │  └─ tutorial.laysc_tsmc18@1.TRUNK
│  └─ tutorial.trc@HEAD.TRUNK [@1]
└─ tutorial.stup_ana@HEAD.TRUNK [@1]
   ├─ tutorial.acells_tsmc18@1.TRUNK
   └─ tutorial.laysc_tsmc18@1.TRUNK

'pi ws st' reports no Modifications, and 'pi ip tree' reports no conflicts, the workspace version of tutorial.stup_ana was captured in the new release since that's what was in the workspace when we ran the hierarchical release.