ASSP/Variant Architecture

A base port must provide a software layer called the ASSP/Variant.

The ASSP/Variant layer provides two main functions. First, it implements a small number of hardware-specific functions that are used by the Kernel. Second, it implements common peripheral control functions that other extensions and device drivers can use.

The most important of these functions is interrupt dispatching. During initialisation the ASSP/Variant must specify a dispatch function to be called for all hardware interrupts.

In general, the ASSP/Variant provides control functions for hardware which is shared between multiple devices. For example it is often not possible to do a read-modify-write on a GPIO port in order to change the state of an individual output line. This may be either because an output port register is write-only or because reading the port register reads the actual logic levels on the pins, not the last value written to the register, and the pin level typically lags the written value due to capacitive loading. In this case, the ASSP/Variant could provide a function to set and clear individual port bits, keeping a RAM copy of the last value written to the port register.

The simplest implementation is put all the code in a single DLL, called the Variant DLL (ecust.dll). For hardware architectures based on an ASSP, you can allow multiple types of phones that use the same ASSP to share the common code. To do this, the common ASSP code is implemented in a kernel extension, and the Variant DLL implements the code that is specific to the phone type.

In the Base Porting Guide, we refer to the ASSP layer and the Variant Layer, where the ASSP layer contains the source code tailored to a range of different microprocessors (e.g. ARM720/920/SA1/Xscale), and the Variant layer contains the source code associated with off-chip hardware (same CPU, different peripherals).

For example, the standard Symbian port for the template reference board is split into a core layer (in directory ...\template_assp\...) and code specific to the template board (in directory ...\template_variant\...). The .mmp file for the ASSP layer is ...\template_assp\katemplate.mmp, and the .mmp file for the Variant layer is ...\template_variant\vtemplate.mmp.

The Asic class

The heart of the ASSP/Variant is the Asic class, defined in ..\e32\include\kernel\arm\assp.h. This is a class that contains a number of pure virtual functions that must be implemented.

Where there is an ASSP/Variant split, the ASSP layer should derive a concrete implementation from the Asic class. The most convenient way of implementing the Variant layer is to further derive from this ASSP class. Only the Variant DLL is declared as ‘variant’ in the ROM – the ASSP is declared as an extension. If there is no ASSP/Variant split, then the Variant is simply a concrete implementation of the Asic class.

The ASSP layer can, itself, define additional functions to be implemented in the Variant layer. For example, the ASSP layer defines the pure virtual function VideoRamSize() which the Variant layer provides to map the video frame buffer.

The template reference board port has the ASSP/Variant split. The ASSP layer is implemented by the TemplateAssp class, and the Variant layer is implemented by the Template class.

For reference: the template port ASSP layer implementation's .mmp file is at ...\template_assp\katemplate.mmp, and the Variant layer implementation's .mmp file is at ...\template_variant\vtemplate.mmp.

Note that one of the source files that forms the ASSP layer must have the DECLARE_STANDARD_ASSP() declaration. See ...\template_assp\assp.cpp.