Added namespace to project
This commit is contained in:
parent
fb84f197bf
commit
8d3d3bb35b
12
inc/Debug.h
12
inc/Debug.h
|
@ -20,27 +20,33 @@
|
||||||
#include "CPU.h"
|
#include "CPU.h"
|
||||||
#include "Memory.h"
|
#include "Memory.h"
|
||||||
|
|
||||||
|
namespace riscv_tlm {
|
||||||
|
|
||||||
class Debug : sc_core::sc_module {
|
class Debug : sc_core::sc_module {
|
||||||
public:
|
public:
|
||||||
|
|
||||||
Debug(CPU *cpu, Memory* mem);
|
Debug(riscv_tlm::CPU *cpu, Memory *mem);
|
||||||
|
|
||||||
~Debug() override;
|
~Debug() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static std::string compute_checksum_string(const std::string &msg);
|
static std::string compute_checksum_string(const std::string &msg);
|
||||||
|
|
||||||
void send_packet(int m_conn, const std::string &msg);
|
void send_packet(int m_conn, const std::string &msg);
|
||||||
|
|
||||||
std::string receive_packet();
|
std::string receive_packet();
|
||||||
|
|
||||||
void handle_gdb_loop();
|
void handle_gdb_loop();
|
||||||
|
|
||||||
static constexpr size_t bufsize = 1024 * 8;
|
static constexpr size_t bufsize = 1024 * 8;
|
||||||
char iobuf[bufsize]{};
|
char iobuf[bufsize]{};
|
||||||
int conn;
|
int conn;
|
||||||
CPU *dbg_cpu;
|
riscv_tlm::CPU *dbg_cpu;
|
||||||
Memory *dbg_mem;
|
Memory *dbg_mem;
|
||||||
tlm::tlm_generic_payload dbg_trans;
|
tlm::tlm_generic_payload dbg_trans;
|
||||||
unsigned char pyld_array[128]{};
|
unsigned char pyld_array[128]{};
|
||||||
std::unordered_set<uint32_t> breakpoints;
|
std::unordered_set<uint32_t> breakpoints;
|
||||||
};
|
};
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* INC_DEBUG_H_ */
|
#endif /* INC_DEBUG_H_ */
|
||||||
|
|
Loading…
Reference in New Issue