Introduction to Embedded Systems The X-Board: Memory-Mapped I/O and Devices Lecture 7.

Slides:



Advertisements
Similar presentations
Nios Multi Processor Ethernet Embedded Platform Final Presentation
Advertisements

INPUT-OUTPUT ORGANIZATION
MC68HC11 System Overview. System block diagram (A8 version)
StreamBlade SOE TM Initial StreamBlade TM Stream Offload Engine (SOE) Single Board Computer SOE-4-PCI Rev 1.2.
I/O Interfaces.
Handheld TFTP Server with USB Andrew Pangborn Michael Nusinov RIT Computer Engineering – CE Design 03/20/2008.
1 The System Unit Lecture 2 CSCI 1405 Introduction to Computer Science Fall 2006.
IO Controller Module Arbitrates IO from the CCP Physically separable from CCP –Can be used as independent data logger or used in future projects. Implemented.
ECE Department: University of Massachusetts, Amherst Lab 1: Introduction to NIOS II Hardware Development.
Lecture 7 Lecture 7: Hardware/Software Systems on the XUP Board ECE 412: Microcomputer Laboratory.
6. The CPU and Memory Chapt. 7.
Microcontroller: Introduction
Prepared by Careene McCallum-Rodney Hardware specification of a computer system.
INPUT-OUTPUT ORGANIZATION
Lecture 12 Today’s topics –CPU basics Registers ALU Control Unit –The bus –Clocks –Input/output subsystem 1.
Silicon Labs ToolStick Development Platform
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.
WHAT IS A COMPUTER??? An electronic device that accepts: n Input n Processes the input n Stores the results of the processing n provides Output Computers.
Chapter 2 How Computers Work.
Chapter 8 Input/Output. Busses l Group of electrical conductors suitable for carrying computer signals from one location to another l Each conductor in.
1 Computing Basics Honolulu Community College Cisco Academy Training Center Semester 1 Version
Using the PSoC USB March 17, 2012 Lloyd Moore, President/Owner.
© Copyright Xilinx 2004 All Rights Reserved 9 November, 2004 XUP Virtex-II Pro Development System.
NetBurner MOD 5282 Network Development Kit MCF 5282 Integrated ColdFire 32 bit Microcontoller 2 DB-9 connectors for serial I/O supports: RS-232, RS-485,
CHAPTER 5 I/O PRINCIPLE Understand the principles of System Bus
COMPUTER SYSTEM LABORATORY Lab10 - Sensor II. Lab 10 Experimental Goal Learn how to write programs on the PTK development board (STM32F207). 2013/11/19/
Digilent System Board Capabilities Serial Port (RS-232) Parallel Port 1 Pushbutton Hint: Good for a reset button Connected to a clock input. See Digilent.
COE4OI5 Engineering Design Chapter 2: UP2/UP3 board.
Ch Review1 Review Chapter Microcomputer Systems Hardware, Software, and the Operating System.
CPU (CENTRAL PROCESSING UNIT): processor chip (computer’s brain) found on the motherboard.
AT91RM9200 Boot strategies This training module describes the boot strategies on the AT91RM9200 including the internal Boot ROM and the U-Boot program.
Input/OUTPUT [I/O Module structure].
UART and UART Driver B. Ramamurthy.
Introduction to Embedded Systems Buffering and DMA (Direct Memory Access) Lecture 11.
Understanding Computers, Ch.31 Chapter 3 The System Unit: Processing and Memory.
Organization of a computer: The motherboard and its components.
Dr. Rabie A. Ramadan Al-Azhar University Lecture 6
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Principles of I/0 hardware.
2006 Chapter-1 L3: "Embedded Systems - Architecture, Programming and Design", Raj Kamal, Publs.: McGraw-Hill, Inc. 1 Hardware Elements in the Embedded.
I/O Example: Disk Drives To access data: — seek: position head over the proper track (8 to 20 ms. avg.) — rotational latency: wait for desired sector (.5.
Computers Are Your Future Eleventh Edition Chapter 2: Inside the System Unit Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall1.
(More) Interfacing concepts. Introduction Overview of I/O operations Programmed I/O – Standard I/O – Memory Mapped I/O Device synchronization Readings:
NIOS II Ethernet Communication Final Presentation
COMPUTER ARCHITECTURE. Recommended Text 1Computer Organization and Architecture by William Stallings 2Structured Computer Organisation Andrew S. Tanenbaum.
Author Wayne M. Koski EVLA Monitor & Control Hardware PDR March 13, EVLA Monitor and Control Module Interface Board (MIB) Design.
Accessing I/O Devices Processor Memory BUS I/O Device 1 I/O Device 2.
PARTS OF THE COMPUTER PREPARED BY: RENATO R. DE VERA II.
Organisasi Sistem Komputer Materi VIII (Input Output)
DEVICES AND COMMUNICATION BUSES FOR DEVICES NETWORK– PARALLEL BUS DEVICE PROTOCOLS 1.
Chapter 13 – I/O Systems (Pgs ). Devices  Two conflicting properties A. Growing uniformity in interfaces (both h/w and s/w): e.g., USB, TWAIN.
Computer Hardware – System Unit
I/O Interface. INTRO TO I/O INTERFACE I/O instructions (IN, INS, OUT, and OUTS) are explained. Also isolated (direct or I/O mapped I/O) and memory-mapped.
Digital Literacy: Computer Basics
بسم الله الرحمن الرحيم MEMORY AND I/O.
1 Device Controller I/O units typically consist of A mechanical component: the device itself An electronic component: the device controller or adapter.
Amdahl’s Law & I/O Control Method 1. Amdahl’s Law The overall performance of a system is a result of the interaction of all of its components. System.
SEPTEMBER 8, 2015 Computer Hardware 1-1. HARDWARE TERMS CPU — Central Processing Unit RAM — Random-Access Memory  “random-access” means the CPU can read.
Networked Embedded Systems Pengyu Zhang EE107 Spring 2016 Lecture 8 Serial Buses.
Compute Node Tutorial(2) Agenda Introduce to RocketIO How to build a optical link connection Backplane and cross link communications How to.
CEng3361/18 CENG 336 INT. TO EMBEDDED SYSTEMS DEVELOPMENT Spring 2007 Recitation 01.
I/O techniques - Interfacing
Lecture 2. A Computer System for Labs
Lab 1: Using NIOS II processor for code execution on FPGA
Computer System Laboratory
The PCI bus (Peripheral Component Interconnect ) is the most commonly used peripheral bus on desktops and bigger computers. higher-level bus architectures.
CS703 - Advanced Operating Systems
Introduction to Microprocessors and Microcontrollers
AT91RM9200 Boot strategies This training module describes the boot strategies on the AT91RM9200 including the internal Boot ROM and the U-Boot program.
Presentation transcript:

Introduction to Embedded Systems The X-Board: Memory-Mapped I/O and Devices Lecture 7

Introduction to Embedded Systems Summary of Previous Lecture The many levels of computer systems The CPU-Memory Interface The Memory Subsystem and Technologies –SRAM –DRAM CPU-Bus-I/O –I/O Register Basics Bus Protocols –Synchronous bus protocol –Asynchronous bus protocol –Bus arbitration

Introduction to Embedded Systems Quote of the Day Ability is what you are capable of doing. Motivation determines what you do. Attitude determines how well you do it. –Lou Holtz

Introduction to Embedded Systems Outline of This Lecture The lab X-Board hardware –80200 XScale Processor –Xilinx FPGA –Seven-segment display –Accessing flash memory Memory-Mapped I/O –Accessing the devices from C programs

Introduction to Embedded Systems The X-Board Reset button

Introduction to Embedded Systems A Look at the Sound Card

Introduction to Embedded Systems What’s Life Without Accessories?

Introduction to Embedded Systems The X-Board + Accessories

Introduction to Embedded Systems The Big Endian Evaluation Platform (BRH) Hardware SpecificationValue/Limit Processor XScale-based Intel 80200, 733 MHz SDRAM Memory128Mbyte, 100MHz Flash Memory4Mbyte, ns Ethernet – 2 Ports10/100 BaseT Serial – 2 PortsRS232, 115.2K PCISingle-slot, 64 bit, 33 MHz, 264 MBps Debug Support PROM-ICE Connector JTAG Connector

Introduction to Embedded Systems Ethernet Ports (10/100BT) Intel Processor PCI Backplane Serial Ports Power Supply Flash Memory Seven Segment Display “Mom”: The Mothership Reset Button Endianness Jumper Boot Image Selector

Introduction to Embedded Systems [ASIDE] Review of PCI (Peripheral Component Interconnect) Shared bus = same path from multiple devices to CPU/mem –Direct access to system mem –Bridge to CPU’s system bus –Single system IRQ for all devices – bus bridge Up to 133 MHz, 64-bit, 1GBps (X-Board differs) Potential replacements –Point-to-point channels –Infiniband (4 GBps) –HyperTransport (6.4 GBps)

Introduction to Embedded Systems

[ASIDE] Review of Ports Serial ports –Universal Asynchronous Receiver/Transmitter (UART): controller –Takes the computer bus’ parallel data and serializes it –Transfer rate of 115 Kbps –Example usage: Modems Parallel ports –Sends the 8 bits in parallel – KBps (standard), upto 2 MBps (enhanced) –Example usage: Printers, Zip drives Universal Serial Bus (USB) ports –Single way to connect upto 127 devices –Hot-swappable, “Plug-and-Pray” –Max bandwidth of 12 Mbps –Example usage: Digital cameras

Introduction to Embedded Systems The Serial Ports

Introduction to Embedded Systems More on Serial Ports Two asynchronous serial ports Dual UART connected to the peripheral bus RS232 pin information –Data lines: TX and RX –Handshake lines: CTS and RTS Part of Lab 2 –Write a pseudo-serial driver for Serial Port 2 –APIs provided in the library serial_lib.a –To initialize/finalize the serial device –To write characters to the UART (printing to the terminal display) –To capture input from the keypad (detecting keypad numeric input) Caution –Keypad will not work on the COM port of your computer –Serial Port 1 is reserved for use by the Angel debug monitor

Introduction to Embedded Systems Seven-Segment LED Seven-segment display on X-Board Controlled by the Board firmware Decimal point segment is special –Not controlled by firmware –“Power-On” indicator –Connected to 3.3V rail

Introduction to Embedded Systems More on the Seven-Segment LED LED is a memory-mapped I/O device –Mapped to 0x LED Character Map –Look in header file brh.h Keypad + LED demo in Lab 2 –Display on the LED the number entered on the keypad Quirks: Except for the first key press of any run, each key press returns two values – (i) the value of the last key pressed and (ii) the value of the current key pressed.

Introduction to Embedded Systems Jumper-Configurable Little/Big Endian

Introduction to Embedded Systems Flash Memory on the Board What is flash memory? X-Board contains 4MB of flash memory Can store programs (and data) in a block structure Flash library –Divides the flash memory structure into blocks BOOT Portion of Flash Memory –Contains the boot monitor, Angel debug client, system self-tests Application portion (use this for Lab 2) –Where the user keeps applications and associated data Do not set the BOOT portion as your default flash device! [ASIDE] Example of flash memory (not on X-Board, though)

Introduction to Embedded Systems Flash Library Image Storage Layout Image Area Logical block boundary (high memory) Unused Image Information Header Footer Logical block boundary (low memory)

Introduction to Embedded Systems Details of the Layout Image area –All of the code and read-only data segments of the image. Header information –Any file header information from the downloaded file Image information –Image identification & code operations (added by flash lib code) Unused flash Footer information (five-word information block) –Address of the information block for this image –Base address of the data (the start might be at the beginning of a previous block rather than at the start of this block) –Unique 32-bit value to aid in fast searching –Image type (a block, an image, a SIB, or data) –Checksum for the footer information (over the first four words only)

Introduction to Embedded Systems Accessing Flash Memory (Flash APIs) Flash libraries supplied –flash_lib.a, ActivateFlash.a –APIs defined in flash_lib.h APIs in these libraries allow you to –Initialize/finalize the flash device –Check that flash memory exists at a given location –Mark a part of the flash memory as active –Read a 32-bit word out of a location in flash memory –Examine/verify the footer information (calculate checksum) APIs also allow you to perform file processing –Open/close a file on the host –Read bytes from the open file –Write bytes to the open file Please see Lab 2 handout for more details

Introduction to Embedded Systems Software Addressing of Devices Memory­mapped I/O –Devices are mapped in memory address space, e.g., the 7-segment LED –Standard load and store instruction can manipulate devices Isolated I/O (I/O­mapped I/O) –Devices are not kept in memory address space –Special processor instructions request data from devices Example IN REG, PORT OUT REG, PORT Which one is better? –Memory­mapped I/O uses the same load/store paradigm, but costs some of the address space –Full address space is available for Isolated I/O, but requires extra instructions and control signals from the CPU

Introduction to Embedded Systems Writing Code to Access the Devices Writing assembly code to access devices can be cumbersome LDR R0,=0x MOV R1,#0xFF STRB R1,[R0] Should use “EQU” assembler directive BASE EQU 0x LDR R0, =BASE Can also access devices using C programs

Introduction to Embedded Systems Accessing Devices from C Programs C pointers can be used to write to a specific memory location unsigned char *ptr; ptr = (unsigned char *) 0x ; *ptr = (unsigned char) 0xFF; ??????????? 0x ptr

Introduction to Embedded Systems The X-Team’s “Xplanation”

Introduction to Embedded Systems Summary of Lecture The lab Big-Endian Evaluation Board –80200 XScale processor –Xilinx FPGA The X-Board and accessories –Seven-segment LED, Serial ports Preparing you for Lab 2  Flash memory  Serial ports –Timers (stay tuned for the next lecture)