SEBB3033-L02-UP System HW Fundamentals
SEBB3033-L02-UP System HW Fundamentals
Microprocessor-System
Hardware Fundamentals
Control bus
Arithmetic/Logic Unit
Daftar
n ALU
a
m
al
a
d Bas alamat
s
a
B
Bas data
Unit kawalan
Bas kawalan
Mengawal
• Control & Instruction Registers
– Program Counter (PC)
– Instruction Register (IR)
– Etc
• User-Visible Registers
– General Purpose Reg.
– Address Register
– Data Register
– Flag Register
Microprocessor – Basic concept
Address bus 16-bit / 32-bit / 64-bit wide
Control
Keyboard
Boot Screen
CPU ROM Instruction
Data Trans- UART
(program)
RAM ducers Parallel
Used at ROM
interface
startup
etc
Data
Memory Location-1
Memory Address-1 ®
Memory Address-2 ® Memory Location-2
1 2 3 4 5 6 7 8
* Synchronous dynamic random access memory (SDRAM) is dynamic random access memory
(DRAM) that is synchronized with the system bus that can run at much higher clock speeds.
Microcontroller – Basic concept
Microcontroller – Basic concept
Address
Control
Data
No matter what is the system size, the most important component is still the processor.
Microcontroller Examples
§ Altera: Nios 16-bit, Nios II 32-bit configurable soft microprocessor
§ Atmel: AT89 series (Intel 8051 architecture), AT90, ATtiny, ATmega, ATxmega
series (AVR architecture) (Atmel Norway design), AT91SAM (ARM
architecture), AVR32 (32-bit AVR architecture) (Atmel Norway design),
MARC4…
§ Freescale/Motorola: Freescale S08, 68HC05, 68HC08, 68HC11, Freescale
S12, 68HC12, 68HC16, Freescale DSP56800 (DSP controller)…
§ Infineon: XE166 family, XC 2000 family, C166 family, C167 family,
Infineon XMC4000, TriCore™ family …
§ Intel: MCS-48 8048 family (8035, 8038, 8039, etc), MCS-51 8051 family
( 8X31, 8X32, 8X52, etc), MCS-151…
§ NXP Semiconductors: ARM7, ARM9, ARM Cortex-M0, ARM Cortex-M3…
§ Panasonic: …
§ Parallax: ….
§ Rockwell: …
§ …
Processor or
Central Processing Unit (CPU)
To perform the arithmetic and logical operations within the CPU
Address Bus
Registers
Internal Bus
Data Bus
ALU
Daftar
n ALU
a
m
al
a
d Bas alamat
s
a
B
Bas data
Unit kawalan
Bas kawalan
Mengawal
Inside the CPU
● PC (Program Counter)
● Instruction decoder
● ALU (Arithmetic Logic Unit)
● Registers
ALU PC A
B
CPU C
D
Instruction decoder registers
Inside the CPU
ponents Functions
Program Counter (PC) a special-purpose register that is used by the processor to
hold the address of the next instruction to be executed.
Instruction Register (IR) Part of a CPU's control unit that stores the instruction
currently being executed or decoded
Instruction Decoder To translate/convert an instruction code into CPU control signals
Arithmetic and Logic Unit A digital circuit used to perform arithmetic and logic
(ALU) operations. It represents the fundamental building block
of the central processing unit (CPU) of a computer.
User-Visible Registers
Control & Instruction Registers
Fetch Execute
Instruction Cycle Details
● On program start:
• 0. Load the program counter (PC) with the address of the first
instruction
● Fetch phase:
1. Read the instruction and put it into the instruction register (IR)
2. Control unit decodes the instruction; updates the PC for
the next instruction
● Execute phase:
3. Find the data required by the instruction.
4. Perform the required operation.
5. Store the results.
6. Repeat from Step 1.
Instruction Cycle
Operation of a Processor
While (in operation)
Fetch instruction pointed by PC
Increment PC to point to next Instruction
Decode Instruction
Load 1st Operand (if any)
Load 2nd Operand (if any)
Execute Instruction
End While
How computers work 0 31h
1 C4h Aß [17]
2 26h BßA
A ß [6]
VCC
3 81h
4 EAh
AßA+B
[7]ßA
5 0h
A0-An-1
6 5h
GND
D0-D7
7
WE
OE
CS
Logic circuit
Address bus
Data bus
Control bus Write
Read
ALU
CPU A
B
PC: 10 C
D I/O 16 I/O 17 I/O 18 I/O n
Inst. Dec. registers
How computers work 0 31h
1 C4h Aß [17]
2 26h BßA
A ß [6]
VCC
3 81h
EAh
AßA+B
4
[7]ßA
5 0h
A0-An-1
5h
GND
6
D0-D7
WE
7
OE
CS
Logic circuit
Address bus 17
Data bus
Control bus Write
Read
ALU
CPU A
B
PC: 1 C 9
31
How computers work 0 31h
1 C4
C4h Aß [17]
2 26h
26 BßA
A ß [6]
VCC
3 81h
4 EAh
AßA+B
[7]ßA
5 0h
5 5h
A0-An-1
6
GND
D0-D7
7
WE
OE
CS
Logic circuit
Address bus 17
6
Data bus
Control bus Write
Read
ALU
CPU A
B
9
PC: 231 C
D I/O 16 I/O 17 I/O 18 I/O n
Inst. Dec. registers
How computers work 0 31h
1 C4h Aß [17]
2 26h BßA
A ß [6]
VCC
3 81
81h
4 EA
EAh
AßA+B
[7]ßA
5 0h
A0-An-1
6 5h
GND
D0-D7
7
WE
OE
CS
7 Logic circuit
Address bus
Eh
Data bus
Control bus Write
Read
+
ALU
E CPU A
55 E
99
B
PC: 3454 C
D I/O 16 I/O 17 I/O 18 I/O n
Inst. Dec. registers
How Instruction decoder works Opcode Operand
Opcode Operand
Instruction
Instruction
17 = 10001b
Selecting a Microprocessor
● Choose the right one for your application
– Primary criteria: Cost, Power, Size, Speed
– Others: package options, integrated peripherals, potential for future growth
● Other considerations
– Code density: affects power consumption, performance and system cost
– Hardware availability: make sure you can actually purchase the
microcontroller before designing it in
– Prior expertise, licensing, etc
Review Questions 1
35
Review Questions 2
36
Review Questions 2 (Cont’d)
37
Summary
● Microprocessors and embedded controllers are a ubiquitous part of
life today
● Concept of a microprocessor & microcontroller
● Understand how a µP works
● Engineers familiar with µC, µP design are in the highest possible
demand
● Web Resources:
– How Microprocessors Work:
• http://computer.howstuffworks.com/microprocessor.htm
• http://www.intel.com/education/mpworks/
• http://www.cse.psu.edu/~cg471/03f/hw/pj5/how-micro.html
– Great Microprocessors of the Past and Present:
• http://www.sasktelwebsite.net/jbayko/cpu.html
– Great Moments in Microprocessor History:
• http://www-128.ibm.com/developerworks/library/pa-microhist.html