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: implement IP lookup

Search for an initialized IP by name.
This commit is contained in:
daniel-k 2018-01-09 16:27:02 +01:00
parent af234e29c6
commit 8345a15db0
2 changed files with 12 additions and 0 deletions

View file

@ -73,6 +73,7 @@ public:
bool reset() { return true; }
void dump() { }
ip::IpCore* lookupIp(std::string name) const;
ip::IpCoreList ips; ///< IPs located on this FPGA card

View file

@ -132,6 +132,17 @@ fpga::PCIeCardFactory::create()
}
ip::IpCore*
PCIeCard::lookupIp(std::string name) const {
for(auto& ip : ips) {
if(*ip == name) {
return ip.get();
}
}
return nullptr;
}
bool fpga::PCIeCard::start()
{
int ret;