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

intc: fix name of register space

parent 127419d8
/** 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 */
/** @} */
......@@ -61,7 +61,7 @@ public:
private:
static constexpr char registerMemory[] = "Reg";
static constexpr char registerMemory[] = "reg0";
std::list<MemoryBlockName> getMemoryBlocks() const
{ return { registerMemory }; }
......
......@@ -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 */
......
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