Last change
on this file since 45 was
37,
checked in by joel.porquet@…, 15 years ago
|
casc.h: missing include. internal_ext.h: we are not supposed to include the header dedicated to dynamic lib.
|
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 <cstdio> |
---|
22 | #include <stdint.h> |
---|
23 | |
---|
24 | EXTERN char unstable; |
---|
25 | EXTERN int32_t pending_write_vector_nb; |
---|
26 | |
---|
27 | namespace sc_core { |
---|
28 | |
---|
29 | struct sc_module; |
---|
30 | |
---|
31 | inline void transition (void); |
---|
32 | EXTERN void update (void); |
---|
33 | inline void moore_generation (void); |
---|
34 | EXTERN void mealy_generation (void); |
---|
35 | EXTERN bool casc_check_version(const char*); |
---|
36 | } |
---|
37 | |
---|
38 | #ifdef SCHEDULING_BY_CASC |
---|
39 | #include <systemcass_version_ext.h> |
---|
40 | #include <fsm_rules.h> |
---|
41 | |
---|
42 | namespace sc_core { |
---|
43 | |
---|
44 | EXTERN void initialize () |
---|
45 | { |
---|
46 | casc_check_version (SYSTEMC_VERSION); |
---|
47 | } |
---|
48 | |
---|
49 | EXTERN void simulate_1_cycle (void) |
---|
50 | { |
---|
51 | #ifdef CONFIG_CHECK_FSM_RULES |
---|
52 | casc_fsm_step = TRANSITION; |
---|
53 | #endif |
---|
54 | transition (); |
---|
55 | update (); |
---|
56 | #ifdef CONFIG_CHECK_FSM_RULES |
---|
57 | casc_fsm_step = GEN_MOORE; |
---|
58 | #endif |
---|
59 | moore_generation (); |
---|
60 | #ifdef CONFIG_CHECK_FSM_RULES |
---|
61 | casc_fsm_step = GEN_MEALY; |
---|
62 | #endif |
---|
63 | mealy_generation (); |
---|
64 | #ifdef CONFIG_CHECK_FSM_RULES |
---|
65 | casc_fsm_step = STIMULI; |
---|
66 | #endif |
---|
67 | } |
---|
68 | } // end of sc_core namespace |
---|
69 | |
---|
70 | #endif |
---|
71 | |
---|
72 | |
---|
73 | #endif |
---|
74 | |
---|
Note: See
TracBrowser
for help on using the repository browser.