Last change
on this file since 3 was
1,
checked in by buchmann, 17 years ago
|
Initial import from CVS repository
|
File size:
1.7 KB
|
Line | |
---|
1 | /*------------------------------------------------------------\ |
---|
2 | | | |
---|
3 | | Tool : systemcass | |
---|
4 | | | |
---|
5 | | File : casc.h | |
---|
6 | | | |
---|
7 | | Author : Buchmann Richard | |
---|
8 | | | |
---|
9 | | Date : 09_07_2004 | |
---|
10 | | | |
---|
11 | \------------------------------------------------------------*/ |
---|
12 | #ifndef __CASC_H__ |
---|
13 | #define __CASC_H__ |
---|
14 | |
---|
15 | #ifdef __cplusplus |
---|
16 | #define EXTERN extern "C" |
---|
17 | #else |
---|
18 | #define EXTERN extern |
---|
19 | #endif |
---|
20 | |
---|
21 | EXTERN char unstable; |
---|
22 | EXTERN unsigned int pending_write_vector_nb; |
---|
23 | |
---|
24 | namespace sc_core { |
---|
25 | |
---|
26 | struct sc_module; |
---|
27 | |
---|
28 | inline void transition (void); |
---|
29 | EXTERN void update (void); |
---|
30 | inline void moore_generation (void); |
---|
31 | EXTERN void mealy_generation (void); |
---|
32 | EXTERN bool casc_check_version(const char*); |
---|
33 | } |
---|
34 | |
---|
35 | #ifdef SCHEDULING_BY_CASC |
---|
36 | #include <systemcass_version_ext.h> |
---|
37 | #include <fsm_rules.h> |
---|
38 | |
---|
39 | namespace sc_core { |
---|
40 | |
---|
41 | EXTERN void initialize () |
---|
42 | { |
---|
43 | casc_check_version (SYSTEMC_VERSION); |
---|
44 | } |
---|
45 | |
---|
46 | EXTERN void simulate_1_cycle (void) |
---|
47 | { |
---|
48 | #ifdef CHECK_FSM_RULES |
---|
49 | casc_fsm_step = TRANSITION; |
---|
50 | #endif |
---|
51 | transition (); |
---|
52 | update (); |
---|
53 | #ifdef CHECK_FSM_RULES |
---|
54 | casc_fsm_step = GEN_MOORE; |
---|
55 | #endif |
---|
56 | moore_generation (); |
---|
57 | #ifdef CHECK_FSM_RULES |
---|
58 | casc_fsm_step = GEN_MEALY; |
---|
59 | #endif |
---|
60 | mealy_generation (); |
---|
61 | #ifdef CHECK_FSM_RULES |
---|
62 | casc_fsm_step = STIMULI; |
---|
63 | #endif |
---|
64 | } |
---|
65 | } // end of sc_core namespace |
---|
66 | |
---|
67 | #endif |
---|
68 | |
---|
69 | |
---|
70 | #endif |
---|
71 | |
---|
Note: See
TracBrowser
for help on using the repository browser.