hwcomponents-adc 1.0.14__py3-none-any.whl → 1.0.16__py3-none-any.whl
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.
- hwcomponents_adc/_version.py +2 -2
- hwcomponents_adc/main.py +25 -24
- {hwcomponents_adc-1.0.14.dist-info → hwcomponents_adc-1.0.16.dist-info}/METADATA +1 -1
- {hwcomponents_adc-1.0.14.dist-info → hwcomponents_adc-1.0.16.dist-info}/RECORD +6 -6
- {hwcomponents_adc-1.0.14.dist-info → hwcomponents_adc-1.0.16.dist-info}/WHEEL +0 -0
- {hwcomponents_adc-1.0.14.dist-info → hwcomponents_adc-1.0.16.dist-info}/top_level.txt +0 -0
hwcomponents_adc/_version.py
CHANGED
|
@@ -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.
|
|
32
|
-
__version_tuple__ = version_tuple = (1, 0,
|
|
31
|
+
__version__ = version = '1.0.16'
|
|
32
|
+
__version_tuple__ = version_tuple = (1, 0, 16)
|
|
33
33
|
|
|
34
34
|
__commit_id__ = commit_id = None
|
hwcomponents_adc/main.py
CHANGED
|
@@ -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
|
|
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,
|
|
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(
|
|
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
|
-
@
|
|
174
|
-
def convert(self):
|
|
174
|
+
@action
|
|
175
|
+
def convert(self) -> tuple[float, float]:
|
|
175
176
|
"""
|
|
176
|
-
Returns the energy for one ADC conversion
|
|
177
|
+
Returns the energy and latency for one ADC conversion.
|
|
177
178
|
|
|
178
179
|
Returns:
|
|
179
|
-
|
|
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, 1 / self.throughput
|
|
183
184
|
|
|
184
|
-
@
|
|
185
|
-
def drive(self):
|
|
185
|
+
@action
|
|
186
|
+
def drive(self) -> tuple[float, float]:
|
|
186
187
|
"""
|
|
187
|
-
Returns the energy for one ADC conversion
|
|
188
|
+
Returns the energy and latency for one ADC conversion.
|
|
188
189
|
|
|
189
190
|
Returns:
|
|
190
|
-
|
|
191
|
+
(energy, latency): Tuple in (Joules, seconds).
|
|
191
192
|
"""
|
|
192
193
|
return self.convert()
|
|
193
194
|
|
|
194
|
-
@
|
|
195
|
-
def read(self):
|
|
195
|
+
@action
|
|
196
|
+
def read(self) -> tuple[float, float]:
|
|
196
197
|
"""
|
|
197
|
-
Returns the energy for one ADC conversion
|
|
198
|
+
Returns the energy and latency for one ADC conversion.
|
|
198
199
|
|
|
199
200
|
Returns:
|
|
200
|
-
|
|
201
|
+
(energy, latency): Tuple in (Joules, seconds).
|
|
201
202
|
"""
|
|
202
203
|
return self.convert()
|
|
203
204
|
|
|
204
|
-
@
|
|
205
|
-
def sample(self):
|
|
205
|
+
@action
|
|
206
|
+
def sample(self) -> tuple[float, float]:
|
|
206
207
|
"""
|
|
207
|
-
Returns the energy for one ADC conversion
|
|
208
|
+
Returns the energy and latency for one ADC conversion.
|
|
208
209
|
|
|
209
210
|
Returns:
|
|
210
|
-
|
|
211
|
+
(energy, latency): Tuple in (Joules, seconds).
|
|
211
212
|
"""
|
|
212
213
|
return self.convert()
|
|
213
214
|
|
|
214
|
-
@
|
|
215
|
-
def activate(self):
|
|
215
|
+
@action
|
|
216
|
+
def activate(self) -> tuple[float, float]:
|
|
216
217
|
"""
|
|
217
|
-
Returns the energy for one ADC conversion
|
|
218
|
+
Returns the energy and latency for one ADC conversion.
|
|
218
219
|
|
|
219
220
|
Returns:
|
|
220
|
-
|
|
221
|
+
(energy, latency): Tuple in (Joules, seconds).
|
|
221
222
|
"""
|
|
222
223
|
return self.convert()
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
hwcomponents_adc/__init__.py,sha256=5-yJAO35278NGG9dpkFYB4IP49jaEA6T7qebld7Pjhs,29
|
|
2
|
-
hwcomponents_adc/_version.py,sha256=
|
|
2
|
+
hwcomponents_adc/_version.py,sha256=4CHhABBoxgEpxC6Tk-T_Y7W9bHR4vDaLUdkc2GswE34,706
|
|
3
3
|
hwcomponents_adc/energy_correlation.csv,sha256=LFrjS5FnOTUIlKI5LrqufmsKfa6Y4qgWSl8Sd9VgsBo,23003
|
|
4
4
|
hwcomponents_adc/headers.py,sha256=yO6qJfN33H7mgvm2TIr31IibeR1lxhWoLiOk9bcbuyk,2407
|
|
5
|
-
hwcomponents_adc/main.py,sha256=
|
|
5
|
+
hwcomponents_adc/main.py,sha256=RZte7LS7JvKYBS6k0fasazJX8OX7rIgZESd2UMLR2rg,6826
|
|
6
6
|
hwcomponents_adc/model.py,sha256=yZUsBd5nVE9-lcS8lizJ_NwfBrXjANLYFDw2JQvbLRk,9834
|
|
7
7
|
hwcomponents_adc/murmannsurvey.py,sha256=AsIPMIjGK4-P6uEsuFAeNQkH8-m6cSUPlOYPrO-BqA4,1445
|
|
8
8
|
hwcomponents_adc/optimizer.py,sha256=Z2a1FZ60aOWGVEt_XCvRRVHbZe1O5nsLWfrdBEoTPZU,3313
|
|
@@ -10,7 +10,7 @@ hwcomponents_adc/update_model.py,sha256=jUmGsqGdIA9KwvgF2X9AwVpJ2jZluZxFekUDomA4
|
|
|
10
10
|
hwcomponents_adc/adc_data/adc_list.csv,sha256=wY1adNrc6XTWUXakNqcIQGntqGDMNmjY-7Pz_w806to,18247
|
|
11
11
|
hwcomponents_adc/adc_data/citation.bib,sha256=Y0deF_COqi8VtZpIAxPAtGX3s7p7jdM2zhCiTc_ZxPQ,177
|
|
12
12
|
hwcomponents_adc/adc_data/model.yaml,sha256=TClBV4ljce3xv_kxAaOig-JvoCUfc7gKNpD5QfeHseE,1181
|
|
13
|
-
hwcomponents_adc-1.0.
|
|
14
|
-
hwcomponents_adc-1.0.
|
|
15
|
-
hwcomponents_adc-1.0.
|
|
16
|
-
hwcomponents_adc-1.0.
|
|
13
|
+
hwcomponents_adc-1.0.16.dist-info/METADATA,sha256=_aWpxbLJyV5ViDte9V7ZJow1B8GBVTKXZOLcxXMxmMU,4231
|
|
14
|
+
hwcomponents_adc-1.0.16.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
15
|
+
hwcomponents_adc-1.0.16.dist-info/top_level.txt,sha256=B5pehwpyDw3tB_l5bskxXhYTM5vZXaYN64JcR_JmXAI,17
|
|
16
|
+
hwcomponents_adc-1.0.16.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|