summaryrefslogtreecommitdiff
path: root/cpu8/cpu_add/cpu_and.hpp
diff options
context:
space:
mode:
authorFreeArtMan <dos21h@gmail.com>2018-10-14 14:07:48 +0100
committerFreeArtMan <dos21h@gmail.com>2018-10-14 14:07:48 +0100
commit7369b3610373baffa47c049eb7e7c637c02ff9ef (patch)
treedfe8580d75afe2cc10e308bc2fb2a97ecc945636 /cpu8/cpu_add/cpu_and.hpp
parent4ea2be2ca3a5945abd6f36d2ac0cb1eb05613a45 (diff)
downloadcpu8-7369b3610373baffa47c049eb7e7c637c02ff9ef.tar.gz
cpu8-7369b3610373baffa47c049eb7e7c637c02ff9ef.zip
Added hello world example
Diffstat (limited to 'cpu8/cpu_add/cpu_and.hpp')
-rw-r--r--cpu8/cpu_add/cpu_and.hpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/cpu8/cpu_add/cpu_and.hpp b/cpu8/cpu_add/cpu_and.hpp
new file mode 100644
index 0000000..a547f5d
--- /dev/null
+++ b/cpu8/cpu_add/cpu_and.hpp
@@ -0,0 +1,25 @@
+#ifndef __SYSC_CPU_ADD_HPP
+#define __SYSC_CPU_ADD_HPP
+
+#include "systemc.h"
+
+SC_MODULE (cpu_and)
+{
+ sc_in <bool> in_a;
+ sc_in <bool> in_b;
+ sc_out <bool> out_c;
+
+ void do_and()
+ {
+ out_c.write( in_a.read() && in_b.read() );
+ }
+
+ SC_CTOR(cpu_and)
+ {
+ SC_METHOD(do_and);
+ sensitive << in_a << in_b;
+ }
+
+};
+
+#endif \ No newline at end of file