home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / hensa / documentation / documents / a252scsi < prev    next >
Encoding:
Text File  |  1999-04-27  |  6.3 KB  |  122 lines

  1. Message: #320858 (Read 21 times, has 0 replies, 5277 bytes)
  2. Date   : Thu Sep 16 10:08:58 1993
  3. From   : Hugo Fiennes
  4. To     : Steve Smith
  5. Subject: SCSI card
  6.  
  7. Acorn SCSI (mk3) has both internal and external connectors. The external is
  8. the SCSI standard 50w centronics (mac-style is 25 way d-type, as used by
  9. lingenuity and cumana).
  10.  
  11. Cache on drives is *not* the same as 'cache' (I put it in quotes, because this
  12. isn't the cache that PC scsi cards talk of) on cards. The purpose of cache on
  13. drives is to hold recently read information (or information that the drive
  14. 'thinks' is likely to be wanted next, eg the next few sectors of disk) and
  15. supply it to the computer without having to use the disk, hence it's much
  16. quicker.
  17.  
  18. The cache on cards is to get over the limitation that acorn machines still
  19. don't have DMA (direct memory access - this would allow scsi cards to write
  20. data into the machines memory with no intervention on the CPU's part -
  21. currently the ARM has to fetch data from the card (into its registers) and
  22. write it to memory, hence using much cpu time). A card with no cache has to
  23. enter a tight loop, in which it checks to see if data is available from the
  24. SCSI bus, and if so read it and store it. The problem is that data can become
  25. available just after the machine has checked, hence the limitation on
  26. max transfer speed. With an 8-bit uncached interface, the max rate is around
  27. 650kb'sec on ARM2 without disabling interrupts (as the techonomatic card used
  28. to do).
  29.  
  30. SCSI data is only 8-bit (ok, there are 16- and 32- bit drives, but these are
  31. generally only on drives >=0.5Gb and there are no wide- scsi interfaces for
  32. the acorn yet) so what are 16-bit cards? A 16-bit card is a card in which the
  33. hardware will collect 2 bytes at a time, then present the whole 16-bits (the
  34. width of the databus on podules) at a time to the ARM. A basic 16-bit
  35. interface like this will get around 1.2Mb/sec.
  36.  
  37. The oak scsi plays some other tricks to get max around 2.2Mb/sec: it is a 16-
  38. bit interface (using their own hardware and an 8-bit scsi controller to
  39. 'double-up' the data). What it does is: every 128 bytes it uses a polling loop
  40. (see above) to check data is present and the drive has reported no errors, etc.
  41.  Inside each 128 byte block it just reads data as fast as it can: on a normal
  42. card this would result in disaster if the drive wasn't fast
  43. enough to feed the machine: on the oak card however, the hardware will not
  44. assert IOGT (IO grant), so hanging the machine in a wait state until data is
  45. ready. This can have problems: if the drive is to slow (unlikely) the machine
  46. will completely stiff as the ARM3 can't be kept in such a state for more than
  47. 10(?) us.
  48.  
  49. Morley uncached/Vertical twist 16-bit/ARXE 16-bit cards all use the NCR53c94
  50. (or Emulex/AMD equivalent). This is a true 16-bit controller chip, which does
  51. the doubling up internally, and also provides a 16-byte FIFO. This fifo
  52. enables the polling loop to check to see if the FIFO is half-full (8 bytes,
  53. 4x16-bit words) and then use a LDM (load multiple) to read 8 bytes of
  54. information (in 4 registers), combine it, and store it in memory.
  55.  
  56. The morley cached card adds 2kb of FIFO, allowing it to read 2kb for every
  57. polling operation (max of 4.5Mb/sec!!!).
  58.  
  59. The acorn card has 64kb of static RAM, a DMA controller, and lots of bus
  60. buffers. The process of reading data into the onboard ram is totally automated
  61. by the DMA controller, and when the transfer has finished/the buffer is full,
  62. the ARM can read a whole bufferful. However, when it is doing so, the SCSI
  63. transfer cannot be running, hence the speed loss over the Morley cached card.
  64.  
  65. Most SCSI cards use simple tricks like reading as much data as possible into
  66. registers and using STMs (store multiples) to write it to RAM. The old oak
  67. software (1.16? maybe the current one too) is quick on transfers to word
  68. boundaries (eg *load bigfile 10000) but much slower on non-aligned boundaries
  69. (eg *load bigfile 10001) because in that case it works byte-by-byte. The
  70. morley card is much better optimised for these situation, BUT they don't
  71. happen that often to be honest.
  72.  
  73. 'cache' on a PC SCSI cntroller almost always refers to a store like the drive
  74. cache (sometimes many many Mb of it!) to speed up operations (eg windows :-) ).
  75.  More advanced controllers will do things like 'elevator seeks' in which data
  76. to be written will be ordered so the data will be sent to the drive sorted by
  77. disk address, so the drive will be able to write all of it with one sweep of
  78. the heads - this is only really useful on UNIX, where a task can be suspended
  79. waiting for an IO operation, unlike RISC OS where another task isn't polled
  80. while an IO operation is waiting.
  81.  
  82. Some drives (eg quantum 120/240Mb) have write caching as well, which will hold
  83. writes in drive cache in case it can optimise the process at all (max of about
  84. 1 second holding though, for safety's sake!) - this can cause lots of problems
  85. if the completed SCSI operation (from the host's point of view) comes across a
  86. disk error while another SCSI operation is taking place.
  87.  
  88. Well, there you go, a complete guide to SCSI cards on the acorn.
  89.  
  90. Hugo
  91. (phew...)
  92. --- ARCbbs RISC OS [1.63]
  93.  * Origin: The World of Cryton +44 749 670030-v32bis/670883-ISDN (2:252/102)
  94.  
  95.  
  96.  
  97. From: mark@acorn.co.uk (Mark Taunton)
  98. Subject: SCSI card technicalities (was Re: Does Acorn Replay really work)
  99. Date: 10 Nov 1993 13:29:16 -0000
  100.  
  101. >The acorn card has 64kb of static RAM, a DMA controller, and lots of bus
  102. >buffers. The process of reading data into the onboard ram is totally automated
  103. >by the DMA controller, and when the transfer has finished/the buffer is full,
  104. >the ARM can read a whole bufferful. However, when it is doing so, the SCSI
  105. >transfer cannot be running, hence the speed loss over the Morley cached card.
  106.  
  107. Minor correction: since there is an on-board DMA controller, another
  108. SCSI transfer (or indeed, more of the same one) *can* be running
  109. whilst the transfer from card buffer to memory (or vice versa) takes
  110. place.  Although I haven't looked into the details to confirm this, it
  111. may be that the RISC OS drivers don't always make the most of this
  112. possibility, though I would be surprised if they never do it; it will
  113. of course depend how much data is moved over the SCSI bus by each SCSI
  114. command, and I don't know exactly how that's organised.  Certainly the
  115. RISC iX drivers (which I know more about) *do* try to keep the SCSI
  116. bus busy whenever they can, including whilst doing card<->memory
  117. copies.
  118.  
  119. Mark.
  120.  
  121.  
  122.