Last change
on this file since 146 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:
1.8 KB
|
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/Shifter/SelfTest/include/test.h" |
---|
| 9 | |
---|
| 10 | #define NB_PARAMS 6 |
---|
| 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 | << " - shift_value (unsigned int)" << endl |
---|
| 19 | << " - rotate (unsigned int)" << endl |
---|
| 20 | << " - direction (unsigned int)" << endl |
---|
| 21 | << " - carry (unsigned int)" << endl; |
---|
| 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 (argv[0]); |
---|
| 33 | |
---|
| 34 | const string name = argv[1]; |
---|
| 35 | const uint32_t size_data = atoi(argv[2]); |
---|
| 36 | const uint32_t nb_port = atoi(argv[3]); |
---|
| 37 | const uint32_t shift_value = atoi(argv[4]); |
---|
| 38 | const morpheo::behavioural::generic::shifter::rotate_t rotate = static_cast<morpheo::behavioural::generic::shifter::rotate_t >(atoi(argv[5])); |
---|
| 39 | const morpheo::behavioural::generic::shifter::direction_t direction = static_cast<morpheo::behavioural::generic::shifter::direction_t>(atoi(argv[6])); |
---|
| 40 | const morpheo::behavioural::generic::shifter::carry_t carry = static_cast<morpheo::behavioural::generic::shifter::carry_t >(atoi(argv[7])); |
---|
| 41 | |
---|
| 42 | morpheo::behavioural::generic::shifter::Parameters param (size_data , |
---|
| 43 | nb_port , |
---|
| 44 | shift_value, |
---|
| 45 | rotate , |
---|
| 46 | direction , |
---|
| 47 | carry ); |
---|
| 48 | |
---|
| 49 | test (name,param); |
---|
| 50 | |
---|
| 51 | return (EXIT_SUCCESS); |
---|
| 52 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.