source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/SelfTest/include/top.h @ 113

Last change on this file since 113 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.8 KB
Line 
1/*
2 * $Id: top.h 113 2009-04-14 18:39:12Z rosiere $
3 *
4 * [ Description ]
5 *
6 * Test "Queue"
7 */
8
9#ifdef SYSTEMC
10#include "systemc.h"
11#endif
12
13#define NB_ITERATION  1
14#define CYCLE_MAX     (2048*NB_ITERATION)
15
16#include "Common/include/Test.h"
17#include "Common/include/Time.h"
18#include "Behavioural/Generic/Queue/include/Queue.h"
19
20using namespace std;
21using namespace morpheo;
22using namespace morpheo::behavioural;
23using namespace morpheo::behavioural::generic;
24
25using namespace morpheo::behavioural::generic::queue;
26
27void test    (string name,
28              morpheo::behavioural::generic::queue::Parameters * param);
29
30SC_MODULE(top)
31{
32#ifdef SYSTEMC
33 private: sc_clock               *  in_CLOCK ;
34 private: sc_signal<Tcontrol_t>  *  in_NRESET;
35
36 private: sc_signal<Tcontrol_t>  *  in_INSERT_VAL;
37 private: sc_signal<Tcontrol_t>  * out_INSERT_ACK;
38 private: sc_signal<Tdata_t   >  *  in_INSERT_DATA;
39
40 private: sc_signal<Tcontrol_t>  * out_RETIRE_VAL;
41 private: sc_signal<Tcontrol_t>  *  in_RETIRE_ACK;
42 private: sc_signal<Tdata_t   >  * out_RETIRE_DATA;
43
44 private: sc_signal<Tcontrol_t> ** out_SLOT_VAL ; //[nb_port_slot]
45 private: sc_signal<Tdata_t   > ** out_SLOT_DATA; //[nb_port_slot]
46
47 private: sc_signal<Tptr_t    >  * out_PTR_WRITE;
48 private: sc_signal<Tptr_t    >  * out_PTR_READ ;
49#endif
50
51 private: std::string name;
52 private: Tusage_t _usage;
53 private: morpheo::behavioural::generic::queue::Parameters * _param;
54#ifdef STATISTICS
55 private: morpheo::behavioural::Parameters_Statistics * _param_stat;
56#endif
57 private: Queue * component;
58
59 private: void usage
60    (
61#ifdef MTI_SYSTEMC
62     int argc, const char * const * argv
63#else
64     int argc, char * argv[]
65#endif
66     );
67 private: void allocation   (void);
68 private: void deallocation (void);
69 public : void test         (void);
70
71#ifdef MTI_SYSTEMC
72  SC_CTOR(top::top);
73#else
74 public : top (sc_module_name module_name,int argc, char * argv[]);
75#endif
76 public : ~top(void);
77};
Note: See TracBrowser for help on using the repository browser.