Rename vsrtl::SparseArray to vsrtl::AddressSpace
MODIFY
external/VSRTL
external/VSRTL
-Subproject commit 7f54ec518f403571334899e3248fffed5908e9a9
+Subproject commit b1f72f49b1b271fabbba9e8ef87ca6beddc7221f

MODIFY
src/io/iomanager.cpp
src/io/iomanager.cpp
#include <memory>
#include <ostream>
-#include "VSRTL/core/vsrtl_sparsearray.h"
+#include "VSRTL/core/vsrtl_addressspace.h"
namespace Ripes {
@@ -66,7 +66,7 @@ void IOManager::peripheralSizeChanged(IOBase* peripheral) {
}
void IOManager::registerPeripheralWithProcessor(IOBase* peripheral) {
- ProcessorHandler::getMemory().addRegion(
+ ProcessorHandler::getMemory().addIORegion(
m_periphMMappings.at(peripheral).startAddr, peripheral->byteSize(),
vsrtl::core::IOFunctors{
[peripheral](uint32_t offset, uint32_t value, uint32_t size) { peripheral->ioWrite(offset, value, size); },
@@ -83,7 +83,7 @@ void IOManager::registerPeripheralWithProcessor(IOBase* peripheral) {
void IOManager::unregisterPeripheralWithProcessor(IOBase* peripheral) {
const auto& mmEntry = m_periphMMappings.find(peripheral);
if (mmEntry != m_periphMMappings.end()) {
- ProcessorHandler::getMemory().removeRegion(mmEntry->second.startAddr, mmEntry->second.size);
+ ProcessorHandler::getMemory().removeIORegion(mmEntry->second.startAddr, mmEntry->second.size);
m_periphMMappings.erase(mmEntry);
}
}

MODIFY
src/processorhandler.cpp
src/processorhandler.cpp
@@ -76,7 +76,7 @@ void ProcessorHandler::_writeMem(uint32_t address, uint32_t value, int size) {
m_currentProcessor->getMemory().writeMem(address, value, size);
}
-vsrtl::core::SparseArrayMM& ProcessorHandler::_getMemory() {
+vsrtl::core::AddressSpaceMM& ProcessorHandler::_getMemory() {
return m_currentProcessor->getMemory();
}
@@ -87,7 +87,7 @@ const vsrtl::core::ROM<RV_REG_WIDTH, RV_INSTR_WIDTH>* ProcessorHandler::_getInst
return dynamic_cast<const vsrtl::core::ROM<RV_REG_WIDTH, RV_INSTR_WIDTH>*>(m_currentProcessor->getInstrMemory());
}
-const vsrtl::core::SparseArray& ProcessorHandler::_getRegisters() const {
+const vsrtl::core::AddressSpace& ProcessorHandler::_getRegisters() const {
return m_currentProcessor->getArchRegisters();
}

MODIFY
src/processorhandler.h
src/processorhandler.h
@@ -90,8 +90,8 @@ public:
* @brief getMemory & getRegisters
* returns const-wrapped references to the current process memory elements
*/
- static vsrtl::core::SparseArrayMM& getMemory() { return get()->_getMemory(); }
- static const vsrtl::core::SparseArray& getRegisters() { return get()->_getRegisters(); }
+ static vsrtl::core::AddressSpaceMM& getMemory() { return get()->_getMemory(); }
+ static const vsrtl::core::AddressSpace& getRegisters() { return get()->_getRegisters(); }
static const vsrtl::core::RVMemory<RV_REG_WIDTH, RV_REG_WIDTH>* getDataMemory() { return get()->_getDataMemory(); }
static const vsrtl::core::ROM<RV_REG_WIDTH, RV_INSTR_WIDTH>* getInstrMemory() { return get()->_getInstrMemory(); }
@@ -203,8 +203,8 @@ private:
int _getCurrentProgramSize() const;
unsigned long _getTextStart() const;
QString _disassembleInstr(const uint32_t address) const;
- vsrtl::core::SparseArrayMM& _getMemory();
- const vsrtl::core::SparseArray& _getRegisters() const;
+ vsrtl::core::AddressSpaceMM& _getMemory();
+ const vsrtl::core::AddressSpace& _getRegisters() const;
const vsrtl::core::RVMemory<RV_REG_WIDTH, RV_REG_WIDTH>* _getDataMemory() const;
const vsrtl::core::ROM<RV_REG_WIDTH, RV_INSTR_WIDTH>* _getInstrMemory() const;
void _setRegisterValue(RegisterFileType rfid, const unsigned idx, uint32_t value);

MODIFY
src/processors/RISC-V/rv5s/rv5s.h
src/processors/RISC-V/rv5s/rv5s.h
@@ -414,9 +414,9 @@ public:
propagateDesign();
}
void setPCInitialValue(uint32_t address) override { pc_reg->setInitValue(address); }
- SparseArrayMM& getMemory() override { return *m_memory; }
+ AddressSpaceMM& getMemory() override { return *m_memory; }
unsigned int getRegister(RegisterFileType rfid, unsigned i) const override { return registerFile->getRegister(i); }
- SparseArray& getArchRegisters() override { return *m_regMem; }
+ AddressSpace& getArchRegisters() override { return *m_regMem; }
void finalize(const FinalizeReason& fr) override {
if (fr.exitSyscall && !ecallChecker->isSysCallExiting()) {
// An exit system call was executed. Record the cycle of the execution, and enable the ecallChecker's system

MODIFY
src/processors/RISC-V/rv5s_no_fw_hz/rv5s_no_fw_hz.h
src/processors/RISC-V/rv5s_no_fw_hz/rv5s_no_fw_hz.h
@@ -341,9 +341,9 @@ public:
propagateDesign();
}
void setPCInitialValue(uint32_t address) override { pc_reg->setInitValue(address); }
- SparseArrayMM& getMemory() override { return *m_memory; }
+ AddressSpaceMM& getMemory() override { return *m_memory; }
unsigned int getRegister(RegisterFileType rfid, unsigned i) const override { return registerFile->getRegister(i); }
- SparseArray& getArchRegisters() override { return *m_regMem; }
+ AddressSpace& getArchRegisters() override { return *m_regMem; }
void finalize(const FinalizeReason& fr) override {
if (fr.exitSyscall && !ecallChecker->isSysCallExiting()) {
// An exit system call was executed. Record the cycle of the execution, and enable the ecallChecker's system

MODIFY
src/processors/RISC-V/rv5s_no_hz/rv5s_no_hz.h
src/processors/RISC-V/rv5s_no_hz/rv5s_no_hz.h
@@ -374,9 +374,9 @@ public:
propagateDesign();
}
void setPCInitialValue(uint32_t address) override { pc_reg->setInitValue(address); }
- SparseArrayMM& getMemory() override { return *m_memory; }
+ AddressSpaceMM& getMemory() override { return *m_memory; }
unsigned int getRegister(RegisterFileType rfid, unsigned i) const override { return registerFile->getRegister(i); }
- SparseArray& getArchRegisters() override { return *m_regMem; }
+ AddressSpace& getArchRegisters() override { return *m_regMem; }
void finalize(const FinalizeReason& fr) override {
if (fr.exitSyscall && !ecallChecker->isSysCallExiting()) {
// An exit system call was executed. Record the cycle of the execution, and enable the ecallChecker's system

MODIFY
src/processors/RISC-V/rv_registerfile.h
src/processors/RISC-V/rv_registerfile.h
@@ -90,7 +90,7 @@ public:
return regs;
}
- void setMemory(SparseArray* mem) {
+ void setMemory(AddressSpace* mem) {
m_memory = mem;
// All memory components must point to the same memory
_wr_mem->setMemory(m_memory);
@@ -99,7 +99,7 @@ public:
}
private:
- SparseArray* m_memory = nullptr;
+ AddressSpace* m_memory = nullptr;
};
} // namespace core

MODIFY
src/processors/RISC-V/rvss/rvss.h
src/processors/RISC-V/rvss/rvss.h
@@ -160,9 +160,9 @@ public:
propagateDesign();
}
void setPCInitialValue(uint32_t address) override { pc_reg->setInitValue(address); }
- SparseArrayMM& getMemory() override { return *m_memory; }
+ AddressSpaceMM& getMemory() override { return *m_memory; }
unsigned int getRegister(RegisterFileType rfid, unsigned i) const override { return registerFile->getRegister(i); }
- SparseArray& getArchRegisters() override { return *m_regMem; }
+ AddressSpace& getArchRegisters() override { return *m_regMem; }
void finalize(const FinalizeReason& fr) override {
if (fr.any()) {
// Allow one additional clock cycle to clear the current instruction

MODIFY
src/processors/ripesprocessor.h
src/processors/ripesprocessor.h
@@ -103,7 +103,7 @@ public:
* @brief getMemory
* @return reference to the address space utilized by the implementing processor
*/
- virtual SparseArrayMM& getMemory() = 0;
+ virtual AddressSpaceMM& getMemory() = 0;
/**
* @brief getData/InstrMemory
@@ -125,7 +125,7 @@ public:
* @brief getArchRegisters
* @return reference to the register address space utilized by the implementing processor
*/
- virtual SparseArray& getArchRegisters() = 0;
+ virtual AddressSpace& getArchRegisters() = 0;
/**
* @brief setRegister

Rename vsrtl::SparseArray to vsrtl::AddressSpace