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// -*- mode: C++; c-file-style: "virtutech-c++" -*-
2
3/*
4 © 2018 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_TLM2SIMICS_I2C_SLAVE_V2_H
17#define SIMICS_SYSTEMC_TLM2SIMICS_I2C_SLAVE_V2_H
18
24
25#include <stdint.h>
26#include <vector>
27
28namespace simics {
29namespace systemc {
30namespace tlm2simics {
31
36 public TransactionHandler,
38 public:
39 I2cSlaveV2() : InterfaceProvider("i2c_slave_v2"),
41 iface::I2cSlaveV2Extension::createIgnoreReceiver()),
42 receiver_(
43 iface::I2cSlaveV2Extension::createReceiver(this)) {}
44 virtual ~I2cSlaveV2();
45
46 // I2cSlaveV2Interface
47 void start(uint8_t address) override;
48 void read() override;
49 void write(uint8_t value) override;
50 void stop() override;
51 std::vector<uint8_t> addresses() override;
52 // TransactionHandler
54
55 private:
56 tlm::tlm_response_status simics_transaction(
57 ConfObjectRef &simics_obj,
58 tlm::tlm_generic_payload *trans) override;
59 iface::ReceiverInterface *receiver_;
60};
61
62} // namespace tlm2simics
63} // namespace systemc
64} // namespace simics
65
66#endif
Returns the interface provided by the associated Simics object.
Definition: interface_provider.h:32
Definition: i2c_slave_v2_interface.h:26
Interface implemented by the ExtensionReceiver class, used by the ExtensionDispatcher.
Definition: receiver_interface.h:29
Protocol specific transaction handler for Simics i2c_slave_v2 interface.
Definition: i2c_slave_v2.h:37
void write(uint8_t value) override
I2cSlaveV2()
Definition: i2c_slave_v2.h:39
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:36
Definition: pci_bus_interface.h:24