MxScript v1.3 for Fast Models Reference Manual

Version 8.0


Table of Contents

Preface
About this book
Intended audience
Using this book
Glossary
Typographical conventions
Additional reading
Feedback
Feedback on this product
Feedback on this book
1. Introduction and syntax conventions
1.1. Introduction to MxScript
1.2. Syntax conventions
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 ()
3.4.2. bpAdd()
3.4.3. bpAddReg()
3.4.4. bpAddReg()
3.4.5. bpAddMem()
3.4.6. bpAddMem()
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. bool 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. string eval()

Proprietary Notice

Words and logos marked with or are registered trademarks or trademarks owned by ARM, 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.

Product Status

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

Revision History
Revision AJune 2007New document for SoC Designer v7.0.
Revision BFebruary 2008Update for System Generator v3.2 to include script functions for Model Debugger, and HDL cosimulation. Added new cast operations and constant types.
Revision CMay 2008Update to cover new functions for SoC Designer and System Generator.
Revision DJune 2008Update for MxScript v1.3 as shipped with System Generator v4.0.
Revision EDecember 2008Update for MxScript v1.3 as shipped with Fast Models v4.1.
Revision FMarch 2009Update for MxScript v1.3 as shipped with Fast Models v4.2.
Revision GApril 2009Update for MxScript v1.3 as shipped with Fast Models v5.0.
Revision HSeptember 2009Update for MxScript v1.3 as shipped with Fast Models v5.1.
Revision IFebruary 2010Update for MxScript v1.3 as shipped with Fast Models v5.2.
Revision JNovember 2011Update for MxScript v1.3 as shipped with Fast Models v7.0.
Revision KDecember 2012Update for MxScript v1.3 as shipped with Fast Models v8.0.
Copyright © 2007-2012 ARM. All rights reserved.ARM DUI 0371K
Non-ConfidentialID120712