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:
parent
af234e29c6
commit
8345a15db0
2 changed files with 12 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue