Microprocessor Systems Design I

Slides:



Advertisements
Similar presentations
INSTRUCTION SET ARCHITECTURES
Advertisements

16.317: Microprocessor System Design I
1 Hardware and Software Architecture Chapter 2 n The Intel Processor Architecture n History of PC Memory Usage (Real Mode)
Microprocessor Systems Design I Instructor: Dr. Michael Geiger Fall 2012 Lecture 15: Protected mode intro.
Microprocessor Systems Design I Instructor: Dr. Michael Geiger Fall 2013 Lecture 26: PIC microcontroller intro.
16.317: Microprocessor System Design I Instructor: Dr. Michael Geiger Spring 2012 Lecture 30: PIC data memory.
16.317: Microprocessor System Design I Instructor: Dr. Michael Geiger Spring 2012 Lecture 29: Microcontroller intro.
Lecture 18 Last Lecture Today’s Topic Instruction formats
Programmer's view on Computer Architecture by Istvan Haller.
ECE 353 Introduction to Microprocessor Systems Michael G. Morrow, P.E. Week 7.
COMPUTER ORGANIZATION AND ASSEMBLY LANGUAGE Lecture 21 & 22 Processor Organization Register Organization Course Instructor: Engr. Aisha Danish.
Dr. Iyad Jafar Introducing the PIC 16 Series and the 16F84A.
Chapter 12 Processor Structure and Function. Central Processing Unit CPU architecture, Register organization, Instruction formats and addressing modes(Intel.
Microprocessor Systems Design I
Microprocessor Systems Design I
Microprocessor Systems Design I
ECE Application Programming
Descriptor Table & Register
Format of Assembly language
16.317: Microprocessor System Design I
Microprocessor Systems Design I
Microprocessor Systems Design I
ECE Application Programming
Microprocessor Systems Design I
Microprocessor Systems Design I
16.317: Microprocessor System Design I
Microprocessor Systems Design I
Microprocessor Systems Design I
Microprocessor Systems Design I
Microprocessor Systems Design I
Microprocessor Systems Design I
Microprocessor Systems Design I
Microprocessor Systems Design I
Microprocessor Systems Design I
Microprocessor and Assembly Language
16.317: Microprocessor System Design I
Microprocessor Systems Design I
Dr. Michael Nasief Lecture 2
Microcomputer Programming
A Closer Look at Instruction Set Architectures: Expanding Opcodes
University of Gujrat Department of Computer Science
EECE.3170 Microprocessor Systems Design I
CS 301 Fall 2002 Control Structures
Subject Name: Microprocesor Subject Code: 10CS45
EECE.3170 Microprocessor Systems Design I
Introduction to Intel IA-32 and IA-64 Instruction Set Architectures
Chapter 8 Central Processing Unit
Processor Organization and Architecture
EECE.3170 Microprocessor Systems Design I
EECE.3170 Microprocessor Systems Design I
EECE.3170 Microprocessor Systems Design I
EECE.3170 Microprocessor Systems Design I
EECE.3170 Microprocessor Systems Design I
EECE.3170 Microprocessor Systems Design I
EECE.3170 Microprocessor Systems Design I
EECE.3170 Microprocessor Systems Design I
EECE.3170 Microprocessor Systems Design I
EECE.2160 ECE Application Programming
EECE.2160 ECE Application Programming
EECE.3170 Microprocessor Systems Design I
EECE.3170 Microprocessor Systems Design I
EECE.3170 Microprocessor Systems Design I
EECE.2160 ECE Application Programming
EECE.3170 Microprocessor Systems Design I
CS-401 Computer Architecture & Assembly Language Programming
EECE.3170 Microprocessor Systems Design I
EECE.2160 ECE Application Programming
EECE.2160 ECE Application Programming
Computer Operation 6/22/2019.
EECE.3170 Microprocessor Systems Design I
Presentation transcript:

16.317 Microprocessor Systems Design I Instructor: Dr. Michael Geiger Fall 2012 Lecture 23: Exam 2 Preview

Microprocessors I: Exam 2 Preview Lecture outline Announcements/reminders HW 3 solution to be posted tonight Lab 2 due 11/14 Exam 2: Wednesday, 11/7 Today’s lecture: Exam 2 Preview 5/20/2018 Microprocessors I: Exam 2 Preview

Microprocessors I: Exam 2 Preview Exam 2 notes Allowed One 8.5” x 11” double-sided sheet of notes Calculator No other notes or electronic devices (phone, laptop, etc.) Exam will last 50 minutes Covers all lectures after Exam 1 Format similar to previous exam 1 multiple choice question 2 short problems to solve/code sequences to evaluate 5/20/2018 Microprocessors I: Exam 2 Preview

Microprocessors I: Exam 2 Preview Review: subroutines Subroutines: low-level functions When called, address of next instruction saved Return instruction ends routine; goes to that point May need to save state on stack 80386 specifics CALL <proc>: call procedure <proc> can be label (16-/32-bit imm), reg, mem RET: return from procedure Saving state to stack: push instructions Store data “above” current TOS; decrement SP Basic PUSH stores word or double word Directly storing flags: PUSHF Storing all 16-/32-bit general purpose registers: PUSHA/PUSHAD Restoring state: POP/POPF/POPA/POPAD 5/20/2018 Microprocessors I: Exam 2 Preview

Review: protected mode Supports memory management, multitasking, protection Changes in control/flag registers, IP, memory accesses Selectors: pointers into descriptor tables Contains requested privilege, global/local, and table index Descriptors: provide info about segments 8 bytes in length 4 bytes: base address 2 bytes: limit (max offset within segment) Segment size = (limit + 1) bytes 2 bytes: access info (privilege, R/W, executable, etc.) 5/20/2018 Microprocessors I: Exam 2 Preview

Microprocessors I: Exam 2 Preview Review (cont.) Descriptors stored in descriptor tables Specific memory range dedicated to table GDTR points to global descriptor table Contains base address, limit for GDT LDTR cache points to global descriptor table Contains base address, limit for current LDT Values loaded from entry in GDT, pointed to by LDTR Global memory access Selector indicates access is global (TI == 0) Index field in selector chooses descriptor from GDT Descriptor provides starting address of segment Local memory access Selector indicates access is local (TI == 1) Index field in selector chooses descriptor from LDT 5/20/2018 Microprocessors I: Exam 2 Preview

Microprocessors I: Exam 2 Preview Review: HLL  Assembly Data accesses Allocate enough space to hold data (int = 4 bytes) Function arguments passed on stack Local variables allocated on stack Use base pointer (BP/EBP) to access locations inside stack Array accesses: scaled addressing A[i]  (base address of A) + (i * # bytes) Conditional statements Conditional jump to “if” code “Else” code contains jump to end Loops Initialize index Check condition At end, change index 5/20/2018 Microprocessors I: Exam 2 Preview

Review: Microcontroller/PIC basics Microcontrollers: CPU integrated with storage, I/O devices Examples Timers/event counters Parallel & serial ports Clock generator Analog to digital converter Benefits: low cost/low power, easy to program Limitations: storage, computational power Introduced PIC 16F684 microcontroller 14 pins—12 multiplexed I/O + power/ground All computations using 2 values use accumulator Harvard memory architecture Memory divided into SFR / GPR Dedicated 8-entry system stack for return addresses (subroutines/interrupts) 5/20/2018 Microprocessors I: Exam 2 Preview

Review: PIC Data Memory Organization Made up of SFRs and GFRs Banking: 128 byte chunks Max offset within bank 0x7f Controller may have 2 or 4 banks Addressing Modes Direct addressing: 7 bit address (within bank) RP1:RP0 selects bank Indirect addressing: Access to INDF causes indirect addressing Actual memory address in IRP+FSR I/O ports Control register (e.g. TRISA) controls direction of each pin Bit = 1  input, Bit = 0  output Data register (e.g. PORTA) contains actual port state 5/20/2018 Microprocessors I: Exam 2 Preview

Review: PIC instructions Four instruction formats Upper bits of all hold opcode Byte-oriented includes 1 bit destination, 7 bit direct address Bit-oriented includes 3 bit position (0-7), 7 bit direct address Literal/control includes 8 bit literal CALL/GOTO includes 11 bit literal Variable declarations cblock <start_address>: start of variable declarations All names between cblock/endc directives assigned to consecutive bytes starting at <start_address> 5/20/2018 Microprocessors I: Exam 2 Preview

Microprocessors I: Exam 2 Preview 5/20/2018 Microprocessors I: Exam 2 Preview

Review: PIC instructions (cont.) Clearing register: clrw/clrf Moving values: movlw/movwf/movf Swap nibbles: swapf Single bit manipulation: bsf/bcf Unary operations: incf/decf/comf Arithmetic: addlw/addwf/sublw/subwf 5/20/2018 Microprocessors I: Exam 2 Preview

Review: PIC instructions (cont.) Logical operations andlw/andwf iorlw/iorwf xorlw/xorwf Rotates rrf rlf Jumps/calls/return goto call return/retlw/retfie Miscellaneous nop sleep/clrwdt Conditional execution Test bit and skip next instruction if clear/set: btfsc/btfss Increment/decrement register and skip next instruction if zero: incfsz/decfsz Example use: combined with goto to create conditional jump 5/20/2018 Microprocessors I: Exam 2 Preview

Microprocessors I: Exam 2 Preview Final notes Next time: Exam 2 Allowed one 8.5” x 11” double-sided note sheet Allowed to use calculator No other notes or electronic devices allowed 5/20/2018 Microprocessors I: Exam 2 Preview