User guide
System Generator for DSP User Guide www.xilinx.com 333
UG640 (v 12.2) July 23, 2010
Black Box Configuration M-Function
addGeneric(identifier, value) Defines a generic (or parameter if using Verilog) for
the block. identifier is a string that tells the name of
the generic. value can be a double or a string. The
type of the generic is inferred from value's type. If
value is an integral double, e.g., 4.0, the type of the
generic is set to integer. For a non-integral double,
the type is set to real. When value is a string
containing only zeros and ones, e.g., `0101', the type
is set to bit_vector. For any other string value the
type is set to string.
addGeneric(identifier, type, value) Explicitly specifies the name, type, and value for a
generic (or parameter if using Verilog) for the block.
All three arguments are strings. identifier tells the
name, type tells the type, and value tells the value.
addFile(fn) Adds a file name to the list of files associated to this
black box. fn is the file name. Ordinarily, HDL files
are associated to black boxes, but any sorts of files
are acceptable. VHDL (respectively, Verilog) file
names should end in .vhd (resp., .v). The order in
which file names are added is preserved, and
becomes the order in which HDL files are compiled.
File names can be absolute or relative. Relative file
names are interpreted with respect to the location of
the .mdl or library .mdl for the design.
getDeviceFamilyName() Gets the name of the FPGA device corresponding to
the Blackbox.
getConfigPhaseString Returns the current configuration phase as a string.
A valid return string includes: config_interface,
config_rate_and_type, config_post_rate_and_type,
config_simulation, config_netlist_interface and
config_netlist.
setSimulatorCompilationScript
(script)
Overrides the default HDL co-simulation
compilation script that the black box generates.
script tells the name of the script to use. This method
can, for example, be used to short-circuit the
compilation phase for repeated simulations where
the HDL for the black box remains unchanged.
setError(message) Indicates that an error has occurred, and records the
error message. message gives the error message.
Method Description