krishnadas_b 0 Report post Posted January 16, 2017 #include "systemc.h" #include "systemc-ams.h" SC_MODULE (chkdouble) { sca_tdf::sca_signal <double> tdf_ana_out; double x1, x2; void check () { if (tdf_ana_out > (x2-x1)/2 ) { // <<<<<<<<<<<<<<<<<< the error is as follows //chkdouble.cpp: In member function 'void chkdouble::check()': //chkdouble.cpp:9: error: no match for 'operator>' in '((chkdouble*)this)-> cout << "hello" ; } } SC_CTOR (chkdouble) : tdf_ana_out ("tdf_ana_out") { x1 = 0; x2 = 8; tdf_ana_out = 5.2; SC_THREAD (check); } }; int sc_main(int argc, char* argv[]) { sc_set_time_resolution (1, SC_NS); sc_signal <bool> adc_clock; chkdouble chkdouble_1 ("chkdouble_1"); sc_start (100, SC_MS); return(0); } Please let me know what is the issue here? Quote Share this post Link to post Share on other sites
karsten 14 Report post Posted January 16, 2017 you cannot read a value from a TDF signal. Access to TDF signals is only possible via TDF ports in the context of aTDF module inside the context of a processing method (see LRM or User guide). It's why the schedule (underlying equation system) is setup during elaboration and during simulation the TDF time is not inline with the SystemC time - a read access to a TDF signal out of context cannot know which value from the buffer has to be read - only the connected and thus scheduled TDF module has this information. 1 maehne reacted to this Quote Share this post Link to post Share on other sites
krishnadas_b 0 Report post Posted January 18, 2017 Thanks for the clarification. Yes i need to go through the LRM to check for right usage. Quote Share this post Link to post Share on other sites