Professional Documents
Culture Documents
EE2028 - S2Ay2122 - Lecture 1 Intro and Concepts
EE2028 - S2Ay2122 - Lecture 1 Intro and Concepts
EE2028 - S2Ay2122 - Lecture 1 Intro and Concepts
➢ Teaching/Lab Assistants:
▪ Ms Eda Koksal (TA for Lab)
▪ TBC (~4 Graduate Assistants)
➢ Assignments (50%):
Take-home Lab Assignments: Assignment 1 (20%) and Assignment 2 (30%)
Assessments During Lab Sessions #3 & #8 (i.e. Week 6 & Week 12) respectively
Venue: Digital Electronics Lab (E4-03-07)
Duration: ~30 mins per team of two (schedule to be announced)
➢ Examination (40%):
Saturday, 23 Apr 2022
13:00 - 15:00 (120 mins)
@ venue/URL to be announced
& Cortex-M4
(v7E-M)
STM32L475
M4
M4
M4 M4
[T]EE2028 Lecture 1: Introduction & Microprocessor Concepts
18
© Dr Henry Tan, ECE NUS Introduction
Cortex-M4-Based STM32L475 in
STM32 Discovery Kit:
[T]EE2028 Part I:
[T]EE2028 Part II & III:
[T]EE2028 Part I:
[T]EE2028 Part II & III:
Processor (CPU)
I/O
Memory Arithmetic
& Logic
Input
Unit (ALU)
Timing &
Output System Bus Control
Unit (CU)
Registers
Processor-memory interface
PC
ALU
IR
LR CU
SP
*architecture-dependent;
^by assigning arithmetic & logical tasks to ALU;
#in CU, read-only by CU
[T]EE2028 Lecture 1: Introduction & Microprocessor Concepts
© Dr Henry Tan, ECE NUS
2. Processor Components 29
The Registers
➢ The General purpose registers hold data% & addresses
➢ The PC register holds the memory address of the
current/next instruction (i.e. fetch/execute phase)
0x20….14
0x20….18
0x20….1C
0x20….20 Every byte is
addressable
by its own
byte address.
➢ Tasks:
▪ load contents of locations A & B to registers,
▪ compute sum, &
▪ transfer result from register to location C
➢ Execute-phase:
▪ CU decodes machine instruction in IR
▪ The specified operation is performed in steps, e.g. CU
transfers operands, ALU performs arithmetic/logic ops
▪ Concurrently, PC is incremented, pointing at the next
instruction, ready for the next fetch
[T]EE2028 Lecture 1: Introduction & Microprocessor Concepts
© Dr Henry Tan, ECE NUS
4. RISC Instructions & Sequencing 47
Details of Instruction Execution_1
Memory Registers
0x40 Load R2, A R2
0x44 Load R3, B R3
0x48 Add R4, R2, R3 R4
Execute
0x4C Store R4, C PC 0x40
Memory Registers
… IR Load R2, A
0x40 Load R2, A R2 2
A 2 Load R3, B
0x44 R3
B 3 Add R4, R2, R3
0x48 R4
C
0x4C Store R4, C PC 0x44
A 2
B 3
C
A 2
B 3
C
A 2
B 3
C
A 2
B 3
C 5