Commit db9562c8 authored by Steffen Vogel's avatar Steffen Vogel 🎅🏼
Browse files

wip

parent ade27d87
Pipeline #328834 failed with stages
in 45 seconds
/** Driver for wrapper around Quad Port Aurora (acs.eonerc.rwth-aachen.de:user:aurora_4p_axis)
*
* @file
* @author Steffen Vogel <svogel2@eoenrc.rwth-aachen.de>
* @copyright 2017-2020, Institute for Automation of Complex Power Systems, EONERC
* @license GNU General Public License (version 3)
*
* VILLASfpga
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*********************************************************************************/
/** @addtogroup fpga VILLASfpga
* @{
*/
#pragma once
#include <villas/fpga/node.hpp>
namespace villas {
namespace fpga {
namespace ip {
class Aurora4P : public Node {
public:
void dump();
std::list<std::string> getMemoryBlocks() const
{ return { registerMemory }; }
const StreamVertex&
getDefaultSlavePort() const
{ return getSlavePort("s_axis0"); }
const StreamVertex&
getDefaultMasterPort() const
{ return getMasterPort("m_axis0"); }
void
setLoopback(int index, bool state);
void
resetFrameCounters();
private:
static constexpr const char registerMemory[] = "reg0";
std::vector<Aurora *> ports;
};
class AuroraFactory : public NodeFactory {
public:
Core* create()
{
auto *a = new Aurora4P;
for (int i = 0; i < 4; i++)
a->ports.push_back(new Aurora);
return a;
}
virtual std::string
getName() const
{ return "Aurora 4P"; }
virtual std::string
getDescription() const
{ return "Aurora 8B/10B and additional support modules, like an AXI4-Lite register interface."; }
virtual Vlnv
getCompatibleVlnv() const
{ return {"acs.eonerc.rwth-aachen.de:user:aurora_4p_axis:"}; }
};
} /* namespace ip */
} /* namespace fpga */
} /* namespace villas */
/** @} */
/** Driver for wrapper around Aurora (acs.eonerc.rwth-aachen.de:user:aurora)
/** Driver for wrapper around Aurora (acs.eonerc.rwth-aachen.de:user:aurora_axis)
*
* @file
* @author Hatim Kanchwala <hatim@hatimak.me>
......
......@@ -36,6 +36,7 @@ set(SOURCES
ips/bram.cpp
ips/rtds.cpp
ips/aurora.cpp
ips/aurora-4p.cpp
ips/gpio.cpp
ips/rtds2gpu/rtds2gpu.cpp
......
/** Driver for wrapper around Aurora (acs.eonerc.rwth-aachen.de:user:aurora_4p_axis)
*
* @author Steffen Vogel <svogel2@eoenrc.rwth-aachen.de>
* @copyright 2017-2020, Institute for Automation of Complex Power Systems, EONERC
* @license GNU General Public License (version 3)
*
* VILLASfpga
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*********************************************************************************/
#include <cstdint>
#include <villas/utils.hpp>
#include <villas/fpga/card.hpp>
#include <villas/fpga/ips/aurora-4p.hpp>
using namespace villas::fpga::ip;
static AuroraFactory aurora4pFactoryInstance;
void Aurora4P::dump()
{
for (auto &p : ports)
p.dump();
}
void Aurora::setLoopback(int index, bool state)
{
ports[index].setLoopback(state)
}
void Aurora::resetFrameCounters()
{
for (auto &p : ports)
p.resetFrameCounters();
}
/** Driver for wrapper around Aurora (acs.eonerc.rwth-aachen.de:user:aurora)
/** Driver for wrapper around Aurora (acs.eonerc.rwth-aachen.de:user:aurora_axis)
*
* @author Hatim Kanchwala <hatim@hatimak.me>
* @copyright 2020, Hatim Kanchwala
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment