Last change
on this file since 106 was
81,
checked in by rosiere, 16 years ago
|
- Finish Environment (and test)
- Continue predictor_unit
- Add external tools
- svn keyword "Id" set
|
-
Property svn:keywords set to
Id
|
File size:
904 bytes
|
Rev | Line | |
---|
[2] | 1 | /* |
---|
| 2 | * $Id: main.cpp 81 2008-04-15 18:40:01Z rosiere $ |
---|
| 3 | * |
---|
| 4 | * [ Description ] |
---|
| 5 | * |
---|
| 6 | */ |
---|
| 7 | |
---|
| 8 | #include "Behavioural/Generic/Counter/SelfTest/include/test.h" |
---|
| 9 | |
---|
| 10 | #define NB_PARAMS 2 |
---|
| 11 | |
---|
| 12 | void usage (string exec) |
---|
| 13 | { |
---|
| 14 | cerr << "<Usage> " << exec << " name_instance list_params" << endl |
---|
| 15 | << "list_params is :" << endl |
---|
| 16 | << " - size_data (unsigned int)" << endl |
---|
| 17 | << " - nb_port (unsigned int)" << endl; |
---|
| 18 | |
---|
| 19 | exit (1); |
---|
| 20 | } |
---|
| 21 | |
---|
| 22 | #ifndef SYSTEMC |
---|
| 23 | int main (int argc, char * argv[]) |
---|
| 24 | #else |
---|
| 25 | int sc_main (int argc, char * argv[]) |
---|
| 26 | #endif |
---|
| 27 | { |
---|
| 28 | if (argc != 2+NB_PARAMS) |
---|
| 29 | usage (argv[0]); |
---|
| 30 | |
---|
| 31 | cout << "<test0> : Classic usage" << endl; |
---|
| 32 | cout << "<test0> : Typical parameters" << endl; |
---|
| 33 | const string name = argv[1]; |
---|
| 34 | const uint32_t size_data = atoi(argv[2]); |
---|
| 35 | const uint32_t nb_port = atoi(argv[3]); |
---|
| 36 | |
---|
| 37 | morpheo::behavioural::generic::counter::Parameters param (size_data, |
---|
| 38 | nb_port ); |
---|
| 39 | |
---|
| 40 | test (name,param); |
---|
| 41 | |
---|
| 42 | return (EXIT_SUCCESS); |
---|
| 43 | } |
---|
| 44 | |
---|
Note: See
TracBrowser
for help on using the repository browser.