Last change
on this file since 42 was
15,
checked in by rosiere, 17 years ago
|
Interface normalisé
Début du banc de registres multi niveaux
|
File size:
1.2 KB
|
Rev | Line | |
---|
[2] | 1 | /* |
---|
| 2 | * $Id$ |
---|
| 3 | * |
---|
| 4 | * [ Description ] |
---|
| 5 | * |
---|
| 6 | */ |
---|
| 7 | |
---|
| 8 | #include "Behavioural/@DIRECTORY/SelfTest/include/test.h" |
---|
| 9 | |
---|
| 10 | #define NB_PARAMS 0 |
---|
| 11 | |
---|
[15] | 12 | void usage (int argc, char * argv[]) |
---|
[2] | 13 | { |
---|
[15] | 14 | cerr << "<Usage> " << argv[0] << " name_instance list_params" << endl |
---|
| 15 | << "list_params is :" << endl |
---|
[2] | 16 | // << " - size_data (unsigned int)" << endl |
---|
| 17 | // << " - nb_port (unsigned int)" << endl; |
---|
[15] | 18 | << "" << endl; |
---|
[2] | 19 | |
---|
[15] | 20 | for (int i=0; i<argc; i++) |
---|
| 21 | cerr << argv[i] << " "; |
---|
| 22 | cerr << endl; |
---|
| 23 | |
---|
[2] | 24 | exit (1); |
---|
| 25 | } |
---|
| 26 | |
---|
| 27 | #ifndef SYSTEMC |
---|
| 28 | int main (int argc, char * argv[]) |
---|
| 29 | #else |
---|
| 30 | int sc_main (int argc, char * argv[]) |
---|
| 31 | #endif |
---|
| 32 | { |
---|
[15] | 33 | if (argc < 2+NB_PARAMS) |
---|
| 34 | usage (argc, argv); |
---|
[2] | 35 | |
---|
| 36 | const string name = argv[1]; |
---|
| 37 | //const uint32_t size_data = atoi(argv[2]); |
---|
| 38 | //const uint32_t nb_port = atoi(argv[3]); |
---|
| 39 | |
---|
| 40 | try |
---|
| 41 | { |
---|
| 42 | morpheo::behavioural::@NAMESPACE_USE::Parameters param (//size_data, |
---|
| 43 | //nb_port |
---|
| 44 | ); |
---|
| 45 | |
---|
| 46 | cout << param.print(1); |
---|
| 47 | |
---|
| 48 | test (name,param); |
---|
| 49 | } |
---|
| 50 | catch (morpheo::ErrorMorpheo & error) |
---|
| 51 | { |
---|
| 52 | cout << "<" << name << "> : " << error.what (); |
---|
[15] | 53 | exit (EXIT_FAILURE); |
---|
[2] | 54 | } |
---|
| 55 | catch (...) |
---|
| 56 | { |
---|
| 57 | cerr << "<" << name << "> : This test must generate a error" << endl; |
---|
| 58 | exit (EXIT_FAILURE); |
---|
| 59 | } |
---|
| 60 | |
---|
| 61 | return (EXIT_SUCCESS); |
---|
| 62 | } |
---|
| 63 | |
---|
Note: See
TracBrowser
for help on using the repository browser.