You still need to set a workload for cpu[1]. That's what it's complaining about: cpu[1] has no workload.

In order to have two threads or CPUs cooperate on the same program, they both need to have their workload parameter set to point to the *same* workload object (not two instances of the same class). Thus this has two CPUs cooperating on one copy of stest1:

stest1 = Benchmarks.stest1()
cpu[0].workload = stest1
cpu[1].workload = stest1

while this has each cpu working on its own single-threaded copy:

cpu[0].workload = Benchmarks.stest1()
cpu[1].workload = Benchmarks.stest1()

so you want something that combines them both:

stest1 = Benchmarks.stest1()
cpu[0].workload = stest1
cpu[1].workload = stest1
cpu[2].workload = Benchmarks.stest2()

Steve

Meng-Ju Wu wrote:
   Can you tell me the way to run two different programs in two
different cores?
Set the workload parameter of each cpu to the workload you want to run, e.g.:
cpu[0].workload = Benchmarks.AnagramLongCP()
cpu[1].workload = Benchmarks.GCCLongCP()

Is it possible to use the following assignment in M5_1.1 SE mode?

cpu[0].workload = Benchmarks.stest1()
cpu[2].workload = Benchmarks.stest2()

I try it, and it gives me the error message, " AttributeError: Can't
resolve proxy 'workload' from 'cpu1' ". I want to know if there has
any way to resolve this kind of assignment.

The reason is that we want to execute multi-threads programs on M5 SE
mode. The stest1() is a two threads program. We modify M5_1.1, so it
can execute two threads on CPU0 and CPU1. We want to execute the
single thread program stest2() on CPU3 at the same time.

thanks,
Meng-Ju
_______________________________________________
m5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/m5-users

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

Reply via email to