From 86f8997b05159927a031c4ebf4255b05f8c908b0 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Thu, 11 Jun 2020 15:58:02 +0200 Subject: [PATCH] gpio: add new IP for AXI programmable GPIO --- fpga/lib/CMakeLists.txt | 1 + fpga/lib/ips/gpio.cpp | 52 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 fpga/lib/ips/gpio.cpp diff --git a/fpga/lib/CMakeLists.txt b/fpga/lib/CMakeLists.txt index c8efa2a09..4524cfd30 100644 --- a/fpga/lib/CMakeLists.txt +++ b/fpga/lib/CMakeLists.txt @@ -35,6 +35,7 @@ set(SOURCES ips/bram.cpp ips/rtds.cpp ips/aurora.cpp + ips/gpio.cpp ips/rtds2gpu/rtds2gpu.cpp ips/rtds2gpu/xrtds2gpu.c diff --git a/fpga/lib/ips/gpio.cpp b/fpga/lib/ips/gpio.cpp new file mode 100644 index 000000000..6f287970c --- /dev/null +++ b/fpga/lib/ips/gpio.cpp @@ -0,0 +1,52 @@ +/** AXI General Purpose IO (GPIO) + * + * @author Steffen Vogel + * @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 . + *********************************************************************************/ + +#include +#include + +#include +#include + +#include + +#include +#include + +namespace villas { +namespace fpga { +namespace ip { + + +// instantiate factory to make available to plugin infrastructure +static GeneralPurposeIOFactory factory; + +bool +GeneralPurposeIO::init() +{ + //const uintptr_t base = getBaseAddr(registerMemory); + + return true; +} + +} // namespace ip +} // namespace fpga +} // namespace villas