1 | /* |
---|
2 | * $Id: main.cpp 88 2008-12-10 18:31:39Z rosiere $ |
---|
3 | * |
---|
4 | * [ Description ] |
---|
5 | * |
---|
6 | */ |
---|
7 | |
---|
8 | #include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Dependency_checking_unit/SelfTest/include/test.h" |
---|
9 | |
---|
10 | #define NB_PARAMS 5 |
---|
11 | |
---|
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 (_(" * nb_front_end (uint32_t)\n")); |
---|
17 | err (_(" * max_nb_context (uint32_t)\n")); |
---|
18 | err (_(" * nb_general_register (uint32_t)\n")); |
---|
19 | err (_(" * nb_special_register (uint32_t)\n")); |
---|
20 | err (_(" * nb_inst_insert (uint32_t)\n")); |
---|
21 | |
---|
22 | exit (1); |
---|
23 | } |
---|
24 | |
---|
25 | #ifndef SYSTEMC |
---|
26 | int main (int argc, char * argv[]) |
---|
27 | #else |
---|
28 | int sc_main (int argc, char * argv[]) |
---|
29 | #endif |
---|
30 | { |
---|
31 | if (argc != 2+NB_PARAMS) |
---|
32 | usage (argc, argv); |
---|
33 | |
---|
34 | uint32_t x = 1; |
---|
35 | |
---|
36 | const string name = argv[x++]; |
---|
37 | uint32_t _nb_front_end = atoi(argv[x++]); |
---|
38 | uint32_t _max_nb_context = atoi(argv[x++]); |
---|
39 | uint32_t _nb_general_register = atoi(argv[x++]); |
---|
40 | uint32_t _nb_special_register = atoi(argv[x++]); |
---|
41 | uint32_t _nb_inst_insert = atoi(argv[x++]); |
---|
42 | |
---|
43 | try |
---|
44 | { |
---|
45 | morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::register_translation_unit::dependency_checking_unit::Parameters * param = new morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::register_translation_unit::dependency_checking_unit::Parameters |
---|
46 | (_nb_front_end , |
---|
47 | _max_nb_context , |
---|
48 | _nb_general_register, |
---|
49 | _nb_special_register, |
---|
50 | _nb_inst_insert , |
---|
51 | true //is_toplevel |
---|
52 | ); |
---|
53 | |
---|
54 | msg(_("%s"),param->print(1).c_str()); |
---|
55 | |
---|
56 | test (name,param); |
---|
57 | } |
---|
58 | catch (morpheo::ErrorMorpheo & error) |
---|
59 | { |
---|
60 | msg (_("<%s> : %s.\n"),name.c_str(), error.what ()); |
---|
61 | exit (EXIT_FAILURE); |
---|
62 | } |
---|
63 | catch (...) |
---|
64 | { |
---|
65 | err (_("<%s> : This test must generate a error.\n"),name.c_str()); |
---|
66 | exit (EXIT_FAILURE); |
---|
67 | } |
---|
68 | |
---|
69 | return (EXIT_SUCCESS); |
---|
70 | } |
---|
71 | |
---|