Changeset 113 for trunk/Platforms/Test/src/sc_main.cpp
- Timestamp:
- Apr 14, 2009, 8:39:12 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Platforms/Test/src/sc_main.cpp
r88 r113 12 12 using namespace morpheo; 13 13 14 void usage (int argc, char * argv[]) 14 void usage (int argc 15 #ifdef MTI_SYSTEMC 16 ,const char * const * argv 17 #else 18 ,char * argv[] 19 #endif 20 ) 15 21 { 16 cerr << "<Usage> " << argv[0] << " list_params." <<endl17 << " list_params is :" << endl22 cerr << "<Usage> " << argv[0] << endl 23 << "In input stream : " << endl 18 24 << " * filename_simulator (string )" << endl 19 25 << " * filename_generator (string )" << endl … … 27 33 } 28 34 35 #ifdef MTI_SYSTEMC 36 SC_MODULE_EXPORT(top); 37 38 top::top (sc_module_name name) 39 #else 29 40 int sc_main (int argc, char * argv[]) 41 #endif 30 42 { 31 43 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 32 53 33 54 for (int32_t i=0; i<argc; ++i) 34 55 cout << argv[i] << " "; 35 56 cout << endl; 36 57 37 58 //============================================================================== 38 59 //===== [ Parameters ]========================================================== 39 60 //============================================================================== 40 61 41 62 if (argc != 9) 42 63 usage (argc, argv); 43 64 44 65 uint32_t x = 1; 45 66 string filename_simulator = argv[x++]; … … 51 72 uint32_t cache_size = fromString<uint32_t>(argv[x++]); 52 73 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 ; 53 107 54 108 morpheo::behavioural::custom::custom_information_t (*get_custom_information) (void) = NULL; … … 64 118 get_custom_information); 65 119 120 cout << " * return : " << _return << endl; 66 121 cout << "<sc_main> End" << endl; 67 122 123 #ifndef MTI_SYSTEMC 68 124 return _return; 125 #endif 69 126 }
Note: See TracChangeset
for help on using the changeset viewer.