29.11.2014 Views

Fast Models Reference Manual - ARM Information Center

Fast Models Reference Manual - ARM Information Center

Fast Models Reference Manual - ARM Information Center

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Peripheral and Interface Components<br />

5.9.2 Responsibilities of the SCADI caller<br />

Synchronous interface means that the caller of SCADI functions is always responsible for<br />

ensuring that the simulation is in a stable state. Being in a stable state means that the simulation<br />

does not advance while the call is being made. The caller is also responsible for meeting all host<br />

thread and synchronization requirements of any external bus slaves that are directly or indirectly<br />

connected to the memory bus.<br />

5.9.3 Obtaining the SCADI interface<br />

You can obtain the SCADI interface from the same CAInterface pointers that are used to obtain<br />

the CADI and the MTI interfaces. This is done using the CAInterface::ObtainInterface()<br />

method. The interface names for the normal CADI and MTI interfaces are CADI::IFNAME() and<br />

ComponentTraceInterface::IFNAME() respectively.<br />

The interface name for the SCADI interface to be passed into ObtainInterface() is<br />

“eslapi.SCADI2”, the interface revision is 0. There are no IFNAME() and IFREVISION() static<br />

functions defined for SCADI, and a plain string constant and integer constant (0) has to be used<br />

instead.<br />

The pointer returned by CAInterface::ObtainInterface("eslapi.SCADI2") must be cast into an<br />

eslapi::CADI class pointer, that is, the same class as for eslapi.CADI2, the normal CADI interface<br />

class.<br />

Access to SCADI from within LISA components<br />

To get access to the SCADI interface of the LISA component itself you can use the getSCADI()<br />

function. This returns the SCADI interface of the LISA component itself. To get access to the<br />

SCADI interfaces of other components in the system, you can use the getGlobalInterface()<br />

function. This returns a CAInteraface pointer. You then have to use the ObtainInterface()<br />

function on that pointer to obtain the SystemTraceInterface. This interface provides a list of all<br />

components in the system which provide trace data. This list can also be used to gain access to<br />

the SCADI interfaces of all these components. See Example code.<br />

Access to SCADI from within System C<br />

Access to the SCADI interfaces from within a System C system work similar to the LISA<br />

components: The generated System C platform (the generated System C wrapper around the<br />

<strong>Fast</strong> Model subsystem) provides a getGlobalInterface() function which returns a CAInterface<br />

pointer. This can be used to retrieve the SCADI interfaces in the same way as in the LISA case.<br />

See Example code.<br />

Access to SCADI from MTI plugins<br />

MTI plugins can gain access to SCADI interfaces by using the CAInterface pointer, which is<br />

passed as a parameter to the RegisterSimulation() function. This pointer has the same semantics<br />

as the CAInterface pointer returned by the getGlobalInterface() functions in the System C or<br />

LISA use cases.<br />

Example code<br />

This example code demonstrates how to use getGlobalInterface() to retrieve a SCADI interface<br />

pointer of a specific component. From LISA it is getGlobalInterface(), from within System C<br />

it is assumed that you have a pointer to the <strong>Fast</strong> <strong>Models</strong> platform called platform. From within<br />

a MTI plug-in you do not have to call getGlobalInterface(), and you can use the CAInterface<br />

pointer passed to RegisterSimulation().<br />

<strong>ARM</strong> DUI 0423J Copyright © 2008-2011 <strong>ARM</strong>. All rights reserved. 5-168<br />

ID051811<br />

Non-Confidential

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!