Last change
on this file since 26 was
4,
checked in by nipo, 17 years ago
|
Towards SystemC-2.2 LRM:
- Implement sc_time with units
- Have a systemc header with no namespace pollution
|
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 | #include <stdint.h> |
---|
22 | |
---|
23 | EXTERN char unstable; |
---|
24 | EXTERN int32_t pending_write_vector_nb; |
---|
25 | |
---|
26 | namespace sc_core { |
---|
27 | |
---|
28 | struct sc_module; |
---|
29 | |
---|
30 | inline void transition (void); |
---|
31 | EXTERN void update (void); |
---|
32 | inline void moore_generation (void); |
---|
33 | EXTERN void mealy_generation (void); |
---|
34 | EXTERN bool casc_check_version(const char*); |
---|
35 | } |
---|
36 | |
---|
37 | #ifdef SCHEDULING_BY_CASC |
---|
38 | #include <systemcass_version_ext.h> |
---|
39 | #include <fsm_rules.h> |
---|
40 | |
---|
41 | namespace sc_core { |
---|
42 | |
---|
43 | EXTERN void initialize () |
---|
44 | { |
---|
45 | casc_check_version (SYSTEMC_VERSION); |
---|
46 | } |
---|
47 | |
---|
48 | EXTERN void simulate_1_cycle (void) |
---|
49 | { |
---|
50 | #ifdef CHECK_FSM_RULES |
---|
51 | casc_fsm_step = TRANSITION; |
---|
52 | #endif |
---|
53 | transition (); |
---|
54 | update (); |
---|
55 | #ifdef CHECK_FSM_RULES |
---|
56 | casc_fsm_step = GEN_MOORE; |
---|
57 | #endif |
---|
58 | moore_generation (); |
---|
59 | #ifdef CHECK_FSM_RULES |
---|
60 | casc_fsm_step = GEN_MEALY; |
---|
61 | #endif |
---|
62 | mealy_generation (); |
---|
63 | #ifdef CHECK_FSM_RULES |
---|
64 | casc_fsm_step = STIMULI; |
---|
65 | #endif |
---|
66 | } |
---|
67 | } // end of sc_core namespace |
---|
68 | |
---|
69 | #endif |
---|
70 | |
---|
71 | |
---|
72 | #endif |
---|
73 | |
---|
Note: See
TracBrowser
for help on using the repository browser.