Arquitetura de Computadores I

Slides:



Advertisements
Similar presentations
SE 292 (3:0) High Performance Computing L2: Basic Computer Organization R. Govindarajan
Advertisements

Overheads for Computers as Components 2nd ed.
Basic Computer Architecture
3-Software Design Basics in Embedded Systems
Chapter 3 General-Purpose Processors: Software
DSPs Vs General Purpose Microprocessors
Chapter 2 Instruction Sets 金仲達教授 清華大學資訊工程學系 (Slides are taken from the textbook slides)
1 (Review of Prerequisite Material). Processes are an abstraction of the operation of computers. So, to understand operating systems, one must have a.
Elements of a Microprocessor system Central processing unit. This performs the arithmetic and logical operations, such as add/subtract, multiply/divide,
© 2000 Morgan Kaufman Overheads for Computers as Components Introduction zWhat are embedded systems? zChallenges in embedded computing system design.
임베디드 ( 내장형 ) 시스템 z 교과서 y Computers as components Morgan Kaufmann by Wayne Wolf xwww.mkp.com/embedwww.mkp.com/embed y Surviving the SoC revolution KAP.
© 2008 Wayne Wolf Overheads for Computers as Components, 2nd ed. Introduction What are embedded computing systems? Challenges in embedded computing system.
Embedded Systems: Introduction
Today’s Lecture What is the embedded system?
Khaled A. Al-Utaibi  Computers are Every Where  What is Computer Engineering?  Design Levels  Computer Engineering Fields  What.
© 2008 Wayne Wolf Overheads for Computers as Components 2nd ed. Instruction sets Computer architecture taxonomy. Assembly language. 1.
Embedded Computing Design & Co-design of Embedded Systems Maziar Goudarzi.
COMP3221: Microprocessors and Embedded Systems Lecture 2: Instruction Set Architecture (ISA) Lecturer: Hui Wu Session.
Define Embedded Systems Small (?) Application Specific Computer Systems.
Introduction to ARM Architecture, Programmer’s Model and Assembler Embedded Systems Programming.
State Machines Timing Computer Bus Computer Performance Instruction Set Architectures RISC / CISC Machines.
Introduction to Embedded Systems Introduction to Embedded Systems.
Embedded Computer Systems Chapter1: Embedded Computing Eng. Husam Y. Alzaq Islamic University of Gaza.
Computer Organization and Assembly language
Embedded Systems Programming
ASPPRATECH.
Prardiva Mangilipally
Dalya Gaber. Definition:- Embedded system is any device that includes a computer but is not itself a general purpose computer. It has hardware & software.
Computer Organization and Assembly language
Microcontroller: Introduction
1 ECE 354 Slides modified from Moritz/Koren/Burleson/Kundu, UMass ; Wolf, Computers as Components, Morgan Kaufman, 2005 Embedded Systems.
Codesign of Embedded Systems1 Introduction to Embedded Systems Part of HW/SW Codesign of Embedded Systems Course (CE )
1 ECE 354 © Koren/Moritz 2008, some slides modified from Burleson, UMass and Wolf, Computers as Components, Morgan Kaufman, 2005 ECE 354 Lecture 1 The.
Computer Organization
Real time DSP Professors: Eng. Julian Bruno Eng. Mariano Llamedo Soria.
An Introduction Chapter Chapter 1 Introduction2 Computer Systems  Programmable machines  Hardware + Software (program) HardwareProgram.
Introduction to Embedded System Xiaoming JU
© 2000 Morgan Kaufman Overheads for Computers as Components Instruction sets zComputer architecture taxonomy. zAssembly language. ARM processor  PDA’s,
The Computer Systems By : Prabir Nandi Computer Instructor KV Lumding.
1 3-General Purpose Processors: Altera Nios II 2 Altera Nios II processor A 32-bit soft core processor from Altera Comes in three cores: Fast, Standard,
Computers as Components: Principles of Embedded Computing System Design Xiaoming JU
Introduction to Computer Architecture and System
Micro processor and Micro Controllers
Computers organization & Assembly Language Chapter 0 INTRODUCTION TO COMPUTING Basic Concepts.
Advanced Computer Architecture 0 Lecture # 1 Introduction by Husnain Sherazi.
Computer Organization & Assembly Language © by DR. M. Amer.
Introduction to Microprocessors
Computer Architecture 2 nd year (computer and Information Sc.)
© 2000 Morgan Kaufman Overheads for Computers as Components Architectures and instruction sets zComputer architecture taxonomy. zAssembly language.
MICROOCESSORS AND MICROCONTROLLER:
Unit-2 Instruction Sets, CPUs
What is a Microprocessor ? A microprocessor consists of an ALU to perform arithmetic and logic manipulations, registers, and a control unit Its has some.
Lecture 7: Overview Microprocessors / microcontrollers.
© 2000 Morgan Kaufman Overheads for Computers as Components1 Design methodologies zA procedure for designing a system. zUnderstanding your methodology.
Gujarat technological university active learning assignment ON ARCHITECTURE OF AVR MICROCONTROLLER at c. K. pithawala college of engineering and technology.
CPU (Central Processing Unit). The CPU is the brain of the computer. Sometimes referred to simply as the processor or central processor, the CPU is where.
Embedded Systems. What is Embedded Systems?  Embedded reflects the facts that they are an integral.
GCSE Computer Science - Revision
ECE354 Embedded Systems Introduction C Andras Moritz.
Central Processing Unit Architecture
Overview Introduction General Register Organization Stack Organization
CS4101 Introduction to Embedded Systems Design and Implementation
Central Processing Unit
CISC AND RISC SYSTEM Based on instruction set, we broadly classify Computer/microprocessor/microcontroller into CISC and RISC. CISC SYSTEM: COMPLEX INSTRUCTION.
Overheads for Computers as Components 2nd ed.
Introduction to Microprocessor Programming
Chapter 4 The Von Neumann Model
Presentation transcript:

Arquitetura de Computadores I Fabiano Hessel hessel@inf.pucrs.br http://www.inf.pucrs.br/~hessel Eduardo Augusto Bezerra eduardob@inf.pucrs.br http://www.inf.pucrs.br/~eduardob

Overheads for Computers as Components Bibliografia Livro texto Patterson, D. A. & Hennessy, J. L. Organização e projeto de computadores: a interface hardware/software Livros referenciados e outras referências Disponíveis na página da disciplina Slides disponíveis na página © 2000 Morgan Kaufman Overheads for Computers as Components

Overheads for Computers as Components Conteúdo Revisão de conceitos (Anexo B) Avaliação de desempenho de arquiteturas (Cap. 2) Pipelines (Cap. 6 - Cap. 3) Aritmética computacional (Cap. 4) Tradução de código (Anexo A) © 2000 Morgan Kaufman Overheads for Computers as Components

Overheads for Computers as Components Avaliação 2 provas e 1 trabalho prático Fórmula G1 G1= ( P1 + P2 + 2T ) / 4 P1 – 25/09 P2 – 13/11 P4 – 18/11 G2 – 04/12 © 2000 Morgan Kaufman Overheads for Computers as Components

Overheads for Computers as Components Trabalho Implementar pipeline no processador R11, utilizando a linguagem VHDL Especificação do trabalho prevista para Setembro Apresentação dos trabalhos 25/NOVEMBRO 27/ NOVEMBRO © 2000 Morgan Kaufman Overheads for Computers as Components

Overheads for Computers as Components © 2000 Morgan Kaufman Overheads for Computers as Components

All computing systems on Earth are embedded systems… Sistemas embarcados estão em toda parte: carros, avioes, telefones, aparelhos de som, áudio e vídeo, eletrodomésticos em geral, celulares, … Por exemplo, a BMW série 7 possui 63 processadores embarcados. O Pentium da Intel (e similares) domina o mercado de desktops pois esses computadores são utilizados em aplicações bem semelhantes. No caso dos computadores dedicados, um sistema de controle de injeção eletrônica, por exemplo, possui requisitos bastante diferentes de um pager. © 2000 Morgan Kaufman Overheads for Computers as Components

Overheads for Computers as Components As vendas dos microprocessadores Pentium da Intel representam apenas cerca de 2% do mercado de processadores: © 2000 Morgan Kaufman Overheads for Computers as Components

Overheads for Computers as Components A grande diversidade de aplicações justifica a grande variedade de processadores para sistemas embarcados existentes. © 2000 Morgan Kaufman Overheads for Computers as Components

Overheads for Computers as Components © 2000 Morgan Kaufman Overheads for Computers as Components

Overheads for Computers as Components Em resumo: Existe muito mais demanda e inovação na área de sistemas embarcados do que na área de computadores pessoais. Com o aumento da complexidade das aplicações, aumenta também a complexidade dos projetos de sistemas embarcados -> Novas metodologias de projeto. © 2000 Morgan Kaufman Overheads for Computers as Components

Overheads for Computers as Components Introduction What are embedded systems? Challenges in embedded computing system design. Design methodologies. © 2000 Morgan Kaufman Overheads for Computers as Components

Overheads for Computers as Components Definition Embedded system: any device that includes a programmable computer but is not itself a general-purpose computer. Take advantage of application characteristics to optimize the design © 2000 Morgan Kaufman Overheads for Computers as Components

Overheads for Computers as Components Embedding a computer output analog input CPU analog mem embedded computer © 2000 Morgan Kaufman Overheads for Computers as Components

Overheads for Computers as Components Examples Personal digital assistant (PDA). Printer. Cell phone. Automobile: engine, brakes, dash, etc. Television. Household appliances. PC keyboard (scans keys). © 2000 Morgan Kaufman Overheads for Computers as Components

Overheads for Computers as Components Early history Late 1940’s: MIT Whirlwind computer was designed for real-time operations. Originally designed to control an aircraft simulator. First microprocessor was Intel 4004 in early 1970’s. HP-35 calculator used several chips to implement a microprocessor in 1972. © 2000 Morgan Kaufman Overheads for Computers as Components

Overheads for Computers as Components Early history, cont’d. Automobiles used microprocessor-based engine controllers starting in 1970’s. Control fuel/air mixture, engine timing, etc. Multiple modes of operation: warm-up, cruise, hill climbing, etc. Provides lower emissions, better fuel efficiency. © 2000 Morgan Kaufman Overheads for Computers as Components

Microprocessor varieties Microcontroller: includes I/O devices, on-board memory. Digital signal processor (DSP): microprocessor optimized for digital signal processing. Typical embedded word sizes: 8-bit, 16-bit, 32-bit. © 2000 Morgan Kaufman Overheads for Computers as Components

Overheads for Computers as Components Application examples Simple control: front panel of microwave oven, etc. Canon EOS 3 has three microprocessors. 32-bit RISC CPU runs autofocus and eye control systems. Analog TV: channel selection, etc. Digital TV: programmable CPUs + hardwired logic. © 2000 Morgan Kaufman Overheads for Computers as Components

Automotive embedded systems Today’s high-end automobile may have 100 microprocessors: 4-bit microcontroller checks seat belt; microcontrollers run dashboard devices; 16/32-bit microprocessor controls engine. © 2000 Morgan Kaufman Overheads for Computers as Components

BMW 850i brake and stability control system Anti-lock brake system (ABS): pumps brakes to reduce skidding. Automatic stability control (ASC+T): controls engine to improve stability. ABS and ASC+T communicate. ABS was introduced first---needed to interface to existing ABS module. © 2000 Morgan Kaufman Overheads for Computers as Components

Overheads for Computers as Components BMW 850i, cont’d. sensor sensor brake brake hydraulic pump ABS brake brake sensor sensor © 2000 Morgan Kaufman Overheads for Computers as Components

Characteristics of embedded systems Sophisticated functionality. Real-time operation. Low manufacturing cost. Low power. Designed to tight deadlines by small teams. © 2000 Morgan Kaufman Overheads for Computers as Components

Functional complexity Often have to run sophisticated algorithms or multiple algorithms. Cell phone, laser printer. Often provide sophisticated user interfaces. © 2000 Morgan Kaufman Overheads for Computers as Components

Overheads for Computers as Components Real-time operation Must finish operations by deadlines. Hard real time: missing deadline causes failure. Soft real time: missing deadline results in degraded performance. Many systems are multi-rate: must handle operations at widely varying rates. © 2000 Morgan Kaufman Overheads for Computers as Components

Non-functional requirements Many embedded systems are mass-market items that must have low manufacturing costs. Limited memory, microprocessor power, etc. Power consumption is critical in battery-powered devices. Excessive power consumption increases system cost even in wall-powered devices. © 2000 Morgan Kaufman Overheads for Computers as Components

Overheads for Computers as Components Design teams Often designed by a small team of designers. Often must meet tight deadlines. 6 month market window is common. Can’t miss back-to-school window for calculator. © 2000 Morgan Kaufman Overheads for Computers as Components

Why use microprocessors? Alternatives: field-programmable gate arrays (FPGAs), custom logic, etc. Microprocessors are often very efficient: can use same logic to perform many different functions. Microprocessors simplify the design of families of products. © 2000 Morgan Kaufman Overheads for Computers as Components

The performance paradox Microprocessors use much more logic to implement a function than does custom logic. But microprocessors are often at least as fast: heavily pipelined; large design teams; aggressive VLSI technology. © 2000 Morgan Kaufman Overheads for Computers as Components

Overheads for Computers as Components Power Custom logic is a clear winner for low power devices. Modern microprocessors offer features to help control power consumption. Software design techniques can help reduce power consumption. © 2000 Morgan Kaufman Overheads for Computers as Components

Challenges in embedded system design How much hardware do we need? How big is the CPU? Memory? How do we meet our deadlines? Faster hardware or cleverer software? How do we minimize power? Turn off unnecessary logic? Reduce memory accesses? © 2000 Morgan Kaufman Overheads for Computers as Components

Overheads for Computers as Components Challenges, etc. Does it really work? Is the specification correct? Does the implementation meet the spec? How do we test for real-time characteristics? How do we test on real data? How do we work on the system? Observability, controllability? What is our development platform? © 2000 Morgan Kaufman Overheads for Computers as Components

Overheads for Computers as Components Design methodologies A procedure for designing a system. Understanding your methodology helps you ensure you didn’t skip anything. Compilers, software engineering tools, computer-aided design (CAD) tools, etc., can be used to: help automate methodology steps; keep track of the methodology itself. © 2000 Morgan Kaufman Overheads for Computers as Components

Overheads for Computers as Components Design goals Performance. Overall speed, deadlines. Functionality and user interface. Manufacturing cost. Power consumption. Other requirements (physical size, etc.) © 2000 Morgan Kaufman Overheads for Computers as Components

Overheads for Computers as Components Levels of abstraction requirements specification architecture component design system integration © 2000 Morgan Kaufman Overheads for Computers as Components

Overheads for Computers as Components Top-down vs. bottom-up Top-down design: start from most abstract description; work to most detailed. Bottom-up design: work from small components to big system. Real design uses both techniques. © 2000 Morgan Kaufman Overheads for Computers as Components

Overheads for Computers as Components Stepwise refinement At each level of abstraction, we must: analyze the design to determine characteristics of the current state of the design; refine the design to add detail. © 2000 Morgan Kaufman Overheads for Computers as Components

Overheads for Computers as Components Requirements Plain language description of what the user wants and expects to get. May be developed in several ways: talking directly to customers; talking to marketing representatives; providing prototypes to users for comment. © 2000 Morgan Kaufman Overheads for Computers as Components

Functional vs. non-functional requirements output as a function of input. Non-functional requirements: time required to compute output; size, weight, etc.; power consumption; reliability; etc. © 2000 Morgan Kaufman Overheads for Computers as Components

Overheads for Computers as Components GPS moving map needs Functionality: For automotive use. Show major roads and landmarks. User interface: At least 400 x 600 pixel screen. Three buttons max. Pop-up menu. Performance: Map should scroll smoothly. No more than 1 sec power-up. Lock onto GPS within 15 seconds. Cost: $500 street price = approx. $100 cost of goods sold. © 2000 Morgan Kaufman Overheads for Computers as Components

GPS moving map needs, cont’d. Physical size/weight: Should fit in hand. Power consumption: Should run for 8 hours on four AA batteries. © 2000 Morgan Kaufman Overheads for Computers as Components

Overheads for Computers as Components Specification A more precise description of the system: should not imply a particular architecture; provides input to the architecture design process. May include functional and non-functional elements. May be executable or may be in mathematical form for proofs. © 2000 Morgan Kaufman Overheads for Computers as Components

Overheads for Computers as Components GPS specification Should include: What is received from GPS; map data; user interface; operations required to satisfy user requests; background operations needed to keep the system running. © 2000 Morgan Kaufman Overheads for Computers as Components

Overheads for Computers as Components Architecture design What major components go satisfying the specification? Hardware components: CPUs, peripherals, etc. Software components: major programs and their operations. Must take into account functional and non-functional specifications. © 2000 Morgan Kaufman Overheads for Computers as Components

GPS moving map block diagram display GPS receiver search engine renderer database user interface © 2000 Morgan Kaufman Overheads for Computers as Components

GPS moving map hardware architecture display frame buffer CPU GPS receiver memory panel I/O © 2000 Morgan Kaufman Overheads for Computers as Components

GPS moving map software architecture database search renderer pixels position user interface timer © 2000 Morgan Kaufman Overheads for Computers as Components

Designing hardware and software components Must spend time architecting the system before you start coding. Some components are ready-made, some can be modified from existing designs, others must be designed from scratch. © 2000 Morgan Kaufman Overheads for Computers as Components

Overheads for Computers as Components System integration Put together the components. Many bugs appear only at this stage. Have a plan for integrating components to uncover bugs quickly, test as much functionality as early as possible. © 2000 Morgan Kaufman Overheads for Computers as Components

Overheads for Computers as Components Summary Embedded computers are all around us. Many systems have complex embedded hardware and software. Embedded systems pose many design challenges: design time, deadlines, power, etc. Design methodologies help us manage the design process. © 2000 Morgan Kaufman Overheads for Computers as Components

Overheads for Computers as Components Instruction sets Computer architecture taxonomy. Assembly language. © 2000 Morgan Kaufman Overheads for Computers as Components

von Neumann architecture Memory holds data, instructions. Central processing unit (CPU) fetches instructions from memory. Separate CPU and memory distinguishes programmable computer. CPU registers help out: program counter (PC), instruction register (IR), general-purpose registers, etc. © 2000 Morgan Kaufman Overheads for Computers as Components

Overheads for Computers as Components CPU + memory memory address CPU PC 200 data 200 ADD r5,r1,r3 ADD r5,r1,r3 IR © 2000 Morgan Kaufman Overheads for Computers as Components

Overheads for Computers as Components Harvard architecture address CPU data memory data PC address program memory data © 2000 Morgan Kaufman Overheads for Computers as Components

Overheads for Computers as Components von Neumann vs. Harvard Harvard can’t use self-modifying code. Harvard allows two simultaneous memory fetches. Most DSPs use Harvard architecture for streaming data: greater memory bandwidth; more predictable bandwidth. © 2000 Morgan Kaufman Overheads for Computers as Components

Overheads for Computers as Components RISC vs. CISC Complex instruction set computer (CISC): many addressing modes; many operations. Reduced instruction set computer (RISC): load/store; pipelinable instructions. © 2000 Morgan Kaufman Overheads for Computers as Components

Instruction set characteristics Fixed vs. variable length. Addressing modes. Number of operands. Types of operands. © 2000 Morgan Kaufman Overheads for Computers as Components

Overheads for Computers as Components Programming model Programming model: registers visible to the programmer. Some registers are not visible (IR). © 2000 Morgan Kaufman Overheads for Computers as Components

Multiple implementations Successful architectures have several implementations: varying clock speeds; different bus widths; different cache sizes; etc. © 2000 Morgan Kaufman Overheads for Computers as Components

Overheads for Computers as Components Assembly language One-to-one with instructions (more or less). Basic features: One instruction per line. Labels provide names for addresses (usually in first column). Instructions often start in later columns. Columns run to end of line. © 2000 Morgan Kaufman Overheads for Computers as Components

ARM assembly language example label1 ADR r4,c LDR r0,[r4] ; a comment ADR r4,d LDR r1,[r4] SUB r0,r0,r1 ; comment © 2000 Morgan Kaufman Overheads for Computers as Components

Overheads for Computers as Components Pseudo-ops Some assembler directives don’t correspond directly to instructions: Define current address. Reserve storage. Constants. © 2000 Morgan Kaufman Overheads for Computers as Components

Overheads for Computers as Components Endianness Relationship between bit and byte/word ordering defines endianness: bit 31 bit 0 bit 0 bit 31 byte 3 byte 2 byte 1 byte 0 byte 0 byte 1 byte 2 byte 3 little-endian big-endian © 2000 Morgan Kaufman Overheads for Computers as Components

Example: C assignments (ARM Processor) x = (a + b) - c; Assembler: ADR r4,a ; get address for a LDR r0,[r4] ; get value of a ADR r4,b ; get address for b, reusing r4 LDR r1,[r4] ; get value of b ADD r3,r0,r1 ; compute a+b ADR r4,c ; get address for c LDR r2,[r4] ; get value of c © 2000 Morgan Kaufman Overheads for Computers as Components

Overheads for Computers as Components C assignment, cont’d. SUB r3,r3,r2 ; complete computation of x ADR r4,x ; get address for x STR r3,[r4] ; store value of x © 2000 Morgan Kaufman Overheads for Computers as Components

Example: C assignments (SHARC DSP) x = (a + b) - c; Assembler: R0 = DM(_a) ! Load a R1 = DM(_b); ! Load b R3 = R0 + R1; R2 = DM(_c); ! Load c R3 = R3-R2; DM(_x) = R3; ! Store result in x © 2000 Morgan Kaufman Overheads for Computers as Components