Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by iman

  1. what is wrong with my code ??? i get this error (E100) port specified outside of module: port 'sca_lsf_out_0' (sc_port_base) #include "systemc.h" #include "systemc-ams.h" SC_MODULE(my_lsf_source) { // port declaration sca_lsf::sca_out y; // child module declaration sca_lsf::sca_source src; SC_CTOR(my_lsf_source) : y("y"), src("src", 0.0, 0.0, 1.0e-3, 1.0e3) // 1 kHz sinusoidal source with an amplitude of 1e-3 { src.set_timestep(0.5, sc_core::SC_MS); // set module timestep of source to 0.5 ms src.y(y); } }; #include "systemc.h" #include "systemc-ams.h" #include "sin.h" // sc_main in top level function like in C++ main int sc_main(int argc, char* argv[]) { sca_lsf::sca_out y; my_lsf_source my_lsf_source("my_lsf_source"); my_lsf_source.y(y); sca_util::sca_trace_file* tf = sca_util::sca_create_tabular_trace_file("trace.dat"); //sca_util::sca_trace(tf, y, "y"); sca_util::sca_write_comment(tf, "user-defined comments"); sca_util::sca_close_tabular_trace_file(tf); return(0); }
  • Create New...