You have an example in gem5/src/mem/cache/BaseCache.py You should also understand first how gem5 creates and instantiates objects internally. It will help you to develop your classes.
----- Mensaje original ----- De: "Kumail Ahmed" <[email protected]> Para: "gem5 users mailing list" <[email protected]> Enviados: Martes, 14 de Abril 2015 16:32:57 Asunto: Re: [gem5-users] Adding New Class to GEM5/src Hi, Thanks for your reply. Can you tell me an example of Python instantiations inside GEM5? On 14 Apr 2015 10:10 am, "Marcos Horro Varela" < [email protected] > wrote: You should create your own class in C++ and instantiate it in Python. You also have to add SimObject('YourInstance.py') and Source('class.cpp') to your SConscript De: "Kumail Ahmed" < [email protected] > Para: "gem5 users mailing list" < [email protected] > Enviados: Martes, 14 de Abril 2015 3:34:10 Asunto: [gem5-users] Adding New Class to GEM5/src Hello everyone, how can I add a new class to GEM5 and compile through SCONS? Currently, it gives an error, and doesn't allow to me add my own class. -- Best Regards, Kumail Ahmed M.Sc. Student TU Kaiserslautern _______________________________________________ gem5-users mailing list [email protected] http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users -- Marcos Horro Varela Representante de alumnos Dpto. Electrónica y Sistemas Universidade da Coruña +34 618 626 737 _______________________________________________ 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 -- Marcos Horro Varela Representante de alumnos Dpto. Electrónica y Sistemas Universidade da Coruña +34 618 626 737
_______________________________________________ gem5-users mailing list [email protected] http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
