Test for timestamp : measure code execution time.

Slides:



Advertisements
Similar presentations
System Integration and Performance
Advertisements

Assessment of Data Path Implementations for Download and Streaming Pål Halvorsen 1,2, Tom Anders Dalseng 1 and Carsten Griwodz 1,2 1 Department of Informatics,
2.3) Example of program execution 1. instruction  B25 8 Op-code B means to change the value of the program counter if the contents of the indicated register.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 13: I/O Systems I/O Hardware Application I/O Interface Kernel I/O Subsystem.
OS2-1 Chapter 2 Computer System Structures. OS2-2 Outlines Computer System Operation I/O Structure Storage Structure Storage Hierarchy Hardware Protection.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 2: Computer-System Structures Computer System Operation I/O Structure Storage.
© Copyright 2004 Dr. Phillip A. Laplante 1 Memory  Memory access  Memory technologies  Memory organization.
I/O Hardware n Incredible variety of I/O devices n Common concepts: – Port – connection point to the computer – Bus (daisy chain or shared direct access)
Read Chapter 3 (David E. Simon, An Embedded Software Primer)
Midterm Tuesday October 23 Covers Chapters 3 through 6 - Buses, Clocks, Timing, Edge Triggering, Level Triggering - Cache Memory Systems - Internal Memory.
TECH CH03 System Buses Computer Components Computer Function
Computer System Structures memory memory controller disk controller disk controller printer controller printer controller tape-drive controller tape-drive.
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
Computer Systems Computer Performance.
General System Architecture and I/O.  I/O devices and the CPU can execute concurrently.  Each device controller is in charge of a particular device.
Chapter 6 System Integration and Performance. Chapter goals Describe the implementation of the system bus and bus protocol. Describe how the CPU and bus.
Lecture 8 Presented By Dr. Shazzad Hosain Asst. Prof. EECS, NSU.
Cis303a_chapt06_exam.ppt CIS303A: System Architecture Exam - Chapter 6 Name: __________________ Date: _______________ 1. What connects the CPU with other.
Computer System Overview Chapter 1. Operating System Exploits the hardware resources of one or more processors Provides a set of services to system users.
CHAPTER 2: COMPUTER-SYSTEM STRUCTURES Computer system operation Computer system operation I/O structure I/O structure Storage structure Storage structure.
Silberschatz, Galvin, and Gagne  Applied Operating System Concepts Module 2: Computer-System Structures Computer System Operation I/O Structure.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 2: Computer-System Structures Computer System Operation I/O Structure Storage.
Chapter 2: Computer-System Structures
1 CSE Department MAITSandeep Tayal Computer-System Structures Computer System Operation I/O Structure Storage Structure Storage Hierarchy Hardware Protection.
2: Computer-System Structures
Recall: Three I/O Methods Synchronous: Wait for I/O operation to complete. Asynchronous: Post I/O request and switch to other work. DMA (Direct Memory.
Operating Systems and Networks AE4B33OSS Introduction.
Ihr Logo Operating Systems Internals & Design Principles Fifth Edition William Stallings Chapter 1 Computer System Overview.
Chapter 2: Computer-System Structures 2.1 Computer System Operation 2.5 Hardware Protection 2.6 Network Structure.
1 Chapter 2: Computer-System Structures  Computer System Operation  I/O Structure  Storage Structure  Storage Hierarchy  Hardware Protection  General.
1 CS/COE0447 Computer Organization & Assembly Language Chapter 5 part 4 Exceptions.
Chapter 1: Introduction. 1.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 1: Introduction What Operating Systems Do Computer-System.
Computers Internal Communication. Basic Computer System MAIN MEMORY ALUCNTL..... BUS CONTROLLER Processor I/O moduleInterconnections BUS Memory.
Chapter 5 Computer Organization. Distinguish between the three components of a computer hardware. List the functionality of each component. Understand.
Input-Output Organization
ECEG-3202 Computer Architecture and Organization Chapter 3 Top Level View of Computer Function and Interconnection.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 13: I/O Systems I/O Hardware Application I/O Interface Kernel I/O Subsystem.
Computer Architecture 2 nd year (computer and Information Sc.)
CE Operating Systems Lecture 2 Low level hardware support for operating systems.
1 CS.217 Operating System By Ajarn..Sutapart Sappajak,METC,MSIT Chapter 2 Computer-System Structures Slide 1 Chapter 2 Computer-System Structures.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 4 Computer Systems Review.
Silberschatz, Galvin and Gagne  Applied Operating System Concepts Chapter 2: Computer-System Structures Computer System Architecture and Operation.
CE Operating Systems Lecture 2 Low level hardware support for operating systems.
Dr Mohamed Menacer College of Computer Science and Engineering, Taibah University CE-321: Computer.
HOW COMPUTERS WORK THE CPU & MEMORY. THE PARTS OF A COMPUTER.
System Hardware FPU – Floating Point Unit –Handles floating point and extended integer calculations 8284/82C284 Clock Generator (clock) –Synchronizes the.
Chapter 3 : Top Level View of Computer Functions Basic CPU function, Interconnection, Instruction Format and Interrupt.
Chapter 3 System Buses.  Hardwired systems are inflexible  General purpose hardware can do different tasks, given correct control signals  Instead.
Chapter 2: Computer-System Structures(Hardware)
Chapter 2: Computer-System Structures
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 2: Computer-System Structures Computer System Operation I/O Structure Storage.
Computer-System Architecture
Module 2: Computer-System Structures
ECEG-3202 Computer Architecture and Organization
Direct Memory Access Disk and Network transfers: awkward timing:
Tools.
Tools.
Module 2: Computer-System Structures
Computer System Overview
Chapter 2: Computer-System Structures
Chapter 2: Computer-System Structures
Module 2: Computer-System Structures
Advanced Computer Architecture Lecture 11
Module 2: Computer-System Structures
Chapter 5 Input/Output Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved
Presentation transcript:

Test for timestamp : measure code execution time

The function of timestamp Alt_timestamp_start(); –start the timer. –Calling the function again will reset the counter to zero. Alt_timestamp(); –Read the timer value Alt_timestamp_freq(); –Number of ticks per second If the number of clock ticks reaches(2^32-1) the value is undefined.

Example #include // required header file #include “sys/alt_timestamp.h” #include “alt_types.h” // variable declaration Alt_u32 time1; Alt_u32 time2; // start the timestamp device alt_timestamp_start(); Time1 = alt_timestamp(); Function1(); Time2 = alt_timestamp(); // function1() execution time is time2 - time1;

reference NiosII software development handbook : chapter 4 Developing programs using the HAL

Experimental result We use DMA to read data from system memory and write data to system memory. CPU will read the system memory at the same time. Then CPU and DMA will have bus contention. With cache –CPU contention : 4731 ticks –No contention : 4719 ticks Without cache –CPU contention : 4905 ticks –No Contention : 4719 ticks

Conclusion The read operation needs about 2 clock cycle so do the write operation *4 = with some other control signal. The execution time looks correct. The cache mechanism can enhance the performance a lot. If the device support burst transfer ( like memory), we can use a buffer to speed up the system. My next project will try to add a buffer to the DMA to see if this idea works or not.