sc_event.hh (13303:045f002c325c) sc_event.hh (13324:c8b709468e61)
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#ifndef __SYSTEMC_EXT_CORE_SC_EVENT_HH__
31#define __SYSTEMC_EXT_CORE_SC_EVENT_HH__
32
33#include <cassert>
34#include <set>
35#include <sstream>
36#include <vector>
37
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#ifndef __SYSTEMC_EXT_CORE_SC_EVENT_HH__
31#define __SYSTEMC_EXT_CORE_SC_EVENT_HH__
32
33#include <cassert>
34#include <set>
35#include <sstream>
36#include <vector>
37
38#include "../channel/messages.hh"
38#include "../utils/sc_report_handler.hh"
39#include "sc_port.hh"
40#include "sc_time.hh"
41
42namespace sc_gem5
43{
44
45class Event;

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

242 {
243 static const sc_gem5::InternalScEvent none;
244 const IF *iface = if_p ? dynamic_cast<const IF *>(if_p) :
245 dynamic_cast<const IF *>(_port->get_interface());
246 if (!iface) {
247 std::ostringstream ss;
248 ss << "port is not bound: port '" << _port->name() << "' (" <<
249 _port->kind() << ")";
39#include "../utils/sc_report_handler.hh"
40#include "sc_port.hh"
41#include "sc_time.hh"
42
43namespace sc_gem5
44{
45
46class Event;

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

243 {
244 static const sc_gem5::InternalScEvent none;
245 const IF *iface = if_p ? dynamic_cast<const IF *>(if_p) :
246 dynamic_cast<const IF *>(_port->get_interface());
247 if (!iface) {
248 std::ostringstream ss;
249 ss << "port is not bound: port '" << _port->name() << "' (" <<
250 _port->kind() << ")";
250 SC_REPORT_ERROR("(E118) find event failed", ss.str().c_str());
251 SC_REPORT_ERROR(SC_ID_FIND_EVENT_, ss.str().c_str());
251 return none;
252 }
253 return (const_cast<IF *>(iface)->*_method)();
254 }
255
256 private:
257 const sc_port_b<IF> *_port;
258 const sc_event &(IF::*_method)() const;

--- 20 unchanged lines hidden ---
252 return none;
253 }
254 return (const_cast<IF *>(iface)->*_method)();
255 }
256
257 private:
258 const sc_port_b<IF> *_port;
259 const sc_event &(IF::*_method)() const;

--- 20 unchanged lines hidden ---