[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 | \------------------------------------------------------------*/ |
---|
[52] | 13 | |
---|
[1] | 14 | #ifndef __SC_MODULE_H__ |
---|
| 15 | #define __SC_MODULE_H__ |
---|
| 16 | |
---|
[27] | 17 | #include <list> |
---|
| 18 | #include <set> |
---|
| 19 | #include <stack> |
---|
[35] | 20 | |
---|
| 21 | #include "internal.h" |
---|
[27] | 22 | #include "sc_fwd.h" |
---|
[35] | 23 | #include "sc_module_ext.h" |
---|
[27] | 24 | #include "sc_object.h" |
---|
| 25 | #include "sc_sensitive.h" |
---|
[1] | 26 | |
---|
| 27 | namespace sc_core { |
---|
| 28 | |
---|
| 29 | class sc_port_base; |
---|
| 30 | class sc_signal_base; |
---|
| 31 | |
---|
| 32 | |
---|
| 33 | // |
---|
| 34 | // INTERNAL IMPLEMENTATION |
---|
| 35 | // |
---|
[52] | 36 | typedef std::list<sc_signal_base *> signal_list_t; |
---|
[1] | 37 | |
---|
[52] | 38 | typedef std::list<sc_module *> instances_list_t; |
---|
| 39 | typedef std::set<sc_module *> instances_set_t; |
---|
| 40 | extern instances_set_t instances_set; // ensemble d'instances |
---|
[1] | 41 | |
---|
[52] | 42 | typedef std::stack<const sc_module *> modules_stack_t; |
---|
[1] | 43 | extern modules_stack_t modules_stack; |
---|
[52] | 44 | extern void check_all_method_process(); |
---|
| 45 | extern void valid_method_process(); |
---|
[1] | 46 | |
---|
[52] | 47 | extern std::ostream & operator << (std::ostream & o, instances_set_t &); |
---|
[1] | 48 | |
---|
[52] | 49 | |
---|
[1] | 50 | // ---------------------------------------------------------------------------- |
---|
| 51 | // CLASS : method_process_t |
---|
| 52 | // |
---|
| 53 | // Method process class. |
---|
| 54 | // ---------------------------------------------------------------------------- |
---|
[52] | 55 | |
---|
| 56 | class method_process_t { |
---|
| 57 | |
---|
| 58 | |
---|
| 59 | public: |
---|
| 60 | const char * name; // function name |
---|
| 61 | |
---|
[1] | 62 | #ifdef DUMP_SCHEDULE_STATS |
---|
[52] | 63 | long long int number_of_calls; |
---|
| 64 | #endif |
---|
[1] | 65 | |
---|
[52] | 66 | public: |
---|
| 67 | // data |
---|
| 68 | sc_module * module; |
---|
| 69 | SC_ENTRY_FUNC func; |
---|
| 70 | sensitivity_list_t sensitivity_list; |
---|
| 71 | bool dont_initialize; |
---|
[1] | 72 | |
---|
[52] | 73 | // constructors |
---|
| 74 | method_process_t(const char * nm, SC_ENTRY_FUNC fn, sc_module & mod); |
---|
| 75 | |
---|
| 76 | // methods |
---|
| 77 | friend std::ostream& operator << (std::ostream &, const method_process_t &); |
---|
| 78 | |
---|
| 79 | // accessors |
---|
| 80 | bool is_combinational(void); |
---|
| 81 | bool is_transition(void); |
---|
| 82 | bool is_genmoore(void); |
---|
| 83 | |
---|
[1] | 84 | }; |
---|
| 85 | |
---|
| 86 | |
---|
| 87 | } // end of namespace sc_core |
---|
| 88 | |
---|
| 89 | #endif /* __SC_MODULE_H__ */ |
---|
[52] | 90 | |
---|
| 91 | /* |
---|
| 92 | # Local Variables: |
---|
| 93 | # tab-width: 4; |
---|
| 94 | # c-basic-offset: 4; |
---|
| 95 | # c-file-offsets:((innamespace . 0)(inline-open . 0)); |
---|
| 96 | # indent-tabs-mode: nil; |
---|
| 97 | # End: |
---|
| 98 | # |
---|
| 99 | # vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4 |
---|
| 100 | */ |
---|
| 101 | |
---|