qualcomm/qbox
Loading...
Searching...
No Matches
qupv3_qupv3_se_wrapper_se0_i2c.h
1/*
2 * Copyright (c) 2024-2025 Qualcomm Innovation Center, Inc. All Rights Reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#ifndef qupv3_qupv3_se_wrapper_se0_i2c_H
8#define qupv3_qupv3_se_wrapper_se0_i2c_H
9
10#include "qupv3_qupv3_se_wrapper_se0.h"
11
12namespace quic {
13class qupv3_qupv3_se_wrapper_se0_i2c : public qupv3_qupv3_se_wrapper_se0, public qupv3_qupv3_se_wrapper_se0_gen_i2c
14{
15 uint32_t bytes_in_fifo = 0;
16 uint32_t tx_trans_len = 0;
17 uint32_t rx_trans_len = 0; // Decremented once SW reads the byte in GENI_RX_FIFO.post_read
18 int32_t rx_remaining_bytes = 0; // Decremented in receive method
19
20 struct Configure {
21 bool opcode_set;
22 bool tx_len_set;
23 bool rx_len_set;
24 void reset()
25 {
26 opcode_set = false;
27 tx_len_set = false;
28 rx_len_set = false;
29 }
30 };
31 Configure config; // only send transaction if opcode and trans_len are configured, set to false again once the
32 // send_txn is called
33
34 void update_irq() override;
35 void receive(tlm::tlm_generic_payload& txn, sc_core::sc_time& t) override;
36 void update_RX_FIFO_STATUS();
37 void send_txn();
38
39public:
40 qupv3_qupv3_se_wrapper_se0_i2c(sc_core::sc_module_name _name);
41 void start_of_simulation() override;
42 void end_of_elaboration() override;
43 void do_reset(bool value) override;
44};
45} // namespace quic
46#endif
Definition aoss_pmic_arb_pmic_arb_core.h:27