Last change
on this file since 140 was
113,
checked in by rosiere, 15 years ago
|
1) Add modelsim simulation systemC
2) Modelsim cosimulation systemC / VHDL is not finish !!!! (cf execute_queue and write_unit)
3) Add multi architecture
5) Add template for comparator, multiplier and divider
6) Change Message
Warning) Various test macro have change, many selftest can't compile
|
-
Property svn:keywords set to
Id
|
File size:
992 bytes
|
Rev | Line | |
---|
[113] | 1 | /* |
---|
| 2 | * $Id: top.cpp 113 2009-04-14 18:39:12Z rosiere $ |
---|
| 3 | * |
---|
| 4 | * [ Description ] |
---|
| 5 | * |
---|
| 6 | */ |
---|
| 7 | |
---|
| 8 | #include "Behavioural/Generic/Counter/SelfTest/include/top.h" |
---|
| 9 | |
---|
| 10 | #define NB_PARAMS 2 |
---|
| 11 | |
---|
| 12 | #ifdef MTI_SYSTEMC |
---|
| 13 | SC_MODULE_EXPORT(top); |
---|
| 14 | #endif |
---|
| 15 | |
---|
| 16 | #ifdef MTI_SYSTEMC |
---|
| 17 | SC_CTOR(top::top) |
---|
| 18 | #else |
---|
| 19 | top::top (sc_module_name module_name,int argc, char * argv[]) |
---|
| 20 | #endif |
---|
| 21 | { |
---|
| 22 | #ifdef MTI_SYSTEMC |
---|
| 23 | // accessing command-line arguments with modelsim |
---|
| 24 | int argc; |
---|
| 25 | const char * const * argv; |
---|
| 26 | |
---|
| 27 | argc = sc_argc (); |
---|
| 28 | argv = sc_argv (); |
---|
| 29 | #endif |
---|
| 30 | |
---|
| 31 | if (argc != 2+NB_PARAMS) |
---|
| 32 | usage (argv[0]); |
---|
| 33 | |
---|
| 34 | name = argv[1]; |
---|
| 35 | uint32_t size_data = fromString<uint32_t>(argv[2]); |
---|
| 36 | uint32_t nb_port = fromString<uint32_t>(argv[3]); |
---|
| 37 | |
---|
| 38 | param = new morpheo::behavioural::generic::counter::Parameters |
---|
| 39 | (size_data, |
---|
| 40 | nb_port ); |
---|
| 41 | |
---|
| 42 | // msg(_("%s"),param.print(0).c_str()); |
---|
| 43 | |
---|
| 44 | // Allocation component |
---|
| 45 | allocation (); |
---|
| 46 | |
---|
| 47 | #ifdef MTI_SYSTEMC |
---|
| 48 | SC_THREAD(test); |
---|
| 49 | #endif |
---|
| 50 | } |
---|
| 51 | |
---|
| 52 | top::~top (void) |
---|
| 53 | { |
---|
| 54 | cout << "<" << name << "> : destructior" << endl; |
---|
| 55 | |
---|
| 56 | deallocation (); |
---|
| 57 | delete param; |
---|
| 58 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.