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

ips/dma: fix hasScatterGather using wrong member variable; Throw error used on unconfigured Dma

This commit is contained in:
Niklas Eiling 2022-11-08 10:36:42 -05:00 committed by Steffen Vogel
parent 49db359851
commit e4a469f99f
2 changed files with 5 additions and 3 deletions

View file

@ -28,6 +28,7 @@
#include <villas/memory.hpp>
#include <villas/fpga/node.hpp>
#include <villas/exceptions.hpp>
namespace villas {
namespace fpga {
@ -65,7 +66,10 @@ public:
inline bool
hasScatterGather() const
{
return hasSG;
if (!configSet)
throw RuntimeError("DMA has not been configured yet");
return xConfig.HasSg;
}
const StreamVertex&
@ -126,7 +130,6 @@ private:
XAxiDma xDma;
XAxiDma_Config xConfig;
bool hasSG;
bool configSet = false;
bool polling = false;

View file

@ -26,7 +26,6 @@
#include <xilinx/xaxidma.h>
#include <villas/exceptions.hpp>
#include <villas/memory.hpp>
#include <villas/fpga/card.hpp>