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

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>
            国产深夜精品福利| 国产午夜精品久久久久久免费视| 精品96久久久久久中文字幕无| 欧美一区二区三区四区夜夜大片| 亚洲午夜视频在线| 国产精品视频网站| 久久久国产精彩视频美女艺术照福利| 亚洲欧美在线免费| 一区视频在线看| 亚洲高清电影| 欧美国产精品人人做人人爱| 国产精品99久久久久久人| 日韩亚洲欧美中文三级| 国产精品黄色在线观看| 久久精品亚洲精品| 久久乐国产精品| 日韩视频一区二区三区| 一区二区不卡在线视频 午夜欧美不卡在 | 在线免费观看成人网| 欧美激情片在线观看| 欧美日韩国产高清视频| 午夜一区不卡| 久久免费精品视频| 亚洲视频一区二区| 欧美一区二区三区婷婷月色| 亚洲国产成人精品久久久国产成人一区 | 久久综合色88| 欧美了一区在线观看| 香蕉久久夜色精品国产使用方法| 性视频1819p久久| 亚洲剧情一区二区| 中文国产一区| 欧美主播一区二区三区| 亚洲激情第一区| 一区二区三区 在线观看视| 黑丝一区二区| 日韩亚洲在线| **性色生活片久久毛片| 日韩亚洲精品视频| 伊人春色精品| 亚洲午夜视频| 一个人看的www久久| 欧美伊人久久大香线蕉综合69| 亚洲欧洲一区二区在线播放 | 欧美高清视频www夜色资源网| 欧美日韩在线一区二区三区| 蜜桃av噜噜一区二区三区| 欧美日韩在线免费视频| 欧美激情影院| 伊人精品在线| 香蕉久久夜色精品国产| 中国成人黄色视屏| 美女视频黄a大片欧美| 午夜精品三级视频福利| 欧美精品日韩综合在线| 欧美成人免费视频| 国产一区自拍视频| 亚洲女同性videos| 亚洲午夜久久久久久久久电影院| 欧美成人蜜桃| 欧美成人激情视频| 国内精品久久久久久影视8| 一区二区三区欧美在线观看| 一本色道久久加勒比精品 | 亚洲激精日韩激精欧美精品| 精品成人久久| 欧美一区二区三区免费大片| 午夜精品视频在线| 国产精品国产亚洲精品看不卡15 | 一区二区免费在线视频| 一本到高清视频免费精品| 欧美99久久| 亚洲国产成人av好男人在线观看| 在线成人免费观看| 久久一区二区三区国产精品| 欧美91大片| 亚洲精品国产精品久久清纯直播 | 美女日韩欧美| 亚洲黄一区二区三区| 亚洲精华国产欧美| 欧美激情视频一区二区三区在线播放| 欧美黄色一级视频| 亚洲精品免费观看| 欧美精品二区三区四区免费看视频| 亚洲国产三级在线| 在线一区免费观看| 国产精品欧美精品| 午夜精品久久久久久久99水蜜桃| 久久久久国产精品一区三寸| 韩日在线一区| 欧美韩国日本综合| 亚洲午夜影视影院在线观看| 欧美综合77777色婷婷| 狠狠色综合网| 欧美日韩国产91| 午夜精品成人在线视频| 久久久亚洲影院你懂的| 一区在线播放视频| 欧美日韩二区三区| 亚洲欧美成人网| 欧美黄色免费| 欧美一区二区| 亚洲毛片一区二区| 国产精品稀缺呦系列在线| 久久婷婷综合激情| 亚洲美女尤物影院| 久久精品国产清自在天天线| 亚洲欧洲精品一区二区三区不卡 | 久久成人在线| 亚洲激情av| 久久伊人免费视频| 一本色道久久综合亚洲精品高清| 国产九色精品成人porny| 久久米奇亚洲| 亚洲图片在线观看| 欧美激情一区二区三区成人| 亚洲欧美日韩中文视频| 亚洲电影免费观看高清完整版在线观看 | 久久野战av| 亚洲专区在线| 亚洲精品乱码久久久久久按摩观| 久久精品最新地址| 亚洲一级在线观看| 亚洲欧洲一区二区在线观看| 国产在线欧美日韩| 欧美视频一区二区三区| 久热精品视频在线| 亚洲欧美日韩成人| 一级日韩一区在线观看| 亚洲国产精品成人| 欧美大片免费久久精品三p| 欧美一级久久| 欧美亚洲综合另类| 一区二区三区不卡视频在线观看| 黄色精品一区二区| 国产日韩欧美三级| 国产精品爱啪在线线免费观看| 欧美国产亚洲精品久久久8v| 久久亚洲精品中文字幕冲田杏梨| 性色一区二区| 欧美在线观看视频一区二区| 亚洲校园激情| 亚洲色图在线视频| 夜夜嗨av一区二区三区免费区 | 亚洲欧美在线免费观看| 亚洲美女av网站| 亚洲精品影视| 日韩视频永久免费观看| 亚洲欧洲精品一区二区三区不卡| 亚洲电影视频在线| 狠狠色狠狠色综合日日五| 国产伦精品一区二区三区视频黑人 | 欧美一区二区免费| 欧美一级淫片aaaaaaa视频| 亚洲一区二区精品视频| 亚洲视频欧美视频| 9色porny自拍视频一区二区| 一区二区日韩伦理片| 亚洲天天影视| 欧美专区中文字幕| 久久久综合免费视频| 久久先锋影音av| 欧美精品精品一区| 欧美日韩一区二区免费在线观看 | 欧美激情影院| 欧美视频中文字幕在线| 国产精品久久久一区麻豆最新章节| 国产精品久久久久久五月尺| 国产欧美大片| 亚洲二区在线| 一区二区三区四区国产| 亚洲一区一卡| 久热综合在线亚洲精品| 欧美激情综合色| 一本色道久久综合亚洲精品高清 | 欧美成年人在线观看| 欧美日韩成人综合| 国产欧美一区二区精品性| 国产一二三精品| 亚洲三级国产| 欧美在线999| 欧美激情国产日韩| 一本色道久久| 久久五月激情| 国产精品久久久久久妇女6080 | 玖玖视频精品| 99在线热播精品免费| 亚洲欧美中文在线视频| 蜜桃久久av一区| 国产区欧美区日韩区| 亚洲精品一区二区三| 久久xxxx| 一区二区冒白浆视频| 久久久综合激的五月天| 欧美午夜无遮挡| 亚洲日本激情| 久久裸体视频| 亚洲小说区图片区| 欧美99久久| 亚洲电影免费在线|