JFJochReceiver: Remove host subdirectory
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
|
||||
#include "../common/ThreadSafeFIFO.h"
|
||||
#include "../common/DiffractionExperiment.h"
|
||||
#include "../receiver/host/Completion.h"
|
||||
#include "../receiver/Completion.h"
|
||||
#include "JFConversion.h"
|
||||
#include "JFCalibration.h"
|
||||
#include "jf_packet.h"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include <thread>
|
||||
|
||||
#include "AcquisitionCounters.h"
|
||||
#include "../../common/JFJochException.h"
|
||||
#include "../common/JFJochException.h"
|
||||
|
||||
AcquisitionCounters::AcquisitionCounters()
|
||||
: head(max_modules, 0), slowest_head(0), total_packets(0), expected_frames(0), acquisition_finished(false) {}
|
||||
@@ -8,8 +8,8 @@
|
||||
#include <shared_mutex>
|
||||
#include <vector>
|
||||
|
||||
#include "../../common/DiffractionExperiment.h"
|
||||
#include "../../common/Definitions.h"
|
||||
#include "../common/DiffractionExperiment.h"
|
||||
#include "../common/Definitions.h"
|
||||
#include "Completion.h"
|
||||
|
||||
// AcquisitionCounters are used for information that needs to be accessed during data collection,
|
||||
@@ -11,9 +11,9 @@
|
||||
#include <cmath>
|
||||
#include <sstream>
|
||||
|
||||
#include "../../common/JFJochException.h"
|
||||
#include "../common/JFJochException.h"
|
||||
#include "AcquisitionDevice.h"
|
||||
#include "../../common/NetworkAddressConvert.h"
|
||||
#include "../common/NetworkAddressConvert.h"
|
||||
|
||||
void *mmap_acquisition_buffer(size_t size, int16_t numa_node) {
|
||||
void *ret = mmap(nullptr, size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
|
||||
@@ -9,14 +9,14 @@
|
||||
#include <future>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <jfjoch.pb.h>
|
||||
#include "jfjoch.pb.h"
|
||||
|
||||
#include "../../common/Definitions.h"
|
||||
#include "../../common/DiffractionExperiment.h"
|
||||
#include "../../common/Logger.h"
|
||||
#include "../common/Definitions.h"
|
||||
#include "../common/DiffractionExperiment.h"
|
||||
#include "../common/Logger.h"
|
||||
|
||||
#include "../../common/ThreadSafeFIFO.h"
|
||||
#include "../../jungfrau/JFCalibration.h"
|
||||
#include "../common/ThreadSafeFIFO.h"
|
||||
#include "../jungfrau/JFCalibration.h"
|
||||
|
||||
#include "AcquisitionCounters.h"
|
||||
#include "Completion.h"
|
||||
@@ -1,4 +1,57 @@
|
||||
ADD_SUBDIRECTORY(host)
|
||||
ADD_LIBRARY(JungfraujochHost STATIC
|
||||
AcquisitionDevice.cpp AcquisitionDevice.h
|
||||
AcquisitionCounters.cpp AcquisitionCounters.h
|
||||
MockAcquisitionDevice.cpp MockAcquisitionDevice.h
|
||||
HLSSimulatedDevice.cpp HLSSimulatedDevice.h
|
||||
Completion.cpp Completion.h ../fpga/pcie_driver/ActionConfig.h
|
||||
PCIExpressDevice.cpp PCIExpressDevice.h
|
||||
IBWrappers.cpp IBWrappers.h
|
||||
MlxRawEthDevice.cpp MlxRawEthDevice.h
|
||||
../jungfrau/jf_packet.h
|
||||
LinuxSocketDevice.cpp LinuxSocketDevice.h
|
||||
FPGAAcquisitionDevice.cpp FPGAAcquisitionDevice.h)
|
||||
|
||||
TARGET_LINK_LIBRARIES(JungfraujochHost CommonFunctions HLSSimulation JFCalibration)
|
||||
|
||||
FIND_LIBRARY(IBVERBS NAMES ibverbs DOC "Infiniband verbs")
|
||||
|
||||
IF(IBVERBS)
|
||||
TARGET_COMPILE_DEFINITIONS(JungfraujochHost PUBLIC -DJFJOCH_USE_IBVERBS)
|
||||
TARGET_LINK_LIBRARIES(JungfraujochHost ${IBVERBS})
|
||||
MESSAGE(STATUS "JFJochReceiver compiled with IBVerbs support")
|
||||
|
||||
ADD_EXECUTABLE(jfjoch_mlx_test jfjoch_mlx_test.cpp)
|
||||
TARGET_LINK_LIBRARIES(jfjoch_mlx_test JungfraujochHost)
|
||||
INSTALL(TARGETS jfjoch_mlx_test RUNTIME)
|
||||
ENDIF()
|
||||
|
||||
ADD_EXECUTABLE(jfjoch_lxsocket_test jfjoch_lxsocket_test.cpp)
|
||||
TARGET_LINK_LIBRARIES(jfjoch_lxsocket_test JungfraujochHost)
|
||||
INSTALL(TARGETS jfjoch_lxsocket_test RUNTIME)
|
||||
|
||||
IF(HAS_NUMAIF AND HAS_NUMA_H AND NUMA_LIBRARY)
|
||||
TARGET_COMPILE_DEFINITIONS(JungfraujochHost PUBLIC -DJFJOCH_USE_NUMA)
|
||||
TARGET_LINK_LIBRARIES(JungfraujochHost ${NUMA_LIBRARY})
|
||||
MESSAGE(STATUS "NUMA memory/CPU pinning enabled")
|
||||
ELSE()
|
||||
MESSAGE(WARNING "NUMA memory/CPU pinning disabled")
|
||||
ENDIF()
|
||||
|
||||
ADD_EXECUTABLE(jfjoch_pcie_status jfjoch_pcie_status.cpp)
|
||||
TARGET_LINK_LIBRARIES(jfjoch_pcie_status JungfraujochHost)
|
||||
INSTALL(TARGETS jfjoch_pcie_status RUNTIME)
|
||||
|
||||
ADD_EXECUTABLE(jfjoch_pcie_set_network jfjoch_pcie_set_network.cpp)
|
||||
TARGET_LINK_LIBRARIES(jfjoch_pcie_set_network JungfraujochHost)
|
||||
INSTALL(TARGETS jfjoch_pcie_set_network RUNTIME)
|
||||
|
||||
ADD_EXECUTABLE(jfjoch_pcie_cancel_data_collection jfjoch_pcie_cancel_data_collection.cpp)
|
||||
TARGET_LINK_LIBRARIES(jfjoch_pcie_cancel_data_collection JungfraujochHost)
|
||||
INSTALL(TARGETS jfjoch_pcie_cancel_data_collection RUNTIME)
|
||||
|
||||
ADD_EXECUTABLE(jfjoch_pcie_clear_net_counters jfjoch_pcie_clear_net_counters.cpp)
|
||||
TARGET_LINK_LIBRARIES(jfjoch_pcie_clear_net_counters JungfraujochHost)
|
||||
INSTALL(TARGETS jfjoch_pcie_clear_net_counters RUNTIME)
|
||||
|
||||
ADD_LIBRARY(JFJochReceiver STATIC
|
||||
JFJochReceiverService.cpp JFJochReceiverService.h
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
#include <bitset>
|
||||
|
||||
#include "Completion.h"
|
||||
#include "../../common/JFJochException.h"
|
||||
#include "../../common/Definitions.h"
|
||||
#include "../common/JFJochException.h"
|
||||
#include "../common/Definitions.h"
|
||||
|
||||
inline uint64_t bit_concat(uint32_t high, uint32_t low) {
|
||||
return (uint64_t(high) << 32) | low;
|
||||
@@ -5,7 +5,7 @@
|
||||
#define JUNGFRAUJOCH_FPGAACQUISITIONDEVICE_H
|
||||
|
||||
#include "AcquisitionDevice.h"
|
||||
#include "../../fpga/pcie_driver/ActionConfig.h"
|
||||
#include "../fpga/pcie_driver/ActionConfig.h"
|
||||
|
||||
class FPGAAcquisitionDevice : public AcquisitionDevice {
|
||||
uint16_t data_collection_id = 0;
|
||||
@@ -5,8 +5,8 @@
|
||||
|
||||
#include <bitset>
|
||||
#include <arpa/inet.h>
|
||||
#include "../../fpga/hls/datamover_model.h"
|
||||
#include "../../fpga/hls/hls_jfjoch.h"
|
||||
#include "../fpga/hls/datamover_model.h"
|
||||
#include "../fpga/hls/hls_jfjoch.h"
|
||||
|
||||
uint16_t checksum(const uint16_t *addr, size_t count) {
|
||||
/* Compute Internet Checksum for "count" bytes
|
||||
@@ -6,11 +6,11 @@
|
||||
|
||||
#include <thread>
|
||||
|
||||
#include "../../fpga/hls/hls_jfjoch.h"
|
||||
#include "../../fpga/hls/datamover_model.h"
|
||||
#include "../../common/DiffractionExperiment.h"
|
||||
#include "../fpga/hls/hls_jfjoch.h"
|
||||
#include "../fpga/hls/datamover_model.h"
|
||||
#include "../common/DiffractionExperiment.h"
|
||||
#include "FPGAAcquisitionDevice.h"
|
||||
#include "../../jungfrau/jf_packet.h"
|
||||
#include "../jungfrau/jf_packet.h"
|
||||
|
||||
uint16_t checksum(const uint16_t *addr, size_t count);
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#endif
|
||||
|
||||
#include "IBWrappers.h"
|
||||
#include "../../common/JFJochException.h"
|
||||
#include "../common/JFJochException.h"
|
||||
|
||||
IBContext::IBContext(const std::string &dev_name) {
|
||||
struct ibv_device **dev_list;
|
||||
@@ -18,7 +18,7 @@
|
||||
#include "../jungfrau/JFCalibration.h"
|
||||
#include "../common/ImagePusher.h"
|
||||
|
||||
#include "host/AcquisitionDevice.h"
|
||||
#include "AcquisitionDevice.h"
|
||||
#include "../common/Logger.h"
|
||||
#include "../common/ThreadSafeFIFO.h"
|
||||
#include "../common/ZMQPreviewPublisher.h"
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include <ifaddrs.h>
|
||||
#include <linux/if_packet.h>
|
||||
|
||||
#include "../../common/NetworkAddressConvert.h"
|
||||
#include "../common/NetworkAddressConvert.h"
|
||||
|
||||
LinuxSocketDevice::LinuxSocketDevice(uint32_t in_ipv4_addr, uint16_t in_udp_port,
|
||||
uint16_t data_stream, size_t in_frame_buffer_size_modules,
|
||||
@@ -5,7 +5,7 @@
|
||||
#define JUNGFRAUJOCH_LINUXSOCKETDEVICE_H
|
||||
|
||||
#include <future>
|
||||
#include "../../jungfrau/ProcessJFPacket.h"
|
||||
#include "../jungfrau/ProcessJFPacket.h"
|
||||
#include "AcquisitionDevice.h"
|
||||
|
||||
class LinuxSocketDevice : public AcquisitionDevice {
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#ifdef JFJOCH_USE_IBVERBS
|
||||
#include "MlxRawEthDevice.h"
|
||||
#include "../../common/NetworkAddressConvert.h"
|
||||
#include "../common/NetworkAddressConvert.h"
|
||||
|
||||
#include <netinet/in.h>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
#include "AcquisitionDevice.h"
|
||||
#include "IBWrappers.h"
|
||||
#include "../../jungfrau/ProcessJFPacket.h"
|
||||
#include "../jungfrau/ProcessJFPacket.h"
|
||||
|
||||
class MlxRawEthDevice : public AcquisitionDevice {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
#include "MockAcquisitionDevice.h"
|
||||
#include "../../common/JFJochException.h"
|
||||
#include "../common/JFJochException.h"
|
||||
#include <bitset>
|
||||
|
||||
void MockAcquisitionDevice::Start(const DiffractionExperiment& experiment) {
|
||||
@@ -5,7 +5,7 @@
|
||||
#define JUNGFRAUJOCH_MOCKACQUISITIONDEVICE_H
|
||||
|
||||
#include "AcquisitionDevice.h"
|
||||
#include "../../common/ThreadSafeFIFO.h"
|
||||
#include "../common/ThreadSafeFIFO.h"
|
||||
|
||||
class MockAcquisitionDevice : public AcquisitionDevice {
|
||||
uint32_t current_handle = 0;
|
||||
@@ -7,8 +7,8 @@
|
||||
#include <thread>
|
||||
|
||||
#include "PCIExpressDevice.h"
|
||||
#include "../pcie_driver/jfjoch_ioctl.h"
|
||||
#include "../../common/NetworkAddressConvert.h"
|
||||
#include "../fpga/pcie_driver/jfjoch_ioctl.h"
|
||||
#include "../common/NetworkAddressConvert.h"
|
||||
|
||||
PCIExpressDevice::PCIExpressDevice(uint16_t data_stream, uint16_t pci_slot) :
|
||||
PCIExpressDevice("/dev/jfjoch" + std::to_string(pci_slot), data_stream) {
|
||||
@@ -1,54 +0,0 @@
|
||||
ADD_LIBRARY(JungfraujochHost STATIC
|
||||
AcquisitionDevice.cpp AcquisitionDevice.h
|
||||
AcquisitionCounters.cpp AcquisitionCounters.h
|
||||
MockAcquisitionDevice.cpp MockAcquisitionDevice.h
|
||||
HLSSimulatedDevice.cpp HLSSimulatedDevice.h
|
||||
Completion.cpp Completion.h ../../fpga/pcie_driver/ActionConfig.h
|
||||
PCIExpressDevice.cpp PCIExpressDevice.h
|
||||
IBWrappers.cpp IBWrappers.h
|
||||
MlxRawEthDevice.cpp MlxRawEthDevice.h
|
||||
../../jungfrau/jf_packet.h LinuxSocketDevice.cpp LinuxSocketDevice.h FPGAAcquisitionDevice.cpp FPGAAcquisitionDevice.h)
|
||||
|
||||
TARGET_LINK_LIBRARIES(JungfraujochHost CommonFunctions HLSSimulation JFCalibration)
|
||||
|
||||
TARGET_INCLUDE_DIRECTORIES(JungfraujochHost PUBLIC ../../include)
|
||||
|
||||
FIND_LIBRARY(IBVERBS NAMES ibverbs DOC "Infiniband verbs")
|
||||
|
||||
IF(IBVERBS)
|
||||
TARGET_COMPILE_DEFINITIONS(JungfraujochHost PUBLIC -DJFJOCH_USE_IBVERBS)
|
||||
TARGET_LINK_LIBRARIES(JungfraujochHost ${IBVERBS})
|
||||
MESSAGE(STATUS "JFJochReceiver compiled with IBVerbs support")
|
||||
|
||||
ADD_EXECUTABLE(jfjoch_mlx_test jfjoch_mlx_test.cpp)
|
||||
TARGET_LINK_LIBRARIES(jfjoch_mlx_test JungfraujochHost)
|
||||
INSTALL(TARGETS jfjoch_mlx_test RUNTIME)
|
||||
ENDIF()
|
||||
|
||||
ADD_EXECUTABLE(jfjoch_lxsocket_test jfjoch_lxsocket_test.cpp)
|
||||
TARGET_LINK_LIBRARIES(jfjoch_lxsocket_test JungfraujochHost)
|
||||
INSTALL(TARGETS jfjoch_lxsocket_test RUNTIME)
|
||||
|
||||
IF(HAS_NUMAIF AND HAS_NUMA_H AND NUMA_LIBRARY)
|
||||
TARGET_COMPILE_DEFINITIONS(JungfraujochHost PUBLIC -DJFJOCH_USE_NUMA)
|
||||
TARGET_LINK_LIBRARIES(JungfraujochHost ${NUMA_LIBRARY})
|
||||
MESSAGE(STATUS "NUMA memory/CPU pinning enabled")
|
||||
ELSE()
|
||||
MESSAGE(WARNING "NUMA memory/CPU pinning disabled")
|
||||
ENDIF()
|
||||
|
||||
ADD_EXECUTABLE(jfjoch_pcie_status jfjoch_pcie_status.cpp)
|
||||
TARGET_LINK_LIBRARIES(jfjoch_pcie_status JungfraujochHost)
|
||||
INSTALL(TARGETS jfjoch_pcie_status RUNTIME)
|
||||
|
||||
ADD_EXECUTABLE(jfjoch_pcie_set_network jfjoch_pcie_set_network.cpp)
|
||||
TARGET_LINK_LIBRARIES(jfjoch_pcie_set_network JungfraujochHost)
|
||||
INSTALL(TARGETS jfjoch_pcie_set_network RUNTIME)
|
||||
|
||||
ADD_EXECUTABLE(jfjoch_pcie_cancel_data_collection jfjoch_pcie_cancel_data_collection.cpp)
|
||||
TARGET_LINK_LIBRARIES(jfjoch_pcie_cancel_data_collection JungfraujochHost)
|
||||
INSTALL(TARGETS jfjoch_pcie_cancel_data_collection RUNTIME)
|
||||
|
||||
ADD_EXECUTABLE(jfjoch_pcie_clear_net_counters jfjoch_pcie_clear_net_counters.cpp)
|
||||
TARGET_LINK_LIBRARIES(jfjoch_pcie_clear_net_counters JungfraujochHost)
|
||||
INSTALL(TARGETS jfjoch_pcie_clear_net_counters RUNTIME)
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include "host/PCIExpressDevice.h"
|
||||
#include "PCIExpressDevice.h"
|
||||
#include "JFJochReceiverTest.h"
|
||||
#include "../tests/FPGAUnitTest.h"
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
// Copyright (2019-2022) Paul Scherrer Institute
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
#include "../../common/Logger.h"
|
||||
#include "../../common/JFJochException.h"
|
||||
#include "../common/Logger.h"
|
||||
#include "../common/JFJochException.h"
|
||||
#include "PCIExpressDevice.h"
|
||||
#include "../../common/NetworkAddressConvert.h"
|
||||
#include "../common/NetworkAddressConvert.h"
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
Logger logger("jfjoch_pcie_set_network");
|
||||
@@ -6,12 +6,12 @@
|
||||
|
||||
#include "../grpc/gRPCServer_Template.h"
|
||||
#include "../common/ZMQImagePusher.h"
|
||||
#include "host/PCIExpressDevice.h"
|
||||
#include "host/MlxRawEthDevice.h"
|
||||
#include "host/LinuxSocketDevice.h"
|
||||
#include "PCIExpressDevice.h"
|
||||
#include "MlxRawEthDevice.h"
|
||||
#include "LinuxSocketDevice.h"
|
||||
|
||||
#include "JFJochReceiverService.h"
|
||||
#include "host/HLSSimulatedDevice.h"
|
||||
#include "HLSSimulatedDevice.h"
|
||||
#include "../common/NetworkAddressConvert.h"
|
||||
|
||||
AcquisitionDevice *SetupAcquisitionDevice(const nlohmann::json &input, uint16_t data_stream) {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
#include <catch2/catch.hpp>
|
||||
#include "../receiver/host/AcquisitionCounters.h"
|
||||
#include "../receiver/AcquisitionCounters.h"
|
||||
|
||||
TEST_CASE("AcquisitionCountersTest","[AcquisitionDeviceCounters]") {
|
||||
DiffractionExperiment x(DetectorGeometry(2));
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
#include <bitshuffle/bitshuffle.h>
|
||||
#include "../jungfrau/JFPedestalCalc.h"
|
||||
#include "../receiver/host/HLSSimulatedDevice.h"
|
||||
#include "../receiver/HLSSimulatedDevice.h"
|
||||
#include "FPGAUnitTest.h"
|
||||
|
||||
using namespace std::literals::chrono_literals;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include <netinet/ip_icmp.h>
|
||||
#include <net/if_arp.h>
|
||||
|
||||
#include "../receiver/host/HLSSimulatedDevice.h"
|
||||
#include "../receiver/HLSSimulatedDevice.h"
|
||||
|
||||
// ARP packet - from if_arp.h
|
||||
#pragma pack(push)
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "../writer/HDF5Objects.h"
|
||||
#include "../receiver/JFJochReceiverService.h"
|
||||
#include "FPGAUnitTest.h"
|
||||
#include "../receiver/host/MockAcquisitionDevice.h"
|
||||
#include "../receiver/MockAcquisitionDevice.h"
|
||||
#include "../common/ZMQImagePusher.h"
|
||||
#include "../common/jsonToGrpc.h"
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
#include "../receiver/JFJochReceiverTest.h"
|
||||
#include "../receiver/host/HLSSimulatedDevice.h"
|
||||
#include "../receiver/HLSSimulatedDevice.h"
|
||||
#include "../jungfrau/JFPedestalCalc.h"
|
||||
#include "../common/TestImagePusher.h"
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
#include <catch2/catch.hpp>
|
||||
#include "../receiver/host/MockAcquisitionDevice.h"
|
||||
#include "../receiver/MockAcquisitionDevice.h"
|
||||
|
||||
TEST_CASE("MockAcquisitionDevice") {
|
||||
std::vector<uint16_t> module_data(RAW_MODULE_SIZE, 765);
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "../writer/HDF5Objects.h"
|
||||
#include "../common/ZMQImagePusher.h"
|
||||
#include "../receiver/JFJochReceiverService.h"
|
||||
#include "../receiver/host/HLSSimulatedDevice.h"
|
||||
#include "../receiver/HLSSimulatedDevice.h"
|
||||
|
||||
TEST_CASE("StreamWriterTest_ZMQ","[JFJochWriter]") {
|
||||
RegisterHDF5Filter();
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include "../common/Logger.h"
|
||||
#include "../receiver/JFJochReceiverService.h"
|
||||
#include "../grpc/JFJochReceiverClient.h"
|
||||
#include "../receiver/host/HLSSimulatedDevice.h"
|
||||
#include "../receiver/HLSSimulatedDevice.h"
|
||||
|
||||
#include <grpcpp/grpcpp.h>
|
||||
#include "../../common/ZMQImagePusher.h"
|
||||
|
||||
Reference in New Issue
Block a user