Jump to content

SystemC

Members
  • Content Count

    5
  • Joined

  • Last visited

  1. Hi, thank you very much Alan, I have a compilation problem code source packet.h #ifndef CDMA_DATA_H_ #define CDMA_DATA_H_ #include "systemc.h" #include <string> #include <iomanip> //#include "declaration.h" class cdma_data { public : static int MOD_SIZE ; int *data; // constructor cdma_data ( int taille) { MOD_SIZE=taille; data=new int [MOD_SIZE]; } inline bool operator ==(const cdma_data & cd) const { unsigned int check_int; check_int = 1; for (unsigned int i = 0; i < MOD_SIZE; i++){ if(cd.data == da
  2. Hi, thank you very much Alan, i have another problem when i change the type of an membre of mytype to string the code soure is bellow : #ifndef MYTYPE_H #define MYTYPE_H #include "systemc.h" #include <string> #include <iomanip> using namespace std; class MyType { public: int info; string flag; public: // constructor MyType (int _info = 0, string _flag = "") { info = _info; flag = _flag; } inline bool operator == (const MyType & rhs) const { return (rhs.info == info && rhs.flag == flag ); } inline MyType&
  3. Hi Thank you Alan in this example http://www.doulos.co...ystemc/faq/#q1 i need to check the value for info "membre of my struct " so in the code source of mon.cpp i add if ((A.info.read())==100) cout << "OK"; #include "systemc.h" #include "mon.h" void mon::monitor() { cout << "A\t\t"; cout << "B" << endl; while (true) { wait(); // wait for 1 clock cycle cout << A.read() << "\t"; if ((A.info.read())==100) cout << "OK"; cout << B.read() << endl; } } but i hav
  4. Hi all, Can i create sc_signal<struct> or sc_signal<struct*>
  5. hi, all socket are defined throught there interfaces [basic.h] #ifndef BASIC_H #define BASIC_H #include <systemc> #include <tlm.h> #include <stdint.h> namespace basic { typedef uint32_t addr_t; typedef uint32_t data_t; } #include "initiator_socket.h" #include "target_socket.h" #endif [/end ] [initiator_socket] #ifndef BASIC_INITIATOR_SOCKET_H #define BASIC_INITIATOR_SOCKET_H #ifndef BASIC_H #error include "basic.h" #endif #include <vector> namespace basic { template <typename MODULE, bool MULTIPORT = false> class in
×
×
  • Create New...