diff --git a/fpga/include/villas/fpga/core.hpp b/fpga/include/villas/fpga/core.hpp index acdb1428c..177e651e2 100644 --- a/fpga/include/villas/fpga/core.hpp +++ b/fpga/include/villas/fpga/core.hpp @@ -207,6 +207,8 @@ class CoreFactory : public plugin::Plugin { public: using plugin::Plugin::Plugin; + static std::list parseVLNV(json_t *json_ips); + // Returns a running and checked FPGA IP static std::list> make(Card *card, json_t *json_ips); diff --git a/fpga/lib/core.cpp b/fpga/lib/core.cpp index 2e3235c5d..b16b09696 100644 --- a/fpga/lib/core.cpp +++ b/fpga/lib/core.cpp @@ -37,21 +37,10 @@ static std::list vlnvInitializationOrder = { Vlnv("xilinx.com:ip:axi_iic:"), }; -std::list> CoreFactory::make(Card *card, - json_t *json_ips) { - // We only have this logger until we know the factory to build an IP with - auto loggerStatic = getStaticLogger(); - - std::list allIps; // All IPs available in config - std::list orderedIps; // IPs ordered in initialization order - - std::list> configuredIps; // Successfully configured IPs - - if (!card->ips.empty()) { - loggerStatic->error("IP list of card {} already contains IPs.", card->name); - throw RuntimeError("IP list of card {} already contains IPs.", card->name); - } +std::list CoreFactory::parseVLNV(json_t *json_ips) { // Parse all IP instance names and their VLNV into list `allIps` + std::list allIps; + const char *ipName; json_t *json_ip; json_object_foreach(json_ips, ipName, json_ip) { @@ -64,6 +53,8 @@ std::list> CoreFactory::make(Card *card, allIps.push_back({vlnv, ipName}); } + return allIps; + } // Pick out IPs to be initialized first. //