1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
#ifndef __SYSC_CPU_NAND_HPP #define __SYSC_CPU_NAND_HPP #include "systemc.h" SC_MODULE (cpu_not) { sc_in <bool> in_a; sc_out <bool> out_b; void do_not() { out_b.write( !in_a.read() ); } SC_CTOR(cpu_not) { SC_METHOD(do_not); sensitive << in_a; } }; #endif