Deleted Added
sdiff udiff text old ( 13006:f4e4f859d114 ) new ( 13063:c9905ead0041 )
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

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

34#include "systemc/core/scheduler.hh"
35#include "systemc/ext/core/sc_process_handle.hh"
36#include "systemc/ext/utils/sc_report_handler.hh"
37
38namespace sc_gem5
39{
40
41SensitivityTimeout::SensitivityTimeout(Process *p, ::sc_core::sc_time t) :
42 Sensitivity(p), timeoutEvent(this), time(t)
43{
44 Tick when = scheduler.getCurTick() + time.value();
45 scheduler.schedule(&timeoutEvent, when);
46}
47
48SensitivityTimeout::~SensitivityTimeout()
49{
50 if (timeoutEvent.scheduled())
51 scheduler.deschedule(&timeoutEvent);
52}
53
54void
55SensitivityTimeout::timeout()
56{
57 scheduler.eventHappened();
58 notify();
59}
60
61SensitivityEvent::SensitivityEvent(
62 Process *p, const ::sc_core::sc_event *e) : Sensitivity(p), event(e)
63{
64 Event::getFromScEvent(event)->addSensitivity(this);
65}

--- 332 unchanged lines hidden ---