Return to previous page Advance to next page

Black Box Support

Your design may contain EDIF or NGC files generated by synthesis tools, schematic editors or any other design entry mechanism. These modules must be instantiated in your code to be connected to the rest of your design. You can do this in XST by using black box instantiation in the VHDL/Verilog code. The netlist is propagated to the final
top-level netlist without being processed by XST. Moreover, XST enables you to attach specific constraints to these black box instantiations, which are passed to the NGC file.

In addition, you may have a design block for which you have an RTL model, as well as your own implementation of this block in the form of an EDIF netlist. The RTL model is only valid for simulation purposes, but by using the BOX_TYPE constraint you can direct XST to skip synthesis of this RTL code and create a black box. The EDIF netlist is linked to the synthesized design during NGDBuild. Please see "General Constraints" in Chapter 5 for more information. Also see the Constraints Guide for details.

Note: Remember that once you make a design a black box, each instance of that design is a black box. While you can attach constraints to the instance, XST ignores any constraint attached to the original design.

Log File

From the flow point of view, the recognition of black boxes in XST is done before the macro inference process. Therefore the LOG file differs from the one generated for other macros.

...
Analyzing Entity <black_b> (Architecture <archi>).
 WARNING:Xst:766 - black_box_1.vhd (Line 15). Generating a Black Box for component <my_block>.
 Entity <black_b> analyzed. Unit <black_b> generated
....

Related Constraints

XST has a BOX_TYPE constraint that can be applied to black boxes. However, it was introduced essentially for Virtex Primitive instantiation in XST. Please read "Virtex Primitive Support" in Chapter 3 in before using this constraint.

VHDL Code

Following is the VHDL code for a black box.

These coding examples are accurate as of the date of publication. You can download any updates to these examples from ftp://ftp.xilinx.com/pub/documentation/misc/examples_v7.zip

.

-- -- Black Box -- library ieee; use ieee.std_logic_1164.all; entity black_box_1 is port(DI_1, DI_2 : in std_logic; DOUT : out std_logic); end black_box_1; architecture archi of black_box_1 is component my_block port (I1 : in std_logic; I2 : in std_logic; O : out std_logic); end component; begin inst: my_block port map (I1=>DI_1,I2=>DI_2,O=>DOUT); end archi; .

Verilog Code

Following is the Verilog code for a black box.

These coding examples are accurate as of the date of publication. You can download any updates to these examples from ftp://ftp.xilinx.com/pub/documentation/misc/examples_v7.zip.


// // Black Box // module v_my_block (in1, in2, dout); input in1, in2; output dout; endmodule module v_black_box_1 (DI_1, DI_2, DOUT); input DI_1, DI_2; output DOUT; v_my_block inst ( .in1(DI_1), .in2(DI_2), .dout(DOUT)); endmodule .

Note: Please refer to the VHDL/Verilog language reference manuals for more information on component instantiation.

Return to previous page Advance to next page

www.xilinx.com