- Type
- Final term past paper
- Course
- CS609 System Programming
- Size
- PDF 1.9 MB
- Updated
- 23 Oct 2026
You get 3 free files a day on the website. Add the Chrome extensionSign in with the extension for 30 a day.
Preview text
Text from pages 1, 2, 3 of 33. Download the file for all 33 pages.
DMA Controller
DMA is a device which can acquire complete control of the buses and hence can be used to transfer data directly from port to memory or vice versa. Transferring data like this can prove faster because a transfer will consume 2 bus cycles if it is performed using the processor. So in this approach the processor is bypasses and its cycles are stolen and are used by the DMA controller.
Direct Memory Access (DMA)
The latch B of the DMA interface is used to hold the higher 4 or 8 bits of the 20 or 24 bit absolute address respectively. The lower 16bits are loaded in the base address register and the number of bytes to be loaded are placed in the count register. The DMA requests to acquire buses through the HOLD signal, it receives a HLDA (Hold Acknowledge ) signal if no higher priority signal is available. On acknowledgment the DMA acquires control of the buses and can issue signals for read and write operations to memory and I/O ports simultaneously. The DREQ signals are used by various devices to request a DMA operation. And if the DMA controller is successful in acquiring the bus it sends back the DACK signal to signify that the request is being serviced. For the request to be serviced properly the DMA channel must the programmed accurately before the request.
A single DMA can transfer 8bit operands to and from memory in a single a bus cycle. If 16bit values are to be transmitted then two DMA controllers are required and should be Cascaded
DMA Programming Model
- DMA has 4 – Channels
- Each Channel can be programmed to transfer a
block of maximum size of 64k.
- For each Channel there is a
• Base Register
• Count Register
- Higher Address Nibble/Byte is placed in Latch B.
- The Mode register is conveyed which Channel is
to be programmed and for what purpose i.e. Read Cycle, Write Cycle, Memory to memory transfer.
- A request to DMA is made to start it’s transfer.
In block transfer mode the DMA is programmed to transfer a block and does not pause or halt until the whole block is transferred irrespective of the requests received meanwhile. In Single transfer mode the DMA transfers a single byte on each request and updates the counter registers on each transfer and the registers need not be programmed again. On the next request the DMA will again transfer a single byte beginning from the location it last ended. Demand transfer is same as block transfer, only difference is that the DREQ signal remains active throughout the transfer and as soon as the signal deactivates the transfer stops and on reactivation of the DREQ signal the transfer may start from the point it left.
Terminal count if reached signifies that the whole of the block as requested through some DMA channel has been transferred.
This is the command register. It is used to program various common parameters of transfer for all the channels. This register can be used to simulate a DMA request through software (in case of memory to memory transfer). The lower 2 bits contains the channel number to be requested and the bit # 2 is set to indicate a request.
This register can be used to mask/unmask requests from a device for a certain DMA channel. The lower 2 bits contains the channel number and the bit #2 is set if the channel is to be masked.
This register can also be used to mask the DMA channels. It contains a single bit for each channel. The corresponding bit is set to mask the requests for that channel.
This register can be used to set the mode on each. The slide shows the detail of the values and bits which should be placed in the register in order to program a required mode.
Related CS609 files
All CS609 files →- CS609 Final Term Current Subjective Solved 2023 Final term PDF 494 KB
- CS609 Final Term Current Paper 2020 Final term PDF 475 KB
- CS609 Final Term Solved File 2 by Team Hadi Final term PDF 1.8 MB
- CS609 Final Term Solved Subjective Set 2 by Junaid Final term PDF 859 KB
- CS609 Official Handouts Official handout PDF 3.5 MB Free
- CS609 Final Term Quiz 2023 by Imran Quiz PDF 21.1 MB
Get more out of VUBuddy, for free
- Unlimited downloads
- The explanation behind every MCQ answer
- Study offline on slow data
- 30 downloads a day instead of 3
- Sign in and buy Pro Semester here
One Pro Semester membership works in both the extension and the app.