blob: 0c78dc048302b483e1fbc8a61f08e47ed4e2dc1f (
plain) (
tree)
|
|
#ifndef __SYSC_CPU_ADD_HPP
#define __SYSC_CPU_ADD_HPP
#include "systemc.h"
SC_MODULE (cpu_and)
{
sc_port<sc_signal_in_if<bool>,0> in_a;
sc_port<sc_signal_in_if<bool>,0> in_b;
sc_port<sc_signal_out_if<bool>,0> out_c;
void do_and()
{
out_c[0]->write( in_a[0]->read() && in_b[0]->read() );
}
SC_CTOR(cpu_and)
{
SC_METHOD(do_and);
sensitive << in_a << in_b;
}
};
#endif
|