| Both sides previous revision Previous revision Next revision | Previous revision |
| docs:techref:hardware:cpu [2021/08/16 18:31] – formatting vgaetera | docs:techref:hardware:cpu [2021/10/15 09:06] (current) – ↷ Links adapted because of a move operation bobafetthotmail |
|---|
| Without going into detail you could say, the ISA is the whole of commands (absolute instructions/machine code instruction) the programmer/compiler can see and use. If you program in assembler (or write machine code), you will have to know these instructions. If you program in a higher language, the compiler (or the cross-compiler) will take care of this for you. It will translate your source code into machine code for the ISA (in compiler surroundings abbreviated ARCH for architecture) specified. | Without going into detail you could say, the ISA is the whole of commands (absolute instructions/machine code instruction) the programmer/compiler can see and use. If you program in assembler (or write machine code), you will have to know these instructions. If you program in a higher language, the compiler (or the cross-compiler) will take care of this for you. It will translate your source code into machine code for the ISA (in compiler surroundings abbreviated ARCH for architecture) specified. |
| |
| When you "cross compile" it means that you compile the source code on a machine that has a different ISA than that of the target machine you will run the compiled code on. For this the compiler needs to know the ISA for your target ARCH (architecture). Follow this link to learn how to [[docs:guide-developer:crosscompile| cross compile]]. For more information on ISA, see the white paper at: [[wp>Instruction_set_architecture|Instruction set]]. | When you "cross compile" it means that you compile the source code on a machine that has a different ISA than that of the target machine you will run the compiled code on. For this the compiler needs to know the ISA for your target ARCH (architecture). Follow this link to learn how to [[docs:guide-developer:toolchain:crosscompile| cross compile]]. For more information on ISA, see the white paper at: [[wp>Instruction_set_architecture|Instruction set]]. |
| |
| Designing an Instruction Set is more just saying "I want to use these instructions". The underlying logic of how data goes in/out and how it is manipulated when instructions are processed, this has to be designed as well. How all of this can be implemented in a physical [[wp>Integrated Circuit]] (IC or simply Chip) has to be designed too. Some stages of this overall design are often covered by patents or other Intellectual Property protections. Some CPU design companies exist only to create and license their designs to others who will integrate them into their own physical devices. | Designing an Instruction Set is more just saying "I want to use these instructions". The underlying logic of how data goes in/out and how it is manipulated when instructions are processed, this has to be designed as well. How all of this can be implemented in a physical [[wp>Integrated Circuit]] (IC or simply Chip) has to be designed too. Some stages of this overall design are often covered by patents or other Intellectual Property protections. Some CPU design companies exist only to create and license their designs to others who will integrate them into their own physical devices. |
| Code compiled for ARM should run on any ARM-ISA, but code speficifally compiled for ARMv7 will not run smoothly or not at all on an ARMv5 ISA. So, it is imperative to keep the ISA stable for many years, thus there are only few or no updates at all! To still be able to develop and advance the ISA, and thus give the programmer (or the compiler) more options to do theirs stuff, manufactures (or better developers) extend ISAs with so called extensions. See [[wp>Template:Multimedia_extensions]]. | Code compiled for ARM should run on any ARM-ISA, but code speficifally compiled for ARMv7 will not run smoothly or not at all on an ARMv5 ISA. So, it is imperative to keep the ISA stable for many years, thus there are only few or no updates at all! To still be able to develop and advance the ISA, and thus give the programmer (or the compiler) more options to do theirs stuff, manufactures (or better developers) extend ISAs with so called extensions. See [[wp>Template:Multimedia_extensions]]. |
| |
| **NOTE:** In the FOSS-"World", this isn't such a big issue, since we have the Source-Code and with an updated compiler we can recompile the code as we like and obtain binaries that work an any architecture. And actually we do exactly that at OpenWrt. When you choose the option [[docs:guide-developer:build-system:start]] you do download the very latest source code for the cross compiler and cross compile the source code with that! | **NOTE:** In the FOSS-"World", this isn't such a big issue, since we have the Source-Code and with an updated compiler we can recompile the code as we like and obtain binaries that work an any architecture. And actually we do exactly that at OpenWrt. When you choose the option [[docs:guide-developer:toolchain:start]] you do download the very latest source code for the cross compiler and cross compile the source code with that! |
| |
| ==== The microarchitecture ==== | ==== The microarchitecture ==== |