Black Box VHDL Library Support - Black Box VHDL Library Support - 2026.1 English - UG1483

Vitis Model Composer User Guide (UG1483)

Document ID
UG1483
Release Date
2026-06-23
Version
2026.1 English

This Black Box feature allows you to import VHDL modules that have predefined library dependencies. The following example shows how to do this import.

The VHDL module below is a 4-bit, Up counter with asynchronous clear (async_counter.vhd). It compiles into a library named async_counter_lib.

Figure 1. 4-bit, Up Counter with Asynchronous Clear
Generated by Your Tool

The VHDL module below is a 4-bit, Up counter with synchronous clear (sync_counter.vhd). The module is compiled into a library named sync_counter_lib.

Figure 2. 4-bit, Up Counter with Synchronous Clear
Generated by Your Tool

The VHDL module below is the top-level module that instantiates the previous modules. This is the module that you need to point to when adding the Black Box into your Model Composer model.

Figure 3. Top-level Module
Generated by Your Tool

The VHDL imports by first importing the top-level entity, top_level, using the Black Box.

After importing the file, you need to modify the associated Black Box Configuration M-file as follows:

Figure 4. Black Box Configuration M-file
Generated by Your Tool

The interface function addFileToLibrary specifies a library name other than “work” and instructs the tool to compile the associated HDL source to the specified library.

The Model Composer model looks similar to the following figure.

Figure 5. Model Composer Model with Black Box Support
Generated by Your Tool

The next step is to double-click the Model Composer Hub block and click the Generate button to generate the HDL netlist.

The generation process creats a Vivado IDE project (.xpr). This is placed with the hdl_netlist folder under the netlist folder. Double-click the Vivado IDE project and select the Libraries tab under the Source view to display the work library. This also displays an async_counter_lib and sync_counter_lib library.