#ifndef __SYSC_CPU_SRLATCH_HPP #define __SYSC_CPU_SRLATCH_HPP #include "systemc.h" #include "../cpu_or/cpu_or.hpp" #include "../cpu_not/cpu_not.hpp" SC_MODULE (cpu_srlatch) { //Inputs sc_in in_r; sc_in in_s; sc_out out_q,out_nq; cpu_or *or1,*or2; cpu_not *not1, *not2; sc_signal sig_or1not1, sig_or2not2; sc_signal sig_outq_ins, sig_outnq_inr; void do_srlatch() { } SC_CTOR(cpu_srlatch) { or1 = new cpu_or("OR1"); or2 = new cpu_or("OR2"); not1 = new cpu_not("NOT1"); not2 = new cpu_not("NOT2"); or1->in_a(in_r); or1->in_b(sig_outnq_inr); or1->out_c(sig_or1not1); or2->in_a(sig_outq_ins); or2->in_b(in_s); or2->out_c(sig_or2not2); not1->in_a(sig_or1not1); not1->out_b(out_q); not1->out_b(sig_outq_ins); not2->in_a(sig_or2not2); not2->out_b(out_nq); not2->out_b(sig_outnq_inr); //SC_METHOD(do_srlatch); //sensitive << in_r << in_s; } }; #endif