User guide

System Generator for DSP User Guide www.xilinx.com 331
UG640 (v 12.2) July 23, 2010
Black Box Configuration M-Function
Copy a black box into a Simulink library or model;
Break the link on the black box;
Add the desired parameters to the black box dialog box.
Error Checking
It is often necessary to perform error checking on the port types, rates, and mask
parameters of a black box. SysgenBlockDescriptor provides a method, setError, which
allows you to specify an error message that is reported to the user. The string parameter
passed to setError is the error message that is seen by user.
Black Box API
SysgenBlockDescriptor Member Variables
Type Member Description
String entityName Name of the entity or module.
String blockName Name of the black box block.
Integer numSimulinkInports Number of input ports on black box.
Integer numSimulinkOutports Number of output ports on the black
box.
Boolean inputTypesKnown true if all input types are defined, and
false otherwise.
Boolean inputRatesKnown true if all input rates are defined, and
false otherwise.
Array of
Doubles
inputRates Array of sample periods for the input
ports (indexed as in inport(indx)).
Sample period values are expressed as
integer multiples of the Simulink
System Period value specified by the
master System Generator block
Boolean error true if an error has been detected, and
false otherwise.
Cell Array of
Strings
errorMessages Array of all error messages for this
block.