computer-architecture memory processor-design
Definition
Instruction Memory
Instruction memory is a specialised memory component in a processor architecture dedicated to storing machine instructions (the program). Its primary role is to provide the instruction corresponding to the address held by the program counter during the fetch stage of the instruction cycle.
Architectural Integration
Harvard vs. Von Neumann Architecture
In the Harvard architecture, instruction memory is physically distinct from data memory. This separation eliminates structural hazards by allowing the processor to fetch an instruction and access data simultaneously. In contrast, Von Neumann architectures share a single address and data bus for both.
Read-only and Volatile Implementations
Instruction memory may be implemented using read-only memory for embedded systems where the program is fixed. In general-purpose systems, instructions are typically loaded from secondary storage into volatile RAM during execution.
Sequential Fetching
The memory is indexed by the program counter, which is typically incremented by the instruction word size (e.g. 4 bytes for a 32-bit RISC architecture) after each fetch, unless a branch or jump operation modifies the execution flow.