From 85b2e8b030b2d805ef555a42c0d84785278591ed Mon Sep 17 00:00:00 2001 From: Pascal Henry Bauer Date: Fri, 10 Feb 2023 13:30:33 +0100 Subject: [PATCH 1/3] removed duplicate implementation Signed-off-by: Pascal Henry Bauer --- fpga/lib/pcie_card.cpp | 33 --------------------------------- 1 file changed, 33 deletions(-) diff --git a/fpga/lib/pcie_card.cpp b/fpga/lib/pcie_card.cpp index 07b256fa3..31fb1ca8d 100644 --- a/fpga/lib/pcie_card.cpp +++ b/fpga/lib/pcie_card.cpp @@ -155,39 +155,6 @@ PCIeCard::~PCIeCard() } -std::shared_ptr PCIeCard::lookupIp(const std::string &name) const -{ - for (auto &ip : ips) { - if (*ip == name) { - return ip; - } - } - - return nullptr; -} - -std::shared_ptr PCIeCard::lookupIp(const Vlnv &vlnv) const -{ - for (auto &ip : ips) { - if (*ip == vlnv) { - return ip; - } - } - - return nullptr; -} - -std::shared_ptr PCIeCard::lookupIp(const ip::IpIdentifier &id) const -{ - for (auto &ip : ips) { - if (*ip == id) { - return ip; - } - } - - return nullptr; -} - bool PCIeCard::init() { logger = getLogger(); From 26e2251afe14c11653dd498534bce22b973bd9e8 Mon Sep 17 00:00:00 2001 From: Pascal Henry Bauer Date: Fri, 10 Feb 2023 13:31:46 +0100 Subject: [PATCH 2/3] reorder of members and added virtual Signed-off-by: Pascal Henry Bauer --- fpga/include/villas/fpga/card.hpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/fpga/include/villas/fpga/card.hpp b/fpga/include/villas/fpga/card.hpp index 3f0e3891d..63cced5d4 100644 --- a/fpga/include/villas/fpga/card.hpp +++ b/fpga/include/villas/fpga/card.hpp @@ -21,6 +21,8 @@ class Card { public: bool polling; + + std::shared_ptr vfioContainer; std::shared_ptr vfioDevice; // Slave address space ID to access the PCIe address space from the @@ -32,13 +34,12 @@ public: // card. MemoryManager::AddressSpaceId addrSpaceIdHostToDevice; - std::list > ips; + std::list> ips; virtual ~Card(); - bool mapMemoryBlock(const std::shared_ptr block); - bool unmapMemoryBlock(const MemoryBlock &block); - std::shared_ptr vfioContainer; + virtual bool mapMemoryBlock(const std::shared_ptr block); + virtual bool unmapMemoryBlock(const MemoryBlock &block); std::shared_ptr lookupIp(const std::string &name) const; std::shared_ptr lookupIp(const Vlnv &vlnv) const; From 3db2005bbf24f37d2774287eaf44cf92b56e930f Mon Sep 17 00:00:00 2001 From: Pascal Henry Bauer Date: Fri, 10 Feb 2023 13:32:30 +0100 Subject: [PATCH 3/3] removed duplicated declarations Signed-off-by: Pascal Henry Bauer --- fpga/include/villas/fpga/pcie_card.hpp | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/fpga/include/villas/fpga/pcie_card.hpp b/fpga/include/villas/fpga/pcie_card.hpp index 8cc89d119..e29ddee70 100644 --- a/fpga/include/villas/fpga/pcie_card.hpp +++ b/fpga/include/villas/fpga/pcie_card.hpp @@ -59,18 +59,6 @@ public: void dump() { } - std::shared_ptr - lookupIp(const std::string &name) const; - - std::shared_ptr - lookupIp(const Vlnv &vlnv) const; - - std::shared_ptr - lookupIp(const ip::IpIdentifier &id) const; - - bool mapMemoryBlock(const MemoryBlock &block); - bool unmapMemoryBlock(const MemoryBlock &block); - public: // TODO: make this private bool doReset; // Reset VILLASfpga during startup? int affinity; // Affinity for MSI interrupts @@ -79,13 +67,6 @@ public: // TODO: make this private std::shared_ptr pdev; // PCI device handle - // Slave address space ID to access the PCIe address space from the FPGA - MemoryManager::AddressSpaceId addrSpaceIdDeviceToHost; - - // Address space identifier of the master address space of this FPGA card. - // This will be used for address resolution of all IPs on this card. - MemoryManager::AddressSpaceId addrSpaceIdHostToDevice; - protected: Logger getLogger() const