Instruction Set Architecture as a Contract
An instruction set architecture specifies instruction encodings and behaviour, visible registers and addressing rules. Different implementations can preserve that interface while changing scheduling, pipelines, caches or internal registers. Running an application also requires its software environment.
What a learner can do afterwards
- Name what an instruction set fixes and what it deliberately leaves to the implementation
- Compare a load-store design with one that operates directly on memory by instruction count and memory accesses
- Explain why two chips with different internals can run the same binary
1 · Read
The assembly listings use an instruction set architecture (ISA): instruction encodings and behaviour, visible registers and addressing rules. A change preserves this interface only if these rules still hold. Removing a register or operation used by an old binary breaks its support; internal scheduling may change if ISA behaviour is preserved. Clock speed, cache size and circuit design are implementation choices, not generally fixed performance promises.
The ISA's programmer-visible interface specifies instruction encodings and behaviour, visible registers and addressing rules. Two chips can execute a binary when its required ISA features and execution mode are supported. An application also needs its required operating system and libraries. Different internal designs can preserve those requirements while producing different timing. ISA compatibility alone does not promise every application will run.
Recall x = x + 1 from the earlier assembly lesson. Model A uses LOAD R,[x]; ADD R,#1; STORE [x],R. Model B defines ADDMEM [x],#1 to read x, add 1 and write x in one instruction. A uses 3 instructions; B uses 1 combining three actions. B still accesses memory. This comparison applies to these models; it is not a universal rule about hardware cost or speed.
Changing internal scheduling can preserve a binary's required instruction behaviour, mode and software support. When all remain supported, recompilation is not needed merely because scheduling changed. Timing may differ. This is a compatibility check: identify the changed feature, then check whether any required interface or software support was removed.
Compiled instructions select registers using encoded numbers. Suppose selector 2 names ISA register 2. Calling it 'total' in assembly documentation does not change that encoding. Removing register 2, or making selector 2 mean something different, changes the interface. An old binary still contains the old selector; it does not automatically learn the new mapping.
ISA-visible registers differ from internal physical registers. Extra physical registers can hold temporary copies without adding registers to the ISA. A pipeline overlaps stages of different instructions; changing its depth is another internal choice. To assess an old binary, separate these internal counts from the encoded registers and instruction meanings it uses. Then check the required mode and software support.
Preserve instruction encodings and behaviour, visible registers and addressing rules. Internal designs and timing may differ. Applications also need their required software support.
Lesson, questions and flashcards written for this dataset.
Additional readings and flashcards written for this dataset.
2 · Watch
En anglaisTake it off screen
Where it sits
Learn first
8 questions wait behind this lesson, each with its answer explained. Every answer feeds the sky: stars light as they are learned, and dim when it is time to come back.