Full-System Simulation The leader in full-system simulation virtutech Jakob Engblom Business Development Manager [email protected] 5 January 2004 Copyright © 1998-2004 Virtutech, All rights reserved. CONFIDENTIAL 1 Simulation: Modeling + Execution The leader in full-system simulation virtutech • Simulation: a way to study the world •Build a model of a system • Try scenarios on this model – Experimental, not analytical approach • Understand the real system by working with the model – More available –More inspectable – Less dangerous 5 January 2004 Copyright © 1998-2004 Virtutech, All rights reserved. CONFIDENTIAL 2 Simulation or Analysis The leader in full-system simulation virtutech • Simulation gets closer to real world – More details – Fewer assumptions – High computational workload • Analytical models – Efficient predictors – Low computational workload – ... but more removed from world=less accurate 5 January 2004 Copyright © 1998-2004 Virtutech, All rights reserved. CONFIDENTIAL 3 Simulating Computer Systems The leader in full-system simulation virtutech 5 January 2004 Copyright © 1998-2004 Virtutech, All rights reserved. CONFIDENTIAL 4 tech virtu The leader in full-system simulation Simulating Computer Systems Program Processor herals WhatPe dorip we need to simulate? Stimuli 5 January 2004 Copyright © 1998-2004 Virtutech, All rights reserved. CONFIDENTIAL 5 Problem Abstraction Levels The leader in full-system simulation virtutech source code analysis printf method analytical methods source code semantic statistics correctness proof macros code transformation object code code augmentation OS emulation OS profilers execution environment virtual machines simulation instruction set full system simulation simulation register transfer level simulation gate level Instruction set level is essentially the level where software engineers interface with hardware engineers. Therefore, it is the lowest level accessible to software, and at the same time it is the best defined, least complicated, and most stable level. 5 January 2004 Copyright © 1998-2004 Virtutech, All rights reserved. CONFIDENTIAL 6 Full-System Simulation: Complete Virtualization The leader in full-system simulation virtutech Virtutech Simics One physical Virtual computer systems of computer many different types 5 January 2004 Copyright © 1998-2004 Virtutech, All rights reserved. CONFIDENTIAL 7 Complete Virtualization The leader in full-system simulation virtutech AllAll software:software: arbitraryarbitrary && User program unmodified.unmodified. SameSame asas onon aa realreal system.system. Target operating system ArbitraryArbitrary;; currentlycurrently Simulated target hardware supportssupports Alpha,Alpha, AMD64,AMD64, ARMARM IA64,IA64, MIPS,MIPS, PowerPC, Sparc, x86 Simics PowerPC, Sparc, x86 Linux,Linux, Solaris,Solaris, Host operating system WindowsWindows Host hardware PCPC oror SparcSparc 5 January 2004 Copyright © 1998-2004 Virtutech, All rights reserved. CONFIDENTIAL 8 Full-System Simulation The leader in full-system simulation virtutech User program Middleware DB Server Complete Operating system real Drivers Firmware software CPU Simulated PCI Network CPU Disk hardware IDE LCD RAM I2C FLASH ROM KBD Hardware 5 January 2004 Copyright © 1998-2004 Virtutech, All rights reserved. CONFIDENTIAL 9 NNoott Full-System Simulation The leader in full-system simulation virtutech User-level simulation User program Real user Middleware DB Servers program Operating system Simulated OS, services, CPU some HW RAM Hardware 5 January 2004 Copyright © 1998-2004 Virtutech, All rights reserved. CONFIDENTIAL 10 Sufficient Detail of Model The leader in full-system simulation virtutech • Complete and correct function – From a software perspective – All accessible values represented • ... including supervisor-level registers in processors • ... including model-specific registers – Memory-management units – All computations bit-correct • No difference from real target •Runs any software: – Firmware, OS, drivers, networks, applications, middleware • Hardware modeled as a set of devices – I/O-space or memory mapped – Complete configuration and control register set – Transaction-level of modeling • Next slide: example of detail required 5 January 2004 Copyright © 1998-2004 Virtutech, All rights reserved. CONFIDENTIAL 11 ActualActual screenshot screenshot fromfrom within within Simics, Simics, The leader in full-system simulation virtutech simulatingsimulating a a P4 P4 PC PC runningrunning Windows Windows XP XP 5 January 2004 Copyright © 1998-2004 Virtutech, All rights reserved. CONFIDENTIAL 12 Full-Network Simulation The leader in full-system simulation virtutech SimulatedSimulated networknetwork ofof simulatedsimulated machinesmachines InterfaceInterface toto realreal networknetwork Real network of physical machines 5 January 2004 Copyright © 1998-2004 Virtutech, All rights reserved. CONFIDENTIAL 13 Simics Timing The leader in full-system simulation virtutech • Globally synchronized timing – Across processors – Across machines – One processor stops Æ all stop • Correct relative speed – 500 Mhz processor will execute 10 times more instructions than a 50 Mhz processor, in the same time – For greater accuracy: select CPI values – Across the network • Virtualized time – Insulated from external time – Time does not advance when simulation is stopped 5 January 2004 Copyright © 1998-2004 Virtutech, All rights reserved. CONFIDENTIAL 14 Scope and Abstraction The leader in full-system simulation virtutech To simulate the Galaxies universe, the units of simulation have to be galaxies AtomLevel of abstraction The Scope of model Universe Simulating a single atom, we can use the incredible detail Reasonable to of quantom simulate: scope mechanics and proportional string theory to abstraction String theory 5 January 2004 Copyright © 1998-2004 Virtutech, All rights reserved. CONFIDENTIAL 15 Example: Scope/Detail tradeoff The leader in full-system simulation virtutech • Grand-Prix Legends • ”Life-like” action: –Momentum –Friction – Steering –Engine torque • Not nuts & bolts of cars Grand-Prix Legends ESSES, 4 Sept 2003 (c) Virtutech, Confidential 16 Increasing the Scope The leader in full-system simulation virtutech • Interesting systems are larger than single CPU • Multiprocessors – Homogeneous like servers – Heterogeneous like mobile phones • Distributed systems – Local-Area Networks – Embedded CAN buses – Networks-on-chips • Need to simulate – Shared memory machines –Many machines – Interconnection networks 5 January 2004 Copyright © 1998-2004 Virtutech, All rights reserved. CONFIDENTIAL 17 Speed of Simulation The leader in full-system simulation virtutech • Gate-level simulation: very very slow – Every gate simulated, subcycle simulation • Cycle-accurate simulation: very slow – Hardware timing at cycle level – Usually unnecessary • Instruction-set simulation (ISS): slow to fast – Depends on implementation technique – Abstract away most of timing • Emulation: fastest • Simics is a very fast ISS: – 100s of MIPS as the base model... – ...but can do cycle-accurate simulation when needed 5 January 2004 Copyright © 1998-2004 Virtutech, All rights reserved. CONFIDENTIAL 18 Speed The leader in full-system simulation virtutech Detailed hardware sim cycle-accurate simulator (>10,000x) accuracy fast full-system simulation (20-400x) emulator (5x) Virtualization speed 10 KIPS 1000 MIPS 5 January 2004 Copyright © 1998-2004 Virtutech, All rights reserved. CONFIDENTIAL 19 Multiple Machines in One Simulation Instance The leader in full-system simulation virtutech Programs Programs Target OS Target OS Network Target HW Target HW simulation Simics Host operating system TwoTwo oror moremore machinesmachines cancan bebe simulatedsimulated withinwithin aa singlesingle simulatorsimulator Host hardware 5 January 2004 Copyright © 1998-2004 Virtutech, All rights reserved. CONFIDENTIAL 20 Using Multiple Hosts for Simulation of Multiple Targets The leader in full-system simulation virtutech Simulated network Programs Simulated network Programs behavesbehaves thethe samesame asas onon aa singlesingle simulatingsimulating Target OS machinemachine Target OS Network Target HW Target HW simulation Simics Simics Host operating system Host operating system Real-lifeReal-life networknetwork connection Host hardware connection Host hardware 5 January 2004 Copyright © 1998-2004 Virtutech, All rights reserved. CONFIDENTIAL 21 Handy Features of Simulation The leader in full-system simulation virtutech • Checkpointing – Store current state; pick up and continue later • Determinism – Same initial state gives same execution; replay input/output • Controllability – Any part of machine or state can be changed • Visibility (insight without intrusion) – All state can be observed, traced, logged; unintrusively • Sandboxing – Simulated machine complete isolated 5 January 2004 Copyright © 1998-2004 Virtutech, All rights reserved. CONFIDENTIAL 22 Nonintrusive Inspection The leader in full-system simulation virtutech • Software monitors are intrusive... Simics is not WindowsWindows XPXP TaskTask Manager:Manager: 2%2% CPU,CPU, 33 MBMB RAMRAM 5 January 2004 Copyright © 1998-2004 Virtutech, All rights reserved. CONFIDENTIAL 23 Why is this Happening Now? Cost of Simulation! The leader in full-system simulation virtutech • Simulation Tool in 1977: DEC VAX-11/780 – 200,000 USD (1977 dollars) – 1 VAX MIPS – simulation technology ~200x – cost for simulated server hour: 4,000 USD Photo courtesy of The Computer Museum History Center • Simics in 1999:
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages61 Page
-
File Size-