Professional Documents
Culture Documents
Table of Contents
1. Introduction .............................................................................................................................................. 2
2. AVM Configuration File ............................................................................................................................. 3
2.1. Explanation of AVM power-related parameters............................................................................... 3
2.2. Basic AVM configuration file ............................................................................................................. 3
2.3. Multi-state AVM configuration file ................................................................................................... 7
2.4. Integrated AVM with functional and rush-current modes ............................................................... 8
3. AVM Validation ....................................................................................................................................... 10
3.1. Validating the content of the AVM config ...................................................................................... 10
3.2. Validation of AVM models inside RedHawk.................................................................................... 11
4. Using AVM in RedHawk .......................................................................................................................... 15
5. LIB2AVM flow for RedHawk .................................................................................................................... 15
5.1. Generating AVM standalone from LIB ............................................................................................ 15
The Apache Virtual Models (AVM) is a data-sheet based approach for generating current profile for
memories for RedHawk Static/Dynamic voltage drop analysis. AVM configuration file contains power
and timing related information for memories/IPs which is used by RedHawk to construct a current profile
and capacitance.
AVM is one of the several approaches for modelling the electrical current and capacitance of a memory.
The table below shows a brief description of the various modeling approaches (from least to best accuracy)
that can be used for memories for RedHawk analysis.
AVM can use the timing and power information from .libs or use data-sheet information to generate current
waveforms. For memories, AVM can represent two triangular waveforms, the first smaller peak represents
address decode operation, and the second larger peak represents the read/write operation as shown in
Figure 1.
Ps = I_leak * Vdd
Dynamic power is the power associated with a devices switching. This power can be further sub-divided
into internal power consumption (Pi) and output load power consumption (Pload). The internal power
consumption is usually represented by an equivalent power dissipation capacitance, called Cpd, which is
captured in data-sheets or can be derived from libs. Similarly output load switching power can be
computed from the load capacitance Cload.
Pi = Cpd * F * Vdd^2
Pload = ½ * Cload * F * Vdd^2
VDD <voltage_value1> The voltage mentioned under VDD VDD 0.95 0.82 0.75 0.6
<voltage_value2> … <voltage_value1> <voltage_value2> will be
applied to all the VDD PIN Names. If user is
providing multiple voltage values and one set of
Cpd and Timing values , then the Cpd and Timing
values belong to <voltage_value1> and for other
voltage values like <voltage_value2>
<voltage_value3> etc , tool will automatically
derate the timing and Cpd values and create AVM
current waveforms.
VDD <voltage1_VDD_pin1> specifies voltage combinations for various VDD VDD 1.08 1.08 {
<voltage1_VDD_pin2> { pins. Timing and Cpd data will can be mentioned ck2q_delay 1537p
... tr_q 30.194p
} per voltage combination tf_q 27.621p
tsu 523.65p
Cpd_read {
...
}
Cpd_write {
...
}
Cpd_standby {
...
}
}
VDD 0.9 0.9 {
...
}
ck2q_delay Specifies clock-to-output pin delay (sec) for the ck2q_delay 1537p
associated VDD pin voltages for the specified
state.
tr_q Specifies output pin rising transition time (sec) for tr_q 30.194p
the associated VDD pin voltages for the specified
state
tf_q Specifies output pin falling transition time (sec) tf_q 27.621p
for the associated VDD pin voltages for the
specified state
tsu Specifies setup time (sec) for the associated VDD tsu 523.65p
pin voltages for the specified state
Peak_I_Write/Peak_I_Read/Peak Specifying peak current values for Read, Write and Peak_I_Read {
_I_Standby { Standby in Amps, for triangular waveform model VDD1 VSS 2e-03mA
<VDD_pin> <GND_pin> VDD2 VSS 3e-03mA
<current_in_Amps for ARC1> }
<VDD_pin> <GND_pin>
<current_in_Amps for ARC2>
...
}
Peak_T_Write/Peak_T_Read/Peak Specifying peak times for Write, Read and Standby Peak_T_Read {
_T_Standby { in seconds, for triangular waveform model VDD1 VSS 0.2e-09
<VDD_pin> <GND_pin> VDD2 VSS 0.5e-09
<time_in_sec for ARC1> }
<VDD_pin> <GND_pin>
<time_in_sec for ARC2>
...
}
CHARGE_RATIO <factor between Specifies the second triangular waveform's area CHARGE_RATIO 0.5
0.0 to 1.0> (charge) divided by the total area
(charge). The default value is 0.7
Sample 1: Basic AVM config file with power/timing data specified for single supply voltage:
RAM64x5 {
PROCESS TT
MEMORY_TYPE SRAM
EQUIV_GATE_COUNT 65536
VDD_PIN VDD1 VDD2 VDD3
VDD 1.0 1.0 1.0
GND_PIN VSS
AVM_VOLTAGES 5 1.0 0.9 0.85 0.7 0.6
ck2q_delay 0.70ns
NOTE : Tool will automatically derate the timing and power data to produce waveforms for all the
voltage factors mentioned in AVM_VOLTAGES
Sample 2: AVM config file with power/timing data specified for multiple supply voltages:
Cell1 {
MEMORY_TYPE RegFile
EQUIV_GATE_COUNT 6663
Cload 2f
VDD_PIN VDDPR VDDP
GND_PIN VSS
C_decap {
VDDPR VSS 11.002f
VDDP VSS 11.002f
}
VDD 1.08 1.08 {
ck2q_delay 1537p
tr_q 30.194p tf_q
27.621p
tsu 523.65p
Cpd_read {
VDDPR VSS 1158.882f
VDDP VSS 11.882f
}
Cpd_write {
VDDPR VSS 2213.820f
VDDP VSS 22.820f
}
Cpd_standby {
VDDPR VSS 409.293f
VDDP VSS 4.29f
}
}
VDD 1.32 1.32 {
The custom switching states can be specified using one of the following keyword:
CUSTOM_STATE_FILE <filename>
(OR)
ABC_Mem1 {
...
Cpd M0 {
VDD VSS 15pF
}
Cpd M1 {
VDD VSS 20pF
}
Cpd M2 {
VDD VSS 10pF
}
Cpd STANDBY_TRIG {
VDD VSS 1pF
}
Cpd STANDBY_NTRIG {
...
}
NOTE: When creating multiple-state models, you must capture current profiles for reserved states
‘standby_trig’ and ‘standby_ntrig’. Otherwise RedHawk simulation/result-display can have issues.
peak_I <state name > { Optional Peak current, in Amps PEAK_I memory_into_lowpwr {
<vdd_pin> <vss_pin> VDD1 VSS 0.86951mA
<arc_current_A> VDD2 VSS 4.34756mA
... }
}
peak_T <state name > { Optional Peak Time in secs PEAK_T memory_into_lowpwr {
<vdd_pin> <vss_pin> VDD1 VSS 0.2ns
<arc_current_A> VDD2 VSS 0.5ns
... }
}
Note: Following keywords associated with basic AVM config should not be specified: ‘Cpd_write’,
‘Cpd_read’, ‘Cpd_standby’,‘leakage_I_write’, ‘leakage_I_read’, ‘peak_I_write’, ‘peak_I_read’,
‘C_decap_write’, ‘C_decap_read’. Even if specified, they are ignored.
The states corresponding to such applications should be tagged with SINGLE_TRIANGULAR keyword. For
ex:
Here’s a sample AVM config file that captures regular functional states as well as additional states
for rush-current mode. Data specific for rush-current mode is highlighted in red:
STEP 1: Generate the current and capacitance files from the AVM config file:
Once the AVM configuration file is created, user can run avm utility from RedHawk installation to
generate the current and capacitance model files. A sample command is shown below:
% avm <avm_configuration_file>
The avm command generates two files. The current profile, (vmemory.current) and cap information
(vmemory.cdev).
AVM will perform some basic checks regarding the values specified in the config file. If peak currents are
specified in the config file, AVM will try to honor both the Cpd charge and the peak currents to construct
the current waveform. If the peak current cannot be met, AVM will issue a warning message in the log
file. The percent difference between AVM results and user-specified Ipeak and Cpd are reported in log
file, avm.log.
STEP 2: Use aplreader to read the content of the vmemory.current and vmemory.cap
% aplreader vmemory.current
STEP 3: Compare the content of the aplreader log and the AVM log files
Compare the peak currents and the area (for charge) between the aplreader log file and avm log files.
This validates that the AVM config file is correctly translated to a current file.
To validate AVM model standalone in IP design context, one needs to import physical model (GDS or
lef/def) along with AVM models in RedHawk or Totem. For validation in Totem environment, user can
import GDS file directly along with a config (GDSII_FILE keyword) whereas for validation in RedHawk,
user need to run gds2rh utility to convert GDS into lef/def.
STEP 1: Generate a physical view (lef/def) of memory from GDS using gds2rh utility. Create a gds2rh
config file called cell.conf as shown below and run “gds2rh cell.conf”
TOP_CELL RAM64x5
GDS_MAP_FILE
layer_map LEF_FILE {
RAM64x5.lef
}
GDS_FILE RAM64x5.gds2
VDD_NETS {
VDD1 {
VDD1
VDD1:
}
VDD2 {
VDD2
VDD2:
}
}
GND_NETS {
VSS {
VSS
VSS:
}
GENERATE_PLOC USE_TEXT_LABEL
USE_TOP_LEVEL_TEXT_ONLY 1
OUTPUT_DIRECTORY outputs
STEP 2: Create a RedHawk configuration file (GSR) capturing Physical model for memory ( lef/def ) and
AVM to make stand-alone memory switch in RedHawk:
TEMPERATURE 27
ADD_PLOC_FROM_TOP_DEF 1
VDD_NETS {
VDD1 0.765
VDD2 0.765
}
GND_NETS {
VSS 0.0
}
TECH_FILE apache.tech
LIB_FILES {
RAM64x5.lib
}
APL_FILES { Provide the AVM file under APL_FILES . RedHawk will internally parse
RAM64x5.avm avm the AVM and create AVM outputs – vmemory.current and
} vmemory.cdev
APACHE_FILES debug
ADD_PAD_LOC_FROM_TOP_DEF 1
% redhawk -f <command_file>
c) Open the memory APL file vmemory.current file in aqua and compare the current of every pin in
aqua waveform viewer against current from step b) for the GSC state. Sample output of aqua
shown below.
The peak currents of all pins in RedHawk analysis can be obtained by using the following tcl command
inside RedHawk.
VDD1 0.004276
VDD2 0.000854073
VSS 0.00513007
d) Compare this output against the output of aplreader. Aplreader can be run standalone on the
vmemory.current file as below:
% aplreader vmemory.current
APL_FILES {
<avm_configuration_file> avm
}
Alternately AVM current and cap files generated outside (using “avm <config>”) can also be given
under APL_FILES. See syntax below.
APL_FILES {
vmemory.current current_avm
vmemory.cdev cap_avm
}
If AVM config files are not available or specified for some memories, RedHawk attempts to
automatically create it from timing/power data in lib and dumps it out in adsRpt/avm.conf. This is done
only for cells identified as memories based on attributes in lib (‘memory ( )’, or ‘timing( ){mode...}’). The
LIB2AVM flow also does not support user specified custom states. The default behavior is to only use
read/write/standby_high/standby_low states. Note that this involves several heuristics and may not be
as accurate as user specified AVM data. Please refer to the RedHawk user manual for additional details.
RedHawk has a GSR keyword that can be used to turn-off or modify above behavior:
Example:
LIB2AVM 2 (Default is 1)
RedHawk also provides a standalone utility to create AVM config file from liberty as below:
Sample LIB2AVM config file shown below. User mainly needs to provide Liberty Files and power
and ground pin names.
LIB_FILES {
./RAM64x5.lib
}
GND_NETS {
VSS 0
}
ANSYS, Inc.
2645 Zanker Road
San Jose, CA 95134
Main: 408-457-2000
Fax: 408-428-9569
apache_sales@ansys.com
www.ansys.com
www.apache-da.com
ANSYS and any and all ANSYS, Inc. brand, product, service and feature names, logos and slogans are registered trademarks or trademarks of
ANSYS, Inc. or its subsidiaries in the United States or other countries. All other brand, product, service and feature names or trademarks are the
property of their respective owners.