Unit-2 General-Purpose Processors: Software
Introduction General-Purpose Processor Definition :Processor designed for a variety of computation tasks Low unit cost, in part because manufacturer spreads NRE over large numbers of units Motorola sold half a billion 68HC05 microcontrollers in 1996 alone
Carefully designed since higher NRE is acceptable Can yield good performance, size and power
Low NRE cost, short time-to-market/prototype, high flexibility User just writes software; no processor design
Basic Architecture
A General-Purpose Processor microprocessor
sometimes called CPU or
The architecture mainly consists of > Data path > Contol unit > Tightly linked memory Datapath
The datapath consists of the circuitry for transforming data and for storing temporary data
The datapath contains an arithmetic-logic unit (ALU) capable of
transforming data through operations such as addition, subtraction, logical AND, logical OR, inverting, and shifting. The datapath also contains registers capable of storing temporary data.
The internal data bus is the bus over which data travels within the datapath, while the externaldata bus is the bus over which data is brought to and from the data memory.
We typically distinguish processors by their size, and we usually
measure size as the bit-width of the datapath components.
An N-bit processor may have N-bit wide registers, an N-bit wide
ALU, an N-bit wide internal bus and an N-bit wide external bus
Common processor sizes include 4-bit, 8-bit, 16-bit, 32-bit and 64bit processors.
Controller
The controller consists of circuitry for retrieving program instructions, and for moving data to, from, and through the data path according to those instructions. The controller consists of >Program Counter (PC): that holds the address in
memory of the next
program instruction to fetch The PCs bit-width represents the processors address size. The address size determines the no of directly accessible If the address size is M, then the address space is 2M. Thus, a processor with a 16-bit PC can directly address 216 = 65,536 memory locations. >Instruction Register (IR) :to hold the fetched instruction. > next-state logic: determines the next value of the PC.memory locations.