#include "systemc.h"
#include "slave_bca.h"

void slave_bca::slave_f() {
   while(1){
      wait();
      if(rstp == 0) {
         dat2->ack = false;
         x= 0;
      } else {
         dat2->ack = false;
         if(dat2->req == true) {
            x = dat2->d;
            dat2->ack = true;    
            cout << " Data received = " << x << endl;
         }
         
      }
   }
}
                      
   