Professional Documents
Culture Documents
Architecture
First step in learning design and working of computers and processors
Peripherals Computer
Central Main
Processing Memory
Unit
Computer
Systems
Interconnection
Input
Output
Communication
lines
Structure of computer- The CPU
CPU
Computer Arithmetic
Registers and
I/O Logic Unit
System CPU
Bus
Internal CPU
Memory Interconnection
Control
Unit
Structure of computer- The Control Unit
Control Unit
CPU
Sequencing
ALU Logic
Control
Internal
Unit
Bus
Control Unit
Registers Registers and
Decoders
Control
Memory
Computer: Hardware and software
Computer Design
Circuit
Gate
software
instruction set
hardware
Examples of ISA
• IA- 32 – from Intel
• 80386, 80486, Pentium, Athlon etc
• PowerPC – from IBM – AIM alliance
• Power1, Power2, etc
• Motorola, IBM etc
tosrvmailbox
• Macintosh, ASIMO @gmail.com
• MIPS – from MIPS
• R2000, R3000, R4000 etc
• Sony Playstation and NEC Nitendo
• SPARC – from sun micro systems
• ARM – from ARM
Basic terms and concepts:
• Program or software or code; sequence of instructions
• 3 levels of programming
• HLL
• ALL
• LLL
• Stored Program Concept, SPC
• punched cards fed one after another
• stack of cards fed together at a time
• Fetch – decode – execute
Fetch-Decode-Execute Cycle
Understand the
Decode instruction
Control Unit
Repeat
Central Processing Unit (CPU)
• Also called the “microprocessor” or “processor”
• The brain of the computer - It does all the processing
• Major components:
• Arithmetic Logic Unit (ALU)
• Does all the math and logic operations
• Control unit
• “Sequences the operations” of the processor
• Timing of operations
• Registers
• holds data that is “in process” at the moment
• Communication bus systems
CPU
• CPU is responsible for executing a sequence of instructions
• Each instruction is stored in memory along with data
• CPU is in charge of retrieving the next instruction from memory
(fetch), understand it, (decoding) and work it out (executing)
• Execution usually requires the use of ALU and temporary storage in
registers
• We divide the CPU into two areas
• Datapath – registers and ALU (the execution unit)
• Control unit – circuits in charge of performing the fetch-decode-
execute cycle
ALU
• Consists of circuits to perform arithmetic and logic operations
• Adder
• Multiplier
• Shifter
• Comparator
• Operations in the ALU set status flags (carry, overflow, positive, zero,
negative)
• May have temporary registers to store data before moving final
results back to register or memory
Control Unit
• in charge of managing the fetch-decode-execute cycle
• It sends out control signals to all other hardware units
• control signal activates a device to perform it’s function
• For instance:
• Instruction fetching event or activity requires
• sending address of memory location (PC) to main memory
• signaling memory to read
• when the datum comes from memory, move it to a register (IR)
• increment PC to point to the next instruction
The System Clock
• In order to regulate when the CU issues control signals,
computers use a system clock
• At each clock pulse, the control unit goes on to the next task
• Register values are loaded or stored at the beginning of a clock pulse
• ALU circuits activate at the beginning of a clock pulse
Registers
• memory types:
• RAM; main memory
• Hard drives; secondary memory
• Registers are also memory
• Temporary storage of data inside the CPU
• Extremely fast, compared to RAM or hard-drives
• Very small storage capacity, few bytes
How does memory look like?
Address Data
• RAM, associated with two numbers 0 36
• Address and Data 1 45
• Address is the location 2 76
• Data is the value stored in the location 3 56
• Memory stores both data and 4 52
machine instructions 5 60
• everything stored in memory is in 6 23
bits 7 42
• Address and data are in hex 8 66
RAM
• 16 bytes of memory shown in the
diagram
• Data and code (instructions) are
represented using bits
• Memory stores both data and code
• What should be the number of
address lines for addressing 1KB of
memory?
• 8051 has 64KB of addressing
capacity, then how many address
lines it has?
Memory Organization
Memory can be organized into byte or word-sized blocks
• Each block has a unique address
• This can be envisioned as an array of cells
• The CPU accesses memory by sending an address of the intended location and a
control command to read or write
• The memory module then responds to the request appropriately
Address bus
Data,
program
processor memory
Data bus and I/O
ports
Harvard architecture
Address bus Data
memory
and I/O
Data bus ports
processor
Address bus
program
memory
Data bus
Harvard architecture Address bus Data
memory
and I/O
Data bus
• Harvard can’t use self modifying code ports
processor
• Allows two simultaneous memory fetches Address bus
program
• Most DSP’s use Harvard for streaming data Data bus
memory