Esempio n. 1
0
  virtual void put(const T& t) {

    cout << sc_time_stamp() << " SC consumer executing packet:" 
       << endl << "  " << t << endl;

    wait(10,SC_NS);

    ap.write(t);
  }
Esempio n. 2
0
 void run() {
   wait(50, SC_NS);
   for (int i = 17; i < 17+N; i++) {
     T pkt(i);
     cout << "[SC " << sc_time_stamp() << "] producer, writing on tlm_analysis_port: ";
     pkt.print(cout);
     aport.write(pkt);
     wait(10, SC_NS);
     cnt = i;
   }
   if(cnt == 16+N) 
     cout << "TEST PASSED" << endl;
   else
     cout << "TEST FAILED" << endl;
 }