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/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/SelfTest/src/main.cpp

    r81 r113  
    22 * $Id$
    33 *
    4  * [ Description ]
     4 * [ Description ]
    55 *
    66 */
    77
    8 #include "Behavioural/Generic/Counter/SelfTest/include/test.h"
     8#include "Behavioural/Generic/Counter/SelfTest/include/top.h"
    99
    10 #define NB_PARAMS 2
     10#ifndef MTI_SYSTEMC
     11# ifndef SYSTEMC
     12int main    (int argc, char * argv[])
     13# else
     14int sc_main (int argc, char * argv[])
     15# endif
     16{
     17  int _return = EXIT_SUCCESS;
    1118
    12 void usage (string exec)
    13 {
    14   cerr << "<Usage> " << exec << " name_instance list_params" << endl
    15        << "list_params is :" << endl
    16        << " - size_data     (unsigned int)" << endl
    17        << " - nb_port       (unsigned int)" << endl;
     19  try
     20    {
     21      top * my_top = new top ("my_top",argc,argv);
    1822
    19   exit (1);
     23      my_top->test();
     24
     25      delete my_top;
     26    }
     27  catch (morpheo::ErrorMorpheo & error)
     28    {
     29      msg (_("%s\n"),error.what ());
     30      _return = EXIT_FAILURE;
     31    }
     32 
     33  try
     34    {
     35      if (_return == EXIT_SUCCESS)
     36        TEST_OK("Counter : no error");
     37      else
     38        TEST_KO("Counter : a lot of error");
     39    }
     40  catch (morpheo::ErrorMorpheo & error)
     41    {
     42//       msg (_("<%s> :\n%s"),name.c_str(), error.what ());
     43      _return = EXIT_FAILURE;
     44    }
     45
     46  return _return;
    2047}
    21 
    22 #ifndef SYSTEMC
    23 int main    (int argc, char * argv[])
    24 #else
    25 int sc_main (int argc, char * argv[])
    2648#endif
    27 {
    28   if (argc != 2+NB_PARAMS)
    29     usage (argv[0]);
    30 
    31   cout << "<test0> : Classic usage" << endl;
    32   cout << "<test0> : Typical parameters" << endl;
    33   const string   name      = argv[1];
    34   const uint32_t size_data = atoi(argv[2]);
    35   const uint32_t nb_port   = atoi(argv[3]);
    36 
    37   morpheo::behavioural::generic::counter::Parameters param (size_data,
    38                                                             nb_port  );
    39 
    40   test (name,param);
    41 
    42   return (EXIT_SUCCESS);
    43 }
    44 
Note: See TracChangeset for help on using the changeset viewer.