🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #6496

SCSI and DMA

#6496
From: Hans Dolfing
Date: Fri, 09 Nov 1990 18:51
84 lines
3800 bytes

Because we are currently building a SCSI- interface for an A500, I would 
like to ask a few questions. Our system is a normal A500, Kickstart 1.2,
with 1M and no other extensions. The SCSI-interface is connected to the
expansion-bus.

The problem is how to transfer data from an SCSI- device to memory.
This can be done with DMA or with the CPU. It is no big deal to use
the CPU for data-transfers from a SCSI-device to chip or fast-mem, but
data-transfer with the CPU blocks the processing of other tasks.
Recently, Dave Haynie discussed this topic in 'comp.sys.amiga' but
he didn't explained the Amiga specific problem of chip and fast-mem. 

Problem:
-------

Although the DMA is intended to handle data-transfer between external 
devices and memory (without blocking the CPU), I see 2 major problems.

1. The use of DMA is limited to the chip-mem and the custom-chip
   registers from $dff000 till $e00000.

   All expansion cards (including SCSI-controllers) are adressed from
   $e80000 till $efffff. As far as I know, these adresses cannot be
   reached using DMA.

2. All DMA is done with 7.14 MHz (Custom chip clock-frequency), even
   in a A3000.

Possible solutions:
----------------------

Although there are solutions (see solution 1 and 2), I would like to
know if there are better solutions.

1. Just use the CPU for all data-transfers from a SCSI-device to
   memory. This blocks the execution of tasks during the transfer but
   because we can reach transfer-rates of 1.4 Megabyte/sec, even with
   a 68000, the blocking should not last long. With a faster processor
   (680x0) the blocking due to the transfer should be even shorter (in
	an A3000, three times shorter).

2. There is a possible solution which uses DMA for data-transfer. It is
   not very elegant and I don't like it at all ( see questions).

   Because of the memory-mapped I/O of the Amiga, it ?may? be possible
   to map an adress-range of the controllerboard to chip-mem where
   DMA can be used for transferring data. This adress-range should have
   a fixed size ( e.g. 16K) so that DMA can read/write blocks of 16K
   at once.

   Reading resp. writing data become a problem when the destination
   resp. source adress of the data is not in chip-mem (which is very
   likely when you have a lot of fast-mem).

   If data has to be read, DMA has to be used to transfer data to a buffer
   in chip-mem, followed by a CPU action which moves the read data to its
   final destination	adress. Therefore, the CPU is still blocking the
   other tasks!


Questions:
----------

Maybe somebody is so kind and can answer the following questions:

1. Are there better solutions than the presented ones and how do they
   work?

2. Is it possible to use DMA for data-transfer from a SCSI-device
   to both chip and fast-mem !without! buffering in chip-mem and how
   can I build it?

3. If it is necessary to use both DMA and the CPU for most data-transfers,
   wouldn't it be better to use !only! the CPU?. This is especially
   true for an A3000 where the processor is 3 times faster than the
   DMA (Problem 2, solution 1). 

4. Does the new SCSI-custom chip in a A3000 provide facilities for DMA
   to and from fast-mem?
____

	Hans Dolfing	(dolfing@cs.utwente.nl)
Technical Details
Message-ID: <1990Nov9.185100.24053@cs.utwente.nl>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!hp4nl!utrcu1!infnews!usenet

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!hp4nl!utrcu1!infnews!usenet
From: dolfing@cs.utwente.nl (Hans Dolfing)
Newsgroups: comp.sys.amiga.tech
Subject: SCSI and DMA
Keywords: SCSI, DMA ,chipmem
Message-ID: <1990Nov9.185100.24053@cs.utwente.nl>
Date: 9 Nov 90 18:51:00 GMT
Sender: usenet@cs.utwente.nl
Reply-To: dolfing@cs.utwente.nl (Hans Dolfing)
Organization: University of Twente, Dept. of Computer Science
Lines: 84