Ignore:
Timestamp:
Apr 14, 2009, 8:39:12 PM (15 years ago)
Author:
rosiere
Message:

1) Add modelsim simulation systemC
2) Modelsim cosimulation systemC / VHDL is not finish !!!! (cf execute_queue and write_unit)
3) Add multi architecture
5) Add template for comparator, multiplier and divider
6) Change Message
Warning) Various test macro have change, many selftest can't compile

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Platforms/Test/src/sc_main.cpp

    r88 r113  
    1212using namespace morpheo;
    1313
    14 void usage (int argc, char * argv[])
     14void usage (int argc
     15#ifdef MTI_SYSTEMC
     16            ,const char * const * argv
     17#else
     18            ,char * argv[]
     19#endif
     20            )
    1521{
    16   cerr <<  "<Usage> " << argv[0] << " list_params." << endl
    17        <<  "list_params is :" << endl
     22  cerr <<  "<Usage> " << argv[0] << endl
     23       <<  "In input stream : " << endl
    1824       <<  " * filename_simulator   (string  )" << endl
    1925       <<  " * filename_generator   (string  )" << endl
     
    2733}
    2834
     35#ifdef MTI_SYSTEMC
     36SC_MODULE_EXPORT(top);
     37
     38top::top (sc_module_name name)
     39#else
    2940int sc_main (int argc, char * argv[])
     41#endif
    3042{
    3143  cout << "<sc_main> Begin" << endl;
     44
     45#ifdef MTI_SYSTEMC
     46  // accessing command-line arguments with modelsim
     47  int argc;
     48  const char * const * argv;
     49
     50  argc = sc_argc ();
     51  argv = sc_argv ();
     52#endif
    3253
    3354  for (int32_t i=0; i<argc; ++i)
    3455    cout << argv[i] << " ";
    3556  cout << endl;
    36 
     57 
    3758  //==============================================================================
    3859  //===== [ Parameters ]==========================================================
    3960  //==============================================================================
    40 
     61 
    4162  if (argc != 9)
    4263    usage (argc, argv);
    43 
     64 
    4465  uint32_t x = 1;
    4566  string   filename_simulator = argv[x++];
     
    5172  uint32_t cache_size         = fromString<uint32_t>(argv[x++]);
    5273  uint32_t cache_ratio        = fromString<uint32_t>(argv[x++]);
     74 
     75//   string   filename_simulator;
     76//   string   filename_generator;
     77//   string   filename_instance ;
     78//   string   filename_software ;
     79//   uint32_t nb_cache_dedicated;
     80//   uint32_t nb_cache_shared   ;
     81//   uint32_t cache_size        ;
     82//   uint32_t cache_ratio       ;
     83
     84//   cout <<  "get filename_simulator   ? " << endl;
     85//   cin >> filename_simulator ;
     86
     87//   cout <<  "get filename_generator   ? " << endl;
     88//   cin >> filename_generator ;
     89
     90//   cout <<  "get filename_instance    ? " << endl;
     91//   cin >> filename_instance  ;
     92
     93//   cout <<  "get filename_software    ? " << endl;
     94//   cin >> filename_software  ;
     95
     96//   cout <<  "get nb_cache_dedicated   ? " << endl;
     97//   cin >> nb_cache_dedicated ;
     98
     99//   cout <<  "get nb_cache_shared      ? " << endl;
     100//   cin >> nb_cache_shared    ;
     101
     102//   cout <<  "get size cache L1 (byte) ? " << endl;
     103//   cin >> cache_size         ;
     104
     105//   cout <<  "get ratio cache          ? " << endl;
     106//   cin >> cache_ratio        ;
    53107
    54108  morpheo::behavioural::custom::custom_information_t (*get_custom_information) (void) = NULL;
     
    64118                      get_custom_information);
    65119
     120  cout << "  * return : " << _return << endl; 
    66121  cout << "<sc_main> End" << endl; 
    67122
     123#ifndef MTI_SYSTEMC
    68124  return _return;
     125#endif
    69126}
Note: See TracChangeset for help on using the changeset viewer.