ECE332, Week 2, Lecture 3

Similar documents
ECE332, Week 2, Lecture 3. September 5, 2007

Embedded system. Microprocessor System Design EHB432E Lecture -1. Embedded system. Embedded system. Istanbul Technical University

Designing Embedded Processors in FPGAs

Designing with Nios II and SOPC Builder

Lecture 12: EIT090 Computer Architecture

Digital Systems Design. System on a Programmable Chip

Davide Rossi DEI University of Bologna AA

The Nios II Family of Configurable Soft-core Processors

Practical Hardware Debugging: Quick Notes On How to Simulate Altera s Nios II Multiprocessor Systems Using Mentor Graphics ModelSim

Sistemi Embedded Introduzione

Digital Systems Design. Introduction to embedded and digital systems

System-on Solution from Altera and Xilinx

Building A Custom System-On-A-Chip

NIOS CPU Based Embedded Computer System on Programmable Chip

Nios Soft Core Embedded Processor

Graduate Institute of Electronics Engineering, NTU Advanced VLSI SOPC design flow

3-D Accelerator on Chip

COSC What is an embedded system?

Embedded Systems and Software

Introduction to Embedded Systems

Embedded Computing Platform. Architecture and Instruction Set

Designing with Nios II Processor for Hardware Engineers

Design Metrics. A couple of especially important metrics: Time to market Total cost (NRE + unit cost) Performance (speed latency and throughput)

Design of Embedded Hardware and Firmware

Nios II Processor Reference Handbook

2. System Interconnect Fabric for Memory-Mapped Interfaces

Nios II Processor Reference Handbook

Designing with ALTERA SoC Hardware

S. Moslehpour *, K. Jenab & S. Valiveti

CprE 588 Embedded Computer Systems

9. Building Memory Subsystems Using SOPC Builder

Today s Agenda Background/Experience Course Information Altera DE2B Board do Overview Introduction to Embedded Systems Design Abstraction Microprocess

SISTEMI EMBEDDED. Embedded Systems SOPC Design Flow. Federico Baronti Last version:

NIOS CPU Based Embedded Computer System on Programmable Chip

Laboratory Exercise 3 Comparative Analysis of Hardware and Emulation Forms of Signed 32-Bit Multiplication

WS_CCESSH-OUT-v1.00.doc Page 1 of 8

Chapter 4. Enhancing ARM7 architecture by embedding RTOS

DKAN0011A Setting Up a Nios II System with SDRAM on the DE2

Embedded Systems. "System On Programmable Chip" NIOS II Avalon Bus. René Beuchat. Laboratoire d'architecture des Processeurs.

Nios II Performance Benchmarks

CMPE 310: Systems Design and Programming

EMBEDDED SOPC DESIGN WITH NIOS II PROCESSOR AND VHDL EXAMPLES

Enabling New Low-Cost Embedded System Using Cyclone III FPGAs

Hi Hsiao-Lung Chan, Ph.D. Dept Electrical Engineering Chang Gung University, Taiwan

ARM Processors for Embedded Applications

2001 Altera Corporation (1)

ELEC 2520 Embedded Systems Engineering II

The University of Reduced Instruction Set Computer (MARC)

Excalibur Device Overview

Introduction to the Altera SOPC Builder Using Verilog Design

OUTLINE. STM32F0 Architecture Overview STM32F0 Core Motivation for RISC and Pipelining Cortex-M0 Programming Model Toolchain and Project Structure

Introduction to the Qsys System Integration Tool

9. PIO Core. Core Overview. Functional Description

Module Introduction! PURPOSE: The intent of this module, 68K to ColdFire Transition, is to explain the changes to the programming model and architectu

CHAPTER 4 MARIE: An Introduction to a Simple Computer

ARM-Based Embedded Processor Device Overview

The Allele Search Lab to Improve Heterogeneous Reconfigurable Platform Design Skills

Laboratory Exercise 5

ECE332, Week 8. Topics. October 15, Exceptions. Hardware Interrupts Software exceptions

Designing with ALTERA SoC

Embedded Design Handbook

Introduction to the Altera SOPC Builder Using Verilog Designs. 1 Introduction

Rapidly Developing Embedded Systems Using Configurable Processors

TKT-2431 SoC design. Introduction to exercises. SoC design / September 10

DSP Builder Handbook Volume 1: Introduction to DSP Builder

Calendar Description

SISTEMI EMBEDDED AA 2013/2014

NIOS II Instantiating the Off-chip Trace Logic

Nios II Soft Core-Based Double-Layer Digital Watermark Technology Implementation System

CENG 336 Introduction to Embedded Systems Development. Lecture 1: An Introduction to Computers and Embedded Systems

DE2 Board & Quartus II Software

High Aberrance AES System Using a Reconstructable Function Core Generator

University of Massachusetts Amherst Computer Systems Lab 2 (ECE 354) Spring Lab 1: Using Nios 2 processor for code execution on FPGA

University of Massachusetts Amherst Computer Systems Lab 1 (ECE 354) LAB 1 Reference Manual

The S6000 Family of Processors

Using Tightly Coupled Memory with the Nios II Processor

EN2911X: Reconfigurable Computing Lecture 01: Introduction

DSP Builder Handbook Volume 1: Introduction to DSP Builder

FPGA for Software Engineers

IMPLEMENTATION OF TIME EFFICIENT SYSTEM FOR MEDIAN FILTER USING NIOS II PROCESSOR

Estimating Nios Resource Usage & Performance

Basic Concepts COE 205. Computer Organization and Assembly Language Dr. Aiman El-Maleh

Contents of this presentation: Some words about the ARM company

ENHANCED TOOLS FOR RISC-V PROCESSOR DEVELOPMENT

Advanced Computer Architecture

DESIGN OF STANDARD AND CUSTOM PERIPHERAL USING NIOS II PROCESSOR

USING C-TO-HARDWARE ACCELERATION IN FPGAS FOR WAVEFORM BASEBAND PROCESSING

Digital Systems Design

Debugging Nios II Systems with the SignalTap II Logic Analyzer

Course web site: teaching/courses/car. Piazza discussion forum:

ECE4530 Fall 2015: The Codesign Challenge I Am Seeing Circles. Application: Bresenham Circle Drawing

ASSEMBLY LANGUAGE MACHINE ORGANIZATION

EE4380 Microprocessor Design Project

Chapter 10 Objectives

ECE 486/586. Computer Architecture. Lecture # 7

CS310 Embedded Computer Systems. Maeng

Introduction to Microprocessor

Qsys and IP Core Integration

ARM processor organization

Embedded System Design

Transcription:

ECE332, Week 2, Lecture 3 September 5, 2007 1 Topics Introduction to embedded system Design metrics Definitions of general-purpose, single-purpose, and application-specific processors Introduction to Nios II processor Programming model Instruction set categories Instruction decoding 2 1

References Chapter 1 (Introduction) of Embedded System Design Chapter 2 (Processor Architecture) of Nios II Processor Reference Handbook Chapter 3 (Programming Model) of Nios II Processor Reference Handbook Chapter 8 (Instruction Set Reference) of Nios II Processor Reference Handbook 3 Embedded systems overview Computing systems are everywhere Most of us think of desktop computers PC s laptops mainframes servers But there s another type of computing system far more common... 4 2

Embedded systems overview Embedded computing systems Computing systems embedded within electronic devices Hard to define - Nearly any computing system other than a desktop computer Billions of units produced yearly, versus millions of desktop units Perhaps 50 per household and per automobile Computers are in here... and here... and even here... Lots more of these, though they cost a lot less each. 5 Some common characteristics of embedded systems Single-functioned Executes a single program, repeatedly Tightly-constrained Low cost, low power, small, fast, etc. Reactive and real-time Continually reacts to changes in the system s environment Must compute certain results in real-time without delay Hard versus soft 6 3

Design challenge optimizing design metrics Obvious design goal: Construct an implementation with desired functionality Key design challenge: Simultaneously optimize numerous design metrics Design metric A measurable feature of a system s implementation Optimizing design metrics is a key challenge 7 Design challenge optimizing design metrics Common metrics Unit cost the monetary cost of manufacturing each copy of the system, excluding NRE cost NRE cost (Non-Recurring Engineering cost) The one-time monetary cost of designing the system Size the physical space required by the system Performance the execution time or throughput of the system Power the amount of power consumed by the system 8 4

Design challenge optimizing design metrics Common metrics (continued) Flexibility the ability to change the functionality of the system without incurring heavy NRE cost Time-to-prototype the time needed to build a working version of the system Time-to-market the time required to develop a system to the point that it can be released and sold to customers Maintainability the ability to modify the system after its initial release Correctness, safety, many more 9 Design metric competition -- improving one may worsen others Performance Power NRE cost Size Expertise with both software and hardware is needed to optimize design metrics Not just a hardware or software expert, as is common A designer must be comfortable with various technologies in order to choose the best for a given application and constraints Hardware/software codesign 10 5

NRE and unit cost metrics Costs: Unit cost: the monetary cost of manufacturing each copy of the system, excluding NRE cost NRE cost (Non-Recurring Engineering cost): The one-time monetary cost of designing the system total cost = NRE cost + unit cost * # of units per-product cost = total cost / # of units = (NRE cost / # of units) + unit cost Example NRE=$2000, unit=$100 For 10 units total cost = $2000 + 10*$100 = $3000 per-product cost = $2000/10 + $100 = $300 Amortizing NRE cost over the units results in an additional $200 per unit 11 The performance design metric Widely-used measure of system, widely-abused Clock frequency, instructions per second not good measures Digital camera example a user cares about how fast it processes images, not clock speed or instructions per second Latency (response time) Time between task start and end e.g., Camera s A and B process images in 0.25 seconds Throughput Tasks per second, e.g. Camera A processes 4 images per second Throughput can be more than latency seems to imply due to concurrency, e.g. Camera B may process 8 images per second (by capturing a new image while previous image is being stored). 12 6

Processor technology The architecture of the computation engine used to implement a system s desired functionality Processor does not have to be programmable Processor not equal to general-purpose processor Controller Control logic and State register IR PC Datapath Register file General ALU Controller Control logic and State register IR PC Datapath Registers Custom ALU Controller Control logic State register Datapath index total + Program memory Assembly code for: Data memory Program memory Assembly code for: Data memory Data memory total = 0 for i =1 to General-purpose ( software ) total = 0 for i =1 to Application-specific Single-purpose ( hardware ) 13 General-purpose processors Programmable device used in a variety of applications Also known as microprocessor Features Program memory General datapath with large register file and general ALU User benefits Low time-to-market and NRE costs High flexibility Pentium the most well-known, but there are hundreds of others Controller Control logic and State register IR PC Program memory Assembly code for: total = 0 for i =1 to Datapath Register file General ALU Data memory 14 7

Single-purpose processors Digital circuit designed to execute exactly one program a.k.a. coprocessor, accelerator or peripheral Features Contains only the components needed to execute a single program No program memory Benefits Fast Low power Small size Controller Control logic State register Datapath index total + Data memory 15 Application-specific processors Programmable processor optimized for a particular class of applications having common characteristics Compromise between general-purpose and single-purpose processors Features Program memory Optimized datapath Special functional units Benefits Some flexibility, good performance, size and power Controller Control logic and State register IR PC Program memory Assembly code for: total = 0 for i =1 to Datapath Registers Custom ALU Data memory 16 8

Nios II Pipelined RISC Architecture 32-bit Instructions Flat Register File 32-bit Data Path 32 Prioritized Interrupts Optional Instruction & Data Cache Custom Instructions Branch Prediction 17 Standard Design Block Diagram Ethernet MAC/PHY 1MB SRAM 8MB FLASH 16MB Compact FLASH 32MB SDRAM 32-Bit Nios II Processor IRQ IRQ #(6) Address (32) Read Write Data In (32) Data Out (32) Avalon Switch Fabric Tri-State Bridge ROM (with Monitor) LED PIO Tri-State Bridge General Purpose Timer LCD PIO Compact Flash PIOs Periodic Timer 7-Segment LED PIO SDRAM Controller UART Reconfig PIO Button PIO Level Shifter On-Chip Off-Chip 8 LEDs Expansion Header J12 2 Digit Display 4 Momentary buttons 18 9

Nios II Processor Core 19 Nios II Versions Nios II Processor Comes In three ISA Compatible Versions FAST: Optimized for Speed STANDARD: Balanced for Speed and Size ECONOMY: Optimized for Size Software Code is Binary Compatible No Changes Required When CPU is Changed 20 10

Binary Compatibility / Flexible Performance Nios II /f Fast Nios II /s Standard Nios II /e Economy Pipeline 6 Stage 5 Stage None H/W Multiplier & Barrel Shifter 1 Cycle 3 Cycle Emulated In Software Branch Prediction Dynamic Static None Instruction Cache Configurable Configurable None Data Cache Configurable None None Custom Instructions Up to 256 21 SOPC Builder Flow Processor Library SOPC Builder GUI Configure Processor Custom Instructions Peripheral Library Hardware Development HDL Source Files Testbench Select & Configure Peripherals, IP Connect Blocks Generate IP Modules Software Development Nios II IDE C Header files Custom Library Peripheral Drivers Synthesis & Fitter Hardware Configuration File Verification & Debug Executable Code Compiler, Linker, Debugger User Design JTAG, Serial, or Ethernet User Code Other IP Blocks Quartus II Altera PLD On-Chip Debug Software Trace Hard Breakpoints SignalTap II Libraries RTOS GNU Tools 22 11

Nios II General Purpose Registers 23 Control Registers and Bits 24 12

Instruction Set Categories Data transfer instructions Arithmetic and logical instructions Move instructions Comparison instructions Shift and rotate instructions Program control instructions Other control instructions Custom instructions No-operation instructions Potential unimplemented instructions 25 Wide Data Transfer Instructions See ldw and ldwio at page 8-64 of Nios II Processor Reference Handbook See page 8-8 for conventions See Table 3-5 for narrow data transfer instructions 26 13

Arithmetic and Logical Instructions 27 Move Instructions 28 14

Comparison Instructions 29 Shift and Rotate Instructions 30 15

Program Control Instructions 31 Program Control Instructions 32 16

Program Control Instructions 33 Nios II Instruction Word Format I-type R-type J-type 34 17

Nios II Instruction Word Format Decode add r3,r4,r5 and and r6,r7,r8 35 18