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/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/SelfTest/src/main.cpp

    r88 r113  
    22 * $Id$
    33 *
    4  * [ Description ]
     4 * [ Description ]
    55 *
    66 */
    77
    8 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/SelfTest/include/test.h"
     8#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/SelfTest/include/top.h"
    99
    10 #define NB_PARAMS 7
    11 
    12 void usage (int argc, char * argv[])
     10#ifndef MTI_SYSTEMC
     11# ifndef SYSTEMC
     12int main    (int argc, char * argv[])
     13# else
     14int sc_main (int argc, char * argv[])
     15# endif
    1316{
    14   err (_("<Usage> %s name_instance list_params.\n"),argv[0]);
    15   err (_("list_params is :\n"));
    16   err (_(" * size_queue          (uint32_t)\n"));
    17   err (_(" * nb_context          (uint32_t)\n"));
    18   err (_(" * nb_front_end        (uint32_t)\n"));
    19   err (_(" * nb_ooo_engine       (uint32_t)\n"));
    20   err (_(" * nb_packet           (uint32_t)\n"));
    21   err (_(" * size_general_data   (uint32_t)\n"));
    22   err (_(" * size_special_data   (uint32_t)\n"));
    23 
    24   exit (1);
    25 }
    26 
    27 #ifndef SYSTEMC
    28 int main    (int argc, char * argv[])
    29 #else
    30 int sc_main (int argc, char * argv[])
    31 #endif
    32 {
    33   if (argc != 2+NB_PARAMS)
    34     usage (argc, argv);
    35 
    36   uint32_t       x = 1;
    37 
    38   const string   name      =      argv[x++];
    39   const uint32_t size_queue          = atoi(argv[x++]);
    40   const uint32_t nb_context          = atoi(argv[x++]);
    41   const uint32_t nb_front_end        = atoi(argv[x++]);
    42   const uint32_t nb_ooo_engine       = atoi(argv[x++]);
    43   const uint32_t nb_packet           = atoi(argv[x++]);
    44   const uint32_t size_general_data   = atoi(argv[x++]);
    45   const uint32_t size_special_data   = atoi(argv[x++]);
     17  int _return = EXIT_SUCCESS;
    4618
    4719  try
    4820    {
    49       morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::execute_queue::Parameters * param = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::execute_queue::Parameters
    50         (size_queue         ,
    51          nb_context         ,
    52          nb_front_end       ,
    53          nb_ooo_engine      ,
    54          nb_packet          ,
    55          size_general_data  ,
    56          size_special_data  ,
    57          true // is_toplevel
    58          );
    59      
    60       msg(_("%s"),param->print(1).c_str());
    61      
    62       test (name,param);
     21      top * my_top = new top ("my_top",argc,argv);
     22
     23      my_top->test();
     24
     25      delete my_top;
    6326    }
    6427  catch (morpheo::ErrorMorpheo & error)
    6528    {
    66       msg (_("<%s> : %s.\n"),name.c_str(), error.what ());
    67       exit (EXIT_FAILURE);
     29      msgError(_("%s\n"),error.what ());
     30      _return = EXIT_FAILURE;
    6831    }
    69   catch (...)
     32 
     33  try
    7034    {
    71       err (_("<%s> : This test must generate a error.\n"),name.c_str());
    72       exit (EXIT_FAILURE);
     35      if (_return == EXIT_SUCCESS)
     36        TEST_OK("Execute_queue : no error");
     37      else
     38        TEST_KO("Execute_queue : a lot of error");
     39    }
     40  catch (morpheo::ErrorMorpheo & error)
     41    {
     42//    msgError(_("<%s> :\n%s"),name.c_str(), error.what ());
     43      _return = EXIT_FAILURE;
    7344    }
    7445
    75   return (EXIT_SUCCESS);
     46  return _return;
    7647}
    77 
     48#endif
Note: See TracChangeset for help on using the changeset viewer.