SystemC Library API Reference Manual
Reference documentation for the Simics SystemC Library.
 
Loading...
Searching...
No Matches
i2c_slave_v2.h
Go to the documentation of this file.
1/*
2 © 2018 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_TLM2SIMICS_I2C_SLAVE_V2_H
15#define SIMICS_SYSTEMC_TLM2SIMICS_I2C_SLAVE_V2_H
16
22
23#include <stdint.h>
24#include <vector>
25
26namespace simics {
27namespace systemc {
28namespace tlm2simics {
29
34 public TransactionHandler,
36 public:
37 I2cSlaveV2() : InterfaceProvider("i2c_slave_v2"),
39 iface::I2cSlaveV2Extension::createIgnoreReceiver()),
40 receiver_(
41 iface::I2cSlaveV2Extension::createReceiver(this)) {}
42 virtual ~I2cSlaveV2();
43
44 // I2cSlaveV2Interface
45 void start(uint8_t address) override;
46 void read() override;
47 void write(uint8_t value) override;
48 void stop() override;
49 std::vector<uint8_t> addresses() override;
50 // TransactionHandler
52
53 private:
54 tlm::tlm_response_status simics_transaction(
55 ConfObjectRef &simics_obj,
56 tlm::tlm_generic_payload *trans) override;
57 iface::ReceiverInterface *receiver_;
58};
59
60} // namespace tlm2simics
61} // namespace systemc
62} // namespace simics
63
64#endif
Returns the interface provided by the associated Simics object.
Definition: interface_provider.h:30
Definition: i2c_slave_v2_interface.h:24
Interface implemented by the ExtensionReceiver class, used by the ExtensionDispatcher.
Definition: receiver_interface.h:27
Protocol specific transaction handler for Simics i2c_slave_v2 interface.
Definition: i2c_slave_v2.h:35
void write(uint8_t value) override
I2cSlaveV2()
Definition: i2c_slave_v2.h:37
void start(uint8_t address) override
std::vector< uint8_t > addresses() override
iface::ReceiverInterface * receiver() override
Base class for transaction handlers without support for DMI.
Definition: transaction_handler.h:34
Definition: adapter.h:79