This chapter gives a short overview of the process of updating code and scripts
from any older Simics version to the most recent one. The following chapters, on
the other hand, contain version specific descriptions.
It is assumed that the migration is from Simics 6, the supported Simics version
at the time of the Simics 7 release.
- First make sure that any C/C++, DML and Python modules compile with the most
recent API in the version of Simics that you are migrating from. In Simics
6, set
SIMICS_API to 6 in the module Makefile. If the code does not
compile cleanly, consult the Migration Guide for that Simics version.
- Update Python modules to the most recent API in the version of Simics that
you are migrating from. This can be done by importing the Simics API using a
specified version:
import simics_6_api as simics
This will simplify the migration of code to a newer version of Simics later.
Please note that you’ll need to import modules and components after this.
from simics import example
- Run all scripts in Simics with the
-wdeprecated command line flag to the
Simics binary. This will catch uses of some deprecated features that can
only be detected at run-time. An alternative is to set the
sim→deprecation_level attribute to 2.
- When all modules and scripts run fine using the most recent API in the old
version of Simics, it is time to migrate to Simics 7. Update the existing
project to point to a Simics 7 installation or, even better, create a new
project for Simics 7 development, since the old project may be needed for
comparison purposes.
- Build all modules using the API version corresponding to the Simics version
that you are migrating from. This should simply be a recompilation, since
the old API version is already selected in the Makefiles and Python source
files.
- In a few cases there are API changes that the pre-processor cannot hide.
They may cause the build to fail even when an old API is selected. Use the
table in chapter 7 to figure out what changes are
necessary.
- Run all your tests and scripts to ensure that everything works in Simics 7
when using the old API. Make sure to pass
-no-wdeprecated to suppress
deprecation warnings in the process. Once everything works, you can start
using the new version of Simics for actual work. The following steps are
optional at this point, but still strongly recommended.
- Change the API used for modules and scripts to the most recent version, one
module or script at a time. Update the code according to the following
chapters.
- Turn off the
-no-wdeprecated flag when running tests and scripts. Update
any code that yields deprecation warnings according to the following
chapters.