5.5.4. DMA example

This example, shown in Figure 5.7, is a modified version of the PV example from the OSCI TLM 2.0 package.

The Cortex R4 programs a transfer and waits for an interrupt signaled by the PV DMA from the SystemC side to indicate the transfer is complete.

The Fast Models system contains the following components:

The SystemC side contains:

The project file is $PVLIB_HOME/examples/SystemCExport/DMA/Build/DMA.sgproj.

Figure 5.7. DMA system example

DMA system example

Building the example with Linux

To build the debug version of the example, enter the following at the command line:

cd $PVLIB_HOME/examples/SystemCExport/DMA/Build
make DEBUG=y clean all

To build the release version of the example, enter the following at the command line:

cd $PVLIB_HOME/examples/SystemCExport/DMA/Build
make DEBUG=n clean all

Note

The make clean command is optional. If used, the model is completely rebuilt.

Building the example with Windows

To build the debug version of the example, enter the following at the command line:

cd %PVLIB_HOME%\examples\SystemCExport\DMA\Build
build_Windows-Debug-vc_version.bat

where vc_version is either VC2005 or VC2008 as appropriate to select the batch file that corresponds to the Windows compiler being used.

To build the release version of the example, enter the following at the command line:

cd %PVLIB_HOME%\examples\SystemCExport\DMA\Build
build_Windows-Release-vc_version.bat

where vc_version is either VC2005 or VC2008 as appropriate to select the batch file that corresponds to the Windows compiler being used.

Running the example

To run the example under Linux, enter the following at the command line:

./run.sh

To run the example under Windows, enter the following at the command line:

run.bat
Copyright © 2007-2009 ARM Limited. All rights reserved.ARM DUI 0370H
Non-Confidential