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:
parent
c3382b9e18
commit
5b0013b335
2 changed files with 12 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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()
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue