Prashant Tyagi Posted June 10, 2023 Report Share Posted June 10, 2023 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 Quote Link to comment Share on other sites More sharing options...
maehne Posted June 12, 2023 Report Share Posted June 12, 2023 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. Quote Link to comment Share on other sites More sharing options...
maehne Posted June 12, 2023 Report Share Posted June 12, 2023 Quote This is the code taken directly from the SystemC-AMS User Manual Regarding this claim: The code snipped in Example 7.2 on page 87 of the SystemC-AMS User Manual published in January 2020 is correctly using SC_MODULE. Quote Link to comment Share on other sites More sharing options...
Prashant Tyagi Posted June 12, 2023 Author Report Share Posted June 12, 2023 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.