|
1 <?xml version="1.0" encoding="utf-8"?> |
|
2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. --> |
|
3 <!-- This component and the accompanying materials are made available under the terms of the License |
|
4 "Eclipse Public License v1.0" which accompanies this distribution, |
|
5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". --> |
|
6 <!-- Initial Contributors: |
|
7 Nokia Corporation - initial contribution. |
|
8 Contributors: |
|
9 --> |
|
10 <!DOCTYPE concept |
|
11 PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
|
12 <concept id="GUID-984C2A0D-36BE-5A99-9D65-3F8791C669FF" xml:lang="en"><title>ASSP/Variant Architecture</title><shortdesc>A base port must provide a software layer called the ASSP/Variant.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody> |
|
13 <p>The ASSP/Variant layer provides two main functions. First, it implements |
|
14 a small number of hardware-specific functions that are used by the |
|
15 Kernel. Second, it implements common peripheral control functions |
|
16 that other extensions and device drivers can use. </p> |
|
17 <p id="GUID-95C34114-F986-5428-9D40-5CF64429CDBD"> The most important |
|
18 of these functions is interrupt dispatching. During initialisation |
|
19 the ASSP/Variant must specify a dispatch function to be called for |
|
20 all hardware interrupts. </p> |
|
21 <p>In general, the ASSP/Variant provides control functions for hardware |
|
22 which is shared between multiple devices. For example it is often |
|
23 not possible to do a read-modify-write on a GPIO port in order to |
|
24 change the state of an individual output line. This may be either |
|
25 because an output port register is write-only or because reading the |
|
26 port register reads the actual logic levels on the pins, not the last |
|
27 value written to the register, and the pin level typically lags the |
|
28 written value due to capacitive loading. In this case, the ASSP/Variant |
|
29 could provide a function to set and clear individual port bits, keeping |
|
30 a RAM copy of the last value written to the port register. </p> |
|
31 <p>The simplest implementation is put all the code in a single DLL, |
|
32 called the Variant DLL (<filepath>ecust.dll</filepath>). For hardware |
|
33 architectures based on an ASSP, you can allow multiple types of phones |
|
34 that use the same ASSP to share the common code. To do this, the common |
|
35 ASSP code is implemented in a kernel extension, and the Variant DLL |
|
36 implements the code that is specific to the phone type. </p> |
|
37 <fig id="GUID-A42AFED6-372D-54A3-BC9D-FA99725464EF"> |
|
38 <image href="GUID-71271D1C-C385-5687-8A90-46E8B590BB1E_d0e1517_href.png" placement="inline"/> |
|
39 </fig> |
|
40 <p>In the Base Porting Guide, we refer to the ASSP layer and the Variant |
|
41 Layer, where the ASSP layer contains the source code tailored to a |
|
42 range of different microprocessors (e.g. ARM720/920/SA1/Xscale), and |
|
43 the Variant layer contains the source code associated with off-chip |
|
44 hardware (same CPU, different peripherals). </p> |
|
45 <p>For example, the standard Symbian port for the template reference |
|
46 board is split into a core layer (in directory <filepath>...\template_assp\...</filepath>) and code specific to the template board (in directory <filepath>...\template_variant\...</filepath>). The <filepath>.mmp</filepath> file for the ASSP layer is <filepath>...\template_assp\katemplate.mmp</filepath>, and the <filepath>.mmp</filepath> file for the Variant layer is <filepath>...\template_variant\vtemplate.mmp</filepath>. </p> |
|
47 <section id="GUID-C05E021D-6DD6-5169-947B-192026A4364F"><title>The |
|
48 Asic class</title> <p>The heart of the ASSP/Variant is the <xref href="GUID-A83A7C3C-7DC0-3B9C-842F-70FCC751365D.dita"><apiname>Asic</apiname></xref> class, defined in <filepath>..\e32\include\kernel\arm\assp.h</filepath>. This is a class that contains a number of pure virtual functions |
|
49 that must be implemented. </p> <p>Where there is an ASSP/Variant split, |
|
50 the ASSP layer should derive a concrete implementation from the <xref href="GUID-A83A7C3C-7DC0-3B9C-842F-70FCC751365D.dita"><apiname>Asic</apiname></xref> class. The most convenient way of implementing the |
|
51 Variant layer is to further derive from this ASSP class. Only the |
|
52 Variant DLL is declared as ‘variant’ in the ROM – the ASSP is declared |
|
53 as an extension. If there is no ASSP/Variant split, then the Variant |
|
54 is simply a concrete implementation of the <xref href="GUID-A83A7C3C-7DC0-3B9C-842F-70FCC751365D.dita"><apiname>Asic</apiname></xref> class. </p> <p>The ASSP layer can, itself, define additional functions |
|
55 to be implemented in the Variant layer. For example, the ASSP layer |
|
56 defines the pure virtual function <codeph>VideoRamSize()</codeph> which |
|
57 the Variant layer provides to map the video frame buffer. </p> <p>The template reference board port has the ASSP/Variant split. The |
|
58 ASSP layer is implemented by the <codeph>TemplateAssp</codeph> class, |
|
59 and the Variant layer is implemented by the <codeph>Template</codeph> class. </p> <p>For reference: the template port ASSP layer implementation's <filepath>.mmp</filepath> file is at <filepath>...\template_assp\katemplate.mmp</filepath>, and the Variant layer implementation's <filepath>.mmp</filepath> file is at <filepath>...\template_variant\vtemplate.mmp</filepath>. </p> <p>Note that one of the source files that forms the ASSP layer |
|
60 must have the <codeph>DECLARE_STANDARD_ASSP()</codeph> declaration. |
|
61 See <filepath>...\template_assp\assp.cpp</filepath>. </p> </section> |
|
62 </conbody><related-links> |
|
63 <link href="GUID-E0DCBDCF-C056-53E5-A375-778327F848E4.dita"><linktext>Asic |
|
64 Class Tutorial</linktext></link> |
|
65 </related-links></concept> |