Primary Author: Girish Verma Secondary Author(s): Navya Prabhakar Presenter: Navya Prabhakar Company/Organization: CircuitSutra USB Modeling Quick Start.

Slides:



Advertisements
Similar presentations
MicroKernel Pattern Presented by Sahibzada Sami ud din Kashif Khurshid.
Advertisements

Device Virtualization Architecture
Lecture 101 Lecture 10: Kernel Modules and Device Drivers ECE 412: Microcomputer Laboratory.
Device Drivers. Linux Device Drivers Linux supports three types of hardware device: character, block and network –character devices: R/W without buffering.
purpose Search : automation methods for device driver development in IP-based embedded systems in order to achieve high reliability, productivity, reusability.
Operating System.
So, you think you need USB On-The-Go?. Agenda Introduction Embedded Host terminology OTG – Electrical – Protocol When to use OTG 2.
Protocol Layer Bottom-up view of the USB protocol Bottom-up view of the USB protocol –Byte/Bit Ordering –SYNC Field –Packet Field Formats PID Field PID.
Universal Serial Bus Grant Heileman. The History of USB In 1994 a collaborative effort to design a standard for peripheral devices was made between Compaq,
Handheld TFTP Server with USB Andrew Pangborn Michael Nusinov RIT Computer Engineering – CE Design 03/20/2008.
Contiki A Lightweight and Flexible Operating System for Tiny Networked Sensors Presented by: Jeremy Schiff.
1 Case Study 1: UNIX and LINUX Chapter History of unix 10.2 Overview of unix 10.3 Processes in unix 10.4 Memory management in unix 10.5 Input/output.
1 USB 2.0 Specification  General Description  From where we could begin the work  What would be valid to do?  Main doubts  What is OTG (On the Go)
1 USB 2.0 Specification  General Description  What is OTG (On the Go)  From where we could begin the work  What would be valid to do?
04/16/2010CSCI 315 Operating Systems Design1 I/O Systems Notice: The slides for this lecture have been largely based on those accompanying an earlier edition.
29 April 2005 Part B Final Presentation Peripheral Devices For ML310 Board Project name : Spring Semester 2005 Final Presentation Presenting : Erez Cohen.
Figure 1.1 Interaction between applications and the operating system.
USB – An Overview Group 3 Kaushik Nandha Bikram What is the Universal Serial bus (USB)? Is a cable bus that supports data exchange between a host computer.
Anush Rengarajan Feng Zheng Thomas Madaelil
USB 2.0 INTRODUCTION NTUT CSIE 學 生:許家豪 指導教授:柯開維教授.
Operating Systems Concepts 1. A Computer Model An operating system has to deal with the fact that a computer is made up of a CPU, random access memory.
ANDROID PROGRAMMING MODULE 1 – GETTING STARTED
USB: UNIVERSAL SERIAL BUS Joe Kaewbaidhoon Alex Motalleb Vishal Joshi Prepared for EECS 373 University of Michigan, Ann Arbor 1.
Serial Interfaces. Bit serial bus New generation of busses Uses bit-serial, differential drive technology Uses on-line device drivers (Hot-plug technology)
© 2007 Cisco Systems, Inc. All rights reserved.ICND1 v1.0—1-1 Building a Simple Network Understanding the Host-to-Host Communications Model.
TM Freescale, the Freescale logo, AltiVec, C-5, CodeTest, CodeWarrior, ColdFire, C-Ware, mobileGT, PowerQUICC, StarCore, and Symphony are trademarks of.
May 8, The EASY Way to Create I/O Devices John Hyde Intel Corporation intel.com.
Spring 2014 SILICON VALLEY UNIVERSITY CONFIDENTIAL 1 Introduction to Embedded Systems Dr. Jerry Shiao, Silicon Valley University.
Embedded Systems Architecture Class Project USB 2.0 Function Controller December 12, 2008 Brandon Wolfe, Ben Marrou, Daniel Chan.
Peripheral Busses COMP Jamie Curtis. PC Busses ISA is the first generation bus 8 bit on IBM XT 16 bit on 286 or above (16MB/s) Extended through.
Introduction to USB Development. USB Development Introduction Technical Overview USB in Embedded Systems Recent Developments Extensions to USB USB as.
Embedding USB Lane Hauck Cypress Semiconductor. Embedded Systems Conference, March 2002 Embedding USB 1 Agenda  Why USB?  USB Advantages  USB Basics.
Introduction to USB © 2010 Renesas Electronics America Inc. All rights reserved.
UNIX System Administration OS Kernal Copyright 2002, Dr. Ken Hoganson All rights reserved. OS Kernel Concept Kernel or MicroKernel Concept: An OS architecture-design.
Chapter 6 Operating System Support. This chapter describes how middleware is supported by the operating system facilities at the nodes of a distributed.
Design and Implementation of a Linux SCSI Target for Storage Area Networks Ashish A. PalekarAnshul Chaddha, Trebia Networks Narendran Ganapathy, 33 Nagog.
Hardware Definitions –Port: Point of connection –Bus: Interface Daisy Chain (A=>B=>…=>X) Shared Direct Device Access –Controller: Device Electronics –Registers:
Windows Operating System Internals - by David A. Solomon and Mark E. Russinovich with Andreas Polze Unit OS6: Device Management 6.1. Principles of I/O.
Socket Swapping for efficient distributed communication between migrating processes MS Final Defense Praveen Ramanan 12 th Dec 2002.
CASE STUDY 1: Linux and Android Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved.
LWIP TCP/IP Stack 김백규.
Cisco S2 C4 Router Components. Configure a Router You can configure a router from –from the console terminal (a computer connected to the router –through.
IBM - CVUT Student Research Projects USB Host with ATmega Microcontroller Jiří Dostál Martin Chloupek
Processes Introduction to Operating Systems: Module 3.
GreenBus Extensions for System-On-Chip Exploration.
1 Presented By: Eyal Enav and Tal Rath Eyal Enav and Tal Rath Supervisor: Mike Sumszyk Mike Sumszyk.
Updates and Common Questions Asked by Simulation Developers Peter Shier Architect Windows Devices and Storage Technologies
AoE and HyperSCSI on Linux PDA Prepared by They Yu Shu.
Intel Research & Development ETA: Experience with an IA processor as a Packet Processing Engine HP Labs Computer Systems Colloquium August 2003 Greg Regnier.
SOC Virtual Prototyping: An Approach towards fast System- On-Chip Solution Date – 09 th April 2012 Mamta CHALANA Tech Leader ST Microelectronics Pvt. Ltd,
Part 4: Network Applications Client-server interaction, example applications.
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.
Intel Open Source Technology Center Lu Baolu 2015/09
TLM Convenience Socket Parvinder Pal Singh Girish Verma.
WIFI design Guide based PW620-I b/g ----Hardware section Orin.Zhu August 31 st, 2007.
Security Architecture and Design Chapter 4 Part 2 Pages 319 to 357.
Implementation Method Linux-USB Gadget Framework –The Linux-USB Gadget Framework makes it easy for peripherals and other devices embedding GNU/Linux system.
LonWorks Introduction Hwayoung Chae.
CSCI/CMPE 4334 Operating Systems Review: Exam 1 1.
Tgt: Framework Target Drivers FUJITA Tomonori NTT Cyber Solutions Laboratories Mike Christie Red Hat, Inc Ottawa Linux.
Android Mobile Application Development
USB The topics covered, in order, are USB background
USB PHYISICAL LAYER PROTOCOL ENGINE LAYER APPLICATION LAYER
cFE FSW at APL & FSW Reusability
How to Quick Start Virtual Platform Development
NS Training Hardware.
USB- Universal Serial Bus
CSCI 315 Operating Systems Design
Chapter 2: The Linux System Part 5
Operating Systems Structure
Presentation transcript:

Primary Author: Girish Verma Secondary Author(s): Navya Prabhakar Presenter: Navya Prabhakar Company/Organization: CircuitSutra USB Modeling Quick Start Package USB Modeling Quick Start Package

Presentation Topics Need for USB Modeling QSP USB Concepts Overview of USB QSP contents Contents of USB QSP TLM USB Protocol USB Host Socket USB Device Socket USB Host PC Host Controller USB Host PC Device Controller Results

Need for USB Modeling QSP Issues with USB Modeling USB protocol is standardized but no available standard on TLM USB Developing a model which addresses USB protocol without re-usable components is time consuming Testing USB models requires complete protocol stack Solution Provide basic infrastructure to quick start SystemC model development of USB Device controller, USB Host Controller Facilitates development and testing of device driver/application stack Generic USB Device/Host requirements are modeled in convenience sockets so model developer needs to focus only on device-related modeling

USB Concepts USB Bus Supports data exchange between a USB host and USB peripherals USB Host Controller Manages data transfer between USB Host and USB devices USB Device Device specification General information about device Configuration Groups interfaces Interface Represent basic functionality Endpoint Source or sink of data Unique for a device Device Configuration 0... Interface 0Interface n Endpoint 0Endpoint n... Configuration n

USB Communication Interface Takes place at electrical/link level and protocol level Abstracted as transaction level interface call Contains APIs to model communication at high level of abstraction USB Host and Slave sockets o Encapsulate USB communication Contents of USB QSP Host Controller Device Controller Downstream Bus Upstream Bus Forward Interface Backward Interface USB Host Socket USB Device Socket

Contents of USB QSP USB Host Controller USB Host Socket USB Host PC Device Controller USB Device Socket USB Host PC Host Controller USB Device Controller USB Device Socket USB Host Socket

Payload: tlm_usb_host_payload AttributePossible Values Request typeDevice Reset, Device Suspend, Device Resume, Data Transfer, Sync Frame Device AddressAddress of USB device Endpoint AddressAddress of USB Endpoint Transfer DirectionSetup, In, Out Transfer TypeControl, Interrupt, Bulk, Isochronous Data pointerPointer to data buffer Data length requestedAllocated data length Used data lengthData length valid IntervalInterval between packets (required for Isochronous packets) Frame numberUSB frame number Response StatusOK, STALL, NAK, ERROR, INCOMPLETE sc_interface: tlm_usb_fw_if Communication from USB Host Controller to USB Device Controller void nb_transport_usb_fw(tlm_usb_host_payload& payload) TLM USB Protocol Forward Interface

Payload: tlm_usb_device_payload AttributePossible Values Request typePort status, Remote wakeup, Initiate SRP, Initiate HNP Port StatusDevice Attached, Device removed Response StatusOK, ERROR,INCOMPLETE sc_interface: tlm_usb_bw_if Communication from USB Device Controller to USB Host Controller void nb_transport_usb_bw(tlm_usb_device_payload& payload) TLM USB Protocol Backward Interface

USB Host Socket sc_port templated with forward interface Implements the backward interface Inherits from USB Host State Implements generic USB Device handling Provides convenience APIs for USB device model developer Callbacks void usb_port_status (UsbPortState_t port_status, int n); void usb_request_remote_wakeup(); bool usb_request_srp(); bool usb_request_hnp(); USB Host Socket sc_core::sc_port usb_host_socket sc_core::sc_export UsbHostState USB Host Controller Convenience APIs Callbacks

USB Host Socket Convenience APIs void reset(); void start(); void stop(); tlm_usb_transaction_status_t submit_transfer_request (tlm_usb_data_transfer_request_t* data_pkt); void set_port_state(int port_num, UsbPortState_t port_state); void get_port_status(uint8_t* buf);

USB Device Socket sc_port templated with backward interface Implements the forward interface Inherits from USB Device State Implements generic USB Device handling Provides convenience APIs for USB device model developer Callbacks void device_state_change (device_state_change_t reason); unsigned int handle_ep_request (uint8_t EndPointAddr,int ep_dir,unsigned char* ep_data_ptr, unsigned int ep_data_len_requested); bool handle_ep0_request(usb_control_packet *setup_pkt, uint8_t* buf); USB Device Socket sc_core::sc_port usb_device_socket sc_core::sc_export UsbDeviceState Convenience APIs Callbacks USB Device Controller

USB Device Socket Convenience APIs void enable_endpoint(uint8_t _EndPointAddr, tlm_usb_transfer_type_t _EndPointType, tlm_usb_endpoint_dir_t _EndPointDir, uint16_t _MaxPacketSize, uint8_t _bInterval); void halt_endpoint(uint8_t _EndPointAddr); void set_device_state(UsbDeviceState_t _DevState); void set_device_address(tlm_usb_device_address _dev_addr); void handle_ep0_standard_req(bool _handle_standard_req = true); void set_device_descriptor(usb_device_descriptor* _p_device_descriptor); void set_config_descriptor(usb_config_descriptor* _p_config_descriptor, int num); void set_string_descriptor(usb_string_descriptor* _p_string_descriptor, int num);

USB Host PC Host Controller SystemC model USB host controller that encapsulate USB system of host PC Can connect with USB Device Controller model Adds a new virtual Host Controller in the Host PC OS Connects the USB Device Controller to the new virtual Host through set of OS-dependent APIs Supports Control, Bulk, Interrupt and Isochronous transfers USB Host PC Host Controller model User space Kernel space Virtual Host Controller Emulation in kernel OS dependent API call for Virtual Host Controller emulation SC_THREAD Virtual Host Controller OS Adaptor USB Host Socket

USB Host PC Host Controller model USB Host PC Host Controller Linux Version USB Host PC Host Controller connects with USB Device model through USB Host Socket Virtual Host Controller Library provides convenience APIs to interact with virtual Host Controller driver Virtual Host Controller Linux kernel Virtual Host Controller driver Registers itself to the core layer Forwards URB requests from USB Core layer to the application OS running on Host System Virtual Host Controller USB Core Layer SC_THREAD Virtual Host Controller Library USB Host Socket

USB Host PC Host Controller model USB Host PC Host Controller OS running on Host System Softehci Windows DSF Layer USB Core Layer Windows Version USB Host Controller connects with USB Device model through USB Host Socket Soft USB Interfaces with the application to communicate as a USB Device Receives URB requests from USB DSF layer and sends it to the application Soft ehci DSF [Device Simulation Framework] Emulates virtual Host Controller SC_THREAD Softusbdll USB Host Socket

USB Host PC Device Controller model USB Host PC Device Controller SystemC model of USB device controller that encapsulate the USB system of host PC Can connect with USB Host Controller model Controls the USB Devices connected to Host PC through LIBUSB API LIBUSB is a C library that provides applications easy access to USB devices Contains configurable parameters – Product ID and Vendor ID to make the USB device accessible in the Virtual Platform Supports Control, Bulk, Interrupt transfers USB Port Host PC/System USB Host Controller on PC OS running on Host System Host Controller Driver USB HAL Layer USB Device Socket SC_THREAD LIBUSB API

Created virtual platform having USB device controller booting Linux with USB file storage gadget driver Able to emulate virtual platform as a USB mass storage device in Host PC Mounted this USB device on Host PC & successfully performed read, write on virtual platform Provides support to develop and test device driver/ application stalk on Host PC Results Kernel space Virtual Platform Core Bus Memory USB Device Controller USB Device Socket USB Host PC Host Controller USB Host Socket Virtual Host Controller emulation in kernel User space

Virtual Platform Core Bus Memory USB Host Controller USB Host Socket USB Host PC Device Controller USB Device Socket USB Host Controller on Host PC User space Results USB Port Created virtual platform having a USB3.0 XHCI Host Controller booting Linux Host PC is able to connect real USB device to the virtual platform Successfully able to mount, read, write on USB thumb drive connected to Host PC Provides support to develop device driver for USB Host Controller on virtual platform Kernel space

Thank You!!