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

Subversion Repositories riscv_vhdl

[/] [riscv_vhdl/] [trunk/] [debugger/] [src/] [libdbg64g/] [services/] [debug/] [edcl.h] - Blame information for rev 5

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 5 sergeykhbr
/**
2
 * @file
3
 * @copyright  Copyright 2016 GNSS Sensor Ltd. All right reserved.
4
 * @author     Sergey Khabarov - sergeykhbr@gmail.com
5
 * @brief      Access to a hardware via Ethernet EDCL interface implementaion.
6
 */
7
 
8
#ifndef __DEBUGGER_EDCL_H__
9
#define __DEBUGGER_EDCL_H__
10
 
11
#include "iclass.h"
12
#include "iservice.h"
13
#include "coreservices/itap.h"
14
#include "coreservices/ilink.h"
15
#include <inttypes.h>
16
 
17
namespace debugger {
18
 
19
class EdclService : public IService,
20
                    public ITap {
21
public:
22
    EdclService(const char *name);
23
 
24
    /** IService interface */
25
    virtual void postinitService();
26
 
27
    /** ITap interface */
28
    virtual int read(uint64_t addr, int bytes, uint8_t *obuf);
29
    virtual int write(uint64_t addr, int bytes, uint8_t *ibuf);
30
 
31
private:
32
    int write16(uint8_t *buf, int off, uint16_t v);
33
    int write32(uint8_t *buf, int off, uint32_t v);
34
    uint32_t read32(uint8_t *buf);
35
 
36
private:
37
    /** This is limitation of the MAC fifo. Protocol allows increase the
38
     * following value up to 242 words. */
39
    static const int EDCL_PAYLOAD_MAX_WORDS32 = 8;
40
    static const int EDCL_PAYLOAD_MAX_BYTES  = 4*EDCL_PAYLOAD_MAX_WORDS32;
41
 
42
    uint8_t tx_buf_[4096];
43
    uint8_t rx_buf_[4096];
44
    ILink *itransport_;
45
    AttributeType transport_;
46
    AttributeType seq_cnt_;
47
 
48
    int dbgRdTRansactionCnt_;
49
};
50
 
51
DECLARE_CLASS(EdclService)
52
 
53
}  // namespace debugger
54
 
55
#endif  // __DEBUGGER_EDCL_H__

powered by: WebSVN 2.1.0

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