source: sources/test_regression/09092005/system.cpp @ 27

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

Initial import from CVS repository

File size: 640 bytes
Line 
1#include "systemc.h"
2#include <iostream>
3
4
5using namespace std;
6
7#define ADDRSIZE   32
8#define OFFSETSIZE 6
9#define BPFSIZE    3
10
11#define ASSERT(x) { if (!(x)) { \
12                      cerr << "ASSERT : " #x \
13                              "\n"; \
14                      exit (errnum); \
15                    } else errnum++; \
16                  }
17
18int
19sc_main (int argc, char ** argv)
20{
21  int errnum = 1;
22
23  sc_uint<ADDRSIZE> LINEADDR_MASK = ~(((sc_uint<ADDRSIZE>) ~0x0) >> (ADDRSIZE-OFFSETSIZE-BPFSIZE));
24//  cerr << "0x" << hex << (int)LINEADDR_MASK << "\n";
25  ASSERT(LINEADDR_MASK == 0xFFFFFE00);
26
27  cerr << "Test OK\n";
28
29  return 0;
30}
31
Note: See TracBrowser for help on using the repository browser.