Learn basics of SystemC
- Wikipedia
- Tutorial
- Doulos SystemC tutorial
- Counter with Testbench
- Asic World tutorial
- Getting Started
- Video tutorials
- Portuguese presentation
- Cmake
- Using Cmake libraries
- Cmake third party libraries
- Typical Linux CMake
- Google Test I
- Google Test II
- Installing Jenkins
- Jenkins long video tutorial
- Another Jenkins Tutorial
- Building C++ Tensorflow API
- Catch framework and Jenkins
- CMake, Google test and Jenkins
- Jenkins start after github commit
- It's not a language it's a C++ library
- Attempt to make HW/SW/Algo engineers to use the same language (C++)
- Not supported by much FPGA vendors
// All systemc modules should include systemc.h header file
#include "systemc.h"
// Hello_world is module name
SC_MODULE (hello_world) {
SC_CTOR (hello_world) {
// Nothing in constructor
}
void say_hello() {
//Print "Hello World" to the console.
cout << "Hello World.\n";
}
};
// sc_main in top level function like in C++ main
int sc_main(int argc, char* argv[]) {
hello_world hello("HELLO");
// Print the hello world
hello.say_hello();
return(0);
}
#include "systemc.h"
SC_MODULE (half_add) {
// Input and Output ports
sc_out<sc_logic> s,c;
sc_in<sc_logic> a,b;
// Pure C++ coder here (For synthesis depends on HLS power...)
void compute(){
s = a ^ b; // a XOR b
c = a & b; // a AND b
}
SC_CTOR (half_add) {
// Kind of always_comb block (Sensitive to a and b)
SC_METHOD(compute);
sensitive << a << b;
}
};
g++ adder.cpp -I/systemc-2.3.2/include -L/systemc-2.3.2/lib-linux64 -lsystemc -o adder
g++ test_adder.cpp -I/systemc-2.3.2/include -L/systemc-2.3.2/lib-linux64 -lsystemc -lgtest -lgtest_main -lpthread -o test_adder
mkdir build; cd build
cmake ..
make