Hello,

I want to run the following. I am having 2 different cores, with separate L1 
caches and I want them to run the same benchmark. So what I want to do for 
example is : if my benchmark has 2 intervals, to run the first interval on the 
one core and the second one in the other. While one core is running I want the 
other one to do nothing.

If I run all the intervals on the same core, my simulation completes 
successfully. So now I want to do the following:

Try to perform that switch. I have set swiched_out for core B (the one 
initially doing nothing) to True.

So, I did this:

m5.switchCpus([(system.CpuA,system.CpuB)])

and I am getting this error:

  File "/src/python/m5/simulate.py", line 272, in switchCpus
    "New CPU (%s) is already active." % (new_core,)
RuntimeError: New CPU (system.CpuB) is already active.

Why is it active? I have set system.cpuB.switced_out to True for that reason 
(to be inactive).

Here is the switchCpus from the simulate.py (where the exception is being 
raised).

def switchCpus(cpuList):
    if not isinstance(cpuList, list):
        raise RuntimeError, "Must pass a list to this function"
    for item in cpuList:
        if not isinstance(item, tuple) or len(item) != 2:
            raise RuntimeError, "List must have tuples of (oldCPU,newCPU)"

    old_cpu_set = set([old_cpu for old_cpu, new_cpu in cpuList])
    for old_cpu, new_cpu in cpuList:
        if not isinstance(old_cpu, objects.BaseCPU):
            raise TypeError, "%s is not of type BaseCPU" % old_cpu
        if not isinstance(new_cpu, objects.BaseCPU):
            raise TypeError, "%s is not of type BaseCPU" % new_cpu
        if new_cpu in old_cpu_set:
            raise RuntimeError, \
                "New CPU (%s) is in the list of old CPUs." % (old_cpu,)
        if not new_cpu.switchedOut():
            raise RuntimeError, \
                "New CPU (%s) is already active." % (new_cpu,)
        if old_cpu.switchedOut():
            raise RuntimeError, \
                "Old CPU (%s) is inactive." % (new_cpu,)

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

Reply via email to