1 | /* |
---|
2 | * $Id: sc_main.cpp 88 2008-12-10 18:31:39Z rosiere $ |
---|
3 | * |
---|
4 | * [ Description ] |
---|
5 | * |
---|
6 | * Platforms : Morpheo + Environment |
---|
7 | */ |
---|
8 | |
---|
9 | #include "../include/test.h" |
---|
10 | |
---|
11 | using namespace std; |
---|
12 | using namespace morpheo; |
---|
13 | |
---|
14 | void usage (int argc, char * argv[]) |
---|
15 | { |
---|
16 | cerr << "<Usage> " << argv[0] << " list_params." << endl |
---|
17 | << "list_params is :" << endl |
---|
18 | << " * filename_simulator (string )" << endl |
---|
19 | << " * filename_generator (string )" << endl |
---|
20 | << " * filename_instance (string )" << endl |
---|
21 | << " * filename_software (string )" << endl |
---|
22 | << " * nb_cache_dedicated (uint32_t)" << endl |
---|
23 | << " * nb_cache_shared (uint32_t)" << endl |
---|
24 | << " * size cache L1 (byte) (uint32_t)" << endl |
---|
25 | << " * ratio cache (uint32_t)" << endl; |
---|
26 | exit (EXIT_FAILURE); |
---|
27 | } |
---|
28 | |
---|
29 | int sc_main (int argc, char * argv[]) |
---|
30 | { |
---|
31 | cout << "<sc_main> Begin" << endl; |
---|
32 | |
---|
33 | for (int32_t i=0; i<argc; ++i) |
---|
34 | cout << argv[i] << " "; |
---|
35 | cout << endl; |
---|
36 | |
---|
37 | //============================================================================== |
---|
38 | //===== [ Parameters ]========================================================== |
---|
39 | //============================================================================== |
---|
40 | |
---|
41 | if (argc != 9) |
---|
42 | usage (argc, argv); |
---|
43 | |
---|
44 | uint32_t x = 1; |
---|
45 | string filename_simulator = argv[x++]; |
---|
46 | string filename_generator = argv[x++]; |
---|
47 | string filename_instance = argv[x++]; |
---|
48 | string filename_software = argv[x++]; |
---|
49 | uint32_t nb_cache_dedicated = fromString<uint32_t>(argv[x++]); |
---|
50 | uint32_t nb_cache_shared = fromString<uint32_t>(argv[x++]); |
---|
51 | uint32_t cache_size = fromString<uint32_t>(argv[x++]); |
---|
52 | uint32_t cache_ratio = fromString<uint32_t>(argv[x++]); |
---|
53 | |
---|
54 | morpheo::behavioural::custom::custom_information_t (*get_custom_information) (void) = NULL; |
---|
55 | |
---|
56 | int _return = test (filename_simulator , |
---|
57 | filename_generator , |
---|
58 | filename_instance , |
---|
59 | filename_software , |
---|
60 | nb_cache_dedicated , |
---|
61 | nb_cache_shared , |
---|
62 | cache_size , |
---|
63 | cache_ratio , |
---|
64 | get_custom_information); |
---|
65 | |
---|
66 | cout << "<sc_main> End" << endl; |
---|
67 | |
---|
68 | return _return; |
---|
69 | } |
---|