|
Last change
on this file since 65 was
65,
checked in by bouyer, 6 years ago
|
|
Various performance improvements for the parallel systemcass: cache-aligned
data structures, write only when needed, disable some unneeded barriers.
Fix bug in the non-openmp case: a pointer was not initialized
various style updates
|
|
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 | |
|---|
| 24 | EXTERN char unstable; |
|---|
| 25 | EXTERN int32_t *pending_write_vector_nb; |
|---|
| 26 | #ifdef _OPENMP |
|---|
| 27 | #pragma omp threadprivate (pending_write_vector_nb) |
|---|
| 28 | #endif |
|---|
| 29 | |
|---|
| 30 | namespace 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 | |
|---|
| 42 | namespace 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.