Electronic Design

Improving Simulation: Virtutech Q&A

Simulation is a critical part of application development these days for a variety of reasons. It allows developers to work on hardware that may still be in the conception stage or hardware that might be costly or scarce. This approach means software can be available when hardware is finally delivered instead of starting application development—which significantly reduces time to market.

Simulations also give developers debugging and testing insight in a system, and often these discoveries would be unavailable with real hardware. For example, many low-end microcontrollers have no trace capability but this is trivial to implement in a simulation. I recently had a chance to talk with Michel Genard, vice president of marketing at Virtutech, about simulation in general and their latest product, Simics 3.2.

ED: System simulation can address a range of levels. What type of simulation products does Virtutech provide?

MG: Natively, Simics supports a functional level of abstraction (in TLM2 term LT+); this is named level ST, for Software Timed. Through our hybrid mode, which was developed in partnership with Freescale, we can also support Cycle Accurate models (in TLM referred as AT) - Levels of Abstraction at Memory Bus.

ED: Simics allows developers to add their own components to the system. Can you tell us about the range of components that can be added to a system and the API used to do this?

MG: You can design virtually any devices from a simple USB cable, disk, PCI, I2C, VME bridge, rack of L2 switch- anything. We have a tool (Simics Model Builder) that helps with writing the model and assembling the platform. Customers can write models in any language (C, C++) for faster performance. Our customers typically use C and a descriptive language that we designed to help productivity called Device Modeling Language (DML).

ED: Simulation can be used for a variety of purposes from regression testing to experimentation with new features. Can you give a general breakdown of how your customers utilize Simics?

MG: Firmware, OS bring-up and driver developments certainly are the main use cases. Our virtual platform provides a better development solution than the real hardware. Test and Q&A code coverage also are very popular, especially in A&D, application debugging of any kind. This is due to Simics check pointing and reserve execution, and it is gaining increased traction. Configuration test (for Telco) is an application killer for us. In that segment, OEMs are challenged to test all possible networking configurations, and Simics provides a huge cost savings by allowing them to do it without any hardware, Lastly, support and training is getting more visible. It is now easier to share with your customer a virtual checkpoint, and it is very cool to run training virtually, where you combine your WebEx and virtual board farm. From a business point of view, what MontaVista did last year with their TestDrive is interesting as it represents a SaaS application for us. Independent of the use cases, (WRT development workflow) our customers find Simics a better, less costly value proposition than mitigation or waiting for hardware that is not yet available.

ED: What are the major components and tools associated with Simics?

MG: Simics (Fig. 1) http://www.virtutech.com/products/ is a flexible and scalable software solution that models electronic systems with high performance and fidelity. Simics provides the means for corporations to improve their product development lifecycle from bring-up to deployment.

Simics Key Capabilities:

  • A complete functional virtual platform with fidelity and performance
  • Runs unchanged binaries – drivers, BSP, software stack and applications
  • Make custom virtual platforms broadly available
  • Provides true reverse execution
  • Create scripts for hardware fault injection during testing
  • Supports single, multicore, multiple processor, and multiple machine configurations
  • Supports networks of arbitrary topology and networks of networks

From a packing point of view, we have 4 components:

  • Simics Hindsight
  • Simics Model Builder
  • Simics Ethernet Networking
  • Simics Virtual Platform

ED: What type of development environment does Simics provide and how does it integrate with other hardware and software development environments such as Eclipse and Visual Studio?

MG: Simics Hindsight is the cockpit environment for Simics. Simics integrates with Eclipse via Wind River Workbench or Freescale CodeWarrior, which will be part of Simics 3.4. We intend to deploy more Eclipse based solutions and have recently joined Eclipse (see news from 3/10/08).

ED: Simulations can be utilized by a range of users from developers to end users. What types of ease-of-use features does Simics provide to address different users of an end Simulation?

MG: Currently we are targeting developers, but we have seen some interest and design wins for more business solutions such as TestDrive for MontaVista with customers using Simics as virtual hardware infrastructure to do support or training.

ED: Simulation systems provide a platform for running applications but they can also be used to record information often using third party products or via the application itself. What type of facilities does Simics itself provide in this area?

MG: Yes indeed, customers use Simics for development, but can also use Simics for recording a snapshot of a virtual platform and its application (what we called a checkpoint). Through the Simics API you can script all commands (Python) and connect with any other applications.

ED: Simulations have advantages and disadvantages when it comes to debugging. Can you address this issue and highlight some of the things that are unique to Simics that developers can take advantage of.

MG: ED: Real-time application performance can be an issue depending upon the performance of the simulator. In some instances the simulation can actually be faster than the real device. Likewise, complex simulations can often reduce performance below real time execution compared to the actual device. How well does Simics perform for your customers and what are the tradeoffs they might have to deal with? MG: With Simics and a well designed simulation you can do what we call hyper simulation, this means you can skip ahead because the software is doing nothing or the hardware is waiting on “stuff” irrelevant for the execution of the software. We believe that for software development you don’t need cycle accuracy or timed models and that OSCI defines, in TLM2 with LT and UT you get what you need in most of the cases.

With that, you might need timed or cycle detail for either performance analysis or timing tuning. That is why we have developed the Hybrid technology where you will run the simulation in fast model, with a checkpoint, you can reverse execute and turn the cycle accurate model for zooming. You can do that by keeping in sync the two domains. The trade off is typically around the level of detail vs. speed, as opposed to how to support checkpoint and full determinism.

We concluded that Cycle Accurate models are not only difficult to develop, but extremely difficult to test and so close to the RTL and hardware design that the people best positioned to develop these models are the semi or IP provider, and not a third-party tools vendor. That is why instead of focusing on developing these models, we are focusing on the infrastructure necessary to enable a mixed and heterogeneous environment. A few years ago, the idea of a single model was being considered, and OSCI with TLM 1 could have contributed to that. Now, years later, the industry understands that it is not efficient and has decided to focus around interoperability between the models from different levels.

ED: Can Simics deal with complex systems that may link multiple simulations together?

MG: Yes. We have customers who have developed interfaces with Easy5, Simulinlk, and Matlab.

ED: Multicore is the wave of the future. What does simulation bring to the party and how Important will simulation be to multicore hardware and software development?

MG: If I want to emphasize only one advantage, I’ll say determinism. By design, hardware is not deterministic when you have multi-core; it makes the problem worse. \[It’s best\] to have a virtual platform where you can have full control over time, checkpointing and reverse execution, open a comprehensive development platform. On the top of that, if you include the hybrid, you will have access to a golden cycle accurate model from the semi. Now you have control over the time, and timing detail in one box.

ED: Does multicore bring anything to the table in terms of supporting a simulation environment? How is Virtutech taking advantage of multicore and cluster support?

MG: On the host side, this is what we are announcing with Simics 3.4 and the mm-on-mp (multi-threading). On the target side, it is the hybrid technology in concert with Freescale for the Power Architecture processor.

ED: Regression testing typically occurs later in many development cycles. How does simulation help and can it change when and how regression testing is used?

MG: When you have full control over everything, including time for the processor and devices level, you can inject faults, run script, and force any conditions and data. This can be performed without any hardware, so you can test unmodified prediction code without instrumentation) It’s very cool.

ED: Simics is used by a variety of users from developers to end users. What kinds of features does Simics have for deployment and management of deployed simulations? Are there particular features that can aid in feedback regarding bugs, performance and focus group response?

MG: Simics 3.4 with mm-on-mp is an example on how we managed deployed simulation. With 3.4 we are introducing additional performance and profiling tools (Fig. 2).

ED: Simics incorporates a number of tools and deployment systems. What kinds of licensing and cost issues do your customers have to consider?

MG: We offer subscription or perpetual licenses in addition to maintenance and support contracts. We typically have a large deployment of Simics licenses. If you aggregate and leverage these, the cost is about $15k per user.

ED: Simics is a fast simulation platform already but the latest version of Simics provides significant performance improvements. What types of improvements did this version include?

MG: Simics is already the fastest commercial functional simulation platform available (customers typically report that they benchmark us at 5-times faster than any competitor). Nevertheless, our customers in A&D, Telecommunication, and HPC want to deploy Simics and virtualization in even more use cases; therefore a performance and scalability boost are necessary. Currently, Simics 3.2 runs in a single thread. When we run a distributed simulation, from a Simics executable point of view, this is one thread in the host computer environment. Simics 3.2 doesn’t really leverage the multicore capability currently available in almost every laptop nor does it leverage efficiently multi-way servers.

Furthermore, Simics 3.4 supports multi-threads at the host computer level (what we called multi-machines on multi-processors aka mm-on-mp). Customers can design and architect simulation with threads to leverage each core, while Simics manages the communication between the threads. Simics 3.4 is currently in beta test with several customers and first rough benchmarks report a boost linear to the number of cores. For example, if you have a performance of 100 with Simics 3.2, you will have 50 with Simics 3.4 running in two cores on the host computer. This performance benefit is obvious in boot time (very critical in a lot of applications). Of even greater importance is the improvement and increase in product scalability. Customers can optimize their simulation based on the available computer and scheme that makes sense based on whatever they have—either a duo- or quad-core laptop, or a sixteen-ways server.

ED: How were the performance gains attained (i.e. general implementation techniques)?

MG: It is all about how you run the simulation in multi-core on the host because a virtual platform is eventually a collection of models glued together. The models need to be able to run using threads and have to be partitioned into something called simulation cells. Each cell is allowed to run in a separate host thread and communication between cells use thread safe mechanisms instead of standard interfaces to ensure correctness and determinism.

This is not without its challenges because dealing with multi threads requires the review of all API (so that the API can be threads safe) and from a scheduling point of view, you need to make sure that you keep the determinism. We overcome all these challenges, which is why we claim that we have the first full deterministic multi-threading functional simulator in the market.

ED: Simulation implementations can range from fine grain-electrical simulations to high-level functional simulations. Where does Simics fit in this spectrum and is it possible to adjust the granularity of the simulation or partition it to improve accuracy or to reduce runtime?

MG: Simics runs natively at a high level of abstraction. In the TLM2 scheme, we are at LT+. Natively we have no cycle-time information, but we have a virtual time that enables a true (from the software perspective) execution.

The beauty of virtual time is that you have complete control over the process, so you can skip ahead, or slow down etc. This is where Simics greatly supports better testing and Q&A as you can inject fault in any device or processor level. In June 2007, we announced with Freescale a hybrid mode to support a mix of timed models and untimed models for customers who need timing information, called the Simics Hybrid mode. With Simics 3.4 we also provide a sample of how to integrate Simics with unmodified SystemC models.

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.