esiaccel 0.1.5.dev52__cp313-cp313-win_amd64.whl → 0.1.5.dev66__cp313-cp313-win_amd64.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.
- esiaccel/CosimBackend.dll +0 -0
- esiaccel/ESICppRuntime.dll +0 -0
- esiaccel/ESICppRuntime.lib +0 -0
- esiaccel/EsiCosimDpiServer.dll +0 -0
- esiaccel/MtiPli.dll +0 -0
- esiaccel/esiCppAccel.cp313-win_amd64.pyd +0 -0
- esiaccel/esiquery.exe +0 -0
- esiaccel/types.py +50 -20
- {esiaccel-0.1.5.dev52.dist-info → esiaccel-0.1.5.dev66.dist-info}/METADATA +1 -1
- {esiaccel-0.1.5.dev52.dist-info → esiaccel-0.1.5.dev66.dist-info}/RECORD +14 -14
- {esiaccel-0.1.5.dev52.dist-info → esiaccel-0.1.5.dev66.dist-info}/WHEEL +0 -0
- {esiaccel-0.1.5.dev52.dist-info → esiaccel-0.1.5.dev66.dist-info}/entry_points.txt +0 -0
- {esiaccel-0.1.5.dev52.dist-info → esiaccel-0.1.5.dev66.dist-info}/licenses/LICENSE +0 -0
- {esiaccel-0.1.5.dev52.dist-info → esiaccel-0.1.5.dev66.dist-info}/top_level.txt +0 -0
esiaccel/CosimBackend.dll
CHANGED
|
Binary file
|
esiaccel/ESICppRuntime.dll
CHANGED
|
Binary file
|
esiaccel/ESICppRuntime.lib
CHANGED
|
Binary file
|
esiaccel/EsiCosimDpiServer.dll
CHANGED
|
Binary file
|
esiaccel/MtiPli.dll
CHANGED
|
Binary file
|
|
Binary file
|
esiaccel/esiquery.exe
CHANGED
|
Binary file
|
esiaccel/types.py
CHANGED
|
@@ -15,6 +15,7 @@ from __future__ import annotations
|
|
|
15
15
|
from . import esiCppAccel as cpp
|
|
16
16
|
|
|
17
17
|
from typing import TYPE_CHECKING
|
|
18
|
+
|
|
18
19
|
if TYPE_CHECKING:
|
|
19
20
|
from .accelerator import HWModule
|
|
20
21
|
|
|
@@ -26,22 +27,33 @@ import traceback
|
|
|
26
27
|
|
|
27
28
|
def _get_esi_type(cpp_type: cpp.Type):
|
|
28
29
|
"""Get the wrapper class for a C++ type."""
|
|
29
|
-
|
|
30
|
+
if isinstance(cpp_type, cpp.ChannelType):
|
|
31
|
+
return _get_esi_type(cpp_type.inner)
|
|
32
|
+
|
|
33
|
+
for cpp_type_cls, wrapper_cls in __esi_mapping.items():
|
|
30
34
|
if isinstance(cpp_type, cpp_type_cls):
|
|
31
|
-
return
|
|
32
|
-
return ESIType(cpp_type)
|
|
35
|
+
return wrapper_cls.wrap_cpp(cpp_type)
|
|
36
|
+
return ESIType.wrap_cpp(cpp_type)
|
|
33
37
|
|
|
34
38
|
|
|
35
|
-
# Mapping from C++ types to
|
|
36
|
-
|
|
37
|
-
__esi_mapping: Dict[Type, Callable] = {
|
|
38
|
-
cpp.ChannelType: lambda cpp_type: _get_esi_type(cpp_type.inner)
|
|
39
|
-
}
|
|
39
|
+
# Mapping from C++ types to wrapper classes
|
|
40
|
+
__esi_mapping: Dict[Type, Type] = {}
|
|
40
41
|
|
|
41
42
|
|
|
42
43
|
class ESIType:
|
|
43
44
|
|
|
44
|
-
def __init__(self,
|
|
45
|
+
def __init__(self, id: str):
|
|
46
|
+
self._init_from_cpp(cpp.Type(id))
|
|
47
|
+
|
|
48
|
+
@classmethod
|
|
49
|
+
def wrap_cpp(cls, cpp_type: cpp.Type):
|
|
50
|
+
"""Wrap a C++ ESI type with its corresponding Python ESI Type."""
|
|
51
|
+
instance = cls.__new__(cls)
|
|
52
|
+
instance._init_from_cpp(cpp_type)
|
|
53
|
+
return instance
|
|
54
|
+
|
|
55
|
+
def _init_from_cpp(self, cpp_type: cpp.Type):
|
|
56
|
+
"""Initialize instance attributes from a C++ type object."""
|
|
45
57
|
self.cpp_type = cpp_type
|
|
46
58
|
|
|
47
59
|
@property
|
|
@@ -86,6 +98,9 @@ class ESIType:
|
|
|
86
98
|
|
|
87
99
|
class VoidType(ESIType):
|
|
88
100
|
|
|
101
|
+
def __init__(self, id: str):
|
|
102
|
+
self._init_from_cpp(cpp.VoidType(id))
|
|
103
|
+
|
|
89
104
|
def is_valid(self, obj) -> Tuple[bool, Optional[str]]:
|
|
90
105
|
if obj is not None:
|
|
91
106
|
return (False, f"void type cannot must represented by None, not {obj}")
|
|
@@ -110,8 +125,8 @@ __esi_mapping[cpp.VoidType] = VoidType
|
|
|
110
125
|
|
|
111
126
|
class BitsType(ESIType):
|
|
112
127
|
|
|
113
|
-
def __init__(self,
|
|
114
|
-
self.
|
|
128
|
+
def __init__(self, id: str, width: int):
|
|
129
|
+
self._init_from_cpp(cpp.BitsType(id, width))
|
|
115
130
|
|
|
116
131
|
def is_valid(self, obj) -> Tuple[bool, Optional[str]]:
|
|
117
132
|
if not isinstance(obj, (bytearray, bytes, list)):
|
|
@@ -143,8 +158,8 @@ __esi_mapping[cpp.BitsType] = BitsType
|
|
|
143
158
|
|
|
144
159
|
class IntType(ESIType):
|
|
145
160
|
|
|
146
|
-
def __init__(self,
|
|
147
|
-
self.
|
|
161
|
+
def __init__(self, id: str, width: int):
|
|
162
|
+
self._init_from_cpp(cpp.IntegerType(id, width))
|
|
148
163
|
|
|
149
164
|
@property
|
|
150
165
|
def bit_width(self) -> int:
|
|
@@ -153,6 +168,9 @@ class IntType(ESIType):
|
|
|
153
168
|
|
|
154
169
|
class UIntType(IntType):
|
|
155
170
|
|
|
171
|
+
def __init__(self, id: str, width: int):
|
|
172
|
+
self._init_from_cpp(cpp.UIntType(id, width))
|
|
173
|
+
|
|
156
174
|
def is_valid(self, obj) -> Tuple[bool, Optional[str]]:
|
|
157
175
|
if not isinstance(obj, int):
|
|
158
176
|
return (False, f"must be an int, not {type(obj)}")
|
|
@@ -176,6 +194,9 @@ __esi_mapping[cpp.UIntType] = UIntType
|
|
|
176
194
|
|
|
177
195
|
class SIntType(IntType):
|
|
178
196
|
|
|
197
|
+
def __init__(self, id: str, width: int):
|
|
198
|
+
self._init_from_cpp(cpp.SIntType(id, width))
|
|
199
|
+
|
|
179
200
|
def is_valid(self, obj) -> Tuple[bool, Optional[str]]:
|
|
180
201
|
if not isinstance(obj, int):
|
|
181
202
|
return (False, f"must be an int, not {type(obj)}")
|
|
@@ -203,11 +224,16 @@ __esi_mapping[cpp.SIntType] = SIntType
|
|
|
203
224
|
|
|
204
225
|
class StructType(ESIType):
|
|
205
226
|
|
|
206
|
-
def __init__(self,
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
227
|
+
def __init__(self, id: str, fields: List[Tuple[str, "ESIType"]]):
|
|
228
|
+
# Convert Python ESIType fields to cpp Type fields
|
|
229
|
+
cpp_fields = [(name, field_type.cpp_type) for name, field_type in fields]
|
|
230
|
+
self._init_from_cpp(cpp.StructType(id, cpp_fields))
|
|
231
|
+
|
|
232
|
+
def _init_from_cpp(self, cpp_type: cpp.StructType):
|
|
233
|
+
"""Initialize instance attributes from a C++ type object."""
|
|
234
|
+
super()._init_from_cpp(cpp_type)
|
|
235
|
+
# For wrap_cpp path, we need to convert C++ fields back to Python
|
|
236
|
+
self.fields = [(name, _get_esi_type(ty)) for (name, ty) in cpp_type.fields]
|
|
211
237
|
|
|
212
238
|
@property
|
|
213
239
|
def bit_width(self) -> int:
|
|
@@ -252,8 +278,12 @@ __esi_mapping[cpp.StructType] = StructType
|
|
|
252
278
|
|
|
253
279
|
class ArrayType(ESIType):
|
|
254
280
|
|
|
255
|
-
def __init__(self,
|
|
256
|
-
self.cpp_type
|
|
281
|
+
def __init__(self, id: str, element_type: "ESIType", size: int):
|
|
282
|
+
self._init_from_cpp(cpp.ArrayType(id, element_type.cpp_type, size))
|
|
283
|
+
|
|
284
|
+
def _init_from_cpp(self, cpp_type: cpp.ArrayType):
|
|
285
|
+
"""Initialize instance attributes from a C++ type object."""
|
|
286
|
+
super()._init_from_cpp(cpp_type)
|
|
257
287
|
self.element_type = _get_esi_type(cpp_type.element)
|
|
258
288
|
self.size = cpp_type.size
|
|
259
289
|
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
esiaccel/CosimBackend.dll,sha256=
|
|
1
|
+
esiaccel/CosimBackend.dll,sha256=bX051HSQMyD0DoBCav5GT9MppSzn260PGQhIt-8gl3U,7150592
|
|
2
2
|
esiaccel/CosimBackend.lib,sha256=8Fyulmz95ENysUTuD0iZJQvYbSmut971I2rTbIrFBzM,4991546
|
|
3
|
-
esiaccel/ESICppRuntime.dll,sha256=
|
|
4
|
-
esiaccel/ESICppRuntime.lib,sha256=
|
|
5
|
-
esiaccel/EsiCosimDpiServer.dll,sha256=
|
|
3
|
+
esiaccel/ESICppRuntime.dll,sha256=IWfPbyIZa0-w5UN9rTLks1wn-JZdrmMWoVe-RRUvUFw,3721728
|
|
4
|
+
esiaccel/ESICppRuntime.lib,sha256=6x7L5j_dXvWvnVQqtk7mYYWWECCf7dsiHYtx21_-hDA,14530116
|
|
5
|
+
esiaccel/EsiCosimDpiServer.dll,sha256=51ZAGpq65Jjmijpmmz4BmuM6mQE-NeSi1Kp6U9ye8TI,159744
|
|
6
6
|
esiaccel/EsiCosimDpiServer.lib,sha256=MoMCezJdQ9qhdHtUicRVY7CrmYWfUwM2zK8flQxz5pY,604164
|
|
7
|
-
esiaccel/MtiPli.dll,sha256=
|
|
7
|
+
esiaccel/MtiPli.dll,sha256=J2fT1AqfnZt-OuwYy35v-FnSyXvKXsKAio4DvA3d4O8,14848
|
|
8
8
|
esiaccel/MtiPli.lib,sha256=ZhsT1gjT0a2_jT_SKm_z_RHbFKAZ7kOLJ3U9dfCpjiY,14570
|
|
9
9
|
esiaccel/__init__.py,sha256=C0GLqCQuF5g5qTzmAkf_YAHmBV2XAyiJad3Qz7h8u1g,562
|
|
10
10
|
esiaccel/accelerator.py,sha256=BcXPsUqcQV3YsVVyYbz9P6JnZLlcnuageFbJwID9_3s,3318
|
|
11
11
|
esiaccel/codegen.py,sha256=uoYELtnIabVvgLeCABj-mWras0BvmSKABPH-cd9nDFk,6560
|
|
12
12
|
esiaccel/esi-cosim.py,sha256=GwYfNh4aagypheAhGf0EIX6ojkLYKkc5OMlFR9pfXe8,14381
|
|
13
|
-
esiaccel/esiCppAccel.cp313-win_amd64.pyd,sha256=
|
|
14
|
-
esiaccel/esiquery.exe,sha256=
|
|
15
|
-
esiaccel/types.py,sha256=
|
|
13
|
+
esiaccel/esiCppAccel.cp313-win_amd64.pyd,sha256=2XbzyBB1V1Xe9a89UHyF9K-HuPD3U-lP9WPx7gOkOsg,501760
|
|
14
|
+
esiaccel/esiquery.exe,sha256=YG34jMRm-dyu5Cy30oP-6Q4_VK2rSg91oD5nYVBJSrk,441856
|
|
15
|
+
esiaccel/types.py,sha256=LtBYmpmSBlzbB-f_4XqcptmseqI6Q0ibnNWJT3G-GI8,18696
|
|
16
16
|
esiaccel/utils.py,sha256=0_A8Jw3M7mjvjTHeV6u00tvRWxLnWKdFq_6NFKTgbVk,1296
|
|
17
17
|
esiaccel/cmake/esiaccelConfig.cmake,sha256=u2aW99k1lEcmYTG1P3BTJqtmDrj53wUUaBz_jzw8kYY,565
|
|
18
18
|
esiaccel/cosim/Cosim_DpiPkg.sv,sha256=9qGn1VyAVrzBP5At1thV6xrovg0WghICD01Zz9J221E,3458
|
|
@@ -35,9 +35,9 @@ esiaccel/include/esi/Utils.h,sha256=KPd75GajIFeTBVJocXBjwsJqhbZg-ShWZCIe3oQdBss,
|
|
|
35
35
|
esiaccel/include/esi/backends/Cosim.h,sha256=s7vYd0ra6m1nvk-n37MjvBoGVI-CCUKBt0DU4PKlaHM,2838
|
|
36
36
|
esiaccel/include/esi/backends/RpcServer.h,sha256=WMwnhwU2qnrcglGNeiKg9QQHpkDx1QE1JydKYDK4jqE,1856
|
|
37
37
|
esiaccel/include/esi/backends/Trace.h,sha256=kx4wwLH3a0ndmRUdaDyYGZ1SP83zlpFrk30Nw8ZrJJA,3286
|
|
38
|
-
esiaccel-0.1.5.
|
|
39
|
-
esiaccel-0.1.5.
|
|
40
|
-
esiaccel-0.1.5.
|
|
41
|
-
esiaccel-0.1.5.
|
|
42
|
-
esiaccel-0.1.5.
|
|
43
|
-
esiaccel-0.1.5.
|
|
38
|
+
esiaccel-0.1.5.dev66.dist-info/licenses/LICENSE,sha256=vtnVnB8_lN1yPYcA5MeT56R8UsQtBhyzZLBvu_KMf7I,13468
|
|
39
|
+
esiaccel-0.1.5.dev66.dist-info/METADATA,sha256=m-lVIoMZORN2P2-Q2KBb8r7QdEa2Mpr0TuIWR3nsOP4,16147
|
|
40
|
+
esiaccel-0.1.5.dev66.dist-info/WHEEL,sha256=qV0EIPljj1XC_vuSatRWjn02nZIz3N1t8jsZz7HBr2U,101
|
|
41
|
+
esiaccel-0.1.5.dev66.dist-info/entry_points.txt,sha256=_CuNLV0fyTURxRREFwpzGycifZW_-7-MyuJNEwKK9J8,137
|
|
42
|
+
esiaccel-0.1.5.dev66.dist-info/top_level.txt,sha256=fYWTWMDK4PDu4ePQ9NtcFHas2k8-d1kWhTs2avPpgB4,9
|
|
43
|
+
esiaccel-0.1.5.dev66.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|