esiaccel 0.0.10__cp310-cp310-win_amd64.whl → 0.1.5.dev406__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/EsiCosimDpiServer.lib +0 -0
- esiaccel/MtiPli.dll +0 -0
- esiaccel/MtiPli.lib +0 -0
- esiaccel/__init__.py +10 -1
- esiaccel/abseil_dll.dll +0 -0
- esiaccel/accelerator.py +15 -1
- esiaccel/cares.dll +0 -0
- esiaccel/cmake/esiaccelConfig.cmake +1 -1
- esiaccel/codegen.py +197 -0
- esiaccel/cosim/Cosim_DpiPkg.sv +85 -0
- esiaccel/cosim/Cosim_Endpoint.sv +218 -0
- esiaccel/cosim/Cosim_Manifest.sv +32 -0
- esiaccel/cosim/driver.cpp +131 -0
- esiaccel/cosim/driver.sv +74 -0
- esiaccel/cosim/questa.py +141 -0
- esiaccel/cosim/simulator.py +382 -0
- esiaccel/cosim/verilator.py +92 -0
- esiaccel/esi-cosim.py +104 -0
- esiaccel/esiCppAccel.cp310-win_amd64.pyd +0 -0
- esiaccel/esiquery.exe +0 -0
- esiaccel/include/esi/Accelerator.h +33 -9
- esiaccel/include/esi/CLI.h +77 -0
- esiaccel/include/esi/Common.h +59 -10
- esiaccel/include/esi/Context.h +21 -1
- esiaccel/include/esi/Design.h +14 -3
- esiaccel/include/esi/Engines.h +124 -0
- esiaccel/include/esi/Logging.h +231 -0
- esiaccel/include/esi/Manifest.h +0 -2
- esiaccel/include/esi/Ports.h +54 -7
- esiaccel/include/esi/Services.h +225 -22
- esiaccel/include/esi/Types.h +103 -5
- esiaccel/include/esi/Utils.h +5 -0
- esiaccel/include/esi/Values.h +313 -0
- esiaccel/include/esi/backends/Cosim.h +85 -0
- esiaccel/include/esi/backends/RpcServer.h +55 -0
- esiaccel/include/esi/backends/Trace.h +8 -5
- esiaccel/libcrypto-3-x64.dll +0 -0
- esiaccel/libprotobuf.dll +0 -0
- esiaccel/libssl-3-x64.dll +0 -0
- esiaccel/re2.dll +0 -0
- esiaccel/types.py +174 -33
- esiaccel/utils.py +27 -3
- esiaccel/zlib1.dll +0 -0
- {esiaccel-0.0.10.dist-info → esiaccel-0.1.5.dev406.dist-info}/METADATA +3 -3
- esiaccel-0.1.5.dev406.dist-info/RECORD +54 -0
- {esiaccel-0.0.10.dist-info → esiaccel-0.1.5.dev406.dist-info}/WHEEL +1 -1
- {esiaccel-0.0.10.dist-info → esiaccel-0.1.5.dev406.dist-info}/entry_points.txt +1 -0
- esiaccel/bin/ESICppRuntime.dll +0 -0
- esiaccel/bin/esiquery.exe +0 -0
- esiaccel/bin/zlib1.dll +0 -0
- esiaccel-0.0.10.dist-info/RECORD +0 -28
- {esiaccel-0.0.10.dist-info → esiaccel-0.1.5.dev406.dist-info/licenses}/LICENSE +0 -0
- {esiaccel-0.0.10.dist-info → esiaccel-0.1.5.dev406.dist-info}/top_level.txt +0 -0
esiaccel/types.py
CHANGED
|
@@ -15,31 +15,45 @@ 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
|
|
|
21
22
|
from concurrent.futures import Future
|
|
22
23
|
from typing import Any, Callable, Dict, List, Optional, Tuple, Type, Union
|
|
24
|
+
import sys
|
|
25
|
+
import traceback
|
|
23
26
|
|
|
24
27
|
|
|
25
28
|
def _get_esi_type(cpp_type: cpp.Type):
|
|
26
29
|
"""Get the wrapper class for a C++ type."""
|
|
27
|
-
|
|
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():
|
|
28
34
|
if isinstance(cpp_type, cpp_type_cls):
|
|
29
|
-
return
|
|
30
|
-
return ESIType(cpp_type)
|
|
35
|
+
return wrapper_cls.wrap_cpp(cpp_type)
|
|
36
|
+
return ESIType.wrap_cpp(cpp_type)
|
|
31
37
|
|
|
32
38
|
|
|
33
|
-
# Mapping from C++ types to
|
|
34
|
-
|
|
35
|
-
__esi_mapping: Dict[Type, Callable] = {
|
|
36
|
-
cpp.ChannelType: lambda cpp_type: _get_esi_type(cpp_type.inner)
|
|
37
|
-
}
|
|
39
|
+
# Mapping from C++ types to wrapper classes
|
|
40
|
+
__esi_mapping: Dict[Type, Type] = {}
|
|
38
41
|
|
|
39
42
|
|
|
40
43
|
class ESIType:
|
|
41
44
|
|
|
42
|
-
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."""
|
|
43
57
|
self.cpp_type = cpp_type
|
|
44
58
|
|
|
45
59
|
@property
|
|
@@ -84,6 +98,9 @@ class ESIType:
|
|
|
84
98
|
|
|
85
99
|
class VoidType(ESIType):
|
|
86
100
|
|
|
101
|
+
def __init__(self, id: str):
|
|
102
|
+
self._init_from_cpp(cpp.VoidType(id))
|
|
103
|
+
|
|
87
104
|
def is_valid(self, obj) -> Tuple[bool, Optional[str]]:
|
|
88
105
|
if obj is not None:
|
|
89
106
|
return (False, f"void type cannot must represented by None, not {obj}")
|
|
@@ -108,8 +125,8 @@ __esi_mapping[cpp.VoidType] = VoidType
|
|
|
108
125
|
|
|
109
126
|
class BitsType(ESIType):
|
|
110
127
|
|
|
111
|
-
def __init__(self,
|
|
112
|
-
self.
|
|
128
|
+
def __init__(self, id: str, width: int):
|
|
129
|
+
self._init_from_cpp(cpp.BitsType(id, width))
|
|
113
130
|
|
|
114
131
|
def is_valid(self, obj) -> Tuple[bool, Optional[str]]:
|
|
115
132
|
if not isinstance(obj, (bytearray, bytes, list)):
|
|
@@ -141,8 +158,8 @@ __esi_mapping[cpp.BitsType] = BitsType
|
|
|
141
158
|
|
|
142
159
|
class IntType(ESIType):
|
|
143
160
|
|
|
144
|
-
def __init__(self,
|
|
145
|
-
self.
|
|
161
|
+
def __init__(self, id: str, width: int):
|
|
162
|
+
self._init_from_cpp(cpp.IntegerType(id, width))
|
|
146
163
|
|
|
147
164
|
@property
|
|
148
165
|
def bit_width(self) -> int:
|
|
@@ -151,6 +168,9 @@ class IntType(ESIType):
|
|
|
151
168
|
|
|
152
169
|
class UIntType(IntType):
|
|
153
170
|
|
|
171
|
+
def __init__(self, id: str, width: int):
|
|
172
|
+
self._init_from_cpp(cpp.UIntType(id, width))
|
|
173
|
+
|
|
154
174
|
def is_valid(self, obj) -> Tuple[bool, Optional[str]]:
|
|
155
175
|
if not isinstance(obj, int):
|
|
156
176
|
return (False, f"must be an int, not {type(obj)}")
|
|
@@ -174,6 +194,9 @@ __esi_mapping[cpp.UIntType] = UIntType
|
|
|
174
194
|
|
|
175
195
|
class SIntType(IntType):
|
|
176
196
|
|
|
197
|
+
def __init__(self, id: str, width: int):
|
|
198
|
+
self._init_from_cpp(cpp.SIntType(id, width))
|
|
199
|
+
|
|
177
200
|
def is_valid(self, obj) -> Tuple[bool, Optional[str]]:
|
|
178
201
|
if not isinstance(obj, int):
|
|
179
202
|
return (False, f"must be an int, not {type(obj)}")
|
|
@@ -201,11 +224,16 @@ __esi_mapping[cpp.SIntType] = SIntType
|
|
|
201
224
|
|
|
202
225
|
class StructType(ESIType):
|
|
203
226
|
|
|
204
|
-
def __init__(self,
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
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]
|
|
209
237
|
|
|
210
238
|
@property
|
|
211
239
|
def bit_width(self) -> int:
|
|
@@ -217,6 +245,8 @@ class StructType(ESIType):
|
|
|
217
245
|
def is_valid(self, obj) -> Tuple[bool, Optional[str]]:
|
|
218
246
|
fields_count = 0
|
|
219
247
|
if not isinstance(obj, dict):
|
|
248
|
+
if not hasattr(obj, "__dict__"):
|
|
249
|
+
return (False, "must be a dict or have __dict__ attribute")
|
|
220
250
|
obj = obj.__dict__
|
|
221
251
|
|
|
222
252
|
for (fname, ftype) in self.fields:
|
|
@@ -232,14 +262,20 @@ class StructType(ESIType):
|
|
|
232
262
|
|
|
233
263
|
def serialize(self, obj) -> bytearray:
|
|
234
264
|
ret = bytearray()
|
|
235
|
-
|
|
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:
|
|
236
270
|
fval = obj[fname]
|
|
237
271
|
ret.extend(ftype.serialize(fval))
|
|
238
272
|
return ret
|
|
239
273
|
|
|
240
274
|
def deserialize(self, data: bytearray) -> Tuple[Dict[str, Any], bytearray]:
|
|
241
275
|
ret = {}
|
|
242
|
-
|
|
276
|
+
ordered_fields = reversed(
|
|
277
|
+
self.fields) if self.cpp_type.reverse else self.fields
|
|
278
|
+
for (fname, ftype) in ordered_fields:
|
|
243
279
|
(fval, data) = ftype.deserialize(data)
|
|
244
280
|
ret[fname] = fval
|
|
245
281
|
return (ret, data)
|
|
@@ -250,8 +286,12 @@ __esi_mapping[cpp.StructType] = StructType
|
|
|
250
286
|
|
|
251
287
|
class ArrayType(ESIType):
|
|
252
288
|
|
|
253
|
-
def __init__(self,
|
|
254
|
-
self.cpp_type
|
|
289
|
+
def __init__(self, id: str, element_type: "ESIType", size: int):
|
|
290
|
+
self._init_from_cpp(cpp.ArrayType(id, element_type.cpp_type, size))
|
|
291
|
+
|
|
292
|
+
def _init_from_cpp(self, cpp_type: cpp.ArrayType):
|
|
293
|
+
"""Initialize instance attributes from a C++ type object."""
|
|
294
|
+
super()._init_from_cpp(cpp_type)
|
|
255
295
|
self.element_type = _get_esi_type(cpp_type.element)
|
|
256
296
|
self.size = cpp_type.size
|
|
257
297
|
|
|
@@ -296,14 +336,18 @@ class Port:
|
|
|
296
336
|
self.owner = owner
|
|
297
337
|
self.cpp_port = cpp_port
|
|
298
338
|
self.type = _get_esi_type(cpp_port.type)
|
|
339
|
+
|
|
340
|
+
def connect(self, buffer_size: Optional[int] = None):
|
|
299
341
|
(supports_host, reason) = self.type.supports_host
|
|
300
342
|
if not supports_host:
|
|
301
343
|
raise TypeError(f"unsupported type: {reason}")
|
|
302
344
|
|
|
303
|
-
def connect(self, buffer_size: Optional[int] = None):
|
|
304
345
|
self.cpp_port.connect(buffer_size)
|
|
305
346
|
return self
|
|
306
347
|
|
|
348
|
+
def disconnect(self):
|
|
349
|
+
self.cpp_port.disconnect()
|
|
350
|
+
|
|
307
351
|
|
|
308
352
|
class WritePort(Port):
|
|
309
353
|
"""A unidirectional communication channel from the host to the accelerator."""
|
|
@@ -312,19 +356,26 @@ class WritePort(Port):
|
|
|
312
356
|
super().__init__(owner, cpp_port)
|
|
313
357
|
self.cpp_port: cpp.WriteChannelPort = cpp_port
|
|
314
358
|
|
|
315
|
-
def
|
|
316
|
-
"""Write a typed message to the channel. Attempts to serialize 'msg' to what
|
|
317
|
-
the accelerator expects, but will fail if the object is not convertible to
|
|
318
|
-
the port type."""
|
|
319
|
-
|
|
359
|
+
def __serialize_msg(self, msg=None) -> bytearray:
|
|
320
360
|
valid, reason = self.type.is_valid(msg)
|
|
321
361
|
if not valid:
|
|
322
362
|
raise ValueError(
|
|
323
363
|
f"'{msg}' cannot be converted to '{self.type}': {reason}")
|
|
324
364
|
msg_bytes: bytearray = self.type.serialize(msg)
|
|
325
|
-
|
|
365
|
+
return msg_bytes
|
|
366
|
+
|
|
367
|
+
def write(self, msg=None) -> bool:
|
|
368
|
+
"""Write a typed message to the channel. Attempts to serialize 'msg' to what
|
|
369
|
+
the accelerator expects, but will fail if the object is not convertible to
|
|
370
|
+
the port type."""
|
|
371
|
+
self.cpp_port.write(self.__serialize_msg(msg))
|
|
326
372
|
return True
|
|
327
373
|
|
|
374
|
+
def try_write(self, msg=None) -> bool:
|
|
375
|
+
"""Like 'write', but uses the non-blocking tryWrite method of the underlying
|
|
376
|
+
port. Returns True if the write was successful, False otherwise."""
|
|
377
|
+
return self.cpp_port.tryWrite(self.__serialize_msg(msg))
|
|
378
|
+
|
|
328
379
|
|
|
329
380
|
class ReadPort(Port):
|
|
330
381
|
"""A unidirectional communication channel from the accelerator to the host."""
|
|
@@ -353,6 +404,12 @@ class BundlePort:
|
|
|
353
404
|
# TODO: add a proper registration mechanism for service ports.
|
|
354
405
|
if isinstance(cpp_port, cpp.Function):
|
|
355
406
|
return super().__new__(FunctionPort)
|
|
407
|
+
if isinstance(cpp_port, cpp.Callback):
|
|
408
|
+
return super().__new__(CallbackPort)
|
|
409
|
+
if isinstance(cpp_port, cpp.MMIORegion):
|
|
410
|
+
return super().__new__(MMIORegion)
|
|
411
|
+
if isinstance(cpp_port, cpp.Metric):
|
|
412
|
+
return super().__new__(MetricPort)
|
|
356
413
|
return super().__new__(cls)
|
|
357
414
|
|
|
358
415
|
def __init__(self, owner: HWModule, cpp_port: cpp.BundlePort):
|
|
@@ -394,6 +451,28 @@ class MessageFuture(Future):
|
|
|
394
451
|
raise NotImplementedError("add_done_callback is not implemented")
|
|
395
452
|
|
|
396
453
|
|
|
454
|
+
class MMIORegion(BundlePort):
|
|
455
|
+
"""A region of memory-mapped I/O space. This is a collection of named
|
|
456
|
+
channels, which are either read or read-write. The channels are accessed
|
|
457
|
+
by name, and can be connected to the host."""
|
|
458
|
+
|
|
459
|
+
def __init__(self, owner: HWModule, cpp_port: cpp.MMIORegion):
|
|
460
|
+
super().__init__(owner, cpp_port)
|
|
461
|
+
self.region = cpp_port
|
|
462
|
+
|
|
463
|
+
@property
|
|
464
|
+
def descriptor(self) -> cpp.MMIORegionDesc:
|
|
465
|
+
return self.region.descriptor
|
|
466
|
+
|
|
467
|
+
def read(self, offset: int) -> bytearray:
|
|
468
|
+
"""Read a value from the MMIO region at the given offset."""
|
|
469
|
+
return self.region.read(offset)
|
|
470
|
+
|
|
471
|
+
def write(self, offset: int, data: bytearray) -> None:
|
|
472
|
+
"""Write a value to the MMIO region at the given offset."""
|
|
473
|
+
self.region.write(offset, data)
|
|
474
|
+
|
|
475
|
+
|
|
397
476
|
class FunctionPort(BundlePort):
|
|
398
477
|
"""A pair of channels which carry the input and output of a function."""
|
|
399
478
|
|
|
@@ -407,16 +486,78 @@ class FunctionPort(BundlePort):
|
|
|
407
486
|
self.cpp_port.connect()
|
|
408
487
|
self.connected = True
|
|
409
488
|
|
|
410
|
-
def call(self, **kwargs: Any) -> Future:
|
|
489
|
+
def call(self, *args: Any, **kwargs: Any) -> Future:
|
|
411
490
|
"""Call the function with the given argument and returns a future of the
|
|
412
491
|
result."""
|
|
413
|
-
|
|
492
|
+
|
|
493
|
+
# Accept either positional or keyword arguments, but not both.
|
|
494
|
+
if len(args) > 0 and len(kwargs) > 0:
|
|
495
|
+
raise ValueError("cannot use both positional and keyword arguments")
|
|
496
|
+
|
|
497
|
+
# Handle arguments: for single positional arg, unwrap it from tuple
|
|
498
|
+
if len(args) == 1:
|
|
499
|
+
selected = args[0]
|
|
500
|
+
elif len(args) > 1:
|
|
501
|
+
selected = args
|
|
502
|
+
else:
|
|
503
|
+
selected = kwargs
|
|
504
|
+
|
|
505
|
+
valid, reason = self.arg_type.is_valid(selected)
|
|
414
506
|
if not valid:
|
|
415
507
|
raise ValueError(
|
|
416
|
-
f"'{
|
|
417
|
-
arg_bytes: bytearray = self.arg_type.serialize(
|
|
508
|
+
f"'{selected}' cannot be converted to '{self.arg_type}': {reason}")
|
|
509
|
+
arg_bytes: bytearray = self.arg_type.serialize(selected)
|
|
418
510
|
cpp_future = self.cpp_port.call(arg_bytes)
|
|
419
511
|
return MessageFuture(self.result_type, cpp_future)
|
|
420
512
|
|
|
421
513
|
def __call__(self, *args: Any, **kwds: Any) -> Future:
|
|
422
514
|
return self.call(*args, **kwds)
|
|
515
|
+
|
|
516
|
+
|
|
517
|
+
class CallbackPort(BundlePort):
|
|
518
|
+
"""Callback ports are the inverse of function ports -- instead of calls to the
|
|
519
|
+
accelerator, they get called from the accelerator. Specify the function which
|
|
520
|
+
you'd like the accelerator to call when you call `connect`."""
|
|
521
|
+
|
|
522
|
+
def __init__(self, owner: HWModule, cpp_port: cpp.BundlePort):
|
|
523
|
+
super().__init__(owner, cpp_port)
|
|
524
|
+
self.arg_type = self.read_port("arg").type
|
|
525
|
+
self.result_type = self.write_port("result").type
|
|
526
|
+
self.connected = False
|
|
527
|
+
|
|
528
|
+
def connect(self, cb: Callable[[Any], Any]):
|
|
529
|
+
|
|
530
|
+
def type_convert_wrapper(cb: Callable[[Any], Any],
|
|
531
|
+
msg: bytearray) -> Optional[bytearray]:
|
|
532
|
+
try:
|
|
533
|
+
(obj, leftover) = self.arg_type.deserialize(msg)
|
|
534
|
+
if len(leftover) != 0:
|
|
535
|
+
raise ValueError(f"leftover bytes: {leftover}")
|
|
536
|
+
result = cb(obj)
|
|
537
|
+
if result is None:
|
|
538
|
+
return None
|
|
539
|
+
return self.result_type.serialize(result)
|
|
540
|
+
except Exception as e:
|
|
541
|
+
traceback.print_exception(e)
|
|
542
|
+
return None
|
|
543
|
+
|
|
544
|
+
self.cpp_port.connect(lambda x: type_convert_wrapper(cb=cb, msg=x))
|
|
545
|
+
self.connected = True
|
|
546
|
+
|
|
547
|
+
|
|
548
|
+
class MetricPort(BundlePort):
|
|
549
|
+
"""Telemetry ports report an individual piece of information from the
|
|
550
|
+
acceelerator. The method of accessing telemetry will likely change in the
|
|
551
|
+
future."""
|
|
552
|
+
|
|
553
|
+
def __init__(self, owner: HWModule, cpp_port: cpp.BundlePort):
|
|
554
|
+
super().__init__(owner, cpp_port)
|
|
555
|
+
self.connected = False
|
|
556
|
+
|
|
557
|
+
def connect(self):
|
|
558
|
+
self.cpp_port.connect()
|
|
559
|
+
self.connected = True
|
|
560
|
+
|
|
561
|
+
def read(self) -> Future:
|
|
562
|
+
cpp_future = self.cpp_port.read()
|
|
563
|
+
return MessageFuture(self.cpp_port.type, cpp_future)
|
esiaccel/utils.py
CHANGED
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
# See https://llvm.org/LICENSE.txt for license information.
|
|
3
3
|
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
4
4
|
|
|
5
|
+
from . import codegen
|
|
6
|
+
|
|
7
|
+
import platform
|
|
5
8
|
from pathlib import Path
|
|
6
9
|
import subprocess
|
|
7
10
|
import sys
|
|
@@ -11,20 +14,41 @@ _thisdir = Path(__file__).absolute().resolve().parent
|
|
|
11
14
|
|
|
12
15
|
def run_esiquery():
|
|
13
16
|
"""Run the esiquery executable with the same arguments as this script."""
|
|
14
|
-
|
|
17
|
+
if platform.system() == "Windows":
|
|
18
|
+
esiquery = _thisdir / "esiquery.exe"
|
|
19
|
+
else:
|
|
20
|
+
esiquery = _thisdir / "bin" / "esiquery"
|
|
15
21
|
return subprocess.call([esiquery] + sys.argv[1:])
|
|
16
22
|
|
|
17
23
|
|
|
18
24
|
def run_esi_cosim():
|
|
19
25
|
"""Run the esi-cosim.py script with the same arguments as this script."""
|
|
20
26
|
import importlib.util
|
|
21
|
-
|
|
27
|
+
if platform.system() == "Windows":
|
|
28
|
+
esi_cosim = _thisdir / "esi-cosim.py"
|
|
29
|
+
else:
|
|
30
|
+
esi_cosim = _thisdir / "bin" / "esi-cosim.py"
|
|
22
31
|
spec = importlib.util.spec_from_file_location("esi_cosim", esi_cosim)
|
|
23
32
|
assert spec is not None
|
|
33
|
+
assert spec.loader is not None
|
|
24
34
|
cosim_import = importlib.util.module_from_spec(spec)
|
|
25
35
|
spec.loader.exec_module(cosim_import)
|
|
26
36
|
return cosim_import.__main__(sys.argv)
|
|
27
37
|
|
|
28
38
|
|
|
29
|
-
def
|
|
39
|
+
def run_cppgen():
|
|
40
|
+
return codegen.run()
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def get_cmake_dir() -> Path:
|
|
30
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"
|
esiaccel/zlib1.dll
CHANGED
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: esiaccel
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.1.5.dev406
|
|
4
4
|
Summary: ESI accelerators runtime
|
|
5
5
|
Author-email: John Demme <John.Demme@microsoft.com>
|
|
6
6
|
License: ==============================================================================
|
|
@@ -251,4 +251,4 @@ Classifier: Programming Language :: Python :: 3.12
|
|
|
251
251
|
Classifier: Programming Language :: Python :: 3.13
|
|
252
252
|
Requires-Python: >=3.8
|
|
253
253
|
License-File: LICENSE
|
|
254
|
-
|
|
254
|
+
Dynamic: license-file
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
esiaccel/CosimBackend.dll,sha256=Ysg9zxBTK7aubu_dwDr9wopIR0yj7_eeovFxE5zbdUg,7190016
|
|
2
|
+
esiaccel/CosimBackend.lib,sha256=irceROhM9oK4xu-X5-asnfJAPaYHTQYwYIwufUEbCcc,4903722
|
|
3
|
+
esiaccel/ESICppRuntime.dll,sha256=9XE_aQrvqrXauJrorXfGgAXjRAw8GbPlRAax-Z6DHy4,4286976
|
|
4
|
+
esiaccel/ESICppRuntime.lib,sha256=jtwU6Tvj3YHfYS0HW06TaHdFgylzPLRF5U3a4jgSMM4,15784652
|
|
5
|
+
esiaccel/EsiCosimDpiServer.dll,sha256=fPQo11BgE2BMfqf3RnyjwzHDT04xBB5TQjqKwTgygdA,160768
|
|
6
|
+
esiaccel/EsiCosimDpiServer.lib,sha256=xMj0Uiih7BfmPUCe5NrAK8gEAqoi0ITH7P4Fp0IvaHo,606000
|
|
7
|
+
esiaccel/MtiPli.dll,sha256=_P_axCf8QyIrT6VncQLFaLlLcuWgQ4YhK-NJzstCe3g,14848
|
|
8
|
+
esiaccel/MtiPli.lib,sha256=FFIpVSxcH4VGNnMeZXAHcYQxTCBAeElN3YXLk1yrSTM,14570
|
|
9
|
+
esiaccel/__init__.py,sha256=65xXWHwJwRePsyhWk837NpzuN0qsNhoAX29TOiSYKGc,905
|
|
10
|
+
esiaccel/abseil_dll.dll,sha256=9KYmMfeyBmuDReOUOV_v-M1WrCgu5gZPysGRfUWns0U,1584640
|
|
11
|
+
esiaccel/accelerator.py,sha256=BcXPsUqcQV3YsVVyYbz9P6JnZLlcnuageFbJwID9_3s,3318
|
|
12
|
+
esiaccel/cares.dll,sha256=h_wW2hDJCPKdhdaVZMFdYFJKLDuJ6sFzDfyScA1yY-U,199168
|
|
13
|
+
esiaccel/codegen.py,sha256=uoYELtnIabVvgLeCABj-mWras0BvmSKABPH-cd9nDFk,6560
|
|
14
|
+
esiaccel/esi-cosim.py,sha256=P7n3SBgKPnXynwghY5zK1FmpqZkbC_YxfVIvNNQNl6Q,3817
|
|
15
|
+
esiaccel/esiCppAccel.cp310-win_amd64.pyd,sha256=44f0H9sy1DmwtvRGU1DTOQ7sPxMw0Tl8fXHIsbmC-J4,500736
|
|
16
|
+
esiaccel/esiquery.exe,sha256=4XH212_rZIWNOWtvx8cP3pvzODUv40DUspstjtRs8Uk,442880
|
|
17
|
+
esiaccel/libcrypto-3-x64.dll,sha256=-FvjnB5nCICrePjUmMlsX_DlcG5BSkodKddc8GPKvhA,5327872
|
|
18
|
+
esiaccel/libprotobuf.dll,sha256=bA6Nj3yn2lYhfKNGnveqOj2m7D3aBS7Z5V13qDRUXdA,12566528
|
|
19
|
+
esiaccel/libssl-3-x64.dll,sha256=g55CVswh0aBuCKQFEJ37WspIvagqLLlVB2USe3Gb3TA,871424
|
|
20
|
+
esiaccel/re2.dll,sha256=aDM5VNjOp9FaD-Kcvlh-bewpzAbk8JC5AWqUZ8aZGYU,1213952
|
|
21
|
+
esiaccel/types.py,sha256=ps9c4IU2ITbyeCcI4a64BDEjMuNTzchQuH0Bdhx2LG0,19035
|
|
22
|
+
esiaccel/utils.py,sha256=q-8fmgJ9tUvmBsIvqZiZ7u845IJhOjvjYTQLhhrNYl0,1515
|
|
23
|
+
esiaccel/zlib1.dll,sha256=751D75Wfv1xgWg-ItD80EkIeJ3QrCwUhZntdwzxYPB0,90112
|
|
24
|
+
esiaccel/cmake/esiaccelConfig.cmake,sha256=u2aW99k1lEcmYTG1P3BTJqtmDrj53wUUaBz_jzw8kYY,565
|
|
25
|
+
esiaccel/cosim/Cosim_DpiPkg.sv,sha256=9qGn1VyAVrzBP5At1thV6xrovg0WghICD01Zz9J221E,3458
|
|
26
|
+
esiaccel/cosim/Cosim_Endpoint.sv,sha256=-XXrGvvk6hdiZ-Ex6_QtdKXXUwKJLKSvpTUK3o0gPZ8,7589
|
|
27
|
+
esiaccel/cosim/Cosim_Manifest.sv,sha256=vl9b6XieEkP880IBw1ferekBnDJwFanZZggJJGertXM,1123
|
|
28
|
+
esiaccel/cosim/driver.cpp,sha256=Lvmo03pzzhoswdxAtdXAm-oU6UkfTyl1LgoCpyDzLhY,3842
|
|
29
|
+
esiaccel/cosim/driver.sv,sha256=LAkFEXTwX3KKwZLSzYZFwMPWxZwVStuhUsfecHHpGzU,1890
|
|
30
|
+
esiaccel/cosim/questa.py,sha256=2xALwRzsOFZ1_xk3f2d849GMvGspNCK4XL8zVDBjXlA,4626
|
|
31
|
+
esiaccel/cosim/simulator.py,sha256=HpkvKPbpyqalRp8poRYU3E0taYxTRmxcmBEJ7YOecx4,13941
|
|
32
|
+
esiaccel/cosim/verilator.py,sha256=dwiEkKOem5OKPV9AK6O1ohr22MTsyDxBVnriDRFoVa8,2877
|
|
33
|
+
esiaccel/include/esi/Accelerator.h,sha256=B4RQTka8n7a3fJQc35HWYEN7prnje5aWau5NexBKf-w,9362
|
|
34
|
+
esiaccel/include/esi/CLI.h,sha256=Nn8tHn_xtEfkrD7USE2tao6ktYOJ6xcbnhZkS9-ox0A,2540
|
|
35
|
+
esiaccel/include/esi/Common.h,sha256=7bXy9bRt4C7oeO6SBm8BneujbL17fbPM6K7YMqazvLE,6155
|
|
36
|
+
esiaccel/include/esi/Context.h,sha256=Tk_4nBDtTeVY62GfX4Cs_ZMIQstjSgrWHddN_PKANEA,2396
|
|
37
|
+
esiaccel/include/esi/Design.h,sha256=mU8OwpCYijiWSdDq17l45LMzZxBca93nosudWCXNHfQ,4922
|
|
38
|
+
esiaccel/include/esi/Engines.h,sha256=bbGbhXjYMpIpXh_DR0OS57zyGQUIDXh_S7xHX3su0Y0,4831
|
|
39
|
+
esiaccel/include/esi/Logging.h,sha256=sHqMcpp0lNIHkIEyvSm-BBWx4zXXh6NOATCgZpgzYI4,8944
|
|
40
|
+
esiaccel/include/esi/Manifest.h,sha256=ZdIu_vXXLS4bwOoISFo-sFjzvB9x5ddYmNmaknyF0ds,2110
|
|
41
|
+
esiaccel/include/esi/Ports.h,sha256=T2WbPBViUSvFbO5Jjxlcp_eGq9jMitguvNnz3O0564U,10543
|
|
42
|
+
esiaccel/include/esi/Services.h,sha256=au4agwnlyZD4vYZdawGlnAZxocnNN-PCv3WoeD0qtOs,16216
|
|
43
|
+
esiaccel/include/esi/Types.h,sha256=6krb9cRpVvuml35LqR7SHPTDMdz9u4773SON94_3_Ig,9298
|
|
44
|
+
esiaccel/include/esi/Utils.h,sha256=KPd75GajIFeTBVJocXBjwsJqhbZg-ShWZCIe3oQdBss,3061
|
|
45
|
+
esiaccel/include/esi/Values.h,sha256=1xXxNV2oUr84At3Y7aXBqbiPZxyJXeUbhycl0O0fUtk,11074
|
|
46
|
+
esiaccel/include/esi/backends/Cosim.h,sha256=s7vYd0ra6m1nvk-n37MjvBoGVI-CCUKBt0DU4PKlaHM,2838
|
|
47
|
+
esiaccel/include/esi/backends/RpcServer.h,sha256=WMwnhwU2qnrcglGNeiKg9QQHpkDx1QE1JydKYDK4jqE,1856
|
|
48
|
+
esiaccel/include/esi/backends/Trace.h,sha256=kx4wwLH3a0ndmRUdaDyYGZ1SP83zlpFrk30Nw8ZrJJA,3286
|
|
49
|
+
esiaccel-0.1.5.dev406.dist-info/licenses/LICENSE,sha256=vtnVnB8_lN1yPYcA5MeT56R8UsQtBhyzZLBvu_KMf7I,13468
|
|
50
|
+
esiaccel-0.1.5.dev406.dist-info/METADATA,sha256=Xq1uTQMUQk7t-TFGhNN4vTg3tU654H0Vl9PX3oLrLgE,16148
|
|
51
|
+
esiaccel-0.1.5.dev406.dist-info/WHEEL,sha256=KUuBC6lxAbHCKilKua8R9W_TM71_-9Sg5uEP3uDWcoU,101
|
|
52
|
+
esiaccel-0.1.5.dev406.dist-info/entry_points.txt,sha256=_CuNLV0fyTURxRREFwpzGycifZW_-7-MyuJNEwKK9J8,137
|
|
53
|
+
esiaccel-0.1.5.dev406.dist-info/top_level.txt,sha256=fYWTWMDK4PDu4ePQ9NtcFHas2k8-d1kWhTs2avPpgB4,9
|
|
54
|
+
esiaccel-0.1.5.dev406.dist-info/RECORD,,
|
esiaccel/bin/ESICppRuntime.dll
DELETED
|
Binary file
|
esiaccel/bin/esiquery.exe
DELETED
|
Binary file
|
esiaccel/bin/zlib1.dll
DELETED
|
Binary file
|
esiaccel-0.0.10.dist-info/RECORD
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
esiaccel/ESICppRuntime.dll,sha256=JHbsCBPd2jLyOy5O2j26xFP-4tgckL10CwzhE321ERI,2800640
|
|
2
|
-
esiaccel/ESICppRuntime.lib,sha256=jKnwsX4_UMSAyB9DoUPz1-d3raHGq84Ccvg6JyNXPCQ,11269988
|
|
3
|
-
esiaccel/__init__.py,sha256=C0GLqCQuF5g5qTzmAkf_YAHmBV2XAyiJad3Qz7h8u1g,562
|
|
4
|
-
esiaccel/accelerator.py,sha256=c5vN4Cf31lTWcDOqPfFXy-onFtWTLbXymyyNpcVKcOs,2948
|
|
5
|
-
esiaccel/esiCppAccel.cp310-win_amd64.pyd,sha256=_p6Yn2hrmvIaTfk35NjQiBJdASjLyYTpqs9nnaFQU8U,365568
|
|
6
|
-
esiaccel/types.py,sha256=oMFyj8-5ou78Z4Qk8WXfGq_eP20fT6xitWx9_wzhSWI,13842
|
|
7
|
-
esiaccel/utils.py,sha256=TzI--7WwVn3bNvl5H3OF0jz8vqDsFfPP90ZwoEQR4pU,990
|
|
8
|
-
esiaccel/zlib1.dll,sha256=cQHrfdgNra_Ou-D7iOfg1NhzFSHYDy8T2ZoF7iB7624,90624
|
|
9
|
-
esiaccel/bin/ESICppRuntime.dll,sha256=JHbsCBPd2jLyOy5O2j26xFP-4tgckL10CwzhE321ERI,2800640
|
|
10
|
-
esiaccel/bin/esiquery.exe,sha256=yhv9exfbkEMciesX0Y106NbQGZ7cPtj48Npu4DTKzGE,38912
|
|
11
|
-
esiaccel/bin/zlib1.dll,sha256=cQHrfdgNra_Ou-D7iOfg1NhzFSHYDy8T2ZoF7iB7624,90624
|
|
12
|
-
esiaccel/cmake/esiaccelConfig.cmake,sha256=HcLuZRVSMGdr1ln6gsLTfo9iWCsAPf9wVLejnYqnpVE,564
|
|
13
|
-
esiaccel/include/esi/Accelerator.h,sha256=vd8CyYcK7Su1dD_4sxWhO6qmOHDw41rhhpExzCmhGW0,8357
|
|
14
|
-
esiaccel/include/esi/Common.h,sha256=639xZfVH3zc2B7B2S4h7WyqttlyeKHtrJG9lsvkDQrc,4451
|
|
15
|
-
esiaccel/include/esi/Context.h,sha256=sCWy3kEnVPDr2wGBbw9z1gTcqqMYas4i_KLzjFHLSgQ,1657
|
|
16
|
-
esiaccel/include/esi/Design.h,sha256=4Ro3gr6gYLSIV2JNGoNrzA8tAgTvDl7FLuNJY6qgFk4,4302
|
|
17
|
-
esiaccel/include/esi/Manifest.h,sha256=j3v9UA0ogtJQBlv6k5s4j_3sCsq-gwF9btVg5dKTBlg,2244
|
|
18
|
-
esiaccel/include/esi/Ports.h,sha256=J16DVS0Wuy7W81U9GW3tBmzzSJFX0sSDhdDYtU5JL1k,8926
|
|
19
|
-
esiaccel/include/esi/Services.h,sha256=TnfKu1Fq4Czo7QaoweWvH4keCKhlIHBCwzQ9ZjiFQOo,8475
|
|
20
|
-
esiaccel/include/esi/Types.h,sha256=l2QafIcLQC0a_kBvWYki24gOR4KgfNS88rMkfQZQOyw,5196
|
|
21
|
-
esiaccel/include/esi/Utils.h,sha256=ank2DrZqZbEFJZLXeDQKEYPSEUGnIYwD15UqVLPMoVo,2875
|
|
22
|
-
esiaccel/include/esi/backends/Trace.h,sha256=z8KssRMHHYws0NPSc5reml78QNVLSNXwiAnXCqW8SC0,3229
|
|
23
|
-
esiaccel-0.0.10.dist-info/LICENSE,sha256=vtnVnB8_lN1yPYcA5MeT56R8UsQtBhyzZLBvu_KMf7I,13468
|
|
24
|
-
esiaccel-0.0.10.dist-info/METADATA,sha256=uofFxEtECaDKSPJGuBLGDJ6E6-dgmSs0fzdXX_aojdw,16121
|
|
25
|
-
esiaccel-0.0.10.dist-info/WHEEL,sha256=yrvteVAZzxQvtDnzdCRh4dP01sPIxYhLXIXplC7o50E,102
|
|
26
|
-
esiaccel-0.0.10.dist-info/entry_points.txt,sha256=p20aCI8eqjwhh_qxZYLrusAdk9wkv3yG180jtQhOVEw,98
|
|
27
|
-
esiaccel-0.0.10.dist-info/top_level.txt,sha256=fYWTWMDK4PDu4ePQ9NtcFHas2k8-d1kWhTs2avPpgB4,9
|
|
28
|
-
esiaccel-0.0.10.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|