In Vitis Model Composer, a Black Box block represents an imported module. A configuration M-function provides the Black Box block with information about the imported module. This function defines the interface, implementation, and simulation behavior of the associated Black Box block. The information a configuration M-function defines includes the following:
- Name of the top-level entity for the module
- VHDL or Verilog language selection
- Port descriptions
- Generics required by the module
- Synchronous single clock or asynchronous multiple independent clock configuration
- Clocking and sample rates
- Files associated with the module
- Whether the module has any combinational paths
You specify the name of the configuration M-function associated with a black box as a parameter in the dialog box (parity_block_config.m).
Configuration M-functions use an object-based interface
to specify black box information. This interface defines two
objects: SysgenBlockDescriptor
and SysgenPortDescriptor. When
Model Composer invokes a configuration M-function, it passes the
function a block descriptor:
function sample_block_config(this_block)
A SysgenBlockDescriptor
object provides methods for specifying information about the
black box. Port descriptors define each port on a block
descriptor separately.