IPTR-DSPBUILDER Altera, IPTR-DSPBUILDER Datasheet - Page 139

DSP BUILDER SOFTWARE

IPTR-DSPBUILDER

Manufacturer Part Number
IPTR-DSPBUILDER
Description
DSP BUILDER SOFTWARE
Manufacturer
Altera
Type
DSPr
Datasheets

Specifications of IPTR-DSPBUILDER

Function
DSP Builder
License
Renewal License
Software Application
IP CORE, DSP BUILDER
Core Architecture
FPGA
Core Sub-architecture
Arria, Cyclone, Stratix
Supported Families
Arria GX, Arria II GX, Cyclone, Stratix
Rohs Compliant
NA
Lead Free Status / RoHS Status
Not applicable / Not applicable
Chapter 8: Using Black Boxes for HDL Subsystems
Subsystem Builder Design Example
© June 2010 Altera Corporation
6. Scroll down in the Sfir8tap.CPP file to the S-function methods section.
The following code shows the Simulink C++ S-Mex function code that designs a
Simulink filter simulation model:
/*====================*
* S-function methods *
*====================*/
/* Function: mdlInitializeSizes=======================================
* Abstract:
* The sizes information is used by Simulink to determine the S-function
* block's characteristics (number of inputs, outputs, states, etc.).
*/
static void mdlInitializeSizes(SimStruct *S)
{
1
/* See sfuntmpl.doc for more details on the macros below */
ssSetNumSFcnParams(S, 9);
if (ssGetNumSFcnParams(S) != ssGetSFcnParamsCount(S)) {
/* Return if number of expected != number of actual parameters */
}
// Set DialogParameters not tunable
const int iMaxssGetSFcnParamsCount = ssGetSFcnParamsCount(S);
for (int p=0;p<iMaxssGetSFcnParamsCount;p++)
{
}
if (!ssSetNumInputPorts(S, 1)) return;
ssSetInputPortWidth(S, 0, 1);
ssSetInputPortDataType(S,
if (!ssSetNumOutputPorts(S, 1)) return;
ssSetOutputPortWidth(S, 0, 1);
ssSetOutputPortDataType(S, 0, SS_DOUBLE);
ssSetNumContStates(S, 0);
ssSetNumDiscStates(S, 1);
ssSetNumSampleTimes(S, 1);
ssSetNumRWork(S, 0);
ssSetNumIWork(S, 0);
ssSetNumDWork(S, DYNAMICALLY_SIZED); // reserve element in the
ssSetNumModes(S, 0);
return;
ssSetSFcnParamTunable(S, p,
If the code does not appear automatically, click Browse and select the
Sfir8tap.CPP file.
Preliminary
// pointers vector to store a C++ object
/* Number of expected parameters */
0, SS_DOUBLE);
0);
DSP Builder Standard Blockset User Guide
8–9

Related parts for IPTR-DSPBUILDER