Commit 50201a93 authored by rmrf's avatar rmrf
Browse files

Add test

parent c4e46ea4
...@@ -10,7 +10,7 @@ set -x LLVM_BUILD_DIR /home/$USER/bin/clang-7.0.0/ ...@@ -10,7 +10,7 @@ set -x LLVM_BUILD_DIR /home/$USER/bin/clang-7.0.0/
# Path where SystemC is installed # Path where SystemC is installed
# SET this. # SET this.
set -x SYSTEMC /home/$USER/code/systemc-2.3.3/systemc/ set -x SYSTEMC /home/$USER/code/systemc-2.3.3/systemc
# Path for the systemc-clang build directory # Path for the systemc-clang build directory
# SET this. # SET this.
......
#include "systemc.h" #include "systemc.h"
SC_MODULE( test ){ SC_MODULE( test ){
sc_in<int> in; sc_in<int> in;
sc_out<int> out; sc_out<int> out;
sc_signal<int> test_signal; sc_signal<int> test_signal;
void entry_function_1() { void entry_function_1() {
while(true) { while(true) {
// do nothing // do nothing
} }
} }
void entry_function_2() { void entry_function_2() {
while(true) { while(true) {
// do nothing // do nothing
} }
} }
SC_CTOR( test ) { SC_CTOR( test ) {
SC_THREAD(entry_function_1); SC_THREAD(entry_function_1);
SC_THREAD(entry_function_2); SC_THREAD(entry_function_2);
} }
}; };
int sc_main(int argc, char *argv[]) { int sc_main(int argc, char *argv[]) {
sc_signal<int> sig1;
sc_signal<int> sig1;
test test_instance("testing"); test test_instance("testing");
test_instance.in(sig1); test_instance.in(sig1);
test_instance.out(sig1); test_instance.out(sig1);
return 0; return 0;
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment