mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-30 00:00:11 +01:00
platform irq draft
This commit is contained in:
parent
3d9d376180
commit
7cc05f9e17
3 changed files with 23 additions and 3 deletions
|
@ -82,6 +82,8 @@ public:
|
||||||
virtual ~Core() = default;
|
virtual ~Core() = default;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
void addIrq(std::string irqName, int port_num, InterruptController* intc);
|
||||||
|
|
||||||
// Generic management interface for IPs
|
// Generic management interface for IPs
|
||||||
|
|
||||||
// Runtime setup of IP, should access and initialize hardware
|
// Runtime setup of IP, should access and initialize hardware
|
||||||
|
|
|
@ -26,8 +26,8 @@ public:
|
||||||
virtual bool init() override;
|
virtual bool init() override;
|
||||||
virtual bool stop() override;
|
virtual bool stop() override;
|
||||||
|
|
||||||
bool enableInterrupt(IrqMaskType mask, bool polling);
|
virtual bool enableInterrupt(IrqMaskType mask, bool polling);
|
||||||
bool enableInterrupt(IrqPort irq, bool polling) {
|
virtual bool enableInterrupt(IrqPort irq, bool polling) {
|
||||||
return enableInterrupt(1 << irq.num, polling);
|
return enableInterrupt(1 << irq.num, polling);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ public:
|
||||||
ssize_t waitForInterrupt(int irq);
|
ssize_t waitForInterrupt(int irq);
|
||||||
ssize_t waitForInterrupt(IrqPort irq) { return waitForInterrupt(irq.num); }
|
ssize_t waitForInterrupt(IrqPort irq) { return waitForInterrupt(irq.num); }
|
||||||
|
|
||||||
private:
|
protected:
|
||||||
static constexpr char registerMemory[] = "reg0";
|
static constexpr char registerMemory[] = "reg0";
|
||||||
|
|
||||||
std::list<MemoryBlockName> getMemoryBlocks() const {
|
std::list<MemoryBlockName> getMemoryBlocks() const {
|
||||||
|
|
|
@ -22,6 +22,8 @@
|
||||||
#include <villas/kernel/kernel.hpp>
|
#include <villas/kernel/kernel.hpp>
|
||||||
#include <villas/memory_manager.hpp>
|
#include <villas/memory_manager.hpp>
|
||||||
|
|
||||||
|
#include <villas/fpga/ips/platform_intc.hpp>
|
||||||
|
|
||||||
using namespace villas;
|
using namespace villas;
|
||||||
using namespace villas::fpga;
|
using namespace villas::fpga;
|
||||||
using namespace villas::kernel;
|
using namespace villas::kernel;
|
||||||
|
@ -103,6 +105,22 @@ void PlatformCard::connectVFIOtoIps(
|
||||||
|
|
||||||
// Connect vfio vertex to Reg vertex
|
// Connect vfio vertex to Reg vertex
|
||||||
connect(vfio_device->getName(), ip);
|
connect(vfio_device->getName(), ip);
|
||||||
|
|
||||||
|
// interrupts
|
||||||
|
if (vfio_device->getNumberIrqs() > 0) {
|
||||||
|
for (int i = 0; i < vfio_device->getNumberIrqs(); i++) {
|
||||||
|
auto intc = new PlatformInterruptController(vfio_device);
|
||||||
|
|
||||||
|
const char *irqName = "iic2intc_irpt";
|
||||||
|
int num = 0;
|
||||||
|
logger->error("Adding Platformintc {}", num);
|
||||||
|
//* dma
|
||||||
|
//* mm2s_introut
|
||||||
|
//* s2mm_introut
|
||||||
|
|
||||||
|
ip->addIrq(irqName, num, intc);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue