Hi, all,

I write a script with more than 2 level cache and some other special caches 
implemented by ourselves. And now we are trying to test our model with 
benchmarks. I want to add the –fast forward option to my scripts. I checked the 
Simulation.py, se.py and switcheroo.py about how they implemented this part. My 
code logic is as follows:

system.cpu = AtomicSimpleCPU(cpu_id=0)
switch_cpu = DerivO3CPU(switched_out = True, cpu_id=0)

//adding our cache configs

process = Process()
process.cmd = ['/home/syuan3/gem5/tests/test-progs/hello/bin/x86/linux/hello']
system.cpu.workload = process
system.cpu.max_insts_any_thread = 2000
system.cpu.createThreads()

switch_cpu.system = system
switch_cpu.workload = process
switch_cpu.clk_domain = system.cpu.clk_domain
switch_cpu.progress_interval = system.cpu.progress_interval
switch_cpu.isa = system.cpu.isa
switch_cpu.max_insts_any_thread = 4000
switch_cpu_list =[(system.cpu, switch_cpu)]
system.switch_cpu = switch_cpu

root = Root(full_system = False, system = system)
m5.instantiate()

print("Beginning Simulation!")

exit_event = m5.simulate()

m5.switchCpus(system,switch_cpu_list)
m5.stats.reset()
exit_event = m5.simulate()


But I got a warn like this: warn: add_child('system'): child 'system' already 
has parent

The reason seems to be the code “switch_cpu.system = system”, so I comment this 
line.

But I got another assert failed: gem5.opt: build/X86/cpu/base.cc:634: virtual 
void BaseCPU::takeOverFrom(BaseCPU*): Assertion `old_itb_port->isConnected()' 
failed.

Does anyone has insight about this part or know how to implement 
fast-forwarding in our own script?

Best regards.

Yuan

Sent from Mail for Windows 10

_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to