Simics User Guide for Unix

Simics User Guide for Unix

Simics User Guide for Unix Simics Version 3.0 Revision 1317 Date 2005-11-18 © 1998–2005 Virtutech AB Norrtullsgatan 15, SE–113 27 STOCKHOLM, Sweden Trademarks Virtutech, the Virtutech logo, Simics, and Hindsight are trademarks or registered trademarks of Virtutech AB or Virtutech, Inc. in the United States and/or other countries. THIS PUBLICATION IS PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EI- THER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WAR- RANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON- INFRINGEMENT. THIS PUBLICATION COULD INCLUDE TECHNICAL INACCURACIES OR TYPOGRAPHI- CAL ERRORS. CHANGES ARE PERIODICALLY ADDED TO THE INFORMATION HEREIN; THESE CHANGES WILL BE INCORPORATED IN NEW EDITIONS OF THE PUBLICA- TION. VIRTUTECH MAY MAKE IMPROVEMENTS AND/OR CHANGES IN THE PROD- UCT(S) AND/OR THE PROGRAM(S) DESCRIBED IN THIS PUBLICATION AT ANY TIME. Contents I Simics Documentation 11 1 About Simics Documentation 13 1.1 Conventions ..................................... 13 1.2 Simics Guides and Manuals ............................ 13 Simics Installation Guide for Unix and for Windows ............. 13 Simics User Guide for Unix and for Windows ................. 14 Simics Eclipse User Guide ............................. 14 Simics Target Guides ................................ 14 Simics Programming Guide ............................ 14 DML Tutorial .................................... 14 DML Reference Manual .............................. 14 Simics Reference Manual ............................. 14 Simics Micro-Architectural Interface ....................... 14 RELEASENOTES and LIMITATIONS files ................... 15 Simics Technical FAQ ............................... 15 Simics Support Forum ............................... 15 Other Interesting Documents ........................... 15 2 Glossary 17 II Simulating with Simics 21 3 Introduction 23 3.1 Hosts and Targets .................................. 24 3.2 Host Recommendations ............................... 24 3.3 Simics Targets .................................... 25 3.3.1 AlphaPC 164LX ............................... 25 3.3.2 ARM SA1110 ................................. 25 3.3.3 Ebony ..................................... 25 3.3.4 Fiesta ..................................... 25 3.3.5 IA-64 460GX ................................. 25 3.3.6 Malta/MIPS4kc ............................... 25 3.3.7 PM/PPC ................................... 26 3.3.8 Simple PPC64 ................................ 26 3 CONTENTS 3.3.9 Serengeti ................................... 26 3.3.10 SunFire .................................... 26 3.3.11 x86 440BX .................................. 26 3.4 Simics Version Number ............................... 26 3.5 Simics Compatibility ................................ 27 4 First Steps 29 4.1 Launch Simulation .................................. 29 4.2 Running the Simulation ............................... 30 4.3 Checkpointing .................................... 31 4.4 Hindsight ....................................... 31 4.5 Getting Files Into a Simulated System ....................... 33 4.6 Debugging ...................................... 34 4.7 Tracing ........................................ 39 4.8 Scripting ....................................... 42 4.9 Simple Virtual Network ............................... 43 4.10 Connect to a Real Network ............................. 45 5 Command-line Interface: Basics 49 6 Configuration and Checkpointing 53 6.1 Basics ......................................... 53 6.2 Checkpointing .................................... 54 6.2.1 Attributes .................................. 55 6.2.2 Images .................................... 56 Image Search Path ............................. 57 6.2.3 Saving and Restoring Persistent Data ................... 58 6.2.4 Modifying Checkpoints .......................... 58 6.2.5 Merging Checkpoints ............................ 59 6.3 Inspecting the Configuration ............................ 59 6.4 Components ..................................... 60 6.4.1 Component Definitions ........................... 60 6.4.2 Importing Component Commands .................... 60 6.4.3 Creating Components ............................ 60 6.4.4 Connectors .................................. 61 6.4.5 Instantiation ................................. 62 6.4.6 Inspecting Component Configurations .................. 63 6.4.7 Accessing Objects from Components ................... 63 6.4.8 Available Components ........................... 64 6.5 Ready-to-run Configurations ............................ 64 6.5.1 Customizing the Configurations ..................... 65 6.5.2 Extending Existing Configurations .................... 66 4 CONTENTS 7 Managing Disks, Floppies, and CD-ROMs 69 7.1 Working with Images ................................ 70 7.1.1 Saving Changes to an Image ........................ 70 7.1.2 Reducing Memory Usage Due to Images ................. 71 7.1.3 Using Read/Write Images ......................... 72 7.1.4 Editing Images Using Mtools ....................... 73 7.1.5 Editing Images Using Loopback Mounting ............... 73 7.1.6 Constructing a Disk from Multiple Files ................. 74 7.1.7 The Craff Utility ............................... 75 7.2 CD-ROMs and Floppies ............................... 76 7.2.1 Accessing a Host CD-ROM Drive ..................... 76 7.2.2 Accessing a CD-ROM Image File ..................... 76 7.2.3 Accessing a Host Floppy Drive ...................... 77 7.2.4 Accessing a Floppy Image File ....................... 77 7.3 Using SimicsFS .................................... 78 7.3.1 Installing SimicsFS on a Simulated Linux System ............ 78 7.3.2 Installing SimicsFS on a Simulated Solaris System ........... 79 7.3.3 Using SimicsFS ............................... 80 7.4 Importing a Real Disk into Simics ......................... 80 8 Simics Scripting Environment 83 8.1 Script Support in CLI ................................ 83 8.1.1 Variables ................................... 83 8.1.2 Command Return Values .......................... 84 8.1.3 Control Flow Commands .......................... 84 8.1.4 Integer Conversion ............................. 85 8.1.5 Accessing Configuration Attributes .................... 86 8.1.6 Script Branches ............................... 86 Introduction to Script Branches ...................... 86 Waiting for Haps in Script Branches ................... 86 How Script Branches Work ......................... 87 Script Branch Commands ......................... 87 Variables in Script Branches ........................ 88 Canceling Script Branches ......................... 88 Script Branch Limitations ......................... 89 8.2 Scripting Using Python ............................... 89 8.2.1 Python in Simics ............................... 89 8.2.2 Accessing CLI variables from Python ................... 90 8.2.3 Accessing the Configuration from Python ................ 90 Configuration Objects ............................ 90 Creating Configurations in Python .................... 91 8.2.4 Accessing Command-Line Commands from Python .......... 92 8.2.5 The Simics API ............................... 92 8.2.6 Haps ..................................... 92 Example of Python Callback on a Hap .................. 93 5 CONTENTS III Simics Networking 95 9 Network Simulation 97 9.1 Ethernet Links .................................... 97 9.2 Link Object Timing ................................. 98 9.3 IP Services ...................................... 99 9.3.1 IP Based Routing .............................. 100 9.3.2 DHCP and BOOTP ............................. 101 9.3.3 DNS ...................................... 102 9.3.4 TFTP ..................................... 102 9.4 Distributed Network Simulation .......................... 103 9.5 Serial Links ...................................... 103 10 Connecting to a Real Network 105 10.1 Accessing Host Ethernet Interfaces ........................ 105 10.1.1 Raw Access .................................. 106 10.1.2 TAP Access .................................. 106 10.2 Selecting Host Ethernet Interface ......................... 107 10.3 Preparing for the Examples ............................. 108 10.4 Connection Types .................................. 111 10.4.1 Port Forwarding ............................... 113 The connect-real-network Command ................... 113 Example .............................. 114 Incoming Port Forwarding ......................... 114 Example .............................. 115 Outgoing Port Forwarding ......................... 116 Example .............................. 116 NAPT ..................................... 117 Example .............................. 118 DNS Forwarding .............................. 119 Example .............................. 119 10.4.2 Ethernet Bridging .............................. 120 Example ................................... 122 10.4.3 IP Routing .................................. 123 Example ................................... 124 10.4.4 Host Connection ............................... 126 Example ................................... 127 10.5 Performance ..................................... 128 10.6 Troubleshooting ................................... 128 11 Distributed Simulation 131 11.1 Synchronization ................................... 131 11.2 Architecture ..................................... 132 11.3 Running distributed ................................. 132 11.4 Example of Distributed Simulation and Network ...............

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    231 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us