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

lib/card: add IP lookup by VLNV

This commit is contained in:
Daniel Krebs 2018-02-13 13:45:38 +01:00 committed by Steffen Vogel
parent c3382b9e18
commit 5b0013b335
2 changed files with 12 additions and 0 deletions

View file

@ -76,6 +76,7 @@ public:
void dump() { }
ip::IpCore* lookupIp(const std::string& name) const;
ip::IpCore* lookupIp(const Vlnv& vlnv) const;
ip::IpCoreList ips; ///< IPs located on this FPGA card

View file

@ -142,6 +142,17 @@ PCIeCard::lookupIp(const std::string& name) const
return nullptr;
}
ip::IpCore*
PCIeCard::lookupIp(const Vlnv& vlnv) const
{
for(auto& ip : ips) {
if(*ip == vlnv) {
return ip.get();
}
}
return nullptr;
}
bool fpga::PCIeCard::init()
{