1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

emc: add stub IP

This commit is contained in:
Steffen Vogel 2020-07-08 15:20:05 +02:00
parent 10b8878279
commit 08114652d6
6 changed files with 142 additions and 9 deletions

View file

@ -0,0 +1,78 @@
/** AXI External Memory Controller (EMC)
*
* @file
* @author Steffen Vogel <stvogel@eonerc.rwth-aachen.de>
* @copyright 2017-2020, Steffen Vogel
* @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/core.hpp>
namespace villas {
namespace fpga {
namespace ip {
class EMC : public Core
{
public:
bool init();
private:
static constexpr char registerMemory[] = "Reg";
std::list<MemoryBlockName> getMemoryBlocks() const
{ return { registerMemory }; }
};
class EMCFactory : public CoreFactory {
public:
static constexpr const char*
getCompatibleVlnvString()
{ return "xilinx.com:ip:axi_emc:"; }
Core* create()
{ return new EMC; }
virtual std::string
getName() const
{ return "ExternalMemoryController"; }
virtual std::string
getDescription() const
{ return "Xilinx's AXI External Memory Controller (EMC) "; }
virtual Vlnv
getCompatibleVlnv() const
{ return Vlnv(getCompatibleVlnvString()); }
};
} /* namespace ip */
} /* namespace fpga */
} /* namespace villas */
/** @} */

View file

@ -28,8 +28,6 @@
#pragma once
#include <xilinx/xintc.h>
#include <villas/fpga/core.hpp>
namespace villas {

View file

@ -132,6 +132,29 @@ protected:
bool running;
};
class HlsFactory : public CoreFactory {
public:
static constexpr const char*
getCompatibleVlnvString()
{ return "acs.eonerc.rwth-aachen.de:hls:"; }
Core* create()
{ return new Hls; }
virtual std::string
getName() const
{ return "HighLevelSynthesis"; }
virtual std::string
getDescription() const
{ return "Xilinx's HLS IP Cores"; }
virtual Vlnv
getCompatibleVlnv() const
{ return Vlnv(getCompatibleVlnvString()); }
};
} /* namespace ip */
} /* namespace fpga */
} /* namespace villas */

View file

@ -28,6 +28,7 @@ set(SOURCES
ips/timer.cpp
ips/switch.cpp
ips/emc.cpp
ips/fifo.cpp
ips/intc.cpp
ips/pcie.cpp

40
fpga/lib/ips/emc.cpp Normal file
View file

@ -0,0 +1,40 @@
/** AXI External Memory Controller (EMC)
*
* @author Steffen Vogel <stvogel@eonerc.rwth-aachen.de>
* @copyright 2017-2020, Steffen Vogel
* @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 <villas/plugin.hpp>
#include <villas/fpga/ips/emc.hpp>
using namespace villas::fpga::ip;
// instantiate factory to make available to plugin infrastructure
static EMCFactory factory;
bool
EMC::init()
{
//const uintptr_t base = getBaseAddr(registerMemory);
return true;
}

View file

@ -20,15 +20,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*********************************************************************************/
#include <unistd.h>
#include <errno.h>
#include <villas/config.h>
#include <villas/plugin.hpp>
#include <villas/kernel/kernel.hpp>
#include <villas/fpga/card.hpp>
#include <villas/fpga/ips/gpio.hpp>
using namespace villas::fpga::ip;