Last change
on this file since 64 was
60,
checked in by meunier, 8 years ago
|
- Intégration des modifications de Clément,
qui a intégré la version parallélisée de systemcass
faite par Manuel.
|
File size:
819 bytes
|
Rev | Line | |
---|
[55] | 1 | |
---|
| 2 | #include <iostream> |
---|
| 3 | |
---|
| 4 | #include "systemc.h" |
---|
| 5 | #include "test.h" |
---|
| 6 | |
---|
| 7 | |
---|
| 8 | |
---|
| 9 | using namespace std; |
---|
| 10 | |
---|
| 11 | typedef sc_uint<36> data_type; |
---|
| 12 | |
---|
| 13 | int sc_main (int argc, char ** argv) { |
---|
| 14 | sc_uint<36> a, b, c; |
---|
| 15 | const long long int ca = 0xf00000000LLU; |
---|
| 16 | const long long int cb = 0x123456789LLU; |
---|
| 17 | a = ca; |
---|
| 18 | b = cb; |
---|
| 19 | |
---|
[60] | 20 | // Setup number of threads open-mp to 1 with the macro threads_omp() |
---|
| 21 | threads_omp(); |
---|
| 22 | |
---|
[55] | 23 | c = a & b; |
---|
| 24 | if (c != (ca & cb)) { |
---|
| 25 | return 1; |
---|
| 26 | } |
---|
| 27 | |
---|
| 28 | c = a; |
---|
| 29 | if (a != c) { |
---|
| 30 | return 1; |
---|
| 31 | } |
---|
| 32 | if (!(a == c)) { |
---|
| 33 | return 1; |
---|
| 34 | } |
---|
| 35 | |
---|
| 36 | cout << "OK" << endl; |
---|
| 37 | return 0; |
---|
| 38 | } |
---|
| 39 | |
---|
| 40 | |
---|
| 41 | /* |
---|
| 42 | # Local Variables: |
---|
| 43 | # tab-width: 4; |
---|
| 44 | # c-basic-offset: 4; |
---|
| 45 | # c-file-offsets:((innamespace . 0)(inline-open . 0)); |
---|
| 46 | # indent-tabs-mode: nil; |
---|
| 47 | # End: |
---|
| 48 | # |
---|
| 49 | # vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4 |
---|
| 50 | */ |
---|
| 51 | |
---|
Note: See
TracBrowser
for help on using the repository browser.