// Display block to show received data

#include "systemc.h"

SC_MODULE(display){
   
   // Refinable ports
   sc_inslave<int > outp1;
   
   int temp2;
   
   // Display function which Displays data
   void displ_f() {
      temp2 = outp1; // Reads in the data from master
      cout << " display: data received = " << temp2 << endl;
      
   }
   
   //Constructor to create & initialize an instance & data structures.
   SC_CTOR(display){
      SC_SLAVE(displ_f,outp1); // Input sensitive slave thread
      temp2 = 0;
   }
};