前两天看书碰到了“CPU架构”这个词,脑子里感觉有点模糊不懂。查阅相关资料后又陆续碰到了“指令集架构”、“微架构”、“处理器架构”等词,于是就更加懵逼了。接着又陆陆续续的看了些资料,同时结合自己的一些理解,给出这些词的解释,也方便以后查阅。以下关于“指令集架构”和“微架构”的英文解释摘录于维基百科(参考资料1和2):

  1. 指令集架构
     An instruction set architecture (ISA, 指令集架构) is an abstract model of a computer. It is also referred to as architecture or computer architecture. A realization of an ISA is called an implementation. An ISA permits multiple implementations that may vary in performance, physical size, and monetary cost (among other things); because the ISA serves as the interface between software and hardware. Software that has been written for an ISA can run on different implementations of the same ISA. This has enabled binary compatibility between different generations of computers to be easily achieved, and the development of computer families.
     An instruction set architecture is distinguished from a microarchitecture (微架构), which is the set of processor design techniques used, in a particular processor, to implement the instruction set. Processors with different microarchitectures can share a common instruction set. For example, the Intel Pentium and the Advanced Micro Devices Athlon implement nearly identical versions of the x86 instruction set, but have radically different internal designs.
  2. 微架构
     In electronics engineering and computer engineering, microarchitecture(微架构), also called computer organization and sometimes abbreviated as µarch or uarch, is the way a given instruction set architecture (ISA, 指令集架构), or the ways the PCB is pathed in the Processing unit, is implemented in a particular processor. A given ISA may be implemented with different microarchitectures; Implementations may vary due to different goals of a given design or due to shifts in technology.

     根据以上维基百科关于指令集架构和微架构的解释以及我自己的理解。我对指令集架构的粗略理解是:指令集架构就是设计了一堆指令(数据处理和存储操作、算术和逻辑操作以及控制流操作等,具体的就是一段一段的机器二进制编码)。由于整个计算机系统是硬件和软件的集合,最后指令的具体执行就是在计算机硬件(主要是CPU)上的二进制机器码对应着的高电平与低电平的变化。假设加指令对应着二进制机器码:10010010. 在设计完指令集架构之后,还得去具体地去实现该指令集。具体的实现就是怎么去设计CPU里面的硬件电路啥的使得CPU收到这一串二进制机器码之后就做出指令集架构规定的加指令相应的操作并得到对应的结果。指令集的硬件实现就是微架构处理器架构和CPU架构是一个比较模糊的概念,它们同时包含了指令集架构和微架构的内容。
     对于同一个指令集架构可以有不同的微架构,比如 Intel Pentium 和 Advanced Micro Devices Athlon 都采用的是x86指令集,但是它们的微架构却完全不同。不同的微架构可能是考虑到了性能、物理尺寸以及成本多方面的问题,具体可看如下摘录自维基百科的介绍:

  • An ISA specifies the behavior of machine code running on implementations of that ISA in a fashion that does not depend on the characteristics of that implementation, providing binary compatibility between implementations. This enables multiple implementations of an ISA that differ in performance, physical size, and monetary cost (among other things), but that are capable of running the same machine code, so that a lower-performance, lower-cost machine can be replaced with a higher-cost, higher-performance machine without having to replace software. It also enables the evolution of the microarchitectures of the implementations of that ISA, so that a newer, higher-performance implementation of an ISA can run software that runs on previous generations of implementations.

     指令集架构是计算机的一种抽象模型。指令集架构是具体硬件和软件之间的接口。针对同一指令集架构编写的软件可以运行在采用该指令集架构而微架构不同的机器上。由于指令集架构中的指令较多,如果直接使用机器码(也就是指令对应的二进制码)来编写软件会比较困难。这样就出现了如c++等高级语言,经过高级语言编写完程序之后再经过编译器软件将高级语言编译成对应的机器码就可以在机器上执行了,因为实际的硬件只认识机器码。
     参考资料3、4和5也是对指令集架构和微架构区别等的相关解释。参考资料6对常见的指令集架构做了相关解释和列表。
  
---------------------------------------------分割线(2020.09.04)------------------------------------------------------------------------

     指令集架构有很多的分类方法,主要的分类通过架构的复杂度来分类,可以分为复杂指令集计算机(complex instruction set computer, CISC) 和精简指令集计算机(reduced instruction set computer, RISC) 。复杂指令集计算机有许多特别的指令,它们中的一下很少在程序中使用。精简指令集计算机通过只实现经常被使用的指令来达到对复杂指令集计算机精简的目的,对于一些不太经常使用的操作可以通过经常使用的简单指令的组合来实现。
     复杂指令集计算机简单的理解就是提供的指令很多,也都很复杂。以 intel 的 x86 架构为代表,主要针对的操作系统是微软的 Windows 和苹果的 maxOS。另外 Linux,一些 UNIX 等,都可以运行在复杂指令集架构的微处理器。(参考与这里
     精简指令集计算机简单理解就是提供的指令很少,也都比较简单,只是一些基础的指令。以 ARM 公司的 arm 架构为代表。当前有 UNIX、Linux 以及包括 iOS、Android、Windows Phone 等在内的大多数移动操作系统运行在精简指令集的处理器上。(参考与这里

     内核,在不同领域里表达的是不同的东西,是指一个东西的核心部分,具体是什么,要看你指的是什么东西。
参考于这里):

  • 在操作系统领域,内核指的是操作系统的核心部分。通常包括中断处理、任务管理、调度等功能,同时又有微内核、宏内核、混合内核等分类。
  • 在浏览器领域,内核一般是指浏览器的渲染引擎,也是浏览器的核心部分,比如是webkit还是IE等等。你说的UC内核,指的是浏览器领域的内核概念。
  • CPU领域,一般都叫核心,简单的理解就是CPU的核心部分,早期CPU只有一个核,但是随着技术的发展现在也出现了包含多个核的CPU。

通过功能架构 功能架构英文_处理器里面看到说该芯片是基于ARM某某内核,这里的内核指的是指令集架构。

     参考资料:

  1. https://en.wikipedia.org/wiki/Microarchitecture#Aspects_of_microarchitecture
  2. https://en.wikipedia.org/wiki/Instruction_set_architecture#Machine_language
  3. https://www.quora.com/What-is-the-difference-between-architecture-and-microarchitecture-in-CPU
  4. https://sidkashyap.wordpress.com/2012/10/06/instruction-set-architecture-vs-micro-architecture/
  5. https://www.zhihu.com/question/23474438
  6. https://en.wikipedia.org/wiki/Comparison_of_instruction_set_architectures