esiaccel 0.1.5.dev93__cp310-cp310-win_amd64.whl → 0.1.5.dev104__cp310-cp310-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.
Potentially problematic release.
This version of esiaccel might be problematic. Click here for more details.
- esiaccel/CosimBackend.dll +0 -0
- esiaccel/CosimBackend.lib +0 -0
- esiaccel/ESICppRuntime.dll +0 -0
- esiaccel/ESICppRuntime.lib +0 -0
- esiaccel/EsiCosimDpiServer.dll +0 -0
- esiaccel/MtiPli.dll +0 -0
- esiaccel/__init__.py +10 -1
- esiaccel/esiCppAccel.cp310-win_amd64.pyd +0 -0
- esiaccel/esiquery.exe +0 -0
- esiaccel/include/esi/Types.h +10 -2
- esiaccel/types.py +10 -2
- esiaccel/utils.py +11 -1
- {esiaccel-0.1.5.dev93.dist-info → esiaccel-0.1.5.dev104.dist-info}/METADATA +1 -1
- {esiaccel-0.1.5.dev93.dist-info → esiaccel-0.1.5.dev104.dist-info}/RECORD +18 -18
- {esiaccel-0.1.5.dev93.dist-info → esiaccel-0.1.5.dev104.dist-info}/WHEEL +0 -0
- {esiaccel-0.1.5.dev93.dist-info → esiaccel-0.1.5.dev104.dist-info}/entry_points.txt +0 -0
- {esiaccel-0.1.5.dev93.dist-info → esiaccel-0.1.5.dev104.dist-info}/licenses/LICENSE +0 -0
- {esiaccel-0.1.5.dev93.dist-info → esiaccel-0.1.5.dev104.dist-info}/top_level.txt +0 -0
esiaccel/CosimBackend.dll
CHANGED
|
Binary file
|
esiaccel/CosimBackend.lib
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
|
esiaccel/__init__.py
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
2
2
|
# See https://llvm.org/LICENSE.txt for license information.
|
|
3
3
|
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
4
|
-
|
|
4
|
+
import sys
|
|
5
|
+
import os
|
|
5
6
|
from .accelerator import AcceleratorConnection
|
|
6
7
|
|
|
7
8
|
from .esiCppAccel import (AppID, Type, BundleType, ChannelType, ArrayType,
|
|
@@ -11,3 +12,11 @@ __all__ = [
|
|
|
11
12
|
"AcceleratorConnection", "AppID", "Type", "BundleType", "ChannelType",
|
|
12
13
|
"ArrayType", "StructType", "BitsType", "UIntType", "SIntType"
|
|
13
14
|
]
|
|
15
|
+
|
|
16
|
+
if sys.platform == "win32":
|
|
17
|
+
"""Ensure that ESI libraries are in the dll path on Windows. Necessary to
|
|
18
|
+
call when users build against the esiaccel-provided prebuilt CMake/prebuilt
|
|
19
|
+
libraries, before they are loaded via. python.
|
|
20
|
+
"""
|
|
21
|
+
from .utils import get_dll_dir
|
|
22
|
+
os.add_dll_directory(str(get_dll_dir()))
|
|
Binary file
|
esiaccel/esiquery.exe
CHANGED
|
Binary file
|
esiaccel/include/esi/Types.h
CHANGED
|
@@ -138,8 +138,8 @@ class StructType : public Type {
|
|
|
138
138
|
public:
|
|
139
139
|
using FieldVector = std::vector<std::pair<std::string, const Type *>>;
|
|
140
140
|
|
|
141
|
-
StructType(const ID &id, const FieldVector &fields)
|
|
142
|
-
: Type(id), fields(fields) {}
|
|
141
|
+
StructType(const ID &id, const FieldVector &fields, bool reverse = true)
|
|
142
|
+
: Type(id), fields(fields), reverse(reverse) {}
|
|
143
143
|
|
|
144
144
|
const FieldVector &getFields() const { return fields; }
|
|
145
145
|
std::ptrdiff_t getBitWidth() const override {
|
|
@@ -153,8 +153,16 @@ public:
|
|
|
153
153
|
return size;
|
|
154
154
|
}
|
|
155
155
|
|
|
156
|
+
// Returns whether this struct type should be reversed when
|
|
157
|
+
// serializing/deserializing.
|
|
158
|
+
// By default, a truthy value here makes StructType's compatible with system
|
|
159
|
+
// verilog, which has reversed struct field ordering, wrt. C/software struct
|
|
160
|
+
// ordering.
|
|
161
|
+
bool isReverse() const { return reverse; }
|
|
162
|
+
|
|
156
163
|
private:
|
|
157
164
|
FieldVector fields;
|
|
165
|
+
bool reverse;
|
|
158
166
|
};
|
|
159
167
|
|
|
160
168
|
/// Arrays have a compile time specified (static) size and an element type.
|
esiaccel/types.py
CHANGED
|
@@ -245,6 +245,8 @@ class StructType(ESIType):
|
|
|
245
245
|
def is_valid(self, obj) -> Tuple[bool, Optional[str]]:
|
|
246
246
|
fields_count = 0
|
|
247
247
|
if not isinstance(obj, dict):
|
|
248
|
+
if not hasattr(obj, "__dict__"):
|
|
249
|
+
return (False, "must be a dict or have __dict__ attribute")
|
|
248
250
|
obj = obj.__dict__
|
|
249
251
|
|
|
250
252
|
for (fname, ftype) in self.fields:
|
|
@@ -260,14 +262,20 @@ class StructType(ESIType):
|
|
|
260
262
|
|
|
261
263
|
def serialize(self, obj) -> bytearray:
|
|
262
264
|
ret = bytearray()
|
|
263
|
-
|
|
265
|
+
if not isinstance(obj, dict):
|
|
266
|
+
obj = obj.__dict__
|
|
267
|
+
ordered_fields = reversed(
|
|
268
|
+
self.fields) if self.cpp_type.reverse else self.fields
|
|
269
|
+
for (fname, ftype) in ordered_fields:
|
|
264
270
|
fval = obj[fname]
|
|
265
271
|
ret.extend(ftype.serialize(fval))
|
|
266
272
|
return ret
|
|
267
273
|
|
|
268
274
|
def deserialize(self, data: bytearray) -> Tuple[Dict[str, Any], bytearray]:
|
|
269
275
|
ret = {}
|
|
270
|
-
|
|
276
|
+
ordered_fields = reversed(
|
|
277
|
+
self.fields) if self.cpp_type.reverse else self.fields
|
|
278
|
+
for (fname, ftype) in ordered_fields:
|
|
271
279
|
(fval, data) = ftype.deserialize(data)
|
|
272
280
|
ret[fname] = fval
|
|
273
281
|
return (ret, data)
|
esiaccel/utils.py
CHANGED
|
@@ -40,5 +40,15 @@ def run_cppgen():
|
|
|
40
40
|
return codegen.run()
|
|
41
41
|
|
|
42
42
|
|
|
43
|
-
def get_cmake_dir():
|
|
43
|
+
def get_cmake_dir() -> Path:
|
|
44
44
|
return _thisdir / "cmake"
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def get_dll_dir() -> Path:
|
|
48
|
+
"""Return the directory where the ESI dll's are located"""
|
|
49
|
+
import sys
|
|
50
|
+
import os
|
|
51
|
+
if sys.platform == "win32":
|
|
52
|
+
return _thisdir
|
|
53
|
+
else:
|
|
54
|
+
return _thisdir / "lib"
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
esiaccel/CosimBackend.dll,sha256=
|
|
2
|
-
esiaccel/CosimBackend.lib,sha256=
|
|
3
|
-
esiaccel/ESICppRuntime.dll,sha256=
|
|
4
|
-
esiaccel/ESICppRuntime.lib,sha256=
|
|
5
|
-
esiaccel/EsiCosimDpiServer.dll,sha256=
|
|
1
|
+
esiaccel/CosimBackend.dll,sha256=5wHUFRaqVI0FlWM6NF-PLJXTw67-96wiEHqn3PDxK2g,7150592
|
|
2
|
+
esiaccel/CosimBackend.lib,sha256=LtcEhVi75BqE9pNbUTxOoSFvcjI954tz7VmdsBTaoLY,4991556
|
|
3
|
+
esiaccel/ESICppRuntime.dll,sha256=l7pwCT6ELe86CKhEtu-MnzKGCWIKZ54BTPEUUIh7JLc,3722240
|
|
4
|
+
esiaccel/ESICppRuntime.lib,sha256=jIEtwRR_6zJuM_eXeRTQYjBwp4CPp2ghYt9gGNQFwyU,14530126
|
|
5
|
+
esiaccel/EsiCosimDpiServer.dll,sha256=NO3jBGlWwcGYu0pzwZQobnaPtG6X8HDs4cFLNjIDzOI,159744
|
|
6
6
|
esiaccel/EsiCosimDpiServer.lib,sha256=bYBigD0RtRRSEiDxf4_gvpasLjD8fcUmC0CjRgQiQ0s,604164
|
|
7
|
-
esiaccel/MtiPli.dll,sha256=
|
|
7
|
+
esiaccel/MtiPli.dll,sha256=jObzMutjzWubCeQzewNN17aFdG_Sz5DjQNJ7ReV-GKA,14848
|
|
8
8
|
esiaccel/MtiPli.lib,sha256=X0PcXwheCUvBMgQ5BAawePxbXQSLNk5M1FFn6V56ydo,14570
|
|
9
|
-
esiaccel/__init__.py,sha256=
|
|
9
|
+
esiaccel/__init__.py,sha256=65xXWHwJwRePsyhWk837NpzuN0qsNhoAX29TOiSYKGc,905
|
|
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.cp310-win_amd64.pyd,sha256=
|
|
14
|
-
esiaccel/esiquery.exe,sha256=
|
|
15
|
-
esiaccel/types.py,sha256=
|
|
16
|
-
esiaccel/utils.py,sha256=
|
|
13
|
+
esiaccel/esiCppAccel.cp310-win_amd64.pyd,sha256=XPSxzEYLOBtEcgjsQX0fcSRpmN0C3ORnG6yRBSBI398,497152
|
|
14
|
+
esiaccel/esiquery.exe,sha256=5IsO8a1271Cdei9Qre39lkFgDzIt4tNOmDFloDrts0A,441856
|
|
15
|
+
esiaccel/types.py,sha256=LFLzUCvtYF6FLsmKet6eJTMq2ija2Z5kxd5Ks6tkS4U,19044
|
|
16
|
+
esiaccel/utils.py,sha256=q-8fmgJ9tUvmBsIvqZiZ7u845IJhOjvjYTQLhhrNYl0,1515
|
|
17
17
|
esiaccel/cmake/esiaccelConfig.cmake,sha256=u2aW99k1lEcmYTG1P3BTJqtmDrj53wUUaBz_jzw8kYY,565
|
|
18
18
|
esiaccel/cosim/Cosim_DpiPkg.sv,sha256=9qGn1VyAVrzBP5At1thV6xrovg0WghICD01Zz9J221E,3458
|
|
19
19
|
esiaccel/cosim/Cosim_Endpoint.sv,sha256=ri1fHdkiphe8S2-vm6Ru16rBGYiDiS1c8qeCAsl1diU,6498
|
|
@@ -30,14 +30,14 @@ esiaccel/include/esi/Logging.h,sha256=sHqMcpp0lNIHkIEyvSm-BBWx4zXXh6NOATCgZpgzYI
|
|
|
30
30
|
esiaccel/include/esi/Manifest.h,sha256=j3v9UA0ogtJQBlv6k5s4j_3sCsq-gwF9btVg5dKTBlg,2244
|
|
31
31
|
esiaccel/include/esi/Ports.h,sha256=T2WbPBViUSvFbO5Jjxlcp_eGq9jMitguvNnz3O0564U,10543
|
|
32
32
|
esiaccel/include/esi/Services.h,sha256=H7Iq3F3LivSZHblFJmrC8RAU_MftfKAPDtyGBfJ2nP4,14815
|
|
33
|
-
esiaccel/include/esi/Types.h,sha256=
|
|
33
|
+
esiaccel/include/esi/Types.h,sha256=05nnhCXvStzCy436UM4LA6Z6N9jHgHUJgGcP5CWHQY0,5859
|
|
34
34
|
esiaccel/include/esi/Utils.h,sha256=KPd75GajIFeTBVJocXBjwsJqhbZg-ShWZCIe3oQdBss,3061
|
|
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.dev104.dist-info/licenses/LICENSE,sha256=vtnVnB8_lN1yPYcA5MeT56R8UsQtBhyzZLBvu_KMf7I,13468
|
|
39
|
+
esiaccel-0.1.5.dev104.dist-info/METADATA,sha256=swcP5O3aZB-EDQxTAXzd7KNZDFebItz5aaHCmwicAMo,16148
|
|
40
|
+
esiaccel-0.1.5.dev104.dist-info/WHEEL,sha256=KUuBC6lxAbHCKilKua8R9W_TM71_-9Sg5uEP3uDWcoU,101
|
|
41
|
+
esiaccel-0.1.5.dev104.dist-info/entry_points.txt,sha256=_CuNLV0fyTURxRREFwpzGycifZW_-7-MyuJNEwKK9J8,137
|
|
42
|
+
esiaccel-0.1.5.dev104.dist-info/top_level.txt,sha256=fYWTWMDK4PDu4ePQ9NtcFHas2k8-d1kWhTs2avPpgB4,9
|
|
43
|
+
esiaccel-0.1.5.dev104.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|