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 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      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 ETransStatus b_transport(Axi4TransactionType *trans);
28
 
29
private:
30
    static const int SYMB_IN_LINE = 16/2;
31
    bool chishex(int s);
32
    uint8_t chtohex(int s);
33
 
34
private:
35
    AttributeType initFile_;
36
    AttributeType readOnly_;
37
    AttributeType binaryFile_;
38
    uint8_t *mem_;
39
};
40
 
41
DECLARE_CLASS(MemorySim)
42
 
43
}  // namespace debugger
44
 
45
#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.