青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品

posts - 297,  comments - 15,  trackbacks - 0

The DMA is another two chips on your motherboard (usually is an Intel 8237A-5 chips) that allow you (the programmer) to offload data transfers between I/O boards. DMA actually stands for 'Direct Memory Access'.

DMA can work: memory->I/O, I/O->memory. The memory->memory transfer doesn't work. It doesn't matter because ISA DMA is slow as hell and thus is unusable. Futhermore, using DMA for zeroing out memory would massacre the contents of memory caches.

What about caches and DMA? L1 and L2 caches work absolutely transparently. When DMA writes to memory, caches autmatically load or least invalidate the data that go into the memory. When DMA reads memory, caches supply the unwritten bytes so not old but new values are tranferred to the peripheral.

There are signals DACK, DRQ, and TC. When a peripheral wants to move a byte or 2 bytes into memory (is dependent on whether 8 bit or 16 bit DMA channel is in use -- 0,1,2,3 are 8-bit, 5,6,7 are 16-bit), it issues DRQ. DMA controller chats with CPU and after some time DMA controller issues DACK. Seeing DACK, the peripheral puts it's byte on data bus, DMA controller takes it and puts it in memory. If it was the last byte/word to move, DMA controller sets up also TC during the DACK. When peripheral sees TC, it is possible it will not want any more movements,

In the other direction, everything is the same, but first the byte/word is fetched from the memory and then DACK is generated and the peripheral takes the data.

DMA controller has only 8-bit address counter inside. There is external ALS573 counter for each chip so it makes programmer see it as DMA controller had 16 bits of address counter per channel inside. There are more 8 bits of address per channel of so called page register in LS612 that unfortunately do not increment as those in ALS573. All these 24 bits can address 16777216 of distict addresses.

Recapitulation: for each channel, independently, you see 16 bits of auto-incrementing counter, and 8 bits of page register which doesn't increment.

The difference between 16-bit DMA channels and 8-bit DMA channels is that the address bits for 16-bit channels are wired one bit left to the address bus so every address is 2 times bigger. The lowest bit is 0. The highest bit of page register would fit into bit 24 which is not on ISA so that it is left unconnected. The bus control logic is wired for 16-bit channels in a manner every single DMA transfer, a 16-bit cycle is generated, so ISA device puts 16 bits onto the bus at the time. I don't know what happens if you use 16-bit DMA channel with XT peripheral. I guess it could work but only be slower.

8-bit DMA: increments by 1, cycles inside 65536 bytes, addresses 16MB, moves 8 bits a time.

16-bit DMA: increments by 2, goes only over even addresses, cycles inside 131072 bytes, addresses 16MB, moves 16 bits a time. Uses 16-bit ISA I/O cycle so it takes less ticks to make one move that the 8-bit DMA.

An example of DMA usage would be the Sound Blaster's ability to play samples in the background. The CPU sets up the sound card and the DMA. When the DMA is told to 'go', it simply shovels the data from RAM to the card. Since this is done off-CPU, the CPU can do other things while the data is being transferred.

Enough basics. Here's how you program the DMA chip.


When you want to start a DMA transfer, you need to know several things:

  • Number of DMA channel you want to use
  • What page to use
  • The offset in the page
  • The length
  • How to tell you peripheral to ask for DMA

  • You cannot transfer more than 64K or 128K of data in one shot, and
  • You cannot cross a page boundary. If you cross it, the lower 16 or 17 bits of address will simply wrap and you only suddenly jump 65536 or 131072 bytes lower that where you expected. It will be absolutely OK and no screw up will be performed. If you will take it in account in your program you can use it.

Restriction #1 is rather easy to get around. Simply transfer the first block, and when the transfer is done, send the next block.

For those of you not familiar with pages, I'll try to explain.

Picture the first 16MB region of memory in your system. It is divided into 256 pages of 64K or 128 pages of 128K. Every page starts at a multiple of 65536 or 131072. They are numbered from 0 to 255 or from 0 to 127.

In plain English, the page is the highest 8 bits or 7 bits of the absolute 24 bit address of our memory location. The offset is the lower 16 or 17 bits of the absolute 24 bit address.

Now that we know where our data is, we need to find the length.

The DMA has a little quirk on length. The true length sent to the DMA is actually length + 1. So if you send a zero length to the DMA, it actually transfers one byte or word, whereas if you send 0xFFFF, it transfers 64K or 128K. I guess they made it this way because it would be pretty senseless to program the DMA to do nothing (a length of zero), and in doing it this way, it allowed a full 64K or 128K span of data to be transferred.

Now that you know what to send to the DMA, how do you actually start it? This enters us into the different DMA channels.

The following chart will describe each channel and it's corresponding port number:

DMA ChannelPageAddressCount
087h0h1h
183h2h3h
281h4h5h
382h6h7h
48FhC0hC2h
58BhC4hC6h
689hC8hCAh
78AhCChCEh

DMA 4. Doesn't exist. DMA 4 is used to cascade the two 8237A chips. When first 8237A wants to DMA, it issues "HRQ" to second chip's DRQ 4. The second chip thinks DMA 4 is wanna be made so issues DRQ 4 to the first chip's HLDA. First chip makes it's own DMA 0-3, then sends to the second "OK second chip, my DMA 4 is complete" and second chip knows it's free on the bus. If this mechanism would not work, the two chips could peck each other on the BUS and the PC would screw up. :+)

from:
posted on 2010-11-14 19:23 chatler 閱讀(707) 評論(0)  編輯 收藏 引用 所屬分類: OS
<2025年12月>
30123456
78910111213
14151617181920
21222324252627
28293031123
45678910

常用鏈接

留言簿(10)

隨筆分類(307)

隨筆檔案(297)

algorithm

Books_Free_Online

C++

database

Linux

Linux shell

linux socket

misce

  • cloudward
  • 感覺這個博客還是不錯,雖然做的東西和我不大相關,覺得看看還是有好處的

network

OSS

  • Google Android
  • Android is a software stack for mobile devices that includes an operating system, middleware and key applications. This early look at the Android SDK provides the tools and APIs necessary to begin developing applications on the Android platform using the Java programming language.
  • os161 file list

overall

搜索

  •  

最新評論

閱讀排行榜

評論排行榜

青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            亚洲精选一区| 午夜精品美女自拍福到在线| 亚洲免费在线观看| 午夜精品美女自拍福到在线| 欧美在线免费观看视频| 久久综合色88| 欧美成人国产va精品日本一级| 欧美电影免费观看大全| 一区二区不卡在线视频 午夜欧美不卡在| 亚洲精品久久久久久久久久久久久 | 欧美www视频| 久久久久在线观看| 欧美福利电影网| 国产精品美女久久久久久免费 | 性久久久久久久| 国产精品一区二区三区四区 | 欧美va亚洲va国产综合| 欧美无乱码久久久免费午夜一区| 国产精品自在欧美一区| 久久综合九色欧美综合狠狠| 一本久久综合| 国模私拍一区二区三区| 亚洲一区图片| 亚洲精品少妇| 久久视频在线免费观看| 国产精品亚洲综合一区在线观看| 日韩网站在线观看| 欧美电影美腿模特1979在线看| 欧美精品在欧美一区二区少妇| 黄色另类av| 久久福利精品| 欧美久久久久久久久| 久久精品国产在热久久| 亚洲午夜精品福利| 欧美日韩国产色站一区二区三区| 亚洲国产精品一区二区尤物区| 久久aⅴ国产紧身牛仔裤| 乱码第一页成人| 亚洲国产高清一区| 亚洲欧美综合网| 亚洲六月丁香色婷婷综合久久| 欧美一区二区日韩一区二区| 国产精品视频不卡| 亚洲三级电影在线观看| 狠狠色综合一区二区| 亚洲视频第一页| 亚洲专区免费| 国产亚洲精品一区二区| 亚洲国产欧美日韩另类综合| 久久久久久网| 久久精品在线播放| 国内精品久久久久久 | 亚洲国产精品日韩| 久久久亚洲国产天美传媒修理工| 亚洲影院色无极综合| 欧美成人精品| 亚洲综合欧美日韩| 日韩视频中午一区| 欧美精品18+| 亚洲视频精品| 夜夜嗨av一区二区三区中文字幕 | 欧美无砖砖区免费| 欧美激情视频网站| 欧美国产在线电影| 欧美高清在线一区二区| 一区二区三区在线视频免费观看| 久久躁日日躁aaaaxxxx| 国产美女精品在线| 亚洲综合电影| 最新日韩在线| 亚洲在线观看免费| 亚洲国产精品第一区二区| 久久全国免费视频| 另类酷文…触手系列精品集v1小说| 国产偷国产偷亚洲高清97cao| 麻豆成人在线观看| 在线精品国产成人综合| 99ri日韩精品视频| 亚洲一区二区黄色| 久久综合久久88| 亚洲女性喷水在线观看一区| 欧美午夜精品久久久久免费视| 日韩亚洲欧美成人| 欧美影院在线| 欧美黄色aaaa| av不卡在线| 欧美影院视频| 亚洲第一在线| 欧美日韩精品久久| 亚洲一区久久久| 另类天堂视频在线观看| 亚洲精品网址在线观看| 久久久美女艺术照精彩视频福利播放| 老司机免费视频一区二区| 亚洲精品国产系列| 欧美网站大全在线观看| 久久国产一区二区| 香蕉国产精品偷在线观看不卡| 欧美国产精品一区| 亚洲一二区在线| 女女同性女同一区二区三区91| 亚洲精品日本| 国产日韩精品入口| 亚洲亚洲精品三区日韩精品在线视频 | 黄色精品一区| 欧美日韩亚洲国产精品| 亚洲国产精品va在线观看黑人| 在线视频日韩精品| 欧美大胆a视频| 亚洲在线第一页| 亚洲国产精品一区二区www| 欧美一级日韩一级| 一本色道久久88综合日韩精品| 裸体丰满少妇做受久久99精品| 亚洲一区二区欧美日韩| 欧美黄色精品| 久久综合一区二区三区| 午夜日本精品| 一级成人国产| 亚洲国产精品综合| 娇妻被交换粗又大又硬视频欧美| 欧美精品自拍偷拍动漫精品| 欧美一区二区三区免费观看| 日韩午夜三级在线| 亚洲黄色一区二区三区| 日韩视频国产视频| 亚洲福利视频一区二区| 国产日本欧美一区二区三区在线| 欧美国产一区在线| 欧美va亚洲va日韩∨a综合色| 久久国产精品久久久久久| 亚洲欧美日本伦理| 亚洲午夜久久久久久久久电影网| 亚洲国产综合91精品麻豆| 麻豆精品在线视频| 久久人91精品久久久久久不卡 | 国内精品久久久久伊人av| 欧美性大战久久久久| 欧美日韩国产一区精品一区| 欧美高清在线视频观看不卡| 久久综合给合| 久久午夜精品一区二区| 久久精品国产欧美激情| 久久国产一区二区三区| 欧美永久精品| 亚洲国产欧美一区二区三区久久 | 欧美国产日韩一区二区在线观看 | 欧美激情中文不卡| 欧美99久久| 欧美激情偷拍| 欧美婷婷久久| 久久尤物电影视频在线观看| 久久欧美肥婆一二区| 免播放器亚洲一区| 欧美日韩国产区一| 国产精品你懂得| 国产一区二区日韩| 在线观看中文字幕亚洲| 亚洲国产欧美不卡在线观看| 亚洲欧洲日本mm| 这里只有精品视频在线| 亚洲欧美制服另类日韩| 久久久国产91| 国产精品99久久久久久有的能看| 在线亚洲精品| 久久成人av少妇免费| 欧美+日本+国产+在线a∨观看| 亚洲国产精品国自产拍av秋霞| 亚洲精品日韩在线观看| 亚洲视频在线二区| 久久久久国产一区二区三区| 欧美成人日本| 国产精品一区在线播放| 国内成+人亚洲| 亚洲精品日韩在线| 午夜一区不卡| 亚洲国产精品va在线观看黑人| 亚洲伦理在线| 久久精品亚洲一区| 欧美日韩另类字幕中文| 国产又爽又黄的激情精品视频| 亚洲国产精品美女| 欧美亚洲一区二区三区| 亚洲成人资源| 免费亚洲电影| 久久亚洲综合色一区二区三区| 亚洲高清影视| 欧美激情一区二区三区| 亚洲一区在线免费| 欧美精品亚洲| 激情综合在线| 欧美一区二区性| 日韩视频在线免费| 久久综合九色综合欧美就去吻| 国产精品久久久久久妇女6080| 欧美亚洲成人网| 亚洲精品国产精品久久清纯直播| 欧美一级网站| 亚洲一品av免费观看| 欧美激情视频给我|