User guide

324 www.xilinx.com System Generator for DSP User Guide
UG640 (v 12.2) July 23, 2010
Chapter 4: Importing HDL Modules
After searching the model's directory for .vhd and .v files, the Configuration Wizard
opens a new window that lists the possible files that can be imported. An example
screenshot is shown below:
You can select the file you would like to import by selecting the file, and then pressing the
Open button. At this point, the configuration wizard generates a configuration M-function
and associates it with the black box block.
Note:
The configuration M-function is saved in the model's directory as <module>_config.m,
where <module> is the name of the module that you are importing.
Configuration Wizard Fine Points
The configuration wizard automatically extracts certain information from the imported
module when it is run, but some things must be specified by hand. These things are
described below:
Note:
The configuration function is annotated with comments that instruct you where to make these
changes.
If your model has a combinational path, you must call the tagAsCombinational
method of the block's SysgenBlockDescriptor object.
The Configuration Wizard only knows about the top-level entity that is being
imported. There are typically other files that go along with this entity. These files must
be added manually in the configuration M-function by invoking the addFile method
for each additional file.
The Configuration Wizard creates a single-rate black box. This means that every port
on the black box runs at the same rate. In most cases, this is acceptable. You may want
to explicitly set port rates, which can result in a faster simulation time.
Black Box Configuration M-Function
An imported module is represented in System Generator by a Black Box block. Information
about the imported module is conveyed to the black box by a configuration M-function.
This function defines the interface, implementation, and the simulation behavior of the
black box block it is associated with. More specifically, the information a configuration M-
function defines includes the following:
Name of the top-level entity for the module;
VHDL or Verilog language selection;