1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-30 00:00:11 +01:00

register: increase register num to 8

the VHDL changed so we need to change register here too

Signed-off-by: Niklas Eiling <niklas.eiling@eonerc.rwth-aachen.de>
This commit is contained in:
Niklas Eiling 2024-02-26 11:06:13 +01:00 committed by Niklas Eiling
parent 4b7ed781c0
commit fb742dddd1
2 changed files with 6 additions and 3 deletions

View file

@ -27,7 +27,7 @@ public:
void resetAllRegisters();
protected:
const size_t registerNum = 4;
const size_t registerNum = 8;
const size_t registerSize = 32;
static constexpr char registerMemory[] = "reg0";
std::list<MemoryBlockName> getMemoryBlocks() const {

View file

@ -39,11 +39,14 @@ bool Register::check() {
resetAllRegisters();
for (size_t i = 0; i < registerNum; i++) {
logger->trace("Register {}: 0x{:08x}", i, getRegister(i));
logger->debug("Register {}: 0x{:08x}", i, getRegister(i));
}
// This is Dino specific for now - we should possibly move this to Dino in the future
setRegister(0, static_cast<uint32_t>(1000)); // set Dino to a rate of 20 kHz
// setRegister(0, static_cast<uint32_t>(1000)); // set Dino to a rate of 20 kHz
setRegister(0, static_cast<uint32_t>(100000)); // set Dino to a rate of 20 kHz
setRegister(1, -0.001615254F);
setRegister(2, 10.8061F);
uint32_t rate = getRegister(0);
float scale = getRegisterFloat(1);
float offset = getRegisterFloat(2);