Introduction - Introduction - 2026.1 English - UG1781

Python Scripting Guide for PDM Tool (UG1781)

Document_ID
UG1781
Release_Date
2026-06-23
Version
2026.1 English
Revision

This document provides an overview of the AMD Power Design Manager (PDM) Python scripting interface, which serves as a powerful alternative to the graphical user interface (GUI). It offers the flexibility to write scripts that streamline the power estimation process, providing a robust framework for managing power-delivery strategies across various applications and industries. This interface helps with the interaction with the underlying system structure and offers customization according to project-specific needs.

The Python interface supports all functionalities available in the Tool GUI, ensuring a comprehensive tool set for users who prefer scripting. The structure of global functions and classes in the Python interface mirrors the organization found in the GUI, helping with a smooth transition for users familiar with the GUI.

The entry point for executing Python scripts involves either creating a new project or opening an existing one by invoking the appropriate global functions. These functions return a Python object of type PdmProject, from which other objects of various classes can be accessed.

Following is the class dependency diagram, which displays the relationships between different classes within the Python interface. For detailed information, refer to the specific chapters and topics outlined in this document.

Figure 1. PDM Python Classes/Global Functions Dependency

To use the Python interface, execute the following commands based on the required mode of operation:

Interactive Mode
Use the following command to start the tool for exploratory analysis:

$ pdm -mode py

Scripting Mode
Predefined scripts can be run for automated power estimation with the command:

$ pdm -mode py -script example.py

To ensure the scripting mode functions as a batch mode, executing the script and then exiting the tool, the exit() command must be included as the last line of the script.

These commands allow to be integrated into workflows, whether for interactive exploration or automated script execution.

Important: All global functions and class methods raise a RuntimeError with relevant details in the error message if an issue occurs during execution.