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