Commit 4a14b793 authored by Hejing Li's avatar Hejing Li
Browse files

new example script checkpoint

parent 05109d2e
import simbricks.orchestration.experiments as exp
import simbricks.splitsim.specification as spec import simbricks.orchestration.system as system
import simbricks.splitsim.impl as impl import simbricks.orchestration.simulation as sim
import simbricks.splitsim.runobj as runobj import simbricks.orchestration.instantiation as inst
""" """
Netperf Example: Netperf Example:
One Client: Host_0, One Server: Host1 connected through a switch One Client: Host_0, One Server: Host1 connected through a switch
...@@ -11,28 +11,30 @@ This scripts generates the experiments with all the combinations of different ex ...@@ -11,28 +11,30 @@ This scripts generates the experiments with all the combinations of different ex
""" """
# host_types = ['qemu', 'gem5', 'qt'] # host_types = ['qemu', 'gem5', 'qt']
host_types = ['qemu'] host_types = ['gem5']
nic_types = ['bm', 'vr'] nic_types = ['bm']
net_types = ['switch'] net_types = ['switch']
experiments = [] experiments = []
system = spec.System() sys = system.System()
# create a host instance and a NIC instance then install the NIC on the host # create a host instance and a NIC instance then install the NIC on the host
host0 = spec.LinuxHost(system) host0 = system.I40ELinuxHost(sys)
nic0 = spec.CorundumNIC(system) pcie0 = system.PCIeHostInterface(host0)
host0.nic_driver = ['/tmp/guest/mqnic.ko'] host0.add_if(pcie0)
host0.ip = '10.0.0.1' nic0 = system.IntelI40eNIC(sys)
pcichannel0 = spec.PCI(system) nic0.add_ipv4('10.0.0.1')
pcichannel0.install(host0, nic0) pcichannel0 = system.PCIeChannel(pcie0, nic0.pci_if)
host1 = spec.LinuxHost(system)
nic1 = spec.CorundumNIC(system)
host1.nic_driver = ['/tmp/guest/mqnic.ko']
host1.ip = '10.0.0.2'
pcichannel1 = spec.PCI(system)
pcichannel1.install(host1, nic1)
# create a host instance and a NIC instance then install the NIC on the host
host1 = system.I40ELinuxHost(sys)
pcie1 = system.PCIeHostInterface(host1)
host1.add_if(pcie0)
nic1 = system.IntelI40eNIC(sys)
nic1.add_ipv4('10.0.0.2')
pcichannel1 = system.PCIeChannel(pcie1, nic1.pci_if)
'''
port0 = spec.NetDev() port0 = spec.NetDev()
port1 = spec.NetDev() port1 = spec.NetDev()
switch = spec.Switch(system) switch = spec.Switch(system)
...@@ -110,4 +112,5 @@ for host_type in host_types: ...@@ -110,4 +112,5 @@ for host_type in host_types:
for sim in sims: for sim in sims:
print(sim) print(sim)
experiments.append(e) experiments.append(e)
\ No newline at end of file '''
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment