-
Notifications
You must be signed in to change notification settings - Fork 6
/
MemoryAccessPort.hpp
37 lines (26 loc) · 999 Bytes
/
MemoryAccessPort.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#ifndef MEMORY_ACCESS_PORT_HPP_INCLUDED
#define MEMORY_ACCESS_PORT_HPP_INCLUDED
#include <stdint.h>
class DebugPort;
class MemoryAccessPort {
public:
MemoryAccessPort(DebugPort *debugPort, unsigned int apSel);
~MemoryAccessPort();
uint32_t getIdCode();
uint32_t readWord(uint32_t address);
uint32_t writeWord(uint32_t address, uint32_t value);
uint32_t readHalf(uint32_t address);
uint32_t writeHalf(uint32_t address, uint32_t value);
void readBlock(uint32_t address, uint32_t count, uint32_t *buffer);
void writeBlock(uint32_t address, uint32_t count, const uint32_t *buffer);
void writeBlockNonInc(uint32_t address,
uint32_t count,
const uint32_t *buffer);
void writeHalfs(uint32_t address, uint32_t count, const uint32_t *buffer);
void writeHalfsVerify(uint32_t address, uint32_t count, const uint32_t *buffer);
private:
void csw(unsigned int addrInc, unsigned int size);
DebugPort *debugPort;
unsigned int apSel;
};
#endif