General Description: When creating an HDL macro within a schematic project in Foundation F1.5i or 2.1i, there is no way to refer to other HDL files. Therefore, module compilation cannot refer to lower levels of HDL hierarchy, nor can a VHDL file refer to a VHDL user-created library.
All HDL modules must be entirely contained in one HDL file.
When attempting to create an HDL macro, synthesis will fail with errors. Here is a way to work around this limitation:
1. After the macro generation has failed, open the Windows Explorer to your project directory. You will see a directory called dpmcomp.tmp. Descend into this directory and double-click on dmpcomp.tmp.exp. This will open the standalone FPGA Express GUI with the correct project loaded.
2. Use the standalone GUI to add any required HDL files. Right click on the existing HDL file on the left hand side to select New Library. Give it the appropriate name and add your library VHDL files to this library.
For lower levels of hierarchy, simply add these files to this project.
3. After all the necessary files have been added, right click on the macro (top-level) HDL file and select Update File to verify that everything checks out. Then, select its entity and Synthesize. Be sure to select the correct Xilinx device and check the "Do not insert I/O Pads" option.
Then write the XNF file to your Foundation project directory.
4. Open the schematic editor and select Hierarchy -> Create Macro Symbol from Netlist. Choose the recently created XNF file and click Open. This will build a symbol and a simulation file for this project's library.
Remember, because this macro was created outside the Foundation environment, Foundation will not be able to automatically update it after changes to the HDL file(s) have been made. You will need to re-synthesize the code (use the Update command), re-write the XNF file, and re-import that XNF into Foundation.