applies clang-format and updates SystemC HTIF implementation

This commit is contained in:
2025-03-06 12:10:12 +01:00
parent 03cbd305c6
commit 383d762abc
7 changed files with 61 additions and 39 deletions

View File

@ -338,7 +338,7 @@ struct riscv_hart_common {
const auto fsize = pseg->get_file_size(); // 0x42c/0x0
const auto seg_data = pseg->get_data();
const auto type = pseg->get_type();
if(type == ELFIO::PT_LOAD && fsize > 0) {
if(type == ELFIO::PT_LOAD && fsize > 0) {
auto res = cb(pseg->get_physical_address(), fsize, reinterpret_cast<const uint8_t* const>(seg_data));
if(res != iss::Ok)
CPPLOG(ERR) << "problem writing " << fsize << "bytes to 0x" << std::hex << pseg->get_physical_address();

View File

@ -105,6 +105,8 @@ public:
using mem_read_f = iss::status(phys_addr_t addr, unsigned, uint8_t* const);
using mem_write_f = iss::status(phys_addr_t addr, unsigned, uint8_t const* const);
constexpr static unsigned MEM = traits<BASE>::MEM;
// primary template
template <class T, class Enable = void> struct hart_state {};
// specialization 32bit

View File

@ -103,6 +103,8 @@ public:
using rd_csr_f = iss::status (this_class::*)(unsigned addr, reg_t&);
using wr_csr_f = iss::status (this_class::*)(unsigned addr, reg_t);
constexpr static unsigned MEM = traits<BASE>::MEM;
// primary template
template <class T, class Enable = void> struct hart_state {};
// specialization 32bit

View File

@ -105,6 +105,8 @@ public:
using mem_read_f = iss::status(phys_addr_t addr, unsigned, uint8_t* const);
using mem_write_f = iss::status(phys_addr_t addr, unsigned, uint8_t const* const);
constexpr static unsigned MEM = traits<BASE>::MEM;
// primary template
template <class T, class Enable = void> struct hart_state {};
// specialization 32bit