MxScript v1.3 for Fast Models Reference Manual

Version 8.1


Table of Contents

Preface
About this book
Using this book
Typographic conventions
Feedback
Feedback on this product
Feedback on content
1 Introduction to and syntax conventions of MxScript
1.1 About MxScript
1.2 Syntax conventions of MxScript
1.2.1 Comments
1.2.2 Identifiers
1.2.3 Keywords
1.2.4 Operators
1.2.5 Constants
1.2.6 Types
1.2.7 Expressions
1.2.8 Calling built-in functions
1.2.9 Control statements
2 Common API
2.1 File input/output
2.1.1 fopen()
2.1.2 fclose()
2.1.3 fprintf()
2.1.4 fputs()
2.1.5 fgets()
2.1.6 fscanf()
2.1.7 ftell()
2.1.8 fflush()
2.1.9 fseek()
2.2 Handling strings
2.2.1 sscanf()
2.2.2 sprintf()
2.2.3 substr()
2.2.4 gets()
2.2.5 ascii2int()
2.3 Accessing environment variables
2.3.1 getenv()
2.3.2 putenv()
2.3.3 system()
2.4 Preprocessor
2.4.1 #include
2.4.2 #define
3 Model Debugger Scripting Functions
3.1 Introduction
3.2 Model connection and configuration
3.2.1 loadModel()
3.2.2 closeModel()
3.2.3 connectToModel()
3.2.4 debugIsim()
3.2.5 debugSystemC()
3.2.6 getParameter()
3.2.7 setParameter()
3.2.8 getTargetList()
3.2.9 getTargetName()
3.2.10 selectTarget()
3.2.11 loadApp()
3.2.12 saveState()
3.2.13 restoreState()
3.2.14 saveSession()
3.2.15 openSession()
3.2.16 setStateFile()
3.3 Model execution control
3.3.1 run()
3.3.2 runUntil()
3.3.3 runToLine()
3.3.4 stop()
3.3.5 getCurrentSourceFile()
3.3.6 getCurrentSourceLine()
3.3.7 getCurrentSourceColumn()
3.3.8 hardReset()
3.3.9 reset()
3.3.10 pause()
3.3.11 cont()
3.3.12 getStopCond()
3.3.13 isSimStopped()
3.3.14 restart()
3.3.15 goToMain()
3.3.16 step()
3.3.17 stepOver()
3.3.18 stepOut()
3.3.19 istep()
3.3.20 getInstCount()
3.3.21 cycleStep()
3.3.22 enableStepBack()
3.3.23 sleep()
3.3.24 msleep()
3.3.25 getCycleCount()
3.4 Breakpoints
3.4.1 bpAdd(address, memspace)
3.4.2 bpAdd(filename, lineNumber)
3.4.3 bpAddReg(regName)
3.4.4 bpAddReg(id)
3.4.5 bpAddMem(address, memspace)
3.4.6 bpAddMem(address, id)
3.4.7 bpRemove()
3.4.8 bpRemoveAll()
3.4.9 bpEnable()
3.4.10 bpEnableAll()
3.4.11 bpDisable()
3.4.12 bpDisableAll()
3.4.13 bpList()
3.4.14 bpSetTriggerType()
3.4.15 bpSetIgnoreCount()
3.4.16 bpSetCond()
3.4.17 bpIsHit()
3.5 Model resource access
3.5.1 regWrite()
3.5.2 regRead()
3.5.3 memWrite()
3.5.4 memRead()
3.5.5 disassemble()
3.5.6 memStoreToFile()
3.5.7 memLoadFromFile()
3.6 String and print functions
3.6.1 printf()
3.6.2 puts()
3.7 Miscellaneous
3.7.1 CADIXfaceBypass()
3.7.2 exit()
3.7.3 getMxScriptVersion()
3.7.4 help()
3.7.5 ld()
3.7.6 loadScript()
3.7.7 printReg()
3.7.8 rand()
3.7.9 eval()

List of Tables

1-1 MxScript operators
1-2 Associativity in expressions
1-3 Escape characters for string constants
1-4 Results of cast operations
2-1 Mode options for fopen()
3-1 CADIXfaceBypass return values

Release Information

Document History
Issue Date Confidentiality Change
A 30 June 2007 Confidential Release for SoC Designer v7.0
B 29 February 2008 Non-Confidential Update for System Generator v3.2
C 31 May 2008 Non-Confidential Update for SoC Designer and System Generator
D 30 June 2008 Non-Confidential Update for System Generator v4.0
E 31 December 2008 Non-Confidential Update for Fast Models v4.1
F 31 March 2009 Non-Confidential Update for Fast Models v4.2
G 30 April 2009 Non-Confidential Update for Fast Models v5.0
H 30 September 2009 Non-Confidential Update for Fast Models v5.1
I 28 February 2010 Non-Confidential Update for Fast Models v5.2
J 30 November 2011 Non-Confidential Update for Fast Models v7.0
K 31 December 2012 Non-Confidential Update for Fast Models v8.0
L 31 May 2013 Non-Confidential Update for Fast Models v8.1

Proprietary Notice

Words and logos marked with ® or ™ are registered trademarks or trademarks of ARM® in the EU and other countries, except as otherwise stated below in this proprietary notice. Other brands and names mentioned herein may be the trademarks of their respective owners.

Neither the whole nor any part of the information contained in, or the product described in, this document may be adapted or reproduced in any material form except with the prior written permission of the copyright holder.

The product described in this document is subject to continuous developments and improvements. All particulars of the product and its use contained in this document are given by ARM in good faith. However, all warranties implied or expressed, including but not limited to implied warranties of merchantability, or fitness for purpose, are excluded.

This document is intended only to assist the reader in the use of the product. ARM shall not be liable for any loss or damage arising from the use of any information in this document, or any error or omission in such information, or any incorrect use of the product.

Where the term ARM is used it means “ARM or any of its subsidiaries as appropriate”.

Confidentiality Status

This document is Non-Confidential. The right to use, copy and disclose this document may be subject to license restrictions in accordance with the terms of the agreement entered into by ARM and the party that ARM delivered this document to.

Unrestricted Access is an ARM internal classification.

Product Status

The information in this document is Final, that is for a developed product.

Web Address

Non-ConfidentialPDF file icon PDF versionARM DUI0371L
Copyright © 2007-2013 ARM. All rights reserved. ID041213