/*
 * $Id: top.cpp 113 2009-04-14 18:39:12Z rosiere $
 *
 * [ Description ]
 * 
 */

#include "Behavioural/@DIRECTORY/SelfTest/include/top.h"
#include "Behavioural/include/Selftest.h"

#define NB_PARAMS 0

#ifdef MTI_SYSTEMC
SC_MODULE_EXPORT(top);
#endif

#ifdef MTI_SYSTEMC
SC_CTOR(top::top)
#else
top::top (sc_module_name module_name, int argc, char * argv[])
#endif
{
#ifdef MTI_SYSTEMC
  // accessing command-line arguments with modelsim
  int argc;
  const char * const * argv;

  argc = sc_argc ();
  argv = sc_argv ();
#endif

  if (argc != 2+NB_PARAMS)
    usage (argc, argv);

  uint32_t x=1;
  SELFTEST0(name,string,argv,x);

  _param = new morpheo::behavioural::@NAMESPACE_USE::Parameters
    (
     true
     );
  
  // msg(_("%s"),_param.print(0).c_str());
  
  // Allocation component
  allocation ();
  
#ifdef MTI_SYSTEMC
  SC_THREAD(test);
#endif
}

top::~top (void)
{
  deallocation ();
  delete _param;
}
