OpenCores
URL https://opencores.org/ocsvn/riscv_vhdl/riscv_vhdl/trunk

Subversion Repositories riscv_vhdl

[/] [riscv_vhdl/] [trunk/] [debugger/] [src/] [socsim_plugin/] [pnp.h] - Blame information for rev 4

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 4 sergeykhbr
/**
2
 * @file
3
 * @copyright  Copyright 2016 GNSS Sensor Ltd. All right reserved.
4
 * @author     Sergey Khabarov - sergeykhbr@gmail.com
5
 * @brief      Plug'n'Play device functional model.
6
 */
7
 
8
#ifndef __DEBUGGER_SOCSIM_PLUGIN_PNP_H__
9
#define __DEBUGGER_SOCSIM_PLUGIN_PNP_H__
10
 
11
#include "iclass.h"
12
#include "iservice.h"
13
#include "coreservices/imemop.h"
14
#include "coreservices/isocinfo.h"
15
 
16
namespace debugger {
17
 
18
class PNP : public IService,
19
            public IMemoryOperation {
20
public:
21
    PNP(const char *name);
22
    ~PNP();
23
 
24
    /** IService interface */
25
    virtual void postinitService();
26
 
27
    /** IMemoryOperation */
28
    virtual ETransStatus b_transport(Axi4TransactionType *trans);
29
 
30
private:
31
    void addMaster(unsigned idx, unsigned vid, unsigned did);
32
    void addSlave(uint64_t addr, uint64_t size, unsigned irq,
33
                  unsigned vid, unsigned did);
34
 
35
    AttributeType tech_;
36
    AttributeType adc_detector_;
37
 
38
    PnpMapType regs_;
39
    union DescriptorTableType {
40
        union DescriptorItemType {
41
            MasterConfigType mst;
42
            SlaveConfigType slv;
43
        } *item;
44
        uint8_t *buf;
45
    } iter_;
46
};
47
 
48
DECLARE_CLASS(PNP)
49
 
50
}  // namespace debugger
51
 
52
#endif  // __DEBUGGER_SOCSIM_PLUGIN_PNP_H__

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.