1 EECS 373 Design of Microprocessor-Based Systems Prabal Dutta University of Michigan Lecture 2: Architecture, Assembly, and ABI September 9, 2010.

Slides:



Advertisements
Similar presentations
1 EECS 373 Design of Microprocessor-Based Systems Branden Ghena University of Michigan Lecture 3: Assembly, Tools, and ABI September 9, 2014 Slides developed.
Advertisements

CS1104 – Computer Organization PART 2: Computer Architecture Lecture 5 MIPS ISA & Assembly Language Programming.
Fall EE 333 Lillevik 333f06-l4 University of Portland School of Engineering Computer Organization Lecture 4 Assembly language programming ALU and.
1 EECS 373 Design of Microprocessor-Based Systems Prabal Dutta University of Michigan Lecture 3: ISA, Assembly, and Toolchains September 13, 2011.
COMP3221: Microprocessors and Embedded Systems Lecture 2: Instruction Set Architecture (ISA) Lecturer: Hui Wu Session.
Introduction to ARM Architecture, Programmer’s Model and Assembler Embedded Systems Programming.
1 Lecture 2: MIPS Instruction Set Today’s topic:  MIPS instructions Reminder: sign up for the mailing list cs3810 Reminder: set up your CADE accounts.
Recap.
State Machines Timing Computer Bus Computer Performance Instruction Set Architectures RISC / CISC Machines.
Topics covered: ARM Instruction Set Architecture CSE 243: Introduction to Computer Architecture and Hardware/Software Interface.
Slides developed in part by Mark Brehob
Embedded Systems Programming
CS 300 – Lecture 6 Intro to Computer Architecture / Assembly Language Instructions.
ARM Core Architecture. Common ARM Cortex Core In the case of ARM-based microcontrollers a company named ARM Holdings designs the core and licenses it.
Computer Organization
1 EECS 373 Design of Microprocessor-Based Systems Prabal Dutta University of Michigan Lecture 2: Architecture, Assembly, and ABI September 8, 2011 Slides.
1 Layers of Computer Science, ISA and uArch Alexander Titov 20 September 2014.
An Introduction Chapter Chapter 1 Introduction2 Computer Systems  Programmable machines  Hardware + Software (program) HardwareProgram.
Computer Architecture ECE 4801 Berk Sunar Erkay Savas.
1 EECS 373 Design of Microprocessor-Based Systems Mark Brehob University of Michigan Lecture 2: Architecture, Assembly, and ABI Sept. 5, 2013 Slides developed.
IT253: Computer Organization Lecture 4: Instruction Set Architecture Tonga Institute of Higher Education.
1 CS503: Operating Systems Spring 2014 Dongyan Xu Department of Computer Science Purdue University.
1 A Simple but Realistic Assembly Language for a Course in Computer Organization Eric Larson Moon Ok Kim Seattle University October 25, 2008.
1 EECS 373 Design of Microprocessor-Based Systems Prabal Dutta University of Michigan Instruction Set Architecture Assembly Language Programming Software.
COMP3221 lec04--prog-model.1 Saeid Nooshabadi COMP 3221 Microprocessors and Embedded Systems Lecture 4: Programmer’s Model of Microprocessors
A Decompression Architecture for Low Power Embedded Systems Lekatsas, H.; Henkel, J.; Wolf, W.; Computer Design, Proceedings International.
Computer Science 516 Week 3 Lecture Notes. Computer Architecture - Common Points This lecture will cover some common things which characterize computer.
Lecture 4: MIPS Instruction Set Reminders: –Homework #1 posted: due next Wed. –Midterm #1 scheduled Friday September 26 th, 2014 Location: TODD 430 –Midterm.
6.S078 - Computer Architecture: A Constructive Approach Introduction to SMIPS Li-Shiuan Peh Computer Science & Artificial Intelligence Lab. Massachusetts.
1 Instruction Set Architecture (ISA) Alexander Titov 10/20/2012.
CDA 3101 Fall 2013 Introduction to Computer Organization
Computer Organization
Computer Architecture Lecture 03 Fasih ur Rehman.
Computer Architecture CSE 3322 Lecture 3 Assignment: 2.4.1, 2.4.4, 2.6.1, , Due 2/3/09 Read 2.8.
1 chapter 1 Computer Architecture and Design ECE4480/5480 Computer Architecture and Design Department of Electrical and Computer Engineering University.
Computer Organization Rabie A. Ramadan Lecture 3.
1 EECS 373 Design of Microprocessor-Based Systems Prabal Dutta University of Michigan Lecture 4: Memory and Memory-Mapped I/O September 16, 2010.
1 EECS 373 Design of Microprocessor-Based Systems Prabal Dutta University of Michigan Lecture 2: Architecture, Assembly, and ABI September 4, 2014 Slides.
Implementation of Embedded OS Lab3 Porting μC/OS-II.
WEEK 3 I/O Port Programming ET2640 Microprocessors and Microcontrollers.
1 EECS 373 Design of Microprocessor-Based Systems Mark Brehob University of Michigan Lecture 3: Toolchain, ABI, Memory Mapped I/O January 14 th, 2016 Slides.
1 EECS 373 Design of Microprocessor-Based Systems Prabal Dutta University of Michigan Lecture 4: Review, Simulation, ABI, and Memory-Mapped I/O September.
1 TM 1 Embedded Systems Lab./Honam University ARM Microprocessor Programming Model.
Arrays In high-level languages, we have several technigues available for constucting data stuctures: −One-dimensional arrays −Multi-dimensional arrays.
F453 Module 8: Low Level Languages 8.1: Use of Computer Architecture.
List three things that distinguish embedded
Computer Organization and Architecture Lecture 1 : Introduction
Displacement (Indexed) Stack
William Stallings Computer Organization and Architecture 6th Edition
15-740/ Computer Architecture Lecture 3: Performance
ECE 3430 – Intro to Microcomputer Systems
CS161 – Design and Architecture of Computer Systems
ACOE301: Computer Architecture II Labs
Morgan Kaufmann Publishers
William Stallings Computer Organization and Architecture 8th Edition
Prof. Onur Mutlu Carnegie Mellon University Spring 2014, 1/14/2013
Slides developed in part by Prof. Dutta
Lecture 4: MIPS Instruction Set
Systems Architecture Lecture 5: MIPS Instruction Set
Slides developed in part by Mark Brehob
Today’s agenda Hardware architecture and runtime system
CS-401 Assembly Language Programming
COMS 361 Computer Organization
Slides developed in part by Mark Brehob
CS 152 Computer Architecture and Engineering CS252 Graduate Computer Architecture Lecture 16 – RISC-V Vectors Krste Asanovic Electrical Engineering and.
Computer Architecture
Presentation transcript:

1 EECS 373 Design of Microprocessor-Based Systems Prabal Dutta University of Michigan Lecture 2: Architecture, Assembly, and ABI September 9, 2010

2 Announcements Q&A website for class discussion – –Good for discussion outside of class –Strongly encourage you to log issues there Actel Eval Boards –Yes, you keep them for the term! –This is an experiment to see what you do with them –Enables students to explore ideas, labs, etc outside class –Encourage you to install tool chain and try out Actel tutorials Will drop lowest minute quiz (only one)

3 Recap of the last lecture What distinguishes embedded systems? –Application-specific –Resource-constrained –Real-time operations –Software runs “forever” Technology scaling is driving “embedded everywhere” –Microprocessors –Memory (RAM and Flash) –Imagers and MEMS sensors –Energy storage Embedded platforms and software –How does a phone boot? HW, SW, INT, and drivers –What are the components of a DSL modem? 18 major parts –Why the ARM architecture? 90%+ of 32-bit embedded CPUs –How do ARM licensees differentiate products? Peripherals

4 Architecture

5 In the context of computers, what does architecture mean?

6 Architecture has many meanings Computer Organization (or Microarchitecture) –Control and data paths –I/D pipeline design –Cache design –…–… System Design (or Platform Architecture) –Memory and I/O buses –Memory controllers –Direct memory access –…–… Instruction Set Architecture (ISA)

7 What is an Instruction Set Architecture (ISA)?

8 An ISA defines the hardware/software interface A “contract” between architects and programmers Instruction set Register set Memory and addressing modes Word sizes Data formats Operating modes Condition codes Calling conventions

ARM Architecture roadmap 9

10 ARM Cortex-M3 ISA Register SetAddress Space Branching Data processing Load/Store Exceptions Miscellaneous Instruction Set 32-bits Endianess

11 Mode dependent Registers

12 Address Space

13 Instruction Encoding ADD immediate

14 Branch

15 Data processing instructions Many, Many More!

16 Load/Store instructions

17 Miscellaneous instructions

Addressing Modes Offset Addressing –Offset is added or subtracted from base register –Result used as effective address for memory access –[, ] Pre-indexed Addressing –Offset is applied to base register –Result used as effective address for memory access –Result written back into base register –[, ]! Post-indexed Addressing –The address from the base register is used as the EA –The offset is applied to the base and then written back –[ ],

options An immediate constant –#10 An index register – A shifted index register –, LSL #

Application Program Status Register (APSR)

Updating the APSR SUB Rx, Ry –Rx = Rx - Ry –APSR unchanged SUBS –Rx = Rx - Ry –APSR N or Z bits might be set ADD Rx, Ry –Rx = Rx + Ry –APSR unchanged ADDS –Rx = Rx + Ry –APSR C or V bits might be set

Conditional execution: Append to many instructions for conditional execution

23 The ARM architecture “books” for this class

24 The ARM software tools “books” for this class

25.equSTACK_TOP, 0x text.syntaxunified.thumb.global_start.typestart, %function _start:.wordSTACK_TOP, start start: movs r0, #10 movs r1, #0 loop: adds r1, r0 subs r0, #1 bne loop deadloop: b deadloop.end An ARM assembly language program for GNU

26 all: arm-none-eabi-as -mcpu=cortex-m3 -mthumb example1.s -o example1.o arm-none-eabi-ld -Ttext 0x0 -o example1.out example1.o arm-none-eabi-objcopy -Obinary example1.out example.bin arm-none-eabi-objdump -S example1.out > example1.list A simple Makefile

27.equSTACK_TOP, 0x text.syntaxunified.thumb.global_start.typestart, %function _start:.wordSTACK_TOP, start start: movs r0, #10 movs r1, #0 loop: adds r1, r0 subs r0, #1 bne loop deadloop: b deadloop.end An ARM assembly language program for GNU

28 example1.out: file format elf32-littlearm Disassembly of section.text: : 0: word0x : word0x : 8:200a movsr0, #10 a:2100 movsr1, # c : c:1809 addsr1, r1, r0 e:3801 subsr0, #1 10:d1fc bne.nc : 12:e7fe b.n12 Disassembled object code

29 Questions? Comments? Discussion?