3
votes

I am not able to understand the difference between Instruction set and Instruction set architecture.

I know what is an instruction set. Instruction set just defines the possible instructions we can give to the processor and how the instruction are give ( therefore the instruction format ) to the processor.

Now what is Instruction set architecture ?

I have looked up wikipedia, it has a page on instruction set and inside it, on the first line there is a link to instruction set architecture which redirects to computer architecture.

So is the instruction set architecture same as computer architecture ?

Please can someone explain the concrete difference between IS and ISA so that I can understand what is an ISA and what does the ISA add to the instruction set.

3

3 Answers

2
votes

Not really computer architecture as a computer involves the peripherals and PCB and perhaps the chassis, buttons, connectors, etc.

The instruction set architecture is the architecture, the look and feel of the thing. Just like the architecture of a building. The instruction set is the set of instructions that implement that architecture. (as Brendan has pointed out you can have more than one set that implements the same architecture). A good example is ARM, ARMv7-m defines the architecture for some/most of the cortex-m (the marketing name for a product family) cores. The cortex-m3, cortex-m4, cortex-m7 conform to the ARMv7-m architecture which is defined in the ARM Architectural Reference Manual for the ARMv7-m. But these are different cores, they may be complete rewrites from scratch, they may have different depth pipelines, one might have a cache and/or fpu where another doesnt. In this case there is an instruction set defined by the architecture that they all conform to (the fpu is an exception in this case and not defined in the architecture).

An architect may design the building or building guidelines for a McDonalds and when you drive by you look at that building and without looking at the logo you know it is a mcdonalds or a wendys or a pizza hut. But not everyone of those buildings was built by the same construction crew using lumber from the same mill or paint from the same vendor, etc. The instruction set architecture defines the architecture and probably the instruction set the machine code it implements but the specific chips or cores made to conform to that architecture might not be identically built, on the surface the architecture looks the same, it looks like a Taco Bell, but it may be built differently than a Taco Bell in the next town over, you can still buy tacos that taste pretty much the same when you use that facility. As far as the machine code/instruction set goes programming two different cores from the same architecture look and feel the same, the tacos taste the same. But the implementation may be different (they might put the tomatoes in before the sour cream instead of after).

Good, bad, or otherwise, the two terms are often used interchangeably to mean the same thing (the instruction set, the possibly machine code instructions for the thing being talked about).

2
votes

"Instruction Set" is the set of instructions that a specific CPU actually supports.

"Instruction Set Architecture" is the set of instructions that a CPU (that implements that ISA) might or might not support.

For example, the "80x86 ISA" includes various extensions (64-bit, SSE, AVX, etc); but for an old 80486 (which implements the "80x86 ISA") the instruction set does not support 64-bit, SSE, AVX, etc.

0
votes

The two terms are interchangeable.

This passage uses both instruction set architecture and instruction in the same sentence.

https://en.wikipedia.org/wiki/Instruction_set_architecture

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.

Another example is in this paper explaining RISC-V: https://digitalassets.lib.berkeley.edu/techreports/ucb/text/EECS-2016-1.pdf

Much of the paper uses Instruction Set Architecture or ISA, but then Chapter 2 is titled "Why Develop a New Instruction Set?". Followed by this passage:

Of equal importance is the massive complexity of the popular commercial instruction sets. They are quite difficult to fully implement in hardware, and yet there is little incentive to create simpler subset ISAs

Again you see instruction set and instruction set architecture (ISA) used interchangeably.

The instruction set architecture / instruction set is best thought of as the "interface". Machine code that conforms to that interface will run on any CPU which implements that interface (regardless of that CPU's microarchitecture/implementation details).

This includes more than just a set of instructions. The bytes that make up the instructions must be positioned correctly along with operands and other parameters. The number and size of the registers is important, along with other details such as memory alignment and endianness that the machine code must conform to in order to run correctly on a CPU. The above RISC-V paper is a great reference for further reading on the subject.