A general purpose processor, sometimes called a central Processing Unit CPU or a microprocessor. It consists of a data path and control unit, tightly linked with a memory.
The general purpose processor basic architecture consists of
1. Data path
2. Control unit
1. Data path:-
The data path consists of the circuitry for transforming data and for storing temporary data.
The data path contains ALU capable of transforming data through operations such as addition, subtraction, logical AND, logical OR, inverting and shifting.
ALU also generates status signals, often stored in a status register, indicating particular data conditions. Such conditions include indicating weather data is zero or whether an addition of two data items generates a carry.
Data path also contains registers capable of storing temporary data. Temporary data may include:-
1. Data brought in from memory but not yet sent through the ALU.
2. Data coming from the ALU that will be needed for later ALU operations or will be sent back to memory and data that must be moved from one memory location to another.
3. The internal data bus carries data within the data path while the external data bus carries data to and from the data memory.
The processes are distinguished by their size, usually size is measured as the bandwidth of the data path components. An N-bit processor may have:
- N-bit wide registers
- N-bit wide ALU
- N-bit wide internal bus (over which data moves among data path components)
- N-bit wide external bus (over which data is brought in and out of the data path)
The processor maybe 4 bit, 8 bit, 16 bit, 32 bit and 64 bit.
2. Control unit:-
The control unit consists of circuitry for retrieving program instructions and moving data to,from, and through the data path according to those instructions.
The control unit has a program counter PC, that holds the address in memory of the next program instructions to fetch, and an instruction register IR to hold the fetched instruction.
The control unit also has a controller, consisting of a state register plus next stage and control logic.
It controls the flow of data in the data path such flow may includes:
- Inputting two particular registers into the ALU
- Storing ALU results into a particular register
- Moving data between memory and a register
The PC's bit-width represents the processor address size. The address size is independent of the data word size, the address size is often larger.
The address size determines the number of indirectly accessible memory locations, referred to as the address space or memory space.
For each instruction, the controlled typically sequences through several stages such as:
- Fetching the instruction from memory
- Decoding the instructions
- Fetching operands
- Executing the instruction in the data path
- Storing result
Each stage may consist of one or more clock cycles.
The registers serves a processor short term storage requirements.
Memory serves the processor medium term and long term information storage requirements.
Memory can be divided into program memory and data memory.
Program information consists of the sequence of instructions that cause the processor to carry out the desired system functionality.
Data information represents the value being input, output and transformed by the program.