"vscode:/vscode.git/clone" did not exist on "146dd8556c4f3b2ad21fad9312f4602cd049d6da"
Commit 23b52514 authored by Hejing Li's avatar Hejing Li Committed by Jonas Kaufmann
Browse files

specification.py: import impl

parent 4e584719
...@@ -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'
) )
......
...@@ -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
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