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

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) 評(píng)論(0)  編輯 收藏 引用 所屬分類: OS
<2010年11月>
31123456
78910111213
14151617181920
21222324252627
2829301234
567891011

常用鏈接

留言簿(10)

隨筆分類(307)

隨筆檔案(297)

algorithm

Books_Free_Online

C++

database

Linux

Linux shell

linux socket

misce

  • cloudward
  • 感覺這個(gè)博客還是不錯(cuò),雖然做的東西和我不大相關(guān),覺得看看還是有好處的

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

搜索

  •  

最新評(píng)論

閱讀排行榜

評(píng)論排行榜

青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <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>
            亚洲免费中文| 亚洲视频日本| 欧美高清视频一区| 亚洲精选国产| 亚洲作爱视频| 国产噜噜噜噜噜久久久久久久久| 亚洲免费在线精品一区| 一区二区三区视频在线看| 欧美午夜在线观看| 久久精品视频va| 久久尤物视频| 一区二区av在线| 亚洲欧美日本另类| 在线观看国产欧美| 91久久精品国产91久久性色| 欧美巨乳波霸| 欧美在线黄色| 免费在线欧美视频| 亚洲一区精品电影| 久久精品国产久精国产一老狼 | 国产精品久在线观看| 久久国产视频网| 欧美韩国日本一区| 欧美一区永久视频免费观看| 久久久久五月天| 亚洲一区二区三区三| 久久国内精品视频| 亚洲欧美成人综合| 美乳少妇欧美精品| 欧美一区二区三区在线观看| 免费看av成人| 久久国产毛片| 欧美三级在线视频| 久久综合影视| 国产精品综合| 日韩亚洲欧美一区| 亚洲人线精品午夜| 久久精品国产免费| 亚洲欧美99| 欧美经典一区二区三区| 六月婷婷久久| 国产视频一区在线观看一区免费| 亚洲精品1区| 尤物yw午夜国产精品视频| 亚洲一区不卡| 在线视频精品一| 欧美1区3d| 免费在线看成人av| 国产亚洲成av人在线观看导航| 99国产欧美久久久精品| 亚洲激情一区二区| 久久婷婷人人澡人人喊人人爽| 欧美一区成人| 国产精品日韩在线| 在线视频欧美精品| 在线一区观看| 欧美日韩高清在线观看| 亚洲第一伊人| 亚洲精品国精品久久99热一| 久久蜜臀精品av| 久久天天狠狠| 伊人一区二区三区久久精品| 午夜精品一区二区三区在线| 亚洲女同性videos| 国产精品永久免费| 亚洲欧美一区二区三区久久| 午夜激情一区| 国产精品日日做人人爱| 亚洲永久免费观看| 久久精品在线| 在线播放日韩| 欧美xx视频| 亚洲精品中文字幕在线观看| 艳女tv在线观看国产一区| 欧美日本国产视频| 一区二区三区精密机械公司| 亚洲伊人色欲综合网| 国产精品美女久久| 欧美一区二区三区在线| 久久久蜜臀国产一区二区| 在线精品一区| 欧美精品免费观看二区| 99热这里只有精品8| 亚洲午夜精品福利| 国产精品嫩草99a| 欧美在线亚洲综合一区| 奶水喷射视频一区| 日韩西西人体444www| 欧美日韩在线亚洲一区蜜芽| 这里只有视频精品| 亚洲欧美经典视频| 黄色一区二区三区| 欧美日韩国产一级片| 午夜精品一区二区三区在线播放 | 亚洲黄色三级| 亚洲欧美日韩成人| 亚洲国产成人一区| 国产精品国产三级欧美二区| 久久国产精品久久国产精品| 亚洲国产成人在线| 欧美一区二区高清| 亚洲九九九在线观看| 国产欧美精品在线| 欧美国内亚洲| 久久www免费人成看片高清| 亚洲高清视频一区二区| 欧美一区二区三区免费在线看| 亚洲国产精品成人一区二区 | 免费国产自线拍一欧美视频| av成人免费观看| 欧美成人精品一区| 欧美一级久久| 一区二区三区|亚洲午夜| 韩日欧美一区| 国产精品裸体一区二区三区| 麻豆成人小视频| 欧美一级午夜免费电影| 日韩午夜在线观看视频| 欧美成人免费全部| 久久婷婷综合激情| 欧美在线视频播放| 亚洲影视九九影院在线观看| 亚洲人成人99网站| 在线成人小视频| 国内精品福利| 国产欧美一区二区三区久久| 欧美日韩精品三区| 蜜桃精品久久久久久久免费影院| 欧美夜福利tv在线| 亚洲综合视频网| 亚洲女人天堂成人av在线| 99re66热这里只有精品3直播| 久久久蜜桃精品| 久久久久久97三级| 欧美一区二区三区在| 亚洲免费在线视频一区 二区| 一本色道综合亚洲| 亚洲美女视频在线观看| 亚洲国产精品ⅴa在线观看| 在线观看一区二区精品视频| 国产夜色精品一区二区av| 国产精品一区久久| 国产精品国产三级国产aⅴ无密码 国产精品国产三级国产aⅴ入口 | 欧美一区=区| 午夜激情综合网| 午夜精品久久久久久| 亚洲欧美成人一区二区三区| 亚洲欧美日韩成人| 欧美中文字幕在线播放| 久久精品一区四区| 美女任你摸久久| 欧美大片91| 亚洲国产精品久久| 99香蕉国产精品偷在线观看| 日韩视频在线你懂得| 99在线精品观看| 午夜精品视频在线观看| 亚洲综合成人在线| 久久精品国产91精品亚洲| 久久久一区二区三区| 欧美黄色一区二区| 欧美日韩午夜视频在线观看| 国产精品theporn| 国产欧美亚洲一区| 亚洲成人在线视频播放| 亚洲免费av网站| 亚洲综合首页| 久久精品国产99国产精品| 久久亚洲免费| 91久久精品一区| 亚洲欧美日韩成人高清在线一区| 久久激情中文| 欧美日韩高清一区| 黑人一区二区三区四区五区| 亚洲精品久久久久| 欧美一区二区三区精品| 模特精品在线| 亚洲免费小视频| 麻豆精品视频| 国产精品日韩久久久久| 亚洲人体影院| 久久亚洲捆绑美女| 一二三区精品福利视频| 久久免费国产| 国产精品久久久久久久久久久久 | 精品69视频一区二区三区| 亚洲精品在线免费观看视频| 亚洲欧美日韩国产综合| 欧美大片91| 午夜精品久久久久久久久久久久 | 免费成人在线视频网站| 国产精品日日做人人爱| 一本色道久久综合一区| 欧美成年人视频网站| 亚洲欧美一区二区三区久久| 欧美日韩成人在线| 亚洲国产精品成人久久综合一区| 欧美一级专区免费大片| 中文在线一区| 欧美高清视频一区二区|