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
23629578
Commit
23629578
authored
Sep 05, 2024
by
Hejing Li
Browse files
example script checkpoint: constructing simulation error clear
parent
fe223e29
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
22 deletions
+17
-22
experiments/pyexps/netperf_sysconf.py
experiments/pyexps/netperf_sysconf.py
+17
-22
No files found.
experiments/pyexps/netperf_sysconf.py
View file @
23629578
...
...
@@ -12,7 +12,7 @@ This scripts generates the experiments with all the combinations of different ex
# host_types = ['qemu', 'gem5', 'qt']
host_types
=
[
'gem5'
]
nic_types
=
[
'
bm
'
]
nic_types
=
[
'
i40e'
,
'vr
'
]
net_types
=
[
'switch'
]
experiments
=
[]
...
...
@@ -49,68 +49,63 @@ ethchannel1 = system.EthChannel(switch.eth_ifs[1], nic1.eth_if)
host0
.
add_app
(
system
.
NetperfClient
(
host0
,
nic1
.
ip
))
host1
.
add_app
(
system
.
NetperfServer
(
host1
))
'''
"""
Execution Config
"""
for
host_type
in
host_types
:
for
nic_type
in
nic_types
:
for
net_type
in
net_types
:
e =
exp.Experiment
(
e
=
sim
.
Simulation
(
'n-'
+
host_type
+
'-'
+
nic_type
+
'-'
+
net_type
)
allobj = runobj.AllObj()
# Host
if
host_type
==
'gem5'
:
host_sim = im
pl
.Gem5Sim
host_sim
=
s
im
.
Gem5Sim
elif
host_type
==
'qemu'
:
def
qemu_sim
(
e
):
h = im
pl
.QemuSim(e)
h
=
s
im
.
QemuSim
(
e
)
h
.
sync
=
False
return
h
host_sim
=
qemu_sim
elif
host_type
==
'qt'
:
host_sim = im
pl
.QemuSim
host_sim
=
s
im
.
QemuSim
else
:
raise
NameError
(
host_type
)
# NIC
if nic_type == '
bm
':
nic_sim = im
pl.CorundumBMNIC
Sim
if
nic_type
==
'
i40e
'
:
nic_sim
=
s
im
.
I40eNic
Sim
elif
nic_type
==
'vr'
:
nic_sim = im
pl
.CorundumVerilatorNICSim
nic_sim
=
s
im
.
CorundumVerilatorNICSim
else
:
raise
NameError
(
nic_type
)
# Net
if
net_type
==
'switch'
:
net_sim = im
pl
.Switch
BMSim
net_sim
=
s
im
.
Switch
Net
else
:
raise
NameError
(
net_type
)
host_inst0 = host_sim(e, allobj)
host_inst0
=
host_sim
(
e
)
host_inst0
.
add
(
host0
)
host_inst1 = host_sim(e
, allobj
)
host_inst1
=
host_sim
(
e
)
host_inst1
.
add
(
host1
)
nic_inst0 = nic_sim(e
, allobj
)
nic_inst0
=
nic_sim
(
e
)
nic_inst0
.
add
(
nic0
)
nic_inst1 = nic_sim(e
, allobj
)
nic_inst1
=
nic_sim
(
e
)
nic_inst1
.
add
(
nic1
)
net_inst = net_sim(e
, allobj
)
net_inst
=
net_sim
(
e
)
net_inst
.
add
(
switch
)
print
(
e
.
name
+
" all simulators:"
)
sims
=
e
.
all_simulators
()
for s
im
in sims:
print(s
im
)
for
s
in
sims
:
print
(
s
)
experiments
.
append
(
e
)
'''
\ 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