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

intc: fix name of register space

This commit is contained in:
Steffen Vogel 2020-06-11 15:56:34 +02:00
parent 6882e9d418
commit d5b1012b75
3 changed files with 86 additions and 2 deletions

View file

@ -0,0 +1,84 @@
/** AXI General Purpose IO (GPIO)
*
* @file
* @author Steffen Vogel <stvogel@eonerc.rwth-aachen.de>
* @author Daniel Krebs <github@daniel-krebs.net>
* @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 <xilinx/xintc.h>
#include <villas/fpga/ip.hpp>
namespace villas {
namespace fpga {
namespace ip {
class GeneralPurposeIO : public IpCore
{
public:
bool init();
private:
static constexpr char registerMemory[] = "Reg";
std::list<MemoryBlockName> getMemoryBlocks() const
{ return { registerMemory }; }
};
class GeneralPurposeIOFactory : public IpCoreFactory {
public:
GeneralPurposeIOFactory() :
IpCoreFactory(getName(), getDescription())
{}
static constexpr const char*
getCompatibleVlnvString()
{ return "xilinx.com:ip:axi_gpio:"; }
IpCore* create()
{ return new GeneralPurposeIO; }
std::string
getName() const
{ return "GeneralPurposeIO"; }
std::string
getDescription() const
{ return "Xilinx's AXI4 general purpose IO"; }
Vlnv getCompatibleVlnv() const
{ return Vlnv(getCompatibleVlnvString()); }
};
} /* namespace ip */
} /* namespace fpga */
} /* namespace villas */
/** @} */

View file

@ -61,7 +61,7 @@ public:
private:
static constexpr char registerMemory[] = "Reg";
static constexpr char registerMemory[] = "reg0";
std::list<MemoryBlockName> getMemoryBlocks() const
{ return { registerMemory }; }

View file

@ -80,7 +80,7 @@ InterruptController::init()
XIntc_Out32(base + XIN_IVAR_OFFSET + i * 4, i);
}
XIntc_Out32(base + XIN_IMR_OFFSET, 0); /* Use manual acknowlegement for all IRQs */
XIntc_Out32(base + XIN_IMR_OFFSET, 0x00000000); /* Use manual acknowlegement for all IRQs */
XIntc_Out32(base + XIN_IAR_OFFSET, 0xFFFFFFFF); /* Acknowlege all pending IRQs manually */
XIntc_Out32(base + XIN_IMR_OFFSET, 0xFFFFFFFF); /* Use fast acknowlegement for all IRQs */
XIntc_Out32(base + XIN_IER_OFFSET, 0x00000000); /* Disable all IRQs by default */