Jump to content


jamal elhaitout

Recommended Posts

Hello Jamal,

The externalDeclarations attribute indicates that the include file contains content that is needed by other files:


For instance, I am setting externalDeclarations attribute to true for SystemC header files that define an sc_module. When such modules are instantiated in a SystemC netlist, the SystemC netlist file needs to include those header files because the classes derived from sc_module need to be known. Here is an example:

File ssd_creg_out.h contains:
class ssd_creg_out : public sc_module {
    ssd_creg_out(sc_module_name name);

File ssd_creg_out.xml contains:
        <spirit:isIncludeFile spirit:externalDeclarations="true">true</spirit:isIncludeFile>

IP-XACT design XML file contains:
            <spirit:componentRef spirit:vendor="nxp.com" spirit:library="ssd" spirit:name="ssd_creg_out" spirit:version="1.0"/>

SystemC netlist file contains:
#include "ssd_creg_out.h"  // this include is generated because externalDeclarations is true
class ssd_chip_creg : public sc_module
  // Constructor  
  ssd_chip_creg(sc_module_name module_name): sc_module(module_name)
    u0_creg_out = new ssd_creg_out("u0_creg_out");  // requires ssd_creg_out.h to be included

Best regards,



Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...