// Display block to show received data

#include "systemc.h"  

SC_MODULE(receive){
   
   // Refinable ports
   sc_inslave<int > out_p1;
   
   int tmp2;
   
   // Receive function which Displays data 
   void recv_f() {
      tmp2 = out_p1; // Reads in the data from master
      cout << "Received Data = " << tmp2 << endl << endl;
   }
   
   //Constructor to create & initialize an instance & data structures.
   SC_CTOR(receive){
      SC_SLAVE(recv_f,out_p1); // Input sensitive slave thread
      tmp2 = 0;
   }
};