Power Estimation and Management for LatticeXP2 Devices

Power Estimation and Management
for LatticeXP2 Devices
February 2007
Technical Note TN1139
Introduction
One requirement for design engineers using programmable devices is the ability to calculate the power dissipation
for a particular device used on a board. Lattice’s ispLEVER® design tools include the Power Calculator tool, which
allows designers to calculate the power dissipation for a given device. This technical note describes how to use the
Power Calculator tool to calculate the power consumption of the LatticeXP2™ family of devices. General guidelines
to reduce power consumption are also included.
Power Supply Sequencing and Hot Socketing
LatticeXP2 devices have been designed to ensure predictable behavior during power-up and power-down. Power
supplies can be sequenced in any order. During power-up and power-down sequences, the I/Os remain in tri-state
until the power supply voltage is high enough to ensure reliable operation. In addition, leakage into I/O pins is controlled to within the limits specified in the LatticeXP2 Family Data Sheet, allowing for easy integration with the rest
of the system. These capabilities make the LatticeXP2 ideal for many multiple power supply and hot-swap applications.
Recommended Power-up Sequence
As described above, the supplies can be sequenced in any order. However, once internal power good is achieved
(determined by VCC, VCCAUX, VCCIO Bank x) the device releases the I/Os from tri-state and the management of
the I/Os becomes the designer's responsibility. To simplify a system design, it is recommended that supplies be
sequenced in the following order: VCCIO, VCC, VCCAUX. If VCCIO is tied to VCC or VCCAUX, then it is recommended that VCCIO and the associated power supply are powered up before the remaining supply.
Please refer to the Hot Socketing section of the LatticeXP2 Family Data Sheet for more information.
Power Calculator Hardware Assumptions
Power consumption for a device can be coarsely broken down into the DC portion and the AC portion.
The Power Calculator reports the power dissipation in terms of:
1. DC portion of the power consumption.
2. AC portion of the power consumption.
The DC Power (or the Static power consumption) is the total power consumption of the used and the unused
resources. These power components are fixed for each resource used and depends upon the number of resource
units utilized. The DC component also includes the static power dissipation for the unused resources of the device.
The AC portion of power consumption is associated with the used resources. This is the dynamic part of the power
consumption. Its power dissipation is directly proportional to the frequency at which the resource is running and the
number of resource units used.
Power Calculation Equations
The following are the power equations used in the Power Calculator:
© 2007 Lattice Semiconductor Corp. All Lattice trademarks, registered trademarks, patents, and disclaimers are as listed at www.latticesemi.com/legal. All other brand
or product names are trademarks or registered trademarks of their respective holders. The specifications and information herein are subject to change without notice.
www.latticesemi.com
12-1
tn1139_01.0
Power Estimation and Management
for LatticeXP2 Devices
Lattice Semiconductor
Total DC Power (Resource)
= Total DC Power of Used Portion + Total DC Power of Unused Portion
= [DC Leakage per Resource when Used * NRESOURCE]
+ [DC Leakage per Resource when Unused * (NTOTAL RESOURCE - NRESOURCE)]
Where:
NTOTAL RESOURCE
NRESOURCE
is the total number of resources in a device
is the number of resources used in the design
The total DC power consumption for all the resources as per the design data is the Quiescent Power in the Power
Calculator.
The AC Power is governed by the following equation:
Total AC Power (Resource)
= KRESOURCE * fMAX * AFRESOURCE * NRESOURCE
Where:
NTOTALRESOURCE
NRESOURCE
KRESOURCE
fMAX
AFRESOURCE
is the number of resources in a device
is the number of resources used in the design
is the power constant for the resource in mW/MHz
is the max frequency at which the resource is running. Frequency is measured in MHz.
is the activity factor for the resource group.The Activity Factor is a percentage of the switching
frequency.
For example, the power consumption of the Slice portion is calculated in the following equation,
Total DC Power (Slice)
= Total DC Power of Used Portion + Total DC Power of Unused Portion
= [DC Leakage per Slice when Used * NSLICE]
= +[DC Leakage per Slice when Unused * (NTOTALSLICE - NSLICE)]
Total AC Power (Slice)
= KSLICE * fMAX * AFSLICE * NSLICE
Power Calculations
The Power Calculator allows users to estimate power consumption at three different levels:
1. Estimate of the utilized resources before completing place and route
2. Post place and route design
3. Post place and route, post trace, and post simulation
For the first level of estimation, the user provides estimates of device usage in the Power Calculator Wizard and the
tool provides a rough estimate of the power consumption.
The second level is a more accurate approach. The user imports the actual device utilization by importing the post
Place and Route netlist (NCD) file.
The third level brings even more accuracy to the calculation by importing the Trace (TWR) file to populate the maximum frequencies (fMAX) into the tool. Users also have the option of importing the information from the post simulation (VCD) file and calculating the Activity Factor and Toggle Rates of various components.
These three stages of power calculation are discussed in detail in the following sections of this document.
12-2
Power Estimation and Management
for LatticeXP2 Devices
Lattice Semiconductor
Using the Power Calculator
Starting the Power Calculator
The Power Calculator can be launched by one of two methods. The first method is to click the Power Calculator
button in the toolbar as shown in Figure 12-1.
Figure 12-1. Starting Power Calculator from the Toolbar
The Power Calculator can also be launched by going to the Tools menu and selecting the option Power Calculator
as shown in Figure 12-2.
12-3
Power Estimation and Management
for LatticeXP2 Devices
Lattice Semiconductor
Figure 12-2. Starting Power Calculator from Tools Menu
Note: The Power Calculator does not support some older Lattice devices. The toolbar button and menu item are
only present when supported devices are selected.
Creating a Power Calculator Project
After starting the Power Calculator, the Power Calculator window is displayed. Click on the File menu and select
New to get to the Start Project window as shown in Figure 12-3.
Figure 12-3. Power Calculator Start Project Window (Create New Project)
12-4
Power Estimation and Management
for LatticeXP2 Devices
Lattice Semiconductor
The Start Project window is used to create a new Power Calculator Project (*.pep project). Three pieces of data are
entered into the Start Project window.
1. The Power Calculator project name by default is same as the Project Navigator project name. It can be
changed, if desired.
2. Project Directory is where the Power Calculator project (*.pep) file will be stored. By default it is stored in
the main project folder.
3. The NCD file is automatically selected, if available, or users can browse to the NCD file in a different location.
Power Calculator Main Window
The Power Calculator main window is shown in Figure 4.
Figure 12-4. Power Calculator Main Window (Type View)
The top pane of the window shows information about the device family, device and the part number as it appears in
the Project Navigator. The VCC used for the power calculation is also listed. Users have the choice of selecting the
core voltage VCC with +5% of the nominal value (or values). The option of selecting VCCJ is also available. Users
can provide the ambient temperature, and the junction temperature is calculated based on that.
Users can also enter values for airflow in Linear Feet per Minute (LFM) along with heat sink to obtain the junction
temperature.
The table near the top of the Power Calculator main window summarizes the currents and power consumption
associated with each type of power supply for the device. This also takes into consideration the I/O power supplies.
12-5
Power Estimation and Management
for LatticeXP2 Devices
Lattice Semiconductor
In the middle pane of the window, there are three tabs:
1. Power View
The first tab is the Power view. This tab provides an interactive spreadsheet type interface with all values in
terms of power consumption mW.
The first column breaks down the design in terms of clock domains. The second and third columns, which
are shaded blue, provide the DC (static) and AC (dynamic) power consumption, respectively.
Next are four columns shaded blue. These provide information on the I/O DC and AC power, including core
voltage, VCC and the I/O voltage supply, VCCIO.
The first three rows show the Quiescent Power for VCC, VCCAUX and VCCJ. These are DC power numbers for a blank device or device with no resource utilization.
Some of the cells are shaded yellow. These cells are editable cells and users can type in values such as
frequency, activity factors and resource utilization. The second tab (the Report tab) is the summary of the
Power View. This report is in text format and provides details of the power consumption.
2. ICC View
The second tab is the ICC view. This tab is exactly same as the Power View tab, except that all values are
expressed in terms of current or mA.
3. Report View
The third and final tab is the Report view. This is an HTML type of Power Calculator report. It summarizes
the contents of the Power and ICC views.
The final pane, the lower pane of the window, is the log pane where users can see a log of the various operations
in the Power Calculator.
Figure 12-5. Power Calculator Main Window (Power Report View)
12-6
Power Estimation and Management
for LatticeXP2 Devices
Lattice Semiconductor
Power Calculator Wizard
The Power Calculator Wizard allows users to estimate the power consumption of a design. This estimation is done
before the design is created. It is important for the user to understand the logic requirements of the design. The
wizard allows the user to provide the required parameters and then estimates the power consumption of the
device.
To start the Power Calculator in the wizard mode, go to the File menu and select Wizard. Alternatively, you can
click on the Wizard button to see the Power Calculator - Wizard window as shown in Figure 12-6. Select the option
Create a new Project and check the Wizard check box in the Power Calculator Start Project window. Provide the
project name and the project folder and click Continue. Since this is power estimation before the actual design, no
NCD file is required.
Figure 12-6. Power Calculator Start Project Window (Using the New Project Window Wizard)
In the next screen, the device family, device, and part number are chosen. After making the proper selections, click
Continue. This is shown in Figure 7.
12-7
Power Estimation and Management
for LatticeXP2 Devices
Lattice Semiconductor
Figure 12-7. Power Calculator Wizard Mode Window - Device Selection
In the following screens (Figures 8-12) users can select additional resources, such as I/O types, clock name, frequency at which the clock in running and other parameters by selecting the appropriate resource using the pulldown Type menu.
1. Routing Resources
2. Logic
3. EBR
4. I/O
5. PLL
6. Clock Tree
The number in these windows refers to the number of clocks and the index corresponds to each of the clocks. By
default, the clock names are clk_1, clk_2, and so on. Clock names can be changed by typing in the Clock Name
text box. For each clock domain and resource, parameters such as Frequency and Activity Factor can be specified.
In the final window, click the Create button for each clock driven resource to include the parameters specified for it.
12-8
Power Estimation and Management
for LatticeXP2 Devices
Lattice Semiconductor
Figure 12-8. Power Calculator Wizard Mode Window - Resource Specification
These parameters are then used in the Power Type View window, which can be seen upon clicking on Finish (see
Figure 9).
Figure 12-9. Power Calculator Wizard Mode - Main Window
12-9
Power Estimation and Management
for LatticeXP2 Devices
Lattice Semiconductor
Creating a New Project Without the NCD File
A new project can be started without the NCD file, either by using the wizard (as discussed above) or by selecting
the Create a New Project option in the Power Calculator - Start Project. The project name and project directory
must be provided. After clicking Continue the Power Calculator main window will be displayed.
However, in this case there are no resources added. The power estimation row for the routing resources is always
available in the Power Calculator. Additional information such as the Slice, EBR, I/O, PLL, and clock tree utilization
must be provided to calculate the power consumption.
For example, if the user wants to add the logic resources shown in Figure 10, right-click on Logic >> and then
select Add Row in the menu that pops up.
Figure 12-10. Power Calculator Main Window - Adding Resources
This adds a new row for the logic resource utilization with clock domain named clk_1.
Similarly, other resources like EBR, I/Os, PLLs and routing can be added. Each of these resources is used for AC
power estimation and categorized by clock domains.
Creating a New Project with the NCD File
If the post place and routed NCD file is available, the Power Calculator can use it to import accurate information
about the design data and resource utilization for power calculation. After starting the Power Calculator, the NCD
file is automatically placed in the NCD File option, if it is available in the project directory. Otherwise, browse to the
NCD file using the Power Calculator.
12-10
Power Estimation and Management
for LatticeXP2 Devices
Lattice Semiconductor
Figure 12-11. Power Calculator Start Project Window with Post PAR NCD File
The information from the NCD file is automatically inserted into the correct rows and Power Calculator uses the
Clock names from the design as shown in Figure 12-12.
Figure 12-12. Power Calculator Main Window - Resource Utilization Picked Up from the NCD File
12-11
Power Estimation and Management
for LatticeXP2 Devices
Lattice Semiconductor
Opening an Existing Project
The Power Calculator - Start Project window also allows users to open an existing project. Select Open Existing
Project and browse to the *.pep project file and click Continue. This opens the existing project in windows similar
to those discussed above (see Figure 12-13).
Figure 12-13. Opening an Existing Project in Power Calculator
Importing a Simulation File (VCD)
A post simulation VCD file can be imported into the Power Calculator project to estimate a design’s activity factors.
Under the File menu, select Open Simulation File and browse to the VCD file location and select Open. All AF
and Toggle Rate fields are then populated with the information from this file, as shown in Figure 12-14.
Figure 12-14. Importing a Simulation File in an Existing Power Calculator Project
12-12
Power Estimation and Management
for LatticeXP2 Devices
Lattice Semiconductor
Importing a Trace Report File (TWR)
Post Trace TWR file can be imported into the Power Calculator project to estimate a design’s activity factors. Under
the File menu, select Open Trace Report File, browse to the TWR file location and select Open. All Freq. (MHz)
fields are then populated with the information from this file, as shown in Figure 12-15.
Figure 12-15. Importing a Trace Report File to a Power Calculator Project
Activity Factor and Toggle Rate
Activity Factor% (or AF%) is defined as the percentage of frequency (or time) that a signal is active or toggling of
the output. Most of the resources associated with a clock domain are running or toggling at some percentage of the
frequency at which the clock is running. Users must provide this value as a percentage under the AF% column in
the Power Calculator tool.
Another term used is the I/O Toggle Rate or the I/O Toggle Frequency. The AF% is applicable to the PFU, routing
and memory read write ports, etc. The activity of the I/Os is determined by the signals provided by the user (for
inputs) or as an output of the design (for outputs). Therefore, the rates at which I/Os toggle define their activity. The
Toggle Rate (or TR) in MHz of the output is defined by the following equation:
Toggle Rate (MHz) = 1/2 * fMAX * AF%
Users must provide the TR (MHz) value for the I/O instead of providing the Frequency and AF% in case of other
resources. The AF can be calculated for each routing resource, output or PFU. However, it involves long calculations. The general recommendation for a design occupying roughly 30% to 70% of the device is an AF% of 15% to
25%. This is an average value that can be seen most of the design. An accurate value for an activity factor depends
upon clock frequency, stimulus to the design and the final output.
12-13
Power Estimation and Management
for LatticeXP2 Devices
Lattice Semiconductor
Ambient and Junction Temperatures and Airflow
A common method of characterizing a packaged device’s thermal performance is with thermal resistance, or Θ. For
a semiconductor device, thermal resistance indicates the steady state temperature rise of the die junction above a
given reference for each watt of power (heat) dissipated at the die surface. Its units are °C/W.
The most common examples are ΘJA, Thermal Resistance Junction-to-Ambient (in °C/W) and ΘJC, Thermal Resistance Junction-to-Case (also in °C/W). Another factor is ΘJB, Thermal Resistance Junction-to-Board (in °C/W).
Knowing the reference (i.e. ambient, case, or board) temperature, the power, and the relevant Θ value, the junction
temp can be calculated by the following equations.
TJ = TA + ΘJA * P
(1)
TJ = TC + ΘJC * P
(2)
TJ = TB + ΘJB * P
(3)
While TJ, TA,TC and TB are the Junction, Ambient, Case (or Package) and Board temperatures (in °C) respectively,
P is the total power dissipation of the device.
ΘJA is commonly used with natural and forced convection air-cooled systems. ΘJC is useful when the package has
a high conductivity case mounted directly to a PCB or heatsink. And ΘJB applies when the board temp adjacent to
the package is known.
The Power Calculator utilizes the Ambient Temperature (°C) to calculate the Junction Temperature (°C) based on
the ΘJA for the targeted device, per Equation 1 above. Users can also provide the Airflow values (in LFM) to get a
more accurate value of the Junction temperature.
Managing Power Consumption
One of the most critical design factors today is the reduction of system power consumption, especially for modern
handheld devices and electronics. There are several design techniques that can significantly reduce overall system
power consumption. Some of these include:
1. Reducing operating voltage.
2. Operating within the specified package temperature limitations.
3. Using the optimum clock frequency to reduce power consumption, since dynamic power is directly proportional to the frequency of operation. Designers must determine if a portion of their design can be clocked at
a lower rate that will reduce power.
4. Reducing the span of the design across
5. Reducing the voltage swing of the I/Os where possible.
6. Using optimum encoding where possible. For example, a 16-bit binary counter has, on average, only 12%
Activity Factor and a 7-bit binary counter has an average of 28% Activity Factor. On the other hand, a 7-bit
Linear Feedback Shift Register could toggle as much as 50% Activity Factor, which causes higher power
consumption. A gray code counter, where only one bit changes at each clock edge, will use the least
amount of power, as the Activity Factor would be less than 10%.
7. Minimize the operating temperature, by the following methods:
a. Use packages that can better dissipate heat. For example, packages with lower thermal impedance.
b. Place heat sinks and thermal planes around the device on the PCB.
c. Better airflow techniques using mechanical airflow guides and fans (both system fans and device
mounted fans).
12-14
Power Estimation and Management
for LatticeXP2 Devices
Lattice Semiconductor
Power Calculator Assumptions
The following are the assumptions made by the Power Calculator:
1. The Power Calculator tool is based on equations with constants based on a room temperature of 25°C.
2. The user can define the Ambient Temperature (TA) for device Junction Temperature (TJ) calculation based
on the power estimation. TJ is calculated from user-entered TA and power calculation of typical room temperature.
3. I/O power consumption is based on output loading of 5pF. Users can change this capacitive loading.
4. The Power Calculator provides an estimate of the power dissipation and current for each of the following
types of power supplies: VCC, VCCIO, VCCJ and VCCAUX.
5. The nominal VCC is used by default to calculate power consumption. A lower or higher VCC can be chosen from a list of available values.
6. Airflow in Linear Feet per Minute (LFM) can be entered by the user along with the Heat Sink option to calculate the Junction Temperature.
7. The default value of the I/O types is LVCMOS12, 6mA.
8. The Activity Factor (AF) is defined as the toggle rate of the registered output. For example, assuming that
the input of a flip-flop is changing at every clock cycle, 100% AF of a flip-flop running at 100MHz is 50MHz.
Technical Support Assistance
Hotline: 1-800-LATTICE (North America)
+1-503-268-8001 (Outside North America)
e-mail: [email protected]
Internet: www.latticesemi.com
Revision History
Date
Version
February 2007
01.0
Change Summary
Initial release.
12-15