PROGRAMMER'S GUIDEDSP I / F library
■ | Advance
DSP I / F library

1. 1. guide


1.1 Purpose

The purpose of this library is to provide an interface for DSP program control.

1.2 Overview

This library provides the following interfaces.

The outline of each [Function] is explained below.

1.3 Functional overview

● Program load
Transfer the DSP program stored in the work RAM to the DSP program RAM.

● Data light
Transfers DSP program data (parameters) stored in work RAM, etc. to DSP data RAM.

● Data read
DSP data Reads RAM data (execution results, etc.).

● Start execution
Set the program counter and start executing the DSP program.

● Stop execution
Stops the execution of the DSP program.

● Execution end check
Checks whether the execution of the DSP program has ended.

1.4 Calling sequence

The calling sequence from program loading to obtaining the execution result is shown below.

void GoDsp ()
{
          Uint32 dsp_result [10]; / * DSP result storage variable * /

          DSP_WriteData (DSP_RAM_1 | 0, (Uint32 *) 0x6050000, 15);
               / * Transfer data from the work RAM to RAM 1 of the DSP data RAM 15 times * /
          DSP_LoadProgram (0, (Uint32 *) 0x6050100, 256);
               / * Transfer data from work RAM to DSP program RAM 256 times * /
          DSP_Start (0);
               / * Run the DSP program from 0x00 * /
          while (DSP_CheckEnd (& dsp_status) == DSP_NOT_END);
               / * Loop until finished * /
          DSP_ReadData (dsp_result, DSP_RAM_2 | 0, 10);
               / * Transfer data 10 times from RAM2 of DSP data RAM to DSP result storage variable * /
     ......
}

■ | Advance
PROGRAMMER'S GUIDEDSP I / F library
Copyright SEGA ENTERPRISES, LTD., 1997