simbricks-e1000-sim-bm-py 0.5.0__tar.gz

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.
@@ -0,0 +1,23 @@
1
+ Metadata-Version: 2.4
2
+ Name: simbricks-e1000-sim-bm-py
3
+ Version: 0.5.0
4
+ Summary: Intel e1000 NIC behavioral model integration into SimBricks
5
+ Author: Team SimBricks
6
+ Author-email: team@simbricks.io
7
+ Classifier: Programming Language :: Python :: 2
8
+ Classifier: Programming Language :: Python :: 2.7
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Programming Language :: Python :: 3.4
11
+ Classifier: Programming Language :: Python :: 3.5
12
+ Classifier: Programming Language :: Python :: 3.6
13
+ Classifier: Programming Language :: Python :: 3.7
14
+ Classifier: Programming Language :: Python :: 3.8
15
+ Classifier: Programming Language :: Python :: 3.9
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Programming Language :: Python :: 3.14
21
+ Requires-Dist: simbricks-orchestration (>=0.5.0)
22
+ Requires-Dist: simbricks-utils (>=0.5.0)
23
+ Project-URL: Homepage, https://www.simbricks.io/
@@ -0,0 +1,44 @@
1
+ # Copyright 2026 Max Planck Institute for Software Systems,
2
+ # National University of Singapore, and SimBricks UG (haftungsbeschränkt)
3
+ #
4
+ # Permission is hereby granted, free of charge, to any person obtaining
5
+ # a copy of this software and associated documentation files (the
6
+ # "Software"), to deal in the Software without restriction, including
7
+ # without limitation the rights to use, copy, modify, merge, publish,
8
+ # distribute, sublicense, and/or sell copies of the Software, and to
9
+ # permit persons to whom the Software is furnished to do so, subject to
10
+ # the following conditions:
11
+ #
12
+ # The above copyright notice and this permission notice shall be
13
+ # included in all copies or substantial portions of the Software.
14
+ #
15
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16
+ # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17
+ # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18
+ # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
19
+ # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20
+ # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
21
+ # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
+
23
+ [tool.black]
24
+ line-length = 100
25
+
26
+ [build-system]
27
+ requires = ["poetry-core>=1.0.0"]
28
+ build-backend = "poetry.core.masonry.api"
29
+
30
+ [tool.poetry]
31
+ name = "simbricks-e1000-sim-bm-py"
32
+ version = "0.5.0"
33
+ description = "Intel e1000 NIC behavioral model integration into SimBricks"
34
+ authors = [
35
+ "Team SimBricks <team@simbricks.io>"
36
+ ]
37
+ homepage = "https://www.simbricks.io/"
38
+ packages = [
39
+ { include = "simbricks" }
40
+ ]
41
+
42
+ [tool.poetry.dependencies]
43
+ simbricks-orchestration = ">=0.5.0"
44
+ simbricks-utils = ">=0.5.0"
@@ -0,0 +1,25 @@
1
+ # Copyright 2026 Max Planck Institute for Software Systems,
2
+ # National University of Singapore, and SimBricks UG (haftungsbeschränkt)
3
+ #
4
+ # Permission is hereby granted, free of charge, to any person obtaining
5
+ # a copy of this software and associated documentation files (the
6
+ # "Software"), to deal in the Software without restriction, including
7
+ # without limitation the rights to use, copy, modify, merge, publish,
8
+ # distribute, sublicense, and/or sell copies of the Software, and to
9
+ # permit persons to whom the Software is furnished to do so, subject to
10
+ # the following conditions:
11
+ #
12
+ # The above copyright notice and this permission notice shall be
13
+ # included in all copies or substantial portions of the Software.
14
+ #
15
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16
+ # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17
+ # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18
+ # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
19
+ # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20
+ # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
21
+ # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
+
23
+ from .e1000 import E1000NIC
24
+
25
+ __all__ = ["E1000NIC"]
@@ -0,0 +1,69 @@
1
+ # Copyright 2026 Max Planck Institute for Software Systems,
2
+ # National University of Singapore, and SimBricks UG (haftungsbeschränkt)
3
+ #
4
+ # Permission is hereby granted, free of charge, to any person obtaining
5
+ # a copy of this software and associated documentation files (the
6
+ # "Software"), to deal in the Software without restriction, including
7
+ # without limitation the rights to use, copy, modify, merge, publish,
8
+ # distribute, sublicense, and/or sell copies of the Software, and to
9
+ # permit persons to whom the Software is furnished to do so, subject to
10
+ # the following conditions:
11
+ #
12
+ # The above copyright notice and this permission notice shall be
13
+ # included in all copies or substantial portions of the Software.
14
+ #
15
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16
+ # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17
+ # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18
+ # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
19
+ # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20
+ # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
21
+ # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
+
23
+ from __future__ import annotations
24
+
25
+ import typing_extensions as tpe
26
+
27
+ from simbricks.components.e1000 import system as e1000_sys
28
+ from simbricks.orchestration.instantiation import base as inst_base
29
+ from simbricks.orchestration.simulation import base as sim_base
30
+ from simbricks.orchestration.simulation import pcidev
31
+ from simbricks.utils import base as utils_base
32
+
33
+
34
+ class E1000NIC(pcidev.NICSim):
35
+
36
+ def __init__(self, simulation: sim_base.Simulation):
37
+ super().__init__(
38
+ simulation=simulation,
39
+ executable="simb_e1000_gem5",
40
+ )
41
+ self.name = f"NICSim-{self._id}"
42
+ self.debug: bool = False
43
+
44
+ def toJSON(self) -> dict:
45
+ json_obj = super().toJSON()
46
+ json_obj["debug"] = self.debug
47
+ return json_obj
48
+
49
+ @classmethod
50
+ def fromJSON(cls, simulation: sim_base.Simulation, json_obj: dict) -> tpe.Self:
51
+ instance = super().fromJSON(simulation, json_obj)
52
+ instance.debug = utils_base.get_json_attr_top(json_obj, "debug")
53
+ return instance
54
+
55
+ def add(self, nic: e1000_sys.IntelE1000NIC):
56
+ utils_base.has_expected_type(nic, e1000_sys.IntelE1000NIC)
57
+ super().add(nic)
58
+
59
+ def run_cmd(self, inst: inst_base.Instantiation) -> str:
60
+ cmd = super().run_cmd(inst)
61
+ if self.mac:
62
+ cmd += " " + ("".join(reversed(self.mac.split(":"))))
63
+ if self.log_file:
64
+ cmd += f" {self.log_file}"
65
+
66
+ if self.debug:
67
+ cmd = f"env E1000_DEBUG=1 {cmd}"
68
+
69
+ return cmd