sc_module.cc (13146:3539fe351218) sc_module.cc (13155:4e77f1d0cdc3)
1/*
2 * Copyright 2018 Google, Inc.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met: redistributions of source code must retain the above copyright
7 * notice, this list of conditions and the following disclaimer;
8 * redistributions in binary form must reproduce the above copyright

--- 21 unchanged lines hidden (view full) ---

30#include <memory>
31#include <string>
32#include <vector>
33
34#include "base/logging.hh"
35#include "systemc/core/kernel.hh"
36#include "systemc/core/module.hh"
37#include "systemc/core/process_types.hh"
1/*
2 * Copyright 2018 Google, Inc.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met: redistributions of source code must retain the above copyright
7 * notice, this list of conditions and the following disclaimer;
8 * redistributions in binary form must reproduce the above copyright

--- 21 unchanged lines hidden (view full) ---

30#include <memory>
31#include <string>
32#include <vector>
33
34#include "base/logging.hh"
35#include "systemc/core/kernel.hh"
36#include "systemc/core/module.hh"
37#include "systemc/core/process_types.hh"
38#include "systemc/ext/channel/sc_signal_in_if.hh"
38#include "systemc/ext/core/sc_module.hh"
39#include "systemc/ext/core/sc_module_name.hh"
39#include "systemc/ext/core/sc_module.hh"
40#include "systemc/ext/core/sc_module_name.hh"
41#include "systemc/ext/dt/bit/sc_logic.hh"
40#include "systemc/ext/utils/sc_report_handler.hh"
41
42namespace sc_gem5
43{
44
45Process *
46newMethodProcess(const char *name, ProcessFuncWrapper *func)
47{

--- 619 unchanged lines hidden (view full) ---

667
668void
669halt()
670{
671 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
672}
673
674void
42#include "systemc/ext/utils/sc_report_handler.hh"
43
44namespace sc_gem5
45{
46
47Process *
48newMethodProcess(const char *name, ProcessFuncWrapper *func)
49{

--- 619 unchanged lines hidden (view full) ---

669
670void
671halt()
672{
673 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
674}
675
676void
675at_posedge(const sc_signal_in_if &)
677at_posedge(const sc_signal_in_if<bool> &s)
676{
678{
677 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
679 while (s.read())
680 wait();
681 while (!s.read())
682 wait();
678}
679
680void
683}
684
685void
681at_posedge(const sc_signal_in_if &)
686at_posedge(const sc_signal_in_if<sc_dt::sc_logic> &s)
682{
687{
683 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
688 while (s.read() == sc_dt::Log_1)
689 wait();
690 while (s.read() == sc_dt::Log_0)
691 wait();
684}
685
686void
692}
693
694void
687at_negedge(const sc_signal_in_if &)
695at_negedge(const sc_signal_in_if<bool> &s)
688{
696{
689 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
697 while (!s.read())
698 wait();
699 while (s.read())
700 wait();
690}
691
692void
701}
702
703void
693at_negedge(const sc_signal_in_if &)
704at_negedge(const sc_signal_in_if<sc_dt::sc_logic> &s)
694{
705{
695 warn("%s not implemented.\n", __PRETTY_FUNCTION__);
706 while (s.read() == sc_dt::Log_0)
707 wait();
708 while (s.read() == sc_dt::Log_1)
709 wait();
696}
697
698const char *
699sc_gen_unique_name(const char *seed)
700{
701 ::sc_gem5::Module *mod = ::sc_gem5::currentModule();
702 return mod ? mod->uniqueName(seed) :
703 ::sc_gem5::nameGen.gen(seed);

--- 30 unchanged lines hidden ---
710}
711
712const char *
713sc_gen_unique_name(const char *seed)
714{
715 ::sc_gem5::Module *mod = ::sc_gem5::currentModule();
716 return mod ? mod->uniqueName(seed) :
717 ::sc_gem5::nameGen.gen(seed);

--- 30 unchanged lines hidden ---