Dear Song, Trap instructions are those instructions that are executed to serve software or hardware interrupts. Like many processor architectures, in the SPARC architecture, there is a predetermined region of address space dedicated to store interrupt service routines of various types of software and hardware interrupts. In the SPARC architecture, this region starts at 0x1000000. The SPARC architecture supports 1024 types of trap (in two levels ) and 32 bytes are reserved for each trap in the region. Therefore, the region ends at 0x1000000 + 2 * 512 * 32 = 0x1008000. For more information you should refer to "The SPARC Architecture Manual" version 9, section 7.5, page 124.
Regards, Pejman P.S. Apparently, the constant in the code is not correct and should be changed to 0x1008000. ________________________________________ From: Mahmood Naderan [[email protected]] Sent: Saturday, April 23, 2011 9:53 AM To: Song Liu Cc: simflex Subject: Re: Meaning of execute-Commits:Trap >I understand the difference between system and user. But what does >Trap stand for? Hi, Basically trap instructions are specific system calls for file hadling such as "open", "close", "write", ... However I don't know exactly if 0x1000000 < address < 0x1400000 reflect that. Hope that helps. // Naderan *Mahmood; ----- Original Message ----- From: Song Liu <[email protected]> To: [email protected] Cc: Sent: Thursday, April 21, 2011 10:26 PM Subject: Meaning of execute-Commits:Trap Hi all, I have got a question about the output stats of a CMP inorder SPARC simulation. The number of Committed instructions are broken down in System, User, and Trap, as shown below. Nodes-execute-Commits 24647598 Nodes-execute-Commits:System 3046 Nodes-execute-Commits:Trap 19140774 Nodes-execute-Commits:User 5503778 I understand the difference between system and user. But what does Trap stand for? According to the code, the flag for trap is turned on when if ((insn_state->instruction().virtualInstructionAddress() >= 0x1000000) && (insn_state->instruction().virtualInstructionAddress() < 0x1400000)) { trap = true; system = false; } Could anyone please give some hint about this? Thanks in advance, Song
