summaryrefslogtreecommitdiffstats
path: root/cpu8/cpu_xor/cpu_xor.hpp
blob: 855125cf407c46dec2cb23ee5fd58c31ec713e31 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#ifndef __SYSC_CPU_XOR_HPP
#define __SYSC_CPU_XOR_HPP

#include "systemc.h"

SC_MODULE (cpu_xor) 
{
	sc_in <bool> in_a;
	sc_in <bool> in_b;
	sc_out <bool> out_c;

	void do_xor()
	{
		out_c.write( (in_a.read()^in_b.read()) );
	}

	SC_CTOR(cpu_xor)
	{
		SC_METHOD(do_xor);
		sensitive << in_a << in_b;
	}

};

#endif