ChimeraTK-DeviceAccess 03.25.00
Loading...
Searching...
No Matches
DmaIntf.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Deutsches Elektronen-Synchrotron DESY, MSK, ChimeraTK Project <chimeratk-support@desy.de>
2// SPDX-License-Identifier: LGPL-3.0-or-later
3#pragma once
4
5#include "DeviceFile.h"
6#include "XdmaIntfAbstract.h"
7
8#include <string>
9
10namespace ChimeraTK {
11
12 // DMA interface to access FPGA memory
13 class DmaIntf : public XdmaIntfAbstract {
14 DeviceFile _c2h;
15 DeviceFile _h2c;
16
17 public:
18 DmaIntf() = delete;
19 DmaIntf(const std::string& devicePath, size_t channelIdx);
20 DmaIntf(DmaIntf&& d) = default; // Need move ctor for storage in std::vector
21 virtual ~DmaIntf();
22
23 void read(uintptr_t address, int32_t* __restrict__ buf, size_t nbytes) override;
24 void write(uintptr_t address, const int32_t* data, size_t nbytes) override;
25 };
26
27} // namespace ChimeraTK
DmaIntf(DmaIntf &&d)=default
virtual ~DmaIntf()
Definition DmaIntf.cc:17