summaryrefslogtreecommitdiff
path: root/cpu8/cpu_or/cpu_or.hpp
diff options
context:
space:
mode:
authorFreeArtMan <dos21h@gmail.com>2018-10-15 21:22:29 +0100
committerFreeArtMan <dos21h@gmail.com>2018-10-15 21:22:29 +0100
commit0b7dea3a6db1faf4abee5b3e724aeb03a15843f3 (patch)
tree736c2844a8b9e841e06b7ece1b74942f5ec31cc4 /cpu8/cpu_or/cpu_or.hpp
parent51c648ebba9db30856dbf0e646fe275720b59c42 (diff)
downloadcpu8-0b7dea3a6db1faf4abee5b3e724aeb03a15843f3.tar.gz
cpu8-0b7dea3a6db1faf4abee5b3e724aeb03a15843f3.zip
Add CPU OR
Diffstat (limited to 'cpu8/cpu_or/cpu_or.hpp')
-rw-r--r--cpu8/cpu_or/cpu_or.hpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/cpu8/cpu_or/cpu_or.hpp b/cpu8/cpu_or/cpu_or.hpp
new file mode 100644
index 0000000..75c637d
--- /dev/null
+++ b/cpu8/cpu_or/cpu_or.hpp
@@ -0,0 +1,27 @@
+#ifndef __SYSC_CPU_OR_HPP
+#define __SYSC_CPU_OR_HPP
+
+#include "systemc.h"
+
+SC_MODULE (cpu_or)
+{
+ sc_in <bool> in_a;
+ sc_in <bool> in_b;
+ sc_out <bool> out_c;
+
+ void do_or()
+ {
+ out_c.write( (in_a.read() || in_b.read()) );
+ }
+
+ SC_CTOR(cpu_or)
+ {
+ SC_METHOD(do_or);
+ sensitive << in_a << in_b;
+ }
+
+
+
+};
+
+#endif \ No newline at end of file