Hierarchical releases
This training page describes the Hierarchical Release command in Perforce IPLM, which automates the hierarchical releases needed to capture the full workspace hierarchy with many modifications, in a new release.
Hierarchical releases
The various resources of a large IP Hierarchy that is loaded into a workspace may have modifications in a number of different sections of the hierarchy. In order to make a release of the top level IP that includes all the changes in the workspace it is necessary to create a new release of the parent of each changed resource, and then a release of each of their parents, on up to the top level IP in the workspace. This method can be used for releasing IPs with a simple hierarchy, but for IP with more complex hierarchies, this can become rather involved.
Perforce IPLM provides hierarchical releases to automate the process of making new releases up the hierarchy. In a hierarchical release Perforce IPLM analyzes the tree for the required releases, and makes the necessary releases up the hierarchy to the top level.
For more information see the page Making Workspace Releases in the User Guide.
Below is an example of a case where the top level IP has multiple hierarchies, whose resources have modifications. (add/edit files under tutorial.proj_tech)
Multiple IP Hierarchies
> pi ip load tutorial.digital_top > cd tutorial.digital_top > pi ip local --all > touch blocks/proj_tech/hw_code/readme > p4 add blocks/proj_tech/hw_code/readme //mdx_test/tutorial/proj_tech/trunk/hw_code/readme#1 - opened for add /mdx/work/tutorial.digital_top/blocks/proj_tech/hw_code/readme - empty, assuming text (+Fl). > touch blocks/t0/hw_code/readme > p4 add blocks/t0/hw_code/readme //mdx_test/tutorial/t0/trunk/hw_code/readme#1 - opened for add /mdx/work/tutorial.digital_top/blocks/t0/hw_code/readme - empty, assuming text (+Fl). > p4 submit -d "New files added"Submitting change 6. Locking 2 files ... add //mdx_test/tutorial/proj_tech/trunk/hw_code/readme#1 add //mdx_test/tutorial/t0/trunk/hw_code/readme#1 Change 6 submitted. > pi ws st -v Workspace ID : 8b6c328b-f1d5-49d0-8360-d91e8c881414 Directory : /tmp/tutorial.digital_top IP : tutorial.digital_top@1.TRUNK Resources : ┌──────────────────────┬───────────────────┬───────────────────┬───────────┬───────────────┬───────┬──────────────────────────┐ │ NAME │ EXPECTED VERSION │ LOCAL VERSION │ WS STATUS │ SERVER STATUS │ MODE │ CONFLICTS │ ╞══════════════════════╪═══════════════════╪═══════════════════╪═══════════╪═══════════════╪═══════╪══════════════════════════╡ │ tutorial.digital_top │ 1.TRUNK │ 1.TRUNK │ Modified │ OK │ Local │ │ │ tutorial.aes512 │ 1.TRUNK │ 1.TRUNK │ OK │ OK │ Local │ │ │ tutorial.bist_sram │ 1.TRUNK │ 1.TRUNK │ Modified │ OK │ Local │ │ │ tutorial.clk_mux │ 1.TRUNK │ 1.TRUNK │ OK │ OK │ Local │ │ │ tutorial.cpu │ LATEST.TRUNK [@2] │ LATEST.TRUNK [@2] │ OK │ OK │ Local │ │ │ tutorial.dbuf │ 1.TRUNK │ 1.TRUNK │ Modified │ OK │ Local │ │ │ tutorial.events_if │ 1.TRUNK │ 1.TRUNK │ Modified │ OK │ Local │ │ │ tutorial.flash │ 1.TRUNK │ 1.TRUNK │ Modified │ OK │ Local │ │ │ tutorial.flash_if │ 1.TRUNK │ 1.TRUNK │ Modified │ OK │ Local │ │ │ tutorial.gen_dig │ LATEST.TRUNK [@2] │ LATEST.TRUNK [@2] │ OK │ OK │ Local │ tutorial.gen_dig@1.TRUNK │ │ tutorial.interface │ 1.TRUNK │ 1.TRUNK │ Modified │ OK │ Local │ │ │ tutorial.proj_tech │ 1.TRUNK │ 1.TRUNK │ Modified │ OK │ Local │ │ │ tutorial.rx_channel │ 1.TRUNK │ 1.TRUNK │ Modified │ OK │ Local │ │ │ tutorial.rxtx │ 1.TRUNK │ 1.TRUNK │ Modified │ OK │ Local │ │ │ tutorial.sys_bus │ 1.TRUNK │ 1.TRUNK │ Modified │ OK │ Local │ │ │ tutorial.t0 │ 1.TRUNK │ 1.TRUNK │ Modified │ OK │ Local │ │ │ tutorial.t1 │ 1.TRUNK │ 1.TRUNK │ Modified │ OK │ Local │ │ │ tutorial.timers │ 1.TRUNK │ 1.TRUNK │ Modified │ OK │ Local │ │ └──────────────────────┴───────────────────┴───────────────────┴───────────┴───────────────┴───────┴──────────────────────────┘ > pi ip diff t0 tutorial.t0@1.TRUNK on the server and tutorial.t0@1.TRUNK in the Workspace differ. ┌──────────────────┬─────────────────────┬───┬───────────────────┐ │ RESOURCES │ tutorial.t0@1.TRUNK │ │ Workspace │ ╞══════════════════╪═════════════════════╪═══╪═══════════════════╡ │ tutorial.gen_dig │ 1.TRUNK │ → │ LATEST.TRUNK [@2] │ └──────────────────┴─────────────────────┴───┴───────────────────┘ ┌────────────────┬─────────────────────┬───────────┐ │ FILES │ tutorial.t0@1.TRUNK │ Workspace │ ╞════════════════╪═════════════════════╪═══════════╡ │ hw_code/readme │ │ 1 │ └────────────────┴─────────────────────┴───────────┘ > pi ip diff proj_tech tutorial.proj_tech@1.TRUNK on the server and tutorial.proj_tech@1.TRUNK in the Workspace differ. ┌────────────────┬────────────────────────────┬───────────┐ │ FILES │ tutorial.proj_tech@1.TRUNK │ Workspace │ ╞════════════════╪════════════════════════════╪═══════════╡ │ hw_code/readme │ │ 1 │ └────────────────┴────────────────────────────┴───────────┘
Hierarchy of the IPV
Running pi ip tree
shows the original tree for that version of the IP.
> pi ip tree tutorial.digital_top 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) (c1) The IP 'tutorial.gen_dig' occurs with the following versions: 1.TRUNK, LATEST.TRUNK [@2]. Resolved to Version 'LATEST.TRUNK [@2]' automatically.
Making a hierarchical release
To release the IP hierarchically:
> pi release --hier -m "new digital_top"Successfully created 'tutorial.bist_sram@2.TRUNK'. Successfully created 'tutorial.dbuf@2.TRUNK'. Successfully created 'tutorial.timers@2.TRUNK'. Successfully created 'tutorial.events_if@2.TRUNK'. Successfully created 'tutorial.proj_tech@2.TRUNK'. Successfully created 'tutorial.cpu@3.TRUNK'. Successfully created 'tutorial.t0@2.TRUNK'. Successfully created 'tutorial.interface@2.TRUNK'. Successfully created 'tutorial.t1@2.TRUNK'. Successfully created 'tutorial.rxtx@2.TRUNK'. Successfully created 'tutorial.clk_mux@2.TRUNK'. Successfully created 'tutorial.rx_channel@2.TRUNK'. Successfully created 'tutorial.sys_bus@2.TRUNK'. Successfully created 'tutorial.flash_if@2.TRUNK'. Successfully created 'tutorial.flash@2.TRUNK'. Successfully created 'tutorial.digital_top@2.TRUNK'. > pi ws st -v Workspace ID : 8b6c328b-f1d5-49d0-8360-d91e8c881414 Directory : /tmp/tutorial.digital_top IP : tutorial.digital_top@2.TRUNK Resources : ┌──────────────────────┬───────────────────┬───────────────────┬───────────┬───────────────┬───────┐ │ NAME │ EXPECTED VERSION │ LOCAL VERSION │ WS STATUS │ SERVER STATUS │ MODE │ ╞══════════════════════╪═══════════════════╪═══════════════════╪═══════════╪═══════════════╪═══════╡ │ tutorial.digital_top │ 2.TRUNK │ 2.TRUNK │ OK │ OK │ Local │ │ tutorial.aes512 │ 1.TRUNK │ 1.TRUNK │ OK │ OK │ Local │ │ tutorial.bist_sram │ 2.TRUNK │ 2.TRUNK │ OK │ OK │ Local │ │ tutorial.clk_mux │ 2.TRUNK │ 2.TRUNK │ OK │ OK │ Local │ │ tutorial.cpu │ LATEST.TRUNK [@3] │ LATEST.TRUNK [@3] │ OK │ OK │ Local │ │ tutorial.dbuf │ 2.TRUNK │ 2.TRUNK │ OK │ OK │ Local │ │ tutorial.events_if │ 2.TRUNK │ 2.TRUNK │ OK │ OK │ Local │ │ tutorial.flash │ 2.TRUNK │ 2.TRUNK │ OK │ OK │ Local │ │ tutorial.flash_if │ 2.TRUNK │ 2.TRUNK │ OK │ OK │ Local │ │ tutorial.gen_dig │ LATEST.TRUNK [@2] │ LATEST.TRUNK [@2] │ OK │ OK │ Local │ │ tutorial.interface │ 2.TRUNK │ 2.TRUNK │ OK │ OK │ Local │ │ tutorial.proj_tech │ 2.TRUNK │ 2.TRUNK │ OK │ OK │ Local │ │ tutorial.rx_channel │ 2.TRUNK │ 2.TRUNK │ OK │ OK │ Local │ │ tutorial.rxtx │ 2.TRUNK │ 2.TRUNK │ OK │ OK │ Local │ │ tutorial.sys_bus │ 2.TRUNK │ 2.TRUNK │ OK │ OK │ Local │ │ tutorial.t0 │ 2.TRUNK │ 2.TRUNK │ OK │ OK │ Local │ │ tutorial.t1 │ 2.TRUNK │ 2.TRUNK │ OK │ OK │ Local │ │ tutorial.timers │ 2.TRUNK │ 2.TRUNK │ OK │ OK │ Local │ └──────────────────────┴───────────────────┴───────────────────┴───────────┴───────────────┴───────┘