mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-30 00:00:11 +01:00
fpga: fix includes and various comments
Signed-off-by: Niklas Eiling <niklas.eiling@eonerc.rwth-aachen.de>
This commit is contained in:
parent
f1776f8be4
commit
c151be5cca
3 changed files with 12 additions and 11 deletions
|
@ -10,10 +10,12 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <fmt/ostream.h>
|
#include <fmt/ostream.h>
|
||||||
|
|
||||||
#include <villas/config.hpp>
|
#include <villas/config.hpp>
|
||||||
#include <villas/exceptions.hpp>
|
#include <villas/exceptions.hpp>
|
||||||
#include <villas/fpga/node.hpp>
|
#include <villas/fpga/node.hpp>
|
||||||
#include <villas/memory.hpp>
|
#include <villas/memory.hpp>
|
||||||
|
|
||||||
#include <xilinx/xaxidma.h>
|
#include <xilinx/xaxidma.h>
|
||||||
|
|
||||||
namespace villas {
|
namespace villas {
|
||||||
|
|
|
@ -1,24 +1,23 @@
|
||||||
/* DMA driver
|
/* DMA driver
|
||||||
*
|
*
|
||||||
* Author: Daniel Krebs <github@daniel-krebs.net>
|
|
||||||
* Author: Niklas Eiling <niklas.eiling@eonerc.rwth-aachen.de>
|
* Author: Niklas Eiling <niklas.eiling@eonerc.rwth-aachen.de>
|
||||||
* SPDX-FileCopyrightText: 2018 Institute for Automation of Complex Power Systems, RWTH Aachen University
|
* Author: Daniel Krebs <github@daniel-krebs.net>
|
||||||
|
* SPDX-FileCopyrightText: 2018-2024 Institute for Automation of Complex Power Systems, RWTH Aachen University
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "xilinx/xaxidma_bd.h"
|
|
||||||
#include "xilinx/xaxidma_hw.h"
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <xilinx/xaxidma.h>
|
|
||||||
|
|
||||||
#include <villas/memory.hpp>
|
|
||||||
|
|
||||||
#include <villas/fpga/card.hpp>
|
#include <villas/fpga/card.hpp>
|
||||||
#include <villas/fpga/ips/dma.hpp>
|
#include <villas/fpga/ips/dma.hpp>
|
||||||
#include <villas/fpga/ips/intc.hpp>
|
#include <villas/fpga/ips/intc.hpp>
|
||||||
|
#include <villas/memory.hpp>
|
||||||
|
|
||||||
|
#include <xilinx/xaxidma.h>
|
||||||
|
#include <xilinx/xaxidma_bd.h>
|
||||||
|
#include <xilinx/xaxidma_hw.h>
|
||||||
|
|
||||||
// Max. size of a DMA transfer in simple mode
|
// Max. size of a DMA transfer in simple mode
|
||||||
#define FPGA_DMA_BOUNDARY 0x1000
|
#define FPGA_DMA_BOUNDARY 0x1000
|
||||||
|
@ -116,7 +115,7 @@ void Dma::setupScatterGatherRingRx(uintptr_t physAddr, uintptr_t virtAddr) {
|
||||||
throw RuntimeError("Failed to clone BD template: {}", ret);
|
throw RuntimeError("Failed to clone BD template: {}", ret);
|
||||||
|
|
||||||
if (cyclic) {
|
if (cyclic) {
|
||||||
/* Enable Cyclic DMA mode */
|
// Enable Cyclic DMA mode
|
||||||
XAxiDma_BdRingEnableCyclicDMA(rxRingPtr);
|
XAxiDma_BdRingEnableCyclicDMA(rxRingPtr);
|
||||||
XAxiDma_SelectCyclicMode(&xDma, XAXIDMA_DEVICE_TO_DMA, 1);
|
XAxiDma_SelectCyclicMode(&xDma, XAXIDMA_DEVICE_TO_DMA, 1);
|
||||||
}
|
}
|
||||||
|
@ -212,7 +211,7 @@ Dma::~Dma() {
|
||||||
free(rxRingPtr->CyclicBd);
|
free(rxRingPtr->CyclicBd);
|
||||||
rxRingPtr->CyclicBd = nullptr;
|
rxRingPtr->CyclicBd = nullptr;
|
||||||
}
|
}
|
||||||
// unampe SG memory Blocks
|
// Unmap SG memory Blocks
|
||||||
if (sgRing) {
|
if (sgRing) {
|
||||||
card->unmapMemoryBlock(*sgRing);
|
card->unmapMemoryBlock(*sgRing);
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,7 @@ protected:
|
||||||
std::string cardName;
|
std::string cardName;
|
||||||
std::list<std::string> connectStrings;
|
std::list<std::string> connectStrings;
|
||||||
|
|
||||||
// This setting improves latency by remove various checks.
|
// This setting improves latency by removing various checks.
|
||||||
// Use with caution! Requires read cache in FPGA design!
|
// Use with caution! Requires read cache in FPGA design!
|
||||||
// The common use case in VILLASfpga is that we have exactly
|
// The common use case in VILLASfpga is that we have exactly
|
||||||
// one write for every read and the number of exchanged signals
|
// one write for every read and the number of exchanged signals
|
||||||
|
|
Loading…
Add table
Reference in a new issue