source: latest/src/casc.h @ 1

Last change on this file since 1 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
21EXTERN char unstable;
22EXTERN unsigned int pending_write_vector_nb;
23
24namespace sc_core {
25
26struct sc_module;
27
28inline void transition        (void);
29EXTERN void update            (void);
30inline void moore_generation  (void);
31EXTERN void mealy_generation  (void);
32EXTERN 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
39namespace sc_core {
40
41EXTERN void initialize        ()
42{
43  casc_check_version (SYSTEMC_VERSION);
44}
45
46EXTERN 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.