source: sources/src/casc.h @ 27

Last change on this file since 27 was 27, checked in by buchmann, 15 years ago

SystemCASS now uses autoconf/automake to build the API. Regression tests still
use the old Makefiles.
(thanks to Nicolas Pouillon)

The library directory no longer is "lib-arch-system". The directory now is "lib-linux". Everyone needs to pay attention about SYSTEMCASS environment variable.

Changes:

  • system header includes
  • Add includes to config.h (generated by autoconf/automake)
  • test:
    • linux preprocessor macro instead of _WIN32
    • CONFIG_DEBUG instead of DEBUG

Removes:

  • Makefile
  • guess_endianness.cc
  • guess_os.sh
  • assert.h (we now use standard assert.h)
  • Options.def
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
23EXTERN char unstable;
24EXTERN int32_t pending_write_vector_nb;
25
26namespace sc_core {
27
28struct sc_module;
29
30inline void transition        (void);
31EXTERN void update            (void);
32inline void moore_generation  (void);
33EXTERN void mealy_generation  (void);
34EXTERN 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
41namespace sc_core {
42
43EXTERN void initialize        ()
44{
45  casc_check_version (SYSTEMC_VERSION);
46}
47
48EXTERN void simulate_1_cycle (void) 
49{
50#ifdef CONFIG_CHECK_FSM_RULES
51        casc_fsm_step = TRANSITION;
52#endif
53  transition ();
54  update     ();
55#ifdef CONFIG_CHECK_FSM_RULES
56        casc_fsm_step = GEN_MOORE;
57#endif
58  moore_generation ();
59#ifdef CONFIG_CHECK_FSM_RULES
60        casc_fsm_step = GEN_MEALY;
61#endif
62  mealy_generation (); 
63#ifdef CONFIG_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.