Skip Nav
Home » Forums » SystemC Forum

Icon - KMLM List KMLM List

View email archives for the history of this mailing list.

List Home All Archives Dates Threads Authors Subjects
systemc-forum - RE: [systemc-forum] Error during simulation Message Thread: Previous | Next
  • To: <meetsuriya@xxxxxxxxx>, <systemc-forum@xxxxxxxxxxxxxxxxx>
  • From: Robert Brewer <robert_brewer@xxxxxxxxxxx>
  • Date: Mon, 14 Dec 2009 10:18:29 +0000
Send Email to systemc-forum@lists.systemc.org:
Send new message
Reply to this message

Suriya,

I'm not an expert but I'm guessing you need to define the << operator on your 
class packet_type so that sc_signal can print its value. Add the following 
public function to your packet_type class:

friend std::ostream& operator<<(std::ostream& stream, packet_type& pkt)
{
    // do something sensible to print the packet
    // something like --->  stream << pkt.to_string();
    return stream;
}

Rob


Date: Mon, 14 Dec 2009 10:25:03 +0530
From: meetsuriya@xxxxxxxxx
To: systemc-forum@xxxxxxxxxxxxxxxxx
Subject: [systemc-forum] Error during simulation

Hi all,

I was trying to simulate an transmission-reception module. I have faced a error 
as provided below: 

/home/suriya/SystemC/systemc-2.2.0/include/sysc/communication/sc_signal.h:242: 
error: no match for ‘operator<<’ in ‘std::operator<< [with _Traits = 
std::char_traits<char>](((std::basic_ostream<char, std::char_traits<char> 
>&)((std::basic_ostream<char, std::char_traits<char> >*)os)), ((const 
char*)"new value = ")) << ((const 
sc_core::sc_signal<packet_type>*)this)->sc_core::sc_signal<packet_type>::m_new_val’


:: packet_type is a user defined data type created and provided as a sc_signal 
to the module.
What modifications shall I make? 

Pass on any ideas you might have :-)


Suriya
                                          
_________________________________________________________________
Got more than one Hotmail account? Save time by linking them together
 http://clk.atdmt.com/UKM/go/186394591/direct/01/

By Date: Previous | Next Current Thread By Thread: Previous | Next