diff --git a/fpga/include/villas/fpga/ips/dma.hpp b/fpga/include/villas/fpga/ips/dma.hpp index bf46b46fc..69bafcc36 100644 --- a/fpga/include/villas/fpga/ips/dma.hpp +++ b/fpga/include/villas/fpga/ips/dma.hpp @@ -28,6 +28,7 @@ #include #include +#include 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; diff --git a/fpga/lib/ips/dma.cpp b/fpga/lib/ips/dma.cpp index 35a5f30b6..8e959f85a 100644 --- a/fpga/lib/ips/dma.cpp +++ b/fpga/lib/ips/dma.cpp @@ -26,7 +26,6 @@ #include -#include #include #include