General Purpose Processors: Software. This Week In DIG II  Introduction  Basic Architecture  Memory  Programmer’s view (that would be you !)  Development.

Slides:



Advertisements
Similar presentations
Chapter 3 General-Purpose Processors: Software
Advertisements

EEE226 MICROPROCESSORBY DR. ZAINI ABDUL HALIM School of Electrical & Electronic Engineering USM.
Khaled A. Al-Utaibi  Computers are Every Where  What is Computer Engineering?  Design Levels  Computer Engineering Fields  What.
Systems Software.
Microprocessor and Microcontroller Based Systems Instructor: Eng.Moayed N. EL Mobaied The Islamic University of Gaza Faculty of Engineering Electrical.
Chapter 3 General-Purpose Processors: Software
General Purpose Processors: Software This Week In DIG II  Introduction  Basic Architecture  Operation  Programmer’s view (that would be you !) 
Chapter 4 Processor Technology and Architecture. Chapter goals Describe CPU instruction and execution cycles Explain how primitive CPU instructions are.
Recap – Our First Computer WR System Bus 8 ALU Carry output A B S C OUT F 8 8 To registers’ input/output and clock inputs Sequence of control signal combinations.
Embedded Systems Design: A Unified Hardware/Software Introduction 1 Chapter 3 General-Purpose Processors: Software ECE 4330 Embedded System Design.
Chapter 2: Impact of Machine Architectures What is the Relationship Between Programs, Programming Languages, and Computers.
1-1 Embedded Software Development Tools and Processes Hardware & Software Hardware – Host development system Software – Compilers, simulators etc. Target.
Embedded Systems Design: A Unified Hardware/Software Introduction 1 Chapter 3 General-Purpose Processors: Software.
General Purpose Processors: Software. This Week In DIG II  Introduction  Basic Architecture  Memory  Programmer’s view (that would be you !)  Development.
Processor Types And Instruction Sets Barak Perelman CS147 Prof. Lee.
ASPPRATECH.
Chapter 17 Microprocessor Fundamentals William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright ©2006 by Pearson Education, Inc. Upper.
Computer Organization and Assembly language
Microcontroller: Introduction
Engineering 1040: Mechanisms & Electric Circuits Fall 2011 Introduction to Embedded Systems.
Getting Started With DSP A. What is DSP? B. Which TI DSP do I use? Highest performance C6000 Most power efficient C5000 Control optimized C2000 TMS320C6000™
Atmega32 Architectural Overview
The 6713 DSP Starter Kit (DSK) is a low-cost platform which lets customers evaluate and develop applications for the Texas Instruments C67X DSP family.
Computer Organization & Assembly Language
Computer Organization Computer Organization & Assembly Language: Module 2.
An Introduction Chapter Chapter 1 Introduction2 Computer Systems  Programmable machines  Hardware + Software (program) HardwareProgram.
Embedded Systems Design: A Unified Hardware/Software Introduction 1 Microprocessors.
1 3-Software Design Basics in Embedded Systems. 2 Development Environment Development processor  The processor on which we write and debug our programs.
CS1Q Computer Systems Lecture 3 Simon Gay. Lecture 3CS1Q Computer Systems - Simon Gay2 Where we are Global computing: the Internet Networks and distributed.
1 3-Software Design Basics in Embedded Systems. 2 Two Memory Architectures Processor Program memory Data memory Processor Memory (program and data) HarvardPrinceton.
Computers organization & Assembly Language Chapter 0 INTRODUCTION TO COMPUTING Basic Concepts.
Lecture 15 VHDL Modeling of Microprocessors.
Microcontroller Presented by Hasnain Heickal (07), Sabbir Ahmed(08) and Zakia Afroze Abedin(19)
George Mason University ECE 448 – FPGA and ASIC Design with VHDL Experiment 7 VHDL Modeling of Embedded Microprocessors and Microcontrollers.
1 3-Software Design Basics in Embedded Systems Optimizing the design of General Purpose processors.
Embedded Systems Design: A Unified Hardware/Software Introduction 1 Chapter 3 General-Purpose Processors: Software.
Computer Architecture And Organization UNIT-II General System Architecture.
25 April 2000 SEESCOASEESCOA STWW - Programma Evaluation of on-chip debugging techniques Deliverable D5.1 Michiel Ronsse.
Computer Organization & Assembly Language © by DR. M. Amer.
PHY 201 (Blum)1 Microcode Source: Digital Computer Electronics (Malvino and Brown)
1 4-Development Environment Development processor  The processor on which we write and debug our programs Usually a PC Target processor  The processor.
Computer Hardware A computer is made of internal components Central Processor Unit Internal External and external components.
HOW a Computer Works ? Anatomy of Microprocessor.
MICROOCESSORS AND MICROCONTROLLER:
What is a Microprocessor ? A microprocessor consists of an ALU to perform arithmetic and logic manipulations, registers, and a control unit Its has some.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Control Unit.
© 2000 Morgan Kaufman Overheads for Computers as Components Host/target design  Use a host system to prepare software for target system: target system.
Lecture 7: Overview Microprocessors / microcontrollers.
Simple ALU How to perform this C language integer operation in the computer C=A+B; ? The arithmetic/logic unit (ALU) of a processor performs integer arithmetic.
بسم الله الرحمن الرحيم MEMORY AND I/O.
1 Basic Processor Architecture. 2 Building Blocks of Processor Systems CPU.
1 3-Software Design Basics in Embedded Systems. 2 Two Memory Architectures Processor Program memory Data memory Processor Memory (program and data) HarvardPrinceton.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Control Unit.
Computer Operation. Binary Codes CPU operates in binary codes Representation of values in binary codes Instructions to CPU in binary codes Addresses in.
Embedded Systems. What is Embedded Systems?  Embedded reflects the facts that they are an integral.
3-Software Design Basics in Embedded Systems
Chapter 3 General-Purpose Processors: Software
Computer Organization and Machine Language Programming CPTG 245
PROGRAMMABLE LOGIC CONTROLLERS SINGLE CHIP COMPUTER
Atmega32 Architectural Overview
Control Unit Lecture 6.
COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE
Chapter 1: Introduction
Chapter 3 General-Purpose Processors: Software
Chapter 3 General-Purpose Processors: Software
Chapter 3 General-Purpose Processors: Software
Microprocessors.
General Purpose Processor : Software
Chapter 4 The Von Neumann Model
Presentation transcript:

General Purpose Processors: Software

This Week In DIG II  Introduction  Basic Architecture  Memory  Programmer’s view (that would be you !)  Development environment  Application specific instruction-Set Processors (ASIPs)  Selecting a microprocessor  Z-World  General – purpose processor design Chapter 3 General-Purpose Processors: Software

Operating System  Optional software layer providing low-level services to a program (application).  Program load and execution  Sharing and allocation of system resources CPU Memory  Protect allocated resources from corruption by non-owner programs  File management, disk access  Keyboard/display interfacing  Scheduling multiple programs for execution Or even just multiple threads from one program  Program makes system calls to the OS  OS responds to these “service calls” based on this priority order.  OS determines which program use the system resources (CPU, memory, etc.) when and how long.

Development Environment  Development processor  The processor on which we write and debug our programs Usually a PC (Pentium IV)  Target processor  The processor that the program will run on in our embedded system Often different from the development processor (ZWorld BL-1800) Development processorTarget processor

Software Development Process  Compilers  Cross compiler Runs on one processor, but generates code for another  Assemblers  Linkers  Debuggers  Profilers Compile r Linker C File Asm. File Binary File Exec. File Assemble r Implementation Phase Debugger Profiler Verification Phase Library Integrated Development Environment (IDE)

Running a Program  If development processor is different than target, how can we run our compiled code? Two options:  Download to target processor  Simulate  Simulation  One method: Hardware description language But slow, not always available  Another method: Instruction set simulator (ISS) Runs on development processor, but executes instructions of target processor

Debuggers & Emulators  Debuggers:  Help evaluate and correct the program  Run on development processor  Support stepwise program execution, one or more instruction(s) at a time  Sets breakpoints, at which it stops the program and allows user to evaluate the current values of variables, memory and register addresses and content  They run on development computer but execute code designed for target processor  mimic the function of the target processor  Instruction set –simulators (virtual machines)  Emulators:  Support debugging of the program, while it executes on the target processor  Consists of a debugger coupled with board connected to the PC via cable  Allows control and monitor the program’s execution in the actual embedded processor.  Device Programmers  Download the binary machine language program from development processor to target processor’s memory, allowing the target processor to be tested on its own in the most realistic form.

Testing and Debugging Implementation Phase Verification Phase Verification Phase Emulator Debugger / ISS Programmer Development processor (a) (b) External tools  ISS  Gives us control over time – set breakpoints, look at register values, set values, step-by-step execution,...  But, doesn’t interact with real environment  Download to board  Use device programmer  Runs in real environment, but not controllable  Compromise: emulator  Runs in real environment, at speed or near  Supports some controllability from the PC

Application-Specific Instruction- Set Processors (ASIPs)  General-purpose processors  Sometimes too general to be effective in demanding application e.g., video processing – requires huge video buffers and operations on large arrays of data, inefficient on a GPP  But single-purpose processor has high NRE, not programmable  ASIPs – targeted to a particular domain  Contain architectural features specific to that domain e.g., embedded control, digital signal processing, video processing, network processing, telecommunications, etc.  Still programmable

A Common ASIP: Microcontroller  For embedded control applications  Reading sensors, setting actuators  Mostly dealing with events (bits): data is present, but not in huge amounts  e.g., VCR, disk drive, washing machine, microwave oven  Microcontroller features  On-chip peripherals Timers, analog-digital converters, serial communication, etc. Tightly integrated for programmer, typically part of register space  On-chip program and data memory  Direct programmer access to many of the chip’s pins  Specialized instructions for bit-manipulation and other low-level operations

Another Common ASIP: Digital Signal Processors (DSP)  For signal processing applications  Large amounts of digitized data, often streaming  Data transformations must be applied fast  e.g., cell-phone voice filter, digital TV, music synthesizer  DSP features  Several instruction execution units  Multiple-accumulate single-cycle instruction, other instrs.  Efficient vector operations – e.g., add two arrays Vector ALUs, loop buffers, etc.

Selecting a Microprocessor  Issues  Technical: speed, power, size, cost  Other: development environment, prior expertise, licensing, etc.  Speed: how evaluate a processor’s speed?  Clock speed – but instructions per cycle may differ  Instructions per second – but work per instr. may differ  Dhrystone: Synthetic benchmark, developed in Dhrystones/sec. MIPS: 1 MIPS = 1757 Dhrystones per second (based on Digital’s VAX 11/780). A.k.a. Dhrystone MIPS. Commonly used today. –So, 750 MIPS = 750*1757 = 1,317,750 Dhrystones per second  SPEC: set of more realistic benchmarks, but oriented to desktops  EEMBC – EDN Embedded Benchmark Consortium, Suites of benchmarks: automotive, consumer electronics, networking, office automation, telecommunications

General Purpose Processors Sources: Intel, Motorola, MIPS, ARM, TI, and IBM Website/Datasheet; Embedded Systems Programming, Nov. 1998

Designing a General Purpose Processor  Not something an embedded system designer normally would do  But instructive to see how simply we can build one top down  Remember that real processors aren’t usually built this way Much more optimized, much more bottom-up design Declarations: bit PC[16], IR[16]; bit M[64k][16], RF[16][16]; Aliases: op IR[15..12] rn IR[11..8] rm IR[7..4] dir IR[7..0] imm IR[7..0] rel IR[7..0] Reset Fetch Decode IR=M[PC]; PC=PC+1 Mov1 RF[rn] = M[dir] Mov2 Mov3 Mov4 Add Sub Jz op = 0000 M[dir] = RF[rn] M[rn] = RF[rm] RF[rn]= imm RF[rn] =RF[rn]+RF[rm] RF[rn] = RF[rn]-RF[rm] PC=(RF[rn]=0) ?rel :PC to Fetch PC=0; from states below FSMD

Architecture of a Simple Microprocessor  Storage devices for each declared variable  register file holds each of the variables  Functional units to carry out the FSMD operations  One ALU carries out every required operation  Connections added among the components’ ports corresponding to the operations required by the FSM  Unique identifiers created for every control signal Datapath IRPC Controller (Next-state and control logic; state register) Memory RF (16) RFwa RFwe RFr1a RFr1e RFr2a RFr2e RFr1RFr2 RFw ALU ALUs 2x1 mux ALUz RFs PCld PCinc PCclr 3x1 mux Ms MweMre To all input control signals From all output control signals Control unit 16 Irld A D 1 0

A Simple Microprocessor FSM operations that replace the FSMD operations after a datapath is created RFwa=rn; RFwe=1; RFs=01; Ms=01; Mre=1; RFr1a=rn; RFr1e=1; Ms=01; Mwe=1; RFr1a=rn; RFr1e=1; Ms=10; Mwe=1; RFwa=rn; RFwe=1; RFs=10; RFwa=rn; RFwe=1; RFs=00; RFr1a=rn; RFr1e=1; RFr2a=rm; RFr2e=1; ALUs=00 RFwa=rn; RFwe=1; RFs=00; RFr1a=rn; RFr1e=1; RFr2a=rm; RFr2e=1; ALUs=01 PCld= ALUz; RFrla=rn; RFrle=1; MS=10; Irld=1; Mre=1; PCinc=1; PCclr=1; Reset Fetch Decode IR=M[PC]; PC=PC+1 Mov1 RF[rn] = M[dir] Mov2 Mov3 Mov4 Add Sub Jz op = 0000 M[dir] = RF[rn] M[rn] = RF[rm] RF[rn]= imm RF[rn] =RF[rn]+RF[rm] RF[rn] = RF[rn]-RF[rm] PC=(RF[rn]=0) ?rel :PC to Fetch PC=0; from states below FSMD Datapath IRPC Controller (Next-state and control logic; state register) Memory RF (16) RFwa RFwe RFr1a RFr1e RFr2a RFr2e RFr1RFr2 RFw ALU ALUs 2x1 mux ALUz RFs PCld PCinc PCclr 3x1 mux Ms MweMre To all input contro l signals From all output control signals Control unit 16 Irld A D 1 0 You just built a simple microprocessor!

Chapter Summary  General-purpose processors  Good performance, low NRE, flexible  Controller, datapath, and memory  Structured languages prevail  But some assembly level programming still necessary  Many tools available  Including instruction-set simulators, and in-circuit emulators  ASIPs  Microcontrollers, DSPs, network processors, more customized ASIPs  Choosing among processors is an important step  Designing a general-purpose processor is conceptually the same as designing a single-purpose processor