Jump to content

Error: SystemC-AMS: A sca_tdf::sca_module ( dut ) can't have child: sca_tdf::sca_module( dut.sine ) see LRM clause 4.1 In file: sca_module.cpp:354


Recommended Posts

Hi can somebody help me with this error? 

Error: SystemC-AMS: A sca_tdf::sca_module ( dut ) can't have child: sca_tdf::sca_module( dut.sine )  see LRM clause 4.1
In file: sca_module.cpp:354

 

SCA_TDF_MODULE(bask_mod)
{

//-----------------------------------------------------------------------------
// Ports
//-----------------------------------------------------------------------------
         sca_tdf::sca_in<bool> in;
         sca_tdf::sca_out<double> out;
//-----------------------------------------------------------------------------
// Instantiations
//-----------------------------------------------------------------------------
         sin_src sine;
         mixer mix;
//-----------------------------------------------------------------------------
// constructor
//-----------------------------------------------------------------------------
         SC_CTOR(bask_mod)
             : in("in"), out("out"),
             sine("sine", 1.0, 1.0e7, sca_core::sca_time( 5.0, sc_core::SC_NS ) ),
             mix("mix")
         {
             sine.out(carrier);
             mix.in_wav(carrier);
             mix.in_bin(in);
             mix.out(out);
         }
    private:
        sca_tdf::sca_signal<double> carrier;

};

This is the code taken directly from the SystemC-AMS User Manual

 

Link to comment
Share on other sites

Replace SCA_TDF_MODULE with SC_MODULE and it should work. Your module instantiates other modules to interconnect them. A TDF module is always a primitive module without any inner structure in form of submodules. Instead, it serves to describe the timed dataflow behaviour using the various TDF callbacks.

Link to comment
Share on other sites

10 hours ago, maehne said:

Replace SCA_TDF_MODULE with SC_MODULE and it should work. Your module instantiates other modules to interconnect them. A TDF module is always a primitive module without any inner structure in form of submodules. Instead, it serves to describe the timed dataflow behaviour using the various TDF callbacks.

Thank you maehne it works

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.

Guest
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...