Intel-80386 microprocessors (IA-32 architecture)

80386

October 1985, Intel released its first chip 32-bit microprocessors 80386.80386 and 80286 is a high-performance all-compatible 32-bit microprocessor, it is for applications requiring high performance and multi-field user, multi-tasking operating system design.

80386 chip integrated within a memory management unit and hardware protection mechanism, the structure and operating systems are all internal registers are 32-bit. It is a 32-bit address line, addressable physical storage space 4GB (232), 80386 supports a virtual address space (logical address space) can reach 64TB (Tera Byte).

80386 32-bit external bus interface, the maximum data transfer rate of 32MB / s, has a function to automatically switch the data bus width. CPU read / write data width can be freely switched between 32 bits to 16 bits, compatible with 8086 / 8088,80286. It supports 8-bit, 16-bit or 32-bit data types, eight general-purpose 32-bit registers, named EAX, EBX, ECX, EDX, ESI, EDI, EBP, ESP, which is the lower 16 bits may be used alone. It has three modes: real-address mode, protected mode and virtual 8086 mode. Real address mode and virtual 8086 and 8086 the same way, the existing 8088/8086 software without modification can be run in two ways 80386; protection can support virtual memory, multitasking and protection, including protection 80286 way function.

Chip integrated memory management unit (the MMU), and supports virtual memory protection privilege, the virtual memory space up to 64TB (246B). Memory organized in segments, each up to 4GB, therefore 64TB virtual storage space to allow each task can have up to 16,384 segments. Memory protection mechanism using four privilege level, chip select paging unit. Internal multi-tasking agency, can quickly complete the task switching.

80386 using more advanced than the instruction pipeline structure 8086, efficiently and in parallel to complete the fetch, decode, execute, and storage management functions. It has enhanced instruction prefetch queue, command queue 6B 8086 increased from 16B. For faster access, the system is also provided a cache memory (the Cache), a complete Cache, main memory, secondary memory storage system 3 fractions.

80386 microprocessor internal structure

80386 80286 compatible with a first full 32-bit high-performance microprocessor, a ceramic sheet 132 in line with the pin grid array package

Features:
1,80386 chip on a hardware configuration of six logic units, they work in a pipelined manner.
2, three kinds of work: real mode, protected mode, V86 mode (virtual 86 mode)
3, hardware support stage management, page management, easy to implement virtual memory system
4, hardware support for multitasking, an instruction to complete the task switch
5, the privilege level of protection: 0,1,2,3, level
Here Insert Picture Description
1, a bus interface unit (the BIU)
2, an instruction prefetch unit (the CPU)
. 3, instruction decoding means (the IDU)
. 4, execution unit (EU)
5, segment management member (the SU)
. 6, the page management means (PU)

Register structure:

Here Insert Picture Description
Class Register 80386 7:
1, general purpose registers (eight 32-bit registers the EAX, the EBX, the ECX, EDX, ESI, EDI, EBP, the ESP)
2, segment registers (80386 to increase data FS, and GS segment registers two segment registers is no longer stored in the segment base 16 is high, but the selector)
3, an instruction pointer and flag registers (EIP and the EFLAGS)
. 4, control registers (CR0 is, CRl, CR2 is, CR3)
. 5, the system address register ( GDTR- global descriptor table register, IDTR- interrupt descriptor table register, LDTR- local descriptor table register, a task register TR-)
6, debug registers (DR0-DR7)
. 7, test register (TR0-TR7)

Details Reference: https://blog.csdn.net/qq_42856154/article/details/89668124

Three operating modes

1、实地址模式(Real Address Mode)
当刚加电启动或复位时,操作系统自动控制进入实模式,用于初始化系统,为保护模式所需要的数据结构做好各种配置和准备,实模式下,80386类似于8086体系结构,兼容8086。
2、保护虚拟地址模式(Protected Virtual Address Mode)
实模式结束后进入保护模式,提供了多任务环境中的各种复杂功能以及对复杂存储器组织的管理机制
例如:多用户、多任务、虚拟存储空间、保护机制。
3、虚拟8086模式(Virtual Address 8086 Mode)
1、使80386可以快速的执行多个8086应用程序
2、段寄存器的用法和实模式时相同
3、存储器寻址空间1MB,可以使用分页机制,支持多任务
4、该模式运行在3级,80386中一些特权级指令不能使用

详细信息参考:https://blog.csdn.net/qq_42856154/article/details/89743391

存储器管理

80386利用片内的存储管理单元(MMU)来实现对存储器系统的两级管理:分段管理(逻辑地址-线性地址)和分页管理(线性地址-物理地址)

详细信息参考:https://blog.csdn.net/qq_42856154/article/details/89740362

保护机制

详细信息参考:https://blog.csdn.net/qq_42856154/article/details/89765200

80386外部结构

Here Insert Picture Description

80386 DX有132根引脚,采用PGA(Pin Grid
Array,引脚网格阵列)封装,采用这种封装工艺单根引脚所占用的面积较双列直插时小,因此引脚数目可以多一些,不必再采用引脚复用技术。因此,在80386中数据线和地址线是分开设置的,控制信号和状态信号也不再复用引脚。其中34条地址线(A31~A2、BE3~BE0),32 条数据线(D31~D0),3 条中断线,1条时钟线,13 条控制线,20 条电源线VCC,21条地线VSS,还有8 条为空。

与8086/8088 相比,需要说明以下几点:

1)时钟( CLK2): 80386 的基本定时信号由CLK2 提供。CLK2 的频率是80386 内部时钟信号频率的两倍,输入该信号与82384 时钟信号同步,经80386 内部2 分频之后得到80386 的工作基准频率信号。

2)数据总线(D31~D0):为80386 和其他设备之间提供数据通路,32 位数据总线,双向三态,一次可传送8 位、16 位或32 位数据,由输入信号(BE3~BE0)和BE16确定。在任何写操作周期(包括暂停周期和停机周期),80386 总是驱动数据总线的所有32 位信号,而不管当前总线的实际宽度。

3)地址总线(A31~A2,BE3~BE0):

  • A31~A2:地址总线,输出三态,和BE3~BE0相结合起到32位地址的作用。80386地址总线包含A2~A31地址线和字节选通线BE3~BE0。BE3~BE0线的功能与8086和80286系统的A0和BHE非常相似,它们是内部地址信号A0和A1的译码。由于80386有一个32位数据总线,所以内存可以建立4B宽的存储体。BE3~BE0信号是用来选通这4B个存储体。这些单独选通可以使80386 的内存传送或者接收字节、字或者双字。

  • BE3~BE0:字节选通信号。用于选通在当前的传送操作要涉及4B数据中的哪几个字节。BE0对应于D0~D7,BE1对应于D8~D15,BE2对应于D16~D23,BE3对应于D24~D31。

4)总线周期定义信号(M/IO,W/R,D/C,LOCK,三态,输出,用来定义正在进行的总线周期类型):

  • M/IO:存储器/输入输出选择信号,输出信号。高电平时访问存储器,低电平时访问I/O 端口。80386 直接I/O 端口简单地把8086 和80286 端口结构扩充成32 位端口。32 位I/O 端口可以通过并联8 位I/O 端口设备(如8255A)来构成。80386 可以使用所有8 位端口地址的IN 或OUT 指令来编址256 个8 位端口、128 个16 位端口、64 个32 位端口。使用DX 寄存器存放16 位端口地址,80386 可以编址64K 个8 位端口、32K 个16 位端口或8K 个32 位端口。

  • W/R:读/写控制输出信号,高电平时写入,低电平时读出。

  • D/C:数据/指令控制信号,输出。高电平时传送数据,低电平时传送指令代码,D/C指示总线操作是一个数据读/写还是控制字传输(如取一个操作码)。

  • LOCK:总线周期封锁信号,低电平有效。

5)总线控制信号(ADS,READY,NA,BE16):

这组信号用来表示总线周期何时开始,以及数据总线的宽度和总线周期的终结。

  • ADS:地址选通信号,三态输出,低电平有效。当有效时,表示总线周期中地址信号有效。当有效地址、BE信号和总线周期定义信号均在总线上时,ADS信号将被设置。因为80386 地址总线是不可复用的,所以8086 类型的ALE 信号是不需要的。但是,在某些80386 系统中,ADS信号用于一种称为地址流水线的模式,将地址传送到外部锁存器。地址流水线的原理:如果一个地址保持在外部锁存器的输出端,80386 就可以把地址引脚上的“老”地址清除,并在总线周期的前期输出下一个操作的地址。外部控制芯片通过设置下一个地址信号来通知80386 何时为下一个操作输出地址。对一个有SRAM 高速缓冲的系统,流水线地址模式通常不是必需的,因为SRAM 高速缓冲已足够快了,不需要等待状态。

  • READY:准备就绪,输入信号,低电平有效。READY有效时表示当前总线周期已完成。信号用来在总线周期中根据低速的内存或I/O 设备接口的需要插入等待状态。

  • NA:下一个地址请求信号,输入信号,低电平有效。允许地址流水线操作,当其有效时,表示当前执行中的周期结束之后,下一个总线周期的地址和状态信号可变为有效。

  • BE16:输入信号,低电平有效,指定16 位数据总线。BE16输入端允许80386以16位和/或32位数据总线工作。如果设置了BE16,那么80386只将数据传送到32位数据总线的低16位上。如果设置了BE16并且要从16位宽内存中读一个32位的操作数,那么80386将自动产生一个第二总线周期来读第二个字。对于未调整的传输,如果设置了BE16,那么80386 也产生所需数目的总线周期。

6)总线仲裁信号(HOLD,HLDA) :由总线请求主设备来控制该组信号:

  • HOLD:总线请求信号,输入信号,高电平有效。

  • HLDA:总线保持响应信号,输出信号,有效时,CPU 让出总线。

7)协处理器接口信号(PEREQ,BUSY,ERROR) :控制80386 同80287 或80387 之间的通信:

  • PEREQ:来自协处理器的请求信号,输入信号,表示80387 要求80386 控制它们与存储器之间的信息传送。PEREQ 信号是由一个像80387 浮点处理器这样的协处理器输出的,它通知80386 为协处理器取数据字的第一部分,然后协处理器将接管总线并读数据字的其余部分。

  • BUSY:协处理器忙,输入信号,低电平有效。BUSY信号由协处理器使用。以避免80386 在协处理器结束当前指令之前又继续下一条指令。

  • ERROR:协处理器错误信号,输入信号,低电平有效。如果协处理器设置了ERROR 信号,80386 将执行类型为16 的异常中断。

8)中断信号( INTR,NMI,RESET) :用来引起中断或中止80386 正在执行的指令流:

  • INTR:可屏蔽中断请求,输入信号。80386 响应INTR 请求时,完成两个连续的中断响应周期,在整个响应周期,LOCK信号有效。在第二个周期末,D0~D7数据线上送出8位中断类型码,以识别中断源。INTR信号可以由80386的标志寄存器中的IF位屏蔽。

  • NMI:非屏蔽中断请求,输入信号。80386对NMI的处理不运行中断响应周期,而是自动产生一个中断类型2。

  • RESET:复位信号,输入信号,当RESET 有效时,将中止80386 正在执行的一切操作,并置于一个已知的复位状态。
    80386有许多VCC 脚,也有许多标为VSS 的地线,这些引脚均被接到PC板合适的电平上。

IA-32架构

英特尔32位架构(Intel Architecture, 32-bit,缩写为IA-32),常被称为i386、x86-32或是x86,由英特尔公司推出的复杂指令集(CISC)架构,至今英特尔最受欢迎的处理器仍然采用此架构。它是x86架构的32位延伸版本,1985年首次应用在Intel 80386芯片中,用来取代之前的x86 16位架构(x86-16),包括8086、80186、80286芯片。

IA32 a central processor (CPU) includes a set of registers stores eight 32-bit values. These registers are used to store pointers and integer data, while in the original 8086, the register is 16 bits.
386 The above figure is the internal structure of IA-32 architecture:
Here Insert Picture Description

Guess you like

Origin blog.csdn.net/qq_42856154/article/details/90523969