zuspec-dataclasses 0.0.1.18247373596rc0__py3-none-any.whl → 0.0.1.18247491667rc0__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.
- zuspec/dataclasses/__init__.py +1 -2
- zuspec/dataclasses/__version__.py +1 -1
- zuspec/dataclasses/api/__init__.py +2 -0
- zuspec/dataclasses/decorators.py +17 -2
- zuspec/dataclasses/std/timebase.py +0 -6
- {zuspec_dataclasses-0.0.1.18247373596rc0.dist-info → zuspec_dataclasses-0.0.1.18247491667rc0.dist-info}/METADATA +1 -1
- {zuspec_dataclasses-0.0.1.18247373596rc0.dist-info → zuspec_dataclasses-0.0.1.18247491667rc0.dist-info}/RECORD +10 -10
- {zuspec_dataclasses-0.0.1.18247373596rc0.dist-info → zuspec_dataclasses-0.0.1.18247491667rc0.dist-info}/WHEEL +0 -0
- {zuspec_dataclasses-0.0.1.18247373596rc0.dist-info → zuspec_dataclasses-0.0.1.18247491667rc0.dist-info}/licenses/LICENSE +0 -0
- {zuspec_dataclasses-0.0.1.18247373596rc0.dist-info → zuspec_dataclasses-0.0.1.18247491667rc0.dist-info}/top_level.txt +0 -0
zuspec/dataclasses/__init__.py
CHANGED
@@ -1,5 +1,3 @@
|
|
1
|
-
|
2
|
-
|
3
1
|
#****************************************************************************
|
4
2
|
# Copyright 2019-2025 Matthew Ballance and contributors
|
5
3
|
#
|
@@ -24,6 +22,7 @@ from .tlm import *
|
|
24
22
|
# from .core_lib import *
|
25
23
|
# from vsc_dataclasses.expr import *
|
26
24
|
|
25
|
+
from . import api
|
27
26
|
from . import std
|
28
27
|
|
29
28
|
from .bit import Bit
|
zuspec/dataclasses/decorators.py
CHANGED
@@ -274,8 +274,23 @@ def sync(clock : Callable, reset : Callable):
|
|
274
274
|
"""
|
275
275
|
Marks a synchronous-evaluation region, which is evaluated on
|
276
276
|
the active edge of either the clock or reset.
|
277
|
-
|
278
|
-
|
277
|
+
|
278
|
+
The semantics of a `sync` method differ from native Python.
|
279
|
+
Assignments are delayed/nonblocking: they only take effect after
|
280
|
+
evaluation of the method completes. If a variable is assigned multiple times
|
281
|
+
within a sync method, only the last assignment to that variable in the method
|
282
|
+
is applied for that cycle. Earlier assignments are ignored. Augmented
|
283
|
+
assignments (eg +=) are treated the same as regular assignments.
|
284
|
+
|
285
|
+
@zdc.sync
|
286
|
+
def _update(self):
|
287
|
+
self.val1 = self.val1 + 1
|
288
|
+
self.val1 = self.val1 + 1
|
289
|
+
self.val2 += 1
|
290
|
+
self.val2 += 1
|
291
|
+
|
292
|
+
In the example above, both val1 and val2 will only be increased by one
|
293
|
+
each time _update is evaluated.
|
279
294
|
"""
|
280
295
|
def __call__(T):
|
281
296
|
return ExecSync(method=T, kind=ExecKind.Sync, clock=clock, reset=reset)
|
@@ -29,12 +29,6 @@ class TimeBase(Protocol):
|
|
29
29
|
"""Scales the time to the timebase and waits"""
|
30
30
|
...
|
31
31
|
|
32
|
-
|
33
|
-
@abc.abstractmethod
|
34
|
-
def wait_ev(self, amt : float, units):
|
35
|
-
"""Scales the time to the timebase and returns an event"""
|
36
|
-
...
|
37
|
-
|
38
32
|
@dataclass
|
39
33
|
class TimebaseSync(TimeBase):
|
40
34
|
|
@@ -1,29 +1,29 @@
|
|
1
|
-
zuspec/dataclasses/__init__.py,sha256=
|
2
|
-
zuspec/dataclasses/__version__.py,sha256=
|
1
|
+
zuspec/dataclasses/__init__.py,sha256=WSYClXn7Bugmg6tHtQpENpZpW7Lphful7VPJ0kXEv2I,1369
|
2
|
+
zuspec/dataclasses/__version__.py,sha256=KlGm4W-_vSnG38zGCPG9P14TfhqkDM7rya79wry_bRg,829
|
3
3
|
zuspec/dataclasses/action.py,sha256=12n8lihUhX0BFPcW370IlPgyEXLUMDSDQ_h_-rZr7ik,1328
|
4
4
|
zuspec/dataclasses/addr_reg.py,sha256=yKENXgCf9E5VEbfj0qCcJS-fwnQGdSaXG7t00aqA784,2759
|
5
5
|
zuspec/dataclasses/annotation.py,sha256=m_3h065RAR81skrq39wxsJ1V0BxpwiyAWzdTrvW51Gg,1086
|
6
6
|
zuspec/dataclasses/bit.py,sha256=qBTt8mj_S4WK6VeRaaqeNzzuvy3P12WigKaeU2Gr0mw,1072
|
7
7
|
zuspec/dataclasses/bundle.py,sha256=YIuEQS_4oS3LWQ3Zv3Ib78L6V6QzhDsd2S89BP0dsl8,1626
|
8
8
|
zuspec/dataclasses/component.py,sha256=yXSmg87uj_1TaazO99mLv72Z0lAlzzQiBTmn0wI5alo,2056
|
9
|
-
zuspec/dataclasses/decorators.py,sha256=
|
9
|
+
zuspec/dataclasses/decorators.py,sha256=A8vqoenJ8XkhMLZm7JcKw6BCC9uTG8lQIVh9XtPuvTQ,14528
|
10
10
|
zuspec/dataclasses/dependency.py,sha256=LukfqqvTUfShrtYdidqZeVMie-l50oAzkpYqo_bqie0,1289
|
11
11
|
zuspec/dataclasses/ports.py,sha256=OydeAfPIAef8pCp_3FhL87fq7mrbhiNLa9qfPHkCK1E,1044
|
12
12
|
zuspec/dataclasses/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
13
13
|
zuspec/dataclasses/struct.py,sha256=_7Lgf2BbF_WQXSpdKmowR6mATBjqZtqK6VoPPc1tdLg,1077
|
14
14
|
zuspec/dataclasses/tlm.py,sha256=sbAlnkYhVidinbiMKBT_mbe5yr1dDU9F_6aKBAXZjjE,431
|
15
|
-
zuspec/dataclasses/api/__init__.py,sha256=
|
15
|
+
zuspec/dataclasses/api/__init__.py,sha256=UZY5lg-DjxtE0ixosJGpHFCBMshT8a0nZ8I0rIv75Ag,869
|
16
16
|
zuspec/dataclasses/api/type_processor.py,sha256=4VqIbj-Uo_DqNJpENSq8k5ll5TxhRFlLjq5Psi0Ss7I,956
|
17
17
|
zuspec/dataclasses/api/visitor.py,sha256=CduJ6k11xY81_nFl8k0dVSRJt88a21mHem64Yeg6sDI,11852
|
18
18
|
zuspec/dataclasses/std/__init__.py,sha256=7xOZCDuEikfg5NRpC0eFGIvgj3hHz7ibtJawzroU4nY,839
|
19
19
|
zuspec/dataclasses/std/clock_reset.py,sha256=AveFnqB-OAgWfVr2eA7v9XfAPuE12WtQpSbbE1zhwME,1205
|
20
|
-
zuspec/dataclasses/std/timebase.py,sha256=
|
20
|
+
zuspec/dataclasses/std/timebase.py,sha256=v-GIdpVP_hIAGt3-oC-PikQQmYCG5ODTCu7syIzQNjE,1320
|
21
21
|
zuspec/dataclasses/util/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
22
22
|
zuspec/dataclasses/util/extract_cpp_embedded_dsl.py,sha256=SyMMLumZD6fsubj40hyekYzWyrcoUGTijJH3NmK1ihY,5630
|
23
23
|
zuspec/dataclasses/util/gen_cpp_dt_defs/__main__.py,sha256=t3CnHJKcN_N33sxCsDH-R36ghCcQ7xjMcjUrzUT2SGM,3447
|
24
24
|
zuspec/impl/__init__.py,sha256=GZWCeBPdVzLR0RNPkmXNXPgdS-2vg5dMC1goTYJs3yI,33
|
25
|
-
zuspec_dataclasses-0.0.1.
|
26
|
-
zuspec_dataclasses-0.0.1.
|
27
|
-
zuspec_dataclasses-0.0.1.
|
28
|
-
zuspec_dataclasses-0.0.1.
|
29
|
-
zuspec_dataclasses-0.0.1.
|
25
|
+
zuspec_dataclasses-0.0.1.18247491667rc0.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
26
|
+
zuspec_dataclasses-0.0.1.18247491667rc0.dist-info/METADATA,sha256=RnvPNViGS74v2yNwOxQvpaUVQ1GZ6HXllz13YynzPos,121
|
27
|
+
zuspec_dataclasses-0.0.1.18247491667rc0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
28
|
+
zuspec_dataclasses-0.0.1.18247491667rc0.dist-info/top_level.txt,sha256=3WM_V5g1RvpI4_z1TPY_AmroKhWIp6QJo4Vz5Tqbgak,7
|
29
|
+
zuspec_dataclasses-0.0.1.18247491667rc0.dist-info/RECORD,,
|
File without changes
|
File without changes
|