I've added these lines to the beginning of Mybench.py:
#Mybench.py
import m5
from m5.objects import LiveProcess
and now I've tried a few different things with cmp.py but I'm still running
into problems.
When I had this at the beginning of cmp.py:
#cmp.py
mport m5
from m5.objects import *
import os, optparse, sys
from m5.util import addToPath
addToPath('../common')
import Simulation
from Caches import *
import Mybench
I got the error:
command line: build/ARM_SE/gem5.opt configs/example/cmp.py
Traceback (most recent call last):
File "<string>", line 1, in <module>
File
"/ufs/cluster/amber/Gem5_Stuff/gem5-stable-b9ba22cb23f2/src/python/m5/main.py",
line 356, in main
exec filecode in scope
File "configs/example/cmp.py", line 11, in <module>
import Mybench
File "configs/example/Mybench.py", line 6, in <module>
perlbench.executable = binary_dir+'400.perlbench_base.alpha-gcc'
NameError: name 'binary_dir' is not defined
I realized that the line was originally m5.addToPath('./configs'), so
changing addToPath('../common') to m5.addToPath('../common'), I get this
error:
gem5 compiled Apr 10 2012 12:46:06
gem5 started Apr 11 2012 17:53:47
gem5 executing on cluster.csl.cornell.edu
command line: build/ARM_SE/gem5.opt configs/example/cmp.py
Traceback (most recent call last):
File "<string>", line 1, in <module>
File
"/ufs/cluster/amber/Gem5_Stuff/gem5-stable-b9ba22cb23f2/src/python/m5/main.py",
line 356, in main
exec filecode in scope
File "configs/example/cmp.py", line 8, in <module>
m5.addToPath('../common')
AttributeError: 'module' object has no attribute 'addToPath'
Which seems similar to the original error.
Any other things I could try?
Thanks,
Amber
On Wed, Apr 11, 2012 at 11:02 AM, Ali Saidi <[email protected]> wrote:
> **
>
> You probably also need an import m5 line at the top as well.
>
> Ali
>
>
>
> On 11.04.2012 07:45, Mahmood Naderan wrote:
>
> the script in the website is old. You have to do
> addToPath('../common')
>
>
>
> _______________________________________________
> gem5-users mailing list
> [email protected]
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>
_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users