Skip to content

Commit

Permalink
P16-790: Removes Legacy API support, deprecated functions, and files.
Browse files Browse the repository at this point in the history
We've removed set_file_decoder.py b/c that's handled by the omnitool now.
It was also used to translate legacy binary files into JSON.

Removed the legacy flags from the cmake functions since nothing will build with those anymore.

Removed the legacy example code, legacy code files, and tests completely.

Removed deprecated macros and functions from the Pixie16Api.

Updated README.md with correct links, and to remove old info.

Signed-off-by: S. V. Paulauskas <[email protected]>
  • Loading branch information
xia-stan authored and xia-ethan committed Aug 1, 2023
1 parent c47835c commit 9e2b711
Show file tree
Hide file tree
Showing 41 changed files with 21 additions and 17,238 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
OPTIONS: -DBUILD_LEGACY=ON -DBUILD_SDK=ON -DBUILD_TESTS=ON
OPTIONS: -DBUILD_SDK=ON -DBUILD_TESTS=ON

jobs:
build:
Expand Down Expand Up @@ -45,6 +45,5 @@ jobs:
- name: Test
working-directory: ${{github.workspace}}/build
run: |
./tests/unit/legacy/legacy_unit_test_runner
./tests/unit/sdk/pixie_sdk_unit_test_runner
./tests/integration/pixie_sdk_integration_test_runner
10 changes: 1 addition & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,25 +41,17 @@ include(xia_configure_target)
include(CMakeDependentOption)

option(BUILD_EXAMPLES "Builds the example programs" ON)
option(BUILD_LEGACY "Builds the legacy C API - Pixie16App.a" OFF)
option(BUILD_SDK "Builds the base SDK library - PixieSdk.a" ON)
option(BUILD_TESTS "Builds the test suites" ON)

cmake_dependent_option(BUILD_INTEGRATION_TESTS "Builds integration tests" ON "BUILD_TESTS;BUILD_SDK" OFF)
cmake_dependent_option(BUILD_LEGACY_UNIT_TESTS "Builds unit tests" ON "BUILD_TESTS;BUILD_LEGACY" OFF)
cmake_dependent_option(BUILD_PIXIE16_API "Builds user API library - libPixie16Api.so" ON "BUILD_SDK" OFF)
cmake_dependent_option(BUILD_SYSTEM_TESTS "Enables build of system tests" ON "BUILD_TESTS;BUILD_SDK" OFF)
cmake_dependent_option(BUILD_SDK_UNIT_TESTS "Builds unit tests" ON "BUILD_TESTS;BUILD_SDK" OFF)
cmake_dependent_option(USE_USLEEP "Adds the USE_USLEEP flag to Legacy builds" "OFF" "BUILD_LEGACY" OFF)

add_subdirectory(bin)
add_subdirectory(cmake)

if (BUILD_LEGACY)
message(WARNING "The Legacy C API will be deprecated July 31, 2023. We recommend using Pixie16Api.so instead.")
endif ()

if (BUILD_SDK OR BUILD_LEGACY)
if (BUILD_SDK)
find_package(BroadcomAPI REQUIRED)
IF (${CMAKE_VERSION} VERSION_LESS "3.13")
link_directories(${PLX_LIBRARY_DIR})
Expand Down
34 changes: 10 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# PixieSDK

[![Build Status](https://github.com/xiallc/pixie_sdk/actions/workflows/cmake.yml/badge.svg)](https://github.com/xiallc/pixie_sdk/actions)
[![Latest Release](https://img.shields.io/github/v/release/xiallc/pixie_sdk)](https://github.com/xiallc/pixie_sdk/releases/latest)

Expand All @@ -7,8 +8,8 @@ Pixie-16 product line. We've tried to provide all the tools necessary to get a f
up-and-running without the user writing a single line of code.

## Documentation
The [project documentation is kept in a separate repository](https://github.com/xiallc/pixie16-docs.git).

The [project documentation is available on the web](https://docs.pixie16.xia.com).

## API Update Policy

Expand All @@ -26,31 +27,12 @@ added functionality. This policy may not cover all situations, and will evolve o
situations that don’t fit neatly into this policy, we will ensure that the information is available
in all relevant Release Notes.

### Notice regarding Legacy C API

The Legacy C API is now deprecated and will no longer receive support outside critical bug fixes.
**We will remove the legacy C API on July 31, 2023**.

We provide a
[basic guide on how to transition to the new API](https://docs.pixie16.xia.com/md_E__projects_pixie_pixie_sdk_doc_pages_pixie16_pixiesdk_transition_guide.html)
within the documentation.

## Feature highlights

* System no longer locks up when attempting to access the modules concurrently.
* Host-side list-mode data buffering prevents data loss from full list-mode data FIFOs.
* JSON settings files contain metadata regarding the module's configuration and firmware as well as
DSP variables.
* Firmware loads in parallel. A full crate takes about 3 seconds to boot.
* Optimized wait times reduces the time spent waiting on the hardware.
* Removed the need for `pxisys.ini`.

## Tested Systems

| Operating System | CMake Version | Compiler | Compiler Version |
|---|---|---|---|
| Windows 10 | 3.20.2 | MSVC | 14.28.29333 |
| CentOS 8 | 3.11.4 | GCC | 8.3.1 |
|------------------|---------------|----------|------------------|
| Windows 10 | 3.20.2 | MSVC | 14.28.29333 |
| CentOS 8 | 3.11.4 | GCC | 8.3.1 |

## Dependencies and Prerequisites

Expand All @@ -60,7 +42,11 @@ within the documentation.
* You should have `PLX_SDK_DIR` exported in your environment before building.

> **Note**: The Legacy code can be used with much older compilers (ex. GCC 4.5+) and older versions
> of the Broadcom PCI/PCIe SDK (ex. 7.11). You'll still need CMake 3.10+ to generate the build files.
> of the Broadcom PCI/PCIe SDK (ex. 7.11). You'll still need CMake 3.10+ to generate the build
> files.
For more detailed
[installation instructions please see the documentation](https://docs.pixie16.xia.com/user/installation/index.html).

## Library Architecture

Expand Down
1 change: 0 additions & 1 deletion bin/CMakeLists.txt

This file was deleted.

182 changes: 0 additions & 182 deletions bin/set_file_decoder.py

This file was deleted.

16 changes: 3 additions & 13 deletions cmake/functions/xia_configure_target.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# @brief Defines a function used to configure targets on Windows and Linux

function(xia_configure_target)
set(options USE_PLX FORCE_DEBUG CONFIG_OBJ LEGACY)
set(options USE_PLX FORCE_DEBUG CONFIG_OBJ)
set(oneValueArgs TARGET CXX_STD)
set(multiValueArgs COMPILE_DEFS COMPILE_OPTS WIN_COMPILE_OPTIONS LINUX_COMPILE_OPTIONS LIBS LINUX_LIBS WIN_LIBS)
cmake_parse_arguments(XIA_CT "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
Expand All @@ -35,15 +35,9 @@ function(xia_configure_target)
CXX_EXTENSIONS NO
)
else ()
if (NOT ${XIA_CT_LEGACY})
target_compile_options(${XIA_CT_TARGET} PRIVATE -std=c++${XIA_CT_CXX_STD})
endif ()
target_compile_options(${XIA_CT_TARGET} PRIVATE -std=c++${XIA_CT_CXX_STD})
endif ()

if (${XIA_CT_LEGACY} AND (CMAKE_C_COMPILER_ID MATCHES "GNU"))
target_compile_options(${XIA_CT_TARGET} PRIVATE -fcommon)
endif (${XIA_CT_LEGACY} AND (CMAKE_C_COMPILER_ID MATCHES "GNU"))

if (${XIA_CT_USE_PLX})
target_include_directories(${XIA_CT_TARGET} PUBLIC ${PLX_INCLUDE_DIR})
if (${CMAKE_VERSION} VERSION_GREATER "3.12")
Expand Down Expand Up @@ -85,11 +79,7 @@ function(xia_configure_target)
target_compile_definitions(${XIA_CT_TARGET} PUBLIC PLX_WIN)
endif ()
if (NOT ${XIA_CT_CONFIG_OBJ})
if (NOT ${XIA_CT_LEGACY})
target_link_libraries(${XIA_CT_TARGET} PUBLIC ${XIA_CT_WIN_LIBS})
else ()
target_link_libraries(${XIA_CT_TARGET} PUBLIC winmm ${XIA_CT_WIN_LIBS})
endif ()
target_link_libraries(${XIA_CT_TARGET} PUBLIC ${XIA_CT_WIN_LIBS})
endif ()
if (${CMAKE_BUILD_TYPE} MATCHES "Debug")
target_compile_options(${XIA_CT_TARGET} PUBLIC /WX)
Expand Down
1 change: 0 additions & 1 deletion examples/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
add_subdirectory(example_pixie16api)
add_subdirectory(example_pixie16app)
add_subdirectory(list_mode_file_stats)

install(DIRECTORY share DESTINATION ${CMAKE_INSTALL_PREFIX})
7 changes: 4 additions & 3 deletions examples/example_pixie16api/example_pixie16api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
#include <nolhmann/json.hpp>

#include <pixie16/pixie16.h>
#include <pixie/pixie16/hw.hpp>

#include <sys/types.h>

Expand Down Expand Up @@ -176,7 +177,7 @@ void read_config(const std::string& config_file_name, configuration& cfg) {
nlohmann::json jf = nlohmann::json::parse(input);
input.close();

if (jf.empty() || jf.size() > SYS_MAX_NUM_MODULES) {
if (jf.empty() || jf.size() > xia::pixie::hw::max_slots) {
throw std::invalid_argument("invalid number of modules");
}

Expand Down Expand Up @@ -444,7 +445,7 @@ bool execute_list_mode_run(unsigned int run_num, const configuration& cfg,
return false;

std::cout << LOG("INFO") << "Starting list-mode run." << std::endl;
if (!verify_api_return_value(Pixie16StartListModeRun(cfg.num_modules(), LIST_MODE_RUN, NEW_RUN),
if (!verify_api_return_value(Pixie16StartListModeRun(cfg.num_modules(), 0x100, 1),
"Pixie16StartListModeRun"))
return false;

Expand Down Expand Up @@ -652,7 +653,7 @@ bool execute_mca_run(unsigned int run_num, const configuration& cfg,

std::cout << LOG("INFO") << "Starting MCA data run for " << runtime_in_seconds << " s."
<< std::endl;
if (!verify_api_return_value(Pixie16StartHistogramRun(cfg.num_modules(), NEW_RUN),
if (!verify_api_return_value(Pixie16StartHistogramRun(cfg.num_modules(), 1),
"Pixie16StartHistogramRun"))
return false;

Expand Down
8 changes: 0 additions & 8 deletions examples/example_pixie16app/CMakeLists.txt

This file was deleted.

Loading

0 comments on commit 9e2b711

Please sign in to comment.