Computer architecture (source code)

= Computer architecture
{wiki}

<Computer architecture> studies the organization and behaviour of <computers>, connecting the operations visible to <software> with the hardware that executes them. An <instruction set architecture> specifies the machine-level contract, including instructions, accessible <processor registers> and addressing behaviour. A <microarchitecture> is a particular implementation of that contract, including execution units, <instruction pipelining> and <memory caches>.<Instruction Set Architecture in the Arm documentation>[FAQ, distinction between instruction set architecture and microarchitecture]{ref}

Two <CPUs> can implement the same <instruction set architecture> while taking different times to run the same <computer program>. One might overlap independent instructions or use a larger <memory cache>; neither choice changes what an addition instruction is required to compute. A useful performance model writes execution time as instruction count times average <cycles per instruction> divided by <clock frequency>. The factors interact: a design that raises <clock frequency> can also change <cycles per instruction>. This separates a program's required behaviour from the engineering choices that determine its cost.