home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / arch / 8208 < prev    next >
Encoding:
Internet Message Format  |  1992-07-22  |  4.8 KB

  1. Path: sparky!uunet!sun-barr!ames!network.ucsd.edu!nic!davsmith
  2. From: davsmith@nic.cerf.net (David Smith)
  3. Newsgroups: comp.arch
  4. Subject: Re: CISC Microcode (was Re: RISC Mainframe)
  5. Message-ID: <2369@nic.cerf.net>
  6. Date: 22 Jul 92 22:49:41 GMT
  7. References: <BrM8Gv.E3r@zoo.toronto.edu> <ADAMS.92Jul21011202@PDV2.pdv2.fmr.maschinenbau.th-darmstadt.de> <Brsx7o.G69@zoo.toronto.edu>
  8. Organization: CERFnet
  9. Lines: 86
  10.  
  11. In article <Brsx7o.G69@zoo.toronto.edu> henry@zoo.toronto.edu (Henry Spencer) writes:
  12. >In article <ADAMS.92Jul21011202@PDV2.pdv2.fmr.maschinenbau.th-darmstadt.de> adams@pdv2.fmr.maschinenbau.th-darmstadt.de (Adams) writes:
  13. >
  14. >Uh, where do you find idle states?  If the CPU is that much faster than
  15. >the memory, it wants all the memory bandwidth it can get, and the memory
  16. >designers sweat and strain to give it more.  You get idle states only
  17. >when the CPU is *slow*, so it can't use the full memory bandwidth.
  18. >
  19. >Dedicated DMA engines make sense if
  20. >
  21. >    1. the CPU can't move data around at full memory speed
  22. >    2. normal execution doesn't use the full memory bandwidth
  23. >    3. interrupt overhead is too high for timely device handling
  24. >    4. bad hardware design cripples CPU data movement
  25.  
  26. 1 and 2 are both true today.  You can design a memory system that can
  27. provide data faster than any processor available today can consume it.
  28. This can be done by appropriate interleaving.  It *is* difficult to
  29. build a memory system that will provide data at the bandwidth the
  30. processor would like in the data access pattern the processor would
  31. like (random, with little prediction).  That's why we put caches
  32. between the processor and the memory system.
  33.  
  34. >It should be easy to see that as the CPU gets faster, it *can* move data
  35. >around at full speed, and it wants all the bandwidth it can find (adding
  36. >caches helps some, but doesn't solve the problem).  
  37.  
  38. This is true *only* if the memory system's latency per fetch is low
  39. enough.  The problem is that the CPU's method of interacting with the
  40. memory system is not the method which gives you the best results with
  41. an interleaved memory system.
  42.  
  43. Interleaved memory systems can give you any bandwidth you would like.
  44. The cost is that in order to achieve the bandwidth you must issue
  45. memory fetches or stores asynchronosly.
  46.  
  47. Interleaved memory systems work by pipelining memory accesses.  A
  48. simple example (though moderately useless) would be a two way
  49. interleaved system.  This would have two banks of memory each of which
  50. has independent address decoding hardware.  Bank 0 contains memory
  51. addresses whose least significant bit is 0 (i.e. 0,2,4,etc.) while Bank
  52. 1 contains those whose LSB is 1.  Latency to decode and retrieve the
  53. memory at an address is, we shall say, 2 cycles.  OK, so we issue a
  54. fetch request for address 0.  Bank 0 gets this request and returns our
  55. data 2 cycles later.  If we issue a request for address 1 (or 3, 5,
  56. etc.) the next cycle after issuing the fetch for 0 then on the next
  57. cycle after the word at location 0 is returned to us the word at
  58. location 1 is returned to us.  If we can keep the address pipeline full
  59. we can receive data at the rate of 1 word per cycle, the maximum
  60. bandwidth.
  61.  
  62. An interleave factor of 2 is almost pointless since a memory bank's
  63. latency is rarely only 2 cycles.  Typically to get best performance you
  64. will have an interleave factor of 8 or more.  However, in order to get
  65. full bandwidth out of an 8-way interleaved memory we have to be capable
  66. of issuing addresses 8 words ahead of where we are.
  67.  
  68. All CPUs I have seen to date (not every CPU by any means - if you know
  69. of counter examples, please post) cannot do asynchronous address
  70. generation.  When they request a word of memory they want it *NOW* or
  71. within a cycle or two and will block until it arrives.  This makes it
  72. impossible to get full bandwidth out of an interleaved memory system if
  73. the cache is removed.
  74.  
  75. Caches on interleaved memory systems can do pre-fetching, however there
  76. is a trade-off that must be made between pre-fetching too little and
  77. too much.  Caches tend to fetch in blocks so the start-up latency is
  78. spread across a number of words, but the size of the block must be
  79. large to make the latency cost trivial.  There are a number of problems
  80. with fetching large blocks.  Thus, it is difficult to get full bandwidth
  81. out of an interleaved memory system while going through the cache.
  82.  
  83. In short, it is possible to build a memory system that will provide
  84. data as quickly as any CPU could *theoretically* (with a 0 latency
  85. memory system) move it, however current CPU implementations do not
  86. allow for exploiting that architecture.
  87.  
  88. There are several ways to exploit the architecture, dedicated DMA engines
  89. are one of them (because the DMA engine knows what the next N fetches are
  90. going to be, so it can tell the memory system).  Another, more RISCy
  91. approach would be to provide pre-fetch instructions which could be
  92. used.
  93.  
  94. =====
  95. David L. Smith
  96. smithd@discos.com or davsmith@nic.cerf.net
  97.