140 likes | 253 Views
Simics: A Full System Simulation Platform. Synopsis by Jen Miller 19 March 2004. Goals. Simulate a complete system with perfect accuracy Simulate realistic work loads Achieve balance between accuracy and performance Accurate enough to run commercial workloads
E N D
Simics: A Full System Simulation Platform Synopsis by Jen Miller 19 March 2004
Goals • Simulate a complete system with perfect accuracy • Simulate realistic work loads • Achieve balance between accuracy and performance • Accurate enough to run commercial workloads • Abstract enough to simulate “quickly”
What can Simics do? • Model a wide variety of systems • Embedded • Desktop • MPs • Clusters • Run many realistic workloads • Unmodified operating systems • SPEC CPU2000 • TPC-C • Interactive desktop apps and games
How does Simics model systems? • Processors are simulated at the instruction-set level • UltraSPARC, Alpha, MIPS, ARM, IPF, PowerPC, X86 and X86-64 • Flexibility Mix and match architectures with operating systems • Accurate device models can run real firmware and device drivers
Operating Systems • User-level applications can be run on a “bare bones” simulator by using an OS emulation layer • We can isolate the behavior of a single application!
Full-Scale Distributed Systems • Each target machine is a node • A single Simics instance can simulate one or more nodes of the same basic architecture • Heterogeneous nodes can be connected into a network using Simics Central • Simulation is fast enough to be interactive • Global time can be paused to inspect state • Some capabilities: Access memory traffic or set breakpoints anywhere, modify any of the systems, timestamp user input, checkpoint simulations
Simics Central • Synchronizes virtual time between Simics simulators and distributes simulated traffic between nodes • Imposes a minimum latency on all messages • Will halt the simulation if one process consumes cycles slower than others • Network simulation speed is limited by the slowest process • Currently supports Ethernet networks
Debugging • Simics supports traditional debugging • Loading symbolic information • Single stepping • Repeatability: Prior sequences of events can be played back to trigger a bug • External debuggers can be attached • For example, TCP/IP GNU debugger
Memory and I/O Devices • Users can extend a simulated memory space by adding a timing model (such as Ruby) • Simics uses a simulator translation cache to speed up loads, stores, and instruction fetches • The caches store pointers to simulated memory and are indexed by virtual addresses • Simics supports a device set that enables firmware and the OS to run • Keyboard/mouse controller, DMA, Interrupt controller, floppy controller, Graphics cards, etc. • Users can write new device models
Economic Benefits • Single platform across the development cycle
Implementation • The target system is described using a simple object-oriented language
Event Handling • Simics can mix event-driven and time-driven components • Each processor object has two event queues: a step queue and a time queue • Events appear in the step queue after a number of program counter steps • The time queue has a resolution of a processor clock cycle
Conclusions • Full system simulation has benefits over testing physical hardware • Easy to arbitrarily modify conditions and insert errors • Discovered errors can be replicated • Automated testing • You can get a good idea of feasibility and performance before you build something