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
23b52514
"vscode:/vscode.git/clone" did not exist on "146dd8556c4f3b2ad21fad9312f4602cd049d6da"
Commit
23b52514
authored
Jun 22, 2024
by
Hejing Li
Committed by
Jonas Kaufmann
Aug 20, 2024
Browse files
specification.py: import impl
parent
4e584719
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
experiments/simbricks/splitsim/impl.py
experiments/simbricks/splitsim/impl.py
+3
-2
experiments/simbricks/splitsim/specification.py
experiments/simbricks/splitsim/specification.py
+3
-2
No files found.
experiments/simbricks/splitsim/impl.py
View file @
23b52514
...
@@ -105,7 +105,8 @@ class Gem5Sim(Simulator):
...
@@ -105,7 +105,8 @@ class Gem5Sim(Simulator):
def
add
(
self
,
host
:
spec
.
Host
):
def
add
(
self
,
host
:
spec
.
Host
):
self
.
hosts
.
append
(
host
)
self
.
hosts
.
append
(
host
)
host
.
sim
=
'gem5'
self
.
nics
=
host
.
nics
host
.
sim
=
self
self
.
name
=
f
'
{
self
.
hosts
[
0
].
id
}
'
self
.
name
=
f
'
{
self
.
hosts
[
0
].
id
}
'
self
.
experiment
.
add_host
(
self
)
self
.
experiment
.
add_host
(
self
)
...
@@ -146,7 +147,7 @@ class Gem5Sim(Simulator):
...
@@ -146,7 +147,7 @@ class Gem5Sim(Simulator):
for
dev
in
self
.
nics
:
for
dev
in
self
.
nics
:
cmd
+=
(
cmd
+=
(
f
'--simbricks-pci=connect:
{
env
.
dev_pci_path
(
dev
)
}
'
f
'--simbricks-pci=connect:
{
env
.
dev_pci_path
(
dev
.
sim
)
}
'
f
':latency=
{
self
.
pci_latency
}
ns'
f
':latency=
{
self
.
pci_latency
}
ns'
f
':sync_interval=
{
self
.
sync_period
}
ns'
f
':sync_interval=
{
self
.
sync_period
}
ns'
)
)
...
...
experiments/simbricks/splitsim/specification.py
View file @
23b52514
...
@@ -95,7 +95,8 @@ class Host():
...
@@ -95,7 +95,8 @@ class Host():
def
config_str
(
self
)
->
str
:
def
config_str
(
self
)
->
str
:
if
self
.
sim
==
'gem5'
:
import
simbricks.splitsim.impl
as
impl
if
type
(
self
.
sim
)
is
impl
.
Gem5Sim
:
cp_es
=
[]
if
self
.
nockp
else
[
'm5 checkpoint'
]
cp_es
=
[]
if
self
.
nockp
else
[
'm5 checkpoint'
]
exit_es
=
[
'm5 exit'
]
exit_es
=
[
'm5 exit'
]
else
:
else
:
...
@@ -304,4 +305,4 @@ class Sleep(AppConfig):
...
@@ -304,4 +305,4 @@ class Sleep(AppConfig):
self
.
server_ip
=
server_ip
self
.
server_ip
=
server_ip
def
run_cmds
(
self
,
node
:
Host
)
->
tp
.
List
[
str
]:
def
run_cmds
(
self
,
node
:
Host
)
->
tp
.
List
[
str
]:
return
[
'sleep'
]
return
[
'sleep 10'
]
\ No newline at end of file
\ No newline at end of file
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