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/process_types.hh" |
36#include "systemc/core/sched_event.hh" 37#include "systemc/core/scheduler.hh" 38#include "systemc/ext/channel/sc_clock.hh" 39#include "systemc/ext/core/sc_module.hh" // for sc_gen_unique_name 40 41namespace sc_gem5 42{ 43 --- 12 unchanged lines hidden (view full) --- 56 ::sc_core::sc_time _period) : 57 ScEvent([this]() { tick(); }), 58 clock(clock), _period(_period), _name(clock->name()), 59 funcWrapper(clock, to ? &::sc_core::sc_clock::tickUp : 60 &::sc_core::sc_clock::tickDown) 61 { 62 _name += (to ? ".up_tick" : ".down_tick"); 63 _procName = _name + ".p"; |
64 p = new Method(_procName.c_str(), &funcWrapper); 65 scheduler.reg(p); |
66 scheduler.dontInitialize(p); 67 } 68 69 ~ClockTick() 70 { 71 if (scheduled()) 72 scheduler.deschedule(this); 73 p->popListNode(); --- 97 unchanged lines hidden --- |