Oops, perhaps posted a bit too quickly... It seems my detailed cpu model wasn't properly connected to the system, and this was just a very poor error message.
On Sun, Mar 3, 2013 at 2:42 PM, Mitch Hayenga <[email protected]>wrote: > Hi all, > > I'm trying to automate switching between an atomic cpu and my own cpu. > This is done via my own python configuration script. With the default > config script (configs/common/se.py), switching works properly. With my > own script, which makes the same calls, it fails because it doesn't find a > class attribute that actually exists. > > Example of the default config script working: > > command line: ./build/ARM/gem5.opt configs/example/se.py > --repeat-switch=100000 --cpu-type=crib --caches > --cmd=../tests/libquantum_base.armv7a-O3-vfpv3d16-vect -o 15 2 > Global frequency set at 1000000000000 ticks per second > 0: system.remote_gdb.listener: listening for remote gdb #0 on port 7000 > **** REAL SIMULATION **** > starting switch loop > info: Entering event queue @ 0. Starting simulation... > switching cpus > CribCPU > info: Entering event queue @ 100000. Starting simulation... > hack: be nice to actually delete the event here > info: Entering event queue @ 111000. Starting simulation... > info: Entering event queue @ 138000. Starting simulation... > warn: User mode does not have SPSR > warn: User mode does not have SPSR > info: Entering event queue @ 147000. Starting simulation... > switching cpus > CribCPU > info: Entering event queue @ 247000. Starting simulation... > info: Entering event queue @ 292000. Starting simulation... > warn: User mode does not have SPSR > warn: User mode does not have SPSR > info: Entering event queue @ 301000. Starting simulation... > > > In the above, I added a print statement to show the CPU being switched to > (why CribCPU is printed out). When I call m5.switchCpus() from my own > script though, I run into trouble.... > > My script run: > > command line: ./build/ARM/gem5.opt configs/pharm/se.py > --cfg=configs/pharm/crib.cfg > --cmd=../tests/libquantum_base.armv7a-O3-vfpv3d16-vect -o 15 2 > --simpoint-mode=fastfwd --simpoint-points=462.libquantum.test.simpoints > Global frequency set at 1000000000000 ticks per second > 0: system.remote_gdb.listener: listening for remote gdb #0 on port 7000 > info: Entering event queue @ 0. Starting simulation... > N = 15, 22 qubits required > Random seed: 2 > hack: be nice to actually delete the event here > switching cpus > CribCPU > Traceback (most recent call last): > File "<string>", line 1, in <module> > File "/home/hayenga/Documents/sim/gem5/src/python/m5/main.py", line 387, > in main > exec filecode in scope > File "configs/pharm/se.py", line 182, in <module> > m5.switchCpus(system, switch_cpu_list) > File "/home/hayenga/Documents/sim/gem5/src/python/m5/simulate.py", line > 261, in switchCpus > if not new_cpu.switchedOut(): > File "/home/hayenga/Documents/sim/gem5/src/python/m5/SimObject.py", line > 725, in __getattr__ > % (self.__class__.__name__, attr) > AttributeError: object 'CribCPU' has no attribute 'switchedOut' > > For some reason the same function call that the default script uses fails. > It is claiming that CribCPU does not have the switchedOut() function, but > CribCPU inherits from BaseCPU and supports switching (as shown in the > earlier example). In the default script, somehow it finds this attribute > of the CribCPU class. I have a feeling something with the python > script/object parsing is at hand here, but I don't quite know where to look > to sort this out. > > Any ideas? > > Thanks. >
_______________________________________________ gem5-users mailing list [email protected] http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
