Hello, I am using SE mode in gem5 and trying to implement the concept of processing in memory. I have added a TimingSimpleCPU in the memory configuration and trying to make it takeover all the contents of the host processor to be operated in the memory instead of the host CPU. I found out that I must include takeOverFrom(), haltContext() and activateContext() in the host processor constructor code. So far I have the below constructed function for implementation (in Out-of-order CPU constructor file as a host CPU), but I am getting a segmentation fault.
template <class Impl> void FullO3CPU<Impl>::PIMProcess(ThreadContext *tc, int pim_id){ BaseCPU* pim_cpu =(BaseCPU*)SimObject::find("system.pim_cpu"); this->haltContext(tc->contextId()); pim_cpu->takeOverFrom(this); pim_cpu->host_id=this->_cpuId; pim_cpu->activateContext(0); } **** REAL SIMULATION **** info: Entering event queue @ 0. Starting simulation... info: Increasing stack size by one page. warn: ignoring syscall access(...) takeOverFrom-1 warn: ClockedObject: Already in the requested power state, request ignored gem5 has encountered a segmentation fault! --- BEGIN LIBC BACKTRACE --- build/X86/gem5.opt(_Z15print_backtracev+0x15)[0xfef065] build/X86/gem5.opt[0xffca7d] /lib64/libpthread.so.0(+0xf630)[0x7fd9459b6630] build/X86/gem5.opt(_ZN15TimingSimpleCPU16handleReadPacketEP6Packet+0x157)[0x11350a7] build/X86/gem5.opt(_ZN15TimingSimpleCPU17finishTranslationEP21WholeTranslationState+0x248)[0x11391a8] build/X86/gem5.opt(_ZN15DataTranslationIP15TimingSimpleCPUE6finishERKSt10shared_ptrI9FaultBaseERKS3_I7RequestEP13ThreadContextN7BaseTLB4ModeE+0x110)[0x11413a0] build/X86/gem5.opt(_ZN6X86ISA3TLB15translateTimingERKSt10shared_ptrI7RequestEP13ThreadContextPN7BaseTLB11TranslationENS8_4ModeE+0xaf)[0x9b3b7f] build/X86/gem5.opt(_ZN15TimingSimpleCPU15initiateMemReadEmj5FlagsImE+0x518)[0x1137098] build/X86/gem5.opt(_ZN17SimpleExecContext15initiateMemReadEmj5FlagsImE+0x11)[0x1141581] build/X86/gem5.opt(_ZNK10X86ISAInst7LdisBig11initiateAccEP11ExecContextPN5Trace10InstRecordE+0xc1)[0xd50631] build/X86/gem5.opt(_ZN15TimingSimpleCPU14completeIfetchEP6Packet+0x373)[0x1137cb3] build/X86/gem5.opt(_ZN10EventQueue10serviceOneEv+0x125)[0xff6425] build/X86/gem5.opt(_Z9doSimLoopP10EventQueue+0xf8)[0x10088e8] build/X86/gem5.opt(_Z8simulatem+0x966)[0x10094d6] build/X86/gem5.opt[0x940dba] build/X86/gem5.opt[0x920e55] /lib64/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x730a)[0x7fd9452b981a] /lib64/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x7ed)[0x7fd9452bb64d] /lib64/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x663c)[0x7fd9452b8b4c] /lib64/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x7ed)[0x7fd9452bb64d] /lib64/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x663c)[0x7fd9452b8b4c] /lib64/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x7ed)[0x7fd9452bb64d] /lib64/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x663c)[0x7fd9452b8b4c] /lib64/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x7ed)[0x7fd9452bb64d] /lib64/libpython2.7.so.1.0(PyEval_EvalCode+0x32)[0x7fd9452bb752] /lib64/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x5513)[0x7fd9452b7a23] /lib64/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x7ed)[0x7fd9452bb64d] /lib64/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x663c)[0x7fd9452b8b4c] /lib64/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x7ed)[0x7fd9452bb64d] /lib64/libpython2.7.so.1.0(PyEval_EvalCode+0x32)[0x7fd9452bb752] /lib64/libpython2.7.so.1.0(+0x100b8f)[0x7fd9452d4b8f] /lib64/libpython2.7.so.1.0(PyRun_StringFlags+0x65)[0x7fd9452d5a05] --- END LIBC BACKTRACE --- Anyone can help me with this please? Thank you, Hessa.
_______________________________________________ gem5-users mailing list -- gem5-users@gem5.org To unsubscribe send an email to gem5-users-le...@gem5.org %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s