Deleted Added
sdiff udiff text old ( 13065:eec7d19ac479 ) new ( 13135:4bb2f323fb1a )
full compact
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

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

27 * Authors: Gabe Black
28 */
29
30#include "base/logging.hh"
31#include "base/types.hh"
32#include "sim/core.hh"
33#include "sim/eventq.hh"
34#include "systemc/core/kernel.hh"
35#include "systemc/core/sched_event.hh"
36#include "systemc/core/scheduler.hh"
37#include "systemc/ext/channel/sc_clock.hh"
38#include "systemc/ext/core/sc_module.hh" // for sc_gen_unique_name
39
40namespace sc_gem5
41{
42

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

55 ::sc_core::sc_time _period) :
56 ScEvent([this]() { tick(); }),
57 clock(clock), _period(_period), _name(clock->name()),
58 funcWrapper(clock, to ? &::sc_core::sc_clock::tickUp :
59 &::sc_core::sc_clock::tickDown)
60 {
61 _name += (to ? ".up_tick" : ".down_tick");
62 _procName = _name + ".p";
63 p = newMethodProcess(_procName.c_str(), &funcWrapper);
64 scheduler.dontInitialize(p);
65 }
66
67 ~ClockTick()
68 {
69 if (scheduled())
70 scheduler.deschedule(this);
71 p->popListNode();

--- 97 unchanged lines hidden ---