DMA Questionsgreenspun.com : LUSENET : ece342 : One Thread |
I have a few questions regarding the DMA lab:Does the CPU write directly in the registers (eg, the control register bits such as R/W, burst mode or the Data Register (for a write).
When does the DMA Controller know when to start operating and request the bus? Is this when the count value is > 0?
When a write is being performed, does the CPU insert the starting address in the address register?
Thanks,
-- Shezad Okhai (shezad.okhai@utoronto.ca), February 16, 1999
The DMA Controller should start operating when the count is > 0. This was meant to be mentioned in the handout, but somehow got left off. Sorry.
The basic flow using the DMA Controller is as follows:
- CPU sets base address by writing to ADDR_REG
- If write is to be performed, set value to be written by DMA Controller by writing to DATA_REG
- Set the type of operation and number of transfers by writing appropriate values to CONT_REG. (Note that a non-zero value for count should start DMA process.
- After transfer is complete, you can check either the relevent memory locations (for write) or DATA_REG (for read) to see the transfer was successful.
-- Steven Caranci (caranci@eecg.toronto.edu), February 18, 1999.