亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? dma.txt

?? 80386單片機
?? TXT
字號:
WHAT IS D.M.A.?

Consider the problem of moving a large amount of data to or from an I/O
device.  This requirment is commonly encountered in the operation of many
peripheral devices (disk drives, for example) that are constantly moving
large amounts of data into and out of memory.  An ovious way of making
the transfer would be a short program which for an input operation might
read a byte from the I/O port into the accumulator (AX register) of the
8088 processor, and then move the data from the AX register to a memory
location to store it.  In addition, we have to keep track of the memory
locations where the data is going.  By far the simplest way of handling
this is to lay the data down in continuous blocks locations within a block
of memory, using one of the processor's index registers to control the
address.  Each time a byte is transfered, the index register(usually the
DI or Destination Index register) is incremented or decremented to point
to the next location.  A typical example assembly language program to do
this might be as follows:

-----------------------------------------------------------------------

SETUP:  MOV     AX,SEGMENT              ; setup segment of memory transfer

        MOV     DS,AX
        MOV     DI,OFFSET               ; setup start address within segment

        MOV     CX,COUNT                ; setup # of bytes

        MOV     DX,IOPORT               ; DX = I/O port address

READ:   IN      AL,DX                   ; read byte from I/O port        (8)

        MOV     [DI],al                 ; store data                     (10)
        INC     DI                      ; increment index                (2)
        LOOP    READ                    ; continue till CX = 0           (17)

CONT:   ......                          ; yes, continue with program

------------------------------------------------------------------------

The opposite oeration of transfering data from memory to an I/O port is
essentually similar.  The numbers in parentheses following the READ: label
are the number if processor clock cycles required to execute each instruction,
with a total of 37 processor clock cycles required to execute the entire
read segment.  On a standard IBM PC, the clock runs at 4.77 MHz, corresponding
to a clock cycle period of 210 nanoseconds, and the loop takes 37 cycles or
7.8 microseconds to execute.  This would be the fastest we could transfer each
byte.  Note also the following:

1.  The processor is tied up 100% of the time in transferring data; it cannot
    execute any other part of the program while the transfer is underway.

2.  The rate at which the data is transferred is controlled by the processor
    clock and may not correspond to the rate at which the I/O device wants
    to handle the data.  This can be circumvented by polling the I/O device
    to see if it is ready, or having the I/O device generate a hardware
    interrupt; but either of these adds further code to the routine which
    will slows down the transfer rate even further.  In practice because of
    all the stacking of registers that occurs when a hardware intrrupt is
    processed, it is impossible to handle data transfers rates much above
    5 to 10 Khz using interrupts.

3.  If the processor has to handle an interrupt from one device while it is
    involved in handling a data transfer to another device then the delays
    involved may cause it to miss data, or at least will cause the
    discontinuitly in the data flow.


It would be nice to have a way of transferring data without involving the
processor so it can be freed up as much as possible to attend to execution
of the program.  It wouldalso be a plus if we could speed the transfer rate
up and be able to control the rate easily.  Since all we want to do is move
a byte directly to/from an I/O port from/to memory without any sort of
processing on the way,  we are better off not using the processor at all, but
instead proving special hardware that will accomplish this commonly required
task.  The process of connecting an I/O device directly to memory is known
as Direct Memory Access (D.M.A.), and the hardware that controls this process
is known as the D.M.A. controller, which the case of the IBM PC is the function
of the 8237 chip on the system board.



THE MECHANICS OF A D.M.A. TRANSFER

What happens when a device wants to transfer data to/from memory?  The first
step is for the device to send a signal known as a D.M.A. REQUEST (DREQ for
short) to the D.M.A. controller.  The processor normally has control of the
computer's address and data busses as well as control signals such as memory
read/write (MEMR & MEMW) and I/O read/write (IOR & IOW) lines.  To accomplish
a D.M.A. transfer, control of these lines must be passed to the D.M.A.
controllers.  On receipt of the DREQ, the D.M.A. controller in turn issues
a HOLD REQUEST to the processor.  As soon as it is able to, when it has
partially completed the instruction it is currently executing, the processor
issues a HOLD ACKNOWLEDGE signal to the D.M.A. controller, and simultaneously
disconnects itself from the address, data and control busses.  This process
is technically known as "TRI-STATING" as the connections to the processor
assume a third, open circut state, compared to thier usual binary states of
1's and 0's or highs and lows.  On receipt of the HOLD ACKNOWLEDGE, the D.M.A.
controller goes to work.  It realeases its own connections to the address and
control busses from thier tristate condition, asserting a valid memory address
from an internal counter and then issues a D.M.A. ACKNOWLEDGE (DACK) signal
to the I/O device followed by a simultaneous IOW and MEMR for data outpu, or
IOR and MEMW for input.  The perepheral in turn responds to the DACK and IOR
or IOW signals by placing or recieving data on the data buss effecting a
transfer directly to/from meory.  On completion of the MEMR/IOW or MEMW/IOW
from the D.M.A. controller, the controller removes DACK, releases HOLD
REQUEST, tristates its own address and control lines, and increments or
decrements its internal address counter ready for the next transfer.  The
processor in turn regains control of the busses, continuing execution execution
of the next instruction.  From the assertion of the DREQ to completion of the
cycle takes about 2 to 5 microseconds, depending on the length of the
instruction that the processor happens to be engaged in on receipt of the
DREQ.  The accual amount of time between instructions that the processor
loses the buss to the D.M.A. controler is even less, about 1 microsecond.
The effect on program execution is minimal even when transferring data at
very high rates which can approach 350,000 bytes/sec on the IBM PC.  To
prevent the D.M.A.  controller from 'hogging' the busses if the DREQ is
held constantly high, the controller always allows the processor to perform
at least part of an instruction between each D.M.A. transfer, so that even
operating "flat-out", D.M.A. cannot grab much more than 30% of the buss
bandwidth.

In order to perform D.M.A. operations, the perpheral must include hardware
that generates the DREQ and responds to the DACK.  The D.M.A. controller, on
the other hand, is a system component that is a standard feature of the IBM PC
architecture.  Most compatibles also include the D.M.A. controller, with the
execption of the TI Professional.

It is important to appreciate  that the D.M.A. controller sets the dunamics
of the D.M.A. transfer,  that there is nothing in the peripheral I/O device
that can alter the maximum speed at which the controller will handle data.
There are some surpising side effects of this, in particular the IBM PC/AT,
which is genrally 3 times faster than a standard PC or PC/XT, is actually
slower at D.M.A. transfers because its controller operates at 3 MHz instead
of 4.77 MHz on the PC.  On the other hand, it can also perform 16-bit
transfers on its extended data buss, as well as 8-bit transfers on PC
compatible section of its data buss which with the right hardware can make
up for the slower transfer rate.  Although they can operate in D.M.A. mode
in the PC/AT, many boards perform word (16-bit) transfers by making two
sequential byte (8-bit) and so are unable to take advantage of the AT's
extended buss; this being the price paid for PC compatibility.


D.M.A. LEVELS

Although we have discussed the operation of a single device using the D.M.A.,
it is custom to cater to the needs of several devices by providing several
D.M.A. channels, each one dedicated to a peticualar device.  The 8237 provides
four seperate D.M.A. channels, known as levels 0 through 3.  Correspondingly,
there are 4 D.M.A. request lines, DACK 0-3.  These lines are prioritized
according to two possible protocols set by a bit in the controller command
register, either fixed priority, either fixed priority where lower D.M.A.
levels have higher priority than higher levels, or rotating priority, where
each level takes turn at having the highest priority.  The PC BIOS sets the
8237 to operate in fixed priority mode on power up, and it is inadvisable
to change this.  The PC/AT adds to the number of D.M.A. channels by using
two 8237 D.M.A. controllers.  Since one channel is used to cascade one
controller into the other, this is acually adds an additional 3 channels,
all of which appears on the 16-bit additional expanision connectors of the
PC/AT and dedicated to 16-bit transfers.

Apart from its uses for high speed data transfer, the D.M.A. controller
includes counter hardware that cycles through the memory addresses, so as a
byproduct of its design, it can also be used to refresh dynamic memory, saving
the cost of a separate memory refresh controller.  This is what IBM chose to
do in the PC, and on all models Level 0 performs this function with the
DREQ being driven from counter 1 of the 8253 timer at a 15 microsecond
intervals.  The complete assignmentes for the levels are as follows.

For all machines, these levels are capable of 8-bit transfers:

        Level 0 -       Memory Refresh
        Level 1 -       Not assigned and usally avalible, Certain local
                        area network interfaces may use this level
        Level 2 -       Used by the floppy disk controller and not free
                        for any other purpose
        Level 3 -       May be used by the hard disk controller on some
                        PC/XT models. On floppy disk only, PC/AT and some
                        PC/XT machines, this level is free for other uses.

For the PC/AT only, these levels are capable of 16-bit transfers:

        Level 4 -       used for cascading
        Level 5-7 -     Avalaible on AT special connections

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲免费在线视频| 成人av网站大全| 日韩中文欧美在线| 亚洲小说欧美激情另类| 洋洋成人永久网站入口| 亚洲精品国产精华液| 伊人婷婷欧美激情| 亚洲一区视频在线| 天堂成人免费av电影一区| 亚洲国产日韩精品| 日本成人在线视频网站| 免费成人美女在线观看.| 蜜臀久久久久久久| 精品无人区卡一卡二卡三乱码免费卡| 久久精品国产免费| 国产福利一区二区三区视频在线| 国产高清一区日本| 97se亚洲国产综合自在线 | 欧美日韩一区二区在线观看| 欧美日韩中文字幕一区| 6080亚洲精品一区二区| 欧美大度的电影原声| 国产偷国产偷亚洲高清人白洁| 日本一区二区综合亚洲| 亚洲人精品一区| 日韩黄色免费网站| 国产在线乱码一区二区三区| 国产馆精品极品| 91久久久免费一区二区| 欧美高清性hdvideosex| 26uuu色噜噜精品一区二区| 国产精品美女一区二区在线观看| 综合久久久久久久| 日韩成人一区二区三区在线观看| 国内精品视频一区二区三区八戒| 成人激情动漫在线观看| 欧美国产日韩一二三区| 亚洲欧美日韩国产成人精品影院 | 日本午夜精品视频在线观看 | 91麻豆精品国产91久久久久久久久| 欧美电视剧免费全集观看| 国产精品久久久久久久久免费相片| 亚洲人妖av一区二区| 奇米影视7777精品一区二区| 成人一区二区三区视频在线观看| 欧美伊人精品成人久久综合97| 日韩你懂的电影在线观看| 一色屋精品亚洲香蕉网站| 日韩专区欧美专区| 成人美女视频在线观看18| 欧美高清视频www夜色资源网| 国产色产综合色产在线视频| 一区二区三区在线观看动漫| 精品午夜久久福利影院| 欧美性感一区二区三区| 国产校园另类小说区| 亚洲高清在线视频| 成人精品视频一区| 欧美一区二区三区在线观看视频| 国产精品福利一区| 老司机精品视频在线| 在线观看日韩一区| 国产日韩一级二级三级| 视频一区视频二区中文| 91亚洲精品久久久蜜桃网站 | 久久九九久久九九| 日精品一区二区| 91色综合久久久久婷婷| 久久色.com| 亚洲mv在线观看| 91在线精品秘密一区二区| 亚洲精品在线观| 日日嗨av一区二区三区四区| 色婷婷综合久色| 中文在线资源观看网站视频免费不卡| 日韩电影免费一区| 欧美色图在线观看| 亚洲欧美另类小说视频| 丰满亚洲少妇av| 精品蜜桃在线看| 婷婷六月综合网| 欧美在线免费播放| 中文字幕一区av| 成人小视频免费在线观看| 精品国产91亚洲一区二区三区婷婷| 亚洲成人自拍网| 91啦中文在线观看| 国产精品另类一区| 国产一区二区三区国产| 日韩欧美一级精品久久| 日韩国产精品久久久久久亚洲| 成人av片在线观看| 欧美高清在线一区二区| 国产精品白丝av| 久久综合色之久久综合| 美女脱光内衣内裤视频久久影院| 欧美日韩成人在线| 亚洲制服丝袜一区| 91精品福利视频| 一区二区三区产品免费精品久久75| 成人激情动漫在线观看| 国产精品理伦片| 久久久精品国产免费观看同学| 欧美a一区二区| 日韩女优电影在线观看| 美女视频一区在线观看| 日韩免费高清视频| 韩国v欧美v亚洲v日本v| 精品国产sm最大网站| 国产乱理伦片在线观看夜一区| 26uuu精品一区二区三区四区在线 26uuu精品一区二区在线观看 | 国产日韩欧美精品在线| 国产伦精品一区二区三区免费| 精品成人在线观看| 国产精品一区二区x88av| 国产婷婷精品av在线| 国产 日韩 欧美大片| 中文字幕第一区第二区| aaa国产一区| 一区二区欧美在线观看| 欧美无砖专区一中文字| 日韩av在线播放中文字幕| 欧美一二三四区在线| 狠狠色综合色综合网络| 国产欧美视频一区二区| 91蜜桃免费观看视频| 亚洲444eee在线观看| 538prom精品视频线放| 久久综合综合久久综合| 久久久久久电影| 99精品国产视频| 亚洲最大的成人av| 欧美一区二区三区免费大片 | 成人动漫中文字幕| 亚洲欧美日韩国产成人精品影院| 欧美性猛交xxxx乱大交退制版| 天堂资源在线中文精品| 久久老女人爱爱| 91麻豆蜜桃一区二区三区| 首页亚洲欧美制服丝腿| 久久久久99精品国产片| 一本色道久久综合亚洲aⅴ蜜桃| 亚洲成人你懂的| 久久久精品人体av艺术| 日本高清不卡aⅴ免费网站| 男女性色大片免费观看一区二区 | 欧美日韩国产精选| 国产综合久久久久久久久久久久| 欧美激情一区二区三区不卡 | 国产精品日韩成人| 欧美另类变人与禽xxxxx| 国产丶欧美丶日本不卡视频| 一区二区三区精品| 久久久精品国产免大香伊| 欧美中文字幕一区二区三区亚洲 | 成人免费视频网站在线观看| 亚洲亚洲精品在线观看| 国产欧美一区二区精品婷婷| 欧美日韩在线直播| 成人免费黄色在线| 免费一级片91| 有码一区二区三区| 久久久电影一区二区三区| 欧美私人免费视频| 成人国产精品视频| 日韩国产精品久久久| 中文字幕日韩欧美一区二区三区| 欧美一区二区三区色| 99精品桃花视频在线观看| 老司机精品视频在线| 亚洲精品成a人| 国产视频一区在线观看| 欧美日韩1区2区| 色综合天天综合网国产成人综合天| 乱中年女人伦av一区二区| 一区二区三区电影在线播| 久久久久久久精| 欧美mv日韩mv| 91.com在线观看| 欧美自拍偷拍午夜视频| 成人午夜在线播放| 狠狠v欧美v日韩v亚洲ⅴ| 日韩黄色一级片| 亚洲国产精品久久不卡毛片 | 午夜精品一区二区三区免费视频| 日本一区二区不卡视频| 日韩精品中文字幕一区二区三区| 色欧美乱欧美15图片| av亚洲产国偷v产偷v自拍| 国产精品一区在线| 精品一区二区久久久| 日本成人在线不卡视频| 午夜精彩视频在线观看不卡| 亚洲乱码中文字幕| 中文字幕一区不卡| 国产精品国产三级国产普通话三级| 久久久精品tv| 国产午夜精品一区二区三区嫩草 | 色综合久久中文综合久久97| 成人一区二区在线观看|