SystemC Library API Reference Manual
Reference documentation for the Simics SystemC Library.
 
Loading...
Searching...
No Matches
trace_event_all_dynamic.h
Go to the documentation of this file.
1// -*- mode: C++; c-file-style: "virtutech-c++" -*-
2
3/*
4 © 2016 Intel Corporation
5
6 This software and the related documents are Intel copyrighted materials, and
7 your use of them is governed by the express license under which they were
8 provided to you ("License"). Unless the License provides otherwise, you may
9 not use, modify, copy, publish, distribute, disclose or transmit this software
10 or the related documents without Intel's prior written permission.
11
12 This software and the related documents are provided as is, with no express or
13 implied warranties, other than those that are expressly stated in the License.
14*/
15
16#ifndef SIMICS_SYSTEMC_TRACE_EVENT_ALL_DYNAMIC_H
17#define SIMICS_SYSTEMC_TRACE_EVENT_ALL_DYNAMIC_H
18
19#include <simics/cc-api.h>
20#include <simics/simulator/sim-get-class.h>
25
26namespace simics {
27namespace systemc {
28
30class TraceEventAllDynamic : public simics::ConfObject,
34 public:
35 explicit TraceEventAllDynamic(simics::ConfObjectRef o) : ConfObject(o) {
36 }
37 void init(SimulationInterface *simulation) {
38 setSimulation(simulation);
39 }
41 void event_callback(const char *event_type,
42 const char *event_class_type,
43 void *event_object,
44 const sc_core::sc_time &ts) {
46 triggered, NULL,
47 event_type, event_class_type, event_object,
48 const_cast<sc_core::sc_time *>(&ts));
49 }
50 static conf_class_t *initClass() {
51 conf_class_t *cls = SIM_get_class("ScEventObjectAllDynamic");
52 if (SIM_clear_exception() == SimExc_No_Exception) {
53 return cls;
54 }
55
56 auto new_cls = make_class<TraceEventAllDynamic>(
57 "ScEventObjectAllDynamic",
58 "All dynamic SystemC events",
59 "Helper class to attach SystemC Tools on dynamically created "
60 "SystemC events.",
61 Sim_Class_Kind_Pseudo);
62
64 TraceEventAllDynamic> sc_provider_controller_adapter;
65 SIM_register_interface(*new_cls.get(), SC_PROVIDER_CONTROLLER_INTERFACE,
66 sc_provider_controller_adapter.cstruct());
67 return *new_cls.get();
68 }
69};
70
71} // namespace systemc
72} // namespace simics
73
74#endif
Definition: trace_monitor_interface.h:30
Interface to the SystemC simulation.
Definition: simulation_interface_proxy.h:27
void setSimulation(iface::SimulationInterface *simulation)
Definition: simulation_interface_proxy.h:32
Definition: trace_event_all_dynamic.h:33
void init(SimulationInterface *simulation)
Definition: trace_event_all_dynamic.h:37
virtual void connection_list_updated(ConnectionListState state)
void event_callback(const char *event_type, const char *event_class_type, void *event_object, const sc_core::sc_time &ts)
Definition: trace_event_all_dynamic.h:41
TraceEventAllDynamic(simics::ConfObjectRef o)
Definition: trace_event_all_dynamic.h:35
static conf_class_t * initClass()
Definition: trace_event_all_dynamic.h:50
Definition: provider_controller_simics_adapter.h:36
Definition: tool_controller_event_action.h:27
ConnectionListState
Definition: tool_controller.h:76
conf_class_t * SIM_get_class(const char *NOTNULL name)
Definition: pci_bus_interface.h:24
#define DISPATCH_TOOL_CHAIN_THIS(iface_type, func,...)
Definition: tool_controller.h:64