Mouhsen.Ibrahim
-
Posts
3 -
Joined
-
Last visited
Content Type
Profiles
Forums
Downloads
Events
Posts posted by Mouhsen.Ibrahim
-
-
I solved sc_string error by adding this line to packet.h file
typedef std::string sc_string;
-
Hi everyone,
I installed `systemc v2.3.2` and followed the instructions in user guide found here but when I compile the code using this single command
g++ -I. -I/usr/local/systemc-2.3.2/include -L. -L/usr/local/systemc-2.3.2/lib-linux64 -lsystemc -lm -lstdc++ channel.cpp display.cpp packet.cpp receiver.cpp timer.cpp transmit.cpp main.cpp -o main
I get so many errors, here are few:
/usr/local/systemc-2.3.2/include/sysc/communication/sc_signal_ports.h:311:14: error: no matching function for call to ‘sc_trace(sc_core::sc_trace_file*&, const packet_type&, std::__cxx11::string&)’ sc_trace( p->tf, iface->read(), p->name ); /usr/local/systemc-2.3.2/include/sysc/communication/sc_signal.h:317:26: error: no match for ‘operator<<’ (operand types are ‘std::basic_ostream<char>’ and ‘const packet_type’) os << "new value = " << m_new_val << ::std::endl; /usr/local/systemc-2.3.2/include/sysc/tracing/sc_trace.h:279:13: error: invalid conversion from ‘const char*’ to ‘int’ [-fpermissive] sc_trace( tf, object.read(), name ); main.cpp:42:22: error: ‘class sc_core::sc_clock’ has no member named ‘signal’ sc_trace(tf, CLOCK.signal(), "clock"); ^ main.cpp:51:17: error: no matching function for call to ‘sc_start(int)’ sc_start(10000); ./packet.h:16:69: error: ‘sc_string’ does not name a type extern void sc_trace(sc_trace_file *tf, const packet_type& v, const sc_string& NAME);
The source code can be found here
Thanks for any help you can offer :)
User Guide for systemc 2.3.2
in SystemC Language
Posted
@maehne Thanks a lot for your reply, I already started writing my systemc models, I am having very few problems so far.
I will follow your guidelines here and hope to improve my code quality.
Is there a change log for systemc, so I can see what changed and modify my systemc models according to it?