Skip to content

Commit 51e3bf4

Browse files
CACTI SRAM & Cache latency
1 parent 017430f commit 51e3bf4

1 file changed

Lines changed: 8 additions & 15 deletions

File tree

hwcomponents_cacti/hwcomponents_cacti.py

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,6 @@ def __init__(
323323

324324
self.read_energy: float = None
325325
self.write_energy: float = None
326-
self.update_energy: float = None
327326
self.cacti_leak_power: float = None
328327
self.cacti_area: float = None
329328
self.cycle_period: float = None
@@ -351,7 +350,6 @@ def _interp_size(self, tech_node: float):
351350
(
352351
read_energy,
353352
write_energy,
354-
update_energy,
355353
leak_power,
356354
area,
357355
cycle_period,
@@ -371,14 +369,12 @@ def _interp_size(self, tech_node: float):
371369
# Found these empirically by testing different inputs with CACTI
372370
read_energy *= (widthscale * 0.7 + 0.3) * (depthscale ** (1.56 / 2))
373371
write_energy *= (widthscale * 0.7 + 0.3) * (depthscale ** (1.56 / 2))
374-
update_energy *= (widthscale * 0.7 + 0.3) * (depthscale ** (1.56 / 2))
375372
leak_power *= widthscale * depthscale
376373
area *= widthscale * depthscale
377374
cycle_period *= 1 # Dosn't scale strongly with anything
378375
return (
379376
read_energy,
380377
write_energy,
381-
update_energy,
382378
leak_power,
383379
area,
384380
cycle_period,
@@ -389,31 +385,30 @@ def _interp_tech_node(self):
389385
# Interpolate. Below 16, interpolate energy with square root scaling (IDRS 2022),
390386
# area with linear scaling.
391387
# https://fuse.wikichip.org/news/7343/iedm-2022-did-we-just-witness-the-death-of-sram/
392-
if self.tech_node < min(supported_technologies):
388+
if self.tech_node < min(supported_technologies) or self.tech_node > max(supported_technologies):
393389
scale = self.tech_node / min(supported_technologies)
394390
(
395391
read_energy,
396392
write_energy,
397-
update_energy,
398393
leak_power,
399394
area,
400395
cycle_period,
401396
) = self._interp_size(min(supported_technologies))
402397
read_energy *= scale**0.5
403398
write_energy *= scale**0.5
404-
update_energy *= scale**0.5
405399
area *= scale
400+
cycle_period *= scale
406401
# B. Parvais et al., "The device architecture dilemma for CMOS
407402
# technologies: Opportunities & challenges of finFET over planar
408403
# MOSFET," 2009 International Symposium on VLSI tech_node, Systems,
409404
# and Applications, Hsinchu, Taiwan, 2009, pp. 80-81, doi:
410405
# 10.1109/VTSA.2009.5159300.
411406
# finfets have approx. 21% less leakage power
412-
leak_power *= scale**0.5 * 0.79
407+
if self.tech_node < min(supported_technologies):
408+
leak_power *= scale**0.5 * 0.79
413409
return (
414410
read_energy,
415411
write_energy,
416-
update_energy,
417412
leak_power,
418413
area,
419414
cycle_period,
@@ -445,7 +440,6 @@ def _interpolate_and_call_cacti(self):
445440
(
446441
self.read_energy,
447442
self.write_energy,
448-
self.update_energy,
449443
self.cacti_leak_power,
450444
self.cacti_area,
451445
self.cycle_period,
@@ -497,7 +491,6 @@ def read_csv_results(output_path_csv):
497491
return (
498492
float(row[" Dynamic read energy (nJ)"]) * 1e-9,
499493
float(row[" Dynamic write energy (nJ)"]) * 1e-9,
500-
float(row[" Dynamic write energy (nJ)"]) * 1e-9,
501494
float(row[" Standby leakage per bank(mW)"]) * 1e-3 * self.n_banks,
502495
float(row[" Area (mm2)"]) * 1e-6,
503496
float(row[" Random cycle time (ns)"]) * 1e-9,
@@ -604,7 +597,7 @@ def read(self) -> tuple[float, float]:
604597
(energy, latency): Tuple in (Joules, seconds).
605598
"""
606599
self._interpolate_and_call_cacti()
607-
return self.read_energy, 0.0
600+
return self.read_energy, self.cycle_period
608601

609602
@action(bits_per_action="width")
610603
def write(self) -> tuple[float, float]:
@@ -621,7 +614,7 @@ def write(self) -> tuple[float, float]:
621614
(energy, latency): Tuple in (Joules, seconds).
622615
"""
623616
self._interpolate_and_call_cacti()
624-
return self.write_energy, 0.0
617+
return self.write_energy, self.cycle_period
625618

626619

627620
class Cache(_Memory):
@@ -710,7 +703,7 @@ def read(self) -> tuple[float, float]:
710703
(energy, latency): Tuple in (Joules, seconds).
711704
"""
712705
self._interpolate_and_call_cacti()
713-
return self.read_energy, 0.0
706+
return self.read_energy, self.cycle_period
714707

715708
@action(bits_per_action="width")
716709
def write(self) -> tuple[float, float]:
@@ -727,4 +720,4 @@ def write(self) -> tuple[float, float]:
727720
(energy, latency): Tuple in (Joules, seconds).
728721
"""
729722
self._interpolate_and_call_cacti()
730-
return self.write_energy, 0.0
723+
return self.write_energy, self.cycle_period

0 commit comments

Comments
 (0)