source: sources/src/casc.h @ 63

Last change on this file since 63 was 63, checked in by bouyer, 5 years ago

Remplace USE_OPENMP with _OPENMP, the latter is automagically defined
by the compiler.

File size: 1.8 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
13#ifndef __CASC_H__
14#define __CASC_H__
15
16#ifdef __cplusplus
17#define EXTERN extern "C"
18#else
19#define EXTERN extern
20#endif
21
22#include <cstdio>
23
24EXTERN char unstable;
25EXTERN int32_t * pending_write_vector_nb;
26#ifdef _OPENMP
27#pragma omp threadprivate (pending_write_vector_nb)
28#endif
29
30namespace sc_core {
31    struct sc_module;
32    inline void transition        (void);
33    EXTERN void update            (void);
34    inline void moore_generation  (void);
35    EXTERN void mealy_generation  (void);
36    EXTERN bool casc_check_version(const char *);
37}
38
39#ifdef SCHEDULING_BY_CASC
40#include <systemcass_version_ext.h>
41
42namespace sc_core {
43
44    EXTERN void initialize() {
45        casc_check_version(SYSTEMC_VERSION);
46    }
47
48    EXTERN void simulate_1_cycle(void) {
49        transition();
50        update();
51        moore_generation();
52        mealy_generation(); 
53    }
54} // end of sc_core namespace
55
56#endif
57
58#endif
59
60/*
61# Local Variables:
62# tab-width: 4;
63# c-basic-offset: 4;
64# c-file-offsets:((innamespace . 0)(inline-open . 0));
65# indent-tabs-mode: nil;
66# End:
67#
68# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
69*/
70
Note: See TracBrowser for help on using the repository browser.