@@ -140,7 +140,7 @@ class ComponentModel(ListLoggable, ABC):
140140 latency_scale: float
141141 A scale factor for the latency. All calls to @action will be scaled by this
142142 factor.
143- leak_scale : float
143+ leak_power_scale : float
144144 A scale factor for the leakage power. All calls to leak_power will be scaled
145145 by this factor.
146146 subcomponents: list[ComponentModel] | None
@@ -149,9 +149,9 @@ class ComponentModel(ListLoggable, ABC):
149149 calls to @action functions will be added to the energy and latency of the
150150 component if they occur during one of the component's actions. The area,
151151 energy, latency, and leak power of subcomponents WILL NOT BE scaled by the
152- component's energy_scale, area_scale, or leak_scale ; if you want to scale
153- the subcomponents, multiply their energy_scale, area_scale, latency_scale ,
154- or leak_scale by the desired scale factor.
152+ component's energy_scale, area_scale, or leak_power_scale ; if you want to
153+ scale the subcomponents, multiply their energy_scale, area_scale,
154+ latency_scale, or leak_power_scale by the desired scale factor.
155155
156156 Attributes
157157 ----------
@@ -165,16 +165,16 @@ class ComponentModel(ListLoggable, ABC):
165165 will be scaled by this factor.
166166 latency_scale: A scale factor for the latency. All calls to @action
167167 will be scaled by this factor.
168- leak_scale : A scale factor for the leakage power. All calls to leak_power
168+ leak_power_scale : A scale factor for the leakage power. All calls to leak_power
169169 will be scaled by this factor.
170170 subcomponents: A list of subcomponents. If set, the area and leak power of the
171171 subcomponents will be added to the area and leak power of the component. All
172172 calls to @action functions will be added to the energy and latency of the
173173 component if they occur during one of the component's actions. The area,
174174 energy, latency, and leak power of subcomponents WILL NOT BE scaled by the
175- component's energy_scale, area_scale, or leak_scale ; if you want to scale
176- the subcomponents, multiply their energy_scale, area_scale, latency_scale ,
177- or leak_scale by the desired scale factor.
175+ component's energy_scale, area_scale, or leak_power_scale ; if you want to
176+ scale the subcomponents, multiply their energy_scale, area_scale,
177+ latency_scale, or leak_power_scale by the desired scale factor.
178178 """
179179
180180 component_name : Union [str , List [str ], None ] = None
@@ -207,7 +207,7 @@ def __init__(
207207 self .area_scale : float = 1
208208 self .energy_scale : float = 1
209209 self .latency_scale : float = 1
210- self .leak_scale : float = 1
210+ self .leak_power_scale : float = 1
211211 self ._leak_power : float = leak_power if leak_power is not None else 0
212212 self ._area : float = area if area is not None else 0
213213 self .subcomponents : list ["ComponentModel" ] = (
@@ -226,7 +226,7 @@ def leak_power(self) -> Number:
226226 -------
227227 The leakage power in Watts.
228228 """
229- return self ._leak_power * self .leak_scale + sum (
229+ return self ._leak_power * self .leak_power_scale + sum (
230230 s .leak_power for s in self .subcomponents
231231 )
232232
@@ -255,7 +255,7 @@ def scale(
255255 area_scale_function : Callable [[float , float ], float ] | None = None ,
256256 energy_scale_function : Callable [[float , float ], float ] | None = None ,
257257 latency_scale_function : Callable [[float , float ], float ] | None = None ,
258- leak_scale_function : Callable [[float , float ], float ] | None = None ,
258+ leak_power_scale_function : Callable [[float , float ], float ] | None = None ,
259259 ) -> float :
260260 """
261261 Scales this model's area, energy, latency, and leak power to the given target.
@@ -279,7 +279,7 @@ def scale(
279279 latency_scale_function: Callable[[float, float], float]
280280 The function to use to scale the latency. None if no scaling should be
281281 done.
282- leak_scale_function : Callable[[float, float], float]
282+ leak_power_scale_function : Callable[[float, float], float]
283283 The function to use to scale the leak power. None if no scaling should
284284 be done.
285285 """
@@ -291,7 +291,7 @@ def scale(
291291 ("area_scale" , area_scale_function ),
292292 ("energy_scale" , energy_scale_function ),
293293 ("latency_scale" , latency_scale_function ),
294- ("leak_scale " , leak_scale_function ),
294+ ("leak_power_scale " , leak_power_scale_function ),
295295 ]:
296296 try :
297297 if callfunc is None :
0 commit comments