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
4aeb3c90
"vscode:/vscode.git/clone" did not exist on "7b55d334d592037b1bb9b3389ce26828a3073407"
Commit
4aeb3c90
authored
Nov 05, 2020
by
Antoine Kaufmann
Browse files
experiments: automatically set gem5 type in node config
parent
472f608c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
3 deletions
+13
-3
experiments/modes/simulators.py
experiments/modes/simulators.py
+13
-3
No files found.
experiments/modes/simulators.py
View file @
4aeb3c90
...
@@ -29,6 +29,9 @@ class HostSim(Simulator):
...
@@ -29,6 +29,9 @@ class HostSim(Simulator):
nic
.
name
=
self
.
name
+
'.'
+
nic
.
name
nic
.
name
=
self
.
name
+
'.'
+
nic
.
name
self
.
nics
.
append
(
nic
)
self
.
nics
.
append
(
nic
)
def
set_config
(
self
,
nc
):
self
.
node_config
=
nc
class
NICSim
(
Simulator
):
class
NICSim
(
Simulator
):
network
=
None
network
=
None
name
=
''
name
=
''
...
@@ -92,6 +95,10 @@ class Gem5Host(HostSim):
...
@@ -92,6 +95,10 @@ class Gem5Host(HostSim):
cpu_type_cp
=
'X86KvmCPU'
cpu_type_cp
=
'X86KvmCPU'
cpu_type
=
'TimingSimpleCPU'
cpu_type
=
'TimingSimpleCPU'
def
set_config
(
self
,
nc
):
nc
.
sim
=
'gem5'
super
().
set_config
(
nc
)
def
resreq_cores
(
self
):
def
resreq_cores
(
self
):
return
1
return
1
...
@@ -175,9 +182,12 @@ def create_basic_hosts(e, num, name_prefix, net, nic_class, host_class,
...
@@ -175,9 +182,12 @@ def create_basic_hosts(e, num, name_prefix, net, nic_class, host_class,
host
=
host_class
()
host
=
host_class
()
host
.
name
=
'%s.%d'
%
(
name_prefix
,
i
)
host
.
name
=
'%s.%d'
%
(
name_prefix
,
i
)
host
.
node_config
=
nc_class
()
host
.
node_config
.
ip
=
'10.0.0.%d'
%
(
ip_start
+
i
)
node_config
=
nc_class
()
host
.
node_config
.
app
=
app_class
()
node_config
.
ip
=
'10.0.0.%d'
%
(
ip_start
+
i
)
node_config
.
app
=
app_class
()
host
.
set_config
(
node_config
)
host
.
add_nic
(
nic
)
host
.
add_nic
(
nic
)
e
.
add_nic
(
nic
)
e
.
add_nic
(
nic
)
e
.
add_host
(
host
)
e
.
add_host
(
host
)
...
...
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