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

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 閱讀(703) 評論(0)  編輯 收藏 引用 所屬分類: OS
<2025年9月>
31123456
78910111213
14151617181920
21222324252627
2829301234
567891011

常用鏈接

留言簿(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>
            夜夜嗨网站十八久久| 亚洲午夜女主播在线直播| 亚洲精品一区二区三区樱花| 国产精品日韩高清| 亚洲精品国产拍免费91在线| 国产日韩欧美不卡在线| 99在线|亚洲一区二区| 最新亚洲激情| 久久影院午夜论| 久久精品视频在线观看| 国产精品午夜在线| 9色porny自拍视频一区二区| 日韩视频在线观看一区二区| 麻豆91精品| 亚洲福利av| 亚洲啪啪91| 美女精品自拍一二三四| 欧美jjzz| 亚洲国产综合91精品麻豆| 久久婷婷久久一区二区三区| 久久综合一区二区三区| 激情综合色综合久久综合| 久久激情久久| 免费影视亚洲| 亚洲激情视频在线播放| 欧美xx视频| 最近看过的日韩成人| 亚洲乱码国产乱码精品精可以看 | 久久国产精品一区二区三区| 欧美亚洲综合在线| 国产午夜精品一区二区三区欧美| 亚洲一区二区视频在线观看| 欧美亚洲在线| 激情另类综合| 欧美jizzhd精品欧美巨大免费| 亚洲第一狼人社区| 一本色道久久综合亚洲精品小说 | 亚洲一区二区少妇| 国产精品无码永久免费888| 亚洲欧美日韩精品久久久| 久久久久久综合网天天| 亚洲国产高清一区二区三区| 欧美激情第二页| 亚洲一区二区三区四区五区黄 | 欧美r片在线| 日韩亚洲欧美一区| 欧美中文字幕在线视频| 精品av久久707| 欧美精品99| 亚洲欧美激情一区| 欧美大片18| 亚洲一区二区三区四区在线观看 | 久久久不卡网国产精品一区| 亚洲国产精品尤物yw在线观看| 亚洲一区二区三区免费观看| 国产在线视频欧美| 欧美激情网站在线观看| 亚洲欧美日韩国产成人精品影院| 六月婷婷久久| 亚洲免费视频在线观看| 伊人久久噜噜噜躁狠狠躁| 欧美日韩在线一区| 欧美在线视频播放| 日韩亚洲欧美成人一区| 美女性感视频久久久| 亚洲免费在线精品一区| 亚洲国产高清在线| 国产欧美精品在线观看| 欧美精品久久久久久| 午夜精品影院| av成人毛片| 欧美电影在线观看| 久久超碰97中文字幕| 日韩亚洲成人av在线| 精品成人一区| 国产伦理精品不卡| 欧美精品在线免费观看| 久久视频精品在线| 亚洲影院在线| 一区二区三区产品免费精品久久75| 久久色中文字幕| 欧美一区二区女人| 亚洲亚洲精品在线观看 | 亚洲黄色免费网站| 裸体歌舞表演一区二区| 久久精品国产欧美亚洲人人爽| 一区二区三区四区五区精品| 亚洲激情二区| 亚洲高清久久网| 黄色综合网站| 红桃视频亚洲| 国产日韩一区二区三区| 国产精品视频精品视频| 欧美视频在线观看免费网址| 欧美国产日韩一区二区三区| 蜜桃av一区二区| 久久久美女艺术照精彩视频福利播放| 亚洲夜间福利| 亚洲午夜精品在线| 中国亚洲黄色| 亚洲一区二区免费视频| 亚洲五月婷婷| 亚洲嫩草精品久久| 午夜激情综合网| 午夜欧美精品久久久久久久| 亚洲欧美日韩在线观看a三区| 亚洲视频视频在线| 亚洲欧美精品伊人久久| 亚洲自拍高清| 欧美一区二视频在线免费观看| 亚洲免费在线看| 久久国产视频网| 蜜桃av噜噜一区二区三区| 欧美电影资源| 欧美视频成人| 国产精品亚洲综合久久| 国产视频欧美视频| 伊人色综合久久天天五月婷| 亚洲国产你懂的| 99riav1国产精品视频| 亚洲午夜av在线| 久久不射网站| 亚洲大片免费看| 亚洲伦理自拍| 香蕉久久一区二区不卡无毒影院| 欧美一区国产二区| 美国三级日本三级久久99| 欧美区一区二区三区| 国产精品久久久久aaaa九色| 国产精品一区在线播放| 黄色av日韩| av不卡在线观看| 欧美在线|欧美| 欧美黄色aaaa| 亚洲一二三区精品| 久久久亚洲国产美女国产盗摄| 欧美激情一区二区三区| 国产伦精品一区二区三区照片91| 韩国一区二区三区在线观看| 日韩一级在线| 久久久久中文| 亚洲精品一区二区三区福利| 亚欧美中日韩视频| 欧美久久九九| 影音先锋久久精品| 亚洲综合久久久久| 欧美国产一区二区在线观看| 在线视频欧美一区| 蜜臀av在线播放一区二区三区| 欧美视频一区二区在线观看| 在线观看一区视频| 亚洲欧美制服另类日韩| 欧美不卡激情三级在线观看| 亚洲视频狠狠| 欧美国产日韩精品| 伊人久久婷婷色综合98网| 亚洲永久免费| 亚洲成色999久久网站| 亚洲精品少妇| 久久亚洲春色中文字幕| 在线视频中文亚洲| 欧美激情综合色综合啪啪| 红桃视频亚洲| 欧美伊久线香蕉线新在线| 亚洲乱码国产乱码精品精可以看| 久久精品国产96久久久香蕉| 国产精品家教| 亚洲视频视频在线| 亚洲激情成人网| 久久综合网hezyo| 极品裸体白嫩激情啪啪国产精品| 亚洲综合丁香| 99re视频这里只有精品| 欧美激情影院| 亚洲精品国产精品国自产在线| 久久露脸国产精品| 欧美一区二区三区播放老司机| 欧美系列一区| 亚洲一区二区视频在线| 91久久亚洲| 欧美成人a∨高清免费观看| 一区在线电影| 免费在线看一区| 久久亚洲影音av资源网| 黄色成人在线网址| 久久视频在线看| 久久激情综合| 亚洲第一级黄色片| 欧美激情久久久| 欧美丰满少妇xxxbbb| 日韩午夜剧场| 91久久精品一区二区三区| 男女激情视频一区| 日韩视频在线一区二区三区| 亚洲精品美女久久久久| 欧美日韩国产影院| 亚洲综合国产精品| 欧美一区二区精品| 亚洲成人中文| 亚洲精品1区|