Knowledge Base Article

How can I connect hardware description language files (VHDL or Verilog) to an SOPC Builder system as an external black box component using the component editor?

Description

A simple way to “black box” a component in an SOPC Builder system is to export the Avalon interface signals through the SOPC Builder component editor.  Starting with Quartus® II 6.0, to save time entering signal names in the component editor, the component’s top-level HDL file can be used as an input source for the signal names in the SOPC Builder component editor.  The component’s top-level HDL file should have all the Avalon interface signals and other non-Avalon IO signals declared at the top-level entity. 

 

 

 

 

Resolution

Below are the steps to import signal names into the component editor from an HDL file:

 

1) Start the component editor from the “New Component …” (File) menu in the SOPC Builder window.

 

2) Move to the HDL Files tab and use the “Add HDL File” button to load the top-level component HDL file.

 

Once the component editor has finished analyzing the HDL file, the top level HDL signals have been imported to the Signals tab. 

 

3) After the HDL file has been analyzed, delete the HDL file from the HDL files list by selecting the HDL file and clicking on the “Remove File” button.

 

4) Click on the Signals tab to view the imported signals.

 

In the Signals tab, you can assign Interface and Avalon signal types to your component signals.  Each Avalon signal will generate a reverse-direction signal from the SOPC Builder system to connect to the external HDL module.  For the non-Avalon signals, assign them to “global_signals” interface and “export” signal type.  The non-Avalon signals are not needed to interface with the Avalon interface and are just placeholders (These non-Avalon signals will not show up in the symbol file or generated system HDL file).  You can optionally delete the non-Avalon signals from the signals list.

 

Hint: If you chose signal names for the HDL file that are similar to the default Avalon signal types, the component editor will try to automatically map the component signal names to the Avalon signal types.

 

Note: If you import another top-level HDL file in the Files tab, all the previous signals will be overwritten in the Signals tab with the new HDL file signals.  It may be simpler to edit the existing signal names in the component editor if you are making small Avalon signal changes.

 

5) Click on the Interfaces tab to set-up each Avalon port interface. 

 

If you have any unused interfaces, you can click on the “Remove Interface with No Signals” to remove them from the component.

 

6) Click on the Component Wizard tab to assign the Component Name and Component Group.

 

7) Click on the Finish button to finish creating your component.

 

8) Click on Yes to save your component.

Updated 2 months ago
Version 2.0
No CommentsBe the first to comment