summaryrefslogtreecommitdiffstats
path: root/cpu8/cpu_nand/cpu_nand.hpp
blob: 5e5e517ab34ec718f309549be7186ebc09ab3d5b (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_NAND_HPP
#define __SYSC_CPU_NAND_HPP

#include "systemc.h"

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

	void do_nand()
	{
		out_c.write( !(in_a.read() && in_b.read()) );
	}

	SC_CTOR(cpu_nand)
	{
		SC_METHOD(do_nand);
		sensitive << in_a << in_b;
	}

};

#endif