Moved abstract command construction outside of loop. Didn't need to be there. Improved efficiency

This commit is contained in:
Nav
2023-11-25 19:39:34 +00:00
parent 9743e9a719
commit 35fef9b41b

View File

@@ -305,7 +305,6 @@ namespace Targets::RiscV
*/
this->riscVDebugInterface->writeDebugModuleRegister(RegisterAddress::ABSTRACT_DATA_1, startAddress);
for (auto address = startAddress; address <= (startAddress + bytes - 1); address += 4) {
auto command = AbstractCommandRegister();
command.commandType = AbstractCommandRegister::CommandType::MEMORY_ACCESS;
command.control = MemoryAccessControlField(
@@ -315,6 +314,7 @@ namespace Targets::RiscV
false
).value();
for (auto address = startAddress; address <= (startAddress + bytes - 1); address += 4) {
this->executeAbstractCommand(command);
const auto data = this->riscVDebugInterface->readDebugModuleRegister(RegisterAddress::ABSTRACT_DATA_0);