Hi Shuchang, Not all requests come from a CPU (and have a PC). Check with hasPC before you try to access it.
Good luck. Andreas From: 锟斤拷锟介畅 <shanshuch...@gmail.com<mailto:shanshuch...@gmail.com>> Reply-To: gem5 users mailing list <gem5-users@gem5.org<mailto:gem5-users@gem5.org>> Date: Monday, 8 April 2013 06:44 To: "gem5-users@gem5.org<mailto:gem5-users@gem5.org>" <gem5-users@gem5.org<mailto:gem5-users@gem5.org>> Subject: [gem5-users] How to get PC value in simple_dram.cc Hi all, I want to get the PC address for each request packet in simple_dram.cc. I tried the following code: uint64_t myPC_index = pkt->req->getPC() ; However, during the execution, an error occurs : gem5.opt: build/ALPHA/mem/request.hh:514: Addr Request::getPC() const: Assertion `privateFlags.isSet(VALID_PC)' failed The error information indicates that the PC address is not validly set in the request class. I just wonder whether it is feasible to include the PC address in the MEM request. If yes, could you any advice on how to achieve it will be greatly appreciated. Now I am using running gem5 in SE mode using classic memory model with SimpleDRAM enabled. Best Regards, Shuchang -- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
_______________________________________________ gem5-users mailing list gem5-users@gem5.org http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users