Perl Scripting Example - 2021.1 English

Xilinx Power Estimator User Guide (UG440)

Document ID
UG440
Release Date
2021-06-16
Version
2021.1 English

This simple example opens XPE then export results into a text power report using Perl scripting language.

use Win32::OLE;
use Win32::OLE::Const 'Microsoft Excel';

my $myXPEfilename = "C:\\Power\\7_Series_XPE_13_1.xls";

# Opening XPE
my $Excel = Win32::OLE->GetActiveObject('Excel.Application')
   || Win32::OLE->new('Excel.Application', 'Quit');
my $Book = $Excel->Workbooks->Open($myXPEfilename);
# Export XPE results into a text power report
$Excel->Run("ThisWorkBook.GeneratePowerReportFile", "$path/${design}.pwr");