Hi Evan,

It looks like the TrafficGen object was not built into your gem5 binary.
Make sure you have protobuf installed, as it is required for the traffic
generator (see src/cpu/testers/traffic_gen/SConscript).

When you run scons, you should see a line that looks like
Checking for GOOGLE_PROTOBUF_VERIFY_VERSION in C++ library protobuf...
(cached) yes

Cheers,
Jason

On Mon, Nov 21, 2016 at 3:35 PM Evan Chavis <[email protected]> wrote:

> Hello,
>
> I've been trying to get the example code in the gem5/util/tlm example
> working and I've run into some problems.
>
> I've followed the instructions in the gem5/util/tlm README (replacing ARM
> with X86) and added systemc's lib-linux64 directory to the LD_LIBRARY_PATH.
> After running make, I can run ./gem5.opt.sc or ../../build/X86/gem5.opt
> with no arguments and get the usage instructions. However, if I try to run
> the ../../build/X86/gem5.opt ./tlm.py given in the README, I get the
> following error:
>
> gem5 Simulator System.  http://gem5.org
> gem5 is copyrighted software; use the --copyright option for details.
>
> gem5 compiled Nov 21 2016 12:16:32
> gem5 started Nov 21 2016 16:16:54
> gem5 executing on penguin, pid 19995
> command line: ../../build/X86/gem5.opt ./tlm.py
>
> Traceback (most recent call last):
>   File "<string>", line 1, in <module>
>   File "/home/echavis/gem5/src/python/m5/main.py", line 400, in main
>     exec filecode in scope
>   File "./tlm.py", line 63, in <module>
>     system.cpu = TrafficGen(config_file = "tgen.cfg")
> NameError: name 'TrafficGen' is not defined
>
> I tried adding a sys.path.append('path/gem5/gem5/src/python/') to the
> tlm.py file but that did not resolve the problem. I also grepped for where
> the TrafficGen class was defined and tried including that in the sys.path
> and importing TrafficGen directly, but that took me down a rabbit whole of
> not having the necessary imports for that file, and the next file deeper...
>
> Do any of you have any ideas about what I could have messed up in
> configuring/building this gem5/tlm example? Is there a recommended
> PYTHONPATH that will resolve these problems?
>
> Thanks for any help or ideas, I really appreciate it!
>
> Evan
>
>
>
> _______________________________________________
> 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

Reply via email to