Simics - Break the Rules of Product Development
Upcoming SlideShare
Loading in...5
×
 

Simics - Break the Rules of Product Development

on

  • 733 views

Presented at the 2013 MBSE Technical Forum in Huntsville, Alabama.

Presented at the 2013 MBSE Technical Forum in Huntsville, Alabama.

Statistics

Views

Total Views
733
Views on SlideShare
731
Embed Views
2

Actions

Likes
0
Downloads
9
Comments
0

1 Embed 2

http://podidoo.com 2

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Simics - Break the Rules of Product Development Simics - Break the Rules of Product Development Presentation Transcript

  • Wind River SimicsBreak the Rules ofProduct DevelopmentRory PatchinSimics Sales SpecialistTom WallSimics Technical Account Manager
  • Historical Background• Wind River founded 1981• Virtutech founded 1998• Q3 2009 Intel Acquires Wind River• Q1 2010 Intel Acquires Virtutech, Wind River becomessole Distributor2
  • Challenges with Debugging
  • 4Debugging Challenges• Limited visibility into hardware• Single debug port, multiple processors• High-speed, concurrent execution• Timing-sensitive chaotic behavior• Small changes in timing can radically altersystem behavior• Hardware variations can impact softwarebehavior• Lack of determinism• Re-running a program with different results• Hard to reproduce bugs• “Heisenbugs”• Altered behavior when inserting probes to tracebehavior• System keeps running even if one core stops
  • 5• Instrumented codechanges behavior toomuch• Multi-core bugs aresensitive to timingchanges so may bedifficult to recreate• It is hard to get atinternal hardwarestructuresTraditional DebugApproaches Don’t WorkWell
  • 6• Parallelism required to gain performance• Parallel hardware “Easy” to design• Parallel software hard to write• Fundamentally hard to grasp true concurrency• Complex software environments• Legacy software assumes single-processor• Might break in new and interesting ways• Multitasking not guaranteed to run onmultiprocessor• Difficult issues for software developers• Additional tool support required• Early access physical hardware often not the bestdevelopment platformMigration Issues
  • 7Imagine If You Could…Reduce yourtime-to-market by 66%.Reduce your debugtime by 35%.Reduce your developmenttarget costs by 45%.• Have target hardware forevery team member.• Try out several hardwareoptions before youcommitted to one.• Equip sales, marketing, andtech support withinexpensive targets.• Debug software beforehardware existed• Explore new silicon choicesbefore silicon existed.• Integrate and test yoursystem before the systemexisted.• Enable agile and iterativedevelopment• Easily manage largesystems-of-systems.• Easily debug largesystems-of-systems.
  • Wind River SimicsOverview
  • 9What is Wind River Simics?Wind River Simics is a full system simulator usedby software developers to simulate the hardware oflarge and complex electronic systems.• Simulate any sizeof target system• Run unmodifiedtarget binariesSimics allows you to break the rules of embedded product development.Wind RiverSimicsAnyTargetSystem
  • 10Simulate Any Size Embedded SystemProcessorand MemorySoC Devices Complete Boards Complete Systemsand NetworksDevices,Racks of Boards,and BackplanesSystem ComplexityCustomerValue
  • 11Simics Transforms the Product Life CycleSystemDefinitionPlatformCustomizationandStabilizationDeployandMaintainApplicationDevelopmentSystemIntegrationand TestTime-to-MarketTCOCapExOpExReusable Assets Enable Agileand Iterative Development• Use virtual target for architectural analysis• Pre-silicon architecture analysis using actual target software• Legacy system upgrade analysis using actual target software• Eliminate hardware availability and flaw issues• Hardware and software co-development• Develop target software before hardware is available• Utilize virtual target instead of host-based development• Advanced target hardware for everyone• Easy collaboration among entire team• Eliminate system availability issues• Iterative and incremental integration and test• Debugging at the system level• Utilize virtual platform even after development is complete• Maintenance of legacy products for five, 10, 20+ years• Support of many different customer configurations
  • Simics Impact on Time to Market & Risk• Simics shifts schedules left• Enables agile & iterative development by parallelizing work• Replace big-bang integration with incremental integrations• Management & debugging of system of systems12
  • REALITY: Everything Often Gated By Hardware13Pre-SiliconActivitiesHardwarePrototypesProduction,ManufactureStartApplicationDevelopmentEnd UserDocumentation& TranslationSystemIntegrationSystemTestHardwareDevelopmentSoftwareDevelopmentProductRequirementsMarketing /FeatureValidationPrototype H/WSpecifications
  • Simics Enables Agility14DevelopDefine DeploySystemsIntegration• Documents• Demos• Training• SupportToEcosystem &CustomersMultipleDesignSpinsArchitecturalInvestigationFirmware• Boot code• Diagnostics• DriversBSPApplicationDevelopmentFinal RevHWArchitectureDesignProductSpec.HWSpec.• Customers• Partners• Sales• Support• MarketingSWSpec.
  • 15Simics Impact on ConsolidationSimics Model ofLegacy SystemSimics Model ofMulti-core DesignOSFirmwareOSFirmwareHypervisor• Expedites consolidation• Replace paper analysis with real software on both designs• Reduce risks of moving to a new technology• Evaluate impact on complete systemApplicationSoftwareApplicationSoftware
  • 16Simics Impact on Costs• Reduces CapEx, OpEx, and developmental costs• Replace expensive labs with virtual labs• Replicate, assemble, and configure large systems of COTS components• Configure new systems-of-systems fasterSimics
  • 17• Systems on every Engineer’s Desk• Replace expensive system hardware with virtual systems• Debug more efficiently at system-of-systems level• Reduce number of iterations of physical prototypes neededSimics Impact on AvailabilitySimics
  • Simics in Short• Complete target simulation• Runs OS, drivers, all othersoftware• Models any system• Processor, SoCs, FPGA, ASICs• Multicore processors• Multiple boards• Multiple Networks• Targets• From single-core aerospacesystems• ... to multicore networkprocessors• ... to massive multiprocessorservers18SimicsSimicsUser application codeHost hardwareHost hardwareHost operating systemHost operating systemVirtual target hardwareTarget operating system (s)Middleware and libraries
  • Wind River SimicsSystem Level Capabilities
  • System-Level Features20Checkpoint and restore Multicore, processor, board Real-world connectionsRepeatable fault injection onany system componentScripting Mixed endianness, wordsizes, heterogeneitycon0.wait-for-string "$“con0.record-startcon0.input "./ptest.elf 5n"con0.wait-for-string "."$r = con0.record-stopif ($r == "fail.”) {echo ”test failed”}
  • Transporting bugs with CheckpointsVirtualplatformPPDThe software user finds abug and needs to report itto the developer.A developer D creates apiece of software andpasses it on for testingand useThe developer andsoftware user are bothusing the same virtualplatform to run softwareThe software user the virtual platform’scheckpointing to pass the bug to thedeveloper. This ensures perfectreproduction of the bug, as well ascomplete communication of the targetstate.21checkpointhardware configuration or reconfigurationsoftware package, load, or configuration
  • Session Comments and Recording22Comments in the timeline canalso be used to navigate tothat time when using reverseexecutionStarting a recording fromEclipse – it can also be donefrom scripts and the CLI
  • Fault Injection• Examples• Dropping packets on networks• Injecting bad checksums• Network partitioning• Delaying hardware replies• Transient memory corruption• Permanent memory corruption• Transient register corruption• Permanent register corruption• Data bus transmission errors• Address bus transmission errors• Triggering spurious interrupts• Permanent subsystem failures(disconnecting from system)• Processor crash• Temperature sensor reportingoverheating• Error reporting registers flagged23• Simics target control• Access any part of target• Change any part of target state orconfiguration• Scripting for precise targeting andreplay of faults• No permanent damage to target• Purpose• Test system-level fault handling• Test fault low-level fault detection• Model failing hardware
  • Scripting• Simics command-line interface (CLI)• Easy and powerful for the most common tasks• Object-oriented, hierarchical naming of target components• Supports loops, conditionals, and parallel script branches• User can define custom commands using Python• Simics integrated Python interpreter• Access to Simics API, Python library, and host OS• Full object-oriented programming environment• Device models can be written in Python• CLI and Python are fully integrated24
  • Wind River SimicsSystem Inspection25
  • Simics System Editor• System editor• Inspect• Change• Configure• Reconfigure simulationas it is running• Add and removehardware units• Connect and disconnectunits• Shows hierarchicalsystem structure26
  • Simics Device Register Viewer• Inspect devices• Registers• Register banks• Bit fields in registers• Current value• Documentation anddescription strings27
  • Hardware unit front panelSimics System Panel28Simulation modelsSimulation feature controlTarget system stateShowing parts of statenow shown on physicalsystem front panelControl panel forsimulation extensions andfeatures not directly partof a hardware unitModeling lights anddisplays and buttonsfound on the front(typically) of a real systemShowing parts of state now shown on physicalsystem front panel
  • Debugging withWind River Simics
  • Simics Debugging Features30Synchronous stopfor the entire systemUltimate repeatability Reverse debuggingUnlimited and powerfulbreakpointsTrace everything Insight into all devicesbreak –x 0x0000 length 0x1F00break-io uart0break-exception int13break-log “spec violation”
  • 31Repeatability and Reverse Debugging• Repeat any run trivially• No need to re-run and hope for bug to reoccur• Stop and go back in time• No re-running program from start• Breakpoints and watchpoints backward in time• Investigation of exactly what happens each timeThis control andreliablerepeatability isvery powerful forparallel code.Discover BugRe-run: Bug Doesn’t Show UpRe-Run: Bug Doesn’t Show UpRerun: Different BugRe-run: Initial Bug OccursDiscover BugReverse Execute and FindSource of BugOn virtual hardware, debugging is much easier.On hardware, only some runs reproduce an error.
  • Simulation executes forward from the stateReverse execution in Simics• Take periodic checkpoints of system state as we execute• To go back to a point in time• Go back to the closest checkpoint and execute forward32Simulation executes forwardExecute forwardCheckpointLogical timeSimulation timeReverseExecute forwardRestore tocheckpoint,simulateforward
  • Unparalleled Breakpoints• Breakpoints areunintrusive and do notaffect target state• Code execution• Data access• No limits• Virtual addresses• Physical addresses• Arbitrarily large areas• Any number of breakpoints• Processor exceptions• Control register access• Devices access• Time• Console output• Network activity• Task switches• OS calls• System event (haps)• TLB, device action, …• Simulation log message33
  • Code is not just about CPUs34On a modern SoC, the processorcores are just one part of thesystemMuch application functionality isimplemented by using specialaccelerators... and you need to debugtheir interaction with the processors &softwareSimics can trace, log, and break on allhardware activities. Devices can reportsuspicious software actions andviolations of hardware programmingrules. Breakpoints on exceptions makesdebugging drivers and operating systemsmuch easier.
  • Fully-Featured Eclipse Debugger35Symbol browser lets you managedebug symbols and search forspecific symbol names in thedebug informationStop log shows you how you arrivedat the current point in time,including actions performed and thetime change they resulted in
  • Debug at System Level• Debug multiple target boards andmachines using a single debugconnection• Synchronized system• Global stop of target system• Single-step any code, any where• Reverse entire system• Relative speeds of targets modeled• Debug heterogeneous targets• Different processor architectures• Different operating systems• Hypervisor, SMP, AMP, single-core• Attach multiple debuggers to system• Debug code through all layers of thesoftware stack, down to hardware• Trace and log without effects causedby instrumented code36
  • Simics AnalyzerDemonstrating two differentways to handle a hardwaredevice. The red alternative isusing a regular Linux devicedriver and spends most of itstime in the kernelThe green alternative isaccessing the hardware directlyfrom user space using anmmap() setup, leading to verylittle kernel time (and betterlatency).Looking at different aspects ofthe target system state, such ashardware registers, device state,and software threads running.37
  • Wind River SimicsArchitecture
  • Wind River SimicsTarget Machine(s)Processor coreSimics ArchitectureModelLibraryDevicesDevicesDevicesProcessor coresDevicesDevicesNetworksand IOTarget operating systemTarget hardware driversUser program MiddlewareTarget boot codeUser programTarget ISA decoderJITCompilerInterpreterSimicsCoreConfigurationmanagementCore ServicesAPIInspectionControlFeaturesGUIScriptingBuilt-inDebuggerDevice NetworkProc.coreSoCInter-connectConfigscriptsVMPExternalI/OEthernetSerialKeyboardMouse….Event queueand timeMultithreadingand scalingDevicesDevicesMemoriesLibrariesExternalToolsWorkbenchEclipseTesting toolsDebuggers….39
  • Wind River SimicsModeling Your System40
  • Evolve and Iterate the Virtual Platform• Start with a virtual reference board or bare-bones system or QSP• Change virtual platform contents as hardware design evolves• Create new hardware versions faster & in less timeVirtual boardVirtual model of new SoCCPUTimerPICUARTCPURAMVirtual boardVirtual model of new SoCCPUPatternMatchingTimerPICUARTEthernetEthernetCPU CPURAMFlow controlVirtual boardVirtual model of new SoCCPUPatternMatchingTimerPIC MCUARTEthernetEthernetCPUCryptoBufferMemoryTCPOffloadBufferMemoryCPURTCRAM FLASHFlow control41
  • SystemSimics follows Real-World Structure• Simics models are built using thesame logical hierarchy ofcomponents as the physicalsystem• Fully supports systems ofsystems, and multiple levels ofsystem packaging• Easy for end users to manipulateBoard 1FlashEthernetPHYSoC 1DDR RAMFPGAPHYCPUCPU Eth EthPIC TimeSer PCIBoard 2FlashPHYSoC 2DDR RAMSCSICPUEthAccPIC TimeSerPCIHDDSystemBoard 1 Ethernet Board 2FPGAFlashDDRRAMSoC 1Eth linkPHY PHYCPU complexCPU CPU PICEthEth TimeSer PCIetc…42
  • Boards,Networks,Software loadsSystems,NetworksChips,Subsystems,IP blocks,Memory mapsDevices,Cores,Interconnects,MemoriesSystem Configuration Levels43Rack 2Board 1 Backplane Board 2FPGAFlashDDRRAMSoC 1Eth linkPHYCPUcomplexCPU CPU PIC EthUSB TimeSer PCIRack 1 Wide-areanetworkSystemDML, SystemC, C,C++, ISS tools,etc.Simics componentsSoftware SoftwareSimics scripts, Simicsscripts calling SimicsscriptsSimics components ,Simics scriptscreating components,Simics scripts addingsoftware
  • Modeling Support in Eclipse44DML editorExecute modelunit testsBrowse and accessexample code andmodel skeletons
  • Wind River SimicsProduct Portfolio
  • Simics 4.8 Product Portfolio46SimicsHindsightSimicsAnalyzerSimicsAcceleratorSimics ModelBuilderSimicsExtensionBuilderSimics Virtual PlatformsPCVPModelLibraryCSVP
  • Q & A
  • 49
  • Model Fidelityhttp://www.freescale.com/webapp/sps/site/training_information.jsp?code=WBNR_VFTF09_AN116Excerpted from this page – “P4080 SDK software components have beentested on Virtutech® Simics™ hybrid virtual platform for the Freescale QorIQP4080. ”50
  • Simics API• Wind River Simics 4.8 C++ Device API Programming Guide• Wind River Simics 4.8 Model Builder User’s Guide• Wind River Simics 4.8 Model Builder DML 1.2 Reference Manual• Wind River Simics 4.8 Reference Manual• Wind River Simics 4.8 Target API Application Note• Wind River Simics 4.8 Extension Builder User’s Guide• Wind River Simics 4.8 Hindsight User’s Guide51Simics exports two well-defined application programming interfaces (APIs)based on C available in C/C++. One for device modeling, the Device APIand one for extending the simulator, the Simulator API. Almost all functionsin the C APIs are also available in Python, and there is a small Python-onlyAPI in addition. There is also a Simics Eclipse API providing basic control ofa simulator session.
  • Simics CLI (Simics’ console)The Simics Command Line Interface (CLI), provided as part of SimicsHindsight, is an text based user interface with built-in help system,context sensitive tab-completion (on both commands and arguments),and scripting support which provides access to the Simics API usingPython.The user interface of a Simics module consists of three parts: itsattributes, its interfaces, and the commands it adds to the Simics CLI.The Simulation can also pass output to the CLI.load-module is used to add a components’ commands to the CLI52• Wind River Simics 4.8 Hindsight User’s Guide• Wind River Simics 4.8 Model Builder User’s Guide• Wind River Simics 4.8 P502x0 Reference Manual (complete list of all CLI commandsdefined by this package)
  • Simics ScriptingSimics has a built-in Python 2.6 interpreter that can be used for bothsimple and more advanced scripting. The command line interface (CLI)also supports writing simple scripts. Scripts can be triggered by eventsin the simulated machine, called haps.Scripts provide for –• Definition and manipulation• Print command return values to CLI console• Control flow• Integer conversion• Accessing configuration attributes• Script branching Wind River Simics 4.8 Hindsight User’s Guide Wind River Simics 4.8 Reference Manual53
  • 54