hwcomponents-adc 1.0.14__tar.gz → 1.0.15__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. {hwcomponents_adc-1.0.14/hwcomponents_adc.egg-info → hwcomponents_adc-1.0.15}/PKG-INFO +1 -1
  2. {hwcomponents_adc-1.0.14 → hwcomponents_adc-1.0.15}/hwcomponents_adc/_version.py +3 -3
  3. {hwcomponents_adc-1.0.14 → hwcomponents_adc-1.0.15}/hwcomponents_adc/main.py +25 -24
  4. {hwcomponents_adc-1.0.14 → hwcomponents_adc-1.0.15/hwcomponents_adc.egg-info}/PKG-INFO +1 -1
  5. {hwcomponents_adc-1.0.14 → hwcomponents_adc-1.0.15}/setup.py +1 -0
  6. {hwcomponents_adc-1.0.14 → hwcomponents_adc-1.0.15}/.github/workflows/publish.yaml +0 -0
  7. {hwcomponents_adc-1.0.14 → hwcomponents_adc-1.0.15}/.gitignore +0 -0
  8. {hwcomponents_adc-1.0.14 → hwcomponents_adc-1.0.15}/.gitmodules +0 -0
  9. {hwcomponents_adc-1.0.14 → hwcomponents_adc-1.0.15}/README.md +0 -0
  10. {hwcomponents_adc-1.0.14 → hwcomponents_adc-1.0.15}/hwcomponents_adc/__init__.py +0 -0
  11. {hwcomponents_adc-1.0.14 → hwcomponents_adc-1.0.15}/hwcomponents_adc/adc_data/adc_list.csv +0 -0
  12. {hwcomponents_adc-1.0.14 → hwcomponents_adc-1.0.15}/hwcomponents_adc/adc_data/citation.bib +0 -0
  13. {hwcomponents_adc-1.0.14 → hwcomponents_adc-1.0.15}/hwcomponents_adc/adc_data/model.yaml +0 -0
  14. {hwcomponents_adc-1.0.14 → hwcomponents_adc-1.0.15}/hwcomponents_adc/energy_correlation.csv +0 -0
  15. {hwcomponents_adc-1.0.14 → hwcomponents_adc-1.0.15}/hwcomponents_adc/headers.py +0 -0
  16. {hwcomponents_adc-1.0.14 → hwcomponents_adc-1.0.15}/hwcomponents_adc/model.py +0 -0
  17. {hwcomponents_adc-1.0.14 → hwcomponents_adc-1.0.15}/hwcomponents_adc/murmannsurvey.py +0 -0
  18. {hwcomponents_adc-1.0.14 → hwcomponents_adc-1.0.15}/hwcomponents_adc/optimizer.py +0 -0
  19. {hwcomponents_adc-1.0.14 → hwcomponents_adc-1.0.15}/hwcomponents_adc/update_model.py +0 -0
  20. {hwcomponents_adc-1.0.14 → hwcomponents_adc-1.0.15}/hwcomponents_adc.egg-info/SOURCES.txt +0 -0
  21. {hwcomponents_adc-1.0.14 → hwcomponents_adc-1.0.15}/hwcomponents_adc.egg-info/dependency_links.txt +0 -0
  22. {hwcomponents_adc-1.0.14 → hwcomponents_adc-1.0.15}/hwcomponents_adc.egg-info/requires.txt +0 -0
  23. {hwcomponents_adc-1.0.14 → hwcomponents_adc-1.0.15}/hwcomponents_adc.egg-info/top_level.txt +0 -0
  24. {hwcomponents_adc-1.0.14 → hwcomponents_adc-1.0.15}/license.txt +0 -0
  25. {hwcomponents_adc-1.0.14 → hwcomponents_adc-1.0.15}/pyproject.toml +0 -0
  26. {hwcomponents_adc-1.0.14 → hwcomponents_adc-1.0.15}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hwcomponents-adc
3
- Version: 1.0.14
3
+ Version: 1.0.15
4
4
  Summary: A package for estimating the energy and area of Analog-Digital Converters
5
5
  Author-email: Tanner Andrulis <Andrulis@mit.edu>
6
6
  License-Expression: MIT
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
28
28
  commit_id: COMMIT_ID
29
29
  __commit_id__: COMMIT_ID
30
30
 
31
- __version__ = version = '1.0.14'
32
- __version_tuple__ = version_tuple = (1, 0, 14)
31
+ __version__ = version = '1.0.15'
32
+ __version_tuple__ = version_tuple = (1, 0, 15)
33
33
 
34
- __commit_id__ = commit_id = 'g1a7d81e79'
34
+ __commit_id__ = commit_id = 'g052b40597'
@@ -6,7 +6,7 @@ from typing import Dict, List
6
6
  import yaml
7
7
  from hwcomponents_adc.headers import *
8
8
  from .optimizer import ADCRequest
9
- from hwcomponents import EnergyAreaModel, actionDynamicEnergy
9
+ from hwcomponents import ComponentModel, action
10
10
 
11
11
  SCRIPT_DIR = os.path.abspath(os.path.dirname(__file__))
12
12
 
@@ -62,7 +62,7 @@ def adc_attr_to_request(attributes: Dict, logger: logging.Logger) -> ADCRequest:
62
62
 
63
63
  r = ADCRequest(
64
64
  bits=try_check(resolution_names, numeric=True),
65
- tech=float(checkerr("tech_node", numeric=True)) * 1e9, # m -> nm
65
+ tech=float(checkerr("tech_node", numeric=True)) * 1e9, # m -> nm
66
66
  throughput=float(checkerr("throughput", numeric=True)),
67
67
  n_adcs=n_adcs,
68
68
  logger=logger,
@@ -78,7 +78,7 @@ def dict_to_str(attributes: Dict) -> str:
78
78
  return s
79
79
 
80
80
 
81
- class ADC(EnergyAreaModel):
81
+ class ADC(ComponentModel):
82
82
  """
83
83
  Analog digital converter (ADC) model based on https://arxiv.org/abs/2404.06553.
84
84
 
@@ -97,6 +97,7 @@ class ADC(EnergyAreaModel):
97
97
  throughput: The throughput of the ADC in samples per second.
98
98
  n_adcs: The number of ADCs.
99
99
  """
100
+
100
101
  component_name = [
101
102
  "adc",
102
103
  "pim_adc",
@@ -170,53 +171,53 @@ class ADC(EnergyAreaModel):
170
171
  )
171
172
  return request.energy_per_op(self._model) * 1e-12 # pJ -> J
172
173
 
173
- @actionDynamicEnergy
174
- def convert(self):
174
+ @action
175
+ def convert(self) -> tuple[float, float]:
175
176
  """
176
- Returns the energy for one ADC conversion in Joules.
177
+ Returns the energy and latency for one ADC conversion.
177
178
 
178
179
  Returns:
179
- The energy for one ADC conversion in Joules.
180
+ (energy, latency): Tuple in (Joules, seconds).
180
181
  """
181
182
  # Assume leakage is 20% of the total energy
182
- return self.get_energy() * 0.8
183
+ return self.get_energy() * 0.8, 0.0
183
184
 
184
- @actionDynamicEnergy
185
- def drive(self):
185
+ @action
186
+ def drive(self) -> tuple[float, float]:
186
187
  """
187
- Returns the energy for one ADC conversion in Joules.
188
+ Returns the energy and latency for one ADC conversion.
188
189
 
189
190
  Returns:
190
- The energy for one ADC conversion in Joules.
191
+ (energy, latency): Tuple in (Joules, seconds).
191
192
  """
192
193
  return self.convert()
193
194
 
194
- @actionDynamicEnergy
195
- def read(self):
195
+ @action
196
+ def read(self) -> tuple[float, float]:
196
197
  """
197
- Returns the energy for one ADC conversion in Joules.
198
+ Returns the energy and latency for one ADC conversion.
198
199
 
199
200
  Returns:
200
- The energy for one ADC conversion in Joules.
201
+ (energy, latency): Tuple in (Joules, seconds).
201
202
  """
202
203
  return self.convert()
203
204
 
204
- @actionDynamicEnergy
205
- def sample(self):
205
+ @action
206
+ def sample(self) -> tuple[float, float]:
206
207
  """
207
- Returns the energy for one ADC conversion in Joules.
208
+ Returns the energy and latency for one ADC conversion.
208
209
 
209
210
  Returns:
210
- The energy for one ADC conversion in Joules.
211
+ (energy, latency): Tuple in (Joules, seconds).
211
212
  """
212
213
  return self.convert()
213
214
 
214
- @actionDynamicEnergy
215
- def activate(self):
215
+ @action
216
+ def activate(self) -> tuple[float, float]:
216
217
  """
217
- Returns the energy for one ADC conversion in Joules.
218
+ Returns the energy and latency for one ADC conversion.
218
219
 
219
220
  Returns:
220
- The energy for one ADC conversion in Joules.
221
+ (energy, latency): Tuple in (Joules, seconds).
221
222
  """
222
223
  return self.convert()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hwcomponents-adc
3
- Version: 1.0.14
3
+ Version: 1.0.15
4
4
  Summary: A package for estimating the energy and area of Analog-Digital Converters
5
5
  Author-email: Tanner Andrulis <Andrulis@mit.edu>
6
6
  License-Expression: MIT
@@ -1,4 +1,5 @@
1
1
  """Setup.py to ensure hwcomponents._version_scheme is importable during build."""
2
+
2
3
  import sys
3
4
  from pathlib import Path
4
5