Real-Time Embedded Systems
Ch3: Microprocessor Objectives
Microprocessor Characteristics Von Neumann and Harvard architectures I/O Addressing Endianness Memory organization of some classic microprocessors ◦ PIC18F8720 ◦ Intel 8086 ◦ Intel Pentium ◦ Arm
X. Fan: Real-Time Embedded Systems 2 Some microprocessors used in embedded systems
3 Microprocessor Architectures
Von Neumann Architecture ◦ Data and instructions (executable code) are stored in the same address space. ◦ The processor interfaces to memory through a single set of address/data buses. Harvard Architecture ◦ Data and instructions (executable code) are stored in separate address spaces. ◦ There are two sets of address/data buses between processor and memory. Complex Instruction Set Computer (CISC) ◦ runs “complex instructions“ where a single instruction may execute several low-level operations Reduced Instruction Set Computer (RISC) ◦ runs compact, uniform instructions where the amount of work any single instruction accomplishes is reduced.
4 Other Stuff
Processing Width ◦ Width ◦ Word I/O Addressing ◦ Special instruction vs memory mapped Reset Vector ◦ Intell – high end of address space ◦ PIC/ and Motorolla (Frescale, NXT….) low ◦ Arm definable ◦ Why put it on end or the other?
X. Fan: Real-Time Embedded Systems 5 Endianness
VS
6 Endianness Whether integers are presented from left to right or right to left ◦ Little-endian: the least significant byte stored at the lowest memory address ◦ Big-endian: the most significant byte stored at the lowest memory address
7 System Convention
Be internally consistent ◦ Endianness ◦ Data formats ◦ Protocols ◦ Units Do conversion ASAP and ALAP ◦ On and off the wire
X. Fan: Real-Time Embedded Systems 8 PIC18F8720
9 PIC18F8720: Memory organization
10 PIC18F8720: EMI Operating mode: Word Write Mode This mode allows instruction fetches and table reads from, and table writes to, all forms of 16-bit (word-wide) external memories.
Embedded Real-Time Systems 11 PIC18F8720: Word Write Mode: Timing Diagram
Embedded Real-Time Systems 12 PIC18F8720: EMI Operating mode: Byte Select Mode
This mode allows instruction fetches and table reads from, and table writes to, external memories with byte selection capability.
Embedded Real-Time Systems 13 PIC18F8720: Byte Select Mode: Timing Diagram
Embedded Real-Time Systems 14 PIC18F8720: Byte Select Mode: Memory Mappings
15 PIC18F8720: Byte Select Mode: Problem 3.3
Which chip would be written to if in the first cycle the instruction is “TBLWT 12h to address 1A6B4Ch" and in the second cycle the instruction is “TBLWT 8Ah to address 1A6B4Dh? Would the data 12h and 8Ah be stored on the memory chip correctly? Explain why.
Embedded Real-Time Systems 16 PIC18F8720: Byte Write Mode
This mode allows table reads from, and table writes to, 8- bit-wide external memories.
Embedded Real-Time Systems 17 PIC18F8720: Byte Write Mode: Timing Diagram
Embedded Real-Time Systems 18 Intel 8086
CLK provides the basic timing for the processor and bus controller. Each bus cycle (read, write, or interrupt acknowledge) consists of at least four clock cycles, which are referred to as T1, T2, T3 and T4.
19 Memory Organization: internal segmentation
There are four 16-bit segment registers ◦ CS for Code Segment, ◦ DS for Data Segment, ◦ ES for Extra data Segment, and ◦ SS for Stack Segment. All memory references are of form [segment:offset], relative to the base address contained in the corresponding segment register. Given a pair [segment:offset], a 20-bit external address is produced by
20 Intel 8086 Memory IO Mappings
21 Intel 8086 Memory Mapping
22 Intel 8086: Chip Select
23 Shift Register: 74LS164
1 2 3 4 5
Embedded Real-Time Systems 24 Intel 8086 Wait State Generator
25 Intel Pentium
26 Intel Pentium: Bus State Transition
X. Fan: Real-Time Embedded Systems 27 Intel Pentium Memory Mapping
X. Fan: Real-Time Embedded Systems 28 Arm926EJ-S
X. Fan: Real-Time Embedded Systems 29 Arm926EJ-S: memory mapping (8-bit memory)
X. Fan: Real-Time Embedded Systems 30 Arm926EJ-S: memory mapping (32-bit memory)
X. Fan: Real-Time Embedded Systems 31