Describe the bug
The Liberty (.lib) files generated by OpenRAM contain incorrect internal_power values on the clk0 pin. The values are extremely large (e.g. 1.034875e+10 for a 224-byte SRAM, 4.603410e+10 for a 1KB SRAM) .
When read into an EDA tool (e.g. OpenROAD), the macro power dominates and reports in the tens of megawatts, making power analysis unusable.
Version
Commit ab33017fe2d5b7fa0aa730aa47c8c1811577caa8 (upstream/dev)
To Reproduce
- Generate a Liberty file using OpenRAM with the following configuration for
sky130_sram_224bytes_1rw_28x64_28:
"""
Single-port SRAM (64 x 28b)
Used for: hpdcache directory (valid+wback+dirty+fetch+tag = 28 bits, 64 sets)
"""
word_size = 28
num_words = 64
human_byte_size = "{:.0f}bytes".format((word_size * num_words) / 8)
write_size = 28
num_rw_ports = 1
num_r_ports = 0
num_w_ports = 0
num_spare_rows = 1
num_spare_cols = 1
ports_human = '1rw'
words_per_row = 1
import os
exec(open(os.path.join(os.path.dirname(__file__), 'sky130_sram_common.py')).read())
Inspect the clk0 pin's internal_power entries in the generated .lib and observe that all four when conditions have identical rise_power and fall_power values of 1.034875e+10.
Expected behavior
The generated Liberty file should contain physically realistic internal_power values on the order of a few mW for a small SKY130 SRAM at TT/1.8V/25C.
Logs
Example snippet from sky130_sram_224bytes_1rw_28x64_28_TT_1p8V_25C.lib:
pin(clk0){
internal_power(){
when : "!csb0 & !web0";
rise_power(scalar){
values("1.034875e+10");
}
fall_power(scalar){
values("1.034875e+10");
}
}
internal_power(){
when : "csb0 & !web0";
rise_power(scalar){
values("1.034875e+10");
}
fall_power(scalar){
values("1.034875e+10");
}
}
internal_power(){
when : "!csb0 & web0";
rise_power(scalar){
values("1.034875e+10");
}
fall_power(scalar){
values("1.034875e+10");
}
}
internal_power(){
when : "csb0 & web0";
rise_power(scalar){
values("1.034875e+10");
}
fall_power(scalar){
values("1.034875e+10");
}
}
}
Resulting OpenROAD power report:
Group Internal Switching Leakage Total
Macro 2.35e+07 0.00e+00 4.41e-05 2.35e+07 100.0%
(23.5 MW reported for macro power across all SRAM instances, clearly incorrect)
Is this a bug or is it a config issue that I'm making?
Any advice is appreciated.
Describe the bug
The Liberty (.lib) files generated by OpenRAM contain incorrect
internal_powervalues on theclk0pin. The values are extremely large (e.g.1.034875e+10for a 224-byte SRAM,4.603410e+10for a 1KB SRAM) .When read into an EDA tool (e.g. OpenROAD), the macro power dominates and reports in the tens of megawatts, making power analysis unusable.
Version
Commit
ab33017fe2d5b7fa0aa730aa47c8c1811577caa8(upstream/dev)To Reproduce
sky130_sram_224bytes_1rw_28x64_28:Inspect the
clk0pin'sinternal_powerentries in the generated.liband observe that all fourwhenconditions have identicalrise_powerandfall_powervalues of1.034875e+10.Expected behavior
The generated Liberty file should contain physically realistic
internal_powervalues on the order of a few mW for a small SKY130 SRAM at TT/1.8V/25C.Logs
Example snippet from
sky130_sram_224bytes_1rw_28x64_28_TT_1p8V_25C.lib:Resulting OpenROAD power report:
(23.5 MW reported for macro power across all SRAM instances, clearly incorrect)
Is this a bug or is it a config issue that I'm making?
Any advice is appreciated.