Professional Documents
Culture Documents
Dma
Dma
5
otorola 68000.
DB
AB
AS
R/W /
UDS, LDS
DTACK
FC0-FC2
()
IPL0-IPL2
HALT
RESET
CLK
BR (bus request)
BG (bus grant)
BGACK
E ()
VMA
VPA
Vcc, GND
E , ,
(IPL0-IPL2) ,
bus (low) BERR,
RESET.
(
).
RESET
BERR
Trace mode
(IPL0-IPL2)
/
TRAP/TRAPV
CHK
o
(
)
RESET
BERR
Trace mode
(IPL0-IPL2)
/
TRAP/TRAPV
CHK
(
)
68000 :
A (autovectored interrupts)
(vectored interrupts)
(non-maskable interrupts, )
interrupts)
(traps)
(restartable
,
(interrupt acknowledge cycle) DB 68000,
byte
,
. 68000
.
, IPL0-IPL2
7 ( ,
7 )
, 1024
256
Program Counter (32 bit) 68000
.
256 ( 4 bytes )
System Stack Pointer (SSP)
Reset.
M 64 ,
192
( vectored interrupts autovectored interrupts) .
IPL0-IPL2
(auto- vectored vectored interrupts).
O 68000 IPL0-ILP2
bit SR.
IPL2-IPL0
bit SR, .
,
:
SR (IntReg).
S-bit SR 1, 68000 Supervisor mode.
T-bit SR 1, tracing
3 bit SR
IPL0-IPL2,
68000 (
).
slide
,
:
(AS),
byte
.
byte
,
A1-A3
AB
IPL0IPL2
hardware (slide 12)
,
AB 0.
, FC0 - FC2=111
( )
DTACK
AS.
(byte )
,
bits A23 A10 0, bit A1 A0. ,
bit 9 2 (8 bit ) byte
DB.
PC
,
.
68000 :
) Priority encoder (PE) to serve 7 peripherals
Source 1 : Vectored Source 6 : Autovectored
Source 7 : NMI
DMUX
1-3 (
,
. IPL0-IPL2)
(VNR)
DB.
A1-A3
DTACK
Global DMUX
A1-A3
Global PE
EN
Group2
Group2
A1-A3
Chain signal
) Polling
Peripherals 50-57 are wired OR to input 5 of the PE. The whole group is
identified as an autovectored interrupt.
Their relative priority is resolved through polling.
Group 6 is configured in autovectored mode.
A3-A1
, ,
.
. ,
, ,
,
. ,
.
restartable interrupts.
68000, (bus error
-BERR- ),
(or memory, due to wait states)
bus (DTACK,
)
.
BERR
, HALT,
RESET. BERR
MMU (Memory Management Unit)
(Virtual) .
.
, slide,
.
BERR ,
BERR HALT.
( ), ( )
(bus cycle rerun)
.
.
68000 bus
, (
slide 8) . ,
:
SR (IntReg).
S-bit SR 1, 68000 Supervisor mode.
T-bit SR 1, tracing.
Program Counter , System
SP (SSP) 4, PC 32
bit.
SR (IntReg) Supervisor Stack, SSP
2, SR 16 bit.
Instruction Register, ( byte)
bus, Supervisor Stack SSP
2. slide.
Supervisor Stack
bus ( 32 bit SSP
4).
Supervisor Stack
bus , SSP 2.
PC
BERR
Address error
Function code (FC0-FC2): User Program Memory
User Data Memory
System Program Memory
System Data Memory
Exception
bus (DMA)
O 68000 system bus (SB)
, . ME
, bus .
68000
system bus :
Bus Request
(BR,
),
Bus Grant (BG 68000 )
Bus Grant Acknowledge (BGACK 68000, BG
SB).
(SB) .
2.6
Interface I/O. :
Local System bus (Local SB, CPU-Memory).
. H .
Backplane bus, ,
/ (.. VME bus)
I/O bus (expansion, external, host), SB
(PCI, USB, SCSI).
.
:
(expandable),
(on-the-fly). :PCI, USB, SCSI, PCMCIA
(non-expandable),
.. IIC, VME
, master/slave.
.. DMA ,
, .
interfaces .
,
.
,
.
,
.
(bus
arbitration).
,
, (Local System Bus)
(Global bus).
2.6.1
.
,
. ,
, .. DMA (DMAC).
(Local System Bus, Local SB)
(slide 19) :
BREQ (Bus REQuest),
.
,
.
O ME Local SB BGT.
DMAC Local SB. DMAC
Local SB BGACK.
BREQ. BGT. DMAC
,
. DMAC Local SB
BGACK. Local SB.
2.6.1.1 (central
serialized arbitration)
DMAC
daisy-chain,
BREQi
BREQ
wired-or . daisy-chain
BGT .
Local SB
DMAC
BGACK.
Local SB,
BGT
BGT . Local
SB BGACK. E
, BGT ( BGT
) ,
Local SB, BGACK .
( DMAC).
2.6.1.2 DMAC
) Burst mode (halt)
. (..)
/O. (
, CLK ) .
, .
3-state buffers
DMAC
DMA Synchronization clock ( 1 2, duty
cycle =1).
Data
DMAC
2.6.1.3 DMAC
4 channel DMAC
Status register : busy/free
status for all channels
Command register : Mode
of operation, read/ write
Memory address register :
.
INC.
Byte counter :
bytes
CE (Chip Enable)
DBG (Device Bus Grant)
LPRQ (Lower Priority ReQuest)
MPU0
, AS.
,
, device bus request (DBR0)
(bus arbiter 0).
BREQ0 o
3--8.
,
BGT0. ,
BGTi
. i,
(ASi=1, CEi=1).
reset
BUSY. , (bus arbiter 0),
BUSY
. ,
device bus grant (DBG0). ,
BUSY. ,
.
GB ,
, GB (
)
GB.
, GB
GB. ,
wired-or LPRQ (Lower Priority Request) BREQ.
, GB
LPRQ, BREQ,
BGT
, BGT
.
GB
(BCLK) .
Y
(LOCKi).
16 bit
I/O 8 bit, , ,
interfaces ( slide).
, o
I/O DMAC,
/
/. O DMAC
.
,
(dual
port
memory)
2.7.1
. I/O
I/O,
(.. , , )
(.. ,
), .
/ , /
(..
).
O /
(System bus, SB).
,
dual port
/O. dual port,
I/O SB (interface to SB). H dual port RAM,
.
6 (semaphore
registers), dual port.
dual port /.
2.7.2 .
K 8-bit, bits
. bit 7 bit.
1, , (
/). bit 6
.
SB.
(mutual exclusion).
test
Wait:
test X
bmi Wait
set X
.
,
, set X
Indivisible read, test and indicate resource
allocation operation Non- interruptable Read modify write operation (
3 )
, , Test
And Set (TAS) .
TAS (read) , (modify)
(write) bit , .
setting bit. :
Wait :
TAS X
BMI Wait
TAS
bit (bit 7) 0
bit . E .
bit bit. ,
bit 1,
, o .
T bits
. ,
. , bit 7
0.
, lock X unlock X.
( ).
unlock X bit 7
( dual port, /).
lock X bit. (
, ),
. ( ),
bit .
unlock X:
CLR X
lock X:
Wait
TAS X
BMI Wait
X<7>:=0
WAIT: if X<7>=1 then N:=1
Else N:=0; X<7>:=1;
If N=1 then goto Wait
2.7.3 (bus
masters) I/O
(slide 37) .
E
SB I/O.
(slide 46). () :
( , , ,
) dual port
/. () : / ,
, DMAC o
. () : , /,
dual port,
( "", ) M .
I/O.
dual port
(SYN1 SYN2)
. (EXCL)
M
/ /.
2.7.3.1 .
dual port /
EXCL. lock
( /)
, unlock .
SYN1 SYN2
dual port /.
unlock SYN1
/
. Lock SYN1
I/O .
unlock SYN2, /
.
Lock SYN2, .
EXCL, lock SYN 1 SYN2 . ,
,
( ).
(A) :
dual port
/.
(B) : /
,
DMAC
o
.
() :
,
/,
M