summaryrefslogtreecommitdiff
path: root/src/systemc/tests/systemc/bugs/bug_185/bug_185.cpp
blob: d314a35042537d3ea2e4be106db0e4c43c81ee7f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Bug 185 Test - sc_bv(char) constructor.
//
// sc_bv<8> a('1') was yielding an all-zero value rather than all ones.


#include "systemc.h"

int sc_main(int argc, char* argv[])
{
	sc_bv<8>  a('0');
	sc_bv<9>  b('1');
	sc_bv<11> c(false);
	sc_bv<11> d(true);
	sc_bv<11> e(0);
	sc_bv<11> f(1);

	cout << "a = " << a << endl;
	cout << "b = " << b << endl;
	cout << "c = " << c << endl;
	cout << "d = " << d << endl;
	cout << "e = " << e << endl;
	cout << "f = " << f << endl;

	cerr << "Program completed" << endl;
	return 0;
}