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:
parent
4b7ed781c0
commit
fb742dddd1
2 changed files with 6 additions and 3 deletions
|
@ -27,7 +27,7 @@ public:
|
||||||
void resetAllRegisters();
|
void resetAllRegisters();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
const size_t registerNum = 4;
|
const size_t registerNum = 8;
|
||||||
const size_t registerSize = 32;
|
const size_t registerSize = 32;
|
||||||
static constexpr char registerMemory[] = "reg0";
|
static constexpr char registerMemory[] = "reg0";
|
||||||
std::list<MemoryBlockName> getMemoryBlocks() const {
|
std::list<MemoryBlockName> getMemoryBlocks() const {
|
||||||
|
|
|
@ -39,11 +39,14 @@ bool Register::check() {
|
||||||
resetAllRegisters();
|
resetAllRegisters();
|
||||||
|
|
||||||
for (size_t i = 0; i < registerNum; i++) {
|
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
|
// 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);
|
uint32_t rate = getRegister(0);
|
||||||
float scale = getRegisterFloat(1);
|
float scale = getRegisterFloat(1);
|
||||||
float offset = getRegisterFloat(2);
|
float offset = getRegisterFloat(2);
|
||||||
|
|
Loading…
Add table
Reference in a new issue