diff --git a/fpga b/fpga index ac9592299..6c6d30c40 160000 --- a/fpga +++ b/fpga @@ -1 +1 @@ -Subproject commit ac959229978fa3d433bd982a81c279d35e310245 +Subproject commit 6c6d30c406769969cc91ea44015e55045ea0b94f diff --git a/lib/nodes/fpga.cpp b/lib/nodes/fpga.cpp index bb7e12986..db17507b3 100644 --- a/lib/nodes/fpga.cpp +++ b/lib/nodes/fpga.cpp @@ -19,6 +19,7 @@ #include #include +#include #include using namespace villas; @@ -48,31 +49,19 @@ int FpgaNode::prepare() { "There is no FPGA card with the name: {}", cardName); } - std::vector> aurora_channels; - for (int i = 0; i < 4; i++) { - auto name = fmt::format("aurora_8b10b_ch{}", i); - auto id = fpga::ip::IpIdentifier("xilinx.com:ip:aurora_8b10b:", name); - auto aurora = - std::dynamic_pointer_cast(card->lookupIp(id)); - if (aurora == nullptr) { - logger->error("No Aurora interface found on FPGA"); - return 1; - } + auto axisswitch = std::dynamic_pointer_cast( + card->lookupIp(fpga::Vlnv("xilinx.com:ip:axis_switch:"))); - aurora_channels.push_back(aurora); + for (auto ports : axisswitch->getMasterPorts()) { + logger->info("Port: {}, {}", ports.first, *ports.second); } - - dma = std::dynamic_pointer_cast( - card->lookupIp(fpga::Vlnv("xilinx.com:ip:axi_dma:"))); - if (dma == nullptr) { - logger->error("No DMA found on FPGA "); - return 1; + for (auto ports : axisswitch->getSlavePorts()) { + logger->info("Port: {}, {}", ports.first, *ports.second); } - // Configure Crossbar switch for (std::string str : connectStrings) { const fpga::ConnectString parsedConnectString(str); - parsedConnectString.configCrossBar(dma, aurora_channels); + parsedConnectString.configCrossBar(card); } auto &alloc = HostRam::getAllocator();