Last change
on this file since 117 was
112,
checked in by rosiere, 15 years ago
|
1) Stat_list : fix retire old and new register bug
2) Stat_list : remove read_counter and valid flag, because validation of destination is in retire step (not in commit step)
3) Model : add class Model (cf Morpheo.sim)
4) Allocation : alloc_interface_begin and alloc_interface_end to delete temporary array.
5) Script : add distexe.sh
6) Add Comparator, Multiplier, Divider. But this component are not implemented
7) Software : add Dhrystone
|
-
Property svn:keywords set to
Id
|
File size:
1.2 KB
|
Line | |
---|
1 | /* |
---|
2 | * $Id: main.cpp 112 2009-03-18 22:36:26Z rosiere $ |
---|
3 | * |
---|
4 | * [ Description ] |
---|
5 | * |
---|
6 | */ |
---|
7 | |
---|
8 | #include "Behavioural/Generic/Divider/SelfTest/include/test.h" |
---|
9 | |
---|
10 | #define NB_PARAMS 0 |
---|
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 (_(" * ()\n")); |
---|
17 | |
---|
18 | exit (1); |
---|
19 | } |
---|
20 | |
---|
21 | #ifndef SYSTEMC |
---|
22 | int main (int argc, char * argv[]) |
---|
23 | #else |
---|
24 | int sc_main (int argc, char * argv[]) |
---|
25 | #endif |
---|
26 | { |
---|
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 | try |
---|
36 | { |
---|
37 | morpheo::behavioural::generic::divider::Parameters * param = new morpheo::behavioural::generic::divider::Parameters |
---|
38 | ( |
---|
39 | true //is_toplevel |
---|
40 | ); |
---|
41 | |
---|
42 | msg(_("%s"),param->print(0).c_str()); |
---|
43 | |
---|
44 | test (name,param); |
---|
45 | } |
---|
46 | catch (morpheo::ErrorMorpheo & error) |
---|
47 | { |
---|
48 | msg (_("<%s> :\n%s"),name.c_str(), error.what ()); |
---|
49 | _return = EXIT_FAILURE; |
---|
50 | } |
---|
51 | |
---|
52 | try |
---|
53 | { |
---|
54 | if (_return == EXIT_SUCCESS) |
---|
55 | TEST_OK("Divider : no error"); |
---|
56 | else |
---|
57 | TEST_KO("Divider : a lot of error"); |
---|
58 | } |
---|
59 | catch (morpheo::ErrorMorpheo & error) |
---|
60 | { |
---|
61 | // msg (_("<%s> :\n%s"),name.c_str(), error.what ()); |
---|
62 | _return = EXIT_FAILURE; |
---|
63 | } |
---|
64 | |
---|
65 | return (_return); |
---|
66 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.