A lesson on SystemC
Here’s a quick look at an example of SystemC code, your traditional NAND gate:
SC_MODULE(my_nand) {
sc_in<bool> a, b;
sc_out<bool> f;
void run() {
f = !(a && b);
}
SC_CTOR(my_nand) {
SC_METHOD(run);
sensitive << a << b;
}
};