sc_clock.cc (13324:c8b709468e61) sc_clock.cc (13379:c4765c7fa0df)
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

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

42#include "systemc/ext/utils/sc_report_handler.hh"
43
44namespace sc_gem5
45{
46
47class ClockTick : public ScEvent
48{
49 private:
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

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

42#include "systemc/ext/utils/sc_report_handler.hh"
43
44namespace sc_gem5
45{
46
47class ClockTick : public ScEvent
48{
49 private:
50 ::sc_core::sc_clock *clock;
51 ::sc_core::sc_time _period;
52 std::string name;
53 Process *p;
54 ProcessMemberFuncWrapper<::sc_core::sc_clock> funcWrapper;
55
56 public:
57 ClockTick(::sc_core::sc_clock *clock, bool to,
58 ::sc_core::sc_time _period) :
59 ScEvent([this]() { tick(); }),
50 ::sc_core::sc_time _period;
51 std::string name;
52 Process *p;
53 ProcessMemberFuncWrapper<::sc_core::sc_clock> funcWrapper;
54
55 public:
56 ClockTick(::sc_core::sc_clock *clock, bool to,
57 ::sc_core::sc_time _period) :
58 ScEvent([this]() { tick(); }),
60 clock(clock), _period(_period), name(clock->basename()), p(nullptr),
59 _period(_period), name(clock->basename()), p(nullptr),
61 funcWrapper(clock, to ? &::sc_core::sc_clock::tickUp :
62 &::sc_core::sc_clock::tickDown)
63 {
64 name += std::string(to ? "_posedge_action" : "_negedge_action");
65 name = ::sc_core::sc_gen_unique_name(name.c_str());
66 }
67
68 void

--- 132 unchanged lines hidden ---
60 funcWrapper(clock, to ? &::sc_core::sc_clock::tickUp :
61 &::sc_core::sc_clock::tickDown)
62 {
63 name += std::string(to ? "_posedge_action" : "_negedge_action");
64 name = ::sc_core::sc_gen_unique_name(name.c_str());
65 }
66
67 void

--- 132 unchanged lines hidden ---