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