Title: ?????????????????? CPU
1???????????????????????????
2?????????????????? CPU
- ??????????????????????????????????????????????????
?? - ??????????????????????????????????????????????????
??? (fetch) - ??????????????????????????????????????????
(decode) - ???????????????????????????????????????????
- ?????????????????????? (execute)
- ????????????????????????????
- ?????????????????????????????????
3The ALU
- ?????????????????????????????????????
????????????? ?????????? - ????????????????????? Operator 2 ???? 1 ???
??????????? operation - Function ??????????????? ??? ALU ?????????
- Add , Subtract
- AND, OR, Exclusive OR, Complement
- Shift Right, Shift Left
- Increment, Decrement
- ALU ???????????????????????????
????????????????????????????????????????
???????????????????????????????????? Programming
Model
4The Microprocessors Register
- Microprocessor ?????? ?? Register ?????????????
Accumulator, Program Counter, Stack Pointer,
Status Register, General-purpose Register, Memory
Address Register, Instruction Register ???
Temporary data Register - Register ??????????????????????????????
Programming Model ???????????????????????????
Programmer - Register ?????????????????????????????
???????????????????? - ???????? Register ??????????? Architecture ?????
Microprocessor ?????????? Register ???
?????????????????????????????
5The Accumulator
- ???? Register ???? ???????????????????????????????
? ? - ??????????? ?????????? ??? ?????????????
?????????????? ALU ??? Accumulator - ??????????????????????? Operator 2 ??? ????
Accumulator 1 ??????? 1 ??? ????? Register
???????? ??????????? - ???????????????? ??? Accumulator
???????????????????? ??????? Microprocessor
??????????????????????????? ? ???? ??????? Input
/ Output - ??????????????????????????????????????????????
?????????????????????? Source ????? Accumulator
???? ??????? ????????????? Accumulator ?????
Destination
6The Accumulator
- Microprocessor ?????????????? ????????????????????
Accumulator ??? ??????? Set ??? bit ???? ??? bit
??????? 0 ???? 1 - Register ????????? Architecture
?????????????????????????? ???????????????????????
??????? ????? Accumulator ???? ??????????????
Accumulator ???????????????????????????????
????????????????????? Register ??????? ? - Microprocessor ???????? Double-length Accumulator
, Multiple Accumulator ??????????????????????? ?
???????? ????????
7The Program Counter
- Program Counter ??????????????????????????????????
??????? ?????? ???????? Microprocessor
?????????????????? ? - ?????? ??????????????????????????
?????????????????????????????? - ??????? Program Counter ??????????????????????????
???? Data bus ?????? Microprocessor ???? 8-bit
?????????????? Program Counter ????? 16-bit
??????????????????????????? ?????????? 0 ???
65,535 - Program Counter ???????????? Internal Data Bus.
Program Counter ?????????????????????????? ?
????? Microprocessor ??? ??????????????
?????????????????? Program Counter
8The Program Counter
- ??????? Microprocessor ??????????????????????
???????????????????????????????????????????????
?????? Program Counter - ??????? ?????????????????? Reset ??? bit ???
Program Counter ??????? 0 ???? Set ??? bit ???
Program Counter ??????? 1 - ?????????????????????????????????? ??????????
Program Counter ????????????????? ???? ??????
???????????? Microprocessor ????
???????????????????????
9Program Counter (Fetch instructions)
- ????????????????????????? Microprocessor
?????????????????? Program Counter ????????
Address Bus ?????????????????????????????????????
???? - ??????????????????? ???????????? Instruction
Register - ?????????????????????????????? Microprocessor.
Program Counter Register ???????????????????
????????? 1 ??? ??? ????????? - Program Counter Register ?????????????????????????
????????? ??????????????? execute ?????????????? - ?????????????? ??????????? Program counter
??????????????????????????? ??????????? ?.
?????????? ??????????? ??????? ???????????????????
? ????????????? ?.??????????????????????????
10The Status Register
- ????????????????????? Flag Register
- ?????????????????????????????????????????????? ?
?????????????????? Microprocessor - Flag Register ?????????????????????
??????????????????????????????????????????
?????????
11Status Register bits
- Carry / Borrow ???????????????????????????????????
??????? ???????????????? - Zero ??? Set ????? ??? Bit ??? Register
?????????? ??????? ???? 0 ??? - Negative ??? Set ????? MSB ??? Register
????????????????????????? 1 - Intermediate carry ??? Set ?????
?????????????????? 4 bit ??? 4 bit ????????????? - Interrupt flag ???????????????????????????????????
?????? Interrupt ?????????????????????????????????
? / Microprocessor ???????? Interrupt flag
??????? ??????????? Interrupt ???? ? ?????? - Overflow ??? Set ?????????? Set ??? Carry flag
??? Sign flag ?????????????????? 2S - Parity ??? Set ????????????? Bit ??????? 1
?????????????????? Register ??????????
12The Stack Pointer
- Procedure calls ?????????????
??????????????????????????????????????????????????
?? ?????????????????????????????????????? Program
Counter Register - ???????????????????????????????????????????
????????????????? ?????????????????? ????????
Stack ????? Stack Pointer ?????????? - ???????????? Stack ???????? Pushes ???????????
Stack ???????? Pops - ??????????????????????? LIFO ( Last In First Out
) - Stack Pointer ??????????????????????? ?????????
- ???????????????? Microprocessor
????????????????????????? ??? Stack Pointer
?????????????????????????? Stack ???????????
Stack Pointer ?????????????????????????? ???????
??????????????????????
13General Purpose Register
- ????????????????????????????????
- ??? Microprocessor ????????? General Purpose
Register ???????????????? Accumulator
???????????? ALU ????????????????????? Register
????????????? - ??????????????????? Register ?????????????
(?????????? 8 bit) ???? ????????????????? ???
Register (Register Pair, ?????????? 16 bit) ????
BC, DE, HL
14Instruction Register
- ???????????????????????????????? Microprocessor
??????????????????? - Instruction Register ????? Load
????????????????????????????? fetch/execute cycle
???? Instruction Cycle - ??? Diagram Instruction Register ??????????
Internal Data Bus ????????????????????????????????
??? ??????????????????????? Internal Data Bus ??? - ???????? Instruction Register ??????????????
Input ??????? Control Logic ??????????????????????
??????????????????????
15Instruction Register (Fetch/Excute Cycle)
- ???????? fetch/execute Cycle
- ????????? fetch ?????? ???????????????????????????
Program Counter ??????? - Program Counter ??????????????????????????????????
???? - ????????? fetch ????????????????????? Internal
Data Bus ????????????????? Instruction Register - ??????? ????????? execute ?????????? execute
??????? Instruction Decoder ???????????????
??????????? Instruction Register ???
?????????????????????????????????? ?
?????????????????????????????????????? - ??? Microprocessor Instruction Register
???????????????????? Data ??? Microprocessor
??????????? 3 - 4 bits
16Temporary Data Register
- ????????? ALU ????????????????????????????????????
????, ALU ????????????????????????????????????? ?
????????????????????????????????????, Temporary
Register ?????????? ALU ????????? - ??????????? ?? Temporary Register 2 ??? ???
Microprocessor ??????????????? ???????????
Architecture ????? - Temporary Register ????????? Programmers model
??????????????????????????????????????????
Programmer
17Microprocessors Logic Control
- ????????????????????????????????? ? ???
Microprocessor ?????????????? - ????????????????????????????????????????????? ?
??? Instruction Register - ????????????????????????????????????? ?
?????????????????????????????? ????????
Micro-programmed ???? Micro-coded - ??????????? Microprocessor ??????? ?
???????????????????????? - ???????????????????????????????????????????????
??? Instruction Decoder - ??????????????????????? ? ?????????
???????????????????? ? ?????????? ????
??????????????? Memory , I/O , ????????
????-??????????? ???????????????? - ????????????? ? ???????????????????? ????
???????????? ???????????????????????????????,
?????? Interrupt
18Microprocessors Internal Data Bus
- ALU ??? Register ??????????????????????? Internal
Data Bus - ???????????????????? Microprocessor ?????????
Internal Data Bus - ???????? ? ????? Microprocessor ????????
????????? Internal Data Bus ???????????
Bi-directional - Microprocessor ????????????????????? Internal
Data Bus ??? External Data Bus ???????????????????
???????? ????????????????? ???? ??????? I/O - ?????????????????????????????????????????
Internal ??? External Data Bus ????????
Bi-directional Bus Transceiver - ???????? ? ????? Microprocessor
??????????????????? Internal Data Bus
??????????????????? Control Logic
19???????????????????????????????????????
- Introduction to Microprocessor Architecture
20The Microprocessor Block Diagram and Programmers
Model
- ???????????????? ? ????? Microprocessor
??????????????????????????????????? - Block Diagram ???????????????????????????????????
Microprocessor ???????????????????????? Hardware - Programmers Model ??????????????????????????
???????????????? Registers ??? Programmer
??????????????????????????????
21Programmers model / Programming model
2268000 Programmers model
M68000PRM.pdf
23IA32 Programmers model
GPR
MMX
SSE
FPU
8 of 80 Data Reg.
IA-32 Intel(R) Architecture Software Developers
Manual Vol 1 - Basic Architecture.pdf
24Microprocessor Block Diagram
25Microprocessor Block Diagram ZiLOG Z8018x Family
ZiLOG Z8018x Family
26Microprocessor Block Diagram Intel 8088 8
Bit Data Bus, 16 Bit Int.
278088 Memory Organization
- The processor provides a 20-bit address to memory
which locates the byte being referenced. - The memory is organized as a linear array of up
to 1 million bytes, addressed as 00000(H) to
FFFFF(H). - The memory is logically divided into code, data,
extra data, and stack segments of up to 64K bytes
each, with each segment falling on 16-byte
boundaries.
288088 Memory Organization
- The segment types were chosen based on the
addressing needs of programs. The segment
register to be selected is automatically chosen
according to the rules of the following table.
298088 Memory Organization
- All information in one segment type share the
same logical attributes. By structuring memory
into relocatable areas of similar characteristics
and by automatically selecting segment registers,
programs are shorter, faster, and more
structured. - Word (16-bit) operands can be located on even or
odd address boundaries. - Little Endean For address and data operands, the
least significant byte (LSB) of the word is
stored in the lower valued address location and
the most significant byte (MSB) in the next
higher address location. The BIU will
automatically execute two fetch or write cycles
for 16-bit operands.
30Introduction to Computer Systems Structures
31Intel386 Processor System
The Industry Standard Architecture
The X-bus is a buffered version of an ISA bus in
which the system peripherals such as keyboard,
mouse, and DMA controllers are connected.
Design Considerations for Migrating Intel386
and Intel486 Processor Embedded Systems to the
Pentium Processor Application Note
32Intel486 Processor System
The local bus concept was introduced to speed up
data fetches. This is particularly useful for
devices that need a high data transfer rate, such
as video graphics memory. This is also known as
VESA local bus
33Pentium Processor System
the branch prediction algorithm has been
improved, and support for Intel MMX technology
has been added which is an extension to the Intel
architecture (IA) instruction set that adds 57
new opcodes and a new MMX register set.
34Basic System Timing
35(No Transcript)