Trace without a Trace Port on MSC8156 and MSC8144 DSPs

Size: px
Start display at page:

Download "Trace without a Trace Port on MSC8156 and MSC8144 DSPs"

Transcription

1 July 2009 Trace without a Trace Port on MSC8156 and MSC8144 DSPs Using HEAT -- With SC10 build #48 and MSC8156ADS Irene Sierra

2 Summary HEAT concept HEAT HW setup HEAT architecture HEAT API HEAT server HEAT usage HEAT usage for fast VTB download 2

3 HEAT Concept Host Exchange Asynchronous Transfer 3

4 HEAT Concept The problem: The JTAG interface together, with the implementation of the stdio.h functionalities in CodeWarrior, pose a real-time performance problem for communication between ADS and PC. Available hardware and software support to override the problem: Freescale DSPs available 10/100/1000 Ethernet port SmartDSP OS kernel, drivers and IP stack Solution: An application layer development, running over UDP/IP with file IO specific API => HEAT 4

5 HEAT Hardware Setup Setting up the MSC8156ADS board for HEAT 5

6 1. Configure the board for dip switches according to the MSC8156ADS quick start guide. SW5.5 has to be changed to RGMII (ON). HEAT HW Setup 2. Ensure there is a GETH network cable connected to the RJ45 J8 connector. 3. Ensure the other end of the GETH cable is connected to the GETH card of the PC or switch. 4. Configure the host PC IP or MSC8156 IP accordingly. 6

7 HEAT Architecture A file IO client server application 7

8 HEAT Architecture HEAT is a client-server application: HEAT client residing on the DSP, runs over SmartDSP OS and uses both SmartDSP OS kernel and the Ethernet driver. The client can issue requests to multiple servers. HEAT API is as similar as possible to the stdio.h API. HEAT server residing on a remote PC. The server(s) can handle requests from multiple clients. Each request is decoded and handled using a stdio.h defined function. 8

9 HEAT Architecture HEAT features: Can be used for sending files with full path on the host PC (chdir capabilities) Can be used for streaming large data to/from PC a transfer that takes hours on JTAG takes seconds on HEAT Integrated with CodeWarrior Software Analysis can be used for sending large profiling and debugging info to host/development PC Can be used for sending debug messages directly on HEAT server console with printf s the target won t stop anymore the execution in debug traps 9

10 HEAT architecture HEAT features: The application layer, running over UDP/IP, is both simple and versatile. It can easily be enhanced to support further additions to the HEAT library. It just uses an MSC8156 ethernet port NOT locking it (UEC port still shareable between cores and other applications). Low overhead on the application. Multicore capable and useable. The heat_demo example in SC10 proves all these multicore, file transfer and console debug capabilities. 10

11 HEAT architecture HEAT performance: JTAG and HSST performance Over 150x faster that JTAG. HEAT performance is so big, that it couldn t be represented on the same chart with JTAG. HSST data are used for reference between JTAG and HEAT. It is recommended to use SmartDSP HEAT whenever you can. packets/sec , Packet size 6, ,000 JTAG(small buffer) HSST(small buffer) JTAG(medium buffer) HSST(medium buffer) JTAG(large buffer) HSST(large buffer) JTAG(big buffer) HSST(big buffer) An optimal size for a packet is considered at 10Mbyte, beyond that limit hardware may slow down communication due disk data management issues. Note: Tests were done on 8144ADS with core Rev2 but this shouldn t affect the comparison results. MSC8156 tests will follow. packets/sec 250, , , ,000 50, HSST and SmartDSP HEAT performance 218, ,000 HSST(small buffer) SmartDSP HEAT(small buffer) 147,000 HSST(medium buffer) SmartDSP HEAT(medium buffer) HSST(large buffer) SmartDSP HEAT(large buffer) HSST(big buffer) SmartDSP HEAT(big buffer) 6,167 3,750 6,000 8,000 Packet size 11

12 HEAT API As similar as possible to the stdio.h API 12

13 HEAT API Freescale HEAT protocol implementation provides support for its API with stdio hooks enabled. Use printf() within code and see the output on server console Use fopen() and fclose() to open/close a remote file Use fread() or fwrite() to read or write from/in a remote file Use ftell() to get the position in the file Use fseek() to reposition the position indicator in the remote file 13

14 HEAT API HEAT conceptual entities HEAT provided functions Standard C File IO functions are fully available Functions HEAT Initialization HEAT Initialization HEAT File IO Wrapped standard functions HEAT Control osheatinitialize() osheatopen() fopen() HEAT File IO osheatstdioinitialize() heatopen() fclose() osheatclose() fread() Data Structures HEAT Connection HEAT Control osheatwrite() osheatread() fwrite() ftell() HEAT File Info osheatcallback() osheattell() fseek() HEAT Initialization osheatnull() osheatseek() printf() 14

15 HEAT API HEAT data structures: HEAT connection data structure contains info about the socket and server address and port HEAT file info data structure contains a file handle, cookie for synchronization between machines, semaphore for file protection, connection handle, response handlers, buffer for read operations HEAT initialization parameters data structure contains info regarding number of file handles allowed, timeouts, heap allocation, maximum packet size, polling info, send retries number 15

16 HEAT API Network settings and defines that HEAT uses in a very simple manner - Define gateway IP, own IP and server IP address: #define DEFAULT_GATEWAY_IP_ADDRESS #define MY_IP_ADDRESS #define SERVER_IP_ADDRESS 0x0A00008A 0x0A x0A Define MAC: #define MY_MAC_ADDR_HIGH32 0xc2c3c4c5 #define MY_MAC_ADDR_LOW16 0xc6c7 - Define UDP port: #define HEAT_UDP_PORT

17 HEAT API HEAT functions the names are relevant /* Initialization */ os_status osheatinitialize(struct heat_init_params_t *heat_init_params); void osheatstdioinitialize(struct heat_connection_t* connection, bool sync_write); /* Control */ os_status osheatcallback(void* p, os_frame_t* frame); os_status osheatnull(struct heat_connection_t* connection); /* File operations */ struct heat_file_t* osheatopen(const char *filename, const char *mode, struct heat_connection_t* connection, bool sync_write); int32_t osheatclose(struct heat_file_t* file); int32_t osheatwrite(const void* ptr, uint32_t size, uint32_t nitems, struct heat_file_t* file); int32_t osheatread(void *ptr, uint32_t size, uint32_t nitems, struct heat_file_t* file); int32_t osheattell(struct heat_file_t* file); int32_t osheatseek(struct heat_file_t* file, uint32_t offset, uint32_t origin); FILE* heatopen( const char* filename, const char* mode, struct heat_connection_t* connection, bool sync_write); 17

18 HEAT server What is happening on the PC? 18

19 HEAT server The received data is stored in files and formats as designated from client application. The files can be further managed on server machine. It is provided precompiled for immediate use and in sources for customization. It can be executed as is, with default parameters or with the following parameters (use heat_server.exe help to see this): <SC_10_root_dir>\StarCore_Support\SmartDSP\tools\heat_server>heat_server.exe --help Allowed options: --help produce help message --thread-count arg (=6) set maximum number of threads for server(defaults to 6) --bind-ip arg bind ip(defaults to ) --port arg (=1254) port number(defaults to 1254) --log arg (=info) log level[error, info, debug](defaults to error) --log-file arg (=log.txt) log file[error, info, debug](defaults to log.txt) 19

20 HEAT Usage How to use HEAT to print on server console and to transfer unlimited data on server host machine 20

21 HEAT Usage The bottom communication principle stands on service request response messaging. To do that, each HEAT packet has a header. The service request header is divided into 3 sections: A uint32 HEAT library enumeration associated with the service type requested. A uint32 cookie. The emulated functions API parameters. Service Request Requested service type info Communication synchro cookie Emulated function parameters For each service request, the server responds with a response packet. The response packet includes the following information: A uint32 byte HEAT library enumeration associated with the service type requested. A uint32 cookie associated with the HEAT file handle. The emulated functions return value. HEAT Client Response Requested service type info Communication synchro cookie Emulated function return value HEAT Server 21

22 HEAT usage Needed libraries When writing an application it is recommended that the general guidelines in the SmartDSP OS documentation to be read. In order to use HEAT the following libraries must be included: *All related to MSC8156 Production Debug SDOS drivers library SDOS runtime and common HEAT library Net support library BSP library os_msc8156_drivers.elb os_msc8156.elb 3850_heat_lib.elb net_lib_sc3850.elb bsp_msc8156ads.elb os_msc8156_drivers_debug.elb os_msc8156_debug.elb 3850_heat_lib_debug.elb net_debug_sc3850.elb bsp_msc8156ads_debug.elb 22

23 HEAT usage Initialization The PC HEAT server can be started before a network connection is establishes and it will try to bind repeatedly, every second, until it succeeds. In order to use HEAT, the ADS program must set up the hardware to use UDP. HEAT initialization routine can be spliced in five stages: 23

24 HEAT usage SDOS driver layer SDOS protocol layer SDOS application layer 1 Setup memory 3 Setup TCP/IP 5 Init HEAT Create Frame pool Create an Interface Initialize HEAT parameters osframepoolcreate(); ifcreate(); osheatinitialize(); Create Buffer pool Set the gateway Initialize HEAT for console osmempartcreate(); insetdefgateway(); osheatconsoleinitialize(); Set local IP address Initialize HEAT for stdio 2 Setup UEC driver insetaddr(); osheatstdioinitialize(); Allocate MAC initchannelmacipaddress(); 4 Setup UDP Set MSC8156 UEC 0 or 1 Init UDP module osbiodeviceopen(); udpinit(); Open Rx/Tx channels on UEC Create UDP socket osbiochannelopen(); Synchronize cores udpsocket(); Bind the socket to the address Start using HEAT oswaitforallcores(); udpbind(); Enable UEC Setup UDP callback function osbiodevicectrl(); insetudpcallback(); 24

25 HEAT usage Some HEAT usage examples Initialize HEAT, HEAT server console for printf output and HEAT stdio for stdio alike file IO functions Start using HEAT IO and standard FILE IO functions as you wish sprintf(char* console_buf, Printed on server console with HEAT write function\n"); osheatwrite(console_buf, 1, strlen(console_buf), HEAT_STDOUT); osheatinitialize() osheatconsoleinitialize() osheatstdioinitialize() printf( This text will appear on server console\n"); FILE* f = fopen( c:\testfile.txt, "wt", &server_connection, TRUE); fwrite( Writing this 45 characters in the opened file,1,/*strlen*/45,/*file handle*/f); SDOS appinit() function SDOS appbackground() function or in other routines called from appbackground() function 25

26 HEAT usage for fast VTB download Software Analysis 26

27 HEAT usage for fast VTB download Project setup Start with Step 1 or override it and starting from an existing MSC8156ADS SDOS based project and continue from Step 2. Step 1: Use SC 10 wizard to create a new MSC8156ADS project with SDOS support the Basic demo project will be loaded. Step 2: Add to the project the following files located in \<SC_10_root_dir>\StarCore_Support\SoftwareAnalysis\swandemo_8156ads_heat: app_config_sa.h data_buffers.c msc815x_config.c (overwrite or delete the existing one) sa_handle.c Step 3: Edit app_config_sa.h and set network parameters as in the example below on your network settings. The net mask will be automatically set by SDOS according to its class. #define DEFAULT_GATEWAY_IP_ADDRESS 0xC0A8008A /* */ #define MY_IP_ADDRESS 0xC0A80001 /* */ #define SERVER_IP_ADDRESS 0xC0A80064 /* */ 27

28 HEAT usage for fast VTB download Step 4: Browse in the properties of the project as in the figure below and add all the figure presented libraries to the linker in your project. The paths are relevant. 28

29 HEAT usage for fast VTB download Step 5: To override missing included headers errors, load <SC_10_root_dir>\StarCore_Support\SmartDSP\include\heat and <SC_10_root_dir>\StarCore_Support\SmartDSP\include\net paths to HEAT and NET file headers in preprocessor. Include paths located in project properties settings window as in figure below. 29

30 HEAT usage for fast VTB download Step 6: Modify basic.demo.c file or your project file containing the main(), appinit() and appbackground() as follows: add: #include "app_config_sa.h add in appinit() function the next code to create the HWI for SA: status = oshwicreate(os_int_dpua,os_hwi_priority_nmi,edge_mode,sa_ter_handle,0); OS_ASSERT_COND(status == OS_SUCCESS); Step 7: Modify os_config.h as follows: Uncomment: //#define OS_SHARED_MEM_DDR0_SIZE 0x3000 Modify the next items as bellow: #define OS_TOTAL_NUM_OF_MEM_PARTS 8 /* Memory Partitions */ #define OS_TOTAL_NUM_OF_FRAME_POOLS 8 /* Frame Pools Number*/ #define OS_TOTAL_NUM_OF_SWI 10 /* Software Interrupts Number */ #define OS_TOTAL_NUM_OF_QUEUES 48 /* Queues Number */ /*MA*/ Add some semaphores: #define OS_TOTAL_NUM_OF_EVENT_SEMAPHORES 15 /*semaphores*/ Restrict number of cores to 1 SA through HEAT is not yet implemented on multicore: #define OS_NUM_OF_CORES 1 /* Cores Number*/ Enable UEC 0 (giga ethernet interface) in BIO devices: #define MSC815X_UEC0 ON #define OS_TOTAL_NUM_OF_BIO_DEVICES 1 30

31 HEAT usage for fast VTB download Step 8: Build the project. It is possible to get linker errors. If starting from BasicDemo project, it is possible to get an alignment or overlap linking error in M3. Edit the memory map file specified below to increase local M3 memory size: D:\_SC_10_\SC_10.0\StarCore_Support\SmartDSP\demos\starcore\msc815x\basic_ demo\linker_files\memory_map_link.lcf: ;////////////// M3 Memory definitions /////////////////// ;Physical address and size for M3 Local and Shared Memory ;One to one mapping in the 32KB segment of M3.provide _LocalDataM3_b, _M3_b ;.provide _LocalDataM3_size,0x10000 ; 64 KB of M3 comment this line.provide _LocalDataM3_size,0x20000 ; 128 KB of M3 add this line Step 9: Verify host PC network settings and start HEAT server on remote PC with desired parameters. It should work if launched with default parameters. 31

32 Step 10: - Open Debug Configurations : - Select the appropriate debug configuration target - Go to Trace and Profile tab - Check Enable Trace and Profiling checkbox - Select SmartDSP HEAT for Trace Offload Method - Set VTB settings and Counted Events as usually done for JTAG based Software Analysis Step 11: Click Apply then Debug HEAT usage for fast VTB download 32

33 HEAT usage for fast VTB download Step 12: In the debug window, go to main() function to the line containing: status = osstart(appbackground); Right click on the left bar and choose Toggle Trace Start Point from the menu. Step 13: Click Resume button. Step 14: the results are collected by default in the file c:\sa_ter_heat.txt. It shouldn t be touched by the developer. This file is automatically processed by the software analysis engine. The developer should follow the normal way for browsing the profiling data (as done in JTAG based SA). 33

34 HEAT VTB transport principle: HEAT usage for fast VTB download The VTB is collected in a buffer in a free memory region as designated in VTB settings sa_ter_handle() interrupt occurs when the buffer is full and it is mainly responsible for: Creating the sa_ter_heat.txt file on the host PC Reading the buffer and sending its content to the PC Managing profiling start/stop during VTB transport 34

35 Get Support The official support channel is here. 35

36 ANNEX 1 Demo: HEAT project useful to adapt for large files transport: D:\_SC_10_\SC_10.0\StarCore_Support\SmartDSP\demos\starcore\msc815x\heat_demo Demo: HEAT for fast VTB download: D:\_SC_10_\SC_10.0\StarCore_Support\SoftwareAnalysis\swandemo_8156ads_heat HEAT Source files location: D:\_SC_10_\SC_10.0\StarCore_Support\SmartDSP\source\heat 36

37 Q&A Thank you for attending this presentation. We ll now take a few moments for the audience s questions and then we ll begin the question and answer session. 37

38

Processes. Johan Montelius KTH

Processes. Johan Montelius KTH Processes Johan Montelius KTH 2017 1 / 47 A process What is a process?... a computation a program i.e. a sequence of operations a set of data structures a set of registers means to interact with other

More information

A process. the stack

A process. the stack A process Processes Johan Montelius What is a process?... a computation KTH 2017 a program i.e. a sequence of operations a set of data structures a set of registers means to interact with other processes

More information

Mobile Operating Systems Lesson 04 PalmOS Part 2

Mobile Operating Systems Lesson 04 PalmOS Part 2 Mobile Operating Systems Lesson 04 PalmOS Part 2 Oxford University Press 2007. All rights reserved. 1 PalmOS Memory Support Assumes that there is a 256 MB memory card(s) The card RAM, ROM, and flash memories

More information

Ausgewählte Betriebssysteme - Mark Russinovich & David Solomon (used with permission of authors)

Ausgewählte Betriebssysteme - Mark Russinovich & David Solomon (used with permission of authors) Outline Windows 2000 - The I/O Structure Ausgewählte Betriebssysteme Institut Betriebssysteme Fakultät Informatik Components of I/O System Plug n Play Management Power Management I/O Data Structures File

More information

SmartHeap for Multi-Core

SmartHeap for Multi-Core SmartHeap for Multi-Core Getting Started and Platform Guide for Linux Version 11.2 SmartHeap and HeapAgent are trademarks of Compuware Corporation. All other trademarks are the property of their respective

More information

RM0327 Reference manual

RM0327 Reference manual Reference manual Multi-Target Trace API version 1.0 Overview Multi-Target Trace (MTT) is an application instrumentation library that provides a consistent way to embed instrumentation into a software application,

More information

Section 3: File I/O, JSON, Generics. Meghan Cowan

Section 3: File I/O, JSON, Generics. Meghan Cowan Section 3: File I/O, JSON, Generics Meghan Cowan POSIX Family of standards specified by the IEEE Maintains compatibility across variants of Unix-like OS Defines API and standards for basic I/O: file, terminal

More information

lwip for CrossCore Embedded Studio User s Guide

lwip for CrossCore Embedded Studio User s Guide lwip for CrossCore Embedded Studio 1.0.1 Revision 1.1, October 2012 Part Number 82-100119-01 Analog Devices, Inc. One Technology Way Norwood, Mass. 02062-9106 a Copyright Information 2012 Analog Devices,

More information

CSci 4061 Introduction to Operating Systems. Input/Output: High-level

CSci 4061 Introduction to Operating Systems. Input/Output: High-level CSci 4061 Introduction to Operating Systems Input/Output: High-level I/O Topics First, cover high-level I/O Next, talk about low-level device I/O I/O not part of the C language! High-level I/O Hide device

More information

C File System File Functions EXPERIMENT 1.2

C File System File Functions EXPERIMENT 1.2 C File System File Functions EXPERIMENT 1.2 Propose of the experiment Continue from previous experiment to be familiar with CCS environment Write a C language file input / output (CIO) program to read

More information

Eclipse-Based CodeWarrior Debugger

Eclipse-Based CodeWarrior Debugger July 14-16, 2009 Eclipse-Based CodeWarrior Debugger QorIQ Multicore Linux Kernel Debug Bogdan Irimia CodeWarrior Software Engineer Tool used to develop software running on Freescale Power Architecture

More information

- Knowledge of basic computer architecture and organization, ECE 445

- Knowledge of basic computer architecture and organization, ECE 445 ECE 446: Device Driver Development Fall 2014 Wednesdays 7:20-10 PM Office hours: Wednesdays 6:15-7:15 PM or by appointment, Adjunct office Engineering Building room 3707/3708 Last updated: 8/24/14 Instructor:

More information

I/O Systems. Jo, Heeseung

I/O Systems. Jo, Heeseung I/O Systems Jo, Heeseung Today's Topics Device characteristics Block device vs. Character device Direct I/O vs. Memory-mapped I/O Polling vs. Interrupts Programmed I/O vs. DMA Blocking vs. Non-blocking

More information

CodeWarrior Development Studio for StarCore 3850 DSP v SP1

CodeWarrior Development Studio for StarCore 3850 DSP v SP1 Release Notes CodeWarrior Development Studio for StarCore 3850 DSP v10.7.1 SP1 Table of Contents 1 About This Release... 2 1.1 Version Information... 2 1.2 Important Note... 2 2 Getting Help... 3 2.1 User

More information

... Application Note AN-531. PCI Express System Interconnect Software Architecture. Notes Introduction. System Architecture.

... Application Note AN-531. PCI Express System Interconnect Software Architecture. Notes Introduction. System Architecture. PCI Express System Interconnect Software Architecture Application Note AN-531 Introduction By Kwok Kong A multi-peer system using a standard-based PCI Express (PCIe ) multi-port switch as the system interconnect

More information

Fast I/O Library for the MSC8101ADS Using Ethernet Communication

Fast I/O Library for the MSC8101ADS Using Ethernet Communication Freescale Semiconductor Application Note AN2260 Rev. 2, 11/2004 Fast I/O Library for the MSC8101ADS Using Ethernet Communication By Madalin Stoica This application note describes a fast I/O library for

More information

Memory Management. To do. q Basic memory management q Swapping q Kernel memory allocation q Next Time: Virtual memory

Memory Management. To do. q Basic memory management q Swapping q Kernel memory allocation q Next Time: Virtual memory Memory Management To do q Basic memory management q Swapping q Kernel memory allocation q Next Time: Virtual memory Memory management Ideal memory for a programmer large, fast, nonvolatile and cheap not

More information

CSE 333 SECTION 3. POSIX I/O Functions

CSE 333 SECTION 3. POSIX I/O Functions CSE 333 SECTION 3 POSIX I/O Functions Administrivia Questions (?) HW1 Due Tonight Exercise 7 due Monday (out later today) POSIX Portable Operating System Interface Family of standards specified by the

More information

System Programming. Standard Input/Output Library (Cont d)

System Programming. Standard Input/Output Library (Cont d) Content : by Dr. B. Boufama School of Computer Science University of Windsor Instructor: Dr. A. Habed adlane@cs.uwindsor.ca http://cs.uwindsor.ca/ adlane/60-256 Content Content 1 Binary I/O 2 3 4 5 Binary

More information

CS399 New Beginnings. Jonathan Walpole

CS399 New Beginnings. Jonathan Walpole CS399 New Beginnings Jonathan Walpole Memory Management Memory Management Memory a linear array of bytes - Holds O.S. and programs (processes) - Each cell (byte) is named by a unique memory address Recall,

More information

Platform Objects. Introduction. Methods. meiplatformalloc meiplatformassertset

Platform Objects. Introduction. Methods. meiplatformalloc meiplatformassertset Platform Objects Platform Objects Introduction The Platform module provides a common interface to platform-specific functionality, such as memory allocation, resource locking, interrupts, signalling, and

More information

User Manual. Admin Report Kit for IIS 7 (ARKIIS)

User Manual. Admin Report Kit for IIS 7 (ARKIIS) User Manual Admin Report Kit for IIS 7 (ARKIIS) Table of Contents 1 Admin Report Kit for IIS 7... 1 1.1 About ARKIIS... 1 1.2 Who can Use ARKIIS?... 1 1.3 System requirements... 2 1.4 Technical Support...

More information

MicroBlaze TFTP Server User Guide

MicroBlaze TFTP Server User Guide Lorne Applebaum appleba@eecg.utoronto.ca August 25, 2004 1 Preamble This document describes the intended method of use for the MicroBlaze TFTP Server. For detailed information regarding how the server

More information

OSAL, ObjectOrientation in C. Embedded C in the past. application. Simple and easy:

OSAL, ObjectOrientation in C. Embedded C in the past. application. Simple and easy: Embedded C in the past Simple and easy: application hw OS CPU A specific hardware A proper operation system Development and test with the given platform Embedded C The past - today Helper tools and equipment

More information

Module Introduction. The module continues with a detailed look at the Green Hills MULTI IDE, and the CodeWarrior IDE.

Module Introduction. The module continues with a detailed look at the Green Hills MULTI IDE, and the CodeWarrior IDE. Module Introduction PURPOSE: This training module describes the MSC8101 hardware and software development environments. Objectives: Identify the features of the MSC8101 ADS. Describe the features and advantages

More information

NetX and NetX Duo DNS Client Module Guide

NetX and NetX Duo DNS Client Module Guide Introduction Application Note This module guide will enable you to effectively use a module in your own design. Upon completion of this guide, you will be able to add this module to your own design, configure

More information

Combining the C Library and Native File System APIs in a Single NET+OS Application

Combining the C Library and Native File System APIs in a Single NET+OS Application Combining the C Library and Native File System APIs in a Single NET+OS Application 1 Document History Date Version Change Description 7/29/09 V1.0 Initial entry 7/31/09 V1.1 First Edits 7/31 V1.2 Add in

More information

An Intelligent NIC Design Xin Song

An Intelligent NIC Design Xin Song 2nd International Conference on Advances in Mechanical Engineering and Industrial Informatics (AMEII 2016) An Intelligent NIC Design Xin Song School of Electronic and Information Engineering Tianjin Vocational

More information

I/O Systems. Jinkyu Jeong Computer Systems Laboratory Sungkyunkwan University

I/O Systems. Jinkyu Jeong Computer Systems Laboratory Sungkyunkwan University I/O Systems Jinkyu Jeong (jinkyu@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Today s Topics Device characteristics Block device vs. Character device Direct I/O vs.

More information

GigaX API for Zynq SoC

GigaX API for Zynq SoC BUM002 v1.0 USER MANUAL A software API for Zynq PS that Enables High-speed GigaE-PL Data Transfer & Frames Management BERTEN DSP S.L. www.bertendsp.com gigax@bertendsp.com +34 942 18 10 11 Table of Contents

More information

Palm Platform Hardware Intro to the Palm OS and application programming

Palm Platform Hardware Intro to the Palm OS and application programming Palm Platform Hardware Intro to the Palm OS and application programming Total memory (RAM/ROM) originals had only 128 Kb currently average is 4 Mb (max. 8Mb) 32 bit addresses 8, 16 & 32 bit data types

More information

Chapter 4: Threads. Overview Multithreading Models Thread Libraries Threading Issues Operating System Examples Windows XP Threads Linux Threads

Chapter 4: Threads. Overview Multithreading Models Thread Libraries Threading Issues Operating System Examples Windows XP Threads Linux Threads Chapter 4: Threads Overview Multithreading Models Thread Libraries Threading Issues Operating System Examples Windows XP Threads Linux Threads Chapter 4: Threads Objectives To introduce the notion of a

More information

Standard C Library Functions

Standard C Library Functions Demo lecture slides Although I will not usually give slides for demo lectures, the first two demo lectures involve practice with things which you should really know from G51PRG Since I covered much of

More information

Intermediate Programming, Spring 2017*

Intermediate Programming, Spring 2017* 600.120 Intermediate Programming, Spring 2017* Misha Kazhdan *Much of the code in these examples is not commented because it would otherwise not fit on the slides. This is bad coding practice in general

More information

MSC8156 Ethernet Interface

MSC8156 Ethernet Interface June 21, 2010 MSC8156 Ethernet Interface QUICC Engine Ethernet Programming Andrew Temple NMG DSP Applications Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, CoreNet, the Energy Efficient Solutions logo, Flexis,

More information

ERIKA Enterprise LWIP Tutorial

ERIKA Enterprise LWIP Tutorial ERIKA Enterprise LWIP Tutorial for the Altera Nios II platform version: 1.0.1 December 11, 2012 About Evidence S.r.l. Evidence is a spin-off company of the ReTiS Lab of the Scuola Superiore S. Anna, Pisa,

More information

Using Virtual EEPROM and Flash API for Renesas MCUs RX600 Series

Using Virtual EEPROM and Flash API for Renesas MCUs RX600 Series Using Virtual EEPROM and Flash API for Renesas MCUs RX600 Series Description: This lab will take the user through using the Virtual EEPROM (VEE) project for RX. The user will learn to use the Virtual EEPROM

More information

Anybus CompactCom. Host Application Implementation Guide. Doc.Id. HMSI Doc. Rev Connecting DevicesTM

Anybus CompactCom. Host Application Implementation Guide. Doc.Id. HMSI Doc. Rev Connecting DevicesTM Anybus CompactCom Doc. Rev. 1.10 Connecting DevicesTM +$/067$' &+,&$*2.$5/658+( 72.

More information

Charon I - UDP Broadcast

Charon I - UDP Broadcast Charon I - UDP Broadcast HW: Charon I, Converter FW version 2F or higher SW: Hercules SETUP Utility, 2.6.1c or higher External.brf file for the UDP Broadcast packet definition With this configuration,

More information

Tutorial Introduction

Tutorial Introduction Tutorial Introduction PURPOSE: - To explain how to prepare a project for debugging and describe how to configure the CodeWarrior Debugger to communicate with various types of embedded hardware OBJECTIVES:

More information

Background. Contiguous Memory Allocation

Background. Contiguous Memory Allocation Operating System Lecture 8 2017.5.9 Chapter 8 (Main Memory) Background Swapping Contiguous Memory Allocation Segmentation - Paging Memory Management Selection of a memory-management method for a specific

More information

Outline. Introduction. Survey of Device Driver Management in Real-Time Operating Systems

Outline. Introduction. Survey of Device Driver Management in Real-Time Operating Systems Survey of Device Driver Management in Real-Time Operating Systems Sebastian Penner +46705-396120 sebastian.penner@home.se 1 Outline Introduction What is a device driver? Commercial systems General Description

More information

Accessing Files in C. Professor Hugh C. Lauer CS-2303, System Programming Concepts

Accessing Files in C. Professor Hugh C. Lauer CS-2303, System Programming Concepts Accessing Files in C Professor Hugh C. Lauer CS-2303, System Programming Concepts (Slides include materials from The C Programming Language, 2 nd edition, by Kernighan and Ritchie, Absolute C++, by Walter

More information

Assignment 2 Group 5 Simon Gerber Systems Group Dept. Computer Science ETH Zurich - Switzerland

Assignment 2 Group 5 Simon Gerber Systems Group Dept. Computer Science ETH Zurich - Switzerland Assignment 2 Group 5 Simon Gerber Systems Group Dept. Computer Science ETH Zurich - Switzerland t Your task Write a simple file server Client has to be implemented in Java Server has to be implemented

More information

Messaging Framework Module Guide

Messaging Framework Module Guide Application Note Renesas Synergy Platform R11AN0096EU0102 Rev.1.02 Introduction This module guide will enable you to effectively use a module in your own design. Upon completion of this guide, you will

More information

Introduction to Real-time Operating Systems

Introduction to Real-time Operating Systems Introduction to Real-time Operating Systems An Introduction to ORCOS Daniel Baldin Slide 1 ORCOS Organic Re-Configurable Operating System ORCOS is a Real-Time Operating System developed

More information

I/O Systems. Amir H. Payberah. Amirkabir University of Technology (Tehran Polytechnic)

I/O Systems. Amir H. Payberah. Amirkabir University of Technology (Tehran Polytechnic) I/O Systems Amir H. Payberah amir@sics.se Amirkabir University of Technology (Tehran Polytechnic) Amir H. Payberah (Tehran Polytechnic) I/O Systems 1393/9/15 1 / 57 Motivation Amir H. Payberah (Tehran

More information

NFS Design Goals. Network File System - NFS

NFS Design Goals. Network File System - NFS Network File System - NFS NFS Design Goals NFS is a distributed file system (DFS) originally implemented by Sun Microsystems. NFS is intended for file sharing in a local network with a rather small number

More information

CS333 Intro to Operating Systems. Jonathan Walpole

CS333 Intro to Operating Systems. Jonathan Walpole CS333 Intro to Operating Systems Jonathan Walpole Threads & Concurrency 2 Threads Processes have the following components: - an address space - a collection of operating system state - a CPU context or

More information

UDP1G-IP reference design manual

UDP1G-IP reference design manual UDP1G-IP reference design manual Rev1.1 14-Aug-18 1 Introduction Comparing to TCP, UDP provides a procedure to send messages with a minimum of protocol mechanism, but the data cannot guarantee to arrive

More information

CSE 333 SECTION 3. POSIX I/O Functions

CSE 333 SECTION 3. POSIX I/O Functions CSE 333 SECTION 3 POSIX I/O Functions Administrivia Questions (?) HW1 Due Tonight HW2 Due Thursday, July 19 th Midterm on Monday, July 23 th 10:50-11:50 in TBD (And regular exercises in between) POSIX

More information

Memory Management. q Basic memory management q Swapping q Kernel memory allocation q Next Time: Virtual memory

Memory Management. q Basic memory management q Swapping q Kernel memory allocation q Next Time: Virtual memory Memory Management q Basic memory management q Swapping q Kernel memory allocation q Next Time: Virtual memory Memory management Ideal memory for a programmer large, fast, nonvolatile and cheap not an option

More information

Introduction. CS3026 Operating Systems Lecture 01

Introduction. CS3026 Operating Systems Lecture 01 Introduction CS3026 Operating Systems Lecture 01 One or more CPUs Device controllers (I/O modules) Memory Bus Operating system? Computer System What is an Operating System An Operating System is a program

More information

20-EECE-4029 Operating Systems Fall, 2015 John Franco

20-EECE-4029 Operating Systems Fall, 2015 John Franco 20-EECE-4029 Operating Systems Fall, 2015 John Franco First Exam Question 1: Barrier name: a) Describe, in general terms, what a barrier is trying to do Undo some of the optimizations that processor hardware

More information

Operating Systems. 17. Sockets. Paul Krzyzanowski. Rutgers University. Spring /6/ Paul Krzyzanowski

Operating Systems. 17. Sockets. Paul Krzyzanowski. Rutgers University. Spring /6/ Paul Krzyzanowski Operating Systems 17. Sockets Paul Krzyzanowski Rutgers University Spring 2015 1 Sockets Dominant API for transport layer connectivity Created at UC Berkeley for 4.2BSD Unix (1983) Design goals Communication

More information

Play with FILE Structure Yet Another Binary Exploitation Technique. Abstract

Play with FILE Structure Yet Another Binary Exploitation Technique. Abstract Play with FILE Structure Yet Another Binary Exploitation Technique An-Jie Yang (Angelboy) angelboy@chroot.org Abstract To fight against prevalent cyber threat, more mechanisms to protect operating systems

More information

Playing & Recording Audio Audio Queue Services Playback

Playing & Recording Audio Audio Queue Services Playback Playing & Recording Audio Audio Queue Services Playback The most common scenario : basic playing back an on-disk file 11 2010-2 iphone Application 1. 2. Playback Audio Queue Callback 1. Playback Audio

More information

CS240: Programming in C

CS240: Programming in C CS240: Programming in C Lecture 13 si 14: Unix interface for working with files. Cristina Nita-Rotaru Lecture 13/Fall 2013 1 Working with Files (I/O) File system: specifies how the information is organized

More information

Tolerating Malicious Drivers in Linux. Silas Boyd-Wickizer and Nickolai Zeldovich

Tolerating Malicious Drivers in Linux. Silas Boyd-Wickizer and Nickolai Zeldovich XXX Tolerating Malicious Drivers in Linux Silas Boyd-Wickizer and Nickolai Zeldovich How could a device driver be malicious? Today's device drivers are highly privileged Write kernel memory, allocate memory,...

More information

SIMATIC Industrial software Readme SIMATIC S7-PLCSIM Advanced V2.0 SP1 Readme

SIMATIC Industrial software Readme SIMATIC S7-PLCSIM Advanced V2.0 SP1 Readme SIMATIC Industrial software Readme General information Content This Readme file contains information about SIMATIC S7-PLCSIM Advanced V2.0 SP1. The information should be considered more up-to-date than

More information

Using kgdb and the kgdb Internals

Using kgdb and the kgdb Internals Using kgdb and the kgdb Internals Jason Wessel jason.wessel@windriver.com Tom Rini trini@kernel.crashing.org Amit S. Kale amitkale@linsyssoft.com Using kgdb and the kgdb Internals by Jason Wessel by Tom

More information

Multithreading Applications in Win32

Multithreading Applications in Win32 Copyright, 2006 Multimedia Lab., UOS Multithreading Applications in Win32 (Introduction to Operating Systems) SeongJongChoi chois@mmlab.net Multimedia Lab. Dept. of Electrical and Computer Eng. University

More information

embos Real Time Operating System CPU & Compiler specifics for RENESAS SH2 CPUs and RENESAS HEW4 Document Rev. 1

embos Real Time Operating System CPU & Compiler specifics for RENESAS SH2 CPUs and RENESAS HEW4 Document Rev. 1 embos Real Time Operating System CPU & Compiler specifics for RENESAS SH2 CPUs and RENESAS HEW4 Document Rev. 1 A product of Segger Microcontroller Systeme GmbH www.segger.com 2/25 embos for SH2 CPUs and

More information

Distributed Information Processing

Distributed Information Processing Distributed Information Processing 6 th Lecture Eom, Hyeonsang ( 엄현상 ) Department of Computer Science & Engineering Seoul National University Copyrights 2016 Eom, Hyeonsang All Rights Reserved Outline

More information

2 nd Half. Memory management Disk management Network and Security Virtual machine

2 nd Half. Memory management Disk management Network and Security Virtual machine Final Review 1 2 nd Half Memory management Disk management Network and Security Virtual machine 2 Abstraction Virtual Memory (VM) 4GB (32bit) linear address space for each process Reality 1GB of actual

More information

Application Note: Heap Memory Management

Application Note: Heap Memory Management Application Note: Heap Memory Management Document Number: SWRA204 Texas Instruments, Inc. San Diego, California USA Copyright 2006-2009 Texas Instruments, Inc. All rights reserved. Version Description

More information

CSE398: Network Systems Design

CSE398: Network Systems Design CSE398: Network Systems Design Instructor: Dr. Liang Cheng Department of Computer Science and Engineering P.C. Rossin College of Engineering & Applied Science Lehigh University February 23, 2005 Outline

More information

Application Note 2244 Implementing a Network Interface in TINI 1.1x

Application Note 2244 Implementing a Network Interface in TINI 1.1x www.maxim-ic.com Application Note 2244 Implementing a Network Interface in TINI 1.1x OVERVIEW Dallas Semiconductor designed the TINI network stack with support for network interfaces other than Ethernet.

More information

The Beast We Call A3. CS 161: Lecture 10 3/7/17

The Beast We Call A3. CS 161: Lecture 10 3/7/17 The Beast We Call A3 CS 161: Lecture 10 3/7/17 But first... Unconfusing Three Confusions Where does the kernel live? Does every kind of processor use a twolevel page table? Does everything have an address?

More information

NOTE: Debug and DebugSingle are the only MPI library configurations that will produce trace output.

NOTE: Debug and DebugSingle are the only MPI library configurations that will produce trace output. Trace Objects Trace Objects Introduction Use the Trace module to selectively produce trace output on a global and/or per-object basis for your application. You can specify the types of trace output when

More information

fopen() fclose() fgetc() fputc() fread() fwrite()

fopen() fclose() fgetc() fputc() fread() fwrite() The ability to read data from and write data to files is the primary means of storing persistent data, data that does not disappear when your program stops running. The abstraction of files that C provides

More information

CSC209: Software tools. Unix files and directories permissions utilities/commands Shell programming quoting wild cards files

CSC209: Software tools. Unix files and directories permissions utilities/commands Shell programming quoting wild cards files CSC209 Review CSC209: Software tools Unix files and directories permissions utilities/commands Shell programming quoting wild cards files ... and systems programming C basic syntax functions arrays structs

More information

CSC209: Software tools. Unix files and directories permissions utilities/commands Shell programming quoting wild cards files. Compiler vs.

CSC209: Software tools. Unix files and directories permissions utilities/commands Shell programming quoting wild cards files. Compiler vs. CSC209 Review CSC209: Software tools Unix files and directories permissions utilities/commands Shell programming quoting wild cards files... and systems programming C basic syntax functions arrays structs

More information

SYSTEM CALL IMPLEMENTATION. CS124 Operating Systems Fall , Lecture 14

SYSTEM CALL IMPLEMENTATION. CS124 Operating Systems Fall , Lecture 14 SYSTEM CALL IMPLEMENTATION CS124 Operating Systems Fall 2017-2018, Lecture 14 2 User Processes and System Calls Previously stated that user applications interact with the kernel via system calls Typically

More information

Chapter 2 Computer-System Structure

Chapter 2 Computer-System Structure Contents 1. Introduction 2. Computer-System Structures 3. Operating-System Structures 4. Processes 5. Threads 6. CPU Scheduling 7. Process Synchronization 8. Deadlocks 9. Memory Management 10. Virtual

More information

RTX64 Features by Release

RTX64 Features by Release RTX64 Features by Release IZ-DOC-X64-0089-R4 January 2015 Operating System and Visual Studio Support WINDOWS OPERATING SYSTEM RTX64 2013 RTX64 2014 Windows 8 No Yes* Yes* Yes Windows 7 Yes (SP1) Yes (SP1)

More information

NetX and NetX Duo DNS Client Module Guide

NetX and NetX Duo DNS Client Module Guide Application Note Renesas Synergy Platform NetX and NetX Duo DNS Client Module Guide R11AN0178EU0100 Rev.1.00 Introduction This module guide will enable you to effectively use a module in your own design.

More information

OSEK/VDX. Communication. Version January 29, 2003

OSEK/VDX. Communication. Version January 29, 2003 Open Systems and the Corresponding Interfaces for Automotive Electronics OSEK/VDX Communication Version 3.0.1 January 29, 2003 This document is an official release and replaces all previously distributed

More information

CS 261 Fall Mike Lam, Professor. Structs and I/O

CS 261 Fall Mike Lam, Professor. Structs and I/O CS 261 Fall 2018 Mike Lam, Professor Structs and I/O Typedefs A typedef is a way to create a new type name Basically a synonym for another type Useful for shortening long types or providing more meaningful

More information

AUTOBEST: A United AUTOSAR-OS And ARINC 653 Kernel. Alexander Züpke, Marc Bommert, Daniel Lohmann

AUTOBEST: A United AUTOSAR-OS And ARINC 653 Kernel. Alexander Züpke, Marc Bommert, Daniel Lohmann AUTOBEST: A United AUTOSAR-OS And ARINC 653 Kernel Alexander Züpke, Marc Bommert, Daniel Lohmann alexander.zuepke@hs-rm.de, marc.bommert@hs-rm.de, lohmann@cs.fau.de Motivation Automotive and Avionic industry

More information

ITRON Project Overview

ITRON Project Overview ITRON Project Overview Haruyasu Ito 1 ITRON Project One of the subprojects of the TRON Project A project to standardize RTOS and related spec. for embedded systems ( esp. small-scale embedded systems )

More information

ECEN 449 Microprocessor System Design. Hardware-Software Communication. Texas A&M University

ECEN 449 Microprocessor System Design. Hardware-Software Communication. Texas A&M University ECEN 449 Microprocessor System Design Hardware-Software Communication 1 Objectives of this Lecture Unit Learn basics of Hardware-Software communication Memory Mapped I/O Polling/Interrupts 2 Motivation

More information

PCI Express System Interconnect Software Architecture for PowerQUICC TM III-based Systems

PCI Express System Interconnect Software Architecture for PowerQUICC TM III-based Systems PCI Express System Interconnect Software Architecture for PowerQUICC TM III-based Systems Application Note AN-573 By Craig Hackney Introduction A multi-peer system using a standard-based PCI Express multi-port

More information

Emulation 2. G. Lettieri. 15 Oct. 2014

Emulation 2. G. Lettieri. 15 Oct. 2014 Emulation 2 G. Lettieri 15 Oct. 2014 1 I/O examples In an emulator, we implement each I/O device as an object, or a set of objects. The real device in the target system is connected to the CPU via an interface

More information

Data Communication and Synchronization

Data Communication and Synchronization Software Development Kit for Multicore Acceleration Version 3.0 Data Communication and Synchronization for Cell Programmer s Guide and API Reference Version 1.0 DRAFT SC33-8407-00 Software Development

More information

A brief intro to MQX Lite. Real work: hands-on labs. Overview, Main features and Code Size

A brief intro to MQX Lite. Real work: hands-on labs. Overview, Main features and Code Size October 2013 A brief intro to MQX Lite Overview, Main features and Code Size Real work: hands-on labs Create a new MQX-Lite project, add ConsoleIO and BitIO components Create tasks, watch the flashing

More information

Using the Cable Monitor Tool

Using the Cable Monitor Tool APPENDIX B This appendix describes the Cisco ubr905 and Cisco ubr925 cable access routers Cable Monitor tool. The Cable Monitor is part of the router s onboard software that provides a web-based diagnostic

More information

Lecture 15: I/O Devices & Drivers

Lecture 15: I/O Devices & Drivers CS 422/522 Design & Implementation of Operating Systems Lecture 15: I/O Devices & Drivers Zhong Shao Dept. of Computer Science Yale University Acknowledgement: some slides are taken from previous versions

More information

Getting Started with TargetOS on the ZedBoard 1 Introduction

Getting Started with TargetOS on the ZedBoard 1 Introduction Getting Started with TargetOS on the ZedBoard 1 Introduction This document covers how to get started with Blunk Microsystems TargetOS embedded operating system on the ZedBoard. It covers the following

More information

Unit 6 Files. putchar(ch); ch = getc (fp); //Reads single character from file and advances position to next character

Unit 6 Files. putchar(ch); ch = getc (fp); //Reads single character from file and advances position to next character 1. What is File management? In real life, we want to store data permanently so that later on we can retrieve it and reuse it. A file is a collection of bytes stored on a secondary storage device like hard

More information

!! How is a thread different from a process? !! Why are threads useful? !! How can POSIX threads be useful?

!! How is a thread different from a process? !! Why are threads useful? !! How can POSIX threads be useful? Chapter 2: Threads: Questions CSCI [4 6]730 Operating Systems Threads!! How is a thread different from a process?!! Why are threads useful?!! How can OSIX threads be useful?!! What are user-level and kernel-level

More information

Micrium OS Kernel Labs

Micrium OS Kernel Labs Micrium OS Kernel Labs 2018.04.16 Micrium OS is a flexible, highly configurable collection of software components that provides a powerful embedded software framework for developers to build their application

More information

CSC209 Review. Yeah! We made it!

CSC209 Review. Yeah! We made it! CSC209 Review Yeah! We made it! 1 CSC209: Software tools Unix files and directories permissions utilities/commands Shell programming quoting wild cards files 2 ... and C programming... C basic syntax functions

More information

CS 318 Principles of Operating Systems

CS 318 Principles of Operating Systems CS 318 Principles of Operating Systems Fall 2017 Lecture 5: Thread Ryan Huang Administrivia HW1 solution released on Piazza resources Lab 0 grading - In progress - Cheating policy Lab 1 review session

More information

Memory Management Strategies for Data Serving with RDMA

Memory Management Strategies for Data Serving with RDMA Memory Management Strategies for Data Serving with RDMA Dennis Dalessandro and Pete Wyckoff (presenting) Ohio Supercomputer Center {dennis,pw}@osc.edu HotI'07 23 August 2007 Motivation Increasing demands

More information

MPLAB Harmony Compatibility Guide

MPLAB Harmony Compatibility Guide MPLAB Harmony Compatibility Guide MPLAB Harmony Integrated Software Framework All rights reserved. This section provides information for making software libraries compatible with MPLAB Harmony. 2 1: Objective

More information

Process Concepts. CSC400 - Operating Systems. 3. Process Concepts. J. Sumey

Process Concepts. CSC400 - Operating Systems. 3. Process Concepts. J. Sumey CSC400 - Operating Systems 3. Process Concepts J. Sumey Overview Concurrency Processes & Process States Process Accounting Interrupts & Interrupt Processing Interprocess Communication CSC400 - Process

More information

Date: Saturday, November 01, SHDesigns Ethernet Downloader for Z-World Rabbit Boards and the Softools Compiler Copyright (c) 2003 SHDesigns

Date: Saturday, November 01, SHDesigns Ethernet Downloader for Z-World Rabbit Boards and the Softools Compiler Copyright (c) 2003 SHDesigns Date: Saturday, November 01, 2003 SHDesigns Ethernet Downloader for Z-World Rabbit Boards and the Softools Compiler Copyright (c) 2003 SHDesigns 1 1.0 INTRODUCTION...... 1 2.0 HOW IT WORKS... 1 2.1 The

More information

Extensible Network Security Services on Software Programmable Router OS. David Yau, Prem Gopalan, Seung Chul Han, Feng Liang

Extensible Network Security Services on Software Programmable Router OS. David Yau, Prem Gopalan, Seung Chul Han, Feng Liang Extensible Network Security Services on Software Programmable Router OS David Yau, Prem Gopalan, Seung Chul Han, Feng Liang System Software and Architecture Lab Department of Computer Sciences Purdue University

More information

Memory management. Requirements. Relocation: program loading. Terms. Relocation. Protection. Sharing. Logical organization. Physical organization

Memory management. Requirements. Relocation: program loading. Terms. Relocation. Protection. Sharing. Logical organization. Physical organization Requirements Relocation Memory management ability to change process image position Protection ability to avoid unwanted memory accesses Sharing ability to share memory portions among processes Logical

More information