The following examples define the public Visual Basic functions defined in the Xilinx® 7 series XPE spreadsheet to help you with your automation needs. They provide convenient ways to load files, create power reports, change parts, packages and environment settings from Excel or another program.
- Create a text power report and save with name specified as
argument.
Public Sub GeneratePowerReportFile(FileName As String)
- Create a settings file and save with name specified as argument. This file can later be used
in XPower
Analyzer.
Public Sub GenerateXPAFile(FileName As String)
- Create an XPE file and save with name specified as argument. This file can later be
used to restore the current settings in
XPE.
Public Sub GenerateXPEFile(FileName As String)
- Import an existing XPE spreadsheet (.xls* path/file specified as
argument).
Public Sub ImportXPEFile(path As String)
- Import a place and route map report (.mrp path/file specified as
argument).
Public Sub ImportMapReportFile(FileName As String)
- Import implementation results in .xpe format. Review the Import dialog options for
details and format of the different
arguments.
Public Sub ImportXmlFile(FileName As String, Append As Boolean,DevSettings As Boolean, EnvSettings As Boolean, VoltSettings As Boolean, IOSettings As Boolean)
- Take a snapshot of the currently loaded Power information or load a snapshot of
another XPE
spreadsheet:
Public Sub TakeSnapshot( FileName As String)
Usage: Pass an empty string for FileName to take a snapshot of the active workbook, or pass the file name of another workbook that will import as a snapshot.
Example:
TakeSnapshot("")
- Set device information and check whether the device is valid. Returns True if valid
device or False if not
valid.
Public Function SetDeviceInfo(Device As String, Package As String, TempGrade As String, SpeedGrade As String) As Boolean
Example:
SetDeviceInfo("XC7K325T", "FBG900", "Industrial", "-1")
- Read resource utilization % of the specific resource by a pre-defined name passed as
ResourceName.
Public Function GetUtilization(ResourceName As String) As Double
Sample values for ResourceName:
CLOCK_GLOBAL, CLOCK_REGIONAL, LOGIC_LUTS, IO_TOTAL, IO_HP, BRAM_RAMB18
Example:
my $util = $Book->GetUtilization("BRAM_RAMB18");
This returns the value of the BRAM sheet RAMB18 utilization, e.g. 75 for 75%.
- Set the default voltages for all supply voltages. Set argument to False for Nominal
voltages and to True for Maximum voltage
levels.
Public Sub SetDefaultVoltages(Maximum As Boolean)
- Set the Device field on the Summary sheet (will automatically
adjust the Family field if
required).
Public Function SetDevice(Device As String) As Boolean
- Set the Package field on the Summary
sheet.
Public Function SetPackage(Package As String) As Boolean
- Set the Process field on the Summary sheet. Set argument to False for Typical
process and True for Maximum
process.
Public Sub SetProcess (Maximum As Boolean)
- Set the Temp Grade field on the Summary sheet. Options are
"Commercial", "Industrial", "Q-Grade", "Extended”, and so
forth.
Public Function SetTemperatureGrade (Grade as String) as Boolean
- Set the Speed Grade field on the Summary sheet. Options are
"-1", "-1L", and so
forth.
Public Function SetSpeedGrade (Grade as String) as Boolean
- Set the Heat Sink field on the Summary sheet. Options are
"Custom", "None", "Low
Profile"
Public Function SetHeatSink (Sink as String) as Boolean
- Set the Board Selection field on the Summary sheet. Options
are "Custom", "JEDEC", "Small", "Medium",
"Large".
Public Function SetBoard (BoardSize as String, BoardLayers as Integer) as Boolean
- Set the User Override for the Junction
Temperature, and
value.
Public Function SetJunctionTemperature(Temperature As Double, OverRide As Boolean) As Boolean
- Set the User Override for the Effective
ThetaJA, and
value.
Public Function SetEffectiveThetaJA(ThetaJA As Double, OverRide As Boolean) As Boolean