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

Subversion Repositories riscv_vhdl

[/] [riscv_vhdl/] [trunk/] [debugger/] [src/] [libdbg64g/] [services/] [mem/] [memsim.h] - Blame information for rev 2

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 sergeykhbr
/**
2
 * @file
3
 * @copyright  Copyright 2016 GNSS Sensor Ltd. All right reserved.
4
 * @author     Sergey Khabarov - sergeykhbr@gmail.com
5
 * @brief      ROM functional model declaration.
6
 */
7
 
8
#ifndef __DEBUGGER_SOCSIM_PLUGIN_ROM_H__
9
#define __DEBUGGER_SOCSIM_PLUGIN_ROM_H__
10
 
11
#include "iclass.h"
12
#include "iservice.h"
13
#include "coreservices/imemop.h"
14
 
15
namespace debugger {
16
 
17
class MemorySim : public IService,
18
                  public IMemoryOperation {
19
public:
20
    MemorySim(const char *name);
21
    ~MemorySim();
22
 
23
    /** IService interface */
24
    virtual void postinitService();
25
 
26
    /** IMemoryOperation */
27
    virtual void b_transport(Axi4TransactionType *trans);
28
 
29
    virtual uint64_t getBaseAddress() {
30
        return baseAddress_.to_uint64();
31
    }
32
    virtual uint64_t getLength() {
33
        return length_.to_uint64();
34
    }
35
 
36
private:
37
    static const int SYMB_IN_LINE = 16/2;
38
    bool chishex(int s);
39
    uint8_t chtohex(int s);
40
 
41
private:
42
    AttributeType initFile_;
43
    AttributeType readOnly_;
44
    AttributeType baseAddress_;
45
    AttributeType length_;
46
    uint8_t *mem_;
47
};
48
 
49
DECLARE_CLASS(MemorySim)
50
 
51
}  // namespace debugger
52
 
53
#endif  // __DEBUGGER_SOCSIM_PLUGIN_ROM_H__

powered by: WebSVN 2.1.0

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