Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ycai
simbricks
Commits
ae372841
Commit
ae372841
authored
Aug 13, 2023
by
Jonas Kaufmann
Committed by
Antoine Kaufmann
Sep 04, 2023
Browse files
simulators.py: add doc strings for synchronization attributes
parent
2e754b87
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
experiments/simbricks/orchestration/simulators.py
experiments/simbricks/orchestration/simulators.py
+13
-0
No files found.
experiments/simbricks/orchestration/simulators.py
View file @
ae372841
...
...
@@ -95,7 +95,14 @@ class PCIDevSim(Simulator):
super
().
__init__
()
self
.
sync_mode
=
0
"""Synchronization mode. 0 is running unsynchronized, 1 synchronized.
Depending on the concrete simulator, there may be additional modes."""
self
.
start_tick
=
0
"""The timestamp at which to start the simulation. This is useful when
the simulator is only attached at a later point in time and needs to
synchronize with connected simulators. For example, this could be used
when taking checkpoints to only attach certain simulators after the
checkpoint has been taken."""
self
.
sync_period
=
500
"""Period in nanoseconds of sending synchronization messages from this
device to connected components."""
...
...
@@ -171,6 +178,8 @@ class NetSim(Simulator):
self
.
opt
=
''
self
.
sync_mode
=
0
"""Synchronization mode. 0 is running unsynchronized, 1 synchronized.
Depending on the concrete simulator, there may be additional modes."""
self
.
sync_period
=
500
"""Synchronization period in nanoseconds from this network to connected
components."""
...
...
@@ -284,6 +293,8 @@ class HostSim(Simulator):
self
.
cpu_freq
=
'4GHz'
self
.
sync_mode
=
0
"""Synchronization mode. 0 is running unsynchronized, 1 synchronized.
Depending on the concrete simulator, there may be additional modes."""
self
.
sync_period
=
500
"""Period in nanoseconds of sending synchronization messages from this
device to connected components."""
...
...
@@ -344,6 +355,7 @@ class QemuHost(HostSim):
super
().
__init__
(
node_config
)
self
.
sync
=
False
""""Whether to synchronize with attached simulators."""
def
resreq_cores
(
self
):
if
self
.
sync
:
...
...
@@ -779,6 +791,7 @@ class SwitchNet(NetSim):
def
__init__
(
self
):
super
().
__init__
()
self
.
sync
=
True
"""Whether to synchronize with attached simulators."""
def
run_cmd
(
self
,
env
):
cmd
=
env
.
repodir
+
'/sims/net/switch/net_switch'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment