Commit 506f3190 authored by Steffen Vogel's avatar Steffen Vogel 🎅🏼
Browse files

aurora_axis: add two functions to reset counters and configure loopback mode

parent f608e839
Pipeline #293285 failed with stages
in 4 seconds
......@@ -69,10 +69,17 @@ public:
std::string
getDescription() const
{ return "Aurora 8B/10B and additional support modules, like, communication with NovaCor and read/write status/control registers."; }
{ return "Aurora 8B/10B and additional support modules, like an AXI4-Lite register interface."; }
Vlnv getCompatibleVlnv() const
{ return {"acs.eonerc.rwth-aachen.de:user:aurora_axis:"}; }
void
setLoopback(bool state);
void
resetFrameCounters();
};
} // namespace ip
......
......@@ -98,6 +98,27 @@ void Aurora::dump()
logger->info("Aurora frames sent: {}", outCnt);
}
void Aurora::setLoopback(bool state)
{
auto cr = readMemory<uint32_t>(registerMemory, AURORA_AXIS_CR_OFFSET);
if (state)
cr |= AURORA_AXIS_CR_LOOPBACK;
else
cr &= ~AURORA_AXIS_CR_LOOPBACK;
writeMemory<uint32_t>(registerMemory, AURORA_AXIS_CR_OFFSET, cr);
}
void Aurora::resetFrameCounters()
{
auto cr = readMemory<uint32_t>(registerMemory, AURORA_AXIS_CR_OFFSET);
cr |= AURORA_AXIS_CR_RST_CTRS;
writeMemory<uint32_t>(registerMemory, AURORA_AXIS_CR_OFFSET, cr);
}
AuroraFactory::AuroraFactory() :
IpNodeFactory(getName())
{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment