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

Subversion Repositories riscv_vhdl

[/] [riscv_vhdl/] [trunk/] [debugger/] [src/] [socsim_plugin/] [rfctrl.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 2017 GNSS Sensor Ltd. All right reserved.
4
 * @author     Sergey Khabarov - sergeykhbr@gmail.com
5
 * @brief      RF front-end black-box model.
6
 */
7
 
8
#ifndef __DEBUGGER_SOCSIM_PLUGIN_RFCTRL_H__
9
#define __DEBUGGER_SOCSIM_PLUGIN_RFCTRL_H__
10
 
11
#include "iclass.h"
12
#include "iservice.h"
13
#include "coreservices/imemop.h"
14
 
15
namespace debugger {
16
 
17
class RfController : public IService,
18
                     public IMemoryOperation {
19
public:
20
    RfController(const char *name);
21
    ~RfController();
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
    AttributeType baseAddress_;
38
    AttributeType length_;
39
 
40
    struct rfctrl_map {
41
        volatile uint32_t conf1;                // 0x00
42
        volatile uint32_t conf2;                // 0x04
43
        volatile uint32_t conf3;                // 0x08/
44
        volatile uint32_t pllconf;              // 0x0C/
45
        volatile uint32_t div;          // 0x10
46
        volatile uint32_t fdiv;         // 0x14
47
        volatile uint32_t strm;         // 0x18
48
        volatile uint32_t clkdiv;               // 0x1C
49
        volatile uint32_t test1;                // 0x20
50
        volatile uint32_t test2;                // 0x24
51
        volatile uint32_t scale;                // 0x28
52
        volatile uint32_t run;              // 0x2C
53
        volatile uint32_t reserved1[3]; // 0x30,0x34,0x38
54
        volatile uint32_t rw_ant_status;// 0x3C
55
    } regs_;
56
};
57
 
58
DECLARE_CLASS(RfController)
59
 
60
}  // namespace debugger
61
 
62
#endif  // __DEBUGGER_SOCSIM_PLUGIN_RFCTRL_H__

powered by: WebSVN 2.1.0

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