/*
 * $Id: main.cpp 115 2009-04-20 21:29:17Z rosiere $
 *
 * [ Description ]
 * 
 */

#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/SelfTest/include/top.h"

<<<<<<< .mine
#define NB_PARAMS 12

void usage (int argc, char * argv[])
{
  err (_("<Usage> %s name_instance list_params.\n"),argv[0]);
  err (_("list_params is :\n"));
  err (_(" * size_write_queue    (uint32_t)\n"));
  err (_(" * size_execute_queue  (uint32_t)\n"));
  err (_(" * nb_context          (uint32_t)\n"));
  err (_(" * nb_front_end        (uint32_t)\n"));
  err (_(" * nb_ooo_engine       (uint32_t)\n"));
  err (_(" * nb_packet           (uint32_t)\n"));
  err (_(" * size_general_data   (uint32_t)\n"));
  err (_(" * nb_general_register (uint32_t)\n"));
  err (_(" * size_special_data   (uint32_t)\n"));
  err (_(" * nb_special_register (uint32_t)\n"));
  err (_(" * nb_bypass_write     (uint32_t)\n"));
  err (_(" * write_queue_scheme  (Twrite_queue_scheme_t)\n"));

  exit (1);
}

#ifndef SYSTEMC
=======
#ifndef MTI_SYSTEMC
# ifndef SYSTEMC
>>>>>>> .r113
int main    (int argc, char * argv[])
# else
int sc_main (int argc, char * argv[])
# endif
{
  int _return = EXIT_SUCCESS;

<<<<<<< .mine
  uint32_t       x = 1;

  const string   name                =      argv[x++];
  const uint32_t size_write_queue    = fromString<uint32_t>(argv[x++]);
  const uint32_t size_execute_queue  = fromString<uint32_t>(argv[x++]);
  const uint32_t nb_context          = fromString<uint32_t>(argv[x++]);
  const uint32_t nb_front_end        = fromString<uint32_t>(argv[x++]);
  const uint32_t nb_ooo_engine       = fromString<uint32_t>(argv[x++]);
  const uint32_t nb_packet           = fromString<uint32_t>(argv[x++]);
  const uint32_t size_general_data   = fromString<uint32_t>(argv[x++]);
  const uint32_t nb_general_register = fromString<uint32_t>(argv[x++]);
  const uint32_t size_special_data   = fromString<uint32_t>(argv[x++]);
  const uint32_t nb_special_register = fromString<uint32_t>(argv[x++]);
  const uint32_t nb_bypass_write     = fromString<uint32_t>(argv[x++]);
  const write_queue::Twrite_queue_scheme_t write_queue_scheme = fromString<write_queue::Twrite_queue_scheme_t>(argv[x++]);
=======
>>>>>>> .r113
  try 
    {
<<<<<<< .mine
      morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::Parameters * param = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::Parameters
	(size_write_queue   ,
	 size_execute_queue ,
	 nb_context         ,
	 nb_front_end       ,
	 nb_ooo_engine      ,
	 nb_packet          ,
	 size_general_data  ,
	 nb_general_register,
	 size_special_data  ,
	 nb_special_register,
	 nb_bypass_write    ,
	 write_queue_scheme ,
         true // is_toplevel
         );
      
      msg(_("%s"),param->print(1).c_str());
      
      test (name,param);
=======
      top * my_top = new top ("my_top",argc,argv);

      my_top->test();

      delete my_top;
>>>>>>> .r113
    }
  catch (morpheo::ErrorMorpheo & error)
    {
      msgError(_("%s\n"),error.what ());
      _return = EXIT_FAILURE;
    }
  
  try 
    {
      if (_return == EXIT_SUCCESS)
	TEST_OK("Write_unit : no error");
      else
	TEST_KO("Write_unit : a lot of error");
    }
  catch (morpheo::ErrorMorpheo & error)
    {
//    msgError(_("<%s> :\n%s"),name.c_str(), error.what ());
      _return = EXIT_FAILURE;
    }

  return _return;
}
#endif
