Changeset 113 for trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/SelfTest/src/main.cpp
- Timestamp:
- Apr 14, 2009, 8:39:12 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/SelfTest/src/main.cpp
r88 r113 6 6 */ 7 7 8 #include "Behavioural/@DIRECTORY/SelfTest/include/t est.h"8 #include "Behavioural/@DIRECTORY/SelfTest/include/top.h" 9 9 10 #define NB_PARAMS 0 10 #ifndef MTI_SYSTEMC 11 # ifndef SYSTEMC 12 int main (int argc, char * argv[]) 13 # else 14 int sc_main (int argc, char * argv[]) 15 # endif 16 { 17 int _return = EXIT_SUCCESS; 11 18 12 void usage (int argc, char * argv[])13 {14 err (_("<Usage> %s name_instance list_params.\n"),argv[0]);15 err (_("list_params is :\n"));16 err (_(" * ()\n"));17 18 exit (1);19 }20 21 #ifndef SYSTEMC22 int main (int argc, char * argv[])23 #else24 int sc_main (int argc, char * argv[])25 #endif26 {27 if (argc != static_cast<int>(2+NB_PARAMS))28 usage (argc, argv);29 30 uint32_t x = 1;31 32 string name = argv[x++];33 34 int _return = EXIT_SUCCESS;35 19 try 36 20 { 37 morpheo::behavioural::@NAMESPACE_USE::Parameters * param = new morpheo::behavioural::@NAMESPACE_USE::Parameters 38 ( 39 true //is_toplevel 40 ); 41 42 msg(_("%s"),param->print(0).c_str()); 43 44 test (name,param); 21 top * my_top = new top ("my_top",argc,argv); 22 23 my_top->test(); 24 25 delete my_top; 45 26 } 46 27 catch (morpheo::ErrorMorpheo & error) 47 28 { 48 msg (_("<%s> :\n%s"),name.c_str(),error.what ());29 msgError(_("%s\n"),error.what ()); 49 30 _return = EXIT_FAILURE; 50 31 } … … 59 40 catch (morpheo::ErrorMorpheo & error) 60 41 { 61 // msg(_("<%s> :\n%s"),name.c_str(), error.what ());42 // msgError(_("<%s> :\n%s"),name.c_str(), error.what ()); 62 43 _return = EXIT_FAILURE; 63 44 } 64 45 65 return (_return);46 return _return; 66 47 } 48 #endif
Note: See TracChangeset
for help on using the changeset viewer.