Last change
on this file since 120 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:
1.3 KB
|
Line | |
---|
1 | /* |
---|
2 | * $Id: top.cpp 113 2009-04-14 18:39:12Z rosiere $ |
---|
3 | * |
---|
4 | * [ Description ] |
---|
5 | * |
---|
6 | */ |
---|
7 | |
---|
8 | #include "Behavioural/Generic/Queue/SelfTest/include/top.h" |
---|
9 | #include "Behavioural/include/Selftest.h" |
---|
10 | |
---|
11 | #define NB_PARAMS 5 |
---|
12 | |
---|
13 | #ifdef MTI_SYSTEMC |
---|
14 | SC_MODULE_EXPORT(top); |
---|
15 | #endif |
---|
16 | |
---|
17 | #ifdef MTI_SYSTEMC |
---|
18 | SC_CTOR(top::top) |
---|
19 | #else |
---|
20 | top::top (sc_module_name module_name, int argc, char * argv[]) |
---|
21 | #endif |
---|
22 | { |
---|
23 | #ifdef MTI_SYSTEMC |
---|
24 | // accessing command-line arguments with modelsim |
---|
25 | int argc; |
---|
26 | const char * const * argv; |
---|
27 | |
---|
28 | argc = sc_argc (); |
---|
29 | argv = sc_argv (); |
---|
30 | #endif |
---|
31 | |
---|
32 | if (argc != 2+NB_PARAMS) |
---|
33 | usage (argc, argv); |
---|
34 | |
---|
35 | uint32_t size_queue ; |
---|
36 | uint32_t size_data ; |
---|
37 | uint32_t nb_port_slot ; |
---|
38 | bool have_port_write; |
---|
39 | bool have_port_read ; |
---|
40 | |
---|
41 | uint32_t x=1; |
---|
42 | |
---|
43 | SELFTEST0(name ,string ,argv,x); |
---|
44 | SELFTEST0(size_queue ,uint32_t,argv,x); |
---|
45 | SELFTEST0(size_data ,uint32_t,argv,x); |
---|
46 | SELFTEST0(nb_port_slot ,uint32_t,argv,x); |
---|
47 | SELFTEST0(have_port_write,bool ,argv,x); |
---|
48 | SELFTEST0(have_port_read ,bool ,argv,x); |
---|
49 | |
---|
50 | _param = new morpheo::behavioural::generic::queue::Parameters |
---|
51 | ( |
---|
52 | size_queue |
---|
53 | ,size_data |
---|
54 | ,nb_port_slot |
---|
55 | ,have_port_write |
---|
56 | ,have_port_read |
---|
57 | // ,true |
---|
58 | ); |
---|
59 | |
---|
60 | // msg(_("%s"),_param.print(0).c_str()); |
---|
61 | |
---|
62 | // Allocation component |
---|
63 | allocation (); |
---|
64 | |
---|
65 | #ifdef MTI_SYSTEMC |
---|
66 | SC_THREAD(test); |
---|
67 | #endif |
---|
68 | } |
---|
69 | |
---|
70 | top::~top (void) |
---|
71 | { |
---|
72 | deallocation (); |
---|
73 | delete _param; |
---|
74 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.