home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / amiga / programm / 17584 < prev    next >
Encoding:
Internet Message Format  |  1992-12-21  |  3.4 KB

  1. Xref: sparky comp.sys.amiga.programmer:17584 comp.sys.amiga.hardware:21836
  2. Path: sparky!uunet!cbmvax!daveh
  3. From: daveh@cbmvax.commodore.com (Dave Haynie)
  4. Newsgroups: comp.sys.amiga.programmer,comp.sys.amiga.hardware
  5. Subject: Re: CISC and RISC
  6. Message-ID: <38001@cbmvax.commodore.com>
  7. Date: 17 Dec 92 20:44:43 GMT
  8. References: <amipb.04wr@amipb.gna.org> <37844@cbmvax.commodore.com> <Bz8FD1.Dxt@ns1.nodak.edu> <BzByvD.FA9@news.cs.andrews.edu> <1gnl0mINNpq2@crcnis1.unl.edu>
  9. Reply-To: daveh@cbmvax.commodore.com (Dave Haynie)
  10. Distribution: world
  11. Organization: Commodore, West Chester, PA
  12. Lines: 49
  13.  
  14. In article <1gnl0mINNpq2@crcnis1.unl.edu> tbills@cse.unl.edu (Trent Bills) writes:
  15. >|> Another Advantage of RISC is the abundance of Register memory.  
  16.  
  17. >Since most microprocessor computers have either on chip or external caches,
  18. >register access really isn't much if any faster than memory access.  
  19.  
  20. Sure it is.  It wasn't until recently that on-chip caches hit as fast as 
  21. register accesses -- this is true for the 68040 and some RISCs, but hits to
  22. the on-chip caches on 68030 and 80486 take twice as long as register access.
  23. External access, even to cache, will take longer.  Even if there's a very fast
  24. external bus interface, you're still having to occupy the bus interface with a
  25. data cycle if you can't use a register.  When you can use a register, the 
  26. external bus interface may be free for I or other D fetch.
  27.  
  28. But it's actually even worse than that.  Registers are often multiported, 
  29. sometimes four-way or more.  Multiple execution units can have simultaneous
  30. read access to a register, effectively cutting it's access time by the 
  31. degree of multiporting.  The next generation of on-chip caches are moving 
  32. toward interleaving or 2-way porting, but they're still much less efficient
  33. than registers by several times.
  34.  
  35. >It is important to note that RISC processors that have > 32 registers do
  36. >not have the use of all of these registers simultaneously.  The processor
  37. >only has access to a few (24-32) at a time.  A compiler can then place
  38. >parameters for function calls in the last few registers.  When the
  39. >function call is executed, the CPW (current window pointer) is changed
  40. >so that the registers that were previously the last few are now the first
  41. >few.  This parameter passing technique avoids using the stack (slow memory)
  42. >and thereby drastically reduces the cost (time) of a function call.
  43.  
  44. This is the approach taken by the SPARC processors.  You can have a function
  45. call advantage, but it can mean that context switches are really expensive.
  46. An interesting alternative approach is used by the AT&T CRISP architecture.
  47. Rather than avoid using the stack, they count on using the stack and put in
  48. what's essentially a stack cache.  Operations run stack-relative, but cached
  49. stack entries behave like registers (since stack cache hits take place in 
  50. their own cache, not the D cache, there are no inherent conflicts with other
  51. data fetches that may go on, just like traditional register access).  The
  52. advantage of this is that, like any other cache, only the dirty values need
  53. to be written out on a context switch (or none if you're running with a 
  54. write-through cache).
  55.  
  56.  
  57. -- 
  58. Dave Haynie / Commodore Technology, High-End Amiga Systems Design (cool stuff)
  59.  "The Crew That Never Rests"  {uunet|pyramid|rutgers}!cbmvax!daveh   BIX: hazy
  60.         SCIENCE:    "I'll believe it when I see it"  
  61.         RELIGION:    "I'll see it when I believe it"
  62.  
  63.