Jump to content

SDeepti

Members
  • Posts

    2
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by SDeepti

  1. No, you need to have loop with the function registered as SC_THREAD. For your code, it will be:

      

      void d_operation()
        { while(1){
          
            if (reset.read()==1)
            {
            
            d_out = 0;
        //    std::cout << "reset= " << reset << "...din=  " << d_in << ".....d_out" << d_out << std::endl;
               }
            else
            {
                //d_out.write(d_in.read());
              d_out=d_in;
            //    wait(1, SC_NS);
            //    std::cout << "reset= " << reset << "...din=  " << d_in << ".....d_out" << d_out << std::endl;
                }
          wait();
        }
        }

     

×
×
  • Create New...