summaryrefslogtreecommitdiffstats
path: root/cpu8/cpu_not/cpu_not.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpu8/cpu_not/cpu_not.hpp')
-rw-r--r--cpu8/cpu_not/cpu_not.hpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/cpu8/cpu_not/cpu_not.hpp b/cpu8/cpu_not/cpu_not.hpp
new file mode 100644
index 0000000..a9c6d67
--- /dev/null
+++ b/cpu8/cpu_not/cpu_not.hpp
@@ -0,0 +1,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 \ No newline at end of file