Skip to content

Commit ba3f8d2

Browse files
Create hello.cpp
1 parent 2a15c90 commit ba3f8d2

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

hello.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#include <systemc.h>
2+
3+
SC_MODULE (hello) { // module named hello
4+
SC_CTOR (hello) { //constructor phase, which is empty in this case
5+
}
6+
7+
void say_hello() {
8+
std::cout << "Hello World!" << std::endl;
9+
}
10+
};
11+
12+
int sc_main(int argc, char* argv[]) {
13+
hello h("hello");
14+
h.say_hello();
15+
return 0;
16+
}

0 commit comments

Comments
 (0)