1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-30 00:00:11 +01:00
VILLASnode/fpga/include/villas/fpga/ips/emc.hpp
Steffen Vogel 3d73c759ea Reformat all code with clang-format
Signed-off-by: Steffen Vogel <post@steffenvogel.de>
2024-02-29 19:34:27 +01:00

39 lines
817 B
C++

/* AXI External Memory Controller (EMC)
*
* Author: Steffen Vogel <post@steffenvogel.de>
* SPDX-FileCopyrightText: 2017 Steffen Vogel <post@steffenvogel.de>
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
#include <xilinx/xilflash.h>
#include <villas/fpga/core.hpp>
namespace villas {
namespace fpga {
namespace ip {
class EMC : public Core {
public:
virtual bool init() override;
bool flash(uint32_t offset, const std::string &filename);
bool flash(uint32_t offset, uint32_t length, uint8_t *data);
bool read(uint32_t offset, uint32_t length, uint8_t *data);
private:
XFlash xflash;
static constexpr char registerMemory[] = "Reg";
std::list<MemoryBlockName> getMemoryBlocks() const {
return {registerMemory};
}
};
} // namespace ip
} // namespace fpga
} // namespace villas