DELTA TAU Data Systems, Inc. 1 UMAC TurboTurbo PMAC PCIGeo Drive Single Source Machine Control motion logic data Power PMAC Shared Memory December 2013.

Slides:



Advertisements
Similar presentations
Unions The storage referenced by a union variable can hold data of different types subject to the restriction that at any one time, the storage holds data.
Advertisements

ITCS 3181 Logic and Computer Systems 2015 B. Wilkinson slides3.ppt Modification date: March 16, Addressing Modes The methods used in machine instructions.
Primitive Data Types There are a number of common objects we encounter and are treated specially by almost any programming language These are called basic.
Arrays. Memory organization Table at right shows 16 bytes, each consisting of 8 bits Each byte has an address, shown in the column to the left
COSC 120 Computer Programming
Structure of a C program
1 9/8/08CS150 Introduction to Computer Science 1 Data Types Section 2.7 – 2.12 CS 150 Introduction to Computer Science I.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
1 Key Concepts:  Why C?  Life Cycle Of a C program,  What is a computer program?  A program statement?  Basic parts of a C program,  Printf() function?
Guide To UNIX Using Linux Third Edition
Computer Science: A Structured Programming Approach Using C1 Objectives ❏ To understand the structure of a C-language program. ❏ To write your first C.
The ISA Level The Instruction Set Architecture (ISA) is positioned between the microarchtecture level and the operating system level.  Historically, this.
DELTA TAU Data Systems, Inc. 1 UMAC TurboTurbo PMAC PCIGeo Drive Single Source Machine Control motion logic data Power PMAC as a Linux Computer January.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
Chapter Introduction to Computers and Programming 1.
Introduction to Programming. Our Book in CS Why Program? Lets watch a video
Programming Languages
User C Programs in Power PMAC December 2013
Variables and Data Types
DELTA TAU Data Systems, Inc. 1 UMAC TurboTurbo PMAC PCIGeo Drive Single Source Machine Control motion logic data Power PMAC Mathematical Features November.
DELTA TAU Data Systems, Inc. 1 UMAC TurboTurbo PMAC PCIGeo Drive Single Source Machine Control motion logic data Power PMAC Project Management November.
Power PMAC Electronic Cam Tables April 2014
Chapter 1: Introduction to Computers and Programming.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1: Introduction to Computers and Programming.
DELTA TAU Data Systems, Inc. 1 UMAC TurboTurbo PMAC PCIGeo Drive Single Source Machine Control motion logic data Power PMAC Data Structures January 2012.
DELTA TAU Data Systems, Inc. 1 UMAC TurboTurbo PMAC PCIGeo Drive Single Source Machine Control motion logic data Talking to Power PMAC November 2013.
C Tokens Identifiers Keywords Constants Operators Special symbols.
Cis303a_chapt03-2a.ppt Range Overflow Fixed length of bits to hold numeric data Can hold a maximum positive number (unsigned) X X X X X X X X X X X X X.
Arrays in C++ Numeric Character. Structured Data Type A structured data type is a type that stores a collection of individual components with one variable.
DELTA TAU Data Systems, Inc. 1 UMAC TurboTurbo PMAC PCIGeo Drive Single Source Machine Control motion logic data Power PMAC Encoder Conversion Table January.
1-1 NET+OS Software Group Flash API Multiple flash memory bank support New Flash API introduction Detailed Flash API Function presentation Supporting.
CISC 110 Day 1 Hardware, Algorithms, and Programming.
Array Cs212: DataStructures Lab 2. Array Group of contiguous memory locations Each memory location has same name Each memory location has same type a.
DELTA TAU Data Systems, Inc. 1 UMAC TurboTurbo PMAC PCIGeo Drive Single Source Machine Control motion logic data Power PMAC Operational Summary November.
Lecture #5 Introduction to C++
CISC105 – General Computer Science Class 9 – 07/03/2006.
Data Types. Data types Data type tells the type of data, that you are going to store in memory. It gives the information to compiler that how much memory.
GUIDED BY- A.S.MODI MADE BY- 1. SHWETA ALWANI 2. PRIYANKA.
Fundamentals of C and C++ Programming. EEL 3801 – Lotzi Bölöni Sub-Topics  Basic Program Structure  Variables - Types and Declarations  Basic Program.
Pointers: Basics. 2 What is a pointer? First of all, it is a variable, just like other variables you studied  So it has type, storage etc. Difference:
1 Lab 1. C Introduction  C: –Developed by Bell lab. in –a procedure-oriented programming language.  Developing environments: –Editing –Preprocessing.
UConn CSE CSE241: Instruction Level Architecture Base CPU/Memory Architecture Registers Fetch-Execute Cycle Instructions Addressing Modes.
Topics memory alignment and structures typedef for struct names bitwise & for viewing bits malloc and free (dynamic storage in C) new and delete (dynamic.
Programming Fundamentals. Overview of Previous Lecture Phases of C++ Environment Program statement Vs Preprocessor directive Whitespaces Comments.
Lecture 3 Introduction to Computer Programming CUIT A.M. Gamundani Presentation Layout from Lecture 1 Background.
CSI 3125, Preliminaries, page 1 Data Type, Variables.
COMP 102 Programming Fundamentals I Presented by : Timture Choi COMP102 Lab 011.
Module B - Computation1/61 Module-B-Computation Variables Basic Memory Operations Expressions.
Pointers in C++. Topics Covered  Introduction to Pointers  Pointers and arrays  Character Pointers, Arrays and Strings  Examples.
1.2 Primitive Data Types and Variables
Spring 2009 Programming Fundamentals I Java Programming XuanTung Hoang Lecture No. 8.
Department of Electronic & Electrical Engineering Types and Memory Addresses Pointers & and * operators.
Data Types Always data types will decide which type of information we are storing into variables In C programming language we are having 3 types of basic.
 Variables are nothing but reserved memory locations to store values. This means that when you create a variable you reserve some space in memory. 
Arrays in MIPS Assembly Computer Organization and Assembly Language: Module 6.
Sadegh Aliakbary Sharif University of Technology Fall 2010.
DELTA TAU Data Systems, Inc. 1 UMAC TurboTurbo PMAC PCIGeo Drive Single Source Machine Control motion logic data Power PMAC Compensation Tables November.
C is a high level language (HLL)
1 A more complex example Write a program that sums a sequence of integers and displays the result. Assume that the first integer read specifies the number.
Software Troubleshooting Eliminate possible programming and timing errors by stopping all programs ( and ). Use the Executive program terminal and send.
Java Programming Language Lecture27- An Introduction.
C LANGUAGE UNIT 3. UNIT 3 Arrays Arrays – The concept of array – Defining arrays – Initializing arrays.
Chapter 2 Variables and Constants. Objectives Explain the different integer variable types used in C++. Declare, name, and initialize variables. Use character.
Format of Assembly language
C Basics.
By: Syed Shahrukh Haider
DATA HANDLING.
Instruction Set Principles
C Language B. DHIVYA 17PCA140 II MCA.
Variables and Constants
Presentation transcript:

DELTA TAU Data Systems, Inc. 1 UMAC TurboTurbo PMAC PCIGeo Drive Single Source Machine Control motion logic data Power PMAC Shared Memory December 2013

DELTA TAU Data Systems, Inc. 2 UMAC TurboTurbo PMAC PCIGeo Drive Single Source Machine Control motion logic data Power PMAC Shared Memory Key structure for permitting different tasks on Power PMAC to access same data –Automatic real-time tasks: phase, servo, motion calculations –User-written real-time tasks: phase, servo, foreground C tasks –Background tasks: Script PLC programs, automatic tasks –User-written C background routines and programs –Host communications threads: Telnet, SSH Server Pre-defined data structures are placed in shared memory – setup, control, and status User buffer can be defined in shared memory for application- specific data

DELTA TAU Data Systems, Inc. 3 UMAC TurboTurbo PMAC PCIGeo Drive Single Source Machine Control motion logic data Pre-Defined Data Structures in Shared Memory Accessible from Power PMAC script language –Names are not case sensitive from script programs or on-line commands –Use structure and element name directly – e.g.: Sys.ServoPeriod = 0.250; Motor[5].JogSpeed = Motor[5].MaxSpeed / 4; Accessible from C-language routines and programs –Must include header file RtGpShm.h in compilation –Called routines “inherit” access to pshm structure variable –Independent programs must declare struct SHM variable –Use C method for referencing elements within structure: pshm->ServoPeriod = 0.250;// No need to use “Sys.” pshm->Motor[5].JogSpeed = pshm->Motor[5].MaxSpeed / 4; –Structure element names are case-sensitive from C programs

DELTA TAU Data Systems, Inc. 4 UMAC TurboTurbo PMAC PCIGeo Drive Single Source Machine Control motion logic data Power PMAC Shared Memory User Buffer Intended for application-specific data storage and transfer User-definable size, defaults to 1 MByte (1,048,576 bytes) –Part of overall 768 MByte (0.75 GByte) standard user RAM –Part of overall 1.75 GByte extended user RAM Allocation can be changed in IDE Project Manager –Use “Properties” Control window –Set “User Buffer” size in MBytes –Resulting size stored in ppproj.ini project configuration file –Must issue save command and reset/power-cycle before change takes effect Base address of buffer can be found in Sys.pushm (user typically does not need to know numerical value)

DELTA TAU Data Systems, Inc. 5 UMAC TurboTurbo PMAC PCIGeo Drive Single Source Machine Control motion logic data Shared Memory User Buffer Data Structure Elements To access memory as 64-bit floating-point value (“double”): –Sys.Ddata[0]// Uses 8 bytes starting at Sys.pushm –Sys.Ddata[1]// Uses 8 bytes starting at Sys.pushm+$8 –Sys.Ddata[n]// n=(size/8)-1, uses last 8 bytes of buffer To access memory as 32-bit floating-point value (“float”): –Sys.Fdata[0]// Uses 4 bytes starting at Sys.pushm –Sys.Fdata[1]// Uses 4 bytes starting at Sys.pushm+$4 –Sys.Fdata[n]// n=(size/4)-1, uses last 4 bytes of buffer To access memory as 32-bit integer value –Sys.Idata[j]// Uses 4 bytes for signed integer starting at Sys.pushm+(4*j) –Sys.Udata[j]// Uses 4 bytes for unsigned integer starting at Sys.pushm+(4*j) To access memory as 8-bit character value (for strings): –Sys.Cdata[j]// Uses 1 byte for character starting at Sys.pushm+j Constant indices can range from 0 to 16,777,215 (or up to buffer end) Any L-variable can be used for index (watch subroutine stack offset!) Note that these are different ways of accessing and interpreting the same registers, so conflicts are possible!

DELTA TAU Data Systems, Inc. 6 UMAC TurboTurbo PMAC PCIGeo Drive Single Source Machine Control motion logic data User Buffer Memory Organization Sys.pushm+DdataFdataIdataUdataCdata 0 [0] 1 [1] 2 [2] 3[0] [3] 4 [4] 5 [1] [5] 6 [6] 7 [7] 8 [8] 9 [2] [9] 10 [10] 11[1] [11] 12 [12] 13 [3] [13] 14 [14] 15 [15]

DELTA TAU Data Systems, Inc. 7 UMAC TurboTurbo PMAC PCIGeo Drive Single Source Machine Control motion logic data Shared Memory User Buffer Element M-Variables Define directly to data structure element Mn->Sys.Ddata[{index}] for 64-bit floating-point variable Mn->Sys.Fdata[{index}] for 32-bit floating-point variable Mn->Sys.Idata[{index}] for 32-bit signed integer variable Mn->Sys.Udata[{index}] for 32-bit unsigned integer variable Mn->Sys.Cdata[{index}] for 8-bit character variable {index} can be constant from 0 to 16,777,215 (in range of buffer) {index} can be any L-variable With IDE project manager, can declare as pointer variable – e.g. ptr CycleCount->Sys.Udata[32768] With L-variable index, can use single M-variable to access an entire array of values – e.g. with ptr CycleTime->Sys.Fdata[L10] TotalTime = 0; L10 = 1000; while (L10 < 2000) TotalTime += CycleTime; L10++;

DELTA TAU Data Systems, Inc. 8 UMAC TurboTurbo PMAC PCIGeo Drive Single Source Machine Control motion logic data Shared Memory User Buffer Formatted M-Variables Useful especially for accessing partial words in buffer Defined as Mn->{format}.user:{byte offset}.[{bit offset}.{width}] Possible formats are: –d (double) for double-precision floating point –f (float) for single-precision floating point –u (unsigned) for 32-bit unsigned integer register –s (signed) for 32-bit signed integer register that saturates –i (integer) for 32-bit signed integer register that rolls over {byte offset} must be divisible by 8 for d format {byte offset} must be divisible by 4 for other formats {bit offset} (= 0 to 31, default 0) and {width} (= 1 to 32, default 32) can only be used for integer formats Can declare directly as “ptr” pointer variable in IDE –e.g. ptr HandshakeBit->u.user:$

DELTA TAU Data Systems, Inc. 9 UMAC TurboTurbo PMAC PCIGeo Drive Single Source Machine Control motion logic data Shared Memory User Buffer Element Addresses Sys.Xdata[{index}].a specifies numerical address of element –X can be D, F, I, or U for different element types –{index} can be constant or L-variable Most commonly used to specify data gathering of this element – e.g. Gather.Addr[7]=Sys.Fdata[372].a Can be used for other purposes as well –Feedback data synthesized by a C-program and placed in shared memory can be accessed this way: EncTable[23].pEnc=Sys.Idata[7243].a –Outputs of virtual motors can be placed in shared memory as a holding register: Motor[9].pDac=Sys.Idata[379].a From C, declare pointer (array base) variable – e.g.: int *MyUshmIntVar double *MyUshmDarray MyUshmIntVar = (int *) pushm + 9;// Sys.Idata[9] MyUshmDarray = (double *) pushm ;// Sys.Ddata[8192]