Joachim Schlosser: Development and Verification of fast C/C++ Simulation Models for the Star12 Microcontroller
The section headlines will be similar to those in the OMI discussion to retain the way of contemplation.
One of the first properties mentioned was the way of delivery of the models and model managers. With Octopus, models are always delivered to the end user as a unit together with the model manager as a shared library on Solaris or as a dynamically linked library on Windows. Although it is theoretically possible to dynamically include models, Octopus does not cover this in respect of any dynamic library handling. The common process is to link Octopus with all models needed for a particular system, and give the end result away as a product.
Of course the implementation is much more interesting than the way of delivery, so next thing to review is the way of bootstrapping Octopus. There is no bootstrap file, as it was considered to be packaged together with the model manager. This fact is quite obvious, because there is no OMI compliant application reading and interpreting the bootstrap file, so why generate one. The adaptation to the application is made within the library, and the adaptation layer of course knows what to do. A further discussion on bootstrapping and elaboration will follow in section 2.4.4.3 on page 162.
Very important in the OMI are the model boundary class and the simulation style, the applications using Octopus have to support. The answer is simple but as well dissatisfying: The requirements totally depend on the adaptation layer. The Octopus simulator interface supports applications with unrestricted model boundary class and an event-driven simulation style. But the adaptation layer – actually being on the application side – can convert semantics and data to any of the other model boundary classes, too. The same applies to the simulation style. An application, only capable of cycle-based simulation, can invoke its calls to the adaptation layer and this will care for pending events and in unused cycles simply do nothing.
Another interesting piece of information is the type concept of Octopus, the way information is stored and processed. Referring to the OMI standard, the three basic terms for model boundary classes are port, parameter and viewport. The port concept is implemented using the same term – port. Octopus port can be used not only for internal interaction of models, but also for communication between Octopus and the application. For data retrieval and manipulation usually ports are used, the implementation for this is a subject of section 0. A parameter, used for tailoring model instances, is realized availing configurable models. A user-defined structure can be passed to a model at creation time. The particular model delimits the amount of adaptability by defining the structure. This will be shown in practical experience with two models in sections 3.1.2 on page 174 and 3.1.3 on page 191. The Octopus feature named backdoor register access implements the third basic term, viewport, not literally but conceptual, allowing the application to get a module’s register contents without performing a normal access that may produce side effects.
An implementation for root object and library objects is missing, but again, this would be useful only for an OMI application. The counterpart for the model object is the structure motModelEntryT, which contains properties for name, timing information and type as well as relationships for model manager commands and addresses of the callback functions. The model instance object is included in the structure; important for this is the relationship to the parameter object named ConfigInfo, which holds the actual model parameters.
For performance reasons, Octopus does not use a class-oriented data type system, as invented with the OMI Information Model. Anyhow, there are some structure definitions, e. g. motPortT for the definition of ports, specifying name, direction, sensitivity and initial type-token combination. Another structure definition is the motSignalDefinitionT type. It specifies signal properties, especially of signals that are connected externally. Although Octopus defines several types for e. g. port directions, debug print type, reset type, it does not inherit any data object classes. Many types are enumerations to make the numbers they hide more readable.
Timing definitions are provided not in standard delay format (SDF), but on a model base using the motClockEntryT structure type. It describes the correlation of model timing and the global clock in respect of multiplier, offset, times to wake up and power off, an own clock rate; or even to define the model as clock-less. There are some macros that allow a more easy configuration of models that fall in one of the four subsequent categories.
There are no special implementations for array types or records, the common C programming language constructs are used for these.
This section will go through the five stages, introduced in section 2.2.3 on page 102: Bootstrap, elaboration, initialization, simulation and termination.
For each stage the OMI standard will be compared with the actual Octopus implementation. Some of the appropriate callbacks for the particular stages will be mentioned, without going too much into interaction details.