home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / arch / 10875 < prev    next >
Encoding:
Text File  |  1992-11-18  |  2.6 KB  |  50 lines

  1. Newsgroups: comp.arch
  2. Path: sparky!uunet!charon.amdahl.com!pacbell.com!sgiblab!darwin.sura.net!jvnc.net!princeton!moo!awolfe
  3. From: awolfe@moo.Princeton.EDU (Andrew Wolfe)
  4. Subject:  Question about SPARC FP traps
  5. Message-ID: <1992Nov18.181014.1667@Princeton.EDU>
  6. Originator: news@nimaster
  7. Keywords: SPARC FP
  8. Sender: awolfe@moo (Andrew Wolfe)
  9. Nntp-Posting-Host: moo.princeton.edu
  10. Organization: Princeton University
  11. Date: Wed, 18 Nov 1992 18:10:14 GMT
  12. Lines: 36
  13.  
  14.  
  15. My students and I are confused about the way that traps are handled in SPARC implementations with multi-cycle, unpipelined FP operations.
  16.  
  17.  
  18. Page 288 of Hennessy and Patterson reads:
  19.  
  20. ----------------
  21. A third technique in use is to allow the interrupts to become somewhat imprecise, but keep enough information so that trap-handling routines can create a precise sequence for the interrupt.  This means knowing what operations were in the pipeline and their PCs.  Then, after handling a trap, the software finishes any instructions that precede the latest instruction completed, and the sequence can restart.  Consider the following worst-case code sequence:
  22.  
  23.  
  24.   Instruction-1 --- A long running instruction that eventually interrupts
  25.                     execution
  26.  
  27.   Instruction-2,...,Instruction-(n-1) --- a series of instructions that are
  28.                                           not completed
  29.  
  30.   Instruction-n --- an instructionthat is finished.
  31.  
  32. Given the PCs of all of the instructions in the pipeline and the interrupt return PC, the software can find the state of instruction-1 and instruction-n.  Since instruction-n has completed, we will want to restart execution at instruction-(n+1).  After handling the interrupt, the software must simulate the execution of instruction-1 ... instruction-(n-1).  Then we can return from the interrupt and restart at instruction n+1.
  33. -------------------
  34.  
  35.  
  36. I can't find anything in the SPARC arch. ref. that says anything different.  Here is our problem.  If you only save the instructions and PCs of uncompleted operations, then how do you get the input operands to re-execute them.  For example if instruction-2 requires r7, but instruction-n (that has completed) overwrites r7 then how can I restart instruction 2?
  37.  
  38. It would seem that a history buffer of some type containing register values is still required.
  39.  
  40. Is there anyone who has a more intimate understanding of this problem that can correct our interpretation of the facts or confirm that saving the PC's and instructions is not enough?
  41.  
  42.  
  43.  
  44. -- 
  45. --------------------------------------
  46. Andrew Wolfe
  47. Assistant Professor
  48. Department of Electrical Engineering
  49. Princeton University
  50.