| [1] | 1 | /*------------------------------------------------------------\ |
|---|
| 2 | | | |
|---|
| 3 | | Tool : systemcass | |
|---|
| 4 | | | |
|---|
| 5 | | File : sc_module.h | |
|---|
| 6 | | | |
|---|
| 7 | | Author : Buchmann Richard | |
|---|
| 8 | | Taktak Sami | |
|---|
| 9 | | | |
|---|
| 10 | | Date : 09_07_2004 | |
|---|
| 11 | | | |
|---|
| 12 | \------------------------------------------------------------*/ |
|---|
| 13 | #ifndef __SC_MODULE_H__ |
|---|
| 14 | #define __SC_MODULE_H__ |
|---|
| 15 | |
|---|
| 16 | #include "sc_module_ext.h" |
|---|
| 17 | |
|---|
| [8] | 18 | #include <list> |
|---|
| 19 | #include <set> |
|---|
| 20 | #include <stack> |
|---|
| 21 | #include "sc_fwd.h" |
|---|
| 22 | #include "internal.h" |
|---|
| 23 | #include "sc_object.h" |
|---|
| 24 | #include "sc_sensitive.h" |
|---|
| [1] | 25 | |
|---|
| 26 | namespace sc_core { |
|---|
| 27 | |
|---|
| 28 | class sc_port_base; |
|---|
| 29 | class sc_signal_base; |
|---|
| 30 | |
|---|
| 31 | |
|---|
| 32 | // |
|---|
| 33 | // INTERNAL IMPLEMENTATION |
|---|
| 34 | // |
|---|
| 35 | typedef std::list<sc_signal_base* > signal_list_t; |
|---|
| 36 | |
|---|
| 37 | typedef std::list<sc_module* > instances_list_t; |
|---|
| 38 | typedef std::set<sc_module* > instances_set_t; |
|---|
| 39 | extern instances_set_t instances_set; // ensemble d'instances |
|---|
| 40 | |
|---|
| 41 | typedef std::stack<const sc_module*> modules_stack_t; |
|---|
| 42 | extern modules_stack_t modules_stack; |
|---|
| 43 | extern void check_all_method_process (); |
|---|
| 44 | extern void valid_method_process (); |
|---|
| 45 | |
|---|
| 46 | extern std::ostream& operator << (std::ostream &o, instances_set_t&); |
|---|
| 47 | |
|---|
| 48 | // ---------------------------------------------------------------------------- |
|---|
| 49 | // CLASS : method_process_t |
|---|
| 50 | // |
|---|
| 51 | // Method process class. |
|---|
| 52 | // ---------------------------------------------------------------------------- |
|---|
| 53 | class method_process_t |
|---|
| 54 | { |
|---|
| 55 | // for debug |
|---|
| 56 | public: const char *name; // function name |
|---|
| 57 | #ifdef DUMP_SCHEDULE_STATS |
|---|
| 58 | long long int number_of_calls; |
|---|
| 59 | #endif |
|---|
| 60 | public: |
|---|
| 61 | // data |
|---|
| 62 | sc_module *module; |
|---|
| 63 | SC_ENTRY_FUNC func; |
|---|
| 64 | sensitivity_list_t sensitivity_list; |
|---|
| 65 | bool dont_initialize; |
|---|
| 66 | |
|---|
| 67 | // constructors |
|---|
| 68 | method_process_t(const char* nm, SC_ENTRY_FUNC fn, sc_module& mod ); |
|---|
| 69 | |
|---|
| 70 | // methods |
|---|
| 71 | friend std::ostream& operator << (std::ostream &, const method_process_t &); |
|---|
| 72 | |
|---|
| 73 | // accessors |
|---|
| 74 | bool is_combinational(void); |
|---|
| 75 | bool is_transition(void); |
|---|
| 76 | bool is_genmoore(void); |
|---|
| 77 | }; |
|---|
| 78 | |
|---|
| 79 | |
|---|
| 80 | } // end of namespace sc_core |
|---|
| 81 | |
|---|
| 82 | #endif /* __SC_MODULE_H__ */ |
|---|