diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 2bdf3a987..128dcb73d 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -17,4 +17,4 @@ If the earlier steps didn't solve the problem, raise an issue providing: * your camera type and its serial number that can be found on your camera's base (bottom) plate * software that has an issue, expected and actual behavior, and reproduction steps as detailed as possible -If you are a Metavision Professional customer, you are also granted access to our personal support and our Knowledge Center. Contact us via support@prophesee.ai \ No newline at end of file +If you are a Metavision SDK customer, you are also granted access to our personal support and our Knowledge Center. Contact us via support@prophesee.ai \ No newline at end of file diff --git a/.github/workflows/all_jobs.yaml b/.github/workflows/all_jobs.yaml index 267366458..18d7e588d 100644 --- a/.github/workflows/all_jobs.yaml +++ b/.github/workflows/all_jobs.yaml @@ -28,7 +28,7 @@ jobs: python3-pip python3-distutils xvfb libglfw3 libglfw3-dev libglew-dev libopencv-dev ffmpeg \ libboost-dev libboost-program-options-dev libboost-filesystem-dev libboost-timer-dev \ libboost-chrono-dev libboost-thread-dev zip unzip git-lfs - pip install opencv-python $numpy_version pytest + pip install opencv-python $numpy_version pytest torch scipy sk-video numba h5py - name: Build pybind run: | @@ -76,7 +76,7 @@ jobs: libboost-dev libboost-program-options-dev libboost-filesystem-dev libboost-timer-dev \ libboost-chrono-dev libboost-thread-dev zip unzip python3 -m pip install --upgrade pip - python3 -m pip install opencv-python $numpy_version pytest + python3 -m pip install opencv-python $numpy_version pytest torch scipy sk-video numba h5py - name: Build pybind and gtest run: | @@ -135,19 +135,30 @@ jobs: name: vcpkg_binaries path: ".." - - name: Install python and vcpkg dependencies + - name: Download ffmpeg archive + uses: dawidd6/action-download-artifact@v2 + with: + workflow: upload_win_binaries.yaml + workflow_conclusion: success + name: ffmpeg_archive + path: ".." + + - name: Install build and tests dependencies shell: bash run: | cd .. unzip -q "vcpkg-export.zip" - py -$python_versions -m pip install pytest $numpy_version opencv-python + 7z x ffmpeg-archive.7z + $python_executable -m pip install pytest $numpy_version opencv-python torch scipy sk-video numba h5py cd openeb - name: Build openEB shell: bash run: | + export PATH=$PATH:`realpath ../ffmpeg-5.0.1-full_build/bin` mkdir build && cd build - cmake -A x64 -DCMAKE_TOOLCHAIN_FILE="../../vcpkg/scripts/buildsystems/vcpkg.cmake" \ + cmake -A x64 -DCMAKE_TOOLCHAIN_FILE="../cmake/toolchains/vcpkg.cmake" \ + -DVCPKG_DIRECTORY=`realpath ../../vcpkg` -D Python3_EXECUTABLE=$python_executable \ -DBUILD_TESTING=ON .. cmake --build . --config Release --parallel 4 diff --git a/.github/workflows/upload_datasets.yaml b/.github/workflows/upload_datasets.yaml index 31b9abf15..45142d5af 100644 --- a/.github/workflows/upload_datasets.yaml +++ b/.github/workflows/upload_datasets.yaml @@ -6,7 +6,7 @@ on: - cron: "15 2 1 */2 *" env: - dataset_download_address: "https://dataset.prophesee.ai/index.php/s/VfhepWI4MPVWh9o/download" + dataset_download_address: "https://dataset.prophesee.ai/index.php/s/hyCzGM4tpR8w5bx/download" jobs: get_artifacts: diff --git a/.github/workflows/upload_win_binaries.yaml b/.github/workflows/upload_win_binaries.yaml index 8c13c1541..abd81b0c0 100644 --- a/.github/workflows/upload_win_binaries.yaml +++ b/.github/workflows/upload_win_binaries.yaml @@ -6,7 +6,8 @@ on: - cron: "15 2 1 */2 *" env: - win_binaries_download_address: "https://prophesee-bamboo.s3.eu-west-1.amazonaws.com/build-env/vcpkg-export-20210831-MV2.3.0.zip" + win_binaries_download_address: "https://prophesee-bamboo.s3.eu-west-1.amazonaws.com/build-env/vcpkg-export-20220511-MV3.0.0.zip" + ffmpeg_archive_download_address: "https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-full.7z" jobs: get_artifacts: @@ -17,6 +18,7 @@ jobs: timeout-minutes: 10 run: | curl -L -o vcpkg-export.zip $win_binaries_download_address + curl -L -o ffmpeg-archive.7z $ffmpeg_archive_download_address - name: Uploading binaries to storage uses: actions/upload-artifact@master @@ -24,6 +26,12 @@ jobs: name: vcpkg_binaries path: vcpkg-export.zip + - name: Uploading ffmpeg to storage + uses: actions/upload-artifact@master + with: + name: ffmpeg_archive + path: ffmpeg-archive.7z + - name: Slack Notification if: always() uses: rtCamp/action-slack-notify@v2 diff --git a/CMakeLists.txt b/CMakeLists.txt index fcafc5bc2..966f4b21e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,7 +9,7 @@ cmake_minimum_required(VERSION 3.5) -project(metavision VERSION 2.3.2) +project(metavision VERSION 3.0.0) set(PROJECT_VERSION_SUFFIX "") if(PROJECT_VERSION_SUFFIX STREQUAL "") @@ -168,24 +168,27 @@ set(DATASET_DIR "" CACHE PATH "Folder with dataset for testing") ################################################### Detect which SDK modules are available set(METAVISION_SDK_MODULES_OPEN base core driver CACHE STRING "SDK Open modules") -set(METAVISION_SDK_MODULES_PROFESSIONAL analytics calibration cv ml CACHE STRING "SDK Professional modules") +if (COMPILE_PYTHON3_BINDINGS) + list(APPEND METAVISION_SDK_MODULES_OPEN core_ml) +endif (COMPILE_PYTHON3_BINDINGS) +set(METAVISION_SDK_MODULES_ADVANCED analytics calibration cv ml CACHE STRING "SDK Advanced modules") if (NOT ANDROID) list(APPEND METAVISION_SDK_MODULES_OPEN ui) - list(APPEND METAVISION_SDK_MODULES_PROFESSIONAL 3dview cv3d) + list(APPEND METAVISION_SDK_MODULES_ADVANCED 3dview cv3d) endif (NOT ANDROID) set(METAVISION_SDK_MODULES_AVAILABLE) -foreach(metavision_offer OPEN PROFESSIONAL) - set(METAVISION_SDK_${metavision_offer}_MODULES_AVAILABLE) - message(STATUS "Building METAVISION_SDK_MODULES_${metavision_offer} modules : ${METAVISION_SDK_MODULES_${metavision_offer}}") - foreach(module_name IN LISTS METAVISION_SDK_MODULES_${metavision_offer}) +foreach(metavision_modules_set OPEN ADVANCED) + set(METAVISION_SDK_${metavision_modules_set}_MODULES_AVAILABLE) + message(STATUS "Building METAVISION_SDK_MODULES_${metavision_modules_set} modules : ${METAVISION_SDK_MODULES_${metavision_modules_set}}") + foreach(module_name IN LISTS METAVISION_SDK_MODULES_${metavision_modules_set}) if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/sdk/modules/${module_name}/CMakeLists.txt") - list(APPEND METAVISION_SDK_${metavision_offer}_MODULES_AVAILABLE "${module_name}") + list(APPEND METAVISION_SDK_${metavision_modules_set}_MODULES_AVAILABLE "${module_name}") endif(EXISTS "${CMAKE_CURRENT_LIST_DIR}/sdk/modules/${module_name}/CMakeLists.txt") endforeach(module_name) - list(APPEND METAVISION_SDK_MODULES_AVAILABLE ${METAVISION_SDK_${metavision_offer}_MODULES_AVAILABLE}) -endforeach(metavision_offer) + list(APPEND METAVISION_SDK_MODULES_AVAILABLE ${METAVISION_SDK_${metavision_modules_set}_MODULES_AVAILABLE}) +endforeach(metavision_modules_set) ################################################### Find needed packages and programs @@ -229,8 +232,8 @@ if (BUILD_TESTING) if(NOT EXISTS "${PROJECT_SOURCE_DIR}/datasets" AND GIT_LFS_NOT_AVAILABLE) message("---------------------------------------------------------------------------------------------------------") message("| Test data was not found. To run the tests, please download the test data adapted to your project: |") - message("| - OpenEB: https://dataset.prophesee.ai/index.php/s/VfhepWI4MPVWh9o (500 Mb archive) |") - message("| - Metavision Professional: https://dataset.prophesee.ai/index.php/s/JJ5xStgd8GSUWFz (3 Gb archive) |") + message("| - OpenEB: https://dataset.prophesee.ai/index.php/s/hyCzGM4tpR8w5bx (500 Mb archive) |") + message("| - Metavision SDK: https://dataset.prophesee.ai/index.php/s/TF6yotuIukg5dcB (3 Gb archive) |") message("---------------------------------------------------------------------------------------------------------\n") endif() @@ -308,10 +311,10 @@ include(uninstall) include(add_library_version_header) include(add_cpack_component) include(create_metavision_open_archive) -if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/cmake/custom_targets_metavision_professional") - list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/custom_targets_metavision_professional) - include(create_metavision_professional_archives) -endif(EXISTS "${CMAKE_CURRENT_LIST_DIR}/cmake/custom_targets_metavision_professional") +if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/cmake/custom_targets_metavision_sdk") + list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/custom_targets_metavision_sdk) + include(create_metavision_sdk_source_archives) +endif(EXISTS "${CMAKE_CURRENT_LIST_DIR}/cmake/custom_targets_metavision_sdk") # Add Metavision Open debian packages : add_cpack_component(PUBLIC metavision-open-lib metavision-open-bin metavision-open-dev metavision-open-samples) @@ -320,27 +323,33 @@ if(COMPILE_PYTHON3_BINDINGS) add_python_cpack_components(PUBLIC metavision-open) endif(COMPILE_PYTHON3_BINDINGS) -# Add Metavision Essentials and SDK Pro debian packages : -if (METAVISION_SDK_PROFESSIONAL_MODULES_AVAILABLE) - # SDK Pro - add_cpack_component(PUBLIC metavision-sdk-pro-lib metavision-sdk-pro-bin) +# Add Metavision SDK debian packages : +if (METAVISION_SDK_ADVANCED_MODULES_AVAILABLE) + # Advanced + add_cpack_component(PUBLIC metavision-sdk-advanced-lib metavision-sdk-advanced-bin metavision-sdk-advanced-dev metavision-sdk-advanced-samples) if(COMPILE_PYTHON3_BINDINGS) - add_cpack_component(PUBLIC metavision-sdk-pro-python-samples) - add_python_cpack_components(PUBLIC metavision-sdk-pro) + add_cpack_component(PUBLIC metavision-sdk-advanced-python metavision-sdk-advanced-python-samples) + add_python_cpack_components(PUBLIC metavision-sdk-advanced) endif(COMPILE_PYTHON3_BINDINGS) - # Essentials - add_cpack_component(PUBLIC metavision-essentials-licence metavision-essentials-lib metavision-essentials-bin metavision-essentials) + + # SDK + add_cpack_component(PUBLIC metavision-sdk-lib metavision-sdk-bin metavision-sdk-dev metavision-sdk-samples metavision-sdk) if(COMPILE_PYTHON3_BINDINGS) - add_cpack_component(PUBLIC metavision-essentials-python-samples) - add_python_cpack_components(PUBLIC metavision-essentials) + add_cpack_component(PUBLIC metavision-sdk-python metavision-sdk-python-samples) + add_python_cpack_components(PUBLIC metavision-sdk) endif(COMPILE_PYTHON3_BINDINGS) - if(EXISTS "${PROJECT_SOURCE_DIR}/licensing/LICENSE_ESSENTIALS") - install(FILES ${PROJECT_SOURCE_DIR}/licensing/LICENSE_ESSENTIALS + if(EXISTS "${PROJECT_SOURCE_DIR}/licensing/LICENSE_METAVISION_INTELLIGENCE") + install(FILES ${PROJECT_SOURCE_DIR}/licensing/LICENSE_METAVISION_INTELLIGENCE DESTINATION share/metavision/licensing - COMPONENT metavision-essentials-licence) + COMPONENT metavision-sdk-base-lib) endif() -endif (METAVISION_SDK_PROFESSIONAL_MODULES_AVAILABLE) +else () + # Installing metavision open + install(FILES ${PROJECT_SOURCE_DIR}/licensing/LICENSE_OPEN + DESTINATION share/metavision/licensing + COMPONENT metavision-sdk-base-lib) +endif (METAVISION_SDK_ADVANCED_MODULES_AVAILABLE) ################################ # Utils ## @@ -356,9 +365,6 @@ add_subdirectory(hal) if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/hal_psee_plugins/CMakeLists.txt") add_subdirectory(hal_psee_plugins) endif(EXISTS "${CMAKE_CURRENT_LIST_DIR}/hal_psee_plugins/CMakeLists.txt") -if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/hal_openeb_plugins/CMakeLists.txt") - add_subdirectory(hal_openeb_plugins) -endif(EXISTS "${CMAKE_CURRENT_LIST_DIR}/hal_openeb_plugins/CMakeLists.txt") ################################ # SDK ## @@ -403,8 +409,8 @@ set(cpack_all_components ${cpack_public_components} ${cpack_internal_components} list(REMOVE_DUPLICATES cpack_all_components) file(WRITE ${GENERATE_FILES_DIRECTORY}/meta-package.log "") foreach(comp ${cpack_all_components}) - if ("${comp}" MATCHES "^metavision-(open|essentials|sdk-pro|designer)-(lib|bin|dev|samples|python3.*|python|python-samples)$" OR - "${comp}" STREQUAL "metavision-essentials") + if ("${comp}" MATCHES "^metavision-(open|sdk|sdk-advanced|designer)-(lib|bin|dev|samples|python3.*|python|python-samples)$" OR + "${comp}" STREQUAL "metavision-sdk") install(FILES ${GENERATE_FILES_DIRECTORY}/meta-package.log DESTINATION share/metavision/log/${comp} COMPONENT ${comp} diff --git a/README.md b/README.md index eeb1e2a13..29aebec21 100644 --- a/README.md +++ b/README.md @@ -7,24 +7,30 @@ their own applications or plugins. As a camera manufacturer, ensure your custome event-based software suite available by building your own plugin. As a creator, scientist, academic, join and contribute to the fast-growing event-based vision community. -OpenEB is composed of the 5 Open modules of Metavision Intelligence: +OpenEB is composed of the Open modules of Metavision Intelligence: * HAL: Hardware Abstraction Layer to operate any event-based vision device. * Base: Foundations and common definitions of event-based applications. * Core: Generic algorithms for visualization, event stream manipulation, applicative pipeline generation. +* Core ML: Generic functions for Machine Learning, event_to_video and video_to_event pipelines. * Driver: High-level abstraction built on the top of HAL to easily interact with event-based cameras. * UI: Viewer and display controllers for event-based data. +OpenEB also contains the source code of Prophesee camera plugins, enabling to stream data from our event-based cameras +and to read recordings of event-based data. + This document describes how to compile and install the OpenEB codebase. For further information, refer to our [online documentation](https://docs.prophesee.ai/) where you will find some [tutorials](https://docs.prophesee.ai/stable/metavision_sdk/tutorials/index.html) to get you started in C++ or Python, -some [samples and applications](https://docs.prophesee.ai/stable/samples.html) to discover how to use +some [samples](https://docs.prophesee.ai/stable/samples.html) to discover how to use [our API](https://docs.prophesee.ai/stable/api.html) and a more detailed -[description of our modules and plans](https://docs.prophesee.ai/stable/modules.html). +[description of our modules and packaging](https://docs.prophesee.ai/stable/modules.html). ## Compiling on Ubuntu -Currently, we support Ubuntu 18.04 and 20.04. +Currently, we support Ubuntu 18.04 and 20.04. +Compilation on other versions of Ubuntu or other Linux distributions was not tested. +For those platforms some adjustments to this guide or to the code itself may be required (specially for non-Debian Linux). ### Prerequisites @@ -32,22 +38,52 @@ Install the following dependencies: ```bash sudo apt update -sudo apt -y install apt-utils build-essential software-properties-common wget unzip curl -sudo apt -y install cmake libopencv-dev git -sudo apt -y install libboost-all-dev libusb-1.0-0-dev libeigen3-dev -sudo apt -y install libglew-dev libglfw3-dev -sudo apt -y install libgtest-dev +sudo apt -y install apt-utils build-essential software-properties-common wget unzip curl git cmake +sudo apt -y install libopencv-dev libgtest-dev libboost-all-dev libusb-1.0-0-dev libeigen3-dev +sudo apt -y install libglew-dev libglfw3-dev libcanberra-gtk-module ``` For the Python API, you will need Python and some additional libraries. If Python is not available on your system, install it (we support Python 3.6 and 3.7 on Ubuntu 18.04 and Python 3.7 and 3.8 on Ubuntu 20.04). -Then install some extra libraries: +Then install `pip`: ```bash sudo apt -y install python3-pip python3-distutils python3 -m pip install pip --upgrade -python3 -m pip install "numpy==1.19.5" "opencv-python>=4.2.0.34" pytest +``` + +To use Machine Learning features, you need to install some additional dependencies. + +First, if you have some Nvidia hardware with GPUs, install `CUDA (10.2, 11.1 or 11.3) `_ +and `cuDNN `_ to leverage them with pytorch and libtorch. + +Make sure that you install a version of CUDA that is compatible with your GPUs by checking +`Nvidia compatibility page `_. + +Note that, at the moment, we don't support `OpenCL `_ and AMD GPUs. + +Then, install pytorch. Go to `pytorch.org `_ to retrieve the pip command that you +will launch in a console to install PyTorch 1.8.2 LTS. Here is an example of a command that can be retrieved for +pytorch using CUDA 11.1: + +```bash +python3 -m pip install torch==1.8.2+cu111 torchvision==0.9.2+cu111 torchaudio==0.8.2 -f https://download.pytorch.org/whl/lts/1.8/torch_lts.html +``` + +Then install some extra Python libraries: + +```bash +python3 -m pip install "opencv-python>=4.5.5.64" "sk-video==1.1.10" "fire==0.4.0" "numpy<=1.21" pandas scipy numba profilehooks h5py pytest +python3 -m pip install jupyter jupyterlab matplotlib "ipywidgets==7.6.5" +python3 -m pip install "pytorch_lightning==1.5.10" "tqdm==4.63.0" "kornia==0.6.1" + +``` + +Finally, you will need to install ffmpeg: + +```bash +sudo apt -y install ffmpeg ``` If you want to run tests, then you need to compile **gtest** package (this is optional): @@ -84,8 +120,7 @@ sudo cmake --build . --target install 3. Generate the makefiles using CMake: `cmake .. -DBUILD_TESTING=OFF` 4. Compile: `cmake --build . --config Release -- -j 4` -You can now use OpenEB directly from the build folder. -For this, you will need to update your environment variables using this script +To use OpenEB directly from the build folder, update your environment variables using this script (which you may add to your ~/.bashrc to make it permanent): ```bash @@ -97,30 +132,19 @@ with the following command: `sudo cmake --build . --target install`. In that cas `LD_LIBRARY_PATH` with `export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib` (If you want to update this path permanently, you should add the previous command in your ~/.bashrc) -To get started with OpenEB, you can download some [sample recordings](https://docs.prophesee.ai/stable/datasets.html) and stream them with [metavision_viewer](https://docs.prophesee.ai/stable/metavision_sdk/modules/driver/guides/viewer.html#chapter-sdk-driver-samples-viewer). The RAW plugins included in OpenEB will allow you to read the RAW files. -However, if you are planning to use a Prophesee camera, then you need to install **Prophesee plugins** by following this procedure: - - * Go to the [sign-up page for Prophesee Camera Plugins](https://www.prophesee.ai/metavision-intelligence-plugins-download/) - * Download the `.list` file for your version of Ubuntu and add it to the folder `/etc/apt/sources.list.d` - * Install Prophesee plugins: - -``` -sudo apt update -sudo apt install metavision-hal-prophesee-plugins -``` - -*Note* that the previous command will download the Prophesee Camera Plugins for the latest version of OpenEB. -If you are using a previous version of OpenEB, specify the version number in your command: `sudo apt -y install 'metavision-hal-prophesee-plugins=x.y.z'` +*Note* that since OpenEB 3.0.0, Prophesee camera plugins are included in the OpenEB repository, so you don't need to perform +any extra step to install them. +To get started with OpenEB, you can download some [sample recordings](https://docs.prophesee.ai/stable/datasets.html) +and visualize them with [metavision_viewer](https://docs.prophesee.ai/stable/metavision_sdk/modules/driver/guides/viewer.html#chapter-sdk-driver-samples-viewer) +or you can stream data from your Prophesee-compatible event-based camera. ### Running the test suite (Optional) Running the test suite is a sure-fire way to ensure you did everything well with your compilation and installation process. -*Note* that the [Prophesee Camera Plugins](https://www.prophesee.ai/metavision-intelligence-plugins-download/) must be installed for most of these tests to run. - - * Download [the files](https://dataset.prophesee.ai/index.php/s/VfhepWI4MPVWh9o) necessary to run the tests. + * Download [the files](https://dataset.prophesee.ai/index.php/s/hyCzGM4tpR8w5bx) necessary to run the tests. Click `Download` on the top right folder. Beware of the size of the obtained archive which weighs around 500 Mb. * Extract and put the content of this archive to `/`. For instance, the correct path of sequence `gen31_timer.raw` should be `/datasets/openeb/gen31_timer.raw`. @@ -157,13 +181,7 @@ To compile OpenEB, you will need to install some extra tools: * Select "C++ build tools", make sure Windows 10 SDK is checked, and add English Language Pack * For development, you can also download and run [Visual Studio Installer](https://visualstudio.microsoft.com/fr/downloads/) * install [vcpkg](https://github.com/microsoft/vcpkg) that will be used for installing dependencies: - * download and extract [vcpkg version 2020.11-1](https://github.com/microsoft/vcpkg/archive/refs/tags/2020.11-1.zip) - * patch a configuration file to fix a known issue with this version of vcpkg. In the file `C:\vcpkg-2020.11-1\scripts\cmake\vcpkg_acquire_msys.cmake`, - on line 81, add `"https://mirrors.zju.edu.cn/msys2/"` (this is adding a new mirror server). This can be achieved with the following command - (to adapt to the path in which you extracted vcpkg): - ```bash - powershell -command "& {&'Invoke-WebRequest' -OutFile C:\vcpkg-2020.11-1\scripts\cmake\vcpkg_acquire_msys.cmake -Uri https://files.prophesee.ai/share/dists/public/vcpkg/vcpkg_acquire_msys.cmake}" - ``` + * download and extract [vcpkg version 2022.03.10](https://github.com/microsoft/vcpkg/archive/refs/tags/2022.03.10.zip) * `cd ` * `bootstrap-vcpkg.bat` * finally, install the libraries by running `vcpkg.exe install --triplet x64-windows libusb eigen3 boost opencv glfw3 glew gtest dirent` @@ -172,7 +190,7 @@ To compile OpenEB, you will need to install some extra tools: #### Install pybind -The Python bindings rely on the [pybind11](https://github.com/pybind) library (version 2.6.0). +The Python bindings rely on the [pybind11](https://github.com/pybind) library. You should install pybind using vcpkg in order to get the appropriate version: `vcpkg.exe install --triplet x64-windows pybind11` *Note* that pybind11 is required only if you plan to use the Python API. @@ -194,13 +212,36 @@ C:\Users\Username\AppData\Local\Programs\Python\Python37 C:\Users\Username\AppData\Local\Programs\Python\Python37\Scripts ```` -* Finally, install additionally required Python packages using pip: +* Then make sure `pip` is up to date: ```bash python -m pip install pip --upgrade -python -m pip install "numpy==1.19.5" "opencv-python>=4.2.0.34" pytest ``` +To use Machine Learning features, you need to install some additional dependencies. + +First, if you have some Nvidia hardware with GPUs, install `CUDA (10.2, 11.1 or 11.3) `_ +and `cuDNN `_ to leverage them with pytorch and libtorch. + +Then, install pytorch. Go to `pytorch.org `_ to retrieve the pip command that you +will launch in a console to install PyTorch 1.8.2 LTS. Here is an example of a command that can be retrieved for +pytorch using CUDA 11.1: + +```bash +python -m pip install torch==1.8.2+cu111 torchvision==0.9.2+cu111 torchaudio==0.8.2 -f https://download.pytorch.org/whl/lts/1.8/torch_lts.html +``` + +Then install some extra Python libraries: + +```bash +python -m pip install "opencv-python>=4.5.5.64" "sk-video==1.1.10" "fire==0.4.0" "numpy<=1.21" pandas scipy numba profilehooks h5py pytest +python -m pip install jupyter jupyterlab matplotlib "ipywidgets==7.6.5" +python -m pip install "pytorch_lightning==1.5.10" "tqdm==4.63.0" "kornia==0.6.1" +``` + +Finally, you will need to download [ffmpeg](https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-full.7z) and add it to your PATH. + + ### Compilation First, retrieve the codebase: @@ -218,8 +259,7 @@ Open a command prompt inside the `openeb` folder (absolute path to this director Note that the value passed to the parameter `-DCMAKE_TOOLCHAIN_FILE` must be an absolute path, not a relative one. 3. Compile: `cmake --build . --config Release --parallel 4` -You can now use OpenEB directly from the build folder. -For this, you will need to update your environment variables using this script: +To use OpenEB directly from the build folder, update your environment variables using this script: ```bash \build\utils\scripts\setup_env.bat @@ -255,24 +295,20 @@ Open a command prompt inside the `openeb` folder and do as follows: Note that the value passed to the parameter `-DCMAKE_TOOLCHAIN_FILE` must be an absolute path, not a relative one. 3. Open the solution file `metavision.sln`, select the `Release` configuration and build the `ALL_BUILD` project. -#### Installing Prophesee Plugins +#### Getting Started -To get started with OpenEB, you can download some [sample recordings](https://docs.prophesee.ai/stable/datasets.html) and stream them with [metavision_viewer](https://docs.prophesee.ai/stable/metavision_sdk/modules/driver/guides/viewer.html#chapter-sdk-driver-samples-viewer). The RAW plugins included in OpenEB will allow you to read the RAW files. -However, if you are planning to use a Prophesee camera, then you need to install **Prophesee plugins** by following this procedure: +To get started with OpenEB, you can download some [sample recordings](https://docs.prophesee.ai/stable/datasets.html) +and visualize them with [metavision_viewer](https://docs.prophesee.ai/stable/metavision_sdk/modules/driver/guides/viewer.html#chapter-sdk-driver-samples-viewer) +or you can stream data from your Prophesee-compatible event-based camera. - * Go to the [sign-up page for Prophesee Camera Plugins](https://www.prophesee.ai/metavision-intelligence-plugins-download/) - * Follow the Camera Plugins download link provided after sign-up - * Among the list of Camera Plugins installers, download the one with the version number matching your OpenEB version - * Run the installer +*Note* that since OpenEB 3.0.0, Prophesee camera plugins are included in the OpenEB repository, so you don't need to perform +any extra step to install them. ### Running the test suite (Optional) - Running the test suite is a sure-fire way to ensure you did everything well with your compilation and installation process. -*Note* that the [Prophesee Camera Plugins](https://www.prophesee.ai/metavision-intelligence-plugins-download/) must be installed for most of these tests to run. - - * Download [the files](https://dataset.prophesee.ai/index.php/s/VfhepWI4MPVWh9o) necessary to run the tests. + * Download [the files](https://dataset.prophesee.ai/index.php/s/hyCzGM4tpR8w5bx) necessary to run the tests. Click `Download` on the top right folder. Beware of the size of the obtained archive which weighs around 500 Mb. * Extract and put the content of this archive to `/`. For instance, the correct path of sequence `gen31_timer.raw` should be `/datasets/openeb/gen31_timer.raw`. diff --git a/cmake/Modules/Findyarn.cmake b/cmake/Modules/Findyarn.cmake index 2236ee0bf..1c086dc77 100644 --- a/cmake/Modules/Findyarn.cmake +++ b/cmake/Modules/Findyarn.cmake @@ -10,7 +10,7 @@ # YARN_VERSION - The version number of the yarn executable find_program(YARN_EXECUTABLE - NAMES yarn.cmd yarn + NAMES yarn.cmd yarnpkg yarn HINTS /usr /usr/local /opt diff --git a/cmake/cpack/MetavisionCPackConfig.cmake b/cmake/cpack/MetavisionCPackConfig.cmake index 2f9502d23..ece584750 100644 --- a/cmake/cpack/MetavisionCPackConfig.cmake +++ b/cmake/cpack/MetavisionCPackConfig.cmake @@ -56,7 +56,7 @@ set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) ########################### # Include cpack configuration from the public packages of MetavisionSDK -include(${PROJECT_SOURCE_DIR}/sdk/cmake/MetavisionSDKCPackConfig.cmake) +include(${PROJECT_SOURCE_DIR}/sdk/cmake/MetavisionOffersCPackConfig.cmake) # Include cpack configuration from the public packages of Metavision Designer (if available) get_filename_component(designer_cpack_config "${PROJECT_SOURCE_DIR}/designer/cmake/MetavisionDesignerCPackConfig.cmake" REALPATH) @@ -74,10 +74,6 @@ if(EXISTS "${PROJECT_SOURCE_DIR}/hal_psee_plugins/cmake/MetavisionHALPseePlugins include("${PROJECT_SOURCE_DIR}/hal_psee_plugins/cmake/MetavisionHALPseePluginsCPackConfig.cmake") endif(EXISTS "${PROJECT_SOURCE_DIR}/hal_psee_plugins/cmake/MetavisionHALPseePluginsCPackConfig.cmake") -if(EXISTS "${PROJECT_SOURCE_DIR}/hal_openeb_plugins/cmake/MetavisionHALOpenEBPluginsCPackConfig.cmake") - include("${PROJECT_SOURCE_DIR}/hal_openeb_plugins/cmake/MetavisionHALOpenEBPluginsCPackConfig.cmake") -endif(EXISTS "${PROJECT_SOURCE_DIR}/hal_openeb_plugins/cmake/MetavisionHALOpenEBPluginsCPackConfig.cmake") - ################################ # Standalone samples ## ################################ diff --git a/cmake/custom_functions/add_library_version_header.cmake b/cmake/custom_functions/add_library_version_header.cmake index c358a4a9f..7d4e45c3b 100644 --- a/cmake/custom_functions/add_library_version_header.cmake +++ b/cmake/custom_functions/add_library_version_header.cmake @@ -8,8 +8,8 @@ # See the License for the specific language governing permissions and limitations under the License. set(GIT_BRANCH "main") -set(GIT_COMMIT_ID "c6f4e8a3c4fa56f8954b23643c0c60174997930b") -set(GIT_COMMIT_DATE "2022-04-05 18:40:34 +0200") +set(GIT_COMMIT_ID "f48bec34040818c1b922dcd9e63f656999e61753") +set(GIT_COMMIT_DATE "2022-05-25 21:02:57 +0200") # If git information are not provided in command line when running cmake, try to automatically determine them if(NOT GIT_BRANCH OR NOT GIT_COMMIT_ID OR NOT GIT_COMMIT_DATE) @@ -44,35 +44,49 @@ endforeach(cmd) # contain spaces (and even if passing it between quotes id does not work because it keeps the quotes) set(cmake_script ${GENERATE_FILES_DIRECTORY}/scripts/configure_version_file.cmake) file(WRITE ${cmake_script} " +include(CMakeParseArguments) +function(wrap_command) + cmake_parse_arguments(ARGS \"\" \"OUTPUT\" \"COMMAND\" \${ARGN}) + # if cmake is executed as sudo, run the command as the underlying user + if (UNIX AND (NOT \"\$ENV{SUDO_USER}\" STREQUAL \"\")) + string (REPLACE \";\" \" \" _cmd \"\${ARGS_COMMAND}\") + set (\${ARGS_OUTPUT} su \$ENV{SUDO_USER} -c \"\${_cmd}\" PARENT_SCOPE) + else () + set (\${ARGS_OUTPUT} \"\${ARGS_COMMAND}\" PARENT_SCOPE) + endif () +endfunction() +wrap_command(COMMAND ${GIT_COMMAND_GET_BRANCH} OUTPUT cmd) execute_process( - COMMAND ${GIT_COMMAND_GET_BRANCH} + COMMAND \${cmd} OUTPUT_VARIABLE GIT_BRANCH_RAW OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_VARIABLE err RESULT_VARIABLE ret ) if(ret AND NOT ret EQUAL 0) - message(FATAL_ERROR \"Error execuding command \n'${GIT_COMMAND_GET_BRANCH_QUOTES_ESCAPED}' :\n\${err}\") + message(FATAL_ERROR \"Error execuding command \n'\${cmd}' :\n\${err}\") endif() +wrap_command(COMMAND ${GIT_COMMAND_GET_COMMIT_ID} OUTPUT cmd) execute_process( - COMMAND ${GIT_COMMAND_GET_COMMIT_ID} + COMMAND \${cmd} OUTPUT_VARIABLE GIT_HASH_RAW OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_VARIABLE err RESULT_VARIABLE ret ) if(ret AND NOT ret EQUAL 0) - message(FATAL_ERROR \"Error execuding command \n'${GIT_COMMAND_GET_COMMIT_ID_QUOTES_ESCAPED}' :\n\${err}\") + message(FATAL_ERROR \"Error execuding command \n'\${cmd}' :\n\${err}\") endif() +wrap_command(COMMAND ${GIT_COMMAND_GET_COMMIT_DATE} OUTPUT cmd) execute_process( - COMMAND ${GIT_COMMAND_GET_COMMIT_DATE} + COMMAND \${cmd} OUTPUT_VARIABLE GIT_COMMIT_DATE OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_VARIABLE err RESULT_VARIABLE ret ) if(ret AND NOT ret EQUAL 0) - message(FATAL_ERROR \"Error execuding command \n'${GIT_COMMAND_GET_COMMIT_DATE_QUOTES_ESCAPED}' :\n\${err}\") + message(FATAL_ERROR \"Error execuding command \n'\${cmd}' :\n\${err}\") endif() configure_file(\"${CMAKE_CURRENT_LIST_DIR}/version.h.in\" \"\${OUTPUTFILE}\" @ONLY) diff --git a/cmake/custom_functions/python3.cmake b/cmake/custom_functions/python3.cmake index cfc1a1e3c..ebd31e109 100644 --- a/cmake/custom_functions/python3.cmake +++ b/cmake/custom_functions/python3.cmake @@ -68,12 +68,22 @@ if (COMPILE_PYTHON3_BINDINGS) endif() foreach (_python_version ${PYBIND11_PYTHON_VERSIONS}) # this is the extension we need to set for the python bindings module - execute_process( - COMMAND "${PYTHON_${_python_version}_EXECUTABLE}" "-c" - "from distutils import sysconfig as s; print(s.get_config_var('EXT_SUFFIX') or s.get_config_var('SO'));" - OUTPUT_VARIABLE PYTHON_${_python_version}_MODULE_EXTENSION - OUTPUT_STRIP_TRAILING_WHITESPACE - ) + if(CMAKE_CROSSCOMPILING) + # When cross compiling, we cannot run the python interpreter as it might be compiled for a different architecture. + # Therefore we ask for the user to have already set the library extension suffix. + if(NOT DEFINED PYTHON_${_python_version}_MODULE_EXTENSION) + message(FATAL_ERROR "CMake variable 'PYTHON_${_python_version}_MODULE_EXTENSION' needs to be defined. " + "One can run '$ python3-config --extension-suffix' on your targeted platform to get the actual value (eg. '.cpython-36m-x86_64-linux-gnu.so'). + ") + endif() + else() + execute_process( + COMMAND "${PYTHON_${_python_version}_EXECUTABLE}" "-c" + "from distutils import sysconfig as s; print(s.get_config_var('EXT_SUFFIX') or s.get_config_var('SO'));" + OUTPUT_VARIABLE PYTHON_${_python_version}_MODULE_EXTENSION + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + endif(CMAKE_CROSSCOMPILING) # this is the path where we install our python modules for cpack DEB (system) packages ... execute_process( diff --git a/cmake/custom_targets/README_metavision_open.md b/cmake/custom_targets/README_metavision_open.md index eeb1e2a13..29aebec21 100644 --- a/cmake/custom_targets/README_metavision_open.md +++ b/cmake/custom_targets/README_metavision_open.md @@ -7,24 +7,30 @@ their own applications or plugins. As a camera manufacturer, ensure your custome event-based software suite available by building your own plugin. As a creator, scientist, academic, join and contribute to the fast-growing event-based vision community. -OpenEB is composed of the 5 Open modules of Metavision Intelligence: +OpenEB is composed of the Open modules of Metavision Intelligence: * HAL: Hardware Abstraction Layer to operate any event-based vision device. * Base: Foundations and common definitions of event-based applications. * Core: Generic algorithms for visualization, event stream manipulation, applicative pipeline generation. +* Core ML: Generic functions for Machine Learning, event_to_video and video_to_event pipelines. * Driver: High-level abstraction built on the top of HAL to easily interact with event-based cameras. * UI: Viewer and display controllers for event-based data. +OpenEB also contains the source code of Prophesee camera plugins, enabling to stream data from our event-based cameras +and to read recordings of event-based data. + This document describes how to compile and install the OpenEB codebase. For further information, refer to our [online documentation](https://docs.prophesee.ai/) where you will find some [tutorials](https://docs.prophesee.ai/stable/metavision_sdk/tutorials/index.html) to get you started in C++ or Python, -some [samples and applications](https://docs.prophesee.ai/stable/samples.html) to discover how to use +some [samples](https://docs.prophesee.ai/stable/samples.html) to discover how to use [our API](https://docs.prophesee.ai/stable/api.html) and a more detailed -[description of our modules and plans](https://docs.prophesee.ai/stable/modules.html). +[description of our modules and packaging](https://docs.prophesee.ai/stable/modules.html). ## Compiling on Ubuntu -Currently, we support Ubuntu 18.04 and 20.04. +Currently, we support Ubuntu 18.04 and 20.04. +Compilation on other versions of Ubuntu or other Linux distributions was not tested. +For those platforms some adjustments to this guide or to the code itself may be required (specially for non-Debian Linux). ### Prerequisites @@ -32,22 +38,52 @@ Install the following dependencies: ```bash sudo apt update -sudo apt -y install apt-utils build-essential software-properties-common wget unzip curl -sudo apt -y install cmake libopencv-dev git -sudo apt -y install libboost-all-dev libusb-1.0-0-dev libeigen3-dev -sudo apt -y install libglew-dev libglfw3-dev -sudo apt -y install libgtest-dev +sudo apt -y install apt-utils build-essential software-properties-common wget unzip curl git cmake +sudo apt -y install libopencv-dev libgtest-dev libboost-all-dev libusb-1.0-0-dev libeigen3-dev +sudo apt -y install libglew-dev libglfw3-dev libcanberra-gtk-module ``` For the Python API, you will need Python and some additional libraries. If Python is not available on your system, install it (we support Python 3.6 and 3.7 on Ubuntu 18.04 and Python 3.7 and 3.8 on Ubuntu 20.04). -Then install some extra libraries: +Then install `pip`: ```bash sudo apt -y install python3-pip python3-distutils python3 -m pip install pip --upgrade -python3 -m pip install "numpy==1.19.5" "opencv-python>=4.2.0.34" pytest +``` + +To use Machine Learning features, you need to install some additional dependencies. + +First, if you have some Nvidia hardware with GPUs, install `CUDA (10.2, 11.1 or 11.3) `_ +and `cuDNN `_ to leverage them with pytorch and libtorch. + +Make sure that you install a version of CUDA that is compatible with your GPUs by checking +`Nvidia compatibility page `_. + +Note that, at the moment, we don't support `OpenCL `_ and AMD GPUs. + +Then, install pytorch. Go to `pytorch.org `_ to retrieve the pip command that you +will launch in a console to install PyTorch 1.8.2 LTS. Here is an example of a command that can be retrieved for +pytorch using CUDA 11.1: + +```bash +python3 -m pip install torch==1.8.2+cu111 torchvision==0.9.2+cu111 torchaudio==0.8.2 -f https://download.pytorch.org/whl/lts/1.8/torch_lts.html +``` + +Then install some extra Python libraries: + +```bash +python3 -m pip install "opencv-python>=4.5.5.64" "sk-video==1.1.10" "fire==0.4.0" "numpy<=1.21" pandas scipy numba profilehooks h5py pytest +python3 -m pip install jupyter jupyterlab matplotlib "ipywidgets==7.6.5" +python3 -m pip install "pytorch_lightning==1.5.10" "tqdm==4.63.0" "kornia==0.6.1" + +``` + +Finally, you will need to install ffmpeg: + +```bash +sudo apt -y install ffmpeg ``` If you want to run tests, then you need to compile **gtest** package (this is optional): @@ -84,8 +120,7 @@ sudo cmake --build . --target install 3. Generate the makefiles using CMake: `cmake .. -DBUILD_TESTING=OFF` 4. Compile: `cmake --build . --config Release -- -j 4` -You can now use OpenEB directly from the build folder. -For this, you will need to update your environment variables using this script +To use OpenEB directly from the build folder, update your environment variables using this script (which you may add to your ~/.bashrc to make it permanent): ```bash @@ -97,30 +132,19 @@ with the following command: `sudo cmake --build . --target install`. In that cas `LD_LIBRARY_PATH` with `export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib` (If you want to update this path permanently, you should add the previous command in your ~/.bashrc) -To get started with OpenEB, you can download some [sample recordings](https://docs.prophesee.ai/stable/datasets.html) and stream them with [metavision_viewer](https://docs.prophesee.ai/stable/metavision_sdk/modules/driver/guides/viewer.html#chapter-sdk-driver-samples-viewer). The RAW plugins included in OpenEB will allow you to read the RAW files. -However, if you are planning to use a Prophesee camera, then you need to install **Prophesee plugins** by following this procedure: - - * Go to the [sign-up page for Prophesee Camera Plugins](https://www.prophesee.ai/metavision-intelligence-plugins-download/) - * Download the `.list` file for your version of Ubuntu and add it to the folder `/etc/apt/sources.list.d` - * Install Prophesee plugins: - -``` -sudo apt update -sudo apt install metavision-hal-prophesee-plugins -``` - -*Note* that the previous command will download the Prophesee Camera Plugins for the latest version of OpenEB. -If you are using a previous version of OpenEB, specify the version number in your command: `sudo apt -y install 'metavision-hal-prophesee-plugins=x.y.z'` +*Note* that since OpenEB 3.0.0, Prophesee camera plugins are included in the OpenEB repository, so you don't need to perform +any extra step to install them. +To get started with OpenEB, you can download some [sample recordings](https://docs.prophesee.ai/stable/datasets.html) +and visualize them with [metavision_viewer](https://docs.prophesee.ai/stable/metavision_sdk/modules/driver/guides/viewer.html#chapter-sdk-driver-samples-viewer) +or you can stream data from your Prophesee-compatible event-based camera. ### Running the test suite (Optional) Running the test suite is a sure-fire way to ensure you did everything well with your compilation and installation process. -*Note* that the [Prophesee Camera Plugins](https://www.prophesee.ai/metavision-intelligence-plugins-download/) must be installed for most of these tests to run. - - * Download [the files](https://dataset.prophesee.ai/index.php/s/VfhepWI4MPVWh9o) necessary to run the tests. + * Download [the files](https://dataset.prophesee.ai/index.php/s/hyCzGM4tpR8w5bx) necessary to run the tests. Click `Download` on the top right folder. Beware of the size of the obtained archive which weighs around 500 Mb. * Extract and put the content of this archive to `/`. For instance, the correct path of sequence `gen31_timer.raw` should be `/datasets/openeb/gen31_timer.raw`. @@ -157,13 +181,7 @@ To compile OpenEB, you will need to install some extra tools: * Select "C++ build tools", make sure Windows 10 SDK is checked, and add English Language Pack * For development, you can also download and run [Visual Studio Installer](https://visualstudio.microsoft.com/fr/downloads/) * install [vcpkg](https://github.com/microsoft/vcpkg) that will be used for installing dependencies: - * download and extract [vcpkg version 2020.11-1](https://github.com/microsoft/vcpkg/archive/refs/tags/2020.11-1.zip) - * patch a configuration file to fix a known issue with this version of vcpkg. In the file `C:\vcpkg-2020.11-1\scripts\cmake\vcpkg_acquire_msys.cmake`, - on line 81, add `"https://mirrors.zju.edu.cn/msys2/"` (this is adding a new mirror server). This can be achieved with the following command - (to adapt to the path in which you extracted vcpkg): - ```bash - powershell -command "& {&'Invoke-WebRequest' -OutFile C:\vcpkg-2020.11-1\scripts\cmake\vcpkg_acquire_msys.cmake -Uri https://files.prophesee.ai/share/dists/public/vcpkg/vcpkg_acquire_msys.cmake}" - ``` + * download and extract [vcpkg version 2022.03.10](https://github.com/microsoft/vcpkg/archive/refs/tags/2022.03.10.zip) * `cd ` * `bootstrap-vcpkg.bat` * finally, install the libraries by running `vcpkg.exe install --triplet x64-windows libusb eigen3 boost opencv glfw3 glew gtest dirent` @@ -172,7 +190,7 @@ To compile OpenEB, you will need to install some extra tools: #### Install pybind -The Python bindings rely on the [pybind11](https://github.com/pybind) library (version 2.6.0). +The Python bindings rely on the [pybind11](https://github.com/pybind) library. You should install pybind using vcpkg in order to get the appropriate version: `vcpkg.exe install --triplet x64-windows pybind11` *Note* that pybind11 is required only if you plan to use the Python API. @@ -194,13 +212,36 @@ C:\Users\Username\AppData\Local\Programs\Python\Python37 C:\Users\Username\AppData\Local\Programs\Python\Python37\Scripts ```` -* Finally, install additionally required Python packages using pip: +* Then make sure `pip` is up to date: ```bash python -m pip install pip --upgrade -python -m pip install "numpy==1.19.5" "opencv-python>=4.2.0.34" pytest ``` +To use Machine Learning features, you need to install some additional dependencies. + +First, if you have some Nvidia hardware with GPUs, install `CUDA (10.2, 11.1 or 11.3) `_ +and `cuDNN `_ to leverage them with pytorch and libtorch. + +Then, install pytorch. Go to `pytorch.org `_ to retrieve the pip command that you +will launch in a console to install PyTorch 1.8.2 LTS. Here is an example of a command that can be retrieved for +pytorch using CUDA 11.1: + +```bash +python -m pip install torch==1.8.2+cu111 torchvision==0.9.2+cu111 torchaudio==0.8.2 -f https://download.pytorch.org/whl/lts/1.8/torch_lts.html +``` + +Then install some extra Python libraries: + +```bash +python -m pip install "opencv-python>=4.5.5.64" "sk-video==1.1.10" "fire==0.4.0" "numpy<=1.21" pandas scipy numba profilehooks h5py pytest +python -m pip install jupyter jupyterlab matplotlib "ipywidgets==7.6.5" +python -m pip install "pytorch_lightning==1.5.10" "tqdm==4.63.0" "kornia==0.6.1" +``` + +Finally, you will need to download [ffmpeg](https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-full.7z) and add it to your PATH. + + ### Compilation First, retrieve the codebase: @@ -218,8 +259,7 @@ Open a command prompt inside the `openeb` folder (absolute path to this director Note that the value passed to the parameter `-DCMAKE_TOOLCHAIN_FILE` must be an absolute path, not a relative one. 3. Compile: `cmake --build . --config Release --parallel 4` -You can now use OpenEB directly from the build folder. -For this, you will need to update your environment variables using this script: +To use OpenEB directly from the build folder, update your environment variables using this script: ```bash \build\utils\scripts\setup_env.bat @@ -255,24 +295,20 @@ Open a command prompt inside the `openeb` folder and do as follows: Note that the value passed to the parameter `-DCMAKE_TOOLCHAIN_FILE` must be an absolute path, not a relative one. 3. Open the solution file `metavision.sln`, select the `Release` configuration and build the `ALL_BUILD` project. -#### Installing Prophesee Plugins +#### Getting Started -To get started with OpenEB, you can download some [sample recordings](https://docs.prophesee.ai/stable/datasets.html) and stream them with [metavision_viewer](https://docs.prophesee.ai/stable/metavision_sdk/modules/driver/guides/viewer.html#chapter-sdk-driver-samples-viewer). The RAW plugins included in OpenEB will allow you to read the RAW files. -However, if you are planning to use a Prophesee camera, then you need to install **Prophesee plugins** by following this procedure: +To get started with OpenEB, you can download some [sample recordings](https://docs.prophesee.ai/stable/datasets.html) +and visualize them with [metavision_viewer](https://docs.prophesee.ai/stable/metavision_sdk/modules/driver/guides/viewer.html#chapter-sdk-driver-samples-viewer) +or you can stream data from your Prophesee-compatible event-based camera. - * Go to the [sign-up page for Prophesee Camera Plugins](https://www.prophesee.ai/metavision-intelligence-plugins-download/) - * Follow the Camera Plugins download link provided after sign-up - * Among the list of Camera Plugins installers, download the one with the version number matching your OpenEB version - * Run the installer +*Note* that since OpenEB 3.0.0, Prophesee camera plugins are included in the OpenEB repository, so you don't need to perform +any extra step to install them. ### Running the test suite (Optional) - Running the test suite is a sure-fire way to ensure you did everything well with your compilation and installation process. -*Note* that the [Prophesee Camera Plugins](https://www.prophesee.ai/metavision-intelligence-plugins-download/) must be installed for most of these tests to run. - - * Download [the files](https://dataset.prophesee.ai/index.php/s/VfhepWI4MPVWh9o) necessary to run the tests. + * Download [the files](https://dataset.prophesee.ai/index.php/s/hyCzGM4tpR8w5bx) necessary to run the tests. Click `Download` on the top right folder. Beware of the size of the obtained archive which weighs around 500 Mb. * Extract and put the content of this archive to `/`. For instance, the correct path of sequence `gen31_timer.raw` should be `/datasets/openeb/gen31_timer.raw`. diff --git a/cmake/custom_targets/create_metavision_open_archive.cmake b/cmake/custom_targets/create_metavision_open_archive.cmake index 99092707e..a135d2bcf 100644 --- a/cmake/custom_targets/create_metavision_open_archive.cmake +++ b/cmake/custom_targets/create_metavision_open_archive.cmake @@ -14,6 +14,8 @@ add_custom_target(create_metavision_open_archive_folder -DGIT_COMMAND_GET_BRANCH="${GIT_COMMAND_GET_BRANCH}" -DGIT_COMMAND_GET_COMMIT_ID="${GIT_COMMAND_GET_COMMIT_ID}" -DGIT_COMMAND_GET_COMMIT_DATE="${GIT_COMMAND_GET_COMMIT_DATE}" + -DCMAKE_MODULE_PATH="${CMAKE_MODULE_PATH}" + -DGENERATE_FILES_DIRECTORY="${GENERATE_FILES_DIRECTORY}" -P ${CMAKE_CURRENT_LIST_DIR}/create_metavision_open_archive_folder.cmake ) diff --git a/cmake/custom_targets/create_metavision_open_archive_folder.cmake b/cmake/custom_targets/create_metavision_open_archive_folder.cmake index 56b360a00..5a3133f55 100644 --- a/cmake/custom_targets/create_metavision_open_archive_folder.cmake +++ b/cmake/custom_targets/create_metavision_open_archive_folder.cmake @@ -11,8 +11,27 @@ file(REMOVE_RECURSE "${OUTPUT_DIR}") file(MAKE_DIRECTORY "${OUTPUT_DIR}") +# For some reason, CMAKE_MODULE_PATH passed by create_metavision_open_archive +# has spaces instead of semicolumns +string(REPLACE " " ";" CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}") +include(overridden_cmake_functions) + +set(HAL_OPEN_PLUGIN_FILES apps biasgen cmake CMakeLists.txt lib resources test) +set(HAL_OPEN_INCLUDES boards decoders facilities geometries plugin utils devices/common devices/utils) +set(HAL_OPEN_SOURCES boards CMakeLists.txt facilities plugin utils devices/common devices/utils devices/CMakeLists.txt) +set(HAL_OPEN_DEVICES gen3 gen31 gen41 golden_fallbacks imx636 others treuzell) + +foreach (open_device ${HAL_OPEN_DEVICES}) + list(APPEND HAL_OPEN_INCLUDES devices/${open_device}) + list(APPEND HAL_OPEN_SOURCES devices/${open_device}) +endforeach(open_device) +list_transform_prepend (HAL_OPEN_INCLUDES include/) +list_transform_prepend (HAL_OPEN_SOURCES src/) +list(APPEND HAL_OPEN_PLUGIN_FILES ${HAL_OPEN_INCLUDES} ${HAL_OPEN_SOURCES}) +list_transform_prepend (HAL_OPEN_PLUGIN_FILES hal_psee_plugins/) + # Add the files and folders needed to compile open : -foreach (file_or_dir CMakeLists.txt licensing/LICENSE_OPEN .gitignore conftest.py pytest.ini cmake standalone_samples hal hal_openeb_plugins utils/python/metavision_utils utils/cpp utils/scripts utils/CMakeLists.txt sdk/cmake sdk/CMakeLists.txt sdk/modules/CMakeLists.txt) +foreach (file_or_dir CMakeLists.txt licensing/LICENSE_OPEN .gitignore conftest.py pytest.ini cmake standalone_samples hal ${HAL_OPEN_PLUGIN_FILES} utils/python/metavision_utils utils/cpp utils/scripts utils/CMakeLists.txt sdk/cmake sdk/CMakeLists.txt sdk/modules/CMakeLists.txt) get_filename_component(dest "${OUTPUT_DIR}/${file_or_dir}" DIRECTORY) file(COPY "${PROJECT_SOURCE_DIR}/${file_or_dir}" DESTINATION "${dest}" @@ -25,15 +44,16 @@ file(COPY "${PROJECT_SOURCE_DIR}/utils/github_actions/openeb/" PATTERN "*" ) -# Remove professional targets -file(REMOVE_RECURSE "${OUTPUT_DIR}/cmake/custom_targets_metavision_professional") +# Remove SDK targets +file(REMOVE_RECURSE "${OUTPUT_DIR}/cmake/custom_targets_metavision_sdk") file(REMOVE "${OUTPUT_DIR}/cmake/custom_functions/create_addon_module_archive_folder.cmake") file(REMOVE "${OUTPUT_DIR}/cmake/custom_functions/documentation.cmake") # Remove unwanted files -file(REMOVE "${OUTPUT_DIR}/sdk/cmake/MetavisionEssentialsCPackConfig.cmake") +file(REMOVE "${OUTPUT_DIR}/sdk/cmake/MetavisionSDKCPackConfig.cmake") +file(REMOVE "${OUTPUT_DIR}/sdk/cmake/MetavisionStudioCPackConfig.cmake") file(REMOVE_RECURSE "${OUTPUT_DIR}/hal/cpp/doc") file(REMOVE_RECURSE "${OUTPUT_DIR}/hal/python/doc") -foreach (mod base core driver ui) +foreach (mod base core driver ui core_ml) file(COPY "${PROJECT_SOURCE_DIR}/sdk/modules/${mod}" DESTINATION "${OUTPUT_DIR}/sdk/modules") # Remove the code we don't want from the SDK modules (doc): foreach(subdir doc) diff --git a/hal/cmake/MetavisionHALCPackConfig.cmake b/hal/cmake/MetavisionHALCPackConfig.cmake index 474d51ca2..5a60d879c 100644 --- a/hal/cmake/MetavisionHALCPackConfig.cmake +++ b/hal/cmake/MetavisionHALCPackConfig.cmake @@ -36,7 +36,9 @@ set(CPACK_COMPONENT_METAVISION-HAL-SAMPLES_DEPENDS metavision-hal-dev) ############################ # metavision-hal-python3.X # ############################ -foreach (py_suffix ${PYTHON3_ALL_VERSIONS}) - set(CPACK_COMPONENT_METAVISION-HAL-PYTHON${py_suffix}_DESCRIPTION "Metavision HAL Python 3 libraries.\n${OPEN_PACKAGE_LICENSE}") - set(CPACK_COMPONENT_METAVISION-HAL-PYTHON${py_suffix}_DEPENDS metavision-hal-lib metavision-sdk-base-python${py_suffix}) -endforeach() \ No newline at end of file +if (COMPILE_PYTHON3_BINDINGS) + foreach (py_suffix ${PYTHON3_ALL_VERSIONS}) + set(CPACK_COMPONENT_METAVISION-HAL-PYTHON${py_suffix}_DESCRIPTION "Metavision HAL Python 3 libraries.\n${OPEN_PACKAGE_LICENSE}") + set(CPACK_COMPONENT_METAVISION-HAL-PYTHON${py_suffix}_DEPENDS metavision-hal-lib metavision-sdk-base-python${py_suffix}) + endforeach() +endif (COMPILE_PYTHON3_BINDINGS) diff --git a/hal/cpp/apps/metavision_raw_cutter/test/metavision_raw_cutter_pytest.py b/hal/cpp/apps/metavision_raw_cutter/test/metavision_raw_cutter_pytest.py index 2646c954e..454694878 100644 --- a/hal/cpp/apps/metavision_raw_cutter/test/metavision_raw_cutter_pytest.py +++ b/hal/cpp/apps/metavision_raw_cutter/test/metavision_raw_cutter_pytest.py @@ -67,8 +67,8 @@ def cut_and_check_info(input_raw, start, end, expected_output_info=None): expected_output_info_formatted = expected_output_info.format( output_file_name, re.escape(os.path.realpath(output_file_path))) - output_strip = "\n".join([line.strip() for line in info_cut_file.splitlines()]) - expected_output_strip = "\n".join([line.strip() for line in expected_output_info_formatted.splitlines()]) + output_strip = pytest_tools.get_mv_info_stripped_output(info_cut_file) + expected_output_strip = pytest_tools.get_mv_info_stripped_output(expected_output_info_formatted) assert re.search(expected_output_strip, output_strip) @@ -179,8 +179,8 @@ def pytestcase_test_metavision_raw_cutter_on_gen31_recording_from_0s_to_6s(datas Path {} Duration 6s 0ms 187us Integrator Prophesee -Plugin name hal_plugin_gen31_fx3\w* -Event encoding (?:EVT2|2.0) +Plugin name hal_plugin_gen31_fx3 +Event encoding EVT2 Camera generation 3.1 Camera systemID \d* Camera serial 00001621 @@ -212,8 +212,8 @@ def pytestcase_test_metavision_raw_cutter_on_gen31_recording_from_8s_to_11s(data Path {} Duration 3s 0ms 210us Integrator Prophesee -Plugin name hal_plugin_gen31_fx3\w* -Event encoding (?:EVT2|2.0) +Plugin name hal_plugin_gen31_fx3 +Event encoding EVT2 Camera generation 3.1 Camera systemID \d* Camera serial 00001621 @@ -245,8 +245,8 @@ def pytestcase_test_metavision_raw_cutter_on_gen4_evt2_recording_full_cut(datase Path {} Duration 10s 442ms 743us Integrator Prophesee -Plugin name hal_plugin_gen4_fx3\w* -Event encoding (?:EVT2|2.0) +Plugin name hal_plugin_gen41_evk3 +Event encoding EVT2 Camera generation 4.0 Camera systemID \d*(?: Camera subsystemID 537921537)? @@ -279,8 +279,8 @@ def pytestcase_test_metavision_raw_cutter_on_gen4_evt2_recording_from_2s_to_3s(d Path {} Duration 999ms 977us Integrator Prophesee -Plugin name hal_plugin_gen4_fx3\w* -Event encoding (?:EVT2|2.0) +Plugin name hal_plugin_gen41_evk3 +Event encoding EVT2 Camera generation 4.0 Camera systemID \d*(?: Camera subsystemID 537921537)? @@ -313,8 +313,8 @@ def pytestcase_test_metavision_raw_cutter_on_gen4_evt2_recording_from_4s_to_10s( Path {} Duration 6s 0ms 53us Integrator Prophesee -Plugin name hal_plugin_gen4_fx3\w* -Event encoding (?:EVT2|2.0) +Plugin name hal_plugin_gen41_evk3 +Event encoding EVT2 Camera generation 4.0 Camera systemID \d*(?: Camera subsystemID 537921537)? @@ -345,10 +345,10 @@ def pytestcase_test_metavision_raw_cutter_on_gen4_evt3_recording_full_cut(datase Name {} Path {} -Duration 15s 445ms 502us +Duration 15s 441ms 920us Integrator Prophesee -Plugin name hal_plugin_gen4_fx3\w* -Event encoding (?:EVT3|3.0) +Plugin name hal_plugin_gen41_evk3 +Event encoding EVT3 Camera generation 4.0 Camera systemID \d*(?: Camera subsystemID 537921537)? @@ -358,7 +358,7 @@ def pytestcase_test_metavision_raw_cutter_on_gen4_evt3_recording_full_cut(datase Type of event Number of events First timestamp Last timestamp Average event rate ---------------------------------------------------------------------------------------------------- -CD 18453063 5714 15445502 1.2 Mev/s +CD 18094969 5714 15000125 1.2 Mev/s """ cut_and_check_info(filename_full, start, end, expected_output_info) @@ -381,8 +381,8 @@ def pytestcase_test_metavision_raw_cutter_on_gen4_evt3_recording_from_3s_to_7s(d Path {} Duration 4s 6ms 217us Integrator Prophesee -Plugin name hal_plugin_gen4_fx3\w* -Event encoding (?:EVT3|3.0) +Plugin name hal_plugin_gen41_evk3 +Event encoding EVT3 Camera generation 4.0 Camera systemID \d*(?: Camera subsystemID 537921537)? @@ -415,8 +415,8 @@ def pytestcase_test_metavision_raw_cutter_on_gen4_evt3_recording_from_8s_to_9s(d Path {} Duration 1s 4ms 655us Integrator Prophesee -Plugin name hal_plugin_gen4_fx3\w* -Event encoding (?:EVT3|3.0) +Plugin name hal_plugin_gen41_evk3 +Event encoding EVT3 Camera generation 4.0 Camera systemID \d*(?: Camera subsystemID 537921537)? @@ -449,8 +449,8 @@ def pytestcase_test_metavision_raw_cutter_on_gen4_evt3_recording_from_4s_to_15s( Path {} Duration 11s 6ms 525us Integrator Prophesee -Plugin name hal_plugin_gen4_fx3\w* -Event encoding (?:EVT3|3.0) +Plugin name hal_plugin_gen41_evk3 +Event encoding EVT3 Camera generation 4.0 Camera systemID \d*(?: Camera subsystemID 537921537)? diff --git a/hal/cpp/include/metavision/hal/device/device_discovery.h b/hal/cpp/include/metavision/hal/device/device_discovery.h index f42015b7f..4e99ee944 100644 --- a/hal/cpp/include/metavision/hal/device/device_discovery.h +++ b/hal/cpp/include/metavision/hal/device/device_discovery.h @@ -133,17 +133,6 @@ class DeviceDiscovery { /// @param stream_config Configuration describing how to read the stream (see @ref RawFileConfig) /// @return A new Device static std::unique_ptr open_stream(std::unique_ptr stream, RawFileConfig &stream_config); - - /// @note type_ListSerial is deprecated since version 2.2.0 and will be removed in later - /// releases. Please use SerialList instead. - using type_ListSerial [[deprecated("type_ListSerial is deprecated since version 2.2.0 and will be removed in later " - "releases. Please use SerialList instead.")]] = std::list; - - /// @note type_ListSystems is deprecated since version 2.2.0 and will be removed in later - /// releases. Please use SystemList instead. - using type_ListSystems [[deprecated("type_ListSystems is deprecated since version 2.2.0 and will be removed in " - "later releases. Please use SystemList instead.")]] = - std::list; }; } // namespace Metavision diff --git a/hal/cpp/include/metavision/hal/facilities/detail/i_event_decoder_impl.h b/hal/cpp/include/metavision/hal/facilities/detail/i_event_decoder_impl.h index c4fdaae35..aa86b5642 100644 --- a/hal/cpp/include/metavision/hal/facilities/detail/i_event_decoder_impl.h +++ b/hal/cpp/include/metavision/hal/facilities/detail/i_event_decoder_impl.h @@ -45,49 +45,6 @@ void I_EventDecoder::add_event_buffer(EventIterator_t begin, EventIterato } /// @endcond -template -void I_EventDecoder::set_add_decoded_event_callback(AddEventCallback_t cb, bool add) { - static bool warning_already_logged = false; - if (!warning_already_logged) { - MV_HAL_LOG_WARNING() << "I_EventDecoder::set_add_decoded_event_callback(...) is deprecated since " - "version 2.2.0 and will be removed in later releases."; - MV_HAL_LOG_WARNING() << "Please use I_Decoder::add_event_buffer_callback(...) instead." << std::endl; - warning_already_logged = true; - } - if (!add) { - for (size_t i = 0; i < next_cb_idx_; ++i) - remove_callback(i); - } - add_event_buffer_callback([cb](EventIterator_t begin, EventIterator_t end) { - for (auto it = begin; it != end; ++it) { - cb(*it); - } - }); -} - -template -void I_EventDecoder::set_add_decoded_vevent_callback(AddVEventCallback_t cb, bool add) { - static bool warning_already_logged = false; - if (!warning_already_logged) { - MV_HAL_LOG_WARNING() << "I_EventDecoder::set_add_decoded_vevent_callback(...) is deprecated since " - "version 2.2.0 and will be removed in later releases."; - MV_HAL_LOG_WARNING() << "Please use I_Decoder::add_event_buffer_callback(...) instead." << std::endl; - warning_already_logged = true; - } - if (!add) { - for (size_t i = 0; i < next_cb_idx_; ++i) - remove_callback(i); - } - add_event_buffer_callback([cb](EventIterator_t begin, EventIterator_t end) { cb(begin, end); }); -} - -template -void I_EventDecoder::set_end_decode_callback(EndDecodeCallback_t, bool) { - throw HalException(HalErrorCode::DeprecatedFunctionCalled, - "I_EventDecoder::set_end_decode_callback(...) is deprecated since " - "version 2.2.0 and will be removed in later releases."); -} - } // namespace Metavision #endif // METAVISION_HAL_I_EVENT_DECODER_IMPL_H diff --git a/hal/cpp/include/metavision/hal/facilities/future/i_decoder.h b/hal/cpp/include/metavision/hal/facilities/future/i_decoder.h index c3cf5dee4..ea01cc721 100644 --- a/hal/cpp/include/metavision/hal/facilities/future/i_decoder.h +++ b/hal/cpp/include/metavision/hal/facilities/future/i_decoder.h @@ -93,13 +93,13 @@ class I_Decoder : public I_RegistrableFacility { /// @return True if the reset operation could complete, false otherwise. /// @note It is expected after this call has succeeded, that @ref get_last_timestamp returns @p timestamp /// @warning If time shifting is enabled, the @p timestamp must be in the shifted time reference - virtual bool reset_timestamp(const Metavision::timestamp ×tamp); + bool reset_timestamp(const Metavision::timestamp ×tamp); /// @brief Resets the decoder timestamp shift /// @param shift Timestamp shift to reset the decoder to /// @return True if the reset operation could complete, false otherwise. /// @note If time shifting is disabled, this function does nothing - virtual bool reset_timestamp_shift(const Metavision::timestamp &shift); + bool reset_timestamp_shift(const Metavision::timestamp &shift); protected: /// @cond DEV @@ -164,6 +164,19 @@ class I_Decoder : public I_RegistrableFacility { /// @param raw_data_end Pointer after the last event virtual void decode_impl(const RawData *const raw_data_begin, const RawData *const raw_data_end) = 0; + /// @brief Implementation of "reset the decoder last timestamp" operation + /// @param timestamp Timestamp to reset the decoder to + /// @return True if the reset operation could complete, false otherwise. + /// @note It is expected after this call has succeeded, that @ref get_last_timestamp returns @p timestamp + /// @warning If time shifting is enabled, the @p timestamp must be in the shifted time reference + virtual bool reset_timestamp_impl(const Metavision::timestamp ×tamp) = 0; + + /// @brief Implementation of "reset the decoder timestamp shift" operation + /// @param shift Timestamp shift to reset the decoder to + /// @return True if the reset operation could complete, false otherwise. + /// @note If time shifting is disabled, this function does nothing + virtual bool reset_timestamp_shift_impl(const Metavision::timestamp &shift) = 0; + const bool is_time_shifting_enabled_; std::vector incomplete_raw_data_; diff --git a/hal/cpp/include/metavision/hal/facilities/i_erc.h b/hal/cpp/include/metavision/hal/facilities/i_erc.h index 7337e31a0..02d267ff1 100644 --- a/hal/cpp/include/metavision/hal/facilities/i_erc.h +++ b/hal/cpp/include/metavision/hal/facilities/i_erc.h @@ -62,34 +62,8 @@ class I_Erc : public I_RegistrableFacility { /// @note See @ref set_cd_event_count to define the event count parameter. virtual uint32_t get_cd_event_count() = 0; - /// @note set_td_event_rate(...) is deprecated since version 2.2.0 and will be removed in later releases. - /// Please use @ref set_cd_event_rate instead - // clang-format off - [[deprecated("set_td_event_rate(...) is deprecated since version 2.2.0 and will be removed in later releases. " - "Please use set_cd_event_rate(...) instead")]] - void set_td_event_rate(uint32_t rate); - // clang-format on - - /// @note get_td_event_rate() is deprecated since version 2.2.0 and will be removed in later releases.\n - /// Please use @ref get_cd_event_rate instead - // clang-format off - [[deprecated("get_td_event_rate() is deprecated since version 2.2.0 and will be removed in later releases. " - "Please use get_cd_event_rate() instead")]] - uint32_t get_td_event_rate(); - // clang-format on - /// @cond DEV virtual void erc_from_file(const std::string &) = 0; - // clang-format off - [[deprecated("set_em_event_rate(...) is deprecated since version 2.2.0 and will be removed in later releases. " - "Please use set_cd_event_rate(...) instead")]] - void set_em_event_rate(uint32_t rate); - - [[deprecated("get_em_event_rate() is deprecated since version 2.2.0 and will be removed in later releases. " - "Please use get_cd_event_rate() instead")]] - uint32_t get_em_event_rate(); - // clang-format on - /// @endcond }; diff --git a/hal/cpp/include/metavision/hal/facilities/i_event_decoder.h b/hal/cpp/include/metavision/hal/facilities/i_event_decoder.h index 2bae35723..7b9aa63b8 100644 --- a/hal/cpp/include/metavision/hal/facilities/i_event_decoder.h +++ b/hal/cpp/include/metavision/hal/facilities/i_event_decoder.h @@ -46,38 +46,6 @@ class I_EventDecoder : public I_RegistrableFacility> { void add_event_buffer(EventIterator_t begin, EventIterator_t end); /// @endcond - /// @note This alias is deprecated since version 2.2.0 and will be removed in next releases - typedef std::function AddEventCallback_t; - - /// @note This alias is deprecated since version 2.2.0 and will be removed in next releases - typedef std::function AddVEventCallback_t; - - /// @note This alias is deprecated since version 2.2.0 and will be removed in next releases - typedef std::function EndDecodeCallback_t; - - /// @note set_add_decoded_event_callback(...) is deprecated since version 2.2.0 and will be removed in later - /// releases. Please use add_event_buffer_callback(...) instead - // clang-format off - [[deprecated("set_add_decoded_event_callback(...) is deprecated since version 2.2.0 and will be removed in later releases. " - "Please use add_event_buffer_callback(...) instead")]] - void set_add_decoded_event_callback(AddEventCallback_t, bool=true); - // clang-format on - - /// @note set_add_decoded_vevent_callback(...) is deprecated since version 2.2.0 and will be removed in later - /// releases. Please use add_event_buffer_callback(...) instead - // clang-format off - [[deprecated("set_add_decoded_vevent_callback(...) is deprecated since version 2.2.0 and will be removed in later releases. " - "Please use add_event_buffer_callback(...) instead")]] - void set_add_decoded_vevent_callback(AddVEventCallback_t, bool=true); - // clang-format on - - /// @note set_end_decode_callback(...) is deprecated since version 2.2.0 and will be removed in later - /// releases. Please use add_event_buffer_callback(...) instead - // clang-format off - [[deprecated("set_end_decode_callback(...) is deprecated since version 2.2.0 and will be removed in later releases.")]] - void set_end_decode_callback(EndDecodeCallback_t, bool=true); - // clang-format on - private: std::map cbs_map_; size_t next_cb_idx_{0}; diff --git a/hal/cpp/include/metavision/hal/facilities/i_hw_identification.h b/hal/cpp/include/metavision/hal/facilities/i_hw_identification.h index a9bf63236..81e938d80 100644 --- a/hal/cpp/include/metavision/hal/facilities/i_hw_identification.h +++ b/hal/cpp/include/metavision/hal/facilities/i_hw_identification.h @@ -84,14 +84,6 @@ class I_HW_Identification : public I_RegistrableFacility { /// @return Name of the integrator virtual std::string get_integrator() const = 0; - /// @note get_manufacturer() is deprecated since version 2.2.0 and will be removed in later - /// releases. Please use @ref get_integrator instead - // clang-format off - [[deprecated("get_manufacturer() is deprecated since version 2.2.0 and will be removed in later releases. " - "Please use get_integrator() instead")]] - std::string get_manufacturer() const; - // clang-format on - /// @brief Returns all available information /// @return Map of key-value /// @note The purpose of this function is mainly for debug and display system information diff --git a/hal/cpp/include/metavision/hal/facilities/i_trigger_out.h b/hal/cpp/include/metavision/hal/facilities/i_trigger_out.h index 1f778798c..0529fc320 100644 --- a/hal/cpp/include/metavision/hal/facilities/i_trigger_out.h +++ b/hal/cpp/include/metavision/hal/facilities/i_trigger_out.h @@ -49,12 +49,6 @@ class I_TriggerOut : public I_RegistrableFacility { /// @brief Checks if trigger out is enabled /// @return true if trigger out is enabled, False otherwise virtual bool is_enabled() = 0; - - /// @note loopback(bool) is deprecated since version 2.2.0 and will be removed later releases. - // clang-format off - [[deprecated("loopback(bool) is deprecated since version 2.2.0 and will be removed in later releases.")]] - bool loopback(bool enable); - // clang-format on }; } // namespace Metavision diff --git a/hal/cpp/include/metavision/hal/utils/camera_discovery.h b/hal/cpp/include/metavision/hal/utils/camera_discovery.h index 432cf4bea..05fc08a27 100644 --- a/hal/cpp/include/metavision/hal/utils/camera_discovery.h +++ b/hal/cpp/include/metavision/hal/utils/camera_discovery.h @@ -58,17 +58,6 @@ class CameraDiscovery { /// @brief Tells if this CameraDiscovery detect camera locally plugged (USB/MIPI/...) as opposed to remote /// camera shared over a network virtual bool is_for_local_camera() const; - - /// @note type_ListSerial is deprecated since version 2.2.0 and will be removed in later - /// releases. Please use SerialList instead. - using type_ListSerial [[deprecated("type_ListSerial is deprecated since version 2.2.0 and will be removed in later " - "releases. Please use SerialList instead.")]] = std::list; - - /// @note type_ListSystems is deprecated since version 2.2.0 and will be removed in later - /// releases. Please use SystemList instead. - using type_ListSystems [[deprecated("type_ListSystems is deprecated since version 2.2.0 and will be removed in " - "later releases. Please use SystemList instead.")]] = - std::list; }; } // namespace Metavision diff --git a/hal/cpp/lib/CMakeLists.txt b/hal/cpp/lib/CMakeLists.txt index ed61836b9..aae33049d 100644 --- a/hal/cpp/lib/CMakeLists.txt +++ b/hal/cpp/lib/CMakeLists.txt @@ -74,17 +74,6 @@ target_include_directories(metavision_hal "$" ) -if (ANDROID) - # TODO fix in MV-230 - # This is a temporary hack to force gradle to package libusb in the APK so that - # plugins can link correctly at run time. - # A better solution is to make sure the plugins on Android do not link with libusb - # since they don't need it (offline support only) - target_link_libraries(metavision_hal - PUBLIC - libusb-1.0 - ) -endif (ANDROID) #### metavision_hal_discovery add_library(metavision_hal_discovery SHARED) @@ -185,4 +174,4 @@ write_basic_package_version_file( install(FILES ${metavision_hal_config_file} ${metavision_hal_config_version_file} DESTINATION share/cmake/MetavisionHAL COMPONENT metavision-hal-dev -) \ No newline at end of file +) diff --git a/hal/cpp/samples/metavision_hal_sample_plugin/include/future/sample_decoder.h b/hal/cpp/samples/metavision_hal_sample_plugin/include/future/sample_decoder.h index 08705ee76..5d9b28cf2 100644 --- a/hal/cpp/samples/metavision_hal_sample_plugin/include/future/sample_decoder.h +++ b/hal/cpp/samples/metavision_hal_sample_plugin/include/future/sample_decoder.h @@ -48,19 +48,6 @@ class SampleDecoder : public Metavision::Future::I_Decoder { /// @brief Gets size (byte) of raw event uint8_t get_raw_event_size_bytes() const override final; - /// @brief Resets the decoder last timestamp - /// @param timestamp Timestamp to reset the decoder to - /// @return True if the reset operation could complete, false otherwise. - /// @note It is expected after this call has succeeded, that @ref get_last_timestamp returns @p timestamp - /// @warning If time shifting is enabled, the @p timestamp must be in the shifted time reference - bool reset_timestamp(const Metavision::timestamp ×tamp) override final; - - /// @brief Resets the decoder timestamp shift - /// @param shift Timestamp shift to reset the decoder to - /// @return True if the reset operation could complete, false otherwise. - /// @note If time shifting is disabled, this function does nothing and returns false - bool reset_timestamp_shift(const Metavision::timestamp &shift) override final; - private: /// @brief Decodes raw data. /// @@ -72,6 +59,20 @@ class SampleDecoder : public Metavision::Future::I_Decoder { /// @param evend Pointer after the last event void decode_impl(const RawData *const ev, const RawData *const evend) override final; + /// @brief Resets the decoder last timestamp + /// + /// @param timestamp Timestamp to reset the decoder to + /// @return True if the reset operation could complete, false otherwise. + /// @note It is expected after this call has succeeded, that @ref get_last_timestamp returns @p timestamp + /// @warning If time shifting is enabled, the @p timestamp must be in the shifted time reference + bool reset_timestamp_impl(const Metavision::timestamp ×tamp) override final; + + /// @brief Resets the decoder timestamp shift + /// @param shift Timestamp shift to reset the decoder to + /// @return True if the reset operation could complete, false otherwise. + /// @note If time shifting is disabled, this function does nothing and returns false + bool reset_timestamp_shift_impl(const Metavision::timestamp &shift) override final; + Metavision::timestamp last_timestamp_{0}; Metavision::timestamp time_shift_{0}; bool time_shift_set_{false}; diff --git a/hal/cpp/samples/metavision_hal_sample_plugin/src/future/sample_decoder.cpp b/hal/cpp/samples/metavision_hal_sample_plugin/src/future/sample_decoder.cpp index 1e1e38578..944f34711 100644 --- a/hal/cpp/samples/metavision_hal_sample_plugin/src/future/sample_decoder.cpp +++ b/hal/cpp/samples/metavision_hal_sample_plugin/src/future/sample_decoder.cpp @@ -62,7 +62,7 @@ uint8_t SampleDecoder::get_raw_event_size_bytes() const { return sizeof(SampleEventsFormat); } -bool SampleDecoder::reset_timestamp(const Metavision::timestamp &t) { +bool SampleDecoder::reset_timestamp_impl(const Metavision::timestamp &t) { if (is_time_shifting_enabled() && !time_shift_set_) { return false; } @@ -73,7 +73,7 @@ bool SampleDecoder::reset_timestamp(const Metavision::timestamp &t) { return false; } -bool SampleDecoder::reset_timestamp_shift(const Metavision::timestamp &shift) { +bool SampleDecoder::reset_timestamp_shift_impl(const Metavision::timestamp &shift) { if (shift >= 0 && is_time_shifting_enabled()) { time_shift_ = shift; time_shift_set_ = true; diff --git a/hal/cpp/samples/metavision_hal_sample_plugin/src/sample_data_transfer.cpp b/hal/cpp/samples/metavision_hal_sample_plugin/src/sample_data_transfer.cpp index 99c187db4..34731005b 100644 --- a/hal/cpp/samples/metavision_hal_sample_plugin/src/sample_data_transfer.cpp +++ b/hal/cpp/samples/metavision_hal_sample_plugin/src/sample_data_transfer.cpp @@ -38,7 +38,6 @@ void SampleDataTransfer::run_impl() { // events, and sleep for the necessary time Metavision::timestamp time_start = current_time_; uint64_t first_ts_clock_ = Metavision::get_system_time_us(); - auto start = std::chrono::system_clock::now(); while (!should_stop()) { // Fill fake_events buffer_->resize(SIZE_FAKE_EVENTS); diff --git a/hal/cpp/samples/metavision_hal_sample_plugin/test/metavision_raw_cutter_with_sample_plugin_pytest.py b/hal/cpp/samples/metavision_hal_sample_plugin/test/metavision_raw_cutter_with_sample_plugin_pytest.py index 183d8d2ac..5d66b2c0b 100644 --- a/hal/cpp/samples/metavision_hal_sample_plugin/test/metavision_raw_cutter_with_sample_plugin_pytest.py +++ b/hal/cpp/samples/metavision_hal_sample_plugin/test/metavision_raw_cutter_with_sample_plugin_pytest.py @@ -56,11 +56,9 @@ def cut_and_check_infos(dataset_dir, start, end, expected_output_info): # Now check output expected_output_info_formatted = expected_output_info.format(output_file_name, os.path.realpath(output_file_path)) - output_strip = "\n".join([line.strip() for line in info_cut_file.splitlines()]) - expected_output_strip = "\n".join([line.strip() for line in expected_output_info_formatted.splitlines()]) + output_strip = pytest_tools.get_mv_info_stripped_output(info_cut_file) + expected_output_strip = pytest_tools.get_mv_info_stripped_output(expected_output_info_formatted) - print(output_strip) - print(expected_output_strip) assert output_strip.find(expected_output_strip) >= 0 diff --git a/hal/cpp/samples/metavision_hal_sample_plugin/test/metavision_raw_info_with_sample_plugin_pytest.py b/hal/cpp/samples/metavision_hal_sample_plugin/test/metavision_raw_info_with_sample_plugin_pytest.py index c9f9123fa..d1f4b26cc 100644 --- a/hal/cpp/samples/metavision_hal_sample_plugin/test/metavision_raw_info_with_sample_plugin_pytest.py +++ b/hal/cpp/samples/metavision_hal_sample_plugin/test/metavision_raw_info_with_sample_plugin_pytest.py @@ -53,6 +53,6 @@ def pytestcase_test_metavision_raw_info_with_sample_plugin(dataset_dir): """.format(filename, re.escape(filename_full)) # Now check output ,after stripping them for trailing white spaces - output_strip = "\n".join([line.strip() for line in output.splitlines()]) - expected_output_strip = "\n".join([line.strip() for line in expected_output.splitlines()]) + output_strip = pytest_tools.get_mv_info_stripped_output(output) + expected_output_strip = pytest_tools.get_mv_info_stripped_output(expected_output) assert re.search(expected_output_strip, output_strip) diff --git a/hal/cpp/samples/metavision_hal_seek/metavision_hal_seek.cpp b/hal/cpp/samples/metavision_hal_seek/metavision_hal_seek.cpp index d91bc8654..ee4c1f03d 100644 --- a/hal/cpp/samples/metavision_hal_seek/metavision_hal_seek.cpp +++ b/hal/cpp/samples/metavision_hal_seek/metavision_hal_seek.cpp @@ -149,8 +149,8 @@ int main(int argc, char **argv) { cv::createTrackbar( "Pos. (%)", window_name, nullptr, 100, [](int value, void *data) { reinterpret_cast(data)->set(value); }, &seek_op); - cv::setTrackbarMin("Pos. (%)", "Seek Control", 0); - cv::setTrackbarMax("Pos. (%)", "Seek Control", 100); + cv::setTrackbarMin("Pos. (%)", window_name, 0); + cv::setTrackbarMax("Pos. (%)", window_name, 100); // Start reading the file i_eventsstream->start(); diff --git a/hal/cpp/samples/metavision_hal_viewer/metavision_hal_viewer.cpp b/hal/cpp/samples/metavision_hal_viewer/metavision_hal_viewer.cpp index 67dc297ab..9dcbb5b2e 100644 --- a/hal/cpp/samples/metavision_hal_viewer/metavision_hal_viewer.cpp +++ b/hal/cpp/samples/metavision_hal_viewer/metavision_hal_viewer.cpp @@ -82,7 +82,7 @@ int main(int argc, char *argv[]) { std::string out_raw_file_path; std::string serial; std::string plugin_name; - long system_id; + long system_id = -1; /// [TriggerInChannels] struct TriggerInConfiguration { int main_channel; diff --git a/hal/cpp/src/device/device_discovery.cpp b/hal/cpp/src/device/device_discovery.cpp index 200e3771e..f5364b766 100644 --- a/hal/cpp/src/device/device_discovery.cpp +++ b/hal/cpp/src/device/device_discovery.cpp @@ -495,8 +495,7 @@ std::unique_ptr DeviceDiscovery::open_stream(std::unique_ptr std::distance(cur_raw_data, raw_data_end)) { @@ -95,12 +95,13 @@ bool I_Decoder::remove_time_callback(size_t callback_id) { return false; } -bool I_Decoder::reset_timestamp(const timestamp &) { - return false; +bool I_Decoder::reset_timestamp(const timestamp &t) { + incomplete_raw_data_.clear(); + return reset_timestamp_impl(t); } -bool I_Decoder::reset_timestamp_shift(const timestamp &) { - return false; +bool I_Decoder::reset_timestamp_shift(const timestamp &t) { + return reset_timestamp_shift_impl(t); } } // namespace Future diff --git a/hal/cpp/src/facilities/future/i_events_stream.cpp b/hal/cpp/src/facilities/future/i_events_stream.cpp index aa0ca64df..5113bbcd3 100644 --- a/hal/cpp/src/facilities/future/i_events_stream.cpp +++ b/hal/cpp/src/facilities/future/i_events_stream.cpp @@ -11,6 +11,8 @@ #include #include +#include +#include #include "metavision/hal/device/device.h" #include "metavision/hal/facilities/future/i_decoder.h" @@ -32,6 +34,24 @@ bool contains(const Container &container, const typename Container::value_type & return (std::find(container.begin(), container.end(), value) != container.end()); } +union BookmarkOrMagicNumber { + I_EventsStream::Bookmark bookmark; + std::array array; + + BookmarkOrMagicNumber() {} + BookmarkOrMagicNumber(const I_EventsStream::Bookmark &b) : bookmark(b) {} + + static BookmarkOrMagicNumber magic_number() { + BookmarkOrMagicNumber m; + std::mt19937 mt(0x6d76); // MV = 0x6d 0x76 + std::generate(m.array.begin(), m.array.end(), std::ref(mt)); + return m; + } +}; +static constexpr size_t BookmarkPackedSize = sizeof(I_EventsStream::Bookmark::timestamp_) + + sizeof(I_EventsStream::Bookmark::byte_offset_) + + sizeof(I_EventsStream::Bookmark::cd_event_count_); + static const std::string platform_key = "platform"; static const std::string hal_version_key = "hal_version"; static const std::string hal_plugin_version_key = "hal_plugin_version"; @@ -40,7 +60,7 @@ static const std::string bookmark_period_key = "bookmark_period_us"; static const std::string index_version_key = "index_version"; static const std::string ts_shift_key = "ts_shift_us"; -static const std::string index_version = "1.0"; +static const std::string index_version = "2.0"; static const uint32_t bookmark_period_us = 2000; static const std::string bookmark_period_us_str = std::to_string(bookmark_period_us); @@ -53,30 +73,83 @@ const std::string get_raw_file_index_name(const std::string &raw_file_name) { return raw_file_name + get_raw_file_index_extension_suffix(); } -void serialize_bookmark(I_EventsStream::Bookmark &bookmark, std::ofstream &output_index_file) { - output_index_file.write(reinterpret_cast(&bookmark.timestamp_), sizeof(bookmark.timestamp_)); - output_index_file.write(reinterpret_cast(&bookmark.byte_offset_), sizeof(bookmark.byte_offset_)); - output_index_file.write(reinterpret_cast(&bookmark.cd_event_count_), sizeof(bookmark.cd_event_count_)); +bool serialize_bookmark(I_EventsStream::Bookmark &bookmark, std::ofstream &output_index_file) { + if (!output_index_file.write(reinterpret_cast(&bookmark.timestamp_), sizeof(bookmark.timestamp_))) { + return false; + } + if (!output_index_file.write(reinterpret_cast(&bookmark.byte_offset_), sizeof(bookmark.byte_offset_))) { + return false; + } + if (!output_index_file.write(reinterpret_cast(&bookmark.cd_event_count_), + sizeof(bookmark.cd_event_count_))) { + return false; + } + return true; } -void deserialize_bookmark(I_EventsStream::Bookmark &bookmark, std::ifstream &input_index_file) { - input_index_file.read(reinterpret_cast(&bookmark.timestamp_), sizeof(bookmark.timestamp_)); - input_index_file.read(reinterpret_cast(&bookmark.byte_offset_), sizeof(bookmark.byte_offset_)); - input_index_file.read(reinterpret_cast(&bookmark.cd_event_count_), sizeof(bookmark.cd_event_count_)); +bool deserialize_bookmark(I_EventsStream::Bookmark &bookmark, std::ifstream &input_index_file) { + if (!input_index_file.read(reinterpret_cast(&bookmark.timestamp_), sizeof(bookmark.timestamp_))) { + return false; + } + if (!input_index_file.read(reinterpret_cast(&bookmark.byte_offset_), sizeof(bookmark.byte_offset_))) { + return false; + } + if (!input_index_file.read(reinterpret_cast(&bookmark.cd_event_count_), sizeof(bookmark.cd_event_count_))) { + return false; + } + return true; } -void add_bookmarks(size_t last_bookmark_index, size_t bookmark_index, I_EventsStream::Bookmark &bookmark, +bool add_bookmarks(size_t last_bookmark_index, size_t bookmark_index, I_EventsStream::Bookmark &bookmark, I_EventsStream::Index &index, std::ofstream &output_index_file) { - if (bookmark_index > last_bookmark_index) { - for (; last_bookmark_index < bookmark_index; ++last_bookmark_index) { - index.bookmarks_.push_back(bookmark); - if (output_index_file) { - serialize_bookmark(bookmark, output_index_file); + for (; last_bookmark_index < bookmark_index; ++last_bookmark_index) { + index.bookmarks_.push_back(bookmark); + if (output_index_file) { + if (!serialize_bookmark(bookmark, output_index_file)) { + return false; } - // reset event count - bookmark.cd_event_count_ = 0; + } + // reset event count + bookmark.cd_event_count_ = 0; + } + return true; +} + +bool add_magic_number(std::ofstream &output_index_file) { + BookmarkOrMagicNumber m = BookmarkOrMagicNumber::magic_number(); + if (output_index_file) { + if (!serialize_bookmark(m.bookmark, output_index_file)) { + return false; } } + return true; +} + +bool is_bookmark_magic_number(const I_EventsStream::Bookmark &bookmark) { + BookmarkOrMagicNumber b(bookmark); + BookmarkOrMagicNumber m = BookmarkOrMagicNumber::magic_number(); + return std::equal(b.array.begin(), b.array.begin() + BookmarkPackedSize, m.array.begin()); +} + +bool check_magic_number_presence(std::ifstream &input_index_file) { + const auto start_pos = input_index_file.tellg(); + // Seek to last bookmark pos + input_index_file.clear(); + if (!input_index_file.seekg(-BookmarkPackedSize, std::ios::end)) { + return false; + } + + I_EventsStream::Bookmark bookmark; + if (!deserialize_bookmark(bookmark, input_index_file)) { + return false; + } + + // Reset pos + input_index_file.clear(); + input_index_file.seekg(start_pos); + + // Check that the last bookmark is indeed the magic number + return is_bookmark_magic_number(bookmark); } bool build_and_try_writing_bookmarks(Device &device, I_EventsStream::Index &index, const std::string &raw_file_name, @@ -165,21 +238,29 @@ bool build_and_try_writing_bookmarks(Device &device, I_EventsStream::Index &inde bookmark.cd_event_count_ = last_event_count; bookmark.timestamp_ = last_ts; bookmark.byte_offset_ = last_byte_offset; - add_bookmarks(last_bookmark_index, bookmark_index, bookmark, index, output_index_file); + if (!add_bookmarks(last_bookmark_index, bookmark_index, bookmark, index, output_index_file)) { + MV_HAL_LOG_ERROR() << "Could not write index to the file" << raw_file_name; + return false; + } last_byte_offset = current_byte_offset; last_ts = new_ts; last_event_count = event_count; last_bookmark_index = bookmark_index; } } + } - const size_t bookmark_index = last_ts / bookmark_period_us + 1; - if (bookmark_index > last_bookmark_index) { - bookmark.cd_event_count_ = last_event_count; - bookmark.timestamp_ = last_ts; - bookmark.byte_offset_ = last_byte_offset; - add_bookmarks(last_bookmark_index, bookmark_index, bookmark, index, output_index_file); - } + bookmark.cd_event_count_ = last_event_count; + bookmark.timestamp_ = last_ts; + bookmark.byte_offset_ = last_byte_offset; + if (!add_bookmarks(last_bookmark_index, last_bookmark_index + 1, bookmark, index, output_index_file)) { + MV_HAL_LOG_ERROR() << "Could not write index to the file" << raw_file_name; + return false; + } + + if (!add_magic_number(output_index_file)) { + MV_HAL_LOG_ERROR() << "Could not write index to the file" << raw_file_name; + return false; } return true; @@ -193,8 +274,20 @@ I_EventsStream::Bookmarks load_bookmarks(std::ifstream &input_index_file, const // The current implementation loads the whole index file in memory, which inevitably puts a limit on the maximum // size of a RAW file we support seeking. A better option would be to load the index on demand. while (input_index_file.good() && !abort) { - deserialize_bookmark(bookmark, input_index_file); - bookmarks.push_back(bookmark); + if (deserialize_bookmark(bookmark, input_index_file)) { + bookmarks.push_back(bookmark); + } + } + if (!abort) { + // if we reach here, a magic number should be present since we check for its presence before trying to load the + // bookmarks but to be on the safe side ... + if (bookmarks.empty() || !is_bookmark_magic_number(bookmarks.back())) { + MV_HAL_LOG_ERROR() << "Unexpected error with index for RAW file, magic number expected but not found."; + bookmarks = I_EventsStream::Bookmarks(); + } else { + // this is not a real bookmark, let's remove it + bookmarks.pop_back(); + } } return bookmarks; @@ -269,8 +362,16 @@ I_EventsStream::Index build_index(Device &device, const std::string &raw_file_na // Compare bookmark version in the index vs the current one do_build_index = do_build_index || (index_version_in_file != index_version); - // Checks that the timestamp shift is present + // Checks that the timestamp shift is present ... do_build_index = do_build_index || index_file_header.get_field(ts_shift_key).empty(); + { + // ... and is indeed a valid integer + long long ts_shift; + std::istringstream iss(index_file_header.get_field(ts_shift_key)); + if (!(iss >> ts_shift)) { + do_build_index = true; + } + } // Compares header of the indexed RAW file and the input one auto raw_file_header_map = raw_file_header.get_header_map(); @@ -284,6 +385,9 @@ I_EventsStream::Index build_index(Device &device, const std::string &raw_file_na } do_build_index = do_build_index || (found->second != it->second); } + + // Make sure that magic number is present + do_build_index = do_build_index || !check_magic_number_presence(index_file); }; index_file.close(); @@ -352,7 +456,12 @@ I_EventsStream::Index build_index(Device &device, const std::string &raw_file_na index.bookmark_period_ = std::atol(index_file_header.get_field(bookmark_period_key).c_str()); index.ts_shift_us_ = std::atoll(index_file_header.get_field(ts_shift_key).c_str()); index.bookmarks_ = load_bookmarks(index_file, abort); - index.status_ = I_EventsStream::IndexStatus::Good; + if (index.bookmarks_.empty()) { + MV_HAL_LOG_ERROR() << "Failed to open index for RAW file at" << raw_file_index_name; + index.status_ = I_EventsStream::IndexStatus::Bad; + return index; + } + index.status_ = I_EventsStream::IndexStatus::Good; MV_HAL_LOG_TRACE() << "Index for input RAW file" << raw_file_name << "loaded"; } @@ -416,6 +525,11 @@ I_EventsStream::I_EventsStream(std::unique_ptr data_transfer, if (should_notify) { new_buffer_cond_.notify_all(); } + } else { + while (seeking_) { + // wait for any seek operation to complete before resuming the actual data transfer + std::this_thread::yield(); + } } }); } @@ -578,7 +692,12 @@ I_EventsStream::SeekStatus I_EventsStream::seek(timestamp target_ts_us, timestam } if (file_data_transfer->stopped()) { - // if the data transfer was stopped because the end of file was reached, restart it + // if the data transfer was stopped because the end of file was reached before seeking, restart it + // + // Note : even if we start the data transfer now (while seeking_ = true), there is no risk of missing a EOF + // (which would be signaled by a Stopped status change ... but ignored because a seek is ongoing) since the + // data transfer won't resume reading (and thus reach a potential EOF) before seeking_ = false (c.f wait + // loop in status change callback) file_data_transfer->start(); } } else { @@ -595,9 +714,8 @@ I_EventsStream::SeekStatus I_EventsStream::seek(timestamp target_ts_us, timestam } } - file_data_transfer->resume(); - seeking_ = false; + file_data_transfer->resume(); return seek_status; } diff --git a/hal/cpp/src/facilities/i_decoder.cpp b/hal/cpp/src/facilities/i_decoder.cpp index 6f4be8af0..fed039b8d 100644 --- a/hal/cpp/src/facilities/i_decoder.cpp +++ b/hal/cpp/src/facilities/i_decoder.cpp @@ -37,7 +37,8 @@ void I_Decoder::decode(RawData *raw_data_begin, RawData *raw_data_end) { if (!incomplete_raw_data_.empty()) { // Computes how many raw data from this input need to be copied to get a complete raw event and append // them to the incomplete raw data.. - const auto raw_data_to_insert_count = get_raw_event_size_bytes() - incomplete_raw_data_.size(); + const auto raw_data_to_insert_count = + static_cast(get_raw_event_size_bytes() - incomplete_raw_data_.size()); // Check that the input buffer has enough data to complete the raw event if (raw_data_to_insert_count > std::distance(cur_raw_data, raw_data_end)) { diff --git a/hal/cpp/src/facilities/i_erc.cpp b/hal/cpp/src/facilities/i_erc.cpp index ad0f8eab0..a8c560a7e 100644 --- a/hal/cpp/src/facilities/i_erc.cpp +++ b/hal/cpp/src/facilities/i_erc.cpp @@ -27,26 +27,4 @@ uint32_t I_Erc::get_cd_event_rate() { return static_cast(static_cast(evt_count) * 1000000 / count_period); } -void I_Erc::set_td_event_rate(uint32_t rate) { - static bool warning_already_logged = false; - if (!warning_already_logged) { - MV_HAL_LOG_WARNING() - << "I_Erc::set_td_event_rate(...) is deprecated since version 2.2.0 and will be removed in later releases."; - MV_HAL_LOG_WARNING() << "Please use I_Erc::set_cd_event_rate(...) instead." << std::endl; - warning_already_logged = true; - } - set_cd_event_rate(rate); -} - -uint32_t I_Erc::get_td_event_rate() { - static bool warning_already_logged = false; - if (!warning_already_logged) { - MV_HAL_LOG_WARNING() - << "I_Erc::get_td_event_rate() is deprecated since version 2.2.0 and will be removed in later releases."; - MV_HAL_LOG_WARNING() << "Please use I_Erc::get_cd_event_rate() instead." << std::endl; - warning_already_logged = true; - } - return get_cd_event_rate(); -} - } // namespace Metavision diff --git a/hal/cpp/src/facilities/i_hw_identification.cpp b/hal/cpp/src/facilities/i_hw_identification.cpp index 362f50297..39bd546ad 100644 --- a/hal/cpp/src/facilities/i_hw_identification.cpp +++ b/hal/cpp/src/facilities/i_hw_identification.cpp @@ -27,17 +27,6 @@ I_HW_Identification::I_HW_Identification(const std::shared_ptr &folders) { } void PluginLoader::load_plugins() { - std::string suffix = "_raw"; - std::vector raw_plugin_infos; for (auto folder : folders_) { DIR *dir_descriptor; dir_descriptor = opendir(folder.c_str()); @@ -219,18 +217,11 @@ void PluginLoader::load_plugins() { while ((entries = readdir(dir_descriptor)) != NULL) { std::string filename = entries->d_name; auto plugin_info = PluginInfo(folder, filename); - if (ends_with(plugin_info.name, suffix)) { - raw_plugin_infos.push_back(plugin_info); - } else { - insert_plugin(plugin_info); - } + insert_plugin(plugin_info); } closedir(dir_descriptor); } } - for (auto plugin_info : raw_plugin_infos) { - insert_plugin(plugin_info); - } } void PluginLoader::insert_plugin(const std::string &name, const std::string &library_path) { diff --git a/hal/cpp/src/utils/future/data_transfer.cpp b/hal/cpp/src/utils/future/data_transfer.cpp index dd94af369..abb38783b 100644 --- a/hal/cpp/src/utils/future/data_transfer.cpp +++ b/hal/cpp/src/utils/future/data_transfer.cpp @@ -48,7 +48,8 @@ void DataTransfer::start() { std::lock(suspend_mutex_, running_mutex_); std::unique_lock lock1(suspend_mutex_, std::adopt_lock); std::unique_lock lock2(running_mutex_, std::adopt_lock); - stop_ = false; + stop_ = false; + running_ = false; } start_impl(get_buffer()); diff --git a/hal/cpp/src/utils/hal_software_info.cpp b/hal/cpp/src/utils/hal_software_info.cpp index e10994993..cda6fb4f7 100644 --- a/hal/cpp/src/utils/hal_software_info.cpp +++ b/hal/cpp/src/utils/hal_software_info.cpp @@ -9,6 +9,8 @@ * See the License for the specific language governing permissions and limitations under the License. * **********************************************************************************************************************/ +#include + #include "metavision/hal/utils/hal_software_info.h" #include "metavision/hal/version.h" diff --git a/hal/python/bindings/i_erc_python.cpp b/hal/python/bindings/i_erc_python.cpp index c8c270efd..5b2386d20 100644 --- a/hal/python/bindings/i_erc_python.cpp +++ b/hal/python/bindings/i_erc_python.cpp @@ -25,17 +25,8 @@ static HALFacilityPythonBinder bind( .def("erc_from_file", &I_Erc::erc_from_file) .def("set_cd_event_rate", &I_Erc::set_cd_event_rate, py::arg("events_per_sec"), pybind_doc_hal["Metavision::I_Erc::set_cd_event_rate"]) - .def("get_cd_event_rate", &I_Erc::get_cd_event_rate, pybind_doc_hal["Metavision::I_Erc::get_cd_event_rate"]) - .def( - "set_td_event_rate", - +[](I_Erc &self, uint32_t) { - throw DeprecationWarningException("set_td_event_rate", "set_cd_event_rate"); - }, - pybind_doc_hal["Metavision::I_Erc::set_td_event_rate"]) - .def( - "get_td_event_rate", - +[](I_Erc &self) { throw DeprecationWarningException("get_td_event_rate", "get_cd_event_rate"); }, - pybind_doc_hal["Metavision::I_Erc::get_td_event_rate"]); + .def("get_cd_event_rate", &I_Erc::get_cd_event_rate, + pybind_doc_hal["Metavision::I_Erc::get_cd_event_rate"]); }, "I_Erc", pybind_doc_hal["Metavision::I_Erc"]); diff --git a/hal/python/bindings/i_event_cd_decoder_python.cpp b/hal/python/bindings/i_event_cd_decoder_python.cpp index f36039b85..8389dd029 100644 --- a/hal/python/bindings/i_event_cd_decoder_python.cpp +++ b/hal/python/bindings/i_event_cd_decoder_python.cpp @@ -23,20 +23,6 @@ namespace py = pybind11; namespace Metavision { -namespace { -void set_add_decoded_event_callback_deprecated_helper(I_EventDecoder &, py::object) { - throw DeprecationWarningException("set_add_decoded_event_callback", "add_event_buffer_callback"); -} - -void set_add_decoded_vevent_callback_deprecated_helper(I_EventDecoder &, py::object) { - throw DeprecationWarningException("set_add_decoded_vevent_callback", "add_event_buffer_callback"); -} - -void set_end_decode_callback_deprecated_helper(I_EventDecoder &, py::object) { - throw DeprecationWarningException("set_end_decode_callback"); -} -} // anonymous namespace - static DeviceFacilityGetter> getter("get_i_event_cd_decoder"); static HALFacilityPythonBinder> bind_decoder( @@ -79,10 +65,7 @@ static HALFacilityPythonBinder> bind_decoder( }, "Pass a native function as event callback (faster than a python one).\n", "\nIts signature has to be `void function(const Metavision::EventCD * begin,", - "const Metavision::EventCD * end)`.") - .def("set_add_decoded_event_callback", set_add_decoded_event_callback_deprecated_helper) - .def("set_add_decoded_vevent_callback", set_add_decoded_vevent_callback_deprecated_helper) - .def("set_end_decode_callback", set_end_decode_callback_deprecated_helper); + "const Metavision::EventCD * end)`."); }, "I_EventDecoder_EventCD"); diff --git a/hal/python/bindings/i_event_ext_trigger_decoder_python.cpp b/hal/python/bindings/i_event_ext_trigger_decoder_python.cpp index ae85c5e47..b40efe171 100644 --- a/hal/python/bindings/i_event_ext_trigger_decoder_python.cpp +++ b/hal/python/bindings/i_event_ext_trigger_decoder_python.cpp @@ -19,20 +19,6 @@ namespace Metavision { -namespace { -void set_add_decoded_event_callback_deprecated_helper(I_EventDecoder &, py::object) { - throw DeprecationWarningException("set_add_decoded_event_callback", "add_event_buffer_callback"); -} - -void set_add_decoded_vevent_callback_deprecated_helper(I_EventDecoder &, py::object) { - throw DeprecationWarningException("set_add_decoded_vevent_callback", "add_event_buffer_callback"); -} - -void set_end_decode_callback_deprecated_helper(I_EventDecoder &, py::object) { - throw DeprecationWarningException("set_end_decode_callback"); -} -} // anonymous namespace - static DeviceFacilityGetter> getter("get_i_event_ext_trigger_decoder"); static HALFacilityPythonBinder> bind_decoder( @@ -55,13 +41,7 @@ static HALFacilityPythonBinder> bind_decoder( }, pybind_doc_hal["Metavision::I_EventDecoder::add_event_buffer_callback"]) .def("remove_callback", &I_EventDecoder::remove_callback, - pybind_doc_hal["Metavision::I_EventDecoder::remove_callback"]) - .def("set_add_decoded_event_callback", set_add_decoded_event_callback_deprecated_helper, - pybind_doc_hal["Metavision::I_EventDecoder::set_add_decoded_event_callback"]) - .def("set_add_decoded_vevent_callback", set_add_decoded_vevent_callback_deprecated_helper, - pybind_doc_hal["Metavision::I_EventDecoder::set_add_decoded_vevent_callback"]) - .def("set_end_decode_callback", set_end_decode_callback_deprecated_helper, - pybind_doc_hal["Metavision::I_EventDecoder::set_end_decode_callback"]); + pybind_doc_hal["Metavision::I_EventDecoder::remove_callback"]); }, "I_EventDecoder_EventExtTrigger"); diff --git a/hal/python/bindings/i_events_stream_python.cpp b/hal/python/bindings/i_events_stream_python.cpp index 1c4c6b103..531785eb8 100644 --- a/hal/python/bindings/i_events_stream_python.cpp +++ b/hal/python/bindings/i_events_stream_python.cpp @@ -47,15 +47,7 @@ static HALFacilityPythonBinder bind( .def("log_raw_data", &I_EventsStream::log_raw_data, py::arg("f"), pybind_doc_hal["Metavision::I_EventsStream::log_raw_data"]) .def("stop_log_raw_data", &I_EventsStream::stop_log_raw_data, - pybind_doc_hal["Metavision::I_EventsStream::stop_log_raw_data"]) - .def( - "get_byte_size_events", - +[](I_EventsStream &self) { throw DeprecationWarningException("get_byte_size_events"); }, - "get_byte_size_events() is deprecated since version 2.2.0 and will be removed in later releases.") - .def( - "set_byte_size_events", - +[](I_EventsStream &self, uint32_t) { throw DeprecationWarningException("set_byte_size_events"); }, - "set_byte_size_events() is deprecated since version 2.2.0 and will be removed in later releases."); + pybind_doc_hal["Metavision::I_EventsStream::stop_log_raw_data"]); }, "I_EventsStream", pybind_doc_hal["Metavision::I_EventsStream"]); diff --git a/hal/python/bindings/i_hw_identification_python.cpp b/hal/python/bindings/i_hw_identification_python.cpp index 70c54fddf..05520a71c 100644 --- a/hal/python/bindings/i_hw_identification_python.cpp +++ b/hal/python/bindings/i_hw_identification_python.cpp @@ -44,12 +44,6 @@ static HALFacilityPythonBinder bind( pybind_doc_hal["Metavision::I_HW_Identification::get_available_raw_format"]) .def("get_integrator", &I_HW_Identification::get_integrator, pybind_doc_hal["Metavision::I_HW_Identification::get_integrator"]) - .def( - "get_manufacturer", - +[](I_HW_Identification &self) { - throw DeprecationWarningException("get_manufacturer", "get_integrator"); - }, - pybind_doc_hal["Metavision::I_HW_Identification::get_manufacturer"]) .def("get_system_info", &get_system_info_wrapper, pybind_doc_hal["Metavision::I_HW_Identification::get_system_info"]) .def("get_connection_type", &I_HW_Identification::get_connection_type, diff --git a/hal/python/bindings/i_trigger_out_python.cpp b/hal/python/bindings/i_trigger_out_python.cpp index f64cc0431..aed354b9d 100644 --- a/hal/python/bindings/i_trigger_out_python.cpp +++ b/hal/python/bindings/i_trigger_out_python.cpp @@ -25,10 +25,7 @@ static HALFacilityPythonBinder bind( .def("set_period", &I_TriggerOut::set_period, py::arg("period_us"), pybind_doc_hal["Metavision::I_TriggerOut::set_period"]) .def("set_duty_cycle", &I_TriggerOut::set_duty_cycle, py::arg("period_ratio"), - pybind_doc_hal["Metavision::I_TriggerOut::set_duty_cycle"]) - .def( - "loopback", +[](bool) { throw DeprecationWarningException("loopback"); }, - "loopback() is deprecated since version 2.2.0 and will be removed in later releases."); + pybind_doc_hal["Metavision::I_TriggerOut::set_duty_cycle"]); }, "I_TriggerOut", pybind_doc_hal["Metavision::I_TriggerOut"]); diff --git a/hal/python/bindings/raw_file_config_python.cpp b/hal/python/bindings/raw_file_config_python.cpp index 7e918d6f1..1f0992e95 100644 --- a/hal/python/bindings/raw_file_config_python.cpp +++ b/hal/python/bindings/raw_file_config_python.cpp @@ -25,11 +25,7 @@ static HALClassPythonBinder> bind( .def_readwrite("n_read_buffers", &RawFileConfig::n_read_buffers_, pybind_doc_hal["Metavision::RawFileConfig::n_read_buffers_"]) .def_readwrite("do_time_shifting", &RawFileConfig::do_time_shifting_, - pybind_doc_hal["Metavision::RawFileConfig::do_time_shifting_"]) - .def( - "max_events_per_buffer", - +[](RawFileConfig &self) { throw DeprecationWarningException("max_events_per_buffer"); }, - "max_events_per_buffer() is deprecated since version 2.2.0 and will be removed in later releases."); + pybind_doc_hal["Metavision::RawFileConfig::do_time_shifting_"]); }, "RawFileConfig", pybind_doc_hal["Metavision::RawFileConfig"]); diff --git a/hal_openeb_plugins/cmake/MetavisionHALOpenEBPluginsCPackConfig.cmake b/hal_openeb_plugins/cmake/MetavisionHALOpenEBPluginsCPackConfig.cmake deleted file mode 100644 index 959736b37..000000000 --- a/hal_openeb_plugins/cmake/MetavisionHALOpenEBPluginsCPackConfig.cmake +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright (c) Prophesee S.A. - All Rights Reserved -# -# Subject to Prophesee Metavision Licensing Terms and Conditions ("License T&C's"). -# You may not use this file except in compliance with these License T&C's. -# A copy of these License T&C's is located in the "licensing" folder accompanying this file. - -#################################### -# metavision-hal-openeb-plugins # -#################################### - -# File and package name of the components are automatically set, just need to set the package description -set(CPACK_COMPONENT_METAVISION-HAL-OPENEB-PLUGINS_DESCRIPTION "OpenEB Plugins for Metavision HAL.\n${PACKAGE_LICENSE}") -set(CPACK_COMPONENT_METAVISION-HAL-OPENEB-PLUGINS_DEPENDS metavision-hal-lib metavision-sdk-base-lib) diff --git a/hal_openeb_plugins/include/common/raw_constants.h b/hal_openeb_plugins/include/common/raw_constants.h deleted file mode 100644 index a463feb3e..000000000 --- a/hal_openeb_plugins/include/common/raw_constants.h +++ /dev/null @@ -1,95 +0,0 @@ -/********************************************************************************************************************** - * Copyright (c) Prophesee S.A. * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and limitations under the License. * - **********************************************************************************************************************/ - -#ifndef RAW_CONSTANTS_H -#define RAW_CONSTANTS_H - -#include -#include -#include -#include -#include "utils/device_system_id.h" - -namespace Metavision { - -enum EncodingEVT { ENCODING_EVT2, ENCODING_EVT3 }; - -struct PluginConfig { - Metavision::I_HW_Identification::SensorInfo sensor_info_; - int sensor_width_; - int sensor_height_; - std::unordered_set encodings_; - std::unordered_set compatible_ids_; -}; - -using PluginsMap = std::unordered_map; -using SystemIdMap = std::unordered_map; - -// clang-format off -static const PluginsMap plugins_map = { - {"hal_plugin_gen3_fx3", {{3, 0}, 640, 480, {ENCODING_EVT2}, - {SYSTEM_CCAM3_GEN3, - SYSTEM_CCAM4_GEN3, - SYSTEM_CCAM4_GEN3_REV_B, - SYSTEM_CCAM4_GEN3_EVK, - SYSTEM_CCAM4_GEN3_REV_B_EVK, - SYSTEM_CCAM4_GEN3_REV_B_EVK_BRIDGE, - SYSTEM_VISIONCAM_GEN3, - SYSTEM_VISIONCAM_GEN3_EVK}}}, - {"hal_plugin_gen31_fx3", {{3, 1}, 640, 480, {ENCODING_EVT2}, - {SYSTEM_CCAM3_GEN31, - SYSTEM_VISIONCAM_GEN31, - SYSTEM_VISIONCAM_GEN31_EVK}}}, - {"hal_plugin_gen31_evk2", {{3, 1}, 640, 480, {ENCODING_EVT2}, - {SYSTEM_EVK2_GEN31}}}, - {"hal_plugin_gen31_evk3", {{3, 1}, 640, 480, {ENCODING_EVT2, ENCODING_EVT3}, - {SYSTEM_EVK3_GEN31_EVT2, SYSTEM_EVK3_GEN31_EVT3}}}, - {"hal_plugin_gen4_fx3", {{4, 0}, 1280, 720, {ENCODING_EVT2, ENCODING_EVT3}, - {SYSTEM_CCAM3_GEN4}}}, - {"hal_plugin_gen4_evk2", {{4, 0}, 1280, 720, {ENCODING_EVT2, ENCODING_EVT3}, - {SYSTEM_EVK2_GEN4}}}, - {"hal_plugin_gen41_evk2", {{4, 1}, 1280, 720, {ENCODING_EVT2, ENCODING_EVT3}, - {SYSTEM_EVK2_GEN41}}}, - {"hal_plugin_gen41_evk3", {{4, 1}, 1280, 720, {ENCODING_EVT2, ENCODING_EVT3}, - {SYSTEM_EVK3_GEN41}}} -}; -// clang-format on - -namespace { - -inline SystemIdMap reverse_plugins_map(PluginsMap pmap) { - SystemIdMap res_map; - for (auto &pmap_key : pmap) { - for (auto &system_id : pmap_key.second.compatible_ids_) { - res_map.insert({system_id, pmap_key.first}); - } - } - return res_map; -} - -} // anonymous namespace - -static const SystemIdMap system_id_map = reverse_plugins_map(plugins_map); - -static const std::string raw_key_serial_number = "serial_number"; -static const std::string raw_key_system_id = "system_ID"; -static const std::string raw_key_width = "width"; -static const std::string raw_key_height = "height"; -static const std::string raw_key_evt = "evt"; -static const std::string raw_evt_version_2 = "2.0"; -static const std::string raw_evt_version_3 = "3.0"; - -static const std::string raw_default_integrator = "Prophesee"; -static const std::string raw_default_connection_type = "File"; - -} // namespace Metavision - -#endif // RAW_CONSTANTS_H diff --git a/hal_openeb_plugins/include/common/raw_hw_identification.h b/hal_openeb_plugins/include/common/raw_hw_identification.h deleted file mode 100644 index 8cebd6ee7..000000000 --- a/hal_openeb_plugins/include/common/raw_hw_identification.h +++ /dev/null @@ -1,77 +0,0 @@ -/********************************************************************************************************************** - * Copyright (c) Prophesee S.A. * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and limitations under the License. * - **********************************************************************************************************************/ - -#ifndef RAW_HW_IDENTIFICATION_H -#define RAW_HW_IDENTIFICATION_H - -#include -#include - -namespace Metavision { - -/// @brief Facility to provide information about the available system -/// -/// This class is the implementation of HAL's facility @ref Metavision::I_HW_Identification -class RawHWIdentification : public Metavision::I_HW_Identification { -public: - /// @brief Constructor - /// - /// @param plugin_sw_info Information about the plugin software version - RawHWIdentification(const std::shared_ptr &plugin_sw_info, - const std::string serial, const Metavision::I_HW_Identification::SensorInfo &sensor_info, - const std::string &evt_version); - - /// @brief Returns the serial number of the camera - /// - /// @return Serial number as a string - std::string get_serial() const override final; - - /// @brief Returns the system ID of the camera - /// - /// @return The system id as an integer - long get_system_id() const override final; - - /// @brief Returns the detail about the available sensor - /// - /// @return The sensor information - I_HW_Identification::SensorInfo get_sensor_info() const override final; - - /// @brief Returns the version number for this system - /// - /// @return System version as an integer - long get_system_version() const override final; - - /// @brief Returns the name of the available RAW format - /// - /// @return The available format - std::vector get_available_raw_format() const override final; - - /// @brief Returns the integrator name - /// - /// @return Name of the integrator - std::string get_integrator() const override final; - - /// @brief Returns the connection with the camera as a string - /// - /// @return A string providing the type of connection with the available camera - std::string get_connection_type() const override final; - -private: - Metavision::RawFileHeader get_header_impl() const override final; - - std::string serial_; - Metavision::I_HW_Identification::SensorInfo sensor_info_; - std::string evt_format_; -}; - -} // namespace Metavision - -#endif // RAW_HW_IDENTIFICATION_H diff --git a/hal_openeb_plugins/include/utils/device_system_id.h b/hal_openeb_plugins/include/utils/device_system_id.h deleted file mode 100644 index bbf0f9984..000000000 --- a/hal_openeb_plugins/include/utils/device_system_id.h +++ /dev/null @@ -1,57 +0,0 @@ -/********************************************************************************************************************** - * Copyright (c) Prophesee S.A. * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and limitations under the License. * - **********************************************************************************************************************/ -#ifndef DEVICE_SYSTEM_ID_H -#define DEVICE_SYSTEM_ID_H - -namespace Metavision { - -#define SYSTEM_FLAG_EVK_PROXY 0x80 - -enum SystemId : long { - SYSTEM_CCAM2_STEREO = 0x08, - SYSTEM_CCAM2_STEREO_MAPPING = 0x09, - SYSTEM_STEREO_DEMO = 0x0A, - SYSTEM_CCAM3_STEREO_LEFT_GTP = 0x0B, - SYSTEM_CCAM3_STEREO_LEFT = 0x0D, - SYSTEM_CCAM2_STEREO_MERGE_IMU = 0x0F, - SYSTEM_CCAM3_GOLDEN_FALLBACK = 0x11, - SYSTEM_CCAM5_GOLDEN_FALLBACK = 0x12, - SYSTEM_CCAM3_GEN2 = 0x14, - SYSTEM_CCAM3_GEN3 = 0x15, - SYSTEM_CCAM3_GEN31 = 0x1C, - SYSTEM_CCAM3_GEN4 = 0x1A, // Regular Gen 4 evk - SYSTEM_CCAM4_GEN3 = 0x17, // Onboard rev A - SYSTEM_CCAM4_GEN3_EVK = (SYSTEM_FLAG_EVK_PROXY | SYSTEM_CCAM4_GEN3), // Onboard rev A - SYSTEM_CCAM4_GEN3_REV_B = 0x19, // Onboard rev B - SYSTEM_CCAM4_GEN3_REV_B_EVK = (SYSTEM_FLAG_EVK_PROXY | SYSTEM_CCAM4_GEN3_REV_B), // Onboard rev B - SYSTEM_CCAM4_GEN4_EVK = (SYSTEM_FLAG_EVK_PROXY | SYSTEM_CCAM3_GEN4), // Onboard - SYSTEM_CCAM4_GEN3_REV_B_EVK_BRIDGE = 0x1D, - SYSTEM_CCAM5_GEN31 = 0x23, - SYSTEM_CCAM5_GEN4 = 0x1E, - SYSTEM_CCAM5_GEN4_FIXED_FRAME = 0x2E, - SYSTEM_CCAM5_GEN4_EVK_BRIDGE = 0x20, - SYSTEM_VISIONCAM_GEN3 = 0x21, - SYSTEM_VISIONCAM_GEN3_EVK = (SYSTEM_FLAG_EVK_PROXY | SYSTEM_VISIONCAM_GEN3), - SYSTEM_VISIONCAM_GEN31 = 0x22, - SYSTEM_VISIONCAM_GEN31_EVK = (SYSTEM_FLAG_EVK_PROXY | SYSTEM_VISIONCAM_GEN31), - SYSTEM_CX3_CCAM5_GEN4 = SYSTEM_CCAM5_GEN4, - SYSTEM_EVK2_GEN31 = 0x29, - SYSTEM_EVK2_GEN4 = 0x1F, - SYSTEM_EVK2_GEN41 = 0x27, - SYSTEM_EVK3_GEN31_EVT2 = SYSTEM_CCAM5_GEN31, - SYSTEM_EVK3_GEN31_EVT3 = 0x28, - SYSTEM_EVK3_GEN41 = 0x30, - SYSTEM_INVALID_NO_FPGA = static_cast(0xFFFFFFFF) -}; - -} // namespace Metavision - -#endif // DEVICE_SYSTEM_ID_H diff --git a/hal_openeb_plugins/lib/CMakeLists.txt b/hal_openeb_plugins/lib/CMakeLists.txt deleted file mode 100644 index 22adbb241..000000000 --- a/hal_openeb_plugins/lib/CMakeLists.txt +++ /dev/null @@ -1,63 +0,0 @@ -# Copyright (c) Prophesee S.A. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed -# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and limitations under the License. - -add_library(hal_raw_common OBJECT) - -set_target_properties(hal_raw_common - PROPERTIES - POSITION_INDEPENDENT_CODE ON -) - -if(NOT ${CMAKE_VERSION} VERSION_LESS "3.13.3" AND NOT APPLE AND NOT MSVC) - target_link_options(hal_raw_common PRIVATE "LINKER:-z,defs") -endif() - -target_include_directories(hal_raw_common - PUBLIC - $ -) - -target_link_libraries(hal_raw_common - PUBLIC - metavision_hal -) - -# Create one lib per plugin -set(lib_plugin_list - hal_plugin_gen3_fx3_raw - hal_plugin_gen4_evk2_raw - hal_plugin_gen4_fx3_raw - hal_plugin_gen31_evk2_raw - hal_plugin_gen31_evk3_raw - hal_plugin_gen31_fx3_raw - hal_plugin_gen41_evk2_raw - hal_plugin_gen41_evk3_raw -) - -# Custom target to build all Raw Plugins -add_custom_target(hal_plugins_raw) - -foreach(lib_plugin ${lib_plugin_list}) - add_library(${lib_plugin} SHARED $) - target_link_libraries(${lib_plugin} PRIVATE hal_raw_common) - add_custom_command(TARGET ${lib_plugin} POST_BUILD - COMMAND ${CMAKE_COMMAND} -E make_directory "${HAL_BUILD_PLUGIN_PATH}" - COMMAND ${CMAKE_COMMAND} -E copy "$" "${HAL_BUILD_PLUGIN_PATH}") - - add_dependencies(hal_plugins_raw ${lib_plugin}) - if(NOT ${CMAKE_VERSION} VERSION_LESS "3.13.3" AND NOT APPLE AND NOT MSVC) - target_link_options(${lib_plugin} PRIVATE "LINKER:-z,defs") - endif() - - install(TARGETS ${lib_plugin} - LIBRARY DESTINATION "${HAL_INSTALL_PLUGIN_RELATIVE_PATH}" COMPONENT metavision-hal-openeb-plugins EXCLUDE_FROM_ALL - RUNTIME DESTINATION "${HAL_INSTALL_PLUGIN_RELATIVE_PATH}" COMPONENT metavision-hal-openeb-plugins EXCLUDE_FROM_ALL - #ARCHIVE : we don't want to install .lib files for the plugins, it's useless - ) -endforeach() diff --git a/hal_openeb_plugins/src/common/CMakeLists.txt b/hal_openeb_plugins/src/common/CMakeLists.txt deleted file mode 100644 index c7b82ab4a..000000000 --- a/hal_openeb_plugins/src/common/CMakeLists.txt +++ /dev/null @@ -1,13 +0,0 @@ -#Copyright(c) Prophesee S.A. -# -#Licensed under the Apache License, Version 2.0(the "License"); -#you may not use this file except in compliance with the License. -#You may obtain a copy of the License at http: // www.apache.org/licenses/LICENSE-2.0 -#Unless required by applicable law or agreed to in writing, software distributed under the License is distributed -#on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -#See the License for the specific language governing permissions and limitations under the License. - -target_sources(hal_raw_common PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/raw_geometry.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/raw_file_discovery.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/raw_hw_identification.cpp) diff --git a/hal_openeb_plugins/src/common/raw_file_discovery.cpp b/hal_openeb_plugins/src/common/raw_file_discovery.cpp deleted file mode 100644 index 91e316e29..000000000 --- a/hal_openeb_plugins/src/common/raw_file_discovery.cpp +++ /dev/null @@ -1,130 +0,0 @@ -/********************************************************************************************************************** - * Copyright (c) Prophesee S.A. * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and limitations under the License. * - **********************************************************************************************************************/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "common/raw_constants.h" -#include "common/raw_evt2_decoder.h" -#include "common/raw_evt3_decoder.h" -#include "common/raw_file_discovery.h" -#include "common/raw_geometry.h" -#include "common/raw_hw_identification.h" -#include "metavision/sdk/base/utils/string.h" - -namespace Metavision { - -namespace { - -/// @brief Provides a plugin configuration matching plugin and system id. -/// -/// @param plugin_name Filename of the plugin. -/// @param integrator_name Name of the integrator. -/// @param system_id ID of the system that generated the file. -/// @return Configuration matching the plugin name. If the name of integrator is empty, system_id is matched instead. -PluginConfig get_plugin_config(const std::string &plugin_name, const std::string &integrator_name, - const std::string &system_id) { - std::string temp_plugin_name = plugin_name; - unsigned long system_id_long; - bool is_system_id_correct = unsigned_long_from_str(system_id, system_id_long); - if (plugin_name.empty() || integrator_name.empty()) { - if (!is_system_id_correct) { - MV_HAL_LOG_ERROR() << "Invalid RAW : missing both plugin indentification and system ID"; - throw std::invalid_argument("Raw file not handled"); - } - MV_HAL_LOG_INFO() << "Invalid RAW : no integrator and/or plugin found in header, assuming it is a RAW " - "written with previous versions of Prophesee's software"; - auto id_map_iter = system_id_map.find(static_cast(system_id_long)); - if (id_map_iter == system_id_map.end()) { - MV_HAL_LOG_ERROR() << "Invalid RAW : incompatible system ID"; - throw std::invalid_argument("Raw file not handled"); - } - temp_plugin_name = id_map_iter->second; - } - auto plugin_config = plugins_map.find(temp_plugin_name); - if (plugin_config == plugins_map.end()) { - // No insight on plugin version, Legacy raw... Try to guess EVT format & resolution - - // For now, don't handle - MV_HAL_LOG_ERROR() << "Invalid RAW : incompatible plugin"; - throw std::invalid_argument("Raw file not handled"); - } - return plugin_config->second; -} - -} // anonymous namespace - -bool RawFileDiscovery::discover(Metavision::DeviceBuilder &device_builder, std::unique_ptr &stream, - const Metavision::RawFileHeader &header, const Metavision::RawFileConfig &config) { - const std::string integrator_name = header.get_integrator_name(); - std::string plugin_name = header.get_plugin_name(); - std::string system_id = header.get_field(raw_key_system_id); - PluginConfig plugin_config; - - if (ends_with(plugin_name, std::string("_raw"))) { - plugin_name.resize(plugin_name.size() - 4); - } - - try { - plugin_config = get_plugin_config(plugin_name, integrator_name, system_id); - } catch (const std::exception &e) { - MV_HAL_LOG_ERROR() << "Raw file not handled! Was generated with plugin" << plugin_name; - return false; - } - - std::string evt_version = raw_evt_version_2; - if ((plugin_config.encodings_.size() == 1 && - plugin_config.encodings_.find(ENCODING_EVT3) != plugin_config.encodings_.end()) || - header.get_field("evt") == "3.0") { - evt_version = raw_evt_version_3; - } - - // Here we know: - // * Sensor generation for the HW identification - // * Geometry - // * EVT format for the decoder - // ==> We can proceed with device creation - auto i_hw_identification = device_builder.add_facility(std::make_unique( - device_builder.get_plugin_software_info(), header.get_field(raw_key_serial_number), plugin_config.sensor_info_, - evt_version)); - auto i_geometry = device_builder.add_facility( - std::make_unique(plugin_config.sensor_width_, plugin_config.sensor_height_)); - auto cd_event_decoder = - device_builder.add_facility(std::make_unique>()); - auto ext_trigger_event_decoder = - device_builder.add_facility(std::make_unique>()); - - uint8_t raw_ev_size = 0; - if (evt_version == raw_evt_version_2) { - auto decoder = device_builder.add_facility( - std::make_unique(config.do_time_shifting_, cd_event_decoder, ext_trigger_event_decoder)); - raw_ev_size = decoder->get_raw_event_size_bytes(); - } else { - auto decoder = device_builder.add_facility(std::make_unique( - config.do_time_shifting_, plugin_config.sensor_height_, cd_event_decoder, ext_trigger_event_decoder)); - raw_ev_size = decoder->get_raw_event_size_bytes(); - } - - auto i_events_stream = device_builder.add_facility(std::make_unique( - std::make_unique(std::move(stream), raw_ev_size, config), i_hw_identification)); - - return true; -} - -} // namespace Metavision diff --git a/hal_openeb_plugins/src/common/raw_hw_identification.cpp b/hal_openeb_plugins/src/common/raw_hw_identification.cpp deleted file mode 100644 index 0c892722c..000000000 --- a/hal_openeb_plugins/src/common/raw_hw_identification.cpp +++ /dev/null @@ -1,77 +0,0 @@ -/********************************************************************************************************************** - * Copyright (c) Prophesee S.A. * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and limitations under the License. * - **********************************************************************************************************************/ - -#include - -#include "common/raw_hw_identification.h" -#include "common/raw_constants.h" - -namespace Metavision { - -RawHWIdentification::RawHWIdentification(const std::shared_ptr &plugin_sw_info, - const std::string serial, - const Metavision::I_HW_Identification::SensorInfo &sensor_info, - const std::string &evt_version) : - Metavision::I_HW_Identification(plugin_sw_info), - serial_(serial), - sensor_info_(sensor_info), - evt_format_(evt_version) {} - -std::string RawHWIdentification::get_serial() const { - return serial_; -} - -long RawHWIdentification::get_system_id() const { - return 0; -} - -Metavision::I_HW_Identification::SensorInfo RawHWIdentification::get_sensor_info() const { - return sensor_info_; -} - -long RawHWIdentification::get_system_version() const { - return 0; -} - -std::vector RawHWIdentification::get_available_raw_format() const { - std::vector formats; - formats.push_back(evt_format_); - return formats; -} - -std::string RawHWIdentification::get_integrator() const { - return raw_default_integrator; -} - -std::string RawHWIdentification::get_connection_type() const { - return raw_default_connection_type; -} - -Metavision::RawFileHeader RawHWIdentification::get_header_impl() const { - Metavision::RawFileHeader header; - header.set_plugin_name(get_plugin_software_info()->get_plugin_name()); - header.set_integrator_name(raw_default_integrator); - header.add_date(); - header.set_field(raw_key_evt, evt_format_); - header.set_field(raw_key_serial_number, serial_); - if (sensor_info_.major_version_ == 3) { - header.set_field(raw_key_width, "640"); - header.set_field(raw_key_height, "480"); - } - if (sensor_info_.major_version_ == 4) { - header.set_field(raw_key_width, "1280"); - header.set_field(raw_key_height, "720"); - } - - return header; -} - -} // namespace Metavision diff --git a/hal_openeb_plugins/src/plugin/CMakeLists.txt b/hal_openeb_plugins/src/plugin/CMakeLists.txt deleted file mode 100644 index 77c189cf6..000000000 --- a/hal_openeb_plugins/src/plugin/CMakeLists.txt +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (c) Prophesee S.A. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed -# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and limitations under the License. - -target_sources(hal_plugin_gen3_fx3_raw PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/hal_raw_plugin.cpp) -target_sources(hal_plugin_gen4_evk2_raw PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/hal_raw_plugin.cpp) -target_sources(hal_plugin_gen4_fx3_raw PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/hal_raw_plugin.cpp) -target_sources(hal_plugin_gen31_evk2_raw PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/hal_raw_plugin.cpp) -target_sources(hal_plugin_gen31_evk3_raw PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/hal_raw_plugin.cpp) -target_sources(hal_plugin_gen31_fx3_raw PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/hal_raw_plugin.cpp) -target_sources(hal_plugin_gen41_evk2_raw PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/hal_raw_plugin.cpp) -target_sources(hal_plugin_gen41_evk3_raw PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/hal_raw_plugin.cpp) diff --git a/hal_psee_plugins/CMakeLists.txt b/hal_psee_plugins/CMakeLists.txt new file mode 100644 index 000000000..0792c51a5 --- /dev/null +++ b/hal_psee_plugins/CMakeLists.txt @@ -0,0 +1,33 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. + +if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/src/devices/gen4") + set(HAL_GEN4_SUPPORT TRUE) +endif(EXISTS "${CMAKE_CURRENT_LIST_DIR}/src/devices/gen4") + +# Add libraries (plugins) +set(biasgen_calib_files_dir "${GENERATE_FILES_DIRECTORY}/biasgen_calib") +set(metavision_hal_psee_plugins_include_dir "${CMAKE_CURRENT_SOURCE_DIR}/include") +add_subdirectory(lib) + +# Add sources plugins +add_subdirectory(src) + +# Resources +add_subdirectory(resources) + +# Apps +add_subdirectory(apps) + +# Tests +if (BUILD_TESTING) + add_subdirectory(test) +endif (BUILD_TESTING) + +add_cpack_component(PUBLIC metavision-hal-prophesee-plugins) \ No newline at end of file diff --git a/hal_openeb_plugins/src/CMakeLists.txt b/hal_psee_plugins/apps/CMakeLists.txt similarity index 92% rename from hal_openeb_plugins/src/CMakeLists.txt rename to hal_psee_plugins/apps/CMakeLists.txt index c258f1c95..9bc947a46 100644 --- a/hal_openeb_plugins/src/CMakeLists.txt +++ b/hal_psee_plugins/apps/CMakeLists.txt @@ -7,5 +7,4 @@ # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and limitations under the License. -add_subdirectory(common) -add_subdirectory(plugin) \ No newline at end of file +add_subdirectory(metavision_cx3_updater) \ No newline at end of file diff --git a/hal_psee_plugins/apps/metavision_cx3_updater/CMakeLists.txt b/hal_psee_plugins/apps/metavision_cx3_updater/CMakeLists.txt new file mode 100644 index 000000000..fe891c1a2 --- /dev/null +++ b/hal_psee_plugins/apps/metavision_cx3_updater/CMakeLists.txt @@ -0,0 +1,19 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. + +add_executable(metavision_cx3_updater + metavision_cx3_updater.cpp + ${PROJECT_SOURCE_DIR}/hal_psee_plugins/src/boards/utils/utils_fx3_ram_flash.cpp + ${PROJECT_SOURCE_DIR}/hal_psee_plugins/src/devices/others/i2c_eeprom.cpp +) +target_link_libraries(metavision_cx3_updater PRIVATE MetavisionSDK::base Boost::program_options libusb-1.0) +target_include_directories(metavision_cx3_updater + PRIVATE + $ +) \ No newline at end of file diff --git a/hal_psee_plugins/apps/metavision_cx3_updater/README.md b/hal_psee_plugins/apps/metavision_cx3_updater/README.md new file mode 100644 index 000000000..c0afb4c25 --- /dev/null +++ b/hal_psee_plugins/apps/metavision_cx3_updater/README.md @@ -0,0 +1,39 @@ +# Metavision cx3 updater + +This code sample demonstrates how to flash the system firmware and FPGA bitstream. + +## Installation + +First, make a copy of the code sample, so that you can work with this copy. +Go to the directory with your copy of the code sample and compile it. + +``` +mkdir build +cd build +cmake .. +cmake --build . +``` + +In this code sample, our CMakeLists.txt is configured in a such way that the executable is generated in the "build" directory. + +## Running + +Go to the "build" directory. + +To start the sample + +``` +./metavision_cx3_updater +``` + +To update the fpga bitstream + +``` +./metavision_cx3_updater --usb-fpga fpga.bit +``` + +To update the firmware + +``` +./metavision_cx3_updater --usb-fw firmware.bit +``` \ No newline at end of file diff --git a/hal_psee_plugins/apps/metavision_cx3_updater/metavision_cx3_updater.cpp b/hal_psee_plugins/apps/metavision_cx3_updater/metavision_cx3_updater.cpp new file mode 100644 index 000000000..b2011eefa --- /dev/null +++ b/hal_psee_plugins/apps/metavision_cx3_updater/metavision_cx3_updater.cpp @@ -0,0 +1,309 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +// Application to flash system firmware and FPGA bitstream. + +#include +#ifndef _MSC_VER +#include +#else +#include +#endif +#include +#include +#include + +#include +#include +#include + +#include "metavision/sdk/base/utils/log.h" +#include "boards/utils/utils_fx3_ram_flash.h" +#include "boards/utils/vendor_command_definition.h" +#include "devices/utils/device_system_id.h" +#include "devices/others/i2c_eeprom.h" + +using namespace std; + +namespace { + +int fx3_fpga_flash(libusb_device_handle *dev_handle, const char *filename, unsigned long start_sector, + unsigned long max_sector, long file_offset, int *err_bad_flash) { + FlashCmd cmd = FlashCmd::FlashCmdFpga(); + return cmd.flash(dev_handle, filename, start_sector, max_sector, file_offset, err_bad_flash); +} + +int fx3_flash(libusb_device_handle *dev_handle, const char *filename, int *err_bad_flash) { + FlashCmd cmd = FlashCmd::FlashCmdFx3(); + return cmd.flash(dev_handle, filename, 0, -1, 0, err_bad_flash); +} + +} // namespace +namespace po = boost::program_options; + +int main(int argc, char *argv[]) { + bool fw = false; + bool fpga = false; + bool serial_read = false; + vector serial; + std::string serial_string = ""; + std::string ccam5_board = ""; + std::vector ccam5_rev_list{"revA", "revB"}; + std::map eeprom_addr_list{{"revA", 0x50}, {"revB", 0x5E}}; + int eeprom_dev_addr = 0; + std::string firmware; + + const std::string program_desc("Flash a CX3 device connected to the machine with the given firmware or bitstream.\n" + "You can only pass one option --usb-fpga or --usb-fw at a time.\n"); + + po::options_description options_desc("Options"); + po::options_description hidden_desc("Hidden options"); + // clang-format off + options_desc.add_options() + ("help,h", "Produce help message.") + ("usb-fpga", po::bool_switch(&fpga)->default_value(false),"Flash fpga.") + ("usb-fw", po::bool_switch(&fw)->default_value(false), "Flash firmware.") + ("usb-write-serial", po::value(&serial_string)->default_value(""), "Serial to write. in hexadecimal, up to 64bits.") + ("usb-read-serial", po::bool_switch(&serial_read)->default_value(false), "Read serial number from firmware.") + ("ccam5-revision", po::value(&ccam5_board)->default_value("revB"), "CCam5 board revision."); + + hidden_desc.add_options() + ("firmware,f", po::value(), "Firmware file."); + // clang-format on + + po::positional_options_description positional_options; + positional_options.add("firmware", 1); + + po::options_description desc_composite; + desc_composite.add(options_desc).add(hidden_desc); + + po::variables_map vm; + try { + po::store(po::command_line_parser(argc, argv).options(desc_composite).positional(positional_options).run(), vm); + po::notify(vm); + } catch (po::error &e) { + MV_LOG_ERROR() << program_desc; + MV_LOG_ERROR() << options_desc; + MV_LOG_ERROR() << "Parsing error:" << e.what(); + return 1; + } + + if (vm.count("help") || argc == 1) { + MV_LOG_INFO() << program_desc; + MV_LOG_INFO() << options_desc; + return 0; + } + + if (vm.count("firmware")) { + firmware = vm["firmware"].as(); + } + + bool invalid_args = false; + + if ((long(fw) + long(fpga) > 1)) { + MV_LOG_ERROR() << "Invalid programming arguments : only one of --usb-fpga or --usb-fw parameter can be used at " + "the same time."; + invalid_args = true; + } + + if (vm.count("usb-write-serial") || vm.count("usb-read-serial")) { + auto it = std::find(ccam5_rev_list.begin(), ccam5_rev_list.end(), ccam5_board); + if (it == ccam5_rev_list.end()) { + // Selected revision does not exist, printing allowed values + std::string valid_revs = ""; + for (const std::string &board : ccam5_rev_list) { + valid_revs.append(board); + valid_revs.append(", "); + } + valid_revs.erase(valid_revs.length() - 2); + MV_LOG_ERROR() << "Invalid board revision for --ccam5-revision.\nExpected values are: " << valid_revs; + invalid_args = true; + } else { + eeprom_dev_addr = eeprom_addr_list[ccam5_board]; + } + } + + if (invalid_args) { + return 1; + } + + libusb_device **devs; // pointer to pointer of device, used to retrieve a list of devices + libusb_device_handle *dev_handle; // a device handle + std::vector handles; // vector of device handles + // listing of usb devices for cx3, (name, vid, pid) + const std::unordered_map> USB_DEVICES = { + {"EVK3", std::make_pair(0x04b4, 0x00f4)}, {"EVK4", std::make_pair(0x04b4, 0x00f5)}}; + libusb_context *ctx = NULL; // a libusb session + int r; // for return values + ssize_t cnt; // holding number of devices in list + r = libusb_init(&ctx); // initialize the library for the session we just declared + if (r < 0) { + MV_LOG_ERROR() << "Init Error" << r; // there was an error + return 1; + } + + cnt = libusb_get_device_list(ctx, &devs); // get the list of devices + if (cnt < 0) { + MV_LOG_ERROR() << "Get Device Error"; // there was an error + return 1; + } + MV_LOG_INFO() << "Detected" << cnt << "USB devices"; + + // Look for valid Psee usb cx3 devices + for (auto &it : USB_DEVICES) { + auto vid = it.second.first; + auto pid = it.second.second; + auto res = libusb_open_device_with_vid_pid(ctx, vid, pid); + if (res != NULL) { + handles.push_back(res); + } + } + + if (handles.empty()) { + MV_LOG_ERROR() << "No device to flash"; + return 1; + } else if (handles.size() != 1) { + MV_LOG_ERROR() << "Found more than one candidate. Ensure only one is connected"; + + // Exiting, close what we just opened + for (auto it = handles.begin(); it != handles.end(); ++it) { + libusb_close(*it); + } + + return 1; + } + + dev_handle = handles[0]; + + std::vector vread; + vread.resize(2); + uint16_t sys_id = 0; + + r = libusb_control_transfer(dev_handle, 0xC0, CMD_READ_SYSTEM_ID, 0x00, 0, &vread[0], 2, 0); + if (r <= 0) { + MV_LOG_ERROR() << "Cannot fetch system ID" << libusb_error_name(r); + return 1; + } else { + sys_id = ((vread[1] & 0xFF) << 8) | (vread[0] & 0xFF); + MV_LOG_INFO() << Metavision::Log::no_space << "Found System ID 0x" << std::hex << (sys_id & 0xFFFF); + } + + int err_bad_flash = 0; + int ret_flash = 0; + + if (fpga && (firmware != "")) { + ret_flash = fx3_fpga_flash(dev_handle, firmware.c_str(), 0, -1, 0, &err_bad_flash); + + if (ret_flash) { + MV_LOG_ERROR() << "Error while flashing"; + } else { + MV_LOG_INFO() << "Done"; + } + + if (err_bad_flash > 0) { + MV_LOG_ERROR() << "Flashed" << err_bad_flash << "error(s)"; + } + MV_LOG_INFO() << "Please, unplug the camera to reset it"; + } else if (fw && firmware != "") { + ret_flash = fx3_flash(dev_handle, firmware.c_str(), &err_bad_flash); + + if (ret_flash) { + MV_LOG_ERROR() << "Error while flashing"; + } else { + MV_LOG_INFO() << "Done"; + } + + if (err_bad_flash > 0) { + MV_LOG_ERROR() << "Flashed" << err_bad_flash << "error(s)"; + } + MV_LOG_INFO() << "Please, unplug the camera to reset it"; + } else if (serial_string != "") { + serial.clear(); + + // clean string if Hexa value contains 0x + if (serial_string.rfind("0x", 0) == 0) { + serial_string = serial_string.erase(0, 2); + } + // test if length of serial is too long > 64 bits + // here we count in char + if (serial_string.length() > 16) { + MV_LOG_ERROR() << "Error while flashing Serial : Serial must be 64Bits max"; + return 1; + } + if (serial_string.length() % 2 != 0 || serial_string.length() < 16) { + int zeros_to_prepend = 16 - serial_string.length(); + for (int i = 0; i < zeros_to_prepend; i++) + serial_string.insert(0, 1, '0'); + } + try { + boost::algorithm::unhex(serial_string.begin(), serial_string.end(), std::back_inserter(serial)); + } catch (const std::exception &e) { + MV_LOG_ERROR() << "Error while flashing Serial: serial must only contains Hexadecimal characters"; + return 1; + } + if (serial.size() > 8) { + MV_LOG_ERROR() << "Error while flashing Serial : Serial must be 64Bits max"; + return 1; + } + MV_LOG_INFO() << "Writing serial" << serial_string; + + if (sys_id == Metavision::SystemId::SYSTEM_EVK3_GEN41 || sys_id == Metavision::SystemId::SYSTEM_EVK3_IMX636) { + MV_LOG_INFO() << Metavision::Log::no_space << "Using EEPROM address 0x" << std::hex + << (eeprom_dev_addr & 0xFF) << " (CCam5 " << ccam5_board << ")"; + I2cEeprom eeprom_handler(eeprom_dev_addr); + std::reverse(serial.begin(), serial.end()); + ret_flash = eeprom_handler.write(dev_handle, 0x0, serial); + + if (ret_flash == 0) { + MV_LOG_INFO() << "Done"; + } else { + MV_LOG_ERROR() << "Error while accesing EEPROM to write serial number."; + MV_LOG_ERROR() << "Serial number write operation failed."; + } + } else { + FlashCmd cmd = FlashCmd::FlashCmdFpga(); + ret_flash = cmd.flash_serial(dev_handle, &err_bad_flash, 600, serial); + } + } else if (serial_read) { + if (sys_id == Metavision::SystemId::SYSTEM_EVK3_GEN41 || sys_id == Metavision::SystemId::SYSTEM_EVK3_IMX636) { + MV_LOG_INFO() << Metavision::Log::no_space << "Using EEPROM address 0x" << std::hex + << (eeprom_dev_addr & 0xFF) << " (CCam5 " << ccam5_board << ")"; + I2cEeprom eeprom_handler(eeprom_dev_addr); + vread.resize(8); + vread.clear(); + ret_flash = eeprom_handler.read(dev_handle, 0, vread, 8); + + if (ret_flash == 0) { + uint64_t read_val = 0; + std::reverse(vread.begin(), vread.end()); + + for (int i = 0; i < 8; i++) { + read_val = (read_val << 8) + (vread[i] & 0xFF); + } + + MV_LOG_INFO() << Metavision::Log::no_space << "Serial number read is: 0x" << std::hex << std::setw(16) + << std::setfill('0') << read_val; + } else { + MV_LOG_ERROR() << "Error while accesing EEPROM to read serial number."; + MV_LOG_ERROR() << "Serial number read operation failed."; + } + } + } + + // We shouldn't get here with more than one handle, but just in case, + // close the device we opened + for (auto it = handles.begin(); it != handles.end(); ++it) { + libusb_close(*it); + } + libusb_exit(ctx); // needs to be called to end the + + return 0; +} diff --git a/hal_psee_plugins/biasgen/gen3_idac.calib b/hal_psee_plugins/biasgen/gen3_idac.calib new file mode 100644 index 000000000..da54542cc --- /dev/null +++ b/hal_psee_plugins/biasgen/gen3_idac.calib @@ -0,0 +1,1801 @@ +0 0 NwoCas +1 0 NwoCas +2 0 NwoCas +3 0 NwoCas +4 0 NwoCas +5 0 NwoCas +6 0 NwoCas +7 0 NwoCas +8 0 NwoCas +9 0 NwoCas +10 1 NwoCas +11 1 NwoCas +12 1 NwoCas +13 1 NwoCas +14 1 NwoCas +15 1 NwoCas +16 1 NwoCas +17 1 NwoCas +18 1 NwoCas +19 1 NwoCas +20 1 NwoCas +21 1 NwoCas +22 1 NwoCas +23 1 NwoCas +24 1 NwoCas +25 1 NwoCas +26 1 NwoCas +27 1 NwoCas +28 1 NwoCas +29 1 NwoCas +30 1 NwoCas +31 1 NwoCas +32 1 NwoCas +33 1 NwoCas +34 1 NwoCas +35 1 NwoCas +36 1 NwoCas +37 1 NwoCas +38 1 NwoCas +39 1 NwoCas +40 1 NwoCas +41 1 NwoCas +42 1 NwoCas +43 1 NwoCas +44 1 NwoCas +45 1 NwoCas +46 1 NwoCas +47 1 NwoCas +48 1 NwoCas +49 1 NwoCas +50 1 NwoCas +51 1 NwoCas +52 1 NwoCas +53 1 NwoCas +54 1 NwoCas +55 1 NwoCas +56 1 NwoCas +57 1 NwoCas +58 1 NwoCas +59 1 NwoCas +60 1 NwoCas +61 1 NwoCas +62 1 NwoCas +63 1 NwoCas +64 1 NwoCas +65 1 NwoCas +66 1 NwoCas +67 1 NwoCas +68 1 NwoCas +69 1 NwoCas +70 1 NwoCas +71 1 NwoCas +72 1 NwoCas +73 2 NwoCas +74 2 NwoCas +75 2 NwoCas +76 2 NwoCas +77 2 NwoCas +78 2 NwoCas +79 2 NwoCas +80 2 NwoCas +81 2 NwoCas +82 2 NwoCas +83 2 NwoCas +84 2 NwoCas +85 2 NwoCas +86 2 NwoCas +87 2 NwoCas +88 2 NwoCas +89 2 NwoCas +90 2 NwoCas +91 2 NwoCas +92 2 NwoCas +93 2 NwoCas +94 2 NwoCas +95 2 NwoCas +96 2 NwoCas +97 3 NwoCas +98 3 NwoCas +99 3 NwoCas +100 3 NwoCas +101 3 NwoCas +102 3 NwoCas +103 3 NwoCas +104 3 NwoCas +105 3 NwoCas +106 3 NwoCas +107 3 NwoCas +108 3 NwoCas +109 3 NwoCas +110 4 NwoCas +111 4 NwoCas +112 4 NwoCas +113 4 NwoCas +114 4 NwoCas +115 4 NwoCas +116 4 NwoCas +117 4 NwoCas +118 4 NwoCas +119 5 NwoCas +120 5 NwoCas +121 5 NwoCas +122 5 NwoCas +123 5 NwoCas +124 5 NwoCas +125 5 NwoCas +126 5 NwoCas +127 6 NwoCas +128 6 NwoCas +129 6 NwoCas +130 6 NwoCas +131 6 NwoCas +132 6 NwoCas +133 7 NwoCas +134 7 NwoCas +135 7 NwoCas +136 7 NwoCas +137 7 NwoCas +138 8 NwoCas +139 8 NwoCas +140 8 NwoCas +141 8 NwoCas +142 8 NwoCas +143 9 NwoCas +144 9 NwoCas +145 9 NwoCas +146 9 NwoCas +147 10 NwoCas +148 10 NwoCas +149 10 NwoCas +150 10 NwoCas +151 11 NwoCas +152 11 NwoCas +153 11 NwoCas +154 12 NwoCas +155 12 NwoCas +156 12 NwoCas +157 13 NwoCas +158 13 NwoCas +159 14 NwoCas +160 14 NwoCas +161 14 NwoCas +162 15 NwoCas +163 15 NwoCas +164 16 NwoCas +165 16 NwoCas +166 16 NwoCas +167 17 NwoCas +168 17 NwoCas +169 18 NwoCas +170 18 NwoCas +171 19 NwoCas +172 20 NwoCas +173 20 NwoCas +174 21 NwoCas +175 21 NwoCas +176 22 NwoCas +177 23 NwoCas +178 23 NwoCas +179 24 NwoCas +180 25 NwoCas +181 25 NwoCas +182 26 NwoCas +183 27 NwoCas +184 28 NwoCas +185 29 NwoCas +186 30 NwoCas +187 30 NwoCas +188 31 NwoCas +189 32 NwoCas +190 33 NwoCas +191 34 NwoCas +192 35 NwoCas +193 36 NwoCas +194 37 NwoCas +195 38 NwoCas +196 39 NwoCas +197 40 NwoCas +198 41 NwoCas +199 43 NwoCas +200 44 NwoCas +201 45 NwoCas +202 47 NwoCas +203 48 NwoCas +204 49 NwoCas +205 51 NwoCas +206 53 NwoCas +207 54 NwoCas +208 56 NwoCas +209 57 NwoCas +210 59 NwoCas +211 61 NwoCas +212 63 NwoCas +213 64 NwoCas +214 64 NwoCas +215 66 NwoCas +216 69 NwoCas +217 71 NwoCas +218 73 NwoCas +219 75 NwoCas +220 77 NwoCas +221 80 NwoCas +222 82 NwoCas +223 85 NwoCas +224 87 NwoCas +225 90 NwoCas +226 93 NwoCas +227 95 NwoCas +228 98 NwoCas +229 102 NwoCas +230 104 NwoCas +231 108 NwoCas +232 110 NwoCas +233 114 NwoCas +234 118 NwoCas +235 122 NwoCas +236 125 NwoCas +237 127 NwoCas +238 131 NwoCas +239 135 NwoCas +240 138 NwoCas +241 141 NwoCas +242 147 NwoCas +243 150 NwoCas +244 156 NwoCas +245 161 NwoCas +246 164 NwoCas +247 170 NwoCas +248 176 NwoCas +249 182 NwoCas +250 185 NwoCas +251 191 NwoCas +252 197 NwoCas +253 201 NwoCas +254 209 NwoCas +255 213 NwoCas +256 221 NwoCas +257 228 NwoCas +258 232 NwoCas +259 240 NwoCas +260 248 NwoCas +261 255 NwoCas +262 258 NwoCas +263 263 NwoCas +264 275 NwoCas +265 280 NwoCas +266 292 NwoCas +267 298 NwoCas +268 310 NwoCas +269 315 NwoCas +270 328 NwoCas +271 334 NwoCas +272 345 NwoCas +273 357 NwoCas +274 363 NwoCas +275 375 NwoCas +276 385 NwoCas +277 398 NwoCas +278 411 NwoCas +279 422 NwoCas +280 434 NwoCas +281 445 NwoCas +282 457 NwoCas +283 469 NwoCas +284 481 NwoCas +285 497 NwoCas +286 509 NwoCas +287 528 NwoCas +288 540 NwoCas +289 555 NwoCas +290 575 NwoCas +291 590 NwoCas +292 602 NwoCas +293 625 NwoCas +294 637 NwoCas +295 660 NwoCas +296 672 NwoCas +297 695 NwoCas +298 719 NwoCas +299 730 NwoCas +300 754 NwoCas +301 773 NwoCas +302 789 NwoCas +303 812 NwoCas +304 836 NwoCas +305 859 NwoCas +306 882 NwoCas +307 906 NwoCas +308 929 NwoCas +309 952 NwoCas +310 976 NwoCas +311 1010 NwoCas +312 1030 NwoCas +313 1050 NwoCas +314 1070 NwoCas +315 1093 NwoCas +316 1123 NwoCas +317 1153 NwoCas +318 1187 NwoCas +319 1217 NwoCas +320 1247 NwoCas +321 1280 NwoCas +322 1314 NwoCas +323 1348 NwoCas +324 1392 NwoCas +325 1428 NwoCas +326 1467 NwoCas +327 1503 NwoCas +328 1539 NwoCas +329 1580 NwoCas +330 1620 NwoCas +331 1654 NwoCas +332 1714 NwoCas +333 1747 NwoCas +334 1787 NwoCas +335 1841 NwoCas +336 1883 NwoCas +337 1934 NwoCas +338 1978 NwoCas +339 2027 NwoCas +340 2051 NwoCas +341 2087 NwoCas +342 2111 NwoCas +343 2146 NwoCas +344 2196 NwoCas +345 2264 NwoCas +346 2334 NwoCas +347 2401 NwoCas +348 2455 NwoCas +349 2494 NwoCas +350 2588 NwoCas +351 2648 NwoCas +352 2710 NwoCas +353 2774 NwoCas +354 2832 NwoCas +355 2898 NwoCas +356 2961 NwoCas +357 3055 NwoCas +358 3099 NwoCas +359 3148 NwoCas +360 3241 NwoCas +361 3303 NwoCas +362 3403 NwoCas +363 3496 NwoCas +364 3557 NwoCas +365 3650 NwoCas +366 3746 NwoCas +367 17 NCas +368 17 NCas +369 17 NCas +370 17 NCas +371 18 NCas +372 18 NCas +373 18 NCas +374 18 NCas +375 19 NCas +376 19 NCas +377 19 NCas +378 19 NCas +379 20 NCas +380 20 NCas +381 20 NCas +382 20 NCas +383 21 NCas +384 21 NCas +385 21 NCas +386 22 NCas +387 22 NCas +388 22 NCas +389 22 NCas +390 23 NCas +391 23 NCas +392 23 NCas +393 24 NCas +394 24 NCas +395 24 NCas +396 25 NCas +397 25 NCas +398 25 NCas +399 26 NCas +400 26 NCas +401 26 NCas +402 27 NCas +403 27 NCas +404 27 NCas +405 28 NCas +406 28 NCas +407 29 NCas +408 29 NCas +409 29 NCas +410 30 NCas +411 30 NCas +412 30 NCas +413 31 NCas +414 31 NCas +415 32 NCas +416 32 NCas +417 32 NCas +418 33 NCas +419 33 NCas +420 33 NCas +421 34 NCas +422 34 NCas +423 35 NCas +424 35 NCas +425 36 NCas +426 36 NCas +427 37 NCas +428 37 NCas +429 38 NCas +430 38 NCas +431 39 NCas +432 39 NCas +433 40 NCas +434 40 NCas +435 41 NCas +436 42 NCas +437 42 NCas +438 43 NCas +439 43 NCas +440 44 NCas +441 45 NCas +442 45 NCas +443 46 NCas +444 46 NCas +445 47 NCas +446 48 NCas +447 48 NCas +448 49 NCas +449 49 NCas +450 50 NCas +451 51 NCas +452 51 NCas +453 52 NCas +454 53 NCas +455 54 NCas +456 54 NCas +457 55 NCas +458 56 NCas +459 57 NCas +460 57 NCas +461 58 NCas +462 59 NCas +463 60 NCas +464 61 NCas +465 61 NCas +466 62 NCas +467 63 NCas +468 64 NCas +469 64 NCas +470 64 NCas +471 64 NCas +472 65 NCas +473 66 NCas +474 67 NCas +475 68 NCas +476 69 NCas +477 70 NCas +478 71 NCas +479 72 NCas +480 73 NCas +481 74 NCas +482 75 NCas +483 76 NCas +484 77 NCas +485 78 NCas +486 79 NCas +487 80 NCas +488 81 NCas +489 83 NCas +490 84 NCas +491 85 NCas +492 86 NCas +493 87 NCas +494 89 NCas +495 90 NCas +496 91 NCas +497 92 NCas +498 94 NCas +499 95 NCas +500 96 NCas +501 97 NCas +502 98 NCas +503 100 NCas +504 102 NCas +505 104 NCas +506 104 NCas +507 106 NCas +508 108 NCas +509 108 NCas +510 110 NCas +511 112 NCas +512 114 NCas +513 114 NCas +514 116 NCas +515 118 NCas +516 120 NCas +517 122 NCas +518 123 NCas +519 125 NCas +520 127 NCas +521 127 NCas +522 129 NCas +523 131 NCas +524 131 NCas +525 133 NCas +526 135 NCas +527 135 NCas +528 138 NCas +529 141 NCas +530 141 NCas +531 144 NCas +532 147 NCas +533 147 NCas +534 150 NCas +535 153 NCas +536 156 NCas +537 156 NCas +538 158 NCas +539 161 NCas +540 164 NCas +541 164 NCas +542 167 NCas +543 170 NCas +544 173 NCas +545 173 NCas +546 176 NCas +547 179 NCas +548 182 NCas +549 185 NCas +550 185 NCas +551 188 NCas +552 191 NCas +553 193 NCas +554 197 NCas +555 197 NCas +556 201 NCas +557 205 NCas +558 205 NCas +559 209 NCas +560 213 NCas +561 217 NCas +562 217 NCas +563 221 NCas +564 225 NCas +565 228 NCas +566 228 NCas +567 232 NCas +568 236 NCas +569 240 NCas +570 244 NCas +571 244 NCas +572 248 NCas +573 252 NCas +574 255 NCas +575 258 NCas +576 258 NCas +577 261 NCas +578 263 NCas +579 268 NCas +580 275 NCas +581 275 NCas +582 280 NCas +583 287 NCas +584 287 NCas +585 292 NCas +586 298 NCas +587 298 NCas +588 303 NCas +589 310 NCas +590 310 NCas +591 315 NCas +592 322 NCas +593 322 NCas +594 328 NCas +595 334 NCas +596 340 NCas +597 340 NCas +598 345 NCas +599 351 NCas +600 357 NCas +601 357 NCas +602 363 NCas +603 369 NCas +604 375 NCas +605 380 NCas +606 385 NCas +607 392 NCas +608 392 NCas +609 398 NCas +610 404 NCas +611 411 NCas +612 415 NCas +613 422 NCas +614 427 NCas +615 434 NCas +616 434 NCas +617 445 NCas +618 445 NCas +619 450 NCas +620 457 NCas +621 462 NCas +622 469 NCas +623 481 NCas +624 481 NCas +625 493 NCas +626 497 NCas +627 505 NCas +628 509 NCas +629 515 NCas +630 520 NCas +631 528 NCas +632 532 NCas +633 540 NCas +634 555 NCas +635 555 NCas +636 563 NCas +637 575 NCas +638 575 NCas +639 590 NCas +640 590 NCas +641 602 NCas +642 614 NCas +643 614 NCas +644 625 NCas +645 637 NCas +646 645 NCas +647 645 NCas +648 660 NCas +649 660 NCas +650 672 NCas +651 684 NCas +652 695 NCas +653 707 NCas +654 707 NCas +655 719 NCas +656 730 NCas +657 742 NCas +658 742 NCas +659 754 NCas +660 765 NCas +661 773 NCas +662 777 NCas +663 789 NCas +664 801 NCas +665 812 NCas +666 824 NCas +667 836 NCas +668 836 NCas +669 847 NCas +670 859 NCas +671 871 NCas +672 882 NCas +673 894 NCas +674 906 NCas +675 917 NCas +676 929 NCas +677 941 NCas +678 952 NCas +679 964 NCas +680 976 NCas +681 987 NCas +682 999 NCas +683 1010 NCas +684 1020 NCas +685 1030 NCas +686 1040 NCas +687 1050 NCas +688 1060 NCas +689 1070 NCas +690 1080 NCas +691 1093 NCas +692 1093 NCas +693 1108 NCas +694 1123 NCas +695 1138 NCas +696 1153 NCas +697 1168 NCas +698 1187 NCas +699 1202 NCas +700 1217 NCas +701 1232 NCas +702 1247 NCas +703 1262 NCas +704 1280 NCas +705 1280 NCas +706 1297 NCas +707 1314 NCas +708 1331 NCas +709 1348 NCas +710 1365 NCas +711 1392 NCas +712 1410 NCas +713 1428 NCas +714 1446 NCas +715 1467 NCas +716 1485 NCas +717 1503 NCas +718 1521 NCas +719 1539 NCas +720 1539 NCas +721 1560 NCas +722 1580 NCas +723 1600 NCas +724 1620 NCas +725 1640 NCas +726 1654 NCas +727 1674 NCas +728 1694 NCas +729 1714 NCas +730 1734 NCas +731 1767 NCas +732 1787 NCas +733 1807 NCas +734 1827 NCas +735 1841 NCas +736 1862 NCas +737 1883 NCas +738 1904 NCas +739 1934 NCas +740 1956 NCas +741 1978 NCas +742 2000 NCas +743 2027 NCas +744 2039 NCas +745 2051 NCas +746 2063 NCas +747 2075 NCas +748 2087 NCas +749 2099 NCas +750 2111 NCas +751 2121 NCas +752 2146 NCas +753 2171 NCas +754 2196 NCas +755 2239 NCas +756 2264 NCas +757 2289 NCas +758 2307 NCas +759 2334 NCas +760 2361 NCas +761 2401 NCas +762 2428 NCas +763 2455 NCas +764 2494 NCas +765 2494 NCas +766 2521 NCas +767 2548 NCas +768 2588 NCas +769 2618 NCas +770 2648 NCas +771 2681 NCas +772 2710 NCas +773 2739 NCas +774 2774 NCas +775 2803 NCas +776 2832 NCas +777 2868 NCas +778 2898 NCas +779 2928 NCas +780 2996 PCas +781 2996 PCas +782 2961 PCas +783 2928 PCas +784 2898 PCas +785 2898 PCas +786 2868 PCas +787 2832 PCas +788 2832 PCas +789 2803 PCas +790 2774 PCas +791 2739 PCas +792 2739 PCas +793 2710 PCas +794 2681 PCas +795 2681 PCas +796 2648 PCas +797 2618 PCas +798 2588 PCas +799 2588 PCas +800 2548 PCas +801 2548 PCas +802 2521 PCas +803 2494 PCas +804 2455 PCas +805 2455 PCas +806 2428 PCas +807 2428 PCas +808 2401 PCas +809 2361 PCas +810 2361 PCas +811 2334 PCas +812 2307 PCas +813 2289 PCas +814 2264 PCas +815 2264 PCas +816 2239 PCas +817 2214 PCas +818 2196 PCas +819 2171 PCas +820 2171 PCas +821 2146 PCas +822 2121 PCas +823 2111 PCas +824 2099 PCas +825 2099 PCas +826 2087 PCas +827 2075 PCas +828 2063 PCas +829 2063 PCas +830 2051 PCas +831 2039 PCas +832 2027 PCas +833 2027 PCas +834 2000 PCas +835 1978 PCas +836 1978 PCas +837 1956 PCas +838 1934 PCas +839 1904 PCas +840 1904 PCas +841 1883 PCas +842 1862 PCas +843 1862 PCas +844 1841 PCas +845 1827 PCas +846 1807 PCas +847 1787 PCas +848 1767 PCas +849 1767 PCas +850 1747 PCas +851 1734 PCas +852 1714 PCas +853 1694 PCas +854 1694 PCas +855 1674 PCas +856 1654 PCas +857 1640 PCas +858 1620 PCas +859 1620 PCas +860 1600 PCas +861 1580 PCas +862 1560 PCas +863 1560 PCas +864 1539 PCas +865 1521 PCas +866 1503 PCas +867 1503 PCas +868 1485 PCas +869 1467 PCas +870 1446 PCas +871 1446 PCas +872 1428 PCas +873 1410 PCas +874 1410 PCas +875 1392 PCas +876 1374 PCas +877 1374 PCas +878 1348 PCas +879 1348 PCas +880 1331 PCas +881 1314 PCas +882 1297 PCas +883 1280 PCas +884 1280 PCas +885 1262 PCas +886 1247 PCas +887 1247 PCas +888 1232 PCas +889 1217 PCas +890 1202 PCas +891 1202 PCas +892 1187 PCas +893 1168 PCas +894 1168 PCas +895 1153 PCas +896 1138 PCas +897 1123 PCas +898 1123 PCas +899 1108 PCas +900 1093 PCas +901 1080 PCas +902 1080 PCas +903 1070 PCas +904 1060 PCas +905 1060 PCas +906 1050 PCas +907 1040 PCas +908 1030 PCas +909 1030 PCas +910 1020 PCas +911 1010 PCas +912 999 PCas +913 999 PCas +914 987 PCas +915 976 PCas +916 964 PCas +917 952 PCas +918 941 PCas +919 941 PCas +920 929 PCas +921 917 PCas +922 906 PCas +923 894 PCas +924 894 PCas +925 882 PCas +926 871 PCas +927 859 PCas +928 859 PCas +929 847 PCas +930 836 PCas +931 824 PCas +932 824 PCas +933 812 PCas +934 801 PCas +935 801 PCas +936 789 PCas +937 777 PCas +938 773 PCas +939 765 PCas +940 765 PCas +941 754 PCas +942 742 PCas +943 742 PCas +944 730 PCas +945 719 PCas +946 719 PCas +947 707 PCas +948 695 PCas +949 695 PCas +950 684 PCas +951 672 PCas +952 672 PCas +953 660 PCas +954 660 PCas +955 649 PCas +956 645 PCas +957 637 PCas +958 625 PCas +959 625 PCas +960 614 PCas +961 614 PCas +962 602 PCas +963 590 PCas +964 590 PCas +965 579 PCas +966 579 PCas +967 575 PCas +968 567 PCas +969 563 PCas +970 555 PCas +971 544 PCas +972 544 PCas +973 532 PCas +974 532 PCas +975 520 PCas +976 520 PCas +977 515 PCas +978 509 PCas +979 505 PCas +980 497 PCas +981 493 PCas +982 485 PCas +983 485 PCas +984 474 PCas +985 474 PCas +986 469 PCas +987 462 PCas +988 457 PCas +989 450 PCas +990 445 PCas +991 439 PCas +992 439 PCas +993 434 PCas +994 427 PCas +995 422 PCas +996 415 PCas +997 415 PCas +998 404 PCas +999 404 PCas +1000 398 PCas +1001 392 PCas +1002 392 PCas +1003 385 PCas +1004 380 PCas +1005 380 PCas +1006 375 PCas +1007 369 PCas +1008 363 PCas +1009 363 PCas +1010 357 PCas +1011 351 PCas +1012 351 PCas +1013 345 PCas +1014 340 PCas +1015 334 PCas +1016 334 PCas +1017 328 PCas +1018 322 PCas +1019 322 PCas +1020 315 PCas +1021 315 PCas +1022 310 PCas +1023 310 PCas +1024 303 PCas +1025 298 PCas +1026 298 PCas +1027 292 PCas +1028 292 PCas +1029 287 PCas +1030 280 PCas +1031 280 PCas +1032 275 PCas +1033 275 PCas +1034 268 PCas +1035 268 PCas +1036 263 PCas +1037 261 PCas +1038 258 PCas +1039 258 PCas +1040 255 PCas +1041 252 PCas +1042 252 PCas +1043 248 PCas +1044 244 PCas +1045 240 PCas +1046 240 PCas +1047 236 PCas +1048 232 PCas +1049 228 PCas +1050 228 PCas +1051 225 PCas +1052 221 PCas +1053 217 PCas +1054 217 PCas +1055 213 PCas +1056 213 PCas +1057 209 PCas +1058 205 PCas +1059 205 PCas +1060 201 PCas +1061 197 PCas +1062 197 PCas +1063 193 PCas +1064 191 PCas +1065 188 PCas +1066 188 PCas +1067 185 PCas +1068 182 PCas +1069 182 PCas +1070 179 PCas +1071 176 PCas +1072 176 PCas +1073 173 PCas +1074 170 PCas +1075 170 PCas +1076 167 PCas +1077 164 PCas +1078 164 PCas +1079 161 PCas +1080 158 PCas +1081 158 PCas +1082 156 PCas +1083 153 PCas +1084 150 PCas +1085 150 PCas +1086 147 PCas +1087 144 PCas +1088 144 PCas +1089 141 PCas +1090 141 PCas +1091 138 PCas +1092 135 PCas +1093 135 PCas +1094 133 PCas +1095 131 PCas +1096 131 PCas +1097 129 PCas +1098 129 PCas +1099 127 PCas +1100 125 PCas +1101 125 PCas +1102 123 PCas +1103 122 PCas +1104 120 PCas +1105 118 PCas +1106 116 PCas +1107 116 PCas +1108 114 PCas +1109 112 PCas +1110 110 PCas +1111 110 PCas +1112 108 PCas +1113 108 PCas +1114 106 PCas +1115 104 PCas +1116 104 PCas +1117 102 PCas +1118 100 PCas +1119 100 PCas +1120 98 PCas +1121 97 PCas +1122 96 PCas +1123 95 PCas +1124 94 PCas +1125 93 PCas +1126 92 PCas +1127 90 PCas +1128 89 PCas +1129 88 PCas +1130 87 PCas +1131 86 PCas +1132 85 PCas +1133 84 PCas +1134 83 PCas +1135 81 PCas +1136 80 PCas +1137 79 PCas +1138 79 PCas +1139 78 PCas +1140 77 PCas +1141 76 PCas +1142 75 PCas +1143 74 PCas +1144 73 PCas +1145 72 PCas +1146 71 PCas +1147 70 PCas +1148 69 PCas +1149 68 PCas +1150 67 PCas +1151 66 PCas +1152 65 PCas +1153 65 PCas +1154 64 PCas +1155 63 PCas +1156 63 PCas +1157 63 PCas +1158 62 PCas +1159 62 PCas +1160 61 PCas +1161 60 PCas +1162 59 PCas +1163 59 PCas +1164 58 PCas +1165 57 PCas +1166 56 PCas +1167 56 PCas +1168 55 PCas +1169 54 PCas +1170 54 PCas +1171 53 PCas +1172 52 PCas +1173 51 PCas +1174 51 PCas +1175 50 PCas +1176 49 PCas +1177 49 PCas +1178 48 PCas +1179 48 PCas +1180 47 PCas +1181 47 PCas +1182 46 PCas +1183 45 PCas +1184 45 PCas +1185 44 PCas +1186 44 PCas +1187 43 PCas +1188 43 PCas +1189 42 PCas +1190 41 PCas +1191 41 PCas +1192 40 PCas +1193 40 PCas +1194 39 PCas +1195 39 PCas +1196 38 PCas +1197 38 PCas +1198 37 PCas +1199 37 PCas +1200 36 PCas +1201 36 PCas +1202 36 PCas +1203 35 PCas +1204 35 PCas +1205 34 PCas +1206 34 PCas +1207 33 PCas +1208 33 PCas +1209 32 PCas +1210 32 PCas +1211 32 PCas +1212 31 PCas +1213 31 PCas +1214 31 PCas +1215 30 PCas +1216 30 PCas +1217 30 PCas +1218 29 PCas +1219 29 PCas +1220 29 PCas +1221 28 PCas +1222 28 PCas +1223 27 PCas +1224 27 PCas +1225 27 PCas +1226 26 PCas +1227 26 PCas +1228 26 PCas +1229 25 PCas +1230 25 PCas +1231 25 PCas +1232 24 PCas +1233 24 PCas +1234 24 PCas +1235 23 PCas +1236 23 PCas +1237 23 PCas +1238 23 PCas +1239 22 PCas +1240 22 PCas +1241 22 PCas +1242 21 PCas +1243 21 PCas +1244 21 PCas +1245 21 PCas +1246 20 PCas +1247 20 PCas +1248 20 PCas +1249 20 PCas +1250 19 PCas +1251 19 PCas +1252 19 PCas +1253 18 PCas +1254 18 PCas +1255 18 PCas +1256 18 PCas +1257 18 PCas +1258 17 PCas +1259 17 PCas +1260 17 PCas +1261 17 PCas +1262 16 PCas +1263 16 PCas +1264 16 PCas +1265 16 PCas +1266 16 PCas +1267 15 PCas +1268 15 PCas +1269 15 PCas +1270 15 PCas +1271 15 PCas +1272 15 PCas +1273 14 PCas +1274 14 PCas +1275 14 PCas +1276 14 PCas +1277 14 PCas +1278 13 PCas +1279 13 PCas +1280 13 PCas +1281 13 PCas +1282 13 PCas +1283 13 PCas +1284 12 PCas +1285 12 PCas +1286 12 PCas +1287 12 PCas +1288 12 PCas +1289 12 PCas +1290 12 PCas +1291 11 PCas +1292 11 PCas +1293 11 PCas +1294 11 PCas +1295 11 PCas +1296 11 PCas +1297 5835 PwoCas +1298 5763 PwoCas +1299 5669 PwoCas +1300 5576 PwoCas +1301 5515 PwoCas +1302 5389 PwoCas +1303 5296 PwoCas +1304 5296 PwoCas +1305 5203 PwoCas +1306 5154 PwoCas +1307 5063 PwoCas +1308 5016 PwoCas +1309 4922 PwoCas +1310 4871 PwoCas +1311 4736 PwoCas +1312 4736 PwoCas +1313 4642 PwoCas +1314 4589 PwoCas +1315 4495 PwoCas +1316 4414 PwoCas +1317 4362 PwoCas +1318 4304 PwoCas +1319 4223 PwoCas +1320 4175 PwoCas +1321 4126 PwoCas +1322 4104 PwoCas +1323 4082 PwoCas +1324 4023 PwoCas +1325 3929 PwoCas +1326 3895 PwoCas +1327 3802 PwoCas +1328 3746 PwoCas +1329 3708 PwoCas +1330 3650 PwoCas +1331 3592 PwoCas +1332 3522 PwoCas +1333 3462 PwoCas +1334 3403 PwoCas +1335 3369 PwoCas +1336 3303 PwoCas +1337 3241 PwoCas +1338 3183 PwoCas +1339 3148 PwoCas +1340 3099 PwoCas +1341 3055 PwoCas +1342 2996 PwoCas +1343 2961 PwoCas +1344 2898 PwoCas +1345 2868 PwoCas +1346 2803 PwoCas +1347 2774 PwoCas +1348 2710 PwoCas +1349 2648 PwoCas +1350 2618 PwoCas +1351 2548 PwoCas +1352 2521 PwoCas +1353 2455 PwoCas +1354 2428 PwoCas +1355 2401 PwoCas +1356 2334 PwoCas +1357 2289 PwoCas +1358 2264 PwoCas +1359 2214 PwoCas +1360 2171 PwoCas +1361 2146 PwoCas +1362 2121 PwoCas +1363 2099 PwoCas +1364 2075 PwoCas +1365 2051 PwoCas +1366 2027 PwoCas +1367 1978 PwoCas +1368 1956 PwoCas +1369 1904 PwoCas +1370 1883 PwoCas +1371 1841 PwoCas +1372 1807 PwoCas +1373 1767 PwoCas +1374 1734 PwoCas +1375 1694 PwoCas +1376 1674 PwoCas +1377 1640 PwoCas +1378 1600 PwoCas +1379 1580 PwoCas +1380 1539 PwoCas +1381 1503 PwoCas +1382 1485 PwoCas +1383 1446 PwoCas +1384 1410 PwoCas +1385 1392 PwoCas +1386 1365 PwoCas +1387 1331 PwoCas +1388 1297 PwoCas +1389 1280 PwoCas +1390 1247 PwoCas +1391 1232 PwoCas +1392 1202 PwoCas +1393 1168 PwoCas +1394 1153 PwoCas +1395 1123 PwoCas +1396 1093 PwoCas +1397 1080 PwoCas +1398 1060 PwoCas +1399 1050 PwoCas +1400 1030 PwoCas +1401 1010 PwoCas +1402 1000 PwoCas +1403 976 PwoCas +1404 952 PwoCas +1405 929 PwoCas +1406 917 PwoCas +1407 894 PwoCas +1408 871 PwoCas +1409 847 PwoCas +1410 836 PwoCas +1411 812 PwoCas +1412 801 PwoCas +1413 777 PwoCas +1414 765 PwoCas +1415 742 PwoCas +1416 730 PwoCas +1417 707 PwoCas +1418 695 PwoCas +1419 684 PwoCas +1420 660 PwoCas +1421 649 PwoCas +1422 637 PwoCas +1423 625 PwoCas +1424 602 PwoCas +1425 590 PwoCas +1426 579 PwoCas +1427 567 PwoCas +1428 544 PwoCas +1429 540 PwoCas +1430 520 PwoCas +1431 515 PwoCas +1432 497 PwoCas +1433 485 PwoCas +1434 474 PwoCas +1435 462 PwoCas +1436 450 PwoCas +1437 439 PwoCas +1438 434 PwoCas +1439 422 PwoCas +1440 411 PwoCas +1441 398 PwoCas +1442 392 PwoCas +1443 380 PwoCas +1444 375 PwoCas +1445 363 PwoCas +1446 351 PwoCas +1447 345 PwoCas +1448 334 PwoCas +1449 328 PwoCas +1450 315 PwoCas +1451 310 PwoCas +1452 303 PwoCas +1453 298 PwoCas +1454 287 PwoCas +1455 280 PwoCas +1456 268 PwoCas +1457 263 PwoCas +1458 261 PwoCas +1459 255 PwoCas +1460 248 PwoCas +1461 244 PwoCas +1462 236 PwoCas +1463 232 PwoCas +1464 225 PwoCas +1465 217 PwoCas +1466 213 PwoCas +1467 205 PwoCas +1468 201 PwoCas +1469 197 PwoCas +1470 191 PwoCas +1471 185 PwoCas +1472 182 PwoCas +1473 176 PwoCas +1474 173 PwoCas +1475 167 PwoCas +1476 164 PwoCas +1477 158 PwoCas +1478 153 PwoCas +1479 150 PwoCas +1480 147 PwoCas +1481 141 PwoCas +1482 138 PwoCas +1483 135 PwoCas +1484 131 PwoCas +1485 129 PwoCas +1486 125 PwoCas +1487 123 PwoCas +1488 120 PwoCas +1489 116 PwoCas +1490 112 PwoCas +1491 110 PwoCas +1492 106 PwoCas +1493 104 PwoCas +1494 100 PwoCas +1495 98 PwoCas +1496 95 PwoCas +1497 93 PwoCas +1498 91 PwoCas +1499 88 PwoCas +1500 85 PwoCas +1501 83 PwoCas +1502 81 PwoCas +1503 79 PwoCas +1504 76 PwoCas +1505 74 PwoCas +1506 72 PwoCas +1507 70 PwoCas +1508 68 PwoCas +1509 66 PwoCas +1510 64 PwoCas +1511 63 PwoCas +1512 62 PwoCas +1513 61 PwoCas +1514 59 PwoCas +1515 57 PwoCas +1516 55 PwoCas +1517 54 PwoCas +1518 52 PwoCas +1519 51 PwoCas +1520 49 PwoCas +1521 48 PwoCas +1522 47 PwoCas +1523 46 PwoCas +1524 44 PwoCas +1525 43 PwoCas +1526 42 PwoCas +1527 41 PwoCas +1528 40 PwoCas +1529 38 PwoCas +1530 37 PwoCas +1531 36 PwoCas +1532 35 PwoCas +1533 34 PwoCas +1534 33 PwoCas +1535 32 PwoCas +1536 31 PwoCas +1537 31 PwoCas +1538 30 PwoCas +1539 29 PwoCas +1540 28 PwoCas +1541 27 PwoCas +1542 27 PwoCas +1543 26 PwoCas +1544 25 PwoCas +1545 24 PwoCas +1546 24 PwoCas +1547 23 PwoCas +1548 22 PwoCas +1549 22 PwoCas +1550 21 PwoCas +1551 20 PwoCas +1552 20 PwoCas +1553 19 PwoCas +1554 19 PwoCas +1555 18 PwoCas +1556 18 PwoCas +1557 17 PwoCas +1558 17 PwoCas +1559 16 PwoCas +1560 16 PwoCas +1561 15 PwoCas +1562 15 PwoCas +1563 15 PwoCas +1564 14 PwoCas +1565 14 PwoCas +1566 13 PwoCas +1567 13 PwoCas +1568 13 PwoCas +1569 12 PwoCas +1570 12 PwoCas +1571 11 PwoCas +1572 11 PwoCas +1573 11 PwoCas +1574 10 PwoCas +1575 10 PwoCas +1576 10 PwoCas +1577 10 PwoCas +1578 9 PwoCas +1579 9 PwoCas +1580 9 PwoCas +1581 8 PwoCas +1582 8 PwoCas +1583 8 PwoCas +1584 8 PwoCas +1585 7 PwoCas +1586 7 PwoCas +1587 7 PwoCas +1588 7 PwoCas +1589 7 PwoCas +1590 6 PwoCas +1591 6 PwoCas +1592 6 PwoCas +1593 6 PwoCas +1594 6 PwoCas +1595 5 PwoCas +1596 5 PwoCas +1597 5 PwoCas +1598 5 PwoCas +1599 5 PwoCas +1600 5 PwoCas +1601 5 PwoCas +1602 4 PwoCas +1603 4 PwoCas +1604 4 PwoCas +1605 4 PwoCas +1606 4 PwoCas +1607 4 PwoCas +1608 4 PwoCas +1609 4 PwoCas +1610 3 PwoCas +1611 3 PwoCas +1612 3 PwoCas +1613 3 PwoCas +1614 3 PwoCas +1615 3 PwoCas +1616 3 PwoCas +1617 3 PwoCas +1618 3 PwoCas +1619 2 PwoCas +1620 2 PwoCas +1621 2 PwoCas +1622 2 PwoCas +1623 2 PwoCas +1624 2 PwoCas +1625 2 PwoCas +1626 2 PwoCas +1627 2 PwoCas +1628 2 PwoCas +1629 2 PwoCas +1630 2 PwoCas +1631 2 PwoCas +1632 2 PwoCas +1633 1 PwoCas +1634 1 PwoCas +1635 1 PwoCas +1636 1 PwoCas +1637 1 PwoCas +1638 1 PwoCas +1639 1 PwoCas +1640 1 PwoCas +1641 1 PwoCas +1642 1 PwoCas +1643 1 PwoCas +1644 1 PwoCas +1645 1 PwoCas +1646 1 PwoCas +1647 1 PwoCas +1648 1 PwoCas +1649 1 PwoCas +1650 1 PwoCas +1651 1 PwoCas +1652 1 PwoCas +1653 1 PwoCas +1654 1 PwoCas +1655 1 PwoCas +1656 1 PwoCas +1657 1 PwoCas +1658 1 PwoCas +1659 1 PwoCas +1660 1 PwoCas +1661 0 PwoCas +1662 0 PwoCas +1663 0 PwoCas +1664 0 PwoCas +1665 0 PwoCas +1666 0 PwoCas +1667 0 PwoCas +1668 0 PwoCas +1669 0 PwoCas +1670 0 PwoCas +1671 0 PwoCas +1672 0 PwoCas +1673 0 PwoCas +1674 0 PwoCas +1675 0 PwoCas +1676 0 PwoCas +1677 0 PwoCas +1678 0 PwoCas +1679 0 PwoCas +1680 0 PwoCas +1681 0 PwoCas +1682 0 PwoCas +1683 0 PwoCas +1684 0 PwoCas +1685 0 PwoCas +1686 0 PwoCas +1687 0 PwoCas +1688 0 PwoCas +1689 0 PwoCas +1690 0 PwoCas +1691 0 PwoCas +1692 0 PwoCas +1693 0 PwoCas +1694 0 PwoCas +1695 0 PwoCas +1696 0 PwoCas +1697 0 PwoCas +1698 0 PwoCas +1699 0 PwoCas +1700 0 PwoCas +1701 0 PwoCas +1702 0 PwoCas +1703 0 PwoCas +1704 0 PwoCas +1705 0 PwoCas +1706 0 PwoCas +1707 0 PwoCas +1708 0 PwoCas +1709 0 PwoCas +1710 0 PwoCas +1711 0 PwoCas +1712 0 PwoCas +1713 0 PwoCas +1714 0 PwoCas +1715 0 PwoCas +1716 0 PwoCas +1717 0 PwoCas +1718 0 PwoCas +1719 0 PwoCas +1720 0 PwoCas +1721 0 PwoCas +1722 0 PwoCas +1723 0 PwoCas +1724 0 PwoCas +1725 0 PwoCas +1726 0 PwoCas +1727 0 PwoCas +1728 0 PwoCas +1729 0 PwoCas +1730 0 PwoCas +1731 0 PwoCas +1732 0 PwoCas +1733 0 PwoCas +1734 0 PwoCas +1735 0 PwoCas +1736 0 PwoCas +1737 0 PwoCas +1738 0 PwoCas +1739 0 PwoCas +1740 0 PwoCas +1741 0 PwoCas +1742 0 PwoCas +1743 0 PwoCas +1744 0 PwoCas +1745 0 PwoCas +1746 0 PwoCas +1747 0 PwoCas +1748 0 PwoCas +1749 0 PwoCas +1750 0 PwoCas +1751 0 PwoCas +1752 0 PwoCas +1753 0 PwoCas +1754 0 PwoCas +1755 0 PwoCas +1756 0 PwoCas +1757 0 PwoCas +1758 0 PwoCas +1759 0 PwoCas +1760 0 PwoCas +1761 0 PwoCas +1762 0 PwoCas +1763 0 PwoCas +1764 0 PwoCas +1765 0 PwoCas +1766 0 PwoCas +1767 0 PwoCas +1768 0 PwoCas +1769 0 PwoCas +1770 0 PwoCas +1771 0 PwoCas +1772 0 PwoCas +1773 0 PwoCas +1774 0 PwoCas +1775 0 PwoCas +1776 0 PwoCas +1777 0 PwoCas +1778 0 PwoCas +1779 0 PwoCas +1780 0 PwoCas +1781 0 PwoCas +1782 0 PwoCas +1783 0 PwoCas +1784 0 PwoCas +1785 0 PwoCas +1786 0 PwoCas +1787 0 PwoCas +1788 0 PwoCas +1789 0 PwoCas +1790 0 PwoCas +1791 0 PwoCas +1792 0 PwoCas +1793 0 PwoCas +1794 0 PwoCas +1795 0 PwoCas +1796 0 PwoCas +1797 0 PwoCas +1798 0 PwoCas +1799 0 PwoCas +1800 0 PwoCas diff --git a/hal_psee_plugins/biasgen/gen3_idac_n_thick.calib b/hal_psee_plugins/biasgen/gen3_idac_n_thick.calib new file mode 100644 index 000000000..33e041177 --- /dev/null +++ b/hal_psee_plugins/biasgen/gen3_idac_n_thick.calib @@ -0,0 +1,1801 @@ +0 0 NwoCas +1 0 NwoCas +2 0 NwoCas +3 0 NwoCas +4 0 NwoCas +5 0 NwoCas +6 0 NwoCas +7 0 NwoCas +8 0 NwoCas +9 0 NwoCas +10 0 NwoCas +11 0 NwoCas +12 0 NwoCas +13 0 NwoCas +14 0 NwoCas +15 0 NwoCas +16 0 NwoCas +17 0 NwoCas +18 0 NwoCas +19 0 NwoCas +20 0 NwoCas +21 0 NwoCas +22 0 NwoCas +23 0 NwoCas +24 0 NwoCas +25 0 NwoCas +26 0 NwoCas +27 0 NwoCas +28 0 NwoCas +29 0 NwoCas +30 0 NwoCas +31 0 NwoCas +32 0 NwoCas +33 0 NwoCas +34 0 NwoCas +35 0 NwoCas +36 0 NwoCas +37 0 NwoCas +38 0 NwoCas +39 0 NwoCas +40 0 NwoCas +41 0 NwoCas +42 0 NwoCas +43 0 NwoCas +44 0 NwoCas +45 0 NwoCas +46 0 NwoCas +47 0 NwoCas +48 0 NwoCas +49 0 NwoCas +50 0 NwoCas +51 0 NwoCas +52 0 NwoCas +53 0 NwoCas +54 0 NwoCas +55 0 NwoCas +56 0 NwoCas +57 0 NwoCas +58 0 NwoCas +59 0 NwoCas +60 0 NwoCas +61 0 NwoCas +62 0 NwoCas +63 0 NwoCas +64 0 NwoCas +65 0 NwoCas +66 0 NwoCas +67 0 NwoCas +68 0 NwoCas +69 0 NwoCas +70 0 NwoCas +71 0 NwoCas +72 0 NwoCas +73 0 NwoCas +74 0 NwoCas +75 0 NwoCas +76 0 NwoCas +77 0 NwoCas +78 0 NwoCas +79 0 NwoCas +80 0 NwoCas +81 0 NwoCas +82 0 NwoCas +83 0 NwoCas +84 0 NwoCas +85 0 NwoCas +86 0 NwoCas +87 0 NwoCas +88 0 NwoCas +89 0 NwoCas +90 0 NwoCas +91 0 NwoCas +92 0 NwoCas +93 0 NwoCas +94 0 NwoCas +95 0 NwoCas +96 0 NwoCas +97 0 NwoCas +98 0 NwoCas +99 0 NwoCas +100 0 NwoCas +101 0 NwoCas +102 0 NwoCas +103 0 NwoCas +104 0 NwoCas +105 0 NwoCas +106 0 NwoCas +107 0 NwoCas +108 0 NwoCas +109 0 NwoCas +110 0 NwoCas +111 0 NwoCas +112 0 NwoCas +113 0 NwoCas +114 0 NwoCas +115 0 NwoCas +116 0 NwoCas +117 0 NwoCas +118 0 NwoCas +119 0 NwoCas +120 0 NwoCas +121 0 NwoCas +122 0 NwoCas +123 0 NwoCas +124 0 NwoCas +125 0 NwoCas +126 0 NwoCas +127 0 NwoCas +128 0 NwoCas +129 0 NwoCas +130 0 NwoCas +131 0 NwoCas +132 0 NwoCas +133 0 NwoCas +134 0 NwoCas +135 0 NwoCas +136 0 NwoCas +137 0 NwoCas +138 0 NwoCas +139 0 NwoCas +140 0 NwoCas +141 0 NwoCas +142 0 NwoCas +143 0 NwoCas +144 0 NwoCas +145 0 NwoCas +146 0 NwoCas +147 0 NwoCas +148 0 NwoCas +149 0 NwoCas +150 0 NwoCas +151 0 NwoCas +152 0 NwoCas +153 0 NwoCas +154 0 NwoCas +155 0 NwoCas +156 0 NwoCas +157 0 NwoCas +158 0 NwoCas +159 0 NwoCas +160 0 NwoCas +161 0 NwoCas +162 0 NwoCas +163 0 NwoCas +164 0 NwoCas +165 0 NwoCas +166 0 NwoCas +167 0 NwoCas +168 0 NwoCas +169 0 NwoCas +170 0 NwoCas +171 0 NwoCas +172 0 NwoCas +173 0 NwoCas +174 0 NwoCas +175 0 NwoCas +176 0 NwoCas +177 0 NwoCas +178 0 NwoCas +179 0 NwoCas +180 0 NwoCas +181 0 NwoCas +182 0 NwoCas +183 0 NwoCas +184 0 NwoCas +185 0 NwoCas +186 0 NwoCas +187 0 NwoCas +188 0 NwoCas +189 0 NwoCas +190 0 NwoCas +191 0 NwoCas +192 0 NwoCas +193 0 NwoCas +194 0 NwoCas +195 0 NwoCas +196 0 NwoCas +197 0 NwoCas +198 0 NwoCas +199 0 NwoCas +200 0 NwoCas +201 0 NwoCas +202 0 NwoCas +203 0 NwoCas +204 0 NwoCas +205 0 NwoCas +206 0 NwoCas +207 0 NwoCas +208 0 NwoCas +209 0 NwoCas +210 0 NwoCas +211 0 NwoCas +212 0 NwoCas +213 0 NwoCas +214 0 NwoCas +215 0 NwoCas +216 0 NwoCas +217 0 NwoCas +218 0 NwoCas +219 0 NwoCas +220 0 NwoCas +221 0 NwoCas +222 0 NwoCas +223 0 NwoCas +224 0 NwoCas +225 0 NwoCas +226 0 NwoCas +227 0 NwoCas +228 0 NwoCas +229 0 NwoCas +230 0 NwoCas +231 0 NwoCas +232 0 NwoCas +233 0 NwoCas +234 0 NwoCas +235 0 NwoCas +236 0 NwoCas +237 0 NwoCas +238 0 NwoCas +239 0 NwoCas +240 0 NwoCas +241 0 NwoCas +242 0 NwoCas +243 0 NwoCas +244 0 NwoCas +245 0 NwoCas +246 0 NwoCas +247 0 NwoCas +248 0 NwoCas +249 0 NwoCas +250 0 NwoCas +251 0 NwoCas +252 0 NwoCas +253 0 NwoCas +254 0 NwoCas +255 0 NwoCas +256 0 NwoCas +257 0 NwoCas +258 0 NwoCas +259 0 NwoCas +260 0 NwoCas +261 0 NwoCas +262 0 NwoCas +263 0 NwoCas +264 0 NwoCas +265 0 NwoCas +266 0 NwoCas +267 1 NwoCas +268 1 NwoCas +269 1 NwoCas +270 1 NwoCas +271 1 NwoCas +272 1 NwoCas +273 1 NwoCas +274 1 NwoCas +275 1 NwoCas +276 1 NwoCas +277 1 NwoCas +278 1 NwoCas +279 1 NwoCas +280 1 NwoCas +281 1 NwoCas +282 1 NwoCas +283 1 NwoCas +284 1 NwoCas +285 1 NwoCas +286 1 NwoCas +287 1 NwoCas +288 1 NwoCas +289 1 NwoCas +290 1 NwoCas +291 1 NwoCas +292 1 NwoCas +293 1 NwoCas +294 1 NwoCas +295 1 NwoCas +296 1 NwoCas +297 1 NwoCas +298 1 NwoCas +299 1 NwoCas +300 1 NwoCas +301 1 NwoCas +302 1 NwoCas +303 1 NwoCas +304 1 NwoCas +305 1 NwoCas +306 1 NwoCas +307 1 NwoCas +308 1 NwoCas +309 1 NwoCas +310 1 NwoCas +311 1 NwoCas +312 1 NwoCas +313 1 NwoCas +314 2 NwoCas +315 2 NwoCas +316 2 NwoCas +317 2 NwoCas +318 2 NwoCas +319 2 NwoCas +320 2 NwoCas +321 2 NwoCas +322 2 NwoCas +323 2 NwoCas +324 2 NwoCas +325 2 NwoCas +326 2 NwoCas +327 2 NwoCas +328 2 NwoCas +329 2 NwoCas +330 2 NwoCas +331 2 NwoCas +332 2 NwoCas +333 2 NwoCas +334 2 NwoCas +335 2 NwoCas +336 2 NwoCas +337 2 NwoCas +338 3 NwoCas +339 3 NwoCas +340 3 NwoCas +341 3 NwoCas +342 3 NwoCas +343 3 NwoCas +344 3 NwoCas +345 3 NwoCas +346 3 NwoCas +347 3 NwoCas +348 3 NwoCas +349 3 NwoCas +350 3 NwoCas +351 3 NwoCas +352 3 NwoCas +353 4 NwoCas +354 4 NwoCas +355 4 NwoCas +356 4 NwoCas +357 4 NwoCas +358 4 NwoCas +359 4 NwoCas +360 4 NwoCas +361 4 NwoCas +362 4 NwoCas +363 4 NwoCas +364 5 NwoCas +365 5 NwoCas +366 5 NwoCas +367 5 NwoCas +368 5 NwoCas +369 5 NwoCas +370 5 NwoCas +371 5 NwoCas +372 6 NwoCas +373 6 NwoCas +374 6 NwoCas +375 6 NwoCas +376 6 NwoCas +377 6 NwoCas +378 6 NwoCas +379 7 NwoCas +380 7 NwoCas +381 7 NwoCas +382 7 NwoCas +383 7 NwoCas +384 8 NwoCas +385 8 NwoCas +386 8 NwoCas +387 8 NwoCas +388 8 NwoCas +389 8 NwoCas +390 9 NwoCas +391 9 NwoCas +392 9 NwoCas +393 9 NwoCas +394 10 NwoCas +395 10 NwoCas +396 10 NwoCas +397 10 NwoCas +398 11 NwoCas +399 11 NwoCas +400 11 NwoCas +401 11 NwoCas +402 12 NwoCas +403 12 NwoCas +404 12 NwoCas +405 13 NwoCas +406 13 NwoCas +407 13 NwoCas +408 14 NwoCas +409 14 NwoCas +410 14 NwoCas +411 15 NwoCas +412 15 NwoCas +413 16 NwoCas +414 16 NwoCas +415 16 NwoCas +416 16 NwoCas +417 17 NwoCas +418 17 NwoCas +419 18 NwoCas +420 18 NwoCas +421 19 NwoCas +422 19 NwoCas +423 20 NwoCas +424 20 NwoCas +425 21 NwoCas +426 22 NwoCas +427 22 NwoCas +428 23 NwoCas +429 23 NwoCas +430 24 NwoCas +431 25 NwoCas +432 25 NwoCas +433 26 NwoCas +434 27 NwoCas +435 27 NwoCas +436 28 NwoCas +437 29 NwoCas +438 30 NwoCas +439 31 NwoCas +440 31 NwoCas +441 32 NwoCas +442 32 NwoCas +443 33 NwoCas +444 34 NwoCas +445 35 NwoCas +446 36 NwoCas +447 37 NwoCas +448 38 NwoCas +449 39 NwoCas +450 40 NwoCas +451 41 NwoCas +452 42 NwoCas +453 43 NwoCas +454 45 NwoCas +455 46 NwoCas +456 47 NwoCas +457 48 NwoCas +458 49 NwoCas +459 51 NwoCas +460 52 NwoCas +461 54 NwoCas +462 55 NwoCas +463 56 NwoCas +464 58 NwoCas +465 60 NwoCas +466 61 NwoCas +467 63 NwoCas +468 64 NwoCas +469 64 NwoCas +470 66 NwoCas +471 68 NwoCas +472 70 NwoCas +473 72 NwoCas +474 74 NwoCas +475 76 NwoCas +476 78 NwoCas +477 80 NwoCas +478 82 NwoCas +479 84 NwoCas +480 87 NwoCas +481 89 NwoCas +482 92 NwoCas +483 94 NwoCas +484 96 NwoCas +485 99 NwoCas +486 101 NwoCas +487 104 NwoCas +488 107 NwoCas +489 110 NwoCas +490 113 NwoCas +491 116 NwoCas +492 119 NwoCas +493 122 NwoCas +494 126 NwoCas +495 128 NwoCas +496 128 NwoCas +497 131 NwoCas +498 135 NwoCas +499 139 NwoCas +500 143 NwoCas +501 146 NwoCas +502 150 NwoCas +503 154 NwoCas +504 159 NwoCas +505 162 NwoCas +506 167 NwoCas +507 171 NwoCas +508 176 NwoCas +509 180 NwoCas +510 185 NwoCas +511 190 NwoCas +512 193 NwoCas +513 199 NwoCas +514 204 NwoCas +515 209 NwoCas +516 215 NwoCas +517 221 NwoCas +518 226 NwoCas +519 232 NwoCas +520 238 NwoCas +521 244 NwoCas +522 251 NwoCas +523 256 NwoCas +524 256 NwoCas +525 262 NwoCas +526 269 NwoCas +527 276 NwoCas +528 283 NwoCas +529 290 NwoCas +530 297 NwoCas +531 305 NwoCas +532 313 NwoCas +533 320 NwoCas +534 328 NwoCas +535 336 NwoCas +536 345 NwoCas +537 353 NwoCas +538 362 NwoCas +539 372 NwoCas +540 381 NwoCas +541 386 NwoCas +542 396 NwoCas +543 406 NwoCas +544 416 NwoCas +545 427 NwoCas +546 437 NwoCas +547 448 NwoCas +548 457 NwoCas +549 469 NwoCas +550 480 NwoCas +551 492 NwoCas +552 504 NwoCas +553 512 NwoCas +554 512 NwoCas +555 524 NwoCas +556 537 NwoCas +557 550 NwoCas +558 563 NwoCas +559 576 NwoCas +560 589 NwoCas +561 604 NwoCas +562 618 NwoCas +563 632 NwoCas +564 643 NwoCas +565 659 NwoCas +566 674 NwoCas +567 690 NwoCas +568 704 NwoCas +569 721 NwoCas +570 737 NwoCas +571 755 NwoCas +572 768 NwoCas +573 781 NwoCas +574 800 NwoCas +575 817 NwoCas +576 834 NwoCas +577 853 NwoCas +578 872 NwoCas +579 892 NwoCas +580 908 NwoCas +581 928 NwoCas +582 948 NwoCas +583 968 NwoCas +584 989 NwoCas +585 1010 NwoCas +586 1024 NwoCas +587 1024 NwoCas +588 1047 NwoCas +589 1070 NwoCas +590 1091 NwoCas +591 1115 NwoCas +592 1139 NwoCas +593 1160 NwoCas +594 1184 NwoCas +595 1210 NwoCas +596 1234 NwoCas +597 1259 NwoCas +598 1280 NwoCas +599 1304 NwoCas +600 1331 NwoCas +601 1358 NwoCas +602 1385 NwoCas +603 1410 NwoCas +604 1439 NwoCas +605 1468 NwoCas +606 1496 NwoCas +607 1526 NwoCas +608 1540 NwoCas +609 1570 NwoCas +610 1600 NwoCas +611 1632 NwoCas +612 1664 NwoCas +613 1693 NwoCas +614 1726 NwoCas +615 1758 NwoCas +616 1792 NwoCas +617 1818 NwoCas +618 1853 NwoCas +619 1887 NwoCas +620 1920 NwoCas +621 1954 NwoCas +622 1990 NwoCas +623 2027 NwoCas +624 2048 NwoCas +625 2052 NwoCas +626 2090 NwoCas +627 2128 NwoCas +628 2167 NwoCas +629 2204 NwoCas +630 2242 NwoCas +631 2283 NwoCas +632 2317 NwoCas +633 2359 NwoCas +634 2400 NwoCas +635 2439 NwoCas +636 2482 NwoCas +637 2525 NwoCas +638 2560 NwoCas +639 2598 NwoCas +640 2642 NwoCas +641 2688 NwoCas +642 2731 NwoCas +643 2777 NwoCas +644 2816 NwoCas +645 2864 NwoCas +646 2912 NwoCas +647 2957 NwoCas +648 3007 NwoCas +649 3056 NwoCas +650 3076 NwoCas +651 3128 NwoCas +652 3178 NwoCas +653 3227 NwoCas +654 3279 NwoCas +655 3328 NwoCas +656 3378 NwoCas +657 3431 NwoCas +658 3483 NwoCas +659 3537 NwoCas +660 3584 NwoCas +661 3634 NwoCas +662 3690 NwoCas +663 3744 NwoCas +664 3802 NwoCas +665 3853 NwoCas +666 3911 NwoCas +667 3968 NwoCas +668 4029 NwoCas +669 4089 NwoCas +670 4096 NwoCas +671 4134 NwoCas +672 4196 NwoCas +673 4256 NwoCas +674 4320 NwoCas +675 4377 NwoCas +676 4442 NwoCas +677 4504 NwoCas +678 4570 NwoCas +679 4621 NwoCas +680 4688 NwoCas +681 4753 NwoCas +682 4821 NwoCas +683 4883 NwoCas +684 4952 NwoCas +685 5020 NwoCas +686 5090 NwoCas +687 5133 NwoCas +688 5205 NwoCas +689 5275 NwoCas +690 5348 NwoCas +691 5415 NwoCas +692 5489 NwoCas +693 5562 NwoCas +694 5632 NwoCas +695 5697 NwoCas +696 5772 NwoCas +697 5850 NwoCas +698 5920 NwoCas +699 6000 NwoCas +700 6077 NwoCas +701 31 NCas +702 31 NCas +703 31 NCas +704 31 NCas +705 32 NCas +706 32 NCas +707 32 NCas +708 32 NCas +709 32 NCas +710 33 NCas +711 33 NCas +712 34 NCas +713 34 NCas +714 34 NCas +715 35 NCas +716 35 NCas +717 36 NCas +718 36 NCas +719 37 NCas +720 37 NCas +721 38 NCas +722 38 NCas +723 39 NCas +724 39 NCas +725 40 NCas +726 40 NCas +727 40 NCas +728 41 NCas +729 41 NCas +730 42 NCas +731 43 NCas +732 43 NCas +733 44 NCas +734 44 NCas +735 45 NCas +736 45 NCas +737 46 NCas +738 46 NCas +739 47 NCas +740 48 NCas +741 48 NCas +742 48 NCas +743 49 NCas +744 50 NCas +745 50 NCas +746 51 NCas +747 52 NCas +748 52 NCas +749 53 NCas +750 54 NCas +751 54 NCas +752 55 NCas +753 56 NCas +754 56 NCas +755 57 NCas +756 58 NCas +757 58 NCas +758 59 NCas +759 60 NCas +760 61 NCas +761 61 NCas +762 62 NCas +763 63 NCas +764 64 NCas +765 64 NCas +766 64 NCas +767 64 NCas +768 65 NCas +769 66 NCas +770 66 NCas +771 67 NCas +772 68 NCas +773 69 NCas +774 70 NCas +775 71 NCas +776 72 NCas +777 73 NCas +778 74 NCas +779 75 NCas +780 76 NCas +781 76 NCas +782 77 NCas +783 78 NCas +784 80 NCas +785 80 NCas +786 81 NCas +787 82 NCas +788 83 NCas +789 84 NCas +790 85 NCas +791 87 NCas +792 88 NCas +793 89 NCas +794 90 NCas +795 91 NCas +796 92 NCas +797 93 NCas +798 94 NCas +799 96 NCas +800 96 NCas +801 97 NCas +802 98 NCas +803 100 NCas +804 101 NCas +805 102 NCas +806 104 NCas +807 105 NCas +808 106 NCas +809 108 NCas +810 109 NCas +811 110 NCas +812 112 NCas +813 113 NCas +814 114 NCas +815 116 NCas +816 117 NCas +817 119 NCas +818 120 NCas +819 122 NCas +820 123 NCas +821 125 NCas +822 126 NCas +823 128 NCas +824 128 NCas +825 128 NCas +826 128 NCas +827 130 NCas +828 132 NCas +829 133 NCas +830 135 NCas +831 137 NCas +832 138 NCas +833 140 NCas +834 142 NCas +835 144 NCas +836 145 NCas +837 147 NCas +838 149 NCas +839 151 NCas +840 153 NCas +841 155 NCas +842 157 NCas +843 159 NCas +844 160 NCas +845 162 NCas +846 164 NCas +847 166 NCas +848 168 NCas +849 171 NCas +850 173 NCas +851 175 NCas +852 177 NCas +853 179 NCas +854 182 NCas +855 184 NCas +856 186 NCas +857 189 NCas +858 191 NCas +859 192 NCas +860 194 NCas +861 196 NCas +862 199 NCas +863 201 NCas +864 204 NCas +865 206 NCas +866 209 NCas +867 211 NCas +868 214 NCas +869 217 NCas +870 220 NCas +871 222 NCas +872 224 NCas +873 227 NCas +874 230 NCas +875 233 NCas +876 236 NCas +877 239 NCas +878 241 NCas +879 244 NCas +880 248 NCas +881 251 NCas +882 254 NCas +883 256 NCas +884 256 NCas +885 256 NCas +886 257 NCas +887 261 NCas +888 264 NCas +889 267 NCas +890 271 NCas +891 274 NCas +892 278 NCas +893 281 NCas +894 285 NCas +895 288 NCas +896 291 NCas +897 295 NCas +898 299 NCas +899 302 NCas +900 306 NCas +901 310 NCas +902 314 NCas +903 318 NCas +904 320 NCas +905 324 NCas +906 328 NCas +907 332 NCas +908 336 NCas +909 340 NCas +910 344 NCas +911 349 NCas +912 352 NCas +913 356 NCas +914 361 NCas +915 365 NCas +916 370 NCas +917 374 NCas +918 379 NCas +919 384 NCas +920 384 NCas +921 389 NCas +922 394 NCas +923 399 NCas +924 403 NCas +925 408 NCas +926 413 NCas +927 418 NCas +928 423 NCas +929 428 NCas +930 433 NCas +931 438 NCas +932 444 NCas +933 448 NCas +934 453 NCas +935 458 NCas +936 464 NCas +937 469 NCas +938 475 NCas +939 480 NCas +940 486 NCas +941 492 NCas +942 497 NCas +943 504 NCas +944 510 NCas +945 512 NCas +946 512 NCas +947 512 NCas +948 517 NCas +949 524 NCas +950 530 NCas +951 536 NCas +952 543 NCas +953 549 NCas +954 556 NCas +955 562 NCas +956 569 NCas +957 576 NCas +958 581 NCas +959 588 NCas +960 595 NCas +961 602 NCas +962 609 NCas +963 616 NCas +964 624 NCas +965 631 NCas +966 639 NCas +967 642 NCas +968 649 NCas +969 657 NCas +970 665 NCas +971 672 NCas +972 680 NCas +973 688 NCas +974 696 NCas +975 704 NCas +976 711 NCas +977 720 NCas +978 728 NCas +979 736 NCas +980 744 NCas +981 753 NCas +982 762 NCas +983 768 NCas +984 771 NCas +985 780 NCas +986 789 NCas +987 799 NCas +988 807 NCas +989 816 NCas +990 826 NCas +991 834 NCas +992 843 NCas +993 853 NCas +994 863 NCas +995 872 NCas +996 882 NCas +997 892 NCas +998 898 NCas +999 909 NCas +1000 919 NCas +1001 929 NCas +1002 940 NCas +1003 950 NCas +1004 960 NCas +1005 970 NCas +1006 981 NCas +1007 992 NCas +1008 1003 NCas +1009 1014 NCas +1010 1024 NCas +1011 1024 NCas +1012 1024 NCas +1013 1029 NCas +1014 1041 NCas +1015 1053 NCas +1016 1064 NCas +1017 1076 NCas +1018 1088 NCas +1019 1099 NCas +1020 1111 NCas +1021 1123 NCas +1022 1136 NCas +1023 1149 NCas +1024 1157 NCas +1025 1170 NCas +1026 1184 NCas +1027 1196 NCas +1028 1209 NCas +1029 1221 NCas +1030 1234 NCas +1031 1248 NCas +1032 1262 NCas +1033 1275 NCas +1034 1280 NCas +1035 1295 NCas +1036 1309 NCas +1037 1323 NCas +1038 1337 NCas +1039 1350 NCas +1040 1365 NCas +1041 1379 NCas +1042 1394 NCas +1043 1408 NCas +1044 1421 NCas +1045 1436 NCas +1046 1451 NCas +1047 1466 NCas +1048 1480 NCas +1049 1496 NCas +1050 1512 NCas +1051 1528 NCas +1052 1536 NCas +1053 1544 NCas +1054 1560 NCas +1055 1576 NCas +1056 1593 NCas +1057 1608 NCas +1058 1625 NCas +1059 1642 NCas +1060 1659 NCas +1061 1672 NCas +1062 1690 NCas +1063 1707 NCas +1064 1725 NCas +1065 1742 NCas +1066 1760 NCas +1067 1777 NCas +1068 1792 NCas +1069 1806 NCas +1070 1824 NCas +1071 1843 NCas +1072 1860 NCas +1073 1879 NCas +1074 1898 NCas +1075 1918 NCas +1076 1933 NCas +1077 1952 NCas +1078 1972 NCas +1079 1990 NCas +1080 2011 NCas +1081 2031 NCas +1082 2048 NCas +1083 2048 NCas +1084 2048 NCas +1085 2062 NCas +1086 2082 NCas +1087 2103 NCas +1088 2123 NCas +1089 2144 NCas +1090 2166 NCas +1091 2184 NCas +1092 2206 NCas +1093 2227 NCas +1094 2248 NCas +1095 2271 NCas +1096 2293 NCas +1097 2307 NCas +1098 2330 NCas +1099 2353 NCas +1100 2374 NCas +1101 2398 NCas +1102 2421 NCas +1103 2441 NCas +1104 2464 NCas +1105 2489 NCas +1106 2511 NCas +1107 2535 NCas +1108 2560 NCas +1109 2568 NCas +1110 2592 NCas +1111 2618 NCas +1112 2641 NCas +1113 2666 NCas +1114 2688 NCas +1115 2714 NCas +1116 2740 NCas +1117 2764 NCas +1118 2790 NCas +1119 2816 NCas +1120 2835 NCas +1121 2862 NCas +1122 2887 NCas +1123 2913 NCas +1124 2941 NCas +1125 2965 NCas +1126 2992 NCas +1127 3019 NCas +1128 3046 NCas +1129 3072 NCas +1130 3073 NCas +1131 3102 NCas +1132 3130 NCas +1133 3158 NCas +1134 3186 NCas +1135 3212 NCas +1136 3241 NCas +1137 3269 NCas +1138 3299 NCas +1139 3328 NCas +1140 3351 NCas +1141 3381 NCas +1142 3410 NCas +1143 3441 NCas +1144 3468 NCas +1145 3499 NCas +1146 3529 NCas +1147 3560 NCas +1148 3584 NCas +1149 3608 NCas +1150 3640 NCas +1151 3671 NCas +1152 3703 NCas +1153 3732 NCas +1154 3765 NCas +1155 3797 NCas +1156 3830 NCas +1157 3856 NCas +1158 3889 NCas +1159 3921 NCas +1160 3955 NCas +1161 3986 NCas +1162 4020 NCas +1163 4054 NCas +1164 4088 NCas +1165 4096 NCas +1166 4096 NCas +1167 4115 NCas +1168 4151 NCas +1169 4185 NCas +1170 4221 NCas +1171 4254 NCas +1172 4288 NCas +1173 4325 NCas +1174 4354 NCas +1175 4392 NCas +1176 4428 NCas +1177 4465 NCas +1178 4499 NCas +1179 4537 NCas +1180 4575 NCas +1181 4608 NCas +1182 4635 NCas +1183 4672 NCas +1184 4712 NCas +1185 4747 NCas +1186 4787 NCas +1187 4825 NCas +1188 4864 NCas +1189 4897 NCas +1190 4936 NCas +1191 4976 NCas +1192 5014 NCas +1193 5055 NCas +1194 5095 NCas +1195 5120 NCas +1196 5149 NCas +1197 5189 NCas +1198 5231 NCas +1199 5270 NCas +1200 5312 NCas +1201 5354 NCas +1202 5389 NCas +1203 5432 NCas +1204 5474 NCas +1205 5514 NCas +1206 5558 NCas +1207 5601 NCas +1208 5632 NCas +1209 5674 NCas +1210 5718 NCas +1211 5760 NCas +1212 5804 NCas +1213 5849 NCas +1214 5888 NCas +1215 5932 NCas +1216 5977 NCas +1217 6020 NCas +1218 6066 NCas +1219 6112 NCas +1220 6144 NCas +1221 6156 NCas +1222 6204 NCas +1223 6250 NCas +1224 6295 NCas +1225 6342 NCas +1226 6391 NCas +1227 6432 NCas +1228 6480 NCas +1229 6528 NCas +1230 6575 NCas +1231 6623 NCas +1232 6656 NCas +1233 6707 NCas +1234 6756 NCas +1235 6804 NCas +1236 6853 NCas +1237 6905 NCas +1238 6948 NCas +1239 6999 NCas +1240 7047 NCas +1241 7099 NCas +1242 7150 NCas +1243 7172 NCas +1244 7226 NCas +1245 7278 NCas +1246 7328 NCas +1247 7380 NCas +1248 7425 NCas +1249 7480 NCas +1250 7533 NCas +1251 7584 NCas +1252 7638 NCas +1253 7680 NCas +1254 7732 NCas +1255 7786 NCas +1256 7839 NCas +1257 7893 NCas +1258 7941 NCas +1259 7998 NCas +1260 8054 NCas +1261 644 PwoCas +1262 631 PwoCas +1263 615 PwoCas +1264 599 PwoCas +1265 583 PwoCas +1266 570 PwoCas +1267 555 PwoCas +1268 540 PwoCas +1269 526 PwoCas +1270 512 PwoCas +1271 511 PwoCas +1272 502 PwoCas +1273 489 PwoCas +1274 477 PwoCas +1275 464 PwoCas +1276 452 PwoCas +1277 442 PwoCas +1278 431 PwoCas +1279 419 PwoCas +1280 409 PwoCas +1281 399 PwoCas +1282 388 PwoCas +1283 382 PwoCas +1284 372 PwoCas +1285 362 PwoCas +1286 353 PwoCas +1287 344 PwoCas +1288 335 PwoCas +1289 327 PwoCas +1290 319 PwoCas +1291 311 PwoCas +1292 303 PwoCas +1293 295 PwoCas +1294 287 PwoCas +1295 280 PwoCas +1296 273 PwoCas +1297 266 PwoCas +1298 259 PwoCas +1299 255 PwoCas +1300 254 PwoCas +1301 248 PwoCas +1302 241 PwoCas +1303 235 PwoCas +1304 229 PwoCas +1305 223 PwoCas +1306 218 PwoCas +1307 212 PwoCas +1308 207 PwoCas +1309 202 PwoCas +1310 196 PwoCas +1311 191 PwoCas +1312 188 PwoCas +1313 183 PwoCas +1314 178 PwoCas +1315 174 PwoCas +1316 169 PwoCas +1317 165 PwoCas +1318 161 PwoCas +1319 157 PwoCas +1320 153 PwoCas +1321 149 PwoCas +1322 145 PwoCas +1323 142 PwoCas +1324 138 PwoCas +1325 134 PwoCas +1326 131 PwoCas +1327 127 PwoCas +1328 127 PwoCas +1329 125 PwoCas +1330 122 PwoCas +1331 119 PwoCas +1332 116 PwoCas +1333 113 PwoCas +1334 110 PwoCas +1335 107 PwoCas +1336 104 PwoCas +1337 102 PwoCas +1338 99 PwoCas +1339 96 PwoCas +1340 95 PwoCas +1341 92 PwoCas +1342 90 PwoCas +1343 88 PwoCas +1344 85 PwoCas +1345 83 PwoCas +1346 81 PwoCas +1347 79 PwoCas +1348 77 PwoCas +1349 75 PwoCas +1350 73 PwoCas +1351 71 PwoCas +1352 70 PwoCas +1353 68 PwoCas +1354 66 PwoCas +1355 64 PwoCas +1356 63 PwoCas +1357 63 PwoCas +1358 61 PwoCas +1359 60 PwoCas +1360 58 PwoCas +1361 57 PwoCas +1362 55 PwoCas +1363 54 PwoCas +1364 53 PwoCas +1365 51 PwoCas +1366 50 PwoCas +1367 49 PwoCas +1368 47 PwoCas +1369 47 PwoCas +1370 45 PwoCas +1371 44 PwoCas +1372 43 PwoCas +1373 42 PwoCas +1374 41 PwoCas +1375 40 PwoCas +1376 39 PwoCas +1377 38 PwoCas +1378 37 PwoCas +1379 36 PwoCas +1380 35 PwoCas +1381 34 PwoCas +1382 33 PwoCas +1383 32 PwoCas +1384 31 PwoCas +1385 31 PwoCas +1386 31 PwoCas +1387 30 PwoCas +1388 29 PwoCas +1389 29 PwoCas +1390 28 PwoCas +1391 27 PwoCas +1392 26 PwoCas +1393 26 PwoCas +1394 25 PwoCas +1395 24 PwoCas +1396 24 PwoCas +1397 23 PwoCas +1398 23 PwoCas +1399 22 PwoCas +1400 22 PwoCas +1401 21 PwoCas +1402 21 PwoCas +1403 20 PwoCas +1404 19 PwoCas +1405 19 PwoCas +1406 19 PwoCas +1407 18 PwoCas +1408 18 PwoCas +1409 17 PwoCas +1410 17 PwoCas +1411 16 PwoCas +1412 16 PwoCas +1413 15 PwoCas +1414 15 PwoCas +1415 15 PwoCas +1416 15 PwoCas +1417 14 PwoCas +1418 14 PwoCas +1419 14 PwoCas +1420 13 PwoCas +1421 13 PwoCas +1422 13 PwoCas +1423 12 PwoCas +1424 12 PwoCas +1425 12 PwoCas +1426 11 PwoCas +1427 11 PwoCas +1428 11 PwoCas +1429 10 PwoCas +1430 10 PwoCas +1431 10 PwoCas +1432 10 PwoCas +1433 9 PwoCas +1434 9 PwoCas +1435 9 PwoCas +1436 9 PwoCas +1437 8 PwoCas +1438 8 PwoCas +1439 8 PwoCas +1440 8 PwoCas +1441 8 PwoCas +1442 7 PwoCas +1443 7 PwoCas +1444 7 PwoCas +1445 7 PwoCas +1446 7 PwoCas +1447 7 PwoCas +1448 6 PwoCas +1449 6 PwoCas +1450 6 PwoCas +1451 6 PwoCas +1452 6 PwoCas +1453 6 PwoCas +1454 5 PwoCas +1455 5 PwoCas +1456 5 PwoCas +1457 5 PwoCas +1458 5 PwoCas +1459 5 PwoCas +1460 5 PwoCas +1461 5 PwoCas +1462 4 PwoCas +1463 4 PwoCas +1464 4 PwoCas +1465 4 PwoCas +1466 4 PwoCas +1467 4 PwoCas +1468 4 PwoCas +1469 4 PwoCas +1470 4 PwoCas +1471 3 PwoCas +1472 3 PwoCas +1473 3 PwoCas +1474 3 PwoCas +1475 3 PwoCas +1476 3 PwoCas +1477 3 PwoCas +1478 3 PwoCas +1479 3 PwoCas +1480 3 PwoCas +1481 3 PwoCas +1482 3 PwoCas +1483 2 PwoCas +1484 2 PwoCas +1485 2 PwoCas +1486 2 PwoCas +1487 2 PwoCas +1488 2 PwoCas +1489 2 PwoCas +1490 2 PwoCas +1491 2 PwoCas +1492 2 PwoCas +1493 2 PwoCas +1494 2 PwoCas +1495 2 PwoCas +1496 2 PwoCas +1497 2 PwoCas +1498 2 PwoCas +1499 1 PwoCas +1500 1 PwoCas +1501 1 PwoCas +1502 1 PwoCas +1503 1 PwoCas +1504 1 PwoCas +1505 1 PwoCas +1506 1 PwoCas +1507 1 PwoCas +1508 1 PwoCas +1509 1 PwoCas +1510 1 PwoCas +1511 1 PwoCas +1512 1 PwoCas +1513 1 PwoCas +1514 1 PwoCas +1515 1 PwoCas +1516 1 PwoCas +1517 1 PwoCas +1518 1 PwoCas +1519 1 PwoCas +1520 1 PwoCas +1521 1 PwoCas +1522 1 PwoCas +1523 1 PwoCas +1524 1 PwoCas +1525 0 PwoCas +1526 0 PwoCas +1527 0 PwoCas +1528 0 PwoCas +1529 0 PwoCas +1530 0 PwoCas +1531 0 PwoCas +1532 0 PwoCas +1533 0 PwoCas +1534 0 PwoCas +1535 0 PwoCas +1536 0 PwoCas +1537 0 PwoCas +1538 0 PwoCas +1539 0 PwoCas +1540 0 PwoCas +1541 0 PwoCas +1542 0 PwoCas +1543 0 PwoCas +1544 0 PwoCas +1545 0 PwoCas +1546 0 PwoCas +1547 0 PwoCas +1548 0 PwoCas +1549 0 PwoCas +1550 0 PwoCas +1551 0 PwoCas +1552 0 PwoCas +1553 0 PwoCas +1554 0 PwoCas +1555 0 PwoCas +1556 0 PwoCas +1557 0 PwoCas +1558 0 PwoCas +1559 0 PwoCas +1560 0 PwoCas +1561 0 PwoCas +1562 0 PwoCas +1563 0 PwoCas +1564 0 PwoCas +1565 0 PwoCas +1566 0 PwoCas +1567 0 PwoCas +1568 0 PwoCas +1569 0 PwoCas +1570 0 PwoCas +1571 0 PwoCas +1572 0 PwoCas +1573 0 PwoCas +1574 0 PwoCas +1575 0 PwoCas +1576 0 PwoCas +1577 0 PwoCas +1578 0 PwoCas +1579 0 PwoCas +1580 0 PwoCas +1581 0 PwoCas +1582 0 PwoCas +1583 0 PwoCas +1584 0 PwoCas +1585 0 PwoCas +1586 0 PwoCas +1587 0 PwoCas +1588 0 PwoCas +1589 0 PwoCas +1590 0 PwoCas +1591 0 PwoCas +1592 0 PwoCas +1593 0 PwoCas +1594 0 PwoCas +1595 0 PwoCas +1596 0 PwoCas +1597 0 PwoCas +1598 0 PwoCas +1599 0 PwoCas +1600 0 PwoCas +1601 0 PwoCas +1602 0 PwoCas +1603 0 PwoCas +1604 0 PwoCas +1605 0 PwoCas +1606 0 PwoCas +1607 0 PwoCas +1608 0 PwoCas +1609 0 PwoCas +1610 0 PwoCas +1611 0 PwoCas +1612 0 PwoCas +1613 0 PwoCas +1614 0 PwoCas +1615 0 PwoCas +1616 0 PwoCas +1617 0 PwoCas +1618 0 PwoCas +1619 0 PwoCas +1620 0 PwoCas +1621 0 PwoCas +1622 0 PwoCas +1623 0 PwoCas +1624 0 PwoCas +1625 0 PwoCas +1626 0 PwoCas +1627 0 PwoCas +1628 0 PwoCas +1629 0 PwoCas +1630 0 PwoCas +1631 0 PwoCas +1632 0 PwoCas +1633 0 PwoCas +1634 0 PwoCas +1635 0 PwoCas +1636 0 PwoCas +1637 0 PwoCas +1638 0 PwoCas +1639 0 PwoCas +1640 0 PwoCas +1641 0 PwoCas +1642 0 PwoCas +1643 0 PwoCas +1644 0 PwoCas +1645 0 PwoCas +1646 0 PwoCas +1647 0 PwoCas +1648 0 PwoCas +1649 0 PwoCas +1650 0 PwoCas +1651 0 PwoCas +1652 0 PwoCas +1653 0 PwoCas +1654 0 PwoCas +1655 0 PwoCas +1656 0 PwoCas +1657 0 PwoCas +1658 0 PwoCas +1659 0 PwoCas +1660 0 PwoCas +1661 0 PwoCas +1662 0 PwoCas +1663 0 PwoCas +1664 0 PwoCas +1665 0 PwoCas +1666 0 PwoCas +1667 0 PwoCas +1668 0 PwoCas +1669 0 PwoCas +1670 0 PwoCas +1671 0 PwoCas +1672 0 PwoCas +1673 0 PwoCas +1674 0 PwoCas +1675 0 PwoCas +1676 0 PwoCas +1677 0 PwoCas +1678 0 PwoCas +1679 0 PwoCas +1680 0 PwoCas +1681 0 PwoCas +1682 0 PwoCas +1683 0 PwoCas +1684 0 PwoCas +1685 0 PwoCas +1686 0 PwoCas +1687 0 PwoCas +1688 0 PwoCas +1689 0 PwoCas +1690 0 PwoCas +1691 0 PwoCas +1692 0 PwoCas +1693 0 PwoCas +1694 0 PwoCas +1695 0 PwoCas +1696 0 PwoCas +1697 0 PwoCas +1698 0 PwoCas +1699 0 PwoCas +1700 0 PwoCas +1701 0 PwoCas +1702 0 PwoCas +1703 0 PwoCas +1704 0 PwoCas +1705 0 PwoCas +1706 0 PwoCas +1707 0 PwoCas +1708 0 PwoCas +1709 0 PwoCas +1710 0 PwoCas +1711 0 PwoCas +1712 0 PwoCas +1713 0 PwoCas +1714 0 PwoCas +1715 0 PwoCas +1716 0 PwoCas +1717 0 PwoCas +1718 0 PwoCas +1719 0 PwoCas +1720 0 PwoCas +1721 0 PwoCas +1722 0 PwoCas +1723 0 PwoCas +1724 0 PwoCas +1725 0 PwoCas +1726 0 PwoCas +1727 0 PwoCas +1728 0 PwoCas +1729 0 PwoCas +1730 0 PwoCas +1731 0 PwoCas +1732 0 PwoCas +1733 0 PwoCas +1734 0 PwoCas +1735 0 PwoCas +1736 0 PwoCas +1737 0 PwoCas +1738 0 PwoCas +1739 0 PwoCas +1740 0 PwoCas +1741 0 PwoCas +1742 0 PwoCas +1743 0 PwoCas +1744 0 PwoCas +1745 0 PwoCas +1746 0 PwoCas +1747 0 PwoCas +1748 0 PwoCas +1749 0 PwoCas +1750 0 PwoCas +1751 0 PwoCas +1752 0 PwoCas +1753 0 PwoCas +1754 0 PwoCas +1755 0 PwoCas +1756 0 PwoCas +1757 0 PwoCas +1758 0 PwoCas +1759 0 PwoCas +1760 0 PwoCas +1761 0 PwoCas +1762 0 PwoCas +1763 0 PwoCas +1764 0 PwoCas +1765 0 PwoCas +1766 0 PwoCas +1767 0 PwoCas +1768 0 PwoCas +1769 0 PwoCas +1770 0 PwoCas +1771 0 PwoCas +1772 0 PwoCas +1773 0 PwoCas +1774 0 PwoCas +1775 0 PwoCas +1776 0 PwoCas +1777 0 PwoCas +1778 0 PwoCas +1779 0 PwoCas +1780 0 PwoCas +1781 0 PwoCas +1782 0 PwoCas +1783 0 PwoCas +1784 0 PwoCas +1785 0 PwoCas +1786 0 PwoCas +1787 0 PwoCas +1788 0 PwoCas +1789 0 PwoCas +1790 0 PwoCas +1791 0 PwoCas +1792 0 PwoCas +1793 0 PwoCas +1794 0 PwoCas +1795 0 PwoCas +1796 0 PwoCas +1797 0 PwoCas +1798 0 PwoCas +1799 0 PwoCas +1800 0 PwoCas diff --git a/hal_psee_plugins/biasgen/gen3_idac_n_thin.calib b/hal_psee_plugins/biasgen/gen3_idac_n_thin.calib new file mode 100644 index 000000000..6e68cdf98 --- /dev/null +++ b/hal_psee_plugins/biasgen/gen3_idac_n_thin.calib @@ -0,0 +1,1801 @@ +0 0 NwoCas +1 0 NwoCas +2 0 NwoCas +3 0 NwoCas +4 0 NwoCas +5 0 NwoCas +6 0 NwoCas +7 0 NwoCas +8 0 NwoCas +9 0 NwoCas +10 1 NwoCas +11 1 NwoCas +12 1 NwoCas +13 1 NwoCas +14 1 NwoCas +15 1 NwoCas +16 1 NwoCas +17 1 NwoCas +18 1 NwoCas +19 1 NwoCas +20 1 NwoCas +21 1 NwoCas +22 1 NwoCas +23 1 NwoCas +24 1 NwoCas +25 1 NwoCas +26 1 NwoCas +27 1 NwoCas +28 1 NwoCas +29 1 NwoCas +30 1 NwoCas +31 1 NwoCas +32 1 NwoCas +33 1 NwoCas +34 1 NwoCas +35 1 NwoCas +36 1 NwoCas +37 1 NwoCas +38 1 NwoCas +39 1 NwoCas +40 1 NwoCas +41 1 NwoCas +42 1 NwoCas +43 1 NwoCas +44 1 NwoCas +45 1 NwoCas +46 1 NwoCas +47 1 NwoCas +48 1 NwoCas +49 1 NwoCas +50 1 NwoCas +51 1 NwoCas +52 1 NwoCas +53 1 NwoCas +54 1 NwoCas +55 1 NwoCas +56 1 NwoCas +57 1 NwoCas +58 1 NwoCas +59 1 NwoCas +60 1 NwoCas +61 1 NwoCas +62 1 NwoCas +63 1 NwoCas +64 1 NwoCas +65 1 NwoCas +66 1 NwoCas +67 1 NwoCas +68 1 NwoCas +69 1 NwoCas +70 1 NwoCas +71 2 NwoCas +72 2 NwoCas +73 2 NwoCas +74 2 NwoCas +75 2 NwoCas +76 2 NwoCas +77 2 NwoCas +78 2 NwoCas +79 2 NwoCas +80 2 NwoCas +81 2 NwoCas +82 2 NwoCas +83 2 NwoCas +84 2 NwoCas +85 2 NwoCas +86 2 NwoCas +87 2 NwoCas +88 2 NwoCas +89 2 NwoCas +90 2 NwoCas +91 2 NwoCas +92 2 NwoCas +93 2 NwoCas +94 2 NwoCas +95 3 NwoCas +96 3 NwoCas +97 3 NwoCas +98 3 NwoCas +99 3 NwoCas +100 3 NwoCas +101 3 NwoCas +102 3 NwoCas +103 3 NwoCas +104 3 NwoCas +105 3 NwoCas +106 3 NwoCas +107 3 NwoCas +108 4 NwoCas +109 4 NwoCas +110 4 NwoCas +111 4 NwoCas +112 4 NwoCas +113 4 NwoCas +114 4 NwoCas +115 4 NwoCas +116 4 NwoCas +117 4 NwoCas +118 4 NwoCas +119 5 NwoCas +120 5 NwoCas +121 5 NwoCas +122 5 NwoCas +123 5 NwoCas +124 5 NwoCas +125 5 NwoCas +126 6 NwoCas +127 6 NwoCas +128 6 NwoCas +129 6 NwoCas +130 6 NwoCas +131 6 NwoCas +132 6 NwoCas +133 7 NwoCas +134 7 NwoCas +135 7 NwoCas +136 7 NwoCas +137 7 NwoCas +138 8 NwoCas +139 8 NwoCas +140 8 NwoCas +141 8 NwoCas +142 8 NwoCas +143 9 NwoCas +144 9 NwoCas +145 9 NwoCas +146 9 NwoCas +147 10 NwoCas +148 10 NwoCas +149 10 NwoCas +150 10 NwoCas +151 11 NwoCas +152 11 NwoCas +153 11 NwoCas +154 12 NwoCas +155 12 NwoCas +156 12 NwoCas +157 13 NwoCas +158 13 NwoCas +159 14 NwoCas +160 14 NwoCas +161 14 NwoCas +162 15 NwoCas +163 15 NwoCas +164 16 NwoCas +165 16 NwoCas +166 16 NwoCas +167 17 NwoCas +168 17 NwoCas +169 18 NwoCas +170 18 NwoCas +171 19 NwoCas +172 19 NwoCas +173 20 NwoCas +174 20 NwoCas +175 21 NwoCas +176 22 NwoCas +177 22 NwoCas +178 23 NwoCas +179 24 NwoCas +180 24 NwoCas +181 25 NwoCas +182 26 NwoCas +183 26 NwoCas +184 27 NwoCas +185 28 NwoCas +186 29 NwoCas +187 30 NwoCas +188 30 NwoCas +189 31 NwoCas +190 32 NwoCas +191 32 NwoCas +192 33 NwoCas +193 34 NwoCas +194 35 NwoCas +195 36 NwoCas +196 38 NwoCas +197 39 NwoCas +198 40 NwoCas +199 41 NwoCas +200 42 NwoCas +201 44 NwoCas +202 45 NwoCas +203 46 NwoCas +204 48 NwoCas +205 49 NwoCas +206 50 NwoCas +207 52 NwoCas +208 53 NwoCas +209 55 NwoCas +210 56 NwoCas +211 58 NwoCas +212 60 NwoCas +213 62 NwoCas +214 64 NwoCas +215 64 NwoCas +216 66 NwoCas +217 68 NwoCas +218 70 NwoCas +219 72 NwoCas +220 74 NwoCas +221 76 NwoCas +222 79 NwoCas +223 81 NwoCas +224 83 NwoCas +225 86 NwoCas +226 89 NwoCas +227 91 NwoCas +228 94 NwoCas +229 96 NwoCas +230 99 NwoCas +231 102 NwoCas +232 105 NwoCas +233 108 NwoCas +234 112 NwoCas +235 115 NwoCas +236 118 NwoCas +237 122 NwoCas +238 126 NwoCas +239 128 NwoCas +240 130 NwoCas +241 134 NwoCas +242 138 NwoCas +243 142 NwoCas +244 146 NwoCas +245 151 NwoCas +246 156 NwoCas +247 160 NwoCas +248 165 NwoCas +249 170 NwoCas +250 175 NwoCas +251 180 NwoCas +252 186 NwoCas +253 192 NwoCas +254 196 NwoCas +255 202 NwoCas +256 208 NwoCas +257 214 NwoCas +258 221 NwoCas +259 226 NwoCas +260 233 NwoCas +261 240 NwoCas +262 248 NwoCas +263 255 NwoCas +264 256 NwoCas +265 264 NwoCas +266 272 NwoCas +267 280 NwoCas +268 288 NwoCas +269 297 NwoCas +270 306 NwoCas +271 316 NwoCas +272 324 NwoCas +273 334 NwoCas +274 344 NwoCas +275 354 NwoCas +276 365 NwoCas +277 376 NwoCas +278 384 NwoCas +279 396 NwoCas +280 408 NwoCas +281 419 NwoCas +282 432 NwoCas +283 445 NwoCas +284 457 NwoCas +285 471 NwoCas +286 484 NwoCas +287 499 NwoCas +288 512 NwoCas +289 515 NwoCas +290 532 NwoCas +291 547 NwoCas +292 564 NwoCas +293 580 NwoCas +294 598 NwoCas +295 616 NwoCas +296 634 NwoCas +297 650 NwoCas +298 670 NwoCas +299 689 NwoCas +300 708 NwoCas +301 729 NwoCas +302 751 NwoCas +303 768 NwoCas +304 789 NwoCas +305 812 NwoCas +306 834 NwoCas +307 860 NwoCas +308 884 NwoCas +309 907 NwoCas +310 933 NwoCas +311 960 NwoCas +312 987 NwoCas +313 1015 NwoCas +314 1024 NwoCas +315 1052 NwoCas +316 1083 NwoCas +317 1114 NwoCas +318 1146 NwoCas +319 1177 NwoCas +320 1211 NwoCas +321 1245 NwoCas +322 1280 NwoCas +323 1311 NwoCas +324 1347 NwoCas +325 1386 NwoCas +326 1422 NwoCas +327 1462 NwoCas +328 1503 NwoCas +329 1536 NwoCas +330 1574 NwoCas +331 1618 NwoCas +332 1664 NwoCas +333 1707 NwoCas +334 1753 NwoCas +335 1794 NwoCas +336 1844 NwoCas +337 1894 NwoCas +338 1943 NwoCas +339 1994 NwoCas +340 2047 NwoCas +341 2068 NwoCas +342 2125 NwoCas +343 2180 NwoCas +344 2240 NwoCas +345 2300 NwoCas +346 2357 NwoCas +347 2420 NwoCas +348 2482 NwoCas +349 2546 NwoCas +350 2602 NwoCas +351 2671 NwoCas +352 2739 NwoCas +353 2809 NwoCas +354 2876 NwoCas +355 2946 NwoCas +356 3022 NwoCas +357 3075 NwoCas +358 3156 NwoCas +359 3234 NwoCas +360 3316 NwoCas +361 3393 NwoCas +362 3476 NwoCas +363 3562 NwoCas +364 3639 NwoCas +365 3726 NwoCas +366 3817 NwoCas +367 3904 NwoCas +368 3996 NwoCas +369 4091 NwoCas +370 4137 NwoCas +371 4238 NwoCas +372 4342 NwoCas +373 4442 NwoCas +374 4545 NwoCas +375 4644 NwoCas +376 4754 NwoCas +377 4864 NwoCas +378 4975 NwoCas +379 5087 NwoCas +380 5184 NwoCas +381 5305 NwoCas +382 5422 NwoCas +383 5544 NwoCas +384 5656 NwoCas +385 5784 NwoCas +386 5907 NwoCas +387 6036 NwoCas +388 6144 NwoCas +389 6268 NwoCas +390 6400 NwoCas +391 21 NCas +392 21 NCas +393 21 NCas +394 21 NCas +395 22 NCas +396 22 NCas +397 22 NCas +398 23 NCas +399 23 NCas +400 23 NCas +401 24 NCas +402 24 NCas +403 24 NCas +404 24 NCas +405 25 NCas +406 25 NCas +407 25 NCas +408 26 NCas +409 26 NCas +410 26 NCas +411 27 NCas +412 27 NCas +413 28 NCas +414 28 NCas +415 28 NCas +416 29 NCas +417 29 NCas +418 29 NCas +419 30 NCas +420 30 NCas +421 31 NCas +422 31 NCas +423 31 NCas +424 32 NCas +425 32 NCas +426 32 NCas +427 32 NCas +428 33 NCas +429 33 NCas +430 33 NCas +431 34 NCas +432 34 NCas +433 35 NCas +434 35 NCas +435 36 NCas +436 36 NCas +437 37 NCas +438 37 NCas +439 38 NCas +440 38 NCas +441 39 NCas +442 40 NCas +443 40 NCas +444 40 NCas +445 41 NCas +446 42 NCas +447 42 NCas +448 43 NCas +449 43 NCas +450 44 NCas +451 44 NCas +452 45 NCas +453 46 NCas +454 46 NCas +455 47 NCas +456 48 NCas +457 48 NCas +458 49 NCas +459 49 NCas +460 50 NCas +461 51 NCas +462 51 NCas +463 52 NCas +464 53 NCas +465 53 NCas +466 54 NCas +467 55 NCas +468 56 NCas +469 56 NCas +470 57 NCas +471 58 NCas +472 59 NCas +473 60 NCas +474 60 NCas +475 61 NCas +476 62 NCas +477 63 NCas +478 64 NCas +479 64 NCas +480 64 NCas +481 64 NCas +482 65 NCas +483 66 NCas +484 67 NCas +485 68 NCas +486 69 NCas +487 70 NCas +488 71 NCas +489 72 NCas +490 73 NCas +491 74 NCas +492 75 NCas +493 76 NCas +494 77 NCas +495 78 NCas +496 79 NCas +497 80 NCas +498 81 NCas +499 82 NCas +500 84 NCas +501 85 NCas +502 86 NCas +503 87 NCas +504 88 NCas +505 89 NCas +506 91 NCas +507 92 NCas +508 93 NCas +509 95 NCas +510 96 NCas +511 96 NCas +512 98 NCas +513 99 NCas +514 100 NCas +515 102 NCas +516 103 NCas +517 105 NCas +518 106 NCas +519 108 NCas +520 109 NCas +521 111 NCas +522 112 NCas +523 113 NCas +524 115 NCas +525 117 NCas +526 118 NCas +527 120 NCas +528 121 NCas +529 123 NCas +530 125 NCas +531 127 NCas +532 128 NCas +533 128 NCas +534 128 NCas +535 130 NCas +536 132 NCas +537 133 NCas +538 135 NCas +539 137 NCas +540 139 NCas +541 141 NCas +542 143 NCas +543 145 NCas +544 147 NCas +545 149 NCas +546 151 NCas +547 153 NCas +548 156 NCas +549 158 NCas +550 160 NCas +551 161 NCas +552 164 NCas +553 166 NCas +554 168 NCas +555 171 NCas +556 173 NCas +557 176 NCas +558 178 NCas +559 180 NCas +560 183 NCas +561 185 NCas +562 188 NCas +563 191 NCas +564 192 NCas +565 194 NCas +566 197 NCas +567 200 NCas +568 202 NCas +569 205 NCas +570 208 NCas +571 211 NCas +572 214 NCas +573 217 NCas +574 220 NCas +575 223 NCas +576 225 NCas +577 228 NCas +578 232 NCas +579 235 NCas +580 238 NCas +581 241 NCas +582 244 NCas +583 248 NCas +584 251 NCas +585 255 NCas +586 256 NCas +587 256 NCas +588 258 NCas +589 262 NCas +590 265 NCas +591 269 NCas +592 273 NCas +593 277 NCas +594 281 NCas +595 285 NCas +596 288 NCas +597 292 NCas +598 296 NCas +599 301 NCas +600 305 NCas +601 309 NCas +602 313 NCas +603 318 NCas +604 320 NCas +605 325 NCas +606 330 NCas +607 334 NCas +608 339 NCas +609 344 NCas +610 348 NCas +611 352 NCas +612 358 NCas +613 363 NCas +614 368 NCas +615 373 NCas +616 378 NCas +617 383 NCas +618 384 NCas +619 390 NCas +620 396 NCas +621 401 NCas +622 407 NCas +623 412 NCas +624 417 NCas +625 423 NCas +626 429 NCas +627 435 NCas +628 441 NCas +629 447 NCas +630 451 NCas +631 458 NCas +632 464 NCas +633 470 NCas +634 477 NCas +635 483 NCas +636 489 NCas +637 496 NCas +638 503 NCas +639 510 NCas +640 512 NCas +641 512 NCas +642 517 NCas +643 525 NCas +644 532 NCas +645 540 NCas +646 547 NCas +647 554 NCas +648 562 NCas +649 570 NCas +650 576 NCas +651 584 NCas +652 592 NCas +653 601 NCas +654 608 NCas +655 617 NCas +656 625 NCas +657 634 NCas +658 640 NCas +659 648 NCas +660 657 NCas +661 667 NCas +662 675 NCas +663 685 NCas +664 694 NCas +665 703 NCas +666 711 NCas +667 721 NCas +668 731 NCas +669 740 NCas +670 750 NCas +671 760 NCas +672 768 NCas +673 774 NCas +674 784 NCas +675 796 NCas +676 806 NCas +677 817 NCas +678 828 NCas +679 838 NCas +680 849 NCas +681 861 NCas +682 872 NCas +683 883 NCas +684 895 NCas +685 904 NCas +686 916 NCas +687 928 NCas +688 940 NCas +689 952 NCas +690 964 NCas +691 976 NCas +692 990 NCas +693 1002 NCas +694 1015 NCas +695 1024 NCas +696 1024 NCas +697 1034 NCas +698 1048 NCas +699 1063 NCas +700 1077 NCas +701 1090 NCas +702 1105 NCas +703 1120 NCas +704 1135 NCas +705 1150 NCas +706 1163 NCas +707 1178 NCas +708 1194 NCas +709 1210 NCas +710 1224 NCas +711 1240 NCas +712 1256 NCas +713 1273 NCas +714 1283 NCas +715 1301 NCas +716 1318 NCas +717 1335 NCas +718 1352 NCas +719 1369 NCas +720 1387 NCas +721 1405 NCas +722 1420 NCas +723 1439 NCas +724 1456 NCas +725 1474 NCas +726 1494 NCas +727 1512 NCas +728 1531 NCas +729 1538 NCas +730 1559 NCas +731 1579 NCas +732 1599 NCas +733 1619 NCas +734 1640 NCas +735 1660 NCas +736 1679 NCas +737 1700 NCas +738 1722 NCas +739 1743 NCas +740 1764 NCas +741 1786 NCas +742 1802 NCas +743 1824 NCas +744 1848 NCas +745 1871 NCas +746 1894 NCas +747 1916 NCas +748 1938 NCas +749 1962 NCas +750 1984 NCas +751 2010 NCas +752 2032 NCas +753 2048 NCas +754 2052 NCas +755 2080 NCas +756 2107 NCas +757 2134 NCas +758 2160 NCas +759 2184 NCas +760 2212 NCas +761 2240 NCas +762 2268 NCas +763 2295 NCas +764 2318 NCas +765 2348 NCas +766 2376 NCas +767 2406 NCas +768 2432 NCas +769 2462 NCas +770 2492 NCas +771 2520 NCas +772 2551 NCas +773 2568 NCas +774 2604 NCas +775 2636 NCas +776 2668 NCas +777 2696 NCas +778 2732 NCas +779 2760 NCas +780 2796 NCas +781 2816 NCas +782 2856 NCas +783 2888 NCas +784 2924 NCas +785 2952 NCas +786 2992 NCas +787 3024 NCas +788 3056 NCas +789 3072 NCas +790 3104 NCas +791 3148 NCas +792 3184 NCas +793 3224 NCas +794 3260 NCas +795 3296 NCas +796 3328 NCas +797 3372 NCas +798 3408 NCas +799 3448 NCas +800 3488 NCas +801 3520 NCas +802 3564 NCas +803 3584 NCas +804 3632 NCas +805 3680 NCas +806 3712 NCas +807 3760 NCas +808 3800 NCas +809 3838 NCas +810 3872 NCas +811 3920 NCas +812 3964 NCas +813 4000 NCas +814 4048 NCas +815 4080 NCas +816 4096 NCas +817 4128 NCas +818 4192 NCas +819 4224 NCas +820 4288 NCas +821 4336 NCas +822 4384 NCas +823 4448 NCas +824 4480 NCas +825 4540 NCas +826 4576 NCas +827 4608 NCas +828 4672 NCas +829 4736 NCas +830 4800 NCas +831 4832 NCas +832 4864 NCas +833 4960 NCas +834 4992 NCas +835 5056 NCas +836 5088 NCas +837 5120 NCas +838 5184 NCas +839 5248 NCas +840 5312 NCas +841 5374 NCas +842 5440 NCas +843 5504 NCas +844 5568 NCas +845 5600 NCas +846 5632 NCas +847 5696 NCas +848 5760 NCas +849 5824 NCas +850 5888 NCas +851 5952 NCas +852 6016 NCas +853 6080 NCas +854 6112 NCas +855 6145 NCas +856 6144 NCas +857 6272 NCas +858 6368 NCas +859 6400 NCas +860 6528 NCas +861 6592 NCas +862 6640 NCas +863 6656 NCas +864 6784 NCas +865 6848 NCas +866 6912 NCas +867 6976 NCas +868 7040 NCas +869 7104 NCas +870 7160 NCas +871 7168 NCas +872 1295 PCas +873 1281 PCas +874 1275 PCas +875 1263 PCas +876 1250 PCas +877 1238 PCas +878 1225 PCas +879 1214 PCas +880 1201 PCas +881 1189 PCas +882 1177 PCas +883 1165 PCas +884 1152 PCas +885 1143 PCas +886 1132 PCas +887 1120 PCas +888 1109 PCas +889 1097 PCas +890 1087 PCas +891 1075 PCas +892 1063 PCas +893 1053 PCas +894 1041 PCas +895 1030 PCas +896 1023 PCas +897 1023 PCas +898 1019 PCas +899 1008 PCas +900 998 PCas +901 988 PCas +902 978 PCas +903 967 PCas +904 959 PCas +905 949 PCas +906 939 PCas +907 928 PCas +908 919 PCas +909 909 PCas +910 899 PCas +911 893 PCas +912 883 PCas +913 874 PCas +914 864 PCas +915 855 PCas +916 846 PCas +917 837 PCas +918 829 PCas +919 820 PCas +920 811 PCas +921 802 PCas +922 793 PCas +923 784 PCas +924 775 PCas +925 767 PCas +926 765 PCas +927 757 PCas +928 749 PCas +929 740 PCas +930 733 PCas +931 724 PCas +932 716 PCas +933 708 PCas +934 702 PCas +935 694 PCas +936 686 PCas +937 678 PCas +938 671 PCas +939 663 PCas +940 655 PCas +941 648 PCas +942 640 PCas +943 636 PCas +944 629 PCas +945 622 PCas +946 614 PCas +947 607 PCas +948 601 PCas +949 593 PCas +950 587 PCas +951 579 PCas +952 574 PCas +953 567 PCas +954 561 PCas +955 554 PCas +956 547 PCas +957 541 PCas +958 535 PCas +959 528 PCas +960 522 PCas +961 515 PCas +962 511 PCas +963 511 PCas +964 511 PCas +965 504 PCas +966 499 PCas +967 493 PCas +968 487 PCas +969 481 PCas +970 476 PCas +971 470 PCas +972 465 PCas +973 459 PCas +974 454 PCas +975 448 PCas +976 445 PCas +977 439 PCas +978 434 PCas +979 429 PCas +980 423 PCas +981 418 PCas +982 414 PCas +983 409 PCas +984 404 PCas +985 399 PCas +986 394 PCas +987 389 PCas +988 384 PCas +989 383 PCas +990 378 PCas +991 374 PCas +992 369 PCas +993 365 PCas +994 360 PCas +995 356 PCas +996 351 PCas +997 347 PCas +998 343 PCas +999 339 PCas +1000 335 PCas +1001 331 PCas +1002 326 PCas +1003 322 PCas +1004 319 PCas +1005 316 PCas +1006 312 PCas +1007 308 PCas +1008 304 PCas +1009 300 PCas +1010 296 PCas +1011 292 PCas +1012 289 PCas +1013 286 PCas +1014 282 PCas +1015 278 PCas +1016 275 PCas +1017 271 PCas +1018 268 PCas +1019 264 PCas +1020 261 PCas +1021 257 PCas +1022 255 PCas +1023 255 PCas +1024 255 PCas +1025 252 PCas +1026 248 PCas +1027 245 PCas +1028 242 PCas +1029 239 PCas +1030 236 PCas +1031 233 PCas +1032 230 PCas +1033 227 PCas +1034 224 PCas +1035 222 PCas +1036 219 PCas +1037 216 PCas +1038 214 PCas +1039 211 PCas +1040 208 PCas +1041 206 PCas +1042 203 PCas +1043 200 PCas +1044 198 PCas +1045 195 PCas +1046 192 PCas +1047 191 PCas +1048 189 PCas +1049 187 PCas +1050 184 PCas +1051 182 PCas +1052 179 PCas +1053 177 PCas +1054 175 PCas +1055 173 PCas +1056 171 PCas +1057 168 PCas +1058 166 PCas +1059 164 PCas +1060 162 PCas +1061 159 PCas +1062 158 PCas +1063 156 PCas +1064 154 PCas +1065 152 PCas +1066 150 PCas +1067 148 PCas +1068 146 PCas +1069 144 PCas +1070 142 PCas +1071 140 PCas +1072 138 PCas +1073 136 PCas +1074 135 PCas +1075 133 PCas +1076 131 PCas +1077 129 PCas +1078 127 PCas +1079 127 PCas +1080 127 PCas +1081 126 PCas +1082 125 PCas +1083 123 PCas +1084 121 PCas +1085 120 PCas +1086 118 PCas +1087 117 PCas +1088 115 PCas +1089 113 PCas +1090 112 PCas +1091 111 PCas +1092 109 PCas +1093 108 PCas +1094 106 PCas +1095 105 PCas +1096 103 PCas +1097 102 PCas +1098 101 PCas +1099 99 PCas +1100 98 PCas +1101 97 PCas +1102 95 PCas +1103 95 PCas +1104 94 PCas +1105 92 PCas +1106 91 PCas +1107 90 PCas +1108 89 PCas +1109 87 PCas +1110 86 PCas +1111 85 PCas +1112 84 PCas +1113 83 PCas +1114 82 PCas +1115 81 PCas +1116 79 PCas +1117 79 PCas +1118 78 PCas +1119 77 PCas +1120 76 PCas +1121 75 PCas +1122 74 PCas +1123 72 PCas +1124 71 PCas +1125 71 PCas +1126 70 PCas +1127 69 PCas +1128 68 PCas +1129 67 PCas +1130 66 PCas +1131 65 PCas +1132 64 PCas +1133 63 PCas +1134 63 PCas +1135 63 PCas +1136 63 PCas +1137 62 PCas +1138 61 PCas +1139 60 PCas +1140 59 PCas +1141 58 PCas +1142 58 PCas +1143 57 PCas +1144 56 PCas +1145 55 PCas +1146 55 PCas +1147 54 PCas +1148 53 PCas +1149 52 PCas +1150 52 PCas +1151 51 PCas +1152 50 PCas +1153 50 PCas +1154 49 PCas +1155 48 PCas +1156 48 PCas +1157 47 PCas +1158 47 PCas +1159 46 PCas +1160 45 PCas +1161 45 PCas +1162 44 PCas +1163 44 PCas +1164 43 PCas +1165 42 PCas +1166 42 PCas +1167 41 PCas +1168 41 PCas +1169 40 PCas +1170 39 PCas +1171 39 PCas +1172 39 PCas +1173 38 PCas +1174 38 PCas +1175 37 PCas +1176 36 PCas +1177 36 PCas +1178 35 PCas +1179 35 PCas +1180 35 PCas +1181 34 PCas +1182 34 PCas +1183 33 PCas +1184 33 PCas +1185 32 PCas +1186 32 PCas +1187 31 PCas +1188 31 PCas +1189 31 PCas +1190 31 PCas +1191 31 PCas +1192 30 PCas +1193 30 PCas +1194 29 PCas +1195 29 PCas +1196 28 PCas +1197 28 PCas +1198 28 PCas +1199 27 PCas +1200 27 PCas +1201 27 PCas +1202 26 PCas +1203 26 PCas +1204 25 PCas +1205 25 PCas +1206 25 PCas +1207 24 PCas +1208 24 PCas +1209 24 PCas +1210 23 PCas +1211 23 PCas +1212 23 PCas +1213 23 PCas +1214 22 PCas +1215 22 PCas +1216 22 PCas +1217 21 PCas +1218 21 PCas +1219 21 PCas +1220 21 PCas +1221 20 PCas +1222 20 PCas +1223 20 PCas +1224 19 PCas +1225 19 PCas +1226 19 PCas +1227 19 PCas +1228 18 PCas +1229 18 PCas +1230 18 PCas +1231 18 PCas +1232 17 PCas +1233 17 PCas +1234 17 PCas +1235 17 PCas +1236 16 PCas +1237 16 PCas +1238 16 PCas +1239 16 PCas +1240 15 PCas +1241 15 PCas +1242 15 PCas +1243 15 PCas +1244 15 PCas +1245 15 PCas +1246 15 PCas +1247 15 PCas +1248 14 PCas +1249 14 PCas +1250 14 PCas +1251 14 PCas +1252 14 PCas +1253 13 PCas +1254 13 PCas +1255 13 PCas +1256 13 PCas +1257 13 PCas +1258 12 PCas +1259 12 PCas +1260 12 PCas +1261 12 PCas +1262 12 PCas +1263 12 PCas +1264 8124 PwoCas +1265 8124 PwoCas +1266 8124 PwoCas +1267 8124 PwoCas +1268 8124 PwoCas +1269 8124 PwoCas +1270 8124 PwoCas +1271 8124 PwoCas +1272 8124 PwoCas +1273 8063 PwoCas +1274 7967 PwoCas +1275 7878 PwoCas +1276 7785 PwoCas +1277 7685 PwoCas +1278 7606 PwoCas +1279 7514 PwoCas +1280 7422 PwoCas +1281 7331 PwoCas +1282 7237 PwoCas +1283 7166 PwoCas +1284 7079 PwoCas +1285 6990 PwoCas +1286 6905 PwoCas +1287 6815 PwoCas +1288 6727 PwoCas +1289 6649 PwoCas +1290 6563 PwoCas +1291 6478 PwoCas +1292 6395 PwoCas +1293 6310 PwoCas +1294 6225 PwoCas +1295 6143 PwoCas +1296 6094 PwoCas +1297 6015 PwoCas +1298 5934 PwoCas +1299 5858 PwoCas +1300 5778 PwoCas +1301 5699 PwoCas +1302 5630 PwoCas +1303 5553 PwoCas +1304 5477 PwoCas +1305 5399 PwoCas +1306 5327 PwoCas +1307 5247 PwoCas +1308 5175 PwoCas +1309 5119 PwoCas +1310 5047 PwoCas +1311 4975 PwoCas +1312 4902 PwoCas +1313 4835 PwoCas +1314 4763 PwoCas +1315 4693 PwoCas +1316 4621 PwoCas +1317 4563 PwoCas +1318 4493 PwoCas +1319 4427 PwoCas +1320 4357 PwoCas +1321 4295 PwoCas +1322 4227 PwoCas +1323 4161 PwoCas +1324 4095 PwoCas +1325 4084 PwoCas +1326 4022 PwoCas +1327 3962 PwoCas +1328 3900 PwoCas +1329 3839 PwoCas +1330 3783 PwoCas +1331 3722 PwoCas +1332 3664 PwoCas +1333 3605 PwoCas +1334 3558 PwoCas +1335 3501 PwoCas +1336 3445 PwoCas +1337 3389 PwoCas +1338 3331 PwoCas +1339 3281 PwoCas +1340 3226 PwoCas +1341 3172 PwoCas +1342 3118 PwoCas +1343 3071 PwoCas +1344 3034 PwoCas +1345 2982 PwoCas +1346 2933 PwoCas +1347 2881 PwoCas +1348 2831 PwoCas +1349 2787 PwoCas +1350 2738 PwoCas +1351 2688 PwoCas +1352 2642 PwoCas +1353 2594 PwoCas +1354 2558 PwoCas +1355 2511 PwoCas +1356 2466 PwoCas +1357 2423 PwoCas +1358 2378 PwoCas +1359 2334 PwoCas +1360 2295 PwoCas +1361 2251 PwoCas +1362 2208 PwoCas +1363 2168 PwoCas +1364 2126 PwoCas +1365 2084 PwoCas +1366 2047 PwoCas +1367 2038 PwoCas +1368 1999 PwoCas +1369 1961 PwoCas +1370 1922 PwoCas +1371 1887 PwoCas +1372 1851 PwoCas +1373 1814 PwoCas +1374 1784 PwoCas +1375 1748 PwoCas +1376 1713 PwoCas +1377 1678 PwoCas +1378 1646 PwoCas +1379 1612 PwoCas +1380 1579 PwoCas +1381 1546 PwoCas +1382 1526 PwoCas +1383 1495 PwoCas +1384 1464 PwoCas +1385 1433 PwoCas +1386 1405 PwoCas +1387 1375 PwoCas +1388 1345 PwoCas +1389 1316 PwoCas +1390 1287 PwoCas +1391 1265 PwoCas +1392 1238 PwoCas +1393 1211 PwoCas +1394 1183 PwoCas +1395 1157 PwoCas +1396 1133 PwoCas +1397 1108 PwoCas +1398 1083 PwoCas +1399 1057 PwoCas +1400 1033 PwoCas +1401 1023 PwoCas +1402 1008 PwoCas +1403 985 PwoCas +1404 962 PwoCas +1405 941 PwoCas +1406 919 PwoCas +1407 897 PwoCas +1408 879 PwoCas +1409 859 PwoCas +1410 838 PwoCas +1411 819 PwoCas +1412 799 PwoCas +1413 780 PwoCas +1414 767 PwoCas +1415 749 PwoCas +1416 731 PwoCas +1417 713 PwoCas +1418 697 PwoCas +1419 679 PwoCas +1420 663 PwoCas +1421 646 PwoCas +1422 633 PwoCas +1423 617 PwoCas +1424 601 PwoCas +1425 586 PwoCas +1426 572 PwoCas +1427 557 PwoCas +1428 543 PwoCas +1429 528 PwoCas +1430 514 PwoCas +1431 511 PwoCas +1432 501 PwoCas +1433 488 PwoCas +1434 476 PwoCas +1435 463 PwoCas +1436 451 PwoCas +1437 441 PwoCas +1438 429 PwoCas +1439 418 PwoCas +1440 407 PwoCas +1441 396 PwoCas +1442 385 PwoCas +1443 378 PwoCas +1444 368 PwoCas +1445 358 PwoCas +1446 349 PwoCas +1447 339 PwoCas +1448 330 PwoCas +1449 321 PwoCas +1450 314 PwoCas +1451 305 PwoCas +1452 296 PwoCas +1453 288 PwoCas +1454 281 PwoCas +1455 272 PwoCas +1456 265 PwoCas +1457 257 PwoCas +1458 255 PwoCas +1459 250 PwoCas +1460 243 PwoCas +1461 237 PwoCas +1462 230 PwoCas +1463 223 PwoCas +1464 218 PwoCas +1465 211 PwoCas +1466 206 PwoCas +1467 200 PwoCas +1468 194 PwoCas +1469 190 PwoCas +1470 185 PwoCas +1471 179 PwoCas +1472 174 PwoCas +1473 169 PwoCas +1474 164 PwoCas +1475 159 PwoCas +1476 156 PwoCas +1477 151 PwoCas +1478 147 PwoCas +1479 143 PwoCas +1480 138 PwoCas +1481 134 PwoCas +1482 130 PwoCas +1483 127 PwoCas +1484 126 PwoCas +1485 123 PwoCas +1486 119 PwoCas +1487 116 PwoCas +1488 112 PwoCas +1489 109 PwoCas +1490 106 PwoCas +1491 103 PwoCas +1492 100 PwoCas +1493 97 PwoCas +1494 95 PwoCas +1495 92 PwoCas +1496 89 PwoCas +1497 87 PwoCas +1498 84 PwoCas +1499 82 PwoCas +1500 79 PwoCas +1501 77 PwoCas +1502 75 PwoCas +1503 72 PwoCas +1504 70 PwoCas +1505 68 PwoCas +1506 66 PwoCas +1507 64 PwoCas +1508 63 PwoCas +1509 62 PwoCas +1510 60 PwoCas +1511 59 PwoCas +1512 57 PwoCas +1513 55 PwoCas +1514 53 PwoCas +1515 52 PwoCas +1516 50 PwoCas +1517 49 PwoCas +1518 47 PwoCas +1519 46 PwoCas +1520 45 PwoCas +1521 43 PwoCas +1522 42 PwoCas +1523 41 PwoCas +1524 40 PwoCas +1525 39 PwoCas +1526 37 PwoCas +1527 36 PwoCas +1528 35 PwoCas +1529 34 PwoCas +1530 33 PwoCas +1531 32 PwoCas +1532 31 PwoCas +1533 31 PwoCas +1534 30 PwoCas +1535 29 PwoCas +1536 28 PwoCas +1537 27 PwoCas +1538 27 PwoCas +1539 26 PwoCas +1540 25 PwoCas +1541 24 PwoCas +1542 23 PwoCas +1543 23 PwoCas +1544 22 PwoCas +1545 22 PwoCas +1546 21 PwoCas +1547 20 PwoCas +1548 20 PwoCas +1549 19 PwoCas +1550 18 PwoCas +1551 18 PwoCas +1552 17 PwoCas +1553 17 PwoCas +1554 16 PwoCas +1555 16 PwoCas +1556 15 PwoCas +1557 15 PwoCas +1558 15 PwoCas +1559 14 PwoCas +1560 14 PwoCas +1561 13 PwoCas +1562 13 PwoCas +1563 13 PwoCas +1564 12 PwoCas +1565 12 PwoCas +1566 11 PwoCas +1567 11 PwoCas +1568 11 PwoCas +1569 11 PwoCas +1570 10 PwoCas +1571 10 PwoCas +1572 10 PwoCas +1573 9 PwoCas +1574 9 PwoCas +1575 9 PwoCas +1576 8 PwoCas +1577 8 PwoCas +1578 8 PwoCas +1579 8 PwoCas +1580 7 PwoCas +1581 7 PwoCas +1582 7 PwoCas +1583 7 PwoCas +1584 7 PwoCas +1585 6 PwoCas +1586 6 PwoCas +1587 6 PwoCas +1588 6 PwoCas +1589 6 PwoCas +1590 5 PwoCas +1591 5 PwoCas +1592 5 PwoCas +1593 5 PwoCas +1594 5 PwoCas +1595 5 PwoCas +1596 5 PwoCas +1597 4 PwoCas +1598 4 PwoCas +1599 4 PwoCas +1600 4 PwoCas +1601 4 PwoCas +1602 4 PwoCas +1603 4 PwoCas +1604 3 PwoCas +1605 3 PwoCas +1606 3 PwoCas +1607 3 PwoCas +1608 3 PwoCas +1609 3 PwoCas +1610 3 PwoCas +1611 3 PwoCas +1612 3 PwoCas +1613 3 PwoCas +1614 2 PwoCas +1615 2 PwoCas +1616 2 PwoCas +1617 2 PwoCas +1618 2 PwoCas +1619 2 PwoCas +1620 2 PwoCas +1621 2 PwoCas +1622 2 PwoCas +1623 2 PwoCas +1624 2 PwoCas +1625 2 PwoCas +1626 2 PwoCas +1627 2 PwoCas +1628 1 PwoCas +1629 1 PwoCas +1630 1 PwoCas +1631 1 PwoCas +1632 1 PwoCas +1633 1 PwoCas +1634 1 PwoCas +1635 1 PwoCas +1636 1 PwoCas +1637 1 PwoCas +1638 1 PwoCas +1639 1 PwoCas +1640 1 PwoCas +1641 1 PwoCas +1642 1 PwoCas +1643 1 PwoCas +1644 1 PwoCas +1645 1 PwoCas +1646 1 PwoCas +1647 1 PwoCas +1648 1 PwoCas +1649 1 PwoCas +1650 1 PwoCas +1651 1 PwoCas +1652 0 PwoCas +1653 0 PwoCas +1654 0 PwoCas +1655 0 PwoCas +1656 0 PwoCas +1657 0 PwoCas +1658 0 PwoCas +1659 0 PwoCas +1660 0 PwoCas +1661 0 PwoCas +1662 0 PwoCas +1663 0 PwoCas +1664 0 PwoCas +1665 0 PwoCas +1666 0 PwoCas +1667 0 PwoCas +1668 0 PwoCas +1669 0 PwoCas +1670 0 PwoCas +1671 0 PwoCas +1672 0 PwoCas +1673 0 PwoCas +1674 0 PwoCas +1675 0 PwoCas +1676 0 PwoCas +1677 0 PwoCas +1678 0 PwoCas +1679 0 PwoCas +1680 0 PwoCas +1681 0 PwoCas +1682 0 PwoCas +1683 0 PwoCas +1684 0 PwoCas +1685 0 PwoCas +1686 0 PwoCas +1687 0 PwoCas +1688 0 PwoCas +1689 0 PwoCas +1690 0 PwoCas +1691 0 PwoCas +1692 0 PwoCas +1693 0 PwoCas +1694 0 PwoCas +1695 0 PwoCas +1696 0 PwoCas +1697 0 PwoCas +1698 0 PwoCas +1699 0 PwoCas +1700 0 PwoCas +1701 0 PwoCas +1702 0 PwoCas +1703 0 PwoCas +1704 0 PwoCas +1705 0 PwoCas +1706 0 PwoCas +1707 0 PwoCas +1708 0 PwoCas +1709 0 PwoCas +1710 0 PwoCas +1711 0 PwoCas +1712 0 PwoCas +1713 0 PwoCas +1714 0 PwoCas +1715 0 PwoCas +1716 0 PwoCas +1717 0 PwoCas +1718 0 PwoCas +1719 0 PwoCas +1720 0 PwoCas +1721 0 PwoCas +1722 0 PwoCas +1723 0 PwoCas +1724 0 PwoCas +1725 0 PwoCas +1726 0 PwoCas +1727 0 PwoCas +1728 0 PwoCas +1729 0 PwoCas +1730 0 PwoCas +1731 0 PwoCas +1732 0 PwoCas +1733 0 PwoCas +1734 0 PwoCas +1735 0 PwoCas +1736 0 PwoCas +1737 0 PwoCas +1738 0 PwoCas +1739 0 PwoCas +1740 0 PwoCas +1741 0 PwoCas +1742 0 PwoCas +1743 0 PwoCas +1744 0 PwoCas +1745 0 PwoCas +1746 0 PwoCas +1747 0 PwoCas +1748 0 PwoCas +1749 0 PwoCas +1750 0 PwoCas +1751 0 PwoCas +1752 0 PwoCas +1753 0 PwoCas +1754 0 PwoCas +1755 0 PwoCas +1756 0 PwoCas +1757 0 PwoCas +1758 0 PwoCas +1759 0 PwoCas +1760 0 PwoCas +1761 0 PwoCas +1762 0 PwoCas +1763 0 PwoCas +1764 0 PwoCas +1765 0 PwoCas +1766 0 PwoCas +1767 0 PwoCas +1768 0 PwoCas +1769 0 PwoCas +1770 0 PwoCas +1771 0 PwoCas +1772 0 PwoCas +1773 0 PwoCas +1774 0 PwoCas +1775 0 PwoCas +1776 0 PwoCas +1777 0 PwoCas +1778 0 PwoCas +1779 0 PwoCas +1780 0 PwoCas +1781 0 PwoCas +1782 0 PwoCas +1783 0 PwoCas +1784 0 PwoCas +1785 0 PwoCas +1786 0 PwoCas +1787 0 PwoCas +1788 0 PwoCas +1789 0 PwoCas +1790 0 PwoCas +1791 0 PwoCas +1792 0 PwoCas +1793 0 PwoCas +1794 0 PwoCas +1795 0 PwoCas +1796 0 PwoCas +1797 0 PwoCas +1798 0 PwoCas +1799 0 PwoCas +1800 0 PwoCas diff --git a/hal_psee_plugins/biasgen/gen3_idac_p_thick.calib b/hal_psee_plugins/biasgen/gen3_idac_p_thick.calib new file mode 100644 index 000000000..b4f7717a6 --- /dev/null +++ b/hal_psee_plugins/biasgen/gen3_idac_p_thick.calib @@ -0,0 +1,1801 @@ +0 0 NwoCas +1 0 NwoCas +2 0 NwoCas +3 0 NwoCas +4 0 NwoCas +5 0 NwoCas +6 0 NwoCas +7 0 NwoCas +8 0 NwoCas +9 0 NwoCas +10 0 NwoCas +11 0 NwoCas +12 0 NwoCas +13 0 NwoCas +14 0 NwoCas +15 0 NwoCas +16 0 NwoCas +17 0 NwoCas +18 0 NwoCas +19 0 NwoCas +20 0 NwoCas +21 0 NwoCas +22 0 NwoCas +23 0 NwoCas +24 0 NwoCas +25 0 NwoCas +26 0 NwoCas +27 0 NwoCas +28 0 NwoCas +29 0 NwoCas +30 0 NwoCas +31 0 NwoCas +32 0 NwoCas +33 0 NwoCas +34 0 NwoCas +35 0 NwoCas +36 0 NwoCas +37 0 NwoCas +38 0 NwoCas +39 0 NwoCas +40 0 NwoCas +41 0 NwoCas +42 0 NwoCas +43 0 NwoCas +44 0 NwoCas +45 0 NwoCas +46 0 NwoCas +47 0 NwoCas +48 0 NwoCas +49 0 NwoCas +50 0 NwoCas +51 0 NwoCas +52 0 NwoCas +53 0 NwoCas +54 0 NwoCas +55 0 NwoCas +56 0 NwoCas +57 0 NwoCas +58 0 NwoCas +59 0 NwoCas +60 0 NwoCas +61 0 NwoCas +62 0 NwoCas +63 0 NwoCas +64 0 NwoCas +65 0 NwoCas +66 0 NwoCas +67 0 NwoCas +68 0 NwoCas +69 0 NwoCas +70 0 NwoCas +71 0 NwoCas +72 0 NwoCas +73 0 NwoCas +74 0 NwoCas +75 0 NwoCas +76 0 NwoCas +77 0 NwoCas +78 0 NwoCas +79 0 NwoCas +80 0 NwoCas +81 0 NwoCas +82 0 NwoCas +83 0 NwoCas +84 0 NwoCas +85 0 NwoCas +86 0 NwoCas +87 0 NwoCas +88 0 NwoCas +89 0 NwoCas +90 0 NwoCas +91 0 NwoCas +92 0 NwoCas +93 0 NwoCas +94 0 NwoCas +95 0 NwoCas +96 0 NwoCas +97 0 NwoCas +98 0 NwoCas +99 0 NwoCas +100 0 NwoCas +101 0 NwoCas +102 0 NwoCas +103 0 NwoCas +104 0 NwoCas +105 0 NwoCas +106 0 NwoCas +107 0 NwoCas +108 0 NwoCas +109 0 NwoCas +110 0 NwoCas +111 0 NwoCas +112 0 NwoCas +113 0 NwoCas +114 0 NwoCas +115 0 NwoCas +116 0 NwoCas +117 0 NwoCas +118 0 NwoCas +119 0 NwoCas +120 0 NwoCas +121 0 NwoCas +122 0 NwoCas +123 0 NwoCas +124 0 NwoCas +125 0 NwoCas +126 0 NwoCas +127 0 NwoCas +128 0 NwoCas +129 0 NwoCas +130 0 NwoCas +131 0 NwoCas +132 0 NwoCas +133 0 NwoCas +134 0 NwoCas +135 0 NwoCas +136 0 NwoCas +137 0 NwoCas +138 0 NwoCas +139 0 NwoCas +140 0 NwoCas +141 0 NwoCas +142 0 NwoCas +143 0 NwoCas +144 0 NwoCas +145 0 NwoCas +146 0 NwoCas +147 0 NwoCas +148 0 NwoCas +149 0 NwoCas +150 0 NwoCas +151 0 NwoCas +152 0 NwoCas +153 0 NwoCas +154 0 NwoCas +155 0 NwoCas +156 0 NwoCas +157 0 NwoCas +158 0 NwoCas +159 0 NwoCas +160 0 NwoCas +161 0 NwoCas +162 0 NwoCas +163 0 NwoCas +164 0 NwoCas +165 0 NwoCas +166 0 NwoCas +167 0 NwoCas +168 0 NwoCas +169 0 NwoCas +170 0 NwoCas +171 0 NwoCas +172 0 NwoCas +173 0 NwoCas +174 0 NwoCas +175 0 NwoCas +176 0 NwoCas +177 0 NwoCas +178 0 NwoCas +179 0 NwoCas +180 0 NwoCas +181 0 NwoCas +182 0 NwoCas +183 0 NwoCas +184 0 NwoCas +185 0 NwoCas +186 0 NwoCas +187 0 NwoCas +188 0 NwoCas +189 0 NwoCas +190 0 NwoCas +191 0 NwoCas +192 0 NwoCas +193 0 NwoCas +194 0 NwoCas +195 0 NwoCas +196 0 NwoCas +197 0 NwoCas +198 0 NwoCas +199 0 NwoCas +200 0 NwoCas +201 0 NwoCas +202 0 NwoCas +203 0 NwoCas +204 0 NwoCas +205 0 NwoCas +206 0 NwoCas +207 0 NwoCas +208 0 NwoCas +209 0 NwoCas +210 0 NwoCas +211 0 NwoCas +212 0 NwoCas +213 0 NwoCas +214 0 NwoCas +215 0 NwoCas +216 0 NwoCas +217 0 NwoCas +218 0 NwoCas +219 0 NwoCas +220 0 NwoCas +221 0 NwoCas +222 0 NwoCas +223 0 NwoCas +224 0 NwoCas +225 0 NwoCas +226 0 NwoCas +227 0 NwoCas +228 0 NwoCas +229 0 NwoCas +230 0 NwoCas +231 0 NwoCas +232 0 NwoCas +233 0 NwoCas +234 0 NwoCas +235 0 NwoCas +236 0 NwoCas +237 0 NwoCas +238 0 NwoCas +239 0 NwoCas +240 0 NwoCas +241 0 NwoCas +242 0 NwoCas +243 0 NwoCas +244 0 NwoCas +245 0 NwoCas +246 0 NwoCas +247 0 NwoCas +248 0 NwoCas +249 0 NwoCas +250 0 NwoCas +251 0 NwoCas +252 0 NwoCas +253 0 NwoCas +254 0 NwoCas +255 0 NwoCas +256 0 NwoCas +257 0 NwoCas +258 0 NwoCas +259 0 NwoCas +260 0 NwoCas +261 0 NwoCas +262 0 NwoCas +263 0 NwoCas +264 0 NwoCas +265 0 NwoCas +266 0 NwoCas +267 1 NwoCas +268 1 NwoCas +269 1 NwoCas +270 1 NwoCas +271 1 NwoCas +272 1 NwoCas +273 1 NwoCas +274 1 NwoCas +275 1 NwoCas +276 1 NwoCas +277 1 NwoCas +278 1 NwoCas +279 1 NwoCas +280 1 NwoCas +281 1 NwoCas +282 1 NwoCas +283 1 NwoCas +284 1 NwoCas +285 1 NwoCas +286 1 NwoCas +287 1 NwoCas +288 1 NwoCas +289 1 NwoCas +290 1 NwoCas +291 1 NwoCas +292 1 NwoCas +293 1 NwoCas +294 1 NwoCas +295 1 NwoCas +296 1 NwoCas +297 1 NwoCas +298 1 NwoCas +299 1 NwoCas +300 1 NwoCas +301 1 NwoCas +302 1 NwoCas +303 1 NwoCas +304 1 NwoCas +305 1 NwoCas +306 1 NwoCas +307 1 NwoCas +308 1 NwoCas +309 1 NwoCas +310 1 NwoCas +311 1 NwoCas +312 1 NwoCas +313 1 NwoCas +314 2 NwoCas +315 2 NwoCas +316 2 NwoCas +317 2 NwoCas +318 2 NwoCas +319 2 NwoCas +320 2 NwoCas +321 2 NwoCas +322 2 NwoCas +323 2 NwoCas +324 2 NwoCas +325 2 NwoCas +326 2 NwoCas +327 2 NwoCas +328 2 NwoCas +329 2 NwoCas +330 2 NwoCas +331 2 NwoCas +332 2 NwoCas +333 2 NwoCas +334 2 NwoCas +335 2 NwoCas +336 2 NwoCas +337 2 NwoCas +338 3 NwoCas +339 3 NwoCas +340 3 NwoCas +341 3 NwoCas +342 3 NwoCas +343 3 NwoCas +344 3 NwoCas +345 3 NwoCas +346 3 NwoCas +347 3 NwoCas +348 3 NwoCas +349 3 NwoCas +350 3 NwoCas +351 3 NwoCas +352 3 NwoCas +353 4 NwoCas +354 4 NwoCas +355 4 NwoCas +356 4 NwoCas +357 4 NwoCas +358 4 NwoCas +359 4 NwoCas +360 4 NwoCas +361 4 NwoCas +362 4 NwoCas +363 4 NwoCas +364 5 NwoCas +365 5 NwoCas +366 5 NwoCas +367 5 NwoCas +368 5 NwoCas +369 5 NwoCas +370 5 NwoCas +371 5 NwoCas +372 6 NwoCas +373 6 NwoCas +374 6 NwoCas +375 6 NwoCas +376 6 NwoCas +377 6 NwoCas +378 6 NwoCas +379 7 NwoCas +380 7 NwoCas +381 7 NwoCas +382 7 NwoCas +383 7 NwoCas +384 8 NwoCas +385 8 NwoCas +386 8 NwoCas +387 8 NwoCas +388 8 NwoCas +389 8 NwoCas +390 9 NwoCas +391 9 NwoCas +392 9 NwoCas +393 9 NwoCas +394 10 NwoCas +395 10 NwoCas +396 10 NwoCas +397 10 NwoCas +398 11 NwoCas +399 11 NwoCas +400 11 NwoCas +401 11 NwoCas +402 12 NwoCas +403 12 NwoCas +404 12 NwoCas +405 13 NwoCas +406 13 NwoCas +407 13 NwoCas +408 14 NwoCas +409 14 NwoCas +410 14 NwoCas +411 15 NwoCas +412 15 NwoCas +413 16 NwoCas +414 16 NwoCas +415 16 NwoCas +416 16 NwoCas +417 17 NwoCas +418 17 NwoCas +419 18 NwoCas +420 18 NwoCas +421 19 NwoCas +422 19 NwoCas +423 20 NwoCas +424 20 NwoCas +425 21 NwoCas +426 22 NwoCas +427 22 NwoCas +428 23 NwoCas +429 23 NwoCas +430 24 NwoCas +431 25 NwoCas +432 25 NwoCas +433 26 NwoCas +434 27 NwoCas +435 27 NwoCas +436 28 NwoCas +437 29 NwoCas +438 30 NwoCas +439 31 NwoCas +440 31 NwoCas +441 32 NwoCas +442 32 NwoCas +443 33 NwoCas +444 34 NwoCas +445 35 NwoCas +446 36 NwoCas +447 37 NwoCas +448 38 NwoCas +449 39 NwoCas +450 40 NwoCas +451 41 NwoCas +452 42 NwoCas +453 43 NwoCas +454 45 NwoCas +455 46 NwoCas +456 47 NwoCas +457 48 NwoCas +458 49 NwoCas +459 51 NwoCas +460 52 NwoCas +461 54 NwoCas +462 55 NwoCas +463 56 NwoCas +464 58 NwoCas +465 60 NwoCas +466 61 NwoCas +467 63 NwoCas +468 64 NwoCas +469 64 NwoCas +470 66 NwoCas +471 68 NwoCas +472 70 NwoCas +473 72 NwoCas +474 74 NwoCas +475 76 NwoCas +476 78 NwoCas +477 80 NwoCas +478 82 NwoCas +479 84 NwoCas +480 87 NwoCas +481 89 NwoCas +482 92 NwoCas +483 94 NwoCas +484 96 NwoCas +485 99 NwoCas +486 101 NwoCas +487 104 NwoCas +488 107 NwoCas +489 110 NwoCas +490 113 NwoCas +491 116 NwoCas +492 119 NwoCas +493 122 NwoCas +494 126 NwoCas +495 128 NwoCas +496 128 NwoCas +497 131 NwoCas +498 135 NwoCas +499 139 NwoCas +500 143 NwoCas +501 146 NwoCas +502 150 NwoCas +503 154 NwoCas +504 159 NwoCas +505 162 NwoCas +506 167 NwoCas +507 171 NwoCas +508 176 NwoCas +509 180 NwoCas +510 185 NwoCas +511 7688 PCas +512 7608 PCas +513 7516 PCas +514 7423 PCas +515 7341 PCas +516 7255 PCas +517 7169 PCas +518 7114 PCas +519 7036 PCas +520 6956 PCas +521 6884 PCas +522 6807 PCas +523 6735 PCas +524 6660 PCas +525 6603 PCas +526 6532 PCas +527 6464 PCas +528 6399 PCas +529 6335 PCas +530 6271 PCas +531 6207 PCas +532 6143 PCas +533 6129 PCas +534 6067 PCas +535 6009 PCas +536 5949 PCas +537 5888 PCas +538 5837 PCas +539 5779 PCas +540 5725 PCas +541 5668 PCas +542 5627 PCas +543 5571 PCas +544 5517 PCas +545 5466 PCas +546 5412 PCas +547 5366 PCas +548 5312 PCas +549 5261 PCas +550 5213 PCas +551 5161 PCas +552 5119 PCas +553 5088 PCas +554 5039 PCas +555 4991 PCas +556 4943 PCas +557 4895 PCas +558 4854 PCas +559 4805 PCas +560 4758 PCas +561 4714 PCas +562 4668 PCas +563 4621 PCas +564 4590 PCas +565 4544 PCas +566 4499 PCas +567 4457 PCas +568 4414 PCas +569 4369 PCas +570 4332 PCas +571 4288 PCas +572 4246 PCas +573 4206 PCas +574 4162 PCas +575 4121 PCas +576 4095 PCas +577 4095 PCas +578 4074 PCas +579 4033 PCas +580 3993 PCas +581 3956 PCas +582 3916 PCas +583 3877 PCas +584 3839 PCas +585 3807 PCas +586 3768 PCas +587 3729 PCas +588 3695 PCas +589 3656 PCas +590 3620 PCas +591 3583 PCas +592 3561 PCas +593 3524 PCas +594 3489 PCas +595 3455 PCas +596 3421 PCas +597 3386 PCas +598 3351 PCas +599 3324 PCas +600 3289 PCas +601 3256 PCas +602 3222 PCas +603 3191 PCas +604 3158 PCas +605 3125 PCas +606 3092 PCas +607 3071 PCas +608 3056 PCas +609 3024 PCas +610 2994 PCas +611 2962 PCas +612 2934 PCas +613 2903 PCas +614 2873 PCas +615 2843 PCas +616 2815 PCas +617 2790 PCas +618 2760 PCas +619 2732 PCas +620 2703 PCas +621 2677 PCas +622 2649 PCas +623 2622 PCas +624 2592 PCas +625 2565 PCas +626 2553 PCas +627 2526 PCas +628 2498 PCas +629 2472 PCas +630 2446 PCas +631 2423 PCas +632 2396 PCas +633 2370 PCas +634 2345 PCas +635 2319 PCas +636 2303 PCas +637 2277 PCas +638 2252 PCas +639 2229 PCas +640 2204 PCas +641 2179 PCas +642 2159 PCas +643 2135 PCas +644 2111 PCas +645 2089 PCas +646 2066 PCas +647 2047 PCas +648 2047 PCas +649 2047 PCas +650 2026 PCas +651 2004 PCas +652 1983 PCas +653 1961 PCas +654 1940 PCas +655 1919 PCas +656 1901 PCas +657 1880 PCas +658 1859 PCas +659 1839 PCas +660 1820 PCas +661 1799 PCas +662 1787 PCas +663 1767 PCas +664 1748 PCas +665 1728 PCas +666 1710 PCas +667 1691 PCas +668 1672 PCas +669 1657 PCas +670 1638 PCas +671 1620 PCas +672 1602 PCas +673 1585 PCas +674 1567 PCas +675 1550 PCas +676 1535 PCas +677 1531 PCas +678 1514 PCas +679 1497 PCas +680 1480 PCas +681 1465 PCas +682 1448 PCas +683 1432 PCas +684 1415 PCas +685 1403 PCas +686 1387 PCas +687 1372 PCas +688 1356 PCas +689 1342 PCas +690 1326 PCas +691 1311 PCas +692 1296 PCas +693 1281 PCas +694 1275 PCas +695 1260 PCas +696 1246 PCas +697 1231 PCas +698 1217 PCas +699 1205 PCas +700 1191 PCas +701 1177 PCas +702 1164 PCas +703 1151 PCas +704 1141 PCas +705 1127 PCas +706 1115 PCas +707 1102 PCas +708 1088 PCas +709 1078 PCas +710 1065 PCas +711 1053 PCas +712 1040 PCas +713 1028 PCas +714 1023 PCas +715 1023 PCas +716 1023 PCas +717 1011 PCas +718 999 PCas +719 988 PCas +720 977 PCas +721 966 PCas +722 956 PCas +723 945 PCas +724 934 PCas +725 924 PCas +726 913 PCas +727 902 PCas +728 895 PCas +729 885 PCas +730 875 PCas +731 864 PCas +732 855 PCas +733 845 PCas +734 835 PCas +735 827 PCas +736 817 PCas +737 808 PCas +738 799 PCas +739 789 PCas +740 780 PCas +741 771 PCas +742 767 PCas +743 761 PCas +744 752 PCas +745 743 PCas +746 735 PCas +747 727 PCas +748 718 PCas +749 710 PCas +750 703 PCas +751 695 PCas +752 687 PCas +753 678 PCas +754 671 PCas +755 663 PCas +756 655 PCas +757 647 PCas +758 639 PCas +759 636 PCas +760 629 PCas +761 621 PCas +762 614 PCas +763 607 PCas +764 600 PCas +765 592 PCas +766 586 PCas +767 579 PCas +768 574 PCas +769 567 PCas +770 560 PCas +771 553 PCas +772 546 PCas +773 541 PCas +774 534 PCas +775 527 PCas +776 521 PCas +777 515 PCas +778 511 PCas +779 511 PCas +780 511 PCas +781 508 PCas +782 502 PCas +783 496 PCas +784 490 PCas +785 484 PCas +786 479 PCas +787 474 PCas +788 468 PCas +789 463 PCas +790 457 PCas +791 451 PCas +792 447 PCas +793 443 PCas +794 437 PCas +795 432 PCas +796 427 PCas +797 422 PCas +798 417 PCas +799 413 PCas +800 408 PCas +801 403 PCas +802 398 PCas +803 394 PCas +804 389 PCas +805 384 PCas +806 383 PCas +807 379 PCas +808 375 PCas +809 370 PCas +810 366 PCas +811 362 PCas +812 357 PCas +813 353 PCas +814 350 PCas +815 345 PCas +816 341 PCas +817 337 PCas +818 333 PCas +819 329 PCas +820 325 PCas +821 321 PCas +822 319 PCas +823 316 PCas +824 312 PCas +825 308 PCas +826 304 PCas +827 301 PCas +828 297 PCas +829 294 PCas +830 290 PCas +831 287 PCas +832 284 PCas +833 280 PCas +834 277 PCas +835 274 PCas +836 271 PCas +837 267 PCas +838 264 PCas +839 261 PCas +840 258 PCas +841 255 PCas +842 255 PCas +843 255 PCas +844 255 PCas +845 251 PCas +846 248 PCas +847 246 PCas +848 243 PCas +849 240 PCas +850 237 PCas +851 234 PCas +852 231 PCas +853 229 PCas +854 226 PCas +855 223 PCas +856 222 PCas +857 219 PCas +858 216 PCas +859 214 PCas +860 211 PCas +861 208 PCas +862 206 PCas +863 204 PCas +864 201 PCas +865 199 PCas +866 197 PCas +867 194 PCas +868 192 PCas +869 191 PCas +870 189 PCas +871 187 PCas +872 185 PCas +873 183 PCas +874 181 PCas +875 178 PCas +876 176 PCas +877 174 PCas +878 172 PCas +879 170 PCas +880 168 PCas +881 166 PCas +882 164 PCas +883 162 PCas +884 160 PCas +885 159 PCas +886 157 PCas +887 155 PCas +888 154 PCas +889 152 PCas +890 150 PCas +891 148 PCas +892 146 PCas +893 144 PCas +894 143 PCas +895 141 PCas +896 140 PCas +897 138 PCas +898 136 PCas +899 135 PCas +900 133 PCas +901 131 PCas +902 130 PCas +903 128 PCas +904 127 PCas +905 127 PCas +906 127 PCas +907 127 PCas +908 125 PCas +909 124 PCas +910 122 PCas +911 121 PCas +912 119 PCas +913 118 PCas +914 117 PCas +915 115 PCas +916 114 PCas +917 113 PCas +918 111 PCas +919 110 PCas +920 109 PCas +921 108 PCas +922 106 PCas +923 105 PCas +924 104 PCas +925 103 PCas +926 101 PCas +927 100 PCas +928 99 PCas +929 98 PCas +930 97 PCas +931 95 PCas +932 95 PCas +933 94 PCas +934 93 PCas +935 92 PCas +936 91 PCas +937 90 PCas +938 89 PCas +939 88 PCas +940 87 PCas +941 86 PCas +942 85 PCas +943 84 PCas +944 83 PCas +945 82 PCas +946 81 PCas +947 80 PCas +948 79 PCas +949 78 PCas +950 77 PCas +951 76 PCas +952 75 PCas +953 75 PCas +954 74 PCas +955 73 PCas +956 72 PCas +957 71 PCas +958 70 PCas +959 69 PCas +960 69 PCas +961 68 PCas +962 67 PCas +963 66 PCas +964 65 PCas +965 65 PCas +966 64 PCas +967 63 PCas +968 63 PCas +969 63 PCas +970 63 PCas +971 62 PCas +972 62 PCas +973 61 PCas +974 60 PCas +975 59 PCas +976 59 PCas +977 58 PCas +978 57 PCas +979 57 PCas +980 56 PCas +981 55 PCas +982 55 PCas +983 54 PCas +984 54 PCas +985 53 PCas +986 52 PCas +987 52 PCas +988 51 PCas +989 50 PCas +990 50 PCas +991 49 PCas +992 49 PCas +993 48 PCas +994 47 PCas +995 47 PCas +996 47 PCas +997 46 PCas +998 46 PCas +999 45 PCas +1000 45 PCas +1001 44 PCas +1002 44 PCas +1003 43 PCas +1004 43 PCas +1005 42 PCas +1006 42 PCas +1007 41 PCas +1008 41 PCas +1009 40 PCas +1010 40 PCas +1011 39 PCas +1012 39 PCas +1013 38 PCas +1014 38 PCas +1015 37 PCas +1016 37 PCas +1017 37 PCas +1018 36 PCas +1019 36 PCas +1020 35 PCas +1021 35 PCas +1022 35 PCas +1023 34 PCas +1024 34 PCas +1025 33 PCas +1026 33 PCas +1027 32 PCas +1028 32 PCas +1029 32 PCas +1030 31 PCas +1031 31 PCas +1032 31 PCas +1033 31 PCas +1034 31 PCas +1035 31 PCas +1036 30 PCas +1037 30 PCas +1038 30 PCas +1039 29 PCas +1040 29 PCas +1041 29 PCas +1042 28 PCas +1043 28 PCas +1044 27 PCas +1045 27 PCas +1046 27 PCas +1047 27 PCas +1048 26 PCas +1049 26 PCas +1050 26 PCas +1051 25 PCas +1052 25 PCas +1053 25 PCas +1054 24 PCas +1055 24 PCas +1056 24 PCas +1057 24 PCas +1058 23 PCas +1059 23 PCas +1060 23 PCas +1061 23 PCas +1062 22 PCas +1063 22 PCas +1064 22 PCas +1065 22 PCas +1066 21 PCas +1067 21 PCas +1068 21 PCas +1069 21 PCas +1070 20 PCas +1071 20 PCas +1072 20 PCas +1073 20 PCas +1074 19 PCas +1075 19 PCas +1076 19 PCas +1077 19 PCas +1078 19 PCas +1079 18 PCas +1080 18 PCas +1081 18 PCas +1082 18 PCas +1083 18 PCas +1084 17 PCas +1085 17 PCas +1086 17 PCas +1087 17 PCas +1088 17 PCas +1089 16 PCas +1090 16 PCas +1091 16 PCas +1092 16 PCas +1093 16 PCas +1094 15 PCas +1095 15 PCas +1096 15 PCas +1097 15 PCas +1098 15 PCas +1099 15 PCas +1100 15 PCas +1101 15 PCas +1102 14 PCas +1103 14 PCas +1104 14 PCas +1105 14 PCas +1106 14 PCas +1107 14 PCas +1108 13 PCas +1109 13 PCas +1110 13 PCas +1111 13 PCas +1112 13 PCas +1113 13 PCas +1114 13 PCas +1115 12 PCas +1116 12 PCas +1117 12 PCas +1118 12 PCas +1119 12 PCas +1120 12 PCas +1121 12 PCas +1122 11 PCas +1123 11 PCas +1124 11 PCas +1125 11 PCas +1126 11 PCas +1127 11 PCas +1128 11 PCas +1129 11 PCas +1130 10 PCas +1131 10 PCas +1132 10 PCas +1133 10 PCas +1134 10 PCas +1135 10 PCas +1136 10 PCas +1137 10 PCas +1138 9 PCas +1139 9 PCas +1140 9 PCas +1141 9 PCas +1142 9 PCas +1143 9 PCas +1144 9 PCas +1145 9 PCas +1146 9 PCas +1147 9 PCas +1148 8 PCas +1149 8 PCas +1150 8 PCas +1151 8 PCas +1152 8 PCas +1153 8 PCas +1154 8 PCas +1155 8 PCas +1156 8 PCas +1157 8 PCas +1158 5308 PwoCas +1159 5308 PwoCas +1160 5308 PwoCas +1161 5308 PwoCas +1162 5308 PwoCas +1163 5308 PwoCas +1164 5308 PwoCas +1165 5308 PwoCas +1166 5308 PwoCas +1167 5308 PwoCas +1168 5308 PwoCas +1169 5308 PwoCas +1170 5308 PwoCas +1171 5247 PwoCas +1172 5126 PwoCas +1173 5035 PwoCas +1174 4921 PwoCas +1175 4812 PwoCas +1176 4702 PwoCas +1177 4606 PwoCas +1178 4497 PwoCas +1179 4393 PwoCas +1180 4295 PwoCas +1181 4195 PwoCas +1182 4095 PwoCas +1183 4074 PwoCas +1184 3977 PwoCas +1185 3886 PwoCas +1186 3800 PwoCas +1187 3711 PwoCas +1188 3623 PwoCas +1189 3551 PwoCas +1190 3466 PwoCas +1191 3386 PwoCas +1192 3311 PwoCas +1193 3231 PwoCas +1194 3154 PwoCas +1195 3077 PwoCas +1196 3031 PwoCas +1197 2957 PwoCas +1198 2887 PwoCas +1199 2816 PwoCas +1200 2754 PwoCas +1201 2687 PwoCas +1202 2623 PwoCas +1203 2559 PwoCas +1204 2510 PwoCas +1205 2448 PwoCas +1206 2390 PwoCas +1207 2331 PwoCas +1208 2280 PwoCas +1209 2223 PwoCas +1210 2171 PwoCas +1211 2115 PwoCas +1212 2063 PwoCas +1213 2047 PwoCas +1214 2009 PwoCas +1215 1959 PwoCas +1216 1913 PwoCas +1217 1865 PwoCas +1218 1819 PwoCas +1219 1781 PwoCas +1220 1735 PwoCas +1221 1693 PwoCas +1222 1653 PwoCas +1223 1611 PwoCas +1224 1571 PwoCas +1225 1535 PwoCas +1226 1507 PwoCas +1227 1471 PwoCas +1228 1433 PwoCas +1229 1399 PwoCas +1230 1364 PwoCas +1231 1330 PwoCas +1232 1295 PwoCas +1233 1270 PwoCas +1234 1237 PwoCas +1235 1207 PwoCas +1236 1175 PwoCas +1237 1149 PwoCas +1238 1119 PwoCas +1239 1089 PwoCas +1240 1062 PwoCas +1241 1035 PwoCas +1242 1023 PwoCas +1243 1011 PwoCas +1244 986 PwoCas +1245 960 PwoCas +1246 937 PwoCas +1247 913 PwoCas +1248 893 PwoCas +1249 870 PwoCas +1250 847 PwoCas +1251 827 PwoCas +1252 805 PwoCas +1253 785 PwoCas +1254 767 PwoCas +1255 752 PwoCas +1256 734 PwoCas +1257 714 PwoCas +1258 697 PwoCas +1259 679 PwoCas +1260 662 PwoCas +1261 644 PwoCas +1262 631 PwoCas +1263 615 PwoCas +1264 599 PwoCas +1265 583 PwoCas +1266 570 PwoCas +1267 555 PwoCas +1268 540 PwoCas +1269 526 PwoCas +1270 512 PwoCas +1271 511 PwoCas +1272 502 PwoCas +1273 489 PwoCas +1274 477 PwoCas +1275 464 PwoCas +1276 452 PwoCas +1277 442 PwoCas +1278 431 PwoCas +1279 419 PwoCas +1280 409 PwoCas +1281 399 PwoCas +1282 388 PwoCas +1283 382 PwoCas +1284 372 PwoCas +1285 362 PwoCas +1286 353 PwoCas +1287 344 PwoCas +1288 335 PwoCas +1289 327 PwoCas +1290 319 PwoCas +1291 311 PwoCas +1292 303 PwoCas +1293 295 PwoCas +1294 287 PwoCas +1295 280 PwoCas +1296 273 PwoCas +1297 266 PwoCas +1298 259 PwoCas +1299 255 PwoCas +1300 254 PwoCas +1301 248 PwoCas +1302 241 PwoCas +1303 235 PwoCas +1304 229 PwoCas +1305 223 PwoCas +1306 218 PwoCas +1307 212 PwoCas +1308 207 PwoCas +1309 202 PwoCas +1310 196 PwoCas +1311 191 PwoCas +1312 188 PwoCas +1313 183 PwoCas +1314 178 PwoCas +1315 174 PwoCas +1316 169 PwoCas +1317 165 PwoCas +1318 161 PwoCas +1319 157 PwoCas +1320 153 PwoCas +1321 149 PwoCas +1322 145 PwoCas +1323 142 PwoCas +1324 138 PwoCas +1325 134 PwoCas +1326 131 PwoCas +1327 127 PwoCas +1328 127 PwoCas +1329 125 PwoCas +1330 122 PwoCas +1331 119 PwoCas +1332 116 PwoCas +1333 113 PwoCas +1334 110 PwoCas +1335 107 PwoCas +1336 104 PwoCas +1337 102 PwoCas +1338 99 PwoCas +1339 96 PwoCas +1340 95 PwoCas +1341 92 PwoCas +1342 90 PwoCas +1343 88 PwoCas +1344 85 PwoCas +1345 83 PwoCas +1346 81 PwoCas +1347 79 PwoCas +1348 77 PwoCas +1349 75 PwoCas +1350 73 PwoCas +1351 71 PwoCas +1352 70 PwoCas +1353 68 PwoCas +1354 66 PwoCas +1355 64 PwoCas +1356 63 PwoCas +1357 63 PwoCas +1358 61 PwoCas +1359 60 PwoCas +1360 58 PwoCas +1361 57 PwoCas +1362 55 PwoCas +1363 54 PwoCas +1364 53 PwoCas +1365 51 PwoCas +1366 50 PwoCas +1367 49 PwoCas +1368 47 PwoCas +1369 47 PwoCas +1370 45 PwoCas +1371 44 PwoCas +1372 43 PwoCas +1373 42 PwoCas +1374 41 PwoCas +1375 40 PwoCas +1376 39 PwoCas +1377 38 PwoCas +1378 37 PwoCas +1379 36 PwoCas +1380 35 PwoCas +1381 34 PwoCas +1382 33 PwoCas +1383 32 PwoCas +1384 31 PwoCas +1385 31 PwoCas +1386 31 PwoCas +1387 30 PwoCas +1388 29 PwoCas +1389 29 PwoCas +1390 28 PwoCas +1391 27 PwoCas +1392 26 PwoCas +1393 26 PwoCas +1394 25 PwoCas +1395 24 PwoCas +1396 24 PwoCas +1397 23 PwoCas +1398 23 PwoCas +1399 22 PwoCas +1400 22 PwoCas +1401 21 PwoCas +1402 21 PwoCas +1403 20 PwoCas +1404 19 PwoCas +1405 19 PwoCas +1406 19 PwoCas +1407 18 PwoCas +1408 18 PwoCas +1409 17 PwoCas +1410 17 PwoCas +1411 16 PwoCas +1412 16 PwoCas +1413 15 PwoCas +1414 15 PwoCas +1415 15 PwoCas +1416 15 PwoCas +1417 14 PwoCas +1418 14 PwoCas +1419 14 PwoCas +1420 13 PwoCas +1421 13 PwoCas +1422 13 PwoCas +1423 12 PwoCas +1424 12 PwoCas +1425 12 PwoCas +1426 11 PwoCas +1427 11 PwoCas +1428 11 PwoCas +1429 10 PwoCas +1430 10 PwoCas +1431 10 PwoCas +1432 10 PwoCas +1433 9 PwoCas +1434 9 PwoCas +1435 9 PwoCas +1436 9 PwoCas +1437 8 PwoCas +1438 8 PwoCas +1439 8 PwoCas +1440 8 PwoCas +1441 8 PwoCas +1442 7 PwoCas +1443 7 PwoCas +1444 7 PwoCas +1445 7 PwoCas +1446 7 PwoCas +1447 7 PwoCas +1448 6 PwoCas +1449 6 PwoCas +1450 6 PwoCas +1451 6 PwoCas +1452 6 PwoCas +1453 6 PwoCas +1454 5 PwoCas +1455 5 PwoCas +1456 5 PwoCas +1457 5 PwoCas +1458 5 PwoCas +1459 5 PwoCas +1460 5 PwoCas +1461 5 PwoCas +1462 4 PwoCas +1463 4 PwoCas +1464 4 PwoCas +1465 4 PwoCas +1466 4 PwoCas +1467 4 PwoCas +1468 4 PwoCas +1469 4 PwoCas +1470 4 PwoCas +1471 3 PwoCas +1472 3 PwoCas +1473 3 PwoCas +1474 3 PwoCas +1475 3 PwoCas +1476 3 PwoCas +1477 3 PwoCas +1478 3 PwoCas +1479 3 PwoCas +1480 3 PwoCas +1481 3 PwoCas +1482 3 PwoCas +1483 2 PwoCas +1484 2 PwoCas +1485 2 PwoCas +1486 2 PwoCas +1487 2 PwoCas +1488 2 PwoCas +1489 2 PwoCas +1490 2 PwoCas +1491 2 PwoCas +1492 2 PwoCas +1493 2 PwoCas +1494 2 PwoCas +1495 2 PwoCas +1496 2 PwoCas +1497 2 PwoCas +1498 2 PwoCas +1499 1 PwoCas +1500 1 PwoCas +1501 1 PwoCas +1502 1 PwoCas +1503 1 PwoCas +1504 1 PwoCas +1505 1 PwoCas +1506 1 PwoCas +1507 1 PwoCas +1508 1 PwoCas +1509 1 PwoCas +1510 1 PwoCas +1511 1 PwoCas +1512 1 PwoCas +1513 1 PwoCas +1514 1 PwoCas +1515 1 PwoCas +1516 1 PwoCas +1517 1 PwoCas +1518 1 PwoCas +1519 1 PwoCas +1520 1 PwoCas +1521 1 PwoCas +1522 1 PwoCas +1523 1 PwoCas +1524 1 PwoCas +1525 0 PwoCas +1526 0 PwoCas +1527 0 PwoCas +1528 0 PwoCas +1529 0 PwoCas +1530 0 PwoCas +1531 0 PwoCas +1532 0 PwoCas +1533 0 PwoCas +1534 0 PwoCas +1535 0 PwoCas +1536 0 PwoCas +1537 0 PwoCas +1538 0 PwoCas +1539 0 PwoCas +1540 0 PwoCas +1541 0 PwoCas +1542 0 PwoCas +1543 0 PwoCas +1544 0 PwoCas +1545 0 PwoCas +1546 0 PwoCas +1547 0 PwoCas +1548 0 PwoCas +1549 0 PwoCas +1550 0 PwoCas +1551 0 PwoCas +1552 0 PwoCas +1553 0 PwoCas +1554 0 PwoCas +1555 0 PwoCas +1556 0 PwoCas +1557 0 PwoCas +1558 0 PwoCas +1559 0 PwoCas +1560 0 PwoCas +1561 0 PwoCas +1562 0 PwoCas +1563 0 PwoCas +1564 0 PwoCas +1565 0 PwoCas +1566 0 PwoCas +1567 0 PwoCas +1568 0 PwoCas +1569 0 PwoCas +1570 0 PwoCas +1571 0 PwoCas +1572 0 PwoCas +1573 0 PwoCas +1574 0 PwoCas +1575 0 PwoCas +1576 0 PwoCas +1577 0 PwoCas +1578 0 PwoCas +1579 0 PwoCas +1580 0 PwoCas +1581 0 PwoCas +1582 0 PwoCas +1583 0 PwoCas +1584 0 PwoCas +1585 0 PwoCas +1586 0 PwoCas +1587 0 PwoCas +1588 0 PwoCas +1589 0 PwoCas +1590 0 PwoCas +1591 0 PwoCas +1592 0 PwoCas +1593 0 PwoCas +1594 0 PwoCas +1595 0 PwoCas +1596 0 PwoCas +1597 0 PwoCas +1598 0 PwoCas +1599 0 PwoCas +1600 0 PwoCas +1601 0 PwoCas +1602 0 PwoCas +1603 0 PwoCas +1604 0 PwoCas +1605 0 PwoCas +1606 0 PwoCas +1607 0 PwoCas +1608 0 PwoCas +1609 0 PwoCas +1610 0 PwoCas +1611 0 PwoCas +1612 0 PwoCas +1613 0 PwoCas +1614 0 PwoCas +1615 0 PwoCas +1616 0 PwoCas +1617 0 PwoCas +1618 0 PwoCas +1619 0 PwoCas +1620 0 PwoCas +1621 0 PwoCas +1622 0 PwoCas +1623 0 PwoCas +1624 0 PwoCas +1625 0 PwoCas +1626 0 PwoCas +1627 0 PwoCas +1628 0 PwoCas +1629 0 PwoCas +1630 0 PwoCas +1631 0 PwoCas +1632 0 PwoCas +1633 0 PwoCas +1634 0 PwoCas +1635 0 PwoCas +1636 0 PwoCas +1637 0 PwoCas +1638 0 PwoCas +1639 0 PwoCas +1640 0 PwoCas +1641 0 PwoCas +1642 0 PwoCas +1643 0 PwoCas +1644 0 PwoCas +1645 0 PwoCas +1646 0 PwoCas +1647 0 PwoCas +1648 0 PwoCas +1649 0 PwoCas +1650 0 PwoCas +1651 0 PwoCas +1652 0 PwoCas +1653 0 PwoCas +1654 0 PwoCas +1655 0 PwoCas +1656 0 PwoCas +1657 0 PwoCas +1658 0 PwoCas +1659 0 PwoCas +1660 0 PwoCas +1661 0 PwoCas +1662 0 PwoCas +1663 0 PwoCas +1664 0 PwoCas +1665 0 PwoCas +1666 0 PwoCas +1667 0 PwoCas +1668 0 PwoCas +1669 0 PwoCas +1670 0 PwoCas +1671 0 PwoCas +1672 0 PwoCas +1673 0 PwoCas +1674 0 PwoCas +1675 0 PwoCas +1676 0 PwoCas +1677 0 PwoCas +1678 0 PwoCas +1679 0 PwoCas +1680 0 PwoCas +1681 0 PwoCas +1682 0 PwoCas +1683 0 PwoCas +1684 0 PwoCas +1685 0 PwoCas +1686 0 PwoCas +1687 0 PwoCas +1688 0 PwoCas +1689 0 PwoCas +1690 0 PwoCas +1691 0 PwoCas +1692 0 PwoCas +1693 0 PwoCas +1694 0 PwoCas +1695 0 PwoCas +1696 0 PwoCas +1697 0 PwoCas +1698 0 PwoCas +1699 0 PwoCas +1700 0 PwoCas +1701 0 PwoCas +1702 0 PwoCas +1703 0 PwoCas +1704 0 PwoCas +1705 0 PwoCas +1706 0 PwoCas +1707 0 PwoCas +1708 0 PwoCas +1709 0 PwoCas +1710 0 PwoCas +1711 0 PwoCas +1712 0 PwoCas +1713 0 PwoCas +1714 0 PwoCas +1715 0 PwoCas +1716 0 PwoCas +1717 0 PwoCas +1718 0 PwoCas +1719 0 PwoCas +1720 0 PwoCas +1721 0 PwoCas +1722 0 PwoCas +1723 0 PwoCas +1724 0 PwoCas +1725 0 PwoCas +1726 0 PwoCas +1727 0 PwoCas +1728 0 PwoCas +1729 0 PwoCas +1730 0 PwoCas +1731 0 PwoCas +1732 0 PwoCas +1733 0 PwoCas +1734 0 PwoCas +1735 0 PwoCas +1736 0 PwoCas +1737 0 PwoCas +1738 0 PwoCas +1739 0 PwoCas +1740 0 PwoCas +1741 0 PwoCas +1742 0 PwoCas +1743 0 PwoCas +1744 0 PwoCas +1745 0 PwoCas +1746 0 PwoCas +1747 0 PwoCas +1748 0 PwoCas +1749 0 PwoCas +1750 0 PwoCas +1751 0 PwoCas +1752 0 PwoCas +1753 0 PwoCas +1754 0 PwoCas +1755 0 PwoCas +1756 0 PwoCas +1757 0 PwoCas +1758 0 PwoCas +1759 0 PwoCas +1760 0 PwoCas +1761 0 PwoCas +1762 0 PwoCas +1763 0 PwoCas +1764 0 PwoCas +1765 0 PwoCas +1766 0 PwoCas +1767 0 PwoCas +1768 0 PwoCas +1769 0 PwoCas +1770 0 PwoCas +1771 0 PwoCas +1772 0 PwoCas +1773 0 PwoCas +1774 0 PwoCas +1775 0 PwoCas +1776 0 PwoCas +1777 0 PwoCas +1778 0 PwoCas +1779 0 PwoCas +1780 0 PwoCas +1781 0 PwoCas +1782 0 PwoCas +1783 0 PwoCas +1784 0 PwoCas +1785 0 PwoCas +1786 0 PwoCas +1787 0 PwoCas +1788 0 PwoCas +1789 0 PwoCas +1790 0 PwoCas +1791 0 PwoCas +1792 0 PwoCas +1793 0 PwoCas +1794 0 PwoCas +1795 0 PwoCas +1796 0 PwoCas +1797 0 PwoCas +1798 0 PwoCas +1799 0 PwoCas +1800 0 PwoCas diff --git a/hal_psee_plugins/biasgen/gen3_idac_p_thin.calib b/hal_psee_plugins/biasgen/gen3_idac_p_thin.calib new file mode 100644 index 000000000..628120ba4 --- /dev/null +++ b/hal_psee_plugins/biasgen/gen3_idac_p_thin.calib @@ -0,0 +1,1801 @@ +0 0 NwoCas +1 0 NwoCas +2 0 NwoCas +3 0 NwoCas +4 0 NwoCas +5 0 NwoCas +6 0 NwoCas +7 0 NwoCas +8 0 NwoCas +9 0 NwoCas +10 1 NwoCas +11 1 NwoCas +12 1 NwoCas +13 1 NwoCas +14 1 NwoCas +15 1 NwoCas +16 1 NwoCas +17 1 NwoCas +18 1 NwoCas +19 1 NwoCas +20 1 NwoCas +21 1 NwoCas +22 1 NwoCas +23 1 NwoCas +24 1 NwoCas +25 1 NwoCas +26 1 NwoCas +27 1 NwoCas +28 1 NwoCas +29 1 NwoCas +30 1 NwoCas +31 1 NwoCas +32 1 NwoCas +33 1 NwoCas +34 1 NwoCas +35 1 NwoCas +36 1 NwoCas +37 1 NwoCas +38 1 NwoCas +39 1 NwoCas +40 1 NwoCas +41 1 NwoCas +42 1 NwoCas +43 1 NwoCas +44 1 NwoCas +45 1 NwoCas +46 1 NwoCas +47 1 NwoCas +48 1 NwoCas +49 1 NwoCas +50 1 NwoCas +51 1 NwoCas +52 1 NwoCas +53 1 NwoCas +54 1 NwoCas +55 1 NwoCas +56 1 NwoCas +57 1 NwoCas +58 1 NwoCas +59 1 NwoCas +60 1 NwoCas +61 1 NwoCas +62 1 NwoCas +63 1 NwoCas +64 1 NwoCas +65 1 NwoCas +66 1 NwoCas +67 1 NwoCas +68 1 NwoCas +69 1 NwoCas +70 1 NwoCas +71 2 NwoCas +72 2 NwoCas +73 2 NwoCas +74 2 NwoCas +75 2 NwoCas +76 2 NwoCas +77 2 NwoCas +78 2 NwoCas +79 2 NwoCas +80 2 NwoCas +81 2 NwoCas +82 2 NwoCas +83 2 NwoCas +84 2 NwoCas +85 2 NwoCas +86 2 NwoCas +87 2 NwoCas +88 2 NwoCas +89 2 NwoCas +90 2 NwoCas +91 2 NwoCas +92 2 NwoCas +93 2 NwoCas +94 2 NwoCas +95 3 NwoCas +96 3 NwoCas +97 3 NwoCas +98 3 NwoCas +99 3 NwoCas +100 3 NwoCas +101 3 NwoCas +102 3 NwoCas +103 3 NwoCas +104 3 NwoCas +105 3 NwoCas +106 3 NwoCas +107 3 NwoCas +108 4 NwoCas +109 4 NwoCas +110 4 NwoCas +111 4 NwoCas +112 4 NwoCas +113 4 NwoCas +114 4 NwoCas +115 4 NwoCas +116 4 NwoCas +117 4 NwoCas +118 4 NwoCas +119 5 NwoCas +120 5 NwoCas +121 5 NwoCas +122 5 NwoCas +123 5 NwoCas +124 5 NwoCas +125 5 NwoCas +126 6 NwoCas +127 6 NwoCas +128 6 NwoCas +129 6 NwoCas +130 6 NwoCas +131 6 NwoCas +132 6 NwoCas +133 7 NwoCas +134 7 NwoCas +135 7 NwoCas +136 7 NwoCas +137 7 NwoCas +138 8 NwoCas +139 8 NwoCas +140 8 NwoCas +141 8 NwoCas +142 8 NwoCas +143 9 NwoCas +144 9 NwoCas +145 9 NwoCas +146 9 NwoCas +147 10 NwoCas +148 10 NwoCas +149 10 NwoCas +150 10 NwoCas +151 11 NwoCas +152 11 NwoCas +153 11 NwoCas +154 12 NwoCas +155 12 NwoCas +156 12 NwoCas +157 13 NwoCas +158 13 NwoCas +159 14 NwoCas +160 14 NwoCas +161 14 NwoCas +162 15 NwoCas +163 15 NwoCas +164 16 NwoCas +165 16 NwoCas +166 16 NwoCas +167 17 NwoCas +168 17 NwoCas +169 18 NwoCas +170 18 NwoCas +171 19 NwoCas +172 19 NwoCas +173 20 NwoCas +174 20 NwoCas +175 21 NwoCas +176 22 NwoCas +177 22 NwoCas +178 23 NwoCas +179 24 NwoCas +180 24 NwoCas +181 25 NwoCas +182 26 NwoCas +183 26 NwoCas +184 27 NwoCas +185 28 NwoCas +186 29 NwoCas +187 30 NwoCas +188 30 NwoCas +189 31 NwoCas +190 32 NwoCas +191 32 NwoCas +192 33 NwoCas +193 34 NwoCas +194 35 NwoCas +195 36 NwoCas +196 38 NwoCas +197 39 NwoCas +198 40 NwoCas +199 41 NwoCas +200 42 NwoCas +201 44 NwoCas +202 45 NwoCas +203 46 NwoCas +204 48 NwoCas +205 49 NwoCas +206 50 NwoCas +207 52 NwoCas +208 53 NwoCas +209 55 NwoCas +210 56 NwoCas +211 58 NwoCas +212 60 NwoCas +213 62 NwoCas +214 64 NwoCas +215 64 NwoCas +216 66 NwoCas +217 68 NwoCas +218 70 NwoCas +219 72 NwoCas +220 74 NwoCas +221 76 NwoCas +222 79 NwoCas +223 81 NwoCas +224 83 NwoCas +225 86 NwoCas +226 89 NwoCas +227 91 NwoCas +228 94 NwoCas +229 96 NwoCas +230 99 NwoCas +231 102 NwoCas +232 105 NwoCas +233 108 NwoCas +234 112 NwoCas +235 115 NwoCas +236 118 NwoCas +237 122 NwoCas +238 126 NwoCas +239 128 NwoCas +240 130 NwoCas +241 134 NwoCas +242 138 NwoCas +243 142 NwoCas +244 146 NwoCas +245 151 NwoCas +246 156 NwoCas +247 160 NwoCas +248 165 NwoCas +249 170 NwoCas +250 175 NwoCas +251 180 NwoCas +252 186 NwoCas +253 192 NwoCas +254 196 NwoCas +255 202 NwoCas +256 208 NwoCas +257 214 NwoCas +258 221 NwoCas +259 226 NwoCas +260 233 NwoCas +261 240 NwoCas +262 248 NwoCas +263 255 NwoCas +264 256 NwoCas +265 264 NwoCas +266 272 NwoCas +267 280 NwoCas +268 288 NwoCas +269 297 NwoCas +270 306 NwoCas +271 316 NwoCas +272 324 NwoCas +273 334 NwoCas +274 344 NwoCas +275 354 NwoCas +276 365 NwoCas +277 376 NwoCas +278 384 NwoCas +279 396 NwoCas +280 408 NwoCas +281 419 NwoCas +282 432 NwoCas +283 445 NwoCas +284 457 NwoCas +285 471 NwoCas +286 484 NwoCas +287 499 NwoCas +288 512 NwoCas +289 515 NwoCas +290 532 NwoCas +291 547 NwoCas +292 564 NwoCas +293 580 NwoCas +294 598 NwoCas +295 616 NwoCas +296 634 NwoCas +297 650 NwoCas +298 670 NwoCas +299 689 NwoCas +300 708 NwoCas +301 729 NwoCas +302 751 NwoCas +303 768 NwoCas +304 789 NwoCas +305 812 NwoCas +306 834 NwoCas +307 860 NwoCas +308 884 NwoCas +309 907 NwoCas +310 933 NwoCas +311 960 NwoCas +312 987 NwoCas +313 1015 NwoCas +314 1024 NwoCas +315 1052 NwoCas +316 1083 NwoCas +317 1114 NwoCas +318 1146 NwoCas +319 1177 NwoCas +320 1211 NwoCas +321 1245 NwoCas +322 1280 NwoCas +323 1311 NwoCas +324 1347 NwoCas +325 1386 NwoCas +326 1422 NwoCas +327 1462 NwoCas +328 1503 NwoCas +329 1536 NwoCas +330 1574 NwoCas +331 1618 NwoCas +332 1664 NwoCas +333 1707 NwoCas +334 1753 NwoCas +335 1794 NwoCas +336 1844 NwoCas +337 1894 NwoCas +338 1943 NwoCas +339 1994 NwoCas +340 2047 NwoCas +341 2068 NwoCas +342 2125 NwoCas +343 2180 NwoCas +344 2240 NwoCas +345 2300 NwoCas +346 2357 NwoCas +347 2420 NwoCas +348 2482 NwoCas +349 2546 NwoCas +350 2602 NwoCas +351 2671 NwoCas +352 2739 NwoCas +353 2809 NwoCas +354 2876 NwoCas +355 2946 NwoCas +356 3022 NwoCas +357 3075 NwoCas +358 3156 NwoCas +359 3234 NwoCas +360 3316 NwoCas +361 3393 NwoCas +362 3476 NwoCas +363 3562 NwoCas +364 3639 NwoCas +365 3726 NwoCas +366 3817 NwoCas +367 3904 NwoCas +368 3996 NwoCas +369 4091 NwoCas +370 4137 NwoCas +371 4238 NwoCas +372 4342 NwoCas +373 4442 NwoCas +374 4545 NwoCas +375 4644 NwoCas +376 4754 NwoCas +377 4864 NwoCas +378 4975 NwoCas +379 5087 NwoCas +380 5184 NwoCas +381 5305 NwoCas +382 5422 NwoCas +383 5544 NwoCas +384 5656 NwoCas +385 5784 NwoCas +386 5907 NwoCas +387 6036 NwoCas +388 6144 NwoCas +389 6268 NwoCas +390 6400 NwoCas +391 21 NCas +392 21 NCas +393 21 NCas +394 21 NCas +395 22 NCas +396 22 NCas +397 22 NCas +398 23 NCas +399 23 NCas +400 23 NCas +401 24 NCas +402 24 NCas +403 24 NCas +404 24 NCas +405 25 NCas +406 25 NCas +407 25 NCas +408 26 NCas +409 26 NCas +410 26 NCas +411 27 NCas +412 27 NCas +413 28 NCas +414 28 NCas +415 28 NCas +416 29 NCas +417 29 NCas +418 29 NCas +419 30 NCas +420 30 NCas +421 31 NCas +422 31 NCas +423 31 NCas +424 32 NCas +425 32 NCas +426 32 NCas +427 32 NCas +428 33 NCas +429 33 NCas +430 33 NCas +431 34 NCas +432 34 NCas +433 35 NCas +434 35 NCas +435 36 NCas +436 36 NCas +437 37 NCas +438 37 NCas +439 38 NCas +440 38 NCas +441 39 NCas +442 40 NCas +443 40 NCas +444 40 NCas +445 41 NCas +446 42 NCas +447 42 NCas +448 43 NCas +449 43 NCas +450 44 NCas +451 44 NCas +452 45 NCas +453 46 NCas +454 46 NCas +455 47 NCas +456 48 NCas +457 48 NCas +458 49 NCas +459 49 NCas +460 50 NCas +461 51 NCas +462 51 NCas +463 52 NCas +464 53 NCas +465 53 NCas +466 54 NCas +467 55 NCas +468 56 NCas +469 56 NCas +470 57 NCas +471 58 NCas +472 59 NCas +473 60 NCas +474 60 NCas +475 61 NCas +476 62 NCas +477 63 NCas +478 64 NCas +479 64 NCas +480 64 NCas +481 64 NCas +482 65 NCas +483 66 NCas +484 67 NCas +485 68 NCas +486 69 NCas +487 70 NCas +488 71 NCas +489 72 NCas +490 73 NCas +491 74 NCas +492 75 NCas +493 76 NCas +494 77 NCas +495 78 NCas +496 79 NCas +497 80 NCas +498 81 NCas +499 82 NCas +500 84 NCas +501 85 NCas +502 86 NCas +503 87 NCas +504 88 NCas +505 89 NCas +506 91 NCas +507 92 NCas +508 93 NCas +509 95 NCas +510 96 NCas +511 96 NCas +512 98 NCas +513 99 NCas +514 100 NCas +515 102 NCas +516 103 NCas +517 105 NCas +518 106 NCas +519 108 NCas +520 109 NCas +521 111 NCas +522 112 NCas +523 113 NCas +524 115 NCas +525 117 NCas +526 118 NCas +527 120 NCas +528 121 NCas +529 123 NCas +530 125 NCas +531 127 NCas +532 128 NCas +533 128 NCas +534 128 NCas +535 130 NCas +536 132 NCas +537 133 NCas +538 135 NCas +539 137 NCas +540 139 NCas +541 141 NCas +542 143 NCas +543 145 NCas +544 147 NCas +545 149 NCas +546 151 NCas +547 153 NCas +548 156 NCas +549 158 NCas +550 160 NCas +551 161 NCas +552 164 NCas +553 166 NCas +554 168 NCas +555 171 NCas +556 173 NCas +557 176 NCas +558 178 NCas +559 180 NCas +560 183 NCas +561 185 NCas +562 188 NCas +563 191 NCas +564 192 NCas +565 194 NCas +566 197 NCas +567 200 NCas +568 202 NCas +569 205 NCas +570 208 NCas +571 211 NCas +572 214 NCas +573 217 NCas +574 220 NCas +575 223 NCas +576 225 NCas +577 228 NCas +578 232 NCas +579 235 NCas +580 238 NCas +581 241 NCas +582 244 NCas +583 248 NCas +584 251 NCas +585 255 NCas +586 256 NCas +587 256 NCas +588 258 NCas +589 262 NCas +590 265 NCas +591 269 NCas +592 273 NCas +593 277 NCas +594 281 NCas +595 285 NCas +596 288 NCas +597 292 NCas +598 296 NCas +599 301 NCas +600 305 NCas +601 309 NCas +602 313 NCas +603 318 NCas +604 320 NCas +605 325 NCas +606 330 NCas +607 334 NCas +608 339 NCas +609 344 NCas +610 348 NCas +611 352 NCas +612 358 NCas +613 363 NCas +614 368 NCas +615 373 NCas +616 378 NCas +617 383 NCas +618 384 NCas +619 390 NCas +620 396 NCas +621 401 NCas +622 407 NCas +623 412 NCas +624 417 NCas +625 423 NCas +626 429 NCas +627 435 NCas +628 441 NCas +629 447 NCas +630 451 NCas +631 458 NCas +632 464 NCas +633 470 NCas +634 477 NCas +635 483 NCas +636 489 NCas +637 496 NCas +638 503 NCas +639 510 NCas +640 512 NCas +641 512 NCas +642 517 NCas +643 525 NCas +644 532 NCas +645 540 NCas +646 547 NCas +647 554 NCas +648 562 NCas +649 570 NCas +650 576 NCas +651 6893 PCas +652 6875 PCas +653 6837 PCas +654 6773 PCas +655 6741 PCas +656 6645 PCas +657 6621 PCas +658 6603 PCas +659 6571 PCas +660 6515 PCas +661 6485 PCas +662 6421 PCas +663 6379 PCas +664 6327 PCas +665 6293 PCas +666 6235 PCas +667 6141 PCas +668 6133 PCas +669 6117 PCas +670 6093 PCas +671 6061 PCas +672 6011 PCas +673 5997 PCas +674 5963 PCas +675 5915 PCas +676 5869 PCas +677 5851 PCas +678 5813 PCas +679 5755 PCas +680 5739 PCas +681 5685 PCas +682 5627 PCas +683 5611 PCas +684 5589 PCas +685 5549 PCas +686 5499 PCas +687 5483 PCas +688 5435 PCas +689 5397 PCas +690 5357 PCas +691 5333 PCas +692 5293 PCas +693 5239 PCas +694 5211 PCas +695 5165 PCas +696 5115 PCas +697 5101 PCas +698 5077 PCas +699 5045 PCas +700 5013 PCas +701 4981 PCas +702 4951 PCas +703 4917 PCas +704 4861 PCas +705 4845 PCas +706 4813 PCas +707 4781 PCas +708 4733 PCas +709 4715 PCas +710 4669 PCas +711 4635 PCas +712 4599 PCas +713 4573 PCas +714 4541 PCas +715 4523 PCas +716 4477 PCas +717 4459 PCas +718 4421 PCas +719 4389 PCas +720 4347 PCas +721 4325 PCas +722 4293 PCas +723 4267 PCas +724 4221 PCas +725 4197 PCas +726 4157 PCas +727 4125 PCas +728 4095 PCas +729 4093 PCas +730 4077 PCas +731 4053 PCas +732 4027 PCas +733 3997 PCas +734 3965 PCas +735 3947 PCas +736 3917 PCas +737 3893 PCas +738 3861 PCas +739 3833 PCas +740 3807 PCas +741 3783 PCas +742 3757 PCas +743 3725 PCas +744 3701 PCas +745 3675 PCas +746 3645 PCas +747 3613 PCas +748 3583 PCas +749 3573 PCas +750 3549 PCas +751 3519 PCas +752 3499 PCas +753 3469 PCas +754 3447 PCas +755 3421 PCas +756 3391 PCas +757 3371 PCas +758 3341 PCas +759 3319 PCas +760 3293 PCas +761 3269 PCas +762 3245 PCas +763 3221 PCas +764 3193 PCas +765 3167 PCas +766 3143 PCas +767 3119 PCas +768 3093 PCas +769 3071 PCas +770 3063 PCas +771 3039 PCas +772 3019 PCas +773 2997 PCas +774 2971 PCas +775 2943 PCas +776 2927 PCas +777 2905 PCas +778 2879 PCas +779 2859 PCas +780 2835 PCas +781 2814 PCas +782 2795 PCas +783 2773 PCas +784 2749 PCas +785 2729 PCas +786 2707 PCas +787 2685 PCas +788 2663 PCas +789 2641 PCas +790 2619 PCas +791 2597 PCas +792 2573 PCas +793 2559 PCas +794 2542 PCas +795 2523 PCas +796 2501 PCas +797 2481 PCas +798 2459 PCas +799 2438 PCas +800 2421 PCas +801 2399 PCas +802 2379 PCas +803 2359 PCas +804 2339 PCas +805 2318 PCas +806 2302 PCas +807 2283 PCas +808 2265 PCas +809 2243 PCas +810 2226 PCas +811 2206 PCas +812 2187 PCas +813 2169 PCas +814 2150 PCas +815 2131 PCas +816 2111 PCas +817 2093 PCas +818 2074 PCas +819 2053 PCas +820 2047 PCas +821 2047 PCas +822 2031 PCas +823 2013 PCas +824 1996 PCas +825 1979 PCas +826 1963 PCas +827 1945 PCas +828 1927 PCas +829 1913 PCas +830 1896 PCas +831 1879 PCas +832 1863 PCas +833 1847 PCas +834 1830 PCas +835 1813 PCas +836 1795 PCas +837 1786 PCas +838 1770 PCas +839 1755 PCas +840 1738 PCas +841 1723 PCas +842 1707 PCas +843 1691 PCas +844 1675 PCas +845 1662 PCas +846 1647 PCas +847 1631 PCas +848 1615 PCas +849 1599 PCas +850 1587 PCas +851 1571 PCas +852 1556 PCas +853 1541 PCas +854 1535 PCas +855 1523 PCas +856 1509 PCas +857 1495 PCas +858 6472 NCas +859 1468 PCas +860 1454 PCas +861 1439 PCas +862 1426 PCas +863 1412 PCas +864 1401 PCas +865 1388 PCas +866 1374 PCas +867 1361 PCas +868 1347 PCas +869 1335 PCas +870 1322 PCas +871 1309 PCas +872 1295 PCas +873 1281 PCas +874 1275 PCas +875 1263 PCas +876 1250 PCas +877 1238 PCas +878 1225 PCas +879 1214 PCas +880 1201 PCas +881 1189 PCas +882 1177 PCas +883 1165 PCas +884 1152 PCas +885 1143 PCas +886 1132 PCas +887 1120 PCas +888 1109 PCas +889 1097 PCas +890 1087 PCas +891 1075 PCas +892 1063 PCas +893 1053 PCas +894 1041 PCas +895 1030 PCas +896 1023 PCas +897 1023 PCas +898 1019 PCas +899 1008 PCas +900 998 PCas +901 988 PCas +902 978 PCas +903 967 PCas +904 959 PCas +905 949 PCas +906 939 PCas +907 928 PCas +908 919 PCas +909 909 PCas +910 899 PCas +911 893 PCas +912 883 PCas +913 874 PCas +914 864 PCas +915 855 PCas +916 846 PCas +917 837 PCas +918 829 PCas +919 820 PCas +920 811 PCas +921 802 PCas +922 793 PCas +923 784 PCas +924 775 PCas +925 767 PCas +926 765 PCas +927 757 PCas +928 749 PCas +929 740 PCas +930 733 PCas +931 724 PCas +932 716 PCas +933 708 PCas +934 702 PCas +935 694 PCas +936 686 PCas +937 678 PCas +938 671 PCas +939 663 PCas +940 655 PCas +941 648 PCas +942 640 PCas +943 636 PCas +944 629 PCas +945 622 PCas +946 614 PCas +947 607 PCas +948 601 PCas +949 593 PCas +950 587 PCas +951 575 PCas +952 574 PCas +953 567 PCas +954 561 PCas +955 554 PCas +956 547 PCas +957 541 PCas +958 535 PCas +959 528 PCas +960 522 PCas +961 515 PCas +962 511 PCas +963 511 PCas +964 511 PCas +965 504 PCas +966 499 PCas +967 493 PCas +968 487 PCas +969 481 PCas +970 476 PCas +971 470 PCas +972 465 PCas +973 459 PCas +974 454 PCas +975 448 PCas +976 445 PCas +977 439 PCas +978 434 PCas +979 429 PCas +980 423 PCas +981 418 PCas +982 414 PCas +983 409 PCas +984 404 PCas +985 399 PCas +986 394 PCas +987 389 PCas +988 384 PCas +989 383 PCas +990 378 PCas +991 374 PCas +992 369 PCas +993 365 PCas +994 360 PCas +995 356 PCas +996 351 PCas +997 347 PCas +998 343 PCas +999 339 PCas +1000 335 PCas +1001 331 PCas +1002 326 PCas +1003 322 PCas +1004 319 PCas +1005 316 PCas +1006 312 PCas +1007 308 PCas +1008 304 PCas +1009 300 PCas +1010 296 PCas +1011 292 PCas +1012 289 PCas +1013 286 PCas +1014 282 PCas +1015 278 PCas +1016 275 PCas +1017 271 PCas +1018 268 PCas +1019 264 PCas +1020 261 PCas +1021 257 PCas +1022 255 PCas +1023 255 PCas +1024 255 PCas +1025 252 PCas +1026 248 PCas +1027 245 PCas +1028 242 PCas +1029 239 PCas +1030 236 PCas +1031 233 PCas +1032 230 PCas +1033 227 PCas +1034 224 PCas +1035 222 PCas +1036 219 PCas +1037 216 PCas +1038 214 PCas +1039 211 PCas +1040 208 PCas +1041 206 PCas +1042 203 PCas +1043 200 PCas +1044 198 PCas +1045 195 PCas +1046 192 PCas +1047 191 PCas +1048 189 PCas +1049 187 PCas +1050 184 PCas +1051 182 PCas +1052 179 PCas +1053 177 PCas +1054 175 PCas +1055 173 PCas +1056 171 PCas +1057 168 PCas +1058 166 PCas +1059 164 PCas +1060 162 PCas +1061 159 PCas +1062 158 PCas +1063 156 PCas +1064 154 PCas +1065 152 PCas +1066 150 PCas +1067 148 PCas +1068 146 PCas +1069 144 PCas +1070 142 PCas +1071 140 PCas +1072 138 PCas +1073 136 PCas +1074 135 PCas +1075 133 PCas +1076 131 PCas +1077 129 PCas +1078 127 PCas +1079 127 PCas +1080 127 PCas +1081 126 PCas +1082 125 PCas +1083 123 PCas +1084 121 PCas +1085 120 PCas +1086 118 PCas +1087 117 PCas +1088 115 PCas +1089 113 PCas +1090 112 PCas +1091 111 PCas +1092 109 PCas +1093 108 PCas +1094 106 PCas +1095 105 PCas +1096 103 PCas +1097 102 PCas +1098 101 PCas +1099 99 PCas +1100 98 PCas +1101 97 PCas +1102 95 PCas +1103 95 PCas +1104 94 PCas +1105 92 PCas +1106 91 PCas +1107 90 PCas +1108 89 PCas +1109 87 PCas +1110 86 PCas +1111 85 PCas +1112 84 PCas +1113 83 PCas +1114 82 PCas +1115 81 PCas +1116 79 PCas +1117 79 PCas +1118 78 PCas +1119 77 PCas +1120 76 PCas +1121 75 PCas +1122 74 PCas +1123 72 PCas +1124 71 PCas +1125 71 PCas +1126 70 PCas +1127 69 PCas +1128 68 PCas +1129 67 PCas +1130 66 PCas +1131 65 PCas +1132 64 PCas +1133 63 PCas +1134 63 PCas +1135 63 PCas +1136 63 PCas +1137 62 PCas +1138 61 PCas +1139 60 PCas +1140 59 PCas +1141 58 PCas +1142 58 PCas +1143 57 PCas +1144 56 PCas +1145 55 PCas +1146 55 PCas +1147 54 PCas +1148 53 PCas +1149 52 PCas +1150 52 PCas +1151 51 PCas +1152 50 PCas +1153 50 PCas +1154 49 PCas +1155 48 PCas +1156 48 PCas +1157 47 PCas +1158 47 PCas +1159 46 PCas +1160 45 PCas +1161 45 PCas +1162 44 PCas +1163 44 PCas +1164 43 PCas +1165 42 PCas +1166 42 PCas +1167 41 PCas +1168 41 PCas +1169 40 PCas +1170 39 PCas +1171 39 PCas +1172 39 PCas +1173 38 PCas +1174 38 PCas +1175 37 PCas +1176 36 PCas +1177 36 PCas +1178 35 PCas +1179 35 PCas +1180 35 PCas +1181 34 PCas +1182 34 PCas +1183 33 PCas +1184 33 PCas +1185 32 PCas +1186 32 PCas +1187 31 PCas +1188 31 PCas +1189 31 PCas +1190 31 PCas +1191 31 PCas +1192 30 PCas +1193 30 PCas +1194 29 PCas +1195 29 PCas +1196 28 PCas +1197 28 PCas +1198 28 PCas +1199 27 PCas +1200 27 PCas +1201 27 PCas +1202 26 PCas +1203 26 PCas +1204 25 PCas +1205 25 PCas +1206 25 PCas +1207 24 PCas +1208 24 PCas +1209 24 PCas +1210 23 PCas +1211 23 PCas +1212 23 PCas +1213 23 PCas +1214 22 PCas +1215 22 PCas +1216 22 PCas +1217 21 PCas +1218 21 PCas +1219 21 PCas +1220 21 PCas +1221 20 PCas +1222 20 PCas +1223 20 PCas +1224 19 PCas +1225 19 PCas +1226 19 PCas +1227 19 PCas +1228 18 PCas +1229 18 PCas +1230 18 PCas +1231 18 PCas +1232 17 PCas +1233 17 PCas +1234 17 PCas +1235 17 PCas +1236 16 PCas +1237 16 PCas +1238 16 PCas +1239 16 PCas +1240 15 PCas +1241 15 PCas +1242 15 PCas +1243 15 PCas +1244 15 PCas +1245 15 PCas +1246 15 PCas +1247 15 PCas +1248 14 PCas +1249 14 PCas +1250 14 PCas +1251 14 PCas +1252 14 PCas +1253 13 PCas +1254 13 PCas +1255 13 PCas +1256 13 PCas +1257 13 PCas +1258 12 PCas +1259 12 PCas +1260 12 PCas +1261 12 PCas +1262 12 PCas +1263 12 PCas +1264 11 PCas +1265 11 PCas +1266 11 PCas +1267 11 PCas +1268 11 PCas +1269 11 PCas +1270 11 PCas +1271 10 PCas +1272 10 PCas +1273 10 PCas +1274 10 PCas +1275 10 PCas +1276 10 PCas +1277 10 PCas +1278 9 PCas +1279 9 PCas +1280 9 PCas +1281 9 PCas +1282 9 PCas +1283 9 PCas +1284 9 PCas +1285 9 PCas +1286 6134 PwoCas +1287 6134 PwoCas +1288 6134 PwoCas +1289 6134 PwoCas +1290 6134 PwoCas +1291 6134 PwoCas +1292 6134 PwoCas +1293 6134 PwoCas +1294 6134 PwoCas +1295 6134 PwoCas +1296 6094 PwoCas +1297 6015 PwoCas +1298 5934 PwoCas +1299 5858 PwoCas +1300 5778 PwoCas +1301 5699 PwoCas +1302 5630 PwoCas +1303 5553 PwoCas +1304 5477 PwoCas +1305 5399 PwoCas +1306 5327 PwoCas +1307 5247 PwoCas +1308 5175 PwoCas +1309 5119 PwoCas +1310 5047 PwoCas +1311 4975 PwoCas +1312 4902 PwoCas +1313 4835 PwoCas +1314 4763 PwoCas +1315 4693 PwoCas +1316 4621 PwoCas +1317 4563 PwoCas +1318 4493 PwoCas +1319 4427 PwoCas +1320 4357 PwoCas +1321 4295 PwoCas +1322 4227 PwoCas +1323 4161 PwoCas +1324 4095 PwoCas +1325 4084 PwoCas +1326 4022 PwoCas +1327 3962 PwoCas +1328 3900 PwoCas +1329 3839 PwoCas +1330 3783 PwoCas +1331 3722 PwoCas +1332 3664 PwoCas +1333 3605 PwoCas +1334 3558 PwoCas +1335 3501 PwoCas +1336 3445 PwoCas +1337 3389 PwoCas +1338 3331 PwoCas +1339 3281 PwoCas +1340 3226 PwoCas +1341 3172 PwoCas +1342 3118 PwoCas +1343 3071 PwoCas +1344 3034 PwoCas +1345 2982 PwoCas +1346 2933 PwoCas +1347 2881 PwoCas +1348 2831 PwoCas +1349 2787 PwoCas +1350 2738 PwoCas +1351 2688 PwoCas +1352 2642 PwoCas +1353 2594 PwoCas +1354 2558 PwoCas +1355 2511 PwoCas +1356 2466 PwoCas +1357 2423 PwoCas +1358 2378 PwoCas +1359 2334 PwoCas +1360 2295 PwoCas +1361 2251 PwoCas +1362 2208 PwoCas +1363 2168 PwoCas +1364 2126 PwoCas +1365 2084 PwoCas +1366 2047 PwoCas +1367 2038 PwoCas +1368 1999 PwoCas +1369 1961 PwoCas +1370 1922 PwoCas +1371 1887 PwoCas +1372 1851 PwoCas +1373 1814 PwoCas +1374 1784 PwoCas +1375 1748 PwoCas +1376 1713 PwoCas +1377 1678 PwoCas +1378 1646 PwoCas +1379 1612 PwoCas +1380 1579 PwoCas +1381 1546 PwoCas +1382 1526 PwoCas +1383 1495 PwoCas +1384 1464 PwoCas +1385 1433 PwoCas +1386 1405 PwoCas +1387 1375 PwoCas +1388 1345 PwoCas +1389 1316 PwoCas +1390 1287 PwoCas +1391 1265 PwoCas +1392 1238 PwoCas +1393 1211 PwoCas +1394 1183 PwoCas +1395 1157 PwoCas +1396 1133 PwoCas +1397 1108 PwoCas +1398 1083 PwoCas +1399 1057 PwoCas +1400 1033 PwoCas +1401 1023 PwoCas +1402 1008 PwoCas +1403 985 PwoCas +1404 962 PwoCas +1405 941 PwoCas +1406 919 PwoCas +1407 897 PwoCas +1408 879 PwoCas +1409 859 PwoCas +1410 838 PwoCas +1411 819 PwoCas +1412 799 PwoCas +1413 780 PwoCas +1414 767 PwoCas +1415 749 PwoCas +1416 731 PwoCas +1417 713 PwoCas +1418 697 PwoCas +1419 679 PwoCas +1420 663 PwoCas +1421 646 PwoCas +1422 633 PwoCas +1423 617 PwoCas +1424 601 PwoCas +1425 586 PwoCas +1426 572 PwoCas +1427 557 PwoCas +1428 543 PwoCas +1429 528 PwoCas +1430 514 PwoCas +1431 511 PwoCas +1432 501 PwoCas +1433 488 PwoCas +1434 476 PwoCas +1435 463 PwoCas +1436 451 PwoCas +1437 441 PwoCas +1438 429 PwoCas +1439 418 PwoCas +1440 407 PwoCas +1441 396 PwoCas +1442 385 PwoCas +1443 378 PwoCas +1444 368 PwoCas +1445 358 PwoCas +1446 349 PwoCas +1447 339 PwoCas +1448 330 PwoCas +1449 321 PwoCas +1450 314 PwoCas +1451 305 PwoCas +1452 296 PwoCas +1453 288 PwoCas +1454 281 PwoCas +1455 272 PwoCas +1456 265 PwoCas +1457 257 PwoCas +1458 255 PwoCas +1459 250 PwoCas +1460 243 PwoCas +1461 237 PwoCas +1462 230 PwoCas +1463 223 PwoCas +1464 218 PwoCas +1465 211 PwoCas +1466 206 PwoCas +1467 200 PwoCas +1468 194 PwoCas +1469 190 PwoCas +1470 185 PwoCas +1471 179 PwoCas +1472 174 PwoCas +1473 169 PwoCas +1474 164 PwoCas +1475 159 PwoCas +1476 156 PwoCas +1477 151 PwoCas +1478 147 PwoCas +1479 143 PwoCas +1480 138 PwoCas +1481 134 PwoCas +1482 130 PwoCas +1483 127 PwoCas +1484 126 PwoCas +1485 123 PwoCas +1486 119 PwoCas +1487 116 PwoCas +1488 112 PwoCas +1489 109 PwoCas +1490 106 PwoCas +1491 103 PwoCas +1492 100 PwoCas +1493 97 PwoCas +1494 95 PwoCas +1495 92 PwoCas +1496 89 PwoCas +1497 87 PwoCas +1498 84 PwoCas +1499 82 PwoCas +1500 79 PwoCas +1501 77 PwoCas +1502 75 PwoCas +1503 72 PwoCas +1504 70 PwoCas +1505 68 PwoCas +1506 66 PwoCas +1507 64 PwoCas +1508 63 PwoCas +1509 62 PwoCas +1510 60 PwoCas +1511 59 PwoCas +1512 57 PwoCas +1513 55 PwoCas +1514 53 PwoCas +1515 52 PwoCas +1516 50 PwoCas +1517 49 PwoCas +1518 47 PwoCas +1519 46 PwoCas +1520 45 PwoCas +1521 43 PwoCas +1522 42 PwoCas +1523 41 PwoCas +1524 40 PwoCas +1525 39 PwoCas +1526 37 PwoCas +1527 36 PwoCas +1528 35 PwoCas +1529 34 PwoCas +1530 33 PwoCas +1531 32 PwoCas +1532 31 PwoCas +1533 31 PwoCas +1534 30 PwoCas +1535 29 PwoCas +1536 28 PwoCas +1537 27 PwoCas +1538 27 PwoCas +1539 26 PwoCas +1540 25 PwoCas +1541 24 PwoCas +1542 23 PwoCas +1543 23 PwoCas +1544 22 PwoCas +1545 22 PwoCas +1546 21 PwoCas +1547 20 PwoCas +1548 20 PwoCas +1549 19 PwoCas +1550 18 PwoCas +1551 18 PwoCas +1552 17 PwoCas +1553 17 PwoCas +1554 16 PwoCas +1555 16 PwoCas +1556 15 PwoCas +1557 15 PwoCas +1558 15 PwoCas +1559 14 PwoCas +1560 14 PwoCas +1561 13 PwoCas +1562 13 PwoCas +1563 13 PwoCas +1564 12 PwoCas +1565 12 PwoCas +1566 11 PwoCas +1567 11 PwoCas +1568 11 PwoCas +1569 11 PwoCas +1570 10 PwoCas +1571 10 PwoCas +1572 10 PwoCas +1573 9 PwoCas +1574 9 PwoCas +1575 9 PwoCas +1576 8 PwoCas +1577 8 PwoCas +1578 8 PwoCas +1579 8 PwoCas +1580 7 PwoCas +1581 7 PwoCas +1582 7 PwoCas +1583 7 PwoCas +1584 7 PwoCas +1585 6 PwoCas +1586 6 PwoCas +1587 6 PwoCas +1588 6 PwoCas +1589 6 PwoCas +1590 5 PwoCas +1591 5 PwoCas +1592 5 PwoCas +1593 5 PwoCas +1594 5 PwoCas +1595 5 PwoCas +1596 5 PwoCas +1597 4 PwoCas +1598 4 PwoCas +1599 4 PwoCas +1600 4 PwoCas +1601 4 PwoCas +1602 4 PwoCas +1603 4 PwoCas +1604 3 PwoCas +1605 3 PwoCas +1606 3 PwoCas +1607 3 PwoCas +1608 3 PwoCas +1609 3 PwoCas +1610 3 PwoCas +1611 3 PwoCas +1612 3 PwoCas +1613 3 PwoCas +1614 2 PwoCas +1615 2 PwoCas +1616 2 PwoCas +1617 2 PwoCas +1618 2 PwoCas +1619 2 PwoCas +1620 2 PwoCas +1621 2 PwoCas +1622 2 PwoCas +1623 2 PwoCas +1624 2 PwoCas +1625 2 PwoCas +1626 2 PwoCas +1627 2 PwoCas +1628 1 PwoCas +1629 1 PwoCas +1630 1 PwoCas +1631 1 PwoCas +1632 1 PwoCas +1633 1 PwoCas +1634 1 PwoCas +1635 1 PwoCas +1636 1 PwoCas +1637 1 PwoCas +1638 1 PwoCas +1639 1 PwoCas +1640 1 PwoCas +1641 1 PwoCas +1642 1 PwoCas +1643 1 PwoCas +1644 1 PwoCas +1645 1 PwoCas +1646 1 PwoCas +1647 1 PwoCas +1648 1 PwoCas +1649 1 PwoCas +1650 1 PwoCas +1651 1 PwoCas +1652 0 PwoCas +1653 0 PwoCas +1654 0 PwoCas +1655 0 PwoCas +1656 0 PwoCas +1657 0 PwoCas +1658 0 PwoCas +1659 0 PwoCas +1660 0 PwoCas +1661 0 PwoCas +1662 0 PwoCas +1663 0 PwoCas +1664 0 PwoCas +1665 0 PwoCas +1666 0 PwoCas +1667 0 PwoCas +1668 0 PwoCas +1669 0 PwoCas +1670 0 PwoCas +1671 0 PwoCas +1672 0 PwoCas +1673 0 PwoCas +1674 0 PwoCas +1675 0 PwoCas +1676 0 PwoCas +1677 0 PwoCas +1678 0 PwoCas +1679 0 PwoCas +1680 0 PwoCas +1681 0 PwoCas +1682 0 PwoCas +1683 0 PwoCas +1684 0 PwoCas +1685 0 PwoCas +1686 0 PwoCas +1687 0 PwoCas +1688 0 PwoCas +1689 0 PwoCas +1690 0 PwoCas +1691 0 PwoCas +1692 0 PwoCas +1693 0 PwoCas +1694 0 PwoCas +1695 0 PwoCas +1696 0 PwoCas +1697 0 PwoCas +1698 0 PwoCas +1699 0 PwoCas +1700 0 PwoCas +1701 0 PwoCas +1702 0 PwoCas +1703 0 PwoCas +1704 0 PwoCas +1705 0 PwoCas +1706 0 PwoCas +1707 0 PwoCas +1708 0 PwoCas +1709 0 PwoCas +1710 0 PwoCas +1711 0 PwoCas +1712 0 PwoCas +1713 0 PwoCas +1714 0 PwoCas +1715 0 PwoCas +1716 0 PwoCas +1717 0 PwoCas +1718 0 PwoCas +1719 0 PwoCas +1720 0 PwoCas +1721 0 PwoCas +1722 0 PwoCas +1723 0 PwoCas +1724 0 PwoCas +1725 0 PwoCas +1726 0 PwoCas +1727 0 PwoCas +1728 0 PwoCas +1729 0 PwoCas +1730 0 PwoCas +1731 0 PwoCas +1732 0 PwoCas +1733 0 PwoCas +1734 0 PwoCas +1735 0 PwoCas +1736 0 PwoCas +1737 0 PwoCas +1738 0 PwoCas +1739 0 PwoCas +1740 0 PwoCas +1741 0 PwoCas +1742 0 PwoCas +1743 0 PwoCas +1744 0 PwoCas +1745 0 PwoCas +1746 0 PwoCas +1747 0 PwoCas +1748 0 PwoCas +1749 0 PwoCas +1750 0 PwoCas +1751 0 PwoCas +1752 0 PwoCas +1753 0 PwoCas +1754 0 PwoCas +1755 0 PwoCas +1756 0 PwoCas +1757 0 PwoCas +1758 0 PwoCas +1759 0 PwoCas +1760 0 PwoCas +1761 0 PwoCas +1762 0 PwoCas +1763 0 PwoCas +1764 0 PwoCas +1765 0 PwoCas +1766 0 PwoCas +1767 0 PwoCas +1768 0 PwoCas +1769 0 PwoCas +1770 0 PwoCas +1771 0 PwoCas +1772 0 PwoCas +1773 0 PwoCas +1774 0 PwoCas +1775 0 PwoCas +1776 0 PwoCas +1777 0 PwoCas +1778 0 PwoCas +1779 0 PwoCas +1780 0 PwoCas +1781 0 PwoCas +1782 0 PwoCas +1783 0 PwoCas +1784 0 PwoCas +1785 0 PwoCas +1786 0 PwoCas +1787 0 PwoCas +1788 0 PwoCas +1789 0 PwoCas +1790 0 PwoCas +1791 0 PwoCas +1792 0 PwoCas +1793 0 PwoCas +1794 0 PwoCas +1795 0 PwoCas +1796 0 PwoCas +1797 0 PwoCas +1798 0 PwoCas +1799 0 PwoCas +1800 0 PwoCas diff --git a/hal_psee_plugins/biasgen/gen3_idac_railp.calib b/hal_psee_plugins/biasgen/gen3_idac_railp.calib new file mode 100644 index 000000000..813f98f78 --- /dev/null +++ b/hal_psee_plugins/biasgen/gen3_idac_railp.calib @@ -0,0 +1,1801 @@ +0 127 RailP +1 127 RailP +2 127 RailP +3 127 RailP +4 127 RailP +5 127 RailP +6 127 RailP +7 127 RailP +8 127 RailP +9 127 RailP +10 127 RailP +11 127 RailP +12 127 RailP +13 127 RailP +14 127 RailP +15 127 RailP +16 127 RailP +17 127 RailP +18 127 RailP +19 127 RailP +20 127 RailP +21 127 RailP +22 127 RailP +23 127 RailP +24 127 RailP +25 127 RailP +26 127 RailP +27 127 RailP +28 127 RailP +29 127 RailP +30 127 RailP +31 127 RailP +32 127 RailP +33 127 RailP +34 127 RailP +35 127 RailP +36 127 RailP +37 127 RailP +38 127 RailP +39 127 RailP +40 127 RailP +41 127 RailP +42 127 RailP +43 127 RailP +44 127 RailP +45 127 RailP +46 127 RailP +47 127 RailP +48 127 RailP +49 127 RailP +50 127 RailP +51 127 RailP +52 127 RailP +53 127 RailP +54 127 RailP +55 127 RailP +56 127 RailP +57 127 RailP +58 127 RailP +59 127 RailP +60 127 RailP +61 127 RailP +62 127 RailP +63 127 RailP +64 127 RailP +65 127 RailP +66 127 RailP +67 127 RailP +68 127 RailP +69 127 RailP +70 127 RailP +71 127 RailP +72 127 RailP +73 127 RailP +74 127 RailP +75 127 RailP +76 127 RailP +77 127 RailP +78 127 RailP +79 127 RailP +80 127 RailP +81 127 RailP +82 127 RailP +83 127 RailP +84 127 RailP +85 127 RailP +86 127 RailP +87 127 RailP +88 127 RailP +89 127 RailP +90 127 RailP +91 127 RailP +92 127 RailP +93 127 RailP +94 127 RailP +95 127 RailP +96 127 RailP +97 127 RailP +98 127 RailP +99 127 RailP +100 127 RailP +101 127 RailP +102 127 RailP +103 127 RailP +104 127 RailP +105 127 RailP +106 127 RailP +107 127 RailP +108 127 RailP +109 127 RailP +110 127 RailP +111 127 RailP +112 127 RailP +113 127 RailP +114 127 RailP +115 127 RailP +116 127 RailP +117 127 RailP +118 127 RailP +119 127 RailP +120 127 RailP +121 127 RailP +122 127 RailP +123 127 RailP +124 127 RailP +125 127 RailP +126 127 RailP +127 127 RailP +128 127 RailP +129 127 RailP +130 127 RailP +131 127 RailP +132 127 RailP +133 127 RailP +134 127 RailP +135 127 RailP +136 127 RailP +137 127 RailP +138 127 RailP +139 127 RailP +140 127 RailP +141 127 RailP +142 127 RailP +143 127 RailP +144 127 RailP +145 127 RailP +146 127 RailP +147 127 RailP +148 127 RailP +149 127 RailP +150 127 RailP +151 127 RailP +152 127 RailP +153 127 RailP +154 127 RailP +155 127 RailP +156 127 RailP +157 127 RailP +158 127 RailP +159 127 RailP +160 127 RailP +161 127 RailP +162 127 RailP +163 127 RailP +164 127 RailP +165 127 RailP +166 127 RailP +167 127 RailP +168 127 RailP +169 127 RailP +170 127 RailP +171 127 RailP +172 127 RailP +173 127 RailP +174 127 RailP +175 127 RailP +176 127 RailP +177 127 RailP +178 127 RailP +179 127 RailP +180 127 RailP +181 127 RailP +182 127 RailP +183 127 RailP +184 127 RailP +185 127 RailP +186 127 RailP +187 127 RailP +188 127 RailP +189 127 RailP +190 127 RailP +191 127 RailP +192 127 RailP +193 127 RailP +194 127 RailP +195 127 RailP +196 127 RailP +197 127 RailP +198 127 RailP +199 127 RailP +200 127 RailP +201 127 RailP +202 127 RailP +203 127 RailP +204 127 RailP +205 127 RailP +206 127 RailP +207 127 RailP +208 127 RailP +209 127 RailP +210 127 RailP +211 127 RailP +212 127 RailP +213 127 RailP +214 127 RailP +215 127 RailP +216 127 RailP +217 127 RailP +218 127 RailP +219 127 RailP +220 127 RailP +221 127 RailP +222 127 RailP +223 127 RailP +224 127 RailP +225 127 RailP +226 127 RailP +227 127 RailP +228 127 RailP +229 127 RailP +230 127 RailP +231 127 RailP +232 127 RailP +233 127 RailP +234 127 RailP +235 127 RailP +236 127 RailP +237 127 RailP +238 127 RailP +239 127 RailP +240 127 RailP +241 127 RailP +242 127 RailP +243 127 RailP +244 127 RailP +245 127 RailP +246 127 RailP +247 127 RailP +248 127 RailP +249 127 RailP +250 127 RailP +251 127 RailP +252 127 RailP +253 127 RailP +254 127 RailP +255 127 RailP +256 127 RailP +257 127 RailP +258 127 RailP +259 127 RailP +260 127 RailP +261 127 RailP +262 127 RailP +263 127 RailP +264 127 RailP +265 127 RailP +266 127 RailP +267 127 RailP +268 127 RailP +269 127 RailP +270 127 RailP +271 127 RailP +272 127 RailP +273 127 RailP +274 127 RailP +275 127 RailP +276 127 RailP +277 127 RailP +278 127 RailP +279 127 RailP +280 127 RailP +281 127 RailP +282 127 RailP +283 127 RailP +284 127 RailP +285 127 RailP +286 127 RailP +287 127 RailP +288 127 RailP +289 127 RailP +290 127 RailP +291 127 RailP +292 127 RailP +293 127 RailP +294 127 RailP +295 127 RailP +296 127 RailP +297 127 RailP +298 127 RailP +299 127 RailP +300 127 RailP +301 127 RailP +302 127 RailP +303 127 RailP +304 127 RailP +305 127 RailP +306 127 RailP +307 127 RailP +308 127 RailP +309 127 RailP +310 127 RailP +311 127 RailP +312 127 RailP +313 127 RailP +314 127 RailP +315 127 RailP +316 127 RailP +317 127 RailP +318 127 RailP +319 127 RailP +320 127 RailP +321 127 RailP +322 127 RailP +323 127 RailP +324 127 RailP +325 127 RailP +326 127 RailP +327 127 RailP +328 127 RailP +329 127 RailP +330 127 RailP +331 127 RailP +332 127 RailP +333 127 RailP +334 127 RailP +335 127 RailP +336 127 RailP +337 127 RailP +338 127 RailP +339 127 RailP +340 127 RailP +341 127 RailP +342 127 RailP +343 127 RailP +344 127 RailP +345 127 RailP +346 127 RailP +347 127 RailP +348 127 RailP +349 127 RailP +350 127 RailP +351 127 RailP +352 127 RailP +353 127 RailP +354 127 RailP +355 127 RailP +356 127 RailP +357 127 RailP +358 127 RailP +359 127 RailP +360 127 RailP +361 127 RailP +362 127 RailP +363 127 RailP +364 127 RailP +365 127 RailP +366 127 RailP +367 127 RailP +368 127 RailP +369 127 RailP +370 127 RailP +371 127 RailP +372 127 RailP +373 127 RailP +374 127 RailP +375 127 RailP +376 127 RailP +377 127 RailP +378 127 RailP +379 127 RailP +380 127 RailP +381 127 RailP +382 127 RailP +383 127 RailP +384 127 RailP +385 127 RailP +386 127 RailP +387 127 RailP +388 127 RailP +389 127 RailP +390 127 RailP +391 127 RailP +392 127 RailP +393 127 RailP +394 127 RailP +395 127 RailP +396 127 RailP +397 127 RailP +398 127 RailP +399 127 RailP +400 127 RailP +401 127 RailP +402 127 RailP +403 127 RailP +404 127 RailP +405 127 RailP +406 127 RailP +407 127 RailP +408 127 RailP +409 127 RailP +410 127 RailP +411 127 RailP +412 127 RailP +413 127 RailP +414 127 RailP +415 127 RailP +416 127 RailP +417 127 RailP +418 127 RailP +419 127 RailP +420 127 RailP +421 127 RailP +422 127 RailP +423 127 RailP +424 127 RailP +425 127 RailP +426 127 RailP +427 127 RailP +428 127 RailP +429 127 RailP +430 127 RailP +431 127 RailP +432 127 RailP +433 127 RailP +434 127 RailP +435 127 RailP +436 127 RailP +437 127 RailP +438 127 RailP +439 127 RailP +440 127 RailP +441 127 RailP +442 127 RailP +443 127 RailP +444 127 RailP +445 127 RailP +446 127 RailP +447 127 RailP +448 127 RailP +449 127 RailP +450 127 RailP +451 127 RailP +452 127 RailP +453 127 RailP +454 127 RailP +455 127 RailP +456 127 RailP +457 127 RailP +458 127 RailP +459 127 RailP +460 127 RailP +461 127 RailP +462 127 RailP +463 127 RailP +464 127 RailP +465 127 RailP +466 127 RailP +467 127 RailP +468 127 RailP +469 127 RailP +470 127 RailP +471 127 RailP +472 127 RailP +473 127 RailP +474 127 RailP +475 127 RailP +476 127 RailP +477 127 RailP +478 127 RailP +479 127 RailP +480 127 RailP +481 127 RailP +482 127 RailP +483 127 RailP +484 127 RailP +485 127 RailP +486 127 RailP +487 127 RailP +488 127 RailP +489 127 RailP +490 127 RailP +491 127 RailP +492 127 RailP +493 127 RailP +494 127 RailP +495 127 RailP +496 127 RailP +497 127 RailP +498 127 RailP +499 127 RailP +500 127 RailP +501 127 RailP +502 127 RailP +503 127 RailP +504 127 RailP +505 127 RailP +506 127 RailP +507 127 RailP +508 127 RailP +509 127 RailP +510 127 RailP +511 127 RailP +512 127 RailP +513 127 RailP +514 127 RailP +515 127 RailP +516 127 RailP +517 127 RailP +518 127 RailP +519 127 RailP +520 127 RailP +521 127 RailP +522 127 RailP +523 127 RailP +524 127 RailP +525 127 RailP +526 127 RailP +527 127 RailP +528 127 RailP +529 127 RailP +530 127 RailP +531 127 RailP +532 127 RailP +533 127 RailP +534 127 RailP +535 127 RailP +536 127 RailP +537 127 RailP +538 127 RailP +539 127 RailP +540 127 RailP +541 127 RailP +542 127 RailP +543 127 RailP +544 127 RailP +545 127 RailP +546 127 RailP +547 127 RailP +548 127 RailP +549 127 RailP +550 127 RailP +551 127 RailP +552 127 RailP +553 127 RailP +554 127 RailP +555 127 RailP +556 127 RailP +557 127 RailP +558 127 RailP +559 127 RailP +560 127 RailP +561 127 RailP +562 127 RailP +563 127 RailP +564 127 RailP +565 127 RailP +566 127 RailP +567 127 RailP +568 127 RailP +569 127 RailP +570 127 RailP +571 127 RailP +572 127 RailP +573 127 RailP +574 127 RailP +575 127 RailP +576 127 RailP +577 127 RailP +578 127 RailP +579 127 RailP +580 127 RailP +581 127 RailP +582 127 RailP +583 127 RailP +584 127 RailP +585 127 RailP +586 127 RailP +587 127 RailP +588 127 RailP +589 127 RailP +590 127 RailP +591 127 RailP +592 127 RailP +593 127 RailP +594 127 RailP +595 127 RailP +596 127 RailP +597 127 RailP +598 127 RailP +599 127 RailP +600 127 RailP +601 127 RailP +602 127 RailP +603 127 RailP +604 127 RailP +605 127 RailP +606 127 RailP +607 127 RailP +608 127 RailP +609 127 RailP +610 127 RailP +611 127 RailP +612 127 RailP +613 127 RailP +614 127 RailP +615 127 RailP +616 127 RailP +617 127 RailP +618 127 RailP +619 127 RailP +620 127 RailP +621 127 RailP +622 127 RailP +623 127 RailP +624 127 RailP +625 127 RailP +626 127 RailP +627 127 RailP +628 127 RailP +629 127 RailP +630 127 RailP +631 127 RailP +632 127 RailP +633 127 RailP +634 127 RailP +635 127 RailP +636 127 RailP +637 127 RailP +638 127 RailP +639 127 RailP +640 127 RailP +641 127 RailP +642 127 RailP +643 127 RailP +644 127 RailP +645 127 RailP +646 127 RailP +647 127 RailP +648 127 RailP +649 127 RailP +650 127 RailP +651 127 RailP +652 127 RailP +653 127 RailP +654 127 RailP +655 127 RailP +656 127 RailP +657 127 RailP +658 127 RailP +659 127 RailP +660 127 RailP +661 127 RailP +662 127 RailP +663 127 RailP +664 127 RailP +665 127 RailP +666 127 RailP +667 127 RailP +668 127 RailP +669 127 RailP +670 127 RailP +671 127 RailP +672 127 RailP +673 127 RailP +674 127 RailP +675 127 RailP +676 127 RailP +677 127 RailP +678 127 RailP +679 127 RailP +680 127 RailP +681 127 RailP +682 127 RailP +683 127 RailP +684 127 RailP +685 127 RailP +686 127 RailP +687 127 RailP +688 127 RailP +689 127 RailP +690 127 RailP +691 127 RailP +692 127 RailP +693 127 RailP +694 127 RailP +695 127 RailP +696 127 RailP +697 127 RailP +698 127 RailP +699 127 RailP +700 127 RailP +701 127 RailP +702 127 RailP +703 127 RailP +704 127 RailP +705 127 RailP +706 127 RailP +707 127 RailP +708 127 RailP +709 127 RailP +710 127 RailP +711 127 RailP +712 127 RailP +713 127 RailP +714 127 RailP +715 127 RailP +716 127 RailP +717 127 RailP +718 127 RailP +719 127 RailP +720 127 RailP +721 127 RailP +722 127 RailP +723 127 RailP +724 127 RailP +725 127 RailP +726 127 RailP +727 127 RailP +728 127 RailP +729 127 RailP +730 127 RailP +731 127 RailP +732 127 RailP +733 127 RailP +734 127 RailP +735 127 RailP +736 127 RailP +737 127 RailP +738 127 RailP +739 127 RailP +740 127 RailP +741 127 RailP +742 127 RailP +743 127 RailP +744 127 RailP +745 127 RailP +746 127 RailP +747 127 RailP +748 127 RailP +749 127 RailP +750 127 RailP +751 127 RailP +752 127 RailP +753 127 RailP +754 127 RailP +755 127 RailP +756 127 RailP +757 127 RailP +758 127 RailP +759 127 RailP +760 127 RailP +761 127 RailP +762 127 RailP +763 127 RailP +764 127 RailP +765 127 RailP +766 127 RailP +767 127 RailP +768 127 RailP +769 127 RailP +770 127 RailP +771 127 RailP +772 127 RailP +773 127 RailP +774 127 RailP +775 127 RailP +776 127 RailP +777 127 RailP +778 127 RailP +779 127 RailP +780 127 RailP +781 127 RailP +782 127 RailP +783 127 RailP +784 127 RailP +785 127 RailP +786 127 RailP +787 127 RailP +788 127 RailP +789 127 RailP +790 127 RailP +791 127 RailP +792 127 RailP +793 127 RailP +794 127 RailP +795 127 RailP +796 127 RailP +797 127 RailP +798 127 RailP +799 127 RailP +800 127 RailP +801 127 RailP +802 127 RailP +803 127 RailP +804 127 RailP +805 127 RailP +806 127 RailP +807 127 RailP +808 127 RailP +809 127 RailP +810 127 RailP +811 127 RailP +812 127 RailP +813 127 RailP +814 127 RailP +815 127 RailP +816 127 RailP +817 127 RailP +818 127 RailP +819 127 RailP +820 127 RailP +821 127 RailP +822 127 RailP +823 127 RailP +824 127 RailP +825 127 RailP +826 127 RailP +827 127 RailP +828 127 RailP +829 127 RailP +830 127 RailP +831 127 RailP +832 127 RailP +833 127 RailP +834 127 RailP +835 127 RailP +836 127 RailP +837 127 RailP +838 127 RailP +839 127 RailP +840 127 RailP +841 127 RailP +842 127 RailP +843 127 RailP +844 127 RailP +845 127 RailP +846 127 RailP +847 127 RailP +848 127 RailP +849 127 RailP +850 127 RailP +851 127 RailP +852 127 RailP +853 127 RailP +854 127 RailP +855 127 RailP +856 127 RailP +857 127 RailP +858 127 RailP +859 127 RailP +860 127 RailP +861 127 RailP +862 127 RailP +863 127 RailP +864 127 RailP +865 127 RailP +866 127 RailP +867 127 RailP +868 127 RailP +869 127 RailP +870 127 RailP +871 127 RailP +872 127 RailP +873 127 RailP +874 127 RailP +875 127 RailP +876 127 RailP +877 127 RailP +878 127 RailP +879 127 RailP +880 127 RailP +881 127 RailP +882 127 RailP +883 127 RailP +884 127 RailP +885 127 RailP +886 127 RailP +887 127 RailP +888 127 RailP +889 127 RailP +890 127 RailP +891 127 RailP +892 127 RailP +893 127 RailP +894 127 RailP +895 127 RailP +896 127 RailP +897 127 RailP +898 127 RailP +899 127 RailP +900 127 RailP +901 127 RailP +902 127 RailP +903 127 RailP +904 127 RailP +905 127 RailP +906 127 RailP +907 127 RailP +908 127 RailP +909 127 RailP +910 127 RailP +911 127 RailP +912 127 RailP +913 127 RailP +914 127 RailP +915 127 RailP +916 127 RailP +917 127 RailP +918 127 RailP +919 127 RailP +920 127 RailP +921 127 RailP +922 127 RailP +923 127 RailP +924 127 RailP +925 127 RailP +926 127 RailP +927 127 RailP +928 127 RailP +929 127 RailP +930 127 RailP +931 127 RailP +932 127 RailP +933 127 RailP +934 127 RailP +935 127 RailP +936 127 RailP +937 127 RailP +938 127 RailP +939 127 RailP +940 127 RailP +941 127 RailP +942 127 RailP +943 127 RailP +944 127 RailP +945 127 RailP +946 127 RailP +947 127 RailP +948 127 RailP +949 127 RailP +950 127 RailP +951 127 RailP +952 127 RailP +953 127 RailP +954 127 RailP +955 127 RailP +956 127 RailP +957 127 RailP +958 127 RailP +959 127 RailP +960 127 RailP +961 127 RailP +962 127 RailP +963 127 RailP +964 127 RailP +965 127 RailP +966 127 RailP +967 127 RailP +968 127 RailP +969 127 RailP +970 127 RailP +971 127 RailP +972 127 RailP +973 127 RailP +974 127 RailP +975 127 RailP +976 127 RailP +977 127 RailP +978 127 RailP +979 127 RailP +980 127 RailP +981 127 RailP +982 127 RailP +983 127 RailP +984 127 RailP +985 127 RailP +986 127 RailP +987 127 RailP +988 127 RailP +989 127 RailP +990 127 RailP +991 127 RailP +992 127 RailP +993 127 RailP +994 127 RailP +995 127 RailP +996 127 RailP +997 127 RailP +998 127 RailP +999 127 RailP +1000 127 RailP +1001 127 RailP +1002 127 RailP +1003 127 RailP +1004 127 RailP +1005 127 RailP +1006 127 RailP +1007 127 RailP +1008 127 RailP +1009 127 RailP +1010 127 RailP +1011 127 RailP +1012 127 RailP +1013 127 RailP +1014 127 RailP +1015 127 RailP +1016 127 RailP +1017 127 RailP +1018 127 RailP +1019 127 RailP +1020 127 RailP +1021 127 RailP +1022 127 RailP +1023 127 RailP +1024 127 RailP +1025 127 RailP +1026 127 RailP +1027 127 RailP +1028 127 RailP +1029 127 RailP +1030 127 RailP +1031 127 RailP +1032 127 RailP +1033 127 RailP +1034 127 RailP +1035 127 RailP +1036 127 RailP +1037 127 RailP +1038 127 RailP +1039 127 RailP +1040 127 RailP +1041 127 RailP +1042 127 RailP +1043 127 RailP +1044 127 RailP +1045 127 RailP +1046 127 RailP +1047 127 RailP +1048 127 RailP +1049 127 RailP +1050 127 RailP +1051 127 RailP +1052 127 RailP +1053 127 RailP +1054 127 RailP +1055 127 RailP +1056 127 RailP +1057 127 RailP +1058 127 RailP +1059 127 RailP +1060 127 RailP +1061 127 RailP +1062 127 RailP +1063 127 RailP +1064 127 RailP +1065 127 RailP +1066 127 RailP +1067 127 RailP +1068 127 RailP +1069 127 RailP +1070 127 RailP +1071 127 RailP +1072 127 RailP +1073 127 RailP +1074 127 RailP +1075 127 RailP +1076 127 RailP +1077 127 RailP +1078 127 RailP +1079 127 RailP +1080 127 RailP +1081 127 RailP +1082 127 RailP +1083 127 RailP +1084 127 RailP +1085 127 RailP +1086 127 RailP +1087 127 RailP +1088 127 RailP +1089 127 RailP +1090 127 RailP +1091 127 RailP +1092 127 RailP +1093 127 RailP +1094 127 RailP +1095 127 RailP +1096 127 RailP +1097 127 RailP +1098 127 RailP +1099 127 RailP +1100 127 RailP +1101 127 RailP +1102 127 RailP +1103 127 RailP +1104 127 RailP +1105 127 RailP +1106 127 RailP +1107 127 RailP +1108 127 RailP +1109 127 RailP +1110 127 RailP +1111 127 RailP +1112 127 RailP +1113 127 RailP +1114 127 RailP +1115 127 RailP +1116 127 RailP +1117 127 RailP +1118 127 RailP +1119 127 RailP +1120 127 RailP +1121 127 RailP +1122 127 RailP +1123 127 RailP +1124 127 RailP +1125 127 RailP +1126 127 RailP +1127 127 RailP +1128 127 RailP +1129 127 RailP +1130 127 RailP +1131 127 RailP +1132 127 RailP +1133 127 RailP +1134 127 RailP +1135 127 RailP +1136 127 RailP +1137 127 RailP +1138 127 RailP +1139 127 RailP +1140 127 RailP +1141 127 RailP +1142 127 RailP +1143 127 RailP +1144 127 RailP +1145 127 RailP +1146 127 RailP +1147 127 RailP +1148 127 RailP +1149 127 RailP +1150 127 RailP +1151 127 RailP +1152 127 RailP +1153 127 RailP +1154 127 RailP +1155 127 RailP +1156 127 RailP +1157 127 RailP +1158 127 RailP +1159 127 RailP +1160 127 RailP +1161 127 RailP +1162 127 RailP +1163 127 RailP +1164 127 RailP +1165 127 RailP +1166 127 RailP +1167 127 RailP +1168 127 RailP +1169 127 RailP +1170 127 RailP +1171 127 RailP +1172 127 RailP +1173 127 RailP +1174 127 RailP +1175 127 RailP +1176 127 RailP +1177 127 RailP +1178 127 RailP +1179 127 RailP +1180 127 RailP +1181 127 RailP +1182 127 RailP +1183 127 RailP +1184 127 RailP +1185 127 RailP +1186 127 RailP +1187 127 RailP +1188 127 RailP +1189 127 RailP +1190 127 RailP +1191 127 RailP +1192 127 RailP +1193 127 RailP +1194 127 RailP +1195 126 RailP +1196 126 RailP +1197 126 RailP +1198 126 RailP +1199 125 RailP +1200 125 RailP +1201 125 RailP +1202 125 RailP +1203 124 RailP +1204 124 RailP +1205 124 RailP +1206 124 RailP +1207 124 RailP +1208 123 RailP +1209 123 RailP +1210 123 RailP +1211 123 RailP +1212 122 RailP +1213 122 RailP +1214 122 RailP +1215 122 RailP +1216 121 RailP +1217 121 RailP +1218 121 RailP +1219 121 RailP +1220 121 RailP +1221 120 RailP +1222 120 RailP +1223 120 RailP +1224 120 RailP +1225 119 RailP +1226 119 RailP +1227 119 RailP +1228 119 RailP +1229 118 RailP +1230 118 RailP +1231 118 RailP +1232 118 RailP +1233 118 RailP +1234 117 RailP +1235 117 RailP +1236 117 RailP +1237 117 RailP +1238 116 RailP +1239 116 RailP +1240 116 RailP +1241 116 RailP +1242 115 RailP +1243 115 RailP +1244 115 RailP +1245 115 RailP +1246 115 RailP +1247 114 RailP +1248 114 RailP +1249 114 RailP +1250 114 RailP +1251 113 RailP +1252 113 RailP +1253 113 RailP +1254 113 RailP +1255 112 RailP +1256 112 RailP +1257 112 RailP +1258 112 RailP +1259 112 RailP +1260 111 RailP +1261 111 RailP +1262 111 RailP +1263 111 RailP +1264 110 RailP +1265 110 RailP +1266 110 RailP +1267 110 RailP +1268 109 RailP +1269 109 RailP +1270 109 RailP +1271 109 RailP +1272 109 RailP +1273 108 RailP +1274 108 RailP +1275 108 RailP +1276 108 RailP +1277 107 RailP +1278 107 RailP +1279 107 RailP +1280 107 RailP +1281 106 RailP +1282 106 RailP +1283 106 RailP +1284 106 RailP +1285 106 RailP +1286 105 RailP +1287 105 RailP +1288 105 RailP +1289 105 RailP +1290 104 RailP +1291 104 RailP +1292 104 RailP +1293 104 RailP +1294 103 RailP +1295 103 RailP +1296 103 RailP +1297 103 RailP +1298 103 RailP +1299 102 RailP +1300 102 RailP +1301 102 RailP +1302 102 RailP +1303 101 RailP +1304 101 RailP +1305 101 RailP +1306 101 RailP +1307 100 RailP +1308 100 RailP +1309 100 RailP +1310 100 RailP +1311 100 RailP +1312 99 RailP +1313 99 RailP +1314 99 RailP +1315 99 RailP +1316 98 RailP +1317 98 RailP +1318 98 RailP +1319 98 RailP +1320 97 RailP +1321 97 RailP +1322 97 RailP +1323 97 RailP +1324 97 RailP +1325 96 RailP +1326 96 RailP +1327 96 RailP +1328 96 RailP +1329 95 RailP +1330 95 RailP +1331 95 RailP +1332 95 RailP +1333 94 RailP +1334 94 RailP +1335 94 RailP +1336 94 RailP +1337 94 RailP +1338 93 RailP +1339 93 RailP +1340 93 RailP +1341 93 RailP +1342 92 RailP +1343 92 RailP +1344 92 RailP +1345 92 RailP +1346 91 RailP +1347 91 RailP +1348 91 RailP +1349 91 RailP +1350 91 RailP +1351 90 RailP +1352 90 RailP +1353 90 RailP +1354 90 RailP +1355 89 RailP +1356 89 RailP +1357 89 RailP +1358 89 RailP +1359 89 RailP +1360 88 RailP +1361 88 RailP +1362 88 RailP +1363 88 RailP +1364 87 RailP +1365 87 RailP +1366 87 RailP +1367 87 RailP +1368 86 RailP +1369 86 RailP +1370 86 RailP +1371 86 RailP +1372 86 RailP +1373 85 RailP +1374 85 RailP +1375 85 RailP +1376 85 RailP +1377 84 RailP +1378 84 RailP +1379 84 RailP +1380 84 RailP +1381 83 RailP +1382 83 RailP +1383 83 RailP +1384 83 RailP +1385 83 RailP +1386 82 RailP +1387 82 RailP +1388 82 RailP +1389 82 RailP +1390 81 RailP +1391 81 RailP +1392 81 RailP +1393 81 RailP +1394 80 RailP +1395 80 RailP +1396 80 RailP +1397 80 RailP +1398 80 RailP +1399 79 RailP +1400 79 RailP +1401 79 RailP +1402 79 RailP +1403 78 RailP +1404 78 RailP +1405 78 RailP +1406 78 RailP +1407 77 RailP +1408 77 RailP +1409 77 RailP +1410 77 RailP +1411 77 RailP +1412 76 RailP +1413 76 RailP +1414 76 RailP +1415 76 RailP +1416 75 RailP +1417 75 RailP +1418 75 RailP +1419 75 RailP +1420 74 RailP +1421 74 RailP +1422 74 RailP +1423 74 RailP +1424 74 RailP +1425 73 RailP +1426 73 RailP +1427 73 RailP +1428 73 RailP +1429 72 RailP +1430 72 RailP +1431 72 RailP +1432 72 RailP +1433 71 RailP +1434 71 RailP +1435 71 RailP +1436 71 RailP +1437 71 RailP +1438 70 RailP +1439 70 RailP +1440 70 RailP +1441 70 RailP +1442 69 RailP +1443 69 RailP +1444 69 RailP +1445 69 RailP +1446 68 RailP +1447 68 RailP +1448 68 RailP +1449 68 RailP +1450 68 RailP +1451 67 RailP +1452 67 RailP +1453 67 RailP +1454 67 RailP +1455 66 RailP +1456 66 RailP +1457 66 RailP +1458 66 RailP +1459 65 RailP +1460 65 RailP +1461 65 RailP +1462 65 RailP +1463 65 RailP +1464 64 RailP +1465 64 RailP +1466 64 RailP +1467 64 RailP +1468 63 RailP +1469 63 RailP +1470 63 RailP +1471 63 RailP +1472 62 RailP +1473 62 RailP +1474 62 RailP +1475 62 RailP +1476 62 RailP +1477 61 RailP +1478 61 RailP +1479 61 RailP +1480 61 RailP +1481 60 RailP +1482 60 RailP +1483 60 RailP +1484 60 RailP +1485 59 RailP +1486 59 RailP +1487 59 RailP +1488 59 RailP +1489 59 RailP +1490 58 RailP +1491 58 RailP +1492 58 RailP +1493 58 RailP +1494 57 RailP +1495 57 RailP +1496 57 RailP +1497 57 RailP +1498 56 RailP +1499 56 RailP +1500 56 RailP +1501 56 RailP +1502 56 RailP +1503 55 RailP +1504 55 RailP +1505 55 RailP +1506 55 RailP +1507 54 RailP +1508 54 RailP +1509 54 RailP +1510 54 RailP +1511 53 RailP +1512 53 RailP +1513 53 RailP +1514 53 RailP +1515 53 RailP +1516 52 RailP +1517 52 RailP +1518 52 RailP +1519 52 RailP +1520 51 RailP +1521 51 RailP +1522 51 RailP +1523 51 RailP +1524 50 RailP +1525 50 RailP +1526 50 RailP +1527 50 RailP +1528 50 RailP +1529 49 RailP +1530 49 RailP +1531 49 RailP +1532 49 RailP +1533 48 RailP +1534 48 RailP +1535 48 RailP +1536 48 RailP +1537 47 RailP +1538 47 RailP +1539 47 RailP +1540 47 RailP +1541 47 RailP +1542 46 RailP +1543 46 RailP +1544 46 RailP +1545 46 RailP +1546 45 RailP +1547 45 RailP +1548 45 RailP +1549 45 RailP +1550 44 RailP +1551 44 RailP +1552 44 RailP +1553 44 RailP +1554 44 RailP +1555 43 RailP +1556 43 RailP +1557 43 RailP +1558 43 RailP +1559 42 RailP +1560 42 RailP +1561 42 RailP +1562 42 RailP +1563 42 RailP +1564 41 RailP +1565 41 RailP +1566 41 RailP +1567 41 RailP +1568 40 RailP +1569 40 RailP +1570 40 RailP +1571 40 RailP +1572 39 RailP +1573 39 RailP +1574 39 RailP +1575 39 RailP +1576 39 RailP +1577 38 RailP +1578 38 RailP +1579 38 RailP +1580 38 RailP +1581 37 RailP +1582 37 RailP +1583 37 RailP +1584 37 RailP +1585 36 RailP +1586 36 RailP +1587 36 RailP +1588 36 RailP +1589 36 RailP +1590 35 RailP +1591 35 RailP +1592 35 RailP +1593 35 RailP +1594 34 RailP +1595 34 RailP +1596 34 RailP +1597 34 RailP +1598 33 RailP +1599 33 RailP +1600 33 RailP +1601 33 RailP +1602 33 RailP +1603 32 RailP +1604 32 RailP +1605 32 RailP +1606 32 RailP +1607 31 RailP +1608 31 RailP +1609 31 RailP +1610 31 RailP +1611 30 RailP +1612 30 RailP +1613 30 RailP +1614 30 RailP +1615 30 RailP +1616 29 RailP +1617 29 RailP +1618 29 RailP +1619 29 RailP +1620 28 RailP +1621 28 RailP +1622 28 RailP +1623 28 RailP +1624 27 RailP +1625 27 RailP +1626 27 RailP +1627 27 RailP +1628 27 RailP +1629 26 RailP +1630 26 RailP +1631 26 RailP +1632 26 RailP +1633 25 RailP +1634 25 RailP +1635 25 RailP +1636 25 RailP +1637 24 RailP +1638 24 RailP +1639 24 RailP +1640 24 RailP +1641 24 RailP +1642 23 RailP +1643 23 RailP +1644 23 RailP +1645 23 RailP +1646 22 RailP +1647 22 RailP +1648 22 RailP +1649 22 RailP +1650 21 RailP +1651 21 RailP +1652 21 RailP +1653 21 RailP +1654 21 RailP +1655 20 RailP +1656 20 RailP +1657 20 RailP +1658 20 RailP +1659 19 RailP +1660 19 RailP +1661 19 RailP +1662 19 RailP +1663 18 RailP +1664 18 RailP +1665 18 RailP +1666 18 RailP +1667 18 RailP +1668 17 RailP +1669 17 RailP +1670 17 RailP +1671 17 RailP +1672 16 RailP +1673 16 RailP +1674 16 RailP +1675 16 RailP +1676 15 RailP +1677 15 RailP +1678 15 RailP +1679 15 RailP +1680 15 RailP +1681 14 RailP +1682 14 RailP +1683 14 RailP +1684 14 RailP +1685 13 RailP +1686 13 RailP +1687 13 RailP +1688 13 RailP +1689 12 RailP +1690 12 RailP +1691 12 RailP +1692 12 RailP +1693 12 RailP +1694 11 RailP +1695 11 RailP +1696 11 RailP +1697 11 RailP +1698 10 RailP +1699 10 RailP +1700 10 RailP +1701 10 RailP +1702 9 RailP +1703 9 RailP +1704 9 RailP +1705 9 RailP +1706 9 RailP +1707 8 RailP +1708 8 RailP +1709 8 RailP +1710 8 RailP +1711 7 RailP +1712 7 RailP +1713 7 RailP +1714 7 RailP +1715 6 RailP +1716 6 RailP +1717 6 RailP +1718 6 RailP +1719 6 RailP +1720 5 RailP +1721 5 RailP +1722 5 RailP +1723 5 RailP +1724 4 RailP +1725 4 RailP +1726 4 RailP +1727 4 RailP +1728 3 RailP +1729 3 RailP +1730 3 RailP +1731 3 RailP +1732 3 RailP +1733 2 RailP +1734 2 RailP +1735 2 RailP +1736 2 RailP +1737 1 RailP +1738 1 RailP +1739 1 RailP +1740 1 RailP +1741 0 RailP +1742 0 RailP +1743 0 RailP +1744 0 RailP +1745 0 RailP +1746 0 RailP +1747 0 RailP +1748 0 RailP +1749 0 RailP +1750 0 RailP +1751 0 RailP +1752 0 RailP +1753 0 RailP +1754 0 RailP +1755 0 RailP +1756 0 RailP +1757 0 RailP +1758 0 RailP +1759 0 RailP +1760 0 RailP +1761 0 RailP +1762 0 RailP +1763 0 RailP +1764 0 RailP +1765 0 RailP +1766 0 RailP +1767 0 RailP +1768 0 RailP +1769 0 RailP +1770 0 RailP +1771 0 RailP +1772 0 RailP +1773 0 RailP +1774 0 RailP +1775 0 RailP +1776 0 RailP +1777 0 RailP +1778 0 RailP +1779 0 RailP +1780 0 RailP +1781 0 RailP +1782 0 RailP +1783 0 RailP +1784 0 RailP +1785 0 RailP +1786 0 RailP +1787 0 RailP +1788 0 RailP +1789 0 RailP +1790 0 RailP +1791 0 RailP +1792 0 RailP +1793 0 RailP +1794 0 RailP +1795 0 RailP +1796 0 RailP +1797 0 RailP +1798 0 RailP +1799 0 RailP +1800 0 RailP diff --git a/hal_psee_plugins/biasgen/vdac18_8m1.calib b/hal_psee_plugins/biasgen/vdac18_8m1.calib new file mode 100644 index 000000000..156651c1e --- /dev/null +++ b/hal_psee_plugins/biasgen/vdac18_8m1.calib @@ -0,0 +1,1801 @@ +0 , 15 , 15, 21 , 1 , 1, 0 +1 , 15 , 15, 21 , 1 , 1, 0 +2 , 15 , 15, 21 , 1 , 1, 0 +3 , 15 , 15, 21 , 1 , 1, 0 +4 , 15 , 15, 21 , 1 , 1, 0 +5 , 15 , 15, 21 , 1 , 1, 0 +6 , 15 , 15, 21 , 1 , 1, 0 +7 , 15 , 15, 21 , 1 , 1, 0 +8 , 15 , 15, 21 , 1 , 1, 0 +9 , 15 , 15, 21 , 1 , 1, 0 +10 , 15 , 15, 21 , 1 , 1, 0 +11 , 15 , 15, 21 , 1 , 1, 0 +12 , 15 , 15, 21 , 1 , 1, 0 +13 , 15 , 15, 21 , 1 , 1, 0 +14 , 15 , 15, 21 , 1 , 1, 0 +15 , 15 , 15, 21 , 1 , 1, 0 +16 , 15 , 15, 21 , 1 , 1, 0 +17 , 15 , 15, 21 , 1 , 1, 0 +18 , 21 , 15, 28 , 1 , 1, 1 +19 , 21 , 15, 28 , 1 , 1, 1 +20 , 21 , 15, 28 , 1 , 1, 1 +21 , 21 , 15, 28 , 1 , 1, 1 +22 , 21 , 15, 28 , 1 , 1, 1 +23 , 21 , 15, 28 , 1 , 1, 1 +24 , 21 , 15, 28 , 1 , 1, 1 +25 , 28 , 21, 35 , 1 , 1, 2 +26 , 28 , 21, 35 , 1 , 1, 2 +27 , 28 , 21, 35 , 1 , 1, 2 +28 , 28 , 21, 35 , 1 , 1, 2 +29 , 28 , 21, 35 , 1 , 1, 2 +30 , 28 , 21, 35 , 1 , 1, 2 +31 , 28 , 21, 35 , 1 , 1, 2 +32 , 35 , 28, 41 , 1 , 1, 3 +33 , 35 , 28, 41 , 1 , 1, 3 +34 , 35 , 28, 41 , 1 , 1, 3 +35 , 35 , 28, 41 , 1 , 1, 3 +36 , 35 , 28, 41 , 1 , 1, 3 +37 , 35 , 28, 41 , 1 , 1, 3 +38 , 41 , 35, 48 , 1 , 1, 4 +39 , 41 , 35, 48 , 1 , 1, 4 +40 , 41 , 35, 48 , 1 , 1, 4 +41 , 41 , 35, 48 , 1 , 1, 4 +42 , 41 , 35, 48 , 1 , 1, 4 +43 , 41 , 35, 48 , 1 , 1, 4 +44 , 41 , 35, 48 , 1 , 1, 4 +45 , 48 , 41, 55 , 1 , 1, 5 +46 , 48 , 41, 55 , 1 , 1, 5 +47 , 48 , 41, 55 , 1 , 1, 5 +48 , 48 , 41, 55 , 1 , 1, 5 +49 , 48 , 41, 55 , 1 , 1, 5 +50 , 48 , 41, 55 , 1 , 1, 5 +51 , 48 , 41, 55 , 1 , 1, 5 +52 , 55 , 48, 62 , 1 , 1, 6 +53 , 55 , 48, 62 , 1 , 1, 6 +54 , 55 , 48, 62 , 1 , 1, 6 +55 , 55 , 48, 62 , 1 , 1, 6 +56 , 55 , 48, 62 , 1 , 1, 6 +57 , 55 , 48, 62 , 1 , 1, 6 +58 , 55 , 48, 62 , 1 , 1, 6 +59 , 62 , 55, 69 , 1 , 1, 7 +60 , 62 , 55, 69 , 1 , 1, 7 +61 , 62 , 55, 69 , 1 , 1, 7 +62 , 62 , 55, 69 , 1 , 1, 7 +63 , 62 , 55, 69 , 1 , 1, 7 +64 , 62 , 55, 69 , 1 , 1, 7 +65 , 62 , 55, 69 , 1 , 1, 7 +66 , 69 , 62, 76 , 1 , 1, 8 +67 , 69 , 62, 76 , 1 , 1, 8 +68 , 69 , 62, 76 , 1 , 1, 8 +69 , 69 , 62, 76 , 1 , 1, 8 +70 , 69 , 62, 76 , 1 , 1, 8 +71 , 69 , 62, 76 , 1 , 1, 8 +72 , 69 , 62, 76 , 1 , 1, 8 +73 , 76 , 69, 82 , 1 , 1, 9 +74 , 76 , 69, 82 , 1 , 1, 9 +75 , 76 , 69, 82 , 1 , 1, 9 +76 , 76 , 69, 82 , 1 , 1, 9 +77 , 76 , 69, 82 , 1 , 1, 9 +78 , 76 , 69, 82 , 1 , 1, 9 +79 , 82 , 76, 89 , 1 , 1, 10 +80 , 82 , 76, 89 , 1 , 1, 10 +81 , 82 , 76, 89 , 1 , 1, 10 +82 , 82 , 76, 89 , 1 , 1, 10 +83 , 82 , 76, 89 , 1 , 1, 10 +84 , 82 , 76, 89 , 1 , 1, 10 +85 , 82 , 76, 89 , 1 , 1, 10 +86 , 89 , 82, 96 , 1 , 1, 11 +87 , 89 , 82, 96 , 1 , 1, 11 +88 , 89 , 82, 96 , 1 , 1, 11 +89 , 89 , 82, 96 , 1 , 1, 11 +90 , 89 , 82, 96 , 1 , 1, 11 +91 , 89 , 82, 96 , 1 , 1, 11 +92 , 89 , 82, 96 , 1 , 1, 11 +93 , 96 , 89, 103 , 1 , 1, 12 +94 , 96 , 89, 103 , 1 , 1, 12 +95 , 96 , 89, 103 , 1 , 1, 12 +96 , 96 , 89, 103 , 1 , 1, 12 +97 , 96 , 89, 103 , 1 , 1, 12 +98 , 96 , 89, 103 , 1 , 1, 12 +99 , 96 , 89, 103 , 1 , 1, 12 +100 , 103 , 96, 110 , 1 , 1, 13 +101 , 103 , 96, 110 , 1 , 1, 13 +102 , 103 , 96, 110 , 1 , 1, 13 +103 , 103 , 96, 110 , 1 , 1, 13 +104 , 103 , 96, 110 , 1 , 1, 13 +105 , 103 , 96, 110 , 1 , 1, 13 +106 , 103 , 96, 110 , 1 , 1, 13 +107 , 110 , 103, 118 , 1 , 1, 14 +108 , 110 , 103, 118 , 1 , 1, 14 +109 , 110 , 103, 118 , 1 , 1, 14 +110 , 110 , 103, 118 , 1 , 1, 14 +111 , 110 , 103, 118 , 1 , 1, 14 +112 , 110 , 103, 118 , 1 , 1, 14 +113 , 110 , 103, 118 , 1 , 1, 14 +114 , 118 , 110, 125 , 1 , 1, 15 +115 , 118 , 110, 125 , 1 , 1, 15 +116 , 118 , 110, 125 , 1 , 1, 15 +117 , 118 , 110, 125 , 1 , 1, 15 +118 , 118 , 110, 125 , 1 , 1, 15 +119 , 118 , 110, 125 , 1 , 1, 15 +120 , 118 , 110, 125 , 1 , 1, 15 +121 , 118 , 110, 125 , 1 , 1, 15 +122 , 125 , 118, 132 , 1 , 1, 16 +123 , 125 , 118, 132 , 1 , 1, 16 +124 , 125 , 118, 132 , 1 , 1, 16 +125 , 125 , 118, 132 , 1 , 1, 16 +126 , 125 , 118, 132 , 1 , 1, 16 +127 , 125 , 118, 132 , 1 , 1, 16 +128 , 125 , 118, 132 , 1 , 1, 16 +129 , 132 , 125, 139 , 1 , 1, 17 +130 , 132 , 125, 139 , 1 , 1, 17 +131 , 132 , 125, 139 , 1 , 1, 17 +132 , 132 , 125, 139 , 1 , 1, 17 +133 , 132 , 125, 139 , 1 , 1, 17 +134 , 132 , 125, 139 , 1 , 1, 17 +135 , 132 , 125, 139 , 1 , 1, 17 +136 , 139 , 132, 146 , 1 , 1, 18 +137 , 139 , 132, 146 , 1 , 1, 18 +138 , 139 , 132, 146 , 1 , 1, 18 +139 , 139 , 132, 146 , 1 , 1, 18 +140 , 139 , 132, 146 , 1 , 1, 18 +141 , 139 , 132, 146 , 1 , 1, 18 +142 , 139 , 132, 146 , 1 , 1, 18 +143 , 146 , 139, 153 , 1 , 1, 19 +144 , 146 , 139, 153 , 1 , 1, 19 +145 , 146 , 139, 153 , 1 , 1, 19 +146 , 146 , 139, 153 , 1 , 1, 19 +147 , 146 , 139, 153 , 1 , 1, 19 +148 , 146 , 139, 153 , 1 , 1, 19 +149 , 146 , 139, 153 , 1 , 1, 19 +150 , 153 , 146, 160 , 1 , 1, 20 +151 , 153 , 146, 160 , 1 , 1, 20 +152 , 153 , 146, 160 , 1 , 1, 20 +153 , 153 , 146, 160 , 1 , 1, 20 +154 , 153 , 146, 160 , 1 , 1, 20 +155 , 153 , 146, 160 , 1 , 1, 20 +156 , 153 , 146, 160 , 1 , 1, 20 +157 , 160 , 153, 167 , 1 , 1, 21 +158 , 160 , 153, 167 , 1 , 1, 21 +159 , 160 , 153, 167 , 1 , 1, 21 +160 , 160 , 153, 167 , 1 , 1, 21 +161 , 160 , 153, 167 , 1 , 1, 21 +162 , 160 , 153, 167 , 1 , 1, 21 +163 , 160 , 153, 167 , 1 , 1, 21 +164 , 167 , 160, 174 , 1 , 1, 22 +165 , 167 , 160, 174 , 1 , 1, 22 +166 , 167 , 160, 174 , 1 , 1, 22 +167 , 167 , 160, 174 , 1 , 1, 22 +168 , 167 , 160, 174 , 1 , 1, 22 +169 , 167 , 160, 174 , 1 , 1, 22 +170 , 167 , 160, 174 , 1 , 1, 22 +171 , 174 , 167, 181 , 1 , 1, 23 +172 , 174 , 167, 181 , 1 , 1, 23 +173 , 174 , 167, 181 , 1 , 1, 23 +174 , 174 , 167, 181 , 1 , 1, 23 +175 , 174 , 167, 181 , 1 , 1, 23 +176 , 174 , 167, 181 , 1 , 1, 23 +177 , 174 , 167, 181 , 1 , 1, 23 +178 , 181 , 174, 189 , 1 , 1, 24 +179 , 181 , 174, 189 , 1 , 1, 24 +180 , 181 , 174, 189 , 1 , 1, 24 +181 , 181 , 174, 189 , 1 , 1, 24 +182 , 181 , 174, 189 , 1 , 1, 24 +183 , 181 , 174, 189 , 1 , 1, 24 +184 , 181 , 174, 189 , 1 , 1, 24 +185 , 189 , 181, 196 , 1 , 1, 25 +186 , 189 , 181, 196 , 1 , 1, 25 +187 , 189 , 181, 196 , 1 , 1, 25 +188 , 189 , 181, 196 , 1 , 1, 25 +189 , 189 , 181, 196 , 1 , 1, 25 +190 , 189 , 181, 196 , 1 , 1, 25 +191 , 189 , 181, 196 , 1 , 1, 25 +192 , 189 , 181, 196 , 1 , 1, 25 +193 , 196 , 189, 203 , 1 , 1, 26 +194 , 196 , 189, 203 , 1 , 1, 26 +195 , 196 , 189, 203 , 1 , 1, 26 +196 , 196 , 189, 203 , 1 , 1, 26 +197 , 196 , 189, 203 , 1 , 1, 26 +198 , 196 , 189, 203 , 1 , 1, 26 +199 , 196 , 189, 203 , 1 , 1, 26 +200 , 203 , 196, 210 , 1 , 1, 27 +201 , 203 , 196, 210 , 1 , 1, 27 +202 , 203 , 196, 210 , 1 , 1, 27 +203 , 203 , 196, 210 , 1 , 1, 27 +204 , 203 , 196, 210 , 1 , 1, 27 +205 , 203 , 196, 210 , 1 , 1, 27 +206 , 203 , 196, 210 , 1 , 1, 27 +207 , 210 , 203, 217 , 1 , 1, 28 +208 , 210 , 203, 217 , 1 , 1, 28 +209 , 210 , 203, 217 , 1 , 1, 28 +210 , 210 , 203, 217 , 1 , 1, 28 +211 , 210 , 203, 217 , 1 , 1, 28 +212 , 210 , 203, 217 , 1 , 1, 28 +213 , 210 , 203, 217 , 1 , 1, 28 +214 , 217 , 210, 224 , 1 , 1, 29 +215 , 217 , 210, 224 , 1 , 1, 29 +216 , 217 , 210, 224 , 1 , 1, 29 +217 , 217 , 210, 224 , 1 , 1, 29 +218 , 217 , 210, 224 , 1 , 1, 29 +219 , 217 , 210, 224 , 1 , 1, 29 +220 , 217 , 210, 224 , 1 , 1, 29 +221 , 224 , 217, 232 , 1 , 1, 30 +222 , 224 , 217, 232 , 1 , 1, 30 +223 , 224 , 217, 232 , 1 , 1, 30 +224 , 224 , 217, 232 , 1 , 1, 30 +225 , 224 , 217, 232 , 1 , 1, 30 +226 , 224 , 217, 232 , 1 , 1, 30 +227 , 224 , 217, 232 , 1 , 1, 30 +228 , 232 , 224, 240 , 1 , 1, 31 +229 , 232 , 224, 240 , 1 , 1, 31 +230 , 232 , 224, 240 , 1 , 1, 31 +231 , 232 , 224, 240 , 1 , 1, 31 +232 , 232 , 224, 240 , 1 , 1, 31 +233 , 232 , 224, 240 , 1 , 1, 31 +234 , 232 , 224, 240 , 1 , 1, 31 +235 , 232 , 224, 240 , 1 , 1, 31 +236 , 240 , 232, 247 , 1 , 1, 32 +237 , 240 , 232, 247 , 1 , 1, 32 +238 , 240 , 232, 247 , 1 , 1, 32 +239 , 240 , 232, 247 , 1 , 1, 32 +240 , 240 , 232, 247 , 1 , 1, 32 +241 , 240 , 232, 247 , 1 , 1, 32 +242 , 240 , 232, 247 , 1 , 1, 32 +243 , 240 , 232, 247 , 1 , 1, 32 +244 , 247 , 240, 253 , 1 , 1, 33 +245 , 247 , 240, 253 , 1 , 1, 33 +246 , 247 , 240, 253 , 1 , 1, 33 +247 , 247 , 240, 253 , 1 , 1, 33 +248 , 247 , 240, 253 , 1 , 1, 33 +249 , 247 , 240, 253 , 1 , 1, 33 +250 , 253 , 247, 260 , 1 , 1, 34 +251 , 253 , 247, 260 , 1 , 1, 34 +252 , 253 , 247, 260 , 1 , 1, 34 +253 , 253 , 247, 260 , 1 , 1, 34 +254 , 253 , 247, 260 , 1 , 1, 34 +255 , 253 , 247, 260 , 1 , 1, 34 +256 , 253 , 247, 260 , 1 , 1, 34 +257 , 260 , 253, 267 , 1 , 1, 35 +258 , 260 , 253, 267 , 1 , 1, 35 +259 , 260 , 253, 267 , 1 , 1, 35 +260 , 260 , 253, 267 , 1 , 1, 35 +261 , 260 , 253, 267 , 1 , 1, 35 +262 , 260 , 253, 267 , 1 , 1, 35 +263 , 260 , 253, 267 , 1 , 1, 35 +264 , 267 , 260, 274 , 1 , 1, 36 +265 , 267 , 260, 274 , 1 , 1, 36 +266 , 267 , 260, 274 , 1 , 1, 36 +267 , 267 , 260, 274 , 1 , 1, 36 +268 , 267 , 260, 274 , 1 , 1, 36 +269 , 267 , 260, 274 , 1 , 1, 36 +270 , 267 , 260, 274 , 1 , 1, 36 +271 , 274 , 267, 281 , 1 , 1, 37 +272 , 274 , 267, 281 , 1 , 1, 37 +273 , 274 , 267, 281 , 1 , 1, 37 +274 , 274 , 267, 281 , 1 , 1, 37 +275 , 274 , 267, 281 , 1 , 1, 37 +276 , 274 , 267, 281 , 1 , 1, 37 +277 , 274 , 267, 281 , 1 , 1, 37 +278 , 281 , 274, 288 , 1 , 1, 38 +279 , 281 , 274, 288 , 1 , 1, 38 +280 , 281 , 274, 288 , 1 , 1, 38 +281 , 281 , 274, 288 , 1 , 1, 38 +282 , 281 , 274, 288 , 1 , 1, 38 +283 , 281 , 274, 288 , 1 , 1, 38 +284 , 281 , 274, 288 , 1 , 1, 38 +285 , 288 , 281, 295 , 1 , 1, 39 +286 , 288 , 281, 295 , 1 , 1, 39 +287 , 288 , 281, 295 , 1 , 1, 39 +288 , 288 , 281, 295 , 1 , 1, 39 +289 , 288 , 281, 295 , 1 , 1, 39 +290 , 288 , 281, 295 , 1 , 1, 39 +291 , 288 , 281, 295 , 1 , 1, 39 +292 , 295 , 288, 302 , 1 , 1, 40 +293 , 295 , 288, 302 , 1 , 1, 40 +294 , 295 , 288, 302 , 1 , 1, 40 +295 , 295 , 288, 302 , 1 , 1, 40 +296 , 295 , 288, 302 , 1 , 1, 40 +297 , 295 , 288, 302 , 1 , 1, 40 +298 , 295 , 288, 302 , 1 , 1, 40 +299 , 302 , 295, 309 , 1 , 1, 41 +300 , 302 , 295, 309 , 1 , 1, 41 +301 , 302 , 295, 309 , 1 , 1, 41 +302 , 302 , 295, 309 , 1 , 1, 41 +303 , 302 , 295, 309 , 1 , 1, 41 +304 , 302 , 295, 309 , 1 , 1, 41 +305 , 302 , 295, 309 , 1 , 1, 41 +306 , 309 , 302, 316 , 1 , 1, 42 +307 , 309 , 302, 316 , 1 , 1, 42 +308 , 309 , 302, 316 , 1 , 1, 42 +309 , 309 , 302, 316 , 1 , 1, 42 +310 , 309 , 302, 316 , 1 , 1, 42 +311 , 309 , 302, 316 , 1 , 1, 42 +312 , 309 , 302, 316 , 1 , 1, 42 +313 , 316 , 309, 323 , 1 , 1, 43 +314 , 316 , 309, 323 , 1 , 1, 43 +315 , 316 , 309, 323 , 1 , 1, 43 +316 , 316 , 309, 323 , 1 , 1, 43 +317 , 316 , 309, 323 , 1 , 1, 43 +318 , 316 , 309, 323 , 1 , 1, 43 +319 , 316 , 309, 323 , 1 , 1, 43 +320 , 323 , 316, 330 , 1 , 1, 44 +321 , 323 , 316, 330 , 1 , 1, 44 +322 , 323 , 316, 330 , 1 , 1, 44 +323 , 323 , 316, 330 , 1 , 1, 44 +324 , 323 , 316, 330 , 1 , 1, 44 +325 , 323 , 316, 330 , 1 , 1, 44 +326 , 323 , 316, 330 , 1 , 1, 44 +327 , 330 , 323, 337 , 1 , 1, 45 +328 , 330 , 323, 337 , 1 , 1, 45 +329 , 330 , 323, 337 , 1 , 1, 45 +330 , 330 , 323, 337 , 1 , 1, 45 +331 , 330 , 323, 337 , 1 , 1, 45 +332 , 330 , 323, 337 , 1 , 1, 45 +333 , 330 , 323, 337 , 1 , 1, 45 +334 , 337 , 330, 346 , 1 , 1, 46 +335 , 337 , 330, 346 , 1 , 1, 46 +336 , 337 , 330, 346 , 1 , 1, 46 +337 , 337 , 330, 346 , 1 , 1, 46 +338 , 337 , 330, 346 , 1 , 1, 46 +339 , 337 , 330, 346 , 1 , 1, 46 +340 , 337 , 330, 346 , 1 , 1, 46 +341 , 337 , 330, 346 , 1 , 1, 46 +342 , 346 , 337, 353 , 1 , 1, 47 +343 , 346 , 337, 353 , 1 , 1, 47 +344 , 346 , 337, 353 , 1 , 1, 47 +345 , 346 , 337, 353 , 1 , 1, 47 +346 , 346 , 337, 353 , 1 , 1, 47 +347 , 346 , 337, 353 , 1 , 1, 47 +348 , 346 , 337, 353 , 1 , 1, 47 +349 , 346 , 337, 353 , 1 , 1, 47 +350 , 353 , 346, 360 , 1 , 1, 48 +351 , 353 , 346, 360 , 1 , 1, 48 +352 , 353 , 346, 360 , 1 , 1, 48 +353 , 353 , 346, 360 , 1 , 1, 48 +354 , 353 , 346, 360 , 1 , 1, 48 +355 , 353 , 346, 360 , 1 , 1, 48 +356 , 353 , 346, 360 , 1 , 1, 48 +357 , 360 , 353, 367 , 1 , 1, 49 +358 , 360 , 353, 367 , 1 , 1, 49 +359 , 360 , 353, 367 , 1 , 1, 49 +360 , 360 , 353, 367 , 1 , 1, 49 +361 , 360 , 353, 367 , 1 , 1, 49 +362 , 360 , 353, 367 , 1 , 1, 49 +363 , 360 , 353, 367 , 1 , 1, 49 +364 , 367 , 360, 373 , 1 , 1, 50 +365 , 367 , 360, 373 , 1 , 1, 50 +366 , 367 , 360, 373 , 1 , 1, 50 +367 , 367 , 360, 373 , 1 , 1, 50 +368 , 367 , 360, 373 , 1 , 1, 50 +369 , 367 , 360, 373 , 1 , 1, 50 +370 , 373 , 367, 380 , 1 , 1, 51 +371 , 373 , 367, 380 , 1 , 1, 51 +372 , 373 , 367, 380 , 1 , 1, 51 +373 , 373 , 367, 380 , 1 , 1, 51 +374 , 373 , 367, 380 , 1 , 1, 51 +375 , 373 , 367, 380 , 1 , 1, 51 +376 , 373 , 367, 380 , 1 , 1, 51 +377 , 380 , 373, 387 , 1 , 1, 52 +378 , 380 , 373, 387 , 1 , 1, 52 +379 , 380 , 373, 387 , 1 , 1, 52 +380 , 380 , 373, 387 , 1 , 1, 52 +381 , 380 , 373, 387 , 1 , 1, 52 +382 , 380 , 373, 387 , 1 , 1, 52 +383 , 380 , 373, 387 , 1 , 1, 52 +384 , 387 , 380, 394 , 1 , 1, 53 +385 , 387 , 380, 394 , 1 , 1, 53 +386 , 387 , 380, 394 , 1 , 1, 53 +387 , 387 , 380, 394 , 1 , 1, 53 +388 , 387 , 380, 394 , 1 , 1, 53 +389 , 387 , 380, 394 , 1 , 1, 53 +390 , 387 , 380, 394 , 1 , 1, 53 +391 , 394 , 387, 400 , 1 , 1, 54 +392 , 394 , 387, 400 , 1 , 1, 54 +393 , 394 , 387, 400 , 1 , 1, 54 +394 , 394 , 387, 400 , 1 , 1, 54 +395 , 394 , 387, 400 , 1 , 1, 54 +396 , 394 , 387, 400 , 1 , 1, 54 +397 , 400 , 394, 407 , 1 , 1, 55 +398 , 400 , 394, 407 , 1 , 1, 55 +399 , 400 , 394, 407 , 1 , 1, 55 +400 , 400 , 394, 407 , 1 , 1, 55 +401 , 400 , 394, 407 , 1 , 1, 55 +402 , 400 , 394, 407 , 1 , 1, 55 +403 , 400 , 394, 407 , 1 , 1, 55 +404 , 407 , 400, 414 , 1 , 1, 56 +405 , 407 , 400, 414 , 1 , 1, 56 +406 , 407 , 400, 414 , 1 , 1, 56 +407 , 407 , 400, 414 , 1 , 1, 56 +408 , 407 , 400, 414 , 1 , 1, 56 +409 , 407 , 400, 414 , 1 , 1, 56 +410 , 407 , 400, 414 , 1 , 1, 56 +411 , 414 , 407, 421 , 1 , 1, 57 +412 , 414 , 407, 421 , 1 , 1, 57 +413 , 414 , 407, 421 , 1 , 1, 57 +414 , 414 , 407, 421 , 1 , 1, 57 +415 , 414 , 407, 421 , 1 , 1, 57 +416 , 414 , 407, 421 , 1 , 1, 57 +417 , 414 , 407, 421 , 1 , 1, 57 +418 , 421 , 414, 428 , 1 , 1, 58 +419 , 421 , 414, 428 , 1 , 1, 58 +420 , 421 , 414, 428 , 1 , 1, 58 +421 , 421 , 414, 428 , 1 , 1, 58 +422 , 421 , 414, 428 , 1 , 1, 58 +423 , 421 , 414, 428 , 1 , 1, 58 +424 , 421 , 414, 428 , 1 , 1, 58 +425 , 428 , 421, 435 , 1 , 1, 59 +426 , 428 , 421, 435 , 1 , 1, 59 +427 , 428 , 421, 435 , 1 , 1, 59 +428 , 428 , 421, 435 , 1 , 1, 59 +429 , 428 , 421, 435 , 1 , 1, 59 +430 , 428 , 421, 435 , 1 , 1, 59 +431 , 428 , 421, 435 , 1 , 1, 59 +432 , 435 , 428, 441 , 1 , 1, 60 +433 , 435 , 428, 441 , 1 , 1, 60 +434 , 435 , 428, 441 , 1 , 1, 60 +435 , 435 , 428, 441 , 1 , 1, 60 +436 , 435 , 428, 441 , 1 , 1, 60 +437 , 435 , 428, 441 , 1 , 1, 60 +438 , 441 , 435, 448 , 1 , 1, 61 +439 , 441 , 435, 448 , 1 , 1, 61 +440 , 441 , 435, 448 , 1 , 1, 61 +441 , 441 , 435, 448 , 1 , 1, 61 +442 , 441 , 435, 448 , 1 , 1, 61 +443 , 441 , 435, 448 , 1 , 1, 61 +444 , 441 , 435, 448 , 1 , 1, 61 +445 , 448 , 441, 456 , 1 , 1, 62 +446 , 448 , 441, 456 , 1 , 1, 62 +447 , 448 , 441, 456 , 1 , 1, 62 +448 , 448 , 441, 456 , 1 , 1, 62 +449 , 448 , 441, 456 , 1 , 1, 62 +450 , 448 , 441, 456 , 1 , 1, 62 +451 , 448 , 441, 456 , 1 , 1, 62 +452 , 456 , 448, 464 , 1 , 1, 63 +453 , 456 , 448, 464 , 1 , 1, 63 +454 , 456 , 448, 464 , 1 , 1, 63 +455 , 456 , 448, 464 , 1 , 1, 63 +456 , 456 , 448, 464 , 1 , 1, 63 +457 , 456 , 448, 464 , 1 , 1, 63 +458 , 456 , 448, 464 , 1 , 1, 63 +459 , 456 , 448, 464 , 1 , 1, 63 +460 , 464 , 456, 471 , 1 , 1, 64 +461 , 464 , 456, 471 , 1 , 1, 64 +462 , 464 , 456, 471 , 1 , 1, 64 +463 , 464 , 456, 471 , 1 , 1, 64 +464 , 464 , 456, 471 , 1 , 1, 64 +465 , 464 , 456, 471 , 1 , 1, 64 +466 , 464 , 456, 471 , 1 , 1, 64 +467 , 464 , 456, 471 , 1 , 1, 64 +468 , 471 , 464, 477 , 1 , 1, 65 +469 , 471 , 464, 477 , 1 , 1, 65 +470 , 471 , 464, 477 , 1 , 1, 65 +471 , 471 , 464, 477 , 1 , 1, 65 +472 , 471 , 464, 477 , 1 , 1, 65 +473 , 471 , 464, 477 , 1 , 1, 65 +474 , 477 , 471, 484 , 1 , 1, 66 +475 , 477 , 471, 484 , 1 , 1, 66 +476 , 477 , 471, 484 , 1 , 1, 66 +477 , 477 , 471, 484 , 1 , 1, 66 +478 , 477 , 471, 484 , 1 , 1, 66 +479 , 477 , 471, 484 , 1 , 1, 66 +480 , 477 , 471, 484 , 1 , 1, 66 +481 , 484 , 477, 491 , 1 , 1, 67 +482 , 484 , 477, 491 , 1 , 1, 67 +483 , 484 , 477, 491 , 1 , 1, 67 +484 , 484 , 477, 491 , 1 , 1, 67 +485 , 484 , 477, 491 , 1 , 1, 67 +486 , 484 , 477, 491 , 1 , 1, 67 +487 , 484 , 477, 491 , 1 , 1, 67 +488 , 491 , 484, 498 , 1 , 1, 68 +489 , 491 , 484, 498 , 1 , 1, 68 +490 , 491 , 484, 498 , 1 , 1, 68 +491 , 491 , 484, 498 , 1 , 1, 68 +492 , 491 , 484, 498 , 1 , 1, 68 +493 , 491 , 484, 498 , 1 , 1, 68 +494 , 491 , 484, 498 , 1 , 1, 68 +495 , 498 , 491, 505 , 1 , 1, 69 +496 , 498 , 491, 505 , 1 , 1, 69 +497 , 498 , 491, 505 , 1 , 1, 69 +498 , 498 , 491, 505 , 1 , 1, 69 +499 , 498 , 491, 505 , 1 , 1, 69 +500 , 498 , 491, 505 , 1 , 1, 69 +501 , 498 , 491, 505 , 1 , 1, 69 +502 , 505 , 498, 512 , 1 , 1, 70 +503 , 505 , 498, 512 , 1 , 1, 70 +504 , 505 , 498, 512 , 1 , 1, 70 +505 , 505 , 498, 512 , 1 , 1, 70 +506 , 505 , 498, 512 , 1 , 1, 70 +507 , 505 , 498, 512 , 1 , 1, 70 +508 , 505 , 498, 512 , 1 , 1, 70 +509 , 512 , 505, 519 , 1 , 1, 71 +510 , 512 , 505, 519 , 1 , 1, 71 +511 , 512 , 505, 519 , 1 , 1, 71 +512 , 512 , 505, 519 , 1 , 1, 71 +513 , 512 , 505, 519 , 1 , 1, 71 +514 , 512 , 505, 519 , 1 , 1, 71 +515 , 512 , 505, 519 , 1 , 1, 71 +516 , 519 , 512, 526 , 1 , 1, 72 +517 , 519 , 512, 526 , 1 , 1, 72 +518 , 519 , 512, 526 , 1 , 1, 72 +519 , 519 , 512, 526 , 1 , 1, 72 +520 , 519 , 512, 526 , 1 , 1, 72 +521 , 519 , 512, 526 , 1 , 1, 72 +522 , 519 , 512, 526 , 1 , 1, 72 +523 , 526 , 519, 533 , 1 , 1, 73 +524 , 526 , 519, 533 , 1 , 1, 73 +525 , 526 , 519, 533 , 1 , 1, 73 +526 , 526 , 519, 533 , 1 , 1, 73 +527 , 526 , 519, 533 , 1 , 1, 73 +528 , 526 , 519, 533 , 1 , 1, 73 +529 , 526 , 519, 533 , 1 , 1, 73 +530 , 533 , 526, 540 , 1 , 1, 74 +531 , 533 , 526, 540 , 1 , 1, 74 +532 , 533 , 526, 540 , 1 , 1, 74 +533 , 533 , 526, 540 , 1 , 1, 74 +534 , 533 , 526, 540 , 1 , 1, 74 +535 , 533 , 526, 540 , 1 , 1, 74 +536 , 533 , 526, 540 , 1 , 1, 74 +537 , 540 , 533, 547 , 1 , 1, 75 +538 , 540 , 533, 547 , 1 , 1, 75 +539 , 540 , 533, 547 , 1 , 1, 75 +540 , 540 , 533, 547 , 1 , 1, 75 +541 , 540 , 533, 547 , 1 , 1, 75 +542 , 540 , 533, 547 , 1 , 1, 75 +543 , 540 , 533, 547 , 1 , 1, 75 +544 , 547 , 540, 554 , 1 , 1, 76 +545 , 547 , 540, 554 , 1 , 1, 76 +546 , 547 , 540, 554 , 1 , 1, 76 +547 , 547 , 540, 554 , 1 , 1, 76 +548 , 547 , 540, 554 , 1 , 1, 76 +549 , 547 , 540, 554 , 1 , 1, 76 +550 , 547 , 540, 554 , 1 , 1, 76 +551 , 554 , 547, 561 , 1 , 1, 77 +552 , 554 , 547, 561 , 1 , 1, 77 +553 , 554 , 547, 561 , 1 , 1, 77 +554 , 554 , 547, 561 , 1 , 1, 77 +555 , 554 , 547, 561 , 1 , 1, 77 +556 , 554 , 547, 561 , 1 , 1, 77 +557 , 554 , 547, 561 , 1 , 1, 77 +558 , 561 , 554, 569 , 1 , 1, 78 +559 , 561 , 554, 569 , 1 , 1, 78 +560 , 561 , 554, 569 , 1 , 1, 78 +561 , 561 , 554, 569 , 1 , 1, 78 +562 , 561 , 554, 569 , 1 , 1, 78 +563 , 561 , 554, 569 , 1 , 1, 78 +564 , 561 , 554, 569 , 1 , 1, 78 +565 , 569 , 561, 576 , 1 , 1, 79 +566 , 569 , 561, 576 , 1 , 1, 79 +567 , 569 , 561, 576 , 1 , 1, 79 +568 , 569 , 561, 576 , 1 , 1, 79 +569 , 569 , 561, 576 , 1 , 1, 79 +570 , 569 , 561, 576 , 1 , 1, 79 +571 , 569 , 561, 576 , 1 , 1, 79 +572 , 569 , 561, 576 , 1 , 1, 79 +573 , 576 , 569, 583 , 1 , 1, 80 +574 , 576 , 569, 583 , 1 , 1, 80 +575 , 576 , 569, 583 , 1 , 1, 80 +576 , 576 , 569, 583 , 1 , 1, 80 +577 , 576 , 569, 583 , 1 , 1, 80 +578 , 576 , 569, 583 , 1 , 1, 80 +579 , 576 , 569, 583 , 1 , 1, 80 +580 , 583 , 576, 590 , 1 , 1, 81 +581 , 583 , 576, 590 , 1 , 1, 81 +582 , 583 , 576, 590 , 1 , 1, 81 +583 , 583 , 576, 590 , 1 , 1, 81 +584 , 583 , 576, 590 , 1 , 1, 81 +585 , 583 , 576, 590 , 1 , 1, 81 +586 , 583 , 576, 590 , 1 , 1, 81 +587 , 590 , 583, 597 , 1 , 1, 82 +588 , 590 , 583, 597 , 1 , 1, 82 +589 , 590 , 583, 597 , 1 , 1, 82 +590 , 590 , 583, 597 , 1 , 1, 82 +591 , 590 , 583, 597 , 1 , 1, 82 +592 , 590 , 583, 597 , 1 , 1, 82 +593 , 590 , 583, 597 , 1 , 1, 82 +594 , 597 , 590, 604 , 1 , 1, 83 +595 , 597 , 590, 604 , 1 , 1, 83 +596 , 597 , 590, 604 , 1 , 1, 83 +597 , 597 , 590, 604 , 1 , 1, 83 +598 , 597 , 590, 604 , 1 , 1, 83 +599 , 597 , 590, 604 , 1 , 1, 83 +600 , 597 , 590, 604 , 1 , 1, 83 +601 , 604 , 597, 611 , 1 , 1, 84 +602 , 604 , 597, 611 , 1 , 1, 84 +603 , 604 , 597, 611 , 1 , 1, 84 +604 , 604 , 597, 611 , 1 , 1, 84 +605 , 604 , 597, 611 , 1 , 1, 84 +606 , 604 , 597, 611 , 1 , 1, 84 +607 , 604 , 597, 611 , 1 , 1, 84 +608 , 611 , 604, 618 , 1 , 1, 85 +609 , 611 , 604, 618 , 1 , 1, 85 +610 , 611 , 604, 618 , 1 , 1, 85 +611 , 611 , 604, 618 , 1 , 1, 85 +612 , 611 , 604, 618 , 1 , 1, 85 +613 , 611 , 604, 618 , 1 , 1, 85 +614 , 611 , 604, 618 , 1 , 1, 85 +615 , 618 , 611, 625 , 1 , 1, 86 +616 , 618 , 611, 625 , 1 , 1, 86 +617 , 618 , 611, 625 , 1 , 1, 86 +618 , 618 , 611, 625 , 1 , 1, 86 +619 , 618 , 611, 625 , 1 , 1, 86 +620 , 618 , 611, 625 , 1 , 1, 86 +621 , 618 , 611, 625 , 1 , 1, 86 +622 , 625 , 618, 632 , 1 , 1, 87 +623 , 625 , 618, 632 , 1 , 1, 87 +624 , 625 , 618, 632 , 1 , 1, 87 +625 , 625 , 618, 632 , 1 , 1, 87 +626 , 625 , 618, 632 , 1 , 1, 87 +627 , 625 , 618, 632 , 1 , 1, 87 +628 , 625 , 618, 632 , 1 , 1, 87 +629 , 632 , 625, 639 , 1 , 1, 88 +630 , 632 , 625, 639 , 1 , 1, 88 +631 , 632 , 625, 639 , 1 , 1, 88 +632 , 632 , 625, 639 , 1 , 1, 88 +633 , 632 , 625, 639 , 1 , 1, 88 +634 , 632 , 625, 639 , 1 , 1, 88 +635 , 632 , 625, 639 , 1 , 1, 88 +636 , 639 , 632, 646 , 1 , 1, 89 +637 , 639 , 632, 646 , 1 , 1, 89 +638 , 639 , 632, 646 , 1 , 1, 89 +639 , 639 , 632, 646 , 1 , 1, 89 +640 , 639 , 632, 646 , 1 , 1, 89 +641 , 639 , 632, 646 , 1 , 1, 89 +642 , 639 , 632, 646 , 1 , 1, 89 +643 , 646 , 639, 653 , 1 , 1, 90 +644 , 646 , 639, 653 , 1 , 1, 90 +645 , 646 , 639, 653 , 1 , 1, 90 +646 , 646 , 639, 653 , 1 , 1, 90 +647 , 646 , 639, 653 , 1 , 1, 90 +648 , 646 , 639, 653 , 1 , 1, 90 +649 , 646 , 639, 653 , 1 , 1, 90 +650 , 653 , 646, 660 , 1 , 1, 91 +651 , 653 , 646, 660 , 1 , 1, 91 +652 , 653 , 646, 660 , 1 , 1, 91 +653 , 653 , 646, 660 , 1 , 1, 91 +654 , 653 , 646, 660 , 1 , 1, 91 +655 , 653 , 646, 660 , 1 , 1, 91 +656 , 653 , 646, 660 , 1 , 1, 91 +657 , 660 , 653, 667 , 1 , 1, 92 +658 , 660 , 653, 667 , 1 , 1, 92 +659 , 660 , 653, 667 , 1 , 1, 92 +660 , 660 , 653, 667 , 1 , 1, 92 +661 , 660 , 653, 667 , 1 , 1, 92 +662 , 660 , 653, 667 , 1 , 1, 92 +663 , 660 , 653, 667 , 1 , 1, 92 +664 , 667 , 660, 674 , 1 , 1, 93 +665 , 667 , 660, 674 , 1 , 1, 93 +666 , 667 , 660, 674 , 1 , 1, 93 +667 , 667 , 660, 674 , 1 , 1, 93 +668 , 667 , 660, 674 , 1 , 1, 93 +669 , 667 , 660, 674 , 1 , 1, 93 +670 , 667 , 660, 674 , 1 , 1, 93 +671 , 674 , 667, 682 , 1 , 1, 94 +672 , 674 , 667, 682 , 1 , 1, 94 +673 , 674 , 667, 682 , 1 , 1, 94 +674 , 674 , 667, 682 , 1 , 1, 94 +675 , 674 , 667, 682 , 1 , 1, 94 +676 , 674 , 667, 682 , 1 , 1, 94 +677 , 674 , 667, 682 , 1 , 1, 94 +678 , 682 , 674, 689 , 1 , 1, 95 +679 , 682 , 674, 689 , 1 , 1, 95 +680 , 682 , 674, 689 , 1 , 1, 95 +681 , 682 , 674, 689 , 1 , 1, 95 +682 , 682 , 674, 689 , 1 , 1, 95 +683 , 682 , 674, 689 , 1 , 1, 95 +684 , 682 , 674, 689 , 1 , 1, 95 +685 , 682 , 674, 689 , 1 , 1, 95 +686 , 689 , 682, 696 , 1 , 1, 96 +687 , 689 , 682, 696 , 1 , 1, 96 +688 , 689 , 682, 696 , 1 , 1, 96 +689 , 689 , 682, 696 , 1 , 1, 96 +690 , 689 , 682, 696 , 1 , 1, 96 +691 , 689 , 682, 696 , 1 , 1, 96 +692 , 689 , 682, 696 , 1 , 1, 96 +693 , 696 , 689, 703 , 1 , 1, 97 +694 , 696 , 689, 703 , 1 , 1, 97 +695 , 696 , 689, 703 , 1 , 1, 97 +696 , 696 , 689, 703 , 1 , 1, 97 +697 , 696 , 689, 703 , 1 , 1, 97 +698 , 696 , 689, 703 , 1 , 1, 97 +699 , 696 , 689, 703 , 1 , 1, 97 +700 , 703 , 696, 709 , 1 , 1, 98 +701 , 703 , 696, 709 , 1 , 1, 98 +702 , 703 , 696, 709 , 1 , 1, 98 +703 , 703 , 696, 709 , 1 , 1, 98 +704 , 703 , 696, 709 , 1 , 1, 98 +705 , 703 , 696, 709 , 1 , 1, 98 +706 , 709 , 703, 716 , 1 , 1, 99 +707 , 709 , 703, 716 , 1 , 1, 99 +708 , 709 , 703, 716 , 1 , 1, 99 +709 , 709 , 703, 716 , 1 , 1, 99 +710 , 709 , 703, 716 , 1 , 1, 99 +711 , 709 , 703, 716 , 1 , 1, 99 +712 , 709 , 703, 716 , 1 , 1, 99 +713 , 716 , 709, 723 , 1 , 1, 100 +714 , 716 , 709, 723 , 1 , 1, 100 +715 , 716 , 709, 723 , 1 , 1, 100 +716 , 716 , 709, 723 , 1 , 1, 100 +717 , 716 , 709, 723 , 1 , 1, 100 +718 , 716 , 709, 723 , 1 , 1, 100 +719 , 716 , 709, 723 , 1 , 1, 100 +720 , 723 , 716, 730 , 1 , 1, 101 +721 , 723 , 716, 730 , 1 , 1, 101 +722 , 723 , 716, 730 , 1 , 1, 101 +723 , 723 , 716, 730 , 1 , 1, 101 +724 , 723 , 716, 730 , 1 , 1, 101 +725 , 723 , 716, 730 , 1 , 1, 101 +726 , 723 , 716, 730 , 1 , 1, 101 +727 , 730 , 723, 737 , 1 , 1, 102 +728 , 730 , 723, 737 , 1 , 1, 102 +729 , 730 , 723, 737 , 1 , 1, 102 +730 , 730 , 723, 737 , 1 , 1, 102 +731 , 730 , 723, 737 , 1 , 1, 102 +732 , 730 , 723, 737 , 1 , 1, 102 +733 , 730 , 723, 737 , 1 , 1, 102 +734 , 737 , 730, 744 , 1 , 1, 103 +735 , 737 , 730, 744 , 1 , 1, 103 +736 , 737 , 730, 744 , 1 , 1, 103 +737 , 737 , 730, 744 , 1 , 1, 103 +738 , 737 , 730, 744 , 1 , 1, 103 +739 , 737 , 730, 744 , 1 , 1, 103 +740 , 737 , 730, 744 , 1 , 1, 103 +741 , 744 , 737, 751 , 1 , 1, 104 +742 , 744 , 737, 751 , 1 , 1, 104 +743 , 744 , 737, 751 , 1 , 1, 104 +744 , 744 , 737, 751 , 1 , 1, 104 +745 , 744 , 737, 751 , 1 , 1, 104 +746 , 744 , 737, 751 , 1 , 1, 104 +747 , 744 , 737, 751 , 1 , 1, 104 +748 , 751 , 744, 757 , 1 , 1, 105 +749 , 751 , 744, 757 , 1 , 1, 105 +750 , 751 , 744, 757 , 1 , 1, 105 +751 , 751 , 744, 757 , 1 , 1, 105 +752 , 751 , 744, 757 , 1 , 1, 105 +753 , 751 , 744, 757 , 1 , 1, 105 +754 , 757 , 751, 764 , 1 , 1, 106 +755 , 757 , 751, 764 , 1 , 1, 106 +756 , 757 , 751, 764 , 1 , 1, 106 +757 , 757 , 751, 764 , 1 , 1, 106 +758 , 757 , 751, 764 , 1 , 1, 106 +759 , 757 , 751, 764 , 1 , 1, 106 +760 , 757 , 751, 764 , 1 , 1, 106 +761 , 764 , 757, 771 , 1 , 1, 107 +762 , 764 , 757, 771 , 1 , 1, 107 +763 , 764 , 757, 771 , 1 , 1, 107 +764 , 764 , 757, 771 , 1 , 1, 107 +765 , 764 , 757, 771 , 1 , 1, 107 +766 , 764 , 757, 771 , 1 , 1, 107 +767 , 764 , 757, 771 , 1 , 1, 107 +768 , 771 , 764, 778 , 1 , 1, 108 +769 , 771 , 764, 778 , 1 , 1, 108 +770 , 771 , 764, 778 , 1 , 1, 108 +771 , 771 , 764, 778 , 1 , 1, 108 +772 , 771 , 764, 778 , 1 , 1, 108 +773 , 771 , 764, 778 , 1 , 1, 108 +774 , 771 , 764, 778 , 1 , 1, 108 +775 , 778 , 771, 785 , 1 , 1, 109 +776 , 778 , 771, 785 , 1 , 1, 109 +777 , 778 , 771, 785 , 1 , 1, 109 +778 , 778 , 771, 785 , 1 , 1, 109 +779 , 778 , 771, 785 , 1 , 1, 109 +780 , 778 , 771, 785 , 1 , 1, 109 +781 , 778 , 771, 785 , 1 , 1, 109 +782 , 785 , 778, 793 , 1 , 1, 110 +783 , 785 , 778, 793 , 1 , 1, 110 +784 , 785 , 778, 793 , 1 , 1, 110 +785 , 785 , 778, 793 , 1 , 1, 110 +786 , 785 , 778, 793 , 1 , 1, 110 +787 , 785 , 778, 793 , 1 , 1, 110 +788 , 785 , 778, 793 , 1 , 1, 110 +789 , 793 , 785, 800 , 1 , 1, 111 +790 , 793 , 785, 800 , 1 , 1, 111 +791 , 793 , 785, 800 , 1 , 1, 111 +792 , 793 , 785, 800 , 1 , 1, 111 +793 , 793 , 785, 800 , 1 , 1, 111 +794 , 793 , 785, 800 , 1 , 1, 111 +795 , 793 , 785, 800 , 1 , 1, 111 +796 , 793 , 785, 800 , 1 , 1, 111 +797 , 800 , 793, 807 , 1 , 1, 112 +798 , 800 , 793, 807 , 1 , 1, 112 +799 , 800 , 793, 807 , 1 , 1, 112 +800 , 800 , 793, 807 , 1 , 1, 112 +801 , 800 , 793, 807 , 1 , 1, 112 +802 , 800 , 793, 807 , 1 , 1, 112 +803 , 800 , 793, 807 , 1 , 1, 112 +804 , 807 , 800, 814 , 1 , 1, 113 +805 , 807 , 800, 814 , 1 , 1, 113 +806 , 807 , 800, 814 , 1 , 1, 113 +807 , 807 , 800, 814 , 1 , 1, 113 +808 , 807 , 800, 814 , 1 , 1, 113 +809 , 807 , 800, 814 , 1 , 1, 113 +810 , 807 , 800, 814 , 1 , 1, 113 +811 , 814 , 807, 821 , 1 , 1, 114 +812 , 814 , 807, 821 , 1 , 1, 114 +813 , 814 , 807, 821 , 1 , 1, 114 +814 , 814 , 807, 821 , 1 , 1, 114 +815 , 814 , 807, 821 , 1 , 1, 114 +816 , 814 , 807, 821 , 1 , 1, 114 +817 , 814 , 807, 821 , 1 , 1, 114 +818 , 821 , 814, 828 , 1 , 1, 115 +819 , 821 , 814, 828 , 1 , 1, 115 +820 , 821 , 814, 828 , 1 , 1, 115 +821 , 821 , 814, 828 , 1 , 1, 115 +822 , 821 , 814, 828 , 1 , 1, 115 +823 , 821 , 814, 828 , 1 , 1, 115 +824 , 821 , 814, 828 , 1 , 1, 115 +825 , 828 , 821, 835 , 1 , 1, 116 +826 , 828 , 821, 835 , 1 , 1, 116 +827 , 828 , 821, 835 , 1 , 1, 116 +828 , 828 , 821, 835 , 1 , 1, 116 +829 , 828 , 821, 835 , 1 , 1, 116 +830 , 828 , 821, 835 , 1 , 1, 116 +831 , 828 , 821, 835 , 1 , 1, 116 +832 , 835 , 828, 842 , 1 , 1, 117 +833 , 835 , 828, 842 , 1 , 1, 117 +834 , 835 , 828, 842 , 1 , 1, 117 +835 , 835 , 828, 842 , 1 , 1, 117 +836 , 835 , 828, 842 , 1 , 1, 117 +837 , 835 , 828, 842 , 1 , 1, 117 +838 , 835 , 828, 842 , 1 , 1, 117 +839 , 842 , 835, 849 , 1 , 1, 118 +840 , 842 , 835, 849 , 1 , 1, 118 +841 , 842 , 835, 849 , 1 , 1, 118 +842 , 842 , 835, 849 , 1 , 1, 118 +843 , 842 , 835, 849 , 1 , 1, 118 +844 , 842 , 835, 849 , 1 , 1, 118 +845 , 842 , 835, 849 , 1 , 1, 118 +846 , 849 , 842, 856 , 1 , 1, 119 +847 , 849 , 842, 856 , 1 , 1, 119 +848 , 849 , 842, 856 , 1 , 1, 119 +849 , 849 , 842, 856 , 1 , 1, 119 +850 , 849 , 842, 856 , 1 , 1, 119 +851 , 849 , 842, 856 , 1 , 1, 119 +852 , 849 , 842, 856 , 1 , 1, 119 +853 , 856 , 849, 863 , 1 , 1, 120 +854 , 856 , 849, 863 , 1 , 1, 120 +855 , 856 , 849, 863 , 1 , 1, 120 +856 , 856 , 849, 863 , 1 , 1, 120 +857 , 856 , 849, 863 , 1 , 1, 120 +858 , 856 , 849, 863 , 1 , 1, 120 +859 , 856 , 849, 863 , 1 , 1, 120 +860 , 863 , 856, 870 , 1 , 1, 121 +861 , 863 , 856, 870 , 1 , 1, 121 +862 , 863 , 856, 870 , 1 , 1, 121 +863 , 863 , 856, 870 , 1 , 1, 121 +864 , 863 , 856, 870 , 1 , 1, 121 +865 , 863 , 856, 870 , 1 , 1, 121 +866 , 863 , 856, 870 , 1 , 1, 121 +867 , 870 , 863, 877 , 1 , 1, 122 +868 , 870 , 863, 877 , 1 , 1, 122 +869 , 870 , 863, 877 , 1 , 1, 122 +870 , 870 , 863, 877 , 1 , 1, 122 +871 , 870 , 863, 877 , 1 , 1, 122 +872 , 870 , 863, 877 , 1 , 1, 122 +873 , 870 , 863, 877 , 1 , 1, 122 +874 , 877 , 870, 884 , 1 , 1, 123 +875 , 877 , 870, 884 , 1 , 1, 123 +876 , 877 , 870, 884 , 1 , 1, 123 +877 , 877 , 870, 884 , 1 , 1, 123 +878 , 877 , 870, 884 , 1 , 1, 123 +879 , 877 , 870, 884 , 1 , 1, 123 +880 , 877 , 870, 884 , 1 , 1, 123 +881 , 884 , 877, 891 , 1 , 1, 124 +882 , 884 , 877, 891 , 1 , 1, 124 +883 , 884 , 877, 891 , 1 , 1, 124 +884 , 884 , 877, 891 , 1 , 1, 124 +885 , 884 , 877, 891 , 1 , 1, 124 +886 , 884 , 877, 891 , 1 , 1, 124 +887 , 884 , 877, 891 , 1 , 1, 124 +888 , 891 , 884, 898 , 1 , 1, 125 +889 , 891 , 884, 898 , 1 , 1, 125 +890 , 891 , 884, 898 , 1 , 1, 125 +891 , 891 , 884, 898 , 1 , 1, 125 +892 , 891 , 884, 898 , 1 , 1, 125 +893 , 891 , 884, 898 , 1 , 1, 125 +894 , 891 , 884, 898 , 1 , 1, 125 +895 , 898 , 891, 906 , 1 , 1, 126 +896 , 898 , 891, 906 , 1 , 1, 126 +897 , 898 , 891, 906 , 1 , 1, 126 +898 , 898 , 891, 906 , 1 , 1, 126 +899 , 898 , 891, 906 , 1 , 1, 126 +900 , 898 , 891, 906 , 1 , 1, 126 +901 , 898 , 891, 906 , 0 , 1, 126 +902 , 906 , 898, 914 , 0 , 1, 127 +903 , 906 , 898, 914 , 0 , 1, 127 +904 , 906 , 898, 914 , 0 , 1, 127 +905 , 906 , 898, 914 , 0 , 1, 127 +906 , 906 , 898, 914 , 0 , 1, 127 +907 , 906 , 898, 914 , 0 , 1, 127 +908 , 906 , 898, 914 , 0 , 1, 127 +909 , 906 , 898, 914 , 0 , 1, 127 +910 , 914 , 906, 921 , 0 , 1, 128 +911 , 914 , 906, 921 , 0 , 1, 128 +912 , 914 , 906, 921 , 0 , 1, 128 +913 , 914 , 906, 921 , 0 , 1, 128 +914 , 914 , 906, 921 , 0 , 1, 128 +915 , 914 , 906, 921 , 0 , 1, 128 +916 , 914 , 906, 921 , 0 , 1, 128 +917 , 914 , 906, 921 , 0 , 1, 128 +918 , 921 , 914, 927 , 0 , 1, 129 +919 , 921 , 914, 927 , 0 , 1, 129 +920 , 921 , 914, 927 , 0 , 1, 129 +921 , 921 , 914, 927 , 0 , 1, 129 +922 , 921 , 914, 927 , 0 , 1, 129 +923 , 921 , 914, 927 , 0 , 1, 129 +924 , 927 , 921, 934 , 0 , 1, 130 +925 , 927 , 921, 934 , 0 , 1, 130 +926 , 927 , 921, 934 , 0 , 1, 130 +927 , 927 , 921, 934 , 0 , 1, 130 +928 , 927 , 921, 934 , 0 , 1, 130 +929 , 927 , 921, 934 , 0 , 1, 130 +930 , 927 , 921, 934 , 0 , 1, 130 +931 , 934 , 927, 941 , 0 , 1, 131 +932 , 934 , 927, 941 , 0 , 1, 131 +933 , 934 , 927, 941 , 0 , 1, 131 +934 , 934 , 927, 941 , 0 , 1, 131 +935 , 934 , 927, 941 , 0 , 1, 131 +936 , 934 , 927, 941 , 0 , 1, 131 +937 , 934 , 927, 941 , 0 , 1, 131 +938 , 941 , 934, 948 , 0 , 1, 132 +939 , 941 , 934, 948 , 0 , 1, 132 +940 , 941 , 934, 948 , 0 , 1, 132 +941 , 941 , 934, 948 , 0 , 1, 132 +942 , 941 , 934, 948 , 0 , 1, 132 +943 , 941 , 934, 948 , 0 , 1, 132 +944 , 941 , 934, 948 , 0 , 1, 132 +945 , 948 , 941, 955 , 0 , 1, 133 +946 , 948 , 941, 955 , 0 , 1, 133 +947 , 948 , 941, 955 , 0 , 1, 133 +948 , 948 , 941, 955 , 0 , 1, 133 +949 , 948 , 941, 955 , 0 , 1, 133 +950 , 948 , 941, 955 , 0 , 1, 133 +951 , 948 , 941, 955 , 0 , 1, 133 +952 , 955 , 948, 962 , 0 , 1, 134 +953 , 955 , 948, 962 , 0 , 1, 134 +954 , 955 , 948, 962 , 0 , 1, 134 +955 , 955 , 948, 962 , 0 , 1, 134 +956 , 955 , 948, 962 , 0 , 1, 134 +957 , 955 , 948, 962 , 0 , 1, 134 +958 , 955 , 948, 962 , 0 , 1, 134 +959 , 962 , 955, 969 , 0 , 1, 135 +960 , 962 , 955, 969 , 0 , 1, 135 +961 , 962 , 955, 969 , 0 , 1, 135 +962 , 962 , 955, 969 , 0 , 1, 135 +963 , 962 , 955, 969 , 0 , 1, 135 +964 , 962 , 955, 969 , 0 , 1, 135 +965 , 962 , 955, 969 , 0 , 1, 135 +966 , 969 , 962, 976 , 0 , 1, 136 +967 , 969 , 962, 976 , 0 , 1, 136 +968 , 969 , 962, 976 , 0 , 1, 136 +969 , 969 , 962, 976 , 0 , 1, 136 +970 , 969 , 962, 976 , 0 , 1, 136 +971 , 969 , 962, 976 , 0 , 1, 136 +972 , 969 , 962, 976 , 0 , 1, 136 +973 , 976 , 969, 983 , 0 , 1, 137 +974 , 976 , 969, 983 , 0 , 1, 137 +975 , 976 , 969, 983 , 0 , 1, 137 +976 , 976 , 969, 983 , 0 , 1, 137 +977 , 976 , 969, 983 , 0 , 1, 137 +978 , 976 , 969, 983 , 0 , 1, 137 +979 , 976 , 969, 983 , 0 , 1, 137 +980 , 983 , 976, 990 , 0 , 1, 138 +981 , 983 , 976, 990 , 0 , 1, 138 +982 , 983 , 976, 990 , 0 , 1, 138 +983 , 983 , 976, 990 , 0 , 1, 138 +984 , 983 , 976, 990 , 0 , 1, 138 +985 , 983 , 976, 990 , 0 , 1, 138 +986 , 983 , 976, 990 , 0 , 1, 138 +987 , 990 , 983, 997 , 0 , 1, 139 +988 , 990 , 983, 997 , 0 , 1, 139 +989 , 990 , 983, 997 , 0 , 1, 139 +990 , 990 , 983, 997 , 0 , 1, 139 +991 , 990 , 983, 997 , 0 , 1, 139 +992 , 990 , 983, 997 , 0 , 1, 139 +993 , 990 , 983, 997 , 0 , 1, 139 +994 , 997 , 990, 1004 , 0 , 1, 140 +995 , 997 , 990, 1004 , 0 , 1, 140 +996 , 997 , 990, 1004 , 0 , 1, 140 +997 , 997 , 990, 1004 , 0 , 1, 140 +998 , 997 , 990, 1004 , 0 , 1, 140 +999 , 997 , 990, 1004 , 0 , 1, 140 +1000 , 997 , 990, 1004 , 0 , 1, 140 +1001 , 1004 , 997, 1011 , 0 , 1, 141 +1002 , 1004 , 997, 1011 , 0 , 1, 141 +1003 , 1004 , 997, 1011 , 0 , 1, 141 +1004 , 1004 , 997, 1011 , 0 , 1, 141 +1005 , 1004 , 997, 1011 , 0 , 1, 141 +1006 , 1004 , 997, 1011 , 0 , 1, 141 +1007 , 1004 , 997, 1011 , 0 , 1, 141 +1008 , 1011 , 1004, 1018 , 0 , 1, 142 +1009 , 1011 , 1004, 1018 , 0 , 1, 142 +1010 , 1011 , 1004, 1018 , 0 , 1, 142 +1011 , 1011 , 1004, 1018 , 0 , 1, 142 +1012 , 1011 , 1004, 1018 , 0 , 1, 142 +1013 , 1011 , 1004, 1018 , 0 , 1, 142 +1014 , 1011 , 1004, 1018 , 0 , 1, 142 +1015 , 1018 , 1011, 1026 , 0 , 1, 143 +1016 , 1018 , 1011, 1026 , 0 , 1, 143 +1017 , 1018 , 1011, 1026 , 0 , 1, 143 +1018 , 1018 , 1011, 1026 , 0 , 1, 143 +1019 , 1018 , 1011, 1026 , 0 , 1, 143 +1020 , 1018 , 1011, 1026 , 0 , 1, 143 +1021 , 1018 , 1011, 1026 , 0 , 1, 143 +1022 , 1026 , 1018, 1033 , 0 , 1, 144 +1023 , 1026 , 1018, 1033 , 0 , 1, 144 +1024 , 1026 , 1018, 1033 , 0 , 1, 144 +1025 , 1026 , 1018, 1033 , 0 , 1, 144 +1026 , 1026 , 1018, 1033 , 0 , 1, 144 +1027 , 1026 , 1018, 1033 , 0 , 1, 144 +1028 , 1026 , 1018, 1033 , 0 , 1, 144 +1029 , 1026 , 1018, 1033 , 0 , 1, 144 +1030 , 1033 , 1026, 1040 , 0 , 1, 145 +1031 , 1033 , 1026, 1040 , 0 , 1, 145 +1032 , 1033 , 1026, 1040 , 0 , 1, 145 +1033 , 1033 , 1026, 1040 , 0 , 1, 145 +1034 , 1033 , 1026, 1040 , 0 , 1, 145 +1035 , 1033 , 1026, 1040 , 0 , 1, 145 +1036 , 1033 , 1026, 1040 , 0 , 1, 145 +1037 , 1040 , 1033, 1047 , 0 , 1, 146 +1038 , 1040 , 1033, 1047 , 0 , 1, 146 +1039 , 1040 , 1033, 1047 , 0 , 1, 146 +1040 , 1040 , 1033, 1047 , 0 , 1, 146 +1041 , 1040 , 1033, 1047 , 0 , 1, 146 +1042 , 1040 , 1033, 1047 , 0 , 1, 146 +1043 , 1040 , 1033, 1047 , 0 , 1, 146 +1044 , 1047 , 1040, 1054 , 0 , 1, 147 +1045 , 1047 , 1040, 1054 , 0 , 1, 147 +1046 , 1047 , 1040, 1054 , 0 , 1, 147 +1047 , 1047 , 1040, 1054 , 0 , 1, 147 +1048 , 1047 , 1040, 1054 , 0 , 1, 147 +1049 , 1047 , 1040, 1054 , 0 , 1, 147 +1050 , 1047 , 1040, 1054 , 0 , 1, 147 +1051 , 1054 , 1047, 1061 , 0 , 1, 148 +1052 , 1054 , 1047, 1061 , 0 , 1, 148 +1053 , 1054 , 1047, 1061 , 0 , 1, 148 +1054 , 1054 , 1047, 1061 , 0 , 1, 148 +1055 , 1054 , 1047, 1061 , 0 , 1, 148 +1056 , 1054 , 1047, 1061 , 0 , 1, 148 +1057 , 1054 , 1047, 1061 , 0 , 1, 148 +1058 , 1061 , 1054, 1067 , 0 , 1, 149 +1059 , 1061 , 1054, 1067 , 0 , 1, 149 +1060 , 1061 , 1054, 1067 , 0 , 1, 149 +1061 , 1061 , 1054, 1067 , 0 , 1, 149 +1062 , 1061 , 1054, 1067 , 0 , 1, 149 +1063 , 1061 , 1054, 1067 , 0 , 1, 149 +1064 , 1067 , 1061, 1074 , 0 , 1, 150 +1065 , 1067 , 1061, 1074 , 0 , 1, 150 +1066 , 1067 , 1061, 1074 , 0 , 1, 150 +1067 , 1067 , 1061, 1074 , 0 , 1, 150 +1068 , 1067 , 1061, 1074 , 0 , 1, 150 +1069 , 1067 , 1061, 1074 , 0 , 1, 150 +1070 , 1067 , 1061, 1074 , 0 , 1, 150 +1071 , 1074 , 1067, 1081 , 0 , 1, 151 +1072 , 1074 , 1067, 1081 , 0 , 1, 151 +1073 , 1074 , 1067, 1081 , 0 , 1, 151 +1074 , 1074 , 1067, 1081 , 0 , 1, 151 +1075 , 1074 , 1067, 1081 , 0 , 1, 151 +1076 , 1074 , 1067, 1081 , 0 , 1, 151 +1077 , 1074 , 1067, 1081 , 0 , 1, 151 +1078 , 1081 , 1074, 1088 , 0 , 1, 152 +1079 , 1081 , 1074, 1088 , 0 , 1, 152 +1080 , 1081 , 1074, 1088 , 0 , 1, 152 +1081 , 1081 , 1074, 1088 , 0 , 1, 152 +1082 , 1081 , 1074, 1088 , 0 , 1, 152 +1083 , 1081 , 1074, 1088 , 0 , 1, 152 +1084 , 1081 , 1074, 1088 , 0 , 1, 152 +1085 , 1088 , 1081, 1095 , 0 , 1, 153 +1086 , 1088 , 1081, 1095 , 0 , 1, 153 +1087 , 1088 , 1081, 1095 , 0 , 1, 153 +1088 , 1088 , 1081, 1095 , 0 , 1, 153 +1089 , 1088 , 1081, 1095 , 0 , 1, 153 +1090 , 1088 , 1081, 1095 , 0 , 1, 153 +1091 , 1088 , 1081, 1095 , 0 , 1, 153 +1092 , 1095 , 1088, 1102 , 0 , 1, 154 +1093 , 1095 , 1088, 1102 , 0 , 1, 154 +1094 , 1095 , 1088, 1102 , 0 , 1, 154 +1095 , 1095 , 1088, 1102 , 0 , 1, 154 +1096 , 1095 , 1088, 1102 , 0 , 1, 154 +1097 , 1095 , 1088, 1102 , 0 , 1, 154 +1098 , 1095 , 1088, 1102 , 0 , 1, 154 +1099 , 1102 , 1095, 1109 , 0 , 1, 155 +1100 , 1102 , 1095, 1109 , 0 , 1, 155 +1101 , 1102 , 1095, 1109 , 0 , 1, 155 +1102 , 1102 , 1095, 1109 , 0 , 1, 155 +1103 , 1102 , 1095, 1109 , 0 , 1, 155 +1104 , 1102 , 1095, 1109 , 0 , 1, 155 +1105 , 1102 , 1095, 1109 , 0 , 1, 155 +1106 , 1109 , 1102, 1116 , 0 , 1, 156 +1107 , 1109 , 1102, 1116 , 0 , 1, 156 +1108 , 1109 , 1102, 1116 , 0 , 1, 156 +1109 , 1109 , 1102, 1116 , 0 , 1, 156 +1110 , 1109 , 1102, 1116 , 0 , 1, 156 +1111 , 1109 , 1102, 1116 , 0 , 1, 156 +1112 , 1109 , 1102, 1116 , 0 , 1, 156 +1113 , 1116 , 1109, 1123 , 0 , 1, 157 +1114 , 1116 , 1109, 1123 , 0 , 1, 157 +1115 , 1116 , 1109, 1123 , 0 , 1, 157 +1116 , 1116 , 1109, 1123 , 0 , 1, 157 +1117 , 1116 , 1109, 1123 , 0 , 1, 157 +1118 , 1116 , 1109, 1123 , 0 , 1, 157 +1119 , 1116 , 1109, 1123 , 0 , 1, 157 +1120 , 1123 , 1116, 1131 , 0 , 1, 158 +1121 , 1123 , 1116, 1131 , 0 , 1, 158 +1122 , 1123 , 1116, 1131 , 0 , 1, 158 +1123 , 1123 , 1116, 1131 , 0 , 1, 158 +1124 , 1123 , 1116, 1131 , 0 , 1, 158 +1125 , 1123 , 1116, 1131 , 0 , 1, 158 +1126 , 1123 , 1116, 1131 , 0 , 1, 158 +1127 , 1131 , 1123, 1138 , 0 , 1, 159 +1128 , 1131 , 1123, 1138 , 0 , 1, 159 +1129 , 1131 , 1123, 1138 , 0 , 1, 159 +1130 , 1131 , 1123, 1138 , 0 , 1, 159 +1131 , 1131 , 1123, 1138 , 0 , 1, 159 +1132 , 1131 , 1123, 1138 , 0 , 1, 159 +1133 , 1131 , 1123, 1138 , 0 , 1, 159 +1134 , 1131 , 1123, 1138 , 0 , 1, 159 +1135 , 1138 , 1131, 1145 , 0 , 1, 160 +1136 , 1138 , 1131, 1145 , 0 , 1, 160 +1137 , 1138 , 1131, 1145 , 0 , 1, 160 +1138 , 1138 , 1131, 1145 , 0 , 1, 160 +1139 , 1138 , 1131, 1145 , 0 , 1, 160 +1140 , 1138 , 1131, 1145 , 0 , 1, 160 +1141 , 1138 , 1131, 1145 , 0 , 1, 160 +1142 , 1145 , 1138, 1152 , 0 , 1, 161 +1143 , 1145 , 1138, 1152 , 0 , 1, 161 +1144 , 1145 , 1138, 1152 , 0 , 1, 161 +1145 , 1145 , 1138, 1152 , 0 , 1, 161 +1146 , 1145 , 1138, 1152 , 0 , 1, 161 +1147 , 1145 , 1138, 1152 , 0 , 1, 161 +1148 , 1145 , 1138, 1152 , 0 , 1, 161 +1149 , 1152 , 1145, 1159 , 0 , 1, 162 +1150 , 1152 , 1145, 1159 , 0 , 1, 162 +1151 , 1152 , 1145, 1159 , 0 , 1, 162 +1152 , 1152 , 1145, 1159 , 0 , 1, 162 +1153 , 1152 , 1145, 1159 , 0 , 1, 162 +1154 , 1152 , 1145, 1159 , 0 , 1, 162 +1155 , 1152 , 1145, 1159 , 0 , 1, 162 +1156 , 1159 , 1152, 1166 , 0 , 1, 163 +1157 , 1159 , 1152, 1166 , 0 , 1, 163 +1158 , 1159 , 1152, 1166 , 0 , 1, 163 +1159 , 1159 , 1152, 1166 , 0 , 1, 163 +1160 , 1159 , 1152, 1166 , 0 , 1, 163 +1161 , 1159 , 1152, 1166 , 0 , 1, 163 +1162 , 1159 , 1152, 1166 , 0 , 1, 163 +1163 , 1166 , 1159, 1173 , 0 , 1, 164 +1164 , 1166 , 1159, 1173 , 0 , 1, 164 +1165 , 1166 , 1159, 1173 , 0 , 1, 164 +1166 , 1166 , 1159, 1173 , 0 , 1, 164 +1167 , 1166 , 1159, 1173 , 0 , 1, 164 +1168 , 1166 , 1159, 1173 , 0 , 1, 164 +1169 , 1166 , 1159, 1173 , 0 , 1, 164 +1170 , 1173 , 1166, 1180 , 0 , 1, 165 +1171 , 1173 , 1166, 1180 , 0 , 1, 165 +1172 , 1173 , 1166, 1180 , 0 , 1, 165 +1173 , 1173 , 1166, 1180 , 0 , 1, 165 +1174 , 1173 , 1166, 1180 , 0 , 1, 165 +1175 , 1173 , 1166, 1180 , 0 , 1, 165 +1176 , 1173 , 1166, 1180 , 0 , 1, 165 +1177 , 1180 , 1173, 1187 , 0 , 1, 166 +1178 , 1180 , 1173, 1187 , 0 , 1, 166 +1179 , 1180 , 1173, 1187 , 0 , 1, 166 +1180 , 1180 , 1173, 1187 , 0 , 1, 166 +1181 , 1180 , 1173, 1187 , 0 , 1, 166 +1182 , 1180 , 1173, 1187 , 0 , 1, 166 +1183 , 1180 , 1173, 1187 , 0 , 1, 166 +1184 , 1187 , 1180, 1194 , 0 , 1, 167 +1185 , 1187 , 1180, 1194 , 0 , 1, 167 +1186 , 1187 , 1180, 1194 , 0 , 1, 167 +1187 , 1187 , 1180, 1194 , 0 , 1, 167 +1188 , 1187 , 1180, 1194 , 0 , 1, 167 +1189 , 1187 , 1180, 1194 , 0 , 1, 167 +1190 , 1187 , 1180, 1194 , 0 , 1, 167 +1191 , 1194 , 1187, 1201 , 0 , 1, 168 +1192 , 1194 , 1187, 1201 , 0 , 1, 168 +1193 , 1194 , 1187, 1201 , 0 , 1, 168 +1194 , 1194 , 1187, 1201 , 0 , 1, 168 +1195 , 1194 , 1187, 1201 , 0 , 1, 168 +1196 , 1194 , 1187, 1201 , 0 , 1, 168 +1197 , 1194 , 1187, 1201 , 0 , 1, 168 +1198 , 1201 , 1194, 1208 , 0 , 1, 169 +1199 , 1201 , 1194, 1208 , 0 , 1, 169 +1200 , 1201 , 1194, 1208 , 0 , 1, 169 +1201 , 1201 , 1194, 1208 , 0 , 1, 169 +1202 , 1201 , 1194, 1208 , 0 , 1, 169 +1203 , 1201 , 1194, 1208 , 0 , 1, 169 +1204 , 1201 , 1194, 1208 , 0 , 1, 169 +1205 , 1208 , 1201, 1214 , 0 , 1, 170 +1206 , 1208 , 1201, 1214 , 0 , 1, 170 +1207 , 1208 , 1201, 1214 , 0 , 1, 170 +1208 , 1208 , 1201, 1214 , 0 , 1, 170 +1209 , 1208 , 1201, 1214 , 0 , 1, 170 +1210 , 1208 , 1201, 1214 , 0 , 1, 170 +1211 , 1214 , 1208, 1221 , 0 , 1, 171 +1212 , 1214 , 1208, 1221 , 0 , 1, 171 +1213 , 1214 , 1208, 1221 , 0 , 1, 171 +1214 , 1214 , 1208, 1221 , 0 , 1, 171 +1215 , 1214 , 1208, 1221 , 0 , 1, 171 +1216 , 1214 , 1208, 1221 , 0 , 1, 171 +1217 , 1214 , 1208, 1221 , 0 , 1, 171 +1218 , 1221 , 1214, 1228 , 0 , 1, 172 +1219 , 1221 , 1214, 1228 , 0 , 1, 172 +1220 , 1221 , 1214, 1228 , 0 , 1, 172 +1221 , 1221 , 1214, 1228 , 0 , 1, 172 +1222 , 1221 , 1214, 1228 , 0 , 1, 172 +1223 , 1221 , 1214, 1228 , 0 , 1, 172 +1224 , 1221 , 1214, 1228 , 0 , 1, 172 +1225 , 1228 , 1221, 1235 , 0 , 1, 173 +1226 , 1228 , 1221, 1235 , 0 , 1, 173 +1227 , 1228 , 1221, 1235 , 0 , 1, 173 +1228 , 1228 , 1221, 1235 , 0 , 1, 173 +1229 , 1228 , 1221, 1235 , 0 , 1, 173 +1230 , 1228 , 1221, 1235 , 0 , 1, 173 +1231 , 1228 , 1221, 1235 , 0 , 1, 173 +1232 , 1235 , 1228, 1242 , 0 , 1, 174 +1233 , 1235 , 1228, 1242 , 0 , 1, 174 +1234 , 1235 , 1228, 1242 , 0 , 1, 174 +1235 , 1235 , 1228, 1242 , 0 , 1, 174 +1236 , 1235 , 1228, 1242 , 0 , 1, 174 +1237 , 1235 , 1228, 1242 , 0 , 1, 174 +1238 , 1235 , 1228, 1242 , 0 , 1, 174 +1239 , 1242 , 1235, 1250 , 0 , 1, 175 +1240 , 1242 , 1235, 1250 , 0 , 1, 175 +1241 , 1242 , 1235, 1250 , 0 , 1, 175 +1242 , 1242 , 1235, 1250 , 0 , 1, 175 +1243 , 1242 , 1235, 1250 , 0 , 1, 175 +1244 , 1242 , 1235, 1250 , 0 , 1, 175 +1245 , 1242 , 1235, 1250 , 0 , 1, 175 +1246 , 1250 , 1242, 1257 , 0 , 1, 176 +1247 , 1250 , 1242, 1257 , 0 , 1, 176 +1248 , 1250 , 1242, 1257 , 0 , 1, 176 +1249 , 1250 , 1242, 1257 , 0 , 1, 176 +1250 , 1250 , 1242, 1257 , 0 , 1, 176 +1251 , 1250 , 1242, 1257 , 0 , 1, 176 +1252 , 1250 , 1242, 1257 , 0 , 1, 176 +1253 , 1250 , 1242, 1257 , 0 , 1, 176 +1254 , 1257 , 1250, 1265 , 0 , 1, 177 +1255 , 1257 , 1250, 1265 , 0 , 1, 177 +1256 , 1257 , 1250, 1265 , 0 , 1, 177 +1257 , 1257 , 1250, 1265 , 0 , 1, 177 +1258 , 1257 , 1250, 1265 , 0 , 1, 177 +1259 , 1257 , 1250, 1265 , 0 , 1, 177 +1260 , 1257 , 1250, 1265 , 0 , 1, 177 +1261 , 1265 , 1257, 1271 , 0 , 1, 178 +1262 , 1265 , 1257, 1271 , 0 , 1, 178 +1263 , 1265 , 1257, 1271 , 0 , 1, 178 +1264 , 1265 , 1257, 1271 , 0 , 1, 178 +1265 , 1265 , 1257, 1271 , 0 , 1, 178 +1266 , 1265 , 1257, 1271 , 0 , 1, 178 +1267 , 1265 , 1257, 1271 , 0 , 1, 178 +1268 , 1271 , 1265, 1278 , 0 , 1, 179 +1269 , 1271 , 1265, 1278 , 0 , 1, 179 +1270 , 1271 , 1265, 1278 , 0 , 1, 179 +1271 , 1271 , 1265, 1278 , 0 , 1, 179 +1272 , 1271 , 1265, 1278 , 0 , 1, 179 +1273 , 1271 , 1265, 1278 , 0 , 1, 179 +1274 , 1271 , 1265, 1278 , 0 , 1, 179 +1275 , 1278 , 1271, 1285 , 0 , 1, 180 +1276 , 1278 , 1271, 1285 , 0 , 1, 180 +1277 , 1278 , 1271, 1285 , 0 , 1, 180 +1278 , 1278 , 1271, 1285 , 0 , 1, 180 +1279 , 1278 , 1271, 1285 , 0 , 1, 180 +1280 , 1278 , 1271, 1285 , 0 , 1, 180 +1281 , 1278 , 1271, 1285 , 0 , 1, 180 +1282 , 1285 , 1278, 1292 , 0 , 1, 181 +1283 , 1285 , 1278, 1292 , 0 , 1, 181 +1284 , 1285 , 1278, 1292 , 0 , 1, 181 +1285 , 1285 , 1278, 1292 , 0 , 1, 181 +1286 , 1285 , 1278, 1292 , 0 , 1, 181 +1287 , 1285 , 1278, 1292 , 0 , 1, 181 +1288 , 1285 , 1278, 1292 , 0 , 1, 181 +1289 , 1292 , 1285, 1299 , 0 , 1, 182 +1290 , 1292 , 1285, 1299 , 0 , 1, 182 +1291 , 1292 , 1285, 1299 , 0 , 1, 182 +1292 , 1292 , 1285, 1299 , 0 , 1, 182 +1293 , 1292 , 1285, 1299 , 0 , 1, 182 +1294 , 1292 , 1285, 1299 , 0 , 1, 182 +1295 , 1292 , 1285, 1299 , 0 , 1, 182 +1296 , 1299 , 1292, 1306 , 0 , 1, 183 +1297 , 1299 , 1292, 1306 , 0 , 1, 183 +1298 , 1299 , 1292, 1306 , 0 , 1, 183 +1299 , 1299 , 1292, 1306 , 0 , 1, 183 +1300 , 1299 , 1292, 1306 , 0 , 1, 183 +1301 , 1299 , 1292, 1306 , 0 , 1, 183 +1302 , 1299 , 1292, 1306 , 0 , 1, 183 +1303 , 1306 , 1299, 1313 , 0 , 1, 184 +1304 , 1306 , 1299, 1313 , 0 , 1, 184 +1305 , 1306 , 1299, 1313 , 0 , 1, 184 +1306 , 1306 , 1299, 1313 , 0 , 1, 184 +1307 , 1306 , 1299, 1313 , 0 , 1, 184 +1308 , 1306 , 1299, 1313 , 0 , 1, 184 +1309 , 1306 , 1299, 1313 , 0 , 1, 184 +1310 , 1313 , 1306, 1320 , 0 , 1, 185 +1311 , 1313 , 1306, 1320 , 0 , 1, 185 +1312 , 1313 , 1306, 1320 , 0 , 1, 185 +1313 , 1313 , 1306, 1320 , 0 , 1, 185 +1314 , 1313 , 1306, 1320 , 0 , 1, 185 +1315 , 1313 , 1306, 1320 , 0 , 1, 185 +1316 , 1313 , 1306, 1320 , 0 , 1, 185 +1317 , 1320 , 1313, 1327 , 0 , 1, 186 +1318 , 1320 , 1313, 1327 , 0 , 1, 186 +1319 , 1320 , 1313, 1327 , 0 , 1, 186 +1320 , 1320 , 1313, 1327 , 0 , 1, 186 +1321 , 1320 , 1313, 1327 , 0 , 1, 186 +1322 , 1320 , 1313, 1327 , 0 , 1, 186 +1323 , 1320 , 1313, 1327 , 0 , 1, 186 +1324 , 1327 , 1320, 1333 , 0 , 1, 187 +1325 , 1327 , 1320, 1333 , 0 , 1, 187 +1326 , 1327 , 1320, 1333 , 0 , 1, 187 +1327 , 1327 , 1320, 1333 , 0 , 1, 187 +1328 , 1327 , 1320, 1333 , 0 , 1, 187 +1329 , 1327 , 1320, 1333 , 0 , 1, 187 +1330 , 1333 , 1327, 1340 , 0 , 1, 188 +1331 , 1333 , 1327, 1340 , 0 , 1, 188 +1332 , 1333 , 1327, 1340 , 0 , 1, 188 +1333 , 1333 , 1327, 1340 , 0 , 1, 188 +1334 , 1333 , 1327, 1340 , 0 , 1, 188 +1335 , 1333 , 1327, 1340 , 0 , 1, 188 +1336 , 1333 , 1327, 1340 , 0 , 1, 188 +1337 , 1340 , 1333, 1347 , 0 , 1, 189 +1338 , 1340 , 1333, 1347 , 0 , 1, 189 +1339 , 1340 , 1333, 1347 , 0 , 1, 189 +1340 , 1340 , 1333, 1347 , 0 , 1, 189 +1341 , 1340 , 1333, 1347 , 0 , 1, 189 +1342 , 1340 , 1333, 1347 , 0 , 1, 189 +1343 , 1340 , 1333, 1347 , 0 , 1, 189 +1344 , 1347 , 1340, 1355 , 0 , 1, 190 +1345 , 1347 , 1340, 1355 , 0 , 1, 190 +1346 , 1347 , 1340, 1355 , 0 , 1, 190 +1347 , 1347 , 1340, 1355 , 0 , 1, 190 +1348 , 1347 , 1340, 1355 , 0 , 1, 190 +1349 , 1347 , 1340, 1355 , 0 , 1, 190 +1350 , 1347 , 1340, 1355 , 0 , 1, 190 +1351 , 1355 , 1347, 1363 , 0 , 1, 191 +1352 , 1355 , 1347, 1363 , 0 , 1, 191 +1353 , 1355 , 1347, 1363 , 0 , 1, 191 +1354 , 1355 , 1347, 1363 , 0 , 1, 191 +1355 , 1355 , 1347, 1363 , 0 , 1, 191 +1356 , 1355 , 1347, 1363 , 0 , 1, 191 +1357 , 1355 , 1347, 1363 , 0 , 1, 191 +1358 , 1355 , 1347, 1363 , 0 , 1, 191 +1359 , 1363 , 1355, 1370 , 0 , 1, 192 +1360 , 1363 , 1355, 1370 , 0 , 1, 192 +1361 , 1363 , 1355, 1370 , 0 , 1, 192 +1362 , 1363 , 1355, 1370 , 0 , 1, 192 +1363 , 1363 , 1355, 1370 , 0 , 1, 192 +1364 , 1363 , 1355, 1370 , 0 , 1, 192 +1365 , 1363 , 1355, 1370 , 0 , 1, 192 +1366 , 1363 , 1355, 1370 , 0 , 1, 192 +1367 , 1370 , 1363, 1377 , 0 , 1, 193 +1368 , 1370 , 1363, 1377 , 0 , 1, 193 +1369 , 1370 , 1363, 1377 , 0 , 1, 193 +1370 , 1370 , 1363, 1377 , 0 , 1, 193 +1371 , 1370 , 1363, 1377 , 0 , 1, 193 +1372 , 1370 , 1363, 1377 , 0 , 1, 193 +1373 , 1370 , 1363, 1377 , 0 , 1, 193 +1374 , 1377 , 1370, 1384 , 0 , 1, 194 +1375 , 1377 , 1370, 1384 , 0 , 1, 194 +1376 , 1377 , 1370, 1384 , 0 , 1, 194 +1377 , 1377 , 1370, 1384 , 0 , 1, 194 +1378 , 1377 , 1370, 1384 , 0 , 1, 194 +1379 , 1377 , 1370, 1384 , 0 , 1, 194 +1380 , 1377 , 1370, 1384 , 0 , 1, 194 +1381 , 1384 , 1377, 1391 , 0 , 1, 195 +1382 , 1384 , 1377, 1391 , 0 , 1, 195 +1383 , 1384 , 1377, 1391 , 0 , 1, 195 +1384 , 1384 , 1377, 1391 , 0 , 1, 195 +1385 , 1384 , 1377, 1391 , 0 , 1, 195 +1386 , 1384 , 1377, 1391 , 0 , 1, 195 +1387 , 1384 , 1377, 1391 , 0 , 1, 195 +1388 , 1391 , 1384, 1398 , 0 , 1, 196 +1389 , 1391 , 1384, 1398 , 0 , 1, 196 +1390 , 1391 , 1384, 1398 , 0 , 1, 196 +1391 , 1391 , 1384, 1398 , 0 , 1, 196 +1392 , 1391 , 1384, 1398 , 0 , 1, 196 +1393 , 1391 , 1384, 1398 , 0 , 1, 196 +1394 , 1391 , 1384, 1398 , 0 , 1, 196 +1395 , 1398 , 1391, 1405 , 0 , 1, 197 +1396 , 1398 , 1391, 1405 , 0 , 1, 197 +1397 , 1398 , 1391, 1405 , 0 , 1, 197 +1398 , 1398 , 1391, 1405 , 0 , 1, 197 +1399 , 1398 , 1391, 1405 , 0 , 1, 197 +1400 , 1398 , 1391, 1405 , 0 , 1, 197 +1401 , 1398 , 1391, 1405 , 0 , 1, 197 +1402 , 1405 , 1398, 1412 , 0 , 1, 198 +1403 , 1405 , 1398, 1412 , 0 , 1, 198 +1404 , 1405 , 1398, 1412 , 0 , 1, 198 +1405 , 1405 , 1398, 1412 , 0 , 1, 198 +1406 , 1405 , 1398, 1412 , 0 , 1, 198 +1407 , 1405 , 1398, 1412 , 0 , 1, 198 +1408 , 1405 , 1398, 1412 , 0 , 1, 198 +1409 , 1412 , 1405, 1419 , 0 , 1, 199 +1410 , 1412 , 1405, 1419 , 0 , 1, 199 +1411 , 1412 , 1405, 1419 , 0 , 1, 199 +1412 , 1412 , 1405, 1419 , 0 , 1, 199 +1413 , 1412 , 1405, 1419 , 0 , 1, 199 +1414 , 1412 , 1405, 1419 , 0 , 1, 199 +1415 , 1412 , 1405, 1419 , 0 , 1, 199 +1416 , 1419 , 1412, 1426 , 0 , 1, 200 +1417 , 1419 , 1412, 1426 , 0 , 1, 200 +1418 , 1419 , 1412, 1426 , 0 , 1, 200 +1419 , 1419 , 1412, 1426 , 0 , 1, 200 +1420 , 1419 , 1412, 1426 , 0 , 1, 200 +1421 , 1419 , 1412, 1426 , 0 , 1, 200 +1422 , 1419 , 1412, 1426 , 0 , 1, 200 +1423 , 1426 , 1419, 1433 , 0 , 1, 201 +1424 , 1426 , 1419, 1433 , 0 , 1, 201 +1425 , 1426 , 1419, 1433 , 0 , 1, 201 +1426 , 1426 , 1419, 1433 , 0 , 1, 201 +1427 , 1426 , 1419, 1433 , 0 , 1, 201 +1428 , 1426 , 1419, 1433 , 0 , 1, 201 +1429 , 1426 , 1419, 1433 , 0 , 1, 201 +1430 , 1433 , 1426, 1440 , 0 , 1, 202 +1431 , 1433 , 1426, 1440 , 0 , 1, 202 +1432 , 1433 , 1426, 1440 , 0 , 1, 202 +1433 , 1433 , 1426, 1440 , 0 , 1, 202 +1434 , 1433 , 1426, 1440 , 0 , 1, 202 +1435 , 1433 , 1426, 1440 , 0 , 1, 202 +1436 , 1433 , 1426, 1440 , 0 , 1, 202 +1437 , 1440 , 1433, 1447 , 0 , 1, 203 +1438 , 1440 , 1433, 1447 , 0 , 1, 203 +1439 , 1440 , 1433, 1447 , 0 , 1, 203 +1440 , 1440 , 1433, 1447 , 0 , 1, 203 +1441 , 1440 , 1433, 1447 , 0 , 1, 203 +1442 , 1440 , 1433, 1447 , 0 , 1, 203 +1443 , 1440 , 1433, 1447 , 0 , 1, 203 +1444 , 1447 , 1440, 1454 , 0 , 1, 204 +1445 , 1447 , 1440, 1454 , 0 , 1, 204 +1446 , 1447 , 1440, 1454 , 0 , 1, 204 +1447 , 1447 , 1440, 1454 , 0 , 1, 204 +1448 , 1447 , 1440, 1454 , 0 , 1, 204 +1449 , 1447 , 1440, 1454 , 0 , 1, 204 +1450 , 1447 , 1440, 1454 , 0 , 1, 204 +1451 , 1454 , 1447, 1461 , 0 , 1, 205 +1452 , 1454 , 1447, 1461 , 0 , 1, 205 +1453 , 1454 , 1447, 1461 , 0 , 1, 205 +1454 , 1454 , 1447, 1461 , 0 , 1, 205 +1455 , 1454 , 1447, 1461 , 0 , 1, 205 +1456 , 1454 , 1447, 1461 , 0 , 1, 205 +1457 , 1454 , 1447, 1461 , 0 , 1, 205 +1458 , 1461 , 1454, 1468 , 0 , 1, 206 +1459 , 1461 , 1454, 1468 , 0 , 1, 206 +1460 , 1461 , 1454, 1468 , 0 , 1, 206 +1461 , 1461 , 1454, 1468 , 0 , 1, 206 +1462 , 1461 , 1454, 1468 , 0 , 1, 206 +1463 , 1461 , 1454, 1468 , 0 , 1, 206 +1464 , 1461 , 1454, 1468 , 0 , 1, 206 +1465 , 1468 , 1461, 1476 , 0 , 1, 207 +1466 , 1468 , 1461, 1476 , 0 , 1, 207 +1467 , 1468 , 1461, 1476 , 0 , 1, 207 +1468 , 1468 , 1461, 1476 , 0 , 1, 207 +1469 , 1468 , 1461, 1476 , 0 , 1, 207 +1470 , 1468 , 1461, 1476 , 0 , 1, 207 +1471 , 1468 , 1461, 1476 , 0 , 1, 207 +1472 , 1476 , 1468, 1483 , 0 , 1, 208 +1473 , 1476 , 1468, 1483 , 0 , 1, 208 +1474 , 1476 , 1468, 1483 , 0 , 1, 208 +1475 , 1476 , 1468, 1483 , 0 , 1, 208 +1476 , 1476 , 1468, 1483 , 0 , 1, 208 +1477 , 1476 , 1468, 1483 , 0 , 1, 208 +1478 , 1476 , 1468, 1483 , 0 , 1, 208 +1479 , 1476 , 1468, 1483 , 0 , 1, 208 +1480 , 1483 , 1476, 1490 , 0 , 1, 209 +1481 , 1483 , 1476, 1490 , 0 , 1, 209 +1482 , 1483 , 1476, 1490 , 0 , 1, 209 +1483 , 1483 , 1476, 1490 , 0 , 1, 209 +1484 , 1483 , 1476, 1490 , 0 , 1, 209 +1485 , 1483 , 1476, 1490 , 0 , 1, 209 +1486 , 1483 , 1476, 1490 , 0 , 1, 209 +1487 , 1490 , 1483, 1497 , 0 , 1, 210 +1488 , 1490 , 1483, 1497 , 0 , 1, 210 +1489 , 1490 , 1483, 1497 , 0 , 1, 210 +1490 , 1490 , 1483, 1497 , 0 , 1, 210 +1491 , 1490 , 1483, 1497 , 0 , 1, 210 +1492 , 1490 , 1483, 1497 , 0 , 1, 210 +1493 , 1490 , 1483, 1497 , 0 , 1, 210 +1494 , 1497 , 1490, 1504 , 0 , 1, 211 +1495 , 1497 , 1490, 1504 , 0 , 1, 211 +1496 , 1497 , 1490, 1504 , 0 , 1, 211 +1497 , 1497 , 1490, 1504 , 0 , 1, 211 +1498 , 1497 , 1490, 1504 , 0 , 1, 211 +1499 , 1497 , 1490, 1504 , 0 , 1, 211 +1500 , 1497 , 1490, 1504 , 0 , 1, 211 +1501 , 1504 , 1497, 1511 , 0 , 1, 212 +1502 , 1504 , 1497, 1511 , 0 , 1, 212 +1503 , 1504 , 1497, 1511 , 0 , 1, 212 +1504 , 1504 , 1497, 1511 , 0 , 1, 212 +1505 , 1504 , 1497, 1511 , 0 , 1, 212 +1506 , 1504 , 1497, 1511 , 0 , 1, 212 +1507 , 1504 , 1497, 1511 , 0 , 1, 212 +1508 , 1511 , 1504, 1518 , 0 , 1, 213 +1509 , 1511 , 1504, 1518 , 0 , 1, 213 +1510 , 1511 , 1504, 1518 , 0 , 1, 213 +1511 , 1511 , 1504, 1518 , 0 , 1, 213 +1512 , 1511 , 1504, 1518 , 0 , 1, 213 +1513 , 1511 , 1504, 1518 , 0 , 1, 213 +1514 , 1511 , 1504, 1518 , 0 , 1, 213 +1515 , 1518 , 1511, 1525 , 0 , 1, 214 +1516 , 1518 , 1511, 1525 , 0 , 1, 214 +1517 , 1518 , 1511, 1525 , 0 , 1, 214 +1518 , 1518 , 1511, 1525 , 0 , 1, 214 +1519 , 1518 , 1511, 1525 , 0 , 1, 214 +1520 , 1518 , 1511, 1525 , 0 , 1, 214 +1521 , 1518 , 1511, 1525 , 0 , 1, 214 +1522 , 1525 , 1518, 1532 , 0 , 1, 215 +1523 , 1525 , 1518, 1532 , 0 , 1, 215 +1524 , 1525 , 1518, 1532 , 0 , 1, 215 +1525 , 1525 , 1518, 1532 , 0 , 1, 215 +1526 , 1525 , 1518, 1532 , 0 , 1, 215 +1527 , 1525 , 1518, 1532 , 0 , 1, 215 +1528 , 1525 , 1518, 1532 , 0 , 1, 215 +1529 , 1532 , 1525, 1538 , 0 , 1, 216 +1530 , 1532 , 1525, 1538 , 0 , 1, 216 +1531 , 1532 , 1525, 1538 , 0 , 1, 216 +1532 , 1532 , 1525, 1538 , 0 , 1, 216 +1533 , 1532 , 1525, 1538 , 0 , 1, 216 +1534 , 1532 , 1525, 1538 , 0 , 1, 216 +1535 , 1538 , 1532, 1545 , 0 , 1, 217 +1536 , 1538 , 1532, 1545 , 0 , 1, 217 +1537 , 1538 , 1532, 1545 , 0 , 1, 217 +1538 , 1538 , 1532, 1545 , 0 , 1, 217 +1539 , 1538 , 1532, 1545 , 0 , 1, 217 +1540 , 1538 , 1532, 1545 , 0 , 1, 217 +1541 , 1538 , 1532, 1545 , 0 , 1, 217 +1542 , 1545 , 1538, 1552 , 0 , 1, 218 +1543 , 1545 , 1538, 1552 , 0 , 1, 218 +1544 , 1545 , 1538, 1552 , 0 , 1, 218 +1545 , 1545 , 1538, 1552 , 0 , 1, 218 +1546 , 1545 , 1538, 1552 , 0 , 1, 218 +1547 , 1545 , 1538, 1552 , 0 , 1, 218 +1548 , 1545 , 1538, 1552 , 0 , 1, 218 +1549 , 1552 , 1545, 1559 , 0 , 1, 219 +1550 , 1552 , 1545, 1559 , 0 , 1, 219 +1551 , 1552 , 1545, 1559 , 0 , 1, 219 +1552 , 1552 , 1545, 1559 , 0 , 1, 219 +1553 , 1552 , 1545, 1559 , 0 , 1, 219 +1554 , 1552 , 1545, 1559 , 0 , 1, 219 +1555 , 1552 , 1545, 1559 , 0 , 1, 219 +1556 , 1559 , 1552, 1565 , 0 , 1, 220 +1557 , 1559 , 1552, 1565 , 0 , 1, 220 +1558 , 1559 , 1552, 1565 , 0 , 1, 220 +1559 , 1559 , 1552, 1565 , 0 , 1, 220 +1560 , 1559 , 1552, 1565 , 0 , 1, 220 +1561 , 1559 , 1552, 1565 , 0 , 1, 220 +1562 , 1565 , 1559, 1572 , 0 , 1, 221 +1563 , 1565 , 1559, 1572 , 0 , 1, 221 +1564 , 1565 , 1559, 1572 , 0 , 1, 221 +1565 , 1565 , 1559, 1572 , 0 , 1, 221 +1566 , 1565 , 1559, 1572 , 0 , 1, 221 +1567 , 1565 , 1559, 1572 , 0 , 1, 221 +1568 , 1565 , 1559, 1572 , 0 , 1, 221 +1569 , 1572 , 1565, 1579 , 0 , 1, 222 +1570 , 1572 , 1565, 1579 , 0 , 1, 222 +1571 , 1572 , 1565, 1579 , 0 , 1, 222 +1572 , 1572 , 1565, 1579 , 0 , 1, 222 +1573 , 1572 , 1565, 1579 , 0 , 1, 222 +1574 , 1572 , 1565, 1579 , 0 , 1, 222 +1575 , 1572 , 1565, 1579 , 0 , 1, 222 +1576 , 1579 , 1572, 1588 , 0 , 1, 223 +1577 , 1579 , 1572, 1588 , 0 , 1, 223 +1578 , 1579 , 1572, 1588 , 0 , 1, 223 +1579 , 1579 , 1572, 1588 , 0 , 1, 223 +1580 , 1579 , 1572, 1588 , 0 , 1, 223 +1581 , 1579 , 1572, 1588 , 0 , 1, 223 +1582 , 1579 , 1572, 1588 , 0 , 1, 223 +1583 , 1579 , 1572, 1588 , 0 , 1, 223 +1584 , 1588 , 1579, 1595 , 0 , 1, 224 +1585 , 1588 , 1579, 1595 , 0 , 1, 224 +1586 , 1588 , 1579, 1595 , 0 , 1, 224 +1587 , 1588 , 1579, 1595 , 0 , 1, 224 +1588 , 1588 , 1579, 1595 , 0 , 1, 224 +1589 , 1588 , 1579, 1595 , 0 , 1, 224 +1590 , 1588 , 1579, 1595 , 0 , 1, 224 +1591 , 1588 , 1579, 1595 , 0 , 1, 224 +1592 , 1595 , 1588, 1602 , 0 , 1, 225 +1593 , 1595 , 1588, 1602 , 0 , 1, 225 +1594 , 1595 , 1588, 1602 , 0 , 1, 225 +1595 , 1595 , 1588, 1602 , 0 , 1, 225 +1596 , 1595 , 1588, 1602 , 0 , 1, 225 +1597 , 1595 , 1588, 1602 , 0 , 1, 225 +1598 , 1595 , 1588, 1602 , 0 , 1, 225 +1599 , 1602 , 1595, 1609 , 0 , 1, 226 +1600 , 1602 , 1595, 1609 , 0 , 1, 226 +1601 , 1602 , 1595, 1609 , 0 , 1, 226 +1602 , 1602 , 1595, 1609 , 0 , 1, 226 +1603 , 1602 , 1595, 1609 , 0 , 1, 226 +1604 , 1602 , 1595, 1609 , 0 , 1, 226 +1605 , 1602 , 1595, 1609 , 0 , 1, 226 +1606 , 1609 , 1602, 1616 , 0 , 1, 227 +1607 , 1609 , 1602, 1616 , 0 , 1, 227 +1608 , 1609 , 1602, 1616 , 0 , 1, 227 +1609 , 1609 , 1602, 1616 , 0 , 1, 227 +1610 , 1609 , 1602, 1616 , 0 , 1, 227 +1611 , 1609 , 1602, 1616 , 0 , 1, 227 +1612 , 1609 , 1602, 1616 , 0 , 1, 227 +1613 , 1616 , 1609, 1623 , 0 , 1, 228 +1614 , 1616 , 1609, 1623 , 0 , 1, 228 +1615 , 1616 , 1609, 1623 , 0 , 1, 228 +1616 , 1616 , 1609, 1623 , 0 , 1, 228 +1617 , 1616 , 1609, 1623 , 0 , 1, 228 +1618 , 1616 , 1609, 1623 , 0 , 1, 228 +1619 , 1616 , 1609, 1623 , 0 , 1, 228 +1620 , 1623 , 1616, 1630 , 0 , 1, 229 +1621 , 1623 , 1616, 1630 , 0 , 1, 229 +1622 , 1623 , 1616, 1630 , 0 , 1, 229 +1623 , 1623 , 1616, 1630 , 0 , 1, 229 +1624 , 1623 , 1616, 1630 , 0 , 1, 229 +1625 , 1623 , 1616, 1630 , 0 , 1, 229 +1626 , 1623 , 1616, 1630 , 0 , 1, 229 +1627 , 1630 , 1623, 1637 , 0 , 1, 230 +1628 , 1630 , 1623, 1637 , 0 , 1, 230 +1629 , 1630 , 1623, 1637 , 0 , 1, 230 +1630 , 1630 , 1623, 1637 , 0 , 1, 230 +1631 , 1630 , 1623, 1637 , 0 , 1, 230 +1632 , 1630 , 1623, 1637 , 0 , 1, 230 +1633 , 1630 , 1623, 1637 , 0 , 1, 230 +1634 , 1637 , 1630, 1644 , 0 , 1, 231 +1635 , 1637 , 1630, 1644 , 0 , 1, 231 +1636 , 1637 , 1630, 1644 , 0 , 1, 231 +1637 , 1637 , 1630, 1644 , 0 , 1, 231 +1638 , 1637 , 1630, 1644 , 0 , 1, 231 +1639 , 1637 , 1630, 1644 , 0 , 1, 231 +1640 , 1637 , 1630, 1644 , 0 , 1, 231 +1641 , 1644 , 1637, 1651 , 0 , 1, 232 +1642 , 1644 , 1637, 1651 , 0 , 1, 232 +1643 , 1644 , 1637, 1651 , 0 , 1, 232 +1644 , 1644 , 1637, 1651 , 0 , 1, 232 +1645 , 1644 , 1637, 1651 , 0 , 1, 232 +1646 , 1644 , 1637, 1651 , 0 , 1, 232 +1647 , 1644 , 1637, 1651 , 0 , 1, 232 +1648 , 1651 , 1644, 1658 , 0 , 1, 233 +1649 , 1651 , 1644, 1658 , 0 , 1, 233 +1650 , 1651 , 1644, 1658 , 0 , 1, 233 +1651 , 1651 , 1644, 1658 , 0 , 1, 233 +1652 , 1651 , 1644, 1658 , 0 , 1, 233 +1653 , 1651 , 1644, 1658 , 0 , 1, 233 +1654 , 1651 , 1644, 1658 , 0 , 1, 233 +1655 , 1658 , 1651, 1665 , 0 , 1, 234 +1656 , 1658 , 1651, 1665 , 0 , 1, 234 +1657 , 1658 , 1651, 1665 , 0 , 1, 234 +1658 , 1658 , 1651, 1665 , 0 , 1, 234 +1659 , 1658 , 1651, 1665 , 0 , 1, 234 +1660 , 1658 , 1651, 1665 , 0 , 1, 234 +1661 , 1658 , 1651, 1665 , 0 , 1, 234 +1662 , 1665 , 1658, 1672 , 0 , 1, 235 +1663 , 1665 , 1658, 1672 , 0 , 1, 235 +1664 , 1665 , 1658, 1672 , 0 , 1, 235 +1665 , 1665 , 1658, 1672 , 0 , 1, 235 +1666 , 1665 , 1658, 1672 , 0 , 1, 235 +1667 , 1665 , 1658, 1672 , 0 , 1, 235 +1668 , 1665 , 1658, 1672 , 0 , 1, 235 +1669 , 1672 , 1665, 1679 , 0 , 1, 236 +1670 , 1672 , 1665, 1679 , 0 , 1, 236 +1671 , 1672 , 1665, 1679 , 0 , 1, 236 +1672 , 1672 , 1665, 1679 , 0 , 1, 236 +1673 , 1672 , 1665, 1679 , 0 , 1, 236 +1674 , 1672 , 1665, 1679 , 0 , 1, 236 +1675 , 1672 , 1665, 1679 , 0 , 1, 236 +1676 , 1679 , 1672, 1686 , 0 , 1, 237 +1677 , 1679 , 1672, 1686 , 0 , 1, 237 +1678 , 1679 , 1672, 1686 , 0 , 1, 237 +1679 , 1679 , 1672, 1686 , 0 , 1, 237 +1680 , 1679 , 1672, 1686 , 0 , 1, 237 +1681 , 1679 , 1672, 1686 , 0 , 1, 237 +1682 , 1679 , 1672, 1686 , 0 , 1, 237 +1683 , 1686 , 1679, 1693 , 0 , 1, 238 +1684 , 1686 , 1679, 1693 , 0 , 1, 238 +1685 , 1686 , 1679, 1693 , 0 , 1, 238 +1686 , 1686 , 1679, 1693 , 0 , 1, 238 +1687 , 1686 , 1679, 1693 , 0 , 1, 238 +1688 , 1686 , 1679, 1693 , 0 , 1, 238 +1689 , 1686 , 1679, 1693 , 0 , 1, 238 +1690 , 1693 , 1686, 1701 , 0 , 1, 239 +1691 , 1693 , 1686, 1701 , 0 , 1, 239 +1692 , 1693 , 1686, 1701 , 0 , 1, 239 +1693 , 1693 , 1686, 1701 , 0 , 1, 239 +1694 , 1693 , 1686, 1701 , 0 , 1, 239 +1695 , 1693 , 1686, 1701 , 0 , 1, 239 +1696 , 1693 , 1686, 1701 , 0 , 1, 239 +1697 , 1701 , 1693, 1708 , 0 , 1, 240 +1698 , 1701 , 1693, 1708 , 0 , 1, 240 +1699 , 1701 , 1693, 1708 , 0 , 1, 240 +1700 , 1701 , 1693, 1708 , 0 , 1, 240 +1701 , 1701 , 1693, 1708 , 0 , 1, 240 +1702 , 1701 , 1693, 1708 , 0 , 1, 240 +1703 , 1701 , 1693, 1708 , 0 , 1, 240 +1704 , 1701 , 1693, 1708 , 0 , 1, 240 +1705 , 1708 , 1701, 1716 , 0 , 1, 241 +1706 , 1708 , 1701, 1716 , 0 , 1, 241 +1707 , 1708 , 1701, 1716 , 0 , 1, 241 +1708 , 1708 , 1701, 1716 , 0 , 1, 241 +1709 , 1708 , 1701, 1716 , 0 , 1, 241 +1710 , 1708 , 1701, 1716 , 0 , 1, 241 +1711 , 1708 , 1701, 1716 , 0 , 1, 241 +1712 , 1716 , 1708, 1723 , 0 , 1, 242 +1713 , 1716 , 1708, 1723 , 0 , 1, 242 +1714 , 1716 , 1708, 1723 , 0 , 1, 242 +1715 , 1716 , 1708, 1723 , 0 , 1, 242 +1716 , 1716 , 1708, 1723 , 0 , 1, 242 +1717 , 1716 , 1708, 1723 , 0 , 1, 242 +1718 , 1716 , 1708, 1723 , 0 , 1, 242 +1719 , 1716 , 1708, 1723 , 0 , 1, 242 +1720 , 1723 , 1716, 1730 , 0 , 1, 243 +1721 , 1723 , 1716, 1730 , 0 , 1, 243 +1722 , 1723 , 1716, 1730 , 0 , 1, 243 +1723 , 1723 , 1716, 1730 , 0 , 1, 243 +1724 , 1723 , 1716, 1730 , 0 , 1, 243 +1725 , 1723 , 1716, 1730 , 0 , 1, 243 +1726 , 1723 , 1716, 1730 , 0 , 1, 243 +1727 , 1730 , 1723, 1737 , 0 , 1, 244 +1728 , 1730 , 1723, 1737 , 0 , 1, 244 +1729 , 1730 , 1723, 1737 , 0 , 1, 244 +1730 , 1730 , 1723, 1737 , 0 , 1, 244 +1731 , 1730 , 1723, 1737 , 0 , 1, 244 +1732 , 1730 , 1723, 1737 , 0 , 1, 244 +1733 , 1730 , 1723, 1737 , 0 , 1, 244 +1734 , 1737 , 1730, 1744 , 0 , 1, 245 +1735 , 1737 , 1730, 1744 , 0 , 1, 245 +1736 , 1737 , 1730, 1744 , 0 , 1, 245 +1737 , 1737 , 1730, 1744 , 0 , 1, 245 +1738 , 1737 , 1730, 1744 , 0 , 1, 245 +1739 , 1737 , 1730, 1744 , 0 , 1, 245 +1740 , 1737 , 1730, 1744 , 0 , 1, 245 +1741 , 1744 , 1737, 1751 , 0 , 1, 246 +1742 , 1744 , 1737, 1751 , 0 , 1, 246 +1743 , 1744 , 1737, 1751 , 0 , 1, 246 +1744 , 1744 , 1737, 1751 , 0 , 1, 246 +1745 , 1744 , 1737, 1751 , 0 , 1, 246 +1746 , 1744 , 1737, 1751 , 0 , 1, 246 +1747 , 1744 , 1737, 1751 , 0 , 1, 246 +1748 , 1751 , 1744, 1758 , 0 , 1, 247 +1749 , 1751 , 1744, 1758 , 0 , 1, 247 +1750 , 1751 , 1744, 1758 , 0 , 1, 247 +1751 , 1751 , 1744, 1758 , 0 , 1, 247 +1752 , 1751 , 1744, 1758 , 0 , 1, 247 +1753 , 1751 , 1744, 1758 , 0 , 1, 247 +1754 , 1751 , 1744, 1758 , 0 , 1, 247 +1755 , 1758 , 1751, 1765 , 0 , 1, 248 +1756 , 1758 , 1751, 1765 , 0 , 1, 248 +1757 , 1758 , 1751, 1765 , 0 , 1, 248 +1758 , 1758 , 1751, 1765 , 0 , 1, 248 +1759 , 1758 , 1751, 1765 , 0 , 1, 248 +1760 , 1758 , 1751, 1765 , 0 , 1, 248 +1761 , 1758 , 1751, 1765 , 0 , 1, 248 +1762 , 1765 , 1758, 1772 , 0 , 1, 249 +1763 , 1765 , 1758, 1772 , 0 , 1, 249 +1764 , 1765 , 1758, 1772 , 0 , 1, 249 +1765 , 1765 , 1758, 1772 , 0 , 1, 249 +1766 , 1765 , 1758, 1772 , 0 , 1, 249 +1767 , 1765 , 1758, 1772 , 0 , 1, 249 +1768 , 1765 , 1758, 1772 , 0 , 1, 249 +1769 , 1772 , 1765, 1778 , 0 , 1, 250 +1770 , 1772 , 1765, 1778 , 0 , 1, 250 +1771 , 1772 , 1765, 1778 , 0 , 1, 250 +1772 , 1772 , 1765, 1778 , 0 , 1, 250 +1773 , 1772 , 1765, 1778 , 0 , 1, 250 +1774 , 1772 , 1765, 1778 , 0 , 1, 250 +1775 , 1778 , 1772, 1783 , 0 , 1, 251 +1776 , 1778 , 1772, 1783 , 0 , 1, 251 +1777 , 1778 , 1772, 1783 , 0 , 1, 251 +1778 , 1778 , 1772, 1783 , 0 , 1, 251 +1779 , 1778 , 1772, 1783 , 0 , 1, 251 +1780 , 1778 , 1772, 1783 , 0 , 1, 251 +1781 , 1783 , 1778, 1787 , 0 , 1, 252 +1782 , 1783 , 1778, 1787 , 0 , 1, 252 +1783 , 1783 , 1778, 1787 , 0 , 1, 252 +1784 , 1783 , 1778, 1787 , 0 , 1, 252 +1785 , 1787 , 1783, 1789 , 0 , 1, 253 +1786 , 1787 , 1783, 1789 , 0 , 1, 253 +1787 , 1787 , 1783, 1789 , 0 , 1, 253 +1788 , 1789 , 1787, 1791 , 0 , 1, 254 +1789 , 1789 , 1787, 1791 , 0 , 1, 254 +1790 , 1791 , 1789, 1791 , 0 , 1, 255 +1791 , 1791 , 1789, 1791 , 0 , 1, 255 +1792 , 1791 , 1789, 1791 , 0 , 1, 255 +1793 , 1791 , 1789, 1791 , 0 , 1, 255 +1794 , 1791 , 1789, 1791 , 0 , 1, 255 +1795 , 1791 , 1789, 1791 , 0 , 1, 255 +1796 , 1791 , 1789, 1791 , 0 , 1, 255 +1797 , 1791 , 1789, 1791 , 0 , 1, 255 +1798 , 1791 , 1789, 1791 , 0 , 1, 255 +1799 , 1791 , 1789, 1791 , 0 , 1, 255 +1800 , 1791 , 1789, 1791 , 0 , 1, 255 diff --git a/hal_psee_plugins/cmake/MetavisionHALPseePluginsCPackConfig.cmake b/hal_psee_plugins/cmake/MetavisionHALPseePluginsCPackConfig.cmake new file mode 100644 index 000000000..1e0722a8b --- /dev/null +++ b/hal_psee_plugins/cmake/MetavisionHALPseePluginsCPackConfig.cmake @@ -0,0 +1,15 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. + +#################################### +# metavision-hal-prophesee-plugins # +#################################### + +# File and package name of the components are automatically set, just need to set the package description +set(CPACK_COMPONENT_METAVISION-HAL-PROPHESEE-PLUGINS_DESCRIPTION "Prophesee Plugins for Metavision HAL.\n${PACKAGE_LICENSE}") \ No newline at end of file diff --git a/hal_psee_plugins/include/boards/fx3/fx3_camera_discovery.h b/hal_psee_plugins/include/boards/fx3/fx3_camera_discovery.h new file mode 100644 index 000000000..7f0196273 --- /dev/null +++ b/hal_psee_plugins/include/boards/fx3/fx3_camera_discovery.h @@ -0,0 +1,40 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_FX3_CAMERA_DISCOVERY_H +#define METAVISION_HAL_FX3_CAMERA_DISCOVERY_H + +#include + +#include "boards/utils/psee_camera_discovery.h" +#include "metavision/hal/utils/device_builder.h" + +namespace Metavision { + +class Fx3LibUSBBoardCommand; + +class Fx3CameraDiscovery : public PseeCameraDiscovery { +public: + struct DeviceBuilderParameters : public Metavision::DeviceBuilderParameters { + DeviceBuilderParameters(const std::shared_ptr &board_cmd) : board_cmd(board_cmd) {} + std::shared_ptr board_cmd; + }; + + virtual CameraDiscovery::SerialList list() override; + virtual CameraDiscovery::SystemList list_available_sources() override; + + virtual bool discover(DeviceBuilder &device_builder, const std::string &serial, + const DeviceConfig &config) override; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_FX3_CAMERA_DISCOVERY_H diff --git a/hal_psee_plugins/include/boards/fx3/fx3_hw_identification.h b/hal_psee_plugins/include/boards/fx3/fx3_hw_identification.h new file mode 100644 index 000000000..a37e1e7e7 --- /dev/null +++ b/hal_psee_plugins/include/boards/fx3/fx3_hw_identification.h @@ -0,0 +1,94 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_FX3_HW_IDENTIFICATION_H +#define METAVISION_HAL_FX3_HW_IDENTIFICATION_H + +#include +#include + +#include "metavision/hal/facilities/i_hw_identification.h" + +namespace Metavision { + +class PseeLibUSBBoardCommand; + +/// @brief Facility to provide information about the available system +class Fx3HWIdentification : public I_HW_Identification { +public: + /// @brief Facility Constructor + /// + /// @param integrator Name of the system integrator + Fx3HWIdentification(const std::shared_ptr &plugin_sw_info, + const std::shared_ptr &board_cmd, bool is_EVT3, long subsystem_ID, + const std::string &integrator = "Prophesee"); + + /// @brief Returns the serial number of the camera + /// + /// @return Serial number as a string + virtual std::string get_serial() const override; + + /// @brief Returns the serial number of the camera + /// + /// @return The system id as a integer + /// + /// @note this number can be used to check the compatibility of biases file for example + virtual long get_system_id() const override; + + /// @brief Returns the detail about the sensor available + /// + /// @return The sensor information + virtual I_HW_Identification::SensorInfo get_sensor_info() const override final; + + /// @brief Returns the version number for this system + /// + /// @return System version as an integer + virtual long get_system_version() const override final; + + /// @brief Returns the name of the available RAW format + /// + /// @return The available format + /// + /// @note currently the available formats are: + /// - EVT2 + /// - EVT3 + virtual std::vector get_available_raw_format() const override final; + + /// @brief Returns the integrator name + /// + /// @return Name of the Integrator + virtual std::string get_integrator() const override final; + + /// @brief Returns all available information + /// + /// @return Map of key-value + /// + /// @note the purpose of this function is mainly for debug and display system information + virtual SystemInfo get_system_info() const override final; + + /// @brief Returns the connection with the camera as a string + /// + /// @return A string providing the kind of connection with the available camera + virtual std::string get_connection_type() const override final; + +private: + virtual RawFileHeader get_header_impl() const override; + + std::shared_ptr icmd_; + I_HW_Identification::SensorInfo sensor_info_; + bool is_evt3_; + long subsystem_ID_; + std::string integrator_; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_FX3_HW_IDENTIFICATION_H diff --git a/sdk/modules/driver/cpp/src/temperature_module.cpp b/hal_psee_plugins/include/boards/fx3/fx3_libusb_board_command.h similarity index 68% rename from sdk/modules/driver/cpp/src/temperature_module.cpp rename to hal_psee_plugins/include/boards/fx3/fx3_libusb_board_command.h index 850746431..b9996e6c4 100644 --- a/sdk/modules/driver/cpp/src/temperature_module.cpp +++ b/hal_psee_plugins/include/boards/fx3/fx3_libusb_board_command.h @@ -9,23 +9,26 @@ * See the License for the specific language governing permissions and limitations under the License. * **********************************************************************************************************************/ -#include "metavision/sdk/driver/temperature_module.h" -#include "metavision/sdk/driver/camera_exception.h" +#ifndef METAVISION_HAL_FX3_LIBUSB_BOARD_COMMAND_H +#define METAVISION_HAL_FX3_LIBUSB_BOARD_COMMAND_H + +#include "boards/utils/psee_libusb_board_command.h" namespace Metavision { -TemperatureModule::~TemperatureModule() {} +class Fx3LibUSBBoardCommand : public PseeLibUSBBoardCommand { +public: + static ListSerial get_list_serial(); -void TemperatureModule::enable() { - throw CameraException(CameraErrorCode::DeprecatedFeature, "TemperatureModule not available."); -} + Fx3LibUSBBoardCommand(); -void TemperatureModule::disable() { - throw CameraException(CameraErrorCode::DeprecatedFeature, "TemperatureModule not available."); -} + std::string get_serial() override final; + long try_to_flush() override final; -float TemperatureModule::get_temperature(int source) { - throw CameraException(CameraErrorCode::DeprecatedFeature, "TemperatureModule not available."); -} +private: + static void get_all_serial(libusb_context *ctx, ListSerial &lserial); + Fx3LibUSBBoardCommand(libusb_device_handle *dev_handle); +}; } // namespace Metavision +#endif // METAVISION_HAL_FX3_LIBUSB_BOARD_COMMAND_H diff --git a/hal_psee_plugins/include/boards/rawfile/file_hw_identification.h b/hal_psee_plugins/include/boards/rawfile/file_hw_identification.h new file mode 100644 index 000000000..4030e6ea6 --- /dev/null +++ b/hal_psee_plugins/include/boards/rawfile/file_hw_identification.h @@ -0,0 +1,46 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_FILE_HW_IDENTIFICATION_H +#define METAVISION_HAL_FILE_HW_IDENTIFICATION_H + +#include +#include +#include + +#include "boards/rawfile/psee_raw_file_header.h" +#include "metavision/hal/facilities/i_hw_identification.h" + +namespace Metavision { + +class FileHWIdentification : public I_HW_Identification { +public: + FileHWIdentification(const std::shared_ptr &plugin_sw_info, + const PseeRawFileHeader &raw_header); + + std::string get_serial() const override final; + long get_system_id() const override final; + long get_system_version() const override final; + std::vector get_available_raw_format() const override final; + std::string get_integrator() const override final; + std::string get_connection_type() const override final; + SensorInfo get_sensor_info() const override final; + +protected: + RawFileHeader get_header_impl() const override; + +private: + PseeRawFileHeader raw_header_; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_FILE_HW_IDENTIFICATION_H diff --git a/hal_psee_plugins/include/boards/rawfile/psee_file_discovery.h b/hal_psee_plugins/include/boards/rawfile/psee_file_discovery.h new file mode 100644 index 000000000..f175cfd6d --- /dev/null +++ b/hal_psee_plugins/include/boards/rawfile/psee_file_discovery.h @@ -0,0 +1,28 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_PSEE_FILE_DISCOVERY_H +#define METAVISION_HAL_PSEE_FILE_DISCOVERY_H + +#include "metavision/hal/utils/file_discovery.h" +#include "metavision/hal/utils/device_builder.h" + +namespace Metavision { + +class PseeFileDiscovery : public FileDiscovery { +public: + bool discover(DeviceBuilder &device_builder, std::unique_ptr &stream, const RawFileHeader &header, + const RawFileConfig &config) override; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_PSEE_FILE_DISCOVERY_H diff --git a/hal_psee_plugins/include/boards/rawfile/psee_raw_file_header.h b/hal_psee_plugins/include/boards/rawfile/psee_raw_file_header.h new file mode 100644 index 000000000..50f11a107 --- /dev/null +++ b/hal_psee_plugins/include/boards/rawfile/psee_raw_file_header.h @@ -0,0 +1,63 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_PSEE_RAW_FILE_HEADER_H +#define METAVISION_HAL_PSEE_RAW_FILE_HEADER_H + +#include +#include +#include +#include + +#include "metavision/hal/facilities/i_hw_identification.h" +#include "metavision/hal/facilities/i_geometry.h" +#include "metavision/hal/utils/raw_file_header.h" +#include "plugin/psee_plugin.h" + +namespace Metavision { + +/// @brief Convenient class to handle Prophesee RAW files header +class PseeRawFileHeader : public RawFileHeader { +public: + PseeRawFileHeader(const I_HW_Identification &, const I_Geometry &); + PseeRawFileHeader(std::istream &); + PseeRawFileHeader(const HeaderMap &); + PseeRawFileHeader(const RawFileHeader &); + + std::string get_serial() const; + + long get_system_id() const; + + // This isn't part of standard I_HW_Identification + void set_sub_system_id(long); + long get_sub_system_id() const; + + I_HW_Identification::SensorInfo get_sensor_info() const; + + long get_system_version() const; + + std::unique_ptr get_geometry() const; + + void set_format(const std::string &); + std::string get_format() const; + +private: + void check_header(); + void set_serial(std::string); + void set_system_id(long system_id); + void set_sensor_info(const I_HW_Identification::SensorInfo &); + void set_system_version(long); + void set_geometry(const Metavision::I_Geometry &); +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_PSEE_RAW_FILE_HEADER_H diff --git a/hal_psee_plugins/include/boards/treuzell/treuzell_command_definition.h b/hal_psee_plugins/include/boards/treuzell/treuzell_command_definition.h new file mode 100644 index 000000000..c472c2979 --- /dev/null +++ b/hal_psee_plugins/include/boards/treuzell/treuzell_command_definition.h @@ -0,0 +1,31 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef __TREUZELL_COMMAND_DEFINITION_H +#define __TREUZELL_COMMAND_DEFINITION_H + +#define TZ_FAILURE_FLAG (0x80000000) /* Sent by device when a command fails */ +#define TZ_WRITE_FLAG (0x40000000) /* Add to a property to request write */ + +#define TZ_UNKNOWN_CMD (0 | TZ_FAILURE_FLAG) /* Command not implemented */ + +/* For backward compatibility with the first firmwares, + * use TZ_LEGACY_READ_REGFPGA_32 and TZ_LEGACY_WRITE_REGFPGA_32 + * instead of TZ_PROP_DEVICE_REG32 | TZ_WRITE_FLAG + */ +#define TZ_LEGACY_READ_REGFPGA_32 (0x55) +#define TZ_LEGACY_WRITE_REGFPGA_32 (0x56) + +#define TZ_PROP_FPGA_STATE (0x71) +#define TZ_RESET_FPGA_MAGIC (0xB007F26A) +#define TZ_PROP_SERIAL (0x72) + +#define TZ_PROP_RELEASE_VERSION (0x79) +#define TZ_PROP_BUILD_DATE (0x7A) + +#define TZ_PROP_DEVICES (0x10000) +#define TZ_PROP_DEVICE_NAME (0x10001) +#define TZ_PROP_DEVICE_IF_FREQ (0x10002) +#define TZ_PROP_DEVICE_COMPATIBLE (0x10003) +#define TZ_PROP_DEVICE_REG32 (0x10102) +#define TZ_PROP_DEVICE_STREAM (0x10200) + +#endif diff --git a/hal_psee_plugins/include/boards/treuzell/tz_board_data_transfer.h b/hal_psee_plugins/include/boards/treuzell/tz_board_data_transfer.h new file mode 100644 index 000000000..fd9fb02ce --- /dev/null +++ b/hal_psee_plugins/include/boards/treuzell/tz_board_data_transfer.h @@ -0,0 +1,69 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_TZ_BOARD_DATA_TRANSFER_H +#define METAVISION_HAL_TZ_BOARD_DATA_TRANSFER_H + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "metavision/hal/utils/data_transfer.h" +#include "boards/treuzell/tz_libusb_board_command.h" + +namespace Metavision { + +class TzBoardDataTransfer : public DataTransfer { +public: + TzBoardDataTransfer(const std::shared_ptr &cmd, uint32_t raw_event_size_bytes); + ~TzBoardDataTransfer() override; + +private: + void start_impl(BufferPtr buffer) override final; + void run_impl() override final; + void stop_impl() override final; + void flush(); + + class UserParamForAsyncBulkCallback; + + void preprocess_transfer(libusb_transfer *transfer); + void initiate_async_transfers(); + void release_async_transfers(); + int bulk_transfer(unsigned char *buf, int packet_size, unsigned int timeout, int &actual_size); + + static uint32_t timeout_cnt_; + std::shared_ptr cmd_; + libusb_device_handle *dev_handle_; + int bEpCommAddress; + + std::mutex protect_vtransfert_; + std::vector> vtransfer_; + + std::atomic active_bulks_transfers_{0}; + + // USB Commands + libusb_transfer *contruct_async_bulk_transfer(unsigned char *buf, int packet_size, + libusb_transfer_cb_fn async_bulk_cb, void *user_data, + unsigned int timeout); + static void free_async_bulk_transfer(libusb_transfer *transfer); + static int submit_transfer(libusb_transfer *transfer); + void prepare_async_bulk_transfer(libusb_transfer *transfer, unsigned char *buf, int packet_size, + libusb_transfer_cb_fn async_bulk_cb, void *user_data, unsigned int timeout); +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_TZ_BOARD_DATA_TRANSFER_H diff --git a/hal_psee_plugins/include/boards/treuzell/tz_camera_discovery.h b/hal_psee_plugins/include/boards/treuzell/tz_camera_discovery.h new file mode 100644 index 000000000..325edbcb6 --- /dev/null +++ b/hal_psee_plugins/include/boards/treuzell/tz_camera_discovery.h @@ -0,0 +1,53 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_TZ_CAMERA_BOARD_DISCOVERY_H +#define METAVISION_HAL_TZ_CAMERA_BOARD_DISCOVERY_H + +#include + +#include "boards/utils/psee_camera_discovery.h" +#include "devices/treuzell/tz_device.h" + +namespace Metavision { + +class LibUSBContext; +class TzLibUSBBoardCommand; + +class TzCameraDiscovery : public PseeCameraDiscovery { +public: + TzCameraDiscovery(); + + struct DeviceBuilderParameters : public Metavision::DeviceBuilderParameters { + DeviceBuilderParameters(std::shared_ptr libusb_ctx, + const std::shared_ptr &board_cmd) : + board_cmd(board_cmd), libusb_ctx(libusb_ctx) {} + std::shared_ptr board_cmd; + std::shared_ptr libusb_ctx; + }; + + virtual CameraDiscovery::SerialList list() override; + virtual CameraDiscovery::SystemList list_available_sources() override; + virtual bool discover(DeviceBuilder &device_builder, const std::string &serial, + const DeviceConfig &config) override; + TzDeviceBuilder &factory() { + return *builder.get(); + } + +private: + std::vector> list_boards(); + std::shared_ptr libusb_ctx; + std::unique_ptr builder; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_TZ_CAMERA_BOARD_DISCOVERY_H diff --git a/hal_psee_plugins/include/boards/treuzell/tz_control_frame.h b/hal_psee_plugins/include/boards/treuzell/tz_control_frame.h new file mode 100644 index 000000000..c5a350b8a --- /dev/null +++ b/hal_psee_plugins/include/boards/treuzell/tz_control_frame.h @@ -0,0 +1,94 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef TZ_CONTROL_FRAME_H +#define TZ_CONTROL_FRAME_H + +#include +#include +#include + +namespace Metavision { + +class TzCtrlFrame { +public: + TzCtrlFrame(uint32_t property); + virtual ~TzCtrlFrame(); + + virtual uint32_t get_property(); + virtual uint8_t *frame(); + virtual std::size_t frame_size(); + virtual void swap_and_check_answer(std::vector &x); + +protected: + std::vector vect; + TzCtrlFrame(); + +private: + void update_size(void); +}; + +class TzGenericCtrlFrame : public TzCtrlFrame { +public: + TzGenericCtrlFrame(uint32_t property); + virtual ~TzGenericCtrlFrame(); + + virtual uint8_t *payload(); + virtual std::size_t payload_size(); + + void push_back32(const uint32_t &val); + void push_back32(const std::vector &val); + uint32_t get32(std::size_t payload_index); + uint64_t get64(std::size_t payload_index); +}; + +class TzDeviceStringsCtrlFrame : public TzCtrlFrame { +public: + TzDeviceStringsCtrlFrame(uint32_t property, uint32_t device); + std::vector get_strings(); +}; + +/// Treuzell protocol error category +enum { + TZ_NOT_IMPLEMENTED, + TZ_COMMAND_FAILED, + TZ_PROPERTY_MISMATCH, + TZ_SIZE_MISMATCH, + TZ_TOO_SHORT, + TZ_INVALID_ANSWER, +}; + +class TzError : public std::error_category { +public: + virtual const char *name() const noexcept { + return "treuzell"; + } + virtual std::string message(int err) const { + switch (err) { + case TZ_NOT_IMPLEMENTED: + return "command not implemented by the target"; + case TZ_COMMAND_FAILED: + return "command failed"; + case TZ_PROPERTY_MISMATCH: + return "received frame didn't match request"; + case TZ_SIZE_MISMATCH: + return "received frame doesn't match its advertised size"; + case TZ_TOO_SHORT: + return "frame too short to be valid"; + case TZ_INVALID_ANSWER: + return "received answer doesn't match the specified format"; + default: + return "unknown error"; + } + } +}; +} // namespace Metavision +#endif /* TZ_CONTROL_FRAME_H */ diff --git a/hal_psee_plugins/include/boards/treuzell/tz_hw_identification.h b/hal_psee_plugins/include/boards/treuzell/tz_hw_identification.h new file mode 100644 index 000000000..a1ee01985 --- /dev/null +++ b/hal_psee_plugins/include/boards/treuzell/tz_hw_identification.h @@ -0,0 +1,108 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_TZ_HW_IDENTIFICATION_H +#define METAVISION_HAL_TZ_HW_IDENTIFICATION_H + +#include + +#include "metavision/hal/facilities/i_hw_identification.h" + +namespace Metavision { + +class TzLibUSBBoardCommand; +class TzDevice; + +class TzHWIdentification : public I_HW_Identification { +public: + /** Facility Constructor + */ + TzHWIdentification(const std::shared_ptr &plugin_sw_info, + const std::shared_ptr &cmd, + std::vector> &devices); + + /** + * Returns the serial number of the camera + * + * @return serial number as a string + */ + virtual std::string get_serial() const override; + + /** + * Returns the serial number of the camera + * + * @return the system id as a integer + * + * @note this number can be used to check the compatibility + * of biases file for example + */ + virtual long get_system_id() const override; + + /** + * Returns the detail about the sensor available + * + * @return the sensor information + */ + virtual I_HW_Identification::SensorInfo get_sensor_info() const override final; + + /** + * Returns the version number for this system + * + * @return system version as an integer + */ + virtual long get_system_version() const override final; + + /** + * Returns the name of the available RAW format + * + * @return the available format + * + * @note currently the available formats are: + * - EVT2 + * - EVT3 + */ + virtual std::vector get_available_raw_format() const override final; + + /** + * Returns the integrator name + * + * @return name of the Integrator + */ + virtual std::string get_integrator() const override final; + + /** + * Returns all available information + * + * @return map of key-value + * + * @note the purpose of this function is mainly for debug + * and display system information + */ + virtual SystemInfo get_system_info() const override final; + + /** + * Returns the connection with the camera as a string + * + * @return a string providing the kind of connection with the available camera + */ + virtual std::string get_connection_type() const override final; + +private: + virtual RawFileHeader get_header_impl() const override; + + std::shared_ptr icmd_; + I_HW_Identification::SensorInfo sensor_info_; + std::vector> devices_; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_TZ_HW_IDENTIFICATION_H diff --git a/sdk/modules/driver/cpp/include/metavision/sdk/driver/illuminance_module.h b/hal_psee_plugins/include/boards/treuzell/tz_libusb.h similarity index 70% rename from sdk/modules/driver/cpp/include/metavision/sdk/driver/illuminance_module.h rename to hal_psee_plugins/include/boards/treuzell/tz_libusb.h index 1d48bdc01..83233d120 100644 --- a/sdk/modules/driver/cpp/include/metavision/sdk/driver/illuminance_module.h +++ b/hal_psee_plugins/include/boards/treuzell/tz_libusb.h @@ -9,23 +9,35 @@ * See the License for the specific language governing permissions and limitations under the License. * **********************************************************************************************************************/ -#ifndef METAVISION_SDK_DRIVER_ILLUMINANCE_MODULE_H -#define METAVISION_SDK_DRIVER_ILLUMINANCE_MODULE_H +#ifndef METAVISION_HAL_TZ_LIBUSB_H +#define METAVISION_HAL_TZ_LIBUSB_H + +#include +#include namespace Metavision { -/// @note This class is deprecated since version 2.1.0 and will be removed in next releases -/// @brief Facility class to handle the Illuminance module -/// Allows enabling the illumination sensor in order to receive \ref EventIlluminance events -class IlluminanceModule { +/// LibUSB error category +class LibUsbError : public std::error_category { +public: + virtual const char *name() const noexcept { + return "LibUSB"; + } + virtual std::string message(int err) const { + return libusb_error_name(err); + } +}; + +class LibUSBContext { public: - /// @brief Destructor - ~IlluminanceModule(); + LibUSBContext(); + ~LibUSBContext(); + libusb_context *ctx(); - /// @brief Enables illuminance monitoring - void enable(); +private: + libusb_context *ctx_; }; } // namespace Metavision -#endif // METAVISION_SDK_DRIVER_ILLUMINANCE_MODULE_H +#endif // METAVISION_HAL_TZ_LIBUSB_H diff --git a/hal_psee_plugins/include/boards/treuzell/tz_libusb_board_command.h b/hal_psee_plugins/include/boards/treuzell/tz_libusb_board_command.h new file mode 100644 index 000000000..0b5395f3b --- /dev/null +++ b/hal_psee_plugins/include/boards/treuzell/tz_libusb_board_command.h @@ -0,0 +1,114 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_TZ_LIBUSB_BOARD_COMMAND_H +#define METAVISION_HAL_TZ_LIBUSB_BOARD_COMMAND_H + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "boards/treuzell/tz_libusb.h" +#include "devices/utils/device_system_id.h" + +namespace Metavision { + +class TzCtrlFrame; +class TzBoardDataTransfer; + +struct UsbInterfaceId { + uint16_t vid; + uint16_t pid; + uint8_t usb_class; + uint8_t subclass; +}; + +class TzLibUSBBoardCommand { + using Register_Addr = uint32_t; + +public: + TzLibUSBBoardCommand() = delete; + TzLibUSBBoardCommand(std::shared_ptr ctx, libusb_device *dev, libusb_device_descriptor &desc); + ~TzLibUSBBoardCommand(); + + long get_board_speed(); + std::shared_ptr get_libusb_ctx() { + return libusb_ctx; + } + + std::string get_serial(); + std::string get_name(); + std::string get_manufacturer(); + time_t get_build_date(); + uint32_t get_version(); + + /// @brief Writes shadow register (value stored on computer side) + void write_register(Register_Addr regist, uint32_t value); + + /// @brief Reads shadow register (value stored on computer side) + /// @return The value of the register + uint32_t read_register(Register_Addr regist); + + /// @brief Loads the register on the board side with the value stored on computer + /// @return Nothing to express that the method loads the value from the board and stores it + void load_register(Register_Addr regist); + + void set_register_bit(Register_Addr regist, int idx, bool state); + void send_register(Register_Addr regist); + void send_register_bit(Register_Addr regist, int idx, bool state); + uint32_t read_register_bit(Register_Addr register_addr, int idx); + void init_register(Register_Addr regist, uint32_t value); + + void transfer_tz_frame(TzCtrlFrame &req); + + unsigned int get_device_count(); + std::vector read_device_register(uint32_t device, uint32_t address, int nval = 1); + void write_device_register(uint32_t device, uint32_t address, const std::vector &val); + + static void add_usb_id(uint16_t vid, uint16_t pid, uint8_t subclass) { + known_usb_ids.push_back({vid, pid, 0xFF, subclass}); + } + +protected: + std::map mregister_state; + +private: + bool clear_endpoint(); + bool reset_device(); + + // Board state + std::shared_ptr libusb_ctx; + int bInterfaceNumber; + int bEpControlIn; + int bEpControlOut; + int bEpCommAddress; + libusb_device_handle *dev_handle_; + libusb_speed dev_speed_ = LIBUSB_SPEED_UNKNOWN; + std::string manufacturer; + std::string product; + time_t build_date; + uint32_t version; + + bool has_register(Register_Addr regist); + std::mutex thread_safety_; + friend TzBoardDataTransfer; + + static std::vector known_usb_ids; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_TZ_LIBUSB_BOARD_COMMAND_H diff --git a/hal_psee_plugins/include/boards/utils/config_registers_map.h b/hal_psee_plugins/include/boards/utils/config_registers_map.h new file mode 100644 index 000000000..a20f746bf --- /dev/null +++ b/hal_psee_plugins/include/boards/utils/config_registers_map.h @@ -0,0 +1,126 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_CONFIG_REGISTERS_MAP_H +#define METAVISION_HAL_CONFIG_REGISTERS_MAP_H + +// ----------------------------------- +// REGBANK ADDR +// ----------------------------------- + +//----------------------------------------------------------------------------- +// Register Bank Number +//----------------------------------------------------------------------------- +#define CCAM2_SYSTEM_CONTROL_REG_NB 25 // natural + +//----------------------------------------------------------------------------- +// Register Bank Base Address +//----------------------------------------------------------------------------- +#define CCAM2_SYSTEM_CONTROL_BASE_ADDRESS 0x00000000 // regbank_address + +#define CCAM2IF_LEFT_BASE_ADDRESS 0x00000000 +#define CCAM2IF_RIGHT_BASE_ADDRESS 0x00000400 + +//----------------------------------------------------------------------------- +// Register Address Map +//----------------------------------------------------------------------------- +#define CCAM2_SYSTEM_CONTROL_BASE_ADDR 0x00000000 // regbank_address +#define TEP_ATIS_CONTROL_ADDR 0x00000000 // regbank_address +#define TEP_ATIS_BIASROI_UPDATE_VALUE0_ADDR 0x00000002 // regbank_address +#define TEP_ATIS_BIASROI_UPDATE_VALUE1_ADDR 0x00000004 // regbank_address +#define TEP_ATIS_BIAS_UPDATE_VALUE2_ADDR 0x00000006 // regbank_address +#define TEP_CCAM2_CONTROL_ADDR 0x00000008 // regbank_address +#define TEP_TRIGGERS_ADDR 0x0000000A // regbank_address +#define TEP_SYSTEM_STATUS_ADDR 0x0000000C // regbank_address +#define TEP_FOUT_LSB_STATUS_ADDR 0x0000000E // regbank_address +#define TEP_FOUT_MSB_STATUS_ADDR 0x00000010 // regbank_address +#define TEP_FIFO_WRCOUNT_STATUS_ADDR 0x00000012 // regbank_address +#define TEP_FIFO_CHECKPIX_STATUS_ADDR 0x00000014 // regbank_address +#define TEP_TLAST_REARMUS_ADDR 0x00000016 // regbank_address +#define TEP_OVERFLOW_HITCOUNT_ADDR 0x00000018 // regbank_address +#define TEP_CCAM2_MODE_ADDR 0x0000001A // regbank_address +#define TEP_SERIAL_LSB_ADDR 0x0000001C // regbank_address +#define TEP_SERIAL_MSB_ADDR 0x00000020 // regbank_address +#define TEP_NOTIFY_PACKETCOUNT_ADDR 0x00000022 // regbank_address +#define TEP_SNFETCH_FADDR_LSB_ADDR 0x00000024 // regbank_address +#define TEP_SNFETCH_FADDR_MSB_ADDR 0x00000026 // regbank_address +#define TEP_SNFETCH_RDATA_LSB_ADDR 0x00000028 // regbank_address +#define TEP_SNFETCH_RDATA_MSB_ADDR 0x0000002A // regbank_address +#define TEP_SNFETCH_READ_ITER_ADDR 0x0000002C // regbank_address +#define TEP_SNFETCH_TIME_COUNT_ADDR 0x0000002E // regbank_address +#define TEP_BIAS_LOAD_ITERATION_COUNT_ADDR 0x00000030 // regbank_address +#define TEP_FLASH_PROGRAM_SEL_SLAVE_ADDR 0x00000032 // regbank_address +#define SYSTEM_CONTROL_LAST_ADDR 0x00000032 // regbank_address + +//----------------------------------------------------------------------------- +// Register Bank Number +//----------------------------------------------------------------------------- +//#define CCAM2_SYSTEM_CONTROL_REG_NB 25 // natural + +//----------------------------------------------------------------------------- +// Register Bank Base Address +//----------------------------------------------------------------------------- +//#define CCAM2_SYSTEM_CONTROL_BASE_ADDRESS 0x00000000 // regbank_address + +//----------------------------------------------------------------------------- +// Register Address Map +//----------------------------------------------------------------------------- +//#define SYSTEM_CONTROL_ADDR 0x00000000 // regbank_address +//#define ATIS_CONTROL_ADDR 0x00000000 // regbank_address +//#define ATIS_BIASROI_UPDATE_VALUE0_ADDR 0x00000002 // regbank_address +//#define ATIS_BIASROI_UPDATE_VALUE1_ADDR 0x00000004 // regbank_address +//#define ATIS_BIAS_UPDATE_VALUE2_ADDR 0x00000006 // regbank_address +//#define CCAM2_CONTROL_ADDR 0x00000008 // regbank_address +//#define TRIGGERS_ADDR 0x0000000A // regbank_address +//#define SYSTEM_STATUS_ADDR 0x0000000C // regbank_address +//#define FOUT_LSB_STATUS_ADDR 0x0000000E // regbank_address +//#define FOUT_MSB_STATUS_ADDR 0x00000010 // regbank_address +//#define FIFO_WRCOUNT_STATUS_ADDR 0x00000012 // regbank_address +//#define FIFO_CHECKPIX_STATUS_ADDR 0x00000014 // regbank_address +//#define TLAST_REARMUS_ADDR 0x00000016 // regbank_address +//#define OVERFLOW_HITCOUNT_ADDR 0x00000018 // regbank_address +//#define CCAM2_MODE_ADDR 0x0000001A // regbank_address +//#define SERIAL_LSB_ADDR 0x0000001C // regbank_address +//#define SERIAL_MSB_ADDR 0x00000020 // regbank_address +//#define NOTIFY_PACKETCOUNT_ADDR 0x00000022 // regbank_address +//#define SNFETCH_FADDR_LSB_ADDR 0x00000024 // regbank_address +//#define SNFETCH_FADDR_MSB_ADDR 0x00000026 // regbank_address +//#define SNFETCH_RDATA_LSB_ADDR 0x00000028 // regbank_address +//#define SNFETCH_RDATA_MSB_ADDR 0x0000002A // regbank_address +//#define SNFETCH_READ_ITER_ADDR 0x0000002C // regbank_address +//#define SNFETCH_TIME_COUNT_ADDR 0x0000002E // regbank_address +//#define BIAS_LOAD_ITERATION_COUNT_ADDR 0x00000030 // regbank_address +//#define FLASH_PROGRAM_SEL_SLAVE_ADDR 0x00000032 // regbank_address +//#define SYSTEM_CONTROL_LAST_ADDR 0x00000032 // regbank_address + +// ----------------------------------- +// GEN1 - GEN2 CONFIG REGISTERS +// ----------------------------------- + +// Mapping Bank SYSTEM_CONFIG from base address : 0x00000800 - Prefix : STEREO_ +#define STEREO_SYSTEM_CONFIG_BASE_ADDR 0x00000800 +#define STEREO_SYSTEM_CONFIG_ADDR 0x00000800 +#define STEREO_SYSTEM_CONFIG_ID_ADDR 0x00000800 +#define STEREO_SYSTEM_CONFIG_VERSION_ADDR 0x00000804 +#define STEREO_SYSTEM_CONFIG_BUILD_DATE_ADDR 0x00000808 +#define STEREO_SYSTEM_CONFIG_VERSION_CONTROL_ID_ADDR 0x0000080c +#define STEREO_SYSTEM_CONFIG_LAST_ADDR 0x0000080c +#define STEREO_STEREO_SYS_DATA0_ADDR 0x00000800 +#define STEREO_STEREO_SYS_DATA1_ADDR 0x00000804 +#define STEREO_STEREO_SYS_DATA2_ADDR 0x00000808 +#define STEREO_STEREO_SYS_DATA4_ADDR 0x0000080c + +#define STEREO_SYSTEM_CONTROL_BASE_ADDR 0x00000810 +// Mapping Bank STEREO_SYSTEM_CONTROL from base address : 0x00000810 - Prefix : STEREO_ +#define STEREO_SYSTEM_CONTROL_BASE_ADDRESS 0x00000810 +#define STEREO_DEVICE_SYSTEM_CONTROL_ADDR 0x00000810 + +#endif // METAVISION_HAL_CONFIG_REGISTERS_MAP_H diff --git a/hal_psee_plugins/include/boards/utils/psee_camera_discovery.h b/hal_psee_plugins/include/boards/utils/psee_camera_discovery.h new file mode 100644 index 000000000..e5da0c121 --- /dev/null +++ b/hal_psee_plugins/include/boards/utils/psee_camera_discovery.h @@ -0,0 +1,38 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_PSEE_CAMERA_DISCOVERY_H +#define METAVISION_HAL_PSEE_CAMERA_DISCOVERY_H + +#include +#include + +#include "metavision/hal/utils/camera_discovery.h" +#include "utils/device_builder_factory.h" + +namespace Metavision { + +class Plugin; +class DeviceConfig; + +class PseeCameraDiscovery : public CameraDiscovery { +public: + DeviceBuilderFactory &device_builder_factory(); + + void register_device_builder(long system_id, const DeviceBuilderCallback &cb); + +private: + DeviceBuilderFactory factory_; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_PSEE_CAMERA_DISCOVERY_H diff --git a/hal_psee_plugins/include/boards/utils/psee_libusb_board_command.h b/hal_psee_plugins/include/boards/utils/psee_libusb_board_command.h new file mode 100644 index 000000000..8480ea53d --- /dev/null +++ b/hal_psee_plugins/include/boards/utils/psee_libusb_board_command.h @@ -0,0 +1,126 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_PSEE_LIBUSB_BOARD_COMMAND_H +#define METAVISION_HAL_PSEE_LIBUSB_BOARD_COMMAND_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "devices/utils/device_system_id.h" + +namespace Metavision { + +/// Type of camera to be returned +enum CameraType { + REMOTE = 1, + LOCAL = 2, + ANY = 3, +}; + +class PseeLibUSBBoardCommand { +public: + using Register_Addr = uint32_t; + using ListSerial = std::list; + + PseeLibUSBBoardCommand(); + virtual ~PseeLibUSBBoardCommand(); + + virtual long try_to_flush() = 0; + virtual std::string get_serial() = 0; + + virtual bool open(const std::string &serial); + virtual long get_board_version(); + virtual long get_board_id(); + virtual long get_board_release_version(); + virtual long get_board_build_date(); + virtual long get_board_speed(); + virtual long get_board_version_control_id(); + + virtual long get_system_id(); + long get_system_version(); + unsigned int get_system_build_date(); + unsigned int get_system_version_control_id(); + + virtual long get_temperature(); + virtual long get_illumination(); + + virtual uint32_t control_read_register_32bits(uint8_t usbvendorcmd, uint32_t address, bool big_endian = true); + virtual uint16_t control_read_register_16bits(uint8_t usbvendorcmd, uint32_t address); + virtual void control_write_register_32bits(uint8_t usbvendorcmd, uint32_t address, uint32_t val); + virtual void control_write_vector_32bits(uint32_t address, const std::vector &val); + virtual void control_write_register_8bits(uint8_t usbvendorcmd, uint8_t address, uint8_t val); + virtual uint8_t control_read_register_8bits(uint8_t usbvendorcmd, uint8_t address); + + /// @brief Writes shadow register (value stored on computer side) + void write_register(Register_Addr regist, uint32_t value); + + /// @brief Reads shadow register (value stored on computer side) + /// @return The value of the register + uint32_t read_register(Register_Addr regist); + + /// @brief Loads the register on the board side with the value stored on computer + /// @return Nothing to express that the method loads the value from the board and stores it + void load_register(Register_Addr regist); + + void set_register_bit(Register_Addr regist, int idx, bool state); + void send_register(Register_Addr regist); + void send_register_bit(Register_Addr regist, int idx, bool state); + uint32_t read_register_bit(Register_Addr register_addr, int idx); + void init_register(Register_Addr regist, uint32_t value); + + bool wait_fpga_boot_state(); + void reset_fpga(); + + libusb_transfer *contruct_async_bulk_transfer(unsigned char *buf, int packet_size, + libusb_transfer_cb_fn async_bulk_cb, void *user_data, + unsigned int timeout); + virtual void prepare_async_bulk_transfer(libusb_transfer *transfer, unsigned char *buf, int packet_size, + libusb_transfer_cb_fn async_bulk_cb, void *user_data, + unsigned int timeout); + static void free_async_bulk_transfer(libusb_transfer *transfer); + static int submit_transfer(libusb_transfer *transfer); + +protected: + PseeLibUSBBoardCommand(libusb_device_handle *dev_handle); + + static bool init_libusb(); + + virtual int bulk_transfer(unsigned char *buf, int packet_size, unsigned int timeout, int &actual_size); + + std::map mregister_state; + libusb_device_handle *dev_handle_ = nullptr; // a device handle + libusb_speed dev_speed_ = LIBUSB_SPEED_UNKNOWN; + +private: + PseeLibUSBBoardCommand(const PseeLibUSBBoardCommand &) = delete; + PseeLibUSBBoardCommand(const PseeLibUSBBoardCommand &&) = delete; + PseeLibUSBBoardCommand &operator=(const PseeLibUSBBoardCommand &) = delete; + PseeLibUSBBoardCommand &operator=(const PseeLibUSBBoardCommand &&) = delete; + + bool has_register(Register_Addr regist); + virtual void get_ccam2_with_serial(libusb_context *ctx, const std::string &serial); + long check_fpga_boot_state(); + + std::mutex thread_safety_; + + static std::mutex protect_libusb_submit_; // mutex used to protect libusb_submit as if polling thread is already + // running (2nd cam) the starting of async transferts +}; +} // namespace Metavision +#endif // METAVISION_HAL_PSEE_LIBUSB_BOARD_COMMAND_H diff --git a/hal_psee_plugins/include/boards/utils/psee_libusb_data_transfer.h b/hal_psee_plugins/include/boards/utils/psee_libusb_data_transfer.h new file mode 100644 index 000000000..2dd71afca --- /dev/null +++ b/hal_psee_plugins/include/boards/utils/psee_libusb_data_transfer.h @@ -0,0 +1,52 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_PSEE_LIBUSB_DATA_TRANSFER_H +#define METAVISION_HAL_PSEE_LIBUSB_DATA_TRANSFER_H + +#include +#include +#include +#include + +#include "metavision/hal/utils/data_transfer.h" + +namespace Metavision { + +class PseeLibUSBBoardCommand; + +class PseeLibUSBDataTransfer : public DataTransfer { +public: + PseeLibUSBDataTransfer(const std::shared_ptr &cmd, uint32_t raw_event_size_bytes); + ~PseeLibUSBDataTransfer() override; + +private: + void start_impl(BufferPtr buffer) override final; + void run_impl() override final; + void stop_impl() override final; + + class UserParamForAsyncBulkCallback; + + virtual void preprocess_transfer(libusb_transfer *transfer); + void initiate_async_transfers(); + void release_async_transfers(); + + std::shared_ptr cmd_; + + std::mutex protect_vtransfert_; + std::vector> vtransfer_; + + std::atomic active_bulks_transfers_{0}; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_PSEE_LIBUSB_DATA_TRANSFER_H diff --git a/hal_psee_plugins/include/boards/utils/utils_fx3_ram_flash.h b/hal_psee_plugins/include/boards/utils/utils_fx3_ram_flash.h new file mode 100644 index 000000000..097fd7c79 --- /dev/null +++ b/hal_psee_plugins/include/boards/utils/utils_fx3_ram_flash.h @@ -0,0 +1,93 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_UTILS_FX3_RAM_FLASH_H +#define METAVISION_HAL_UTILS_FX3_RAM_FLASH_H + +#include +#include +#include + +namespace LoadApplicativeFirmwareToFx3RAM { + +//#define MAX_FWIMG_SIZE (512 * 1024) // Maximum size of the firmware binary. +//#define MAX_WRITE_SIZE (2 * 1024) // Max. size of data that can be written through one vendor command. +// +//#define VENDORCMD_TIMEOUT (5000) // Timeout for each vendor command is set to 5 seconds. +// +//#define GET_LSW(v) ((unsigned short)((v) & 0xFFFF)) +//#define GET_MSW(v) ((unsigned short)((v) >> 16)) +// + +int read_firmware_image(const char *filename, unsigned char *buf, int *romsize); +int ram_write(libusb_device_handle *h, unsigned char *buf, unsigned int ramAddress, int len); + +int fx3_usbboot_download(libusb_device_handle *h, const char *filename); + +} // namespace LoadApplicativeFirmwareToFx3RAM + +class FlashCmd { +public: + uint8_t Write = 0xC2; + uint8_t Read = 0xC3; + uint8_t Erase = 0xC4; + uint8_t Status = 0xC4; + + int step = 256; + int erasestep = 65536; + + unsigned int default_test_sector = 700; + +private: + FlashCmd(); + +public: + static FlashCmd FlashCmdFx3(); + static FlashCmd FlashCmdFpga(); + int flash_test(libusb_device_handle *dev_handle, int *err_bad_flash, bool erase, bool write, bool read); + int flash(libusb_device_handle *dev_handle, const char *filename, unsigned long start_sector, long max_sector, + long file_offset, int *err_bad_flash); + int dump(libusb_device_handle *dev_handle, const char *filename, int *err_bad_flash); + int flash_map(libusb_device_handle *dev_handle, long start_sector, const std::string &findexes, + const std::string &ftargets, int *err_bad_flash); + int flash_calib3d(libusb_device_handle *dev_handle, long start_sector, const std::string &calib3d, + int *err_bad_flash); + int dump_calib3d(libusb_device_handle *dev_handle, std::vector &vdata, long start_sector, + int *err_bad_flash); + + int flash_offset_sector(libusb_device_handle *dev_handle, std::vector &vdata, unsigned long start_sector, + long max_sector, int *err_bad_flash); + int dump_flash(libusb_device_handle *dev_handle, std::vector &vdata, int *err_bad_flash); + int dump_flash_offset_sector(libusb_device_handle *dev_handle, std::vector &vdata, long start_sector, + long end_sector, int *err_bad_flash); + + int flash_serial(libusb_device_handle *dev_handle, int *err_bad_flash, long sector, + std::vector serial_to_write); + int flash_serial(libusb_device_handle *dev_handle, int *err_bad_flash, long sector, uint16_t serial_to_write); + + int flash_system_id(libusb_device_handle *dev_handle, int *err_bad_flash, long sector, long system_id_to_write); + + void erase_sector(libusb_device_handle *dev_handle, int sector_to_erase, long &num_err); + + bool read_sector(libusb_device_handle *dev_handle, int sector, std::vector &vread, long &num_err); + + bool write_sector_over_erased_offset(libusb_device_handle *dev_handle, int sector, std::vector &vdata, + unsigned long offset, long &num_err); + bool write_sector_over_erased(libusb_device_handle *dev_handle, int sector, std::vector &vdata, + long &num_err); + void dump_data(const std::vector &vdata); + +private: + bool wait_for_status(libusb_device_handle *dev_handle); + static void coe_2_data(const std::string &ftargets, std::vector &vdata, long &ntargets); +}; + +#endif // METAVISION_HAL_UTILS_FX3_RAM_FLASH_H diff --git a/hal_psee_plugins/include/boards/utils/vendor_command_definition.h b/hal_psee_plugins/include/boards/utils/vendor_command_definition.h new file mode 100644 index 000000000..a1582ee0e --- /dev/null +++ b/hal_psee_plugins/include/boards/utils/vendor_command_definition.h @@ -0,0 +1,95 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_VENDOR_COMMAND_DEFINITION_H +#define METAVISION_HAL_VENDOR_COMMAND_DEFINITION_H + +// Vendor Command supported +#define CMD_READ (0x50) /*Read Transaction*/ +#define CMD_WRITE (0x51) /*Write Transaction*/ +#define CMD_ERASE (0x52) /*Erase Transaction*/ + +#define CMD_READ_REGFPGA_32 (0x55) /*Read Transaction*/ +#define CMD_WRITE_REGFPGA_32 (0x56) /*Write Transaction*/ + +#define CMD_WRITE_VEC (0x60) + +#define CMD_WRITE_VEC_REGFPGA_32 (0x61) +#define CMD_WRITE_VEC_SLAVE_REGFPGA_32 (0x62) + +#define CMD_READ_VERSION_FX3 (0x70) +#define CMD_CHECK_FPGA_BOOT_STATE (0x71) +#define CMD_READ_SYSTEM_ID (0x72) +#define CMD_READ_SYSTEM_VERSION (0x73) + +#define CMD_CTRL_WRITE_DONOTHING (0x74) /*Write Transaction*/ + +#define CMD_READ_FX3_ID (0x78) +#define CMD_READ_FX3_RELEASE_VERSION (0x79) +#define CMD_READ_FX3_BUILD_DATE (0x7A) +#define CMD_READ_FX3_VERSION_CONTROL_ID (0x7B) + +#define CMD_RESET_FPGA (0x7E) +#define CMD_RESET_FX3 (0x7F) + +/*IMU's vendor commands*/ + +/*USB vendor request to read an IMU register */ +#define VCMD_IMU_READ (0x80) + +/* USB vendor request to write on IMU register, read mask applied in the command */ +#define VCMD_IMU_WRITE (0x81) + +/* USB vendor request to get data regarding imu state, used to debug */ +#define VCMD_IMU_MESSAGE (0x82) + +/* USB vendor request to indicate a reading operation in ProntoIMU using EVK-Mode on Pronto */ +#define CMD_READ_PRONTO_IMU (0x83) + +#define CMD_CX3_GET_TEMPERATURE (0x84) /* Read Cx3 I2C temperature sensor */ +/* USB vendor request to write data to SPI flash connected. The flash page size is + * fixed to 256 bytes. The memory address to start the write is provided in the + * index field of the request. The maximum allowed request length is 4KB. */ +#define CY_FX_RQT_SPI_FLASH_WRITE (0xC2) + +/* USB vendor request to read data from SPI flash connected. The flash page size is + * fixed to 256 bytes. The memory address to start the read is provided in the index + * field of the request. The maximum allowed request length is 4KB. */ +#define CY_FX_RQT_SPI_FLASH_READ (0xC3) + +/* USB vendor request to erase a sector on SPI flash connected. The flash sector + * size is fixed to 64KB. The sector address is provided in the index field of + * the request. The erase is carried out if the value field is non-zero. If this + * is zero, then the request returns the write in progress (WIP) bit. WIP should + * be 0 before issuing any further transactions. */ +#define CY_FX_RQT_SPI_FLASH_ERASE_POLL (0xC4) + +/* USB vendor request to write data to SPI flash connected. The flash subsector size is + * fixed to 4KB. The memory address to start the write is provided in the + * index field of the request. The maximum allowed request length is 4KB.*/ +#define CY_FX_RQT_SPI_FLASH_N25Q_WRITE (0xC5) + +/* USB vendor request to read data from SPI flash connected. The flash subsector size is + * fixed to 4KB. The memory address to start the read is provided in the index + * field of the request. The maximum allowed request length is 4KB. */ +#define CY_FX_RQT_SPI_FLASH_N25Q_READ (0xC6) + +/* USB vendor request to erase a sector on SPI flash connected. The flash sector + * size is fixed to 64KB. The sector address is provided in the index field of + * the request. The erase is carried out if the value field is non-zero. If this + * is zero, then the request returns the write in progress (WIP) bit. WIP should + * be 0 before issuing any further transactions. */ +#define CY_FX_RQT_SPI_FLASH_N25Q_ERASE_POLL (0xC7) + +// Event : New command available +#define VC_NEW_CMD (1 << 0) /* Event flag that the thread waits */ + +#endif // METAVISION_HAL_VENDOR_COMMAND_DEFINITION_H diff --git a/hal_psee_plugins/include/decoders/base/base_event_types.h b/hal_psee_plugins/include/decoders/base/base_event_types.h new file mode 100644 index 000000000..ca9c6d1cb --- /dev/null +++ b/hal_psee_plugins/include/decoders/base/base_event_types.h @@ -0,0 +1,44 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_BASE_EVENT_TYPES_H +#define METAVISION_HAL_BASE_EVENT_TYPES_H + +#include + +namespace Metavision { + +typedef uint8_t EventTypesUnderlying_t; + +// WARNING : in order to be able to manually insert events for every +// camera (Gen1, Gen2, Gen3, ...) those two types HAVE to be the +// same for all cameras (it is the case for now, but with every new +// sensor we have to check) +enum class BaseEventTypes : EventTypesUnderlying_t { + LEFT_TD_LOW = 0x00, // Left camera TD event, decrease in illumination (polarity '0') + LEFT_TD_HIGH = 0x01, // Left camera TD event, increase in illumination (polarity '1') + LEFT_APS_END = 0x02, // Left camera APS event, measurement end (polarity '0') + LEFT_APS_START = 0x03, // Left camera APS event, measurement start (polarity '1') + RIGHT_TD_LOW = 0x04, // Right camera TD event, decrease in illumination (polarity '0') + RIGHT_TD_HIGH = 0x05, // Right camera TD event, increase in illumination (polarity '1') + RIGHT_APS_END = 0x06, // Right camera APS event, measurement end (polarity '0') + RIGHT_APS_START = 0x07, // Right camera APS event, measurement start (polarity '1') + EVT_TIME_HIGH = 0x08, // Timer high bits, also used to synchronize different event flows in the FPGA. + STEREO_DISP = 0x09, // Stereo disparity event + EXT_TRIGGER = 0x0A, // External trigger output + IMU_EVT = 0x0D, // Inertial Measurement Unit event that relays accelerometer and gyroscope information. + OTHER = 0x0E, // To be used for extensions in the event types + CONTINUED = 0X0F, // Extra data to previous events +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_BASE_EVENT_TYPES_H diff --git a/sdk/modules/driver/cpp/src/em.cpp b/hal_psee_plugins/include/decoders/base/event_base.h similarity index 76% rename from sdk/modules/driver/cpp/src/em.cpp rename to hal_psee_plugins/include/decoders/base/event_base.h index 1d8484a8e..97a36b3f9 100644 --- a/sdk/modules/driver/cpp/src/em.cpp +++ b/hal_psee_plugins/include/decoders/base/event_base.h @@ -9,19 +9,19 @@ * See the License for the specific language governing permissions and limitations under the License. * **********************************************************************************************************************/ -#include "metavision/sdk/driver/em.h" -#include "metavision/sdk/driver/camera_exception.h" +#ifndef METAVISION_HAL_EVENT_BASE_H +#define METAVISION_HAL_EVENT_BASE_H namespace Metavision { - -EM::~EM() {} - -CallbackId EM::add_callback(const EventsEMCallback &cb) { - throw CameraException(CameraErrorCode::DeprecatedFeature, "EM not available."); -} - -bool EM::remove_callback(CallbackId callback_id) { - throw CameraException(CameraErrorCode::DeprecatedFeature, "EM not available."); -} - +class EventBase { +public: + struct RawEvent { + unsigned int trail : 28; + unsigned int type : 4; + }; + static_assert(sizeof(RawEvent) == 4, + "The size of the packed struct EventBase::RawEvent is not the expected one (which is 4 bytes)"); +}; } // namespace Metavision + +#endif // METAVISION_HAL_EVENT_BASE_H diff --git a/hal_openeb_plugins/include/common/raw_evt2_decoder.h b/hal_psee_plugins/include/decoders/evt2/evt2_decoder.h similarity index 51% rename from hal_openeb_plugins/include/common/raw_evt2_decoder.h rename to hal_psee_plugins/include/decoders/evt2/evt2_decoder.h index 5574866b2..0d3624046 100644 --- a/hal_openeb_plugins/include/common/raw_evt2_decoder.h +++ b/hal_psee_plugins/include/decoders/evt2/evt2_decoder.h @@ -9,75 +9,42 @@ * See the License for the specific language governing permissions and limitations under the License. * **********************************************************************************************************************/ -#ifndef RAW_EVT2_DECODER_H -#define RAW_EVT2_DECODER_H +#ifndef METAVISION_HAL_EVT2_DECODER_H +#define METAVISION_HAL_EVT2_DECODER_H -#include -#include -#include -#include -#include - -#include "raw_evt_base.h" +#include "metavision/hal/facilities/i_decoder.h" +#include "metavision/sdk/base/events/event_cd.h" +#include "metavision/sdk/base/events/event_ext_trigger.h" +#include "metavision/hal/facilities/i_event_decoder.h" +#include "decoders/base/event_base.h" +#include "decoders/evt2/evt2_event_types.h" namespace Metavision { -namespace EVT2 { - -constexpr uint8_t EventsTimeStampBits = 6; - -// See https://docs.prophesee.ai/stable/data_formats/data_encoding_formats/evt2.html -enum class TypesEnum : EventTypesUnderlying_t { - CD_OFF = 0x00, // camera CD event, decrease in illumination (polarity '0') - CD_ON = 0x01, // camera CD event, increase in illumination (polarity '1') - EVT_TIME_HIGH = 0x08, // Timer high bits, also used to synchronize different event flows in the FPGA. - EXT_TRIGGER = 0x0A, // External trigger output - OTHER = 0x0E, // To be used for extensions in the event types - CONTINUED = 0X0F, // Extra data to previous events -}; - -// Works for both CD_ON and CD_OFF events -struct Event2D { - unsigned int y : 11; - unsigned int x : 11; - unsigned int timestamp : 6; - unsigned int type : 4; -}; - -struct EventExtTrigger { - unsigned int value : 1; - unsigned int unused2 : 7; - unsigned int id : 5; - unsigned int unused1 : 9; - unsigned int timestamp : 6; - unsigned int type : 4; -}; -class Decoder : public Metavision::I_Decoder { +class EVT2Decoder : public I_Decoder { public: - struct RawEvent { - unsigned int trail : 28; - unsigned int type : 4; - }; + using RawEvent = EventBase::RawEvent; + using EventTypesEnum = EVT2EventTypes; using Event_Word_Type = uint32_t; - static constexpr std::uint8_t NumBitsInTimestampLSB = EventsTimeStampBits; - static constexpr Metavision::timestamp MaxTimestamp = Metavision::timestamp((1 << 28) - 1) << NumBitsInTimestampLSB; - static constexpr Metavision::timestamp LoopThreshold = 10000; - static constexpr Metavision::timestamp TimeLoop = MaxTimestamp + (1 << NumBitsInTimestampLSB); + static constexpr std::uint8_t NumBitsInTimestampLSB = EVT2EventsTimeStampBits; + static constexpr timestamp MaxTimestamp = timestamp((1 << 28) - 1) << NumBitsInTimestampLSB; + static constexpr timestamp LoopThreshold = 10000; + static constexpr timestamp TimeLoop = MaxTimestamp + (1 << NumBitsInTimestampLSB); - Decoder(bool time_shifting_enabled, - const std::shared_ptr> &event_cd_decoder = - std::shared_ptr>(), - const std::shared_ptr> &event_ext_trigger_decoder = - std::shared_ptr>()) : - Metavision::I_Decoder(time_shifting_enabled, event_cd_decoder, event_ext_trigger_decoder) {} + EVT2Decoder( + bool time_shifting_enabled, + const std::shared_ptr> &event_cd_decoder = std::shared_ptr>(), + const std::shared_ptr> &event_ext_trigger_decoder = + std::shared_ptr>()) : + I_Decoder(time_shifting_enabled, event_cd_decoder, event_ext_trigger_decoder) {} - virtual bool get_timestamp_shift(Metavision::timestamp &ts_shift) const override { + virtual bool get_timestamp_shift(timestamp &ts_shift) const override { ts_shift = shift_th_; return base_time_set_; } - virtual Metavision::timestamp get_last_timestamp() const override { + virtual timestamp get_last_timestamp() const override { return last_timestamp_; } @@ -86,16 +53,15 @@ class Decoder : public Metavision::I_Decoder { } private: - bool base_time_set_ = false; - virtual void decode_impl(RawData *cur_raw_data, RawData *raw_data_end) override { RawEvent *cur_raw_ev = reinterpret_cast(cur_raw_data); RawEvent *raw_ev_end = reinterpret_cast(raw_data_end); if (!base_time_set_) { for (; cur_raw_ev != raw_ev_end; cur_raw_ev++) { - if (cur_raw_ev->type == static_cast(TypesEnum::EVT_TIME_HIGH)) { - uint64_t t = cur_raw_ev->trail; + EventBase::RawEvent *ev = reinterpret_cast(cur_raw_ev); + if (ev->type == static_cast(EventTypesEnum::EVT_TIME_HIGH)) { + uint64_t t = ev->trail; t <<= NumBitsInTimestampLSB; base_time_ = t; shift_th_ = is_time_shifting_enabled() ? t : 0; @@ -124,9 +90,10 @@ class Decoder : public Metavision::I_Decoder { auto &cd_forwarder = cd_event_forwarder(); auto &trigger_forwarder = trigger_event_forwarder(); for (; cur_raw_ev != raw_ev_end; ++cur_raw_ev) { - const unsigned int type = cur_raw_ev->type; - if (type == static_cast(TypesEnum::EVT_TIME_HIGH)) { - Metavision::timestamp new_th = Metavision::timestamp(cur_raw_ev->trail) << NumBitsInTimestampLSB; + EventBase::RawEvent *ev = reinterpret_cast(cur_raw_ev); + const unsigned int type = ev->type; + if (type == static_cast(EventTypesEnum::EVT_TIME_HIGH)) { + timestamp new_th = timestamp(ev->trail) << NumBitsInTimestampLSB; if (UPDATE_LOOP) { new_th += full_shift_; if (has_time_loop(new_th, base_time_)) { @@ -137,47 +104,49 @@ class Decoder : public Metavision::I_Decoder { } else { base_time_ = APPLY_TIMESHIFT ? new_th + full_shift_ : new_th; } - } else if (type == static_cast(TypesEnum::CD_OFF) || - type == static_cast(TypesEnum::CD_ON)) { - Event2D *ev_cd = reinterpret_cast(cur_raw_ev); - last_timestamp_ = base_time_ + ev_cd->timestamp; - cd_forwarder.forward(static_cast(ev_cd->x), static_cast(ev_cd->y), - ev_cd->type & 1, last_timestamp_); - } else if (type == static_cast(TypesEnum::EXT_TRIGGER)) { - EventExtTrigger *ev_ext_raw = reinterpret_cast(cur_raw_ev); - last_timestamp_ = base_time_ + ev_ext_raw->timestamp; + } else if (type == static_cast(EventTypesEnum::LEFT_TD_LOW) || + type == static_cast(EventTypesEnum::LEFT_TD_HIGH)) { // CD + EVT2Event2D *ev_td = reinterpret_cast(ev); + last_timestamp_ = base_time_ + ev_td->timestamp; + cd_forwarder.forward(static_cast(ev_td->x), static_cast(ev_td->y), + ev_td->type & 1, last_timestamp_); + } else if (type == static_cast(EventTypesEnum::EXT_TRIGGER)) { + EVT2EventExtTrigger *ev_ext_raw = reinterpret_cast(ev); + last_timestamp_ = base_time_ + ev_ext_raw->timestamp; trigger_forwarder.forward(static_cast(ev_ext_raw->value), last_timestamp_, static_cast(ev_ext_raw->id)); } } } - static bool buffer_has_time_loop(RawEvent *const cur_raw_ev, RawEvent *raw_ev_end, - const Metavision::timestamp base_time_us, - const Metavision::timestamp timeshift_us) { + static bool buffer_has_time_loop(RawEvent *const cur_raw_ev, RawEvent *raw_ev_end, const timestamp base_time_us, + const timestamp timeshift_us) { for (; raw_ev_end != cur_raw_ev;) { --raw_ev_end; // If cur_ev_end == cur_ev, we don't enter so cur_ev_end is always valid - if (raw_ev_end->type == static_cast(TypesEnum::EVT_TIME_HIGH)) { - const Metavision::timestamp timer_high = - (Metavision::timestamp(raw_ev_end->trail) << NumBitsInTimestampLSB) + timeshift_us; + if (raw_ev_end->type == static_cast(EventTypesEnum::EVT_TIME_HIGH)) { + const timestamp timer_high = (timestamp(raw_ev_end->trail) << NumBitsInTimestampLSB) + timeshift_us; return has_time_loop(timer_high, base_time_us); } } return false; } - static bool has_time_loop(const Metavision::timestamp current_time_us, const Metavision::timestamp base_time_us) { + static bool has_time_loop(const timestamp current_time_us, const timestamp base_time_us) { return (current_time_us < base_time_us) && ((base_time_us - current_time_us) >= (MaxTimestamp - LoopThreshold)); } - Metavision::timestamp base_time_; // base time to add non timer high events' ts to - Metavision::timestamp shift_th_{0}; // first th decoded - Metavision::timestamp last_timestamp_; // ts of the last event - Metavision::timestamp full_shift_{ + bool base_time_set_ = false; + + timestamp base_time_; // base time to add non timer high events' ts to + timestamp shift_th_{0}; // first th decoded + timestamp last_timestamp_{-1}; // ts of the last event + timestamp full_shift_{ 0}; // includes loop and shift_th in one single variable. Must be signed typed as shift can be negative. + + std::vector incomplete_raw_data_; + std::iterator_traits::difference_type incomplete_raw_data_missing_count_{0}; }; -} // namespace EVT2 } // namespace Metavision -#endif // RAW_EVT2_DECODER_H +#endif // METAVISION_HAL_EVT2_DECODER_H diff --git a/hal_psee_plugins/include/decoders/evt2/evt2_event_types.h b/hal_psee_plugins/include/decoders/evt2/evt2_event_types.h new file mode 100644 index 000000000..7c76b34cd --- /dev/null +++ b/hal_psee_plugins/include/decoders/evt2/evt2_event_types.h @@ -0,0 +1,172 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_EVT2_EVENT_TYPES_H +#define METAVISION_HAL_EVT2_EVENT_TYPES_H + +#include "decoders/base/base_event_types.h" + +namespace Metavision { + +constexpr uint8_t EVT2EventsTimeStampBits = 6; + +// LEFT_APS_START and LEFT_APS_END are inverted compared to their definition because we +// explicitly inverse EM polarity in the driver when we start a gen3 EM camera. +// RIGHT_APS_END and RIGHT_APS_START are untouched as we don't have sysleyEM stereo system connected by FPGA. + +enum class EVT2EventTypes : EventTypesUnderlying_t { + LEFT_TD_LOW = static_cast( + BaseEventTypes::LEFT_TD_LOW), // Left camera TD event, decrease in illumination (polarity '0') + LEFT_TD_HIGH = static_cast( + BaseEventTypes::LEFT_TD_HIGH), // Left camera TD event, increase in illumination (polarity '1') + LEFT_APS_START = static_cast( + BaseEventTypes::LEFT_APS_END), // Left camera APS event, measurement start (polarity '0') + LEFT_APS_END = static_cast( + BaseEventTypes::LEFT_APS_START), // Left camera APS event, measurement end (polarity '1') + RIGHT_TD_LOW = static_cast( + BaseEventTypes::RIGHT_TD_LOW), // Right camera TD event, decrease in illumination (polarity '0') + RIGHT_TD_HIGH = static_cast( + BaseEventTypes::RIGHT_TD_HIGH), // Right camera TD event, increase in illumination (polarity '1') + RIGHT_APS_END = static_cast( + BaseEventTypes::RIGHT_APS_END), // Right camera APS event, measurement end (polarity '0') + RIGHT_APS_START = static_cast( + BaseEventTypes::RIGHT_APS_START), // Right camera APS event, measurement start (polarity '1') + EVT_TIME_HIGH = static_cast( + BaseEventTypes::EVT_TIME_HIGH), // Timer high bits, also used to synchronize different event flows in the FPGA. + STEREO_DISP = static_cast(BaseEventTypes::STEREO_DISP), // Stereo disparity event + EXT_TRIGGER = static_cast(BaseEventTypes::EXT_TRIGGER), // External trigger output + IMU_EVT = static_cast(BaseEventTypes::IMU_EVT), // Inertial Measurement Unit event that + // relays accelerometer and gyroscope + // information. + OTHER = static_cast(BaseEventTypes::OTHER), // To be used for extensions in the event types + CONTINUED = static_cast(BaseEventTypes::CONTINUED) // Extra data to previous events + +}; + +// Remark: event types +// - GRAY_LEVEL = 0x0B (Gray level event containing pixel location and intensity) +// - OPT_FLOW = 0x0C (Optical flow event) +// do exist but are not included in the enum because they are not generated + +struct EVT2Event2D { + unsigned int y : 11; + unsigned int x : 11; + unsigned int timestamp : 6; + unsigned int type : 4; +}; +static_assert(sizeof(EVT2Event2D) == 4, + "The size of the packed struct EVT2Event2D is not the expected one (which is 4 bytes)"); + +struct EVT2EventExtTrigger { + unsigned int value : 1; + unsigned int unused2 : 7; + unsigned int id : 5; + unsigned int unused1 : 9; + unsigned int timestamp : 6; + unsigned int type : 4; +}; +static_assert(sizeof(EVT2EventExtTrigger) == 4, + "The size of the packed struct EVT2EventExtTrigger is not the expected one (which is 4 bytes)"); + +// IMU event is composed of 6 32-bit blocks (1 IMU_EVT + 5 CONTINUED) + +struct EVT2EventIMU { + // 1st 32-bit block + unsigned int dmp_1 : 1; // Is DMP (Digital Motion Processor) active, bit 0 + int ax : 16; // Accelerometer X value, bits 1 -> 16 + unsigned int unused_1 : 5; // Unused, bits 17 -> 21 + unsigned int ts_1 : 6; // Least significant bits of the event time base, bits 22 -> 27 + unsigned int type_1 : 4; // Event type : IMU_EVT ('1101'), bits 28 -> 31 + + // 2nd 32-bit block + unsigned int dmp_2 : 1; // Is DMP (Digital Motion Processor) active, bit 0 + int ay : 16; // Accelerometer Y value, bits 1 -> 16 + unsigned int unused_2 : 5; // Unused, bits 17 -> 21 + unsigned int ts_2 : 6; // Least significant bits of the event time base, bits 22 -> 27 + unsigned int type_2 : 4; // Event type : CONTINUED ('1111'), bits 28 -> 31 + + // 3rd 32-bit block + unsigned int dmp_3 : 1; // Is DMP (Digital Motion Processor) active, bit 0 + int az : 16; // Accelerometer Z value, bits 1 -> 16 + unsigned int unused_3 : 5; // Unused, bits 17 -> 21 + unsigned int ts_3 : 6; // Least significant bits of the event time base, bits 22 -> 27 + unsigned int type_3 : 4; // Event type : CONTINUED ('1111'), bits 28 -> 31 + + // 4th 32-bit block + unsigned int dmp_4 : 1; // Is DMP (Digital Motion Processor) active, bit 0 + int gx : 16; // Gyroscope X value, bits 1 -> 16 + unsigned int unused_4 : 5; // Unused, bits 17 -> 21 + unsigned int ts_4 : 6; // Least significant bits of the event time base, bits 22 -> 27 + unsigned int type_4 : 4; // Event type : CONTINUED ('1111'), bits 28 -> 31 + + // 5th 32-bit block + unsigned int dmp_5 : 1; // Is DMP (Digital Motion Processor) active, bit 0 + int gy : 16; // Gyroscope Y value, bits 1 -> 16 + unsigned int unused_5 : 5; // Unused, bits 17 -> 21 + unsigned int ts_5 : 6; // Least significant bits of the event time base, bits 22 -> 27 + unsigned int type_5 : 4; // Event type : CONTINUED ('1111'), bits 28 -> 31 + + // 6th 32-bit block + unsigned int dmp_6 : 1; // Is DMP (Digital Motion Processor) active, bit 0 + int gz : 16; // Gyroscope Z value, bits 1 -> 16 + unsigned int unused_6 : 5; // Unused, bits 17 -> 21 + unsigned int ts_6 : 6; // Least significant bits of the event time base, bits 22 -> 27 + unsigned int type_6 : 4; // Event type : CONTINUED ('1111'), bits 28 -> 31 +}; +static_assert(sizeof(EVT2EventIMU) == 24, + "The size of the packed struct EVT2EventIMU is not the expected one (which is 24 bytes)"); + +struct EVT2EventMonitor { + unsigned int subtype : 16; + unsigned int monitorclass : 1; + unsigned int padding : 5; + unsigned int timestamp : 6; + unsigned int type : 4; +}; +static_assert(sizeof(EVT2EventMonitor) == 4, + "The size of the packed struct EVT2EventMonitor is not the expected one (which is 4 bytes)"); + +struct EVT2EventMonitorTemperature { + unsigned int temp_10_dot_12_float : 22; + unsigned int over_temp_alarm : 1; + unsigned int user_temp_alarm : 1; + unsigned int source : 4; + unsigned int type : 4; +}; +static_assert(sizeof(EVT2EventMonitorTemperature) == 4, + "The size of the packed struct EVT2EventMonitorTemperature is not the expected one (which is 4 bytes)"); + +struct EVT2EventMonitorIdle { + unsigned int idle_time_us : 26; + unsigned int unused : 2; + unsigned int type : 4; +}; +static_assert(sizeof(EVT2EventMonitorIdle) == 4, + "The size of the packed struct EVT2EventMonitorIdle is not the expected one (which is 4 bytes)"); + +struct EVT2EventMonitorIllumination { + unsigned int illumination_pulse_duration_us : 26; + unsigned int unused : 2; + unsigned int type : 4; +}; +static_assert(sizeof(EVT2EventMonitorIllumination) == 4, + "The size of the packed struct EVT2EventMonitorIllumination is not the expected one (which is 4 bytes)"); + +struct EVT2EventMonitorEndOfFrame { + uint32_t frame_size_byte : 28; + unsigned int type : 4; +}; +static_assert(sizeof(EVT2EventMonitorEndOfFrame) == 4, + "The size of the packed struct EVT2EventMonitorEndOfFrame is not the expected one (which is 4 bytes)"); + +} // namespace Metavision + +#endif // METAVISION_HAL_EVT2_EVENT_TYPES_H diff --git a/hal_psee_plugins/include/decoders/evt2/future/evt2_decoder.h b/hal_psee_plugins/include/decoders/evt2/future/evt2_decoder.h new file mode 100644 index 000000000..e8edaf73b --- /dev/null +++ b/hal_psee_plugins/include/decoders/evt2/future/evt2_decoder.h @@ -0,0 +1,196 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_FUTURE_EVT2_DECODER_H +#define METAVISION_HAL_FUTURE_EVT2_DECODER_H + +#include "metavision/hal/facilities/future/i_decoder.h" +#include "metavision/sdk/base/events/event_cd.h" +#include "metavision/sdk/base/events/event_ext_trigger.h" +#include "metavision/hal/facilities/i_event_decoder.h" +#include "decoders/base/event_base.h" +#include "decoders/evt2/evt2_event_types.h" + +namespace Metavision { +namespace Future { + +class EVT2Decoder : public I_Decoder { +public: + using RawEvent = EventBase::RawEvent; + using EventTypesEnum = EVT2EventTypes; + using Event_Word_Type = uint32_t; + + static constexpr std::uint8_t NumBitsInTimestampLSB = EVT2EventsTimeStampBits; + static constexpr timestamp MaxTimestamp = timestamp((1 << 28) - 1) << NumBitsInTimestampLSB; + static constexpr timestamp LoopThreshold = 10000; + static constexpr timestamp TimeLoop = MaxTimestamp + (1 << NumBitsInTimestampLSB); + + EVT2Decoder( + bool time_shifting_enabled, + const std::shared_ptr> &event_cd_decoder = std::shared_ptr>(), + const std::shared_ptr> &event_ext_trigger_decoder = + std::shared_ptr>()) : + I_Decoder(time_shifting_enabled, event_cd_decoder, event_ext_trigger_decoder) {} + + virtual bool get_timestamp_shift(timestamp &ts_shift) const override { + ts_shift = shift_th_; + return shift_set_; + } + + virtual timestamp get_last_timestamp() const override { + if (!last_timestamp_set_) { + return -1; + } + return last_timestamp_; + } + + uint8_t get_raw_event_size_bytes() const override { + return sizeof(RawEvent); + } + +private: + virtual void decode_impl(const RawData *const cur_raw_data, const RawData *const raw_data_end) override { + const RawEvent *cur_raw_ev = reinterpret_cast(cur_raw_data); + const RawEvent *raw_ev_end = reinterpret_cast(raw_data_end); + + if (!base_time_set_) { + for (; cur_raw_ev != raw_ev_end; cur_raw_ev++) { + const EventBase::RawEvent *ev = reinterpret_cast(cur_raw_ev); + if (ev->type == static_cast(EventTypesEnum::EVT_TIME_HIGH)) { + uint64_t t = ev->trail; + t <<= NumBitsInTimestampLSB; + base_time_ = t; + base_time_set_ = true; + if (!shift_set_) { + shift_th_ = is_time_shifting_enabled() ? t : 0; + full_shift_ = -shift_th_; + shift_set_ = true; + } + last_timestamp_ = base_time_; + break; + } + } + } + + if (!buffer_has_time_loop(cur_raw_ev, raw_ev_end, base_time_, full_shift_)) { + // In the general case: if no time shift is to be applied and there is no time loop yet, do not apply + // any shifting on the new timer high decoded. + if (full_shift_ == 0) { + decode_events_buffer(cur_raw_ev, raw_ev_end); + } else { + decode_events_buffer(cur_raw_ev, raw_ev_end); + } + } else { + decode_events_buffer(cur_raw_ev, raw_ev_end); + } + } + + template + void decode_events_buffer(const RawEvent *&cur_raw_ev, const RawEvent *const raw_ev_end) { + auto &cd_forwarder = cd_event_forwarder(); + auto &trigger_forwarder = trigger_event_forwarder(); + for (; cur_raw_ev != raw_ev_end; ++cur_raw_ev) { + const EventBase::RawEvent *ev = reinterpret_cast(cur_raw_ev); + const unsigned int type = ev->type; + if (type == static_cast(EventTypesEnum::EVT_TIME_HIGH)) { + timestamp new_th = timestamp(ev->trail) << NumBitsInTimestampLSB; + const auto last_base_time = base_time_; + if (UPDATE_LOOP) { + new_th += full_shift_; + if (has_time_loop(new_th, base_time_)) { + full_shift_ += TimeLoop; + new_th += TimeLoop; + } + base_time_ = new_th; + } else { + base_time_ = APPLY_TIMESHIFT ? new_th + full_shift_ : new_th; + } + // avoid momentary time discrepancies when decoding event per events, time low comes + // right after (in an event of another type) to correct the value + last_timestamp_ = (base_time_ != last_base_time ? base_time_ : last_timestamp_); + } else if (type == static_cast(EventTypesEnum::LEFT_TD_LOW) || + type == static_cast(EventTypesEnum::LEFT_TD_HIGH)) { // CD + const EVT2Event2D *ev_td = reinterpret_cast(ev); + last_timestamp_ = base_time_ + ev_td->timestamp; + last_timestamp_set_ = true; + cd_forwarder.forward(static_cast(ev_td->x), static_cast(ev_td->y), + ev_td->type & 1, last_timestamp_); + } else if (type == static_cast(EventTypesEnum::EXT_TRIGGER)) { + const EVT2EventExtTrigger *ev_ext_raw = reinterpret_cast(ev); + last_timestamp_ = base_time_ + ev_ext_raw->timestamp; + last_timestamp_set_ = true; + trigger_forwarder.forward(static_cast(ev_ext_raw->value), last_timestamp_, + static_cast(ev_ext_raw->id)); + } + } + } + + static bool buffer_has_time_loop(const RawEvent *const cur_raw_ev, const RawEvent *const raw_ev_end_, + const timestamp base_time_us, const timestamp timeshift_us) { + const RawEvent *raw_ev_end = raw_ev_end_; + for (; raw_ev_end != cur_raw_ev;) { + --raw_ev_end; // If cur_ev_end == cur_ev, we don't enter so cur_ev_end is always valid + if (raw_ev_end->type == static_cast(EventTypesEnum::EVT_TIME_HIGH)) { + const timestamp timer_high = (timestamp(raw_ev_end->trail) << NumBitsInTimestampLSB) + timeshift_us; + return has_time_loop(timer_high, base_time_us); + } + } + return false; + } + + static bool has_time_loop(const timestamp current_time_us, const timestamp base_time_us) { + return (current_time_us < base_time_us) && ((base_time_us - current_time_us) >= (MaxTimestamp - LoopThreshold)); + } + + bool reset_timestamp_impl(const timestamp &t) override { + if (is_time_shifting_enabled() && !shift_set_) { + return false; + } + if (t >= 0) { + constexpr int min_timer_high_val = (1 << NumBitsInTimestampLSB); + base_time_ = min_timer_high_val * (t / min_timer_high_val); + last_timestamp_ = base_time_ + t % min_timer_high_val; + full_shift_ = -shift_th_ + TimeLoop * (base_time_ / TimeLoop); + base_time_set_ = true; + last_timestamp_set_ = true; + return true; + } + return false; + } + + bool reset_timestamp_shift_impl(const timestamp &shift) override { + if (shift >= 0 && is_time_shifting_enabled()) { + shift_th_ = shift; + full_shift_ = -shift_th_; + shift_set_ = true; + return true; + } + return false; + } + + bool base_time_set_ = false; + bool last_timestamp_set_ = false; + + timestamp base_time_; // base time to add non timer high events' ts to + timestamp shift_th_{0}; // first th decoded + timestamp last_timestamp_{-1}; // ts of the last event + timestamp full_shift_{ + 0}; // includes loop and shift_th in one single variable. Must be signed typed as shift can be negative. + bool shift_set_{false}; + + std::vector incomplete_raw_data_; + std::iterator_traits::difference_type incomplete_raw_data_missing_count_{0}; +}; + +} // namespace Future +} // namespace Metavision + +#endif // METAVISION_HAL_FUTURE_EVT2_DECODER_H diff --git a/hal_openeb_plugins/include/common/raw_evt3_decoder.h b/hal_psee_plugins/include/decoders/evt3/evt3_decoder.h similarity index 64% rename from hal_openeb_plugins/include/common/raw_evt3_decoder.h rename to hal_psee_plugins/include/decoders/evt3/evt3_decoder.h index 8e9b93aa1..3fe9e4cde 100644 --- a/hal_openeb_plugins/include/common/raw_evt3_decoder.h +++ b/hal_psee_plugins/include/decoders/evt3/evt3_decoder.h @@ -9,94 +9,49 @@ * See the License for the specific language governing permissions and limitations under the License. * **********************************************************************************************************************/ -#ifndef RAW_EVT3_DECODER_H -#define RAW_EVT3_DECODER_H +#ifndef METAVISION_HAL_EVT3_DECODER_H +#define METAVISION_HAL_EVT3_DECODER_H -#include -#include -#include +#include +#include +#include -#include "raw_evt_base.h" +#include "metavision/sdk/base/events/event_cd.h" +#include "metavision/hal/facilities/i_event_decoder.h" +#include "decoders/base/event_base.h" +#include "metavision/hal/facilities/i_geometry.h" +#include "metavision/hal/facilities/i_decoder.h" +#include "decoders/evt3/evt3_event_types.h" namespace Metavision { -namespace EVT3 { - -union Mask { - uint32_t valid; - struct MaskVect32 { - uint32_t valid1 : 12; - uint32_t valid2 : 12; - uint32_t valid3 : 8; - } m; -}; - -struct EventPosX { - uint16_t x : 11; - uint16_t pol : 1; - uint16_t type : 4; -}; - -struct EventVect12_12_8 { - uint16_t valid1 : 12; - uint16_t type1 : 4; - uint16_t valid2 : 12; - uint16_t type2 : 4; - uint16_t valid3 : 8; - uint16_t unused3 : 4; - uint16_t type3 : 4; -}; -struct EventExtTrigger { - uint16_t pol : 1; - uint16_t unused : 7; - uint16_t id : 4; - uint16_t type : 4; -}; - -struct RawEvent { - uint16_t content : 12; - uint16_t type : 4; -}; +class EVT3Decoder : public I_Decoder { +public: + using RawEvent = Evt3Raw::RawEvent; + using EventTypesEnum = Evt3EventTypes_4bits; -struct EventTime { - uint16_t time : 12; - uint16_t type : 4; - static size_t decode_time_high(const uint16_t *ev, Metavision::timestamp &cur_t) { - const EventTime *ev_timehigh = reinterpret_cast(ev); - cur_t = (cur_t & ~(0b111111111111ull << 12)) | (ev_timehigh->time << 12); - return 1; - } -}; +private: + // Parameters related to time loop policy + std::atomic timestamp_loop_enabled_{true}; -enum class TypesEnum : EventTypesUnderlying_t { - EVT_ADDR_Y = 0x0, - EVT_ADDR_X = 0x2, - VECT_BASE_X = 0x3, - VECT_12 = 0x4, - VECT_8 = 0x5, - TIME_LOW = 0x6, - CONTINUED_4 = 0x7, - TIME_HIGH = 0x8, - EXT_TRIGGER = 0xA, - OTHERS = 0xE, - CONTINUED_12 = 0xF -}; + std::mutex is_decoding_mut_; -class Decoder : public Metavision::I_Decoder { public: - Decoder(bool time_shifting_enabled, int height, - const std::shared_ptr> &event_cd_decoder = - std::shared_ptr>(), - const std::shared_ptr> &event_ext_trigger_decoder = - std::shared_ptr>()) : - Metavision::I_Decoder(time_shifting_enabled, event_cd_decoder, event_ext_trigger_decoder), height_(height) {} - - virtual bool get_timestamp_shift(Metavision::timestamp &ts_shift) const override { - ts_shift = timestamp_shift_; - return base_time_set_; + EVT3Decoder( + bool time_shifting_enabled, int height, + const std::shared_ptr> &event_cd_decoder = std::shared_ptr>(), + const std::shared_ptr> &event_ext_trigger_decoder = + std::shared_ptr>()) : + I_Decoder(time_shifting_enabled, event_cd_decoder, event_ext_trigger_decoder), height_(height) {} + + virtual bool get_timestamp_shift(timestamp &ts_shift) const override { + return false; } - virtual Metavision::timestamp get_last_timestamp() const override final { + virtual timestamp get_last_timestamp() const override final { + if (!last_timestamp_set_) { + return -1; + } return is_time_shifting_enabled() ? last_timestamp() : last_timestamp(); } @@ -106,7 +61,7 @@ class Decoder : public Metavision::I_Decoder { private: template - Metavision::timestamp last_timestamp() const { + timestamp last_timestamp() const { return DO_TIMESHIFT ? last_timestamp_.time - timestamp_shift_ : last_timestamp_.time; } @@ -116,10 +71,10 @@ class Decoder : public Metavision::I_Decoder { if (!base_time_set_) { for (; cur_raw_ev != raw_ev_end; ++cur_raw_ev) { - if (static_cast(TypesEnum::TIME_HIGH) == cur_raw_ev->type) { - EventTime *ev_timehigh = reinterpret_cast(cur_raw_ev); + if (static_cast(EventTypesEnum::EVT_TIME_HIGH) == cur_raw_ev->type) { + Evt3Raw::Event_Time *ev_timehigh = reinterpret_cast(cur_raw_ev); - Metavision::timestamp t = ev_timehigh->time; + timestamp t = ev_timehigh->time; if (t > 0) { --t; } @@ -169,20 +124,21 @@ class Decoder : public Metavision::I_Decoder { auto &trigger_forwarder = trigger_event_forwarder(); for (; cur_raw_ev != raw_ev_end;) { const uint16_t type = cur_raw_ev->type; - if (type == static_cast(TypesEnum::EVT_ADDR_X)) { + if (type == static_cast(EventTypesEnum::EVT_ADDR_X)) { if (is_valid) { - EventPosX *ev_posx = reinterpret_cast(cur_raw_ev); - cd_forwarder.forward(static_cast(ev_posx->x), state[(int)TypesEnum::EVT_ADDR_Y], - static_cast(ev_posx->pol), last_timestamp()); + Evt3Raw::Event_PosX *ev_posx = reinterpret_cast(cur_raw_ev); + cd_forwarder.forward(static_cast(ev_posx->x), + state[(int)EventTypesEnum::EVT_ADDR_Y], static_cast(ev_posx->pol), + last_timestamp()); } ++cur_raw_ev; - } else if (type == static_cast(TypesEnum::VECT_12)) { - constexpr uint32_t vect12_size = sizeof(EventVect12_12_8) / sizeof(RawEvent); + } else if (type == static_cast(EventTypesEnum::VECT_12)) { + constexpr uint32_t vect12_size = sizeof(Evt3Raw::Event_Vect12_12_8) / sizeof(RawEvent); if (cur_raw_ev + vect12_size > raw_ev_end) { // Not enough raw data to decode the vect12_12_8 events. Stop decoding this buffer and return the // amount of data missing to wait for to be able to decode on the next call - return static_cast(std::distance(raw_ev_end, cur_raw_ev + vect12_size)); + return std::distance(raw_ev_end, cur_raw_ev + vect12_size); } if (!is_valid) { cur_raw_ev += vect12_size; @@ -191,49 +147,55 @@ class Decoder : public Metavision::I_Decoder { cd_forwarder.reserve(32); - EventVect12_12_8 *ev_vect12_12_8 = reinterpret_cast(cur_raw_ev); + Evt3Raw::Event_Vect12_12_8 *ev_vect12_12_8 = reinterpret_cast(cur_raw_ev); - Mask m; + Evt3Raw::Mask m; m.m.valid1 = ev_vect12_12_8->valid1; m.m.valid2 = ev_vect12_12_8->valid2; m.m.valid3 = ev_vect12_12_8->valid3; uint32_t valid = m.valid; - uint16_t last_x = state[(int)TypesEnum::VECT_BASE_X] & NOT_POLARITY_MASK; + uint16_t last_x = state[(int)EventTypesEnum::VECT_BASE_X] & NOT_POLARITY_MASK; uint16_t nb_bits = 32; #if defined(__x86_64__) || defined(__aarch64__) uint16_t off = 0; while (valid) { off = __builtin_ctz(valid); valid &= ~(1 << off); - cd_forwarder.forward_unsafe(last_x + off, state[(int)TypesEnum::EVT_ADDR_Y], - (bool)(state[(int)TypesEnum::VECT_BASE_X] & POLARITY_MASK), + cd_forwarder.forward_unsafe(last_x + off, state[(int)EventTypesEnum::EVT_ADDR_Y], + (bool)(state[(int)EventTypesEnum::VECT_BASE_X] & POLARITY_MASK), last_timestamp()); } #else uint16_t end = last_x + nb_bits; for (uint16_t i = last_x; i != end; ++i) { if (valid & 0x1) { - cd_forwarder.forward_unsafe(i, state[(int)TypesEnum::EVT_ADDR_Y], - (bool)(state[(int)TypesEnum::VECT_BASE_X] & POLARITY_MASK), + cd_forwarder.forward_unsafe(i, state[(int)EventTypesEnum::EVT_ADDR_Y], + (bool)(state[(int)EventTypesEnum::VECT_BASE_X] & POLARITY_MASK), last_timestamp()); } valid >>= 1; } #endif - state[(int)TypesEnum::VECT_BASE_X] += nb_bits; + state[(int)EventTypesEnum::VECT_BASE_X] += nb_bits; cur_raw_ev += vect12_size; - } else if (type == static_cast(TypesEnum::TIME_HIGH)) { - EventTime *ev_timehigh = reinterpret_cast(cur_raw_ev); - static constexpr uint64_t max_timestamp_ = 1ULL << 11; + } else if (type == static_cast(EventTypesEnum::EVT_TIME_HIGH)) { + Evt3Raw::Event_Time *ev_timehigh = reinterpret_cast(cur_raw_ev); + static constexpr timestamp max_timestamp_ = 1ULL << 11; last_timestamp_.bitfield_time.loop += (bool)(last_timestamp_.bitfield_time.high >= max_timestamp_ + ev_timehigh->time); + last_timestamp_.bitfield_time.low = + (last_timestamp_.bitfield_time.high == ev_timehigh->time ? + last_timestamp_.bitfield_time.low : + 0); // avoid momentary time discrepancies when decoding event per events. Time low comes + // right after to correct the value (note that the timestamp here is not good if we don't + // do that either) last_timestamp_.bitfield_time.high = ev_timehigh->time; ++cur_raw_ev; - } else if (type == static_cast(TypesEnum::EXT_TRIGGER)) { - EventExtTrigger *ev_exttrigger = reinterpret_cast(cur_raw_ev); + } else if (type == static_cast(EventTypesEnum::EXT_TRIGGER)) { + Evt3Raw::Event_ExtTrigger *ev_exttrigger = reinterpret_cast(cur_raw_ev); trigger_forwarder.forward(static_cast(ev_exttrigger->pol), last_timestamp(), static_cast(ev_exttrigger->id)); ++cur_raw_ev; @@ -241,13 +203,18 @@ class Decoder : public Metavision::I_Decoder { // The objective is to reduce the number of possible cases // The content of each type is store into a state because the encoding is stateful state[type] = cur_raw_ev->content; + // Here the type of event is saved (CD vs EM) to know when a EVT_ADDR_X or VECT_BASE_X arrives + // if the event is a CD or EM + is_cd = type >= 2 ? is_cd : !(bool)type; // Some event outside of the sensor may occur, to limit the number of test the check is done // every EVT_ADDR_Y - is_valid = state[(int)TypesEnum::EVT_ADDR_Y] < height_; + is_valid = is_cd && state[(int)EventTypesEnum::EVT_ADDR_Y] < height_; - last_timestamp_.bitfield_time.low = type != static_cast(TypesEnum::TIME_LOW) ? - last_timestamp_.bitfield_time.low : - state[static_cast(TypesEnum::TIME_LOW)]; + last_timestamp_.bitfield_time.low = + type != static_cast(EventTypesEnum::EVT_TIME_LOW) ? + last_timestamp_.bitfield_time.low : + state[static_cast(EventTypesEnum::EVT_TIME_LOW)]; + last_timestamp_set_ = true; ++cur_raw_ev; } @@ -257,39 +224,35 @@ class Decoder : public Metavision::I_Decoder { return 0; } - bool base_time_set_ = false; + bool base_time_set_ = false; + bool last_timestamp_set_ = false; constexpr static int SIZE_EVTYPE = 16; constexpr static uint16_t NumBitsInTimestampLSB = 12; constexpr static uint16_t NumBitsInHighTimestampLSB = 12; constexpr static uint16_t POLARITY_MASK = 1 << (NumBitsInTimestampLSB - 1); constexpr static uint16_t NOT_POLARITY_MASK = ~(1 << (NumBitsInTimestampLSB - 1)); - uint32_t state[SIZE_EVTYPE]; bool is_valid = false; - bool is_td = false; - + bool is_cd = false; struct bitfield_timestamp { uint64_t low : NumBitsInTimestampLSB; uint64_t high : NumBitsInHighTimestampLSB; uint64_t loop : 64 - NumBitsInHighTimestampLSB - NumBitsInTimestampLSB; }; - struct evt3_timestamp { union { - uint64_t time; bitfield_timestamp bitfield_time; + uint64_t time; }; }; - - evt3_timestamp last_timestamp_ = {0}; - Metavision::timestamp timestamp_shift_ = 0; - uint32_t height_ = 65536; + evt3_timestamp last_timestamp_ = {0}; + timestamp timestamp_shift_ = 0; + uint32_t height_ = 65536; std::vector incomplete_multiword_raw_event_; std::ptrdiff_t raw_events_missing_count_{0}; }; -} // namespace EVT3 } // namespace Metavision -#endif // RAW_EVT3_DECODER_H +#endif // METAVISION_HAL_EVT3_DECODER_H diff --git a/hal_psee_plugins/include/decoders/evt3/evt3_event_types.h b/hal_psee_plugins/include/decoders/evt3/evt3_event_types.h new file mode 100644 index 000000000..59fb0bfae --- /dev/null +++ b/hal_psee_plugins/include/decoders/evt3/evt3_event_types.h @@ -0,0 +1,121 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_EVT3_EVENT_TYPES_H +#define METAVISION_HAL_EVT3_EVENT_TYPES_H + +#include + +#include "metavision/sdk/base/utils/timestamp.h" +#include "decoders/base/base_event_types.h" + +namespace Metavision { + +namespace Evt3Raw { + +union Mask { + uint32_t valid; + struct Mask_Vect32 { + uint32_t valid1 : 12; + uint32_t valid2 : 12; + uint32_t valid3 : 8; + } m; +}; + +struct Evt3_Event_Type_4bits { + uint16_t pad : 11; + uint16_t p : 1; + uint16_t type : 4; +}; + +struct Event_PosX { + uint16_t x : 11; + uint16_t pol : 1; + uint16_t type : 4; +}; +struct Event_Vect12_12_8 { + uint16_t valid1 : 12; + uint16_t type1 : 4; + uint16_t valid2 : 12; + uint16_t type2 : 4; + uint16_t valid3 : 8; + uint16_t unused3 : 4; + uint16_t type3 : 4; +}; + +struct Event_Continue12_12_4 { + uint16_t valid1 : 12; + uint16_t type1 : 4; + uint16_t valid2 : 12; + uint16_t type2 : 4; + uint16_t valid3 : 8; + uint16_t unused3 : 4; + uint16_t type3 : 4; +}; + +struct Event_XBase { + uint16_t x : 11; + uint16_t pol : 1; + uint16_t type : 4; +}; + +struct Event_Y { + uint16_t y : 11; + uint16_t orig : 1; + uint16_t type : 4; +}; + +struct Event_ExtTrigger { + uint16_t pol : 1; + uint16_t unused : 7; + uint16_t id : 4; + uint16_t type : 4; +}; +struct RawEvent { + uint16_t content : 12; + uint16_t type : 4; +}; + +struct Event_Time { + uint16_t time : 12; + uint16_t type : 4; + static size_t decode_time_high(const uint16_t *ev, Metavision::timestamp &cur_t) { + const Event_Time *ev_timehigh = reinterpret_cast(ev); + cur_t = (cur_t & ~(0b111111111111ull << 12)) | (ev_timehigh->time << 12); + return 1; + } +}; +static_assert(sizeof(Evt3_Event_Type_4bits) == 2, + "The size of the packed struct Evt3_Event_Type_4bits is not the expected one (which is 2 bytes)"); + +} // namespace Evt3Raw + +enum class Evt3EventTypes_4bits : EventTypesUnderlying_t { + EVT_ADDR_Y = 0x0, + EVT_ADDR_X = 0x2, + VECT_BASE_X = 0x3, + VECT_12 = 0x4, + VECT_8 = 0x5, + EVT_TIME_LOW = 0x6, + CONTINUED_4 = 0x7, + EVT_TIME_HIGH = 0x8, + STEREO_DISP = 0x9, + EXT_TRIGGER = 0xA, + UNUSED_1 = 0xB, + UNUSED_2 = 0xC, + ORIENTATION = 0xD, + OTHERS = 0xE, + CONTINUED_12 = 0xF +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_EVT3_EVENT_TYPES_H diff --git a/hal_psee_plugins/include/decoders/evt3/future/evt3_decoder.h b/hal_psee_plugins/include/decoders/evt3/future/evt3_decoder.h new file mode 100644 index 000000000..672e251a3 --- /dev/null +++ b/hal_psee_plugins/include/decoders/evt3/future/evt3_decoder.h @@ -0,0 +1,293 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_FUTURE_EVT3_DECODER_H +#define METAVISION_HAL_FUTURE_EVT3_DECODER_H + +#include +#include +#include + +#include "metavision/sdk/base/events/event_cd.h" +#include "metavision/hal/facilities/i_event_decoder.h" +#include "decoders/base/event_base.h" +#include "metavision/hal/facilities/i_geometry.h" +#include "metavision/hal/facilities/i_decoder.h" +#include "decoders/evt3/evt3_event_types.h" + +namespace Metavision { +namespace Future { + +class EVT3Decoder : public I_Decoder { +public: + using RawEvent = Evt3Raw::RawEvent; + using EventTypesEnum = Evt3EventTypes_4bits; + +private: + // Parameters related to time loop policy + std::atomic timestamp_loop_enabled_{true}; + + std::mutex is_decoding_mut_; + +public: + EVT3Decoder( + bool time_shifting_enabled, int height, + const std::shared_ptr> &event_cd_decoder = std::shared_ptr>(), + const std::shared_ptr> &event_ext_trigger_decoder = + std::shared_ptr>()) : + I_Decoder(time_shifting_enabled, event_cd_decoder, event_ext_trigger_decoder), height_(height) {} + + virtual bool get_timestamp_shift(timestamp &ts_shift) const override { + ts_shift = timestamp_shift_; + return timestamp_shift_set_; + } + + virtual timestamp get_last_timestamp() const override final { + if (!last_timestamp_set_) { + return -1; + } + return is_time_shifting_enabled() ? last_timestamp() : last_timestamp(); + } + + uint8_t get_raw_event_size_bytes() const override { + return sizeof(RawEvent); + } + +private: + template + timestamp last_timestamp() const { + return DO_TIMESHIFT ? last_timestamp_.time - timestamp_shift_ : last_timestamp_.time; + } + + virtual void decode_impl(const RawData *const cur_raw_data, const RawData *const raw_data_end) override { + const RawEvent *cur_raw_ev = reinterpret_cast(cur_raw_data); + const RawEvent *const raw_ev_end = reinterpret_cast(raw_data_end); + + if (!base_time_set_) { + for (; cur_raw_ev != raw_ev_end; ++cur_raw_ev) { + if (static_cast(EventTypesEnum::EVT_TIME_HIGH) == cur_raw_ev->type) { + const Evt3Raw::Event_Time *ev_timehigh = reinterpret_cast(cur_raw_ev); + + timestamp t = ev_timehigh->time; + if (t > 0) { + --t; + } + if (!timestamp_shift_set_) { + timestamp_shift_ = t << NumBitsInTimestampLSB; + timestamp_shift_set_ = true; + } + last_timestamp_.bitfield_time.high = t; + base_time_set_ = true; + break; + } + } + } + + // We first try to decode incomplete multiword event from previous decode call, if any + if (raw_events_missing_count_ > 0) { + // 1- Computes how many raw event from this input need to be copied to get a complete multiword raw event + // and append them to the incomplete raw event + const auto raw_events_to_insert_count = + std::min(raw_events_missing_count_, std::distance(cur_raw_ev, raw_ev_end)); + incomplete_multiword_raw_event_.insert(incomplete_multiword_raw_event_.end(), cur_raw_ev, + cur_raw_ev + raw_events_to_insert_count); + cur_raw_ev += raw_events_to_insert_count; + raw_events_missing_count_ -= raw_events_to_insert_count; + + // 2- If the necessary amount of data is present in the input, decode the now complete multiword event + if (raw_events_missing_count_ == 0) { + const RawEvent *multi_word_raw_ev_begin = incomplete_multiword_raw_event_.data(); + const RawEvent *const multi_word_raw_ev_end = + incomplete_multiword_raw_event_.data() + incomplete_multiword_raw_event_.size(); + is_time_shifting_enabled() ? + decode_events_buffer(multi_word_raw_ev_begin, multi_word_raw_ev_end) : + decode_events_buffer(multi_word_raw_ev_begin, multi_word_raw_ev_end); + incomplete_multiword_raw_event_.clear(); + } else { + // Not enough events in the inputs to complete the missing multiword event. All input data were + // processed without any actual decoding. We can return safely. + return; + } + } + + raw_events_missing_count_ = is_time_shifting_enabled() ? decode_events_buffer(cur_raw_ev, raw_ev_end) : + decode_events_buffer(cur_raw_ev, raw_ev_end); + incomplete_multiword_raw_event_.insert(incomplete_multiword_raw_event_.end(), cur_raw_ev, raw_ev_end); + } + + template + uint32_t decode_events_buffer(const RawEvent *&cur_raw_ev, const RawEvent *const raw_ev_end) { + auto &cd_forwarder = cd_event_forwarder(); + auto &trigger_forwarder = trigger_event_forwarder(); + for (; cur_raw_ev != raw_ev_end;) { + const uint16_t type = cur_raw_ev->type; + if (type == static_cast(EventTypesEnum::EVT_ADDR_X)) { + if (is_valid) { + const Evt3Raw::Event_PosX *ev_posx = reinterpret_cast(cur_raw_ev); + cd_forwarder.forward(static_cast(ev_posx->x), + state[(int)EventTypesEnum::EVT_ADDR_Y], static_cast(ev_posx->pol), + last_timestamp()); + } + ++cur_raw_ev; + + } else if (type == static_cast(EventTypesEnum::VECT_12)) { + constexpr uint32_t vect12_size = sizeof(Evt3Raw::Event_Vect12_12_8) / sizeof(RawEvent); + if (cur_raw_ev + vect12_size > raw_ev_end) { + // Not enough raw data to decode the vect12_12_8 events. Stop decoding this buffer and return the + // amount of data missing to wait for to be able to decode on the next call + return std::distance(raw_ev_end, cur_raw_ev + vect12_size); + } + if (!is_valid) { + cur_raw_ev += vect12_size; + continue; + } + + cd_forwarder.reserve(32); + + const Evt3Raw::Event_Vect12_12_8 *ev_vect12_12_8 = + reinterpret_cast(cur_raw_ev); + + Evt3Raw::Mask m; + m.m.valid1 = ev_vect12_12_8->valid1; + m.m.valid2 = ev_vect12_12_8->valid2; + m.m.valid3 = ev_vect12_12_8->valid3; + + uint32_t valid = m.valid; + + uint16_t last_x = state[(int)EventTypesEnum::VECT_BASE_X] & NOT_POLARITY_MASK; + uint16_t nb_bits = 32; +#if defined(__x86_64__) || defined(__aarch64__) + uint16_t off = 0; + while (valid) { + off = __builtin_ctz(valid); + valid &= ~(1 << off); + cd_forwarder.forward_unsafe(last_x + off, state[(int)EventTypesEnum::EVT_ADDR_Y], + (bool)(state[(int)EventTypesEnum::VECT_BASE_X] & POLARITY_MASK), + last_timestamp()); + } +#else + uint16_t end = last_x + nb_bits; + for (uint16_t i = last_x; i != end; ++i) { + if (valid & 0x1) { + cd_forwarder.forward_unsafe(i, state[(int)EventTypesEnum::EVT_ADDR_Y], + (bool)(state[(int)EventTypesEnum::VECT_BASE_X] & POLARITY_MASK), + last_timestamp()); + } + valid >>= 1; + } +#endif + state[(int)EventTypesEnum::VECT_BASE_X] += nb_bits; + cur_raw_ev += vect12_size; + + } else if (type == static_cast(EventTypesEnum::EVT_TIME_HIGH)) { + const Evt3Raw::Event_Time *ev_timehigh = reinterpret_cast(cur_raw_ev); + static constexpr timestamp max_timestamp_ = 1ULL << 11; + last_timestamp_.bitfield_time.loop += + (bool)(last_timestamp_.bitfield_time.high >= max_timestamp_ + ev_timehigh->time); + last_timestamp_.bitfield_time.low = + (last_timestamp_.bitfield_time.high == ev_timehigh->time ? + last_timestamp_.bitfield_time.low : + 0); // avoid momentary time discrepancies when decoding event per events. Time low comes + // right after to correct the value (note that the timestamp here is not good if we don't + // do that either) + last_timestamp_.bitfield_time.high = ev_timehigh->time; + ++cur_raw_ev; + } else if (type == static_cast(EventTypesEnum::EXT_TRIGGER)) { + const Evt3Raw::Event_ExtTrigger *ev_exttrigger = + reinterpret_cast(cur_raw_ev); + trigger_forwarder.forward(static_cast(ev_exttrigger->pol), last_timestamp(), + static_cast(ev_exttrigger->id)); + ++cur_raw_ev; + } else { + // The objective is to reduce the number of possible cases + // The content of each type is store into a state because the encoding is stateful + state[type] = cur_raw_ev->content; + // Here the type of event is saved (CD vs EM) to know when a EVT_ADDR_X or VECT_BASE_X arrives + // if the event is a CD or EM + is_cd = type >= 2 ? is_cd : !(bool)type; + // Some event outside of the sensor may occur, to limit the number of test the check is done + // every EVT_ADDR_Y + is_valid = is_cd && state[(int)EventTypesEnum::EVT_ADDR_Y] < height_; + + last_timestamp_.bitfield_time.low = + type != static_cast(EventTypesEnum::EVT_TIME_LOW) ? + last_timestamp_.bitfield_time.low : + state[static_cast(EventTypesEnum::EVT_TIME_LOW)]; + last_timestamp_set_ = true; + + ++cur_raw_ev; + } + } + + // All raw events have been fully decoded: no data missing to decode a full event + return 0; + } + + bool reset_timestamp_impl(const timestamp &t) override { + if (is_time_shifting_enabled() && !timestamp_shift_set_) { + return false; + } + if (t >= 0) { + static constexpr timestamp max_timestamp = 0xFFFFFF; + const auto shifted_time = t + (is_time_shifting_enabled() ? timestamp_shift_ : 0); + last_timestamp_.bitfield_time.high = (shifted_time & 0xFFF000) >> NumBitsInTimestampLSB; + last_timestamp_.bitfield_time.low = shifted_time & 0xFFF; + last_timestamp_.bitfield_time.loop = shifted_time / max_timestamp; + base_time_set_ = true; + last_timestamp_set_ = true; + return true; + } + return false; + } + + bool reset_timestamp_shift_impl(const timestamp &shift) override { + if (shift >= 0 && is_time_shifting_enabled()) { + timestamp_shift_ = shift; + timestamp_shift_set_ = true; + return true; + } + return false; + } + + constexpr static int SIZE_EVTYPE = 16; + constexpr static uint16_t NumBitsInTimestampLSB = 12; + constexpr static uint16_t NumBitsInHighTimestampLSB = 12; + constexpr static uint16_t POLARITY_MASK = 1 << (NumBitsInTimestampLSB - 1); + constexpr static uint16_t NOT_POLARITY_MASK = ~(1 << (NumBitsInTimestampLSB - 1)); + uint32_t state[SIZE_EVTYPE]; + bool is_valid = false; + bool is_cd = false; + struct bitfield_timestamp { + uint64_t low : NumBitsInTimestampLSB; + uint64_t high : NumBitsInHighTimestampLSB; + uint64_t loop : 64 - NumBitsInHighTimestampLSB - NumBitsInTimestampLSB; + }; + struct evt3_timestamp { + union { + bitfield_timestamp bitfield_time; + uint64_t time; + }; + }; + evt3_timestamp last_timestamp_ = {0}; + + bool timestamp_shift_set_ = false; + bool base_time_set_ = false; + bool last_timestamp_set_ = false; + timestamp timestamp_shift_ = 0; + uint32_t height_ = 65536; + std::vector incomplete_multiword_raw_event_; + std::ptrdiff_t raw_events_missing_count_{0}; +}; + +} // namespace Future +} // namespace Metavision + +#endif /* METAVISION_HAL_FUTURE_EVT3_DECODER_H */ diff --git a/hal_psee_plugins/include/devices/common/ccam3_system_control.h b/hal_psee_plugins/include/devices/common/ccam3_system_control.h new file mode 100644 index 000000000..ee6f70500 --- /dev/null +++ b/hal_psee_plugins/include/devices/common/ccam3_system_control.h @@ -0,0 +1,31 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_CCAM3_SYSTEM_CONTROL_H +#define METAVISION_HAL_CCAM3_SYSTEM_CONTROL_H + +#include "devices/common/system_control.h" + +namespace Metavision { + +class CCam3SystemControl : public SystemControl { +public: + CCam3SystemControl(const std::shared_ptr ®map, const std::string &prefix); + void imu_control(bool enable); + +private: + std::string prefix_; + std::shared_ptr register_map_; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_CCAM3_SYSTEM_CONTROL_H diff --git a/hal_openeb_plugins/src/plugin/hal_raw_plugin.cpp b/hal_psee_plugins/include/devices/common/ccam_monitoring.h similarity index 68% rename from hal_openeb_plugins/src/plugin/hal_raw_plugin.cpp rename to hal_psee_plugins/include/devices/common/ccam_monitoring.h index 26f414091..eaf18404a 100644 --- a/hal_openeb_plugins/src/plugin/hal_raw_plugin.cpp +++ b/hal_psee_plugins/include/devices/common/ccam_monitoring.h @@ -9,25 +9,30 @@ * See the License for the specific language governing permissions and limitations under the License. * **********************************************************************************************************************/ +#ifndef METAVISION_HAL_CCAM_MONITORING_H +#define METAVISION_HAL_CCAM_MONITORING_H + #include -#include -#include -#include -#include "common/raw_constants.h" -#include "common/raw_file_discovery.h" +#include "facilities/psee_monitoring.h" namespace Metavision { -extern "C" { -void initialize_plugin(void *plugin_ptr) { - Metavision::Plugin &plugin = Metavision::plugin_cast(plugin_ptr); +class I_HW_Register; + +class CCamMonitoring : public PseeMonitoring { +public: + CCamMonitoring(const std::shared_ptr &i_hw_register, const std::string &fpga_prefix, + const std::string &sensor_prefix); - plugin.set_plugin_info(Metavision::get_hal_software_info()); - plugin.set_hal_info(Metavision::get_hal_software_info()); - plugin.set_integrator_name(raw_default_integrator); + virtual int get_temperature() override; + virtual int get_illumination() override; + +private: + std::string fpga_prefix_; + std::string sensor_prefix_; +}; - plugin.add_file_discovery(std::make_unique()); -} -} } // namespace Metavision + +#endif // METAVISION_HAL_CCAM_MONITORING_H diff --git a/hal_psee_plugins/include/devices/common/ccam_trigger_event.h b/hal_psee_plugins/include/devices/common/ccam_trigger_event.h new file mode 100644 index 000000000..ca1635901 --- /dev/null +++ b/hal_psee_plugins/include/devices/common/ccam_trigger_event.h @@ -0,0 +1,57 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_CCAM_TRIGGER_EVENT_H +#define METAVISION_HAL_CCAM_TRIGGER_EVENT_H + +#include +#include +#include + +#include "facilities/psee_trigger_in.h" + +namespace Metavision { + +class RegisterMap; +class PseeDeviceControl; + +class CCamTriggerEvent : public PseeTriggerIn { +public: + /// @brief Constructor + CCamTriggerEvent(const std::shared_ptr ®ister_map, + const std::shared_ptr &device_control, const std::string &prefix); + + enum class Channels { TRIG_IN = 1, TRIG_OUT = 6, AUX_TRIG_IN = 7 }; + + /// @brief Enables external trigger monitoring + /// @param channel External trigger's channel + bool enable(uint32_t channel); + + /// @brief Disables external trigger monitoring + /// @param channel External trigger's channel + bool disable(uint32_t channel); + + /// @brief Checks if trigger in index is enabled + /// @param channel External trigger's channel + /// @return true if trigger in index is enabled, False otherwise + bool is_enabled(uint32_t channel); + +private: + bool is_valid_id(uint32_t channel); + + std::shared_ptr register_map_; + std::string prefix_; + const std::vector chan_ids_{Channels::TRIG_IN, Channels::TRIG_OUT, Channels::AUX_TRIG_IN}; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_CCAM_TRIGGER_EVENT_H diff --git a/hal_psee_plugins/include/devices/common/ccam_trigger_out.h b/hal_psee_plugins/include/devices/common/ccam_trigger_out.h new file mode 100644 index 000000000..08e600d73 --- /dev/null +++ b/hal_psee_plugins/include/devices/common/ccam_trigger_out.h @@ -0,0 +1,42 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_CCAM_TRIGGER_OUT_H +#define METAVISION_HAL_CCAM_TRIGGER_OUT_H + +#include +#include "facilities/psee_trigger_out.h" + +namespace Metavision { + +class PseeDeviceControl; +class RegisterMap; + +class CCamTriggerOut : public PseeTriggerOut { +public: + CCamTriggerOut(const std::shared_ptr ®map, const std::shared_ptr &device_control, + const std::string &prefix); + + bool enable() override final; + void disable() override final; + void set_period(uint32_t period_us) override final; + void set_duty_cycle(double period_ratio) override final; + bool is_enabled() override final; + +private: + double period_ratio_ = 0.5; + std::shared_ptr register_map_; + std::string prefix_; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_CCAM_TRIGGER_OUT_H diff --git a/hal_psee_plugins/include/devices/common/evk2_system_control.h b/hal_psee_plugins/include/devices/common/evk2_system_control.h new file mode 100644 index 000000000..0d0dbab3f --- /dev/null +++ b/hal_psee_plugins/include/devices/common/evk2_system_control.h @@ -0,0 +1,57 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_EVK2_SYSTEM_CONTROL_H +#define METAVISION_HAL_EVK2_SYSTEM_CONTROL_H + +#include +#include + +namespace Metavision { + +class RegisterMap; + +class Evk2SystemControl { +public: + Evk2SystemControl(const std::shared_ptr ®map, const std::string &prefix); + + bool apply_resets(); + void set_evt_format(uint32_t fmt); + void clk_control(bool enable); + void time_base_config(bool ext_sync, bool master, bool master_sel, bool fwd_up, bool fwd_down); + void time_base_control(bool enable); + void merge_config(bool bypass, int source); + void merge_control(bool enable); + void th_recovery_config(bool bypass); + void th_recovery_control(bool enable); + void out_th_recovery_config(bool bypass); + void out_th_recovery_control(bool enable); + void data_formatter_config(bool bypass); + void data_formatter_control(bool enable); + void set_mode(int mode); + void monitoring_merge_config(bool bypass, int source); + void monitoring_merge_control(bool enable); + void ts_checker_config(bool bypass); + void sync_out_pin_config(bool trig_out_override); + bool sync_out_pin_control(bool enable); + bool get_sync_out_pin_fault_alert(); + bool is_trigger_out_enabled(); + +private: + std::shared_ptr register_map_; + std::string sys_ctrl_regbank_; + std::string sys_mon_regbank_; + std::string ps_host_if_regbank_; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_EVK2_SYSTEM_CONTROL_H diff --git a/hal_psee_plugins/include/devices/common/evk2_tz_trigger_event.h b/hal_psee_plugins/include/devices/common/evk2_tz_trigger_event.h new file mode 100644 index 000000000..f6349c7d6 --- /dev/null +++ b/hal_psee_plugins/include/devices/common/evk2_tz_trigger_event.h @@ -0,0 +1,58 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_EVK2_TRIGGER_EVENT_H +#define METAVISION_HAL_EVK2_TRIGGER_EVENT_H + +#include +#include +#include + +#include "metavision/hal/facilities/i_trigger_in.h" + +namespace Metavision { + +class RegisterMap; +class TzDevice; + +class Evk2TzTriggerEvent : public I_TriggerIn { +public: + /// @brief Constructor + Evk2TzTriggerEvent(const std::shared_ptr ®ister_map, const std::string &prefix, + const std::shared_ptr tzDev); + + enum class Channels { TRIG_IN = 1, TRIG_OUT = 3 }; + + /// @brief Enables external trigger monitoring + /// @param channel External trigger's channel + bool enable(uint32_t channel); + + /// @brief Disables external trigger monitoring + /// @param channel External trigger's channel + bool disable(uint32_t channel); + + /// @brief Checks if trigger in index is enabled + /// @param channel External trigger's channel + /// @return true if trigger in index is enabled, False otherwise + bool is_enabled(uint32_t channel); + +private: + bool is_valid_id(uint32_t channel); + + std::shared_ptr register_map_; + std::shared_ptr tzDev_; + std::string prefix_; + const std::vector chan_ids_{Channels::TRIG_IN, Channels::TRIG_OUT}; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_EVK2_TRIGGER_EVENT_H diff --git a/hal_psee_plugins/include/devices/common/evk2_tz_trigger_out.h b/hal_psee_plugins/include/devices/common/evk2_tz_trigger_out.h new file mode 100644 index 000000000..f873974fc --- /dev/null +++ b/hal_psee_plugins/include/devices/common/evk2_tz_trigger_out.h @@ -0,0 +1,45 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_EVK2_TZ_TRIGGER_OUT_H +#define METAVISION_HAL_EVK2_TZ_TRIGGER_OUT_H + +#include +#include "metavision/hal/facilities/i_trigger_out.h" + +namespace Metavision { + +class TzPseeVideo; +class RegisterMap; + +class Evk2TzTriggerOut : public I_TriggerOut { +public: + Evk2TzTriggerOut(const std::shared_ptr ®map, const std::string &prefix, + const std::shared_ptr tzDev); + + ~Evk2TzTriggerOut(); + + bool enable() override final; + void disable() override final; + void set_period(uint32_t period_us) override final; + void set_duty_cycle(double period_ratio) override final; + bool is_enabled() override final; + +private: + double period_ratio_ = 0.5; + std::shared_ptr register_map_; + std::string prefix_; + std::shared_ptr tz_dev_; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_EVK2_TZ_TRIGGER_OUT_H diff --git a/hal_psee_plugins/include/devices/common/issd.h b/hal_psee_plugins/include/devices/common/issd.h new file mode 100644 index 000000000..e9a6edd39 --- /dev/null +++ b/hal_psee_plugins/include/devices/common/issd.h @@ -0,0 +1,97 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +// Data classes generated by psee_issd_convert. +// Parameters: +// issd_csv_format_version=1.0 +// date=2021-09-06T19:34:45 +// psee_issd_version=1.1.3.215+g40ab73918 +// psee_sensor_lib_version=3.3.0.486+g1106e0921.d20210015 +// issd_data_format_version=1.0 + +#ifndef METAVISION_HAL_ISSD_H +#define METAVISION_HAL_ISSD_H + +#include + +namespace Metavision { + +enum class RegisterAction { N_A, READ, WRITE, WRITE_FIELD, DELAY }; + +class RegisterOperation { +public: + RegisterAction action = RegisterAction::N_A; + uint32_t address; + uint32_t data; + uint32_t mask; + uint32_t usec; + + static RegisterOperation Write(uint32_t address, uint32_t data) { + RegisterOperation op = RegisterOperation(); + op.action = RegisterAction::WRITE; + op.address = address; + op.data = data; + + return op; + } + + static RegisterOperation WriteField(uint32_t address, uint32_t data, uint32_t mask) { + RegisterOperation op = RegisterOperation(); + op.action = RegisterAction::WRITE_FIELD; + op.address = address; + op.data = data; + op.mask = mask; + + return op; + } + + static RegisterOperation Delay(uint32_t usec) { + RegisterOperation op = RegisterOperation(); + + op.action = RegisterAction::DELAY; + op.usec = usec; + + return op; + } + + static RegisterOperation Read(uint32_t address, uint32_t data, uint32_t mask) { + RegisterOperation op = RegisterOperation(); + + op.action = RegisterAction::READ; + op.address = address; + op.data = data; + op.mask = mask; + + return op; + } + + static RegisterOperation Read(uint32_t address, uint32_t data) { + RegisterOperation op = RegisterOperation(); + + op.action = RegisterAction::READ; + op.address = address; + op.data = data; + op.mask = 0xFFFFFFFF; + + return op; + } +}; + +struct Issd { + const std::vector init; + const std::vector start; + const std::vector stop; + const std::vector destroy; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_ISSD_H \ No newline at end of file diff --git a/hal_psee_plugins/include/devices/common/system_control.h b/hal_psee_plugins/include/devices/common/system_control.h new file mode 100644 index 000000000..d45e4ba90 --- /dev/null +++ b/hal_psee_plugins/include/devices/common/system_control.h @@ -0,0 +1,51 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_SYSTEM_CONTROL_H +#define METAVISION_HAL_SYSTEM_CONTROL_H + +#include +#include + +namespace Metavision { + +class RegisterMap; + +class SystemControl { +public: + SystemControl(const std::shared_ptr ®map, const std::string &prefix); + ~SystemControl(); + bool apply_resets(); + void set_evt_format(uint32_t fmt); + void clk_control(bool enable); + void host_if_control(bool enable); + void time_base_config(bool ext_sync, bool master, bool master_sel, bool fwd_up, bool fwd_down); + void time_base_control(bool enable); + void merge_config(bool bypass, int source); + void merge_control(bool enable); + void th_recovery_config(bool bypass); + void th_recovery_control(bool enable); + void data_formatter_config(bool bypass); + void data_formatter_control(bool enable); + void set_mode(int mode); + void sync_out_pin_control(bool trig_out_override); + void oob_filter_control(bool enable); + void oob_filter_origin(int x, int y); + void oob_filter_size(int width, int height); + +private: + std::string prefix_; + std::shared_ptr register_map_; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_SYSTEM_CONTROL_H diff --git a/hal_psee_plugins/include/devices/gen3/gen3_device_control.h b/hal_psee_plugins/include/devices/gen3/gen3_device_control.h new file mode 100644 index 000000000..ce494ffb1 --- /dev/null +++ b/hal_psee_plugins/include/devices/gen3/gen3_device_control.h @@ -0,0 +1,98 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_GEN3_DEVICE_CONTROL_H +#define METAVISION_HAL_GEN3_DEVICE_CONTROL_H + +#include "facilities/psee_device_control.h" + +struct libusb_device_handle; + +namespace Metavision { + +class PseeLibUSBBoardCommand; + +class Gen3DeviceControl : public PseeDeviceControl { +public: + Gen3DeviceControl(const std::shared_ptr &board_cmd); + + virtual void reset() override; + + /// get the type of sensor + /// 0x90100402h uniform TD feedback PPD VGA + /// 0x90100403h uniform EM HVGA + long long get_sensor_id() override; + static long long get_sensor_id(PseeLibUSBBoardCommand &board_cmd); + + bool is_gen3EM(); + virtual bool set_mode_standalone_impl() override; + virtual bool set_mode_master_impl() override; + virtual bool set_mode_slave_impl() override; + + static bool is_gen3EM(PseeLibUSBBoardCommand &board_cmd); + static bool is_gen3EM(long sensor_id); + + void low_consumption_startup_post_biases_initialize(); + +protected: + uint32_t get_base_address(); + void set_mode_run_slave(); + + void start_camera_common_0(bool is_gen3EM); + void start_camera_common_1(bool is_gen3EM); + void stop_camera_common(); + void destroy_camera(); + void initialize_common_0(); + void initialize_common_1(); + virtual void reset_ts_internal(); + virtual void set_mode_init(); + + std::shared_ptr icmd_; + +private: + uint32_t base_address_; + uint32_t base_sensor_address_; + + void enable_LDO0_VDDA(bool enable); + void enable_LDO1_VDDC(bool enable); + void enable_LDO2_VDDD(bool enable); + + void set_CTRL_SW_bit(bool enable); + void set_CTRL_BGEN_bit(bool enable); + void set_CTRL_BGEN_RSTN_bit(bool enable); + void enable_SW_CTRL_BGEN_RSTN(bool enable); + void enable_stereo_merge_module(bool state); + void enable_fx3_interface(bool state); + void enable_spare_control(bool state); + + void enable_roi_EM(bool state); + void enable_roi_TD(bool state); + void disable_roi_reset(bool state); + + void enable_readout(bool state); + void enable_master_reset(bool state); + void enable_hvga_bypass(bool state); + void enable_oob_filter(bool state); + void set_oob_filter_bounds(int width, int height); + + void enable_test_bus(); + void enable_ctrl_sync(); + + // reset_ts calls SOFT RESET and should flush the fifo after that + // as it is not done we transform the reset_ts so it does nothing + // and use reset_ts_internal() instead in initialize (when the camdevice is created and camera is not streaming yet + + virtual void enable_interface(bool state) = 0; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_GEN3_DEVICE_CONTROL_H diff --git a/hal_psee_plugins/include/devices/gen3/gen3_fx3_device_control.h b/hal_psee_plugins/include/devices/gen3/gen3_fx3_device_control.h new file mode 100644 index 000000000..875ada733 --- /dev/null +++ b/hal_psee_plugins/include/devices/gen3/gen3_fx3_device_control.h @@ -0,0 +1,39 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_GEN3_FX3_DEVICE_CONTROL_H +#define METAVISION_HAL_GEN3_FX3_DEVICE_CONTROL_H + +#include "devices/gen3/gen3_device_control.h" +#include "devices/utils/evt_format.h" + +namespace Metavision { + +class Gen3Fx3DeviceControl : public Gen3DeviceControl { +public: + Gen3Fx3DeviceControl(const std::shared_ptr &board_cmd); + +protected: + virtual void enable_interface(bool state) override; + virtual void reset_ts_internal() override; + + virtual void initialize() override; + virtual void destroy() override; + +private: + virtual bool set_evt_format_impl(EvtFormat fmt) override; + virtual void start_impl() override; + virtual void stop_impl() override; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_GEN3_FX3_DEVICE_CONTROL_H diff --git a/hal_psee_plugins/include/devices/gen3/gen3_fx3_facilities_builder.h b/hal_psee_plugins/include/devices/gen3/gen3_fx3_facilities_builder.h new file mode 100644 index 000000000..6fc32c861 --- /dev/null +++ b/hal_psee_plugins/include/devices/gen3/gen3_fx3_facilities_builder.h @@ -0,0 +1,25 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_GEN3_FX3_FACILITIES_BUILDER_H +#define METAVISION_HAL_GEN3_FX3_FACILITIES_BUILDER_H + +namespace Metavision { + +class DeviceBuilder; +class DeviceBuilderParameters; +class DeviceConfig; +bool build_gen3_fx3_device(DeviceBuilder &device_builder, const DeviceBuilderParameters &device_builder_params, + const DeviceConfig &device_config); + +} // namespace Metavision + +#endif // METAVISION_HAL_GEN3_FX3_FACILITIES_BUILDER_H \ No newline at end of file diff --git a/sdk/modules/base/cpp/include/metavision/sdk/base/events/event_em.h b/hal_psee_plugins/include/devices/gen3/gen3_ll_biases.h similarity index 66% rename from sdk/modules/base/cpp/include/metavision/sdk/base/events/event_em.h rename to hal_psee_plugins/include/devices/gen3/gen3_ll_biases.h index e1fe423a7..c68fa88fc 100644 --- a/sdk/modules/base/cpp/include/metavision/sdk/base/events/event_em.h +++ b/hal_psee_plugins/include/devices/gen3/gen3_ll_biases.h @@ -9,28 +9,29 @@ * See the License for the specific language governing permissions and limitations under the License. * **********************************************************************************************************************/ -#ifndef METAVISION_SDK_BASE_EVENT_EM_H -#define METAVISION_SDK_BASE_EVENT_EM_H +#ifndef METAVISION_HAL_GEN3_LL_BIASES_H +#define METAVISION_HAL_GEN3_LL_BIASES_H -// Metavision SDK Base Event2d -#include "metavision/sdk/base/events/event2d.h" +#include "metavision/hal/facilities/i_ll_biases.h" namespace Metavision { -/// @brief Class representing basic 2D EM (Exposure Measurement) events -/// @note This class is deprecated since version 2.1.0 and will be removed in next releases -class EventEM : public Event2d { +class PseeLibUSBBoardCommand; + +class Gen3_LL_Biases : public I_LL_Biases { public: - /// @brief Default constructor - EventEM() = default; + Gen3_LL_Biases(const std::shared_ptr &board_cmd); + ~Gen3_LL_Biases() override; + + virtual bool set(const std::string &bias_name, int bias_value) override; + virtual int get(const std::string &bias_name) override; + virtual std::map get_all_biases() override; - /// @brief Constructor from Event2d - inline EventEM(const Event2d &ev) : Event2d(ev) {} - using Event2d::Event2d; +private: + struct Private; + std::unique_ptr pimpl_; }; } // namespace Metavision -METAVISION_DEFINE_EVENT_TRAIT(Metavision::EventEM, 13, "EM") - -#endif // METAVISION_SDK_BASE_EVENT_EM_H +#endif // METAVISION_HAL_GEN3_LL_BIASES_H diff --git a/hal_psee_plugins/include/devices/gen3/gen3_pattern_generator.h b/hal_psee_plugins/include/devices/gen3/gen3_pattern_generator.h new file mode 100644 index 000000000..cbc86a169 --- /dev/null +++ b/hal_psee_plugins/include/devices/gen3/gen3_pattern_generator.h @@ -0,0 +1,46 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_GEN3_PATTERN_GENERATOR_H +#define METAVISION_HAL_GEN3_PATTERN_GENERATOR_H + +#include + +#include "utils/psee_pattern_generator.h" + +namespace Metavision { + +class PseeLibUSBBoardCommand; + +class Gen3PatternGenerator : public PseePatternGenerator { +public: + Gen3PatternGenerator(const std::shared_ptr &board_cmd); + ~Gen3PatternGenerator(); + + bool enable(const PseePatternGenerator::Configuration &configuration) override final; + void disable() override final; + bool is_enabled() override final; + void get_pattern_geometry(int &width, int &height) const override final; + + void set_period_step_count(uint16_t n_step_count, uint16_t p_step_count) override final; + void set_period_rate(uint8_t n_rate_Mev_s, uint8_t p_rate_Mev_s) override final; + +public: + static constexpr int PATTERN_GENERATOR_WIDTH = 1024; + static constexpr int PATTERN_GENERATOR_HEIGHT = 512; + +private: + std::shared_ptr board_command_; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_GEN3_PATTERN_GENERATOR_H diff --git a/hal_psee_plugins/include/devices/gen3/gen3_pattern_generator_checker.h b/hal_psee_plugins/include/devices/gen3/gen3_pattern_generator_checker.h new file mode 100644 index 000000000..a6cc3c940 --- /dev/null +++ b/hal_psee_plugins/include/devices/gen3/gen3_pattern_generator_checker.h @@ -0,0 +1,29 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_GEN3_PATTERN_GENERATOR_CHECKER_H +#define METAVISION_HAL_GEN3_PATTERN_GENERATOR_CHECKER_H + +#include "utils/psee_pattern_generator_checker.h" + +namespace Metavision { + +class Gen3PatternChecker; + +class Gen3PatternGeneratorChecker : public PseePatternGeneratorChecker { +public: + PseePatternGeneratorChecker::PatternChecker * + build_pattern_checker(const PseePatternGenerator::Configuration &configuration) const override final; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_GEN3_PATTERN_GENERATOR_CHECKER_H diff --git a/hal_psee_plugins/include/devices/gen3/gen3_roi_command.h b/hal_psee_plugins/include/devices/gen3/gen3_roi_command.h new file mode 100644 index 000000000..8730abbbd --- /dev/null +++ b/hal_psee_plugins/include/devices/gen3/gen3_roi_command.h @@ -0,0 +1,42 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_GEN3_ROI_COMMAND_H +#define METAVISION_HAL_GEN3_ROI_COMMAND_H + +#include +#include + +#include "facilities/psee_roi.h" + +namespace Metavision { + +class PseeLibUSBBoardCommand; + +class Gen3ROICommand : public PseeROI { +public: + Gen3ROICommand(int width, int height, const std::shared_ptr &board_cmd); + + virtual void enable(bool state) override; + virtual void write_ROI(const std::vector &vroiparams) override; + +private: + void reset_to_full_roi(); + +private: + std::shared_ptr icmd_; + uint32_t base_sensor_address_; + std::vector roi_save_; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_GEN3_ROI_COMMAND_H diff --git a/hal_psee_plugins/include/devices/gen3/gen3_trigger_event.h b/hal_psee_plugins/include/devices/gen3/gen3_trigger_event.h new file mode 100644 index 000000000..6455c99d2 --- /dev/null +++ b/hal_psee_plugins/include/devices/gen3/gen3_trigger_event.h @@ -0,0 +1,55 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_GEN3_TRIGGER_EVENT_H +#define METAVISION_HAL_GEN3_TRIGGER_EVENT_H + +#include + +#include "facilities/psee_trigger_in.h" + +namespace Metavision { + +class PseeDeviceControl; +class PseeLibUSBBoardCommand; + +class Gen3TriggerEvent : public PseeTriggerIn { +public: + /// @brief Constructor + Gen3TriggerEvent(const std::shared_ptr &board_cmd, + const std::shared_ptr &device_control); + + /// @brief Enables external trigger monitoring + /// + /// Available channels: + /// 0: main trigger in + /// 6: loopback trigger out (Test purpose) + /// 7: Auxiliary trigger in + /// @param channel External trigger's channel + virtual bool enable(uint32_t channel) override; + + /// @brief Disables external trigger monitoring + /// @param channel External trigger's channel + virtual bool disable(uint32_t channel) override; + + /// @brief Checks if trigger in index is enabled + /// @param channel External trigger's channel + /// @return true if trigger in index is enabled, False otherwise + virtual bool is_enabled(uint32_t channel) override; + +private: + std::shared_ptr icmd_; + uint32_t base_address_; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_GEN3_TRIGGER_EVENT_H diff --git a/hal_psee_plugins/include/devices/gen3/gen3_trigger_out.h b/hal_psee_plugins/include/devices/gen3/gen3_trigger_out.h new file mode 100644 index 000000000..d17631548 --- /dev/null +++ b/hal_psee_plugins/include/devices/gen3/gen3_trigger_out.h @@ -0,0 +1,39 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_GEN3_TRIGGER_OUT_H +#define METAVISION_HAL_GEN3_TRIGGER_OUT_H + +#include "facilities/psee_trigger_out.h" + +namespace Metavision { + +class PseeLibUSBBoardCommand; + +class Gen3TriggerOut : public PseeTriggerOut { +public: + Gen3TriggerOut(const std::shared_ptr &board_cmd, + const std::shared_ptr &device_control); + + bool enable() override final; + void disable() override final; + void set_period(uint32_t period_us) override final; + void set_duty_cycle(double period_ratio) override final; + bool is_enabled() override final; + +private: + double period_ratio_ = 0.5; + std::shared_ptr board_command_; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_GEN3_TRIGGER_OUT_H diff --git a/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/atis_if_monitor_register_map.h b/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/atis_if_monitor_register_map.h new file mode 100644 index 000000000..adedd50df --- /dev/null +++ b/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/atis_if_monitor_register_map.h @@ -0,0 +1,72 @@ +/********************************************************************************************** + * WARNING: THIS FILE HAS BEEN GENERATED BY REG_MAP_MANAGER TOOLS PLEASE DO NOT MODIFY IT * + ********************************************************************************************** + * File: atis_if_monitor_register_map.h * + * * + * Copyright (c) 2015-2018 Prophesee. All rights reserved. * + * * + * Date: 08/10/2018 at 12h05m31s * + * Name: atis_if_monitor_register_map * + * Version: 1.0 * + * Hash: 455384fe9988338947b8d81d0f0bd84fae5dca9f37727c1282ee68931ba0a92f * + ********************************************************************************************** + * WARNING: THIS FILE HAS BEEN GENERATED BY REG_MAP_MANAGER TOOLS PLEASE DO NOT MODIFY IT * + *********************************************************************************************/ + +#ifndef METAVISION_HAL_ATIS_IF_MONITOR_REGISTER_MAP_H +#define METAVISION_HAL_ATIS_IF_MONITOR_REGISTER_MAP_H + +//------------------------------------------------------------------------------------------------------------ +// ATIS_IF_MONITOR +//------------------------------------------------------------------------------------------------------------ + +#define ATIS_IF_MONITOR_BASE_ADDR 0x00000000 +#define ATIS_IF_MONITOR_LAST_ADDR 0x0000000C +#define ATIS_IF_MONITOR_SIZE 0x00000020 + +#define ATIS_IF_MONITOR_CFG_ENABLE_ADDR \ + 0x00000000 // Controls the enable/disable of individual ATIS I/F Monitor's periodic events and alarms. +#define ATIS_IF_MONITOR_CFG_ENABLE_ALL_EVT_BIT_IDX 0 +#define ATIS_IF_MONITOR_CFG_ENABLE_ALL_EVT_WIDTH 1 +#define ATIS_IF_MONITOR_CFG_ENABLE_ALL_EVT_DEFAULT 0x00000000 +#define ATIS_IF_MONITOR_CFG_ENABLE_TD_IDLE_TIME_EVT_BIT_IDX 1 +#define ATIS_IF_MONITOR_CFG_ENABLE_TD_IDLE_TIME_EVT_WIDTH 1 +#define ATIS_IF_MONITOR_CFG_ENABLE_TD_IDLE_TIME_EVT_DEFAULT 0x00000000 +#define ATIS_IF_MONITOR_CFG_ENABLE_TD_IDLE_TIMEOUT_EVT_BIT_IDX 2 +#define ATIS_IF_MONITOR_CFG_ENABLE_TD_IDLE_TIMEOUT_EVT_WIDTH 1 +#define ATIS_IF_MONITOR_CFG_ENABLE_TD_IDLE_TIMEOUT_EVT_DEFAULT 0x00000000 +#define ATIS_IF_MONITOR_CFG_ENABLE_APS_IDLE_TIME_EVT_BIT_IDX 3 +#define ATIS_IF_MONITOR_CFG_ENABLE_APS_IDLE_TIME_EVT_WIDTH 1 +#define ATIS_IF_MONITOR_CFG_ENABLE_APS_IDLE_TIME_EVT_DEFAULT 0x00000000 +#define ATIS_IF_MONITOR_CFG_ENABLE_APS_IDLE_TIMEOUT_EVT_BIT_IDX 4 +#define ATIS_IF_MONITOR_CFG_ENABLE_APS_IDLE_TIMEOUT_EVT_WIDTH 1 +#define ATIS_IF_MONITOR_CFG_ENABLE_APS_IDLE_TIMEOUT_EVT_DEFAULT 0x00000000 +#define ATIS_IF_MONITOR_CFG_ENABLE_GLOBAL_ILLUMINATION_EVT_BIT_IDX 5 +#define ATIS_IF_MONITOR_CFG_ENABLE_GLOBAL_ILLUMINATION_EVT_WIDTH 1 +#define ATIS_IF_MONITOR_CFG_ENABLE_GLOBAL_ILLUMINATION_EVT_DEFAULT 0x00000000 + +#define ATIS_IF_MONITOR_CFG_IDLE_TIME_THR_ADDR \ + 0x00000004 // Sets the threshold time value in us after which {MASTER|SLAVE}_ATIS_{TD|APS}_IDLE_TIME events are + // sent. These events determine the amount of time between two consecutive events in the respective + // channel if such time is above the threshold. +#define ATIS_IF_MONITOR_CFG_IDLE_TIME_THR_VALUE_BIT_IDX 0 +#define ATIS_IF_MONITOR_CFG_IDLE_TIME_THR_VALUE_WIDTH 26 +#define ATIS_IF_MONITOR_CFG_IDLE_TIME_THR_VALUE_DEFAULT 0x00002710 + +#define ATIS_IF_MONITOR_CFG_IDLE_TIMEOUT_THR_ADDR \ + 0x00000008 // Sets the threshold time value in us after which {MASTER|SLAVE}_ATIS_{TD|APS}_IDLE_TIMEOUT events are + // sent. These events notify the host that the monitored channel has been inactive beyond this time + // threshold. +#define ATIS_IF_MONITOR_CFG_IDLE_TIMEOUT_THR_VALUE_BIT_IDX 0 +#define ATIS_IF_MONITOR_CFG_IDLE_TIMEOUT_THR_VALUE_WIDTH 26 +#define ATIS_IF_MONITOR_CFG_IDLE_TIMEOUT_THR_VALUE_DEFAULT 0x00002710 + +#define ATIS_IF_MONITOR_STAT_GLOBAL_ILLUMINATION_ADDR 0x0000000C +#define ATIS_IF_MONITOR_STAT_GLOBAL_ILLUMINATION_DATA_BIT_IDX 0 +#define ATIS_IF_MONITOR_STAT_GLOBAL_ILLUMINATION_DATA_WIDTH 26 +#define ATIS_IF_MONITOR_STAT_GLOBAL_ILLUMINATION_DATA_DEFAULT 0x00000000 +#define ATIS_IF_MONITOR_STAT_GLOBAL_ILLUMINATION_VALID_BIT_IDX 31 +#define ATIS_IF_MONITOR_STAT_GLOBAL_ILLUMINATION_VALID_WIDTH 1 +#define ATIS_IF_MONITOR_STAT_GLOBAL_ILLUMINATION_VALID_DEFAULT 0x00000000 + +#endif // METAVISION_HAL_ATIS_IF_MONITOR_REGISTER_MAP_H diff --git a/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/ccam2_system_monitor_trigger_ext_adc.h b/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/ccam2_system_monitor_trigger_ext_adc.h new file mode 100644 index 000000000..92ae62232 --- /dev/null +++ b/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/ccam2_system_monitor_trigger_ext_adc.h @@ -0,0 +1,494 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_CCAM2_SYSTEM_MONITOR_TRIGGER_EXT_ADC_H +#define METAVISION_HAL_CCAM2_SYSTEM_MONITOR_TRIGGER_EXT_ADC_H + +#include "temp_vcc_monitor_xadc_register_map.h" +#include "temp_vcc_monitor_register_map.h" +#include "atis_if_monitor_register_map.h" +#include "ext_trigger_monitor_register_map.h" + +//------------------------------------------------------------------------------------------------------------ +// CCAM2_SYSTEM_MONITOR +//------------------------------------------------------------------------------------------------------------ + +#define CCAM2_SYSTEM_MONITOR_BASE_ADDR 0x00000000 +#define CCAM2_SYSTEM_MONITOR_LAST_ADDR 0x0000016C +#define CCAM2_SYSTEM_MONITOR_SIZE 0x000001C0 + +//------------------------------------------------------------------------------------------------------------ +// CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC +//------------------------------------------------------------------------------------------------------------ + +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_BASE_ADDR 0x00000000 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_LAST_ADDR 0x000000BE +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_SIZE 0x00000100 + +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_TEMP_ADDR 0x00000000 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_TEMP_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_TEMP_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_TEMP_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VCC_INT_ADDR 0x00000002 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VCC_INT_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VCC_INT_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VCC_INT_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VCC_AUX_ADDR 0x00000004 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VCC_AUX_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VCC_AUX_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VCC_AUX_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VP_VN_ADDR 0x00000006 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VP_VN_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VP_VN_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VP_VN_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VREFP_ADDR 0x00000008 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VREFP_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VREFP_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VREFP_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VREFN_ADDR 0x0000000A +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VREFN_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VREFN_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VREFN_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VCC_BRAM_ADDR 0x0000000C +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VCC_BRAM_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VCC_BRAM_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VCC_BRAM_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_SUPPLY_OFFSET_ADDR 0x00000010 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_SUPPLY_OFFSET_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_SUPPLY_OFFSET_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_SUPPLY_OFFSET_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_OFFSET_ADDR 0x00000012 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_OFFSET_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_OFFSET_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_OFFSET_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_GAIN_ERROR_ADDR 0x00000014 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_GAIN_ERROR_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_GAIN_ERROR_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_GAIN_ERROR_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VAUX0_ADDR 0x00000020 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VAUX0_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VAUX0_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VAUX0_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VAUX1_ADDR 0x00000022 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VAUX1_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VAUX1_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VAUX1_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VAUX2_ADDR 0x00000024 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VAUX2_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VAUX2_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VAUX2_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VAUX3_ADDR 0x00000026 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VAUX3_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VAUX3_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VAUX3_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VAUX4_ADDR 0x00000028 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VAUX4_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VAUX4_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VAUX4_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VAUX5_ADDR 0x0000002A +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VAUX5_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VAUX5_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VAUX5_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VAUX6_ADDR 0x0000002C +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VAUX6_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VAUX6_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VAUX6_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VAUX7_ADDR 0x0000002E +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VAUX7_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VAUX7_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VAUX7_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VAUX8_ADDR 0x00000030 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VAUX8_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VAUX8_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VAUX8_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VAUX9_ADDR 0x00000032 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VAUX9_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VAUX9_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VAUX9_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VAUX10_ADDR 0x00000034 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VAUX10_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VAUX10_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VAUX10_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VAUX11_ADDR 0x00000036 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VAUX11_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VAUX11_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VAUX11_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VAUX12_ADDR 0x00000038 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VAUX12_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VAUX12_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VAUX12_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VAUX13_ADDR 0x0000003A +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VAUX13_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VAUX13_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VAUX13_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VAUX14_ADDR 0x0000003C +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VAUX14_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VAUX14_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VAUX14_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VAUX15_ADDR 0x0000003E +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VAUX15_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VAUX15_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_VAUX15_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_MAX_TEMP_ADDR 0x00000040 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_MAX_TEMP_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_MAX_TEMP_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_MAX_TEMP_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_MAX_VCC_INT_ADDR 0x00000042 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_MAX_VCC_INT_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_MAX_VCC_INT_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_MAX_VCC_INT_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_MAX_VCC_AUX_ADDR 0x00000044 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_MAX_VCC_AUX_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_MAX_VCC_AUX_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_MAX_VCC_AUX_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_MAX_VCC_BRAM_ADDR 0x00000046 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_MAX_VCC_BRAM_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_MAX_VCC_BRAM_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_MAX_VCC_BRAM_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_MIN_TEMP_ADDR 0x00000048 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_MIN_TEMP_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_MIN_TEMP_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_MIN_TEMP_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_MIN_VCC_INT_ADDR 0x0000004A +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_MIN_VCC_INT_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_MIN_VCC_INT_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_MIN_VCC_INT_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_MIN_VCC_AUX_ADDR 0x0000004C +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_MIN_VCC_AUX_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_MIN_VCC_AUX_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_MIN_VCC_AUX_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_MIN_VCC_BRAM_ADDR 0x0000004E +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_MIN_VCC_BRAM_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_MIN_VCC_BRAM_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_MIN_VCC_BRAM_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_FLAGS_ADDR 0x0000007E +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_FLAGS_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_FLAGS_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_FLAGS_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_CONF_REG0_ADDR 0x00000080 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_CONF_REG0_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_CONF_REG0_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_CONF_REG0_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_CONF_REG1_ADDR 0x00000082 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_CONF_REG1_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_CONF_REG1_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_CONF_REG1_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_CONF_REG2_ADDR 0x00000084 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_CONF_REG2_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_CONF_REG2_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_CONF_REG2_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_SEQ_REG0_ADDR 0x00000090 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_SEQ_REG0_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_SEQ_REG0_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_SEQ_REG0_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_SEQ_REG1_ADDR 0x00000092 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_SEQ_REG1_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_SEQ_REG1_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_SEQ_REG1_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_SEQ_REG2_ADDR 0x00000094 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_SEQ_REG2_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_SEQ_REG2_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_SEQ_REG2_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_SEQ_REG3_ADDR 0x00000096 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_SEQ_REG3_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_SEQ_REG3_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_SEQ_REG3_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_SEQ_REG4_ADDR 0x00000098 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_SEQ_REG4_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_SEQ_REG4_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_SEQ_REG4_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_SEQ_REG5_ADDR 0x0000009A +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_SEQ_REG5_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_SEQ_REG5_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_SEQ_REG5_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_SEQ_REG6_ADDR 0x0000009C +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_SEQ_REG6_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_SEQ_REG6_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_SEQ_REG6_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_SEQ_REG7_ADDR 0x0000009E +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_SEQ_REG7_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_SEQ_REG7_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_SEQ_REG7_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG0_ADDR 0x000000A0 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG0_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG0_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG0_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG1_ADDR 0x000000A2 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG1_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG1_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG1_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG2_ADDR 0x000000A4 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG2_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG2_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG2_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG3_ADDR 0x000000A6 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG3_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG3_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG3_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG4_ADDR 0x000000A8 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG4_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG4_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG4_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG5_ADDR 0x000000AA +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG5_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG5_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG5_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG6_ADDR 0x000000AC +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG6_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG6_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG6_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG7_ADDR 0x000000AE +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG7_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG7_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG7_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG8_ADDR 0x000000B0 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG8_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG8_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG8_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG9_ADDR 0x000000B2 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG9_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG9_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG9_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG10_ADDR 0x000000B4 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG10_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG10_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG10_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG11_ADDR 0x000000B6 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG11_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG11_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG11_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG12_ADDR 0x000000B8 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG12_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG12_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG12_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG13_ADDR 0x000000BA +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG13_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG13_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG13_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG14_ADDR 0x000000BC +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG14_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG14_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG14_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG15_ADDR 0x000000BE +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG15_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG15_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG15_VALUE_DEFAULT 0x00000000 + +//------------------------------------------------------------------------------------------------------------ +// CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR +//------------------------------------------------------------------------------------------------------------ + +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_BASE_ADDR 0x00000100 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_LAST_ADDR 0x0000010C +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_SIZE 0x00000020 + +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_EVT_ENABLE_ADDR 0x00000100 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_EVT_ENABLE_ALL_EVT_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_EVT_ENABLE_ALL_EVT_WIDTH 1 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_EVT_ENABLE_ALL_EVT_DEFAULT 0x00000000 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_EVT_ENABLE_TEMP_EVT_BIT_IDX 1 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_EVT_ENABLE_TEMP_EVT_WIDTH 1 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_EVT_ENABLE_TEMP_EVT_DEFAULT 0x00000000 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_EVT_ENABLE_VCC_INT_EVT_BIT_IDX 2 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_EVT_ENABLE_VCC_INT_EVT_WIDTH 1 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_EVT_ENABLE_VCC_INT_EVT_DEFAULT 0x00000000 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_EVT_ENABLE_VCC_AUX_EVT_BIT_IDX 3 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_EVT_ENABLE_VCC_AUX_EVT_WIDTH 1 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_EVT_ENABLE_VCC_AUX_EVT_DEFAULT 0x00000000 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_EVT_ENABLE_VCC_BRAM_EVT_BIT_IDX 4 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_EVT_ENABLE_VCC_BRAM_EVT_WIDTH 1 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_EVT_ENABLE_VCC_BRAM_EVT_DEFAULT 0x00000000 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_EVT_ENABLE_ALL_ALARM_BIT_IDX 8 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_EVT_ENABLE_ALL_ALARM_WIDTH 1 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_EVT_ENABLE_ALL_ALARM_DEFAULT 0x00000000 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_EVT_ENABLE_OVER_TEMP_ALARM_BIT_IDX 9 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_EVT_ENABLE_OVER_TEMP_ALARM_WIDTH 1 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_EVT_ENABLE_OVER_TEMP_ALARM_DEFAULT 0x00000000 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_EVT_ENABLE_USER_TEMP_ALARM_BIT_IDX 10 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_EVT_ENABLE_USER_TEMP_ALARM_WIDTH 1 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_EVT_ENABLE_USER_TEMP_ALARM_DEFAULT 0x00000000 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_EVT_ENABLE_VCC_INT_ALARM_BIT_IDX 11 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_EVT_ENABLE_VCC_INT_ALARM_WIDTH 1 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_EVT_ENABLE_VCC_INT_ALARM_DEFAULT 0x00000000 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_EVT_ENABLE_VCC_AUX_ALARM_BIT_IDX 12 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_EVT_ENABLE_VCC_AUX_ALARM_WIDTH 1 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_EVT_ENABLE_VCC_AUX_ALARM_DEFAULT 0x00000000 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_EVT_ENABLE_VCC_BRAM_ALARM_BIT_IDX 13 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_EVT_ENABLE_VCC_BRAM_ALARM_WIDTH 1 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_EVT_ENABLE_VCC_BRAM_ALARM_DEFAULT 0x00000000 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_EVT_ENABLE_SYSTEM_POWER_DOWN_BIT_IDX 16 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_EVT_ENABLE_SYSTEM_POWER_DOWN_WIDTH 1 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_EVT_ENABLE_SYSTEM_POWER_DOWN_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_EVT_PERIOD_ADDR 0x00000104 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_EVT_PERIOD_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_EVT_PERIOD_WIDTH 24 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_EVT_PERIOD_DEFAULT 0x000186A0 + +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_EXT_TEMP_CONTROL_ADDR 0x00000108 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_EXT_TEMP_CONTROL_STATUS_SYS_POWER_DOWN_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_EXT_TEMP_CONTROL_STATUS_SYS_POWER_DOWN_WIDTH 1 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_EXT_TEMP_CONTROL_STATUS_SYS_POWER_DOWN_DEFAULT 0x00000000 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_EXT_TEMP_CONTROL_EXT_TEMP_MONITOR_EN_BIT_IDX 1 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_EXT_TEMP_CONTROL_EXT_TEMP_MONITOR_EN_WIDTH 1 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_EXT_TEMP_CONTROL_EXT_TEMP_MONITOR_EN_DEFAULT 0x00000000 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_EXT_TEMP_CONTROL_EXT_TEMP_MONITOR_SPI_EN_BIT_IDX 2 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_EXT_TEMP_CONTROL_EXT_TEMP_MONITOR_SPI_EN_WIDTH 1 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_EXT_TEMP_CONTROL_EXT_TEMP_MONITOR_SPI_EN_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_EVK_EXT_TEMP_VALUE_ADDR 0x0000010C +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_EVK_EXT_TEMP_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_EVK_EXT_TEMP_VALUE_WIDTH 22 +#define CCAM2_SYSTEM_MONITOR_TEMP_VCC_MONITOR_EVK_EXT_TEMP_VALUE_DEFAULT 0x00000000 + +//------------------------------------------------------------------------------------------------------------ +// CCAM2_SYSTEM_MONITOR_ATIS_IF_MONITOR +//------------------------------------------------------------------------------------------------------------ + +#define CCAM2_SYSTEM_MONITOR_ATIS_IF_MONITOR_BASE_ADDR 0x00000140 +#define CCAM2_SYSTEM_MONITOR_ATIS_IF_MONITOR_LAST_ADDR 0x0000014C +#define CCAM2_SYSTEM_MONITOR_ATIS_IF_MONITOR_SIZE 0x00000020 + +#define CCAM2_SYSTEM_MONITOR_ATIS_IF_MONITOR_CFG_ENABLE_ADDR \ + 0x00000140 // Controls the enable/disable of individual ATIS I/F Monitor's periodic events and alarms. +#define CCAM2_SYSTEM_MONITOR_ATIS_IF_MONITOR_CFG_ENABLE_ALL_EVT_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_ATIS_IF_MONITOR_CFG_ENABLE_ALL_EVT_WIDTH 1 +#define CCAM2_SYSTEM_MONITOR_ATIS_IF_MONITOR_CFG_ENABLE_ALL_EVT_DEFAULT 0x00000000 +#define CCAM2_SYSTEM_MONITOR_ATIS_IF_MONITOR_CFG_ENABLE_TD_IDLE_TIME_EVT_BIT_IDX 1 +#define CCAM2_SYSTEM_MONITOR_ATIS_IF_MONITOR_CFG_ENABLE_TD_IDLE_TIME_EVT_WIDTH 1 +#define CCAM2_SYSTEM_MONITOR_ATIS_IF_MONITOR_CFG_ENABLE_TD_IDLE_TIME_EVT_DEFAULT 0x00000000 +#define CCAM2_SYSTEM_MONITOR_ATIS_IF_MONITOR_CFG_ENABLE_TD_IDLE_TIMEOUT_EVT_BIT_IDX 2 +#define CCAM2_SYSTEM_MONITOR_ATIS_IF_MONITOR_CFG_ENABLE_TD_IDLE_TIMEOUT_EVT_WIDTH 1 +#define CCAM2_SYSTEM_MONITOR_ATIS_IF_MONITOR_CFG_ENABLE_TD_IDLE_TIMEOUT_EVT_DEFAULT 0x00000000 +#define CCAM2_SYSTEM_MONITOR_ATIS_IF_MONITOR_CFG_ENABLE_APS_IDLE_TIME_EVT_BIT_IDX 3 +#define CCAM2_SYSTEM_MONITOR_ATIS_IF_MONITOR_CFG_ENABLE_APS_IDLE_TIME_EVT_WIDTH 1 +#define CCAM2_SYSTEM_MONITOR_ATIS_IF_MONITOR_CFG_ENABLE_APS_IDLE_TIME_EVT_DEFAULT 0x00000000 +#define CCAM2_SYSTEM_MONITOR_ATIS_IF_MONITOR_CFG_ENABLE_APS_IDLE_TIMEOUT_EVT_BIT_IDX 4 +#define CCAM2_SYSTEM_MONITOR_ATIS_IF_MONITOR_CFG_ENABLE_APS_IDLE_TIMEOUT_EVT_WIDTH 1 +#define CCAM2_SYSTEM_MONITOR_ATIS_IF_MONITOR_CFG_ENABLE_APS_IDLE_TIMEOUT_EVT_DEFAULT 0x00000000 +#define CCAM2_SYSTEM_MONITOR_ATIS_IF_MONITOR_CFG_ENABLE_GLOBAL_ILLUMINATION_EVT_BIT_IDX 5 +#define CCAM2_SYSTEM_MONITOR_ATIS_IF_MONITOR_CFG_ENABLE_GLOBAL_ILLUMINATION_EVT_WIDTH 1 +#define CCAM2_SYSTEM_MONITOR_ATIS_IF_MONITOR_CFG_ENABLE_GLOBAL_ILLUMINATION_EVT_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_MONITOR_ATIS_IF_MONITOR_CFG_IDLE_TIME_THR_ADDR \ + 0x00000144 // Sets the threshold time value in us after which {MASTER|SLAVE}_ATIS_{TD|APS}_IDLE_TIME events are + // sent. These events determine the amount of time between two consecutive events in the respective + // channel if such time is above the threshold. +#define CCAM2_SYSTEM_MONITOR_ATIS_IF_MONITOR_CFG_IDLE_TIME_THR_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_ATIS_IF_MONITOR_CFG_IDLE_TIME_THR_VALUE_WIDTH 26 +#define CCAM2_SYSTEM_MONITOR_ATIS_IF_MONITOR_CFG_IDLE_TIME_THR_VALUE_DEFAULT 0x00002710 + +#define CCAM2_SYSTEM_MONITOR_ATIS_IF_MONITOR_CFG_IDLE_TIMEOUT_THR_ADDR \ + 0x00000148 // Sets the threshold time value in us after which {MASTER|SLAVE}_ATIS_{TD|APS}_IDLE_TIMEOUT events are + // sent. These events notify the host that the monitored channel has been inactive beyond this time + // threshold. +#define CCAM2_SYSTEM_MONITOR_ATIS_IF_MONITOR_CFG_IDLE_TIMEOUT_THR_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_ATIS_IF_MONITOR_CFG_IDLE_TIMEOUT_THR_VALUE_WIDTH 26 +#define CCAM2_SYSTEM_MONITOR_ATIS_IF_MONITOR_CFG_IDLE_TIMEOUT_THR_VALUE_DEFAULT 0x00002710 + +#define CCAM2_SYSTEM_MONITOR_ATIS_IF_MONITOR_STAT_GLOBAL_ILLUMINATION_ADDR 0x0000014C +#define CCAM2_SYSTEM_MONITOR_ATIS_IF_MONITOR_STAT_GLOBAL_ILLUMINATION_DATA_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_ATIS_IF_MONITOR_STAT_GLOBAL_ILLUMINATION_DATA_WIDTH 26 +#define CCAM2_SYSTEM_MONITOR_ATIS_IF_MONITOR_STAT_GLOBAL_ILLUMINATION_DATA_DEFAULT 0x00000000 +#define CCAM2_SYSTEM_MONITOR_ATIS_IF_MONITOR_STAT_GLOBAL_ILLUMINATION_VALID_BIT_IDX 31 +#define CCAM2_SYSTEM_MONITOR_ATIS_IF_MONITOR_STAT_GLOBAL_ILLUMINATION_VALID_WIDTH 1 +#define CCAM2_SYSTEM_MONITOR_ATIS_IF_MONITOR_STAT_GLOBAL_ILLUMINATION_VALID_DEFAULT 0x00000000 + +//------------------------------------------------------------------------------------------------------------ +// CCAM2_SYSTEM_MONITOR_SYSTEM_MONITOR_EXT_TRIGGERS +//------------------------------------------------------------------------------------------------------------ + +#define CCAM2_SYSTEM_MONITOR_SYSTEM_MONITOR_EXT_TRIGGERS_BASE_ADDR 0x00000160 +#define CCAM2_SYSTEM_MONITOR_SYSTEM_MONITOR_EXT_TRIGGERS_LAST_ADDR 0x0000016C +#define CCAM2_SYSTEM_MONITOR_SYSTEM_MONITOR_EXT_TRIGGERS_SIZE 0x00000020 + +#define CCAM2_SYSTEM_MONITOR_SYSTEM_MONITOR_EXT_TRIGGERS_ENABLE_ADDR 0x00000160 +#define CCAM2_SYSTEM_MONITOR_SYSTEM_MONITOR_EXT_TRIGGERS_ENABLE_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_SYSTEM_MONITOR_EXT_TRIGGERS_ENABLE_VALUE_WIDTH 1 +#define CCAM2_SYSTEM_MONITOR_SYSTEM_MONITOR_EXT_TRIGGERS_ENABLE_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_MONITOR_SYSTEM_MONITOR_EXT_TRIGGERS_OUT_ENABLE_ADDR 0x00000164 +#define CCAM2_SYSTEM_MONITOR_SYSTEM_MONITOR_EXT_TRIGGERS_OUT_ENABLE_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_SYSTEM_MONITOR_EXT_TRIGGERS_OUT_ENABLE_VALUE_WIDTH 1 +#define CCAM2_SYSTEM_MONITOR_SYSTEM_MONITOR_EXT_TRIGGERS_OUT_ENABLE_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_MONITOR_SYSTEM_MONITOR_EXT_TRIGGERS_OUT_PULSE_PERIOD_ADDR 0x00000168 +#define CCAM2_SYSTEM_MONITOR_SYSTEM_MONITOR_EXT_TRIGGERS_OUT_PULSE_PERIOD_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_SYSTEM_MONITOR_EXT_TRIGGERS_OUT_PULSE_PERIOD_WIDTH 32 +#define CCAM2_SYSTEM_MONITOR_SYSTEM_MONITOR_EXT_TRIGGERS_OUT_PULSE_PERIOD_DEFAULT 0x00000064 + +#define CCAM2_SYSTEM_MONITOR_SYSTEM_MONITOR_EXT_TRIGGERS_OUT_PULSE_WIDTH_ADDR 0x0000016C +#define CCAM2_SYSTEM_MONITOR_SYSTEM_MONITOR_EXT_TRIGGERS_OUT_PULSE_WIDTH_BIT_IDX 0 +#define CCAM2_SYSTEM_MONITOR_SYSTEM_MONITOR_EXT_TRIGGERS_OUT_PULSE_WIDTH_WIDTH 32 +#define CCAM2_SYSTEM_MONITOR_SYSTEM_MONITOR_EXT_TRIGGERS_OUT_PULSE_WIDTH_DEFAULT 0x00000001 + +#endif // METAVISION_HAL_CCAM2_SYSTEM_MONITOR_TRIGGER_EXT_ADC_H diff --git a/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/ccam3_single_gen3.h b/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/ccam3_single_gen3.h new file mode 100644 index 000000000..7b1d41f4c --- /dev/null +++ b/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/ccam3_single_gen3.h @@ -0,0 +1,2366 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_CCAM3_SINGLE_GEN3_H +#define METAVISION_HAL_CCAM3_SINGLE_GEN3_H + +#include "tep_register_control_register_map.h" +#include "ccam2_system_monitor_trigger_ext_adc.h" +#include "gen3_sensor_if_register_map.h" +#include "system_config_register_map.h" +#include "fx3_host_if_register_map.h" +#include "imu_register_map.h" + +//------------------------------------------------------------------------------------------------------------ +// CCAM3 +//------------------------------------------------------------------------------------------------------------ + +#define CCAM3_BASE_ADDR 0x00000000 +#define CCAM3_LAST_ADDR 0x00001975 +#define CCAM3_SIZE 0x00002000 + +//------------------------------------------------------------------------------------------------------------ +// CCAM3_SYS_REG +//------------------------------------------------------------------------------------------------------------ + +#define CCAM3_SYS_REG_BASE_ADDR 0x00000000 +#define CCAM3_SYS_REG_LAST_ADDR 0x0000003C +#define CCAM3_SYS_REG_SIZE 0x00000040 + +#define CCAM3_ATIS_CONTROL_ADDR 0x00000000 +#define CCAM3_ATIS_CONTROL_EN_VDDA_BIT_IDX 0 +#define CCAM3_ATIS_CONTROL_EN_VDDA_WIDTH 1 +#define CCAM3_ATIS_CONTROL_EN_VDDA_DEFAULT 0x00000000 +#define CCAM3_ATIS_CONTROL_EN_VDDC_BIT_IDX 1 +#define CCAM3_ATIS_CONTROL_EN_VDDC_WIDTH 1 +#define CCAM3_ATIS_CONTROL_EN_VDDC_DEFAULT 0x00000000 +#define CCAM3_ATIS_CONTROL_EN_VDDD_BIT_IDX 2 +#define CCAM3_ATIS_CONTROL_EN_VDDD_WIDTH 1 +#define CCAM3_ATIS_CONTROL_EN_VDDD_DEFAULT 0x00000000 +#define CCAM3_ATIS_CONTROL_SENSOR_SOFT_RESET_BIT_IDX 3 +#define CCAM3_ATIS_CONTROL_SENSOR_SOFT_RESET_WIDTH 1 +#define CCAM3_ATIS_CONTROL_SENSOR_SOFT_RESET_DEFAULT 0x00000001 +#define CCAM3_ATIS_CONTROL_IN_EVT_NO_BLOCKING_MODE_BIT_IDX 4 +#define CCAM3_ATIS_CONTROL_IN_EVT_NO_BLOCKING_MODE_WIDTH 1 +#define CCAM3_ATIS_CONTROL_IN_EVT_NO_BLOCKING_MODE_DEFAULT 0x00000001 +#define CCAM3_ATIS_CONTROL_SISLEY_HVGA_REMAP_BYPASS_BIT_IDX 8 +#define CCAM3_ATIS_CONTROL_SISLEY_HVGA_REMAP_BYPASS_WIDTH 1 +#define CCAM3_ATIS_CONTROL_SISLEY_HVGA_REMAP_BYPASS_DEFAULT 0x00000001 +#define CCAM3_ATIS_CONTROL_MASTER_MODE_BIT_IDX 12 +#define CCAM3_ATIS_CONTROL_MASTER_MODE_WIDTH 1 +#define CCAM3_ATIS_CONTROL_MASTER_MODE_DEFAULT 0x00000000 +#define CCAM3_ATIS_CONTROL_MASTER_ENABLE_BIT_IDX 13 +#define CCAM3_ATIS_CONTROL_MASTER_ENABLE_WIDTH 1 +#define CCAM3_ATIS_CONTROL_MASTER_ENABLE_DEFAULT 0x00000000 +#define CCAM3_ATIS_CONTROL_USE_EXT_START_BIT_IDX 14 +#define CCAM3_ATIS_CONTROL_USE_EXT_START_WIDTH 1 +#define CCAM3_ATIS_CONTROL_USE_EXT_START_DEFAULT 0x00000000 +#define CCAM3_ATIS_CONTROL_ROI_TD_RSTN_BIT_IDX 18 +#define CCAM3_ATIS_CONTROL_ROI_TD_RSTN_WIDTH 1 +#define CCAM3_ATIS_CONTROL_ROI_TD_RSTN_DEFAULT 0x00000000 +#define CCAM3_ATIS_CONTROL_EN_EXT_CTRL_RSTB_BIT_IDX 20 +#define CCAM3_ATIS_CONTROL_EN_EXT_CTRL_RSTB_WIDTH 1 +#define CCAM3_ATIS_CONTROL_EN_EXT_CTRL_RSTB_DEFAULT 0x00000000 + +#define CCAM3_ATIS_BIASROI_UPDATE_VALUE0_ADDR 0x00000002 +#define CCAM3_ATIS_BIASROI_UPDATE_VALUE0_VALUE_BIT_IDX 0 +#define CCAM3_ATIS_BIASROI_UPDATE_VALUE0_VALUE_WIDTH 16 +#define CCAM3_ATIS_BIASROI_UPDATE_VALUE0_VALUE_DEFAULT 0x00000000 + +#define CCAM3_ATIS_BIASROI_UPDATE_VALUE1_ADDR 0x00000004 +#define CCAM3_ATIS_BIASROI_UPDATE_VALUE1_VALUE_BIT_IDX 0 +#define CCAM3_ATIS_BIASROI_UPDATE_VALUE1_VALUE_WIDTH 16 +#define CCAM3_ATIS_BIASROI_UPDATE_VALUE1_VALUE_DEFAULT 0x00000000 + +#define CCAM3_ATIS_BIAS_UPDATE_VALUE2_ADDR 0x00000006 +#define CCAM3_ATIS_BIAS_UPDATE_VALUE2_VALUE_BIT_IDX 0 +#define CCAM3_ATIS_BIAS_UPDATE_VALUE2_VALUE_WIDTH 16 +#define CCAM3_ATIS_BIAS_UPDATE_VALUE2_VALUE_DEFAULT 0x00000000 + +#define CCAM3_CCAM2_CONTROL_ADDR 0x00000008 +#define CCAM3_CCAM2_CONTROL_ENABLE_64BITS_EVENT_BIT_IDX 3 +#define CCAM3_CCAM2_CONTROL_ENABLE_64BITS_EVENT_WIDTH 1 +#define CCAM3_CCAM2_CONTROL_ENABLE_64BITS_EVENT_DEFAULT 0x00000001 +#define CCAM3_CCAM2_CONTROL_BYPASS_MAPPING_BIT_IDX 5 +#define CCAM3_CCAM2_CONTROL_BYPASS_MAPPING_WIDTH 1 +#define CCAM3_CCAM2_CONTROL_BYPASS_MAPPING_DEFAULT 0x00000001 +#define CCAM3_CCAM2_CONTROL_HOST_IF_ENABLE_BIT_IDX 8 +#define CCAM3_CCAM2_CONTROL_HOST_IF_ENABLE_WIDTH 1 +#define CCAM3_CCAM2_CONTROL_HOST_IF_ENABLE_DEFAULT 0x00000000 +#define CCAM3_CCAM2_CONTROL_STEREO_MERGE_ENABLE_BIT_IDX 9 +#define CCAM3_CCAM2_CONTROL_STEREO_MERGE_ENABLE_WIDTH 1 +#define CCAM3_CCAM2_CONTROL_STEREO_MERGE_ENABLE_DEFAULT 0x00000000 +#define CCAM3_CCAM2_CONTROL_ENABLE_IMU_BIT_IDX 10 +#define CCAM3_CCAM2_CONTROL_ENABLE_IMU_WIDTH 1 +#define CCAM3_CCAM2_CONTROL_ENABLE_IMU_DEFAULT 0x00000000 +#define CCAM3_CCAM2_CONTROL_ENABLE_OUT_OF_FOV_BIT_IDX 11 +#define CCAM3_CCAM2_CONTROL_ENABLE_OUT_OF_FOV_WIDTH 1 +#define CCAM3_CCAM2_CONTROL_ENABLE_OUT_OF_FOV_DEFAULT 0x00000000 + +#define CCAM3_TRIGGERS_ADDR 0x0000000A +#define CCAM3_TRIGGERS_SOFT_RESET_BIT_IDX 0 +#define CCAM3_TRIGGERS_SOFT_RESET_WIDTH 1 +#define CCAM3_TRIGGERS_SOFT_RESET_DEFAULT 0x00000000 +#define CCAM3_TRIGGERS_BIAS_DIN_VALID_BIT_IDX 1 +#define CCAM3_TRIGGERS_BIAS_DIN_VALID_WIDTH 1 +#define CCAM3_TRIGGERS_BIAS_DIN_VALID_DEFAULT 0x00000000 +#define CCAM3_TRIGGERS_TS_RESET_BIT_IDX 2 +#define CCAM3_TRIGGERS_TS_RESET_WIDTH 1 +#define CCAM3_TRIGGERS_TS_RESET_DEFAULT 0x00000000 +#define CCAM3_TRIGGERS_ROI_DIN_BIT_IDX 3 +#define CCAM3_TRIGGERS_ROI_DIN_WIDTH 1 +#define CCAM3_TRIGGERS_ROI_DIN_DEFAULT 0x00000000 +#define CCAM3_TRIGGERS_FIFO_RESET_BIT_IDX 7 +#define CCAM3_TRIGGERS_FIFO_RESET_WIDTH 1 +#define CCAM3_TRIGGERS_FIFO_RESET_DEFAULT 0x00000000 +#define CCAM3_TRIGGERS_FLASH_ACCESS_BIT_IDX 8 +#define CCAM3_TRIGGERS_FLASH_ACCESS_WIDTH 1 +#define CCAM3_TRIGGERS_FLASH_ACCESS_DEFAULT 0x00000000 +#define CCAM3_TRIGGERS_MAPPING_FETCH_BIT_IDX 9 +#define CCAM3_TRIGGERS_MAPPING_FETCH_WIDTH 1 +#define CCAM3_TRIGGERS_MAPPING_FETCH_DEFAULT 0x00000000 +#define CCAM3_TRIGGERS_PROG_DAC_BIT_IDX 10 +#define CCAM3_TRIGGERS_PROG_DAC_WIDTH 1 +#define CCAM3_TRIGGERS_PROG_DAC_DEFAULT 0x00000000 +#define CCAM3_TRIGGERS_DAC_DIN_VALID_BIT_IDX 11 +#define CCAM3_TRIGGERS_DAC_DIN_VALID_WIDTH 1 +#define CCAM3_TRIGGERS_DAC_DIN_VALID_DEFAULT 0x00000000 + +#define CCAM3_SYSTEM_STATUS_ADDR 0x0000000C +#define CCAM3_SYSTEM_STATUS_VALUE_BIT_IDX 0 +#define CCAM3_SYSTEM_STATUS_VALUE_WIDTH 16 +#define CCAM3_SYSTEM_STATUS_VALUE_DEFAULT 0x00000000 + +#define CCAM3_FOUT_LSB_STATUS_ADDR 0x0000000E +#define CCAM3_FOUT_LSB_STATUS_VALUE_BIT_IDX 0 +#define CCAM3_FOUT_LSB_STATUS_VALUE_WIDTH 16 +#define CCAM3_FOUT_LSB_STATUS_VALUE_DEFAULT 0x00000000 + +#define CCAM3_FOUT_MSB_STATUS_ADDR 0x00000010 +#define CCAM3_FOUT_MSB_STATUS_VALUE_BIT_IDX 0 +#define CCAM3_FOUT_MSB_STATUS_VALUE_WIDTH 16 +#define CCAM3_FOUT_MSB_STATUS_VALUE_DEFAULT 0x00000000 + +#define CCAM3_FIFO_WRCOUNT_STATUS_ADDR 0x00000012 +#define CCAM3_FIFO_WRCOUNT_STATUS_VALUE_BIT_IDX 0 +#define CCAM3_FIFO_WRCOUNT_STATUS_VALUE_WIDTH 16 +#define CCAM3_FIFO_WRCOUNT_STATUS_VALUE_DEFAULT 0x00000000 + +#define CCAM3_FIFO_CHECKPIX_STATUS_ADDR 0x00000014 +#define CCAM3_FIFO_CHECKPIX_STATUS_VALUE_BIT_IDX 0 +#define CCAM3_FIFO_CHECKPIX_STATUS_VALUE_WIDTH 16 +#define CCAM3_FIFO_CHECKPIX_STATUS_VALUE_DEFAULT 0x00000000 + +#define CCAM3_TLAST_REARMUS_ADDR 0x00000016 +#define CCAM3_TLAST_REARMUS_VALUE_BIT_IDX 0 +#define CCAM3_TLAST_REARMUS_VALUE_WIDTH 16 +#define CCAM3_TLAST_REARMUS_VALUE_DEFAULT 0x00000000 + +#define CCAM3_OVERFLOW_HITCOUNT_ADDR 0x00000018 +#define CCAM3_OVERFLOW_HITCOUNT_VALUE_BIT_IDX 0 +#define CCAM3_OVERFLOW_HITCOUNT_VALUE_WIDTH 16 +#define CCAM3_OVERFLOW_HITCOUNT_VALUE_DEFAULT 0x00000000 + +#define CCAM3_CCAM2_MODE_ADDR 0x0000001A +#define CCAM3_CCAM2_MODE_VALUE_BIT_IDX 0 +#define CCAM3_CCAM2_MODE_VALUE_WIDTH 16 +#define CCAM3_CCAM2_MODE_VALUE_DEFAULT 0x00000000 + +#define CCAM3_SERIAL_LSB_ADDR 0x0000001C +#define CCAM3_SERIAL_LSB_VALUE_BIT_IDX 0 +#define CCAM3_SERIAL_LSB_VALUE_WIDTH 16 +#define CCAM3_SERIAL_LSB_VALUE_DEFAULT 0x00000000 + +#define CCAM3_SERIAL_MSB_ADDR 0x00000020 +#define CCAM3_SERIAL_MSB_VALUE_BIT_IDX 0 +#define CCAM3_SERIAL_MSB_VALUE_WIDTH 16 +#define CCAM3_SERIAL_MSB_VALUE_DEFAULT 0x00000000 + +#define CCAM3_NOTIFY_PACKETCOUNT_ADDR 0x00000022 +#define CCAM3_NOTIFY_PACKETCOUNT_VALUE_BIT_IDX 0 +#define CCAM3_NOTIFY_PACKETCOUNT_VALUE_WIDTH 16 +#define CCAM3_NOTIFY_PACKETCOUNT_VALUE_DEFAULT 0x00000000 + +#define CCAM3_SNFETCH_FADDR_LSB_ADDR 0x00000024 +#define CCAM3_SNFETCH_FADDR_LSB_VALUE_BIT_IDX 0 +#define CCAM3_SNFETCH_FADDR_LSB_VALUE_WIDTH 16 +#define CCAM3_SNFETCH_FADDR_LSB_VALUE_DEFAULT 0x00000000 + +#define CCAM3_SNFETCH_FADDR_MSB_ADDR 0x00000026 +#define CCAM3_SNFETCH_FADDR_MSB_VALUE_BIT_IDX 0 +#define CCAM3_SNFETCH_FADDR_MSB_VALUE_WIDTH 16 +#define CCAM3_SNFETCH_FADDR_MSB_VALUE_DEFAULT 0x00000000 + +#define CCAM3_SNFETCH_RDATA_LSB_ADDR 0x00000028 +#define CCAM3_SNFETCH_RDATA_LSB_VALUE_BIT_IDX 0 +#define CCAM3_SNFETCH_RDATA_LSB_VALUE_WIDTH 16 +#define CCAM3_SNFETCH_RDATA_LSB_VALUE_DEFAULT 0x00000000 + +#define CCAM3_SNFETCH_RDATA_MSB_ADDR 0x0000002A +#define CCAM3_SNFETCH_RDATA_MSB_VALUE_BIT_IDX 0 +#define CCAM3_SNFETCH_RDATA_MSB_VALUE_WIDTH 16 +#define CCAM3_SNFETCH_RDATA_MSB_VALUE_DEFAULT 0x00000000 + +#define CCAM3_SNFETCH_READ_ITER_ADDR 0x0000002C +#define CCAM3_SNFETCH_READ_ITER_VALUE_BIT_IDX 0 +#define CCAM3_SNFETCH_READ_ITER_VALUE_WIDTH 16 +#define CCAM3_SNFETCH_READ_ITER_VALUE_DEFAULT 0x00000000 + +#define CCAM3_SNFETCH_TIME_COUNT_ADDR 0x0000002E +#define CCAM3_SNFETCH_TIME_COUNT_VALUE_BIT_IDX 0 +#define CCAM3_SNFETCH_TIME_COUNT_VALUE_WIDTH 16 +#define CCAM3_SNFETCH_TIME_COUNT_VALUE_DEFAULT 0x00000000 + +#define CCAM3_BIAS_LOAD_ITERATION_COUNT_ADDR 0x00000030 +#define CCAM3_BIAS_LOAD_ITERATION_COUNT_VALUE_BIT_IDX 0 +#define CCAM3_BIAS_LOAD_ITERATION_COUNT_VALUE_WIDTH 16 +#define CCAM3_BIAS_LOAD_ITERATION_COUNT_VALUE_DEFAULT 0x00000000 + +#define CCAM3_FLASH_PROGRAM_SEL_SLAVE_ADDR 0x00000032 +#define CCAM3_FLASH_PROGRAM_SEL_SLAVE_VALUE_BIT_IDX 0 +#define CCAM3_FLASH_PROGRAM_SEL_SLAVE_VALUE_WIDTH 16 +#define CCAM3_FLASH_PROGRAM_SEL_SLAVE_VALUE_DEFAULT 0x00000000 +#define CCAM3_FLASH_PROGRAM_FX3_ACCESS_LOCKDOWN_VALUE_BIT_IDX 16 +#define CCAM3_FLASH_PROGRAM_FX3_ACCESS_LOCKDOWN_VALUE_WIDTH 1 +#define CCAM3_FLASH_PROGRAM_FX3_ACCESS_LOCKDOWN_VALUE_DEFAULT 0x1 + +#define CCAM3_OUT_OF_FOV_FILTER_WIDTH_ADDR 0x00000034 +#define CCAM3_OUT_OF_FOV_FILTER_WIDTH_VALUE_BIT_IDX 0 +#define CCAM3_OUT_OF_FOV_FILTER_WIDTH_VALUE_WIDTH 11 +#define CCAM3_OUT_OF_FOV_FILTER_WIDTH_VALUE_DEFAULT 0x00000280 + +#define CCAM3_OUT_OF_FOV_FILTER_HEIGHT_ADDR 0x00000036 +#define CCAM3_OUT_OF_FOV_FILTER_HEIGHT_VALUE_BIT_IDX 0 +#define CCAM3_OUT_OF_FOV_FILTER_HEIGHT_VALUE_WIDTH 11 +#define CCAM3_OUT_OF_FOV_FILTER_HEIGHT_VALUE_DEFAULT 0x000001E0 + +#define CCAM3_TEP_EVT_RATE_CONTROL_ENABLE_ADDR 0x00000038 +#define CCAM3_TEP_EVT_RATE_CONTROL_ENABLE_VALUE_BIT_IDX 0 +#define CCAM3_TEP_EVT_RATE_CONTROL_ENABLE_VALUE_WIDTH 16 +#define CCAM3_TEP_EVT_RATE_CONTROL_ENABLE_VALUE_DEFAULT 0x00000000 + +#define CCAM3_TEP_EVT_RATE_CONTROL_T_DROP_FACTOR_ADDR 0x0000003A +#define CCAM3_TEP_EVT_RATE_CONTROL_T_DROP_FACTOR_VALUE_BIT_IDX 0 +#define CCAM3_TEP_EVT_RATE_CONTROL_T_DROP_FACTOR_VALUE_WIDTH 16 +#define CCAM3_TEP_EVT_RATE_CONTROL_T_DROP_FACTOR_VALUE_DEFAULT 0x00000000 + +#define CCAM3_EXT_SYNC_OUT_MODE_ADDR 0x0000003C +#define CCAM3_EXT_SYNC_OUT_MODE_VALUE_BIT_IDX 0 // Set to 1 to select the trigger out on the output multiplexer +#define CCAM3_EXT_SYNC_OUT_MODE_VALUE_WIDTH 1 +#define CCAM3_EXT_SYNC_OUT_MODE_VALUE_DEFAULT 0x00000000 + +//------------------------------------------------------------------------------------------------------------ +// CCAM3_SYSTEM_MONITOR +//------------------------------------------------------------------------------------------------------------ + +#define CCAM3_SYSTEM_MONITOR_BASE_ADDR 0x00000040 +#define CCAM3_SYSTEM_MONITOR_LAST_ADDR 0x000001AC +#define CCAM3_SYSTEM_MONITOR_SIZE 0x000001C0 + +//------------------------------------------------------------------------------------------------------------ +// CCAM3_TEMP_VCC_MONITOR_XADC +//------------------------------------------------------------------------------------------------------------ + +#define CCAM3_TEMP_VCC_MONITOR_XADC_BASE_ADDR 0x00000040 +#define CCAM3_TEMP_VCC_MONITOR_XADC_LAST_ADDR 0x000000FE +#define CCAM3_TEMP_VCC_MONITOR_XADC_SIZE 0x00000100 + +#define CCAM3_TEMP_VCC_MONITOR_XADC_TEMP_ADDR 0x00000040 +#define CCAM3_TEMP_VCC_MONITOR_XADC_TEMP_VALUE_BIT_IDX 0 +#define CCAM3_TEMP_VCC_MONITOR_XADC_TEMP_VALUE_WIDTH 16 +#define CCAM3_TEMP_VCC_MONITOR_XADC_TEMP_VALUE_DEFAULT 0x00000000 + +#define CCAM3_TEMP_VCC_MONITOR_XADC_VCC_INT_ADDR 0x00000042 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VCC_INT_VALUE_BIT_IDX 0 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VCC_INT_VALUE_WIDTH 16 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VCC_INT_VALUE_DEFAULT 0x00000000 + +#define CCAM3_TEMP_VCC_MONITOR_XADC_VCC_AUX_ADDR 0x00000044 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VCC_AUX_VALUE_BIT_IDX 0 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VCC_AUX_VALUE_WIDTH 16 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VCC_AUX_VALUE_DEFAULT 0x00000000 + +#define CCAM3_TEMP_VCC_MONITOR_XADC_VP_VN_ADDR 0x00000046 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VP_VN_VALUE_BIT_IDX 0 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VP_VN_VALUE_WIDTH 16 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VP_VN_VALUE_DEFAULT 0x00000000 + +#define CCAM3_TEMP_VCC_MONITOR_XADC_VREFP_ADDR 0x00000048 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VREFP_VALUE_BIT_IDX 0 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VREFP_VALUE_WIDTH 16 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VREFP_VALUE_DEFAULT 0x00000000 + +#define CCAM3_TEMP_VCC_MONITOR_XADC_VREFN_ADDR 0x0000004A +#define CCAM3_TEMP_VCC_MONITOR_XADC_VREFN_VALUE_BIT_IDX 0 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VREFN_VALUE_WIDTH 16 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VREFN_VALUE_DEFAULT 0x00000000 + +#define CCAM3_TEMP_VCC_MONITOR_XADC_VCC_BRAM_ADDR 0x0000004C +#define CCAM3_TEMP_VCC_MONITOR_XADC_VCC_BRAM_VALUE_BIT_IDX 0 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VCC_BRAM_VALUE_WIDTH 16 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VCC_BRAM_VALUE_DEFAULT 0x00000000 + +#define CCAM3_TEMP_VCC_MONITOR_XADC_SUPPLY_OFFSET_ADDR 0x00000050 +#define CCAM3_TEMP_VCC_MONITOR_XADC_SUPPLY_OFFSET_VALUE_BIT_IDX 0 +#define CCAM3_TEMP_VCC_MONITOR_XADC_SUPPLY_OFFSET_VALUE_WIDTH 16 +#define CCAM3_TEMP_VCC_MONITOR_XADC_SUPPLY_OFFSET_VALUE_DEFAULT 0x00000000 + +#define CCAM3_TEMP_VCC_MONITOR_XADC_OFFSET_ADDR 0x00000052 +#define CCAM3_TEMP_VCC_MONITOR_XADC_OFFSET_VALUE_BIT_IDX 0 +#define CCAM3_TEMP_VCC_MONITOR_XADC_OFFSET_VALUE_WIDTH 16 +#define CCAM3_TEMP_VCC_MONITOR_XADC_OFFSET_VALUE_DEFAULT 0x00000000 + +#define CCAM3_TEMP_VCC_MONITOR_XADC_GAIN_ERROR_ADDR 0x00000054 +#define CCAM3_TEMP_VCC_MONITOR_XADC_GAIN_ERROR_VALUE_BIT_IDX 0 +#define CCAM3_TEMP_VCC_MONITOR_XADC_GAIN_ERROR_VALUE_WIDTH 16 +#define CCAM3_TEMP_VCC_MONITOR_XADC_GAIN_ERROR_VALUE_DEFAULT 0x00000000 + +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX0_ADDR 0x00000060 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX0_VALUE_BIT_IDX 0 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX0_VALUE_WIDTH 16 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX0_VALUE_DEFAULT 0x00000000 + +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX1_ADDR 0x00000062 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX1_VALUE_BIT_IDX 0 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX1_VALUE_WIDTH 16 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX1_VALUE_DEFAULT 0x00000000 + +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX2_ADDR 0x00000064 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX2_VALUE_BIT_IDX 0 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX2_VALUE_WIDTH 16 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX2_VALUE_DEFAULT 0x00000000 + +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX3_ADDR 0x00000066 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX3_VALUE_BIT_IDX 0 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX3_VALUE_WIDTH 16 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX3_VALUE_DEFAULT 0x00000000 + +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX4_ADDR 0x00000068 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX4_VALUE_BIT_IDX 0 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX4_VALUE_WIDTH 16 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX4_VALUE_DEFAULT 0x00000000 + +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX5_ADDR 0x0000006A +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX5_VALUE_BIT_IDX 0 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX5_VALUE_WIDTH 16 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX5_VALUE_DEFAULT 0x00000000 + +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX6_ADDR 0x0000006C +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX6_VALUE_BIT_IDX 0 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX6_VALUE_WIDTH 16 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX6_VALUE_DEFAULT 0x00000000 + +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX7_ADDR 0x0000006E +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX7_VALUE_BIT_IDX 0 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX7_VALUE_WIDTH 16 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX7_VALUE_DEFAULT 0x00000000 + +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX8_ADDR 0x00000070 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX8_VALUE_BIT_IDX 0 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX8_VALUE_WIDTH 16 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX8_VALUE_DEFAULT 0x00000000 + +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX9_ADDR 0x00000072 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX9_VALUE_BIT_IDX 0 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX9_VALUE_WIDTH 16 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX9_VALUE_DEFAULT 0x00000000 + +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX10_ADDR 0x00000074 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX10_VALUE_BIT_IDX 0 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX10_VALUE_WIDTH 16 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX10_VALUE_DEFAULT 0x00000000 + +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX11_ADDR 0x00000076 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX11_VALUE_BIT_IDX 0 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX11_VALUE_WIDTH 16 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX11_VALUE_DEFAULT 0x00000000 + +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX12_ADDR 0x00000078 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX12_VALUE_BIT_IDX 0 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX12_VALUE_WIDTH 16 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX12_VALUE_DEFAULT 0x00000000 + +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX13_ADDR 0x0000007A +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX13_VALUE_BIT_IDX 0 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX13_VALUE_WIDTH 16 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX13_VALUE_DEFAULT 0x00000000 + +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX14_ADDR 0x0000007C +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX14_VALUE_BIT_IDX 0 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX14_VALUE_WIDTH 16 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX14_VALUE_DEFAULT 0x00000000 + +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX15_ADDR 0x0000007E +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX15_VALUE_BIT_IDX 0 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX15_VALUE_WIDTH 16 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX15_VALUE_DEFAULT 0x00000000 + +#define CCAM3_TEMP_VCC_MONITOR_XADC_MAX_TEMP_ADDR 0x00000080 +#define CCAM3_TEMP_VCC_MONITOR_XADC_MAX_TEMP_VALUE_BIT_IDX 0 +#define CCAM3_TEMP_VCC_MONITOR_XADC_MAX_TEMP_VALUE_WIDTH 16 +#define CCAM3_TEMP_VCC_MONITOR_XADC_MAX_TEMP_VALUE_DEFAULT 0x00000000 + +#define CCAM3_TEMP_VCC_MONITOR_XADC_MAX_VCC_INT_ADDR 0x00000082 +#define CCAM3_TEMP_VCC_MONITOR_XADC_MAX_VCC_INT_VALUE_BIT_IDX 0 +#define CCAM3_TEMP_VCC_MONITOR_XADC_MAX_VCC_INT_VALUE_WIDTH 16 +#define CCAM3_TEMP_VCC_MONITOR_XADC_MAX_VCC_INT_VALUE_DEFAULT 0x00000000 + +#define CCAM3_TEMP_VCC_MONITOR_XADC_MAX_VCC_AUX_ADDR 0x00000084 +#define CCAM3_TEMP_VCC_MONITOR_XADC_MAX_VCC_AUX_VALUE_BIT_IDX 0 +#define CCAM3_TEMP_VCC_MONITOR_XADC_MAX_VCC_AUX_VALUE_WIDTH 16 +#define CCAM3_TEMP_VCC_MONITOR_XADC_MAX_VCC_AUX_VALUE_DEFAULT 0x00000000 + +#define CCAM3_TEMP_VCC_MONITOR_XADC_MAX_VCC_BRAM_ADDR 0x00000086 +#define CCAM3_TEMP_VCC_MONITOR_XADC_MAX_VCC_BRAM_VALUE_BIT_IDX 0 +#define CCAM3_TEMP_VCC_MONITOR_XADC_MAX_VCC_BRAM_VALUE_WIDTH 16 +#define CCAM3_TEMP_VCC_MONITOR_XADC_MAX_VCC_BRAM_VALUE_DEFAULT 0x00000000 + +#define CCAM3_TEMP_VCC_MONITOR_XADC_MIN_TEMP_ADDR 0x00000088 +#define CCAM3_TEMP_VCC_MONITOR_XADC_MIN_TEMP_VALUE_BIT_IDX 0 +#define CCAM3_TEMP_VCC_MONITOR_XADC_MIN_TEMP_VALUE_WIDTH 16 +#define CCAM3_TEMP_VCC_MONITOR_XADC_MIN_TEMP_VALUE_DEFAULT 0x00000000 + +#define CCAM3_TEMP_VCC_MONITOR_XADC_MIN_VCC_INT_ADDR 0x0000008A +#define CCAM3_TEMP_VCC_MONITOR_XADC_MIN_VCC_INT_VALUE_BIT_IDX 0 +#define CCAM3_TEMP_VCC_MONITOR_XADC_MIN_VCC_INT_VALUE_WIDTH 16 +#define CCAM3_TEMP_VCC_MONITOR_XADC_MIN_VCC_INT_VALUE_DEFAULT 0x00000000 + +#define CCAM3_TEMP_VCC_MONITOR_XADC_MIN_VCC_AUX_ADDR 0x0000008C +#define CCAM3_TEMP_VCC_MONITOR_XADC_MIN_VCC_AUX_VALUE_BIT_IDX 0 +#define CCAM3_TEMP_VCC_MONITOR_XADC_MIN_VCC_AUX_VALUE_WIDTH 16 +#define CCAM3_TEMP_VCC_MONITOR_XADC_MIN_VCC_AUX_VALUE_DEFAULT 0x00000000 + +#define CCAM3_TEMP_VCC_MONITOR_XADC_MIN_VCC_BRAM_ADDR 0x0000008E +#define CCAM3_TEMP_VCC_MONITOR_XADC_MIN_VCC_BRAM_VALUE_BIT_IDX 0 +#define CCAM3_TEMP_VCC_MONITOR_XADC_MIN_VCC_BRAM_VALUE_WIDTH 16 +#define CCAM3_TEMP_VCC_MONITOR_XADC_MIN_VCC_BRAM_VALUE_DEFAULT 0x00000000 + +#define CCAM3_TEMP_VCC_MONITOR_XADC_FLAGS_ADDR 0x000000BE +#define CCAM3_TEMP_VCC_MONITOR_XADC_FLAGS_VALUE_BIT_IDX 0 +#define CCAM3_TEMP_VCC_MONITOR_XADC_FLAGS_VALUE_WIDTH 16 +#define CCAM3_TEMP_VCC_MONITOR_XADC_FLAGS_VALUE_DEFAULT 0x00000000 + +#define CCAM3_TEMP_VCC_MONITOR_XADC_CONF_REG0_ADDR 0x000000C0 +#define CCAM3_TEMP_VCC_MONITOR_XADC_CONF_REG0_VALUE_BIT_IDX 0 +#define CCAM3_TEMP_VCC_MONITOR_XADC_CONF_REG0_VALUE_WIDTH 16 +#define CCAM3_TEMP_VCC_MONITOR_XADC_CONF_REG0_VALUE_DEFAULT 0x00000000 + +#define CCAM3_TEMP_VCC_MONITOR_XADC_CONF_REG1_ADDR 0x000000C2 +#define CCAM3_TEMP_VCC_MONITOR_XADC_CONF_REG1_VALUE_BIT_IDX 0 +#define CCAM3_TEMP_VCC_MONITOR_XADC_CONF_REG1_VALUE_WIDTH 16 +#define CCAM3_TEMP_VCC_MONITOR_XADC_CONF_REG1_VALUE_DEFAULT 0x00000000 + +#define CCAM3_TEMP_VCC_MONITOR_XADC_CONF_REG2_ADDR 0x000000C4 +#define CCAM3_TEMP_VCC_MONITOR_XADC_CONF_REG2_VALUE_BIT_IDX 0 +#define CCAM3_TEMP_VCC_MONITOR_XADC_CONF_REG2_VALUE_WIDTH 16 +#define CCAM3_TEMP_VCC_MONITOR_XADC_CONF_REG2_VALUE_DEFAULT 0x00000000 + +#define CCAM3_TEMP_VCC_MONITOR_XADC_SEQ_REG0_ADDR 0x000000D0 +#define CCAM3_TEMP_VCC_MONITOR_XADC_SEQ_REG0_VALUE_BIT_IDX 0 +#define CCAM3_TEMP_VCC_MONITOR_XADC_SEQ_REG0_VALUE_WIDTH 16 +#define CCAM3_TEMP_VCC_MONITOR_XADC_SEQ_REG0_VALUE_DEFAULT 0x00000000 + +#define CCAM3_TEMP_VCC_MONITOR_XADC_SEQ_REG1_ADDR 0x000000D2 +#define CCAM3_TEMP_VCC_MONITOR_XADC_SEQ_REG1_VALUE_BIT_IDX 0 +#define CCAM3_TEMP_VCC_MONITOR_XADC_SEQ_REG1_VALUE_WIDTH 16 +#define CCAM3_TEMP_VCC_MONITOR_XADC_SEQ_REG1_VALUE_DEFAULT 0x00000000 + +#define CCAM3_TEMP_VCC_MONITOR_XADC_SEQ_REG2_ADDR 0x000000D4 +#define CCAM3_TEMP_VCC_MONITOR_XADC_SEQ_REG2_VALUE_BIT_IDX 0 +#define CCAM3_TEMP_VCC_MONITOR_XADC_SEQ_REG2_VALUE_WIDTH 16 +#define CCAM3_TEMP_VCC_MONITOR_XADC_SEQ_REG2_VALUE_DEFAULT 0x00000000 + +#define CCAM3_TEMP_VCC_MONITOR_XADC_SEQ_REG3_ADDR 0x000000D6 +#define CCAM3_TEMP_VCC_MONITOR_XADC_SEQ_REG3_VALUE_BIT_IDX 0 +#define CCAM3_TEMP_VCC_MONITOR_XADC_SEQ_REG3_VALUE_WIDTH 16 +#define CCAM3_TEMP_VCC_MONITOR_XADC_SEQ_REG3_VALUE_DEFAULT 0x00000000 + +#define CCAM3_TEMP_VCC_MONITOR_XADC_SEQ_REG4_ADDR 0x000000D8 +#define CCAM3_TEMP_VCC_MONITOR_XADC_SEQ_REG4_VALUE_BIT_IDX 0 +#define CCAM3_TEMP_VCC_MONITOR_XADC_SEQ_REG4_VALUE_WIDTH 16 +#define CCAM3_TEMP_VCC_MONITOR_XADC_SEQ_REG4_VALUE_DEFAULT 0x00000000 + +#define CCAM3_TEMP_VCC_MONITOR_XADC_SEQ_REG5_ADDR 0x000000DA +#define CCAM3_TEMP_VCC_MONITOR_XADC_SEQ_REG5_VALUE_BIT_IDX 0 +#define CCAM3_TEMP_VCC_MONITOR_XADC_SEQ_REG5_VALUE_WIDTH 16 +#define CCAM3_TEMP_VCC_MONITOR_XADC_SEQ_REG5_VALUE_DEFAULT 0x00000000 + +#define CCAM3_TEMP_VCC_MONITOR_XADC_SEQ_REG6_ADDR 0x000000DC +#define CCAM3_TEMP_VCC_MONITOR_XADC_SEQ_REG6_VALUE_BIT_IDX 0 +#define CCAM3_TEMP_VCC_MONITOR_XADC_SEQ_REG6_VALUE_WIDTH 16 +#define CCAM3_TEMP_VCC_MONITOR_XADC_SEQ_REG6_VALUE_DEFAULT 0x00000000 + +#define CCAM3_TEMP_VCC_MONITOR_XADC_SEQ_REG7_ADDR 0x000000DE +#define CCAM3_TEMP_VCC_MONITOR_XADC_SEQ_REG7_VALUE_BIT_IDX 0 +#define CCAM3_TEMP_VCC_MONITOR_XADC_SEQ_REG7_VALUE_WIDTH 16 +#define CCAM3_TEMP_VCC_MONITOR_XADC_SEQ_REG7_VALUE_DEFAULT 0x00000000 + +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG0_ADDR 0x000000E0 +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG0_VALUE_BIT_IDX 0 +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG0_VALUE_WIDTH 16 +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG0_VALUE_DEFAULT 0x00000000 + +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG1_ADDR 0x000000E2 +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG1_VALUE_BIT_IDX 0 +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG1_VALUE_WIDTH 16 +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG1_VALUE_DEFAULT 0x00000000 + +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG2_ADDR 0x000000E4 +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG2_VALUE_BIT_IDX 0 +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG2_VALUE_WIDTH 16 +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG2_VALUE_DEFAULT 0x00000000 + +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG3_ADDR 0x000000E6 +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG3_VALUE_BIT_IDX 0 +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG3_VALUE_WIDTH 16 +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG3_VALUE_DEFAULT 0x00000000 + +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG4_ADDR 0x000000E8 +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG4_VALUE_BIT_IDX 0 +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG4_VALUE_WIDTH 16 +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG4_VALUE_DEFAULT 0x00000000 + +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG5_ADDR 0x000000EA +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG5_VALUE_BIT_IDX 0 +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG5_VALUE_WIDTH 16 +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG5_VALUE_DEFAULT 0x00000000 + +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG6_ADDR 0x000000EC +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG6_VALUE_BIT_IDX 0 +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG6_VALUE_WIDTH 16 +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG6_VALUE_DEFAULT 0x00000000 + +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG7_ADDR 0x000000EE +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG7_VALUE_BIT_IDX 0 +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG7_VALUE_WIDTH 16 +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG7_VALUE_DEFAULT 0x00000000 + +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG8_ADDR 0x000000F0 +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG8_VALUE_BIT_IDX 0 +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG8_VALUE_WIDTH 16 +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG8_VALUE_DEFAULT 0x00000000 + +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG9_ADDR 0x000000F2 +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG9_VALUE_BIT_IDX 0 +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG9_VALUE_WIDTH 16 +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG9_VALUE_DEFAULT 0x00000000 + +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG10_ADDR 0x000000F4 +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG10_VALUE_BIT_IDX 0 +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG10_VALUE_WIDTH 16 +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG10_VALUE_DEFAULT 0x00000000 + +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG11_ADDR 0x000000F6 +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG11_VALUE_BIT_IDX 0 +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG11_VALUE_WIDTH 16 +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG11_VALUE_DEFAULT 0x00000000 + +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG12_ADDR 0x000000F8 +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG12_VALUE_BIT_IDX 0 +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG12_VALUE_WIDTH 16 +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG12_VALUE_DEFAULT 0x00000000 + +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG13_ADDR 0x000000FA +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG13_VALUE_BIT_IDX 0 +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG13_VALUE_WIDTH 16 +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG13_VALUE_DEFAULT 0x00000000 + +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG14_ADDR 0x000000FC +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG14_VALUE_BIT_IDX 0 +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG14_VALUE_WIDTH 16 +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG14_VALUE_DEFAULT 0x00000000 + +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG15_ADDR 0x000000FE +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG15_VALUE_BIT_IDX 0 +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG15_VALUE_WIDTH 16 +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG15_VALUE_DEFAULT 0x00000000 + +//------------------------------------------------------------------------------------------------------------ +// CCAM3_TEMP_VCC_MONITOR +//------------------------------------------------------------------------------------------------------------ + +#define CCAM3_TEMP_VCC_MONITOR_BASE_ADDR 0x00000140 +#define CCAM3_TEMP_VCC_MONITOR_LAST_ADDR 0x0000014C +#define CCAM3_TEMP_VCC_MONITOR_SIZE 0x00000020 + +#define CCAM3_TEMP_VCC_MONITOR_EVT_ENABLE_ADDR 0x00000140 +#define CCAM3_TEMP_VCC_MONITOR_EVT_ENABLE_ALL_EVT_BIT_IDX 0 +#define CCAM3_TEMP_VCC_MONITOR_EVT_ENABLE_ALL_EVT_WIDTH 1 +#define CCAM3_TEMP_VCC_MONITOR_EVT_ENABLE_ALL_EVT_DEFAULT 0x00000000 +#define CCAM3_TEMP_VCC_MONITOR_EVT_ENABLE_TEMP_EVT_BIT_IDX 1 +#define CCAM3_TEMP_VCC_MONITOR_EVT_ENABLE_TEMP_EVT_WIDTH 1 +#define CCAM3_TEMP_VCC_MONITOR_EVT_ENABLE_TEMP_EVT_DEFAULT 0x00000000 +#define CCAM3_TEMP_VCC_MONITOR_EVT_ENABLE_VCC_INT_EVT_BIT_IDX 2 +#define CCAM3_TEMP_VCC_MONITOR_EVT_ENABLE_VCC_INT_EVT_WIDTH 1 +#define CCAM3_TEMP_VCC_MONITOR_EVT_ENABLE_VCC_INT_EVT_DEFAULT 0x00000000 +#define CCAM3_TEMP_VCC_MONITOR_EVT_ENABLE_VCC_AUX_EVT_BIT_IDX 3 +#define CCAM3_TEMP_VCC_MONITOR_EVT_ENABLE_VCC_AUX_EVT_WIDTH 1 +#define CCAM3_TEMP_VCC_MONITOR_EVT_ENABLE_VCC_AUX_EVT_DEFAULT 0x00000000 +#define CCAM3_TEMP_VCC_MONITOR_EVT_ENABLE_VCC_BRAM_EVT_BIT_IDX 4 +#define CCAM3_TEMP_VCC_MONITOR_EVT_ENABLE_VCC_BRAM_EVT_WIDTH 1 +#define CCAM3_TEMP_VCC_MONITOR_EVT_ENABLE_VCC_BRAM_EVT_DEFAULT 0x00000000 +#define CCAM3_TEMP_VCC_MONITOR_EVT_ENABLE_ALL_ALARM_BIT_IDX 8 +#define CCAM3_TEMP_VCC_MONITOR_EVT_ENABLE_ALL_ALARM_WIDTH 1 +#define CCAM3_TEMP_VCC_MONITOR_EVT_ENABLE_ALL_ALARM_DEFAULT 0x00000000 +#define CCAM3_TEMP_VCC_MONITOR_EVT_ENABLE_OVER_TEMP_ALARM_BIT_IDX 9 +#define CCAM3_TEMP_VCC_MONITOR_EVT_ENABLE_OVER_TEMP_ALARM_WIDTH 1 +#define CCAM3_TEMP_VCC_MONITOR_EVT_ENABLE_OVER_TEMP_ALARM_DEFAULT 0x00000000 +#define CCAM3_TEMP_VCC_MONITOR_EVT_ENABLE_USER_TEMP_ALARM_BIT_IDX 10 +#define CCAM3_TEMP_VCC_MONITOR_EVT_ENABLE_USER_TEMP_ALARM_WIDTH 1 +#define CCAM3_TEMP_VCC_MONITOR_EVT_ENABLE_USER_TEMP_ALARM_DEFAULT 0x00000000 +#define CCAM3_TEMP_VCC_MONITOR_EVT_ENABLE_VCC_INT_ALARM_BIT_IDX 11 +#define CCAM3_TEMP_VCC_MONITOR_EVT_ENABLE_VCC_INT_ALARM_WIDTH 1 +#define CCAM3_TEMP_VCC_MONITOR_EVT_ENABLE_VCC_INT_ALARM_DEFAULT 0x00000000 +#define CCAM3_TEMP_VCC_MONITOR_EVT_ENABLE_VCC_AUX_ALARM_BIT_IDX 12 +#define CCAM3_TEMP_VCC_MONITOR_EVT_ENABLE_VCC_AUX_ALARM_WIDTH 1 +#define CCAM3_TEMP_VCC_MONITOR_EVT_ENABLE_VCC_AUX_ALARM_DEFAULT 0x00000000 +#define CCAM3_TEMP_VCC_MONITOR_EVT_ENABLE_VCC_BRAM_ALARM_BIT_IDX 13 +#define CCAM3_TEMP_VCC_MONITOR_EVT_ENABLE_VCC_BRAM_ALARM_WIDTH 1 +#define CCAM3_TEMP_VCC_MONITOR_EVT_ENABLE_VCC_BRAM_ALARM_DEFAULT 0x00000000 +#define CCAM3_TEMP_VCC_MONITOR_EVT_ENABLE_SYSTEM_POWER_DOWN_BIT_IDX 16 +#define CCAM3_TEMP_VCC_MONITOR_EVT_ENABLE_SYSTEM_POWER_DOWN_WIDTH 1 +#define CCAM3_TEMP_VCC_MONITOR_EVT_ENABLE_SYSTEM_POWER_DOWN_DEFAULT 0x00000000 + +#define CCAM3_TEMP_VCC_MONITOR_EVT_PERIOD_ADDR 0x00000144 +#define CCAM3_TEMP_VCC_MONITOR_EVT_PERIOD_BIT_IDX 0 +#define CCAM3_TEMP_VCC_MONITOR_EVT_PERIOD_WIDTH 24 +#define CCAM3_TEMP_VCC_MONITOR_EVT_PERIOD_DEFAULT 0x000186A0 + +#define CCAM3_TEMP_VCC_MONITOR_EXT_TEMP_CONTROL_ADDR 0x00000148 +#define CCAM3_TEMP_VCC_MONITOR_EXT_TEMP_CONTROL_STATUS_SYS_POWER_DOWN_BIT_IDX 0 +#define CCAM3_TEMP_VCC_MONITOR_EXT_TEMP_CONTROL_STATUS_SYS_POWER_DOWN_WIDTH 1 +#define CCAM3_TEMP_VCC_MONITOR_EXT_TEMP_CONTROL_STATUS_SYS_POWER_DOWN_DEFAULT 0x00000000 +#define CCAM3_TEMP_VCC_MONITOR_EXT_TEMP_CONTROL_EXT_TEMP_MONITOR_EN_BIT_IDX 1 +#define CCAM3_TEMP_VCC_MONITOR_EXT_TEMP_CONTROL_EXT_TEMP_MONITOR_EN_WIDTH 1 +#define CCAM3_TEMP_VCC_MONITOR_EXT_TEMP_CONTROL_EXT_TEMP_MONITOR_EN_DEFAULT 0x00000000 +#define CCAM3_TEMP_VCC_MONITOR_EXT_TEMP_CONTROL_EXT_TEMP_MONITOR_SPI_EN_BIT_IDX 2 +#define CCAM3_TEMP_VCC_MONITOR_EXT_TEMP_CONTROL_EXT_TEMP_MONITOR_SPI_EN_WIDTH 1 +#define CCAM3_TEMP_VCC_MONITOR_EXT_TEMP_CONTROL_EXT_TEMP_MONITOR_SPI_EN_DEFAULT 0x00000000 + +#define CCAM3_TEMP_VCC_MONITOR_EVK_EXT_TEMP_VALUE_ADDR 0x0000014C +#define CCAM3_TEMP_VCC_MONITOR_EVK_EXT_TEMP_VALUE_BIT_IDX 0 +#define CCAM3_TEMP_VCC_MONITOR_EVK_EXT_TEMP_VALUE_WIDTH 22 +#define CCAM3_TEMP_VCC_MONITOR_EVK_EXT_TEMP_VALUE_DEFAULT 0x00000000 + +//------------------------------------------------------------------------------------------------------------ +// CCAM3_ATIS_IF_MONITOR +//------------------------------------------------------------------------------------------------------------ + +#define CCAM3_ATIS_IF_MONITOR_BASE_ADDR 0x00000180 +#define CCAM3_ATIS_IF_MONITOR_LAST_ADDR 0x0000018C +#define CCAM3_ATIS_IF_MONITOR_SIZE 0x00000020 + +#define CCAM3_ATIS_IF_MONITOR_CFG_ENABLE_ADDR \ + 0x00000180 // Controls the enable/disable of individual ATIS I/F Monitor's periodic events and alarms. +#define CCAM3_ATIS_IF_MONITOR_CFG_ENABLE_ALL_EVT_BIT_IDX 0 +#define CCAM3_ATIS_IF_MONITOR_CFG_ENABLE_ALL_EVT_WIDTH 1 +#define CCAM3_ATIS_IF_MONITOR_CFG_ENABLE_ALL_EVT_DEFAULT 0x00000000 +#define CCAM3_ATIS_IF_MONITOR_CFG_ENABLE_TD_IDLE_TIME_EVT_BIT_IDX 1 +#define CCAM3_ATIS_IF_MONITOR_CFG_ENABLE_TD_IDLE_TIME_EVT_WIDTH 1 +#define CCAM3_ATIS_IF_MONITOR_CFG_ENABLE_TD_IDLE_TIME_EVT_DEFAULT 0x00000000 +#define CCAM3_ATIS_IF_MONITOR_CFG_ENABLE_TD_IDLE_TIMEOUT_EVT_BIT_IDX 2 +#define CCAM3_ATIS_IF_MONITOR_CFG_ENABLE_TD_IDLE_TIMEOUT_EVT_WIDTH 1 +#define CCAM3_ATIS_IF_MONITOR_CFG_ENABLE_TD_IDLE_TIMEOUT_EVT_DEFAULT 0x00000000 +#define CCAM3_ATIS_IF_MONITOR_CFG_ENABLE_APS_IDLE_TIME_EVT_BIT_IDX 3 +#define CCAM3_ATIS_IF_MONITOR_CFG_ENABLE_APS_IDLE_TIME_EVT_WIDTH 1 +#define CCAM3_ATIS_IF_MONITOR_CFG_ENABLE_APS_IDLE_TIME_EVT_DEFAULT 0x00000000 +#define CCAM3_ATIS_IF_MONITOR_CFG_ENABLE_APS_IDLE_TIMEOUT_EVT_BIT_IDX 4 +#define CCAM3_ATIS_IF_MONITOR_CFG_ENABLE_APS_IDLE_TIMEOUT_EVT_WIDTH 1 +#define CCAM3_ATIS_IF_MONITOR_CFG_ENABLE_APS_IDLE_TIMEOUT_EVT_DEFAULT 0x00000000 +#define CCAM3_ATIS_IF_MONITOR_CFG_ENABLE_GLOBAL_ILLUMINATION_EVT_BIT_IDX 5 +#define CCAM3_ATIS_IF_MONITOR_CFG_ENABLE_GLOBAL_ILLUMINATION_EVT_WIDTH 1 +#define CCAM3_ATIS_IF_MONITOR_CFG_ENABLE_GLOBAL_ILLUMINATION_EVT_DEFAULT 0x00000000 + +#define CCAM3_ATIS_IF_MONITOR_CFG_IDLE_TIME_THR_ADDR \ + 0x00000184 // Sets the threshold time value in us after which {MASTER|SLAVE}_ATIS_{TD|APS}_IDLE_TIME events are + // sent. These events determine the amount of time between two consecutive events in the respective + // channel if such time is above the threshold. +#define CCAM3_ATIS_IF_MONITOR_CFG_IDLE_TIME_THR_VALUE_BIT_IDX 0 +#define CCAM3_ATIS_IF_MONITOR_CFG_IDLE_TIME_THR_VALUE_WIDTH 26 +#define CCAM3_ATIS_IF_MONITOR_CFG_IDLE_TIME_THR_VALUE_DEFAULT 0x00002710 + +#define CCAM3_ATIS_IF_MONITOR_CFG_IDLE_TIMEOUT_THR_ADDR \ + 0x00000188 // Sets the threshold time value in us after which {MASTER|SLAVE}_ATIS_{TD|APS}_IDLE_TIMEOUT events are + // sent. These events notify the host that the monitored channel has been inactive beyond this time + // threshold. +#define CCAM3_ATIS_IF_MONITOR_CFG_IDLE_TIMEOUT_THR_VALUE_BIT_IDX 0 +#define CCAM3_ATIS_IF_MONITOR_CFG_IDLE_TIMEOUT_THR_VALUE_WIDTH 26 +#define CCAM3_ATIS_IF_MONITOR_CFG_IDLE_TIMEOUT_THR_VALUE_DEFAULT 0x00002710 + +#define CCAM3_ATIS_IF_MONITOR_STAT_GLOBAL_ILLUMINATION_ADDR 0x0000018C +#define CCAM3_ATIS_IF_MONITOR_STAT_GLOBAL_ILLUMINATION_DATA_BIT_IDX 0 +#define CCAM3_ATIS_IF_MONITOR_STAT_GLOBAL_ILLUMINATION_DATA_WIDTH 26 +#define CCAM3_ATIS_IF_MONITOR_STAT_GLOBAL_ILLUMINATION_DATA_DEFAULT 0x00000000 +#define CCAM3_ATIS_IF_MONITOR_STAT_GLOBAL_ILLUMINATION_VALID_BIT_IDX 31 +#define CCAM3_ATIS_IF_MONITOR_STAT_GLOBAL_ILLUMINATION_VALID_WIDTH 1 +#define CCAM3_ATIS_IF_MONITOR_STAT_GLOBAL_ILLUMINATION_VALID_DEFAULT 0x00000000 + +//------------------------------------------------------------------------------------------------------------ +// CCAM3_SYSTEM_MONITOR_EXT_TRIGGERS +//------------------------------------------------------------------------------------------------------------ + +#define CCAM3_SYSTEM_MONITOR_EXT_TRIGGERS_BASE_ADDR 0x000001A0 +#define CCAM3_SYSTEM_MONITOR_EXT_TRIGGERS_LAST_ADDR 0x000001AC +#define CCAM3_SYSTEM_MONITOR_EXT_TRIGGERS_SIZE 0x00000020 + +#define CCAM3_SYSTEM_MONITOR_EXT_TRIGGERS_ENABLE_ADDR 0x000001A0 +#define CCAM3_SYSTEM_MONITOR_EXT_TRIGGERS_ENABLE_VALUE_BIT_IDX 0 +#define CCAM3_SYSTEM_MONITOR_EXT_TRIGGERS_ENABLE_VALUE_WIDTH 1 +#define CCAM3_SYSTEM_MONITOR_EXT_TRIGGERS_ENABLE_VALUE_DEFAULT 0x00000000 + +#define CCAM3_SYSTEM_MONITOR_EXT_TRIGGERS_OUT_ENABLE_ADDR 0x000001A4 +#define CCAM3_SYSTEM_MONITOR_EXT_TRIGGERS_OUT_ENABLE_VALUE_BIT_IDX 0 +#define CCAM3_SYSTEM_MONITOR_EXT_TRIGGERS_OUT_ENABLE_VALUE_WIDTH 1 +#define CCAM3_SYSTEM_MONITOR_EXT_TRIGGERS_OUT_ENABLE_VALUE_DEFAULT 0x00000000 + +#define CCAM3_SYSTEM_MONITOR_EXT_TRIGGERS_OUT_PULSE_PERIOD_ADDR 0x000001A8 +#define CCAM3_SYSTEM_MONITOR_EXT_TRIGGERS_OUT_PULSE_PERIOD_BIT_IDX 0 +#define CCAM3_SYSTEM_MONITOR_EXT_TRIGGERS_OUT_PULSE_PERIOD_WIDTH 32 +#define CCAM3_SYSTEM_MONITOR_EXT_TRIGGERS_OUT_PULSE_PERIOD_DEFAULT 0x00000064 + +#define CCAM3_SYSTEM_MONITOR_EXT_TRIGGERS_OUT_PULSE_WIDTH_ADDR 0x000001AC +#define CCAM3_SYSTEM_MONITOR_EXT_TRIGGERS_OUT_PULSE_WIDTH_BIT_IDX 0 +#define CCAM3_SYSTEM_MONITOR_EXT_TRIGGERS_OUT_PULSE_WIDTH_WIDTH 32 +#define CCAM3_SYSTEM_MONITOR_EXT_TRIGGERS_OUT_PULSE_WIDTH_DEFAULT 0x00000001 + +//------------------------------------------------------------------------------------------------------------ +// CCAM3_SENSOR_IF +//------------------------------------------------------------------------------------------------------------ + +#define CCAM3_SENSOR_IF_BASE_ADDR 0x00000200 +#define CCAM3_SENSOR_IF_LAST_ADDR 0x00000750 +#define CCAM3_SENSOR_IF_SIZE 0x00000600 + +//------------------------------------------------------------------------------------------------------------ +// CCAM3_SISLEY +//------------------------------------------------------------------------------------------------------------ + +#define CCAM3_SISLEY_BASE_ADDR 0x00000200 +#define CCAM3_SISLEY_LAST_ADDR 0x0000073C +#define CCAM3_SISLEY_SIZE 0x00000540 + +//------------------------------------------------------------------------------------------------------------ +// SENSOR - Global CTRL +//------------------------------------------------------------------------------------------------------------ + +#define CCAM3_SISLEY_SENSOR_GLOBAL_CTRL_ADDR 0x00000200 +#define CCAM3_SISLEY_SENSOR_GLOBAL_CTRL_TD_COUPLE_CTRL_BIT_IDX \ + 0 // Enable ATIS em + // 0: td events do not trigger em events + // 1: td events trigger em events +#define CCAM3_SISLEY_SENSOR_GLOBAL_CTRL_TD_COUPLE_CTRL_WIDTH 1 +#define CCAM3_SISLEY_SENSOR_GLOBAL_CTRL_TD_COUPLE_CTRL_DEFAULT 0x00000000 +#define CCAM3_SISLEY_SENSOR_GLOBAL_CTRL_SW_GLOBAL_EN_BIT_IDX \ + 1 // Global enable for the analog. Used in glue logic with block level reset. + // 0: hold analog in reset + // 1: analog can be enabled +#define CCAM3_SISLEY_SENSOR_GLOBAL_CTRL_SW_GLOBAL_EN_WIDTH 1 +#define CCAM3_SISLEY_SENSOR_GLOBAL_CTRL_SW_GLOBAL_EN_DEFAULT 0x00000000 +#define CCAM3_SISLEY_SENSOR_GLOBAL_CTRL_BYPASS_DIGITAL_READOUT_CTRL_BIT_IDX \ + 2 // Enable the readout fast path to route async interface directly to the digital output: + // 0: digital readout is functional + // 1: digital readout is bypassed +#define CCAM3_SISLEY_SENSOR_GLOBAL_CTRL_BYPASS_DIGITAL_READOUT_CTRL_WIDTH 1 +#define CCAM3_SISLEY_SENSOR_GLOBAL_CTRL_BYPASS_DIGITAL_READOUT_CTRL_DEFAULT 0x00000000 +#define CCAM3_SISLEY_SENSOR_GLOBAL_CTRL_BGEN_RST_BIT_IDX \ + 3 // BIAS reset + // 0: biases connected to their reset values + // 1: biases connected to their bias generator +#define CCAM3_SISLEY_SENSOR_GLOBAL_CTRL_BGEN_RST_WIDTH 1 +#define CCAM3_SISLEY_SENSOR_GLOBAL_CTRL_BGEN_RST_DEFAULT 0x00000000 +#define CCAM3_SISLEY_SENSOR_GLOBAL_CTRL_BGEN_EN_BIT_IDX \ + 4 // BIAS enable + // 0: disable PTAT of bias generators + // 1: enable PTAT of bias generators +#define CCAM3_SISLEY_SENSOR_GLOBAL_CTRL_BGEN_EN_WIDTH 1 +#define CCAM3_SISLEY_SENSOR_GLOBAL_CTRL_BGEN_EN_DEFAULT 0x00000000 +#define CCAM3_SISLEY_SENSOR_GLOBAL_CTRL_TOP_CLK_DIV_EN_BIT_IDX 5 // Enable the digital core clock frequency divider +#define CCAM3_SISLEY_SENSOR_GLOBAL_CTRL_TOP_CLK_DIV_EN_WIDTH 1 +#define CCAM3_SISLEY_SENSOR_GLOBAL_CTRL_TOP_CLK_DIV_EN_DEFAULT 0x00000000 +#define CCAM3_SISLEY_SENSOR_GLOBAL_CTRL_TOP_CLK_DIV_FACTOR_BIT_IDX \ + 6 // Devide frequency: + // 1: 2-factor + // 2: 4-factor + // 4: 8-factor(these 3 bits are supposed to be one-hot (aka only one divider factor must be selected). If it's not + // the case the lowest one wins) +#define CCAM3_SISLEY_SENSOR_GLOBAL_CTRL_TOP_CLK_DIV_FACTOR_WIDTH 3 +#define CCAM3_SISLEY_SENSOR_GLOBAL_CTRL_TOP_CLK_DIV_FACTOR_DEFAULT 0x00000000 + +#define CCAM3_SISLEY_SENSOR_ROI_CTRL_ADDR 0x00000204 +#define CCAM3_SISLEY_SENSOR_ROI_CTRL_ROI_EM_EN_BIT_IDX \ + 0 // Enable ROI EM + // 0 : EM full array + // 1 : EM ROI +#define CCAM3_SISLEY_SENSOR_ROI_CTRL_ROI_EM_EN_WIDTH 1 +#define CCAM3_SISLEY_SENSOR_ROI_CTRL_ROI_EM_EN_DEFAULT 0x00000000 +#define CCAM3_SISLEY_SENSOR_ROI_CTRL_ROI_TD_EN_BIT_IDX \ + 1 // Enable ROI TD + // 0 : TD full array + // 1 : TD ROI +#define CCAM3_SISLEY_SENSOR_ROI_CTRL_ROI_TD_EN_WIDTH 1 +#define CCAM3_SISLEY_SENSOR_ROI_CTRL_ROI_TD_EN_DEFAULT 0x00000000 +#define CCAM3_SISLEY_SENSOR_ROI_CTRL_ROI_EM_SHUTTER_BIT_IDX 2 // 1: Resets the whole EM ROI X and Y arrays +#define CCAM3_SISLEY_SENSOR_ROI_CTRL_ROI_EM_SHUTTER_WIDTH 1 +#define CCAM3_SISLEY_SENSOR_ROI_CTRL_ROI_EM_SHUTTER_DEFAULT 0x00000001 +#define CCAM3_SISLEY_SENSOR_ROI_CTRL_ROI_TD_RSTN_BIT_IDX 3 // 0: Resets the whole TD ROI X and Y arrays +#define CCAM3_SISLEY_SENSOR_ROI_CTRL_ROI_TD_RSTN_WIDTH 1 +#define CCAM3_SISLEY_SENSOR_ROI_CTRL_ROI_TD_RSTN_DEFAULT 0x00000001 +#define CCAM3_SISLEY_SENSOR_ROI_CTRL_ROI_EM_SHADOW_TRIGGER_BIT_IDX \ + 4 // Latch the configured ROI EM into the shadow register +#define CCAM3_SISLEY_SENSOR_ROI_CTRL_ROI_EM_SHADOW_TRIGGER_WIDTH 1 +#define CCAM3_SISLEY_SENSOR_ROI_CTRL_ROI_EM_SHADOW_TRIGGER_DEFAULT 0x00000000 +#define CCAM3_SISLEY_SENSOR_ROI_CTRL_ROI_TD_SHADOW_TRIGGER_BIT_IDX \ + 5 // Latch the configured ROI TD into the shadow register +#define CCAM3_SISLEY_SENSOR_ROI_CTRL_ROI_TD_SHADOW_TRIGGER_WIDTH 1 +#define CCAM3_SISLEY_SENSOR_ROI_CTRL_ROI_TD_SHADOW_TRIGGER_DEFAULT 0x00000000 +#define CCAM3_SISLEY_SENSOR_ROI_CTRL_ROI_RONI_EN_BIT_IDX \ + 6 // The content of the roi register must be intepreted as RONI actually, RONI output is driven by the shadow + // registers, while ROI output pins are reset For now only roi_td_X shadow register is affected by this + // modification +#define CCAM3_SISLEY_SENSOR_ROI_CTRL_ROI_RONI_EN_WIDTH 1 +#define CCAM3_SISLEY_SENSOR_ROI_CTRL_ROI_RONI_EN_DEFAULT 0x00000000 +#define CCAM3_SISLEY_SENSOR_ROI_CTRL_ROI_EM_SCAN_EN_BIT_IDX \ + 7 // Any modification applied to roi em register is directly forwarded to the corresponding shadow register +#define CCAM3_SISLEY_SENSOR_ROI_CTRL_ROI_EM_SCAN_EN_WIDTH 1 +#define CCAM3_SISLEY_SENSOR_ROI_CTRL_ROI_EM_SCAN_EN_DEFAULT 0x00000000 +#define CCAM3_SISLEY_SENSOR_ROI_CTRL_ROI_TD_SCAN_EN_BIT_IDX \ + 8 // Any modification applied to roi td register is directly forwarded to the corresponding shadow register +#define CCAM3_SISLEY_SENSOR_ROI_CTRL_ROI_TD_SCAN_EN_WIDTH 1 +#define CCAM3_SISLEY_SENSOR_ROI_CTRL_ROI_TD_SCAN_EN_DEFAULT 0x00000000 + +#define CCAM3_SISLEY_SENSOR_READOUT_CTRL_ADDR 0x00000208 +#define CCAM3_SISLEY_SENSOR_READOUT_CTRL_RO_DELAY_RSTN_BIT_IDX \ + 0 // Resets tunable delay of the state machine + // 1: functional | 0: reset +#define CCAM3_SISLEY_SENSOR_READOUT_CTRL_RO_DELAY_RSTN_WIDTH 1 +#define CCAM3_SISLEY_SENSOR_READOUT_CTRL_RO_DELAY_RSTN_DEFAULT 0x00000001 +#define CCAM3_SISLEY_SENSOR_READOUT_CTRL_RO_INTERFACE_X_RSTN_BIT_IDX \ + 1 // Resets X interface of the state machine + // 1: functional | 0: reset +#define CCAM3_SISLEY_SENSOR_READOUT_CTRL_RO_INTERFACE_X_RSTN_WIDTH 1 +#define CCAM3_SISLEY_SENSOR_READOUT_CTRL_RO_INTERFACE_X_RSTN_DEFAULT 0x00000001 +#define CCAM3_SISLEY_SENSOR_READOUT_CTRL_RO_LATCH_Y_RSTN_BIT_IDX \ + 2 // Resets Y output latches td_y<9:0> + // 1: functional | 0: reset +#define CCAM3_SISLEY_SENSOR_READOUT_CTRL_RO_LATCH_Y_RSTN_WIDTH 1 +#define CCAM3_SISLEY_SENSOR_READOUT_CTRL_RO_LATCH_Y_RSTN_DEFAULT 0x00000001 +#define CCAM3_SISLEY_SENSOR_READOUT_CTRL_RO_ACK_ARRAY_RSTN_BIT_IDX \ + 3 // Resets array acknowledge of the state machine + // 1: functional | 0: reset +#define CCAM3_SISLEY_SENSOR_READOUT_CTRL_RO_ACK_ARRAY_RSTN_WIDTH 1 +#define CCAM3_SISLEY_SENSOR_READOUT_CTRL_RO_ACK_ARRAY_RSTN_DEFAULT 0x00000001 +#define CCAM3_SISLEY_SENSOR_READOUT_CTRL_RO_CTRL_RSTN_BIT_IDX \ + 4 // Resets control state machine + // 1: functional | 0: reset +#define CCAM3_SISLEY_SENSOR_READOUT_CTRL_RO_CTRL_RSTN_WIDTH 1 +#define CCAM3_SISLEY_SENSOR_READOUT_CTRL_RO_CTRL_RSTN_DEFAULT 0x00000001 +#define CCAM3_SISLEY_SENSOR_READOUT_CTRL_RO_LATCH_DUM_CONNECT_CTRL_BIT_IDX \ + 5 // Connects dummy latch to req x or b + // 0: disconnected | 1: connected +#define CCAM3_SISLEY_SENSOR_READOUT_CTRL_RO_LATCH_DUM_CONNECT_CTRL_WIDTH 1 +#define CCAM3_SISLEY_SENSOR_READOUT_CTRL_RO_LATCH_DUM_CONNECT_CTRL_DEFAULT 0x00000001 +#define CCAM3_SISLEY_SENSOR_READOUT_CTRL_RO_LATCH_DUM_RSTN_BIT_IDX \ + 6 // Resets dummy latch + // 1: functional | 0: reset +#define CCAM3_SISLEY_SENSOR_READOUT_CTRL_RO_LATCH_DUM_RSTN_WIDTH 1 +#define CCAM3_SISLEY_SENSOR_READOUT_CTRL_RO_LATCH_DUM_RSTN_DEFAULT 0x00000001 +#define CCAM3_SISLEY_SENSOR_READOUT_CTRL_RO_PIXEL_DUM_RSTN_BIT_IDX \ + 7 // Resets dummy pixel + // 1: functional | 0: reset +#define CCAM3_SISLEY_SENSOR_READOUT_CTRL_RO_PIXEL_DUM_RSTN_WIDTH 1 +#define CCAM3_SISLEY_SENSOR_READOUT_CTRL_RO_PIXEL_DUM_RSTN_DEFAULT 0x00000001 +#define CCAM3_SISLEY_SENSOR_READOUT_CTRL_RO_INTERFACE_Y_RSTN_BIT_IDX \ + 8 // Resets Y interface of the state machine + // 1: functional | 0: rese +#define CCAM3_SISLEY_SENSOR_READOUT_CTRL_RO_INTERFACE_Y_RSTN_WIDTH 1 +#define CCAM3_SISLEY_SENSOR_READOUT_CTRL_RO_INTERFACE_Y_RSTN_DEFAULT 0x00000001 +#define CCAM3_SISLEY_SENSOR_READOUT_CTRL_RO_LATCH_X_RSTN_BIT_IDX \ + 9 // Resets X latches + // 1: functional | 0: reset +#define CCAM3_SISLEY_SENSOR_READOUT_CTRL_RO_LATCH_X_RSTN_WIDTH 1 +#define CCAM3_SISLEY_SENSOR_READOUT_CTRL_RO_LATCH_X_RSTN_DEFAULT 0x00000001 +#define CCAM3_SISLEY_SENSOR_READOUT_CTRL_RO_STAT_X_CTRL_BIT_IDX \ + 10 // Activates X statitizers + // 0: inverter + // 1: statitizer +#define CCAM3_SISLEY_SENSOR_READOUT_CTRL_RO_STAT_X_CTRL_WIDTH 1 +#define CCAM3_SISLEY_SENSOR_READOUT_CTRL_RO_STAT_X_CTRL_DEFAULT 0x00000001 +#define CCAM3_SISLEY_SENSOR_READOUT_CTRL_RO_ACT_PUX_CTRL_BIT_IDX \ + 11 // Activates X active pull-ups with drive strength 'bit' + // 0: active pull drive 1 disabled + // 1: active pull drive 1 enabled + // bit11:+1 strength + // bit12:+2 strength + // bit13:+4 strength +#define CCAM3_SISLEY_SENSOR_READOUT_CTRL_RO_ACT_PUX_CTRL_WIDTH 3 +#define CCAM3_SISLEY_SENSOR_READOUT_CTRL_RO_ACT_PUX_CTRL_DEFAULT 0x00000003 +#define CCAM3_SISLEY_SENSOR_READOUT_CTRL_RO_STAT_Y_CTRL_BIT_IDX 14 // Activates Y statitizers 0: inverter 1: statitizer +#define CCAM3_SISLEY_SENSOR_READOUT_CTRL_RO_STAT_Y_CTRL_WIDTH 1 +#define CCAM3_SISLEY_SENSOR_READOUT_CTRL_RO_STAT_Y_CTRL_DEFAULT 0x00000001 +#define CCAM3_SISLEY_SENSOR_READOUT_CTRL_RO_ACT_PUY_CTRL_BIT_IDX \ + 15 // Activates Y active pull-ups 0: active pull disabled 1: active pull enabled +#define CCAM3_SISLEY_SENSOR_READOUT_CTRL_RO_ACT_PUY_CTRL_WIDTH 1 +#define CCAM3_SISLEY_SENSOR_READOUT_CTRL_RO_ACT_PUY_CTRL_DEFAULT 0x00000001 +#define CCAM3_SISLEY_SENSOR_READOUT_CTRL_RO_PIPELINE_CTRL_BIT_IDX \ + 16 // Activate row pipeline 0: pipeline disbaled 1: pipeline enabled +#define CCAM3_SISLEY_SENSOR_READOUT_CTRL_RO_PIPELINE_CTRL_WIDTH 1 +#define CCAM3_SISLEY_SENSOR_READOUT_CTRL_RO_PIPELINE_CTRL_DEFAULT 0x00000001 +#define CCAM3_SISLEY_SENSOR_READOUT_CTRL_RO_ACT_PDY_CTRL_BIT_IDX \ + 17 // bit17 - 0: no act pull down on req y - strength 1 + // bit18 - 0: no act pull down on req y - strength 2 + // bit19 - 0: no act pull down on req y - strength 4 +#define CCAM3_SISLEY_SENSOR_READOUT_CTRL_RO_ACT_PDY_CTRL_WIDTH 3 +#define CCAM3_SISLEY_SENSOR_READOUT_CTRL_RO_ACT_PDY_CTRL_DEFAULT 0x00000003 +#define CCAM3_SISLEY_SENSOR_READOUT_CTRL_RO_ACT_PDX_CTRL_BIT_IDX \ + 20 // bit20 - 0: no act pull down on req x - strength 1 + // bit21 - 0: no act pull down on req x - strength 2 + // bit22 - 0: no act pull down on req x - strength 4 +#define CCAM3_SISLEY_SENSOR_READOUT_CTRL_RO_ACT_PDX_CTRL_WIDTH 3 +#define CCAM3_SISLEY_SENSOR_READOUT_CTRL_RO_ACT_PDX_CTRL_DEFAULT 0x00000003 +#define CCAM3_SISLEY_SENSOR_READOUT_CTRL_RO_INV_REQ_EM_CTRL_BIT_IDX 23 // 0: req x active high 1: req x active low +#define CCAM3_SISLEY_SENSOR_READOUT_CTRL_RO_INV_REQ_EM_CTRL_WIDTH 1 +#define CCAM3_SISLEY_SENSOR_READOUT_CTRL_RO_INV_REQ_EM_CTRL_DEFAULT 0x00000000 +#define CCAM3_SISLEY_SENSOR_READOUT_CTRL_RO_INV_POL_EM_CTRL_BIT_IDX \ + 24 // 0: 0 = on event | 1 = off event 1: 0 = off event | 0 = on event +#define CCAM3_SISLEY_SENSOR_READOUT_CTRL_RO_INV_POL_EM_CTRL_WIDTH 1 +#define CCAM3_SISLEY_SENSOR_READOUT_CTRL_RO_INV_POL_EM_CTRL_DEFAULT 0x00000000 +#define CCAM3_SISLEY_SENSOR_READOUT_CTRL_RO_INV_ACK_EM_CTRL_BIT_IDX 25 // 0: ackb active low 1: ackb active high +#define CCAM3_SISLEY_SENSOR_READOUT_CTRL_RO_INV_ACK_EM_CTRL_WIDTH 1 +#define CCAM3_SISLEY_SENSOR_READOUT_CTRL_RO_INV_ACK_EM_CTRL_DEFAULT 0x00000000 +#define CCAM3_SISLEY_SENSOR_READOUT_CTRL_RO_INV_REQ_TD_CTRL_BIT_IDX 26 // 0: req x active high 1: req x active low +#define CCAM3_SISLEY_SENSOR_READOUT_CTRL_RO_INV_REQ_TD_CTRL_WIDTH 1 +#define CCAM3_SISLEY_SENSOR_READOUT_CTRL_RO_INV_REQ_TD_CTRL_DEFAULT 0x00000000 +#define CCAM3_SISLEY_SENSOR_READOUT_CTRL_RO_INV_POL_TD_CTRL_BIT_IDX \ + 27 // 0: 0 = on event | 1 = off event 1: 0 = off event | 0 = on event +#define CCAM3_SISLEY_SENSOR_READOUT_CTRL_RO_INV_POL_TD_CTRL_WIDTH 1 +#define CCAM3_SISLEY_SENSOR_READOUT_CTRL_RO_INV_POL_TD_CTRL_DEFAULT 0x00000000 +#define CCAM3_SISLEY_SENSOR_READOUT_CTRL_RO_INV_ACK_TD_CTRL_BIT_IDX 28 // 0: ackb active low 1: ackb active high +#define CCAM3_SISLEY_SENSOR_READOUT_CTRL_RO_INV_ACK_TD_CTRL_WIDTH 1 +#define CCAM3_SISLEY_SENSOR_READOUT_CTRL_RO_INV_ACK_TD_CTRL_DEFAULT 0x00000000 + +#define CCAM3_SISLEY_SENSOR_TESTBUS_CTRL_ADDR 0x0000020C +#define CCAM3_SISLEY_SENSOR_TESTBUS_CTRL_TP_SEL_TEST_PHOTODIODE_BIT_IDX \ + 0 // Selects either test pixel with photodiode or test pixel with current input + // 0: test pixel with current input | 1: test pixel with photodiode +#define CCAM3_SISLEY_SENSOR_TESTBUS_CTRL_TP_SEL_TEST_PHOTODIODE_WIDTH 1 +#define CCAM3_SISLEY_SENSOR_TESTBUS_CTRL_TP_SEL_TEST_PHOTODIODE_DEFAULT 0x00000000 +#define CCAM3_SISLEY_SENSOR_TESTBUS_CTRL_TP_DIODE_BIT_IDX 1 // Test pixel control signal- Not used +#define CCAM3_SISLEY_SENSOR_TESTBUS_CTRL_TP_DIODE_WIDTH 1 +#define CCAM3_SISLEY_SENSOR_TESTBUS_CTRL_TP_DIODE_DEFAULT 0x00000000 +#define CCAM3_SISLEY_SENSOR_TESTBUS_CTRL_TP_DIODE_TL_BIT_IDX 2 // Top-left test pixel control signal +#define CCAM3_SISLEY_SENSOR_TESTBUS_CTRL_TP_DIODE_TL_WIDTH 1 +#define CCAM3_SISLEY_SENSOR_TESTBUS_CTRL_TP_DIODE_TL_DEFAULT 0x00000000 +#define CCAM3_SISLEY_SENSOR_TESTBUS_CTRL_TP_DIODE_TR_BIT_IDX 3 // Top-right test pixel control signal +#define CCAM3_SISLEY_SENSOR_TESTBUS_CTRL_TP_DIODE_TR_WIDTH 1 +#define CCAM3_SISLEY_SENSOR_TESTBUS_CTRL_TP_DIODE_TR_DEFAULT 0x00000000 +#define CCAM3_SISLEY_SENSOR_TESTBUS_CTRL_TP_DIODE_BR_BIT_IDX 4 // Bottom right test pixel control signal +#define CCAM3_SISLEY_SENSOR_TESTBUS_CTRL_TP_DIODE_BR_WIDTH 1 +#define CCAM3_SISLEY_SENSOR_TESTBUS_CTRL_TP_DIODE_BR_DEFAULT 0x00000000 +#define CCAM3_SISLEY_SENSOR_TESTBUS_CTRL_TP_DIODE_BL_BIT_IDX 5 // Bottom left test pixel control signal +#define CCAM3_SISLEY_SENSOR_TESTBUS_CTRL_TP_DIODE_BL_WIDTH 1 +#define CCAM3_SISLEY_SENSOR_TESTBUS_CTRL_TP_DIODE_BL_DEFAULT 0x00000000 +#define CCAM3_SISLEY_SENSOR_TESTBUS_CTRL_TP_PHOTODIODE_EN_BIT_IDX \ + 6 // Test pixel enable, see datasheet(11.1.2.4.1 - Table 2) +#define CCAM3_SISLEY_SENSOR_TESTBUS_CTRL_TP_PHOTODIODE_EN_WIDTH 1 +#define CCAM3_SISLEY_SENSOR_TESTBUS_CTRL_TP_PHOTODIODE_EN_DEFAULT 0x00000001 +#define CCAM3_SISLEY_SENSOR_TESTBUS_CTRL_TP_EN_BIT_IDX 7 // Test pixel enable, see datasheet(11.1.2.4.1 - Table 2) +#define CCAM3_SISLEY_SENSOR_TESTBUS_CTRL_TP_EN_WIDTH 1 +#define CCAM3_SISLEY_SENSOR_TESTBUS_CTRL_TP_EN_DEFAULT 0x00000000 +#define CCAM3_SISLEY_SENSOR_TESTBUS_CTRL_TBUS_SEL_TPA1_BIT_IDX 8 // See datasheet(11.1.2.4.2 - Table 3) +#define CCAM3_SISLEY_SENSOR_TESTBUS_CTRL_TBUS_SEL_TPA1_WIDTH 4 +#define CCAM3_SISLEY_SENSOR_TESTBUS_CTRL_TBUS_SEL_TPA1_DEFAULT 0x00000000 +#define CCAM3_SISLEY_SENSOR_TESTBUS_CTRL_TBUS_SEL_TPA2_BIT_IDX 12 // See datasheet(11.1.2.4.2 - Table 3) +#define CCAM3_SISLEY_SENSOR_TESTBUS_CTRL_TBUS_SEL_TPA2_WIDTH 4 +#define CCAM3_SISLEY_SENSOR_TESTBUS_CTRL_TBUS_SEL_TPA2_DEFAULT 0x00000000 +#define CCAM3_SISLEY_SENSOR_TESTBUS_CTRL_TBUS_SEL_TPA3_BIT_IDX 16 // See datasheet(11.1.2.4.2 - Table 3) +#define CCAM3_SISLEY_SENSOR_TESTBUS_CTRL_TBUS_SEL_TPA3_WIDTH 4 +#define CCAM3_SISLEY_SENSOR_TESTBUS_CTRL_TBUS_SEL_TPA3_DEFAULT 0x00000000 +#define CCAM3_SISLEY_SENSOR_TESTBUS_CTRL_TBUS_SEL_TPA4_BIT_IDX 20 // See datasheet(11.1.2.4.2 - Table 3) +#define CCAM3_SISLEY_SENSOR_TESTBUS_CTRL_TBUS_SEL_TPA4_WIDTH 4 +#define CCAM3_SISLEY_SENSOR_TESTBUS_CTRL_TBUS_SEL_TPA4_DEFAULT 0x00000000 +#define CCAM3_SISLEY_SENSOR_TESTBUS_CTRL_TBUS_SEL_TPD1_BIT_IDX 24 // See datasheet(11.1.2.4.3 - Table 4 and Figure 10) +#define CCAM3_SISLEY_SENSOR_TESTBUS_CTRL_TBUS_SEL_TPD1_WIDTH 4 +#define CCAM3_SISLEY_SENSOR_TESTBUS_CTRL_TBUS_SEL_TPD1_DEFAULT 0x00000000 +#define CCAM3_SISLEY_SENSOR_TESTBUS_CTRL_TBUS_SEL_TPD2_BIT_IDX 28 // See datasheet(11.1.2.4.3 - Table 4 and Figure 10) +#define CCAM3_SISLEY_SENSOR_TESTBUS_CTRL_TBUS_SEL_TPD2_WIDTH 4 +#define CCAM3_SISLEY_SENSOR_TESTBUS_CTRL_TBUS_SEL_TPD2_DEFAULT 0x00000000 + +#define CCAM3_SISLEY_SENSOR_CLKSYNC_CTRL_ADDR 0x00000210 +#define CCAM3_SISLEY_SENSOR_CLKSYNC_CTRL_CLK_OUT_EN_BIT_IDX \ + 0 // enable clk at the output of the sensor towards the external interface (not the digital digital) + // 0: clk_out is active, tied to ground + // 1: clk_out is active, always on as soon as there is clk_in available +#define CCAM3_SISLEY_SENSOR_CLKSYNC_CTRL_CLK_OUT_EN_WIDTH 1 +#define CCAM3_SISLEY_SENSOR_CLKSYNC_CTRL_CLK_OUT_EN_DEFAULT 0x00000001 +#define CCAM3_SISLEY_SENSOR_CLKSYNC_CTRL_CLK_DIFF_HI_CM_CTRL_BIT_IDX \ + 1 // Setting to accommodate high common mode value in differential mode (1.4 V) +#define CCAM3_SISLEY_SENSOR_CLKSYNC_CTRL_CLK_DIFF_HI_CM_CTRL_WIDTH 1 +#define CCAM3_SISLEY_SENSOR_CLKSYNC_CTRL_CLK_DIFF_HI_CM_CTRL_DEFAULT 0x00000001 +#define CCAM3_SISLEY_SENSOR_CLKSYNC_CTRL_CLK_DIFF_IOUT_X2_CTRL_BIT_IDX \ + 2 // Setting to boost output current in differential mode +#define CCAM3_SISLEY_SENSOR_CLKSYNC_CTRL_CLK_DIFF_IOUT_X2_CTRL_WIDTH 1 +#define CCAM3_SISLEY_SENSOR_CLKSYNC_CTRL_CLK_DIFF_IOUT_X2_CTRL_DEFAULT 0x00000001 +#define CCAM3_SISLEY_SENSOR_CLKSYNC_CTRL_CLK_DC_UP_CTRL_BIT_IDX \ + 3 // Setting to shift up output voltage in differential mode +#define CCAM3_SISLEY_SENSOR_CLKSYNC_CTRL_CLK_DC_UP_CTRL_WIDTH 1 +#define CCAM3_SISLEY_SENSOR_CLKSYNC_CTRL_CLK_DC_UP_CTRL_DEFAULT 0x00000000 +#define CCAM3_SISLEY_SENSOR_CLKSYNC_CTRL_CLK_POLARITY_CTRL_BIT_IDX \ + 4 // Swap polarity of clk_out + // 0: clk_out = clk_int + // 1: clk_out = not(clk_int) +#define CCAM3_SISLEY_SENSOR_CLKSYNC_CTRL_CLK_POLARITY_CTRL_WIDTH 1 +#define CCAM3_SISLEY_SENSOR_CLKSYNC_CTRL_CLK_POLARITY_CTRL_DEFAULT 0x00000000 +#define CCAM3_SISLEY_SENSOR_CLKSYNC_CTRL_RO_STAT_REQ_X_CTRL_BIT_IDX \ + 5 // 0: req x bus has no statitizer + // 1: req x bus has a statitizer +#define CCAM3_SISLEY_SENSOR_CLKSYNC_CTRL_RO_STAT_REQ_X_CTRL_WIDTH 1 +#define CCAM3_SISLEY_SENSOR_CLKSYNC_CTRL_RO_STAT_REQ_X_CTRL_DEFAULT 0x00000000 +#define CCAM3_SISLEY_SENSOR_CLKSYNC_CTRL_RO_STAT_POL_CTRL_BIT_IDX \ + 6 // 0: polarity bus has no statitizer + // 1: polarity bus has a statitizer +#define CCAM3_SISLEY_SENSOR_CLKSYNC_CTRL_RO_STAT_POL_CTRL_WIDTH 1 +#define CCAM3_SISLEY_SENSOR_CLKSYNC_CTRL_RO_STAT_POL_CTRL_DEFAULT 0x00000000 +#define CCAM3_SISLEY_SENSOR_CLKSYNC_CTRL_RO_TD_REQ_LAT_CTRL_BIT_IDX \ + 7 // add X ns delay to the td req + // 0: no delay + // 1: ~500 ps + // 2: ~1 ns + // 3: ~2 ns + // 4: ~4 ns + // 5: ~4.5 ns + // 6: ~5 ns + // 7: ~6 ns +#define CCAM3_SISLEY_SENSOR_CLKSYNC_CTRL_RO_TD_REQ_LAT_CTRL_WIDTH 3 +#define CCAM3_SISLEY_SENSOR_CLKSYNC_CTRL_RO_TD_REQ_LAT_CTRL_DEFAULT 0x00000000 +#define CCAM3_SISLEY_SENSOR_CLKSYNC_CTRL_RO_TD_ACK_LAT_CTRL_BIT_IDX \ + 10 // add X ns delay to the td ack + // 0: no delay + // 1: ~500 ps + // 2: ~1 ns + // 3: ~2 ns + // 4: ~4 ns + // 5: ~4.5 ns + // 6: ~5 ns + // 7: ~6 ns +#define CCAM3_SISLEY_SENSOR_CLKSYNC_CTRL_RO_TD_ACK_LAT_CTRL_WIDTH 3 +#define CCAM3_SISLEY_SENSOR_CLKSYNC_CTRL_RO_TD_ACK_LAT_CTRL_DEFAULT 0x00000000 +#define CCAM3_SISLEY_SENSOR_CLKSYNC_CTRL_RO_EM_REQ_LAT_CTRL_BIT_IDX \ + 13 // add X ns delay to the em req + // 0: no delay + // 1: ~500 ps + // 2: ~1 ns + // 3: ~2 ns + // 4: ~4 ns + // 5: ~4.5 ns + // 6: ~5 ns + // 7: ~6 ns +#define CCAM3_SISLEY_SENSOR_CLKSYNC_CTRL_RO_EM_REQ_LAT_CTRL_WIDTH 3 +#define CCAM3_SISLEY_SENSOR_CLKSYNC_CTRL_RO_EM_REQ_LAT_CTRL_DEFAULT 0x00000000 +#define CCAM3_SISLEY_SENSOR_CLKSYNC_CTRL_RO_EM_ACK_LAT_CTRL_BIT_IDX \ + 16 // add X ns delay to the em ack + // 0: no delay + // 1: ~500 ps + // 2: ~1 ns + // 3: ~2 ns + // 4: ~4 ns + // 5: ~4.5 ns + // 6: ~5 ns + // 7: ~6 ns +#define CCAM3_SISLEY_SENSOR_CLKSYNC_CTRL_RO_EM_ACK_LAT_CTRL_WIDTH 3 +#define CCAM3_SISLEY_SENSOR_CLKSYNC_CTRL_RO_EM_ACK_LAT_CTRL_DEFAULT 0x00000000 + +#define CCAM3_SISLEY_SENSOR_LIFO_CTRL_ADDR 0x00000214 +#define CCAM3_SISLEY_SENSOR_LIFO_CTRL_LIFO_COUNTER_BIT_IDX \ + 0 // Pulsewidth measured value: + // Max illuminance measurement pulse = 5*E-01s, min Tclk = 1*E-08 gives a max counter of 5*E07 +#define CCAM3_SISLEY_SENSOR_LIFO_CTRL_LIFO_COUNTER_WIDTH 26 +#define CCAM3_SISLEY_SENSOR_LIFO_CTRL_LIFO_COUNTER_DEFAULT 0x00000000 +#define CCAM3_SISLEY_SENSOR_LIFO_CTRL_LIFO_COUNTER_VALID_BIT_IDX 29 // Pulsewidth measured value is valid +#define CCAM3_SISLEY_SENSOR_LIFO_CTRL_LIFO_COUNTER_VALID_WIDTH 1 +#define CCAM3_SISLEY_SENSOR_LIFO_CTRL_LIFO_COUNTER_VALID_DEFAULT 0x00000000 +#define CCAM3_SISLEY_SENSOR_LIFO_CTRL_LIFO_CNT_EN_BIT_IDX 30 // Enable pulsewidth counter +#define CCAM3_SISLEY_SENSOR_LIFO_CTRL_LIFO_CNT_EN_WIDTH 1 +#define CCAM3_SISLEY_SENSOR_LIFO_CTRL_LIFO_CNT_EN_DEFAULT 0x00000000 +#define CCAM3_SISLEY_SENSOR_LIFO_CTRL_LIFO_EN_BIT_IDX \ + 31 // Enable illuminance measurement + // 0: photocurrent measurement inactive + // 1: photocurrent measurement active +#define CCAM3_SISLEY_SENSOR_LIFO_CTRL_LIFO_EN_WIDTH 1 +#define CCAM3_SISLEY_SENSOR_LIFO_CTRL_LIFO_EN_DEFAULT 0x00000000 + +#define CCAM3_SISLEY_SENSOR_CHIP_ID_ADDR 0x00000218 +#define CCAM3_SISLEY_SENSOR_CHIP_ID_CHIP_ID_BIT_IDX 0 +#define CCAM3_SISLEY_SENSOR_CHIP_ID_CHIP_ID_WIDTH 32 +#define CCAM3_SISLEY_SENSOR_CHIP_ID_CHIP_ID_DEFAULT 0x90000402 + +#define CCAM3_SISLEY_SENSOR_SPARE_CTRL_ADDR 0x0000021C +#define CCAM3_SISLEY_SENSOR_SPARE_CTRL_RO_ADDR_Y_STAT_CTRL_BIT_IDX \ + 0 // readout - 0: no statitizer en Y addresses | 1: statitizer on every Y addresses +#define CCAM3_SISLEY_SENSOR_SPARE_CTRL_RO_ADDR_Y_STAT_CTRL_WIDTH 1 +#define CCAM3_SISLEY_SENSOR_SPARE_CTRL_RO_ADDR_Y_STAT_CTRL_DEFAULT 0x00000000 +#define CCAM3_SISLEY_SENSOR_SPARE_CTRL_RO_ADDR_X_STAT_CTRL_BIT_IDX \ + 1 // readout - 0: no statitizer en X addresses | 1: statitizer on every X addresses +#define CCAM3_SISLEY_SENSOR_SPARE_CTRL_RO_ADDR_X_STAT_CTRL_WIDTH 1 +#define CCAM3_SISLEY_SENSOR_SPARE_CTRL_RO_ADDR_X_STAT_CTRL_DEFAULT 0x00000000 +#define CCAM3_SISLEY_SENSOR_SPARE_CTRL_CLK_OUT_LAT_CTRL_BIT_IDX \ + 2 // Clk factory - + // 00: delay = 0 ps + // 01: delay = 500 ps + // 10: delay = 1 ns + // 11: delay = 2 ns +#define CCAM3_SISLEY_SENSOR_SPARE_CTRL_CLK_OUT_LAT_CTRL_WIDTH 2 +#define CCAM3_SISLEY_SENSOR_SPARE_CTRL_CLK_OUT_LAT_CTRL_DEFAULT 0x00000000 +#define CCAM3_SISLEY_SENSOR_SPARE_CTRL_RFEED_D_CTRL_BIT_IDX \ + 22 // digital biasgen -0: feedback loop of the output opamps are made of a capacitor + // 1: feedback loop of the output opamps are made of a capacitor and a resistor in series +#define CCAM3_SISLEY_SENSOR_SPARE_CTRL_RFEED_D_CTRL_WIDTH 1 +#define CCAM3_SISLEY_SENSOR_SPARE_CTRL_RFEED_D_CTRL_DEFAULT 0x00000000 +#define CCAM3_SISLEY_SENSOR_SPARE_CTRL_RFEED_A_CTRL_BIT_IDX \ + 23 // analog biasgen - 0: feedback loop of the output opamps are made of a capacitor + // 1: feedback loop of the output opamps are made of a capacitor and a resistor in series +#define CCAM3_SISLEY_SENSOR_SPARE_CTRL_RFEED_A_CTRL_WIDTH 1 +#define CCAM3_SISLEY_SENSOR_SPARE_CTRL_RFEED_A_CTRL_DEFAULT 0x00000000 +#define CCAM3_SISLEY_SENSOR_SPARE_CTRL_TP_REFR_CLK_EN_BIT_IDX \ + 24 // test pixel -0: refractory period clock is disabled | 1: refractory period clock is enabled +#define CCAM3_SISLEY_SENSOR_SPARE_CTRL_TP_REFR_CLK_EN_WIDTH 1 +#define CCAM3_SISLEY_SENSOR_SPARE_CTRL_TP_REFR_CLK_EN_DEFAULT 0x00000000 +#define CCAM3_SISLEY_SENSOR_SPARE_CTRL_TP_DARK_EN_BIT_IDX \ + 25 // test pixel -0: pr_out of dark pixel (covered by metal) is disabled | 1: pr_out of dark pixel (covered by + // metal) is enabled +#define CCAM3_SISLEY_SENSOR_SPARE_CTRL_TP_DARK_EN_WIDTH 1 +#define CCAM3_SISLEY_SENSOR_SPARE_CTRL_TP_DARK_EN_DEFAULT 0x00000000 +#define CCAM3_SISLEY_SENSOR_SPARE_CTRL_TP_QE_EN_BIT_IDX \ + 26 // test pixel -0: 3T pixel for QE measurement is disabled | 1: 3T pixel for QE measurement is enabled +#define CCAM3_SISLEY_SENSOR_SPARE_CTRL_TP_QE_EN_WIDTH 1 +#define CCAM3_SISLEY_SENSOR_SPARE_CTRL_TP_QE_EN_DEFAULT 0x00000000 +#define CCAM3_SISLEY_SENSOR_SPARE_CTRL_B_TM_BIT_IDX 29 // CISC PCMs +#define CCAM3_SISLEY_SENSOR_SPARE_CTRL_B_TM_WIDTH 3 +#define CCAM3_SISLEY_SENSOR_SPARE_CTRL_B_TM_DEFAULT 0x00000000 + +//------------------------------------------------------------------------------------------------------------ +// SENSOR - BIAS GENERATOR(REGBANK) +//------------------------------------------------------------------------------------------------------------ + +#define CCAM3_SISLEY_IBGEN_VECTOR_0_ADDR 0x00000300 //'Bias_latchout_or_pu' +#define CCAM3_SISLEY_IBGEN_VECTOR_0_BIAS_VDAC_VAL_BIT_IDX 0 // Voltage DAC value coded on 8 bits +#define CCAM3_SISLEY_IBGEN_VECTOR_0_BIAS_VDAC_VAL_WIDTH 8 +#define CCAM3_SISLEY_IBGEN_VECTOR_0_BIAS_VDAC_VAL_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_0_BIAS_IDAC_VAL_BIT_IDX 8 // Current DAC value coded on 13 bits +#define CCAM3_SISLEY_IBGEN_VECTOR_0_BIAS_IDAC_VAL_WIDTH 13 +#define CCAM3_SISLEY_IBGEN_VECTOR_0_BIAS_IDAC_VAL_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_0_BIAS_INTERNAL_BUFFER_BIT_IDX 21 // Buffer value (coded on 6 bits) +#define CCAM3_SISLEY_IBGEN_VECTOR_0_BIAS_INTERNAL_BUFFER_WIDTH 6 +#define CCAM3_SISLEY_IBGEN_VECTOR_0_BIAS_INTERNAL_BUFFER_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_0_BIAS_TYPE_BIT_IDX \ + 27 // Selects bias mode + // 0: current DAC + // 1: voltage DAC +#define CCAM3_SISLEY_IBGEN_VECTOR_0_BIAS_TYPE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_0_BIAS_TYPE_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_0_BIAS_MODE_BIT_IDX \ + 28 // Selects bias mode + // 0: cascode (shifts DC up for NMOS and down for PMOS) + // 1: normal +#define CCAM3_SISLEY_IBGEN_VECTOR_0_BIAS_MODE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_0_BIAS_MODE_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_0_BIAS_POLARITY_BIT_IDX \ + 29 // Bias polarity of internal buffer + // 0: PMOS + // 1: NMOS +#define CCAM3_SISLEY_IBGEN_VECTOR_0_BIAS_POLARITY_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_0_BIAS_POLARITY_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_0_BIAS_ENABLE_BIT_IDX \ + 30 // Enable for internal biasing + // 0: bias generator disabled + // 1: bias generator enabled +#define CCAM3_SISLEY_IBGEN_VECTOR_0_BIAS_ENABLE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_0_BIAS_ENABLE_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_0_BIAS_PAD_ENABLE_BIT_IDX \ + 31 // Chip pad enable of the bias generator + // 0: pad disconnected + // 1: pad connected +#define CCAM3_SISLEY_IBGEN_VECTOR_0_BIAS_PAD_ENABLE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_0_BIAS_PAD_ENABLE_DEFAULT 0x00000000 + +#define CCAM3_SISLEY_IBGEN_VECTOR_1_ADDR 0x00000304 //'BIAS_REQX_OR_PU' +#define CCAM3_SISLEY_IBGEN_VECTOR_1_BIAS_VDAC_VAL_BIT_IDX 0 // Voltage DAC value coded on 8 bits +#define CCAM3_SISLEY_IBGEN_VECTOR_1_BIAS_VDAC_VAL_WIDTH 8 +#define CCAM3_SISLEY_IBGEN_VECTOR_1_BIAS_VDAC_VAL_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_1_BIAS_IDAC_VAL_BIT_IDX 8 // Current DAC value coded on 13 bits +#define CCAM3_SISLEY_IBGEN_VECTOR_1_BIAS_IDAC_VAL_WIDTH 13 +#define CCAM3_SISLEY_IBGEN_VECTOR_1_BIAS_IDAC_VAL_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_1_BIAS_INTERNAL_BUFFER_BIT_IDX 21 // Buffer value (coded on 6 bits) +#define CCAM3_SISLEY_IBGEN_VECTOR_1_BIAS_INTERNAL_BUFFER_WIDTH 6 +#define CCAM3_SISLEY_IBGEN_VECTOR_1_BIAS_INTERNAL_BUFFER_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_1_BIAS_TYPE_BIT_IDX \ + 27 // Selects bias mode + // 0: current DAC + // 1: voltage DAC +#define CCAM3_SISLEY_IBGEN_VECTOR_1_BIAS_TYPE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_1_BIAS_TYPE_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_1_BIAS_MODE_BIT_IDX \ + 28 // Selects bias mode + // 0: cascode (shifts DC up for NMOS and down for PMOS) + // 1: normal +#define CCAM3_SISLEY_IBGEN_VECTOR_1_BIAS_MODE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_1_BIAS_MODE_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_1_BIAS_POLARITY_BIT_IDX \ + 29 // Bias polarity of internal buffer + // 0: PMOS + // 1: NMOS +#define CCAM3_SISLEY_IBGEN_VECTOR_1_BIAS_POLARITY_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_1_BIAS_POLARITY_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_1_BIAS_ENABLE_BIT_IDX \ + 30 // Enable for internal biasing + // 0: bias generator disabled + // 1: bias generator enabled +#define CCAM3_SISLEY_IBGEN_VECTOR_1_BIAS_ENABLE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_1_BIAS_ENABLE_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_1_BIAS_PAD_ENABLE_BIT_IDX \ + 31 // Chip pad enable of the bias generator + // 0: pad disconnected + // 1: pad connected +#define CCAM3_SISLEY_IBGEN_VECTOR_1_BIAS_PAD_ENABLE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_1_BIAS_PAD_ENABLE_DEFAULT 0x00000000 + +#define CCAM3_SISLEY_IBGEN_VECTOR_2_ADDR 0x00000308 //'BIAS_REQ_PUX' +#define CCAM3_SISLEY_IBGEN_VECTOR_2_BIAS_VDAC_VAL_BIT_IDX 0 // Voltage DAC value coded on 8 bits +#define CCAM3_SISLEY_IBGEN_VECTOR_2_BIAS_VDAC_VAL_WIDTH 8 +#define CCAM3_SISLEY_IBGEN_VECTOR_2_BIAS_VDAC_VAL_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_2_BIAS_IDAC_VAL_BIT_IDX 8 // Current DAC value coded on 13 bits +#define CCAM3_SISLEY_IBGEN_VECTOR_2_BIAS_IDAC_VAL_WIDTH 13 +#define CCAM3_SISLEY_IBGEN_VECTOR_2_BIAS_IDAC_VAL_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_2_BIAS_INTERNAL_BUFFER_BIT_IDX 21 // Buffer value (coded on 6 bits) +#define CCAM3_SISLEY_IBGEN_VECTOR_2_BIAS_INTERNAL_BUFFER_WIDTH 6 +#define CCAM3_SISLEY_IBGEN_VECTOR_2_BIAS_INTERNAL_BUFFER_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_2_BIAS_TYPE_BIT_IDX \ + 27 // Selects bias mode + // 0: current DAC + // 1: voltage DAC +#define CCAM3_SISLEY_IBGEN_VECTOR_2_BIAS_TYPE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_2_BIAS_TYPE_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_2_BIAS_MODE_BIT_IDX \ + 28 // Selects bias mode + // 0: cascode (shifts DC up for NMOS and down for PMOS) + // 1: normal +#define CCAM3_SISLEY_IBGEN_VECTOR_2_BIAS_MODE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_2_BIAS_MODE_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_2_BIAS_POLARITY_BIT_IDX \ + 29 // Bias polarity of internal buffer + // 0: PMOS + // 1: NMOS +#define CCAM3_SISLEY_IBGEN_VECTOR_2_BIAS_POLARITY_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_2_BIAS_POLARITY_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_2_BIAS_ENABLE_BIT_IDX \ + 30 // Enable for internal biasing + // 0: bias generator disabled + // 1: bias generator enabled +#define CCAM3_SISLEY_IBGEN_VECTOR_2_BIAS_ENABLE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_2_BIAS_ENABLE_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_2_BIAS_PAD_ENABLE_BIT_IDX \ + 31 // Chip pad enable of the bias generator + // 0: pad disconnected + // 1: pad connected +#define CCAM3_SISLEY_IBGEN_VECTOR_2_BIAS_PAD_ENABLE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_2_BIAS_PAD_ENABLE_DEFAULT 0x00000000 + +#define CCAM3_SISLEY_IBGEN_VECTOR_3_ADDR 0x0000030C //'BIAS_REQ_PUY' +#define CCAM3_SISLEY_IBGEN_VECTOR_3_BIAS_VDAC_VAL_BIT_IDX 0 // Voltage DAC value coded on 8 bits +#define CCAM3_SISLEY_IBGEN_VECTOR_3_BIAS_VDAC_VAL_WIDTH 8 +#define CCAM3_SISLEY_IBGEN_VECTOR_3_BIAS_VDAC_VAL_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_3_BIAS_IDAC_VAL_BIT_IDX 8 // Current DAC value coded on 13 bits +#define CCAM3_SISLEY_IBGEN_VECTOR_3_BIAS_IDAC_VAL_WIDTH 13 +#define CCAM3_SISLEY_IBGEN_VECTOR_3_BIAS_IDAC_VAL_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_3_BIAS_INTERNAL_BUFFER_BIT_IDX 21 // Buffer value (coded on 6 bits) +#define CCAM3_SISLEY_IBGEN_VECTOR_3_BIAS_INTERNAL_BUFFER_WIDTH 6 +#define CCAM3_SISLEY_IBGEN_VECTOR_3_BIAS_INTERNAL_BUFFER_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_3_BIAS_TYPE_BIT_IDX \ + 27 // Selects bias mode + // 0: current DAC + // 1: voltage DAC +#define CCAM3_SISLEY_IBGEN_VECTOR_3_BIAS_TYPE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_3_BIAS_TYPE_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_3_BIAS_MODE_BIT_IDX \ + 28 // Selects bias mode + // 0: cascode (shifts DC up for NMOS and down for PMOS) + // 1: normal +#define CCAM3_SISLEY_IBGEN_VECTOR_3_BIAS_MODE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_3_BIAS_MODE_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_3_BIAS_POLARITY_BIT_IDX \ + 29 // Bias polarity of internal buffer + // 0: PMOS + // 1: NMOS +#define CCAM3_SISLEY_IBGEN_VECTOR_3_BIAS_POLARITY_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_3_BIAS_POLARITY_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_3_BIAS_ENABLE_BIT_IDX \ + 30 // Enable for internal biasing + // 0: bias generator disabled + // 1: bias generator enabled +#define CCAM3_SISLEY_IBGEN_VECTOR_3_BIAS_ENABLE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_3_BIAS_ENABLE_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_3_BIAS_PAD_ENABLE_BIT_IDX \ + 31 // Chip pad enable of the bias generator + // 0: pad disconnected + // 1: pad connected +#define CCAM3_SISLEY_IBGEN_VECTOR_3_BIAS_PAD_ENABLE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_3_BIAS_PAD_ENABLE_DEFAULT 0x00000000 + +#define CCAM3_SISLEY_IBGEN_VECTOR_4_ADDR 0x00000310 //'BIAS_DEL_REQX_OR' +#define CCAM3_SISLEY_IBGEN_VECTOR_4_BIAS_VDAC_VAL_BIT_IDX 0 // Voltage DAC value coded on 8 bits +#define CCAM3_SISLEY_IBGEN_VECTOR_4_BIAS_VDAC_VAL_WIDTH 8 +#define CCAM3_SISLEY_IBGEN_VECTOR_4_BIAS_VDAC_VAL_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_4_BIAS_IDAC_VAL_BIT_IDX 8 // Current DAC value coded on 13 bits +#define CCAM3_SISLEY_IBGEN_VECTOR_4_BIAS_IDAC_VAL_WIDTH 13 +#define CCAM3_SISLEY_IBGEN_VECTOR_4_BIAS_IDAC_VAL_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_4_BIAS_INTERNAL_BUFFER_BIT_IDX 21 // Buffer value (coded on 6 bits) +#define CCAM3_SISLEY_IBGEN_VECTOR_4_BIAS_INTERNAL_BUFFER_WIDTH 6 +#define CCAM3_SISLEY_IBGEN_VECTOR_4_BIAS_INTERNAL_BUFFER_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_4_BIAS_TYPE_BIT_IDX \ + 27 // Selects bias mode + // 0: current DAC + // 1: voltage DAC +#define CCAM3_SISLEY_IBGEN_VECTOR_4_BIAS_TYPE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_4_BIAS_TYPE_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_4_BIAS_MODE_BIT_IDX \ + 28 // Selects bias mode + // 0: cascode (shifts DC up for NMOS and down for PMOS) + // 1: normal +#define CCAM3_SISLEY_IBGEN_VECTOR_4_BIAS_MODE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_4_BIAS_MODE_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_4_BIAS_POLARITY_BIT_IDX \ + 29 // Bias polarity of internal buffer + // 0: PMOS + // 1: NMOS +#define CCAM3_SISLEY_IBGEN_VECTOR_4_BIAS_POLARITY_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_4_BIAS_POLARITY_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_4_BIAS_ENABLE_BIT_IDX \ + 30 // Enable for internal biasing + // 0: bias generator disabled + // 1: bias generator enabled +#define CCAM3_SISLEY_IBGEN_VECTOR_4_BIAS_ENABLE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_4_BIAS_ENABLE_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_4_BIAS_PAD_ENABLE_BIT_IDX \ + 31 // Chip pad enable of the bias generator + // 0: pad disconnected + // 1: pad connected +#define CCAM3_SISLEY_IBGEN_VECTOR_4_BIAS_PAD_ENABLE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_4_BIAS_PAD_ENABLE_DEFAULT 0x00000000 + +#define CCAM3_SISLEY_IBGEN_VECTOR_5_ADDR 0x00000314 //'BIAS_SENDREQ_PDX' +#define CCAM3_SISLEY_IBGEN_VECTOR_5_BIAS_VDAC_VAL_BIT_IDX 0 // Voltage DAC value coded on 8 bits +#define CCAM3_SISLEY_IBGEN_VECTOR_5_BIAS_VDAC_VAL_WIDTH 8 +#define CCAM3_SISLEY_IBGEN_VECTOR_5_BIAS_VDAC_VAL_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_5_BIAS_IDAC_VAL_BIT_IDX 8 // Current DAC value coded on 13 bits +#define CCAM3_SISLEY_IBGEN_VECTOR_5_BIAS_IDAC_VAL_WIDTH 13 +#define CCAM3_SISLEY_IBGEN_VECTOR_5_BIAS_IDAC_VAL_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_5_BIAS_INTERNAL_BUFFER_BIT_IDX 21 // Buffer value (coded on 6 bits) +#define CCAM3_SISLEY_IBGEN_VECTOR_5_BIAS_INTERNAL_BUFFER_WIDTH 6 +#define CCAM3_SISLEY_IBGEN_VECTOR_5_BIAS_INTERNAL_BUFFER_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_5_BIAS_TYPE_BIT_IDX \ + 27 // Selects bias mode + // 0: current DAC + // 1: voltage DAC +#define CCAM3_SISLEY_IBGEN_VECTOR_5_BIAS_TYPE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_5_BIAS_TYPE_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_5_BIAS_MODE_BIT_IDX \ + 28 // Selects bias mode + // 0: cascode (shifts DC up for NMOS and down for PMOS) + // 1: normal +#define CCAM3_SISLEY_IBGEN_VECTOR_5_BIAS_MODE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_5_BIAS_MODE_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_5_BIAS_POLARITY_BIT_IDX \ + 29 // Bias polarity of internal buffer + // 0: PMOS + // 1: NMOS +#define CCAM3_SISLEY_IBGEN_VECTOR_5_BIAS_POLARITY_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_5_BIAS_POLARITY_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_5_BIAS_ENABLE_BIT_IDX \ + 30 // Enable for internal biasing + // 0: bias generator disabled + // 1: bias generator enabled +#define CCAM3_SISLEY_IBGEN_VECTOR_5_BIAS_ENABLE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_5_BIAS_ENABLE_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_5_BIAS_PAD_ENABLE_BIT_IDX \ + 31 // Chip pad enable of the bias generator + // 0: pad disconnected + // 1: pad connected +#define CCAM3_SISLEY_IBGEN_VECTOR_5_BIAS_PAD_ENABLE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_5_BIAS_PAD_ENABLE_DEFAULT 0x00000000 + +#define CCAM3_SISLEY_IBGEN_VECTOR_6_ADDR 0x00000318 //'BIAS_SENDREQ_PDY' +#define CCAM3_SISLEY_IBGEN_VECTOR_6_BIAS_VDAC_VAL_BIT_IDX 0 // Voltage DAC value coded on 8 bits +#define CCAM3_SISLEY_IBGEN_VECTOR_6_BIAS_VDAC_VAL_WIDTH 8 +#define CCAM3_SISLEY_IBGEN_VECTOR_6_BIAS_VDAC_VAL_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_6_BIAS_IDAC_VAL_BIT_IDX 8 // Current DAC value coded on 13 bits +#define CCAM3_SISLEY_IBGEN_VECTOR_6_BIAS_IDAC_VAL_WIDTH 13 +#define CCAM3_SISLEY_IBGEN_VECTOR_6_BIAS_IDAC_VAL_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_6_BIAS_INTERNAL_BUFFER_BIT_IDX 21 // Buffer value (coded on 6 bits) +#define CCAM3_SISLEY_IBGEN_VECTOR_6_BIAS_INTERNAL_BUFFER_WIDTH 6 +#define CCAM3_SISLEY_IBGEN_VECTOR_6_BIAS_INTERNAL_BUFFER_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_6_BIAS_TYPE_BIT_IDX \ + 27 // Selects bias mode + // 0: current DAC + // 1: voltage DAC +#define CCAM3_SISLEY_IBGEN_VECTOR_6_BIAS_TYPE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_6_BIAS_TYPE_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_6_BIAS_MODE_BIT_IDX \ + 28 // Selects bias mode + // 0: cascode (shifts DC up for NMOS and down for PMOS) + // 1: normal +#define CCAM3_SISLEY_IBGEN_VECTOR_6_BIAS_MODE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_6_BIAS_MODE_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_6_BIAS_POLARITY_BIT_IDX \ + 29 // Bias polarity of internal buffer + // 0: PMOS + // 1: NMOS +#define CCAM3_SISLEY_IBGEN_VECTOR_6_BIAS_POLARITY_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_6_BIAS_POLARITY_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_6_BIAS_ENABLE_BIT_IDX \ + 30 // Enable for internal biasing + // 0: bias generator disabled + // 1: bias generator enabled +#define CCAM3_SISLEY_IBGEN_VECTOR_6_BIAS_ENABLE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_6_BIAS_ENABLE_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_6_BIAS_PAD_ENABLE_BIT_IDX \ + 31 // Chip pad enable of the bias generator + // 0: pad disconnected + // 1: pad connected +#define CCAM3_SISLEY_IBGEN_VECTOR_6_BIAS_PAD_ENABLE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_6_BIAS_PAD_ENABLE_DEFAULT 0x00000000 + +#define CCAM3_SISLEY_IBGEN_VECTOR_7_ADDR 0x0000031C //'BIAS_DEL_ACK_ARRAY' +#define CCAM3_SISLEY_IBGEN_VECTOR_7_BIAS_VDAC_VAL_BIT_IDX 0 // Voltage DAC value coded on 8 bits +#define CCAM3_SISLEY_IBGEN_VECTOR_7_BIAS_VDAC_VAL_WIDTH 8 +#define CCAM3_SISLEY_IBGEN_VECTOR_7_BIAS_VDAC_VAL_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_7_BIAS_IDAC_VAL_BIT_IDX 8 // Current DAC value coded on 13 bits +#define CCAM3_SISLEY_IBGEN_VECTOR_7_BIAS_IDAC_VAL_WIDTH 13 +#define CCAM3_SISLEY_IBGEN_VECTOR_7_BIAS_IDAC_VAL_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_7_BIAS_INTERNAL_BUFFER_BIT_IDX 21 // Buffer value (coded on 6 bits) +#define CCAM3_SISLEY_IBGEN_VECTOR_7_BIAS_INTERNAL_BUFFER_WIDTH 6 +#define CCAM3_SISLEY_IBGEN_VECTOR_7_BIAS_INTERNAL_BUFFER_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_7_BIAS_TYPE_BIT_IDX \ + 27 // Selects bias mode + // 0: current DAC + // 1: voltage DAC +#define CCAM3_SISLEY_IBGEN_VECTOR_7_BIAS_TYPE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_7_BIAS_TYPE_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_7_BIAS_MODE_BIT_IDX \ + 28 // Selects bias mode + // 0: cascode (shifts DC up for NMOS and down for PMOS) + // 1: normal +#define CCAM3_SISLEY_IBGEN_VECTOR_7_BIAS_MODE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_7_BIAS_MODE_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_7_BIAS_POLARITY_BIT_IDX \ + 29 // Bias polarity of internal buffer + // 0: PMOS + // 1: NMOS +#define CCAM3_SISLEY_IBGEN_VECTOR_7_BIAS_POLARITY_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_7_BIAS_POLARITY_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_7_BIAS_ENABLE_BIT_IDX \ + 30 // Enable for internal biasing + // 0: bias generator disabled + // 1: bias generator enabled +#define CCAM3_SISLEY_IBGEN_VECTOR_7_BIAS_ENABLE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_7_BIAS_ENABLE_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_7_BIAS_PAD_ENABLE_BIT_IDX \ + 31 // Chip pad enable of the bias generator + // 0: pad disconnected + // 1: pad connected +#define CCAM3_SISLEY_IBGEN_VECTOR_7_BIAS_PAD_ENABLE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_7_BIAS_PAD_ENABLE_DEFAULT 0x00000000 + +#define CCAM3_SISLEY_IBGEN_VECTOR_8_ADDR 0x00000320 //'BIAS_DEL_TIMEOUT' +#define CCAM3_SISLEY_IBGEN_VECTOR_8_BIAS_VDAC_VAL_BIT_IDX 0 // Voltage DAC value coded on 8 bits +#define CCAM3_SISLEY_IBGEN_VECTOR_8_BIAS_VDAC_VAL_WIDTH 8 +#define CCAM3_SISLEY_IBGEN_VECTOR_8_BIAS_VDAC_VAL_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_8_BIAS_IDAC_VAL_BIT_IDX 8 // Current DAC value coded on 13 bits +#define CCAM3_SISLEY_IBGEN_VECTOR_8_BIAS_IDAC_VAL_WIDTH 13 +#define CCAM3_SISLEY_IBGEN_VECTOR_8_BIAS_IDAC_VAL_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_8_BIAS_INTERNAL_BUFFER_BIT_IDX 21 // Buffer value (coded on 6 bits) +#define CCAM3_SISLEY_IBGEN_VECTOR_8_BIAS_INTERNAL_BUFFER_WIDTH 6 +#define CCAM3_SISLEY_IBGEN_VECTOR_8_BIAS_INTERNAL_BUFFER_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_8_BIAS_TYPE_BIT_IDX \ + 27 // Selects bias mode + // 0: current DAC + // 1: voltage DAC +#define CCAM3_SISLEY_IBGEN_VECTOR_8_BIAS_TYPE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_8_BIAS_TYPE_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_8_BIAS_MODE_BIT_IDX \ + 28 // Selects bias mode + // 0: cascode (shifts DC up for NMOS and down for PMOS) + // 1: normal +#define CCAM3_SISLEY_IBGEN_VECTOR_8_BIAS_MODE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_8_BIAS_MODE_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_8_BIAS_POLARITY_BIT_IDX \ + 29 // Bias polarity of internal buffer + // 0: PMOS + // 1: NMOS +#define CCAM3_SISLEY_IBGEN_VECTOR_8_BIAS_POLARITY_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_8_BIAS_POLARITY_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_8_BIAS_ENABLE_BIT_IDX \ + 30 // Enable for internal biasing + // 0: bias generator disabled + // 1: bias generator enabled +#define CCAM3_SISLEY_IBGEN_VECTOR_8_BIAS_ENABLE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_8_BIAS_ENABLE_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_8_BIAS_PAD_ENABLE_BIT_IDX \ + 31 // Chip pad enable of the bias generator + // 0: pad disconnected + // 1: pad connected +#define CCAM3_SISLEY_IBGEN_VECTOR_8_BIAS_PAD_ENABLE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_8_BIAS_PAD_ENABLE_DEFAULT 0x00000000 + +#define CCAM3_SISLEY_IBGEN_VECTOR_9_ADDR 0x00000324 //'BIAS_INV' +#define CCAM3_SISLEY_IBGEN_VECTOR_9_BIAS_VDAC_VAL_BIT_IDX 0 // Voltage DAC value coded on 8 bits +#define CCAM3_SISLEY_IBGEN_VECTOR_9_BIAS_VDAC_VAL_WIDTH 8 +#define CCAM3_SISLEY_IBGEN_VECTOR_9_BIAS_VDAC_VAL_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_9_BIAS_IDAC_VAL_BIT_IDX 8 // Current DAC value coded on 13 bits +#define CCAM3_SISLEY_IBGEN_VECTOR_9_BIAS_IDAC_VAL_WIDTH 13 +#define CCAM3_SISLEY_IBGEN_VECTOR_9_BIAS_IDAC_VAL_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_9_BIAS_INTERNAL_BUFFER_BIT_IDX 21 // Buffer value (coded on 6 bits) +#define CCAM3_SISLEY_IBGEN_VECTOR_9_BIAS_INTERNAL_BUFFER_WIDTH 6 +#define CCAM3_SISLEY_IBGEN_VECTOR_9_BIAS_INTERNAL_BUFFER_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_9_BIAS_TYPE_BIT_IDX \ + 27 // Selects bias mode + // 0: current DAC + // 1: voltage DAC +#define CCAM3_SISLEY_IBGEN_VECTOR_9_BIAS_TYPE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_9_BIAS_TYPE_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_9_BIAS_MODE_BIT_IDX \ + 28 // Selects bias mode + // 0: cascode (shifts DC up for NMOS and down for PMOS) + // 1: normal +#define CCAM3_SISLEY_IBGEN_VECTOR_9_BIAS_MODE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_9_BIAS_MODE_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_9_BIAS_POLARITY_BIT_IDX \ + 29 // Bias polarity of internal buffer + // 0: PMOS + // 1: NMOS +#define CCAM3_SISLEY_IBGEN_VECTOR_9_BIAS_POLARITY_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_9_BIAS_POLARITY_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_9_BIAS_ENABLE_BIT_IDX \ + 30 // Enable for internal biasing + // 0: bias generator disabled + // 1: bias generator enabled +#define CCAM3_SISLEY_IBGEN_VECTOR_9_BIAS_ENABLE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_9_BIAS_ENABLE_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_9_BIAS_PAD_ENABLE_BIT_IDX \ + 31 // Chip pad enable of the bias generator + // 0: pad disconnected + // 1: pad connected +#define CCAM3_SISLEY_IBGEN_VECTOR_9_BIAS_PAD_ENABLE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_9_BIAS_PAD_ENABLE_DEFAULT 0x00000000 + +#define CCAM3_SISLEY_IBGEN_VECTOR_10_ADDR 0x00000328 //'BIAS_REFR' +#define CCAM3_SISLEY_IBGEN_VECTOR_10_BIAS_VDAC_VAL_BIT_IDX 0 // Voltage DAC value coded on 8 bits +#define CCAM3_SISLEY_IBGEN_VECTOR_10_BIAS_VDAC_VAL_WIDTH 8 +#define CCAM3_SISLEY_IBGEN_VECTOR_10_BIAS_VDAC_VAL_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_10_BIAS_IDAC_VAL_BIT_IDX 8 // Current DAC value coded on 13 bits +#define CCAM3_SISLEY_IBGEN_VECTOR_10_BIAS_IDAC_VAL_WIDTH 13 +#define CCAM3_SISLEY_IBGEN_VECTOR_10_BIAS_IDAC_VAL_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_10_BIAS_INTERNAL_BUFFER_BIT_IDX 21 // Buffer value (coded on 6 bits) +#define CCAM3_SISLEY_IBGEN_VECTOR_10_BIAS_INTERNAL_BUFFER_WIDTH 6 +#define CCAM3_SISLEY_IBGEN_VECTOR_10_BIAS_INTERNAL_BUFFER_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_10_BIAS_TYPE_BIT_IDX \ + 27 // Selects bias mode + // 0: current DAC + // 1: voltage DAC +#define CCAM3_SISLEY_IBGEN_VECTOR_10_BIAS_TYPE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_10_BIAS_TYPE_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_10_BIAS_MODE_BIT_IDX \ + 28 // Selects bias mode + // 0: cascode (shifts DC up for NMOS and down for PMOS) + // 1: normal +#define CCAM3_SISLEY_IBGEN_VECTOR_10_BIAS_MODE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_10_BIAS_MODE_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_10_BIAS_POLARITY_BIT_IDX \ + 29 // Bias polarity of internal buffer + // 0: PMOS + // 1: NMOS +#define CCAM3_SISLEY_IBGEN_VECTOR_10_BIAS_POLARITY_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_10_BIAS_POLARITY_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_10_BIAS_ENABLE_BIT_IDX \ + 30 // Enable for internal biasing + // 0: bias generator disabled + // 1: bias generator enabled +#define CCAM3_SISLEY_IBGEN_VECTOR_10_BIAS_ENABLE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_10_BIAS_ENABLE_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_10_BIAS_PAD_ENABLE_BIT_IDX \ + 31 // Chip pad enable of the bias generator + // 0: pad disconnected + // 1: pad connected +#define CCAM3_SISLEY_IBGEN_VECTOR_10_BIAS_PAD_ENABLE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_10_BIAS_PAD_ENABLE_DEFAULT 0x00000000 + +#define CCAM3_SISLEY_IBGEN_VECTOR_11_ADDR 0x0000032C //'BIAS_CLK' +#define CCAM3_SISLEY_IBGEN_VECTOR_11_BIAS_VDAC_VAL_BIT_IDX 0 // Voltage DAC value coded on 8 bits +#define CCAM3_SISLEY_IBGEN_VECTOR_11_BIAS_VDAC_VAL_WIDTH 8 +#define CCAM3_SISLEY_IBGEN_VECTOR_11_BIAS_VDAC_VAL_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_11_BIAS_IDAC_VAL_BIT_IDX 8 // Current DAC value coded on 13 bits +#define CCAM3_SISLEY_IBGEN_VECTOR_11_BIAS_IDAC_VAL_WIDTH 13 +#define CCAM3_SISLEY_IBGEN_VECTOR_11_BIAS_IDAC_VAL_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_11_BIAS_INTERNAL_BUFFER_BIT_IDX 21 // Buffer value (coded on 6 bits) +#define CCAM3_SISLEY_IBGEN_VECTOR_11_BIAS_INTERNAL_BUFFER_WIDTH 6 +#define CCAM3_SISLEY_IBGEN_VECTOR_11_BIAS_INTERNAL_BUFFER_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_11_BIAS_TYPE_BIT_IDX \ + 27 // Selects bias mode + // 0: current DAC + // 1: voltage DAC +#define CCAM3_SISLEY_IBGEN_VECTOR_11_BIAS_TYPE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_11_BIAS_TYPE_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_11_BIAS_MODE_BIT_IDX \ + 28 // Selects bias mode + // 0: cascode (shifts DC up for NMOS and down for PMOS) + // 1: normal +#define CCAM3_SISLEY_IBGEN_VECTOR_11_BIAS_MODE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_11_BIAS_MODE_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_11_BIAS_POLARITY_BIT_IDX \ + 29 // Bias polarity of internal buffer + // 0: PMOS + // 1: NMOS +#define CCAM3_SISLEY_IBGEN_VECTOR_11_BIAS_POLARITY_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_11_BIAS_POLARITY_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_11_BIAS_ENABLE_BIT_IDX \ + 30 // Enable for internal biasing + // 0: bias generator disabled + // 1: bias generator enabled +#define CCAM3_SISLEY_IBGEN_VECTOR_11_BIAS_ENABLE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_11_BIAS_ENABLE_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_11_BIAS_PAD_ENABLE_BIT_IDX \ + 31 // Chip pad enable of the bias generator + // 0: pad disconnected + // 1: pad connected +#define CCAM3_SISLEY_IBGEN_VECTOR_11_BIAS_PAD_ENABLE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_11_BIAS_PAD_ENABLE_DEFAULT 0x00000000 + +#define CCAM3_SISLEY_IBGEN_VECTOR_18_ADDR 0x00000348 //'BIAS_CAS' +#define CCAM3_SISLEY_IBGEN_VECTOR_18_BIAS_VDAC_VAL_BIT_IDX 0 // Voltage DAC value coded on 8 bits +#define CCAM3_SISLEY_IBGEN_VECTOR_18_BIAS_VDAC_VAL_WIDTH 8 +#define CCAM3_SISLEY_IBGEN_VECTOR_18_BIAS_VDAC_VAL_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_18_BIAS_IDAC_VAL_BIT_IDX 8 // Current DAC value coded on 13 bits +#define CCAM3_SISLEY_IBGEN_VECTOR_18_BIAS_IDAC_VAL_WIDTH 13 +#define CCAM3_SISLEY_IBGEN_VECTOR_18_BIAS_IDAC_VAL_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_18_BIAS_INTERNAL_BUFFER_BIT_IDX 21 // Buffer value (coded on 6 bits) +#define CCAM3_SISLEY_IBGEN_VECTOR_18_BIAS_INTERNAL_BUFFER_WIDTH 6 +#define CCAM3_SISLEY_IBGEN_VECTOR_18_BIAS_INTERNAL_BUFFER_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_18_BIAS_TYPE_BIT_IDX \ + 27 // Selects bias mode + // 0: current DAC + // 1: voltage DAC +#define CCAM3_SISLEY_IBGEN_VECTOR_18_BIAS_TYPE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_18_BIAS_TYPE_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_18_BIAS_MODE_BIT_IDX \ + 28 // Selects bias mode + // 0: cascode (shifts DC up for NMOS and down for PMOS) + // 1: normal +#define CCAM3_SISLEY_IBGEN_VECTOR_18_BIAS_MODE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_18_BIAS_MODE_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_18_BIAS_POLARITY_BIT_IDX \ + 29 // Bias polarity of internal buffer + // 0: PMOS + // 1: NMOS +#define CCAM3_SISLEY_IBGEN_VECTOR_18_BIAS_POLARITY_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_18_BIAS_POLARITY_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_18_BIAS_ENABLE_BIT_IDX \ + 30 // Enable for internal biasing + // 0: bias generator disabled + // 1: bias generator enabled +#define CCAM3_SISLEY_IBGEN_VECTOR_18_BIAS_ENABLE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_18_BIAS_ENABLE_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_18_BIAS_PAD_ENABLE_BIT_IDX \ + 31 // Chip pad enable of the bias generator + // 0: pad disconnected + // 1: pad connected +#define CCAM3_SISLEY_IBGEN_VECTOR_18_BIAS_PAD_ENABLE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_18_BIAS_PAD_ENABLE_DEFAULT 0x00000000 + +#define CCAM3_SISLEY_IBGEN_VECTOR_19_ADDR 0x0000034C //'BIAS_DIFF_OFF' +#define CCAM3_SISLEY_IBGEN_VECTOR_19_BIAS_VDAC_VAL_BIT_IDX 0 // Voltage DAC value coded on 8 bits +#define CCAM3_SISLEY_IBGEN_VECTOR_19_BIAS_VDAC_VAL_WIDTH 8 +#define CCAM3_SISLEY_IBGEN_VECTOR_19_BIAS_VDAC_VAL_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_19_BIAS_IDAC_VAL_BIT_IDX 8 // Current DAC value coded on 13 bits +#define CCAM3_SISLEY_IBGEN_VECTOR_19_BIAS_IDAC_VAL_WIDTH 13 +#define CCAM3_SISLEY_IBGEN_VECTOR_19_BIAS_IDAC_VAL_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_19_BIAS_INTERNAL_BUFFER_BIT_IDX 21 // Buffer value (coded on 6 bits) +#define CCAM3_SISLEY_IBGEN_VECTOR_19_BIAS_INTERNAL_BUFFER_WIDTH 6 +#define CCAM3_SISLEY_IBGEN_VECTOR_19_BIAS_INTERNAL_BUFFER_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_19_BIAS_TYPE_BIT_IDX \ + 27 // Selects bias mode + // 0: current DAC + // 1: voltage DAC +#define CCAM3_SISLEY_IBGEN_VECTOR_19_BIAS_TYPE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_19_BIAS_TYPE_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_19_BIAS_MODE_BIT_IDX \ + 28 // Selects bias mode + // 0: cascode (shifts DC up for NMOS and down for PMOS) + // 1: normal +#define CCAM3_SISLEY_IBGEN_VECTOR_19_BIAS_MODE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_19_BIAS_MODE_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_19_BIAS_POLARITY_BIT_IDX \ + 29 // Bias polarity of internal buffer + // 0: PMOS + // 1: NMOS +#define CCAM3_SISLEY_IBGEN_VECTOR_19_BIAS_POLARITY_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_19_BIAS_POLARITY_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_19_BIAS_ENABLE_BIT_IDX \ + 30 // Enable for internal biasing + // 0: bias generator disabled + // 1: bias generator enabled +#define CCAM3_SISLEY_IBGEN_VECTOR_19_BIAS_ENABLE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_19_BIAS_ENABLE_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_19_BIAS_PAD_ENABLE_BIT_IDX \ + 31 // Chip pad enable of the bias generator + // 0: pad disconnected + // 1: pad connected +#define CCAM3_SISLEY_IBGEN_VECTOR_19_BIAS_PAD_ENABLE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_19_BIAS_PAD_ENABLE_DEFAULT 0x00000000 + +#define CCAM3_SISLEY_IBGEN_VECTOR_20_ADDR 0x00000350 //'BIAS_DIFF_ON' +#define CCAM3_SISLEY_IBGEN_VECTOR_20_BIAS_VDAC_VAL_BIT_IDX 0 // Voltage DAC value coded on 8 bits +#define CCAM3_SISLEY_IBGEN_VECTOR_20_BIAS_VDAC_VAL_WIDTH 8 +#define CCAM3_SISLEY_IBGEN_VECTOR_20_BIAS_VDAC_VAL_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_20_BIAS_IDAC_VAL_BIT_IDX 8 // Current DAC value coded on 13 bits +#define CCAM3_SISLEY_IBGEN_VECTOR_20_BIAS_IDAC_VAL_WIDTH 13 +#define CCAM3_SISLEY_IBGEN_VECTOR_20_BIAS_IDAC_VAL_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_20_BIAS_INTERNAL_BUFFER_BIT_IDX 21 // Buffer value (coded on 6 bits) +#define CCAM3_SISLEY_IBGEN_VECTOR_20_BIAS_INTERNAL_BUFFER_WIDTH 6 +#define CCAM3_SISLEY_IBGEN_VECTOR_20_BIAS_INTERNAL_BUFFER_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_20_BIAS_TYPE_BIT_IDX \ + 27 // Selects bias mode + // 0: current DAC + // 1: voltage DAC +#define CCAM3_SISLEY_IBGEN_VECTOR_20_BIAS_TYPE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_20_BIAS_TYPE_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_20_BIAS_MODE_BIT_IDX \ + 28 // Selects bias mode + // 0: cascode (shifts DC up for NMOS and down for PMOS) + // 1: normal +#define CCAM3_SISLEY_IBGEN_VECTOR_20_BIAS_MODE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_20_BIAS_MODE_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_20_BIAS_POLARITY_BIT_IDX \ + 29 // Bias polarity of internal buffer + // 0: PMOS + // 1: NMOS +#define CCAM3_SISLEY_IBGEN_VECTOR_20_BIAS_POLARITY_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_20_BIAS_POLARITY_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_20_BIAS_ENABLE_BIT_IDX \ + 30 // Enable for internal biasing + // 0: bias generator disabled + // 1: bias generator enabled +#define CCAM3_SISLEY_IBGEN_VECTOR_20_BIAS_ENABLE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_20_BIAS_ENABLE_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_20_BIAS_PAD_ENABLE_BIT_IDX \ + 31 // Chip pad enable of the bias generator + // 0: pad disconnected + // 1: pad connected +#define CCAM3_SISLEY_IBGEN_VECTOR_20_BIAS_PAD_ENABLE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_20_BIAS_PAD_ENABLE_DEFAULT 0x00000000 + +#define CCAM3_SISLEY_IBGEN_VECTOR_21_ADDR 0x00000354 //'BIAS_DIFF' +#define CCAM3_SISLEY_IBGEN_VECTOR_21_BIAS_VDAC_VAL_BIT_IDX 0 // Voltage DAC value coded on 8 bits +#define CCAM3_SISLEY_IBGEN_VECTOR_21_BIAS_VDAC_VAL_WIDTH 8 +#define CCAM3_SISLEY_IBGEN_VECTOR_21_BIAS_VDAC_VAL_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_21_BIAS_IDAC_VAL_BIT_IDX 8 // Current DAC value coded on 13 bits +#define CCAM3_SISLEY_IBGEN_VECTOR_21_BIAS_IDAC_VAL_WIDTH 13 +#define CCAM3_SISLEY_IBGEN_VECTOR_21_BIAS_IDAC_VAL_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_21_BIAS_INTERNAL_BUFFER_BIT_IDX 21 // Buffer value (coded on 6 bits) +#define CCAM3_SISLEY_IBGEN_VECTOR_21_BIAS_INTERNAL_BUFFER_WIDTH 6 +#define CCAM3_SISLEY_IBGEN_VECTOR_21_BIAS_INTERNAL_BUFFER_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_21_BIAS_TYPE_BIT_IDX \ + 27 // Selects bias mode + // 0: current DAC + // 1: voltage DAC +#define CCAM3_SISLEY_IBGEN_VECTOR_21_BIAS_TYPE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_21_BIAS_TYPE_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_21_BIAS_MODE_BIT_IDX \ + 28 // Selects bias mode + // 0: cascode (shifts DC up for NMOS and down for PMOS) + // 1: normal +#define CCAM3_SISLEY_IBGEN_VECTOR_21_BIAS_MODE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_21_BIAS_MODE_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_21_BIAS_POLARITY_BIT_IDX \ + 29 // Bias polarity of internal buffer + // 0: PMOS + // 1: NMOS +#define CCAM3_SISLEY_IBGEN_VECTOR_21_BIAS_POLARITY_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_21_BIAS_POLARITY_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_21_BIAS_ENABLE_BIT_IDX \ + 30 // Enable for internal biasing + // 0: bias generator disabled + // 1: bias generator enabled +#define CCAM3_SISLEY_IBGEN_VECTOR_21_BIAS_ENABLE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_21_BIAS_ENABLE_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_21_BIAS_PAD_ENABLE_BIT_IDX \ + 31 // Chip pad enable of the bias generator + // 0: pad disconnected + // 1: pad connected +#define CCAM3_SISLEY_IBGEN_VECTOR_21_BIAS_PAD_ENABLE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_21_BIAS_PAD_ENABLE_DEFAULT 0x00000000 + +#define CCAM3_SISLEY_IBGEN_VECTOR_22_ADDR 0x00000358 //'BIAS_FO' +#define CCAM3_SISLEY_IBGEN_VECTOR_22_BIAS_VDAC_VAL_BIT_IDX 0 // Voltage DAC value coded on 8 bits +#define CCAM3_SISLEY_IBGEN_VECTOR_22_BIAS_VDAC_VAL_WIDTH 8 +#define CCAM3_SISLEY_IBGEN_VECTOR_22_BIAS_VDAC_VAL_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_22_BIAS_IDAC_VAL_BIT_IDX 8 // Current DAC value coded on 13 bits +#define CCAM3_SISLEY_IBGEN_VECTOR_22_BIAS_IDAC_VAL_WIDTH 13 +#define CCAM3_SISLEY_IBGEN_VECTOR_22_BIAS_IDAC_VAL_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_22_BIAS_INTERNAL_BUFFER_BIT_IDX 21 // Buffer value (coded on 6 bits) +#define CCAM3_SISLEY_IBGEN_VECTOR_22_BIAS_INTERNAL_BUFFER_WIDTH 6 +#define CCAM3_SISLEY_IBGEN_VECTOR_22_BIAS_INTERNAL_BUFFER_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_22_BIAS_TYPE_BIT_IDX \ + 27 // Selects bias mode + // 0: current DAC + // 1: voltage DAC +#define CCAM3_SISLEY_IBGEN_VECTOR_22_BIAS_TYPE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_22_BIAS_TYPE_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_22_BIAS_MODE_BIT_IDX \ + 28 // Selects bias mode + // 0: cascode (shifts DC up for NMOS and down for PMOS) + // 1: normal +#define CCAM3_SISLEY_IBGEN_VECTOR_22_BIAS_MODE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_22_BIAS_MODE_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_22_BIAS_POLARITY_BIT_IDX \ + 29 // Bias polarity of internal buffer + // 0: PMOS + // 1: NMOS +#define CCAM3_SISLEY_IBGEN_VECTOR_22_BIAS_POLARITY_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_22_BIAS_POLARITY_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_22_BIAS_ENABLE_BIT_IDX \ + 30 // Enable for internal biasing + // 0: bias generator disabled + // 1: bias generator enabled +#define CCAM3_SISLEY_IBGEN_VECTOR_22_BIAS_ENABLE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_22_BIAS_ENABLE_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_22_BIAS_PAD_ENABLE_BIT_IDX \ + 31 // Chip pad enable of the bias generator + // 0: pad disconnected + // 1: pad connected +#define CCAM3_SISLEY_IBGEN_VECTOR_22_BIAS_PAD_ENABLE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_22_BIAS_PAD_ENABLE_DEFAULT 0x00000000 + +#define CCAM3_SISLEY_IBGEN_VECTOR_23_ADDR 0x0000035C //'BIAS_PR' +#define CCAM3_SISLEY_IBGEN_VECTOR_23_BIAS_VDAC_VAL_BIT_IDX 0 // Voltage DAC value coded on 8 bits +#define CCAM3_SISLEY_IBGEN_VECTOR_23_BIAS_VDAC_VAL_WIDTH 8 +#define CCAM3_SISLEY_IBGEN_VECTOR_23_BIAS_VDAC_VAL_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_23_BIAS_IDAC_VAL_BIT_IDX 8 // Current DAC value coded on 13 bits +#define CCAM3_SISLEY_IBGEN_VECTOR_23_BIAS_IDAC_VAL_WIDTH 13 +#define CCAM3_SISLEY_IBGEN_VECTOR_23_BIAS_IDAC_VAL_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_23_BIAS_INTERNAL_BUFFER_BIT_IDX 21 // Buffer value (coded on 6 bits) +#define CCAM3_SISLEY_IBGEN_VECTOR_23_BIAS_INTERNAL_BUFFER_WIDTH 6 +#define CCAM3_SISLEY_IBGEN_VECTOR_23_BIAS_INTERNAL_BUFFER_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_23_BIAS_TYPE_BIT_IDX \ + 27 // Selects bias mode + // 0: current DAC + // 1: voltage DAC +#define CCAM3_SISLEY_IBGEN_VECTOR_23_BIAS_TYPE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_23_BIAS_TYPE_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_23_BIAS_MODE_BIT_IDX \ + 28 // Selects bias mode + // 0: cascode (shifts DC up for NMOS and down for PMOS) + // 1: normal +#define CCAM3_SISLEY_IBGEN_VECTOR_23_BIAS_MODE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_23_BIAS_MODE_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_23_BIAS_POLARITY_BIT_IDX \ + 29 // Bias polarity of internal buffer + // 0: PMOS + // 1: NMOS +#define CCAM3_SISLEY_IBGEN_VECTOR_23_BIAS_POLARITY_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_23_BIAS_POLARITY_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_23_BIAS_ENABLE_BIT_IDX \ + 30 // Enable for internal biasing + // 0: bias generator disabled + // 1: bias generator enabled +#define CCAM3_SISLEY_IBGEN_VECTOR_23_BIAS_ENABLE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_23_BIAS_ENABLE_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_23_BIAS_PAD_ENABLE_BIT_IDX \ + 31 // Chip pad enable of the bias generator + // 0: pad disconnected + // 1: pad connected +#define CCAM3_SISLEY_IBGEN_VECTOR_23_BIAS_PAD_ENABLE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_23_BIAS_PAD_ENABLE_DEFAULT 0x00000000 + +#define CCAM3_SISLEY_IBGEN_VECTOR_24_ADDR 0x00000360 //'BIAS_BULK' +#define CCAM3_SISLEY_IBGEN_VECTOR_24_BIAS_VDAC_VAL_BIT_IDX 0 // Voltage DAC value coded on 8 bits +#define CCAM3_SISLEY_IBGEN_VECTOR_24_BIAS_VDAC_VAL_WIDTH 8 +#define CCAM3_SISLEY_IBGEN_VECTOR_24_BIAS_VDAC_VAL_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_24_BIAS_IDAC_VAL_BIT_IDX 8 // Current DAC value coded on 13 bits +#define CCAM3_SISLEY_IBGEN_VECTOR_24_BIAS_IDAC_VAL_WIDTH 13 +#define CCAM3_SISLEY_IBGEN_VECTOR_24_BIAS_IDAC_VAL_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_24_BIAS_INTERNAL_BUFFER_BIT_IDX 21 // Buffer value (coded on 6 bits) +#define CCAM3_SISLEY_IBGEN_VECTOR_24_BIAS_INTERNAL_BUFFER_WIDTH 6 +#define CCAM3_SISLEY_IBGEN_VECTOR_24_BIAS_INTERNAL_BUFFER_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_24_BIAS_TYPE_BIT_IDX \ + 27 // Selects bias mode + // 0: current DAC + // 1: voltage DAC +#define CCAM3_SISLEY_IBGEN_VECTOR_24_BIAS_TYPE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_24_BIAS_TYPE_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_24_BIAS_MODE_BIT_IDX \ + 28 // Selects bias mode + // 0: cascode (shifts DC up for NMOS and down for PMOS) + // 1: normal +#define CCAM3_SISLEY_IBGEN_VECTOR_24_BIAS_MODE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_24_BIAS_MODE_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_24_BIAS_POLARITY_BIT_IDX \ + 29 // Bias polarity of internal buffer + // 0: PMOS + // 1: NMOS +#define CCAM3_SISLEY_IBGEN_VECTOR_24_BIAS_POLARITY_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_24_BIAS_POLARITY_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_24_BIAS_ENABLE_BIT_IDX \ + 30 // Enable for internal biasing + // 0: bias generator disabled + // 1: bias generator enabled +#define CCAM3_SISLEY_IBGEN_VECTOR_24_BIAS_ENABLE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_24_BIAS_ENABLE_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_24_BIAS_PAD_ENABLE_BIT_IDX \ + 31 // Chip pad enable of the bias generator + // 0: pad disconnected + // 1: pad connected +#define CCAM3_SISLEY_IBGEN_VECTOR_24_BIAS_PAD_ENABLE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_24_BIAS_PAD_ENABLE_DEFAULT 0x00000000 + +#define CCAM3_SISLEY_IBGEN_VECTOR_25_ADDR \ + 0x00000364 //'VDD_HPF' - When a bias generator supplies vdd_hpf, it is also connected to the pad also called + // vdd_hpf. +#define CCAM3_SISLEY_IBGEN_VECTOR_25_BIAS_VDAC_VAL_BIT_IDX 0 // Voltage DAC value coded on 8 bits +#define CCAM3_SISLEY_IBGEN_VECTOR_25_BIAS_VDAC_VAL_WIDTH 8 +#define CCAM3_SISLEY_IBGEN_VECTOR_25_BIAS_VDAC_VAL_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_25_BIAS_IDAC_VAL_BIT_IDX 8 // Current DAC value coded on 13 bits +#define CCAM3_SISLEY_IBGEN_VECTOR_25_BIAS_IDAC_VAL_WIDTH 13 +#define CCAM3_SISLEY_IBGEN_VECTOR_25_BIAS_IDAC_VAL_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_25_BIAS_INTERNAL_BUFFER_BIT_IDX 21 // Buffer value (coded on 6 bits) +#define CCAM3_SISLEY_IBGEN_VECTOR_25_BIAS_INTERNAL_BUFFER_WIDTH 6 +#define CCAM3_SISLEY_IBGEN_VECTOR_25_BIAS_INTERNAL_BUFFER_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_25_BIAS_TYPE_BIT_IDX \ + 27 // Selects bias mode + // 0: current DAC + // 1: voltage DAC +#define CCAM3_SISLEY_IBGEN_VECTOR_25_BIAS_TYPE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_25_BIAS_TYPE_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_25_BIAS_MODE_BIT_IDX \ + 28 // Selects bias mode + // 0: cascode (shifts DC up for NMOS and down for PMOS) + // 1: normal +#define CCAM3_SISLEY_IBGEN_VECTOR_25_BIAS_MODE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_25_BIAS_MODE_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_25_BIAS_POLARITY_BIT_IDX \ + 29 // Bias polarity of internal buffer + // 0: PMOS + // 1: NMOS +#define CCAM3_SISLEY_IBGEN_VECTOR_25_BIAS_POLARITY_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_25_BIAS_POLARITY_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_25_BIAS_ENABLE_BIT_IDX \ + 30 // Enable for internal biasing + // 0: bias generator disabled + // 1: bias generator enabled +#define CCAM3_SISLEY_IBGEN_VECTOR_25_BIAS_ENABLE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_25_BIAS_ENABLE_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_25_BIAS_PAD_ENABLE_BIT_IDX \ + 31 // Chip pad enable of the bias generator + // 0: pad disconnected + // 1: pad connected +#define CCAM3_SISLEY_IBGEN_VECTOR_25_BIAS_PAD_ENABLE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_25_BIAS_PAD_ENABLE_DEFAULT 0x00000000 + +#define CCAM3_SISLEY_IBGEN_VECTOR_26_ADDR 0x00000368 //'BIAS_BUF' +#define CCAM3_SISLEY_IBGEN_VECTOR_26_BIAS_VDAC_VAL_BIT_IDX 0 // Voltage DAC value coded on 8 bits +#define CCAM3_SISLEY_IBGEN_VECTOR_26_BIAS_VDAC_VAL_WIDTH 8 +#define CCAM3_SISLEY_IBGEN_VECTOR_26_BIAS_VDAC_VAL_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_26_BIAS_IDAC_VAL_BIT_IDX 8 // Current DAC value coded on 13 bits +#define CCAM3_SISLEY_IBGEN_VECTOR_26_BIAS_IDAC_VAL_WIDTH 13 +#define CCAM3_SISLEY_IBGEN_VECTOR_26_BIAS_IDAC_VAL_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_26_BIAS_INTERNAL_BUFFER_BIT_IDX 21 // Buffer value (coded on 6 bits) +#define CCAM3_SISLEY_IBGEN_VECTOR_26_BIAS_INTERNAL_BUFFER_WIDTH 6 +#define CCAM3_SISLEY_IBGEN_VECTOR_26_BIAS_INTERNAL_BUFFER_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_26_BIAS_TYPE_BIT_IDX \ + 27 // Selects bias mode + // 0: current DAC + // 1: voltage DAC +#define CCAM3_SISLEY_IBGEN_VECTOR_26_BIAS_TYPE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_26_BIAS_TYPE_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_26_BIAS_MODE_BIT_IDX \ + 28 // Selects bias mode + // 0: cascode (shifts DC up for NMOS and down for PMOS) + // 1: normal +#define CCAM3_SISLEY_IBGEN_VECTOR_26_BIAS_MODE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_26_BIAS_MODE_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_26_BIAS_POLARITY_BIT_IDX \ + 29 // Bias polarity of internal buffer + // 0: PMOS + // 1: NMOS +#define CCAM3_SISLEY_IBGEN_VECTOR_26_BIAS_POLARITY_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_26_BIAS_POLARITY_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_26_BIAS_ENABLE_BIT_IDX \ + 30 // Enable for internal biasing + // 0: bias generator disabled + // 1: bias generator enabled +#define CCAM3_SISLEY_IBGEN_VECTOR_26_BIAS_ENABLE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_26_BIAS_ENABLE_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IBGEN_VECTOR_26_BIAS_PAD_ENABLE_BIT_IDX \ + 31 // Chip pad enable of the bias generator + // 0: pad disconnected + // 1: pad connected +#define CCAM3_SISLEY_IBGEN_VECTOR_26_BIAS_PAD_ENABLE_WIDTH 1 +#define CCAM3_SISLEY_IBGEN_VECTOR_26_BIAS_PAD_ENABLE_DEFAULT 0x00000000 + +//------------------------------------------------------------------------------------------------------------ +// SENSOR - TD ROI X +//------------------------------------------------------------------------------------------------------------ + +#define CCAM3_SISLEY_ROI_TD_X_0_ADDR 0x00000400 + +#define CCAM3_SISLEY_ROI_TD_X_1_ADDR 0x00000404 + +#define CCAM3_SISLEY_ROI_TD_X_2_ADDR 0x00000408 + +#define CCAM3_SISLEY_ROI_TD_X_3_ADDR 0x0000040C + +#define CCAM3_SISLEY_ROI_TD_X_4_ADDR 0x00000410 + +#define CCAM3_SISLEY_ROI_TD_X_5_ADDR 0x00000414 + +#define CCAM3_SISLEY_ROI_TD_X_6_ADDR 0x00000418 + +#define CCAM3_SISLEY_ROI_TD_X_7_ADDR 0x0000041C + +#define CCAM3_SISLEY_ROI_TD_X_8_ADDR 0x00000420 + +#define CCAM3_SISLEY_ROI_TD_X_9_ADDR 0x00000424 + +#define CCAM3_SISLEY_ROI_TD_X_10_ADDR 0x00000428 + +#define CCAM3_SISLEY_ROI_TD_X_11_ADDR 0x0000042C + +#define CCAM3_SISLEY_ROI_TD_X_12_ADDR 0x00000430 + +#define CCAM3_SISLEY_ROI_TD_X_13_ADDR 0x00000434 + +#define CCAM3_SISLEY_ROI_TD_X_14_ADDR 0x00000438 + +#define CCAM3_SISLEY_ROI_TD_X_15_ADDR 0x0000043C + +#define CCAM3_SISLEY_ROI_TD_X_16_ADDR 0x00000440 + +#define CCAM3_SISLEY_ROI_TD_X_17_ADDR 0x00000444 + +#define CCAM3_SISLEY_ROI_TD_X_18_ADDR 0x00000448 + +#define CCAM3_SISLEY_ROI_TD_X_19_ADDR 0x0000044C + +#define CCAM3_SISLEY_ROI_TD_X_20_ADDR 0x00000450 + +//------------------------------------------------------------------------------------------------------------ +// SENSOR - EM ROI Y +//------------------------------------------------------------------------------------------------------------ + +#define CCAM3_SISLEY_ROI_TD_Y_0_ADDR 0x00000500 + +#define CCAM3_SISLEY_ROI_TD_Y_1_ADDR 0x00000504 + +#define CCAM3_SISLEY_ROI_TD_Y_2_ADDR 0x00000508 + +#define CCAM3_SISLEY_ROI_TD_Y_3_ADDR 0x0000050C + +#define CCAM3_SISLEY_ROI_TD_Y_4_ADDR 0x00000510 + +#define CCAM3_SISLEY_ROI_TD_Y_5_ADDR 0x00000514 + +#define CCAM3_SISLEY_ROI_TD_Y_6_ADDR 0x00000518 + +#define CCAM3_SISLEY_ROI_TD_Y_7_ADDR 0x0000051C + +#define CCAM3_SISLEY_ROI_TD_Y_8_ADDR 0x00000520 + +#define CCAM3_SISLEY_ROI_TD_Y_9_ADDR 0x00000524 + +#define CCAM3_SISLEY_ROI_TD_Y_10_ADDR 0x00000528 + +#define CCAM3_SISLEY_ROI_TD_Y_11_ADDR 0x0000052C + +#define CCAM3_SISLEY_ROI_TD_Y_12_ADDR 0x00000530 + +#define CCAM3_SISLEY_ROI_TD_Y_13_ADDR 0x00000534 + +#define CCAM3_SISLEY_ROI_TD_Y_14_ADDR 0x00000538 + +#define CCAM3_SISLEY_ROI_TD_Y_15_ADDR 0x0000053C + +//------------------------------------------------------------------------------------------------------------ +// SENSOR - EM ROI X +//------------------------------------------------------------------------------------------------------------ + +#define CCAM3_SISLEY_ROI_EM_X_0_ADDR 0x00000600 + +#define CCAM3_SISLEY_ROI_EM_X_1_ADDR 0x00000604 + +#define CCAM3_SISLEY_ROI_EM_X_2_ADDR 0x00000608 + +#define CCAM3_SISLEY_ROI_EM_X_3_ADDR 0x0000060C + +#define CCAM3_SISLEY_ROI_EM_X_4_ADDR 0x00000610 + +#define CCAM3_SISLEY_ROI_EM_X_5_ADDR 0x00000614 + +#define CCAM3_SISLEY_ROI_EM_X_6_ADDR 0x00000618 + +#define CCAM3_SISLEY_ROI_EM_X_7_ADDR 0x0000061C + +#define CCAM3_SISLEY_ROI_EM_X_8_ADDR 0x00000620 + +#define CCAM3_SISLEY_ROI_EM_X_9_ADDR 0x00000624 + +#define CCAM3_SISLEY_ROI_EM_X_10_ADDR 0x00000628 + +#define CCAM3_SISLEY_ROI_EM_X_11_ADDR 0x0000062C + +#define CCAM3_SISLEY_ROI_EM_X_12_ADDR 0x00000630 + +#define CCAM3_SISLEY_ROI_EM_X_13_ADDR 0x00000634 + +#define CCAM3_SISLEY_ROI_EM_X_14_ADDR 0x00000638 + +#define CCAM3_SISLEY_ROI_EM_X_15_ADDR 0x0000063C + +#define CCAM3_SISLEY_ROI_EM_X_16_ADDR 0x00000640 + +#define CCAM3_SISLEY_ROI_EM_X_17_ADDR 0x00000644 + +#define CCAM3_SISLEY_ROI_EM_X_18_ADDR 0x00000648 + +#define CCAM3_SISLEY_ROI_EM_X_19_ADDR 0x0000064C + +#define CCAM3_SISLEY_ROI_EM_X_20_ADDR 0x00000650 + +//------------------------------------------------------------------------------------------------------------ +// SENSOR - EM ROI Y +//------------------------------------------------------------------------------------------------------------ + +#define CCAM3_SISLEY_ROI_EM_Y_0_ADDR 0x00000700 + +#define CCAM3_SISLEY_ROI_EM_Y_1_ADDR 0x00000704 + +#define CCAM3_SISLEY_ROI_EM_Y_2_ADDR 0x00000708 + +#define CCAM3_SISLEY_ROI_EM_Y_3_ADDR 0x0000070C + +#define CCAM3_SISLEY_ROI_EM_Y_4_ADDR 0x00000710 + +#define CCAM3_SISLEY_ROI_EM_Y_5_ADDR 0x00000714 + +#define CCAM3_SISLEY_ROI_EM_Y_6_ADDR 0x00000718 + +#define CCAM3_SISLEY_ROI_EM_Y_7_ADDR 0x0000071C + +#define CCAM3_SISLEY_ROI_EM_Y_8_ADDR 0x00000720 + +#define CCAM3_SISLEY_ROI_EM_Y_9_ADDR 0x00000724 + +#define CCAM3_SISLEY_ROI_EM_Y_10_ADDR 0x00000728 + +#define CCAM3_SISLEY_ROI_EM_Y_11_ADDR 0x0000072C + +#define CCAM3_SISLEY_ROI_EM_Y_12_ADDR 0x00000730 + +#define CCAM3_SISLEY_ROI_EM_Y_13_ADDR 0x00000734 + +#define CCAM3_SISLEY_ROI_EM_Y_14_ADDR 0x00000738 + +#define CCAM3_SISLEY_ROI_EM_Y_15_ADDR 0x0000073C + +//------------------------------------------------------------------------------------------------------------ +// CCAM3_SISLEY_IF +//------------------------------------------------------------------------------------------------------------ + +#define CCAM3_SISLEY_IF_BASE_ADDR 0x00000740 +#define CCAM3_SISLEY_IF_LAST_ADDR 0x00000750 +#define CCAM3_SISLEY_IF_SIZE 0x000000C0 + +#define CCAM3_SISLEY_IF_TEST_PATTERN_CONTROL_ADDR 0x00000740 +#define CCAM3_SISLEY_IF_TEST_PATTERN_CONTROL_ENABLE_BIT_IDX 0 +#define CCAM3_SISLEY_IF_TEST_PATTERN_CONTROL_ENABLE_WIDTH 1 +#define CCAM3_SISLEY_IF_TEST_PATTERN_CONTROL_ENABLE_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IF_TEST_PATTERN_CONTROL_TYPE_BIT_IDX 4 +#define CCAM3_SISLEY_IF_TEST_PATTERN_CONTROL_TYPE_WIDTH 1 +#define CCAM3_SISLEY_IF_TEST_PATTERN_CONTROL_TYPE_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IF_TEST_PATTERN_CONTROL_PIXEL_TYPE_BIT_IDX 8 +#define CCAM3_SISLEY_IF_TEST_PATTERN_CONTROL_PIXEL_TYPE_WIDTH 1 +#define CCAM3_SISLEY_IF_TEST_PATTERN_CONTROL_PIXEL_TYPE_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IF_TEST_PATTERN_CONTROL_PIXEL_POLARITY_BIT_IDX 12 +#define CCAM3_SISLEY_IF_TEST_PATTERN_CONTROL_PIXEL_POLARITY_WIDTH 1 +#define CCAM3_SISLEY_IF_TEST_PATTERN_CONTROL_PIXEL_POLARITY_DEFAULT 0x00000000 + +#define CCAM3_SISLEY_IF_TEST_PATTERN_N_PERIOD_ADDR 0x00000744 +#define CCAM3_SISLEY_IF_TEST_PATTERN_N_PERIOD_VALID_RATIO_BIT_IDX 0 +#define CCAM3_SISLEY_IF_TEST_PATTERN_N_PERIOD_VALID_RATIO_WIDTH 10 +#define CCAM3_SISLEY_IF_TEST_PATTERN_N_PERIOD_VALID_RATIO_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IF_TEST_PATTERN_N_PERIOD_LENGTH_BIT_IDX 16 +#define CCAM3_SISLEY_IF_TEST_PATTERN_N_PERIOD_LENGTH_WIDTH 16 +#define CCAM3_SISLEY_IF_TEST_PATTERN_N_PERIOD_LENGTH_DEFAULT 0x00000000 + +#define CCAM3_SISLEY_IF_TEST_PATTERN_P_PERIOD_ADDR 0x00000748 +#define CCAM3_SISLEY_IF_TEST_PATTERN_P_PERIOD_VALID_RATIO_BIT_IDX 0 +#define CCAM3_SISLEY_IF_TEST_PATTERN_P_PERIOD_VALID_RATIO_WIDTH 10 +#define CCAM3_SISLEY_IF_TEST_PATTERN_P_PERIOD_VALID_RATIO_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IF_TEST_PATTERN_P_PERIOD_LENGTH_BIT_IDX 16 +#define CCAM3_SISLEY_IF_TEST_PATTERN_P_PERIOD_LENGTH_WIDTH 16 +#define CCAM3_SISLEY_IF_TEST_PATTERN_P_PERIOD_LENGTH_DEFAULT 0x00000000 + +#define CCAM3_SISLEY_IF_CONTROL_ADDR 0x0000074C +#define CCAM3_SISLEY_IF_CONTROL_SELF_ACK_BIT_IDX 0 +#define CCAM3_SISLEY_IF_CONTROL_SELF_ACK_WIDTH 1 +#define CCAM3_SISLEY_IF_CONTROL_SELF_ACK_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IF_CONTROL_SENSOR_CLK_EN_BIT_IDX 1 +#define CCAM3_SISLEY_IF_CONTROL_SENSOR_CLK_EN_WIDTH 1 +#define CCAM3_SISLEY_IF_CONTROL_SENSOR_CLK_EN_DEFAULT 0x00000001 +#define CCAM3_SISLEY_IF_CONTROL_EM_RSTN_TRIGGER_EN_BIT_IDX 4 +#define CCAM3_SISLEY_IF_CONTROL_EM_RSTN_TRIGGER_EN_WIDTH 1 +#define CCAM3_SISLEY_IF_CONTROL_EM_RSTN_TRIGGER_EN_DEFAULT 0x00000000 + +#define CCAM3_SISLEY_IF_TRIGGERS_ADDR 0x00000750 +#define CCAM3_SISLEY_IF_TRIGGERS_RESET_AFIFO_BIT_IDX 0 +#define CCAM3_SISLEY_IF_TRIGGERS_RESET_AFIFO_WIDTH 1 +#define CCAM3_SISLEY_IF_TRIGGERS_RESET_AFIFO_DEFAULT 0x00000000 + +//------------------------------------------------------------------------------------------------------------ +// CCAM3_SYSTEM_CONFIG +//------------------------------------------------------------------------------------------------------------ + +#define CCAM3_SYSTEM_CONFIG_BASE_ADDR 0x00000800 +#define CCAM3_SYSTEM_CONFIG_LAST_ADDR 0x0000080C +#define CCAM3_SYSTEM_CONFIG_SIZE 0x00000010 + +#define CCAM3_SYSTEM_CONFIG_ID_ADDR 0x00000800 +#define CCAM3_SYSTEM_CONFIG_ID_BIT_IDX 0 +#define CCAM3_SYSTEM_CONFIG_ID_WIDTH 8 +#define CCAM3_SYSTEM_CONFIG_ID_DEFAULT 0x00000015 + +#define CCAM3_SYSTEM_CONFIG_VERSION_ADDR 0x00000804 +#define CCAM3_SYSTEM_CONFIG_VERSION_MICRO_BIT_IDX 0 +#define CCAM3_SYSTEM_CONFIG_VERSION_MICRO_WIDTH 8 +#define CCAM3_SYSTEM_CONFIG_VERSION_MICRO_DEFAULT 0x00000000 +#define CCAM3_SYSTEM_CONFIG_VERSION_MINOR_BIT_IDX 8 +#define CCAM3_SYSTEM_CONFIG_VERSION_MINOR_WIDTH 8 +#define CCAM3_SYSTEM_CONFIG_VERSION_MINOR_DEFAULT 0x00000000 +#define CCAM3_SYSTEM_CONFIG_VERSION_MAJOR_BIT_IDX 16 +#define CCAM3_SYSTEM_CONFIG_VERSION_MAJOR_WIDTH 8 +#define CCAM3_SYSTEM_CONFIG_VERSION_MAJOR_DEFAULT 0x00000000 + +#define CCAM3_SYSTEM_CONFIG_BUILD_DATE_ADDR 0x00000808 +#define CCAM3_SYSTEM_CONFIG_BUILD_DATE_BIT_IDX 0 +#define CCAM3_SYSTEM_CONFIG_BUILD_DATE_WIDTH 32 +#define CCAM3_SYSTEM_CONFIG_BUILD_DATE_DEFAULT 0x00000000 + +#define CCAM3_SYSTEM_CONFIG_VERSION_CONTROL_ID_ADDR 0x0000080C +#define CCAM3_SYSTEM_CONFIG_VERSION_CONTROL_ID_BIT_IDX 0 +#define CCAM3_SYSTEM_CONFIG_VERSION_CONTROL_ID_WIDTH 32 +#define CCAM3_SYSTEM_CONFIG_VERSION_CONTROL_ID_DEFAULT 0x00000000 + +//------------------------------------------------------------------------------------------------------------ +// CCAM3_FX3_HOST_IF +//------------------------------------------------------------------------------------------------------------ + +#define CCAM3_FX3_HOST_IF_BASE_ADDR 0x00001400 +#define CCAM3_FX3_HOST_IF_LAST_ADDR 0x00001408 +#define CCAM3_FX3_HOST_IF_SIZE 0x00000100 + +#define CCAM3_FX3_HOST_IF_PKT_END_ENABLE_ADDR 0x00001400 +#define CCAM3_FX3_HOST_IF_PKT_END_ENABLE_SHORT_PACKET_ENABLE_BIT_IDX 0 +#define CCAM3_FX3_HOST_IF_PKT_END_ENABLE_SHORT_PACKET_ENABLE_WIDTH 1 +#define CCAM3_FX3_HOST_IF_PKT_END_ENABLE_SHORT_PACKET_ENABLE_DEFAULT 0x00000001 +#define CCAM3_FX3_HOST_IF_PKT_END_ENABLE_SHORT_PACKET_ENABLE_SKIP_BIT_IDX 1 +#define CCAM3_FX3_HOST_IF_PKT_END_ENABLE_SHORT_PACKET_ENABLE_SKIP_WIDTH 1 +#define CCAM3_FX3_HOST_IF_PKT_END_ENABLE_SHORT_PACKET_ENABLE_SKIP_DEFAULT 0x00000000 + +#define CCAM3_FX3_HOST_IF_PKT_END_INTERVAL_US_ADDR 0x00001404 +#define CCAM3_FX3_HOST_IF_PKT_END_INTERVAL_US_BIT_IDX 0 +#define CCAM3_FX3_HOST_IF_PKT_END_INTERVAL_US_WIDTH 32 +#define CCAM3_FX3_HOST_IF_PKT_END_INTERVAL_US_DEFAULT 0x00000400 + +#define CCAM3_FX3_HOST_IF_PKT_END_DATA_COUNT_ADDR 0x00001408 +#define CCAM3_FX3_HOST_IF_PKT_END_DATA_COUNT_BIT_IDX 0 +#define CCAM3_FX3_HOST_IF_PKT_END_DATA_COUNT_WIDTH 32 +#define CCAM3_FX3_HOST_IF_PKT_END_DATA_COUNT_DEFAULT 0x00000400 + +//------------------------------------------------------------------------------------------------------------ +// CCAM3_IMU +//------------------------------------------------------------------------------------------------------------ + +#define CCAM3_IMU_BASE_ADDR 0x00001900 +#define CCAM3_IMU_LAST_ADDR 0x00001975 +#define CCAM3_IMU_SIZE 0x00000080 + +#define CCAM3_IMU_AX_MSB_ADDR 0x0000193B // IMU Accelerometer X-Axis MSB: AX[15:8] +#define CCAM3_IMU_AX_MSB_VALUE_BIT_IDX 0 // IMU Accelerometer X-Axis MSB: AX[15:8] value +#define CCAM3_IMU_AX_MSB_VALUE_WIDTH 8 +#define CCAM3_IMU_AX_MSB_VALUE_DEFAULT 0x00000000 + +#define CCAM3_IMU_AX_LSB_ADDR 0x0000193C // IMU Accelerometer X-Axis LSB: AX[7:0] +#define CCAM3_IMU_AX_LSB_VALUE_BIT_IDX 0 // IMU Accelerometer X-Axis LSB: AX[7:0] value +#define CCAM3_IMU_AX_LSB_VALUE_WIDTH 8 +#define CCAM3_IMU_AX_LSB_VALUE_DEFAULT 0x00000000 + +#define CCAM3_IMU_AY_MSB_ADDR 0x0000193D // IMU Accelerometer Y-Axis MSB: AY[15:8] +#define CCAM3_IMU_AY_MSB_VALUE_BIT_IDX 0 // IMU Accelerometer Y-Axis MSB: AY[15:8] value +#define CCAM3_IMU_AY_MSB_VALUE_WIDTH 8 +#define CCAM3_IMU_AY_MSB_VALUE_DEFAULT 0x00000000 + +#define CCAM3_IMU_AY_LSB_ADDR 0x0000193E // IMU Accelerometer Y-Axis LSB: AY[7:0] +#define CCAM3_IMU_AY_LSB_VALUE_BIT_IDX 0 // IMU Accelerometer Y-Axis LSB: AY[7:0] value +#define CCAM3_IMU_AY_LSB_VALUE_WIDTH 8 +#define CCAM3_IMU_AY_LSB_VALUE_DEFAULT 0x00000000 + +#define CCAM3_IMU_AZ_MSB_ADDR 0x0000193F // IMU Accelerometer Z-Axis MSB: AZ[15:8] +#define CCAM3_IMU_AZ_MSB_VALUE_BIT_IDX 0 // IMU Accelerometer Z-Axis MSB: AZ[15:8] value +#define CCAM3_IMU_AZ_MSB_VALUE_WIDTH 8 +#define CCAM3_IMU_AZ_MSB_VALUE_DEFAULT 0x00000000 + +#define CCAM3_IMU_AZ_LSB_ADDR 0x00001940 // IMU Accelerometer Z-Axis LSB: AZ[7:0] +#define CCAM3_IMU_AZ_LSB_VALUE_BIT_IDX 0 // IMU Accelerometer Z-Axis LSB: AZ[7:0] value +#define CCAM3_IMU_AZ_LSB_VALUE_WIDTH 8 +#define CCAM3_IMU_AZ_LSB_VALUE_DEFAULT 0x00000000 + +#define CCAM3_IMU_GX_MSB_ADDR 0x00001943 // IMU Gyroscope X-Axis MSB: GX[15:8] +#define CCAM3_IMU_GX_MSB_VALUE_BIT_IDX 0 // IMU Gyroscope X-Axis MSB: GX[15:8] value +#define CCAM3_IMU_GX_MSB_VALUE_WIDTH 8 +#define CCAM3_IMU_GX_MSB_VALUE_DEFAULT 0x00000000 + +#define CCAM3_IMU_GX_LSB_ADDR 0x00001944 // IMU Gyroscope X-Axis LSB: GX[7:0] +#define CCAM3_IMU_GX_LSB_VALUE_BIT_IDX 0 // IMU Gyroscope X-Axis LSB: GX[7:0] value +#define CCAM3_IMU_GX_LSB_VALUE_WIDTH 8 +#define CCAM3_IMU_GX_LSB_VALUE_DEFAULT 0x00000000 + +#define CCAM3_IMU_GY_MSB_ADDR 0x00001945 // IMU Gyroscope Y-Axis MSB: GY[15:8] +#define CCAM3_IMU_GY_MSB_VALUE_BIT_IDX 0 // IMU Gyroscope Y-Axis MSB: GY[15:8] value +#define CCAM3_IMU_GY_MSB_VALUE_WIDTH 8 +#define CCAM3_IMU_GY_MSB_VALUE_DEFAULT 0x00000000 + +#define CCAM3_IMU_GY_LSB_ADDR 0x00001946 // IMU Gyroscope Y-Axis LSB: GY[7:0] +#define CCAM3_IMU_GY_LSB_VALUE_BIT_IDX 0 // IMU Gyroscope Y-Axis LSB: GY[7:0] value +#define CCAM3_IMU_GY_LSB_VALUE_WIDTH 8 +#define CCAM3_IMU_GY_LSB_VALUE_DEFAULT 0x00000000 + +#define CCAM3_IMU_GZ_MSB_ADDR 0x00001947 // IMU Gyroscope Z-Axis MSB: GZ[15:8] +#define CCAM3_IMU_GZ_MSB_VALUE_BIT_IDX 0 // IMU Gyroscope Z-Axis MSB: GZ[15:8] value +#define CCAM3_IMU_GZ_MSB_VALUE_WIDTH 8 +#define CCAM3_IMU_GZ_MSB_VALUE_DEFAULT 0x00000000 + +#define CCAM3_IMU_GZ_LSB_ADDR 0x00001948 // IMU Gyroscope Z-Axis LSB: GZ[7:0] +#define CCAM3_IMU_GZ_LSB_VALUE_BIT_IDX 0 // IMU Gyroscope Z-Axis LSB: GZ[7:0] value +#define CCAM3_IMU_GZ_LSB_VALUE_WIDTH 8 +#define CCAM3_IMU_GZ_LSB_VALUE_DEFAULT 0x00000000 + +#define CCAM3_IMU_WHOAMI_ADDR 0x00001975 // IMU Who Am I +#define CCAM3_IMU_WHOAMI_VALUE_BIT_IDX 0 // IMU Who Am I value +#define CCAM3_IMU_WHOAMI_VALUE_WIDTH 8 +#define CCAM3_IMU_WHOAMI_VALUE_DEFAULT 0x00000000 + +#endif // METAVISION_HAL_CCAM3_SINGLE_GEN3_H diff --git a/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/ext_trigger_monitor_register_map.h b/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/ext_trigger_monitor_register_map.h new file mode 100644 index 000000000..c61707f12 --- /dev/null +++ b/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/ext_trigger_monitor_register_map.h @@ -0,0 +1,47 @@ +/********************************************************************************************** + * WARNING: THIS FILE HAS BEEN GENERATED BY REG_MAP_MANAGER TOOLS PLEASE DO NOT MODIFY IT * + ********************************************************************************************** + * File: ext_trigger_monitor_register_map.h * + * * + * Copyright (c) 2015-2018 Prophesee. All rights reserved. * + * * + * Date: 08/10/2018 at 12h05m31s * + * Name: ext_trigger_monitor_register_map * + * Version: 1.0 * + * Hash: e73845edac06468dfbdf8a7a69939124566034ed1a39c746846111cba8d0dd58 * + ********************************************************************************************** + * WARNING: THIS FILE HAS BEEN GENERATED BY REG_MAP_MANAGER TOOLS PLEASE DO NOT MODIFY IT * + *********************************************************************************************/ + +#ifndef METAVISION_HAL_EXT_TRIGGER_MONITOR_REGISTER_MAP_H +#define METAVISION_HAL_EXT_TRIGGER_MONITOR_REGISTER_MAP_H + +//------------------------------------------------------------------------------------------------------------ +// EXT_TRIGGER_MONITOR +//------------------------------------------------------------------------------------------------------------ + +#define EXT_TRIGGER_MONITOR_BASE_ADDR 0x00000000 +#define EXT_TRIGGER_MONITOR_LAST_ADDR 0x0000000C +#define EXT_TRIGGER_MONITOR_SIZE 0x00000020 + +#define EXT_TRIGGER_MONITOR_ENABLE_ADDR 0x00000000 +#define EXT_TRIGGER_MONITOR_ENABLE_VALUE_BIT_IDX 0 +#define EXT_TRIGGER_MONITOR_ENABLE_VALUE_WIDTH 1 +#define EXT_TRIGGER_MONITOR_ENABLE_VALUE_DEFAULT 0x00000000 + +#define EXT_TRIGGER_MONITOR_OUT_ENABLE_ADDR 0x00000004 +#define EXT_TRIGGER_MONITOR_OUT_ENABLE_VALUE_BIT_IDX 0 +#define EXT_TRIGGER_MONITOR_OUT_ENABLE_VALUE_WIDTH 1 +#define EXT_TRIGGER_MONITOR_OUT_ENABLE_VALUE_DEFAULT 0x00000000 + +#define EXT_TRIGGER_MONITOR_OUT_PULSE_PERIOD_ADDR 0x00000008 +#define EXT_TRIGGER_MONITOR_OUT_PULSE_PERIOD_BIT_IDX 0 +#define EXT_TRIGGER_MONITOR_OUT_PULSE_PERIOD_WIDTH 32 +#define EXT_TRIGGER_MONITOR_OUT_PULSE_PERIOD_DEFAULT 0x00000064 + +#define EXT_TRIGGER_MONITOR_OUT_PULSE_WIDTH_ADDR 0x0000000C +#define EXT_TRIGGER_MONITOR_OUT_PULSE_WIDTH_BIT_IDX 0 +#define EXT_TRIGGER_MONITOR_OUT_PULSE_WIDTH_WIDTH 32 +#define EXT_TRIGGER_MONITOR_OUT_PULSE_WIDTH_DEFAULT 0x00000001 + +#endif // METAVISION_HAL_EXT_TRIGGER_MONITOR_REGISTER_MAP_H diff --git a/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/fx3_host_if_register_map.h b/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/fx3_host_if_register_map.h new file mode 100644 index 000000000..3cbf475e5 --- /dev/null +++ b/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/fx3_host_if_register_map.h @@ -0,0 +1,45 @@ +/********************************************************************************************** + * WARNING: THIS FILE HAS BEEN GENERATED BY REG_MAP_MANAGER TOOLS PLEASE DO NOT MODIFY IT * + ********************************************************************************************** + * File: fx3_host_if_register_map.h * + * * + * Copyright (c) 2015-2018 Prophesee. All rights reserved. * + * * + * Date: 08/10/2018 at 12h05m31s * + * Name: fx3_host_if_register_map * + * Version: 1.0 * + * Hash: 3bfdc4377fe90051cbf001be0c0febb225899c8714f374e9eb0d9898bd4bc05b * + ********************************************************************************************** + * WARNING: THIS FILE HAS BEEN GENERATED BY REG_MAP_MANAGER TOOLS PLEASE DO NOT MODIFY IT * + *********************************************************************************************/ + +#ifndef METAVISION_HAL_FX3_HOST_IF_REGISTER_MAP_H +#define METAVISION_HAL_FX3_HOST_IF_REGISTER_MAP_H + +//------------------------------------------------------------------------------------------------------------ +// FX3_HOST_IF +//------------------------------------------------------------------------------------------------------------ + +#define FX3_HOST_IF_BASE_ADDR 0x00000000 +#define FX3_HOST_IF_LAST_ADDR 0x00000008 +#define FX3_HOST_IF_SIZE 0x00000100 + +#define FX3_HOST_IF_PKT_END_ENABLE_ADDR 0x00000000 +#define FX3_HOST_IF_PKT_END_ENABLE_SHORT_PACKET_ENABLE_BIT_IDX 0 +#define FX3_HOST_IF_PKT_END_ENABLE_SHORT_PACKET_ENABLE_WIDTH 1 +#define FX3_HOST_IF_PKT_END_ENABLE_SHORT_PACKET_ENABLE_DEFAULT 0x00000001 +#define FX3_HOST_IF_PKT_END_ENABLE_SHORT_PACKET_ENABLE_SKIP_BIT_IDX 1 +#define FX3_HOST_IF_PKT_END_ENABLE_SHORT_PACKET_ENABLE_SKIP_WIDTH 1 +#define FX3_HOST_IF_PKT_END_ENABLE_SHORT_PACKET_ENABLE_SKIP_DEFAULT 0x00000000 + +#define FX3_HOST_IF_PKT_END_INTERVAL_US_ADDR 0x00000004 +#define FX3_HOST_IF_PKT_END_INTERVAL_US_BIT_IDX 0 +#define FX3_HOST_IF_PKT_END_INTERVAL_US_WIDTH 32 +#define FX3_HOST_IF_PKT_END_INTERVAL_US_DEFAULT 0x00000400 + +#define FX3_HOST_IF_PKT_END_DATA_COUNT_ADDR 0x00000008 +#define FX3_HOST_IF_PKT_END_DATA_COUNT_BIT_IDX 0 +#define FX3_HOST_IF_PKT_END_DATA_COUNT_WIDTH 32 +#define FX3_HOST_IF_PKT_END_DATA_COUNT_DEFAULT 0x00000400 + +#endif // METAVISION_HAL_FX3_HOST_IF_REGISTER_MAP_H diff --git a/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/gen3_if_register_map.h b/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/gen3_if_register_map.h new file mode 100644 index 000000000..81b71a184 --- /dev/null +++ b/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/gen3_if_register_map.h @@ -0,0 +1,73 @@ +/********************************************************************************************** + * WARNING: THIS FILE HAS BEEN GENERATED BY REG_MAP_MANAGER TOOLS PLEASE DO NOT MODIFY IT * + ********************************************************************************************** + * File: gen3_if_register_map.h * + * * + * Copyright (c) 2015-2018 Prophesee. All rights reserved. * + * * + * Date: 08/10/2018 at 12h05m31s * + * Name: gen3_if_register_map * + * Version: 1.0 * + * Hash: 0ea2255587212f208ba5c9e2f53ac1a3f537456497c0bfdff9f15967e558ea69 * + ********************************************************************************************** + * WARNING: THIS FILE HAS BEEN GENERATED BY REG_MAP_MANAGER TOOLS PLEASE DO NOT MODIFY IT * + *********************************************************************************************/ + +#ifndef METAVISION_HAL_GEN3_IF_REGISTER_MAP_H +#define METAVISION_HAL_GEN3_IF_REGISTER_MAP_H + +//------------------------------------------------------------------------------------------------------------ +// SISLEY_IF +//------------------------------------------------------------------------------------------------------------ + +#define SISLEY_IF_BASE_ADDR 0x00000000 +#define SISLEY_IF_LAST_ADDR 0x00000010 +#define SISLEY_IF_SIZE 0x000000C0 + +#define SISLEY_IF_TEST_PATTERN_CONTROL_ADDR 0x00000000 +#define SISLEY_IF_TEST_PATTERN_CONTROL_ENABLE_BIT_IDX 0 +#define SISLEY_IF_TEST_PATTERN_CONTROL_ENABLE_WIDTH 1 +#define SISLEY_IF_TEST_PATTERN_CONTROL_ENABLE_DEFAULT 0x00000000 +#define SISLEY_IF_TEST_PATTERN_CONTROL_TYPE_BIT_IDX 4 +#define SISLEY_IF_TEST_PATTERN_CONTROL_TYPE_WIDTH 1 +#define SISLEY_IF_TEST_PATTERN_CONTROL_TYPE_DEFAULT 0x00000000 +#define SISLEY_IF_TEST_PATTERN_CONTROL_PIXEL_TYPE_BIT_IDX 8 +#define SISLEY_IF_TEST_PATTERN_CONTROL_PIXEL_TYPE_WIDTH 1 +#define SISLEY_IF_TEST_PATTERN_CONTROL_PIXEL_TYPE_DEFAULT 0x00000000 +#define SISLEY_IF_TEST_PATTERN_CONTROL_PIXEL_POLARITY_BIT_IDX 12 +#define SISLEY_IF_TEST_PATTERN_CONTROL_PIXEL_POLARITY_WIDTH 1 +#define SISLEY_IF_TEST_PATTERN_CONTROL_PIXEL_POLARITY_DEFAULT 0x00000000 + +#define SISLEY_IF_TEST_PATTERN_N_PERIOD_ADDR 0x00000004 +#define SISLEY_IF_TEST_PATTERN_N_PERIOD_VALID_RATIO_BIT_IDX 0 +#define SISLEY_IF_TEST_PATTERN_N_PERIOD_VALID_RATIO_WIDTH 10 +#define SISLEY_IF_TEST_PATTERN_N_PERIOD_VALID_RATIO_DEFAULT 0x00000000 +#define SISLEY_IF_TEST_PATTERN_N_PERIOD_LENGTH_BIT_IDX 16 +#define SISLEY_IF_TEST_PATTERN_N_PERIOD_LENGTH_WIDTH 16 +#define SISLEY_IF_TEST_PATTERN_N_PERIOD_LENGTH_DEFAULT 0x00000000 + +#define SISLEY_IF_TEST_PATTERN_P_PERIOD_ADDR 0x00000008 +#define SISLEY_IF_TEST_PATTERN_P_PERIOD_VALID_RATIO_BIT_IDX 0 +#define SISLEY_IF_TEST_PATTERN_P_PERIOD_VALID_RATIO_WIDTH 10 +#define SISLEY_IF_TEST_PATTERN_P_PERIOD_VALID_RATIO_DEFAULT 0x00000000 +#define SISLEY_IF_TEST_PATTERN_P_PERIOD_LENGTH_BIT_IDX 16 +#define SISLEY_IF_TEST_PATTERN_P_PERIOD_LENGTH_WIDTH 16 +#define SISLEY_IF_TEST_PATTERN_P_PERIOD_LENGTH_DEFAULT 0x00000000 + +#define SISLEY_IF_CONTROL_ADDR 0x0000000C +#define SISLEY_IF_CONTROL_SELF_ACK_BIT_IDX 0 +#define SISLEY_IF_CONTROL_SELF_ACK_WIDTH 1 +#define SISLEY_IF_CONTROL_SELF_ACK_DEFAULT 0x00000000 +#define SISLEY_IF_CONTROL_SENSOR_CLK_EN_BIT_IDX 1 +#define SISLEY_IF_CONTROL_SENSOR_CLK_EN_WIDTH 1 +#define SISLEY_IF_CONTROL_SENSOR_CLK_EN_DEFAULT 0x00000001 +#define SISLEY_IF_CONTROL_EM_RSTN_TRIGGER_EN_BIT_IDX 4 +#define SISLEY_IF_CONTROL_EM_RSTN_TRIGGER_EN_WIDTH 1 +#define SISLEY_IF_CONTROL_EM_RSTN_TRIGGER_EN_DEFAULT 0x00000000 + +#define SISLEY_IF_TRIGGERS_ADDR 0x00000010 +#define SISLEY_IF_TRIGGERS_RESET_AFIFO_BIT_IDX 0 +#define SISLEY_IF_TRIGGERS_RESET_AFIFO_WIDTH 1 +#define SISLEY_IF_TRIGGERS_RESET_AFIFO_DEFAULT 0x00000000 + +#endif // METAVISION_HAL_GEN3_IF_REGISTER_MAP_H diff --git a/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/gen3_sensor_if_register_map.h b/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/gen3_sensor_if_register_map.h new file mode 100644 index 000000000..87ff51abd --- /dev/null +++ b/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/gen3_sensor_if_register_map.h @@ -0,0 +1,1524 @@ +/********************************************************************************************** + * WARNING: THIS FILE HAS BEEN GENERATED BY REG_MAP_MANAGER TOOLS PLEASE DO NOT MODIFY IT * + ********************************************************************************************** + * File: gen3_sensor_if_register_map.h * + * * + * Copyright (c) 2015-2018 Prophesee. All rights reserved. * + * * + * Date: 08/10/2018 at 12h05m31s * + * Name: gen3_sensor_if_register_map * + * Version: 1.0 * + * Hash: c1ec92a2da06fe3d009bd9f1fb6372b5dcba6f4ca22c11806d71c6f2d063d17f * + ********************************************************************************************** + * WARNING: THIS FILE HAS BEEN GENERATED BY REG_MAP_MANAGER TOOLS PLEASE DO NOT MODIFY IT * + *********************************************************************************************/ + +#ifndef METAVISION_HAL_GEN3_SENSOR_IF_REGISTER_MAP_H +#define METAVISION_HAL_GEN3_SENSOR_IF_REGISTER_MAP_H + +#include "gen3_sensor_register_map.h" +#include "gen3_if_register_map.h" + +//------------------------------------------------------------------------------------------------------------ +// SENSOR_IF +//------------------------------------------------------------------------------------------------------------ + +#define SENSOR_IF_BASE_ADDR 0x00000000 +#define SENSOR_IF_LAST_ADDR 0x00000550 +#define SENSOR_IF_SIZE 0x00000600 + +//------------------------------------------------------------------------------------------------------------ +// SENSOR_IF_SISLEY +//------------------------------------------------------------------------------------------------------------ + +#define SENSOR_IF_SISLEY_BASE_ADDR 0x00000000 +#define SENSOR_IF_SISLEY_LAST_ADDR 0x0000053C +#define SENSOR_IF_SISLEY_SIZE 0x00000540 + +//------------------------------------------------------------------------------------------------------------ +// SENSOR - Global CTRL +//------------------------------------------------------------------------------------------------------------ + +#define SENSOR_IF_SISLEY_SENSOR_GLOBAL_CTRL_ADDR 0x00000000 +#define SENSOR_IF_SISLEY_SENSOR_GLOBAL_CTRL_TD_COUPLE_CTRL_BIT_IDX \ + 0 // Enable ATIS em + // 0: td events do not trigger em events + // 1: td events trigger em events +#define SENSOR_IF_SISLEY_SENSOR_GLOBAL_CTRL_TD_COUPLE_CTRL_WIDTH 1 +#define SENSOR_IF_SISLEY_SENSOR_GLOBAL_CTRL_TD_COUPLE_CTRL_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_SENSOR_GLOBAL_CTRL_SW_GLOBAL_EN_BIT_IDX \ + 1 // Global enable for the analog. Used in glue logic with block level reset. + // 0: hold analog in reset + // 1: analog can be enabled +#define SENSOR_IF_SISLEY_SENSOR_GLOBAL_CTRL_SW_GLOBAL_EN_WIDTH 1 +#define SENSOR_IF_SISLEY_SENSOR_GLOBAL_CTRL_SW_GLOBAL_EN_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_SENSOR_GLOBAL_CTRL_BYPASS_DIGITAL_READOUT_CTRL_BIT_IDX \ + 2 // Enable the readout fast path to route async interface directly to the digital output: + // 0: digital readout is functional + // 1: digital readout is bypassed +#define SENSOR_IF_SISLEY_SENSOR_GLOBAL_CTRL_BYPASS_DIGITAL_READOUT_CTRL_WIDTH 1 +#define SENSOR_IF_SISLEY_SENSOR_GLOBAL_CTRL_BYPASS_DIGITAL_READOUT_CTRL_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_SENSOR_GLOBAL_CTRL_BGEN_RST_BIT_IDX \ + 3 // BIAS reset + // 0: biases connected to their reset values + // 1: biases connected to their bias generator +#define SENSOR_IF_SISLEY_SENSOR_GLOBAL_CTRL_BGEN_RST_WIDTH 1 +#define SENSOR_IF_SISLEY_SENSOR_GLOBAL_CTRL_BGEN_RST_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_SENSOR_GLOBAL_CTRL_BGEN_EN_BIT_IDX \ + 4 // BIAS enable + // 0: disable PTAT of bias generators + // 1: enable PTAT of bias generators +#define SENSOR_IF_SISLEY_SENSOR_GLOBAL_CTRL_BGEN_EN_WIDTH 1 +#define SENSOR_IF_SISLEY_SENSOR_GLOBAL_CTRL_BGEN_EN_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_SENSOR_GLOBAL_CTRL_TOP_CLK_DIV_EN_BIT_IDX 5 // Enable the digital core clock frequency divider +#define SENSOR_IF_SISLEY_SENSOR_GLOBAL_CTRL_TOP_CLK_DIV_EN_WIDTH 1 +#define SENSOR_IF_SISLEY_SENSOR_GLOBAL_CTRL_TOP_CLK_DIV_EN_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_SENSOR_GLOBAL_CTRL_TOP_CLK_DIV_FACTOR_BIT_IDX \ + 6 // Devide frequency: + // 1: 2-factor + // 2: 4-factor + // 4: 8-factor(these 3 bits are supposed to be one-hot (aka only one divider factor must be selected). If it's not + // the case the lowest one wins) +#define SENSOR_IF_SISLEY_SENSOR_GLOBAL_CTRL_TOP_CLK_DIV_FACTOR_WIDTH 3 +#define SENSOR_IF_SISLEY_SENSOR_GLOBAL_CTRL_TOP_CLK_DIV_FACTOR_DEFAULT 0x00000000 + +#define SENSOR_IF_SISLEY_SENSOR_ROI_CTRL_ADDR 0x00000004 +#define SENSOR_IF_SISLEY_SENSOR_ROI_CTRL_ROI_EM_EN_BIT_IDX \ + 0 // Enable ROI EM + // 0 : EM full array + // 1 : EM ROI +#define SENSOR_IF_SISLEY_SENSOR_ROI_CTRL_ROI_EM_EN_WIDTH 1 +#define SENSOR_IF_SISLEY_SENSOR_ROI_CTRL_ROI_EM_EN_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_SENSOR_ROI_CTRL_ROI_TD_EN_BIT_IDX \ + 1 // Enable ROI TD + // 0 : TD full array + // 1 : TD ROI +#define SENSOR_IF_SISLEY_SENSOR_ROI_CTRL_ROI_TD_EN_WIDTH 1 +#define SENSOR_IF_SISLEY_SENSOR_ROI_CTRL_ROI_TD_EN_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_SENSOR_ROI_CTRL_ROI_EM_SHUTTER_BIT_IDX 2 // 1: Resets the whole EM ROI X and Y arrays +#define SENSOR_IF_SISLEY_SENSOR_ROI_CTRL_ROI_EM_SHUTTER_WIDTH 1 +#define SENSOR_IF_SISLEY_SENSOR_ROI_CTRL_ROI_EM_SHUTTER_DEFAULT 0x00000001 +#define SENSOR_IF_SISLEY_SENSOR_ROI_CTRL_ROI_TD_RSTN_BIT_IDX 3 // 0: Resets the whole TD ROI X and Y arrays +#define SENSOR_IF_SISLEY_SENSOR_ROI_CTRL_ROI_TD_RSTN_WIDTH 1 +#define SENSOR_IF_SISLEY_SENSOR_ROI_CTRL_ROI_TD_RSTN_DEFAULT 0x00000001 +#define SENSOR_IF_SISLEY_SENSOR_ROI_CTRL_ROI_EM_SHADOW_TRIGGER_BIT_IDX \ + 4 // Latch the configured ROI EM into the shadow register +#define SENSOR_IF_SISLEY_SENSOR_ROI_CTRL_ROI_EM_SHADOW_TRIGGER_WIDTH 1 +#define SENSOR_IF_SISLEY_SENSOR_ROI_CTRL_ROI_EM_SHADOW_TRIGGER_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_SENSOR_ROI_CTRL_ROI_TD_SHADOW_TRIGGER_BIT_IDX \ + 5 // Latch the configured ROI TD into the shadow register +#define SENSOR_IF_SISLEY_SENSOR_ROI_CTRL_ROI_TD_SHADOW_TRIGGER_WIDTH 1 +#define SENSOR_IF_SISLEY_SENSOR_ROI_CTRL_ROI_TD_SHADOW_TRIGGER_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_SENSOR_ROI_CTRL_ROI_RONI_EN_BIT_IDX \ + 6 // The content of the roi register must be intepreted as RONI actually, RONI output is driven by the shadow + // registers, while ROI output pins are reset For now only roi_td_X shadow register is affected by this + // modification +#define SENSOR_IF_SISLEY_SENSOR_ROI_CTRL_ROI_RONI_EN_WIDTH 1 +#define SENSOR_IF_SISLEY_SENSOR_ROI_CTRL_ROI_RONI_EN_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_SENSOR_ROI_CTRL_ROI_EM_SCAN_EN_BIT_IDX \ + 7 // Any modification applied to roi em register is directly forwarded to the corresponding shadow register +#define SENSOR_IF_SISLEY_SENSOR_ROI_CTRL_ROI_EM_SCAN_EN_WIDTH 1 +#define SENSOR_IF_SISLEY_SENSOR_ROI_CTRL_ROI_EM_SCAN_EN_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_SENSOR_ROI_CTRL_ROI_TD_SCAN_EN_BIT_IDX \ + 8 // Any modification applied to roi td register is directly forwarded to the corresponding shadow register +#define SENSOR_IF_SISLEY_SENSOR_ROI_CTRL_ROI_TD_SCAN_EN_WIDTH 1 +#define SENSOR_IF_SISLEY_SENSOR_ROI_CTRL_ROI_TD_SCAN_EN_DEFAULT 0x00000000 + +#define SENSOR_IF_SISLEY_SENSOR_READOUT_CTRL_ADDR 0x00000008 +#define SENSOR_IF_SISLEY_SENSOR_READOUT_CTRL_RO_DELAY_RSTN_BIT_IDX \ + 0 // Resets tunable delay of the state machine + // 1: functional | 0: reset +#define SENSOR_IF_SISLEY_SENSOR_READOUT_CTRL_RO_DELAY_RSTN_WIDTH 1 +#define SENSOR_IF_SISLEY_SENSOR_READOUT_CTRL_RO_DELAY_RSTN_DEFAULT 0x00000001 +#define SENSOR_IF_SISLEY_SENSOR_READOUT_CTRL_RO_INTERFACE_X_RSTN_BIT_IDX \ + 1 // Resets X interface of the state machine + // 1: functional | 0: reset +#define SENSOR_IF_SISLEY_SENSOR_READOUT_CTRL_RO_INTERFACE_X_RSTN_WIDTH 1 +#define SENSOR_IF_SISLEY_SENSOR_READOUT_CTRL_RO_INTERFACE_X_RSTN_DEFAULT 0x00000001 +#define SENSOR_IF_SISLEY_SENSOR_READOUT_CTRL_RO_LATCH_Y_RSTN_BIT_IDX \ + 2 // Resets Y output latches td_y<9:0> + // 1: functional | 0: reset +#define SENSOR_IF_SISLEY_SENSOR_READOUT_CTRL_RO_LATCH_Y_RSTN_WIDTH 1 +#define SENSOR_IF_SISLEY_SENSOR_READOUT_CTRL_RO_LATCH_Y_RSTN_DEFAULT 0x00000001 +#define SENSOR_IF_SISLEY_SENSOR_READOUT_CTRL_RO_ACK_ARRAY_RSTN_BIT_IDX \ + 3 // Resets array acknowledge of the state machine + // 1: functional | 0: reset +#define SENSOR_IF_SISLEY_SENSOR_READOUT_CTRL_RO_ACK_ARRAY_RSTN_WIDTH 1 +#define SENSOR_IF_SISLEY_SENSOR_READOUT_CTRL_RO_ACK_ARRAY_RSTN_DEFAULT 0x00000001 +#define SENSOR_IF_SISLEY_SENSOR_READOUT_CTRL_RO_CTRL_RSTN_BIT_IDX \ + 4 // Resets control state machine + // 1: functional | 0: reset +#define SENSOR_IF_SISLEY_SENSOR_READOUT_CTRL_RO_CTRL_RSTN_WIDTH 1 +#define SENSOR_IF_SISLEY_SENSOR_READOUT_CTRL_RO_CTRL_RSTN_DEFAULT 0x00000001 +#define SENSOR_IF_SISLEY_SENSOR_READOUT_CTRL_RO_LATCH_DUM_CONNECT_CTRL_BIT_IDX \ + 5 // Connects dummy latch to req x or b + // 0: disconnected | 1: connected +#define SENSOR_IF_SISLEY_SENSOR_READOUT_CTRL_RO_LATCH_DUM_CONNECT_CTRL_WIDTH 1 +#define SENSOR_IF_SISLEY_SENSOR_READOUT_CTRL_RO_LATCH_DUM_CONNECT_CTRL_DEFAULT 0x00000001 +#define SENSOR_IF_SISLEY_SENSOR_READOUT_CTRL_RO_LATCH_DUM_RSTN_BIT_IDX \ + 6 // Resets dummy latch + // 1: functional | 0: reset +#define SENSOR_IF_SISLEY_SENSOR_READOUT_CTRL_RO_LATCH_DUM_RSTN_WIDTH 1 +#define SENSOR_IF_SISLEY_SENSOR_READOUT_CTRL_RO_LATCH_DUM_RSTN_DEFAULT 0x00000001 +#define SENSOR_IF_SISLEY_SENSOR_READOUT_CTRL_RO_PIXEL_DUM_RSTN_BIT_IDX \ + 7 // Resets dummy pixel + // 1: functional | 0: reset +#define SENSOR_IF_SISLEY_SENSOR_READOUT_CTRL_RO_PIXEL_DUM_RSTN_WIDTH 1 +#define SENSOR_IF_SISLEY_SENSOR_READOUT_CTRL_RO_PIXEL_DUM_RSTN_DEFAULT 0x00000001 +#define SENSOR_IF_SISLEY_SENSOR_READOUT_CTRL_RO_INTERFACE_Y_RSTN_BIT_IDX \ + 8 // Resets Y interface of the state machine + // 1: functional | 0: rese +#define SENSOR_IF_SISLEY_SENSOR_READOUT_CTRL_RO_INTERFACE_Y_RSTN_WIDTH 1 +#define SENSOR_IF_SISLEY_SENSOR_READOUT_CTRL_RO_INTERFACE_Y_RSTN_DEFAULT 0x00000001 +#define SENSOR_IF_SISLEY_SENSOR_READOUT_CTRL_RO_LATCH_X_RSTN_BIT_IDX \ + 9 // Resets X latches + // 1: functional | 0: reset +#define SENSOR_IF_SISLEY_SENSOR_READOUT_CTRL_RO_LATCH_X_RSTN_WIDTH 1 +#define SENSOR_IF_SISLEY_SENSOR_READOUT_CTRL_RO_LATCH_X_RSTN_DEFAULT 0x00000001 +#define SENSOR_IF_SISLEY_SENSOR_READOUT_CTRL_RO_STAT_X_CTRL_BIT_IDX \ + 10 // Activates X statitizers + // 0: inverter + // 1: statitizer +#define SENSOR_IF_SISLEY_SENSOR_READOUT_CTRL_RO_STAT_X_CTRL_WIDTH 1 +#define SENSOR_IF_SISLEY_SENSOR_READOUT_CTRL_RO_STAT_X_CTRL_DEFAULT 0x00000001 +#define SENSOR_IF_SISLEY_SENSOR_READOUT_CTRL_RO_ACT_PUX_CTRL_BIT_IDX \ + 11 // Activates X active pull-ups with drive strength 'bit' + // 0: active pull drive 1 disabled + // 1: active pull drive 1 enabled + // bit11:+1 strength + // bit12:+2 strength + // bit13:+4 strength +#define SENSOR_IF_SISLEY_SENSOR_READOUT_CTRL_RO_ACT_PUX_CTRL_WIDTH 3 +#define SENSOR_IF_SISLEY_SENSOR_READOUT_CTRL_RO_ACT_PUX_CTRL_DEFAULT 0x00000003 +#define SENSOR_IF_SISLEY_SENSOR_READOUT_CTRL_RO_STAT_Y_CTRL_BIT_IDX \ + 14 // Activates Y statitizers 0: inverter 1: statitizer +#define SENSOR_IF_SISLEY_SENSOR_READOUT_CTRL_RO_STAT_Y_CTRL_WIDTH 1 +#define SENSOR_IF_SISLEY_SENSOR_READOUT_CTRL_RO_STAT_Y_CTRL_DEFAULT 0x00000001 +#define SENSOR_IF_SISLEY_SENSOR_READOUT_CTRL_RO_ACT_PUY_CTRL_BIT_IDX \ + 15 // Activates Y active pull-ups 0: active pull disabled 1: active pull enabled +#define SENSOR_IF_SISLEY_SENSOR_READOUT_CTRL_RO_ACT_PUY_CTRL_WIDTH 1 +#define SENSOR_IF_SISLEY_SENSOR_READOUT_CTRL_RO_ACT_PUY_CTRL_DEFAULT 0x00000001 +#define SENSOR_IF_SISLEY_SENSOR_READOUT_CTRL_RO_PIPELINE_CTRL_BIT_IDX \ + 16 // Activate row pipeline 0: pipeline disbaled 1: pipeline enabled +#define SENSOR_IF_SISLEY_SENSOR_READOUT_CTRL_RO_PIPELINE_CTRL_WIDTH 1 +#define SENSOR_IF_SISLEY_SENSOR_READOUT_CTRL_RO_PIPELINE_CTRL_DEFAULT 0x00000001 +#define SENSOR_IF_SISLEY_SENSOR_READOUT_CTRL_RO_ACT_PDY_CTRL_BIT_IDX \ + 17 // bit17 - 0: no act pull down on req y - strength 1 + // bit18 - 0: no act pull down on req y - strength 2 + // bit19 - 0: no act pull down on req y - strength 4 +#define SENSOR_IF_SISLEY_SENSOR_READOUT_CTRL_RO_ACT_PDY_CTRL_WIDTH 3 +#define SENSOR_IF_SISLEY_SENSOR_READOUT_CTRL_RO_ACT_PDY_CTRL_DEFAULT 0x00000003 +#define SENSOR_IF_SISLEY_SENSOR_READOUT_CTRL_RO_ACT_PDX_CTRL_BIT_IDX \ + 20 // bit20 - 0: no act pull down on req x - strength 1 + // bit21 - 0: no act pull down on req x - strength 2 + // bit22 - 0: no act pull down on req x - strength 4 +#define SENSOR_IF_SISLEY_SENSOR_READOUT_CTRL_RO_ACT_PDX_CTRL_WIDTH 3 +#define SENSOR_IF_SISLEY_SENSOR_READOUT_CTRL_RO_ACT_PDX_CTRL_DEFAULT 0x00000003 +#define SENSOR_IF_SISLEY_SENSOR_READOUT_CTRL_RO_INV_REQ_EM_CTRL_BIT_IDX 23 // 0: req x active high 1: req x active low +#define SENSOR_IF_SISLEY_SENSOR_READOUT_CTRL_RO_INV_REQ_EM_CTRL_WIDTH 1 +#define SENSOR_IF_SISLEY_SENSOR_READOUT_CTRL_RO_INV_REQ_EM_CTRL_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_SENSOR_READOUT_CTRL_RO_INV_POL_EM_CTRL_BIT_IDX \ + 24 // 0: 0 = on event | 1 = off event 1: 0 = off event | 0 = on event +#define SENSOR_IF_SISLEY_SENSOR_READOUT_CTRL_RO_INV_POL_EM_CTRL_WIDTH 1 +#define SENSOR_IF_SISLEY_SENSOR_READOUT_CTRL_RO_INV_POL_EM_CTRL_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_SENSOR_READOUT_CTRL_RO_INV_ACK_EM_CTRL_BIT_IDX 25 // 0: ackb active low 1: ackb active high +#define SENSOR_IF_SISLEY_SENSOR_READOUT_CTRL_RO_INV_ACK_EM_CTRL_WIDTH 1 +#define SENSOR_IF_SISLEY_SENSOR_READOUT_CTRL_RO_INV_ACK_EM_CTRL_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_SENSOR_READOUT_CTRL_RO_INV_REQ_TD_CTRL_BIT_IDX 26 // 0: req x active high 1: req x active low +#define SENSOR_IF_SISLEY_SENSOR_READOUT_CTRL_RO_INV_REQ_TD_CTRL_WIDTH 1 +#define SENSOR_IF_SISLEY_SENSOR_READOUT_CTRL_RO_INV_REQ_TD_CTRL_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_SENSOR_READOUT_CTRL_RO_INV_POL_TD_CTRL_BIT_IDX \ + 27 // 0: 0 = on event | 1 = off event 1: 0 = off event | 0 = on event +#define SENSOR_IF_SISLEY_SENSOR_READOUT_CTRL_RO_INV_POL_TD_CTRL_WIDTH 1 +#define SENSOR_IF_SISLEY_SENSOR_READOUT_CTRL_RO_INV_POL_TD_CTRL_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_SENSOR_READOUT_CTRL_RO_INV_ACK_TD_CTRL_BIT_IDX 28 // 0: ackb active low 1: ackb active high +#define SENSOR_IF_SISLEY_SENSOR_READOUT_CTRL_RO_INV_ACK_TD_CTRL_WIDTH 1 +#define SENSOR_IF_SISLEY_SENSOR_READOUT_CTRL_RO_INV_ACK_TD_CTRL_DEFAULT 0x00000000 + +#define SENSOR_IF_SISLEY_SENSOR_TESTBUS_CTRL_ADDR 0x0000000C +#define SENSOR_IF_SISLEY_SENSOR_TESTBUS_CTRL_TP_SEL_TEST_PHOTODIODE_BIT_IDX \ + 0 // Selects either test pixel with photodiode or test pixel with current input + // 0: test pixel with current input | 1: test pixel with photodiode +#define SENSOR_IF_SISLEY_SENSOR_TESTBUS_CTRL_TP_SEL_TEST_PHOTODIODE_WIDTH 1 +#define SENSOR_IF_SISLEY_SENSOR_TESTBUS_CTRL_TP_SEL_TEST_PHOTODIODE_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_SENSOR_TESTBUS_CTRL_TP_DIODE_BIT_IDX 1 // Test pixel control signal- Not used +#define SENSOR_IF_SISLEY_SENSOR_TESTBUS_CTRL_TP_DIODE_WIDTH 1 +#define SENSOR_IF_SISLEY_SENSOR_TESTBUS_CTRL_TP_DIODE_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_SENSOR_TESTBUS_CTRL_TP_DIODE_TL_BIT_IDX 2 // Top-left test pixel control signal +#define SENSOR_IF_SISLEY_SENSOR_TESTBUS_CTRL_TP_DIODE_TL_WIDTH 1 +#define SENSOR_IF_SISLEY_SENSOR_TESTBUS_CTRL_TP_DIODE_TL_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_SENSOR_TESTBUS_CTRL_TP_DIODE_TR_BIT_IDX 3 // Top-right test pixel control signal +#define SENSOR_IF_SISLEY_SENSOR_TESTBUS_CTRL_TP_DIODE_TR_WIDTH 1 +#define SENSOR_IF_SISLEY_SENSOR_TESTBUS_CTRL_TP_DIODE_TR_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_SENSOR_TESTBUS_CTRL_TP_DIODE_BR_BIT_IDX 4 // Bottom right test pixel control signal +#define SENSOR_IF_SISLEY_SENSOR_TESTBUS_CTRL_TP_DIODE_BR_WIDTH 1 +#define SENSOR_IF_SISLEY_SENSOR_TESTBUS_CTRL_TP_DIODE_BR_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_SENSOR_TESTBUS_CTRL_TP_DIODE_BL_BIT_IDX 5 // Bottom left test pixel control signal +#define SENSOR_IF_SISLEY_SENSOR_TESTBUS_CTRL_TP_DIODE_BL_WIDTH 1 +#define SENSOR_IF_SISLEY_SENSOR_TESTBUS_CTRL_TP_DIODE_BL_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_SENSOR_TESTBUS_CTRL_TP_PHOTODIODE_EN_BIT_IDX \ + 6 // Test pixel enable, see datasheet(11.1.2.4.1 - Table 2) +#define SENSOR_IF_SISLEY_SENSOR_TESTBUS_CTRL_TP_PHOTODIODE_EN_WIDTH 1 +#define SENSOR_IF_SISLEY_SENSOR_TESTBUS_CTRL_TP_PHOTODIODE_EN_DEFAULT 0x00000001 +#define SENSOR_IF_SISLEY_SENSOR_TESTBUS_CTRL_TP_EN_BIT_IDX 7 // Test pixel enable, see datasheet(11.1.2.4.1 - Table 2) +#define SENSOR_IF_SISLEY_SENSOR_TESTBUS_CTRL_TP_EN_WIDTH 1 +#define SENSOR_IF_SISLEY_SENSOR_TESTBUS_CTRL_TP_EN_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_SENSOR_TESTBUS_CTRL_TBUS_SEL_TPA1_BIT_IDX 8 // See datasheet(11.1.2.4.2 - Table 3) +#define SENSOR_IF_SISLEY_SENSOR_TESTBUS_CTRL_TBUS_SEL_TPA1_WIDTH 4 +#define SENSOR_IF_SISLEY_SENSOR_TESTBUS_CTRL_TBUS_SEL_TPA1_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_SENSOR_TESTBUS_CTRL_TBUS_SEL_TPA2_BIT_IDX 12 // See datasheet(11.1.2.4.2 - Table 3) +#define SENSOR_IF_SISLEY_SENSOR_TESTBUS_CTRL_TBUS_SEL_TPA2_WIDTH 4 +#define SENSOR_IF_SISLEY_SENSOR_TESTBUS_CTRL_TBUS_SEL_TPA2_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_SENSOR_TESTBUS_CTRL_TBUS_SEL_TPA3_BIT_IDX 16 // See datasheet(11.1.2.4.2 - Table 3) +#define SENSOR_IF_SISLEY_SENSOR_TESTBUS_CTRL_TBUS_SEL_TPA3_WIDTH 4 +#define SENSOR_IF_SISLEY_SENSOR_TESTBUS_CTRL_TBUS_SEL_TPA3_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_SENSOR_TESTBUS_CTRL_TBUS_SEL_TPA4_BIT_IDX 20 // See datasheet(11.1.2.4.2 - Table 3) +#define SENSOR_IF_SISLEY_SENSOR_TESTBUS_CTRL_TBUS_SEL_TPA4_WIDTH 4 +#define SENSOR_IF_SISLEY_SENSOR_TESTBUS_CTRL_TBUS_SEL_TPA4_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_SENSOR_TESTBUS_CTRL_TBUS_SEL_TPD1_BIT_IDX \ + 24 // See datasheet(11.1.2.4.3 - Table 4 and Figure 10) +#define SENSOR_IF_SISLEY_SENSOR_TESTBUS_CTRL_TBUS_SEL_TPD1_WIDTH 4 +#define SENSOR_IF_SISLEY_SENSOR_TESTBUS_CTRL_TBUS_SEL_TPD1_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_SENSOR_TESTBUS_CTRL_TBUS_SEL_TPD2_BIT_IDX \ + 28 // See datasheet(11.1.2.4.3 - Table 4 and Figure 10) +#define SENSOR_IF_SISLEY_SENSOR_TESTBUS_CTRL_TBUS_SEL_TPD2_WIDTH 4 +#define SENSOR_IF_SISLEY_SENSOR_TESTBUS_CTRL_TBUS_SEL_TPD2_DEFAULT 0x00000000 + +#define SENSOR_IF_SISLEY_SENSOR_CLKSYNC_CTRL_ADDR 0x00000010 +#define SENSOR_IF_SISLEY_SENSOR_CLKSYNC_CTRL_CLK_OUT_EN_BIT_IDX \ + 0 // enable clk at the output of the sensor towards the external interface (not the digital digital) + // 0: clk_out is active, tied to ground + // 1: clk_out is active, always on as soon as there is clk_in available +#define SENSOR_IF_SISLEY_SENSOR_CLKSYNC_CTRL_CLK_OUT_EN_WIDTH 1 +#define SENSOR_IF_SISLEY_SENSOR_CLKSYNC_CTRL_CLK_OUT_EN_DEFAULT 0x00000001 +#define SENSOR_IF_SISLEY_SENSOR_CLKSYNC_CTRL_CLK_DIFF_HI_CM_CTRL_BIT_IDX \ + 1 // Setting to accommodate high common mode value in differential mode (1.4 V) +#define SENSOR_IF_SISLEY_SENSOR_CLKSYNC_CTRL_CLK_DIFF_HI_CM_CTRL_WIDTH 1 +#define SENSOR_IF_SISLEY_SENSOR_CLKSYNC_CTRL_CLK_DIFF_HI_CM_CTRL_DEFAULT 0x00000001 +#define SENSOR_IF_SISLEY_SENSOR_CLKSYNC_CTRL_CLK_DIFF_IOUT_X2_CTRL_BIT_IDX \ + 2 // Setting to boost output current in differential mode +#define SENSOR_IF_SISLEY_SENSOR_CLKSYNC_CTRL_CLK_DIFF_IOUT_X2_CTRL_WIDTH 1 +#define SENSOR_IF_SISLEY_SENSOR_CLKSYNC_CTRL_CLK_DIFF_IOUT_X2_CTRL_DEFAULT 0x00000001 +#define SENSOR_IF_SISLEY_SENSOR_CLKSYNC_CTRL_CLK_DC_UP_CTRL_BIT_IDX \ + 3 // Setting to shift up output voltage in differential mode +#define SENSOR_IF_SISLEY_SENSOR_CLKSYNC_CTRL_CLK_DC_UP_CTRL_WIDTH 1 +#define SENSOR_IF_SISLEY_SENSOR_CLKSYNC_CTRL_CLK_DC_UP_CTRL_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_SENSOR_CLKSYNC_CTRL_CLK_POLARITY_CTRL_BIT_IDX \ + 4 // Swap polarity of clk_out + // 0: clk_out = clk_int + // 1: clk_out = not(clk_int) +#define SENSOR_IF_SISLEY_SENSOR_CLKSYNC_CTRL_CLK_POLARITY_CTRL_WIDTH 1 +#define SENSOR_IF_SISLEY_SENSOR_CLKSYNC_CTRL_CLK_POLARITY_CTRL_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_SENSOR_CLKSYNC_CTRL_RO_STAT_REQ_X_CTRL_BIT_IDX \ + 5 // 0: req x bus has no statitizer + // 1: req x bus has a statitizer +#define SENSOR_IF_SISLEY_SENSOR_CLKSYNC_CTRL_RO_STAT_REQ_X_CTRL_WIDTH 1 +#define SENSOR_IF_SISLEY_SENSOR_CLKSYNC_CTRL_RO_STAT_REQ_X_CTRL_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_SENSOR_CLKSYNC_CTRL_RO_STAT_POL_CTRL_BIT_IDX \ + 6 // 0: polarity bus has no statitizer + // 1: polarity bus has a statitizer +#define SENSOR_IF_SISLEY_SENSOR_CLKSYNC_CTRL_RO_STAT_POL_CTRL_WIDTH 1 +#define SENSOR_IF_SISLEY_SENSOR_CLKSYNC_CTRL_RO_STAT_POL_CTRL_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_SENSOR_CLKSYNC_CTRL_RO_TD_REQ_LAT_CTRL_BIT_IDX \ + 7 // add X ns delay to the td req + // 0: no delay + // 1: ~500 ps + // 2: ~1 ns + // 3: ~2 ns + // 4: ~4 ns + // 5: ~4.5 ns + // 6: ~5 ns + // 7: ~6 ns +#define SENSOR_IF_SISLEY_SENSOR_CLKSYNC_CTRL_RO_TD_REQ_LAT_CTRL_WIDTH 3 +#define SENSOR_IF_SISLEY_SENSOR_CLKSYNC_CTRL_RO_TD_REQ_LAT_CTRL_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_SENSOR_CLKSYNC_CTRL_RO_TD_ACK_LAT_CTRL_BIT_IDX \ + 10 // add X ns delay to the td ack + // 0: no delay + // 1: ~500 ps + // 2: ~1 ns + // 3: ~2 ns + // 4: ~4 ns + // 5: ~4.5 ns + // 6: ~5 ns + // 7: ~6 ns +#define SENSOR_IF_SISLEY_SENSOR_CLKSYNC_CTRL_RO_TD_ACK_LAT_CTRL_WIDTH 3 +#define SENSOR_IF_SISLEY_SENSOR_CLKSYNC_CTRL_RO_TD_ACK_LAT_CTRL_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_SENSOR_CLKSYNC_CTRL_RO_EM_REQ_LAT_CTRL_BIT_IDX \ + 13 // add X ns delay to the em req + // 0: no delay + // 1: ~500 ps + // 2: ~1 ns + // 3: ~2 ns + // 4: ~4 ns + // 5: ~4.5 ns + // 6: ~5 ns + // 7: ~6 ns +#define SENSOR_IF_SISLEY_SENSOR_CLKSYNC_CTRL_RO_EM_REQ_LAT_CTRL_WIDTH 3 +#define SENSOR_IF_SISLEY_SENSOR_CLKSYNC_CTRL_RO_EM_REQ_LAT_CTRL_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_SENSOR_CLKSYNC_CTRL_RO_EM_ACK_LAT_CTRL_BIT_IDX \ + 16 // add X ns delay to the em ack + // 0: no delay + // 1: ~500 ps + // 2: ~1 ns + // 3: ~2 ns + // 4: ~4 ns + // 5: ~4.5 ns + // 6: ~5 ns + // 7: ~6 ns +#define SENSOR_IF_SISLEY_SENSOR_CLKSYNC_CTRL_RO_EM_ACK_LAT_CTRL_WIDTH 3 +#define SENSOR_IF_SISLEY_SENSOR_CLKSYNC_CTRL_RO_EM_ACK_LAT_CTRL_DEFAULT 0x00000000 + +#define SENSOR_IF_SISLEY_SENSOR_LIFO_CTRL_ADDR 0x00000014 +#define SENSOR_IF_SISLEY_SENSOR_LIFO_CTRL_LIFO_COUNTER_BIT_IDX \ + 0 // Pulsewidth measured value: + // Max illuminance measurement pulse = 5*E-01s, min Tclk = 1*E-08 gives a max counter of 5*E07 +#define SENSOR_IF_SISLEY_SENSOR_LIFO_CTRL_LIFO_COUNTER_WIDTH 26 +#define SENSOR_IF_SISLEY_SENSOR_LIFO_CTRL_LIFO_COUNTER_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_SENSOR_LIFO_CTRL_LIFO_COUNTER_VALID_BIT_IDX 29 // Pulsewidth measured value is valid +#define SENSOR_IF_SISLEY_SENSOR_LIFO_CTRL_LIFO_COUNTER_VALID_WIDTH 1 +#define SENSOR_IF_SISLEY_SENSOR_LIFO_CTRL_LIFO_COUNTER_VALID_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_SENSOR_LIFO_CTRL_LIFO_CNT_EN_BIT_IDX 30 // Enable pulsewidth counter +#define SENSOR_IF_SISLEY_SENSOR_LIFO_CTRL_LIFO_CNT_EN_WIDTH 1 +#define SENSOR_IF_SISLEY_SENSOR_LIFO_CTRL_LIFO_CNT_EN_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_SENSOR_LIFO_CTRL_LIFO_EN_BIT_IDX \ + 31 // Enable illuminance measurement + // 0: photocurrent measurement inactive + // 1: photocurrent measurement active +#define SENSOR_IF_SISLEY_SENSOR_LIFO_CTRL_LIFO_EN_WIDTH 1 +#define SENSOR_IF_SISLEY_SENSOR_LIFO_CTRL_LIFO_EN_DEFAULT 0x00000000 + +#define SENSOR_IF_SISLEY_SENSOR_CHIP_ID_ADDR 0x00000018 +#define SENSOR_IF_SISLEY_SENSOR_CHIP_ID_CHIP_ID_BIT_IDX 0 +#define SENSOR_IF_SISLEY_SENSOR_CHIP_ID_CHIP_ID_WIDTH 32 +#define SENSOR_IF_SISLEY_SENSOR_CHIP_ID_CHIP_ID_DEFAULT 0x90000402 + +#define SENSOR_IF_SISLEY_SENSOR_SPARE_CTRL_ADDR 0x0000001C +#define SENSOR_IF_SISLEY_SENSOR_SPARE_CTRL_RO_ADDR_Y_STAT_CTRL_BIT_IDX \ + 0 // readout - 0: no statitizer en Y addresses | 1: statitizer on every Y addresses +#define SENSOR_IF_SISLEY_SENSOR_SPARE_CTRL_RO_ADDR_Y_STAT_CTRL_WIDTH 1 +#define SENSOR_IF_SISLEY_SENSOR_SPARE_CTRL_RO_ADDR_Y_STAT_CTRL_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_SENSOR_SPARE_CTRL_RO_ADDR_X_STAT_CTRL_BIT_IDX \ + 1 // readout - 0: no statitizer en X addresses | 1: statitizer on every X addresses +#define SENSOR_IF_SISLEY_SENSOR_SPARE_CTRL_RO_ADDR_X_STAT_CTRL_WIDTH 1 +#define SENSOR_IF_SISLEY_SENSOR_SPARE_CTRL_RO_ADDR_X_STAT_CTRL_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_SENSOR_SPARE_CTRL_CLK_OUT_LAT_CTRL_BIT_IDX \ + 2 // Clk factory - + // 00: delay = 0 ps + // 01: delay = 500 ps + // 10: delay = 1 ns + // 11: delay = 2 ns +#define SENSOR_IF_SISLEY_SENSOR_SPARE_CTRL_CLK_OUT_LAT_CTRL_WIDTH 2 +#define SENSOR_IF_SISLEY_SENSOR_SPARE_CTRL_CLK_OUT_LAT_CTRL_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_SENSOR_SPARE_CTRL_RFEED_D_CTRL_BIT_IDX \ + 22 // digital biasgen -0: feedback loop of the output opamps are made of a capacitor + // 1: feedback loop of the output opamps are made of a capacitor and a resistor in series +#define SENSOR_IF_SISLEY_SENSOR_SPARE_CTRL_RFEED_D_CTRL_WIDTH 1 +#define SENSOR_IF_SISLEY_SENSOR_SPARE_CTRL_RFEED_D_CTRL_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_SENSOR_SPARE_CTRL_RFEED_A_CTRL_BIT_IDX \ + 23 // analog biasgen - 0: feedback loop of the output opamps are made of a capacitor + // 1: feedback loop of the output opamps are made of a capacitor and a resistor in series +#define SENSOR_IF_SISLEY_SENSOR_SPARE_CTRL_RFEED_A_CTRL_WIDTH 1 +#define SENSOR_IF_SISLEY_SENSOR_SPARE_CTRL_RFEED_A_CTRL_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_SENSOR_SPARE_CTRL_TP_REFR_CLK_EN_BIT_IDX \ + 24 // test pixel -0: refractory period clock is disabled | 1: refractory period clock is enabled +#define SENSOR_IF_SISLEY_SENSOR_SPARE_CTRL_TP_REFR_CLK_EN_WIDTH 1 +#define SENSOR_IF_SISLEY_SENSOR_SPARE_CTRL_TP_REFR_CLK_EN_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_SENSOR_SPARE_CTRL_TP_DARK_EN_BIT_IDX \ + 25 // test pixel -0: pr_out of dark pixel (covered by metal) is disabled | 1: pr_out of dark pixel (covered by + // metal) is enabled +#define SENSOR_IF_SISLEY_SENSOR_SPARE_CTRL_TP_DARK_EN_WIDTH 1 +#define SENSOR_IF_SISLEY_SENSOR_SPARE_CTRL_TP_DARK_EN_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_SENSOR_SPARE_CTRL_TP_QE_EN_BIT_IDX \ + 26 // test pixel -0: 3T pixel for QE measurement is disabled | 1: 3T pixel for QE measurement is enabled +#define SENSOR_IF_SISLEY_SENSOR_SPARE_CTRL_TP_QE_EN_WIDTH 1 +#define SENSOR_IF_SISLEY_SENSOR_SPARE_CTRL_TP_QE_EN_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_SENSOR_SPARE_CTRL_B_TM_BIT_IDX 29 // CISC PCMs +#define SENSOR_IF_SISLEY_SENSOR_SPARE_CTRL_B_TM_WIDTH 3 +#define SENSOR_IF_SISLEY_SENSOR_SPARE_CTRL_B_TM_DEFAULT 0x00000000 + +//------------------------------------------------------------------------------------------------------------ +// SENSOR - BIAS GENERATOR(REGBANK) +//------------------------------------------------------------------------------------------------------------ + +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_0_ADDR 0x00000100 //'Bias_latchout_or_pu' +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_0_BIAS_VDAC_VAL_BIT_IDX 0 // Voltage DAC value coded on 8 bits +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_0_BIAS_VDAC_VAL_WIDTH 8 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_0_BIAS_VDAC_VAL_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_0_BIAS_IDAC_VAL_BIT_IDX 8 // Current DAC value coded on 13 bits +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_0_BIAS_IDAC_VAL_WIDTH 13 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_0_BIAS_IDAC_VAL_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_0_BIAS_INTERNAL_BUFFER_BIT_IDX 21 // Buffer value (coded on 6 bits) +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_0_BIAS_INTERNAL_BUFFER_WIDTH 6 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_0_BIAS_INTERNAL_BUFFER_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_0_BIAS_TYPE_BIT_IDX \ + 27 // Selects bias mode + // 0: current DAC + // 1: voltage DAC +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_0_BIAS_TYPE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_0_BIAS_TYPE_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_0_BIAS_MODE_BIT_IDX \ + 28 // Selects bias mode + // 0: cascode (shifts DC up for NMOS and down for PMOS) + // 1: normal +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_0_BIAS_MODE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_0_BIAS_MODE_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_0_BIAS_POLARITY_BIT_IDX \ + 29 // Bias polarity of internal buffer + // 0: PMOS + // 1: NMOS +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_0_BIAS_POLARITY_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_0_BIAS_POLARITY_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_0_BIAS_ENABLE_BIT_IDX \ + 30 // Enable for internal biasing + // 0: bias generator disabled + // 1: bias generator enabled +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_0_BIAS_ENABLE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_0_BIAS_ENABLE_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_0_BIAS_PAD_ENABLE_BIT_IDX \ + 31 // Chip pad enable of the bias generator + // 0: pad disconnected + // 1: pad connected +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_0_BIAS_PAD_ENABLE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_0_BIAS_PAD_ENABLE_DEFAULT 0x00000000 + +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_1_ADDR 0x00000104 //'BIAS_REQX_OR_PU' +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_1_BIAS_VDAC_VAL_BIT_IDX 0 // Voltage DAC value coded on 8 bits +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_1_BIAS_VDAC_VAL_WIDTH 8 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_1_BIAS_VDAC_VAL_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_1_BIAS_IDAC_VAL_BIT_IDX 8 // Current DAC value coded on 13 bits +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_1_BIAS_IDAC_VAL_WIDTH 13 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_1_BIAS_IDAC_VAL_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_1_BIAS_INTERNAL_BUFFER_BIT_IDX 21 // Buffer value (coded on 6 bits) +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_1_BIAS_INTERNAL_BUFFER_WIDTH 6 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_1_BIAS_INTERNAL_BUFFER_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_1_BIAS_TYPE_BIT_IDX \ + 27 // Selects bias mode + // 0: current DAC + // 1: voltage DAC +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_1_BIAS_TYPE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_1_BIAS_TYPE_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_1_BIAS_MODE_BIT_IDX \ + 28 // Selects bias mode + // 0: cascode (shifts DC up for NMOS and down for PMOS) + // 1: normal +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_1_BIAS_MODE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_1_BIAS_MODE_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_1_BIAS_POLARITY_BIT_IDX \ + 29 // Bias polarity of internal buffer + // 0: PMOS + // 1: NMOS +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_1_BIAS_POLARITY_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_1_BIAS_POLARITY_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_1_BIAS_ENABLE_BIT_IDX \ + 30 // Enable for internal biasing + // 0: bias generator disabled + // 1: bias generator enabled +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_1_BIAS_ENABLE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_1_BIAS_ENABLE_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_1_BIAS_PAD_ENABLE_BIT_IDX \ + 31 // Chip pad enable of the bias generator + // 0: pad disconnected + // 1: pad connected +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_1_BIAS_PAD_ENABLE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_1_BIAS_PAD_ENABLE_DEFAULT 0x00000000 + +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_2_ADDR 0x00000108 //'BIAS_REQ_PUX' +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_2_BIAS_VDAC_VAL_BIT_IDX 0 // Voltage DAC value coded on 8 bits +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_2_BIAS_VDAC_VAL_WIDTH 8 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_2_BIAS_VDAC_VAL_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_2_BIAS_IDAC_VAL_BIT_IDX 8 // Current DAC value coded on 13 bits +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_2_BIAS_IDAC_VAL_WIDTH 13 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_2_BIAS_IDAC_VAL_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_2_BIAS_INTERNAL_BUFFER_BIT_IDX 21 // Buffer value (coded on 6 bits) +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_2_BIAS_INTERNAL_BUFFER_WIDTH 6 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_2_BIAS_INTERNAL_BUFFER_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_2_BIAS_TYPE_BIT_IDX \ + 27 // Selects bias mode + // 0: current DAC + // 1: voltage DAC +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_2_BIAS_TYPE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_2_BIAS_TYPE_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_2_BIAS_MODE_BIT_IDX \ + 28 // Selects bias mode + // 0: cascode (shifts DC up for NMOS and down for PMOS) + // 1: normal +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_2_BIAS_MODE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_2_BIAS_MODE_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_2_BIAS_POLARITY_BIT_IDX \ + 29 // Bias polarity of internal buffer + // 0: PMOS + // 1: NMOS +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_2_BIAS_POLARITY_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_2_BIAS_POLARITY_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_2_BIAS_ENABLE_BIT_IDX \ + 30 // Enable for internal biasing + // 0: bias generator disabled + // 1: bias generator enabled +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_2_BIAS_ENABLE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_2_BIAS_ENABLE_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_2_BIAS_PAD_ENABLE_BIT_IDX \ + 31 // Chip pad enable of the bias generator + // 0: pad disconnected + // 1: pad connected +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_2_BIAS_PAD_ENABLE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_2_BIAS_PAD_ENABLE_DEFAULT 0x00000000 + +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_3_ADDR 0x0000010C //'BIAS_REQ_PUY' +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_3_BIAS_VDAC_VAL_BIT_IDX 0 // Voltage DAC value coded on 8 bits +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_3_BIAS_VDAC_VAL_WIDTH 8 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_3_BIAS_VDAC_VAL_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_3_BIAS_IDAC_VAL_BIT_IDX 8 // Current DAC value coded on 13 bits +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_3_BIAS_IDAC_VAL_WIDTH 13 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_3_BIAS_IDAC_VAL_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_3_BIAS_INTERNAL_BUFFER_BIT_IDX 21 // Buffer value (coded on 6 bits) +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_3_BIAS_INTERNAL_BUFFER_WIDTH 6 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_3_BIAS_INTERNAL_BUFFER_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_3_BIAS_TYPE_BIT_IDX \ + 27 // Selects bias mode + // 0: current DAC + // 1: voltage DAC +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_3_BIAS_TYPE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_3_BIAS_TYPE_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_3_BIAS_MODE_BIT_IDX \ + 28 // Selects bias mode + // 0: cascode (shifts DC up for NMOS and down for PMOS) + // 1: normal +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_3_BIAS_MODE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_3_BIAS_MODE_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_3_BIAS_POLARITY_BIT_IDX \ + 29 // Bias polarity of internal buffer + // 0: PMOS + // 1: NMOS +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_3_BIAS_POLARITY_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_3_BIAS_POLARITY_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_3_BIAS_ENABLE_BIT_IDX \ + 30 // Enable for internal biasing + // 0: bias generator disabled + // 1: bias generator enabled +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_3_BIAS_ENABLE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_3_BIAS_ENABLE_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_3_BIAS_PAD_ENABLE_BIT_IDX \ + 31 // Chip pad enable of the bias generator + // 0: pad disconnected + // 1: pad connected +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_3_BIAS_PAD_ENABLE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_3_BIAS_PAD_ENABLE_DEFAULT 0x00000000 + +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_4_ADDR 0x00000110 //'BIAS_DEL_REQX_OR' +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_4_BIAS_VDAC_VAL_BIT_IDX 0 // Voltage DAC value coded on 8 bits +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_4_BIAS_VDAC_VAL_WIDTH 8 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_4_BIAS_VDAC_VAL_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_4_BIAS_IDAC_VAL_BIT_IDX 8 // Current DAC value coded on 13 bits +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_4_BIAS_IDAC_VAL_WIDTH 13 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_4_BIAS_IDAC_VAL_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_4_BIAS_INTERNAL_BUFFER_BIT_IDX 21 // Buffer value (coded on 6 bits) +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_4_BIAS_INTERNAL_BUFFER_WIDTH 6 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_4_BIAS_INTERNAL_BUFFER_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_4_BIAS_TYPE_BIT_IDX \ + 27 // Selects bias mode + // 0: current DAC + // 1: voltage DAC +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_4_BIAS_TYPE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_4_BIAS_TYPE_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_4_BIAS_MODE_BIT_IDX \ + 28 // Selects bias mode + // 0: cascode (shifts DC up for NMOS and down for PMOS) + // 1: normal +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_4_BIAS_MODE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_4_BIAS_MODE_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_4_BIAS_POLARITY_BIT_IDX \ + 29 // Bias polarity of internal buffer + // 0: PMOS + // 1: NMOS +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_4_BIAS_POLARITY_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_4_BIAS_POLARITY_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_4_BIAS_ENABLE_BIT_IDX \ + 30 // Enable for internal biasing + // 0: bias generator disabled + // 1: bias generator enabled +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_4_BIAS_ENABLE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_4_BIAS_ENABLE_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_4_BIAS_PAD_ENABLE_BIT_IDX \ + 31 // Chip pad enable of the bias generator + // 0: pad disconnected + // 1: pad connected +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_4_BIAS_PAD_ENABLE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_4_BIAS_PAD_ENABLE_DEFAULT 0x00000000 + +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_5_ADDR 0x00000114 //'BIAS_SENDREQ_PDX' +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_5_BIAS_VDAC_VAL_BIT_IDX 0 // Voltage DAC value coded on 8 bits +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_5_BIAS_VDAC_VAL_WIDTH 8 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_5_BIAS_VDAC_VAL_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_5_BIAS_IDAC_VAL_BIT_IDX 8 // Current DAC value coded on 13 bits +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_5_BIAS_IDAC_VAL_WIDTH 13 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_5_BIAS_IDAC_VAL_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_5_BIAS_INTERNAL_BUFFER_BIT_IDX 21 // Buffer value (coded on 6 bits) +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_5_BIAS_INTERNAL_BUFFER_WIDTH 6 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_5_BIAS_INTERNAL_BUFFER_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_5_BIAS_TYPE_BIT_IDX \ + 27 // Selects bias mode + // 0: current DAC + // 1: voltage DAC +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_5_BIAS_TYPE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_5_BIAS_TYPE_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_5_BIAS_MODE_BIT_IDX \ + 28 // Selects bias mode + // 0: cascode (shifts DC up for NMOS and down for PMOS) + // 1: normal +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_5_BIAS_MODE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_5_BIAS_MODE_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_5_BIAS_POLARITY_BIT_IDX \ + 29 // Bias polarity of internal buffer + // 0: PMOS + // 1: NMOS +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_5_BIAS_POLARITY_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_5_BIAS_POLARITY_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_5_BIAS_ENABLE_BIT_IDX \ + 30 // Enable for internal biasing + // 0: bias generator disabled + // 1: bias generator enabled +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_5_BIAS_ENABLE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_5_BIAS_ENABLE_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_5_BIAS_PAD_ENABLE_BIT_IDX \ + 31 // Chip pad enable of the bias generator + // 0: pad disconnected + // 1: pad connected +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_5_BIAS_PAD_ENABLE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_5_BIAS_PAD_ENABLE_DEFAULT 0x00000000 + +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_6_ADDR 0x00000118 //'BIAS_SENDREQ_PDY' +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_6_BIAS_VDAC_VAL_BIT_IDX 0 // Voltage DAC value coded on 8 bits +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_6_BIAS_VDAC_VAL_WIDTH 8 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_6_BIAS_VDAC_VAL_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_6_BIAS_IDAC_VAL_BIT_IDX 8 // Current DAC value coded on 13 bits +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_6_BIAS_IDAC_VAL_WIDTH 13 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_6_BIAS_IDAC_VAL_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_6_BIAS_INTERNAL_BUFFER_BIT_IDX 21 // Buffer value (coded on 6 bits) +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_6_BIAS_INTERNAL_BUFFER_WIDTH 6 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_6_BIAS_INTERNAL_BUFFER_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_6_BIAS_TYPE_BIT_IDX \ + 27 // Selects bias mode + // 0: current DAC + // 1: voltage DAC +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_6_BIAS_TYPE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_6_BIAS_TYPE_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_6_BIAS_MODE_BIT_IDX \ + 28 // Selects bias mode + // 0: cascode (shifts DC up for NMOS and down for PMOS) + // 1: normal +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_6_BIAS_MODE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_6_BIAS_MODE_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_6_BIAS_POLARITY_BIT_IDX \ + 29 // Bias polarity of internal buffer + // 0: PMOS + // 1: NMOS +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_6_BIAS_POLARITY_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_6_BIAS_POLARITY_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_6_BIAS_ENABLE_BIT_IDX \ + 30 // Enable for internal biasing + // 0: bias generator disabled + // 1: bias generator enabled +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_6_BIAS_ENABLE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_6_BIAS_ENABLE_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_6_BIAS_PAD_ENABLE_BIT_IDX \ + 31 // Chip pad enable of the bias generator + // 0: pad disconnected + // 1: pad connected +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_6_BIAS_PAD_ENABLE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_6_BIAS_PAD_ENABLE_DEFAULT 0x00000000 + +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_7_ADDR 0x0000011C //'BIAS_DEL_ACK_ARRAY' +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_7_BIAS_VDAC_VAL_BIT_IDX 0 // Voltage DAC value coded on 8 bits +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_7_BIAS_VDAC_VAL_WIDTH 8 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_7_BIAS_VDAC_VAL_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_7_BIAS_IDAC_VAL_BIT_IDX 8 // Current DAC value coded on 13 bits +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_7_BIAS_IDAC_VAL_WIDTH 13 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_7_BIAS_IDAC_VAL_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_7_BIAS_INTERNAL_BUFFER_BIT_IDX 21 // Buffer value (coded on 6 bits) +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_7_BIAS_INTERNAL_BUFFER_WIDTH 6 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_7_BIAS_INTERNAL_BUFFER_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_7_BIAS_TYPE_BIT_IDX \ + 27 // Selects bias mode + // 0: current DAC + // 1: voltage DAC +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_7_BIAS_TYPE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_7_BIAS_TYPE_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_7_BIAS_MODE_BIT_IDX \ + 28 // Selects bias mode + // 0: cascode (shifts DC up for NMOS and down for PMOS) + // 1: normal +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_7_BIAS_MODE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_7_BIAS_MODE_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_7_BIAS_POLARITY_BIT_IDX \ + 29 // Bias polarity of internal buffer + // 0: PMOS + // 1: NMOS +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_7_BIAS_POLARITY_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_7_BIAS_POLARITY_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_7_BIAS_ENABLE_BIT_IDX \ + 30 // Enable for internal biasing + // 0: bias generator disabled + // 1: bias generator enabled +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_7_BIAS_ENABLE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_7_BIAS_ENABLE_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_7_BIAS_PAD_ENABLE_BIT_IDX \ + 31 // Chip pad enable of the bias generator + // 0: pad disconnected + // 1: pad connected +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_7_BIAS_PAD_ENABLE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_7_BIAS_PAD_ENABLE_DEFAULT 0x00000000 + +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_8_ADDR 0x00000120 //'BIAS_DEL_TIMEOUT' +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_8_BIAS_VDAC_VAL_BIT_IDX 0 // Voltage DAC value coded on 8 bits +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_8_BIAS_VDAC_VAL_WIDTH 8 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_8_BIAS_VDAC_VAL_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_8_BIAS_IDAC_VAL_BIT_IDX 8 // Current DAC value coded on 13 bits +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_8_BIAS_IDAC_VAL_WIDTH 13 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_8_BIAS_IDAC_VAL_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_8_BIAS_INTERNAL_BUFFER_BIT_IDX 21 // Buffer value (coded on 6 bits) +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_8_BIAS_INTERNAL_BUFFER_WIDTH 6 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_8_BIAS_INTERNAL_BUFFER_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_8_BIAS_TYPE_BIT_IDX \ + 27 // Selects bias mode + // 0: current DAC + // 1: voltage DAC +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_8_BIAS_TYPE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_8_BIAS_TYPE_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_8_BIAS_MODE_BIT_IDX \ + 28 // Selects bias mode + // 0: cascode (shifts DC up for NMOS and down for PMOS) + // 1: normal +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_8_BIAS_MODE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_8_BIAS_MODE_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_8_BIAS_POLARITY_BIT_IDX \ + 29 // Bias polarity of internal buffer + // 0: PMOS + // 1: NMOS +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_8_BIAS_POLARITY_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_8_BIAS_POLARITY_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_8_BIAS_ENABLE_BIT_IDX \ + 30 // Enable for internal biasing + // 0: bias generator disabled + // 1: bias generator enabled +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_8_BIAS_ENABLE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_8_BIAS_ENABLE_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_8_BIAS_PAD_ENABLE_BIT_IDX \ + 31 // Chip pad enable of the bias generator + // 0: pad disconnected + // 1: pad connected +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_8_BIAS_PAD_ENABLE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_8_BIAS_PAD_ENABLE_DEFAULT 0x00000000 + +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_9_ADDR 0x00000124 //'BIAS_INV' +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_9_BIAS_VDAC_VAL_BIT_IDX 0 // Voltage DAC value coded on 8 bits +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_9_BIAS_VDAC_VAL_WIDTH 8 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_9_BIAS_VDAC_VAL_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_9_BIAS_IDAC_VAL_BIT_IDX 8 // Current DAC value coded on 13 bits +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_9_BIAS_IDAC_VAL_WIDTH 13 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_9_BIAS_IDAC_VAL_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_9_BIAS_INTERNAL_BUFFER_BIT_IDX 21 // Buffer value (coded on 6 bits) +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_9_BIAS_INTERNAL_BUFFER_WIDTH 6 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_9_BIAS_INTERNAL_BUFFER_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_9_BIAS_TYPE_BIT_IDX \ + 27 // Selects bias mode + // 0: current DAC + // 1: voltage DAC +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_9_BIAS_TYPE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_9_BIAS_TYPE_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_9_BIAS_MODE_BIT_IDX \ + 28 // Selects bias mode + // 0: cascode (shifts DC up for NMOS and down for PMOS) + // 1: normal +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_9_BIAS_MODE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_9_BIAS_MODE_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_9_BIAS_POLARITY_BIT_IDX \ + 29 // Bias polarity of internal buffer + // 0: PMOS + // 1: NMOS +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_9_BIAS_POLARITY_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_9_BIAS_POLARITY_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_9_BIAS_ENABLE_BIT_IDX \ + 30 // Enable for internal biasing + // 0: bias generator disabled + // 1: bias generator enabled +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_9_BIAS_ENABLE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_9_BIAS_ENABLE_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_9_BIAS_PAD_ENABLE_BIT_IDX \ + 31 // Chip pad enable of the bias generator + // 0: pad disconnected + // 1: pad connected +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_9_BIAS_PAD_ENABLE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_9_BIAS_PAD_ENABLE_DEFAULT 0x00000000 + +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_10_ADDR 0x00000128 //'BIAS_REFR' +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_10_BIAS_VDAC_VAL_BIT_IDX 0 // Voltage DAC value coded on 8 bits +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_10_BIAS_VDAC_VAL_WIDTH 8 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_10_BIAS_VDAC_VAL_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_10_BIAS_IDAC_VAL_BIT_IDX 8 // Current DAC value coded on 13 bits +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_10_BIAS_IDAC_VAL_WIDTH 13 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_10_BIAS_IDAC_VAL_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_10_BIAS_INTERNAL_BUFFER_BIT_IDX 21 // Buffer value (coded on 6 bits) +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_10_BIAS_INTERNAL_BUFFER_WIDTH 6 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_10_BIAS_INTERNAL_BUFFER_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_10_BIAS_TYPE_BIT_IDX \ + 27 // Selects bias mode + // 0: current DAC + // 1: voltage DAC +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_10_BIAS_TYPE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_10_BIAS_TYPE_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_10_BIAS_MODE_BIT_IDX \ + 28 // Selects bias mode + // 0: cascode (shifts DC up for NMOS and down for PMOS) + // 1: normal +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_10_BIAS_MODE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_10_BIAS_MODE_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_10_BIAS_POLARITY_BIT_IDX \ + 29 // Bias polarity of internal buffer + // 0: PMOS + // 1: NMOS +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_10_BIAS_POLARITY_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_10_BIAS_POLARITY_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_10_BIAS_ENABLE_BIT_IDX \ + 30 // Enable for internal biasing + // 0: bias generator disabled + // 1: bias generator enabled +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_10_BIAS_ENABLE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_10_BIAS_ENABLE_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_10_BIAS_PAD_ENABLE_BIT_IDX \ + 31 // Chip pad enable of the bias generator + // 0: pad disconnected + // 1: pad connected +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_10_BIAS_PAD_ENABLE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_10_BIAS_PAD_ENABLE_DEFAULT 0x00000000 + +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_11_ADDR 0x0000012C //'BIAS_CLK' +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_11_BIAS_VDAC_VAL_BIT_IDX 0 // Voltage DAC value coded on 8 bits +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_11_BIAS_VDAC_VAL_WIDTH 8 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_11_BIAS_VDAC_VAL_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_11_BIAS_IDAC_VAL_BIT_IDX 8 // Current DAC value coded on 13 bits +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_11_BIAS_IDAC_VAL_WIDTH 13 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_11_BIAS_IDAC_VAL_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_11_BIAS_INTERNAL_BUFFER_BIT_IDX 21 // Buffer value (coded on 6 bits) +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_11_BIAS_INTERNAL_BUFFER_WIDTH 6 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_11_BIAS_INTERNAL_BUFFER_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_11_BIAS_TYPE_BIT_IDX \ + 27 // Selects bias mode + // 0: current DAC + // 1: voltage DAC +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_11_BIAS_TYPE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_11_BIAS_TYPE_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_11_BIAS_MODE_BIT_IDX \ + 28 // Selects bias mode + // 0: cascode (shifts DC up for NMOS and down for PMOS) + // 1: normal +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_11_BIAS_MODE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_11_BIAS_MODE_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_11_BIAS_POLARITY_BIT_IDX \ + 29 // Bias polarity of internal buffer + // 0: PMOS + // 1: NMOS +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_11_BIAS_POLARITY_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_11_BIAS_POLARITY_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_11_BIAS_ENABLE_BIT_IDX \ + 30 // Enable for internal biasing + // 0: bias generator disabled + // 1: bias generator enabled +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_11_BIAS_ENABLE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_11_BIAS_ENABLE_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_11_BIAS_PAD_ENABLE_BIT_IDX \ + 31 // Chip pad enable of the bias generator + // 0: pad disconnected + // 1: pad connected +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_11_BIAS_PAD_ENABLE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_11_BIAS_PAD_ENABLE_DEFAULT 0x00000000 + +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_18_ADDR 0x00000148 //'BIAS_CAS' +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_18_BIAS_VDAC_VAL_BIT_IDX 0 // Voltage DAC value coded on 8 bits +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_18_BIAS_VDAC_VAL_WIDTH 8 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_18_BIAS_VDAC_VAL_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_18_BIAS_IDAC_VAL_BIT_IDX 8 // Current DAC value coded on 13 bits +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_18_BIAS_IDAC_VAL_WIDTH 13 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_18_BIAS_IDAC_VAL_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_18_BIAS_INTERNAL_BUFFER_BIT_IDX 21 // Buffer value (coded on 6 bits) +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_18_BIAS_INTERNAL_BUFFER_WIDTH 6 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_18_BIAS_INTERNAL_BUFFER_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_18_BIAS_TYPE_BIT_IDX \ + 27 // Selects bias mode + // 0: current DAC + // 1: voltage DAC +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_18_BIAS_TYPE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_18_BIAS_TYPE_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_18_BIAS_MODE_BIT_IDX \ + 28 // Selects bias mode + // 0: cascode (shifts DC up for NMOS and down for PMOS) + // 1: normal +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_18_BIAS_MODE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_18_BIAS_MODE_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_18_BIAS_POLARITY_BIT_IDX \ + 29 // Bias polarity of internal buffer + // 0: PMOS + // 1: NMOS +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_18_BIAS_POLARITY_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_18_BIAS_POLARITY_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_18_BIAS_ENABLE_BIT_IDX \ + 30 // Enable for internal biasing + // 0: bias generator disabled + // 1: bias generator enabled +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_18_BIAS_ENABLE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_18_BIAS_ENABLE_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_18_BIAS_PAD_ENABLE_BIT_IDX \ + 31 // Chip pad enable of the bias generator + // 0: pad disconnected + // 1: pad connected +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_18_BIAS_PAD_ENABLE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_18_BIAS_PAD_ENABLE_DEFAULT 0x00000000 + +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_19_ADDR 0x0000014C //'BIAS_DIFF_OFF' +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_19_BIAS_VDAC_VAL_BIT_IDX 0 // Voltage DAC value coded on 8 bits +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_19_BIAS_VDAC_VAL_WIDTH 8 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_19_BIAS_VDAC_VAL_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_19_BIAS_IDAC_VAL_BIT_IDX 8 // Current DAC value coded on 13 bits +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_19_BIAS_IDAC_VAL_WIDTH 13 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_19_BIAS_IDAC_VAL_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_19_BIAS_INTERNAL_BUFFER_BIT_IDX 21 // Buffer value (coded on 6 bits) +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_19_BIAS_INTERNAL_BUFFER_WIDTH 6 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_19_BIAS_INTERNAL_BUFFER_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_19_BIAS_TYPE_BIT_IDX \ + 27 // Selects bias mode + // 0: current DAC + // 1: voltage DAC +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_19_BIAS_TYPE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_19_BIAS_TYPE_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_19_BIAS_MODE_BIT_IDX \ + 28 // Selects bias mode + // 0: cascode (shifts DC up for NMOS and down for PMOS) + // 1: normal +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_19_BIAS_MODE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_19_BIAS_MODE_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_19_BIAS_POLARITY_BIT_IDX \ + 29 // Bias polarity of internal buffer + // 0: PMOS + // 1: NMOS +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_19_BIAS_POLARITY_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_19_BIAS_POLARITY_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_19_BIAS_ENABLE_BIT_IDX \ + 30 // Enable for internal biasing + // 0: bias generator disabled + // 1: bias generator enabled +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_19_BIAS_ENABLE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_19_BIAS_ENABLE_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_19_BIAS_PAD_ENABLE_BIT_IDX \ + 31 // Chip pad enable of the bias generator + // 0: pad disconnected + // 1: pad connected +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_19_BIAS_PAD_ENABLE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_19_BIAS_PAD_ENABLE_DEFAULT 0x00000000 + +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_20_ADDR 0x00000150 //'BIAS_DIFF_ON' +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_20_BIAS_VDAC_VAL_BIT_IDX 0 // Voltage DAC value coded on 8 bits +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_20_BIAS_VDAC_VAL_WIDTH 8 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_20_BIAS_VDAC_VAL_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_20_BIAS_IDAC_VAL_BIT_IDX 8 // Current DAC value coded on 13 bits +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_20_BIAS_IDAC_VAL_WIDTH 13 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_20_BIAS_IDAC_VAL_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_20_BIAS_INTERNAL_BUFFER_BIT_IDX 21 // Buffer value (coded on 6 bits) +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_20_BIAS_INTERNAL_BUFFER_WIDTH 6 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_20_BIAS_INTERNAL_BUFFER_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_20_BIAS_TYPE_BIT_IDX \ + 27 // Selects bias mode + // 0: current DAC + // 1: voltage DAC +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_20_BIAS_TYPE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_20_BIAS_TYPE_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_20_BIAS_MODE_BIT_IDX \ + 28 // Selects bias mode + // 0: cascode (shifts DC up for NMOS and down for PMOS) + // 1: normal +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_20_BIAS_MODE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_20_BIAS_MODE_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_20_BIAS_POLARITY_BIT_IDX \ + 29 // Bias polarity of internal buffer + // 0: PMOS + // 1: NMOS +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_20_BIAS_POLARITY_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_20_BIAS_POLARITY_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_20_BIAS_ENABLE_BIT_IDX \ + 30 // Enable for internal biasing + // 0: bias generator disabled + // 1: bias generator enabled +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_20_BIAS_ENABLE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_20_BIAS_ENABLE_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_20_BIAS_PAD_ENABLE_BIT_IDX \ + 31 // Chip pad enable of the bias generator + // 0: pad disconnected + // 1: pad connected +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_20_BIAS_PAD_ENABLE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_20_BIAS_PAD_ENABLE_DEFAULT 0x00000000 + +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_21_ADDR 0x00000154 //'BIAS_DIFF' +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_21_BIAS_VDAC_VAL_BIT_IDX 0 // Voltage DAC value coded on 8 bits +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_21_BIAS_VDAC_VAL_WIDTH 8 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_21_BIAS_VDAC_VAL_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_21_BIAS_IDAC_VAL_BIT_IDX 8 // Current DAC value coded on 13 bits +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_21_BIAS_IDAC_VAL_WIDTH 13 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_21_BIAS_IDAC_VAL_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_21_BIAS_INTERNAL_BUFFER_BIT_IDX 21 // Buffer value (coded on 6 bits) +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_21_BIAS_INTERNAL_BUFFER_WIDTH 6 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_21_BIAS_INTERNAL_BUFFER_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_21_BIAS_TYPE_BIT_IDX \ + 27 // Selects bias mode + // 0: current DAC + // 1: voltage DAC +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_21_BIAS_TYPE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_21_BIAS_TYPE_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_21_BIAS_MODE_BIT_IDX \ + 28 // Selects bias mode + // 0: cascode (shifts DC up for NMOS and down for PMOS) + // 1: normal +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_21_BIAS_MODE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_21_BIAS_MODE_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_21_BIAS_POLARITY_BIT_IDX \ + 29 // Bias polarity of internal buffer + // 0: PMOS + // 1: NMOS +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_21_BIAS_POLARITY_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_21_BIAS_POLARITY_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_21_BIAS_ENABLE_BIT_IDX \ + 30 // Enable for internal biasing + // 0: bias generator disabled + // 1: bias generator enabled +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_21_BIAS_ENABLE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_21_BIAS_ENABLE_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_21_BIAS_PAD_ENABLE_BIT_IDX \ + 31 // Chip pad enable of the bias generator + // 0: pad disconnected + // 1: pad connected +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_21_BIAS_PAD_ENABLE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_21_BIAS_PAD_ENABLE_DEFAULT 0x00000000 + +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_22_ADDR 0x00000158 //'BIAS_FO' +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_22_BIAS_VDAC_VAL_BIT_IDX 0 // Voltage DAC value coded on 8 bits +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_22_BIAS_VDAC_VAL_WIDTH 8 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_22_BIAS_VDAC_VAL_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_22_BIAS_IDAC_VAL_BIT_IDX 8 // Current DAC value coded on 13 bits +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_22_BIAS_IDAC_VAL_WIDTH 13 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_22_BIAS_IDAC_VAL_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_22_BIAS_INTERNAL_BUFFER_BIT_IDX 21 // Buffer value (coded on 6 bits) +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_22_BIAS_INTERNAL_BUFFER_WIDTH 6 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_22_BIAS_INTERNAL_BUFFER_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_22_BIAS_TYPE_BIT_IDX \ + 27 // Selects bias mode + // 0: current DAC + // 1: voltage DAC +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_22_BIAS_TYPE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_22_BIAS_TYPE_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_22_BIAS_MODE_BIT_IDX \ + 28 // Selects bias mode + // 0: cascode (shifts DC up for NMOS and down for PMOS) + // 1: normal +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_22_BIAS_MODE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_22_BIAS_MODE_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_22_BIAS_POLARITY_BIT_IDX \ + 29 // Bias polarity of internal buffer + // 0: PMOS + // 1: NMOS +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_22_BIAS_POLARITY_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_22_BIAS_POLARITY_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_22_BIAS_ENABLE_BIT_IDX \ + 30 // Enable for internal biasing + // 0: bias generator disabled + // 1: bias generator enabled +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_22_BIAS_ENABLE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_22_BIAS_ENABLE_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_22_BIAS_PAD_ENABLE_BIT_IDX \ + 31 // Chip pad enable of the bias generator + // 0: pad disconnected + // 1: pad connected +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_22_BIAS_PAD_ENABLE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_22_BIAS_PAD_ENABLE_DEFAULT 0x00000000 + +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_23_ADDR 0x0000015C //'BIAS_PR' +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_23_BIAS_VDAC_VAL_BIT_IDX 0 // Voltage DAC value coded on 8 bits +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_23_BIAS_VDAC_VAL_WIDTH 8 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_23_BIAS_VDAC_VAL_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_23_BIAS_IDAC_VAL_BIT_IDX 8 // Current DAC value coded on 13 bits +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_23_BIAS_IDAC_VAL_WIDTH 13 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_23_BIAS_IDAC_VAL_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_23_BIAS_INTERNAL_BUFFER_BIT_IDX 21 // Buffer value (coded on 6 bits) +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_23_BIAS_INTERNAL_BUFFER_WIDTH 6 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_23_BIAS_INTERNAL_BUFFER_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_23_BIAS_TYPE_BIT_IDX \ + 27 // Selects bias mode + // 0: current DAC + // 1: voltage DAC +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_23_BIAS_TYPE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_23_BIAS_TYPE_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_23_BIAS_MODE_BIT_IDX \ + 28 // Selects bias mode + // 0: cascode (shifts DC up for NMOS and down for PMOS) + // 1: normal +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_23_BIAS_MODE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_23_BIAS_MODE_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_23_BIAS_POLARITY_BIT_IDX \ + 29 // Bias polarity of internal buffer + // 0: PMOS + // 1: NMOS +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_23_BIAS_POLARITY_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_23_BIAS_POLARITY_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_23_BIAS_ENABLE_BIT_IDX \ + 30 // Enable for internal biasing + // 0: bias generator disabled + // 1: bias generator enabled +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_23_BIAS_ENABLE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_23_BIAS_ENABLE_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_23_BIAS_PAD_ENABLE_BIT_IDX \ + 31 // Chip pad enable of the bias generator + // 0: pad disconnected + // 1: pad connected +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_23_BIAS_PAD_ENABLE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_23_BIAS_PAD_ENABLE_DEFAULT 0x00000000 + +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_24_ADDR 0x00000160 //'BIAS_BULK' +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_24_BIAS_VDAC_VAL_BIT_IDX 0 // Voltage DAC value coded on 8 bits +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_24_BIAS_VDAC_VAL_WIDTH 8 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_24_BIAS_VDAC_VAL_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_24_BIAS_IDAC_VAL_BIT_IDX 8 // Current DAC value coded on 13 bits +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_24_BIAS_IDAC_VAL_WIDTH 13 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_24_BIAS_IDAC_VAL_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_24_BIAS_INTERNAL_BUFFER_BIT_IDX 21 // Buffer value (coded on 6 bits) +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_24_BIAS_INTERNAL_BUFFER_WIDTH 6 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_24_BIAS_INTERNAL_BUFFER_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_24_BIAS_TYPE_BIT_IDX \ + 27 // Selects bias mode + // 0: current DAC + // 1: voltage DAC +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_24_BIAS_TYPE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_24_BIAS_TYPE_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_24_BIAS_MODE_BIT_IDX \ + 28 // Selects bias mode + // 0: cascode (shifts DC up for NMOS and down for PMOS) + // 1: normal +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_24_BIAS_MODE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_24_BIAS_MODE_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_24_BIAS_POLARITY_BIT_IDX \ + 29 // Bias polarity of internal buffer + // 0: PMOS + // 1: NMOS +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_24_BIAS_POLARITY_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_24_BIAS_POLARITY_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_24_BIAS_ENABLE_BIT_IDX \ + 30 // Enable for internal biasing + // 0: bias generator disabled + // 1: bias generator enabled +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_24_BIAS_ENABLE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_24_BIAS_ENABLE_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_24_BIAS_PAD_ENABLE_BIT_IDX \ + 31 // Chip pad enable of the bias generator + // 0: pad disconnected + // 1: pad connected +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_24_BIAS_PAD_ENABLE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_24_BIAS_PAD_ENABLE_DEFAULT 0x00000000 + +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_25_ADDR \ + 0x00000164 //'VDD_HPF' - When a bias generator supplies vdd_hpf, it is also connected to the pad also called + // vdd_hpf. +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_25_BIAS_VDAC_VAL_BIT_IDX 0 // Voltage DAC value coded on 8 bits +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_25_BIAS_VDAC_VAL_WIDTH 8 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_25_BIAS_VDAC_VAL_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_25_BIAS_IDAC_VAL_BIT_IDX 8 // Current DAC value coded on 13 bits +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_25_BIAS_IDAC_VAL_WIDTH 13 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_25_BIAS_IDAC_VAL_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_25_BIAS_INTERNAL_BUFFER_BIT_IDX 21 // Buffer value (coded on 6 bits) +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_25_BIAS_INTERNAL_BUFFER_WIDTH 6 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_25_BIAS_INTERNAL_BUFFER_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_25_BIAS_TYPE_BIT_IDX \ + 27 // Selects bias mode + // 0: current DAC + // 1: voltage DAC +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_25_BIAS_TYPE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_25_BIAS_TYPE_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_25_BIAS_MODE_BIT_IDX \ + 28 // Selects bias mode + // 0: cascode (shifts DC up for NMOS and down for PMOS) + // 1: normal +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_25_BIAS_MODE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_25_BIAS_MODE_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_25_BIAS_POLARITY_BIT_IDX \ + 29 // Bias polarity of internal buffer + // 0: PMOS + // 1: NMOS +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_25_BIAS_POLARITY_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_25_BIAS_POLARITY_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_25_BIAS_ENABLE_BIT_IDX \ + 30 // Enable for internal biasing + // 0: bias generator disabled + // 1: bias generator enabled +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_25_BIAS_ENABLE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_25_BIAS_ENABLE_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_25_BIAS_PAD_ENABLE_BIT_IDX \ + 31 // Chip pad enable of the bias generator + // 0: pad disconnected + // 1: pad connected +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_25_BIAS_PAD_ENABLE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_25_BIAS_PAD_ENABLE_DEFAULT 0x00000000 + +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_26_ADDR 0x00000168 //'BIAS_BUF' +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_26_BIAS_VDAC_VAL_BIT_IDX 0 // Voltage DAC value coded on 8 bits +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_26_BIAS_VDAC_VAL_WIDTH 8 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_26_BIAS_VDAC_VAL_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_26_BIAS_IDAC_VAL_BIT_IDX 8 // Current DAC value coded on 13 bits +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_26_BIAS_IDAC_VAL_WIDTH 13 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_26_BIAS_IDAC_VAL_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_26_BIAS_INTERNAL_BUFFER_BIT_IDX 21 // Buffer value (coded on 6 bits) +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_26_BIAS_INTERNAL_BUFFER_WIDTH 6 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_26_BIAS_INTERNAL_BUFFER_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_26_BIAS_TYPE_BIT_IDX \ + 27 // Selects bias mode + // 0: current DAC + // 1: voltage DAC +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_26_BIAS_TYPE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_26_BIAS_TYPE_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_26_BIAS_MODE_BIT_IDX \ + 28 // Selects bias mode + // 0: cascode (shifts DC up for NMOS and down for PMOS) + // 1: normal +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_26_BIAS_MODE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_26_BIAS_MODE_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_26_BIAS_POLARITY_BIT_IDX \ + 29 // Bias polarity of internal buffer + // 0: PMOS + // 1: NMOS +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_26_BIAS_POLARITY_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_26_BIAS_POLARITY_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_26_BIAS_ENABLE_BIT_IDX \ + 30 // Enable for internal biasing + // 0: bias generator disabled + // 1: bias generator enabled +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_26_BIAS_ENABLE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_26_BIAS_ENABLE_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_26_BIAS_PAD_ENABLE_BIT_IDX \ + 31 // Chip pad enable of the bias generator + // 0: pad disconnected + // 1: pad connected +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_26_BIAS_PAD_ENABLE_WIDTH 1 +#define SENSOR_IF_SISLEY_IBGEN_VECTOR_26_BIAS_PAD_ENABLE_DEFAULT 0x00000000 + +//------------------------------------------------------------------------------------------------------------ +// SENSOR - TD ROI X +//------------------------------------------------------------------------------------------------------------ + +#define SENSOR_IF_SISLEY_ROI_TD_X_0_ADDR 0x00000200 + +#define SENSOR_IF_SISLEY_ROI_TD_X_1_ADDR 0x00000204 + +#define SENSOR_IF_SISLEY_ROI_TD_X_2_ADDR 0x00000208 + +#define SENSOR_IF_SISLEY_ROI_TD_X_3_ADDR 0x0000020C + +#define SENSOR_IF_SISLEY_ROI_TD_X_4_ADDR 0x00000210 + +#define SENSOR_IF_SISLEY_ROI_TD_X_5_ADDR 0x00000214 + +#define SENSOR_IF_SISLEY_ROI_TD_X_6_ADDR 0x00000218 + +#define SENSOR_IF_SISLEY_ROI_TD_X_7_ADDR 0x0000021C + +#define SENSOR_IF_SISLEY_ROI_TD_X_8_ADDR 0x00000220 + +#define SENSOR_IF_SISLEY_ROI_TD_X_9_ADDR 0x00000224 + +#define SENSOR_IF_SISLEY_ROI_TD_X_10_ADDR 0x00000228 + +#define SENSOR_IF_SISLEY_ROI_TD_X_11_ADDR 0x0000022C + +#define SENSOR_IF_SISLEY_ROI_TD_X_12_ADDR 0x00000230 + +#define SENSOR_IF_SISLEY_ROI_TD_X_13_ADDR 0x00000234 + +#define SENSOR_IF_SISLEY_ROI_TD_X_14_ADDR 0x00000238 + +#define SENSOR_IF_SISLEY_ROI_TD_X_15_ADDR 0x0000023C + +#define SENSOR_IF_SISLEY_ROI_TD_X_16_ADDR 0x00000240 + +#define SENSOR_IF_SISLEY_ROI_TD_X_17_ADDR 0x00000244 + +#define SENSOR_IF_SISLEY_ROI_TD_X_18_ADDR 0x00000248 + +#define SENSOR_IF_SISLEY_ROI_TD_X_19_ADDR 0x0000024C + +#define SENSOR_IF_SISLEY_ROI_TD_X_20_ADDR 0x00000250 + +//------------------------------------------------------------------------------------------------------------ +// SENSOR - EM ROI Y +//------------------------------------------------------------------------------------------------------------ + +#define SENSOR_IF_SISLEY_ROI_TD_Y_0_ADDR 0x00000300 + +#define SENSOR_IF_SISLEY_ROI_TD_Y_1_ADDR 0x00000304 + +#define SENSOR_IF_SISLEY_ROI_TD_Y_2_ADDR 0x00000308 + +#define SENSOR_IF_SISLEY_ROI_TD_Y_3_ADDR 0x0000030C + +#define SENSOR_IF_SISLEY_ROI_TD_Y_4_ADDR 0x00000310 + +#define SENSOR_IF_SISLEY_ROI_TD_Y_5_ADDR 0x00000314 + +#define SENSOR_IF_SISLEY_ROI_TD_Y_6_ADDR 0x00000318 + +#define SENSOR_IF_SISLEY_ROI_TD_Y_7_ADDR 0x0000031C + +#define SENSOR_IF_SISLEY_ROI_TD_Y_8_ADDR 0x00000320 + +#define SENSOR_IF_SISLEY_ROI_TD_Y_9_ADDR 0x00000324 + +#define SENSOR_IF_SISLEY_ROI_TD_Y_10_ADDR 0x00000328 + +#define SENSOR_IF_SISLEY_ROI_TD_Y_11_ADDR 0x0000032C + +#define SENSOR_IF_SISLEY_ROI_TD_Y_12_ADDR 0x00000330 + +#define SENSOR_IF_SISLEY_ROI_TD_Y_13_ADDR 0x00000334 + +#define SENSOR_IF_SISLEY_ROI_TD_Y_14_ADDR 0x00000338 + +#define SENSOR_IF_SISLEY_ROI_TD_Y_15_ADDR 0x0000033C + +//------------------------------------------------------------------------------------------------------------ +// SENSOR - EM ROI X +//------------------------------------------------------------------------------------------------------------ + +#define SENSOR_IF_SISLEY_ROI_EM_X_0_ADDR 0x00000400 + +#define SENSOR_IF_SISLEY_ROI_EM_X_1_ADDR 0x00000404 + +#define SENSOR_IF_SISLEY_ROI_EM_X_2_ADDR 0x00000408 + +#define SENSOR_IF_SISLEY_ROI_EM_X_3_ADDR 0x0000040C + +#define SENSOR_IF_SISLEY_ROI_EM_X_4_ADDR 0x00000410 + +#define SENSOR_IF_SISLEY_ROI_EM_X_5_ADDR 0x00000414 + +#define SENSOR_IF_SISLEY_ROI_EM_X_6_ADDR 0x00000418 + +#define SENSOR_IF_SISLEY_ROI_EM_X_7_ADDR 0x0000041C + +#define SENSOR_IF_SISLEY_ROI_EM_X_8_ADDR 0x00000420 + +#define SENSOR_IF_SISLEY_ROI_EM_X_9_ADDR 0x00000424 + +#define SENSOR_IF_SISLEY_ROI_EM_X_10_ADDR 0x00000428 + +#define SENSOR_IF_SISLEY_ROI_EM_X_11_ADDR 0x0000042C + +#define SENSOR_IF_SISLEY_ROI_EM_X_12_ADDR 0x00000430 + +#define SENSOR_IF_SISLEY_ROI_EM_X_13_ADDR 0x00000434 + +#define SENSOR_IF_SISLEY_ROI_EM_X_14_ADDR 0x00000438 + +#define SENSOR_IF_SISLEY_ROI_EM_X_15_ADDR 0x0000043C + +#define SENSOR_IF_SISLEY_ROI_EM_X_16_ADDR 0x00000440 + +#define SENSOR_IF_SISLEY_ROI_EM_X_17_ADDR 0x00000444 + +#define SENSOR_IF_SISLEY_ROI_EM_X_18_ADDR 0x00000448 + +#define SENSOR_IF_SISLEY_ROI_EM_X_19_ADDR 0x0000044C + +#define SENSOR_IF_SISLEY_ROI_EM_X_20_ADDR 0x00000450 + +//------------------------------------------------------------------------------------------------------------ +// SENSOR - EM ROI Y +//------------------------------------------------------------------------------------------------------------ + +#define SENSOR_IF_SISLEY_ROI_EM_Y_0_ADDR 0x00000500 + +#define SENSOR_IF_SISLEY_ROI_EM_Y_1_ADDR 0x00000504 + +#define SENSOR_IF_SISLEY_ROI_EM_Y_2_ADDR 0x00000508 + +#define SENSOR_IF_SISLEY_ROI_EM_Y_3_ADDR 0x0000050C + +#define SENSOR_IF_SISLEY_ROI_EM_Y_4_ADDR 0x00000510 + +#define SENSOR_IF_SISLEY_ROI_EM_Y_5_ADDR 0x00000514 + +#define SENSOR_IF_SISLEY_ROI_EM_Y_6_ADDR 0x00000518 + +#define SENSOR_IF_SISLEY_ROI_EM_Y_7_ADDR 0x0000051C + +#define SENSOR_IF_SISLEY_ROI_EM_Y_8_ADDR 0x00000520 + +#define SENSOR_IF_SISLEY_ROI_EM_Y_9_ADDR 0x00000524 + +#define SENSOR_IF_SISLEY_ROI_EM_Y_10_ADDR 0x00000528 + +#define SENSOR_IF_SISLEY_ROI_EM_Y_11_ADDR 0x0000052C + +#define SENSOR_IF_SISLEY_ROI_EM_Y_12_ADDR 0x00000530 + +#define SENSOR_IF_SISLEY_ROI_EM_Y_13_ADDR 0x00000534 + +#define SENSOR_IF_SISLEY_ROI_EM_Y_14_ADDR 0x00000538 + +#define SENSOR_IF_SISLEY_ROI_EM_Y_15_ADDR 0x0000053C + +//------------------------------------------------------------------------------------------------------------ +// SENSOR_IF_SISLEY_IF +//------------------------------------------------------------------------------------------------------------ + +#define SENSOR_IF_SISLEY_IF_BASE_ADDR 0x00000540 +#define SENSOR_IF_SISLEY_IF_LAST_ADDR 0x00000550 +#define SENSOR_IF_SISLEY_IF_SIZE 0x000000C0 + +#define SENSOR_IF_SISLEY_IF_TEST_PATTERN_CONTROL_ADDR 0x00000540 +#define SENSOR_IF_SISLEY_IF_TEST_PATTERN_CONTROL_ENABLE_BIT_IDX 0 +#define SENSOR_IF_SISLEY_IF_TEST_PATTERN_CONTROL_ENABLE_WIDTH 1 +#define SENSOR_IF_SISLEY_IF_TEST_PATTERN_CONTROL_ENABLE_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IF_TEST_PATTERN_CONTROL_TYPE_BIT_IDX 4 +#define SENSOR_IF_SISLEY_IF_TEST_PATTERN_CONTROL_TYPE_WIDTH 1 +#define SENSOR_IF_SISLEY_IF_TEST_PATTERN_CONTROL_TYPE_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IF_TEST_PATTERN_CONTROL_PIXEL_TYPE_BIT_IDX 8 +#define SENSOR_IF_SISLEY_IF_TEST_PATTERN_CONTROL_PIXEL_TYPE_WIDTH 1 +#define SENSOR_IF_SISLEY_IF_TEST_PATTERN_CONTROL_PIXEL_TYPE_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IF_TEST_PATTERN_CONTROL_PIXEL_POLARITY_BIT_IDX 12 +#define SENSOR_IF_SISLEY_IF_TEST_PATTERN_CONTROL_PIXEL_POLARITY_WIDTH 1 +#define SENSOR_IF_SISLEY_IF_TEST_PATTERN_CONTROL_PIXEL_POLARITY_DEFAULT 0x00000000 + +#define SENSOR_IF_SISLEY_IF_TEST_PATTERN_N_PERIOD_ADDR 0x00000544 +#define SENSOR_IF_SISLEY_IF_TEST_PATTERN_N_PERIOD_VALID_RATIO_BIT_IDX 0 +#define SENSOR_IF_SISLEY_IF_TEST_PATTERN_N_PERIOD_VALID_RATIO_WIDTH 10 +#define SENSOR_IF_SISLEY_IF_TEST_PATTERN_N_PERIOD_VALID_RATIO_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IF_TEST_PATTERN_N_PERIOD_LENGTH_BIT_IDX 16 +#define SENSOR_IF_SISLEY_IF_TEST_PATTERN_N_PERIOD_LENGTH_WIDTH 16 +#define SENSOR_IF_SISLEY_IF_TEST_PATTERN_N_PERIOD_LENGTH_DEFAULT 0x00000000 + +#define SENSOR_IF_SISLEY_IF_TEST_PATTERN_P_PERIOD_ADDR 0x00000548 +#define SENSOR_IF_SISLEY_IF_TEST_PATTERN_P_PERIOD_VALID_RATIO_BIT_IDX 0 +#define SENSOR_IF_SISLEY_IF_TEST_PATTERN_P_PERIOD_VALID_RATIO_WIDTH 10 +#define SENSOR_IF_SISLEY_IF_TEST_PATTERN_P_PERIOD_VALID_RATIO_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IF_TEST_PATTERN_P_PERIOD_LENGTH_BIT_IDX 16 +#define SENSOR_IF_SISLEY_IF_TEST_PATTERN_P_PERIOD_LENGTH_WIDTH 16 +#define SENSOR_IF_SISLEY_IF_TEST_PATTERN_P_PERIOD_LENGTH_DEFAULT 0x00000000 + +#define SENSOR_IF_SISLEY_IF_CONTROL_ADDR 0x0000054C +#define SENSOR_IF_SISLEY_IF_CONTROL_SELF_ACK_BIT_IDX 0 +#define SENSOR_IF_SISLEY_IF_CONTROL_SELF_ACK_WIDTH 1 +#define SENSOR_IF_SISLEY_IF_CONTROL_SELF_ACK_DEFAULT 0x00000000 +#define SENSOR_IF_SISLEY_IF_CONTROL_SENSOR_CLK_EN_BIT_IDX 1 +#define SENSOR_IF_SISLEY_IF_CONTROL_SENSOR_CLK_EN_WIDTH 1 +#define SENSOR_IF_SISLEY_IF_CONTROL_SENSOR_CLK_EN_DEFAULT 0x00000001 +#define SENSOR_IF_SISLEY_IF_CONTROL_EM_RSTN_TRIGGER_EN_BIT_IDX 4 +#define SENSOR_IF_SISLEY_IF_CONTROL_EM_RSTN_TRIGGER_EN_WIDTH 1 +#define SENSOR_IF_SISLEY_IF_CONTROL_EM_RSTN_TRIGGER_EN_DEFAULT 0x00000000 + +#define SENSOR_IF_SISLEY_IF_TRIGGERS_ADDR 0x00000550 +#define SENSOR_IF_SISLEY_IF_TRIGGERS_RESET_AFIFO_BIT_IDX 0 +#define SENSOR_IF_SISLEY_IF_TRIGGERS_RESET_AFIFO_WIDTH 1 +#define SENSOR_IF_SISLEY_IF_TRIGGERS_RESET_AFIFO_DEFAULT 0x00000000 + +#endif // METAVISION_HAL_GEN3_SENSOR_IF_REGISTER_MAP_H diff --git a/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/gen3_sensor_register_map.h b/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/gen3_sensor_register_map.h new file mode 100644 index 000000000..632381501 --- /dev/null +++ b/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/gen3_sensor_register_map.h @@ -0,0 +1,1452 @@ +/********************************************************************************************** + * WARNING: THIS FILE HAS BEEN GENERATED BY REG_MAP_MANAGER TOOLS PLEASE DO NOT MODIFY IT * + ********************************************************************************************** + * File: gen3_sensor_register_map.h * + * * + * Copyright (c) 2015-2018 Prophesee. All rights reserved. * + * * + * Date: 08/10/2018 at 12h05m31s * + * Name: gen3_sensor_register_map * + * Version: 1.0 * + * Hash: 462f97c9b5ea95871a788d94cb1c91ee95c4d23a52b06bc3cdf308b69927b3bb * + ********************************************************************************************** + * WARNING: THIS FILE HAS BEEN GENERATED BY REG_MAP_MANAGER TOOLS PLEASE DO NOT MODIFY IT * + *********************************************************************************************/ + +#ifndef METAVISION_HAL_GEN3_SENSOR_REGISTER_MAP_H +#define METAVISION_HAL_GEN3_SENSOR_REGISTER_MAP_H + +//------------------------------------------------------------------------------------------------------------ +// SISLEY +//------------------------------------------------------------------------------------------------------------ + +#define SISLEY_BASE_ADDR 0x00000000 +#define SISLEY_LAST_ADDR 0x0000053C +#define SISLEY_SIZE 0x00000540 + +//------------------------------------------------------------------------------------------------------------ +// SENSOR - Global CTRL +//------------------------------------------------------------------------------------------------------------ + +#define SISLEY_SENSOR_GLOBAL_CTRL_ADDR 0x00000000 +#define SISLEY_SENSOR_GLOBAL_CTRL_TD_COUPLE_CTRL_BIT_IDX \ + 0 // Enable ATIS em + // 0: td events do not trigger em events + // 1: td events trigger em events +#define SISLEY_SENSOR_GLOBAL_CTRL_TD_COUPLE_CTRL_WIDTH 1 +#define SISLEY_SENSOR_GLOBAL_CTRL_TD_COUPLE_CTRL_DEFAULT 0x00000000 +#define SISLEY_SENSOR_GLOBAL_CTRL_SW_GLOBAL_EN_BIT_IDX \ + 1 // Global enable for the analog. Used in glue logic with block level reset. + // 0: hold analog in reset + // 1: analog can be enabled +#define SISLEY_SENSOR_GLOBAL_CTRL_SW_GLOBAL_EN_WIDTH 1 +#define SISLEY_SENSOR_GLOBAL_CTRL_SW_GLOBAL_EN_DEFAULT 0x00000000 +#define SISLEY_SENSOR_GLOBAL_CTRL_BYPASS_DIGITAL_READOUT_CTRL_BIT_IDX \ + 2 // Enable the readout fast path to route async interface directly to the digital output: + // 0: digital readout is functional + // 1: digital readout is bypassed +#define SISLEY_SENSOR_GLOBAL_CTRL_BYPASS_DIGITAL_READOUT_CTRL_WIDTH 1 +#define SISLEY_SENSOR_GLOBAL_CTRL_BYPASS_DIGITAL_READOUT_CTRL_DEFAULT 0x00000000 +#define SISLEY_SENSOR_GLOBAL_CTRL_BGEN_RST_BIT_IDX \ + 3 // BIAS reset + // 0: biases connected to their reset values + // 1: biases connected to their bias generator +#define SISLEY_SENSOR_GLOBAL_CTRL_BGEN_RST_WIDTH 1 +#define SISLEY_SENSOR_GLOBAL_CTRL_BGEN_RST_DEFAULT 0x00000000 +#define SISLEY_SENSOR_GLOBAL_CTRL_BGEN_EN_BIT_IDX \ + 4 // BIAS enable + // 0: disable PTAT of bias generators + // 1: enable PTAT of bias generators +#define SISLEY_SENSOR_GLOBAL_CTRL_BGEN_EN_WIDTH 1 +#define SISLEY_SENSOR_GLOBAL_CTRL_BGEN_EN_DEFAULT 0x00000000 +#define SISLEY_SENSOR_GLOBAL_CTRL_TOP_CLK_DIV_EN_BIT_IDX 5 // Enable the digital core clock frequency divider +#define SISLEY_SENSOR_GLOBAL_CTRL_TOP_CLK_DIV_EN_WIDTH 1 +#define SISLEY_SENSOR_GLOBAL_CTRL_TOP_CLK_DIV_EN_DEFAULT 0x00000000 +#define SISLEY_SENSOR_GLOBAL_CTRL_TOP_CLK_DIV_FACTOR_BIT_IDX \ + 6 // Devide frequency: + // 1: 2-factor + // 2: 4-factor + // 4: 8-factor(these 3 bits are supposed to be one-hot (aka only one divider factor must be selected). If it's not + // the case the lowest one wins) +#define SISLEY_SENSOR_GLOBAL_CTRL_TOP_CLK_DIV_FACTOR_WIDTH 3 +#define SISLEY_SENSOR_GLOBAL_CTRL_TOP_CLK_DIV_FACTOR_DEFAULT 0x00000000 + +#define SISLEY_SENSOR_ROI_CTRL_ADDR 0x00000004 +#define SISLEY_SENSOR_ROI_CTRL_ROI_EM_EN_BIT_IDX \ + 0 // Enable ROI EM + // 0 : EM full array + // 1 : EM ROI +#define SISLEY_SENSOR_ROI_CTRL_ROI_EM_EN_WIDTH 1 +#define SISLEY_SENSOR_ROI_CTRL_ROI_EM_EN_DEFAULT 0x00000000 +#define SISLEY_SENSOR_ROI_CTRL_ROI_TD_EN_BIT_IDX \ + 1 // Enable ROI TD + // 0 : TD full array + // 1 : TD ROI +#define SISLEY_SENSOR_ROI_CTRL_ROI_TD_EN_WIDTH 1 +#define SISLEY_SENSOR_ROI_CTRL_ROI_TD_EN_DEFAULT 0x00000000 +#define SISLEY_SENSOR_ROI_CTRL_ROI_EM_SHUTTER_BIT_IDX 2 // 1: Resets the whole EM ROI X and Y arrays +#define SISLEY_SENSOR_ROI_CTRL_ROI_EM_SHUTTER_WIDTH 1 +#define SISLEY_SENSOR_ROI_CTRL_ROI_EM_SHUTTER_DEFAULT 0x00000001 +#define SISLEY_SENSOR_ROI_CTRL_ROI_TD_RSTN_BIT_IDX 3 // 0: Resets the whole TD ROI X and Y arrays +#define SISLEY_SENSOR_ROI_CTRL_ROI_TD_RSTN_WIDTH 1 +#define SISLEY_SENSOR_ROI_CTRL_ROI_TD_RSTN_DEFAULT 0x00000001 +#define SISLEY_SENSOR_ROI_CTRL_ROI_EM_SHADOW_TRIGGER_BIT_IDX 4 // Latch the configured ROI EM into the shadow register +#define SISLEY_SENSOR_ROI_CTRL_ROI_EM_SHADOW_TRIGGER_WIDTH 1 +#define SISLEY_SENSOR_ROI_CTRL_ROI_EM_SHADOW_TRIGGER_DEFAULT 0x00000000 +#define SISLEY_SENSOR_ROI_CTRL_ROI_TD_SHADOW_TRIGGER_BIT_IDX 5 // Latch the configured ROI TD into the shadow register +#define SISLEY_SENSOR_ROI_CTRL_ROI_TD_SHADOW_TRIGGER_WIDTH 1 +#define SISLEY_SENSOR_ROI_CTRL_ROI_TD_SHADOW_TRIGGER_DEFAULT 0x00000000 +#define SISLEY_SENSOR_ROI_CTRL_ROI_RONI_EN_BIT_IDX \ + 6 // The content of the roi register must be intepreted as RONI actually, RONI output is driven by the shadow + // registers, while ROI output pins are reset For now only roi_td_X shadow register is affected by this + // modification +#define SISLEY_SENSOR_ROI_CTRL_ROI_RONI_EN_WIDTH 1 +#define SISLEY_SENSOR_ROI_CTRL_ROI_RONI_EN_DEFAULT 0x00000000 +#define SISLEY_SENSOR_ROI_CTRL_ROI_EM_SCAN_EN_BIT_IDX \ + 7 // Any modification applied to roi em register is directly forwarded to the corresponding shadow register +#define SISLEY_SENSOR_ROI_CTRL_ROI_EM_SCAN_EN_WIDTH 1 +#define SISLEY_SENSOR_ROI_CTRL_ROI_EM_SCAN_EN_DEFAULT 0x00000000 +#define SISLEY_SENSOR_ROI_CTRL_ROI_TD_SCAN_EN_BIT_IDX \ + 8 // Any modification applied to roi td register is directly forwarded to the corresponding shadow register +#define SISLEY_SENSOR_ROI_CTRL_ROI_TD_SCAN_EN_WIDTH 1 +#define SISLEY_SENSOR_ROI_CTRL_ROI_TD_SCAN_EN_DEFAULT 0x00000000 + +#define SISLEY_SENSOR_READOUT_CTRL_ADDR 0x00000008 +#define SISLEY_SENSOR_READOUT_CTRL_RO_DELAY_RSTN_BIT_IDX \ + 0 // Resets tunable delay of the state machine + // 1: functional | 0: reset +#define SISLEY_SENSOR_READOUT_CTRL_RO_DELAY_RSTN_WIDTH 1 +#define SISLEY_SENSOR_READOUT_CTRL_RO_DELAY_RSTN_DEFAULT 0x00000001 +#define SISLEY_SENSOR_READOUT_CTRL_RO_INTERFACE_X_RSTN_BIT_IDX \ + 1 // Resets X interface of the state machine + // 1: functional | 0: reset +#define SISLEY_SENSOR_READOUT_CTRL_RO_INTERFACE_X_RSTN_WIDTH 1 +#define SISLEY_SENSOR_READOUT_CTRL_RO_INTERFACE_X_RSTN_DEFAULT 0x00000001 +#define SISLEY_SENSOR_READOUT_CTRL_RO_LATCH_Y_RSTN_BIT_IDX \ + 2 // Resets Y output latches td_y<9:0> + // 1: functional | 0: reset +#define SISLEY_SENSOR_READOUT_CTRL_RO_LATCH_Y_RSTN_WIDTH 1 +#define SISLEY_SENSOR_READOUT_CTRL_RO_LATCH_Y_RSTN_DEFAULT 0x00000001 +#define SISLEY_SENSOR_READOUT_CTRL_RO_ACK_ARRAY_RSTN_BIT_IDX \ + 3 // Resets array acknowledge of the state machine + // 1: functional | 0: reset +#define SISLEY_SENSOR_READOUT_CTRL_RO_ACK_ARRAY_RSTN_WIDTH 1 +#define SISLEY_SENSOR_READOUT_CTRL_RO_ACK_ARRAY_RSTN_DEFAULT 0x00000001 +#define SISLEY_SENSOR_READOUT_CTRL_RO_CTRL_RSTN_BIT_IDX \ + 4 // Resets control state machine + // 1: functional | 0: reset +#define SISLEY_SENSOR_READOUT_CTRL_RO_CTRL_RSTN_WIDTH 1 +#define SISLEY_SENSOR_READOUT_CTRL_RO_CTRL_RSTN_DEFAULT 0x00000001 +#define SISLEY_SENSOR_READOUT_CTRL_RO_LATCH_DUM_CONNECT_CTRL_BIT_IDX \ + 5 // Connects dummy latch to req x or b + // 0: disconnected | 1: connected +#define SISLEY_SENSOR_READOUT_CTRL_RO_LATCH_DUM_CONNECT_CTRL_WIDTH 1 +#define SISLEY_SENSOR_READOUT_CTRL_RO_LATCH_DUM_CONNECT_CTRL_DEFAULT 0x00000001 +#define SISLEY_SENSOR_READOUT_CTRL_RO_LATCH_DUM_RSTN_BIT_IDX \ + 6 // Resets dummy latch + // 1: functional | 0: reset +#define SISLEY_SENSOR_READOUT_CTRL_RO_LATCH_DUM_RSTN_WIDTH 1 +#define SISLEY_SENSOR_READOUT_CTRL_RO_LATCH_DUM_RSTN_DEFAULT 0x00000001 +#define SISLEY_SENSOR_READOUT_CTRL_RO_PIXEL_DUM_RSTN_BIT_IDX \ + 7 // Resets dummy pixel + // 1: functional | 0: reset +#define SISLEY_SENSOR_READOUT_CTRL_RO_PIXEL_DUM_RSTN_WIDTH 1 +#define SISLEY_SENSOR_READOUT_CTRL_RO_PIXEL_DUM_RSTN_DEFAULT 0x00000001 +#define SISLEY_SENSOR_READOUT_CTRL_RO_INTERFACE_Y_RSTN_BIT_IDX \ + 8 // Resets Y interface of the state machine + // 1: functional | 0: rese +#define SISLEY_SENSOR_READOUT_CTRL_RO_INTERFACE_Y_RSTN_WIDTH 1 +#define SISLEY_SENSOR_READOUT_CTRL_RO_INTERFACE_Y_RSTN_DEFAULT 0x00000001 +#define SISLEY_SENSOR_READOUT_CTRL_RO_LATCH_X_RSTN_BIT_IDX \ + 9 // Resets X latches + // 1: functional | 0: reset +#define SISLEY_SENSOR_READOUT_CTRL_RO_LATCH_X_RSTN_WIDTH 1 +#define SISLEY_SENSOR_READOUT_CTRL_RO_LATCH_X_RSTN_DEFAULT 0x00000001 +#define SISLEY_SENSOR_READOUT_CTRL_RO_STAT_X_CTRL_BIT_IDX \ + 10 // Activates X statitizers + // 0: inverter + // 1: statitizer +#define SISLEY_SENSOR_READOUT_CTRL_RO_STAT_X_CTRL_WIDTH 1 +#define SISLEY_SENSOR_READOUT_CTRL_RO_STAT_X_CTRL_DEFAULT 0x00000001 +#define SISLEY_SENSOR_READOUT_CTRL_RO_ACT_PUX_CTRL_BIT_IDX \ + 11 // Activates X active pull-ups with drive strength 'bit' + // 0: active pull drive 1 disabled + // 1: active pull drive 1 enabled + // bit11:+1 strength + // bit12:+2 strength + // bit13:+4 strength +#define SISLEY_SENSOR_READOUT_CTRL_RO_ACT_PUX_CTRL_WIDTH 3 +#define SISLEY_SENSOR_READOUT_CTRL_RO_ACT_PUX_CTRL_DEFAULT 0x00000003 +#define SISLEY_SENSOR_READOUT_CTRL_RO_STAT_Y_CTRL_BIT_IDX 14 // Activates Y statitizers 0: inverter 1: statitizer +#define SISLEY_SENSOR_READOUT_CTRL_RO_STAT_Y_CTRL_WIDTH 1 +#define SISLEY_SENSOR_READOUT_CTRL_RO_STAT_Y_CTRL_DEFAULT 0x00000001 +#define SISLEY_SENSOR_READOUT_CTRL_RO_ACT_PUY_CTRL_BIT_IDX \ + 15 // Activates Y active pull-ups 0: active pull disabled 1: active pull enabled +#define SISLEY_SENSOR_READOUT_CTRL_RO_ACT_PUY_CTRL_WIDTH 1 +#define SISLEY_SENSOR_READOUT_CTRL_RO_ACT_PUY_CTRL_DEFAULT 0x00000001 +#define SISLEY_SENSOR_READOUT_CTRL_RO_PIPELINE_CTRL_BIT_IDX \ + 16 // Activate row pipeline 0: pipeline disbaled 1: pipeline enabled +#define SISLEY_SENSOR_READOUT_CTRL_RO_PIPELINE_CTRL_WIDTH 1 +#define SISLEY_SENSOR_READOUT_CTRL_RO_PIPELINE_CTRL_DEFAULT 0x00000001 +#define SISLEY_SENSOR_READOUT_CTRL_RO_ACT_PDY_CTRL_BIT_IDX \ + 17 // bit17 - 0: no act pull down on req y - strength 1 + // bit18 - 0: no act pull down on req y - strength 2 + // bit19 - 0: no act pull down on req y - strength 4 +#define SISLEY_SENSOR_READOUT_CTRL_RO_ACT_PDY_CTRL_WIDTH 3 +#define SISLEY_SENSOR_READOUT_CTRL_RO_ACT_PDY_CTRL_DEFAULT 0x00000003 +#define SISLEY_SENSOR_READOUT_CTRL_RO_ACT_PDX_CTRL_BIT_IDX \ + 20 // bit20 - 0: no act pull down on req x - strength 1 + // bit21 - 0: no act pull down on req x - strength 2 + // bit22 - 0: no act pull down on req x - strength 4 +#define SISLEY_SENSOR_READOUT_CTRL_RO_ACT_PDX_CTRL_WIDTH 3 +#define SISLEY_SENSOR_READOUT_CTRL_RO_ACT_PDX_CTRL_DEFAULT 0x00000003 +#define SISLEY_SENSOR_READOUT_CTRL_RO_INV_REQ_EM_CTRL_BIT_IDX 23 // 0: req x active high 1: req x active low +#define SISLEY_SENSOR_READOUT_CTRL_RO_INV_REQ_EM_CTRL_WIDTH 1 +#define SISLEY_SENSOR_READOUT_CTRL_RO_INV_REQ_EM_CTRL_DEFAULT 0x00000000 +#define SISLEY_SENSOR_READOUT_CTRL_RO_INV_POL_EM_CTRL_BIT_IDX \ + 24 // 0: 0 = on event | 1 = off event 1: 0 = off event | 0 = on event +#define SISLEY_SENSOR_READOUT_CTRL_RO_INV_POL_EM_CTRL_WIDTH 1 +#define SISLEY_SENSOR_READOUT_CTRL_RO_INV_POL_EM_CTRL_DEFAULT 0x00000000 +#define SISLEY_SENSOR_READOUT_CTRL_RO_INV_ACK_EM_CTRL_BIT_IDX 25 // 0: ackb active low 1: ackb active high +#define SISLEY_SENSOR_READOUT_CTRL_RO_INV_ACK_EM_CTRL_WIDTH 1 +#define SISLEY_SENSOR_READOUT_CTRL_RO_INV_ACK_EM_CTRL_DEFAULT 0x00000000 +#define SISLEY_SENSOR_READOUT_CTRL_RO_INV_REQ_TD_CTRL_BIT_IDX 26 // 0: req x active high 1: req x active low +#define SISLEY_SENSOR_READOUT_CTRL_RO_INV_REQ_TD_CTRL_WIDTH 1 +#define SISLEY_SENSOR_READOUT_CTRL_RO_INV_REQ_TD_CTRL_DEFAULT 0x00000000 +#define SISLEY_SENSOR_READOUT_CTRL_RO_INV_POL_TD_CTRL_BIT_IDX \ + 27 // 0: 0 = on event | 1 = off event 1: 0 = off event | 0 = on event +#define SISLEY_SENSOR_READOUT_CTRL_RO_INV_POL_TD_CTRL_WIDTH 1 +#define SISLEY_SENSOR_READOUT_CTRL_RO_INV_POL_TD_CTRL_DEFAULT 0x00000000 +#define SISLEY_SENSOR_READOUT_CTRL_RO_INV_ACK_TD_CTRL_BIT_IDX 28 // 0: ackb active low 1: ackb active high +#define SISLEY_SENSOR_READOUT_CTRL_RO_INV_ACK_TD_CTRL_WIDTH 1 +#define SISLEY_SENSOR_READOUT_CTRL_RO_INV_ACK_TD_CTRL_DEFAULT 0x00000000 + +#define SISLEY_SENSOR_TESTBUS_CTRL_ADDR 0x0000000C +#define SISLEY_SENSOR_TESTBUS_CTRL_TP_SEL_TEST_PHOTODIODE_BIT_IDX \ + 0 // Selects either test pixel with photodiode or test pixel with current input + // 0: test pixel with current input | 1: test pixel with photodiode +#define SISLEY_SENSOR_TESTBUS_CTRL_TP_SEL_TEST_PHOTODIODE_WIDTH 1 +#define SISLEY_SENSOR_TESTBUS_CTRL_TP_SEL_TEST_PHOTODIODE_DEFAULT 0x00000000 +#define SISLEY_SENSOR_TESTBUS_CTRL_TP_DIODE_BIT_IDX 1 // Test pixel control signal- Not used +#define SISLEY_SENSOR_TESTBUS_CTRL_TP_DIODE_WIDTH 1 +#define SISLEY_SENSOR_TESTBUS_CTRL_TP_DIODE_DEFAULT 0x00000000 +#define SISLEY_SENSOR_TESTBUS_CTRL_TP_DIODE_TL_BIT_IDX 2 // Top-left test pixel control signal +#define SISLEY_SENSOR_TESTBUS_CTRL_TP_DIODE_TL_WIDTH 1 +#define SISLEY_SENSOR_TESTBUS_CTRL_TP_DIODE_TL_DEFAULT 0x00000000 +#define SISLEY_SENSOR_TESTBUS_CTRL_TP_DIODE_TR_BIT_IDX 3 // Top-right test pixel control signal +#define SISLEY_SENSOR_TESTBUS_CTRL_TP_DIODE_TR_WIDTH 1 +#define SISLEY_SENSOR_TESTBUS_CTRL_TP_DIODE_TR_DEFAULT 0x00000000 +#define SISLEY_SENSOR_TESTBUS_CTRL_TP_DIODE_BR_BIT_IDX 4 // Bottom right test pixel control signal +#define SISLEY_SENSOR_TESTBUS_CTRL_TP_DIODE_BR_WIDTH 1 +#define SISLEY_SENSOR_TESTBUS_CTRL_TP_DIODE_BR_DEFAULT 0x00000000 +#define SISLEY_SENSOR_TESTBUS_CTRL_TP_DIODE_BL_BIT_IDX 5 // Bottom left test pixel control signal +#define SISLEY_SENSOR_TESTBUS_CTRL_TP_DIODE_BL_WIDTH 1 +#define SISLEY_SENSOR_TESTBUS_CTRL_TP_DIODE_BL_DEFAULT 0x00000000 +#define SISLEY_SENSOR_TESTBUS_CTRL_TP_PHOTODIODE_EN_BIT_IDX 6 // Test pixel enable, see datasheet(11.1.2.4.1 - Table 2) +#define SISLEY_SENSOR_TESTBUS_CTRL_TP_PHOTODIODE_EN_WIDTH 1 +#define SISLEY_SENSOR_TESTBUS_CTRL_TP_PHOTODIODE_EN_DEFAULT 0x00000001 +#define SISLEY_SENSOR_TESTBUS_CTRL_TP_EN_BIT_IDX 7 // Test pixel enable, see datasheet(11.1.2.4.1 - Table 2) +#define SISLEY_SENSOR_TESTBUS_CTRL_TP_EN_WIDTH 1 +#define SISLEY_SENSOR_TESTBUS_CTRL_TP_EN_DEFAULT 0x00000000 +#define SISLEY_SENSOR_TESTBUS_CTRL_TBUS_SEL_TPA1_BIT_IDX 8 // See datasheet(11.1.2.4.2 - Table 3) +#define SISLEY_SENSOR_TESTBUS_CTRL_TBUS_SEL_TPA1_WIDTH 4 +#define SISLEY_SENSOR_TESTBUS_CTRL_TBUS_SEL_TPA1_DEFAULT 0x00000000 +#define SISLEY_SENSOR_TESTBUS_CTRL_TBUS_SEL_TPA2_BIT_IDX 12 // See datasheet(11.1.2.4.2 - Table 3) +#define SISLEY_SENSOR_TESTBUS_CTRL_TBUS_SEL_TPA2_WIDTH 4 +#define SISLEY_SENSOR_TESTBUS_CTRL_TBUS_SEL_TPA2_DEFAULT 0x00000000 +#define SISLEY_SENSOR_TESTBUS_CTRL_TBUS_SEL_TPA3_BIT_IDX 16 // See datasheet(11.1.2.4.2 - Table 3) +#define SISLEY_SENSOR_TESTBUS_CTRL_TBUS_SEL_TPA3_WIDTH 4 +#define SISLEY_SENSOR_TESTBUS_CTRL_TBUS_SEL_TPA3_DEFAULT 0x00000000 +#define SISLEY_SENSOR_TESTBUS_CTRL_TBUS_SEL_TPA4_BIT_IDX 20 // See datasheet(11.1.2.4.2 - Table 3) +#define SISLEY_SENSOR_TESTBUS_CTRL_TBUS_SEL_TPA4_WIDTH 4 +#define SISLEY_SENSOR_TESTBUS_CTRL_TBUS_SEL_TPA4_DEFAULT 0x00000000 +#define SISLEY_SENSOR_TESTBUS_CTRL_TBUS_SEL_TPD1_BIT_IDX 24 // See datasheet(11.1.2.4.3 - Table 4 and Figure 10) +#define SISLEY_SENSOR_TESTBUS_CTRL_TBUS_SEL_TPD1_WIDTH 4 +#define SISLEY_SENSOR_TESTBUS_CTRL_TBUS_SEL_TPD1_DEFAULT 0x00000000 +#define SISLEY_SENSOR_TESTBUS_CTRL_TBUS_SEL_TPD2_BIT_IDX 28 // See datasheet(11.1.2.4.3 - Table 4 and Figure 10) +#define SISLEY_SENSOR_TESTBUS_CTRL_TBUS_SEL_TPD2_WIDTH 4 +#define SISLEY_SENSOR_TESTBUS_CTRL_TBUS_SEL_TPD2_DEFAULT 0x00000000 + +#define SISLEY_SENSOR_CLKSYNC_CTRL_ADDR 0x00000010 +#define SISLEY_SENSOR_CLKSYNC_CTRL_CLK_OUT_EN_BIT_IDX \ + 0 // enable clk at the output of the sensor towards the external interface (not the digital digital) + // 0: clk_out is active, tied to ground + // 1: clk_out is active, always on as soon as there is clk_in available +#define SISLEY_SENSOR_CLKSYNC_CTRL_CLK_OUT_EN_WIDTH 1 +#define SISLEY_SENSOR_CLKSYNC_CTRL_CLK_OUT_EN_DEFAULT 0x00000001 +#define SISLEY_SENSOR_CLKSYNC_CTRL_CLK_DIFF_HI_CM_CTRL_BIT_IDX \ + 1 // Setting to accommodate high common mode value in differential mode (1.4 V) +#define SISLEY_SENSOR_CLKSYNC_CTRL_CLK_DIFF_HI_CM_CTRL_WIDTH 1 +#define SISLEY_SENSOR_CLKSYNC_CTRL_CLK_DIFF_HI_CM_CTRL_DEFAULT 0x00000001 +#define SISLEY_SENSOR_CLKSYNC_CTRL_CLK_DIFF_IOUT_X2_CTRL_BIT_IDX \ + 2 // Setting to boost output current in differential mode +#define SISLEY_SENSOR_CLKSYNC_CTRL_CLK_DIFF_IOUT_X2_CTRL_WIDTH 1 +#define SISLEY_SENSOR_CLKSYNC_CTRL_CLK_DIFF_IOUT_X2_CTRL_DEFAULT 0x00000001 +#define SISLEY_SENSOR_CLKSYNC_CTRL_CLK_DC_UP_CTRL_BIT_IDX 3 // Setting to shift up output voltage in differential mode +#define SISLEY_SENSOR_CLKSYNC_CTRL_CLK_DC_UP_CTRL_WIDTH 1 +#define SISLEY_SENSOR_CLKSYNC_CTRL_CLK_DC_UP_CTRL_DEFAULT 0x00000000 +#define SISLEY_SENSOR_CLKSYNC_CTRL_CLK_POLARITY_CTRL_BIT_IDX \ + 4 // Swap polarity of clk_out + // 0: clk_out = clk_int + // 1: clk_out = not(clk_int) +#define SISLEY_SENSOR_CLKSYNC_CTRL_CLK_POLARITY_CTRL_WIDTH 1 +#define SISLEY_SENSOR_CLKSYNC_CTRL_CLK_POLARITY_CTRL_DEFAULT 0x00000000 +#define SISLEY_SENSOR_CLKSYNC_CTRL_RO_STAT_REQ_X_CTRL_BIT_IDX \ + 5 // 0: req x bus has no statitizer + // 1: req x bus has a statitizer +#define SISLEY_SENSOR_CLKSYNC_CTRL_RO_STAT_REQ_X_CTRL_WIDTH 1 +#define SISLEY_SENSOR_CLKSYNC_CTRL_RO_STAT_REQ_X_CTRL_DEFAULT 0x00000000 +#define SISLEY_SENSOR_CLKSYNC_CTRL_RO_STAT_POL_CTRL_BIT_IDX \ + 6 // 0: polarity bus has no statitizer + // 1: polarity bus has a statitizer +#define SISLEY_SENSOR_CLKSYNC_CTRL_RO_STAT_POL_CTRL_WIDTH 1 +#define SISLEY_SENSOR_CLKSYNC_CTRL_RO_STAT_POL_CTRL_DEFAULT 0x00000000 +#define SISLEY_SENSOR_CLKSYNC_CTRL_RO_TD_REQ_LAT_CTRL_BIT_IDX \ + 7 // add X ns delay to the td req + // 0: no delay + // 1: ~500 ps + // 2: ~1 ns + // 3: ~2 ns + // 4: ~4 ns + // 5: ~4.5 ns + // 6: ~5 ns + // 7: ~6 ns +#define SISLEY_SENSOR_CLKSYNC_CTRL_RO_TD_REQ_LAT_CTRL_WIDTH 3 +#define SISLEY_SENSOR_CLKSYNC_CTRL_RO_TD_REQ_LAT_CTRL_DEFAULT 0x00000000 +#define SISLEY_SENSOR_CLKSYNC_CTRL_RO_TD_ACK_LAT_CTRL_BIT_IDX \ + 10 // add X ns delay to the td ack + // 0: no delay + // 1: ~500 ps + // 2: ~1 ns + // 3: ~2 ns + // 4: ~4 ns + // 5: ~4.5 ns + // 6: ~5 ns + // 7: ~6 ns +#define SISLEY_SENSOR_CLKSYNC_CTRL_RO_TD_ACK_LAT_CTRL_WIDTH 3 +#define SISLEY_SENSOR_CLKSYNC_CTRL_RO_TD_ACK_LAT_CTRL_DEFAULT 0x00000000 +#define SISLEY_SENSOR_CLKSYNC_CTRL_RO_EM_REQ_LAT_CTRL_BIT_IDX \ + 13 // add X ns delay to the em req + // 0: no delay + // 1: ~500 ps + // 2: ~1 ns + // 3: ~2 ns + // 4: ~4 ns + // 5: ~4.5 ns + // 6: ~5 ns + // 7: ~6 ns +#define SISLEY_SENSOR_CLKSYNC_CTRL_RO_EM_REQ_LAT_CTRL_WIDTH 3 +#define SISLEY_SENSOR_CLKSYNC_CTRL_RO_EM_REQ_LAT_CTRL_DEFAULT 0x00000000 +#define SISLEY_SENSOR_CLKSYNC_CTRL_RO_EM_ACK_LAT_CTRL_BIT_IDX \ + 16 // add X ns delay to the em ack + // 0: no delay + // 1: ~500 ps + // 2: ~1 ns + // 3: ~2 ns + // 4: ~4 ns + // 5: ~4.5 ns + // 6: ~5 ns + // 7: ~6 ns +#define SISLEY_SENSOR_CLKSYNC_CTRL_RO_EM_ACK_LAT_CTRL_WIDTH 3 +#define SISLEY_SENSOR_CLKSYNC_CTRL_RO_EM_ACK_LAT_CTRL_DEFAULT 0x00000000 + +#define SISLEY_SENSOR_LIFO_CTRL_ADDR 0x00000014 +#define SISLEY_SENSOR_LIFO_CTRL_LIFO_COUNTER_BIT_IDX \ + 0 // Pulsewidth measured value: + // Max illuminance measurement pulse = 5*E-01s, min Tclk = 1*E-08 gives a max counter of 5*E07 +#define SISLEY_SENSOR_LIFO_CTRL_LIFO_COUNTER_WIDTH 26 +#define SISLEY_SENSOR_LIFO_CTRL_LIFO_COUNTER_DEFAULT 0x00000000 +#define SISLEY_SENSOR_LIFO_CTRL_LIFO_COUNTER_VALID_BIT_IDX 29 // Pulsewidth measured value is valid +#define SISLEY_SENSOR_LIFO_CTRL_LIFO_COUNTER_VALID_WIDTH 1 +#define SISLEY_SENSOR_LIFO_CTRL_LIFO_COUNTER_VALID_DEFAULT 0x00000000 +#define SISLEY_SENSOR_LIFO_CTRL_LIFO_CNT_EN_BIT_IDX 30 // Enable pulsewidth counter +#define SISLEY_SENSOR_LIFO_CTRL_LIFO_CNT_EN_WIDTH 1 +#define SISLEY_SENSOR_LIFO_CTRL_LIFO_CNT_EN_DEFAULT 0x00000000 +#define SISLEY_SENSOR_LIFO_CTRL_LIFO_EN_BIT_IDX \ + 31 // Enable illuminance measurement + // 0: photocurrent measurement inactive + // 1: photocurrent measurement active +#define SISLEY_SENSOR_LIFO_CTRL_LIFO_EN_WIDTH 1 +#define SISLEY_SENSOR_LIFO_CTRL_LIFO_EN_DEFAULT 0x00000000 + +#define SISLEY_SENSOR_CHIP_ID_ADDR 0x00000018 +#define SISLEY_SENSOR_CHIP_ID_CHIP_ID_BIT_IDX 0 +#define SISLEY_SENSOR_CHIP_ID_CHIP_ID_WIDTH 32 +#define SISLEY_SENSOR_CHIP_ID_CHIP_ID_DEFAULT 0x90000402 + +#define SISLEY_SENSOR_SPARE_CTRL_ADDR 0x0000001C +#define SISLEY_SENSOR_SPARE_CTRL_RO_ADDR_Y_STAT_CTRL_BIT_IDX \ + 0 // readout - 0: no statitizer en Y addresses | 1: statitizer on every Y addresses +#define SISLEY_SENSOR_SPARE_CTRL_RO_ADDR_Y_STAT_CTRL_WIDTH 1 +#define SISLEY_SENSOR_SPARE_CTRL_RO_ADDR_Y_STAT_CTRL_DEFAULT 0x00000000 +#define SISLEY_SENSOR_SPARE_CTRL_RO_ADDR_X_STAT_CTRL_BIT_IDX \ + 1 // readout - 0: no statitizer en X addresses | 1: statitizer on every X addresses +#define SISLEY_SENSOR_SPARE_CTRL_RO_ADDR_X_STAT_CTRL_WIDTH 1 +#define SISLEY_SENSOR_SPARE_CTRL_RO_ADDR_X_STAT_CTRL_DEFAULT 0x00000000 +#define SISLEY_SENSOR_SPARE_CTRL_CLK_OUT_LAT_CTRL_BIT_IDX \ + 2 // Clk factory - + // 00: delay = 0 ps + // 01: delay = 500 ps + // 10: delay = 1 ns + // 11: delay = 2 ns +#define SISLEY_SENSOR_SPARE_CTRL_CLK_OUT_LAT_CTRL_WIDTH 2 +#define SISLEY_SENSOR_SPARE_CTRL_CLK_OUT_LAT_CTRL_DEFAULT 0x00000000 +#define SISLEY_SENSOR_SPARE_CTRL_RFEED_D_CTRL_BIT_IDX \ + 22 // digital biasgen -0: feedback loop of the output opamps are made of a capacitor + // 1: feedback loop of the output opamps are made of a capacitor and a resistor in series +#define SISLEY_SENSOR_SPARE_CTRL_RFEED_D_CTRL_WIDTH 1 +#define SISLEY_SENSOR_SPARE_CTRL_RFEED_D_CTRL_DEFAULT 0x00000000 +#define SISLEY_SENSOR_SPARE_CTRL_RFEED_A_CTRL_BIT_IDX \ + 23 // analog biasgen - 0: feedback loop of the output opamps are made of a capacitor + // 1: feedback loop of the output opamps are made of a capacitor and a resistor in series +#define SISLEY_SENSOR_SPARE_CTRL_RFEED_A_CTRL_WIDTH 1 +#define SISLEY_SENSOR_SPARE_CTRL_RFEED_A_CTRL_DEFAULT 0x00000000 +#define SISLEY_SENSOR_SPARE_CTRL_TP_REFR_CLK_EN_BIT_IDX \ + 24 // test pixel -0: refractory period clock is disabled | 1: refractory period clock is enabled +#define SISLEY_SENSOR_SPARE_CTRL_TP_REFR_CLK_EN_WIDTH 1 +#define SISLEY_SENSOR_SPARE_CTRL_TP_REFR_CLK_EN_DEFAULT 0x00000000 +#define SISLEY_SENSOR_SPARE_CTRL_TP_DARK_EN_BIT_IDX \ + 25 // test pixel -0: pr_out of dark pixel (covered by metal) is disabled | 1: pr_out of dark pixel (covered by + // metal) is enabled +#define SISLEY_SENSOR_SPARE_CTRL_TP_DARK_EN_WIDTH 1 +#define SISLEY_SENSOR_SPARE_CTRL_TP_DARK_EN_DEFAULT 0x00000000 +#define SISLEY_SENSOR_SPARE_CTRL_TP_QE_EN_BIT_IDX \ + 26 // test pixel -0: 3T pixel for QE measurement is disabled | 1: 3T pixel for QE measurement is enabled +#define SISLEY_SENSOR_SPARE_CTRL_TP_QE_EN_WIDTH 1 +#define SISLEY_SENSOR_SPARE_CTRL_TP_QE_EN_DEFAULT 0x00000000 +#define SISLEY_SENSOR_SPARE_CTRL_B_TM_BIT_IDX 29 // CISC PCMs +#define SISLEY_SENSOR_SPARE_CTRL_B_TM_WIDTH 3 +#define SISLEY_SENSOR_SPARE_CTRL_B_TM_DEFAULT 0x00000000 + +//------------------------------------------------------------------------------------------------------------ +// SENSOR - BIAS GENERATOR(REGBANK) +//------------------------------------------------------------------------------------------------------------ + +#define SISLEY_IBGEN_VECTOR_0_ADDR 0x00000100 //'Bias_latchout_or_pu' +#define SISLEY_IBGEN_VECTOR_0_BIAS_VDAC_VAL_BIT_IDX 0 // Voltage DAC value coded on 8 bits +#define SISLEY_IBGEN_VECTOR_0_BIAS_VDAC_VAL_WIDTH 8 +#define SISLEY_IBGEN_VECTOR_0_BIAS_VDAC_VAL_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_0_BIAS_IDAC_VAL_BIT_IDX 8 // Current DAC value coded on 13 bits +#define SISLEY_IBGEN_VECTOR_0_BIAS_IDAC_VAL_WIDTH 13 +#define SISLEY_IBGEN_VECTOR_0_BIAS_IDAC_VAL_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_0_BIAS_INTERNAL_BUFFER_BIT_IDX 21 // Buffer value (coded on 6 bits) +#define SISLEY_IBGEN_VECTOR_0_BIAS_INTERNAL_BUFFER_WIDTH 6 +#define SISLEY_IBGEN_VECTOR_0_BIAS_INTERNAL_BUFFER_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_0_BIAS_TYPE_BIT_IDX \ + 27 // Selects bias mode + // 0: current DAC + // 1: voltage DAC +#define SISLEY_IBGEN_VECTOR_0_BIAS_TYPE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_0_BIAS_TYPE_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_0_BIAS_MODE_BIT_IDX \ + 28 // Selects bias mode + // 0: cascode (shifts DC up for NMOS and down for PMOS) + // 1: normal +#define SISLEY_IBGEN_VECTOR_0_BIAS_MODE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_0_BIAS_MODE_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_0_BIAS_POLARITY_BIT_IDX \ + 29 // Bias polarity of internal buffer + // 0: PMOS + // 1: NMOS +#define SISLEY_IBGEN_VECTOR_0_BIAS_POLARITY_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_0_BIAS_POLARITY_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_0_BIAS_ENABLE_BIT_IDX \ + 30 // Enable for internal biasing + // 0: bias generator disabled + // 1: bias generator enabled +#define SISLEY_IBGEN_VECTOR_0_BIAS_ENABLE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_0_BIAS_ENABLE_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_0_BIAS_PAD_ENABLE_BIT_IDX \ + 31 // Chip pad enable of the bias generator + // 0: pad disconnected + // 1: pad connected +#define SISLEY_IBGEN_VECTOR_0_BIAS_PAD_ENABLE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_0_BIAS_PAD_ENABLE_DEFAULT 0x00000000 + +#define SISLEY_IBGEN_VECTOR_1_ADDR 0x00000104 //'BIAS_REQX_OR_PU' +#define SISLEY_IBGEN_VECTOR_1_BIAS_VDAC_VAL_BIT_IDX 0 // Voltage DAC value coded on 8 bits +#define SISLEY_IBGEN_VECTOR_1_BIAS_VDAC_VAL_WIDTH 8 +#define SISLEY_IBGEN_VECTOR_1_BIAS_VDAC_VAL_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_1_BIAS_IDAC_VAL_BIT_IDX 8 // Current DAC value coded on 13 bits +#define SISLEY_IBGEN_VECTOR_1_BIAS_IDAC_VAL_WIDTH 13 +#define SISLEY_IBGEN_VECTOR_1_BIAS_IDAC_VAL_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_1_BIAS_INTERNAL_BUFFER_BIT_IDX 21 // Buffer value (coded on 6 bits) +#define SISLEY_IBGEN_VECTOR_1_BIAS_INTERNAL_BUFFER_WIDTH 6 +#define SISLEY_IBGEN_VECTOR_1_BIAS_INTERNAL_BUFFER_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_1_BIAS_TYPE_BIT_IDX \ + 27 // Selects bias mode + // 0: current DAC + // 1: voltage DAC +#define SISLEY_IBGEN_VECTOR_1_BIAS_TYPE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_1_BIAS_TYPE_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_1_BIAS_MODE_BIT_IDX \ + 28 // Selects bias mode + // 0: cascode (shifts DC up for NMOS and down for PMOS) + // 1: normal +#define SISLEY_IBGEN_VECTOR_1_BIAS_MODE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_1_BIAS_MODE_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_1_BIAS_POLARITY_BIT_IDX \ + 29 // Bias polarity of internal buffer + // 0: PMOS + // 1: NMOS +#define SISLEY_IBGEN_VECTOR_1_BIAS_POLARITY_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_1_BIAS_POLARITY_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_1_BIAS_ENABLE_BIT_IDX \ + 30 // Enable for internal biasing + // 0: bias generator disabled + // 1: bias generator enabled +#define SISLEY_IBGEN_VECTOR_1_BIAS_ENABLE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_1_BIAS_ENABLE_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_1_BIAS_PAD_ENABLE_BIT_IDX \ + 31 // Chip pad enable of the bias generator + // 0: pad disconnected + // 1: pad connected +#define SISLEY_IBGEN_VECTOR_1_BIAS_PAD_ENABLE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_1_BIAS_PAD_ENABLE_DEFAULT 0x00000000 + +#define SISLEY_IBGEN_VECTOR_2_ADDR 0x00000108 //'BIAS_REQ_PUX' +#define SISLEY_IBGEN_VECTOR_2_BIAS_VDAC_VAL_BIT_IDX 0 // Voltage DAC value coded on 8 bits +#define SISLEY_IBGEN_VECTOR_2_BIAS_VDAC_VAL_WIDTH 8 +#define SISLEY_IBGEN_VECTOR_2_BIAS_VDAC_VAL_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_2_BIAS_IDAC_VAL_BIT_IDX 8 // Current DAC value coded on 13 bits +#define SISLEY_IBGEN_VECTOR_2_BIAS_IDAC_VAL_WIDTH 13 +#define SISLEY_IBGEN_VECTOR_2_BIAS_IDAC_VAL_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_2_BIAS_INTERNAL_BUFFER_BIT_IDX 21 // Buffer value (coded on 6 bits) +#define SISLEY_IBGEN_VECTOR_2_BIAS_INTERNAL_BUFFER_WIDTH 6 +#define SISLEY_IBGEN_VECTOR_2_BIAS_INTERNAL_BUFFER_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_2_BIAS_TYPE_BIT_IDX \ + 27 // Selects bias mode + // 0: current DAC + // 1: voltage DAC +#define SISLEY_IBGEN_VECTOR_2_BIAS_TYPE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_2_BIAS_TYPE_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_2_BIAS_MODE_BIT_IDX \ + 28 // Selects bias mode + // 0: cascode (shifts DC up for NMOS and down for PMOS) + // 1: normal +#define SISLEY_IBGEN_VECTOR_2_BIAS_MODE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_2_BIAS_MODE_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_2_BIAS_POLARITY_BIT_IDX \ + 29 // Bias polarity of internal buffer + // 0: PMOS + // 1: NMOS +#define SISLEY_IBGEN_VECTOR_2_BIAS_POLARITY_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_2_BIAS_POLARITY_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_2_BIAS_ENABLE_BIT_IDX \ + 30 // Enable for internal biasing + // 0: bias generator disabled + // 1: bias generator enabled +#define SISLEY_IBGEN_VECTOR_2_BIAS_ENABLE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_2_BIAS_ENABLE_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_2_BIAS_PAD_ENABLE_BIT_IDX \ + 31 // Chip pad enable of the bias generator + // 0: pad disconnected + // 1: pad connected +#define SISLEY_IBGEN_VECTOR_2_BIAS_PAD_ENABLE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_2_BIAS_PAD_ENABLE_DEFAULT 0x00000000 + +#define SISLEY_IBGEN_VECTOR_3_ADDR 0x0000010C //'BIAS_REQ_PUY' +#define SISLEY_IBGEN_VECTOR_3_BIAS_VDAC_VAL_BIT_IDX 0 // Voltage DAC value coded on 8 bits +#define SISLEY_IBGEN_VECTOR_3_BIAS_VDAC_VAL_WIDTH 8 +#define SISLEY_IBGEN_VECTOR_3_BIAS_VDAC_VAL_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_3_BIAS_IDAC_VAL_BIT_IDX 8 // Current DAC value coded on 13 bits +#define SISLEY_IBGEN_VECTOR_3_BIAS_IDAC_VAL_WIDTH 13 +#define SISLEY_IBGEN_VECTOR_3_BIAS_IDAC_VAL_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_3_BIAS_INTERNAL_BUFFER_BIT_IDX 21 // Buffer value (coded on 6 bits) +#define SISLEY_IBGEN_VECTOR_3_BIAS_INTERNAL_BUFFER_WIDTH 6 +#define SISLEY_IBGEN_VECTOR_3_BIAS_INTERNAL_BUFFER_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_3_BIAS_TYPE_BIT_IDX \ + 27 // Selects bias mode + // 0: current DAC + // 1: voltage DAC +#define SISLEY_IBGEN_VECTOR_3_BIAS_TYPE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_3_BIAS_TYPE_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_3_BIAS_MODE_BIT_IDX \ + 28 // Selects bias mode + // 0: cascode (shifts DC up for NMOS and down for PMOS) + // 1: normal +#define SISLEY_IBGEN_VECTOR_3_BIAS_MODE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_3_BIAS_MODE_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_3_BIAS_POLARITY_BIT_IDX \ + 29 // Bias polarity of internal buffer + // 0: PMOS + // 1: NMOS +#define SISLEY_IBGEN_VECTOR_3_BIAS_POLARITY_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_3_BIAS_POLARITY_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_3_BIAS_ENABLE_BIT_IDX \ + 30 // Enable for internal biasing + // 0: bias generator disabled + // 1: bias generator enabled +#define SISLEY_IBGEN_VECTOR_3_BIAS_ENABLE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_3_BIAS_ENABLE_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_3_BIAS_PAD_ENABLE_BIT_IDX \ + 31 // Chip pad enable of the bias generator + // 0: pad disconnected + // 1: pad connected +#define SISLEY_IBGEN_VECTOR_3_BIAS_PAD_ENABLE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_3_BIAS_PAD_ENABLE_DEFAULT 0x00000000 + +#define SISLEY_IBGEN_VECTOR_4_ADDR 0x00000110 //'BIAS_DEL_REQX_OR' +#define SISLEY_IBGEN_VECTOR_4_BIAS_VDAC_VAL_BIT_IDX 0 // Voltage DAC value coded on 8 bits +#define SISLEY_IBGEN_VECTOR_4_BIAS_VDAC_VAL_WIDTH 8 +#define SISLEY_IBGEN_VECTOR_4_BIAS_VDAC_VAL_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_4_BIAS_IDAC_VAL_BIT_IDX 8 // Current DAC value coded on 13 bits +#define SISLEY_IBGEN_VECTOR_4_BIAS_IDAC_VAL_WIDTH 13 +#define SISLEY_IBGEN_VECTOR_4_BIAS_IDAC_VAL_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_4_BIAS_INTERNAL_BUFFER_BIT_IDX 21 // Buffer value (coded on 6 bits) +#define SISLEY_IBGEN_VECTOR_4_BIAS_INTERNAL_BUFFER_WIDTH 6 +#define SISLEY_IBGEN_VECTOR_4_BIAS_INTERNAL_BUFFER_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_4_BIAS_TYPE_BIT_IDX \ + 27 // Selects bias mode + // 0: current DAC + // 1: voltage DAC +#define SISLEY_IBGEN_VECTOR_4_BIAS_TYPE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_4_BIAS_TYPE_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_4_BIAS_MODE_BIT_IDX \ + 28 // Selects bias mode + // 0: cascode (shifts DC up for NMOS and down for PMOS) + // 1: normal +#define SISLEY_IBGEN_VECTOR_4_BIAS_MODE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_4_BIAS_MODE_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_4_BIAS_POLARITY_BIT_IDX \ + 29 // Bias polarity of internal buffer + // 0: PMOS + // 1: NMOS +#define SISLEY_IBGEN_VECTOR_4_BIAS_POLARITY_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_4_BIAS_POLARITY_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_4_BIAS_ENABLE_BIT_IDX \ + 30 // Enable for internal biasing + // 0: bias generator disabled + // 1: bias generator enabled +#define SISLEY_IBGEN_VECTOR_4_BIAS_ENABLE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_4_BIAS_ENABLE_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_4_BIAS_PAD_ENABLE_BIT_IDX \ + 31 // Chip pad enable of the bias generator + // 0: pad disconnected + // 1: pad connected +#define SISLEY_IBGEN_VECTOR_4_BIAS_PAD_ENABLE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_4_BIAS_PAD_ENABLE_DEFAULT 0x00000000 + +#define SISLEY_IBGEN_VECTOR_5_ADDR 0x00000114 //'BIAS_SENDREQ_PDX' +#define SISLEY_IBGEN_VECTOR_5_BIAS_VDAC_VAL_BIT_IDX 0 // Voltage DAC value coded on 8 bits +#define SISLEY_IBGEN_VECTOR_5_BIAS_VDAC_VAL_WIDTH 8 +#define SISLEY_IBGEN_VECTOR_5_BIAS_VDAC_VAL_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_5_BIAS_IDAC_VAL_BIT_IDX 8 // Current DAC value coded on 13 bits +#define SISLEY_IBGEN_VECTOR_5_BIAS_IDAC_VAL_WIDTH 13 +#define SISLEY_IBGEN_VECTOR_5_BIAS_IDAC_VAL_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_5_BIAS_INTERNAL_BUFFER_BIT_IDX 21 // Buffer value (coded on 6 bits) +#define SISLEY_IBGEN_VECTOR_5_BIAS_INTERNAL_BUFFER_WIDTH 6 +#define SISLEY_IBGEN_VECTOR_5_BIAS_INTERNAL_BUFFER_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_5_BIAS_TYPE_BIT_IDX \ + 27 // Selects bias mode + // 0: current DAC + // 1: voltage DAC +#define SISLEY_IBGEN_VECTOR_5_BIAS_TYPE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_5_BIAS_TYPE_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_5_BIAS_MODE_BIT_IDX \ + 28 // Selects bias mode + // 0: cascode (shifts DC up for NMOS and down for PMOS) + // 1: normal +#define SISLEY_IBGEN_VECTOR_5_BIAS_MODE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_5_BIAS_MODE_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_5_BIAS_POLARITY_BIT_IDX \ + 29 // Bias polarity of internal buffer + // 0: PMOS + // 1: NMOS +#define SISLEY_IBGEN_VECTOR_5_BIAS_POLARITY_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_5_BIAS_POLARITY_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_5_BIAS_ENABLE_BIT_IDX \ + 30 // Enable for internal biasing + // 0: bias generator disabled + // 1: bias generator enabled +#define SISLEY_IBGEN_VECTOR_5_BIAS_ENABLE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_5_BIAS_ENABLE_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_5_BIAS_PAD_ENABLE_BIT_IDX \ + 31 // Chip pad enable of the bias generator + // 0: pad disconnected + // 1: pad connected +#define SISLEY_IBGEN_VECTOR_5_BIAS_PAD_ENABLE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_5_BIAS_PAD_ENABLE_DEFAULT 0x00000000 + +#define SISLEY_IBGEN_VECTOR_6_ADDR 0x00000118 //'BIAS_SENDREQ_PDY' +#define SISLEY_IBGEN_VECTOR_6_BIAS_VDAC_VAL_BIT_IDX 0 // Voltage DAC value coded on 8 bits +#define SISLEY_IBGEN_VECTOR_6_BIAS_VDAC_VAL_WIDTH 8 +#define SISLEY_IBGEN_VECTOR_6_BIAS_VDAC_VAL_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_6_BIAS_IDAC_VAL_BIT_IDX 8 // Current DAC value coded on 13 bits +#define SISLEY_IBGEN_VECTOR_6_BIAS_IDAC_VAL_WIDTH 13 +#define SISLEY_IBGEN_VECTOR_6_BIAS_IDAC_VAL_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_6_BIAS_INTERNAL_BUFFER_BIT_IDX 21 // Buffer value (coded on 6 bits) +#define SISLEY_IBGEN_VECTOR_6_BIAS_INTERNAL_BUFFER_WIDTH 6 +#define SISLEY_IBGEN_VECTOR_6_BIAS_INTERNAL_BUFFER_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_6_BIAS_TYPE_BIT_IDX \ + 27 // Selects bias mode + // 0: current DAC + // 1: voltage DAC +#define SISLEY_IBGEN_VECTOR_6_BIAS_TYPE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_6_BIAS_TYPE_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_6_BIAS_MODE_BIT_IDX \ + 28 // Selects bias mode + // 0: cascode (shifts DC up for NMOS and down for PMOS) + // 1: normal +#define SISLEY_IBGEN_VECTOR_6_BIAS_MODE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_6_BIAS_MODE_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_6_BIAS_POLARITY_BIT_IDX \ + 29 // Bias polarity of internal buffer + // 0: PMOS + // 1: NMOS +#define SISLEY_IBGEN_VECTOR_6_BIAS_POLARITY_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_6_BIAS_POLARITY_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_6_BIAS_ENABLE_BIT_IDX \ + 30 // Enable for internal biasing + // 0: bias generator disabled + // 1: bias generator enabled +#define SISLEY_IBGEN_VECTOR_6_BIAS_ENABLE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_6_BIAS_ENABLE_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_6_BIAS_PAD_ENABLE_BIT_IDX \ + 31 // Chip pad enable of the bias generator + // 0: pad disconnected + // 1: pad connected +#define SISLEY_IBGEN_VECTOR_6_BIAS_PAD_ENABLE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_6_BIAS_PAD_ENABLE_DEFAULT 0x00000000 + +#define SISLEY_IBGEN_VECTOR_7_ADDR 0x0000011C //'BIAS_DEL_ACK_ARRAY' +#define SISLEY_IBGEN_VECTOR_7_BIAS_VDAC_VAL_BIT_IDX 0 // Voltage DAC value coded on 8 bits +#define SISLEY_IBGEN_VECTOR_7_BIAS_VDAC_VAL_WIDTH 8 +#define SISLEY_IBGEN_VECTOR_7_BIAS_VDAC_VAL_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_7_BIAS_IDAC_VAL_BIT_IDX 8 // Current DAC value coded on 13 bits +#define SISLEY_IBGEN_VECTOR_7_BIAS_IDAC_VAL_WIDTH 13 +#define SISLEY_IBGEN_VECTOR_7_BIAS_IDAC_VAL_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_7_BIAS_INTERNAL_BUFFER_BIT_IDX 21 // Buffer value (coded on 6 bits) +#define SISLEY_IBGEN_VECTOR_7_BIAS_INTERNAL_BUFFER_WIDTH 6 +#define SISLEY_IBGEN_VECTOR_7_BIAS_INTERNAL_BUFFER_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_7_BIAS_TYPE_BIT_IDX \ + 27 // Selects bias mode + // 0: current DAC + // 1: voltage DAC +#define SISLEY_IBGEN_VECTOR_7_BIAS_TYPE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_7_BIAS_TYPE_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_7_BIAS_MODE_BIT_IDX \ + 28 // Selects bias mode + // 0: cascode (shifts DC up for NMOS and down for PMOS) + // 1: normal +#define SISLEY_IBGEN_VECTOR_7_BIAS_MODE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_7_BIAS_MODE_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_7_BIAS_POLARITY_BIT_IDX \ + 29 // Bias polarity of internal buffer + // 0: PMOS + // 1: NMOS +#define SISLEY_IBGEN_VECTOR_7_BIAS_POLARITY_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_7_BIAS_POLARITY_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_7_BIAS_ENABLE_BIT_IDX \ + 30 // Enable for internal biasing + // 0: bias generator disabled + // 1: bias generator enabled +#define SISLEY_IBGEN_VECTOR_7_BIAS_ENABLE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_7_BIAS_ENABLE_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_7_BIAS_PAD_ENABLE_BIT_IDX \ + 31 // Chip pad enable of the bias generator + // 0: pad disconnected + // 1: pad connected +#define SISLEY_IBGEN_VECTOR_7_BIAS_PAD_ENABLE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_7_BIAS_PAD_ENABLE_DEFAULT 0x00000000 + +#define SISLEY_IBGEN_VECTOR_8_ADDR 0x00000120 //'BIAS_DEL_TIMEOUT' +#define SISLEY_IBGEN_VECTOR_8_BIAS_VDAC_VAL_BIT_IDX 0 // Voltage DAC value coded on 8 bits +#define SISLEY_IBGEN_VECTOR_8_BIAS_VDAC_VAL_WIDTH 8 +#define SISLEY_IBGEN_VECTOR_8_BIAS_VDAC_VAL_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_8_BIAS_IDAC_VAL_BIT_IDX 8 // Current DAC value coded on 13 bits +#define SISLEY_IBGEN_VECTOR_8_BIAS_IDAC_VAL_WIDTH 13 +#define SISLEY_IBGEN_VECTOR_8_BIAS_IDAC_VAL_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_8_BIAS_INTERNAL_BUFFER_BIT_IDX 21 // Buffer value (coded on 6 bits) +#define SISLEY_IBGEN_VECTOR_8_BIAS_INTERNAL_BUFFER_WIDTH 6 +#define SISLEY_IBGEN_VECTOR_8_BIAS_INTERNAL_BUFFER_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_8_BIAS_TYPE_BIT_IDX \ + 27 // Selects bias mode + // 0: current DAC + // 1: voltage DAC +#define SISLEY_IBGEN_VECTOR_8_BIAS_TYPE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_8_BIAS_TYPE_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_8_BIAS_MODE_BIT_IDX \ + 28 // Selects bias mode + // 0: cascode (shifts DC up for NMOS and down for PMOS) + // 1: normal +#define SISLEY_IBGEN_VECTOR_8_BIAS_MODE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_8_BIAS_MODE_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_8_BIAS_POLARITY_BIT_IDX \ + 29 // Bias polarity of internal buffer + // 0: PMOS + // 1: NMOS +#define SISLEY_IBGEN_VECTOR_8_BIAS_POLARITY_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_8_BIAS_POLARITY_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_8_BIAS_ENABLE_BIT_IDX \ + 30 // Enable for internal biasing + // 0: bias generator disabled + // 1: bias generator enabled +#define SISLEY_IBGEN_VECTOR_8_BIAS_ENABLE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_8_BIAS_ENABLE_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_8_BIAS_PAD_ENABLE_BIT_IDX \ + 31 // Chip pad enable of the bias generator + // 0: pad disconnected + // 1: pad connected +#define SISLEY_IBGEN_VECTOR_8_BIAS_PAD_ENABLE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_8_BIAS_PAD_ENABLE_DEFAULT 0x00000000 + +#define SISLEY_IBGEN_VECTOR_9_ADDR 0x00000124 //'BIAS_INV' +#define SISLEY_IBGEN_VECTOR_9_BIAS_VDAC_VAL_BIT_IDX 0 // Voltage DAC value coded on 8 bits +#define SISLEY_IBGEN_VECTOR_9_BIAS_VDAC_VAL_WIDTH 8 +#define SISLEY_IBGEN_VECTOR_9_BIAS_VDAC_VAL_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_9_BIAS_IDAC_VAL_BIT_IDX 8 // Current DAC value coded on 13 bits +#define SISLEY_IBGEN_VECTOR_9_BIAS_IDAC_VAL_WIDTH 13 +#define SISLEY_IBGEN_VECTOR_9_BIAS_IDAC_VAL_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_9_BIAS_INTERNAL_BUFFER_BIT_IDX 21 // Buffer value (coded on 6 bits) +#define SISLEY_IBGEN_VECTOR_9_BIAS_INTERNAL_BUFFER_WIDTH 6 +#define SISLEY_IBGEN_VECTOR_9_BIAS_INTERNAL_BUFFER_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_9_BIAS_TYPE_BIT_IDX \ + 27 // Selects bias mode + // 0: current DAC + // 1: voltage DAC +#define SISLEY_IBGEN_VECTOR_9_BIAS_TYPE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_9_BIAS_TYPE_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_9_BIAS_MODE_BIT_IDX \ + 28 // Selects bias mode + // 0: cascode (shifts DC up for NMOS and down for PMOS) + // 1: normal +#define SISLEY_IBGEN_VECTOR_9_BIAS_MODE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_9_BIAS_MODE_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_9_BIAS_POLARITY_BIT_IDX \ + 29 // Bias polarity of internal buffer + // 0: PMOS + // 1: NMOS +#define SISLEY_IBGEN_VECTOR_9_BIAS_POLARITY_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_9_BIAS_POLARITY_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_9_BIAS_ENABLE_BIT_IDX \ + 30 // Enable for internal biasing + // 0: bias generator disabled + // 1: bias generator enabled +#define SISLEY_IBGEN_VECTOR_9_BIAS_ENABLE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_9_BIAS_ENABLE_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_9_BIAS_PAD_ENABLE_BIT_IDX \ + 31 // Chip pad enable of the bias generator + // 0: pad disconnected + // 1: pad connected +#define SISLEY_IBGEN_VECTOR_9_BIAS_PAD_ENABLE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_9_BIAS_PAD_ENABLE_DEFAULT 0x00000000 + +#define SISLEY_IBGEN_VECTOR_10_ADDR 0x00000128 //'BIAS_REFR' +#define SISLEY_IBGEN_VECTOR_10_BIAS_VDAC_VAL_BIT_IDX 0 // Voltage DAC value coded on 8 bits +#define SISLEY_IBGEN_VECTOR_10_BIAS_VDAC_VAL_WIDTH 8 +#define SISLEY_IBGEN_VECTOR_10_BIAS_VDAC_VAL_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_10_BIAS_IDAC_VAL_BIT_IDX 8 // Current DAC value coded on 13 bits +#define SISLEY_IBGEN_VECTOR_10_BIAS_IDAC_VAL_WIDTH 13 +#define SISLEY_IBGEN_VECTOR_10_BIAS_IDAC_VAL_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_10_BIAS_INTERNAL_BUFFER_BIT_IDX 21 // Buffer value (coded on 6 bits) +#define SISLEY_IBGEN_VECTOR_10_BIAS_INTERNAL_BUFFER_WIDTH 6 +#define SISLEY_IBGEN_VECTOR_10_BIAS_INTERNAL_BUFFER_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_10_BIAS_TYPE_BIT_IDX \ + 27 // Selects bias mode + // 0: current DAC + // 1: voltage DAC +#define SISLEY_IBGEN_VECTOR_10_BIAS_TYPE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_10_BIAS_TYPE_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_10_BIAS_MODE_BIT_IDX \ + 28 // Selects bias mode + // 0: cascode (shifts DC up for NMOS and down for PMOS) + // 1: normal +#define SISLEY_IBGEN_VECTOR_10_BIAS_MODE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_10_BIAS_MODE_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_10_BIAS_POLARITY_BIT_IDX \ + 29 // Bias polarity of internal buffer + // 0: PMOS + // 1: NMOS +#define SISLEY_IBGEN_VECTOR_10_BIAS_POLARITY_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_10_BIAS_POLARITY_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_10_BIAS_ENABLE_BIT_IDX \ + 30 // Enable for internal biasing + // 0: bias generator disabled + // 1: bias generator enabled +#define SISLEY_IBGEN_VECTOR_10_BIAS_ENABLE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_10_BIAS_ENABLE_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_10_BIAS_PAD_ENABLE_BIT_IDX \ + 31 // Chip pad enable of the bias generator + // 0: pad disconnected + // 1: pad connected +#define SISLEY_IBGEN_VECTOR_10_BIAS_PAD_ENABLE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_10_BIAS_PAD_ENABLE_DEFAULT 0x00000000 + +#define SISLEY_IBGEN_VECTOR_11_ADDR 0x0000012C //'BIAS_CLK' +#define SISLEY_IBGEN_VECTOR_11_BIAS_VDAC_VAL_BIT_IDX 0 // Voltage DAC value coded on 8 bits +#define SISLEY_IBGEN_VECTOR_11_BIAS_VDAC_VAL_WIDTH 8 +#define SISLEY_IBGEN_VECTOR_11_BIAS_VDAC_VAL_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_11_BIAS_IDAC_VAL_BIT_IDX 8 // Current DAC value coded on 13 bits +#define SISLEY_IBGEN_VECTOR_11_BIAS_IDAC_VAL_WIDTH 13 +#define SISLEY_IBGEN_VECTOR_11_BIAS_IDAC_VAL_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_11_BIAS_INTERNAL_BUFFER_BIT_IDX 21 // Buffer value (coded on 6 bits) +#define SISLEY_IBGEN_VECTOR_11_BIAS_INTERNAL_BUFFER_WIDTH 6 +#define SISLEY_IBGEN_VECTOR_11_BIAS_INTERNAL_BUFFER_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_11_BIAS_TYPE_BIT_IDX \ + 27 // Selects bias mode + // 0: current DAC + // 1: voltage DAC +#define SISLEY_IBGEN_VECTOR_11_BIAS_TYPE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_11_BIAS_TYPE_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_11_BIAS_MODE_BIT_IDX \ + 28 // Selects bias mode + // 0: cascode (shifts DC up for NMOS and down for PMOS) + // 1: normal +#define SISLEY_IBGEN_VECTOR_11_BIAS_MODE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_11_BIAS_MODE_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_11_BIAS_POLARITY_BIT_IDX \ + 29 // Bias polarity of internal buffer + // 0: PMOS + // 1: NMOS +#define SISLEY_IBGEN_VECTOR_11_BIAS_POLARITY_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_11_BIAS_POLARITY_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_11_BIAS_ENABLE_BIT_IDX \ + 30 // Enable for internal biasing + // 0: bias generator disabled + // 1: bias generator enabled +#define SISLEY_IBGEN_VECTOR_11_BIAS_ENABLE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_11_BIAS_ENABLE_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_11_BIAS_PAD_ENABLE_BIT_IDX \ + 31 // Chip pad enable of the bias generator + // 0: pad disconnected + // 1: pad connected +#define SISLEY_IBGEN_VECTOR_11_BIAS_PAD_ENABLE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_11_BIAS_PAD_ENABLE_DEFAULT 0x00000000 + +#define SISLEY_IBGEN_VECTOR_18_ADDR 0x00000148 //'BIAS_CAS' +#define SISLEY_IBGEN_VECTOR_18_BIAS_VDAC_VAL_BIT_IDX 0 // Voltage DAC value coded on 8 bits +#define SISLEY_IBGEN_VECTOR_18_BIAS_VDAC_VAL_WIDTH 8 +#define SISLEY_IBGEN_VECTOR_18_BIAS_VDAC_VAL_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_18_BIAS_IDAC_VAL_BIT_IDX 8 // Current DAC value coded on 13 bits +#define SISLEY_IBGEN_VECTOR_18_BIAS_IDAC_VAL_WIDTH 13 +#define SISLEY_IBGEN_VECTOR_18_BIAS_IDAC_VAL_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_18_BIAS_INTERNAL_BUFFER_BIT_IDX 21 // Buffer value (coded on 6 bits) +#define SISLEY_IBGEN_VECTOR_18_BIAS_INTERNAL_BUFFER_WIDTH 6 +#define SISLEY_IBGEN_VECTOR_18_BIAS_INTERNAL_BUFFER_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_18_BIAS_TYPE_BIT_IDX \ + 27 // Selects bias mode + // 0: current DAC + // 1: voltage DAC +#define SISLEY_IBGEN_VECTOR_18_BIAS_TYPE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_18_BIAS_TYPE_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_18_BIAS_MODE_BIT_IDX \ + 28 // Selects bias mode + // 0: cascode (shifts DC up for NMOS and down for PMOS) + // 1: normal +#define SISLEY_IBGEN_VECTOR_18_BIAS_MODE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_18_BIAS_MODE_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_18_BIAS_POLARITY_BIT_IDX \ + 29 // Bias polarity of internal buffer + // 0: PMOS + // 1: NMOS +#define SISLEY_IBGEN_VECTOR_18_BIAS_POLARITY_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_18_BIAS_POLARITY_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_18_BIAS_ENABLE_BIT_IDX \ + 30 // Enable for internal biasing + // 0: bias generator disabled + // 1: bias generator enabled +#define SISLEY_IBGEN_VECTOR_18_BIAS_ENABLE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_18_BIAS_ENABLE_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_18_BIAS_PAD_ENABLE_BIT_IDX \ + 31 // Chip pad enable of the bias generator + // 0: pad disconnected + // 1: pad connected +#define SISLEY_IBGEN_VECTOR_18_BIAS_PAD_ENABLE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_18_BIAS_PAD_ENABLE_DEFAULT 0x00000000 + +#define SISLEY_IBGEN_VECTOR_19_ADDR 0x0000014C //'BIAS_DIFF_OFF' +#define SISLEY_IBGEN_VECTOR_19_BIAS_VDAC_VAL_BIT_IDX 0 // Voltage DAC value coded on 8 bits +#define SISLEY_IBGEN_VECTOR_19_BIAS_VDAC_VAL_WIDTH 8 +#define SISLEY_IBGEN_VECTOR_19_BIAS_VDAC_VAL_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_19_BIAS_IDAC_VAL_BIT_IDX 8 // Current DAC value coded on 13 bits +#define SISLEY_IBGEN_VECTOR_19_BIAS_IDAC_VAL_WIDTH 13 +#define SISLEY_IBGEN_VECTOR_19_BIAS_IDAC_VAL_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_19_BIAS_INTERNAL_BUFFER_BIT_IDX 21 // Buffer value (coded on 6 bits) +#define SISLEY_IBGEN_VECTOR_19_BIAS_INTERNAL_BUFFER_WIDTH 6 +#define SISLEY_IBGEN_VECTOR_19_BIAS_INTERNAL_BUFFER_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_19_BIAS_TYPE_BIT_IDX \ + 27 // Selects bias mode + // 0: current DAC + // 1: voltage DAC +#define SISLEY_IBGEN_VECTOR_19_BIAS_TYPE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_19_BIAS_TYPE_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_19_BIAS_MODE_BIT_IDX \ + 28 // Selects bias mode + // 0: cascode (shifts DC up for NMOS and down for PMOS) + // 1: normal +#define SISLEY_IBGEN_VECTOR_19_BIAS_MODE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_19_BIAS_MODE_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_19_BIAS_POLARITY_BIT_IDX \ + 29 // Bias polarity of internal buffer + // 0: PMOS + // 1: NMOS +#define SISLEY_IBGEN_VECTOR_19_BIAS_POLARITY_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_19_BIAS_POLARITY_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_19_BIAS_ENABLE_BIT_IDX \ + 30 // Enable for internal biasing + // 0: bias generator disabled + // 1: bias generator enabled +#define SISLEY_IBGEN_VECTOR_19_BIAS_ENABLE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_19_BIAS_ENABLE_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_19_BIAS_PAD_ENABLE_BIT_IDX \ + 31 // Chip pad enable of the bias generator + // 0: pad disconnected + // 1: pad connected +#define SISLEY_IBGEN_VECTOR_19_BIAS_PAD_ENABLE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_19_BIAS_PAD_ENABLE_DEFAULT 0x00000000 + +#define SISLEY_IBGEN_VECTOR_20_ADDR 0x00000150 //'BIAS_DIFF_ON' +#define SISLEY_IBGEN_VECTOR_20_BIAS_VDAC_VAL_BIT_IDX 0 // Voltage DAC value coded on 8 bits +#define SISLEY_IBGEN_VECTOR_20_BIAS_VDAC_VAL_WIDTH 8 +#define SISLEY_IBGEN_VECTOR_20_BIAS_VDAC_VAL_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_20_BIAS_IDAC_VAL_BIT_IDX 8 // Current DAC value coded on 13 bits +#define SISLEY_IBGEN_VECTOR_20_BIAS_IDAC_VAL_WIDTH 13 +#define SISLEY_IBGEN_VECTOR_20_BIAS_IDAC_VAL_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_20_BIAS_INTERNAL_BUFFER_BIT_IDX 21 // Buffer value (coded on 6 bits) +#define SISLEY_IBGEN_VECTOR_20_BIAS_INTERNAL_BUFFER_WIDTH 6 +#define SISLEY_IBGEN_VECTOR_20_BIAS_INTERNAL_BUFFER_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_20_BIAS_TYPE_BIT_IDX \ + 27 // Selects bias mode + // 0: current DAC + // 1: voltage DAC +#define SISLEY_IBGEN_VECTOR_20_BIAS_TYPE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_20_BIAS_TYPE_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_20_BIAS_MODE_BIT_IDX \ + 28 // Selects bias mode + // 0: cascode (shifts DC up for NMOS and down for PMOS) + // 1: normal +#define SISLEY_IBGEN_VECTOR_20_BIAS_MODE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_20_BIAS_MODE_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_20_BIAS_POLARITY_BIT_IDX \ + 29 // Bias polarity of internal buffer + // 0: PMOS + // 1: NMOS +#define SISLEY_IBGEN_VECTOR_20_BIAS_POLARITY_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_20_BIAS_POLARITY_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_20_BIAS_ENABLE_BIT_IDX \ + 30 // Enable for internal biasing + // 0: bias generator disabled + // 1: bias generator enabled +#define SISLEY_IBGEN_VECTOR_20_BIAS_ENABLE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_20_BIAS_ENABLE_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_20_BIAS_PAD_ENABLE_BIT_IDX \ + 31 // Chip pad enable of the bias generator + // 0: pad disconnected + // 1: pad connected +#define SISLEY_IBGEN_VECTOR_20_BIAS_PAD_ENABLE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_20_BIAS_PAD_ENABLE_DEFAULT 0x00000000 + +#define SISLEY_IBGEN_VECTOR_21_ADDR 0x00000154 //'BIAS_DIFF' +#define SISLEY_IBGEN_VECTOR_21_BIAS_VDAC_VAL_BIT_IDX 0 // Voltage DAC value coded on 8 bits +#define SISLEY_IBGEN_VECTOR_21_BIAS_VDAC_VAL_WIDTH 8 +#define SISLEY_IBGEN_VECTOR_21_BIAS_VDAC_VAL_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_21_BIAS_IDAC_VAL_BIT_IDX 8 // Current DAC value coded on 13 bits +#define SISLEY_IBGEN_VECTOR_21_BIAS_IDAC_VAL_WIDTH 13 +#define SISLEY_IBGEN_VECTOR_21_BIAS_IDAC_VAL_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_21_BIAS_INTERNAL_BUFFER_BIT_IDX 21 // Buffer value (coded on 6 bits) +#define SISLEY_IBGEN_VECTOR_21_BIAS_INTERNAL_BUFFER_WIDTH 6 +#define SISLEY_IBGEN_VECTOR_21_BIAS_INTERNAL_BUFFER_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_21_BIAS_TYPE_BIT_IDX \ + 27 // Selects bias mode + // 0: current DAC + // 1: voltage DAC +#define SISLEY_IBGEN_VECTOR_21_BIAS_TYPE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_21_BIAS_TYPE_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_21_BIAS_MODE_BIT_IDX \ + 28 // Selects bias mode + // 0: cascode (shifts DC up for NMOS and down for PMOS) + // 1: normal +#define SISLEY_IBGEN_VECTOR_21_BIAS_MODE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_21_BIAS_MODE_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_21_BIAS_POLARITY_BIT_IDX \ + 29 // Bias polarity of internal buffer + // 0: PMOS + // 1: NMOS +#define SISLEY_IBGEN_VECTOR_21_BIAS_POLARITY_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_21_BIAS_POLARITY_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_21_BIAS_ENABLE_BIT_IDX \ + 30 // Enable for internal biasing + // 0: bias generator disabled + // 1: bias generator enabled +#define SISLEY_IBGEN_VECTOR_21_BIAS_ENABLE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_21_BIAS_ENABLE_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_21_BIAS_PAD_ENABLE_BIT_IDX \ + 31 // Chip pad enable of the bias generator + // 0: pad disconnected + // 1: pad connected +#define SISLEY_IBGEN_VECTOR_21_BIAS_PAD_ENABLE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_21_BIAS_PAD_ENABLE_DEFAULT 0x00000000 + +#define SISLEY_IBGEN_VECTOR_22_ADDR 0x00000158 //'BIAS_FO' +#define SISLEY_IBGEN_VECTOR_22_BIAS_VDAC_VAL_BIT_IDX 0 // Voltage DAC value coded on 8 bits +#define SISLEY_IBGEN_VECTOR_22_BIAS_VDAC_VAL_WIDTH 8 +#define SISLEY_IBGEN_VECTOR_22_BIAS_VDAC_VAL_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_22_BIAS_IDAC_VAL_BIT_IDX 8 // Current DAC value coded on 13 bits +#define SISLEY_IBGEN_VECTOR_22_BIAS_IDAC_VAL_WIDTH 13 +#define SISLEY_IBGEN_VECTOR_22_BIAS_IDAC_VAL_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_22_BIAS_INTERNAL_BUFFER_BIT_IDX 21 // Buffer value (coded on 6 bits) +#define SISLEY_IBGEN_VECTOR_22_BIAS_INTERNAL_BUFFER_WIDTH 6 +#define SISLEY_IBGEN_VECTOR_22_BIAS_INTERNAL_BUFFER_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_22_BIAS_TYPE_BIT_IDX \ + 27 // Selects bias mode + // 0: current DAC + // 1: voltage DAC +#define SISLEY_IBGEN_VECTOR_22_BIAS_TYPE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_22_BIAS_TYPE_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_22_BIAS_MODE_BIT_IDX \ + 28 // Selects bias mode + // 0: cascode (shifts DC up for NMOS and down for PMOS) + // 1: normal +#define SISLEY_IBGEN_VECTOR_22_BIAS_MODE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_22_BIAS_MODE_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_22_BIAS_POLARITY_BIT_IDX \ + 29 // Bias polarity of internal buffer + // 0: PMOS + // 1: NMOS +#define SISLEY_IBGEN_VECTOR_22_BIAS_POLARITY_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_22_BIAS_POLARITY_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_22_BIAS_ENABLE_BIT_IDX \ + 30 // Enable for internal biasing + // 0: bias generator disabled + // 1: bias generator enabled +#define SISLEY_IBGEN_VECTOR_22_BIAS_ENABLE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_22_BIAS_ENABLE_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_22_BIAS_PAD_ENABLE_BIT_IDX \ + 31 // Chip pad enable of the bias generator + // 0: pad disconnected + // 1: pad connected +#define SISLEY_IBGEN_VECTOR_22_BIAS_PAD_ENABLE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_22_BIAS_PAD_ENABLE_DEFAULT 0x00000000 + +#define SISLEY_IBGEN_VECTOR_23_ADDR 0x0000015C //'BIAS_PR' +#define SISLEY_IBGEN_VECTOR_23_BIAS_VDAC_VAL_BIT_IDX 0 // Voltage DAC value coded on 8 bits +#define SISLEY_IBGEN_VECTOR_23_BIAS_VDAC_VAL_WIDTH 8 +#define SISLEY_IBGEN_VECTOR_23_BIAS_VDAC_VAL_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_23_BIAS_IDAC_VAL_BIT_IDX 8 // Current DAC value coded on 13 bits +#define SISLEY_IBGEN_VECTOR_23_BIAS_IDAC_VAL_WIDTH 13 +#define SISLEY_IBGEN_VECTOR_23_BIAS_IDAC_VAL_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_23_BIAS_INTERNAL_BUFFER_BIT_IDX 21 // Buffer value (coded on 6 bits) +#define SISLEY_IBGEN_VECTOR_23_BIAS_INTERNAL_BUFFER_WIDTH 6 +#define SISLEY_IBGEN_VECTOR_23_BIAS_INTERNAL_BUFFER_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_23_BIAS_TYPE_BIT_IDX \ + 27 // Selects bias mode + // 0: current DAC + // 1: voltage DAC +#define SISLEY_IBGEN_VECTOR_23_BIAS_TYPE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_23_BIAS_TYPE_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_23_BIAS_MODE_BIT_IDX \ + 28 // Selects bias mode + // 0: cascode (shifts DC up for NMOS and down for PMOS) + // 1: normal +#define SISLEY_IBGEN_VECTOR_23_BIAS_MODE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_23_BIAS_MODE_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_23_BIAS_POLARITY_BIT_IDX \ + 29 // Bias polarity of internal buffer + // 0: PMOS + // 1: NMOS +#define SISLEY_IBGEN_VECTOR_23_BIAS_POLARITY_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_23_BIAS_POLARITY_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_23_BIAS_ENABLE_BIT_IDX \ + 30 // Enable for internal biasing + // 0: bias generator disabled + // 1: bias generator enabled +#define SISLEY_IBGEN_VECTOR_23_BIAS_ENABLE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_23_BIAS_ENABLE_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_23_BIAS_PAD_ENABLE_BIT_IDX \ + 31 // Chip pad enable of the bias generator + // 0: pad disconnected + // 1: pad connected +#define SISLEY_IBGEN_VECTOR_23_BIAS_PAD_ENABLE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_23_BIAS_PAD_ENABLE_DEFAULT 0x00000000 + +#define SISLEY_IBGEN_VECTOR_24_ADDR 0x00000160 //'BIAS_BULK' +#define SISLEY_IBGEN_VECTOR_24_BIAS_VDAC_VAL_BIT_IDX 0 // Voltage DAC value coded on 8 bits +#define SISLEY_IBGEN_VECTOR_24_BIAS_VDAC_VAL_WIDTH 8 +#define SISLEY_IBGEN_VECTOR_24_BIAS_VDAC_VAL_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_24_BIAS_IDAC_VAL_BIT_IDX 8 // Current DAC value coded on 13 bits +#define SISLEY_IBGEN_VECTOR_24_BIAS_IDAC_VAL_WIDTH 13 +#define SISLEY_IBGEN_VECTOR_24_BIAS_IDAC_VAL_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_24_BIAS_INTERNAL_BUFFER_BIT_IDX 21 // Buffer value (coded on 6 bits) +#define SISLEY_IBGEN_VECTOR_24_BIAS_INTERNAL_BUFFER_WIDTH 6 +#define SISLEY_IBGEN_VECTOR_24_BIAS_INTERNAL_BUFFER_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_24_BIAS_TYPE_BIT_IDX \ + 27 // Selects bias mode + // 0: current DAC + // 1: voltage DAC +#define SISLEY_IBGEN_VECTOR_24_BIAS_TYPE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_24_BIAS_TYPE_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_24_BIAS_MODE_BIT_IDX \ + 28 // Selects bias mode + // 0: cascode (shifts DC up for NMOS and down for PMOS) + // 1: normal +#define SISLEY_IBGEN_VECTOR_24_BIAS_MODE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_24_BIAS_MODE_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_24_BIAS_POLARITY_BIT_IDX \ + 29 // Bias polarity of internal buffer + // 0: PMOS + // 1: NMOS +#define SISLEY_IBGEN_VECTOR_24_BIAS_POLARITY_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_24_BIAS_POLARITY_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_24_BIAS_ENABLE_BIT_IDX \ + 30 // Enable for internal biasing + // 0: bias generator disabled + // 1: bias generator enabled +#define SISLEY_IBGEN_VECTOR_24_BIAS_ENABLE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_24_BIAS_ENABLE_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_24_BIAS_PAD_ENABLE_BIT_IDX \ + 31 // Chip pad enable of the bias generator + // 0: pad disconnected + // 1: pad connected +#define SISLEY_IBGEN_VECTOR_24_BIAS_PAD_ENABLE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_24_BIAS_PAD_ENABLE_DEFAULT 0x00000000 + +#define SISLEY_IBGEN_VECTOR_25_ADDR \ + 0x00000164 //'VDD_HPF' - When a bias generator supplies vdd_hpf, it is also connected to the pad also called + // vdd_hpf. +#define SISLEY_IBGEN_VECTOR_25_BIAS_VDAC_VAL_BIT_IDX 0 // Voltage DAC value coded on 8 bits +#define SISLEY_IBGEN_VECTOR_25_BIAS_VDAC_VAL_WIDTH 8 +#define SISLEY_IBGEN_VECTOR_25_BIAS_VDAC_VAL_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_25_BIAS_IDAC_VAL_BIT_IDX 8 // Current DAC value coded on 13 bits +#define SISLEY_IBGEN_VECTOR_25_BIAS_IDAC_VAL_WIDTH 13 +#define SISLEY_IBGEN_VECTOR_25_BIAS_IDAC_VAL_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_25_BIAS_INTERNAL_BUFFER_BIT_IDX 21 // Buffer value (coded on 6 bits) +#define SISLEY_IBGEN_VECTOR_25_BIAS_INTERNAL_BUFFER_WIDTH 6 +#define SISLEY_IBGEN_VECTOR_25_BIAS_INTERNAL_BUFFER_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_25_BIAS_TYPE_BIT_IDX \ + 27 // Selects bias mode + // 0: current DAC + // 1: voltage DAC +#define SISLEY_IBGEN_VECTOR_25_BIAS_TYPE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_25_BIAS_TYPE_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_25_BIAS_MODE_BIT_IDX \ + 28 // Selects bias mode + // 0: cascode (shifts DC up for NMOS and down for PMOS) + // 1: normal +#define SISLEY_IBGEN_VECTOR_25_BIAS_MODE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_25_BIAS_MODE_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_25_BIAS_POLARITY_BIT_IDX \ + 29 // Bias polarity of internal buffer + // 0: PMOS + // 1: NMOS +#define SISLEY_IBGEN_VECTOR_25_BIAS_POLARITY_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_25_BIAS_POLARITY_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_25_BIAS_ENABLE_BIT_IDX \ + 30 // Enable for internal biasing + // 0: bias generator disabled + // 1: bias generator enabled +#define SISLEY_IBGEN_VECTOR_25_BIAS_ENABLE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_25_BIAS_ENABLE_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_25_BIAS_PAD_ENABLE_BIT_IDX \ + 31 // Chip pad enable of the bias generator + // 0: pad disconnected + // 1: pad connected +#define SISLEY_IBGEN_VECTOR_25_BIAS_PAD_ENABLE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_25_BIAS_PAD_ENABLE_DEFAULT 0x00000000 + +#define SISLEY_IBGEN_VECTOR_26_ADDR 0x00000168 //'BIAS_BUF' +#define SISLEY_IBGEN_VECTOR_26_BIAS_VDAC_VAL_BIT_IDX 0 // Voltage DAC value coded on 8 bits +#define SISLEY_IBGEN_VECTOR_26_BIAS_VDAC_VAL_WIDTH 8 +#define SISLEY_IBGEN_VECTOR_26_BIAS_VDAC_VAL_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_26_BIAS_IDAC_VAL_BIT_IDX 8 // Current DAC value coded on 13 bits +#define SISLEY_IBGEN_VECTOR_26_BIAS_IDAC_VAL_WIDTH 13 +#define SISLEY_IBGEN_VECTOR_26_BIAS_IDAC_VAL_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_26_BIAS_INTERNAL_BUFFER_BIT_IDX 21 // Buffer value (coded on 6 bits) +#define SISLEY_IBGEN_VECTOR_26_BIAS_INTERNAL_BUFFER_WIDTH 6 +#define SISLEY_IBGEN_VECTOR_26_BIAS_INTERNAL_BUFFER_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_26_BIAS_TYPE_BIT_IDX \ + 27 // Selects bias mode + // 0: current DAC + // 1: voltage DAC +#define SISLEY_IBGEN_VECTOR_26_BIAS_TYPE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_26_BIAS_TYPE_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_26_BIAS_MODE_BIT_IDX \ + 28 // Selects bias mode + // 0: cascode (shifts DC up for NMOS and down for PMOS) + // 1: normal +#define SISLEY_IBGEN_VECTOR_26_BIAS_MODE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_26_BIAS_MODE_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_26_BIAS_POLARITY_BIT_IDX \ + 29 // Bias polarity of internal buffer + // 0: PMOS + // 1: NMOS +#define SISLEY_IBGEN_VECTOR_26_BIAS_POLARITY_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_26_BIAS_POLARITY_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_26_BIAS_ENABLE_BIT_IDX \ + 30 // Enable for internal biasing + // 0: bias generator disabled + // 1: bias generator enabled +#define SISLEY_IBGEN_VECTOR_26_BIAS_ENABLE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_26_BIAS_ENABLE_DEFAULT 0x00000000 +#define SISLEY_IBGEN_VECTOR_26_BIAS_PAD_ENABLE_BIT_IDX \ + 31 // Chip pad enable of the bias generator + // 0: pad disconnected + // 1: pad connected +#define SISLEY_IBGEN_VECTOR_26_BIAS_PAD_ENABLE_WIDTH 1 +#define SISLEY_IBGEN_VECTOR_26_BIAS_PAD_ENABLE_DEFAULT 0x00000000 + +//------------------------------------------------------------------------------------------------------------ +// SENSOR - TD ROI X +//------------------------------------------------------------------------------------------------------------ + +#define SISLEY_ROI_TD_X_0_ADDR 0x00000200 + +#define SISLEY_ROI_TD_X_1_ADDR 0x00000204 + +#define SISLEY_ROI_TD_X_2_ADDR 0x00000208 + +#define SISLEY_ROI_TD_X_3_ADDR 0x0000020C + +#define SISLEY_ROI_TD_X_4_ADDR 0x00000210 + +#define SISLEY_ROI_TD_X_5_ADDR 0x00000214 + +#define SISLEY_ROI_TD_X_6_ADDR 0x00000218 + +#define SISLEY_ROI_TD_X_7_ADDR 0x0000021C + +#define SISLEY_ROI_TD_X_8_ADDR 0x00000220 + +#define SISLEY_ROI_TD_X_9_ADDR 0x00000224 + +#define SISLEY_ROI_TD_X_10_ADDR 0x00000228 + +#define SISLEY_ROI_TD_X_11_ADDR 0x0000022C + +#define SISLEY_ROI_TD_X_12_ADDR 0x00000230 + +#define SISLEY_ROI_TD_X_13_ADDR 0x00000234 + +#define SISLEY_ROI_TD_X_14_ADDR 0x00000238 + +#define SISLEY_ROI_TD_X_15_ADDR 0x0000023C + +#define SISLEY_ROI_TD_X_16_ADDR 0x00000240 + +#define SISLEY_ROI_TD_X_17_ADDR 0x00000244 + +#define SISLEY_ROI_TD_X_18_ADDR 0x00000248 + +#define SISLEY_ROI_TD_X_19_ADDR 0x0000024C + +#define SISLEY_ROI_TD_X_20_ADDR 0x00000250 + +//------------------------------------------------------------------------------------------------------------ +// SENSOR - EM ROI Y +//------------------------------------------------------------------------------------------------------------ + +#define SISLEY_ROI_TD_Y_0_ADDR 0x00000300 + +#define SISLEY_ROI_TD_Y_1_ADDR 0x00000304 + +#define SISLEY_ROI_TD_Y_2_ADDR 0x00000308 + +#define SISLEY_ROI_TD_Y_3_ADDR 0x0000030C + +#define SISLEY_ROI_TD_Y_4_ADDR 0x00000310 + +#define SISLEY_ROI_TD_Y_5_ADDR 0x00000314 + +#define SISLEY_ROI_TD_Y_6_ADDR 0x00000318 + +#define SISLEY_ROI_TD_Y_7_ADDR 0x0000031C + +#define SISLEY_ROI_TD_Y_8_ADDR 0x00000320 + +#define SISLEY_ROI_TD_Y_9_ADDR 0x00000324 + +#define SISLEY_ROI_TD_Y_10_ADDR 0x00000328 + +#define SISLEY_ROI_TD_Y_11_ADDR 0x0000032C + +#define SISLEY_ROI_TD_Y_12_ADDR 0x00000330 + +#define SISLEY_ROI_TD_Y_13_ADDR 0x00000334 + +#define SISLEY_ROI_TD_Y_14_ADDR 0x00000338 + +#define SISLEY_ROI_TD_Y_15_ADDR 0x0000033C + +//------------------------------------------------------------------------------------------------------------ +// SENSOR - EM ROI X +//------------------------------------------------------------------------------------------------------------ + +#define SISLEY_ROI_EM_X_0_ADDR 0x00000400 + +#define SISLEY_ROI_EM_X_1_ADDR 0x00000404 + +#define SISLEY_ROI_EM_X_2_ADDR 0x00000408 + +#define SISLEY_ROI_EM_X_3_ADDR 0x0000040C + +#define SISLEY_ROI_EM_X_4_ADDR 0x00000410 + +#define SISLEY_ROI_EM_X_5_ADDR 0x00000414 + +#define SISLEY_ROI_EM_X_6_ADDR 0x00000418 + +#define SISLEY_ROI_EM_X_7_ADDR 0x0000041C + +#define SISLEY_ROI_EM_X_8_ADDR 0x00000420 + +#define SISLEY_ROI_EM_X_9_ADDR 0x00000424 + +#define SISLEY_ROI_EM_X_10_ADDR 0x00000428 + +#define SISLEY_ROI_EM_X_11_ADDR 0x0000042C + +#define SISLEY_ROI_EM_X_12_ADDR 0x00000430 + +#define SISLEY_ROI_EM_X_13_ADDR 0x00000434 + +#define SISLEY_ROI_EM_X_14_ADDR 0x00000438 + +#define SISLEY_ROI_EM_X_15_ADDR 0x0000043C + +#define SISLEY_ROI_EM_X_16_ADDR 0x00000440 + +#define SISLEY_ROI_EM_X_17_ADDR 0x00000444 + +#define SISLEY_ROI_EM_X_18_ADDR 0x00000448 + +#define SISLEY_ROI_EM_X_19_ADDR 0x0000044C + +#define SISLEY_ROI_EM_X_20_ADDR 0x00000450 + +//------------------------------------------------------------------------------------------------------------ +// SENSOR - EM ROI Y +//------------------------------------------------------------------------------------------------------------ + +#define SISLEY_ROI_EM_Y_0_ADDR 0x00000500 + +#define SISLEY_ROI_EM_Y_1_ADDR 0x00000504 + +#define SISLEY_ROI_EM_Y_2_ADDR 0x00000508 + +#define SISLEY_ROI_EM_Y_3_ADDR 0x0000050C + +#define SISLEY_ROI_EM_Y_4_ADDR 0x00000510 + +#define SISLEY_ROI_EM_Y_5_ADDR 0x00000514 + +#define SISLEY_ROI_EM_Y_6_ADDR 0x00000518 + +#define SISLEY_ROI_EM_Y_7_ADDR 0x0000051C + +#define SISLEY_ROI_EM_Y_8_ADDR 0x00000520 + +#define SISLEY_ROI_EM_Y_9_ADDR 0x00000524 + +#define SISLEY_ROI_EM_Y_10_ADDR 0x00000528 + +#define SISLEY_ROI_EM_Y_11_ADDR 0x0000052C + +#define SISLEY_ROI_EM_Y_12_ADDR 0x00000530 + +#define SISLEY_ROI_EM_Y_13_ADDR 0x00000534 + +#define SISLEY_ROI_EM_Y_14_ADDR 0x00000538 + +#define SISLEY_ROI_EM_Y_15_ADDR 0x0000053C + +#endif // METAVISION_HAL_GEN3_SENSOR_REGISTER_MAP_H diff --git a/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/imu_register_map.h b/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/imu_register_map.h new file mode 100644 index 000000000..b0aa8fae0 --- /dev/null +++ b/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/imu_register_map.h @@ -0,0 +1,92 @@ +/********************************************************************************************** + * WARNING: THIS FILE HAS BEEN GENERATED BY REG_MAP_MANAGER TOOLS PLEASE DO NOT MODIFY IT * + ********************************************************************************************** + * File: imu_register_map.h * + * * + * Copyright (c) 2015-2018 Prophesee. All rights reserved. * + * * + * Date: 08/10/2018 at 12h05m31s * + * Name: imu_register_map * + * Version: 1.0 * + * Hash: 5bbb2361abe7cfb517e59136ce8316e506510e8720a3d629adaaa7d948550dfe * + ********************************************************************************************** + * WARNING: THIS FILE HAS BEEN GENERATED BY REG_MAP_MANAGER TOOLS PLEASE DO NOT MODIFY IT * + *********************************************************************************************/ + +#ifndef METAVISION_HAL_IMU_REGISTER_MAP_H +#define METAVISION_HAL_IMU_REGISTER_MAP_H + +//------------------------------------------------------------------------------------------------------------ +// IMU +//------------------------------------------------------------------------------------------------------------ + +#define IMU_BASE_ADDR 0x00000000 +#define IMU_LAST_ADDR 0x00000075 +#define IMU_SIZE 0x00000080 + +#define IMU_AX_MSB_ADDR 0x0000003B // IMU Accelerometer X-Axis MSB: AX[15:8] +#define IMU_AX_MSB_VALUE_BIT_IDX 0 // IMU Accelerometer X-Axis MSB: AX[15:8] value +#define IMU_AX_MSB_VALUE_WIDTH 8 +#define IMU_AX_MSB_VALUE_DEFAULT 0x00000000 + +#define IMU_AX_LSB_ADDR 0x0000003C // IMU Accelerometer X-Axis LSB: AX[7:0] +#define IMU_AX_LSB_VALUE_BIT_IDX 0 // IMU Accelerometer X-Axis LSB: AX[7:0] value +#define IMU_AX_LSB_VALUE_WIDTH 8 +#define IMU_AX_LSB_VALUE_DEFAULT 0x00000000 + +#define IMU_AY_MSB_ADDR 0x0000003D // IMU Accelerometer Y-Axis MSB: AY[15:8] +#define IMU_AY_MSB_VALUE_BIT_IDX 0 // IMU Accelerometer Y-Axis MSB: AY[15:8] value +#define IMU_AY_MSB_VALUE_WIDTH 8 +#define IMU_AY_MSB_VALUE_DEFAULT 0x00000000 + +#define IMU_AY_LSB_ADDR 0x0000003E // IMU Accelerometer Y-Axis LSB: AY[7:0] +#define IMU_AY_LSB_VALUE_BIT_IDX 0 // IMU Accelerometer Y-Axis LSB: AY[7:0] value +#define IMU_AY_LSB_VALUE_WIDTH 8 +#define IMU_AY_LSB_VALUE_DEFAULT 0x00000000 + +#define IMU_AZ_MSB_ADDR 0x0000003F // IMU Accelerometer Z-Axis MSB: AZ[15:8] +#define IMU_AZ_MSB_VALUE_BIT_IDX 0 // IMU Accelerometer Z-Axis MSB: AZ[15:8] value +#define IMU_AZ_MSB_VALUE_WIDTH 8 +#define IMU_AZ_MSB_VALUE_DEFAULT 0x00000000 + +#define IMU_AZ_LSB_ADDR 0x00000040 // IMU Accelerometer Z-Axis LSB: AZ[7:0] +#define IMU_AZ_LSB_VALUE_BIT_IDX 0 // IMU Accelerometer Z-Axis LSB: AZ[7:0] value +#define IMU_AZ_LSB_VALUE_WIDTH 8 +#define IMU_AZ_LSB_VALUE_DEFAULT 0x00000000 + +#define IMU_GX_MSB_ADDR 0x00000043 // IMU Gyroscope X-Axis MSB: GX[15:8] +#define IMU_GX_MSB_VALUE_BIT_IDX 0 // IMU Gyroscope X-Axis MSB: GX[15:8] value +#define IMU_GX_MSB_VALUE_WIDTH 8 +#define IMU_GX_MSB_VALUE_DEFAULT 0x00000000 + +#define IMU_GX_LSB_ADDR 0x00000044 // IMU Gyroscope X-Axis LSB: GX[7:0] +#define IMU_GX_LSB_VALUE_BIT_IDX 0 // IMU Gyroscope X-Axis LSB: GX[7:0] value +#define IMU_GX_LSB_VALUE_WIDTH 8 +#define IMU_GX_LSB_VALUE_DEFAULT 0x00000000 + +#define IMU_GY_MSB_ADDR 0x00000045 // IMU Gyroscope Y-Axis MSB: GY[15:8] +#define IMU_GY_MSB_VALUE_BIT_IDX 0 // IMU Gyroscope Y-Axis MSB: GY[15:8] value +#define IMU_GY_MSB_VALUE_WIDTH 8 +#define IMU_GY_MSB_VALUE_DEFAULT 0x00000000 + +#define IMU_GY_LSB_ADDR 0x00000046 // IMU Gyroscope Y-Axis LSB: GY[7:0] +#define IMU_GY_LSB_VALUE_BIT_IDX 0 // IMU Gyroscope Y-Axis LSB: GY[7:0] value +#define IMU_GY_LSB_VALUE_WIDTH 8 +#define IMU_GY_LSB_VALUE_DEFAULT 0x00000000 + +#define IMU_GZ_MSB_ADDR 0x00000047 // IMU Gyroscope Z-Axis MSB: GZ[15:8] +#define IMU_GZ_MSB_VALUE_BIT_IDX 0 // IMU Gyroscope Z-Axis MSB: GZ[15:8] value +#define IMU_GZ_MSB_VALUE_WIDTH 8 +#define IMU_GZ_MSB_VALUE_DEFAULT 0x00000000 + +#define IMU_GZ_LSB_ADDR 0x00000048 // IMU Gyroscope Z-Axis LSB: GZ[7:0] +#define IMU_GZ_LSB_VALUE_BIT_IDX 0 // IMU Gyroscope Z-Axis LSB: GZ[7:0] value +#define IMU_GZ_LSB_VALUE_WIDTH 8 +#define IMU_GZ_LSB_VALUE_DEFAULT 0x00000000 + +#define IMU_WHOAMI_ADDR 0x00000075 // IMU Who Am I +#define IMU_WHOAMI_VALUE_BIT_IDX 0 // IMU Who Am I value +#define IMU_WHOAMI_VALUE_WIDTH 8 +#define IMU_WHOAMI_VALUE_DEFAULT 0x00000000 + +#endif // METAVISION_HAL_IMU_REGISTER_MAP_H diff --git a/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/legacy/atis_if_monitor_register_mapping.h b/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/legacy/atis_if_monitor_register_mapping.h new file mode 100644 index 000000000..98b8a4eb0 --- /dev/null +++ b/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/legacy/atis_if_monitor_register_mapping.h @@ -0,0 +1,29 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_ATIS_IF_MONITOR_REGISTER_MAPPING_H +#define METAVISION_HAL_ATIS_IF_MONITOR_REGISTER_MAPPING_H + +//----------------------------------------------------------------------------- +// Register Bank name is ATIF_IF_MONITOR +//----------------------------------------------------------------------------- + +#define ATIS_IF_MONITOR_CFG_ENABLE_ADDR 0x00000000 // regbank_address +#define ATIS_IF_MONITOR_CFG_IDLE_TIME_ADDR 0x00000004 // regbank_address +#define ATIS_IF_MONITOR_CFG_TIMEOUT_THR_ADDR 0x00000008 // regbank_address +#define CFG_ENABLE_ALL_EVT_BIT 0 // ATIS_IF_MONITOR_CFG_TIMEOUT_THR_ADDR +#define CFG_ENABLE_TD_IDLE_TIME_EVT_BIT 1 // ATIS_IF_MONITOR_CFG_TIMEOUT_THR_ADDR +#define CFG_ENABLE_TD_IDLE_TIMEOUT_EVT_BIT 2 // ATIS_IF_MONITOR_CFG_TIMEOUT_THR_ADDR +#define CFG_ENABLE_APS_IDLE_TIME_EVT_BIT 3 // ATIS_IF_MONITOR_CFG_TIMEOUT_THR_ADDR +#define CFG_ENABLE_APS_IDLE_TIMEOUT_EVT_BIT 4 // ATIS_IF_MONITOR_CFG_TIMEOUT_THR_ADDR +#define CFG_ENABLE_GLOBAL_ILLUMINATION_EVT_BIT 5 // ATIS_IF_MONITOR_CFG_TIMEOUT_THR_ADDR + +#endif // METAVISION_HAL_ATIS_IF_MONITOR_REGISTER_MAPPING_H diff --git a/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/legacy/ccam2_register_mapping.h b/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/legacy/ccam2_register_mapping.h new file mode 100644 index 000000000..35e548a78 --- /dev/null +++ b/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/legacy/ccam2_register_mapping.h @@ -0,0 +1,113 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_CCAM2_REGISTER_MAPPING_H +#define METAVISION_HAL_CCAM2_REGISTER_MAPPING_H + +//----------------------------------------------------------------------------- +// Register Bank name is CCAM2_SYSTEM_CONTROL +//----------------------------------------------------------------------------- + +//----------------------------------------------------------------------------- +// Register Bank Number +//----------------------------------------------------------------------------- +#define CCAM2_SYSTEM_CONTROL_REG_NB 25 // natural + +//----------------------------------------------------------------------------- +// Register Bank Base Address +//----------------------------------------------------------------------------- +#define CCAM2_SYSTEM_CONTROL_BASE_ADDRESS 0x00000000 // regbank_address + +//----------------------------------------------------------------------------- +// Register Address Map +//----------------------------------------------------------------------------- +#define SYSTEM_CONTROL_ADDR 0x00000000 // regbank_address +#define ATIS_CONTROL_ADDR 0x00000000 // regbank_address +#define ATIS_BIASROI_UPDATE_VALUE0_ADDR 0x00000002 // regbank_address +#define ATIS_BIASROI_UPDATE_VALUE1_ADDR 0x00000004 // regbank_address +#define ATIS_BIAS_UPDATE_VALUE2_ADDR 0x00000006 // regbank_address +#define CCAM2_CONTROL_ADDR 0x00000008 // regbank_address +#define TRIGGERS_ADDR 0x0000000A // regbank_address +#define SYSTEM_STATUS_ADDR 0x0000000C // regbank_address +#define FOUT_LSB_STATUS_ADDR 0x0000000E // regbank_address +#define FOUT_MSB_STATUS_ADDR 0x00000010 // regbank_address +#define FIFO_WRCOUNT_STATUS_ADDR 0x00000012 // regbank_address +#define FIFO_CHECKPIX_STATUS_ADDR 0x00000014 // regbank_address +#define TLAST_REARMUS_ADDR 0x00000016 // regbank_address +#define OVERFLOW_HITCOUNT_ADDR 0x00000018 // regbank_address +#define CCAM2_MODE_ADDR 0x0000001A // regbank_address +#define SERIAL_LSB_ADDR 0x0000001C // regbank_address +#define SERIAL_MSB_ADDR 0x00000020 // regbank_address +#define NOTIFY_PACKETCOUNT_ADDR 0x00000022 // regbank_address +#define SNFETCH_FADDR_LSB_ADDR 0x00000024 // regbank_address +#define SNFETCH_FADDR_MSB_ADDR 0x00000026 // regbank_address +#define SNFETCH_RDATA_LSB_ADDR 0x00000028 // regbank_address +#define SNFETCH_RDATA_MSB_ADDR 0x0000002A // regbank_address +#define SNFETCH_READ_ITER_ADDR 0x0000002C // regbank_address +#define SNFETCH_TIME_COUNT_ADDR 0x0000002E // regbank_address +#define BIAS_LOAD_ITERATION_COUNT_ADDR 0x00000030 // regbank_address +#define FLASH_PROGRAM_SEL_SLAVE_ADDR 0x00000032 // regbank_address +#define SYSTEM_CONTROL_LAST_ADDR 0x00000032 // regbank_address +#define TEP_ATIS_CONTROL_EN_VDDA_BIT_IDX 0 // SYSTEM_CONTROL_LAST_ADDR +#define TEP_ATIS_CONTROL_EN_VDDC_BIT_IDX 1 // SYSTEM_CONTROL_LAST_ADDR +#define TEP_ATIS_CONTROL_EN_VDDD_BIT_IDX 2 // SYSTEM_CONTROL_LAST_ADDR +#define TEP_ATIS_CONTROL_SENSOR_SOFT_RESET_BIT_IDX 3 // SYSTEM_CONTROL_LAST_ADDR +#define TEP_ATIS_CONTROL_IN_EVT_NO_BLOCKING_MODE_BIT_IDX 4 // SYSTEM_CONTROL_LAST_ADDR +#define TEP_ATIS_CONTROL_SISLEY_HVGA_REMAP_BYPASS_BIT_IDX 8 // SYSTEM_CONTROL_LAST_ADDR +#define TEP_ATIS_CONTROL_ROI_TD_RSTN_BIT_IDX 18 // SYSTEM_CONTROL_LAST_ADDR +#define TEP_ATIS_CONTROL_EN_EXT_CTRL_RSTB_BIT_IDX 20 // SYSTEM_CONTROL_LAST_ADDR +#define TEP_ATIS_CONTROL_EN_VDDA_DEFAULT 0 // SYSTEM_CONTROL_LAST_ADDR +#define TEP_ATIS_CONTROL_EN_VDDC_DEFAULT 0 // SYSTEM_CONTROL_LAST_ADDR +#define TEP_ATIS_CONTROL_EN_VDDD_DEFAULT 0 // SYSTEM_CONTROL_LAST_ADDR +#define TEP_ATIS_CONTROL_SENSOR_SOFT_RESET_DEFAULT 1 // SYSTEM_CONTROL_LAST_ADDR +#define TEP_ATIS_CONTROL_IN_EVT_NO_BLOCKING_MODE_DEFAULT 1 // SYSTEM_CONTROL_LAST_ADDR +#define TEP_ATIS_CONTROL_SISLEY_HVGA_REMAP_BYPASS_DEFAULT 1 // SYSTEM_CONTROL_LAST_ADDR +#define TEP_ATIS_CONTROL_ROI_TD_RSTN_DEFAULT 0 // SYSTEM_CONTROL_LAST_ADDR +#define TEP_ATIS_CONTROL_EN_EXT_CTRL_RSTB_DEFAULT 0 // SYSTEM_CONTROL_LAST_ADDR +#define TEP_CCAM2_CONTROL_ENABLE_64BITS_EVENT_BIT_IDX 3 // SYSTEM_CONTROL_LAST_ADDR +#define TEP_CCAM2_CONTROL_BYPASS_MAPPING_BIT_IDX 5 // SYSTEM_CONTROL_LAST_ADDR +#define TEP_CCAM2_CONTROL_HOST_IF_ENABLE_BIT_IDX 8 // SYSTEM_CONTROL_LAST_ADDR +#define TEP_CCAM2_CONTROL_STEREO_MERGE_ENABLE_BIT_IDX 9 // SYSTEM_CONTROL_LAST_ADDR +#define TEP_CCAM2_CONTROL_ENABLE_IMU_BIT_IDX 10 // SYSTEM_CONTROL_LAST_ADDR +#define TEP_CCAM2_CONTROL_ENABLE_OUT_OF_FOV_BIT_IDX 11 // SYSTEM_CONTROL_LAST_ADDR +#define TEP_CCAM2_CONTROL_ENABLE_64BITS_EVENT_DEFAULT 1 // SYSTEM_CONTROL_LAST_ADDR +#define TEP_CCAM2_CONTROL_BYPASS_MAPPING_DEFAULT 1 // SYSTEM_CONTROL_LAST_ADDR +#define TEP_CCAM2_CONTROL_MODE_DEFAULT 0 // SYSTEM_CONTROL_LAST_ADDR +#define TEP_CCAM2_CONTROL_MODE_INIT 0 // SYSTEM_CONTROL_LAST_ADDR +#define TEP_CCAM2_CONTROL_MODE_MASTER 1 // SYSTEM_CONTROL_LAST_ADDR +#define TEP_CCAM2_CONTROL_MODE_SLAVE 2 // SYSTEM_CONTROL_LAST_ADDR +#define TEP_CCAM2_CONTROL_ENABLE_IMU_DEFAULT 0 // SYSTEM_CONTROL_LAST_ADDR +#define TEP_CCAM2_CONTROL_ENABLE_OUT_OF_FOV_DEFAULT 0 // SYSTEM_CONTROL_LAST_ADDR +#define TEP_CCAM2_MODE_MODE_DEFAULT 0 // SYSTEM_CONTROL_LAST_ADDR +#define TEP_CCAM2_MODE_MODE_INIT 0 // SYSTEM_CONTROL_LAST_ADDR +#define TEP_CCAM2_MODE_MODE_MASTER 1 // SYSTEM_CONTROL_LAST_ADDR +#define TEP_CCAM2_MDOE_MODE_SLAVE 2 // SYSTEM_CONTROL_LAST_ADDR +#define TEP_CCAM2_MODE_MODE_BIT_IDX 0 // SYSTEM_CONTROL_LAST_ADDR +#define TEP_CCAM2_MODE_ATIS_DEBUG_SEL_BIT_IDX 4 // SYSTEM_CONTROL_LAST_ADDR +#define TEP_TRIGGER_SOFT_RESET_BIT_IDX 0 // SYSTEM_CONTROL_LAST_ADDR +#define TEP_TRIGGER_BIAS_DIN_VALID_BIT_IDX 1 // SYSTEM_CONTROL_LAST_ADDR +#define TEP_TRIGGER_TS_RESET_BIT_IDX 2 // SYSTEM_CONTROL_LAST_ADDR +#define TEP_TRIGGER_ROI_DIN_BIT_IDX 3 // SYSTEM_CONTROL_LAST_ADDR +#define TEP_TRIGGER_FIFO_RESET_BIT_IDX 7 // SYSTEM_CONTROL_LAST_ADDR +#define TEP_TRIGGER_FLASH_ACCESS_BIT_IDX 8 // SYSTEM_CONTROL_LAST_ADDR +#define TEP_TRIGGER_MAPPING_FETCH_BIT_IDX 9 // SYSTEM_CONTROL_LAST_ADDR +#define TEP_TRIGGER_PROG_DAC_BIT_IDX 10 // SYSTEM_CONTROL_LAST_ADDR +#define TEP_TRIGGER_DAC_DIN_VALID_BIT_IDX 11 // SYSTEM_CONTROL_LAST_ADDR +#define TEP_BIAS_LOAD_ITERATION_COUNT_BIT_IDX 0 // SYSTEM_CONTROL_LAST_ADDR +#define TEP_FLASH_PROGRAM_CONTROL_SEL_SLAVE_BIT_IDX 0 // SYSTEM_CONTROL_LAST_ADDR +#define TEP_FLASH_PROGRAM_FX3_ACCESS_LOCKDOWN_VALUE_BIT_IDX 16 // SYSTEM_CONTROL_LAST_ADDR +#define DEFAULT_SERIAL_NBR 0x00000042 // SYSTEM_CONTROL_LAST_ADDR +#define SERIAL_NBR_ADDR_IN_FLASH 0x258000 // SYSTEM_CONTROL_LAST_ADDR +#define CCAM2_CONTROL_INIT 0b00 // SYSTEM_CONTROL_LAST_ADDR +#define CCAM2_CONTROL_MASTER 0b01 // SYSTEM_CONTROL_LAST_ADDR +#define CCAM2_CONTROL_SLAVE 0b10 // SYSTEM_CONTROL_LAST_ADDR + +#endif // METAVISION_HAL_CCAM2_REGISTER_MAPPING_H diff --git a/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/legacy/ext_trigger_monitor_register_mapping.h b/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/legacy/ext_trigger_monitor_register_mapping.h new file mode 100644 index 000000000..e3982fca9 --- /dev/null +++ b/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/legacy/ext_trigger_monitor_register_mapping.h @@ -0,0 +1,21 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_EXT_TRIGGER_MONITOR_REGISTER_MAPPING_H +#define METAVISION_HAL_EXT_TRIGGER_MONITOR_REGISTER_MAPPING_H + +//----------------------------------------------------------------------------- +// Register Bank name is EXT_TRIGGER_MONITOR +//----------------------------------------------------------------------------- + +#define SYSTEM_MONITOR_EXT_TRIGGERS_ENABLE_ADDR 0x00000000 // regbank_address + +#endif // METAVISION_HAL_EXT_TRIGGER_MONITOR_REGISTER_MAPPING_H diff --git a/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/legacy/fx3_host_if_register_mapping.h b/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/legacy/fx3_host_if_register_mapping.h new file mode 100644 index 000000000..bc5a4687d --- /dev/null +++ b/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/legacy/fx3_host_if_register_mapping.h @@ -0,0 +1,48 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_FX3_HOST_IF_REGISTER_MAPPING_H +#define METAVISION_HAL_FX3_HOST_IF_REGISTER_MAPPING_H + +//----------------------------------------------------------------------------- +// Register Bank name is FX3_HOST_IF +//----------------------------------------------------------------------------- + +#define FX3_HOST_IF_REGISTER_MAPPING_BASE_ADDR 0x00000000 // regbank_address +#define FX3_HOST_IF_PKT_END_ENABLE_ADDR 0x00000000 // regbank_address +#define FX3_HOST_IF_PKT_END_INTERVAL_US_ADDR 0x00000004 // regbank_address +#define FX3_HOST_IF_PKT_END_DATA_COUNT_ADDR 0x00000008 // regbank_address +#define REG00_ADDR_BIT_ADDR 0x00000000 // regbank_address +#define REG01_ADDR_BIT_ADDR 0x00000004 // regbank_address +#define REG02_ADDR_BIT_ADDR 0x00000008 // regbank_address +#define REG03_ADDR_BIT_ADDR 0x0000000C // regbank_address +#define REG04_ADDR_BIT_ADDR 0x00000010 // regbank_address +#define REG05_ADDR_BIT_ADDR 0x00000014 // regbank_address +#define REG06_ADDR_BIT_ADDR 0x00000018 // regbank_address +#define REG07_ADDR_BIT_ADDR 0x0000001C // regbank_address +#define REG08_ADDR_BIT_ADDR 0x00000020 // regbank_address +#define REG09_ADDR_BIT_ADDR 0x00000024 // regbank_address +#define REG10_ADDR_BIT_ADDR 0x00000028 // regbank_address +#define REG11_ADDR_BIT_ADDR 0x0000002C // regbank_address +#define REG12_ADDR_BIT_ADDR 0x00000030 // regbank_address +#define REG13_ADDR_BIT_ADDR 0x00000034 // regbank_address +#define REG14_ADDR_BIT_ADDR 0x00000038 // regbank_address +#define REG15_ADDR_BIT_ADDR 0x0000003C // regbank_address +#define FX3_HOST_IF_LAST_ADDR 0x0000003C // regbank_address +// last register bank address defined at 0x0000003C + +#define SHORT_PACKET_ENABLE_C 0x00000001 // FX3_HOST_IF_LAST_ADDR +#define SHORT_PACKET_INTERVAL_US_WIDTH_C 0x00000400 // FX3_HOST_IF_LAST_ADDR +#define SHORT_PACKET_SKIP_DATA_COUNT_C 0x00000400 // FX3_HOST_IF_LAST_ADDR +#define REG00_SHORT_PACKET_ENABLE_IDX_C 0 // FX3_HOST_IF_LAST_ADDR +#define REG00_SHORT_PACKET_ENABLE_SKIP_IDX_C 1 // FX3_HOST_IF_LAST_ADDR + +#endif // METAVISION_HAL_FX3_HOST_IF_REGISTER_MAPPING_H diff --git a/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/legacy/ibgen_register_mapping.h b/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/legacy/ibgen_register_mapping.h new file mode 100644 index 000000000..55b06abbd --- /dev/null +++ b/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/legacy/ibgen_register_mapping.h @@ -0,0 +1,77 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_IBGEN_REGISTER_MAPPING_H +#define METAVISION_HAL_IBGEN_REGISTER_MAPPING_H + +//----------------------------------------------------------------------------- +// Register Bank name is SISLEY_SENSOR_IF_IBGEN +//----------------------------------------------------------------------------- + +#define SISLEY_IBGEN_BASE_ADDRESS 0x00000000 // regbank_address +#define SISLEY_IBGEN_START_ADDR 0x00000000 // regbank_address +#define SISLEY_IBGEN_LAST_ADDR 0x00000068 // regbank_address +#define SISLEY_IBGEN_VECTOR_0_ADDR 0x00000000 // regbank_address +#define SISLEY_IBGEN_VECTOR_1_ADDR 0x00000004 // regbank_address +#define SISLEY_IBGEN_VECTOR_2_ADDR 0x00000008 // regbank_address +#define SISLEY_IBGEN_VECTOR_3_ADDR 0x0000000C // regbank_address +#define SISLEY_IBGEN_VECTOR_4_ADDR 0x00000010 // regbank_address +#define SISLEY_IBGEN_VECTOR_5_ADDR 0x00000014 // regbank_address +#define SISLEY_IBGEN_VECTOR_6_ADDR 0x00000018 // regbank_address +#define SISLEY_IBGEN_VECTOR_7_ADDR 0x0000001C // regbank_address +#define SISLEY_IBGEN_VECTOR_8_ADDR 0x00000020 // regbank_address +#define SISLEY_IBGEN_VECTOR_9_ADDR 0x00000024 // regbank_address +#define SISLEY_IBGEN_VECTOR_10_ADDR 0x00000028 // regbank_address +#define SISLEY_IBGEN_VECTOR_11_ADDR 0x0000002C // regbank_address +#define SISLEY_IBGEN_VECTOR_12_ADDR 0x00000030 // regbank_address +#define SISLEY_IBGEN_VECTOR_13_ADDR 0x00000034 // regbank_address +#define SISLEY_IBGEN_VECTOR_14_ADDR 0x00000038 // regbank_address +#define SISLEY_IBGEN_VECTOR_15_ADDR 0x0000003C // regbank_address +#define SISLEY_IBGEN_VECTOR_16_ADDR 0x00000040 // regbank_address +#define SISLEY_IBGEN_VECTOR_17_ADDR 0x00000044 // regbank_address +#define SISLEY_IBGEN_VECTOR_18_ADDR 0x00000048 // regbank_address +#define SISLEY_IBGEN_VECTOR_19_ADDR 0x0000004C // regbank_address +#define SISLEY_IBGEN_VECTOR_20_ADDR 0x00000050 // regbank_address +#define SISLEY_IBGEN_VECTOR_21_ADDR 0x00000054 // regbank_address +#define SISLEY_IBGEN_VECTOR_22_ADDR 0x00000058 // regbank_address +#define SISLEY_IBGEN_VECTOR_23_ADDR 0x0000005C // regbank_address +#define SISLEY_IBGEN_VECTOR_24_ADDR 0x00000060 // regbank_address +#define SISLEY_IBGEN_VECTOR_25_ADDR 0x00000064 // regbank_address +#define SISLEY_IBGEN_VECTOR_26_ADDR 0x00000068 // regbank_address +#define SISLEY_IBGEN_VECTOR_0 0x00000000 // SISLEY_IBGEN_VECTOR_26_ADDR +#define SISLEY_IBGEN_VECTOR_1 0x00000000 // SISLEY_IBGEN_VECTOR_26_ADDR +#define SISLEY_IBGEN_VECTOR_2 0x00000000 // SISLEY_IBGEN_VECTOR_26_ADDR +#define SISLEY_IBGEN_VECTOR_3 0x00000000 // SISLEY_IBGEN_VECTOR_26_ADDR +#define SISLEY_IBGEN_VECTOR_4 0x00000000 // SISLEY_IBGEN_VECTOR_26_ADDR +#define SISLEY_IBGEN_VECTOR_5 0x00000000 // SISLEY_IBGEN_VECTOR_26_ADDR +#define SISLEY_IBGEN_VECTOR_6 0x00000000 // SISLEY_IBGEN_VECTOR_26_ADDR +#define SISLEY_IBGEN_VECTOR_7 0x00000000 // SISLEY_IBGEN_VECTOR_26_ADDR +#define SISLEY_IBGEN_VECTOR_8 0x00000000 // SISLEY_IBGEN_VECTOR_26_ADDR +#define SISLEY_IBGEN_VECTOR_9 0x00000000 // SISLEY_IBGEN_VECTOR_26_ADDR +#define SISLEY_IBGEN_VECTOR_10 0x00000000 // SISLEY_IBGEN_VECTOR_26_ADDR +#define SISLEY_IBGEN_VECTOR_11 0x00000000 // SISLEY_IBGEN_VECTOR_26_ADDR +#define SISLEY_IBGEN_VECTOR_12 0x00000000 // SISLEY_IBGEN_VECTOR_26_ADDR +#define SISLEY_IBGEN_VECTOR_13 0x00000000 // SISLEY_IBGEN_VECTOR_26_ADDR +#define SISLEY_IBGEN_VECTOR_14 0x00000000 // SISLEY_IBGEN_VECTOR_26_ADDR +#define SISLEY_IBGEN_VECTOR_15 0x00000000 // SISLEY_IBGEN_VECTOR_26_ADDR +#define SISLEY_IBGEN_VECTOR_16 0x00000000 // SISLEY_IBGEN_VECTOR_26_ADDR +#define SISLEY_IBGEN_VECTOR_17 0x00000000 // SISLEY_IBGEN_VECTOR_26_ADDR +#define SISLEY_IBGEN_VECTOR_18 0x00000000 // SISLEY_IBGEN_VECTOR_26_ADDR +#define SISLEY_IBGEN_VECTOR_19 0x00000000 // SISLEY_IBGEN_VECTOR_26_ADDR +#define SISLEY_IBGEN_VECTOR_20 0x00000000 // SISLEY_IBGEN_VECTOR_26_ADDR +#define SISLEY_IBGEN_VECTOR_21 0x00000000 // SISLEY_IBGEN_VECTOR_26_ADDR +#define SISLEY_IBGEN_VECTOR_22 0x00000000 // SISLEY_IBGEN_VECTOR_26_ADDR +#define SISLEY_IBGEN_VECTOR_23 0x00000000 // SISLEY_IBGEN_VECTOR_26_ADDR +#define SISLEY_IBGEN_VECTOR_24 0x00000000 // SISLEY_IBGEN_VECTOR_26_ADDR +#define SISLEY_IBGEN_VECTOR_25 0x00000000 // SISLEY_IBGEN_VECTOR_26_ADDR +#define SISLEY_IBGEN_VECTOR_26 0x00000000 // SISLEY_IBGEN_VECTOR_26_ADDR + +#endif // METAVISION_HAL_IBGEN_REGISTER_MAPPING_H diff --git a/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/legacy/roi_register_mapping.h b/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/legacy/roi_register_mapping.h new file mode 100644 index 000000000..9035f5356 --- /dev/null +++ b/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/legacy/roi_register_mapping.h @@ -0,0 +1,179 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_ROI_REGISTER_MAPPING_H +#define METAVISION_HAL_ROI_REGISTER_MAPPING_H + +//----------------------------------------------------------------------------- +// Register Bank name is SISLEY_SENSOR_IF_ROI +//----------------------------------------------------------------------------- + +#define SISLEY_ROI_BASE_ADDRESS 0x00000000 // regbank_address +#define SISLEY_ROI_START_ADDR 0x00000000 // regbank_address +#define SISLEY_ROI_LAST_ADDR 0x0000033C // regbank_address +#define SISLEY_ROI_TD_X_START_ADDR 0x00000000 // regbank_address +#define SISLEY_ROI_TD_X_LAST_ADDR 0x00000050 // regbank_address +#define SISLEY_ROI_TD_X_0_ADDR 0x00000000 // regbank_address +#define SISLEY_ROI_TD_X_1_ADDR 0x00000004 // regbank_address +#define SISLEY_ROI_TD_X_2_ADDR 0x00000008 // regbank_address +#define SISLEY_ROI_TD_X_3_ADDR 0x0000000C // regbank_address +#define SISLEY_ROI_TD_X_4_ADDR 0x00000010 // regbank_address +#define SISLEY_ROI_TD_X_5_ADDR 0x00000014 // regbank_address +#define SISLEY_ROI_TD_X_6_ADDR 0x00000018 // regbank_address +#define SISLEY_ROI_TD_X_7_ADDR 0x0000001C // regbank_address +#define SISLEY_ROI_TD_X_8_ADDR 0x00000020 // regbank_address +#define SISLEY_ROI_TD_X_9_ADDR 0x00000024 // regbank_address +#define SISLEY_ROI_TD_X_10_ADDR 0x00000028 // regbank_address +#define SISLEY_ROI_TD_X_11_ADDR 0x0000002C // regbank_address +#define SISLEY_ROI_TD_X_12_ADDR 0x00000030 // regbank_address +#define SISLEY_ROI_TD_X_13_ADDR 0x00000034 // regbank_address +#define SISLEY_ROI_TD_X_14_ADDR 0x00000038 // regbank_address +#define SISLEY_ROI_TD_X_15_ADDR 0x0000003C // regbank_address +#define SISLEY_ROI_TD_X_16_ADDR 0x00000040 // regbank_address +#define SISLEY_ROI_TD_X_17_ADDR 0x00000044 // regbank_address +#define SISLEY_ROI_TD_X_18_ADDR 0x00000048 // regbank_address +#define SISLEY_ROI_TD_X_19_ADDR 0x0000004C // regbank_address +#define SISLEY_ROI_TD_X_20_ADDR 0x00000050 // regbank_address +#define SISLEY_ROI_TD_Y_START_ADDR 0x00000100 // regbank_address +#define SISLEY_ROI_TD_Y_LAST_ADDR 0x0000013C // regbank_address +#define SISLEY_ROI_TD_Y_0_ADDR 0x00000100 // regbank_address +#define SISLEY_ROI_TD_Y_1_ADDR 0x00000104 // regbank_address +#define SISLEY_ROI_TD_Y_2_ADDR 0x00000108 // regbank_address +#define SISLEY_ROI_TD_Y_3_ADDR 0x0000010C // regbank_address +#define SISLEY_ROI_TD_Y_4_ADDR 0x00000110 // regbank_address +#define SISLEY_ROI_TD_Y_5_ADDR 0x00000114 // regbank_address +#define SISLEY_ROI_TD_Y_6_ADDR 0x00000118 // regbank_address +#define SISLEY_ROI_TD_Y_7_ADDR 0x0000011C // regbank_address +#define SISLEY_ROI_TD_Y_8_ADDR 0x00000120 // regbank_address +#define SISLEY_ROI_TD_Y_9_ADDR 0x00000124 // regbank_address +#define SISLEY_ROI_TD_Y_10_ADDR 0x00000128 // regbank_address +#define SISLEY_ROI_TD_Y_11_ADDR 0x0000012C // regbank_address +#define SISLEY_ROI_TD_Y_12_ADDR 0x00000130 // regbank_address +#define SISLEY_ROI_TD_Y_13_ADDR 0x00000134 // regbank_address +#define SISLEY_ROI_TD_Y_14_ADDR 0x00000138 // regbank_address +#define SISLEY_ROI_TD_Y_15_ADDR 0x0000013C // regbank_address +#define SISLEY_ROI_EM_X_START_ADDR 0x00000200 // regbank_address +#define SISLEY_ROI_EM_X_LAST_ADDR 0x00000250 // regbank_address +#define SISLEY_ROI_EM_X_0_ADDR 0x00000200 // regbank_address +#define SISLEY_ROI_EM_X_1_ADDR 0x00000204 // regbank_address +#define SISLEY_ROI_EM_X_2_ADDR 0x00000208 // regbank_address +#define SISLEY_ROI_EM_X_3_ADDR 0x0000020C // regbank_address +#define SISLEY_ROI_EM_X_4_ADDR 0x00000210 // regbank_address +#define SISLEY_ROI_EM_X_5_ADDR 0x00000214 // regbank_address +#define SISLEY_ROI_EM_X_6_ADDR 0x00000218 // regbank_address +#define SISLEY_ROI_EM_X_7_ADDR 0x0000021C // regbank_address +#define SISLEY_ROI_EM_X_8_ADDR 0x00000220 // regbank_address +#define SISLEY_ROI_EM_X_9_ADDR 0x00000224 // regbank_address +#define SISLEY_ROI_EM_X_10_ADDR 0x00000228 // regbank_address +#define SISLEY_ROI_EM_X_11_ADDR 0x0000022C // regbank_address +#define SISLEY_ROI_EM_X_12_ADDR 0x00000230 // regbank_address +#define SISLEY_ROI_EM_X_13_ADDR 0x00000234 // regbank_address +#define SISLEY_ROI_EM_X_14_ADDR 0x00000238 // regbank_address +#define SISLEY_ROI_EM_X_15_ADDR 0x0000023C // regbank_address +#define SISLEY_ROI_EM_X_16_ADDR 0x00000240 // regbank_address +#define SISLEY_ROI_EM_X_17_ADDR 0x00000244 // regbank_address +#define SISLEY_ROI_EM_X_18_ADDR 0x00000248 // regbank_address +#define SISLEY_ROI_EM_X_19_ADDR 0x0000024C // regbank_address +#define SISLEY_ROI_EM_X_20_ADDR 0x00000250 // regbank_address +#define SISLEY_ROI_EM_Y_START_ADDR 0x00000300 // regbank_address +#define SISLEY_ROI_EM_Y_LAST_ADDR 0x0000033C // regbank_address +#define SISLEY_ROI_EM_Y_0_ADDR 0x00000300 // regbank_address +#define SISLEY_ROI_EM_Y_1_ADDR 0x00000304 // regbank_address +#define SISLEY_ROI_EM_Y_2_ADDR 0x00000308 // regbank_address +#define SISLEY_ROI_EM_Y_3_ADDR 0x0000030C // regbank_address +#define SISLEY_ROI_EM_Y_4_ADDR 0x00000310 // regbank_address +#define SISLEY_ROI_EM_Y_5_ADDR 0x00000314 // regbank_address +#define SISLEY_ROI_EM_Y_6_ADDR 0x00000318 // regbank_address +#define SISLEY_ROI_EM_Y_7_ADDR 0x0000031C // regbank_address +#define SISLEY_ROI_EM_Y_8_ADDR 0x00000320 // regbank_address +#define SISLEY_ROI_EM_Y_9_ADDR 0x00000324 // regbank_address +#define SISLEY_ROI_EM_Y_10_ADDR 0x00000328 // regbank_address +#define SISLEY_ROI_EM_Y_11_ADDR 0x0000032C // regbank_address +#define SISLEY_ROI_EM_Y_12_ADDR 0x00000330 // regbank_address +#define SISLEY_ROI_EM_Y_13_ADDR 0x00000334 // regbank_address +#define SISLEY_ROI_EM_Y_14_ADDR 0x00000338 // regbank_address +#define SISLEY_ROI_EM_Y_15_ADDR 0x0000033C // regbank_address +#define SISLEY_ROI_TD_X_0 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_TD_X_1 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_TD_X_2 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_TD_X_3 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_TD_X_4 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_TD_X_5 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_TD_X_6 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_TD_X_7 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_TD_X_8 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_TD_X_9 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_TD_X_10 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_TD_X_11 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_TD_X_12 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_TD_X_13 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_TD_X_14 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_TD_X_15 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_TD_X_16 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_TD_X_17 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_TD_X_18 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_TD_X_19 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_TD_X_20 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_TD_Y_0 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_TD_Y_1 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_TD_Y_2 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_TD_Y_3 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_TD_Y_4 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_TD_Y_5 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_TD_Y_6 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_TD_Y_7 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_TD_Y_8 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_TD_Y_9 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_TD_Y_10 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_TD_Y_11 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_TD_Y_12 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_TD_Y_13 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_TD_Y_14 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_TD_Y_15 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_EM_X_0 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_EM_X_1 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_EM_X_2 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_EM_X_3 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_EM_X_4 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_EM_X_5 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_EM_X_6 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_EM_X_7 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_EM_X_8 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_EM_X_9 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_EM_X_10 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_EM_X_11 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_EM_X_12 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_EM_X_13 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_EM_X_14 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_EM_X_15 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_EM_X_16 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_EM_X_17 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_EM_X_18 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_EM_X_19 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_EM_X_20 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_EM_Y_0 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_EM_Y_1 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_EM_Y_2 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_EM_Y_3 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_EM_Y_4 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_EM_Y_5 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_EM_Y_6 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_EM_Y_7 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_EM_Y_8 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_EM_Y_9 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_EM_Y_10 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_EM_Y_11 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_EM_Y_12 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_EM_Y_13 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_EM_Y_14 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR +#define SISLEY_ROI_EM_Y_15 0x00000000 // SISLEY_ROI_EM_Y_15_ADDR + +#endif // METAVISION_HAL_ROI_REGISTER_MAPPING_H diff --git a/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/legacy/sensor_ctrl_register_mapping.h b/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/legacy/sensor_ctrl_register_mapping.h new file mode 100644 index 000000000..b94025f99 --- /dev/null +++ b/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/legacy/sensor_ctrl_register_mapping.h @@ -0,0 +1,195 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_SENSOR_CTRL_REGISTER_MAPPING_H +#define METAVISION_HAL_SENSOR_CTRL_REGISTER_MAPPING_H + +//----------------------------------------------------------------------------- +// Register Bank name is SISLEY_SENSOR_IF_CTRL +//----------------------------------------------------------------------------- + +#define SISLEY_SENSOR_CTRL_BASE_ADDRESS 0x00000000 // regbank_address +#define SISLEY_SENSOR_CTRL_START_ADDR 0x00000000 // regbank_address +#define SISLEY_SENSOR_CTRL_LAST_ADDR 0x0000001C // regbank_address +#define SISLEY_SENSOR_GLOBAL_CTRL_ADDR 0x00000000 // regbank_address +#define SISLEY_SENSOR_ROI_CTRL_ADDR 0x00000004 // regbank_address +#define SISLEY_SENSOR_READOUT_CTRL_ADDR 0x00000008 // regbank_address +#define SISLEY_SENSOR_TESTBUS_CTRL_ADDR 0x0000000C // regbank_address +#define SISLEY_SENSOR_CLKSYNC_CTRL_ADDR 0x00000010 // regbank_address +#define SISLEY_SENSOR_LIFO_CTRL_ADDR 0x00000014 // regbank_address +#define SISLEY_SENSOR_CHIP_ID_ADDR 0x00000018 // regbank_address +#define SISLEY_SENSOR_SPARE_CTRL_ADDR 0x0000001C // regbank_address +#define SISLEY_SENSOR_GLOBAL_CTRL 0x00000000 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_ROI_CTRL 0x0000000C // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_READOUT_CTRL 0x0037DFFF // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_TESTBUS_CTRL 0x00000040 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_CLKSYNC_CTRL 0x00000007 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_LIFO_CTRL 0x00000000 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_CHIP_ID 0x90100401 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_SPARE_CTRL 0x00000000 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_GLOBAL_CTRL_TD_COUPLE_BIT_IDX 0 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_GLOBAL_CTRL_SW_GLOBAL_EN_BIT_IDX 1 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_GLOBAL_CTRL_BYPASS_DIGITAL_BIT_IDX 2 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_GLOBAL_CTRL_BGEN_RSTN_BIT_IDX 3 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_GLOBAL_CTRL_BGEN_EN_BIT_IDX 4 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_GLOBAL_CTRL_TOP_CLK_DIV_EN_BIT_IDX 5 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_GLOBAL_CTRL_TOP_CLK_DIV_BIT_IDX 6 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_GLOBAL_CTRL_TD_COUPLE_DEFAULT 0 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_GLOBAL_CTRL_SW_GLOBAL_EN_DEFAULT 0 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_GLOBAL_CTRL_BYPASS_DIGITAL_DEFAULT 0 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_GLOBAL_CTRL_BGEN_RSTN_DEFAULT 0 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_GLOBAL_CTRL_BGEN_EN_DEFAULT 0 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_GLOBAL_CTRL_TOP_CLK_DIV_EN_DEFAULT 0 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_GLOBAL_CTRL_TOP_CLK_DIV_DEFAULT 0 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_ROI_CTRL_ROI_EM_EN_BIT_IDX 0 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_ROI_CTRL_ROI_TD_EN_BIT_IDX 1 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_ROI_CTRL_ROI_EM_RSTN_BIT_IDX 2 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_ROI_CTRL_ROI_TD_RSTN_BIT_IDX 3 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_ROI_CTRL_ROI_EM_SHADOW_TRIG_BIT_IDX 4 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_ROI_CTRL_ROI_TD_SHADOW_TRIG_BIT_IDX 5 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_ROI_CTRL_RONI_EN_BIT_IDX 6 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_ROI_CTRL_ROI_EM_SCAN_EN_BIT_IDX 7 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_ROI_CTRL_ROI_TD_SCAN_EN_BIT_IDX 8 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_ROI_CTRL_ROI_EM_EN_DEFAULT 0 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_ROI_CTRL_ROI_TD_EN_DEFAULT 0 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_ROI_CTRL_ROI_EM_RSTN_DEFAULT 1 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_ROI_CTRL_ROI_TD_RSTN_DEFAULT 1 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_ROI_CTRL_ROI_EM_SHADOW_TRIG_DEFAULT 0 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_ROI_CTRL_ROI_TD_SHADOW_TRIG_DEFAULT 0 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_ROI_CTRL_RONI_EN_DEFAULT 0 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_ROI_CTRL_ROI_EM_SCAN_EN_DEFAULT 0 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_ROI_CTRL_ROI_TD_SCAN_EN_DEFAULT 0 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_READOUT_CTRL_RO_DELAY_RSTN_BIT_IDX 0 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_READOUT_CTRL_RO_INTERFACE_X_RSTN_BIT_IDX 1 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_READOUT_CTRL_RO_LATCH_Y_RSTN_BIT_IDX 2 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_READOUT_CTRL_RO_ACK_ARRAY_RSTN_BIT_IDX 3 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_READOUT_CTRL_RO_CTRL_RSTN_BIT_IDX 4 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_READOUT_CTRL_RO_LATCH_DUM_CONNECT_BIT_IDX 5 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_READOUT_CTRL_RO_LATCH_DUM_RSTN_BIT_IDX 6 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_READOUT_CTRL_RO_PIXEL_DUM_RSTN_BIT_IDX 7 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_READOUT_CTRL_RO_INTERFACE_Y_RSTN_BIT_IDX 8 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_READOUT_CTRL_RO_LATCH_X_RSTN_BIT_IDX 9 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_READOUT_CTRL_RO_STAT_X_BIT_IDX 10 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_READOUT_CTRL_RO_ACT_PUX_BIT_IDX 11 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_READOUT_CTRL_RO_STAT_Y_BIT_IDX 14 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_READOUT_CTRL_RO_ACT_PUY_BIT_IDX 15 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_READOUT_CTRL_RO_PIPELINE_BIT_IDX 16 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_READOUT_CTRL_RO_ACT_PDY_BIT_IDX 17 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_READOUT_CTRL_RO_ACT_PDX_BIT_IDX 20 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_READOUT_CTRL_RO_INV_REQ_EM_BIT_IDX 23 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_READOUT_CTRL_RO_INV_POL_EM_BIT_IDX 24 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_READOUT_CTRL_RO_INV_ACK_EM_BIT_IDX 25 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_READOUT_CTRL_RO_INV_REQ_TD_BIT_IDX 26 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_READOUT_CTRL_RO_INV_POL_TD_BIT_IDX 27 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_READOUT_CTRL_RO_INV_ACK_TD_BIT_IDX 28 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_READOUT_CTRL_RO_DELAY_RSTN_DEFAULT 1 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_READOUT_CTRL_RO_INTERFACE_X_RSTN_DEFAULT 1 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_READOUT_CTRL_RO_LATCH_Y_RSTN_DEFAULT 1 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_READOUT_CTRL_RO_ACK_ARRAY_RSTN_DEFAULT 1 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_READOUT_CTRL_RO_CTRL_RSTN_DEFAULT 1 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_READOUT_CTRL_RO_LATCH_DUM_CONNECT_DEFAULT 1 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_READOUT_CTRL_RO_LATCH_DUM_RSTN_DEFAULT 1 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_READOUT_CTRL_RO_PIXEL_DUM_RSTN_DEFAULT 1 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_READOUT_CTRL_RO_INTERFACE_Y_RSTN_DEFAULT 1 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_READOUT_CTRL_RO_LATCH_X_RSTN_DEFAULT 1 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_READOUT_CTRL_RO_STAT_X_DEFAULT 1 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_READOUT_CTRL_RO_ACT_PUX_DEFAULT 3 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_READOUT_CTRL_RO_STAT_Y_DEFAULT 1 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_READOUT_CTRL_RO_ACT_PUY_DEFAULT 1 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_READOUT_CTRL_RO_PIPELINE_DEFAULT 1 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_READOUT_CTRL_RO_ACT_PDY_DEFAULT 3 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_READOUT_CTRL_RO_ACT_PDX_DEFAULT 3 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_READOUT_CTRL_RO_INV_REQ_EM_DEFAULT 0 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_READOUT_CTRL_RO_INV_POL_EM_DEFAULT 0 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_READOUT_CTRL_RO_INV_ACK_EM_DEFAULT 0 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_READOUT_CTRL_RO_INV_REQ_TD_DEFAULT 0 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_READOUT_CTRL_RO_INV_POL_TD_DEFAULT 0 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_READOUT_CTRL_RO_INV_ACK_TD_DEFAULT 0 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_TESTBUS_CTRL_TP_SEL_TEST_PHOTODIODE_BIT_IDX 0 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_TESTBUS_CTRL_TP_DIODE_BIT_IDX 1 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_TESTBUS_CTRL_TP_DIODE_TL_BIT_IDX 2 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_TESTBUS_CTRL_TP_DIODE_TR_BIT_IDX 3 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_TESTBUS_CTRL_TP_DIODE_BR_BIT_IDX 4 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_TESTBUS_CTRL_TP_DIODE_BL_BIT_IDX 5 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_TESTBUS_CTRL_TP_PIXEL_DIODE_EN_BIT_IDX 6 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_TESTBUS_CTRL_TP_PIXEL_EN_BIT_IDX 7 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_TESTBUS_CTRL_TBUS_SEL_TPA1_BIT_IDX 8 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_TESTBUS_CTRL_TBUS_SEL_TPA2_BIT_IDX 12 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_TESTBUS_CTRL_TBUS_SEL_TPA3_BIT_IDX 16 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_TESTBUS_CTRL_TBUS_SEL_TPA4_BIT_IDX 20 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_TESTBUS_CTRL_TBUS_SEL_TPD1_BIT_IDX 24 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_TESTBUS_CTRL_TBUS_SEL_TPD2_BIT_IDX 28 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_TESTBUS_CTRL_TP_SEL_TEST_PHOTODIODE_DEFAULT 0 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_TESTBUS_CTRL_TP_DIODE_DEFAULT 0 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_TESTBUS_CTRL_TP_DIODE_TL_DEFAULT 0 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_TESTBUS_CTRL_TP_DIODE_TR_DEFAULT 0 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_TESTBUS_CTRL_TP_DIODE_BR_DEFAULT 0 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_TESTBUS_CTRL_TP_DIODE_BL_DEFAULT 0 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_TESTBUS_CTRL_TP_PIXEL_DIODE_EN_DEFAULT 1 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_TESTBUS_CTRL_TP_PIXEL_EN_DEFAULT 0 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_TESTBUS_CTRL_TBUS_SEL_TPA1_DEFAULT 0 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_TESTBUS_CTRL_TBUS_SEL_TPA2_DEFAULT 0 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_TESTBUS_CTRL_TBUS_SEL_TPA3_DEFAULT 0 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_TESTBUS_CTRL_TBUS_SEL_TPA4_DEFAULT 0 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_TESTBUS_CTRL_TBUS_SEL_TPD1_DEFAULT 0 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_TESTBUS_CTRL_TBUS_SEL_TPD2_DEFAULT 0 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_CLKSYNC_CTRL_CLKOUT_EN_BIT_IDX 0 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_CLKSYNC_CTRL_CLK_DIFF_HI_CM_BIT_IDX 1 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_CLKSYNC_CTRL_CLK_DIFF_IOUT_X2_BIT_IDX 2 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_CLKSYNC_CTRL_CLK_DC_UP_BIT_IDX 3 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_CLKSYNC_CTRL_CLK_POLARITY_BIT_IDX 4 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_CLKSYNC_CTRL_RO_STAT_REQ_X_BIT_IDX 5 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_CLKSYNC_CTRL_RO_STAT_POL_BIT_IDX 6 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_CLKSYNC_CTRL_RO_TD_REQ_LAT_BIT_IDX 7 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_CLKSYNC_CTRL_RO_TD_ACK_LAT_BIT_IDX 10 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_CLKSYNC_CTRL_RO_EM_REQ_LAT_BIT_IDX 13 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_CLKSYNC_CTRL_RO_EM_ACK_LAT_BIT_IDX 16 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_CLKSYNC_CTRL_CLKOUT_EN_DEFAULT 1 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_CLKSYNC_CTRL_CLK_DIFF_HI_CM_DEFAULT 1 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_CLKSYNC_CTRL_CLK_DIFF_IOUT_X2_DEFAULT 1 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_CLKSYNC_CTRL_CLK_DC_UP_DEFAULT 0 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_CLKSYNC_CTRL_CLK_POLARITY_DEFAULT 0 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_CLKSYNC_CTRL_RO_STAT_REQ_X_DEFAULT 0 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_CLKSYNC_CTRL_RO_STAT_POL_DEFAULT 0 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_CLKSYNC_CTRL_RO_TD_REQ_LAT_DEFAULT 0 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_CLKSYNC_CTRL_RO_TD_ACK_LAT_DEFAULT 0 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_CLKSYNC_CTRL_RO_EM_REQ_LAT_DEFAULT 0 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_CLKSYNC_CTRL_RO_EM_ACK_LAT_DEFAULT 0 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_LIFO_CTRL_LIFO_COUNTER_BIT_IDX 0 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_LIFO_CTRL_LIFO_CNT_VALID_BIT_IDX 29 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_LIFO_CTRL_LIFO_CNT_EN_BIT_IDX 30 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_LIFO_CTRL_LIFO_EN_BIT_IDX 31 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_LIFO_CTRL_LIFO_COUNTER_DEFAULT 0 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_LIFO_CTRL_LIFO_CNT_VALID_DEFAULT 0 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_LIFO_CTRL_LIFO_CNT_EN_DEFAULT 0 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_LIFO_CTRL_LIFO_EN_DEFAULT 0 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_CHIP_ID_BIT_IDX 0 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_CHIP_ID_DEFAULT 0 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_SPARE_CTRL_RO_ADDR_Y_STAT_BIT_IDX 0 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_SPARE_CTRL_RO_ADDR_X_STAT_BIT_IDX 1 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_SPARE_CTRL_CLK_OUT_LAT_BIT_IDX 2 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_SPARE_CTRL_RFEED_D_BIT_IDX 22 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_SPARE_CTRL_RFEED_A_BIT_IDX 23 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_SPARE_CTRL_TP_REFR_CLK_EN_BIT_IDX 24 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_SPARE_CTRL_TP_DARK_EN_BIT_IDX 25 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_SPARE_CTRL_TP_QE_EN_BIT_IDX 26 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_SPARE_CTRL_B_TM_BIT_IDX 29 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_SPARE_CTRL_RO_ADDR_Y_STAT_DEFAULT 0 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_SPARE_CTRL_RO_ADDR_X_STAT_DEFAULT 0 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_SPARE_CTRL_CLK_OUT_LAT_DEFAULT 0 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_SPARE_CTRL_RFEED_D_DEFAULT 0 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_SPARE_CTRL_RFEED_A_DEFAULT 0 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_SPARE_CTRL_TP_REFR_CLK_EN_DEFAULT 0 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_SPARE_CTRL_TP_DARK_EN_DEFAULT 0 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_SPARE_CTRL_TP_QE_EN_DEFAULT 0 // SISLEY_SENSOR_SPARE_CTRL_ADDR +#define SISLEY_SENSOR_SPARE_CTRL_B_TM_DEFAULT 0 // SISLEY_SENSOR_SPARE_CTRL_ADDR + +#endif // METAVISION_HAL_SENSOR_CTRL_REGISTER_MAPPING_H diff --git a/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/legacy/stereo_pc_mapping.h b/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/legacy/stereo_pc_mapping.h new file mode 100644 index 000000000..e57dfbe39 --- /dev/null +++ b/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/legacy/stereo_pc_mapping.h @@ -0,0 +1,385 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_STEREO_PC_MAPPING_H +#define METAVISION_HAL_STEREO_PC_MAPPING_H + +#include "boards/utils/config_registers_map.h" +#include "devices/gen3/legacy_regmap_headers/legacy/atis_if_monitor_register_mapping.h" +#include "devices/gen3/legacy_regmap_headers/legacy/ccam2_register_mapping.h" +#include "devices/gen3/legacy_regmap_headers/legacy/ext_trigger_monitor_register_mapping.h" +#include "devices/gen3/legacy_regmap_headers/legacy/fx3_host_if_register_mapping.h" +#include "devices/gen3/legacy_regmap_headers/legacy/ibgen_register_mapping.h" +#include "devices/gen3/legacy_regmap_headers/legacy/roi_register_mapping.h" +#include "devices/gen3/legacy_regmap_headers/legacy/sensor_ctrl_register_mapping.h" +#include "devices/gen3/legacy_regmap_headers/legacy/system_config_register_mapping.h" +#include "devices/gen3/legacy_regmap_headers/legacy/temp_vcc_monitor_register_mapping.h" +#include "devices/gen3/legacy_regmap_headers/legacy/temp_vcc_monitor_xadc_register_mapping.h" + +// clang-format off + +#define CCAM3_BASE_ADDRESS 0x00000000 + +#define CCAM3_SYS_REG_BASE_ADDR 0x00000000 +//Mapping Bank CCAM2_SYSTEM_CONTROL from base address : 0x00000000 - Prefix : CCAM3_ +#define CCAM3_SYSTEM_CONTROL_ADDR 0x00000000 +#define CCAM3_ATIS_CONTROL_ADDR 0x00000000 +#define CCAM3_ATIS_BIASROI_UPDATE_VALUE0_ADDR 0x00000002 +#define CCAM3_ATIS_BIASROI_UPDATE_VALUE1_ADDR 0x00000004 +#define CCAM3_ATIS_BIAS_UPDATE_VALUE2_ADDR 0x00000006 +#define CCAM3_CCAM2_CONTROL_ADDR 0x00000008 +#define CCAM3_TRIGGERS_ADDR 0x0000000a +#define CCAM3_SYSTEM_STATUS_ADDR 0x0000000c +#define CCAM3_FOUT_LSB_STATUS_ADDR 0x0000000e +#define CCAM3_FOUT_MSB_STATUS_ADDR 0x00000010 +#define CCAM3_FIFO_WRCOUNT_STATUS_ADDR 0x00000012 +#define CCAM3_FIFO_CHECKPIX_STATUS_ADDR 0x00000014 +#define CCAM3_TLAST_REARMUS_ADDR 0x00000016 +#define CCAM3_OVERFLOW_HITCOUNT_ADDR 0x00000018 +#define CCAM3_CCAM2_MODE_ADDR 0x0000001a +#define CCAM3_SERIAL_LSB_ADDR 0x0000001c +#define CCAM3_SERIAL_MSB_ADDR 0x00000020 +#define CCAM3_NOTIFY_PACKETCOUNT_ADDR 0x00000022 +#define CCAM3_SNFETCH_FADDR_LSB_ADDR 0x00000024 +#define CCAM3_SNFETCH_FADDR_MSB_ADDR 0x00000026 +#define CCAM3_SNFETCH_RDATA_LSB_ADDR 0x00000028 +#define CCAM3_SNFETCH_RDATA_MSB_ADDR 0x0000002a +#define CCAM3_SNFETCH_READ_ITER_ADDR 0x0000002c +#define CCAM3_SNFETCH_TIME_COUNT_ADDR 0x0000002e +#define CCAM3_BIAS_LOAD_ITERATION_COUNT_ADDR 0x00000030 +#define CCAM3_FLASH_PROGRAM_SEL_SLAVE_ADDR 0x00000032 +#define CCAM3_OUT_OF_FOV_FILTER_WIDTH_ADDR 0x00000034 +#define CCAM3_OUT_OF_FOV_FILTER_HEIGHT_ADDR 0x00000036 +#define CCAM3_SYSTEM_CONTROL_LAST_ADDR 0x00000036 + + +#define CCAM3_SYSTEM_MONITOR_BASE_ADDR 0x00000040 + +#define CCAM3_TEMP_VCC_MONITOR_XADC_BASE_ADDR 0x00000040 +//Mapping Bank TEMP_VCC_MONITOR_XADC from base address : 0x00000040 - Prefix : CCAM3_ +#define CCAM3_TEMP_VCC_MONITOR_XADC_REGISTER_MAPPING_BASE_ADDR 0x00000040 +#define CCAM3_TEMP_VCC_MONITOR_XADC_TEMP_ADDR 0x00000040 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VCC_INT_ADDR 0x00000042 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VCC_AUX_ADDR 0x00000044 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VP_VN_ADDR 0x00000046 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VREFP_ADDR 0x00000048 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VREFN_ADDR 0x0000004a +#define CCAM3_TEMP_VCC_MONITOR_XADC_VCC_BRAM_ADDR 0x0000004c +#define CCAM3_TEMP_VCC_MONITOR_XADC_SUPPLY_OFFSET_ADDR 0x00000050 +#define CCAM3_TEMP_VCC_MONITOR_XADC_OFFSET_ADDR 0x00000052 +#define CCAM3_TEMP_VCC_MONITOR_XADC_GAIN_ERROR_ADDR 0x00000054 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX0_ADDR 0x00000060 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX1_ADDR 0x00000062 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX2_ADDR 0x00000064 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX3_ADDR 0x00000066 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX4_ADDR 0x00000068 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX5_ADDR 0x0000006a +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX6_ADDR 0x0000006c +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX7_ADDR 0x0000006e +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX8_ADDR 0x00000070 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX9_ADDR 0x00000072 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX10_ADDR 0x00000074 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX11_ADDR 0x00000076 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX12_ADDR 0x00000078 +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX13_ADDR 0x0000007a +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX14_ADDR 0x0000007c +#define CCAM3_TEMP_VCC_MONITOR_XADC_VAUX15_ADDR 0x0000007e +#define CCAM3_TEMP_VCC_MONITOR_XADC_MAX_TEMP_ADDR 0x00000080 +#define CCAM3_TEMP_VCC_MONITOR_XADC_MAX_VCC_INT_ADDR 0x00000082 +#define CCAM3_TEMP_VCC_MONITOR_XADC_MAX_VCC_AUX_ADDR 0x00000084 +#define CCAM3_TEMP_VCC_MONITOR_XADC_MAX_VCC_BRAM_ADDR 0x00000086 +#define CCAM3_TEMP_VCC_MONITOR_XADC_MIN_TEMP_ADDR 0x00000088 +#define CCAM3_TEMP_VCC_MONITOR_XADC_MIN_VCC_INT_ADDR 0x0000008a +#define CCAM3_TEMP_VCC_MONITOR_XADC_MIN_VCC_AUX_ADDR 0x0000008c +#define CCAM3_TEMP_VCC_MONITOR_XADC_MIN_VCC_BRAM_ADDR 0x0000008e +#define CCAM3_TEMP_VCC_MONITOR_XADC_FLAGS_ADDR 0x000000be +#define CCAM3_TEMP_VCC_MONITOR_XADC_CONF_REG0_ADDR 0x000000c0 +#define CCAM3_TEMP_VCC_MONITOR_XADC_CONF_REG1_ADDR 0x000000c2 +#define CCAM3_TEMP_VCC_MONITOR_XADC_CONF_REG2_ADDR 0x000000c4 +#define CCAM3_TEMP_VCC_MONITOR_XADC_SEQ_REG0_ADDR 0x000000d0 +#define CCAM3_TEMP_VCC_MONITOR_XADC_SEQ_REG1_ADDR 0x000000d2 +#define CCAM3_TEMP_VCC_MONITOR_XADC_SEQ_REG2_ADDR 0x000000d4 +#define CCAM3_TEMP_VCC_MONITOR_XADC_SEQ_REG3_ADDR 0x000000d6 +#define CCAM3_TEMP_VCC_MONITOR_XADC_SEQ_REG4_ADDR 0x000000d8 +#define CCAM3_TEMP_VCC_MONITOR_XADC_SEQ_REG5_ADDR 0x000000da +#define CCAM3_TEMP_VCC_MONITOR_XADC_SEQ_REG6_ADDR 0x000000dc +#define CCAM3_TEMP_VCC_MONITOR_XADC_SEQ_REG7_ADDR 0x000000de +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG0_ADDR 0x000000e0 +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG1_ADDR 0x000000e2 +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG2_ADDR 0x000000e4 +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG3_ADDR 0x000000e6 +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG4_ADDR 0x000000e8 +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG5_ADDR 0x000000ea +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG6_ADDR 0x000000ec +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG7_ADDR 0x000000ee +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG8_ADDR 0x000000f0 +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG9_ADDR 0x000000f2 +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG10_ADDR 0x000000f4 +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG11_ADDR 0x000000f6 +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG12_ADDR 0x000000f8 +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG13_ADDR 0x000000fa +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG14_ADDR 0x000000fc +#define CCAM3_TEMP_VCC_MONITOR_XADC_ALARM_THR_REG15_ADDR 0x000000fe + + +#define CCAM3_TEMP_VCC_MONITOR_BASE_ADDR 0x00000140 +//Mapping Bank TEMP_VCC_MONITOR from base address : 0x00000140 - Prefix : CCAM3_ +#define CCAM3_TEMP_VCC_MONITOR_REGISTER_MAPPING_BASE_ADDR 0x00000140 +#define CCAM3_TEMP_VCC_MONITOR_EVT_ENABLE_ADDR 0x00000140 +#define CCAM3_TEMP_VCC_MONITOR_EVT_PERIOD_ADDR 0x00000144 +#define CCAM3_TEMP_VCC_MONITOR_EXT_TEMP_CONTROL_ADDR 0x00000148 +#define CCAM3_TEMP_VCC_MONITOR_EVK_EXT_TEMP_VALUE_ADDR 0x0000014c +#define CCAM3_TEMP_VCC_MONITOR_REGISTER_MAPPING_LAST_ADDR 0x0000014c + + +#define CCAM3_ATIS_IF_MONITOR_BASE_ADDR 0x00000180 +//Mapping Bank ATIF_IF_MONITOR from base address : 0x00000180 - Prefix : CCAM3_ +#define CCAM3_ATIS_IF_MONITOR_CFG_ENABLE_ADDR 0x00000180 +#define CCAM3_ATIS_IF_MONITOR_CFG_IDLE_TIME_ADDR 0x00000184 +#define CCAM3_ATIS_IF_MONITOR_CFG_TIMEOUT_THR_ADDR 0x00000188 + + +#define CCAM3_EXT_TRIGGER_MONITOR_BASE_ADDR 0x000001a0 +//Mapping Bank EXT_TRIGGER_MONITOR from base address : 0x000001a0 - Prefix : CCAM3_ +#define CCAM3_SYSTEM_MONITOR_EXT_TRIGGERS_ENABLE_ADDR 0x000001a0 + + +#define CCAM3_SENSOR_IF_BASE_ADDR 0x00000200 + +#define CCAM3_SISLEY_SPI_BASE_ADDR 0x00000200 + +#define CCAM3_SISLEY_CTRL_BASE_ADDR 0x00000200 +//Mapping Bank SISLEY_SENSOR_IF_CTRL from base address : 0x00000200 - Prefix : CCAM3_ +#define CCAM3_SISLEY_SENSOR_CTRL_BASE_ADDRESS 0x00000200 +#define CCAM3_SISLEY_SENSOR_CTRL_START_ADDR 0x00000200 +#define CCAM3_SISLEY_SENSOR_CTRL_LAST_ADDR 0x0000021c +#define CCAM3_SISLEY_SENSOR_GLOBAL_CTRL_ADDR 0x00000200 +#define CCAM3_SISLEY_SENSOR_ROI_CTRL_ADDR 0x00000204 +#define CCAM3_SISLEY_SENSOR_READOUT_CTRL_ADDR 0x00000208 +#define CCAM3_SISLEY_SENSOR_TESTBUS_CTRL_ADDR 0x0000020c +#define CCAM3_SISLEY_SENSOR_CLKSYNC_CTRL_ADDR 0x00000210 +#define CCAM3_SISLEY_SENSOR_LIFO_CTRL_ADDR 0x00000214 +#define CCAM3_SISLEY_SENSOR_CHIP_ID_ADDR 0x00000218 +#define CCAM3_SISLEY_SENSOR_SPARE_CTRL_ADDR 0x0000021c + + +#define CCAM3_SISLEY_IBGEN_BASE_ADDR 0x00000300 +//Mapping Bank SISLEY_SENSOR_IF_IBGEN from base address : 0x00000300 - Prefix : CCAM3_ +#define CCAM3_SISLEY_IBGEN_BASE_ADDRESS 0x00000300 +#define CCAM3_SISLEY_IBGEN_START_ADDR 0x00000300 +#define CCAM3_SISLEY_IBGEN_LAST_ADDR 0x00000368 +#define CCAM3_SISLEY_IBGEN_VECTOR_0_ADDR 0x00000300 +#define CCAM3_SISLEY_IBGEN_VECTOR_1_ADDR 0x00000304 +#define CCAM3_SISLEY_IBGEN_VECTOR_2_ADDR 0x00000308 +#define CCAM3_SISLEY_IBGEN_VECTOR_3_ADDR 0x0000030c +#define CCAM3_SISLEY_IBGEN_VECTOR_4_ADDR 0x00000310 +#define CCAM3_SISLEY_IBGEN_VECTOR_5_ADDR 0x00000314 +#define CCAM3_SISLEY_IBGEN_VECTOR_6_ADDR 0x00000318 +#define CCAM3_SISLEY_IBGEN_VECTOR_7_ADDR 0x0000031c +#define CCAM3_SISLEY_IBGEN_VECTOR_8_ADDR 0x00000320 +#define CCAM3_SISLEY_IBGEN_VECTOR_9_ADDR 0x00000324 +#define CCAM3_SISLEY_IBGEN_VECTOR_10_ADDR 0x00000328 +#define CCAM3_SISLEY_IBGEN_VECTOR_11_ADDR 0x0000032c +#define CCAM3_SISLEY_IBGEN_VECTOR_12_ADDR 0x00000330 +#define CCAM3_SISLEY_IBGEN_VECTOR_13_ADDR 0x00000334 +#define CCAM3_SISLEY_IBGEN_VECTOR_14_ADDR 0x00000338 +#define CCAM3_SISLEY_IBGEN_VECTOR_15_ADDR 0x0000033c +#define CCAM3_SISLEY_IBGEN_VECTOR_16_ADDR 0x00000340 +#define CCAM3_SISLEY_IBGEN_VECTOR_17_ADDR 0x00000344 +#define CCAM3_SISLEY_IBGEN_VECTOR_18_ADDR 0x00000348 +#define CCAM3_SISLEY_IBGEN_VECTOR_19_ADDR 0x0000034c +#define CCAM3_SISLEY_IBGEN_VECTOR_20_ADDR 0x00000350 +#define CCAM3_SISLEY_IBGEN_VECTOR_21_ADDR 0x00000354 +#define CCAM3_SISLEY_IBGEN_VECTOR_22_ADDR 0x00000358 +#define CCAM3_SISLEY_IBGEN_VECTOR_23_ADDR 0x0000035c +#define CCAM3_SISLEY_IBGEN_VECTOR_24_ADDR 0x00000360 +#define CCAM3_SISLEY_IBGEN_VECTOR_25_ADDR 0x00000364 +#define CCAM3_SISLEY_IBGEN_VECTOR_26_ADDR 0x00000368 + + +#define CCAM3_SISLEY_ROI_BASE_ADDR 0x00000400 +//Mapping Bank SISLEY_SENSOR_IF_ROI from base address : 0x00000400 - Prefix : CCAM3_ +#define CCAM3_SISLEY_ROI_BASE_ADDRESS 0x00000400 +#define CCAM3_SISLEY_ROI_START_ADDR 0x00000400 +#define CCAM3_SISLEY_ROI_LAST_ADDR 0x0000073c +#define CCAM3_SISLEY_ROI_TD_X_START_ADDR 0x00000400 +#define CCAM3_SISLEY_ROI_TD_X_LAST_ADDR 0x00000450 +#define CCAM3_SISLEY_ROI_TD_X_0_ADDR 0x00000400 +#define CCAM3_SISLEY_ROI_TD_X_1_ADDR 0x00000404 +#define CCAM3_SISLEY_ROI_TD_X_2_ADDR 0x00000408 +#define CCAM3_SISLEY_ROI_TD_X_3_ADDR 0x0000040c +#define CCAM3_SISLEY_ROI_TD_X_4_ADDR 0x00000410 +#define CCAM3_SISLEY_ROI_TD_X_5_ADDR 0x00000414 +#define CCAM3_SISLEY_ROI_TD_X_6_ADDR 0x00000418 +#define CCAM3_SISLEY_ROI_TD_X_7_ADDR 0x0000041c +#define CCAM3_SISLEY_ROI_TD_X_8_ADDR 0x00000420 +#define CCAM3_SISLEY_ROI_TD_X_9_ADDR 0x00000424 +#define CCAM3_SISLEY_ROI_TD_X_10_ADDR 0x00000428 +#define CCAM3_SISLEY_ROI_TD_X_11_ADDR 0x0000042c +#define CCAM3_SISLEY_ROI_TD_X_12_ADDR 0x00000430 +#define CCAM3_SISLEY_ROI_TD_X_13_ADDR 0x00000434 +#define CCAM3_SISLEY_ROI_TD_X_14_ADDR 0x00000438 +#define CCAM3_SISLEY_ROI_TD_X_15_ADDR 0x0000043c +#define CCAM3_SISLEY_ROI_TD_X_16_ADDR 0x00000440 +#define CCAM3_SISLEY_ROI_TD_X_17_ADDR 0x00000444 +#define CCAM3_SISLEY_ROI_TD_X_18_ADDR 0x00000448 +#define CCAM3_SISLEY_ROI_TD_X_19_ADDR 0x0000044c +#define CCAM3_SISLEY_ROI_TD_X_20_ADDR 0x00000450 +#define CCAM3_SISLEY_ROI_TD_Y_START_ADDR 0x00000500 +#define CCAM3_SISLEY_ROI_TD_Y_LAST_ADDR 0x0000053c +#define CCAM3_SISLEY_ROI_TD_Y_0_ADDR 0x00000500 +#define CCAM3_SISLEY_ROI_TD_Y_1_ADDR 0x00000504 +#define CCAM3_SISLEY_ROI_TD_Y_2_ADDR 0x00000508 +#define CCAM3_SISLEY_ROI_TD_Y_3_ADDR 0x0000050c +#define CCAM3_SISLEY_ROI_TD_Y_4_ADDR 0x00000510 +#define CCAM3_SISLEY_ROI_TD_Y_5_ADDR 0x00000514 +#define CCAM3_SISLEY_ROI_TD_Y_6_ADDR 0x00000518 +#define CCAM3_SISLEY_ROI_TD_Y_7_ADDR 0x0000051c +#define CCAM3_SISLEY_ROI_TD_Y_8_ADDR 0x00000520 +#define CCAM3_SISLEY_ROI_TD_Y_9_ADDR 0x00000524 +#define CCAM3_SISLEY_ROI_TD_Y_10_ADDR 0x00000528 +#define CCAM3_SISLEY_ROI_TD_Y_11_ADDR 0x0000052c +#define CCAM3_SISLEY_ROI_TD_Y_12_ADDR 0x00000530 +#define CCAM3_SISLEY_ROI_TD_Y_13_ADDR 0x00000534 +#define CCAM3_SISLEY_ROI_TD_Y_14_ADDR 0x00000538 +#define CCAM3_SISLEY_ROI_TD_Y_15_ADDR 0x0000053c +#define CCAM3_SISLEY_ROI_EM_X_START_ADDR 0x00000600 +#define CCAM3_SISLEY_ROI_EM_X_LAST_ADDR 0x00000650 +#define CCAM3_SISLEY_ROI_EM_X_0_ADDR 0x00000600 +#define CCAM3_SISLEY_ROI_EM_X_1_ADDR 0x00000604 +#define CCAM3_SISLEY_ROI_EM_X_2_ADDR 0x00000608 +#define CCAM3_SISLEY_ROI_EM_X_3_ADDR 0x0000060c +#define CCAM3_SISLEY_ROI_EM_X_4_ADDR 0x00000610 +#define CCAM3_SISLEY_ROI_EM_X_5_ADDR 0x00000614 +#define CCAM3_SISLEY_ROI_EM_X_6_ADDR 0x00000618 +#define CCAM3_SISLEY_ROI_EM_X_7_ADDR 0x0000061c +#define CCAM3_SISLEY_ROI_EM_X_8_ADDR 0x00000620 +#define CCAM3_SISLEY_ROI_EM_X_9_ADDR 0x00000624 +#define CCAM3_SISLEY_ROI_EM_X_10_ADDR 0x00000628 +#define CCAM3_SISLEY_ROI_EM_X_11_ADDR 0x0000062c +#define CCAM3_SISLEY_ROI_EM_X_12_ADDR 0x00000630 +#define CCAM3_SISLEY_ROI_EM_X_13_ADDR 0x00000634 +#define CCAM3_SISLEY_ROI_EM_X_14_ADDR 0x00000638 +#define CCAM3_SISLEY_ROI_EM_X_15_ADDR 0x0000063c +#define CCAM3_SISLEY_ROI_EM_X_16_ADDR 0x00000640 +#define CCAM3_SISLEY_ROI_EM_X_17_ADDR 0x00000644 +#define CCAM3_SISLEY_ROI_EM_X_18_ADDR 0x00000648 +#define CCAM3_SISLEY_ROI_EM_X_19_ADDR 0x0000064c +#define CCAM3_SISLEY_ROI_EM_X_20_ADDR 0x00000650 +#define CCAM3_SISLEY_ROI_EM_Y_START_ADDR 0x00000700 +#define CCAM3_SISLEY_ROI_EM_Y_LAST_ADDR 0x0000073c +#define CCAM3_SISLEY_ROI_EM_Y_0_ADDR 0x00000700 +#define CCAM3_SISLEY_ROI_EM_Y_1_ADDR 0x00000704 +#define CCAM3_SISLEY_ROI_EM_Y_2_ADDR 0x00000708 +#define CCAM3_SISLEY_ROI_EM_Y_3_ADDR 0x0000070c +#define CCAM3_SISLEY_ROI_EM_Y_4_ADDR 0x00000710 +#define CCAM3_SISLEY_ROI_EM_Y_5_ADDR 0x00000714 +#define CCAM3_SISLEY_ROI_EM_Y_6_ADDR 0x00000718 +#define CCAM3_SISLEY_ROI_EM_Y_7_ADDR 0x0000071c +#define CCAM3_SISLEY_ROI_EM_Y_8_ADDR 0x00000720 +#define CCAM3_SISLEY_ROI_EM_Y_9_ADDR 0x00000724 +#define CCAM3_SISLEY_ROI_EM_Y_10_ADDR 0x00000728 +#define CCAM3_SISLEY_ROI_EM_Y_11_ADDR 0x0000072c +#define CCAM3_SISLEY_ROI_EM_Y_12_ADDR 0x00000730 +#define CCAM3_SISLEY_ROI_EM_Y_13_ADDR 0x00000734 +#define CCAM3_SISLEY_ROI_EM_Y_14_ADDR 0x00000738 +#define CCAM3_SISLEY_ROI_EM_Y_15_ADDR 0x0000073c + +#define CCAM3_SISLEY_IF_BASE_ADDR 0x00000740 +#define CCAM3_SISLEY_IF_LAST_ADDR 0x00000750 +#define CCAM3_SISLEY_IF_SIZE 0x000000C0 + +#define CCAM3_SISLEY_IF_TEST_PATTERN_CONTROL_ADDR 0x00000740 +#define CCAM3_SISLEY_IF_TEST_PATTERN_CONTROL_ENABLE_BIT_IDX 0 +#define CCAM3_SISLEY_IF_TEST_PATTERN_CONTROL_ENABLE_WIDTH 1 +#define CCAM3_SISLEY_IF_TEST_PATTERN_CONTROL_ENABLE_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IF_TEST_PATTERN_CONTROL_TYPE_BIT_IDX 4 +#define CCAM3_SISLEY_IF_TEST_PATTERN_CONTROL_TYPE_WIDTH 1 +#define CCAM3_SISLEY_IF_TEST_PATTERN_CONTROL_TYPE_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IF_TEST_PATTERN_CONTROL_PIXEL_TYPE_BIT_IDX 8 +#define CCAM3_SISLEY_IF_TEST_PATTERN_CONTROL_PIXEL_TYPE_WIDTH 1 +#define CCAM3_SISLEY_IF_TEST_PATTERN_CONTROL_PIXEL_TYPE_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IF_TEST_PATTERN_CONTROL_PIXEL_POLARITY_BIT_IDX 12 +#define CCAM3_SISLEY_IF_TEST_PATTERN_CONTROL_PIXEL_POLARITY_WIDTH 1 +#define CCAM3_SISLEY_IF_TEST_PATTERN_CONTROL_PIXEL_POLARITY_DEFAULT 0x00000000 + +#define CCAM3_SISLEY_IF_TEST_PATTERN_N_PERIOD_ADDR 0x00000744 +#define CCAM3_SISLEY_IF_TEST_PATTERN_N_PERIOD_VALID_RATIO_BIT_IDX 0 +#define CCAM3_SISLEY_IF_TEST_PATTERN_N_PERIOD_VALID_RATIO_WIDTH 10 +#define CCAM3_SISLEY_IF_TEST_PATTERN_N_PERIOD_VALID_RATIO_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IF_TEST_PATTERN_N_PERIOD_LENGTH_BIT_IDX 16 +#define CCAM3_SISLEY_IF_TEST_PATTERN_N_PERIOD_LENGTH_WIDTH 16 +#define CCAM3_SISLEY_IF_TEST_PATTERN_N_PERIOD_LENGTH_DEFAULT 0x00000000 + +#define CCAM3_SISLEY_IF_TEST_PATTERN_P_PERIOD_ADDR 0x00000748 +#define CCAM3_SISLEY_IF_TEST_PATTERN_P_PERIOD_VALID_RATIO_BIT_IDX 0 +#define CCAM3_SISLEY_IF_TEST_PATTERN_P_PERIOD_VALID_RATIO_WIDTH 10 +#define CCAM3_SISLEY_IF_TEST_PATTERN_P_PERIOD_VALID_RATIO_DEFAULT 0x00000000 +#define CCAM3_SISLEY_IF_TEST_PATTERN_P_PERIOD_LENGTH_BIT_IDX 16 +#define CCAM3_SISLEY_IF_TEST_PATTERN_P_PERIOD_LENGTH_WIDTH 16 +#define CCAM3_SISLEY_IF_TEST_PATTERN_P_PERIOD_LENGTH_DEFAULT 0x00000000 + + +#define STEREO_SYSTEM_CONFIG_BASE_ADDR 0x00000800 +//Mapping Bank SYSTEM_CONFIG from base address : 0x00000800 - Prefix : CCAM3_ +#define CCAM3_SYSTEM_CONFIG_BASE_ADDR 0x00000800 +#define CCAM3_SYSTEM_CONFIG_ADDR 0x00000800 +#define CCAM3_SYSTEM_CONFIG_ID_ADDR 0x00000800 +#define CCAM3_SYSTEM_CONFIG_VERSION_ADDR 0x00000804 +#define CCAM3_SYSTEM_CONFIG_BUILD_DATE_ADDR 0x00000808 +#define CCAM3_SYSTEM_CONFIG_VERSION_CONTROL_ID_ADDR 0x0000080c +#define CCAM3_SYSTEM_CONFIG_LAST_ADDR 0x0000080c + + +#define STEREO_FX3_HOST_IF_BASE_ADDR 0x00001400 +//Mapping Bank FX3_HOST_IF from base address : 0x00001400 - Prefix : CCAM3_ +#define CCAM3_FX3_HOST_IF_REGISTER_MAPPING_BASE_ADDR 0x00001400 +#define CCAM3_FX3_HOST_IF_PKT_END_ENABLE_ADDR 0x00001400 +#define CCAM3_FX3_HOST_IF_PKT_END_INTERVAL_US_ADDR 0x00001404 +#define CCAM3_FX3_HOST_IF_PKT_END_DATA_COUNT_ADDR 0x00001408 +#define CCAM3_REG00_ADDR_BIT_ADDR 0x00001400 +#define CCAM3_REG01_ADDR_BIT_ADDR 0x00001404 +#define CCAM3_REG02_ADDR_BIT_ADDR 0x00001408 +#define CCAM3_REG03_ADDR_BIT_ADDR 0x0000140c +#define CCAM3_REG04_ADDR_BIT_ADDR 0x00001410 +#define CCAM3_REG05_ADDR_BIT_ADDR 0x00001414 +#define CCAM3_REG06_ADDR_BIT_ADDR 0x00001418 +#define CCAM3_REG07_ADDR_BIT_ADDR 0x0000141c +#define CCAM3_REG08_ADDR_BIT_ADDR 0x00001420 +#define CCAM3_REG09_ADDR_BIT_ADDR 0x00001424 +#define CCAM3_REG10_ADDR_BIT_ADDR 0x00001428 +#define CCAM3_REG11_ADDR_BIT_ADDR 0x0000142c +#define CCAM3_REG12_ADDR_BIT_ADDR 0x00001430 +#define CCAM3_REG13_ADDR_BIT_ADDR 0x00001434 +#define CCAM3_REG14_ADDR_BIT_ADDR 0x00001438 +#define CCAM3_REG15_ADDR_BIT_ADDR 0x0000143c +#define CCAM3_FX3_HOST_IF_LAST_ADDR 0x0000143c + +#define CCAM4_MIPI_HOST_IF_BASE_ADDR 0x00001500 +//Mapping Bank MIPI_HOST_IF from base address : 0x00001500 - Prefix : CCAM4_ +#define CCAM4_MIPI_HOST_IF_BASE_ADDR 0x00001500 +#define CCAM4_MIPI_HOST_IF_CONTROL_ADDR 0x00001500 +#define CCAM4_MIPI_HOST_IF_DATA_IDENTIFIER_ADDR 0x00001504 +#define CCAM4_MIPI_HOST_IF_FRAME_PERIOD_ADDR 0x00001508 +#define CCAM4_MIPI_HOST_IF_PACKET_TIMEOUT_ADDR 0x0000150c +#define CCAM4_MIPI_HOST_IF_PACKET_SIZE_ADDR 0x00001510 +#define CCAM4_MIPI_HOST_IF_START_TIME_ADDR 0x00001514 +#define CCAM4_MIPI_HOST_IF_START_FRAME_TIME_ADDR 0x00001518 +#define CCAM4_MIPI_HOST_IF_END_FRAME_TIME_ADDR 0x0000151c +#define CCAM4_MIPI_HOST_IF_INTER_FRAME_TIME_ADDR 0x00001520 +#define CCAM4_MIPI_HOST_IF_INTER_PACKET_TIME_ADDR 0x00001524 +#define CCAM4_MIPI_HOST_IF_END_ADDR 0x00001528 + +#define CCAM4_MIPI_AVAILABILITY_ADDR 0x00001800 + +// clang-format on + +#endif // METAVISION_HAL_STEREO_PC_MAPPING_H diff --git a/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/legacy/system_config_register_mapping.h b/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/legacy/system_config_register_mapping.h new file mode 100644 index 000000000..f015b3911 --- /dev/null +++ b/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/legacy/system_config_register_mapping.h @@ -0,0 +1,41 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_SYSTEM_CONFIG_REGISTER_MAPPING_H +#define METAVISION_HAL_SYSTEM_CONFIG_REGISTER_MAPPING_H + +//----------------------------------------------------------------------------- +// Register Bank name is SYSTEM_CONFIG +//----------------------------------------------------------------------------- + +//----------------------------------------------------------------------------- +// Register Bank Base Address +//----------------------------------------------------------------------------- +#define SYSTEM_CONFIG_BASE_ADDRESS 0x00000000 // regbank_address + +//----------------------------------------------------------------------------- +// Register Address Map +//----------------------------------------------------------------------------- +#define SYSTEM_CONFIG_BASE_ADDR 0x00000000 // regbank_address +#define SYSTEM_CONFIG_ADDR 0x00000000 // regbank_address +#define SYSTEM_CONFIG_ID_ADDR 0x00000000 // regbank_address +#define SYSTEM_CONFIG_VERSION_ADDR 0x00000004 // regbank_address +#define SYSTEM_CONFIG_BUILD_DATE_ADDR 0x00000008 // regbank_address +#define SYSTEM_CONFIG_VERSION_CONTROL_ID_ADDR 0x0000000C // regbank_address +#define SYSTEM_CONFIG_LAST_ADDR 0x0000000C // regbank_address +// last register bank address defined at 0x0000000C + +#define STEREO_SYS_DATA0_ADDR 0x00000000 // regbank_address +#define STEREO_SYS_DATA1_ADDR 0x00000004 // regbank_address +#define STEREO_SYS_DATA2_ADDR 0x00000008 // regbank_address +#define STEREO_SYS_DATA4_ADDR 0x0000000C // regbank_address + +#endif // METAVISION_HAL_SYSTEM_CONFIG_REGISTER_MAPPING_H diff --git a/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/legacy/system_monitor_register_mapping.h b/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/legacy/system_monitor_register_mapping.h new file mode 100644 index 000000000..a2e393113 --- /dev/null +++ b/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/legacy/system_monitor_register_mapping.h @@ -0,0 +1,83 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_SYSTEM_MONITOR_REGISTER_MAPPING_H +#define METAVISION_HAL_SYSTEM_MONITOR_REGISTER_MAPPING_H + +//----------------------------------------------------------------------------- +// Register Bank name is TEMP_VCC_XADC_MONITOR +//----------------------------------------------------------------------------- + +#define SYSTEM_MONITOR_XADC_REGISTER_MAPPING_BASE_ADDR 0x00000000 // regbank_address +#define SYSTEM_MONITOR_FPGA_TEMP_ADDR 0x00000000 // regbank_address +#define SYSTEM_MONITOR_VCC_INT_ADDR 0x00000002 // regbank_address +#define SYSTEM_MONITOR_VCC_AUX_ADDR 0x00000004 // regbank_address +#define SYSTEM_MONITOR_VP_VN_ADDR 0x00000006 // regbank_address +#define SYSTEM_MONITOR_VREFP_ADDR 0x00000008 // regbank_address +#define SYSTEM_MONITOR_VREFN_ADDR 0x0000000A // regbank_address +#define SYSTEM_MONITOR_VCC_BRAM_ADDR 0x0000000C // regbank_address +#define SYSTEM_MONITOR_XADC_SUPPLY_OFFSET_ADDR 0x00000010 // regbank_address +#define SYSTEM_MONITOR_XADC_OFFSET_ADDR 0x00000012 // regbank_address +#define SYSTEM_MONITOR_XADC_GAIN_ERROR_ADDR 0x00000014 // regbank_address +#define SYSTEM_MONITOR_VAUX0_ADDR 0x00000020 // regbank_address +#define SYSTEM_MONITOR_VAUX1_ADDR 0x00000022 // regbank_address +#define SYSTEM_MONITOR_VAUX2_ADDR 0x00000024 // regbank_address +#define SYSTEM_MONITOR_VAUX3_ADDR 0x00000026 // regbank_address +#define SYSTEM_MONITOR_VAUX4_ADDR 0x00000028 // regbank_address +#define SYSTEM_MONITOR_VAUX5_ADDR 0x0000002A // regbank_address +#define SYSTEM_MONITOR_VAUX6_ADDR 0x0000002C // regbank_address +#define SYSTEM_MONITOR_VAUX7_ADDR 0x0000002E // regbank_address +#define SYSTEM_MONITOR_VAUX8_ADDR 0x00000030 // regbank_address +#define SYSTEM_MONITOR_VAUX9_ADDR 0x00000032 // regbank_address +#define SYSTEM_MONITOR_VAUX10_ADDR 0x00000034 // regbank_address +#define SYSTEM_MONITOR_VAUX11_ADDR 0x00000036 // regbank_address +#define SYSTEM_MONITOR_VAUX12_ADDR 0x00000038 // regbank_address +#define SYSTEM_MONITOR_VAUX13_ADDR 0x0000003A // regbank_address +#define SYSTEM_MONITOR_VAUX14_ADDR 0x0000003C // regbank_address +#define SYSTEM_MONITOR_VAUX15_ADDR 0x0000003E // regbank_address +#define SYSTEM_MONITOR_MAX_TEMP_ADDR 0x00000040 // regbank_address +#define SYSTEM_MONITOR_MAX_VCC_INT_ADDR 0x00000042 // regbank_address +#define SYSTEM_MONITOR_MAX_VCC_AUX_ADDR 0x00000044 // regbank_address +#define SYSTEM_MONITOR_MAX_VCC_BRAM_ADDR 0x00000046 // regbank_address +#define SYSTEM_MONITOR_MIN_TEMP_ADDR 0x00000048 // regbank_address +#define SYSTEM_MONITOR_MIN_VCC_INT_ADDR 0x0000004A // regbank_address +#define SYSTEM_MONITOR_MIN_VCC_AUX_ADDR 0x0000004C // regbank_address +#define SYSTEM_MONITOR_MIN_VCC_BRAM_ADDR 0x0000004E // regbank_address +#define SYSTEM_MONITOR_XADC_FLAGS_ADDR 0x0000007E // regbank_address +#define SYSTEM_MONITOR_XADC_CONF_REG0_ADDR 0x00000080 // regbank_address +#define SYSTEM_MONITOR_XADC_CONF_REG1_ADDR 0x00000082 // regbank_address +#define SYSTEM_MONITOR_XADC_CONF_REG2_ADDR 0x00000084 // regbank_address +#define SYSTEM_MONITOR_XADC_SEQ_REG0_ADDR 0x00000090 // regbank_address +#define SYSTEM_MONITOR_XADC_SEQ_REG1_ADDR 0x00000092 // regbank_address +#define SYSTEM_MONITOR_XADC_SEQ_REG2_ADDR 0x00000094 // regbank_address +#define SYSTEM_MONITOR_XADC_SEQ_REG3_ADDR 0x00000096 // regbank_address +#define SYSTEM_MONITOR_XADC_SEQ_REG4_ADDR 0x00000098 // regbank_address +#define SYSTEM_MONITOR_XADC_SEQ_REG5_ADDR 0x0000009A // regbank_address +#define SYSTEM_MONITOR_XADC_SEQ_REG6_ADDR 0x0000009C // regbank_address +#define SYSTEM_MONITOR_XADC_SEQ_REG7_ADDR 0x0000009E // regbank_address +#define SYSTEM_MONITOR_XADC_ALARM_THR_REG0_ADDR 0x000000A0 // regbank_address +#define SYSTEM_MONITOR_XADC_ALARM_THR_REG1_ADDR 0x000000A2 // regbank_address +#define SYSTEM_MONITOR_XADC_ALARM_THR_REG2_ADDR 0x000000A4 // regbank_address +#define SYSTEM_MONITOR_XADC_ALARM_THR_REG3_ADDR 0x000000A6 // regbank_address +#define SYSTEM_MONITOR_XADC_ALARM_THR_REG4_ADDR 0x000000A8 // regbank_address +#define SYSTEM_MONITOR_XADC_ALARM_THR_REG5_ADDR 0x000000AA // regbank_address +#define SYSTEM_MONITOR_XADC_ALARM_THR_REG6_ADDR 0x000000AC // regbank_address +#define SYSTEM_MONITOR_XADC_ALARM_THR_REG7_ADDR 0x000000AE // regbank_address +#define SYSTEM_MONITOR_XADC_ALARM_THR_REG8_ADDR 0x000000B0 // regbank_address +#define SYSTEM_MONITOR_XADC_ALARM_THR_REG9_ADDR 0x000000B2 // regbank_address +#define SYSTEM_MONITOR_XADC_ALARM_THR_REG10_ADDR 0x000000B4 // regbank_address +#define SYSTEM_MONITOR_XADC_ALARM_THR_REG11_ADDR 0x000000B6 // regbank_address +#define SYSTEM_MONITOR_XADC_ALARM_THR_REG12_ADDR 0x000000B8 // regbank_address +#define SYSTEM_MONITOR_XADC_ALARM_THR_REG13_ADDR 0x000000BA // regbank_address +#define SYSTEM_MONITOR_XADC_ALARM_THR_REG14_ADDR 0x000000BC // regbank_address +#define SYSTEM_MONITOR_XADC_ALARM_THR_REG15_ADDR 0x000000BE // regbank_address + +#endif // METAVISION_HAL_SYSTEM_MONITOR_REGISTER_MAPPING_H diff --git a/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/legacy/temp_vcc_monitor_register_mapping.h b/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/legacy/temp_vcc_monitor_register_mapping.h new file mode 100644 index 000000000..39875b41e --- /dev/null +++ b/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/legacy/temp_vcc_monitor_register_mapping.h @@ -0,0 +1,50 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_TEMP_VCC_MONITOR_REGISTER_MAPPING_H +#define METAVISION_HAL_TEMP_VCC_MONITOR_REGISTER_MAPPING_H + +//----------------------------------------------------------------------------- +// Register Bank name is TEMP_VCC_MONITOR +//----------------------------------------------------------------------------- + +#define TEMP_VCC_MONITOR_REGISTER_MAPPING_BASE_ADDR 0x00000000 // regbank_address +#define TEMP_VCC_MONITOR_EVT_ENABLE_ADDR 0x00000000 // regbank_address +#define TEMP_VCC_MONITOR_EVT_ENABLE_DEFAULT 0x00000000 // TEMP_VCC_MONITOR_EVT_ENABLE_ADDR +#define TEMP_VCC_MONITOR_EVT_ENABLE_MASK 0x00013F1F // TEMP_VCC_MONITOR_EVT_ENABLE_ADDR +#define CFG_ENABLE_ALL_EVT_BIT 0 // TEMP_VCC_MONITOR_EVT_ENABLE_ADDR +#define CFG_ENABLE_TEMP_EVT_BIT 1 // TEMP_VCC_MONITOR_EVT_ENABLE_ADDR +#define CFG_ENABLE_VCC_INT_EVT_BIT 2 // TEMP_VCC_MONITOR_EVT_ENABLE_ADDR +#define CFG_ENABLE_VCC_AUX_EVT_BIT 3 // TEMP_VCC_MONITOR_EVT_ENABLE_ADDR +#define CFG_ENABLE_VCC_BRAM_EVT_BIT 4 // TEMP_VCC_MONITOR_EVT_ENABLE_ADDR +#define CFG_ENABLE_ALL_ALARM_BIT 8 // TEMP_VCC_MONITOR_EVT_ENABLE_ADDR +#define CFG_ENABLE_OVER_TEMP_ALARM_BIT 9 // TEMP_VCC_MONITOR_EVT_ENABLE_ADDR +#define CFG_ENABLE_USER_TEMP_ALARM_BIT 10 // TEMP_VCC_MONITOR_EVT_ENABLE_ADDR +#define CFG_ENABLE_VCC_INT_ALARM_BIT 11 // TEMP_VCC_MONITOR_EVT_ENABLE_ADDR +#define CFG_ENABLE_VCC_AUX_ALARM_BIT 12 // TEMP_VCC_MONITOR_EVT_ENABLE_ADDR +#define CFG_ENABLE_VCC_BRAM_ALARM_BIT 13 // TEMP_VCC_MONITOR_EVT_ENABLE_ADDR +#define CFG_ENABLE_SYSTEM_POWER_DOWN_BIT 16 // TEMP_VCC_MONITOR_EVT_ENABLE_ADDR +#define TEMP_VCC_MONITOR_EVT_PERIOD_ADDR 0x00000004 // regbank_address +#define TEMP_VCC_MONITOR_EVT_PERIOD_WIDTH 24 // TEMP_VCC_MONITOR_EVT_PERIOD_ADDR +#define TEMP_VCC_MONITOR_EVT_PERIOD_DEFAULT std_logic_vector(to_unsigned(100000, // TEMP_VCC_MONITOR_EVT_PERIOD_ADDR +#define TEMP_VCC_MONITOR_EVT_PERIOD_MASK 0x0FFFFFFF // TEMP_VCC_MONITOR_EVT_PERIOD_ADDR +#define TEMP_VCC_MONITOR_EXT_TEMP_CONTROL_ADDR 0x00000008 // regbank_address +#define TEMP_VCC_MONITOR_EXT_TEMP_CONTROL_DEFAULT 0x00000000 // TEMP_VCC_MONITOR_EXT_TEMP_CONTROL_ADDR +#define TEMP_VCC_MONITOR_EXT_TEMP_CONTROL_MASK 0x00000007 // TEMP_VCC_MONITOR_EXT_TEMP_CONTROL_ADDR +#define STATUS_SYS_POWER_DOWN_BIT 0 // TEMP_VCC_MONITOR_EXT_TEMP_CONTROL_ADDR +#define EXT_TEMP_MONITOR_EN_BIT 1 // TEMP_VCC_MONITOR_EXT_TEMP_CONTROL_ADDR +#define EXT_TEMP_MONITOR_SPI_EN_BIT 2 // TEMP_VCC_MONITOR_EXT_TEMP_CONTROL_ADDR +#define TEMP_VCC_MONITOR_EVK_EXT_TEMP_VALUE_ADDR 0x0000000C // regbank_address +#define TEMP_VCC_MONITOR_EVK_EXT_TEMP_VALUE_DEFAULT 0x00000000 // TEMP_VCC_MONITOR_EVK_EXT_TEMP_VALUE_ADDR +#define TEMP_VCC_MONITOR_EVK_EXT_TEMP_VALUE_MASK 0x003FFFFF // TEMP_VCC_MONITOR_EVK_EXT_TEMP_VALUE_ADDR +#define TEMP_VCC_MONITOR_REGISTER_MAPPING_LAST_ADDR 0x0000000C // regbank_address + +#endif // METAVISION_HAL_TEMP_VCC_MONITOR_REGISTER_MAPPING_H diff --git a/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/legacy/temp_vcc_monitor_xadc_register_mapping.h b/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/legacy/temp_vcc_monitor_xadc_register_mapping.h new file mode 100644 index 000000000..31ef21e91 --- /dev/null +++ b/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/legacy/temp_vcc_monitor_xadc_register_mapping.h @@ -0,0 +1,83 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_TEMP_VCC_MONITOR_XADC_REGISTER_MAPPING_H +#define METAVISION_HAL_TEMP_VCC_MONITOR_XADC_REGISTER_MAPPING_H + +//----------------------------------------------------------------------------- +// Register Bank name is TEMP_VCC_MONITOR_XADC +//----------------------------------------------------------------------------- + +#define TEMP_VCC_MONITOR_XADC_REGISTER_MAPPING_BASE_ADDR 0x00000000 // regbank_address +#define TEMP_VCC_MONITOR_XADC_TEMP_ADDR 0x00000000 // regbank_address +#define TEMP_VCC_MONITOR_XADC_VCC_INT_ADDR 0x00000002 // regbank_address +#define TEMP_VCC_MONITOR_XADC_VCC_AUX_ADDR 0x00000004 // regbank_address +#define TEMP_VCC_MONITOR_XADC_VP_VN_ADDR 0x00000006 // regbank_address +#define TEMP_VCC_MONITOR_XADC_VREFP_ADDR 0x00000008 // regbank_address +#define TEMP_VCC_MONITOR_XADC_VREFN_ADDR 0x0000000A // regbank_address +#define TEMP_VCC_MONITOR_XADC_VCC_BRAM_ADDR 0x0000000C // regbank_address +#define TEMP_VCC_MONITOR_XADC_SUPPLY_OFFSET_ADDR 0x00000010 // regbank_address +#define TEMP_VCC_MONITOR_XADC_OFFSET_ADDR 0x00000012 // regbank_address +#define TEMP_VCC_MONITOR_XADC_GAIN_ERROR_ADDR 0x00000014 // regbank_address +#define TEMP_VCC_MONITOR_XADC_VAUX0_ADDR 0x00000020 // regbank_address +#define TEMP_VCC_MONITOR_XADC_VAUX1_ADDR 0x00000022 // regbank_address +#define TEMP_VCC_MONITOR_XADC_VAUX2_ADDR 0x00000024 // regbank_address +#define TEMP_VCC_MONITOR_XADC_VAUX3_ADDR 0x00000026 // regbank_address +#define TEMP_VCC_MONITOR_XADC_VAUX4_ADDR 0x00000028 // regbank_address +#define TEMP_VCC_MONITOR_XADC_VAUX5_ADDR 0x0000002A // regbank_address +#define TEMP_VCC_MONITOR_XADC_VAUX6_ADDR 0x0000002C // regbank_address +#define TEMP_VCC_MONITOR_XADC_VAUX7_ADDR 0x0000002E // regbank_address +#define TEMP_VCC_MONITOR_XADC_VAUX8_ADDR 0x00000030 // regbank_address +#define TEMP_VCC_MONITOR_XADC_VAUX9_ADDR 0x00000032 // regbank_address +#define TEMP_VCC_MONITOR_XADC_VAUX10_ADDR 0x00000034 // regbank_address +#define TEMP_VCC_MONITOR_XADC_VAUX11_ADDR 0x00000036 // regbank_address +#define TEMP_VCC_MONITOR_XADC_VAUX12_ADDR 0x00000038 // regbank_address +#define TEMP_VCC_MONITOR_XADC_VAUX13_ADDR 0x0000003A // regbank_address +#define TEMP_VCC_MONITOR_XADC_VAUX14_ADDR 0x0000003C // regbank_address +#define TEMP_VCC_MONITOR_XADC_VAUX15_ADDR 0x0000003E // regbank_address +#define TEMP_VCC_MONITOR_XADC_MAX_TEMP_ADDR 0x00000040 // regbank_address +#define TEMP_VCC_MONITOR_XADC_MAX_VCC_INT_ADDR 0x00000042 // regbank_address +#define TEMP_VCC_MONITOR_XADC_MAX_VCC_AUX_ADDR 0x00000044 // regbank_address +#define TEMP_VCC_MONITOR_XADC_MAX_VCC_BRAM_ADDR 0x00000046 // regbank_address +#define TEMP_VCC_MONITOR_XADC_MIN_TEMP_ADDR 0x00000048 // regbank_address +#define TEMP_VCC_MONITOR_XADC_MIN_VCC_INT_ADDR 0x0000004A // regbank_address +#define TEMP_VCC_MONITOR_XADC_MIN_VCC_AUX_ADDR 0x0000004C // regbank_address +#define TEMP_VCC_MONITOR_XADC_MIN_VCC_BRAM_ADDR 0x0000004E // regbank_address +#define TEMP_VCC_MONITOR_XADC_FLAGS_ADDR 0x0000007E // regbank_address +#define TEMP_VCC_MONITOR_XADC_CONF_REG0_ADDR 0x00000080 // regbank_address +#define TEMP_VCC_MONITOR_XADC_CONF_REG1_ADDR 0x00000082 // regbank_address +#define TEMP_VCC_MONITOR_XADC_CONF_REG2_ADDR 0x00000084 // regbank_address +#define TEMP_VCC_MONITOR_XADC_SEQ_REG0_ADDR 0x00000090 // regbank_address +#define TEMP_VCC_MONITOR_XADC_SEQ_REG1_ADDR 0x00000092 // regbank_address +#define TEMP_VCC_MONITOR_XADC_SEQ_REG2_ADDR 0x00000094 // regbank_address +#define TEMP_VCC_MONITOR_XADC_SEQ_REG3_ADDR 0x00000096 // regbank_address +#define TEMP_VCC_MONITOR_XADC_SEQ_REG4_ADDR 0x00000098 // regbank_address +#define TEMP_VCC_MONITOR_XADC_SEQ_REG5_ADDR 0x0000009A // regbank_address +#define TEMP_VCC_MONITOR_XADC_SEQ_REG6_ADDR 0x0000009C // regbank_address +#define TEMP_VCC_MONITOR_XADC_SEQ_REG7_ADDR 0x0000009E // regbank_address +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG0_ADDR 0x000000A0 // regbank_address +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG1_ADDR 0x000000A2 // regbank_address +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG2_ADDR 0x000000A4 // regbank_address +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG3_ADDR 0x000000A6 // regbank_address +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG4_ADDR 0x000000A8 // regbank_address +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG5_ADDR 0x000000AA // regbank_address +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG6_ADDR 0x000000AC // regbank_address +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG7_ADDR 0x000000AE // regbank_address +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG8_ADDR 0x000000B0 // regbank_address +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG9_ADDR 0x000000B2 // regbank_address +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG10_ADDR 0x000000B4 // regbank_address +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG11_ADDR 0x000000B6 // regbank_address +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG12_ADDR 0x000000B8 // regbank_address +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG13_ADDR 0x000000BA // regbank_address +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG14_ADDR 0x000000BC // regbank_address +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG15_ADDR 0x000000BE // regbank_address + +#endif // METAVISION_HAL_TEMP_VCC_MONITOR_XADC_REGISTER_MAPPING_H diff --git a/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/legacy/xadc_monitor_register_mapping.h b/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/legacy/xadc_monitor_register_mapping.h new file mode 100644 index 000000000..0910523f0 --- /dev/null +++ b/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/legacy/xadc_monitor_register_mapping.h @@ -0,0 +1,83 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_XADC_MONITOR_REGISTER_MAPPING_H +#define METAVISION_HAL_XADC_MONITOR_REGISTER_MAPPING_H + +//----------------------------------------------------------------------------- +// Register Bank name is TEMP_VCC_XADC_MONITOR +//----------------------------------------------------------------------------- + +#define SYSTEM_MONITOR_XADC_REGISTER_MAPPING_BASE_ADDR 0x00000000 // regbank_address +#define SYSTEM_MONITOR_FPGA_TEMP_ADDR 0x00000000 // regbank_address +#define SYSTEM_MONITOR_VCC_INT_ADDR 0x00000002 // regbank_address +#define SYSTEM_MONITOR_VCC_AUX_ADDR 0x00000004 // regbank_address +#define SYSTEM_MONITOR_VP_VN_ADDR 0x00000006 // regbank_address +#define SYSTEM_MONITOR_VREFP_ADDR 0x00000008 // regbank_address +#define SYSTEM_MONITOR_VREFN_ADDR 0x0000000A // regbank_address +#define SYSTEM_MONITOR_VCC_BRAM_ADDR 0x0000000C // regbank_address +#define SYSTEM_MONITOR_XADC_SUPPLY_OFFSET_ADDR 0x00000010 // regbank_address +#define SYSTEM_MONITOR_XADC_OFFSET_ADDR 0x00000012 // regbank_address +#define SYSTEM_MONITOR_XADC_GAIN_ERROR_ADDR 0x00000014 // regbank_address +#define SYSTEM_MONITOR_VAUX0_ADDR 0x00000020 // regbank_address +#define SYSTEM_MONITOR_VAUX1_ADDR 0x00000022 // regbank_address +#define SYSTEM_MONITOR_VAUX2_ADDR 0x00000024 // regbank_address +#define SYSTEM_MONITOR_VAUX3_ADDR 0x00000026 // regbank_address +#define SYSTEM_MONITOR_VAUX4_ADDR 0x00000028 // regbank_address +#define SYSTEM_MONITOR_VAUX5_ADDR 0x0000002A // regbank_address +#define SYSTEM_MONITOR_VAUX6_ADDR 0x0000002C // regbank_address +#define SYSTEM_MONITOR_VAUX7_ADDR 0x0000002E // regbank_address +#define SYSTEM_MONITOR_VAUX8_ADDR 0x00000030 // regbank_address +#define SYSTEM_MONITOR_VAUX9_ADDR 0x00000032 // regbank_address +#define SYSTEM_MONITOR_VAUX10_ADDR 0x00000034 // regbank_address +#define SYSTEM_MONITOR_VAUX11_ADDR 0x00000036 // regbank_address +#define SYSTEM_MONITOR_VAUX12_ADDR 0x00000038 // regbank_address +#define SYSTEM_MONITOR_VAUX13_ADDR 0x0000003A // regbank_address +#define SYSTEM_MONITOR_VAUX14_ADDR 0x0000003C // regbank_address +#define SYSTEM_MONITOR_VAUX15_ADDR 0x0000003E // regbank_address +#define SYSTEM_MONITOR_MAX_TEMP_ADDR 0x00000040 // regbank_address +#define SYSTEM_MONITOR_MAX_VCC_INT_ADDR 0x00000042 // regbank_address +#define SYSTEM_MONITOR_MAX_VCC_AUX_ADDR 0x00000044 // regbank_address +#define SYSTEM_MONITOR_MAX_VCC_BRAM_ADDR 0x00000046 // regbank_address +#define SYSTEM_MONITOR_MIN_TEMP_ADDR 0x00000048 // regbank_address +#define SYSTEM_MONITOR_MIN_VCC_INT_ADDR 0x0000004A // regbank_address +#define SYSTEM_MONITOR_MIN_VCC_AUX_ADDR 0x0000004C // regbank_address +#define SYSTEM_MONITOR_MIN_VCC_BRAM_ADDR 0x0000004E // regbank_address +#define SYSTEM_MONITOR_XADC_FLAGS_ADDR 0x0000007E // regbank_address +#define SYSTEM_MONITOR_XADC_CONF_REG0_ADDR 0x00000080 // regbank_address +#define SYSTEM_MONITOR_XADC_CONF_REG1_ADDR 0x00000082 // regbank_address +#define SYSTEM_MONITOR_XADC_CONF_REG2_ADDR 0x00000084 // regbank_address +#define SYSTEM_MONITOR_XADC_SEQ_REG0_ADDR 0x00000090 // regbank_address +#define SYSTEM_MONITOR_XADC_SEQ_REG1_ADDR 0x00000092 // regbank_address +#define SYSTEM_MONITOR_XADC_SEQ_REG2_ADDR 0x00000094 // regbank_address +#define SYSTEM_MONITOR_XADC_SEQ_REG3_ADDR 0x00000096 // regbank_address +#define SYSTEM_MONITOR_XADC_SEQ_REG4_ADDR 0x00000098 // regbank_address +#define SYSTEM_MONITOR_XADC_SEQ_REG5_ADDR 0x0000009A // regbank_address +#define SYSTEM_MONITOR_XADC_SEQ_REG6_ADDR 0x0000009C // regbank_address +#define SYSTEM_MONITOR_XADC_SEQ_REG7_ADDR 0x0000009E // regbank_address +#define SYSTEM_MONITOR_XADC_ALARM_THR_REG0_ADDR 0x000000A0 // regbank_address +#define SYSTEM_MONITOR_XADC_ALARM_THR_REG1_ADDR 0x000000A2 // regbank_address +#define SYSTEM_MONITOR_XADC_ALARM_THR_REG2_ADDR 0x000000A4 // regbank_address +#define SYSTEM_MONITOR_XADC_ALARM_THR_REG3_ADDR 0x000000A6 // regbank_address +#define SYSTEM_MONITOR_XADC_ALARM_THR_REG4_ADDR 0x000000A8 // regbank_address +#define SYSTEM_MONITOR_XADC_ALARM_THR_REG5_ADDR 0x000000AA // regbank_address +#define SYSTEM_MONITOR_XADC_ALARM_THR_REG6_ADDR 0x000000AC // regbank_address +#define SYSTEM_MONITOR_XADC_ALARM_THR_REG7_ADDR 0x000000AE // regbank_address +#define SYSTEM_MONITOR_XADC_ALARM_THR_REG8_ADDR 0x000000B0 // regbank_address +#define SYSTEM_MONITOR_XADC_ALARM_THR_REG9_ADDR 0x000000B2 // regbank_address +#define SYSTEM_MONITOR_XADC_ALARM_THR_REG10_ADDR 0x000000B4 // regbank_address +#define SYSTEM_MONITOR_XADC_ALARM_THR_REG11_ADDR 0x000000B6 // regbank_address +#define SYSTEM_MONITOR_XADC_ALARM_THR_REG12_ADDR 0x000000B8 // regbank_address +#define SYSTEM_MONITOR_XADC_ALARM_THR_REG13_ADDR 0x000000BA // regbank_address +#define SYSTEM_MONITOR_XADC_ALARM_THR_REG14_ADDR 0x000000BC // regbank_address +#define SYSTEM_MONITOR_XADC_ALARM_THR_REG15_ADDR 0x000000BE // regbank_address + +#endif // METAVISION_HAL_XADC_MONITOR_REGISTER_MAPPING_H diff --git a/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/system_config_register_map.h b/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/system_config_register_map.h new file mode 100644 index 000000000..3c4cf1b72 --- /dev/null +++ b/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/system_config_register_map.h @@ -0,0 +1,53 @@ +/********************************************************************************************** + * WARNING: THIS FILE HAS BEEN GENERATED BY REG_MAP_MANAGER TOOLS PLEASE DO NOT MODIFY IT * + ********************************************************************************************** + * File: system_config_register_map.h * + * * + * Copyright (c) 2015-2018 Prophesee. All rights reserved. * + * * + * Date: 08/10/2018 at 12h05m31s * + * Name: system_config_register_map * + * Version: 1.0 * + * Hash: ddf36b6aa5dbf427ce800525d4200684d94698274aa678a7101ecb0f5a886070 * + ********************************************************************************************** + * WARNING: THIS FILE HAS BEEN GENERATED BY REG_MAP_MANAGER TOOLS PLEASE DO NOT MODIFY IT * + *********************************************************************************************/ + +#ifndef METAVISION_HAL_SYSTEM_CONFIG_REGISTER_MAP_H +#define METAVISION_HAL_SYSTEM_CONFIG_REGISTER_MAP_H + +//------------------------------------------------------------------------------------------------------------ +// SYSTEM_CONFIG +//------------------------------------------------------------------------------------------------------------ + +#define SYSTEM_CONFIG_BASE_ADDR 0x00000000 +#define SYSTEM_CONFIG_LAST_ADDR 0x0000000C +#define SYSTEM_CONFIG_SIZE 0x00000010 + +#define SYSTEM_CONFIG_ID_ADDR 0x00000000 +#define SYSTEM_CONFIG_ID_BIT_IDX 0 +#define SYSTEM_CONFIG_ID_WIDTH 8 +#define SYSTEM_CONFIG_ID_DEFAULT 0x00000015 + +#define SYSTEM_CONFIG_VERSION_ADDR 0x00000004 +#define SYSTEM_CONFIG_VERSION_MICRO_BIT_IDX 0 +#define SYSTEM_CONFIG_VERSION_MICRO_WIDTH 8 +#define SYSTEM_CONFIG_VERSION_MICRO_DEFAULT 0x00000000 +#define SYSTEM_CONFIG_VERSION_MINOR_BIT_IDX 8 +#define SYSTEM_CONFIG_VERSION_MINOR_WIDTH 8 +#define SYSTEM_CONFIG_VERSION_MINOR_DEFAULT 0x00000000 +#define SYSTEM_CONFIG_VERSION_MAJOR_BIT_IDX 16 +#define SYSTEM_CONFIG_VERSION_MAJOR_WIDTH 8 +#define SYSTEM_CONFIG_VERSION_MAJOR_DEFAULT 0x00000000 + +#define SYSTEM_CONFIG_BUILD_DATE_ADDR 0x00000008 +#define SYSTEM_CONFIG_BUILD_DATE_BIT_IDX 0 +#define SYSTEM_CONFIG_BUILD_DATE_WIDTH 32 +#define SYSTEM_CONFIG_BUILD_DATE_DEFAULT 0x00000000 + +#define SYSTEM_CONFIG_VERSION_CONTROL_ID_ADDR 0x0000000C +#define SYSTEM_CONFIG_VERSION_CONTROL_ID_BIT_IDX 0 +#define SYSTEM_CONFIG_VERSION_CONTROL_ID_WIDTH 32 +#define SYSTEM_CONFIG_VERSION_CONTROL_ID_DEFAULT 0x00000000 + +#endif // METAVISION_HAL_SYSTEM_CONFIG_REGISTER_MAP_H diff --git a/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/temp_vcc_monitor_register_map.h b/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/temp_vcc_monitor_register_map.h new file mode 100644 index 000000000..5ba9fc776 --- /dev/null +++ b/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/temp_vcc_monitor_register_map.h @@ -0,0 +1,86 @@ +/********************************************************************************************** + * WARNING: THIS FILE HAS BEEN GENERATED BY REG_MAP_MANAGER TOOLS PLEASE DO NOT MODIFY IT * + ********************************************************************************************** + * File: temp_vcc_monitor_register_map.h * + * * + * Copyright (c) 2015-2018 Prophesee. All rights reserved. * + * * + * Date: 08/10/2018 at 12h05m31s * + * Name: temp_vcc_monitor_register_map * + * Version: 1.0 * + * Hash: 17a5edda9169b65578adce2991e7dea15d0bff6c0be8c23845eed0fc51ed78eb * + ********************************************************************************************** + * WARNING: THIS FILE HAS BEEN GENERATED BY REG_MAP_MANAGER TOOLS PLEASE DO NOT MODIFY IT * + *********************************************************************************************/ + +#ifndef METAVISION_HAL_TEMP_VCC_MONITOR_REGISTER_MAP_H +#define METAVISION_HAL_TEMP_VCC_MONITOR_REGISTER_MAP_H + +//------------------------------------------------------------------------------------------------------------ +// TEMP_VCC_MONITOR +//------------------------------------------------------------------------------------------------------------ + +#define TEMP_VCC_MONITOR_BASE_ADDR 0x00000000 +#define TEMP_VCC_MONITOR_LAST_ADDR 0x0000000C +#define TEMP_VCC_MONITOR_SIZE 0x00000020 + +#define TEMP_VCC_MONITOR_EVT_ENABLE_ADDR 0x00000000 +#define TEMP_VCC_MONITOR_EVT_ENABLE_ALL_EVT_BIT_IDX 0 +#define TEMP_VCC_MONITOR_EVT_ENABLE_ALL_EVT_WIDTH 1 +#define TEMP_VCC_MONITOR_EVT_ENABLE_ALL_EVT_DEFAULT 0x00000000 +#define TEMP_VCC_MONITOR_EVT_ENABLE_TEMP_EVT_BIT_IDX 1 +#define TEMP_VCC_MONITOR_EVT_ENABLE_TEMP_EVT_WIDTH 1 +#define TEMP_VCC_MONITOR_EVT_ENABLE_TEMP_EVT_DEFAULT 0x00000000 +#define TEMP_VCC_MONITOR_EVT_ENABLE_VCC_INT_EVT_BIT_IDX 2 +#define TEMP_VCC_MONITOR_EVT_ENABLE_VCC_INT_EVT_WIDTH 1 +#define TEMP_VCC_MONITOR_EVT_ENABLE_VCC_INT_EVT_DEFAULT 0x00000000 +#define TEMP_VCC_MONITOR_EVT_ENABLE_VCC_AUX_EVT_BIT_IDX 3 +#define TEMP_VCC_MONITOR_EVT_ENABLE_VCC_AUX_EVT_WIDTH 1 +#define TEMP_VCC_MONITOR_EVT_ENABLE_VCC_AUX_EVT_DEFAULT 0x00000000 +#define TEMP_VCC_MONITOR_EVT_ENABLE_VCC_BRAM_EVT_BIT_IDX 4 +#define TEMP_VCC_MONITOR_EVT_ENABLE_VCC_BRAM_EVT_WIDTH 1 +#define TEMP_VCC_MONITOR_EVT_ENABLE_VCC_BRAM_EVT_DEFAULT 0x00000000 +#define TEMP_VCC_MONITOR_EVT_ENABLE_ALL_ALARM_BIT_IDX 8 +#define TEMP_VCC_MONITOR_EVT_ENABLE_ALL_ALARM_WIDTH 1 +#define TEMP_VCC_MONITOR_EVT_ENABLE_ALL_ALARM_DEFAULT 0x00000000 +#define TEMP_VCC_MONITOR_EVT_ENABLE_OVER_TEMP_ALARM_BIT_IDX 9 +#define TEMP_VCC_MONITOR_EVT_ENABLE_OVER_TEMP_ALARM_WIDTH 1 +#define TEMP_VCC_MONITOR_EVT_ENABLE_OVER_TEMP_ALARM_DEFAULT 0x00000000 +#define TEMP_VCC_MONITOR_EVT_ENABLE_USER_TEMP_ALARM_BIT_IDX 10 +#define TEMP_VCC_MONITOR_EVT_ENABLE_USER_TEMP_ALARM_WIDTH 1 +#define TEMP_VCC_MONITOR_EVT_ENABLE_USER_TEMP_ALARM_DEFAULT 0x00000000 +#define TEMP_VCC_MONITOR_EVT_ENABLE_VCC_INT_ALARM_BIT_IDX 11 +#define TEMP_VCC_MONITOR_EVT_ENABLE_VCC_INT_ALARM_WIDTH 1 +#define TEMP_VCC_MONITOR_EVT_ENABLE_VCC_INT_ALARM_DEFAULT 0x00000000 +#define TEMP_VCC_MONITOR_EVT_ENABLE_VCC_AUX_ALARM_BIT_IDX 12 +#define TEMP_VCC_MONITOR_EVT_ENABLE_VCC_AUX_ALARM_WIDTH 1 +#define TEMP_VCC_MONITOR_EVT_ENABLE_VCC_AUX_ALARM_DEFAULT 0x00000000 +#define TEMP_VCC_MONITOR_EVT_ENABLE_VCC_BRAM_ALARM_BIT_IDX 13 +#define TEMP_VCC_MONITOR_EVT_ENABLE_VCC_BRAM_ALARM_WIDTH 1 +#define TEMP_VCC_MONITOR_EVT_ENABLE_VCC_BRAM_ALARM_DEFAULT 0x00000000 +#define TEMP_VCC_MONITOR_EVT_ENABLE_SYSTEM_POWER_DOWN_BIT_IDX 16 +#define TEMP_VCC_MONITOR_EVT_ENABLE_SYSTEM_POWER_DOWN_WIDTH 1 +#define TEMP_VCC_MONITOR_EVT_ENABLE_SYSTEM_POWER_DOWN_DEFAULT 0x00000000 + +#define TEMP_VCC_MONITOR_EVT_PERIOD_ADDR 0x00000004 +#define TEMP_VCC_MONITOR_EVT_PERIOD_BIT_IDX 0 +#define TEMP_VCC_MONITOR_EVT_PERIOD_WIDTH 24 +#define TEMP_VCC_MONITOR_EVT_PERIOD_DEFAULT 0x000186A0 + +#define TEMP_VCC_MONITOR_EXT_TEMP_CONTROL_ADDR 0x00000008 +#define TEMP_VCC_MONITOR_EXT_TEMP_CONTROL_STATUS_SYS_POWER_DOWN_BIT_IDX 0 +#define TEMP_VCC_MONITOR_EXT_TEMP_CONTROL_STATUS_SYS_POWER_DOWN_WIDTH 1 +#define TEMP_VCC_MONITOR_EXT_TEMP_CONTROL_STATUS_SYS_POWER_DOWN_DEFAULT 0x00000000 +#define TEMP_VCC_MONITOR_EXT_TEMP_CONTROL_EXT_TEMP_MONITOR_EN_BIT_IDX 1 +#define TEMP_VCC_MONITOR_EXT_TEMP_CONTROL_EXT_TEMP_MONITOR_EN_WIDTH 1 +#define TEMP_VCC_MONITOR_EXT_TEMP_CONTROL_EXT_TEMP_MONITOR_EN_DEFAULT 0x00000000 +#define TEMP_VCC_MONITOR_EXT_TEMP_CONTROL_EXT_TEMP_MONITOR_SPI_EN_BIT_IDX 2 +#define TEMP_VCC_MONITOR_EXT_TEMP_CONTROL_EXT_TEMP_MONITOR_SPI_EN_WIDTH 1 +#define TEMP_VCC_MONITOR_EXT_TEMP_CONTROL_EXT_TEMP_MONITOR_SPI_EN_DEFAULT 0x00000000 + +#define TEMP_VCC_MONITOR_EVK_EXT_TEMP_VALUE_ADDR 0x0000000C +#define TEMP_VCC_MONITOR_EVK_EXT_TEMP_VALUE_BIT_IDX 0 +#define TEMP_VCC_MONITOR_EVK_EXT_TEMP_VALUE_WIDTH 22 +#define TEMP_VCC_MONITOR_EVK_EXT_TEMP_VALUE_DEFAULT 0x00000000 + +#endif // METAVISION_HAL_TEMP_VCC_MONITOR_REGISTER_MAP_H diff --git a/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/temp_vcc_monitor_xadc_register_map.h b/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/temp_vcc_monitor_xadc_register_map.h new file mode 100644 index 000000000..dca138bea --- /dev/null +++ b/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/temp_vcc_monitor_xadc_register_map.h @@ -0,0 +1,337 @@ +/********************************************************************************************** + * WARNING: THIS FILE HAS BEEN GENERATED BY REG_MAP_MANAGER TOOLS PLEASE DO NOT MODIFY IT * + ********************************************************************************************** + * File: temp_vcc_monitor_xadc_register_map.h * + * * + * Copyright (c) 2015-2018 Prophesee. All rights reserved. * + * * + * Date: 08/10/2018 at 12h05m31s * + * Name: temp_vcc_monitor_xadc_register_map * + * Version: 1.0 * + * Hash: 55fe1ba5a58584ef7b9e584b7dac41a8f7dce351c2040f22a1b4a8198a17f34c * + ********************************************************************************************** + * WARNING: THIS FILE HAS BEEN GENERATED BY REG_MAP_MANAGER TOOLS PLEASE DO NOT MODIFY IT * + *********************************************************************************************/ + +#ifndef METAVISION_HAL_TEMP_VCC_MONITOR_XADC_REGISTER_MAP_H +#define METAVISION_HAL_TEMP_VCC_MONITOR_XADC_REGISTER_MAP_H + +//------------------------------------------------------------------------------------------------------------ +// TEMP_VCC_MONITOR_XADC +//------------------------------------------------------------------------------------------------------------ + +#define TEMP_VCC_MONITOR_XADC_BASE_ADDR 0x00000000 +#define TEMP_VCC_MONITOR_XADC_LAST_ADDR 0x000000BE +#define TEMP_VCC_MONITOR_XADC_SIZE 0x00000100 + +#define TEMP_VCC_MONITOR_XADC_TEMP_ADDR 0x00000000 +#define TEMP_VCC_MONITOR_XADC_TEMP_VALUE_BIT_IDX 0 +#define TEMP_VCC_MONITOR_XADC_TEMP_VALUE_WIDTH 16 +#define TEMP_VCC_MONITOR_XADC_TEMP_VALUE_DEFAULT 0x00000000 + +#define TEMP_VCC_MONITOR_XADC_VCC_INT_ADDR 0x00000002 +#define TEMP_VCC_MONITOR_XADC_VCC_INT_VALUE_BIT_IDX 0 +#define TEMP_VCC_MONITOR_XADC_VCC_INT_VALUE_WIDTH 16 +#define TEMP_VCC_MONITOR_XADC_VCC_INT_VALUE_DEFAULT 0x00000000 + +#define TEMP_VCC_MONITOR_XADC_VCC_AUX_ADDR 0x00000004 +#define TEMP_VCC_MONITOR_XADC_VCC_AUX_VALUE_BIT_IDX 0 +#define TEMP_VCC_MONITOR_XADC_VCC_AUX_VALUE_WIDTH 16 +#define TEMP_VCC_MONITOR_XADC_VCC_AUX_VALUE_DEFAULT 0x00000000 + +#define TEMP_VCC_MONITOR_XADC_VP_VN_ADDR 0x00000006 +#define TEMP_VCC_MONITOR_XADC_VP_VN_VALUE_BIT_IDX 0 +#define TEMP_VCC_MONITOR_XADC_VP_VN_VALUE_WIDTH 16 +#define TEMP_VCC_MONITOR_XADC_VP_VN_VALUE_DEFAULT 0x00000000 + +#define TEMP_VCC_MONITOR_XADC_VREFP_ADDR 0x00000008 +#define TEMP_VCC_MONITOR_XADC_VREFP_VALUE_BIT_IDX 0 +#define TEMP_VCC_MONITOR_XADC_VREFP_VALUE_WIDTH 16 +#define TEMP_VCC_MONITOR_XADC_VREFP_VALUE_DEFAULT 0x00000000 + +#define TEMP_VCC_MONITOR_XADC_VREFN_ADDR 0x0000000A +#define TEMP_VCC_MONITOR_XADC_VREFN_VALUE_BIT_IDX 0 +#define TEMP_VCC_MONITOR_XADC_VREFN_VALUE_WIDTH 16 +#define TEMP_VCC_MONITOR_XADC_VREFN_VALUE_DEFAULT 0x00000000 + +#define TEMP_VCC_MONITOR_XADC_VCC_BRAM_ADDR 0x0000000C +#define TEMP_VCC_MONITOR_XADC_VCC_BRAM_VALUE_BIT_IDX 0 +#define TEMP_VCC_MONITOR_XADC_VCC_BRAM_VALUE_WIDTH 16 +#define TEMP_VCC_MONITOR_XADC_VCC_BRAM_VALUE_DEFAULT 0x00000000 + +#define TEMP_VCC_MONITOR_XADC_SUPPLY_OFFSET_ADDR 0x00000010 +#define TEMP_VCC_MONITOR_XADC_SUPPLY_OFFSET_VALUE_BIT_IDX 0 +#define TEMP_VCC_MONITOR_XADC_SUPPLY_OFFSET_VALUE_WIDTH 16 +#define TEMP_VCC_MONITOR_XADC_SUPPLY_OFFSET_VALUE_DEFAULT 0x00000000 + +#define TEMP_VCC_MONITOR_XADC_OFFSET_ADDR 0x00000012 +#define TEMP_VCC_MONITOR_XADC_OFFSET_VALUE_BIT_IDX 0 +#define TEMP_VCC_MONITOR_XADC_OFFSET_VALUE_WIDTH 16 +#define TEMP_VCC_MONITOR_XADC_OFFSET_VALUE_DEFAULT 0x00000000 + +#define TEMP_VCC_MONITOR_XADC_GAIN_ERROR_ADDR 0x00000014 +#define TEMP_VCC_MONITOR_XADC_GAIN_ERROR_VALUE_BIT_IDX 0 +#define TEMP_VCC_MONITOR_XADC_GAIN_ERROR_VALUE_WIDTH 16 +#define TEMP_VCC_MONITOR_XADC_GAIN_ERROR_VALUE_DEFAULT 0x00000000 + +#define TEMP_VCC_MONITOR_XADC_VAUX0_ADDR 0x00000020 +#define TEMP_VCC_MONITOR_XADC_VAUX0_VALUE_BIT_IDX 0 +#define TEMP_VCC_MONITOR_XADC_VAUX0_VALUE_WIDTH 16 +#define TEMP_VCC_MONITOR_XADC_VAUX0_VALUE_DEFAULT 0x00000000 + +#define TEMP_VCC_MONITOR_XADC_VAUX1_ADDR 0x00000022 +#define TEMP_VCC_MONITOR_XADC_VAUX1_VALUE_BIT_IDX 0 +#define TEMP_VCC_MONITOR_XADC_VAUX1_VALUE_WIDTH 16 +#define TEMP_VCC_MONITOR_XADC_VAUX1_VALUE_DEFAULT 0x00000000 + +#define TEMP_VCC_MONITOR_XADC_VAUX2_ADDR 0x00000024 +#define TEMP_VCC_MONITOR_XADC_VAUX2_VALUE_BIT_IDX 0 +#define TEMP_VCC_MONITOR_XADC_VAUX2_VALUE_WIDTH 16 +#define TEMP_VCC_MONITOR_XADC_VAUX2_VALUE_DEFAULT 0x00000000 + +#define TEMP_VCC_MONITOR_XADC_VAUX3_ADDR 0x00000026 +#define TEMP_VCC_MONITOR_XADC_VAUX3_VALUE_BIT_IDX 0 +#define TEMP_VCC_MONITOR_XADC_VAUX3_VALUE_WIDTH 16 +#define TEMP_VCC_MONITOR_XADC_VAUX3_VALUE_DEFAULT 0x00000000 + +#define TEMP_VCC_MONITOR_XADC_VAUX4_ADDR 0x00000028 +#define TEMP_VCC_MONITOR_XADC_VAUX4_VALUE_BIT_IDX 0 +#define TEMP_VCC_MONITOR_XADC_VAUX4_VALUE_WIDTH 16 +#define TEMP_VCC_MONITOR_XADC_VAUX4_VALUE_DEFAULT 0x00000000 + +#define TEMP_VCC_MONITOR_XADC_VAUX5_ADDR 0x0000002A +#define TEMP_VCC_MONITOR_XADC_VAUX5_VALUE_BIT_IDX 0 +#define TEMP_VCC_MONITOR_XADC_VAUX5_VALUE_WIDTH 16 +#define TEMP_VCC_MONITOR_XADC_VAUX5_VALUE_DEFAULT 0x00000000 + +#define TEMP_VCC_MONITOR_XADC_VAUX6_ADDR 0x0000002C +#define TEMP_VCC_MONITOR_XADC_VAUX6_VALUE_BIT_IDX 0 +#define TEMP_VCC_MONITOR_XADC_VAUX6_VALUE_WIDTH 16 +#define TEMP_VCC_MONITOR_XADC_VAUX6_VALUE_DEFAULT 0x00000000 + +#define TEMP_VCC_MONITOR_XADC_VAUX7_ADDR 0x0000002E +#define TEMP_VCC_MONITOR_XADC_VAUX7_VALUE_BIT_IDX 0 +#define TEMP_VCC_MONITOR_XADC_VAUX7_VALUE_WIDTH 16 +#define TEMP_VCC_MONITOR_XADC_VAUX7_VALUE_DEFAULT 0x00000000 + +#define TEMP_VCC_MONITOR_XADC_VAUX8_ADDR 0x00000030 +#define TEMP_VCC_MONITOR_XADC_VAUX8_VALUE_BIT_IDX 0 +#define TEMP_VCC_MONITOR_XADC_VAUX8_VALUE_WIDTH 16 +#define TEMP_VCC_MONITOR_XADC_VAUX8_VALUE_DEFAULT 0x00000000 + +#define TEMP_VCC_MONITOR_XADC_VAUX9_ADDR 0x00000032 +#define TEMP_VCC_MONITOR_XADC_VAUX9_VALUE_BIT_IDX 0 +#define TEMP_VCC_MONITOR_XADC_VAUX9_VALUE_WIDTH 16 +#define TEMP_VCC_MONITOR_XADC_VAUX9_VALUE_DEFAULT 0x00000000 + +#define TEMP_VCC_MONITOR_XADC_VAUX10_ADDR 0x00000034 +#define TEMP_VCC_MONITOR_XADC_VAUX10_VALUE_BIT_IDX 0 +#define TEMP_VCC_MONITOR_XADC_VAUX10_VALUE_WIDTH 16 +#define TEMP_VCC_MONITOR_XADC_VAUX10_VALUE_DEFAULT 0x00000000 + +#define TEMP_VCC_MONITOR_XADC_VAUX11_ADDR 0x00000036 +#define TEMP_VCC_MONITOR_XADC_VAUX11_VALUE_BIT_IDX 0 +#define TEMP_VCC_MONITOR_XADC_VAUX11_VALUE_WIDTH 16 +#define TEMP_VCC_MONITOR_XADC_VAUX11_VALUE_DEFAULT 0x00000000 + +#define TEMP_VCC_MONITOR_XADC_VAUX12_ADDR 0x00000038 +#define TEMP_VCC_MONITOR_XADC_VAUX12_VALUE_BIT_IDX 0 +#define TEMP_VCC_MONITOR_XADC_VAUX12_VALUE_WIDTH 16 +#define TEMP_VCC_MONITOR_XADC_VAUX12_VALUE_DEFAULT 0x00000000 + +#define TEMP_VCC_MONITOR_XADC_VAUX13_ADDR 0x0000003A +#define TEMP_VCC_MONITOR_XADC_VAUX13_VALUE_BIT_IDX 0 +#define TEMP_VCC_MONITOR_XADC_VAUX13_VALUE_WIDTH 16 +#define TEMP_VCC_MONITOR_XADC_VAUX13_VALUE_DEFAULT 0x00000000 + +#define TEMP_VCC_MONITOR_XADC_VAUX14_ADDR 0x0000003C +#define TEMP_VCC_MONITOR_XADC_VAUX14_VALUE_BIT_IDX 0 +#define TEMP_VCC_MONITOR_XADC_VAUX14_VALUE_WIDTH 16 +#define TEMP_VCC_MONITOR_XADC_VAUX14_VALUE_DEFAULT 0x00000000 + +#define TEMP_VCC_MONITOR_XADC_VAUX15_ADDR 0x0000003E +#define TEMP_VCC_MONITOR_XADC_VAUX15_VALUE_BIT_IDX 0 +#define TEMP_VCC_MONITOR_XADC_VAUX15_VALUE_WIDTH 16 +#define TEMP_VCC_MONITOR_XADC_VAUX15_VALUE_DEFAULT 0x00000000 + +#define TEMP_VCC_MONITOR_XADC_MAX_TEMP_ADDR 0x00000040 +#define TEMP_VCC_MONITOR_XADC_MAX_TEMP_VALUE_BIT_IDX 0 +#define TEMP_VCC_MONITOR_XADC_MAX_TEMP_VALUE_WIDTH 16 +#define TEMP_VCC_MONITOR_XADC_MAX_TEMP_VALUE_DEFAULT 0x00000000 + +#define TEMP_VCC_MONITOR_XADC_MAX_VCC_INT_ADDR 0x00000042 +#define TEMP_VCC_MONITOR_XADC_MAX_VCC_INT_VALUE_BIT_IDX 0 +#define TEMP_VCC_MONITOR_XADC_MAX_VCC_INT_VALUE_WIDTH 16 +#define TEMP_VCC_MONITOR_XADC_MAX_VCC_INT_VALUE_DEFAULT 0x00000000 + +#define TEMP_VCC_MONITOR_XADC_MAX_VCC_AUX_ADDR 0x00000044 +#define TEMP_VCC_MONITOR_XADC_MAX_VCC_AUX_VALUE_BIT_IDX 0 +#define TEMP_VCC_MONITOR_XADC_MAX_VCC_AUX_VALUE_WIDTH 16 +#define TEMP_VCC_MONITOR_XADC_MAX_VCC_AUX_VALUE_DEFAULT 0x00000000 + +#define TEMP_VCC_MONITOR_XADC_MAX_VCC_BRAM_ADDR 0x00000046 +#define TEMP_VCC_MONITOR_XADC_MAX_VCC_BRAM_VALUE_BIT_IDX 0 +#define TEMP_VCC_MONITOR_XADC_MAX_VCC_BRAM_VALUE_WIDTH 16 +#define TEMP_VCC_MONITOR_XADC_MAX_VCC_BRAM_VALUE_DEFAULT 0x00000000 + +#define TEMP_VCC_MONITOR_XADC_MIN_TEMP_ADDR 0x00000048 +#define TEMP_VCC_MONITOR_XADC_MIN_TEMP_VALUE_BIT_IDX 0 +#define TEMP_VCC_MONITOR_XADC_MIN_TEMP_VALUE_WIDTH 16 +#define TEMP_VCC_MONITOR_XADC_MIN_TEMP_VALUE_DEFAULT 0x00000000 + +#define TEMP_VCC_MONITOR_XADC_MIN_VCC_INT_ADDR 0x0000004A +#define TEMP_VCC_MONITOR_XADC_MIN_VCC_INT_VALUE_BIT_IDX 0 +#define TEMP_VCC_MONITOR_XADC_MIN_VCC_INT_VALUE_WIDTH 16 +#define TEMP_VCC_MONITOR_XADC_MIN_VCC_INT_VALUE_DEFAULT 0x00000000 + +#define TEMP_VCC_MONITOR_XADC_MIN_VCC_AUX_ADDR 0x0000004C +#define TEMP_VCC_MONITOR_XADC_MIN_VCC_AUX_VALUE_BIT_IDX 0 +#define TEMP_VCC_MONITOR_XADC_MIN_VCC_AUX_VALUE_WIDTH 16 +#define TEMP_VCC_MONITOR_XADC_MIN_VCC_AUX_VALUE_DEFAULT 0x00000000 + +#define TEMP_VCC_MONITOR_XADC_MIN_VCC_BRAM_ADDR 0x0000004E +#define TEMP_VCC_MONITOR_XADC_MIN_VCC_BRAM_VALUE_BIT_IDX 0 +#define TEMP_VCC_MONITOR_XADC_MIN_VCC_BRAM_VALUE_WIDTH 16 +#define TEMP_VCC_MONITOR_XADC_MIN_VCC_BRAM_VALUE_DEFAULT 0x00000000 + +#define TEMP_VCC_MONITOR_XADC_FLAGS_ADDR 0x0000007E +#define TEMP_VCC_MONITOR_XADC_FLAGS_VALUE_BIT_IDX 0 +#define TEMP_VCC_MONITOR_XADC_FLAGS_VALUE_WIDTH 16 +#define TEMP_VCC_MONITOR_XADC_FLAGS_VALUE_DEFAULT 0x00000000 + +#define TEMP_VCC_MONITOR_XADC_CONF_REG0_ADDR 0x00000080 +#define TEMP_VCC_MONITOR_XADC_CONF_REG0_VALUE_BIT_IDX 0 +#define TEMP_VCC_MONITOR_XADC_CONF_REG0_VALUE_WIDTH 16 +#define TEMP_VCC_MONITOR_XADC_CONF_REG0_VALUE_DEFAULT 0x00000000 + +#define TEMP_VCC_MONITOR_XADC_CONF_REG1_ADDR 0x00000082 +#define TEMP_VCC_MONITOR_XADC_CONF_REG1_VALUE_BIT_IDX 0 +#define TEMP_VCC_MONITOR_XADC_CONF_REG1_VALUE_WIDTH 16 +#define TEMP_VCC_MONITOR_XADC_CONF_REG1_VALUE_DEFAULT 0x00000000 + +#define TEMP_VCC_MONITOR_XADC_CONF_REG2_ADDR 0x00000084 +#define TEMP_VCC_MONITOR_XADC_CONF_REG2_VALUE_BIT_IDX 0 +#define TEMP_VCC_MONITOR_XADC_CONF_REG2_VALUE_WIDTH 16 +#define TEMP_VCC_MONITOR_XADC_CONF_REG2_VALUE_DEFAULT 0x00000000 + +#define TEMP_VCC_MONITOR_XADC_SEQ_REG0_ADDR 0x00000090 +#define TEMP_VCC_MONITOR_XADC_SEQ_REG0_VALUE_BIT_IDX 0 +#define TEMP_VCC_MONITOR_XADC_SEQ_REG0_VALUE_WIDTH 16 +#define TEMP_VCC_MONITOR_XADC_SEQ_REG0_VALUE_DEFAULT 0x00000000 + +#define TEMP_VCC_MONITOR_XADC_SEQ_REG1_ADDR 0x00000092 +#define TEMP_VCC_MONITOR_XADC_SEQ_REG1_VALUE_BIT_IDX 0 +#define TEMP_VCC_MONITOR_XADC_SEQ_REG1_VALUE_WIDTH 16 +#define TEMP_VCC_MONITOR_XADC_SEQ_REG1_VALUE_DEFAULT 0x00000000 + +#define TEMP_VCC_MONITOR_XADC_SEQ_REG2_ADDR 0x00000094 +#define TEMP_VCC_MONITOR_XADC_SEQ_REG2_VALUE_BIT_IDX 0 +#define TEMP_VCC_MONITOR_XADC_SEQ_REG2_VALUE_WIDTH 16 +#define TEMP_VCC_MONITOR_XADC_SEQ_REG2_VALUE_DEFAULT 0x00000000 + +#define TEMP_VCC_MONITOR_XADC_SEQ_REG3_ADDR 0x00000096 +#define TEMP_VCC_MONITOR_XADC_SEQ_REG3_VALUE_BIT_IDX 0 +#define TEMP_VCC_MONITOR_XADC_SEQ_REG3_VALUE_WIDTH 16 +#define TEMP_VCC_MONITOR_XADC_SEQ_REG3_VALUE_DEFAULT 0x00000000 + +#define TEMP_VCC_MONITOR_XADC_SEQ_REG4_ADDR 0x00000098 +#define TEMP_VCC_MONITOR_XADC_SEQ_REG4_VALUE_BIT_IDX 0 +#define TEMP_VCC_MONITOR_XADC_SEQ_REG4_VALUE_WIDTH 16 +#define TEMP_VCC_MONITOR_XADC_SEQ_REG4_VALUE_DEFAULT 0x00000000 + +#define TEMP_VCC_MONITOR_XADC_SEQ_REG5_ADDR 0x0000009A +#define TEMP_VCC_MONITOR_XADC_SEQ_REG5_VALUE_BIT_IDX 0 +#define TEMP_VCC_MONITOR_XADC_SEQ_REG5_VALUE_WIDTH 16 +#define TEMP_VCC_MONITOR_XADC_SEQ_REG5_VALUE_DEFAULT 0x00000000 + +#define TEMP_VCC_MONITOR_XADC_SEQ_REG6_ADDR 0x0000009C +#define TEMP_VCC_MONITOR_XADC_SEQ_REG6_VALUE_BIT_IDX 0 +#define TEMP_VCC_MONITOR_XADC_SEQ_REG6_VALUE_WIDTH 16 +#define TEMP_VCC_MONITOR_XADC_SEQ_REG6_VALUE_DEFAULT 0x00000000 + +#define TEMP_VCC_MONITOR_XADC_SEQ_REG7_ADDR 0x0000009E +#define TEMP_VCC_MONITOR_XADC_SEQ_REG7_VALUE_BIT_IDX 0 +#define TEMP_VCC_MONITOR_XADC_SEQ_REG7_VALUE_WIDTH 16 +#define TEMP_VCC_MONITOR_XADC_SEQ_REG7_VALUE_DEFAULT 0x00000000 + +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG0_ADDR 0x000000A0 +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG0_VALUE_BIT_IDX 0 +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG0_VALUE_WIDTH 16 +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG0_VALUE_DEFAULT 0x00000000 + +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG1_ADDR 0x000000A2 +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG1_VALUE_BIT_IDX 0 +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG1_VALUE_WIDTH 16 +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG1_VALUE_DEFAULT 0x00000000 + +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG2_ADDR 0x000000A4 +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG2_VALUE_BIT_IDX 0 +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG2_VALUE_WIDTH 16 +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG2_VALUE_DEFAULT 0x00000000 + +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG3_ADDR 0x000000A6 +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG3_VALUE_BIT_IDX 0 +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG3_VALUE_WIDTH 16 +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG3_VALUE_DEFAULT 0x00000000 + +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG4_ADDR 0x000000A8 +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG4_VALUE_BIT_IDX 0 +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG4_VALUE_WIDTH 16 +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG4_VALUE_DEFAULT 0x00000000 + +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG5_ADDR 0x000000AA +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG5_VALUE_BIT_IDX 0 +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG5_VALUE_WIDTH 16 +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG5_VALUE_DEFAULT 0x00000000 + +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG6_ADDR 0x000000AC +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG6_VALUE_BIT_IDX 0 +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG6_VALUE_WIDTH 16 +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG6_VALUE_DEFAULT 0x00000000 + +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG7_ADDR 0x000000AE +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG7_VALUE_BIT_IDX 0 +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG7_VALUE_WIDTH 16 +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG7_VALUE_DEFAULT 0x00000000 + +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG8_ADDR 0x000000B0 +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG8_VALUE_BIT_IDX 0 +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG8_VALUE_WIDTH 16 +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG8_VALUE_DEFAULT 0x00000000 + +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG9_ADDR 0x000000B2 +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG9_VALUE_BIT_IDX 0 +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG9_VALUE_WIDTH 16 +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG9_VALUE_DEFAULT 0x00000000 + +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG10_ADDR 0x000000B4 +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG10_VALUE_BIT_IDX 0 +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG10_VALUE_WIDTH 16 +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG10_VALUE_DEFAULT 0x00000000 + +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG11_ADDR 0x000000B6 +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG11_VALUE_BIT_IDX 0 +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG11_VALUE_WIDTH 16 +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG11_VALUE_DEFAULT 0x00000000 + +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG12_ADDR 0x000000B8 +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG12_VALUE_BIT_IDX 0 +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG12_VALUE_WIDTH 16 +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG12_VALUE_DEFAULT 0x00000000 + +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG13_ADDR 0x000000BA +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG13_VALUE_BIT_IDX 0 +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG13_VALUE_WIDTH 16 +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG13_VALUE_DEFAULT 0x00000000 + +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG14_ADDR 0x000000BC +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG14_VALUE_BIT_IDX 0 +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG14_VALUE_WIDTH 16 +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG14_VALUE_DEFAULT 0x00000000 + +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG15_ADDR 0x000000BE +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG15_VALUE_BIT_IDX 0 +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG15_VALUE_WIDTH 16 +#define TEMP_VCC_MONITOR_XADC_ALARM_THR_REG15_VALUE_DEFAULT 0x00000000 + +#endif // METAVISION_HAL_TEMP_VCC_MONITOR_XADC_REGISTER_MAP_H diff --git a/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/tep_register_control_register_map.h b/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/tep_register_control_register_map.h new file mode 100644 index 000000000..145790a96 --- /dev/null +++ b/hal_psee_plugins/include/devices/gen3/legacy_regmap_headers/tep_register_control_register_map.h @@ -0,0 +1,247 @@ +/********************************************************************************************** + * WARNING: THIS FILE HAS BEEN GENERATED BY REG_MAP_MANAGER TOOLS PLEASE DO NOT MODIFY IT * + ********************************************************************************************** + * File: tep_register_control_register_map.h * + * * + * Copyright (c) 2015-2018 Prophesee. All rights reserved. * + * * + * Date: 08/10/2018 at 12h05m31s * + * Name: tep_register_control_register_map * + * Version: 1.0 * + * Hash: ec11a5a55c12c55d8d7ee89f4a02057d2f9bcfd8d28fe15c1dfd7041086af274 * + ********************************************************************************************** + * WARNING: THIS FILE HAS BEEN GENERATED BY REG_MAP_MANAGER TOOLS PLEASE DO NOT MODIFY IT * + *********************************************************************************************/ + +#ifndef METAVISION_HAL_TEP_REGISTER_CONTROL_REGISTER_MAP_H +#define METAVISION_HAL_TEP_REGISTER_CONTROL_REGISTER_MAP_H + +//------------------------------------------------------------------------------------------------------------ +// CCAM2_SYSTEM_CONTROL +//------------------------------------------------------------------------------------------------------------ + +#define CCAM2_SYSTEM_CONTROL_BASE_ADDR 0x00000000 +#define CCAM2_SYSTEM_CONTROL_LAST_ADDR 0x0000003C +#define CCAM2_SYSTEM_CONTROL_SIZE 0x00000040 + +#define CCAM2_SYSTEM_CONTROL_ATIS_CONTROL_ADDR 0x00000000 +#define CCAM2_SYSTEM_CONTROL_ATIS_CONTROL_EN_VDDA_BIT_IDX 0 +#define CCAM2_SYSTEM_CONTROL_ATIS_CONTROL_EN_VDDA_WIDTH 1 +#define CCAM2_SYSTEM_CONTROL_ATIS_CONTROL_EN_VDDA_DEFAULT 0x00000000 +#define CCAM2_SYSTEM_CONTROL_ATIS_CONTROL_EN_VDDC_BIT_IDX 1 +#define CCAM2_SYSTEM_CONTROL_ATIS_CONTROL_EN_VDDC_WIDTH 1 +#define CCAM2_SYSTEM_CONTROL_ATIS_CONTROL_EN_VDDC_DEFAULT 0x00000000 +#define CCAM2_SYSTEM_CONTROL_ATIS_CONTROL_EN_VDDD_BIT_IDX 2 +#define CCAM2_SYSTEM_CONTROL_ATIS_CONTROL_EN_VDDD_WIDTH 1 +#define CCAM2_SYSTEM_CONTROL_ATIS_CONTROL_EN_VDDD_DEFAULT 0x00000000 +#define CCAM2_SYSTEM_CONTROL_ATIS_CONTROL_SENSOR_SOFT_RESET_BIT_IDX 3 +#define CCAM2_SYSTEM_CONTROL_ATIS_CONTROL_SENSOR_SOFT_RESET_WIDTH 1 +#define CCAM2_SYSTEM_CONTROL_ATIS_CONTROL_SENSOR_SOFT_RESET_DEFAULT 0x00000001 +#define CCAM2_SYSTEM_CONTROL_ATIS_CONTROL_IN_EVT_NO_BLOCKING_MODE_BIT_IDX 4 +#define CCAM2_SYSTEM_CONTROL_ATIS_CONTROL_IN_EVT_NO_BLOCKING_MODE_WIDTH 1 +#define CCAM2_SYSTEM_CONTROL_ATIS_CONTROL_IN_EVT_NO_BLOCKING_MODE_DEFAULT 0x00000001 +#define CCAM2_SYSTEM_CONTROL_ATIS_CONTROL_SISLEY_HVGA_REMAP_BYPASS_BIT_IDX 8 +#define CCAM2_SYSTEM_CONTROL_ATIS_CONTROL_SISLEY_HVGA_REMAP_BYPASS_WIDTH 1 +#define CCAM2_SYSTEM_CONTROL_ATIS_CONTROL_SISLEY_HVGA_REMAP_BYPASS_DEFAULT 0x00000001 +#define CCAM2_SYSTEM_CONTROL_ATIS_CONTROL_MASTER_MODE_BIT_IDX 12 +#define CCAM2_SYSTEM_CONTROL_ATIS_CONTROL_MASTER_MODE_WIDTH 1 +#define CCAM2_SYSTEM_CONTROL_ATIS_CONTROL_MASTER_MODE_DEFAULT 0x00000000 +#define CCAM2_SYSTEM_CONTROL_ATIS_CONTROL_MASTER_ENABLE_BIT_IDX 13 +#define CCAM2_SYSTEM_CONTROL_ATIS_CONTROL_MASTER_ENABLE_WIDTH 1 +#define CCAM2_SYSTEM_CONTROL_ATIS_CONTROL_MASTER_ENABLE_DEFAULT 0x00000000 +#define CCAM2_SYSTEM_CONTROL_ATIS_CONTROL_USE_EXT_START_BIT_IDX 14 +#define CCAM2_SYSTEM_CONTROL_ATIS_CONTROL_USE_EXT_START_WIDTH 1 +#define CCAM2_SYSTEM_CONTROL_ATIS_CONTROL_USE_EXT_START_DEFAULT 0x00000000 +#define CCAM2_SYSTEM_CONTROL_ATIS_CONTROL_ROI_TD_RSTN_BIT_IDX 18 +#define CCAM2_SYSTEM_CONTROL_ATIS_CONTROL_ROI_TD_RSTN_WIDTH 1 +#define CCAM2_SYSTEM_CONTROL_ATIS_CONTROL_ROI_TD_RSTN_DEFAULT 0x00000000 +#define CCAM2_SYSTEM_CONTROL_ATIS_CONTROL_EN_EXT_CTRL_RSTB_BIT_IDX 20 +#define CCAM2_SYSTEM_CONTROL_ATIS_CONTROL_EN_EXT_CTRL_RSTB_WIDTH 1 +#define CCAM2_SYSTEM_CONTROL_ATIS_CONTROL_EN_EXT_CTRL_RSTB_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_CONTROL_ATIS_BIASROI_UPDATE_VALUE0_ADDR 0x00000002 +#define CCAM2_SYSTEM_CONTROL_ATIS_BIASROI_UPDATE_VALUE0_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_CONTROL_ATIS_BIASROI_UPDATE_VALUE0_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_CONTROL_ATIS_BIASROI_UPDATE_VALUE0_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_CONTROL_ATIS_BIASROI_UPDATE_VALUE1_ADDR 0x00000004 +#define CCAM2_SYSTEM_CONTROL_ATIS_BIASROI_UPDATE_VALUE1_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_CONTROL_ATIS_BIASROI_UPDATE_VALUE1_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_CONTROL_ATIS_BIASROI_UPDATE_VALUE1_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_CONTROL_ATIS_BIAS_UPDATE_VALUE2_ADDR 0x00000006 +#define CCAM2_SYSTEM_CONTROL_ATIS_BIAS_UPDATE_VALUE2_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_CONTROL_ATIS_BIAS_UPDATE_VALUE2_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_CONTROL_ATIS_BIAS_UPDATE_VALUE2_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_CONTROL_CCAM2_CONTROL_ADDR 0x00000008 +#define CCAM2_SYSTEM_CONTROL_CCAM2_CONTROL_ENABLE_64BITS_EVENT_BIT_IDX 3 +#define CCAM2_SYSTEM_CONTROL_CCAM2_CONTROL_ENABLE_64BITS_EVENT_WIDTH 1 +#define CCAM2_SYSTEM_CONTROL_CCAM2_CONTROL_ENABLE_64BITS_EVENT_DEFAULT 0x00000001 +#define CCAM2_SYSTEM_CONTROL_CCAM2_CONTROL_BYPASS_MAPPING_BIT_IDX 5 +#define CCAM2_SYSTEM_CONTROL_CCAM2_CONTROL_BYPASS_MAPPING_WIDTH 1 +#define CCAM2_SYSTEM_CONTROL_CCAM2_CONTROL_BYPASS_MAPPING_DEFAULT 0x00000001 +#define CCAM2_SYSTEM_CONTROL_CCAM2_CONTROL_HOST_IF_ENABLE_BIT_IDX 8 +#define CCAM2_SYSTEM_CONTROL_CCAM2_CONTROL_HOST_IF_ENABLE_WIDTH 1 +#define CCAM2_SYSTEM_CONTROL_CCAM2_CONTROL_HOST_IF_ENABLE_DEFAULT 0x00000000 +#define CCAM2_SYSTEM_CONTROL_CCAM2_CONTROL_STEREO_MERGE_ENABLE_BIT_IDX 9 +#define CCAM2_SYSTEM_CONTROL_CCAM2_CONTROL_STEREO_MERGE_ENABLE_WIDTH 1 +#define CCAM2_SYSTEM_CONTROL_CCAM2_CONTROL_STEREO_MERGE_ENABLE_DEFAULT 0x00000000 +#define CCAM2_SYSTEM_CONTROL_CCAM2_CONTROL_ENABLE_IMU_BIT_IDX 10 +#define CCAM2_SYSTEM_CONTROL_CCAM2_CONTROL_ENABLE_IMU_WIDTH 1 +#define CCAM2_SYSTEM_CONTROL_CCAM2_CONTROL_ENABLE_IMU_DEFAULT 0x00000000 +#define CCAM2_SYSTEM_CONTROL_CCAM2_CONTROL_ENABLE_OUT_OF_FOV_BIT_IDX 11 +#define CCAM2_SYSTEM_CONTROL_CCAM2_CONTROL_ENABLE_OUT_OF_FOV_WIDTH 1 +#define CCAM2_SYSTEM_CONTROL_CCAM2_CONTROL_ENABLE_OUT_OF_FOV_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_CONTROL_TRIGGERS_ADDR 0x0000000A +#define CCAM2_SYSTEM_CONTROL_TRIGGERS_SOFT_RESET_BIT_IDX 0 +#define CCAM2_SYSTEM_CONTROL_TRIGGERS_SOFT_RESET_WIDTH 1 +#define CCAM2_SYSTEM_CONTROL_TRIGGERS_SOFT_RESET_DEFAULT 0x00000000 +#define CCAM2_SYSTEM_CONTROL_TRIGGERS_BIAS_DIN_VALID_BIT_IDX 1 +#define CCAM2_SYSTEM_CONTROL_TRIGGERS_BIAS_DIN_VALID_WIDTH 1 +#define CCAM2_SYSTEM_CONTROL_TRIGGERS_BIAS_DIN_VALID_DEFAULT 0x00000000 +#define CCAM2_SYSTEM_CONTROL_TRIGGERS_TS_RESET_BIT_IDX 2 +#define CCAM2_SYSTEM_CONTROL_TRIGGERS_TS_RESET_WIDTH 1 +#define CCAM2_SYSTEM_CONTROL_TRIGGERS_TS_RESET_DEFAULT 0x00000000 +#define CCAM2_SYSTEM_CONTROL_TRIGGERS_ROI_DIN_BIT_IDX 3 +#define CCAM2_SYSTEM_CONTROL_TRIGGERS_ROI_DIN_WIDTH 1 +#define CCAM2_SYSTEM_CONTROL_TRIGGERS_ROI_DIN_DEFAULT 0x00000000 +#define CCAM2_SYSTEM_CONTROL_TRIGGERS_FIFO_RESET_BIT_IDX 7 +#define CCAM2_SYSTEM_CONTROL_TRIGGERS_FIFO_RESET_WIDTH 1 +#define CCAM2_SYSTEM_CONTROL_TRIGGERS_FIFO_RESET_DEFAULT 0x00000000 +#define CCAM2_SYSTEM_CONTROL_TRIGGERS_FLASH_ACCESS_BIT_IDX 8 +#define CCAM2_SYSTEM_CONTROL_TRIGGERS_FLASH_ACCESS_WIDTH 1 +#define CCAM2_SYSTEM_CONTROL_TRIGGERS_FLASH_ACCESS_DEFAULT 0x00000000 +#define CCAM2_SYSTEM_CONTROL_TRIGGERS_MAPPING_FETCH_BIT_IDX 9 +#define CCAM2_SYSTEM_CONTROL_TRIGGERS_MAPPING_FETCH_WIDTH 1 +#define CCAM2_SYSTEM_CONTROL_TRIGGERS_MAPPING_FETCH_DEFAULT 0x00000000 +#define CCAM2_SYSTEM_CONTROL_TRIGGERS_PROG_DAC_BIT_IDX 10 +#define CCAM2_SYSTEM_CONTROL_TRIGGERS_PROG_DAC_WIDTH 1 +#define CCAM2_SYSTEM_CONTROL_TRIGGERS_PROG_DAC_DEFAULT 0x00000000 +#define CCAM2_SYSTEM_CONTROL_TRIGGERS_DAC_DIN_VALID_BIT_IDX 11 +#define CCAM2_SYSTEM_CONTROL_TRIGGERS_DAC_DIN_VALID_WIDTH 1 +#define CCAM2_SYSTEM_CONTROL_TRIGGERS_DAC_DIN_VALID_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_CONTROL_SYSTEM_STATUS_ADDR 0x0000000C +#define CCAM2_SYSTEM_CONTROL_SYSTEM_STATUS_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_CONTROL_SYSTEM_STATUS_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_CONTROL_SYSTEM_STATUS_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_CONTROL_FOUT_LSB_STATUS_ADDR 0x0000000E +#define CCAM2_SYSTEM_CONTROL_FOUT_LSB_STATUS_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_CONTROL_FOUT_LSB_STATUS_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_CONTROL_FOUT_LSB_STATUS_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_CONTROL_FOUT_MSB_STATUS_ADDR 0x00000010 +#define CCAM2_SYSTEM_CONTROL_FOUT_MSB_STATUS_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_CONTROL_FOUT_MSB_STATUS_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_CONTROL_FOUT_MSB_STATUS_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_CONTROL_FIFO_WRCOUNT_STATUS_ADDR 0x00000012 +#define CCAM2_SYSTEM_CONTROL_FIFO_WRCOUNT_STATUS_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_CONTROL_FIFO_WRCOUNT_STATUS_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_CONTROL_FIFO_WRCOUNT_STATUS_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_CONTROL_FIFO_CHECKPIX_STATUS_ADDR 0x00000014 +#define CCAM2_SYSTEM_CONTROL_FIFO_CHECKPIX_STATUS_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_CONTROL_FIFO_CHECKPIX_STATUS_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_CONTROL_FIFO_CHECKPIX_STATUS_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_CONTROL_TLAST_REARMUS_ADDR 0x00000016 +#define CCAM2_SYSTEM_CONTROL_TLAST_REARMUS_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_CONTROL_TLAST_REARMUS_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_CONTROL_TLAST_REARMUS_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_CONTROL_OVERFLOW_HITCOUNT_ADDR 0x00000018 +#define CCAM2_SYSTEM_CONTROL_OVERFLOW_HITCOUNT_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_CONTROL_OVERFLOW_HITCOUNT_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_CONTROL_OVERFLOW_HITCOUNT_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_CONTROL_CCAM2_MODE_ADDR 0x0000001A +#define CCAM2_SYSTEM_CONTROL_CCAM2_MODE_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_CONTROL_CCAM2_MODE_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_CONTROL_CCAM2_MODE_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_CONTROL_SERIAL_LSB_ADDR 0x0000001C +#define CCAM2_SYSTEM_CONTROL_SERIAL_LSB_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_CONTROL_SERIAL_LSB_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_CONTROL_SERIAL_LSB_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_CONTROL_SERIAL_MSB_ADDR 0x00000020 +#define CCAM2_SYSTEM_CONTROL_SERIAL_MSB_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_CONTROL_SERIAL_MSB_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_CONTROL_SERIAL_MSB_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_CONTROL_NOTIFY_PACKETCOUNT_ADDR 0x00000022 +#define CCAM2_SYSTEM_CONTROL_NOTIFY_PACKETCOUNT_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_CONTROL_NOTIFY_PACKETCOUNT_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_CONTROL_NOTIFY_PACKETCOUNT_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_CONTROL_SNFETCH_FADDR_LSB_ADDR 0x00000024 +#define CCAM2_SYSTEM_CONTROL_SNFETCH_FADDR_LSB_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_CONTROL_SNFETCH_FADDR_LSB_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_CONTROL_SNFETCH_FADDR_LSB_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_CONTROL_SNFETCH_FADDR_MSB_ADDR 0x00000026 +#define CCAM2_SYSTEM_CONTROL_SNFETCH_FADDR_MSB_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_CONTROL_SNFETCH_FADDR_MSB_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_CONTROL_SNFETCH_FADDR_MSB_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_CONTROL_SNFETCH_RDATA_LSB_ADDR 0x00000028 +#define CCAM2_SYSTEM_CONTROL_SNFETCH_RDATA_LSB_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_CONTROL_SNFETCH_RDATA_LSB_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_CONTROL_SNFETCH_RDATA_LSB_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_CONTROL_SNFETCH_RDATA_MSB_ADDR 0x0000002A +#define CCAM2_SYSTEM_CONTROL_SNFETCH_RDATA_MSB_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_CONTROL_SNFETCH_RDATA_MSB_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_CONTROL_SNFETCH_RDATA_MSB_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_CONTROL_SNFETCH_READ_ITER_ADDR 0x0000002C +#define CCAM2_SYSTEM_CONTROL_SNFETCH_READ_ITER_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_CONTROL_SNFETCH_READ_ITER_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_CONTROL_SNFETCH_READ_ITER_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_CONTROL_SNFETCH_TIME_COUNT_ADDR 0x0000002E +#define CCAM2_SYSTEM_CONTROL_SNFETCH_TIME_COUNT_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_CONTROL_SNFETCH_TIME_COUNT_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_CONTROL_SNFETCH_TIME_COUNT_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_CONTROL_BIAS_LOAD_ITERATION_COUNT_ADDR 0x00000030 +#define CCAM2_SYSTEM_CONTROL_BIAS_LOAD_ITERATION_COUNT_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_CONTROL_BIAS_LOAD_ITERATION_COUNT_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_CONTROL_BIAS_LOAD_ITERATION_COUNT_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_CONTROL_FLASH_PROGRAM_SEL_SLAVE_ADDR 0x00000032 +#define CCAM2_SYSTEM_CONTROL_FLASH_PROGRAM_SEL_SLAVE_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_CONTROL_FLASH_PROGRAM_SEL_SLAVE_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_CONTROL_FLASH_PROGRAM_SEL_SLAVE_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_CONTROL_OUT_OF_FOV_FILTER_WIDTH_ADDR 0x00000034 +#define CCAM2_SYSTEM_CONTROL_OUT_OF_FOV_FILTER_WIDTH_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_CONTROL_OUT_OF_FOV_FILTER_WIDTH_VALUE_WIDTH 11 +#define CCAM2_SYSTEM_CONTROL_OUT_OF_FOV_FILTER_WIDTH_VALUE_DEFAULT 0x00000280 + +#define CCAM2_SYSTEM_CONTROL_OUT_OF_FOV_FILTER_HEIGHT_ADDR 0x00000036 +#define CCAM2_SYSTEM_CONTROL_OUT_OF_FOV_FILTER_HEIGHT_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_CONTROL_OUT_OF_FOV_FILTER_HEIGHT_VALUE_WIDTH 11 +#define CCAM2_SYSTEM_CONTROL_OUT_OF_FOV_FILTER_HEIGHT_VALUE_DEFAULT 0x000001E0 + +#define CCAM2_SYSTEM_CONTROL_TEP_EVT_RATE_CONTROL_ENABLE_ADDR 0x00000038 +#define CCAM2_SYSTEM_CONTROL_TEP_EVT_RATE_CONTROL_ENABLE_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_CONTROL_TEP_EVT_RATE_CONTROL_ENABLE_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_CONTROL_TEP_EVT_RATE_CONTROL_ENABLE_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_CONTROL_TEP_EVT_RATE_CONTROL_T_DROP_FACTOR_ADDR 0x0000003A +#define CCAM2_SYSTEM_CONTROL_TEP_EVT_RATE_CONTROL_T_DROP_FACTOR_VALUE_BIT_IDX 0 +#define CCAM2_SYSTEM_CONTROL_TEP_EVT_RATE_CONTROL_T_DROP_FACTOR_VALUE_WIDTH 16 +#define CCAM2_SYSTEM_CONTROL_TEP_EVT_RATE_CONTROL_T_DROP_FACTOR_VALUE_DEFAULT 0x00000000 + +#define CCAM2_SYSTEM_CONTROL_EXT_SYNC_OUT_MODE_ADDR 0x0000003C +#define CCAM2_SYSTEM_CONTROL_EXT_SYNC_OUT_MODE_VALUE_BIT_IDX \ + 0 // Set to 1 to select the trigger out on the output multiplexer +#define CCAM2_SYSTEM_CONTROL_EXT_SYNC_OUT_MODE_VALUE_WIDTH 1 +#define CCAM2_SYSTEM_CONTROL_EXT_SYNC_OUT_MODE_VALUE_DEFAULT 0x00000000 + +#endif // METAVISION_HAL_TEP_REGISTER_CONTROL_REGISTER_MAP_H diff --git a/hal_psee_plugins/include/devices/gen31/ccam_gen31_helpers.h b/hal_psee_plugins/include/devices/gen31/ccam_gen31_helpers.h new file mode 100644 index 000000000..6416a3215 --- /dev/null +++ b/hal_psee_plugins/include/devices/gen31/ccam_gen31_helpers.h @@ -0,0 +1,116 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_CCAM_GEN31_HELPERS_H +#define METAVISION_HAL_CCAM_GEN31_HELPERS_H +#define GEN31_WRITE_REGISTER(cmd, address, value) \ + do { \ + if (!!getenv("LOG_REGISTERS")) { \ + printf("write %s -> 0x%x\n", #address, value); \ + printf(" @0x%04x -> 0x%x\n\n", address, value); \ + } \ + cmd.write_register(address, value); \ + } while (0); + +#define GEN31_SYSTEM_WRITE_REGISTER(cmd, address, value) \ + do { \ + if (!!getenv("LOG_REGISTERS")) { \ + printf("write %s -> 0x%x\n", #address, value); \ + printf(" @0x%04x -> 0x%x\n\n", base_address_ + address, value); \ + } \ + cmd.write_register(base_address_ + address, value); \ + } while (0); + +#define GEN31_SENSOR_WRITE_REGISTER(cmd, address, value) \ + do { \ + if (!!getenv("LOG_REGISTERS")) { \ + printf("write %s -> 0x%x\n", #address, value); \ + printf(" @0x%04x -> 0x%x\n\n", base_sensor_address_ + address, value); \ + } \ + cmd.write_register(base_sensor_address_ + address, value); \ + } while (0); + +#define GEN31_SEND_REGISTER_BIT(cmd, address, bit, value) \ + do { \ + if (!!getenv("LOG_REGISTERS")) { \ + printf("send %s/%s -> 0x%x\n", #address, #bit, value); \ + printf(" @0x%04x bit %d -> 0x%x\n\n", address, bit, value); \ + } \ + cmd.send_register_bit(address, bit, value); \ + } while (0); + +#define GEN31_SYSTEM_SEND_REGISTER_BIT(cmd, address, bit, value) \ + do { \ + if (!!getenv("LOG_REGISTERS")) { \ + printf("send %s/%s -> 0x%x\n", #address, #bit, value); \ + printf(" @0x%04x bit %d -> 0x%x\n\n", base_address_ + address, bit, value); \ + } \ + cmd.send_register_bit(base_address_ + address, bit, value); \ + } while (0); + +#define GEN31_SENSOR_SEND_REGISTER_BIT(cmd, address, bit, value) \ + do { \ + if (!!getenv("LOG_REGISTERS")) { \ + printf("send %s/%s -> 0x%x\n", #address, #bit, value); \ + printf(" @0x%04x bit %d -> 0x%x\n\n", base_sensor_address_ + address, bit, value); \ + } \ + cmd.send_register_bit(base_sensor_address_ + address, bit, value); \ + } while (0); + +#define GEN31_SET_REGISTER_BIT(cmd, address, bit, value) \ + do { \ + if (!!getenv("LOG_REGISTERS")) { \ + printf("set %s/%s -> 0x%x\n", #address, #bit, value); \ + printf(" @0x%04x bit %d -> 0x%x\n\n", address, bit, value); \ + } \ + cmd.set_register_bit(address, bit, value); \ + } while (0); + +#define GEN31_SYSTEM_SET_REGISTER_BIT(cmd, address, bit, value) \ + do { \ + if (!!getenv("LOG_REGISTERS")) { \ + printf("set %s/%s -> 0x%x\n", #address, #bit, value); \ + printf(" @0x%04x bit %d -> 0x%x\n\n", base_address_ + address, bit, value); \ + } \ + cmd.set_register_bit(base_address_ + address, bit, value); \ + } while (0); + +#define GEN31_SENSOR_SET_REGISTER_BIT(cmd, address, bit, value) \ + do { \ + if (!!getenv("LOG_REGISTERS")) { \ + printf("set %s/%s -> 0x%x\n", #address, #bit, value); \ + printf(" @0x%04x bit %d -> 0x%x\n\n", base_sensor_address_ + address, bit, value); \ + } \ + cmd.set_register_bit(base_sensor_address_ + address, bit, value); \ + } while (0); + +#define GEN31_SEND_REGISTER(cmd, address) \ + do { \ + if (!!getenv("LOG_REGISTERS")) \ + printf("send %s mirrored value\n", #address); \ + cmd.send_register(address); \ + } while (0); + +#define GEN31_SYSTEM_SEND_REGISTER(cmd, address) \ + do { \ + if (!!getenv("LOG_REGISTERS")) \ + printf("send %s mirrored value\n", #address); \ + cmd.send_register(base_address_ + address); \ + } while (0); + +#define GEN31_SENSOR_SEND_REGISTER(cmd, address) \ + do { \ + if (!!getenv("LOG_REGISTERS")) \ + printf("send %s mirrored value\n", #address); \ + cmd.send_register(base_sensor_address_ + address); \ + } while (0); + +#endif // METAVISION_HAL_CCAM_GEN31_HELPERS_H diff --git a/hal_psee_plugins/include/devices/gen31/gen31_analog.h b/hal_psee_plugins/include/devices/gen31/gen31_analog.h new file mode 100644 index 000000000..f2c435710 --- /dev/null +++ b/hal_psee_plugins/include/devices/gen31/gen31_analog.h @@ -0,0 +1,42 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_GEN31_ANALOG_H +#define METAVISION_HAL_GEN31_ANALOG_H + +#include +#include + +namespace Metavision { + +class RegisterMap; + +class Gen31Analog { +public: + Gen31Analog(const std::shared_ptr ®ister_map, const std::string &prefix, bool is_em); + + void init(); + void start(); + void stop(); + void destroy(); + void analog_td_rstn(bool rstn); + void analog_em_rstn(bool rstn); + void enable_lifo_measurement(); + uint32_t lifo_counter(); + +private: + std::string prefix_; + std::shared_ptr register_map_; + bool is_em_ = false; +}; + +} // namespace Metavision +#endif // METAVISION_HAL_GEN31_ANALOG_H diff --git a/hal_psee_plugins/include/devices/gen31/gen31_ccam5_fpga.h b/hal_psee_plugins/include/devices/gen31/gen31_ccam5_fpga.h new file mode 100644 index 000000000..75ec84f4f --- /dev/null +++ b/hal_psee_plugins/include/devices/gen31/gen31_ccam5_fpga.h @@ -0,0 +1,62 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_GEN31_CCAM5_FPGA_H +#define METAVISION_HAL_GEN31_CCAM5_FPGA_H + +#include +#include + +#include "devices/gen31/gen31_fpga.h" +#include "devices/gen31/gen31_system_control.h" +#include "devices/gen31/gen31_sensor_if_ctrl.h" + +namespace Metavision { + +class RegisterMap; + +class Gen31CCam5Fpga : public Gen31Fpga { +public: + Gen31CCam5Fpga(const std::shared_ptr ®map, const std::string &root_prefix, + const std::string &sensor_if_prefix); + + virtual void init() override; + virtual void start() override; + virtual void stop() override; + virtual void destroy() override; + + void set_timebase_master(bool enable); + void set_timebase_ext_sync(bool enable); + + bool get_timebase_master() const; + bool get_timebase_ext_sync() const; + + std::string get_root_prefix() const; + std::string get_sensor_if_prefix() const; + std::string get_system_config_prefix() const; + std::string get_system_control_prefix() const; + std::string get_system_monitor_prefix() const; + +private: + const std::string root_prefix_; + const std::string sensor_if_prefix_; + + bool timebase_master_ = true; + bool timebase_ext_sync_ = false; + + std::shared_ptr register_map_; + Gen31SystemControl sys_ctrl_; + Gen31SensorIfCtrl sensor_if_; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_GEN31_CCAM5_FPGA_H diff --git a/hal_psee_plugins/include/devices/gen31/gen31_ccam5_trigger_event.h b/hal_psee_plugins/include/devices/gen31/gen31_ccam5_trigger_event.h new file mode 100644 index 000000000..1c0e13ae7 --- /dev/null +++ b/hal_psee_plugins/include/devices/gen31/gen31_ccam5_trigger_event.h @@ -0,0 +1,54 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_GEN31_CCAM5_TRIGGER_EVENT_H +#define METAVISION_HAL_GEN31_CCAM5_TRIGGER_EVENT_H + +#include +#include + +#include "metavision/hal/facilities/i_trigger_in.h" + +namespace Metavision { + +class TzDevice; +class RegisterMap; + +class Gen31Ccam5TriggerEvent : public I_TriggerIn { +public: + /// @brief Constructor + Gen31Ccam5TriggerEvent(const std::shared_ptr ®ister_map, const std::shared_ptr &device); + + /// @brief Enables external trigger monitoring + /// + /// Available channels: + /// 0: main trigger in + /// 6: loopback trigger out (Test purpose) + /// @param channel External trigger's channel + virtual bool enable(uint32_t channel) override; + + /// @brief Disables external trigger monitoring + /// @param channel External trigger's channel + virtual bool disable(uint32_t channel) override; + + /// @brief Checks if trigger in index is enabled + /// @param channel External trigger's channel + /// @return true if trigger in index is enabled, False otherwise + virtual bool is_enabled(uint32_t channel) override; + +private: + std::shared_ptr register_map_; + std::shared_ptr tzDev_; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_GEN31_CCAM5_TRIGGER_EVENT_H diff --git a/hal_psee_plugins/include/devices/gen31/gen31_ccam5_trigger_out.h b/hal_psee_plugins/include/devices/gen31/gen31_ccam5_trigger_out.h new file mode 100644 index 000000000..6fae40bb7 --- /dev/null +++ b/hal_psee_plugins/include/devices/gen31/gen31_ccam5_trigger_out.h @@ -0,0 +1,41 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_GEN31_CCAM5_TRIGGER_OUT_H +#define METAVISION_HAL_GEN31_CCAM5_TRIGGER_OUT_H + +#include +#include "metavision/hal/facilities/i_trigger_out.h" + +namespace Metavision { + +class RegisterMap; +class TzCcam5Gen31; + +class Gen31Ccam5TriggerOut : public I_TriggerOut { +public: + Gen31Ccam5TriggerOut(const std::shared_ptr ®map, const std::shared_ptr &dev); + + bool enable() override final; + void disable() override final; + void set_period(uint32_t period_us) override final; + void set_duty_cycle(double period_ratio) override final; + bool is_enabled() override final; + +private: + double period_ratio_ = 0.5; + std::shared_ptr register_map_; + std::shared_ptr tz_dev_; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_GEN31_CCAM5_TRIGGER_OUT_H diff --git a/hal_psee_plugins/include/devices/gen31/gen31_ccam5_tz_device.h b/hal_psee_plugins/include/devices/gen31/gen31_ccam5_tz_device.h new file mode 100644 index 000000000..18ca90d27 --- /dev/null +++ b/hal_psee_plugins/include/devices/gen31/gen31_ccam5_tz_device.h @@ -0,0 +1,60 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_GEN31_CCAM5_TZ_DEVICE_H +#define METAVISION_HAL_GEN31_CCAM5_TZ_DEVICE_H + +#include "devices/treuzell/tz_regmap_device.h" +#include "devices/treuzell/tz_psee_fpga_device.h" +#include "devices/treuzell/tz_issd_device.h" +#include "devices/treuzell/tz_main_device.h" +#include "facilities/tz_monitoring.h" + +namespace Metavision { + +class DeviceBuilder; +class DeviceBuilderParameters; +class DeviceConfig; + +class TzCcam5Gen31 : public TzPseeFpgaDevice, public TzIssdDevice, public TzMainDevice, public IlluminationProvider { +public: + TzCcam5Gen31(std::shared_ptr cmd, uint32_t dev_id, std::shared_ptr parent); + virtual ~TzCcam5Gen31(); + static std::shared_ptr build(std::shared_ptr cmd, uint32_t dev_id, + std::shared_ptr parent); + + virtual StreamFormat get_output_format(); + virtual long get_system_id() const; + virtual long get_system_version() const; + virtual bool set_mode_standalone(); + virtual bool set_mode_master(); + virtual bool set_mode_slave(); + virtual I_DeviceControl::SyncMode get_mode(); + virtual I_HW_Identification::SensorInfo get_sensor_info() { + return {3, 1}; + } + virtual int get_illumination(); + + /// get the type of sensor + /// 0x90100402h uniform TD feedback PPD VGA + /// 0x90100403h uniform EM HVGA + long long get_sensor_id(); + +protected: + virtual void spawn_facilities(DeviceBuilder &device_builder); + +private: + I_DeviceControl::SyncMode sync_mode_; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_GEN31_CCAM5_TZ_DEVICE_H diff --git a/hal_psee_plugins/include/devices/gen31/gen31_device_control.h b/hal_psee_plugins/include/devices/gen31/gen31_device_control.h new file mode 100644 index 000000000..82c1d70f5 --- /dev/null +++ b/hal_psee_plugins/include/devices/gen31/gen31_device_control.h @@ -0,0 +1,96 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_CCAM_GEN31_DEVICE_CONTROL_H +#define METAVISION_HAL_CCAM_GEN31_DEVICE_CONTROL_H + +#include "facilities/psee_device_control.h" +#include "devices/utils/evt_format.h" + +namespace Metavision { + +class RegisterMap; +class Gen31Fpga; +class Gen31Sensor; +class I_TriggerIn; +class I_TriggerOut; + +class Gen31DeviceControl : public PseeDeviceControl { +public: + Gen31DeviceControl(const std::shared_ptr ®ister_map, const std::shared_ptr &fpga, + const std::shared_ptr &sensor); + + virtual void reset() override; + + /// get the type of sensor + /// 0x90100402h uniform TD feedback PPD VGA + /// 0x90100403h uniform EM HVGA + long long get_sensor_id() override; + static long long get_sensor_id(RegisterMap ®ister_map); + + bool is_gen31EM(); + static bool is_gen31EM(long sensor_id); + static bool is_gen31EM(RegisterMap ®ister_map); + + void low_consumption_startup_post_biases_initialize(); + virtual bool set_mode_standalone_impl() override; + virtual bool set_mode_slave_impl() override; + virtual bool set_mode_master_impl() override; + +protected: + void set_mode_run_slave(); + + void start_camera_common(bool is_gen31EM, bool allow_dual_readout = true); + void stop_camera_common(); + void destroy_camera(); + virtual void reset_ts_internal(); + void fpga_init(); + void sensor_init(); + void enable_double_bandwith(bool en); + void sensor_enable_clk_out(bool en); + void soft_reset(); + + std::shared_ptr register_map_; + std::shared_ptr fpga_; + std::shared_ptr sensor_; + +private: + virtual void start_impl() override; + virtual bool set_evt_format_impl(EvtFormat fmt) override; + + void enable_LDO0_VDDA(bool enable); + void enable_LDO1_VDDC(bool enable); + void enable_LDO2_VDDD(bool enable); + void fpga_enable_sensor_clk(bool enable); + void terminate_camera(); + + void enable_SW_CTRL_BGEN_RSTN(bool enable); + void enable_fx3_interface(bool state); + void enable_spare_control(bool state); + + void enable_roi_EM(bool state); + void enable_roi_TD(bool state); + + void enable_oob_filter(bool state); + void set_oob_filter_bounds(int width, int height); + + void enable_test_bus(); + void enable_ctrl_sync(); + + // reset_ts calls SOFT RESET and should flush the fifo after that + // as it is not done we transform the reset_ts so it does nothing + // and use reset_ts_internal() instead in initialize (when the camdevice is created and camera is not streaming yet + + virtual void enable_interface(bool state) = 0; +}; +} // namespace Metavision + +#endif // METAVISION_HAL_CCAM_GEN31_DEVICE_CONTROL_H diff --git a/hal_psee_plugins/include/devices/gen31/gen31_digital.h b/hal_psee_plugins/include/devices/gen31/gen31_digital.h new file mode 100644 index 000000000..38a85262b --- /dev/null +++ b/hal_psee_plugins/include/devices/gen31/gen31_digital.h @@ -0,0 +1,38 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_GEN31_DIGITAL_H +#define METAVISION_HAL_GEN31_DIGITAL_H + +#include +#include + +namespace Metavision { + +class RegisterMap; + +class Gen31Digital { +public: + Gen31Digital(const std::shared_ptr ®ister_map, const std::string &prefix); + + long long get_chip_id(); + void init(); + void start(); + void stop(); + void destroy(); + +private: + std::string prefix_; + std::shared_ptr register_map_; +}; + +} // namespace Metavision +#endif // METAVISION_HAL_GEN31_DIGITAL_H diff --git a/hal_psee_plugins/include/devices/gen31/gen31_event_rate_noise_filter_module.h b/hal_psee_plugins/include/devices/gen31/gen31_event_rate_noise_filter_module.h new file mode 100644 index 000000000..89eb5d063 --- /dev/null +++ b/hal_psee_plugins/include/devices/gen31/gen31_event_rate_noise_filter_module.h @@ -0,0 +1,50 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_GEN31_EVENT_RATE_NOISE_FILTER_MODULE_H +#define METAVISION_HAL_GEN31_EVENT_RATE_NOISE_FILTER_MODULE_H + +#include + +#include "metavision/hal/facilities/i_event_rate_noise_filter_module.h" + +namespace Metavision { + +class I_HW_Register; + +class Gen31_EventRateNoiseFilterModule : public I_EventRateNoiseFilterModule { +public: + Gen31_EventRateNoiseFilterModule(const std::shared_ptr &i_hw_register, const std::string &prefix); + + virtual void enable(bool enable_filter) override; + virtual bool set_event_rate_threshold(uint32_t threshold_Kev_s) override; + virtual uint32_t get_event_rate_threshold() override; + + static constexpr uint32_t min_time_window_us_ = 1; + static constexpr uint32_t max_time_window_us_ = 1023; + static constexpr uint32_t min_event_rate_threshold_kev_s = 10; + static constexpr uint32_t max_event_rate_threshold_kev_s = 10000; + +protected: + const std::shared_ptr &get_hw_register(); + +private: + bool set_time_window(uint32_t window_length_us); + uint32_t get_time_window(); + + std::shared_ptr i_hw_register_; + const std::string base_name_; + uint32_t current_threshold_kev_s_{0}; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_GEN31_EVENT_RATE_NOISE_FILTER_MODULE_H diff --git a/sdk/modules/driver/cpp/include/metavision/sdk/driver/temperature_module.h b/hal_psee_plugins/include/devices/gen31/gen31_evk1_fpga.h similarity index 64% rename from sdk/modules/driver/cpp/include/metavision/sdk/driver/temperature_module.h rename to hal_psee_plugins/include/devices/gen31/gen31_evk1_fpga.h index 0bb8544f2..a55bf91b5 100644 --- a/sdk/modules/driver/cpp/include/metavision/sdk/driver/temperature_module.h +++ b/hal_psee_plugins/include/devices/gen31/gen31_evk1_fpga.h @@ -9,29 +9,33 @@ * See the License for the specific language governing permissions and limitations under the License. * **********************************************************************************************************************/ -#ifndef METAVISION_SDK_DRIVER_TEMPERATURE_MODULE_H -#define METAVISION_SDK_DRIVER_TEMPERATURE_MODULE_H +#ifndef METAVISION_HAL_GEN31_EVK1_FPGA_H +#define METAVISION_HAL_GEN31_EVK1_FPGA_H -namespace Metavision { - -/// @note This class is deprecated since version 2.1.0 and will be removed in next releases -/// @brief Facility class to handle the Temperature module -/// Allows enabling the temperature sensor in order to receive @ref EventTemperature events -class TemperatureModule { -public: - /// @brief Destructor - ~TemperatureModule(); +#include "devices/gen31/gen31_fpga.h" +#include "devices/gen31/gen31_system_control.h" +#include "devices/gen31/gen31_sensor_if_ctrl.h" - /// @brief Enables temperature monitoring - void enable(); +namespace Metavision { - /// @brief Disables temperature monitoring - void disable(); +class RegisterMap; - /// @brief Returns the temperature - float get_temperature(int source); +class Gen31Evk1Fpga : public Gen31Fpga { +public: + Gen31Evk1Fpga(const std::shared_ptr ®map, bool is_em); + + virtual void init() override; + virtual void start() override; + virtual void stop() override; + virtual void destroy() override; + +protected: + std::shared_ptr register_map_; + Gen31SystemControl sys_ctrl_; + Gen31SensorIfCtrl sensor_if_; + bool is_em_ = false; }; } // namespace Metavision -#endif // METAVISION_SDK_DRIVER_TEMPERATURE_MODULE_H +#endif // METAVISION_HAL_GEN31_EVK1_FPGA_H diff --git a/hal_psee_plugins/include/devices/gen31/gen31_evk2_device_control.h b/hal_psee_plugins/include/devices/gen31/gen31_evk2_device_control.h new file mode 100644 index 000000000..21bd0181d --- /dev/null +++ b/hal_psee_plugins/include/devices/gen31/gen31_evk2_device_control.h @@ -0,0 +1,54 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_CCAM_GEN31_EVK2_DEVICE_CONTROL_H +#define METAVISION_HAL_CCAM_GEN31_EVK2_DEVICE_CONTROL_H + +#include "facilities/psee_device_control.h" +#include "devices/common/evk2_system_control.h" +#include "devices/common/issd.h" + +namespace Metavision { + +class RegisterMap; + +class Gen31Evk2DeviceControl : public PseeDeviceControl { +public: + Gen31Evk2DeviceControl(const std::shared_ptr ®ister_map); + ~Gen31Evk2DeviceControl(); + + long long get_sensor_id() override; + virtual void reset() override; + + virtual bool set_mode_standalone_impl() override; + virtual bool set_mode_slave_impl() override; + virtual bool set_mode_master_impl() override; + std::string get_sensor_prefix() const; + +protected: + virtual void initialize() override; + virtual void destroy() override; + +private: + virtual bool set_evt_format_impl(EvtFormat fmt) override; + virtual void start_impl() override; + virtual void stop_impl() override; + + void ApplyRegisterOperationSequence(const std::vector sequence); + void ApplyRegisterOperation(const RegisterOperation operation); + + std::shared_ptr register_map_; + Evk2SystemControl sys_ctrl_; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_CCAM_GEN31_EVK2_DEVICE_CONTROL_H diff --git a/sdk/modules/driver/cpp/src/imu.cpp b/hal_psee_plugins/include/devices/gen31/gen31_evk2_facilities_builder.h similarity index 75% rename from sdk/modules/driver/cpp/src/imu.cpp rename to hal_psee_plugins/include/devices/gen31/gen31_evk2_facilities_builder.h index a6b978d13..6308d589f 100644 --- a/sdk/modules/driver/cpp/src/imu.cpp +++ b/hal_psee_plugins/include/devices/gen31/gen31_evk2_facilities_builder.h @@ -9,19 +9,17 @@ * See the License for the specific language governing permissions and limitations under the License. * **********************************************************************************************************************/ -#include "metavision/sdk/driver/imu.h" -#include "metavision/sdk/driver/camera_exception.h" +#ifndef METAVISION_HAL_GEN31_EVK2_FACILITIES_BUILDER_H +#define METAVISION_HAL_GEN31_EVK2_FACILITIES_BUILDER_H namespace Metavision { -Imu::~Imu() {} - -CallbackId Imu::add_callback(const EventsImuCallback &cb) { - throw CameraException(CameraErrorCode::DeprecatedFeature, "Imu not available."); -} - -bool Imu::remove_callback(CallbackId callback_id) { - throw CameraException(CameraErrorCode::DeprecatedFeature, "Imu not available."); -} +class DeviceBuilder; +class DeviceBuilderParameters; +class DeviceConfig; +bool build_gen31_evk2_device(DeviceBuilder &device_builder, const DeviceBuilderParameters &device_builder_params, + const DeviceConfig &device_config); } // namespace Metavision + +#endif // METAVISION_HAL_GEN31_EVK2_FACILITIES_BUILDER_H diff --git a/hal_psee_plugins/include/devices/gen31/gen31_evk2_interface_control.h b/hal_psee_plugins/include/devices/gen31/gen31_evk2_interface_control.h new file mode 100644 index 000000000..b102e5db3 --- /dev/null +++ b/hal_psee_plugins/include/devices/gen31/gen31_evk2_interface_control.h @@ -0,0 +1,35 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_GEN31_EVK2_INTERFACE_CONTROL_H +#define METAVISION_HAL_GEN31_EVK2_INTERFACE_CONTROL_H + +#include + +namespace Metavision { + +class RegisterMap; + +class Gen31Evk2InterfaceControl { +public: + Gen31Evk2InterfaceControl(const std::shared_ptr ®map); + + void enable(bool enable); + void bypass(bool bypass); + void gen_last(bool enable); + +private: + std::shared_ptr register_map_; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_GEN31_EVK2_INTERFACE_CONTROL_H diff --git a/hal_psee_plugins/include/devices/gen31/gen31_evk2_issd.h b/hal_psee_plugins/include/devices/gen31/gen31_evk2_issd.h new file mode 100644 index 000000000..608c31f26 --- /dev/null +++ b/hal_psee_plugins/include/devices/gen31/gen31_evk2_issd.h @@ -0,0 +1,227 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +// ISSD sequences generated by psee_issd_convert. +// Parameters: +// issd_csv_format_version=1.0 +// system=evk2_gen31_cd +// operator=Prophesee +// dry_run=False +// no_system=False +// strip_prefix=True +// sensor_version=None +// args= +// sensor=PseeEvk2Gen31 +// date=2021-09-16T23:28:10 +// psee_issd_version=1.1.3.215+g40ab73918.d20210008 +// psee_sensor_lib_version=3.3.0.486+g1106e0921.d20210015 +// issd_data_format_version=1.0 + +// clang-format off + +#ifndef METAVISION_HAL_GEN31_EVK2_ISSD_H +#define METAVISION_HAL_GEN31_EVK2_ISSD_H + +#include + +namespace Metavision { + +static const std::vector gen31_evk2_init = { + RegisterOperation::Read(0x00000800, 0x00000029, 0x000000FF), + RegisterOperation::Write(0x00000004, 0x00000666), + RegisterOperation::Write(0x00000004, 0x00010000), + RegisterOperation::Write(0x00000004, 0x00000111), + RegisterOperation::Write(0x0001F024, 0x00000004), + RegisterOperation::Write(0x0001F024, 0x00000005), + RegisterOperation::Delay(500000), + RegisterOperation::Write(0x0001F024, 0x00000007), + RegisterOperation::Delay(500000), + RegisterOperation::Delay(3000000), + RegisterOperation::Read(0x00020800, 0x00000023, 0x000000FF), + RegisterOperation::Write(0x00000000, 0x00000088), + RegisterOperation::Write(0x00000000, 0x00000088), + RegisterOperation::Write(0x00000000, 0x00000089), + RegisterOperation::Write(0x00000008, 0x0000004E), + RegisterOperation::Write(0x00002004, 0x00001000), + RegisterOperation::Write(0x00000014, 0x00000000), + RegisterOperation::Write(0x00000600, 0x00000001), + RegisterOperation::Write(0x00000044, 0x00000000), + RegisterOperation::Write(0x00000048, 0x00030D41), + RegisterOperation::Write(0x00000018, 0x00000000), + RegisterOperation::Write(0x00001004, 0x00000000), + RegisterOperation::Write(0x00001000, 0x00000001), + RegisterOperation::Write(0x00001008, 0x00000000), + RegisterOperation::Delay(100000), + RegisterOperation::Read(0x000011C4, 0x00000004, 0x00000004), + RegisterOperation::Write(0x00001100, 0x00000004), + RegisterOperation::Write(0x00001104, 0x00000032), + RegisterOperation::Write(0x00001108, 0x00089C0F), + RegisterOperation::Write(0x000011C0, 0x0A5A005A), + RegisterOperation::Delay(100000), + RegisterOperation::Read(0x000013C4, 0x00000004, 0x00000004), + RegisterOperation::Write(0x00001304, 0x00004E21), + RegisterOperation::Write(0x00001308, 0x00030D41), + RegisterOperation::Write(0x0000130C, 0x0000022D), + RegisterOperation::Write(0x000013C0, 0x0A234004), + RegisterOperation::Write(0x00001300, 0x00000005), + RegisterOperation::Write(0x00003000, 0x00155402), + RegisterOperation::Write(0x00001508, 0x00000000), + RegisterOperation::Write(0x00001500, 0xFFFF0006), + RegisterOperation::Write(0x00010000, 0x00000001), + RegisterOperation::Write(0x0001F000, 0x10400000), + RegisterOperation::Write(0x0001F000, 0x10400000), + RegisterOperation::Write(0x0001F000, 0x10400000), + RegisterOperation::Write(0x0001F024, 0x00000007), + RegisterOperation::Write(0x0001F01C, 0x00000000), + RegisterOperation::Write(0x0001F01C, 0x00000000), + RegisterOperation::Write(0x0001F020, 0x04FF01E0), + RegisterOperation::Write(0x0001F020, 0x028001E0), + RegisterOperation::Write(0x0001F018, 0x00000001), + RegisterOperation::Write(0x00020000, 0x00000000), + RegisterOperation::Write(0x0002000C, 0x00000000), + RegisterOperation::Write(0x0002000C, 0x00000001), + RegisterOperation::Write(0x00020000, 0x00000000), + RegisterOperation::Write(0x00020000, 0x00000000), + RegisterOperation::Write(0x00020000, 0x00000008), + RegisterOperation::Write(0x00020000, 0x0000000A), + RegisterOperation::Write(0x00020000, 0x0000000E), + RegisterOperation::Write(0x00020000, 0x00000006), + RegisterOperation::Write(0x00020000, 0x00004006), + RegisterOperation::Write(0x00020768, 0x08010000), + RegisterOperation::Write(0x0002076C, 0x00000000), + RegisterOperation::Write(0x00020770, 0x00000000), + RegisterOperation::Write(0x00020774, 0x00000000), + RegisterOperation::Write(0x00020778, 0x00000000), + RegisterOperation::Write(0x0002077C, 0x00000000), + RegisterOperation::Write(0x00020798, 0x003FFFFF), + RegisterOperation::Write(0x00020764, 0x00FFFFFF), + RegisterOperation::Write(0x00020008, 0x00000100), + RegisterOperation::Write(0x00021500, 0x0000000D), + RegisterOperation::Write(0x00020000, 0x00004106), + RegisterOperation::Write(0x00020000, 0x00004106), + RegisterOperation::Write(0x0002074C, 0x00000002), + RegisterOperation::Write(0x00020238, 0x00000001), + RegisterOperation::Write(0x00020204, 0x0000000B), + RegisterOperation::Write(0x0002021C, 0x00000100), + RegisterOperation::Write(0x00020200, 0x00000010), + RegisterOperation::Write(0x00020200, 0x00000018), + RegisterOperation::Write(0x00020200, 0x0000001A), + RegisterOperation::Read(0x00020218, 0x90200C02, 0xFFFFFFFF), + RegisterOperation::Write(0x00020240, 0x00140501), + RegisterOperation::Write(0x00020208, 0x40020BFF), + RegisterOperation::Write(0x00020208, 0x40020BFF), + RegisterOperation::Write(0x00020208, 0x400203FF), + RegisterOperation::Write(0x00020244, 0x400203FF), + RegisterOperation::Write(0x00020244, 0x400203FF), + RegisterOperation::Write(0x00020244, 0x400203FF), + RegisterOperation::Write(0x0002021C, 0x10000100), + RegisterOperation::Write(0x0002021C, 0x10000101), + RegisterOperation::Write(0x00020300, 0x5903E1B0), + RegisterOperation::Write(0x00020304, 0x5903E1B0), + RegisterOperation::Write(0x00020308, 0x5900629B), + RegisterOperation::Write(0x0002030C, 0x59001BA9), + RegisterOperation::Write(0x00020310, 0x59014D8C), + RegisterOperation::Write(0x00020314, 0x790DB770), + RegisterOperation::Write(0x00020318, 0x59014D8C), + RegisterOperation::Write(0x0002031C, 0x59014DBE), + RegisterOperation::Write(0x00020320, 0x79002C3E), + RegisterOperation::Write(0x00020324, 0x79005436), + RegisterOperation::Write(0x00020328, 0x59166CB7), + RegisterOperation::Write(0x0002032C, 0x79000000), + RegisterOperation::Write(0x00020330, 0x590000FF), + RegisterOperation::Write(0x00020334, 0x7100002A), + RegisterOperation::Write(0x00020338, 0x7100002F), + RegisterOperation::Write(0x0002033C, 0x71000021), + RegisterOperation::Write(0x00020340, 0x590004FF), + RegisterOperation::Write(0x00020344, 0x590000FF), + RegisterOperation::Write(0x00020348, 0x59014DFF), + RegisterOperation::Write(0x0002034C, 0x7900571E), + RegisterOperation::Write(0x00020350, 0x79125C35), + RegisterOperation::Write(0x00020354, 0x7902CE29), + RegisterOperation::Write(0x00020358, 0x71003DD6), + RegisterOperation::Write(0x0002035C, 0x51034FB1), + RegisterOperation::Write(0x00020360, 0x51004FD4), + RegisterOperation::Write(0x00020364, 0x510006D4), + RegisterOperation::Write(0x00020368, 0x71000054), + RegisterOperation::Write(0x00020238, 0x00000001), + RegisterOperation::Write(0x00020220, 0x00000001), + RegisterOperation::Write(0x00020204, 0x00000003), + RegisterOperation::Write(0x00020204, 0x00000003), + RegisterOperation::Write(0x00020450, 0x00000000), + RegisterOperation::Write(0x0002053C, 0x00000000), + RegisterOperation::Write(0x00020204, 0x00000023), + RegisterOperation::Write(0x0002024C, 0x0002BFFF), + RegisterOperation::Write(0x00020248, 0x000000C9) +}; + +static const std::vector gen31_evk2_start = { + RegisterOperation::Write(0x00001500, 0xFFFF0007), + RegisterOperation::Write(0x00003000, 0x00155403), + RegisterOperation::Write(0x00001300, 0x00000005), + RegisterOperation::Write(0x00001100, 0x00000005), + RegisterOperation::Write(0x00001008, 0x00000002), + RegisterOperation::Write(0x00000044, 0x00000001), + RegisterOperation::Write(0x00000014, 0x00000001), + RegisterOperation::Write(0x0001F000, 0x10400001), + RegisterOperation::Write(0x00020000, 0x00004107), + RegisterOperation::Write(0x00020000, 0x00044107), + RegisterOperation::Write(0x00020000, 0x000C4107), + RegisterOperation::Write(0x00020008, 0x00000300), + RegisterOperation::Write(0x00000018, 0x00000001), + RegisterOperation::WriteField(0x00000008, 0x0000004F, 0x1), + RegisterOperation::Write(0x00020238, 0x00000001), + RegisterOperation::Write(0x00020204, 0x0000002B), + RegisterOperation::Delay(250000), + RegisterOperation::Write(0x00020248, 0x000000C8) +}; + +static const std::vector gen31_evk2_stop = { + RegisterOperation::Write(0x00020204, 0x00000023), + RegisterOperation::Write(0x00020238, 0x00000000), + RegisterOperation::Write(0x00020008, 0x00000100), + RegisterOperation::Write(0x00020000, 0x00084107), + RegisterOperation::Write(0x00020000, 0x00084106), + RegisterOperation::Write(0x00000018, 0x00000000), + RegisterOperation::WriteField(0x00000008, 0x0000004E, 0x1), + RegisterOperation::Write(0x00001008, 0x00000000), + RegisterOperation::Write(0x00001100, 0x00000004), + RegisterOperation::Write(0x00001300, 0x00000004), + RegisterOperation::Write(0x00003000, 0x00155402), + RegisterOperation::Write(0x00001500, 0xFFFF0006) +}; + +static const std::vector gen31_evk2_destroy = { + RegisterOperation::Write(0x00020238, 0x00000000), + RegisterOperation::Write(0x0002074C, 0x00000000), + RegisterOperation::Write(0x00020000, 0x0008410E), + RegisterOperation::Write(0x00020000, 0x0008410C), + RegisterOperation::Write(0x00020000, 0x00084108), + RegisterOperation::Write(0x0002000C, 0x00000000), + RegisterOperation::Write(0x0002000C, 0x00000001), + RegisterOperation::Write(0x0001F024, 0x00000005), + RegisterOperation::Write(0x0001F024, 0x00000004), + RegisterOperation::Write(0x00000004, 0x00000777), + RegisterOperation::Write(0x00000004, 0x00010111), + RegisterOperation::Write(0x00000004, 0x00000000) +}; + +static Issd gen31_evk2_sequence = Issd{ + gen31_evk2_init, + gen31_evk2_start, + gen31_evk2_stop, + gen31_evk2_destroy, +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_GEN31_EVK2_ISSD_H + +// clang-format on diff --git a/hal_psee_plugins/include/devices/gen31/gen31_evk2_monitoring.h b/hal_psee_plugins/include/devices/gen31/gen31_evk2_monitoring.h new file mode 100644 index 000000000..a6153c272 --- /dev/null +++ b/hal_psee_plugins/include/devices/gen31/gen31_evk2_monitoring.h @@ -0,0 +1,33 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_GEN31_EVK2_MONITORING_H +#define METAVISION_HAL_GEN31_EVK2_MONITORING_H + +#include + +#include "facilities/psee_monitoring.h" + +namespace Metavision { + +class I_HW_Register; + +class Gen31Evk2Monitoring : public PseeMonitoring { +public: + Gen31Evk2Monitoring(const std::shared_ptr &i_hw_register); + + virtual int get_temperature() override; + virtual int get_illumination() override; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_GEN31_EVK2_MONITORING_H diff --git a/hal_openeb_plugins/src/common/raw_geometry.cpp b/hal_psee_plugins/include/devices/gen31/gen31_evk2_regmap_builder.h similarity index 83% rename from hal_openeb_plugins/src/common/raw_geometry.cpp rename to hal_psee_plugins/include/devices/gen31/gen31_evk2_regmap_builder.h index d7e42507b..f507218e4 100644 --- a/hal_openeb_plugins/src/common/raw_geometry.cpp +++ b/hal_psee_plugins/include/devices/gen31/gen31_evk2_regmap_builder.h @@ -9,18 +9,15 @@ * See the License for the specific language governing permissions and limitations under the License. * **********************************************************************************************************************/ -#include "common/raw_geometry.h" +#ifndef METAVISION_HAL_GEN31_EVK2_REGMAP_BUILDER_H +#define METAVISION_HAL_GEN31_EVK2_REGMAP_BUILDER_H -namespace Metavision { - -RawGeometry::RawGeometry(const int width, const int height) : width_(width), height_(height) {} +#include "utils/register_map.h" -int RawGeometry::get_width() const { - return width_; -} +namespace Metavision { -int RawGeometry::get_height() const { - return height_; -} +void build_gen31_evk2_register_map(RegisterMap ®map); } // namespace Metavision + +#endif // METAVISION_HAL_GEN31_EVK2_REGMAP_BUILDER_H diff --git a/hal_psee_plugins/include/devices/gen31/gen31_evk2_tz_device.h b/hal_psee_plugins/include/devices/gen31/gen31_evk2_tz_device.h new file mode 100644 index 000000000..709b77e87 --- /dev/null +++ b/hal_psee_plugins/include/devices/gen31/gen31_evk2_tz_device.h @@ -0,0 +1,57 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_GEN31_EVK2_TZ_DEVICE_H +#define METAVISION_HAL_GEN31_EVK2_TZ_DEVICE_H + +#include "devices/treuzell/tz_psee_video.h" +#include "devices/treuzell/tz_issd_device.h" +#include "devices/treuzell/tz_regmap_device.h" +#include "facilities/tz_monitoring.h" +#include "devices/treuzell/tz_main_device.h" +#include "devices/common/evk2_system_control.h" + +namespace Metavision { + +class TzEvk2Gen31 : public TzPseeVideo, public TzIssdDevice, public TemperatureProvider, public IlluminationProvider { +public: + TzEvk2Gen31(std::shared_ptr cmd, uint32_t dev_id, std::shared_ptr parent); + virtual ~TzEvk2Gen31(); + static std::shared_ptr build(std::shared_ptr cmd, uint32_t dev_id, + std::shared_ptr parent); + static bool can_build(std::shared_ptr, uint32_t dev_id); + + virtual void start(); + virtual void stop(); + virtual StreamFormat get_output_format(); + virtual long get_system_id(); + virtual bool set_mode_standalone(); + virtual bool set_mode_master(); + virtual bool set_mode_slave(); + virtual I_DeviceControl::SyncMode get_mode(); + virtual I_HW_Identification::SensorInfo get_sensor_info() { + return {3, 1}; + } + long long get_sensor_id(); + virtual int get_temperature(); + virtual int get_illumination(); + +protected: + virtual void spawn_facilities(DeviceBuilder &device_builder); + +private: + Evk2SystemControl sys_ctrl_; + I_DeviceControl::SyncMode sync_mode_; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_GEN31_EVK2_TZ_DEVICE_H diff --git a/hal_psee_plugins/include/devices/gen31/gen31_evk3_device_control.h b/hal_psee_plugins/include/devices/gen31/gen31_evk3_device_control.h new file mode 100644 index 000000000..bab1325ef --- /dev/null +++ b/hal_psee_plugins/include/devices/gen31/gen31_evk3_device_control.h @@ -0,0 +1,51 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_CCAM_GEN31_EVK3_DEVICE_CONTROL_H +#define METAVISION_HAL_CCAM_GEN31_EVK3_DEVICE_CONTROL_H + +#include "facilities/psee_device_control.h" +#include "devices/common/issd.h" + +namespace Metavision { + +class RegisterMap; + +class Gen31Evk3DeviceControl : public PseeDeviceControl { +public: + Gen31Evk3DeviceControl(const std::shared_ptr ®ister_map); + + long long get_sensor_id() override; + virtual void reset() override; + + virtual bool set_mode_standalone_impl() override; + virtual bool set_mode_slave_impl() override; + virtual bool set_mode_master_impl() override; + std::string get_sensor_prefix() const; + +protected: + virtual void initialize() override; + virtual void destroy() override; + +private: + virtual bool set_evt_format_impl(EvtFormat fmt) override; + virtual void start_impl() override; + virtual void stop_impl() override; + + void ApplyRegisterOperationSequence(const std::vector sequence); + void ApplyRegisterOperation(const RegisterOperation operation); + + std::shared_ptr register_map_; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_CCAM_GEN31_EVK3_DEVICE_CONTROL_H diff --git a/hal_psee_plugins/include/devices/gen31/gen31_evk3_facilities_builder.h b/hal_psee_plugins/include/devices/gen31/gen31_evk3_facilities_builder.h new file mode 100644 index 000000000..2da5082c1 --- /dev/null +++ b/hal_psee_plugins/include/devices/gen31/gen31_evk3_facilities_builder.h @@ -0,0 +1,27 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_GEN31_EVK3_FACILITIES_BUILDER_H +#define METAVISION_HAL_GEN31_EVK3_FACILITIES_BUILDER_H + +namespace Metavision { + +class DeviceBuilder; +class DeviceBuilderParameters; +class DeviceConfig; +bool build_gen31_evk3_evt2_device(DeviceBuilder &device_builder, const DeviceBuilderParameters &device_builder_params, + const DeviceConfig &device_config); +bool build_gen31_evk3_evt3_device(DeviceBuilder &device_builder, const DeviceBuilderParameters &device_builder_params, + const DeviceConfig &device_config); + +} // namespace Metavision + +#endif // METAVISION_HAL_GEN31_EVK3_FACILITIES_BUILDER_H \ No newline at end of file diff --git a/hal_psee_plugins/include/devices/gen31/gen31_evk3_issd.h b/hal_psee_plugins/include/devices/gen31/gen31_evk3_issd.h new file mode 100644 index 000000000..18d379682 --- /dev/null +++ b/hal_psee_plugins/include/devices/gen31/gen31_evk3_issd.h @@ -0,0 +1,162 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +// ISSD sequences generated by psee_issd_convert. +// Parameters: +// issd_csv_format_version=1.0 +// system=evk3_gen31_cd +// operator=Prophesee +// dry_run=False +// no_system=False +// strip_prefix=True +// sensor_version=None +// args= +// sensor=PseeEvk3Gen31 +// date=2021-09-14T12:36:39 +// psee_issd_version=1.1.3.215+g40ab73918.d20210008 +// psee_sensor_lib_version=3.3.0.486+g1106e0921.d20210015 +// issd_data_format_version=1.0 + +// clang-format off + +#ifndef METAVISION_HAL_GEN31_EVK3_ISSD_H +#define METAVISION_HAL_GEN31_EVK3_ISSD_H + +#include + +namespace Metavision { + +static const std::vector gen31_evk3_init = { + RegisterOperation::Read(0x00000800, 0x00000028, 0x000000FF), + RegisterOperation::Read(0x00000800, 0x00000028, 0x000000FF), + RegisterOperation::Read(0x00000800, 0x00000028, 0x000000FF), + RegisterOperation::Write(0x00000000, 0x00000000), + RegisterOperation::Write(0x0000000C, 0x00000000), + RegisterOperation::Write(0x0000000C, 0x00000001), + RegisterOperation::Write(0x00000000, 0x00000000), + RegisterOperation::Write(0x00000000, 0x00000000), + RegisterOperation::Write(0x00000000, 0x00000008), + RegisterOperation::Write(0x00000000, 0x0000000A), + RegisterOperation::Write(0x00000000, 0x0000000E), + RegisterOperation::Write(0x00000000, 0x00000006), + RegisterOperation::Write(0x00000000, 0x00001006), + RegisterOperation::Write(0x00000768, 0x08010000), + RegisterOperation::Write(0x0000076C, 0x00000000), + RegisterOperation::Write(0x00000770, 0x00000000), + RegisterOperation::Write(0x00000774, 0x00000000), + RegisterOperation::Write(0x00000778, 0x00000000), + RegisterOperation::Write(0x0000077C, 0x00000000), + RegisterOperation::Write(0x00000798, 0x003FFFFF), + RegisterOperation::Write(0x00000764, 0x00FFFFFF), + RegisterOperation::Write(0x00000008, 0x00000100), + RegisterOperation::Write(0x00001500, 0x0000000D), + RegisterOperation::Write(0x00000000, 0x00001106), + RegisterOperation::Write(0x00000000, 0x00001106), + RegisterOperation::Write(0x0000074C, 0x00000002), + RegisterOperation::Write(0x00001508, 0x00000FA0), + RegisterOperation::Write(0x00001520, 0x00003E80), + RegisterOperation::Write(0x0000150C, 0x000001F8), + RegisterOperation::Write(0x00001510, 0x00002000), + RegisterOperation::Write(0x00000238, 0x00000001), + RegisterOperation::Write(0x00000204, 0x0000000B), + RegisterOperation::Write(0x0000021C, 0x00000100), + RegisterOperation::Write(0x00000200, 0x00000010), + RegisterOperation::Write(0x00000200, 0x00000018), + RegisterOperation::Write(0x00000200, 0x0000001A), + RegisterOperation::Read(0x00000218, 0x90200C02, 0xFFFFFFFF), + RegisterOperation::Write(0x00000240, 0x00140501), + RegisterOperation::Write(0x00000208, 0x40020BFF), + RegisterOperation::Write(0x00000208, 0x40020BFF), + RegisterOperation::Write(0x00000208, 0x400203FF), + RegisterOperation::Write(0x00000244, 0x400203FF), + RegisterOperation::Write(0x00000244, 0x400203FF), + RegisterOperation::Write(0x00000244, 0x400203FF), + RegisterOperation::Write(0x0000021C, 0x10000100), + RegisterOperation::Write(0x0000021C, 0x10000101), + RegisterOperation::Write(0x00000300, 0x5903E1B0), + RegisterOperation::Write(0x00000304, 0x5903E1B0), + RegisterOperation::Write(0x00000308, 0x5900629B), + RegisterOperation::Write(0x0000030C, 0x59001BA9), + RegisterOperation::Write(0x00000310, 0x59014D8C), + RegisterOperation::Write(0x00000314, 0x790DB770), + RegisterOperation::Write(0x00000318, 0x59014D8C), + RegisterOperation::Write(0x0000031C, 0x59014DBE), + RegisterOperation::Write(0x00000320, 0x79002C3E), + RegisterOperation::Write(0x00000324, 0x79005436), + RegisterOperation::Write(0x00000328, 0x59166CB7), + RegisterOperation::Write(0x0000032C, 0x79000000), + RegisterOperation::Write(0x00000330, 0x590000FF), + RegisterOperation::Write(0x00000334, 0x7100002A), + RegisterOperation::Write(0x00000338, 0x7100002F), + RegisterOperation::Write(0x0000033C, 0x71000021), + RegisterOperation::Write(0x00000340, 0x590004FF), + RegisterOperation::Write(0x00000344, 0x590000FF), + RegisterOperation::Write(0x00000348, 0x59014DFF), + RegisterOperation::Write(0x0000034C, 0x7900571E), + RegisterOperation::Write(0x00000350, 0x79125C35), + RegisterOperation::Write(0x00000354, 0x7902CE29), + RegisterOperation::Write(0x00000358, 0x71003DD6), + RegisterOperation::Write(0x0000035C, 0x51034FB1), + RegisterOperation::Write(0x00000360, 0x51004FD4), + RegisterOperation::Write(0x00000364, 0x510006D4), + RegisterOperation::Write(0x00000368, 0x71000054), + RegisterOperation::Write(0x00000238, 0x00000001), + RegisterOperation::Write(0x00000220, 0x00000001), + RegisterOperation::Write(0x00000204, 0x00000003), + RegisterOperation::Write(0x00000204, 0x00000003), + RegisterOperation::Write(0x00000450, 0x00000000), + RegisterOperation::Write(0x0000053C, 0x00000000), + RegisterOperation::Write(0x00000204, 0x00000023), + RegisterOperation::Write(0x0000024C, 0x0002BFFF), + RegisterOperation::Write(0x00000248, 0x000000C9) +}; + +static const std::vector gen31_evk3_start = { + RegisterOperation::WriteField(0x00000000, 0x00001107, 0x1), + RegisterOperation::WriteField(0x00000000, 0x00041107, 0x40000), + RegisterOperation::WriteField(0x00000000, 0x000C1107, 0x80000), + RegisterOperation::Write(0x00000008, 0x00000300), + RegisterOperation::Write(0x00000238, 0x00000001), + RegisterOperation::Write(0x00000204, 0x0000002B), + RegisterOperation::Delay(250000), + RegisterOperation::Write(0x00000248, 0x000000C8) +}; + +static const std::vector gen31_evk3_stop = { + RegisterOperation::Write(0x00000204, 0x00000023), + RegisterOperation::Write(0x00000238, 0x00000000), + RegisterOperation::Write(0x00000008, 0x00000100), + RegisterOperation::WriteField(0x00000000, 0x00081107, 0x40000), + RegisterOperation::WriteField(0x00000000, 0x00081106, 0x1) +}; + +static const std::vector gen31_evk3_destroy = { + RegisterOperation::Write(0x00000238, 0x00000000), + RegisterOperation::Write(0x0000074C, 0x00000000), + RegisterOperation::Write(0x00000000, 0x0008110E), + RegisterOperation::Write(0x00000000, 0x0008110C), + RegisterOperation::Write(0x00000000, 0x00081108), + RegisterOperation::Write(0x0000000C, 0x00000000), + RegisterOperation::Write(0x0000000C, 0x00000001) +}; + +static Issd gen31_evk3_sequence = Issd{ + gen31_evk3_init, + gen31_evk3_start, + gen31_evk3_stop, + gen31_evk3_destroy, +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_GEN31_EVK3_ISSD_H + +// clang-format on diff --git a/hal_psee_plugins/include/devices/gen31/gen31_evk3_monitoring.h b/hal_psee_plugins/include/devices/gen31/gen31_evk3_monitoring.h new file mode 100644 index 000000000..0cc27097a --- /dev/null +++ b/hal_psee_plugins/include/devices/gen31/gen31_evk3_monitoring.h @@ -0,0 +1,36 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_GEN31_EVK3_MONITORING_H +#define METAVISION_HAL_GEN31_EVK3_MONITORING_H + +#include "facilities/psee_monitoring.h" + +namespace Metavision { + +class I_HW_Register; +class TzLibUSBBoardCommand; + +class Gen31Evk3Monitoring : public PseeMonitoring { +public: + Gen31Evk3Monitoring(const std::shared_ptr &i_hw_register, + const std::shared_ptr &board_cmd); + + virtual int get_temperature() override; + virtual int get_illumination() override; + +private: + std::shared_ptr icmd_; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_GEN31_EVK3_MONITORING_H diff --git a/hal_psee_plugins/include/devices/gen31/gen31_evk3_trigger_event.h b/hal_psee_plugins/include/devices/gen31/gen31_evk3_trigger_event.h new file mode 100644 index 000000000..acd2509b9 --- /dev/null +++ b/hal_psee_plugins/include/devices/gen31/gen31_evk3_trigger_event.h @@ -0,0 +1,53 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_GEN31_EVK3_TRIGGER_EVENT_H +#define METAVISION_HAL_GEN31_EVK3_TRIGGER_EVENT_H + +#include + +#include "facilities/psee_trigger_in.h" + +namespace Metavision { + +class PseeDeviceControl; +class RegisterMap; + +class Gen31Evk3TriggerEvent : public PseeTriggerIn { +public: + /// @brief Constructor + Gen31Evk3TriggerEvent(const std::shared_ptr ®ister_map, + const std::shared_ptr &device_control); + + /// @brief Enables external trigger monitoring + /// + /// Available channels: + /// 0: main trigger in + /// 6: loopback trigger out (Test purpose) + /// @param channel External trigger's channel + virtual bool enable(uint32_t channel) override; + + /// @brief Disables external trigger monitoring + /// @param channel External trigger's channel + virtual bool disable(uint32_t channel) override; + + /// @brief Checks if trigger in index is enabled + /// @param channel External trigger's channel + /// @return true if trigger in index is enabled, False otherwise + virtual bool is_enabled(uint32_t channel) override; + +private: + std::shared_ptr register_map_; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_GEN31_TRIGGER_EVENT_H diff --git a/hal_psee_plugins/include/devices/gen31/gen31_evk3_trigger_out.h b/hal_psee_plugins/include/devices/gen31/gen31_evk3_trigger_out.h new file mode 100644 index 000000000..ac008f216 --- /dev/null +++ b/hal_psee_plugins/include/devices/gen31/gen31_evk3_trigger_out.h @@ -0,0 +1,40 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_GEN31_EVK3_TRIGGER_OUT_H +#define METAVISION_HAL_GEN31_EVK3_TRIGGER_OUT_H + +#include "facilities/psee_trigger_out.h" + +namespace Metavision { + +class PseeLibUSBBoardCommand; +class RegisterMap; + +class Gen31Evk3TriggerOut : public PseeTriggerOut { +public: + Gen31Evk3TriggerOut(const std::shared_ptr ®map, + const std::shared_ptr &device_control); + + bool enable() override final; + void disable() override final; + void set_period(uint32_t period_us) override final; + void set_duty_cycle(double period_ratio) override final; + bool is_enabled() override final; + +private: + double period_ratio_ = 0.5; + std::shared_ptr register_map_; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_GEN31_EVK3_TRIGGER_OUT_H diff --git a/hal_psee_plugins/include/devices/gen31/gen31_fpga.h b/hal_psee_plugins/include/devices/gen31/gen31_fpga.h new file mode 100644 index 000000000..af6340971 --- /dev/null +++ b/hal_psee_plugins/include/devices/gen31/gen31_fpga.h @@ -0,0 +1,29 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_GEN31_FPGA_H +#define METAVISION_HAL_GEN31_FPGA_H + +namespace Metavision { + +class Gen31Fpga { +public: + virtual ~Gen31Fpga() {} + + virtual void init() = 0; + virtual void start() = 0; + virtual void stop() = 0; + virtual void destroy() = 0; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_GEN31_FPGA_H diff --git a/hal_psee_plugins/include/devices/gen31/gen31_fx3_device_control.h b/hal_psee_plugins/include/devices/gen31/gen31_fx3_device_control.h new file mode 100644 index 000000000..ba145adef --- /dev/null +++ b/hal_psee_plugins/include/devices/gen31/gen31_fx3_device_control.h @@ -0,0 +1,39 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_CCAM_GEN31_FX3_DEVICE_CONTROL_H +#define METAVISION_HAL_CCAM_GEN31_FX3_DEVICE_CONTROL_H + +#include "devices/gen31/gen31_device_control.h" + +namespace Metavision { + +class Gen31Fx3DeviceControl : public Gen31DeviceControl { +public: + Gen31Fx3DeviceControl(const std::shared_ptr ®ister_map); + + std::string get_sensor_prefix() const; + +protected: + virtual void initialize() override; + virtual void destroy() override; + + virtual void enable_interface(bool state) override; + virtual void reset_ts_internal() override; + +private: + virtual void start_impl() override; + virtual void stop_impl() override; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_CCAM_GEN31_FX3_DEVICE_CONTROL_H diff --git a/hal_psee_plugins/include/devices/gen31/gen31_fx3_facilities_builder.h b/hal_psee_plugins/include/devices/gen31/gen31_fx3_facilities_builder.h new file mode 100644 index 000000000..b76127eb5 --- /dev/null +++ b/hal_psee_plugins/include/devices/gen31/gen31_fx3_facilities_builder.h @@ -0,0 +1,25 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_GEN31_FX3_FACILITIES_BUILDER_H +#define METAVISION_HAL_GEN31_FX3_FACILITIES_BUILDER_H + +namespace Metavision { + +class DeviceBuilder; +class DeviceBuilderParameters; +class DeviceConfig; +bool build_gen31_fx3_device(DeviceBuilder &device_builder, const DeviceBuilderParameters &device_builder_params, + const DeviceConfig &device_config); + +} // namespace Metavision + +#endif // METAVISION_HAL_GEN31_FX3_FACILITIES_BUILDER_H \ No newline at end of file diff --git a/hal_psee_plugins/include/devices/gen31/gen31_ll_biases.h b/hal_psee_plugins/include/devices/gen31/gen31_ll_biases.h new file mode 100644 index 000000000..45ec24d21 --- /dev/null +++ b/hal_psee_plugins/include/devices/gen31/gen31_ll_biases.h @@ -0,0 +1,39 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_GEN31_LL_BIASES_H +#define METAVISION_HAL_GEN31_LL_BIASES_H + +#include "metavision/hal/facilities/i_ll_biases.h" + +namespace Metavision { + +class I_HW_Register; + +class Gen31_LL_Biases : public I_LL_Biases { +public: + Gen31_LL_Biases(const std::shared_ptr &i_hw_register, const std::string &prefix); + + virtual bool set(const std::string &bias_name, int bias_value) override; + virtual int get(const std::string &bias_name) override; + virtual std::map get_all_biases() override; + +protected: + const std::shared_ptr &get_hw_register() const; + +private: + std::shared_ptr i_hw_register_; + const std::string base_name_; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_GEN31_LL_BIASES_H diff --git a/sdk/modules/driver/cpp/include/metavision/sdk/driver/imu_module.h b/hal_psee_plugins/include/devices/gen31/gen31_monitoring.h similarity index 74% rename from sdk/modules/driver/cpp/include/metavision/sdk/driver/imu_module.h rename to hal_psee_plugins/include/devices/gen31/gen31_monitoring.h index e98808e21..c88d4f0e3 100644 --- a/sdk/modules/driver/cpp/include/metavision/sdk/driver/imu_module.h +++ b/hal_psee_plugins/include/devices/gen31/gen31_monitoring.h @@ -9,27 +9,25 @@ * See the License for the specific language governing permissions and limitations under the License. * **********************************************************************************************************************/ -#ifndef METAVISION_SDK_DRIVER_IMU_MODULE_H -#define METAVISION_SDK_DRIVER_IMU_MODULE_H +#ifndef METAVISION_HAL_GEN31_MONITORING_H +#define METAVISION_HAL_GEN31_MONITORING_H + +#include + +#include "facilities/psee_monitoring.h" namespace Metavision { -/// @note This class is deprecated since version 2.1.0 and will be removed in next releases -/// @brief Facility class to handle IMUs -class ImuModule { -public: - /// @brief Destructor - /// - ~ImuModule(); +class I_HW_Register; - /// @brief Enables imu - void enable(); +class Gen31Monitoring : public PseeMonitoring { +public: + Gen31Monitoring(const std::shared_ptr &i_hw_register); - /// @brief Disables imu - /// - void disable(); + virtual int get_temperature() override; + virtual int get_illumination() override; }; } // namespace Metavision -#endif // METAVISION_SDK_DRIVER_IMU_MODULE_H +#endif // METAVISION_HAL_GEN31_MONITORING_H diff --git a/hal_psee_plugins/include/devices/gen31/gen31_pattern_generator.h b/hal_psee_plugins/include/devices/gen31/gen31_pattern_generator.h new file mode 100644 index 000000000..c0bf809fa --- /dev/null +++ b/hal_psee_plugins/include/devices/gen31/gen31_pattern_generator.h @@ -0,0 +1,46 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_GEN31_PATTERN_GENERATOR_H +#define METAVISION_HAL_GEN31_PATTERN_GENERATOR_H + +#include + +#include "utils/psee_pattern_generator.h" + +namespace Metavision { +class PseeLibUSBBoardCommand; +class RegisterMap; + +class Gen31PatternGenerator : public PseePatternGenerator { +public: + Gen31PatternGenerator(const std::shared_ptr ®map); + ~Gen31PatternGenerator(); + + bool enable(const PseePatternGenerator::Configuration &configuration) override final; + void disable() override final; + bool is_enabled() override final; + void get_pattern_geometry(int &width, int &height) const override final; + + void set_period_step_count(uint16_t n_step_count, uint16_t p_step_count) override final; + void set_period_rate(uint8_t n_rate_Mev_s, uint8_t p_rate_Mev_s) override final; + +public: + static constexpr int PATTERN_GENERATOR_WIDTH = 512; + static constexpr int PATTERN_GENERATOR_HEIGHT = 1024; + +private: + std::shared_ptr register_map_; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_GEN31_PATTERN_GENERATOR_H diff --git a/hal_psee_plugins/include/devices/gen31/gen31_pattern_generator_checker.h b/hal_psee_plugins/include/devices/gen31/gen31_pattern_generator_checker.h new file mode 100644 index 000000000..07b4b42fe --- /dev/null +++ b/hal_psee_plugins/include/devices/gen31/gen31_pattern_generator_checker.h @@ -0,0 +1,27 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_GEN31_PATTERN_GENERATOR_CHECKER_H +#define METAVISION_HAL_GEN31_PATTERN_GENERATOR_CHECKER_H + +#include "utils/psee_pattern_generator_checker.h" + +namespace Metavision { + +class Gen31PatternGeneratorChecker : public PseePatternGeneratorChecker { +public: + PseePatternGeneratorChecker::PatternChecker * + build_pattern_checker(const PseePatternGenerator::Configuration &configuration) const override final; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_GEN31_PATTERN_GENERATOR_CHECKER_H diff --git a/hal_psee_plugins/include/devices/gen31/gen31_roi_command.h b/hal_psee_plugins/include/devices/gen31/gen31_roi_command.h new file mode 100644 index 000000000..1a6a2a3a9 --- /dev/null +++ b/hal_psee_plugins/include/devices/gen31/gen31_roi_command.h @@ -0,0 +1,43 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_GEN31_ROI_COMMAND_H +#define METAVISION_HAL_GEN31_ROI_COMMAND_H + +#include +#include + +#include "facilities/psee_roi.h" + +namespace Metavision { + +class PseeLibUSBBoardCommand; +class RegisterMap; + +class Gen31ROICommand : public PseeROI { +public: + Gen31ROICommand(int width, int height, const std::shared_ptr ®map, const std::string &prefix); + + virtual void enable(bool state) override; + virtual void write_ROI(const std::vector &vroiparams) override; + +private: + void reset_to_full_roi(); + +private: + std::shared_ptr register_map_; + const std::string prefix_; + std::vector roi_save_; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_GEN31_ROI_COMMAND_H diff --git a/hal_psee_plugins/include/devices/gen31/gen31_sensor.h b/hal_psee_plugins/include/devices/gen31/gen31_sensor.h new file mode 100644 index 000000000..72ee63f53 --- /dev/null +++ b/hal_psee_plugins/include/devices/gen31/gen31_sensor.h @@ -0,0 +1,46 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_GEN31_SENSOR_H +#define METAVISION_HAL_GEN31_SENSOR_H + +#include +#include + +#include "devices/gen31/gen31_analog.h" +#include "devices/gen31/gen31_digital.h" + +namespace Metavision { + +class RegisterMap; + +class Gen31Sensor { +public: + Gen31Sensor(const std::shared_ptr ®map, const std::string &prefix, bool is_em); + + long long get_chip_id(); + void init(); + void start(); + void stop(); + void destroy(); + void bgen_init(); + +private: + std::shared_ptr register_map_; + Gen31Analog analog_; + Gen31Digital digital_; + const std::string prefix_; + bool is_em_ = false; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_GEN31_SENSOR_H diff --git a/hal_psee_plugins/include/devices/gen31/gen31_sensor_if_ctrl.h b/hal_psee_plugins/include/devices/gen31/gen31_sensor_if_ctrl.h new file mode 100644 index 000000000..6e3beeb3c --- /dev/null +++ b/hal_psee_plugins/include/devices/gen31/gen31_sensor_if_ctrl.h @@ -0,0 +1,41 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_GEN31_SENSOR_IF_CONTROL_H +#define METAVISION_HAL_GEN31_SENSOR_IF_CONTROL_H + +#include +#include + +namespace Metavision { + +class RegisterMap; + +class Gen31SensorIfCtrl { +public: + Gen31SensorIfCtrl(const std::shared_ptr ®ister_map, const std::string &prefix); + void enable_test_pattern(uint32_t n_period, uint32_t n_valid_ratio, uint32_t p_period, uint32_t p_valid_ratio, + bool enable); + void sensor_turn_on_clock(); + void sensor_turn_off_clock(); + void self_pattern_config(uint32_t ratio); + void self_pattern_control(bool enable); + void trigger_fwd_config(uint32_t channel_id); + void trigger_fwd_control(bool enable); + +private: + std::string prefix_; + std::shared_ptr register_map_; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_GEN31_SENSOR_IF_CONTROL_H diff --git a/hal_psee_plugins/include/devices/gen31/gen31_system_control.h b/hal_psee_plugins/include/devices/gen31/gen31_system_control.h new file mode 100644 index 000000000..8a1feaf5f --- /dev/null +++ b/hal_psee_plugins/include/devices/gen31/gen31_system_control.h @@ -0,0 +1,51 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_GEN31_SYSTEM_CONTROL_H +#define METAVISION_HAL_GEN31_SYSTEM_CONTROL_H + +#include +#include + +namespace Metavision { + +class RegisterMap; + +class Gen31SystemControl { +public: + Gen31SystemControl(const std::shared_ptr ®ister_map, const std::string &prefix); + + void sensor_atis_control_clear(void); + void sensor_prepowerup(void); + void sensor_prepowerdown(void); + void sensor_roi_td_rstn(bool); + void sensor_em_rstn(bool); + void sensor_soft_reset(bool); + void sensor_enable_vddc(bool); + void sensor_enable_vddd(bool); + void sensor_enable_vdda(bool); + void sensor_powerdown(void); + void sensor_powerup(void); + void soft_reset(std::string reg_obj); + void hvga_remap_control(bool enable); + void no_blocking_control(bool enable); + void host_if_control(bool enable); + void timebase_control(bool enable); + void timebase_config(bool ext_sync, bool master); + +private: + std::string prefix_; + std::shared_ptr register_map_; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_GEN31_SYSTEM_CONTROL_H diff --git a/hal_psee_plugins/include/devices/gen31/gen31_trigger_event.h b/hal_psee_plugins/include/devices/gen31/gen31_trigger_event.h new file mode 100644 index 000000000..97fff40f1 --- /dev/null +++ b/hal_psee_plugins/include/devices/gen31/gen31_trigger_event.h @@ -0,0 +1,54 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_GEN31_TRIGGER_EVENT_H +#define METAVISION_HAL_GEN31_TRIGGER_EVENT_H + +#include + +#include "facilities/psee_trigger_in.h" + +namespace Metavision { + +class RegisterMap; +class PseeDeviceControl; + +class Gen31TriggerEvent : public PseeTriggerIn { +public: + /// @brief Constructor + Gen31TriggerEvent(const std::shared_ptr ®ister_map, + const std::shared_ptr &device_control); + + /// @brief Enables external trigger monitoring + /// + /// Available channels: + /// 0: main trigger in + /// 6: loopback trigger out (Test purpose) + /// 7: Auxiliary trigger in + /// @param channel External trigger's channel + virtual bool enable(uint32_t channel) override; + + /// @brief Disables external trigger monitoring + /// @param channel External trigger's channel + virtual bool disable(uint32_t channel) override; + + /// @brief Checks if trigger in index is enabled + /// @param channel External trigger's channel + /// @return true if trigger in index is enabled, False otherwise + virtual bool is_enabled(uint32_t channel) override; + +private: + std::shared_ptr register_map_; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_GEN31_TRIGGER_EVENT_H diff --git a/hal_psee_plugins/include/devices/gen31/register_maps/ccam3_single_gen31_sensorif_registermap.h b/hal_psee_plugins/include/devices/gen31/register_maps/ccam3_single_gen31_sensorif_registermap.h new file mode 100644 index 000000000..908428141 --- /dev/null +++ b/hal_psee_plugins/include/devices/gen31/register_maps/ccam3_single_gen31_sensorif_registermap.h @@ -0,0 +1,694 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_CCAM3_SINGLE_GEN31_SENSORIF_REGISTERMAP_H +#define METAVISION_HAL_CCAM3_SINGLE_GEN31_SENSORIF_REGISTERMAP_H + +RegmapData ccam3_single_gen31_Gen31SensorIFRegisterMap[] = {{R, {{"GEN31/global_ctrl", 0x0}}}, + {F, {{"td_couple_ctrl", 0, 1, 0x0}}}, + {F, {{"sw_global_en", 1, 1, 0x0}}}, + {F, {{"bypass_digital_readout_ctrl", 2, 1, 0x0}}}, + {F, {{"bgen_rstn", 3, 1, 0x0}}}, + {F, {{"bgen_en", 4, 1, 0x0}}}, + {R, {{"GEN31/roi_ctrl", 0x4}}}, + {F, {{"roi_em_en", 0, 1, 0x1}}}, + {F, {{"roi_td_en", 1, 1, 0x1}}}, + {F, {{"roi_td_rstn", 3, 1, 0x1}}}, + {F, {{"roi_em_shadow_trigger", 4, 1, 0x0}}}, + {F, {{"roi_td_shadow_trigger", 5, 1, 0x0}}}, + {F, {{"roi_em_scan_en", 7, 1, 0x0}}}, + {F, {{"roi_td_scan_en", 8, 1, 0x0}}}, + {R, {{"GEN31/readout_ctrl", 0x8}}}, + {F, {{"ro_delay_rstn", 0, 1, 0x1}}}, + {F, {{"ro_interface_x_rstn", 1, 1, 0x1}}}, + {F, {{"ro_latch_y_rstn", 2, 1, 0x1}}}, + {F, {{"ro_ack_array_rstn", 3, 1, 0x1}}}, + {F, {{"ro_ctrl_rstn", 4, 1, 0x1}}}, + {F, {{"ro_latch_dum_connect_ctrl", 5, 1, 0x1}}}, + {F, {{"ro_latch_dum_rstn", 6, 1, 0x1}}}, + {F, {{"ro_pixel_dum_rstn", 7, 1, 0x1}}}, + {F, {{"ro_interface_y_rstn", 8, 1, 0x1}}}, + {F, {{"ro_latch_x_rstn", 9, 1, 0x1}}}, + {F, {{"ro_stat_x_ctrl", 10, 1, 0x0}}}, + {F, {{"ro_act_pux_ctrl", 11, 3, 0x1}}}, + {F, {{"ro_stat_y_ctrl", 14, 1, 0x0}}}, + {F, {{"ro_pipeline_ctrl", 16, 1, 0x0}}}, + {F, {{"ro_act_pdy_ctrl", 17, 3, 0x0}}}, + {F, {{"ro_act_pdx_ctrl", 20, 3, 0x0}}}, + {F, {{"ro_ack_y_ctrl", 23, 1, 0x0}}}, + {F, {{"ro_td_inv_req_ctrl", 26, 1, 0x0}}}, + {F, {{"ro_td_inv_pol_ctrl", 27, 1, 0x0}}}, + {F, {{"ro_td_inv_ack_ctrl", 28, 1, 0x0}}}, + {F, {{"ro_act_puy_ctrl", 29, 3, 0x2}}}, + {R, {{"GEN31/test_bus_ctrl", 0xc}}}, + {F, {{"tp_sel_test_photodiode", 0, 1, 0x0}}}, + {F, {{"tp_diode", 1, 1, 0x0}}}, + {F, {{"tp_diode_tl", 2, 1, 0x0}}}, + {F, {{"tp_diode_tr", 3, 1, 0x0}}}, + {F, {{"tp_diode_br", 4, 1, 0x0}}}, + {F, {{"tp_diode_bl", 5, 1, 0x0}}}, + {F, {{"tp_photodiode_en", 6, 1, 0x1}}}, + {F, {{"tp_en", 7, 1, 0x0}}}, + {F, {{"tbus_sel_tpa1", 8, 4, 0x0}}}, + {F, {{"tbus_sel_tpa2", 12, 4, 0x0}}}, + {F, {{"tbus_sel_tpa3", 16, 4, 0x0}}}, + {F, {{"tbus_sel_tpa4", 20, 4, 0x0}}}, + {F, {{"tbus_sel_tpd1", 24, 4, 0x0}}}, + {A, {{"TD_FIFO_FULL", 0}}}, + {A, {{"SPI_ERROR", 5}}}, + {A, {{"ARB_VLD", 1}}}, + {A, {{"OOR_VLD", 3}}}, + {A, {{"ICN_REQ_X", 2}}}, + {A, {{"EVT_PERIOD", 4}}}, + {F, {{"tbus_sel_tpd2", 28, 4, 0x0}}}, + {A, {{"ARB_SEL", 5}}}, + {A, {{"ARB_RDY", 1}}}, + {A, {{"EM_FIFO_FULL", 0}}}, + {A, {{"ICN_REQ_Y", 2}}}, + {A, {{"OOR_TYP", 3}}}, + {R, {{"GEN31/clk_sync_ctrl", 0x10}}}, + {F, {{"clk_diff_hi_cm_ctrl", 1, 1, 0x1}}}, + {F, {{"clk_diff_iout_x2_ctrl", 2, 1, 0x1}}}, + {F, {{"clk_dc_up_ctrl", 3, 1, 0x0}}}, + {R, {{"GEN31/lifo_ctrl", 0x14}}}, + {F, {{"lifo_counter", 0, 26, 0x0}}}, + {F, {{"lifo_counter_valid", 29, 1, 0x0}}}, + {F, {{"lifo_cnt_en", 30, 1, 0x0}}}, + {F, {{"lifo_en", 31, 1, 0x0}}}, + {R, {{"GEN31/chip_id", 0x18}}}, + {F, {{"chip_id", 0, 32, 0x90200c03}}}, + {R, {{"GEN31/spare_ctrl", 0x1c}}}, + {F, {{"spare0", 0, 1, 0x0}}}, + {F, {{"spare1", 1, 1, 0x0}}}, + {F, {{"spare2", 2, 1, 0x0}}}, + {F, {{"spare3", 3, 1, 0x0}}}, + {F, {{"spare7downto4", 4, 4, 0x0}}}, + {F, {{"em_shutter", 8, 1, 0x0}}}, + {F, {{"spare21downto9", 9, 13, 0x0}}}, + {F, {{"rfeed_d_ctrl", 22, 1, 0x0}}}, + {F, {{"rfeed_a_ctrl", 23, 1, 0x0}}}, + {F, {{"tp_refr_clk_en", 24, 1, 0x0}}}, + {F, {{"tp_dark_en", 25, 1, 0x0}}}, + {F, {{"tp_qe_en", 26, 1, 0x0}}}, + {F, {{"spare27", 27, 1, 0x0}}}, + {F, {{"ro_top_act_pu_en", 28, 1, 0x0}}}, + {F, {{"spares31downto29", 29, 3, 0x0}}}, + {R, {{"GEN31/oor_ctrl", 0x20}}}, + {F, {{"oor_en", 0, 1, 0x0}}}, + {F, {{"oor_rm_td", 1, 1, 0x0}}}, + {F, {{"oor_rm_em", 2, 1, 0x0}}}, + {R, {{"GEN31/td_oor_cnt", 0x24}}}, + {F, {{"td_oor_cnt", 0, 32, 0x0}}}, + {R, {{"GEN31/em_oor_cnt", 0x28}}}, + {F, {{"em_oor_cnt", 0, 32, 0x0}}}, + {R, {{"GEN31/td_oor_addr", 0x2c}}}, + {F, {{"td_oor_addr_x", 0, 10, 0x0}}}, + {F, {{"td_oor_addr_y", 10, 9, 0x0}}}, + {F, {{"td_oor_addr_p", 19, 1, 0x0}}}, + {R, {{"GEN31/em_oor_addr", 0x30}}}, + {F, {{"em_oor_addr_x", 0, 10, 0x0}}}, + {F, {{"em_oor_addr_y", 10, 9, 0x0}}}, + {F, {{"em_oor_addr_p", 19, 1, 0x0}}}, + {R, {{"GEN31/acr_ctrl", 0x34}}}, + {F, {{"acr_en", 0, 1, 0x1}}}, + {F, {{"version_override", 1, 1, 0x0}}}, + {F, {{"version_id", 2, 1, 0x0}}}, + {A, {{"FORCED_VERSION_IS_TD", 0}}}, + {A, {{"FORCED_VERSION_IS_ATIS", 1}}}, + {R, {{"GEN31/clk_out_ctrl", 0x38}}}, + {F, {{"clk_out_en", 0, 1, 0x0}}}, + {F, {{"clk_gate_bypass", 1, 1, 0x0}}}, + {F, {{"clk_out_pol", 2, 1, 0x0}}}, + {F, {{"clk_timeout", 3, 8, 0x0}}}, + {R, {{"GEN31/stst_ctrl", 0x3c}}}, + {F, {{"stst_en", 0, 2, 0x0}}}, + {A, {{"STST_RAND", 3}}}, + {A, {{"STST_INCR", 2}}}, + {A, {{"STST_DISABLE", 0}}}, + {A, {{"STST_LFSR", 1}}}, + {F, {{"stst_div_factor", 2, 10, 0x0}}}, + {R, {{"GEN31/rob_ctrl", 0x40}}}, + {F, {{"ro_dual_ctrl", 0, 1, 0x0}}}, + {F, {{"ro_test_mode_ctrl", 1, 1, 0x0}}}, + {F, {{"ro_test_mode_sel_ctrl", 2, 1, 0x0}}}, + {F, {{"ro_addr_y_stat_crtl", 3, 1, 0x0}}}, + {F, {{"ro_addr_x_stat_crtl", 4, 1, 0x0}}}, + {F, {{"ro_stat_req_x_ctrl", 5, 1, 0x0}}}, + {F, {{"ro_stat_pol_ctrl", 6, 1, 0x0}}}, + {F, {{"ro_td_req_lat_ctrl", 7, 3, 0x2}}}, + {F, {{"ro_td_ack_lat_ctrl", 10, 3, 0x1}}}, + {F, {{"ro_em_addr_y_stat_ctrl", 13, 1, 0x0}}}, + {F, {{"ro_em_addr_x_stat_ctrl", 14, 1, 0x0}}}, + {F, {{"ro_em_stat_req_x_ctrl", 15, 1, 0x0}}}, + {F, {{"ro_em_stat_pol_ctrl", 16, 1, 0x0}}}, + {F, {{"ro_em_req_lat_ctrl", 17, 3, 0x2}}}, + {F, {{"ro_em_ack_lat_ctrl", 20, 3, 0x1}}}, + {R, {{"GEN31/roe_ctrl", 0x44}}}, + {F, {{"ro_em_delay_rstn", 0, 1, 0x1}}}, + {F, {{"ro_em_interface_x_rstn", 1, 1, 0x1}}}, + {F, {{"ro_em_latch_y_rstn", 2, 1, 0x1}}}, + {F, {{"ro_em_ack_array_rstn", 3, 1, 0x1}}}, + {F, {{"ro_em_ctrl_rstn", 4, 1, 0x1}}}, + {F, {{"ro_em_latch_connect_to", 5, 1, 0x1}}}, + {F, {{"ro_em_latch_dum_rstn", 6, 1, 0x1}}}, + {F, {{"ro_em_pixel_dum_rstn", 7, 1, 0x1}}}, + {F, {{"ro_em_interface_y_rstn", 8, 1, 0x1}}}, + {F, {{"ro_em_latch_x_rstn", 9, 1, 0x1}}}, + {F, {{"ro_em_stat_x_ctrl", 10, 1, 0x0}}}, + {F, {{"ro_em_act_pux_ctrl", 11, 3, 0x0}}}, + {F, {{"ro_em_stat_y_ctrl", 14, 1, 0x0}}}, + {F, {{"ro_em_pipeline_ctrl", 16, 1, 0x0}}}, + {F, {{"ro_em_act_pdy_ctrl", 17, 3, 0x0}}}, + {F, {{"ro_em_act_pdx_ctrl", 20, 3, 0x0}}}, + {F, {{"ro_em_ack_y_ctrl", 23, 1, 0x0}}}, + {F, {{"ro_em_inv_req_ctrl", 26, 1, 0x0}}}, + {F, {{"ro_em_inv_pol_ctrl", 27, 1, 0x0}}}, + {F, {{"ro_em_inv_ack_ctrl", 28, 1, 0x0}}}, + {F, {{"ro_em_act_puy_ctrl", 29, 3, 0x2}}}, + {R, {{"GEN31/nfl_ctrl", 0x48}}}, + {F, {{"nfl_en", 0, 1, 0x0}}}, + {F, {{"pre_cnt_thresh", 1, 7, 0x64}}}, + {R, {{"GEN31/nfl_thresh", 0x4c}}}, + {F, {{"evt_thresh", 0, 14, 0x32}}}, + {F, {{"period_cnt_thresh", 14, 10, 0x64}}}, + {R, {{"GEN31/nfl_cnt", 0x50}}}, + {F, {{"evt_thresh", 0, 14, 0x0}}}, + {R, {{"GEN31/bgen_00", 0x100}}}, + {F, {{"bias_vdac_val", 0, 8, 0x7f}}}, + {F, {{"bias_idac_val", 8, 13, 0x3e1}}}, + {F, {{"bias_internal_buffer", 21, 6, 0x8}}}, + {F, {{"bias_type", 27, 1, 0x1}}}, + {F, {{"bias_mode", 28, 1, 0x0}}}, + {F, {{"bias_polarity", 29, 1, 0x0}}}, + {F, {{"bias_enable", 30, 1, 0x1}}}, + {F, {{"bias_pad_enable", 31, 1, 0x0}}}, + {R, {{"GEN31/bgen_01", 0x104}}}, + {F, {{"bias_vdac_val", 0, 8, 0x7f}}}, + {F, {{"bias_idac_val", 8, 13, 0x3e1}}}, + {F, {{"bias_internal_buffer", 21, 6, 0x8}}}, + {F, {{"bias_type", 27, 1, 0x1}}}, + {F, {{"bias_mode", 28, 1, 0x0}}}, + {F, {{"bias_polarity", 29, 1, 0x0}}}, + {F, {{"bias_enable", 30, 1, 0x1}}}, + {F, {{"bias_pad_enable", 31, 1, 0x0}}}, + {R, {{"GEN31/bgen_02", 0x108}}}, + {F, {{"bias_vdac_val", 0, 8, 0x9b}}}, + {F, {{"bias_idac_val", 8, 13, 0x62}}}, + {F, {{"bias_internal_buffer", 21, 6, 0x8}}}, + {F, {{"bias_type", 27, 1, 0x1}}}, + {F, {{"bias_mode", 28, 1, 0x0}}}, + {F, {{"bias_polarity", 29, 1, 0x0}}}, + {F, {{"bias_enable", 30, 1, 0x1}}}, + {F, {{"bias_pad_enable", 31, 1, 0x0}}}, + {R, {{"GEN31/bgen_03", 0x10c}}}, + {F, {{"bias_vdac_val", 0, 8, 0xaa}}}, + {F, {{"bias_idac_val", 8, 13, 0x1b}}}, + {F, {{"bias_internal_buffer", 21, 6, 0x8}}}, + {F, {{"bias_type", 27, 1, 0x1}}}, + {F, {{"bias_mode", 28, 1, 0x0}}}, + {F, {{"bias_polarity", 29, 1, 0x0}}}, + {F, {{"bias_enable", 30, 1, 0x1}}}, + {F, {{"bias_pad_enable", 31, 1, 0x0}}}, + {R, {{"GEN31/bgen_04", 0x110}}}, + {F, {{"bias_vdac_val", 0, 8, 0x8d}}}, + {F, {{"bias_idac_val", 8, 13, 0x14d}}}, + {F, {{"bias_internal_buffer", 21, 6, 0x8}}}, + {F, {{"bias_type", 27, 1, 0x1}}}, + {F, {{"bias_mode", 28, 1, 0x0}}}, + {F, {{"bias_polarity", 29, 1, 0x0}}}, + {F, {{"bias_enable", 30, 1, 0x1}}}, + {F, {{"bias_pad_enable", 31, 1, 0x0}}}, + {R, {{"GEN31/bgen_05", 0x114}}}, + {F, {{"bias_vdac_val", 0, 8, 0x71}}}, + {F, {{"bias_idac_val", 8, 13, 0xdb7}}}, + {F, {{"bias_internal_buffer", 21, 6, 0x8}}}, + {F, {{"bias_type", 27, 1, 0x1}}}, + {F, {{"bias_mode", 28, 1, 0x0}}}, + {F, {{"bias_polarity", 29, 1, 0x1}}}, + {F, {{"bias_enable", 30, 1, 0x1}}}, + {F, {{"bias_pad_enable", 31, 1, 0x0}}}, + {R, {{"GEN31/bgen_06", 0x118}}}, + {F, {{"bias_vdac_val", 0, 8, 0x8d}}}, + {F, {{"bias_idac_val", 8, 13, 0x14d}}}, + {F, {{"bias_internal_buffer", 21, 6, 0x8}}}, + {F, {{"bias_type", 27, 1, 0x1}}}, + {F, {{"bias_mode", 28, 1, 0x0}}}, + {F, {{"bias_polarity", 29, 1, 0x0}}}, + {F, {{"bias_enable", 30, 1, 0x1}}}, + {F, {{"bias_pad_enable", 31, 1, 0x0}}}, + {R, {{"GEN31/bgen_07", 0x11c}}}, + {F, {{"bias_vdac_val", 0, 8, 0x8d}}}, + {F, {{"bias_idac_val", 8, 13, 0x14d}}}, + {F, {{"bias_internal_buffer", 21, 6, 0x8}}}, + {F, {{"bias_type", 27, 1, 0x1}}}, + {F, {{"bias_mode", 28, 1, 0x0}}}, + {F, {{"bias_polarity", 29, 1, 0x0}}}, + {F, {{"bias_enable", 30, 1, 0x1}}}, + {F, {{"bias_pad_enable", 31, 1, 0x0}}}, + {R, {{"GEN31/bgen_08", 0x120}}}, + {F, {{"bias_vdac_val", 0, 8, 0x3f}}}, + {F, {{"bias_idac_val", 8, 13, 0x2c}}}, + {F, {{"bias_internal_buffer", 21, 6, 0x8}}}, + {F, {{"bias_type", 27, 1, 0x1}}}, + {F, {{"bias_mode", 28, 1, 0x0}}}, + {F, {{"bias_polarity", 29, 1, 0x1}}}, + {F, {{"bias_enable", 30, 1, 0x1}}}, + {F, {{"bias_pad_enable", 31, 1, 0x0}}}, + {R, {{"GEN31/bgen_09", 0x124}}}, + {F, {{"bias_vdac_val", 0, 8, 0x37}}}, + {F, {{"bias_idac_val", 8, 13, 0x54}}}, + {F, {{"bias_internal_buffer", 21, 6, 0x8}}}, + {F, {{"bias_type", 27, 1, 0x1}}}, + {F, {{"bias_mode", 28, 1, 0x0}}}, + {F, {{"bias_polarity", 29, 1, 0x1}}}, + {F, {{"bias_enable", 30, 1, 0x1}}}, + {F, {{"bias_pad_enable", 31, 1, 0x0}}}, + {R, {{"GEN31/bgen_10", 0x128}}}, + {F, {{"bias_vdac_val", 0, 8, 0xb8}}}, + {F, {{"bias_idac_val", 8, 13, 0x166c}}}, + {F, {{"bias_internal_buffer", 21, 6, 0x8}}}, + {F, {{"bias_type", 27, 1, 0x1}}}, + {F, {{"bias_mode", 28, 1, 0x1}}}, + {F, {{"bias_polarity", 29, 1, 0x0}}}, + {F, {{"bias_enable", 30, 1, 0x1}}}, + {F, {{"bias_pad_enable", 31, 1, 0x0}}}, + {R, {{"GEN31/bgen_11", 0x12c}}}, + {F, {{"bias_vdac_val", 0, 8, 0x0}}}, + {F, {{"bias_idac_val", 8, 13, 0x0}}}, + {F, {{"bias_internal_buffer", 21, 6, 0x8}}}, + {F, {{"bias_type", 27, 1, 0x1}}}, + {F, {{"bias_mode", 28, 1, 0x1}}}, + {F, {{"bias_polarity", 29, 1, 0x1}}}, + {F, {{"bias_enable", 30, 1, 0x1}}}, + {F, {{"bias_pad_enable", 31, 1, 0x0}}}, + {R, {{"GEN31/bgen_12", 0x130}}}, + {F, {{"bias_vdac_val", 0, 8, 0xf8}}}, + {F, {{"bias_idac_val", 8, 13, 0x0}}}, + {F, {{"bias_internal_buffer", 21, 6, 0x8}}}, + {F, {{"bias_type", 27, 1, 0x1}}}, + {F, {{"bias_mode", 28, 1, 0x1}}}, + {F, {{"bias_polarity", 29, 1, 0x0}}}, + {F, {{"bias_enable", 30, 1, 0x1}}}, + {F, {{"bias_pad_enable", 31, 1, 0x0}}}, + {R, {{"GEN31/bgen_13", 0x134}}}, + {F, {{"bias_vdac_val", 0, 8, 0x2a}}}, + {F, {{"bias_idac_val", 8, 13, 0x2ce}}}, + {F, {{"bias_internal_buffer", 21, 6, 0x8}}}, + {F, {{"bias_type", 27, 1, 0x0}}}, + {F, {{"bias_mode", 28, 1, 0x1}}}, + {F, {{"bias_polarity", 29, 1, 0x1}}}, + {F, {{"bias_enable", 30, 1, 0x1}}}, + {F, {{"bias_pad_enable", 31, 1, 0x0}}}, + {R, {{"GEN31/bgen_14", 0x138}}}, + {F, {{"bias_vdac_val", 0, 8, 0x2f}}}, + {F, {{"bias_idac_val", 8, 13, 0x800}}}, + {F, {{"bias_internal_buffer", 21, 6, 0x8}}}, + {F, {{"bias_type", 27, 1, 0x0}}}, + {F, {{"bias_mode", 28, 1, 0x1}}}, + {F, {{"bias_polarity", 29, 1, 0x1}}}, + {F, {{"bias_enable", 30, 1, 0x1}}}, + {F, {{"bias_pad_enable", 31, 1, 0x0}}}, + {R, {{"GEN31/bgen_15", 0x13c}}}, + {F, {{"bias_vdac_val", 0, 8, 0x21}}}, + {F, {{"bias_idac_val", 8, 13, 0x83}}}, + {F, {{"bias_internal_buffer", 21, 6, 0x8}}}, + {F, {{"bias_type", 27, 1, 0x0}}}, + {F, {{"bias_mode", 28, 1, 0x1}}}, + {F, {{"bias_polarity", 29, 1, 0x1}}}, + {F, {{"bias_enable", 30, 1, 0x1}}}, + {F, {{"bias_pad_enable", 31, 1, 0x0}}}, + {R, {{"GEN31/bgen_16", 0x140}}}, + {F, {{"bias_vdac_val", 0, 8, 0xe3}}}, + {F, {{"bias_idac_val", 8, 13, 0x4}}}, + {F, {{"bias_internal_buffer", 21, 6, 0x8}}}, + {F, {{"bias_type", 27, 1, 0x1}}}, + {F, {{"bias_mode", 28, 1, 0x1}}}, + {F, {{"bias_polarity", 29, 1, 0x0}}}, + {F, {{"bias_enable", 30, 1, 0x1}}}, + {F, {{"bias_pad_enable", 31, 1, 0x0}}}, + {R, {{"GEN31/bgen_17", 0x144}}}, + {F, {{"bias_vdac_val", 0, 8, 0xf1}}}, + {F, {{"bias_idac_val", 8, 13, 0x0}}}, + {F, {{"bias_internal_buffer", 21, 6, 0x8}}}, + {F, {{"bias_type", 27, 1, 0x1}}}, + {F, {{"bias_mode", 28, 1, 0x1}}}, + {F, {{"bias_polarity", 29, 1, 0x0}}}, + {F, {{"bias_enable", 30, 1, 0x1}}}, + {F, {{"bias_pad_enable", 31, 1, 0x0}}}, + {R, {{"GEN31/bgen_18", 0x148}}}, + {F, {{"bias_vdac_val", 0, 8, 0x8d}}}, + {F, {{"bias_idac_val", 8, 13, 0x14d}}}, + {F, {{"bias_internal_buffer", 21, 6, 0x8}}}, + {F, {{"bias_type", 27, 1, 0x1}}}, + {F, {{"bias_mode", 28, 1, 0x0}}}, + {F, {{"bias_polarity", 29, 1, 0x0}}}, + {F, {{"bias_enable", 30, 1, 0x1}}}, + {F, {{"bias_pad_enable", 31, 1, 0x0}}}, + {R, {{"GEN31/bgen_19", 0x14c}}}, + {F, {{"bias_vdac_val", 0, 8, 0x1f}}}, + {F, {{"bias_idac_val", 8, 13, 0x57}}}, + {F, {{"bias_internal_buffer", 21, 6, 0x8}}}, + {F, {{"bias_type", 27, 1, 0x0}}}, + {F, {{"bias_mode", 28, 1, 0x1}}}, + {F, {{"bias_polarity", 29, 1, 0x1}}}, + {F, {{"bias_enable", 30, 1, 0x1}}}, + {F, {{"bias_pad_enable", 31, 1, 0x0}}}, + {R, {{"GEN31/bgen_20", 0x150}}}, + {F, {{"bias_vdac_val", 0, 8, 0x34}}}, + {F, {{"bias_idac_val", 8, 13, 0x125c}}}, + {F, {{"bias_internal_buffer", 21, 6, 0x8}}}, + {F, {{"bias_type", 27, 1, 0x0}}}, + {F, {{"bias_mode", 28, 1, 0x1}}}, + {F, {{"bias_polarity", 29, 1, 0x1}}}, + {F, {{"bias_enable", 30, 1, 0x1}}}, + {F, {{"bias_pad_enable", 31, 1, 0x0}}}, + {R, {{"GEN31/bgen_21", 0x154}}}, + {F, {{"bias_vdac_val", 0, 8, 0x2a}}}, + {F, {{"bias_idac_val", 8, 13, 0x2ce}}}, + {F, {{"bias_internal_buffer", 21, 6, 0x8}}}, + {F, {{"bias_type", 27, 1, 0x0}}}, + {F, {{"bias_mode", 28, 1, 0x1}}}, + {F, {{"bias_polarity", 29, 1, 0x1}}}, + {F, {{"bias_enable", 30, 1, 0x1}}}, + {F, {{"bias_pad_enable", 31, 1, 0x0}}}, + {R, {{"GEN31/bgen_22", 0x158}}}, + {F, {{"bias_vdac_val", 0, 8, 0xd6}}}, + {F, {{"bias_idac_val", 8, 13, 0x36}}}, + {F, {{"bias_internal_buffer", 21, 6, 0x8}}}, + {F, {{"bias_type", 27, 1, 0x0}}}, + {F, {{"bias_mode", 28, 1, 0x0}}}, + {F, {{"bias_polarity", 29, 1, 0x1}}}, + {F, {{"bias_enable", 30, 1, 0x1}}}, + {F, {{"bias_pad_enable", 31, 1, 0x0}}}, + {R, {{"GEN31/bgen_23", 0x15c}}}, + {F, {{"bias_vdac_val", 0, 8, 0xb1}}}, + {F, {{"bias_idac_val", 8, 13, 0x345}}}, + {F, {{"bias_internal_buffer", 21, 6, 0x8}}}, + {F, {{"bias_type", 27, 1, 0x0}}}, + {F, {{"bias_mode", 28, 1, 0x1}}}, + {F, {{"bias_polarity", 29, 1, 0x0}}}, + {F, {{"bias_enable", 30, 1, 0x1}}}, + {F, {{"bias_pad_enable", 31, 1, 0x0}}}, + {R, {{"GEN31/bgen_24", 0x160}}}, + {F, {{"bias_vdac_val", 0, 8, 0xd4}}}, + {F, {{"bias_idac_val", 8, 13, 0x4f}}}, + {F, {{"bias_internal_buffer", 21, 6, 0x8}}}, + {F, {{"bias_type", 27, 1, 0x0}}}, + {F, {{"bias_mode", 28, 1, 0x1}}}, + {F, {{"bias_polarity", 29, 1, 0x0}}}, + {F, {{"bias_enable", 30, 1, 0x1}}}, + {F, {{"bias_pad_enable", 31, 1, 0x0}}}, + {R, {{"GEN31/bgen_25", 0x164}}}, + {F, {{"bias_vdac_val", 0, 8, 0xd4}}}, + {F, {{"bias_idac_val", 8, 13, 0x2}}}, + {F, {{"bias_internal_buffer", 21, 6, 0x8}}}, + {F, {{"bias_type", 27, 1, 0x0}}}, + {F, {{"bias_mode", 28, 1, 0x1}}}, + {F, {{"bias_polarity", 29, 1, 0x0}}}, + {F, {{"bias_enable", 30, 1, 0x1}}}, + {F, {{"bias_pad_enable", 31, 1, 0x0}}}, + {R, {{"GEN31/bgen_26", 0x168}}}, + {F, {{"bias_vdac_val", 0, 8, 0x54}}}, + {F, {{"bias_idac_val", 8, 13, 0x132}}}, + {F, {{"bias_internal_buffer", 21, 6, 0x8}}}, + {F, {{"bias_type", 27, 1, 0x0}}}, + {F, {{"bias_mode", 28, 1, 0x0}}}, + {F, {{"bias_polarity", 29, 1, 0x1}}}, + {F, {{"bias_enable", 30, 1, 0x1}}}, + {F, {{"bias_pad_enable", 31, 1, 0x0}}}, + {R, {{"GEN31/td_roi_x00", 0x200}}}, + {F, {{"val", 0, 32, 0xffffffff}}}, + {R, {{"GEN31/td_roi_x01", 0x204}}}, + {F, {{"val", 0, 32, 0xffffffff}}}, + {R, {{"GEN31/td_roi_x02", 0x208}}}, + {F, {{"val", 0, 32, 0xffffffff}}}, + {R, {{"GEN31/td_roi_x03", 0x20c}}}, + {F, {{"val", 0, 32, 0xffffffff}}}, + {R, {{"GEN31/td_roi_x04", 0x210}}}, + {F, {{"val", 0, 32, 0xffffffff}}}, + {R, {{"GEN31/td_roi_x05", 0x214}}}, + {F, {{"val", 0, 32, 0xffffffff}}}, + {R, {{"GEN31/td_roi_x06", 0x218}}}, + {F, {{"val", 0, 32, 0xffffffff}}}, + {R, {{"GEN31/td_roi_x07", 0x21c}}}, + {F, {{"val", 0, 32, 0xffffffff}}}, + {R, {{"GEN31/td_roi_x08", 0x220}}}, + {F, {{"val", 0, 32, 0xffffffff}}}, + {R, {{"GEN31/td_roi_x09", 0x224}}}, + {F, {{"val", 0, 32, 0xffffffff}}}, + {R, {{"GEN31/td_roi_x10", 0x228}}}, + {F, {{"val", 0, 32, 0xffffffff}}}, + {R, {{"GEN31/td_roi_x11", 0x22c}}}, + {F, {{"val", 0, 32, 0xffffffff}}}, + {R, {{"GEN31/td_roi_x12", 0x230}}}, + {F, {{"val", 0, 32, 0xffffffff}}}, + {R, {{"GEN31/td_roi_x13", 0x234}}}, + {F, {{"val", 0, 32, 0xffffffff}}}, + {R, {{"GEN31/td_roi_x14", 0x238}}}, + {F, {{"val", 0, 32, 0xffffffff}}}, + {R, {{"GEN31/td_roi_x15", 0x23c}}}, + {F, {{"val", 0, 32, 0xffffffff}}}, + {R, {{"GEN31/td_roi_x16", 0x240}}}, + {F, {{"val", 0, 32, 0xffffffff}}}, + {R, {{"GEN31/td_roi_x17", 0x244}}}, + {F, {{"val", 0, 32, 0xffffffff}}}, + {R, {{"GEN31/td_roi_x18", 0x248}}}, + {F, {{"val", 0, 32, 0xffffffff}}}, + {R, {{"GEN31/td_roi_x19", 0x24c}}}, + {F, {{"val", 0, 32, 0xffffffff}}}, + {R, {{"GEN31/td_roi_x20", 0x250}}}, + {F, {{"val", 0, 4, 0x0}}}, + {R, {{"GEN31/td_roi_y00", 0x300}}}, + {F, {{"val", 0, 32, 0xffffffff}}}, + {R, {{"GEN31/td_roi_y01", 0x304}}}, + {F, {{"val", 0, 32, 0xffffffff}}}, + {R, {{"GEN31/td_roi_y02", 0x308}}}, + {F, {{"val", 0, 32, 0xffffffff}}}, + {R, {{"GEN31/td_roi_y03", 0x30c}}}, + {F, {{"val", 0, 32, 0xffffffff}}}, + {R, {{"GEN31/td_roi_y04", 0x310}}}, + {F, {{"val", 0, 32, 0xffffffff}}}, + {R, {{"GEN31/td_roi_y05", 0x314}}}, + {F, {{"val", 0, 32, 0xffffffff}}}, + {R, {{"GEN31/td_roi_y06", 0x318}}}, + {F, {{"val", 0, 32, 0xffffffff}}}, + {R, {{"GEN31/td_roi_y07", 0x31c}}}, + {F, {{"val", 0, 32, 0xffffffff}}}, + {R, {{"GEN31/td_roi_y08", 0x320}}}, + {F, {{"val", 0, 32, 0xffffffff}}}, + {R, {{"GEN31/td_roi_y09", 0x324}}}, + {F, {{"val", 0, 32, 0xffffffff}}}, + {R, {{"GEN31/td_roi_y10", 0x328}}}, + {F, {{"val", 0, 32, 0xffffffff}}}, + {R, {{"GEN31/td_roi_y11", 0x32c}}}, + {F, {{"val", 0, 32, 0xffffffff}}}, + {R, {{"GEN31/td_roi_y12", 0x330}}}, + {F, {{"val", 0, 32, 0xffffffff}}}, + {R, {{"GEN31/td_roi_y13", 0x334}}}, + {F, {{"val", 0, 32, 0xffffffff}}}, + {R, {{"GEN31/td_roi_y14", 0x338}}}, + {F, {{"val", 0, 32, 0xffffffff}}}, + {R, {{"GEN31/td_roi_y15", 0x33c}}}, + {F, {{"val", 0, 4, 0x0}}}, + {R, {{"GEN31/em_roi_x00", 0x400}}}, + {F, {{"val", 0, 32, 0xffffffff}}}, + {R, {{"GEN31/em_roi_x01", 0x404}}}, + {F, {{"val", 0, 32, 0xffffffff}}}, + {R, {{"GEN31/em_roi_x02", 0x408}}}, + {F, {{"val", 0, 32, 0xffffffff}}}, + {R, {{"GEN31/em_roi_x03", 0x40c}}}, + {F, {{"val", 0, 32, 0xffffffff}}}, + {R, {{"GEN31/em_roi_x04", 0x410}}}, + {F, {{"val", 0, 32, 0xffffffff}}}, + {R, {{"GEN31/em_roi_x05", 0x414}}}, + {F, {{"val", 0, 32, 0xffffffff}}}, + {R, {{"GEN31/em_roi_x06", 0x418}}}, + {F, {{"val", 0, 32, 0xffffffff}}}, + {R, {{"GEN31/em_roi_x07", 0x41c}}}, + {F, {{"val", 0, 32, 0xffffffff}}}, + {R, {{"GEN31/em_roi_x08", 0x420}}}, + {F, {{"val", 0, 32, 0xffffffff}}}, + {R, {{"GEN31/em_roi_x09", 0x424}}}, + {F, {{"val", 0, 32, 0xffffffff}}}, + {R, {{"GEN31/em_roi_x10", 0x428}}}, + {F, {{"val", 0, 32, 0xffffffff}}}, + {R, {{"GEN31/em_roi_x11", 0x42c}}}, + {F, {{"val", 0, 32, 0xffffffff}}}, + {R, {{"GEN31/em_roi_x12", 0x430}}}, + {F, {{"val", 0, 32, 0xffffffff}}}, + {R, {{"GEN31/em_roi_x13", 0x434}}}, + {F, {{"val", 0, 32, 0xffffffff}}}, + {R, {{"GEN31/em_roi_x14", 0x438}}}, + {F, {{"val", 0, 32, 0xffffffff}}}, + {R, {{"GEN31/em_roi_x15", 0x43c}}}, + {F, {{"val", 0, 32, 0xffffffff}}}, + {R, {{"GEN31/em_roi_x16", 0x440}}}, + {F, {{"val", 0, 32, 0xffffffff}}}, + {R, {{"GEN31/em_roi_x17", 0x444}}}, + {F, {{"val", 0, 32, 0xffffffff}}}, + {R, {{"GEN31/em_roi_x18", 0x448}}}, + {F, {{"val", 0, 32, 0xffffffff}}}, + {R, {{"GEN31/em_roi_x19", 0x44c}}}, + {F, {{"val", 0, 32, 0xffffffff}}}, + {R, {{"GEN31/em_roi_x20", 0x450}}}, + {F, {{"val", 0, 4, 0x0}}}, + {R, {{"GEN31/em_roi_y00", 0x500}}}, + {F, {{"val", 0, 32, 0xffffffff}}}, + {R, {{"GEN31/em_roi_y01", 0x504}}}, + {F, {{"val", 0, 32, 0xffffffff}}}, + {R, {{"GEN31/em_roi_y02", 0x508}}}, + {F, {{"val", 0, 32, 0xffffffff}}}, + {R, {{"GEN31/em_roi_y03", 0x50c}}}, + {F, {{"val", 0, 32, 0xffffffff}}}, + {R, {{"GEN31/em_roi_y04", 0x510}}}, + {F, {{"val", 0, 32, 0xffffffff}}}, + {R, {{"GEN31/em_roi_y05", 0x514}}}, + {F, {{"val", 0, 32, 0xffffffff}}}, + {R, {{"GEN31/em_roi_y06", 0x518}}}, + {F, {{"val", 0, 32, 0xffffffff}}}, + {R, {{"GEN31/em_roi_y07", 0x51c}}}, + {F, {{"val", 0, 32, 0xffffffff}}}, + {R, {{"GEN31/em_roi_y08", 0x520}}}, + {F, {{"val", 0, 32, 0xffffffff}}}, + {R, {{"GEN31/em_roi_y09", 0x524}}}, + {F, {{"val", 0, 32, 0xffffffff}}}, + {R, {{"GEN31/em_roi_y10", 0x528}}}, + {F, {{"val", 0, 32, 0xffffffff}}}, + {R, {{"GEN31/em_roi_y11", 0x52c}}}, + {F, {{"val", 0, 32, 0xffffffff}}}, + {R, {{"GEN31/em_roi_y12", 0x530}}}, + {F, {{"val", 0, 32, 0xffffffff}}}, + {R, {{"GEN31/em_roi_y13", 0x534}}}, + {F, {{"val", 0, 32, 0xffffffff}}}, + {R, {{"GEN31/em_roi_y14", 0x538}}}, + {F, {{"val", 0, 32, 0xffffffff}}}, + {R, {{"GEN31/em_roi_y15", 0x53c}}}, + {F, {{"val", 0, 4, 0x0}}}, + {R, {{"GEN31_IF/TEST_PATTERN_CONTROL", 0x540}}}, + {F, {{"ENABLE", 0, 1, 0x0}}}, + {F, {{"TYPE", 4, 1, 0x0}}}, + {F, {{"PIXEL_TYPE", 8, 1, 0x0}}}, + {F, {{"PIXEL_POLARITY", 12, 1, 0x0}}}, + {R, {{"GEN31_IF/TEST_PATTERN_N_PERIOD", 0x544}}}, + {F, {{"VALID_RATIO", 0, 10, 0x0}}}, + {F, {{"LENGTH", 16, 16, 0x0}}}, + {R, {{"GEN31_IF/TEST_PATTERN_P_PERIOD", 0x548}}}, + {F, {{"VALID_RATIO", 0, 10, 0x0}}}, + {F, {{"LENGTH", 16, 16, 0x0}}}, + {R, {{"GEN31_IF/CONTROL", 0x54c}}}, + {F, {{"SELF_ACK", 0, 1, 0x0}}}, + {F, {{"SENSOR_CLK_EN", 1, 1, 0x1}}}, + {F, {{"EM_RSTN_TRIGGER_EN", 4, 1, 0x0}}}, + {R, {{"GEN31_IF/TRIGGERS", 0x550}}}, + {F, {{"RESET_AFIFO", 0, 1, 0x0}}}, + {R, {{"GEN31_IF/EM_TRIGGER_PATTERN", 0x554}}}, + {F, {{"ENABLE", 0, 1, 0x0}}}, + {F, {{"INIT", 1, 1, 0x0}}}, + {F, {{"START", 2, 1, 0x0}}}, + {F, {{"BUSY", 3, 1, 0x0}}}, + {R, {{"GEN31_IODELAY/CONTROL", 0x558}}}, + {F, {{"SENSOR_READY_FF", 0, 1, 0x0}}}, + {R, {{"GEN31_IODELAY/IODELAY_DEC", 0x55c}}}, + {F, {{"DX", 0, 10, 0x0}}}, + {F, {{"DY", 10, 9, 0x0}}}, + {F, {{"POLARITY", 19, 1, 0x0}}}, + {F, {{"TYPE", 20, 1, 0x0}}}, + {F, {{"VALID", 21, 1, 0x0}}}, + {F, {{"READY", 22, 1, 0x0}}}, + {F, {{"CLK", 23, 1, 0x0}}}, + {R, {{"GEN31_IODELAY/IODELAY_INC", 0x560}}}, + {F, {{"DX", 0, 10, 0x0}}}, + {F, {{"DY", 10, 9, 0x0}}}, + {F, {{"POLARITY", 19, 1, 0x0}}}, + {F, {{"TYPE", 20, 1, 0x0}}}, + {F, {{"VALID", 21, 1, 0x0}}}, + {F, {{"READY", 22, 1, 0x0}}}, + {F, {{"CLK", 23, 1, 0x0}}}, + {R, {{"GEN31_IODELAY/IODELAY_LOAD", 0x564}}}, + {F, {{"DX", 0, 10, 0x0}}}, + {F, {{"DY", 10, 9, 0x0}}}, + {F, {{"POLARITY", 19, 1, 0x0}}}, + {F, {{"TYPE", 20, 1, 0x0}}}, + {F, {{"VALID", 21, 1, 0x0}}}, + {F, {{"READY", 22, 1, 0x0}}}, + {F, {{"CLK", 23, 1, 0x0}}}, + {R, {{"GEN31_IODELAY/IODELAY_SET_VALUE_0", 0x568}}}, + {F, {{"TYPE", 0, 5, 0x0}}}, + {F, {{"VALID", 8, 5, 0x0}}}, + {F, {{"READY", 16, 5, 0x1}}}, + {F, {{"CLK", 24, 5, 0x0}}}, + {R, {{"GEN31_IODELAY/IODELAY_SET_VALUE_1", 0x56c}}}, + {F, {{"POLARITY", 0, 5, 0x0}}}, + {F, {{"DX_0", 8, 5, 0x0}}}, + {F, {{"DX_1", 16, 5, 0x0}}}, + {F, {{"DX_2", 24, 5, 0x0}}}, + {R, {{"GEN31_IODELAY/IODELAY_SET_VALUE_2", 0x570}}}, + {F, {{"DX_3", 0, 5, 0x0}}}, + {F, {{"DX_4", 8, 5, 0x0}}}, + {F, {{"DX_5", 16, 5, 0x0}}}, + {F, {{"DX_6", 24, 5, 0x0}}}, + {R, {{"GEN31_IODELAY/IODELAY_SET_VALUE_3", 0x574}}}, + {F, {{"DX_7", 0, 5, 0x0}}}, + {F, {{"DX_8", 8, 5, 0x0}}}, + {F, {{"DX_9", 16, 5, 0x0}}}, + {F, {{"DY_0", 24, 5, 0x0}}}, + {R, {{"GEN31_IODELAY/IODELAY_SET_VALUE_4", 0x578}}}, + {F, {{"DY_1", 0, 5, 0x0}}}, + {F, {{"DY_2", 8, 5, 0x0}}}, + {F, {{"DY_3", 16, 5, 0x0}}}, + {F, {{"DY_4", 24, 5, 0x0}}}, + {R, {{"GEN31_IODELAY/IODELAY_SET_VALUE_5", 0x57c}}}, + {F, {{"DY_5", 0, 5, 0x0}}}, + {F, {{"DY_6", 8, 5, 0x0}}}, + {F, {{"DY_7", 16, 5, 0x0}}}, + {F, {{"DY_8", 24, 5, 0x0}}}, + {R, {{"GEN31_IODELAY/IODELAY_GET_VALUE_0", 0x580}}}, + {F, {{"TYPE", 0, 5, 0x0}}}, + {F, {{"VALID", 8, 5, 0x0}}}, + {F, {{"READY", 16, 5, 0x1}}}, + {F, {{"CLK", 24, 5, 0x0}}}, + {R, {{"GEN31_IODELAY/IODELAY_GET_VALUE_1", 0x584}}}, + {F, {{"POLARITY", 0, 5, 0x0}}}, + {F, {{"DX_0", 8, 5, 0x0}}}, + {F, {{"DX_1", 16, 5, 0x0}}}, + {F, {{"DX_2", 24, 5, 0x0}}}, + {R, {{"GEN31_IODELAY/IODELAY_GET_VALUE_2", 0x588}}}, + {F, {{"DX_3", 0, 5, 0x0}}}, + {F, {{"DX_4", 8, 5, 0x0}}}, + {F, {{"DX_5", 16, 5, 0x0}}}, + {F, {{"DX_6", 24, 5, 0x0}}}, + {R, {{"GEN31_IODELAY/IODELAY_GET_VALUE_3", 0x58c}}}, + {F, {{"DX_7", 0, 5, 0x0}}}, + {F, {{"DX_8", 8, 5, 0x0}}}, + {F, {{"DX_9", 16, 5, 0x0}}}, + {F, {{"DY_0", 24, 5, 0x0}}}, + {R, {{"GEN31_IODELAY/IODELAY_GET_VALUE_4", 0x590}}}, + {F, {{"DY_1", 0, 5, 0x0}}}, + {F, {{"DY_2", 8, 5, 0x0}}}, + {F, {{"DY_3", 16, 5, 0x0}}}, + {F, {{"DY_4", 24, 5, 0x0}}}, + {R, {{"GEN31_IODELAY/IODELAY_GET_VALUE_5", 0x594}}}, + {F, {{"DY_5", 0, 5, 0x0}}}, + {F, {{"DY_6", 8, 5, 0x0}}}, + {F, {{"DY_7", 16, 5, 0x0}}}, + {F, {{"DY_8", 24, 5, 0x0}}}, + {R, {{"GEN31_IODELAY/SAMPLE_CLK_EDGE", 0x598}}}, + {F, {{"DX", 0, 10, 0x0}}}, + {F, {{"DY", 10, 9, 0x0}}}, + {F, {{"TYPE", 19, 1, 0x0}}}, + {F, {{"POLARITY", 20, 1, 0x0}}}, + {F, {{"VALID", 21, 1, 0x0}}} + +}; +unsigned int ccam3_single_gen31_Gen31SensorIFRegisterMapSize = + sizeof(ccam3_single_gen31_Gen31SensorIFRegisterMap) / sizeof(ccam3_single_gen31_Gen31SensorIFRegisterMap[0]); + +#endif // METAVISION_HAL_CCAM3_SINGLE_GEN31_SENSORIF_REGISTERMAP_H diff --git a/hal_psee_plugins/include/devices/gen31/register_maps/ccam5_single_gen31_system_control_registermap.h b/hal_psee_plugins/include/devices/gen31/register_maps/ccam5_single_gen31_system_control_registermap.h new file mode 100644 index 000000000..85e42618a --- /dev/null +++ b/hal_psee_plugins/include/devices/gen31/register_maps/ccam5_single_gen31_system_control_registermap.h @@ -0,0 +1,54 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_CCAM5_SINGLE_GEN31_SYSTEM_CONTROL_REGISTERMAP_H +#define METAVISION_HAL_CCAM5_SINGLE_GEN31_SYSTEM_CONTROL_REGISTERMAP_H + +RegmapData ccam5_single_gen31_SystemControlRegisterMap[] = { + {R, {{"ATIS_CONTROL", 0x0}}}, + {F, {{"EN_VDDA", 0, 1, 0x0}}}, + {F, {{"EN_VDDC", 1, 1, 0x0}}}, + {F, {{"EN_VDDD", 2, 1, 0x0}}}, + {F, {{"SENSOR_SOFT_RESET", 3, 1, 0x1}}}, + {F, {{"IN_EVT_NO_BLOCKING_MODE", 4, 1, 0x1}}}, + {F, {{"SISLEY_HVGA_REMAP_BYPASS", 8, 1, 0x1}}}, + {F, {{"MASTER_MODE", 12, 1, 0x0}}}, + {F, {{"USE_EXT_START", 14, 1, 0x0}}}, + {F, {{"SENSOR_TB_IOBUF_EN_N", 15, 1, 0x1}}}, + {F, {{"SENSOR_TB_PE_RST_N", 16, 1, 0x1}}}, + {F, {{"TD_RSTN", 18, 1, 0x1}}}, + {F, {{"EM_RSTN", 19, 1, 0x1}}}, + {F, {{"EN_EXT_CTRL_RSTB", 20, 1, 0x0}}}, + {F, {{"FLIP_X_EN", 21, 1, 0x0}}}, + {F, {{"FLIP_Y_EN", 22, 1, 0x0}}}, + {R, {{"BOARD_CONTROL_STATUS", 0x04}}}, + {F, {{"VERSION", 0, 2, 0x1}}}, + {R, {{"CCAM2_CONTROL", 0x08}}}, + {F, {{"HOST_IF_EN", 8, 1, 0x0}}}, + {F, {{"STEREO_MERGE_ENABLE", 9, 1, 0x0}}}, + {F, {{"ENABLE_OUT_OF_FOV", 11, 1, 0x0}}}, + {F, {{"TH_RECOVERY_BYPASS", 12, 1, 0x0}}}, + {F, {{"CCAM_ID", 13, 1, 0x0}}}, + {R, {{"CCAM2_TRIGGER", 0x0C}}}, + {F, {{"SOFT_RESET", 0, 1, 0x0}}}, + {R, {{"OUT_OF_FOV_FILTER_SIZE", 0x10}}}, + {F, {{"WIDTH", 0, 11, 640}}}, + {F, {{"VALUE", 16, 11, 480}}}, + {R, {{"OUT_OF_FOV_FILTER_ORIGIN", 0x14}}}, + {F, {{"X", 0, 11, 640}}}, + {F, {{"Y", 16, 11, 480}}}, + {R, {{"EVT_RATE_CONTROL", 0x18}}}, + {F, {{"ENABLE", 0, 1, 0}}}, + {F, {{"T_DROP_FACTOR", 16, 16, 0}}}, +}; +unsigned int ccam5_single_gen31_SystemControlRegisterMapSize = + sizeof(ccam5_single_gen31_SystemControlRegisterMap) / sizeof(ccam5_single_gen31_SystemControlRegisterMap[0]); +#endif // METAVISION_HAL_CCAM5_SINGLE_GEN31_SYSTEM_CONTROL_REGISTERMAP_H diff --git a/hal_psee_plugins/include/devices/gen31/register_maps/gen31_evk1_device.h b/hal_psee_plugins/include/devices/gen31/register_maps/gen31_evk1_device.h new file mode 100644 index 000000000..4290a66b5 --- /dev/null +++ b/hal_psee_plugins/include/devices/gen31/register_maps/gen31_evk1_device.h @@ -0,0 +1,23 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_GEN31_EVK1_DEVICE_H +#define METAVISION_HAL_GEN31_EVK1_DEVICE_H + +#include "utils/register_map.h" + +namespace Metavision { + +void build_gen31_register_map(RegisterMap ®map); + +} // namespace Metavision + +#endif // METAVISION_HAL_GEN31_EVK1_DEVICE_H diff --git a/hal_psee_plugins/include/devices/gen31/register_maps/gen31_evk2_registermap.h b/hal_psee_plugins/include/devices/gen31/register_maps/gen31_evk2_registermap.h new file mode 100644 index 000000000..ded8f114e --- /dev/null +++ b/hal_psee_plugins/include/devices/gen31/register_maps/gen31_evk2_registermap.h @@ -0,0 +1,5479 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_GEN31_EVK2_REGISTERMAP_H +#define METAVISION_HAL_GEN31_EVK2_REGISTERMAP_H + +RegmapData Gen31Evk2RegisterMap[] = { + {R, {"SYSTEM_CONTROL/GLOBAL_CONTROL", 0x0}}, + {F, {"MODE", 0, 2, 0x0}}, + {F, {"FORMAT", 2, 2, 0x2}}, + {A, {"raw", 0}}, + {A, {"2.0", 2}}, + {A, {"3.0", 3}}, + {F, {"CCAM_ID", 4, 2, 0x0}}, + {F, {"OUTPUT_FORMAT", 6, 2, 0x2}}, + {A, {"raw", 0}}, + {A, {"2.0", 2}}, + {A, {"3.0", 3}}, + {R, {"SYSTEM_CONTROL/CLK_CONTROL", 0x4}}, + {F, {"CORE_EN", 0, 1, 0x0}}, + {F, {"CORE_SOFT_RST", 1, 1, 0x0}}, + {F, {"CORE_REG_BANK_RST", 2, 1, 0x0}}, + {F, {"SENSOR_IF_EN", 4, 1, 0x0}}, + {F, {"SENSOR_IF_SOFT_RST", 5, 1, 0x0}}, + {F, {"SENSOR_IF_REG_BANK_RST", 6, 1, 0x0}}, + {F, {"HOST_IF_EN", 8, 1, 0x0}}, + {F, {"HOST_IF_SOFT_RST", 9, 1, 0x0}}, + {F, {"HOST_IF_REG_BANK_RST", 10, 1, 0x0}}, + {F, {"GLOBAL_RST", 16, 1, 0x0}}, + {R, {"SYSTEM_CONTROL/TIME_BASE_CONTROL", 0x8}}, + {F, {"ENABLE", 0, 1, 0x0}}, + {F, {"EXT_SYNC_MODE", 1, 1, 0x0}}, + {F, {"EXT_SYNC_ENABLE", 2, 1, 0x0}}, + {F, {"EXT_SYNC_MASTER", 3, 1, 0x0}}, + {F, {"EXT_SYNC_MASTER_SEL", 4, 1, 0x0}}, + {F, {"ENABLE_EXT_SYNC", 5, 1, 0x0}}, + {F, {"ENABLE_CAM_SYNC", 6, 1, 0x0}}, + {R, {"SYSTEM_CONTROL/TIME_BASE_RESOLUTION", 0xc}}, + {F, {"CLKS", 0, 16, 0x64}}, + {R, {"SYSTEM_CONTROL/IMU_CONTROL", 0x10}}, + {F, {"ENABLE", 0, 1, 0x0}}, + {R, {"SYSTEM_CONTROL/EVT_DATA_FORMATTER_CONTROL", 0x14}}, + {F, {"ENABLE", 0, 1, 0x0}}, + {F, {"BYPASS", 1, 1, 0x0}}, + {R, {"SYSTEM_CONTROL/EVT_MERGE_CONTROL", 0x18}}, + {F, {"ENABLE", 0, 1, 0x0}}, + {F, {"BYPASS", 1, 1, 0x0}}, + {F, {"SOURCE", 2, 1, 0x0}}, + {R, {"SYSTEM_CONTROL/SERIAL_LSB", 0x1c}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"SYSTEM_CONTROL/SERIAL_MSB", 0x20}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"SYSTEM_CONTROL/SNFETCH_FADDR", 0x24}}, + {F, {"VALUE", 0, 32, 0x0}}, + {R, {"SYSTEM_CONTROL/SNFETCH_RDATA", 0x28}}, + {F, {"VALUE", 0, 32, 0x0}}, + {R, {"SYSTEM_CONTROL/SNFETCH_CONTROL", 0x2c}}, + {F, {"FLASH_ACCESS", 0, 1, 0x0}}, + {R, {"SYSTEM_CONTROL/FLASH_PROGRAM_SEL_SLAVE", 0x34}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"SYSTEM_CONTROL/TH_RECOVERY_CONTROL", 0x44}}, + {F, {"ENABLE", 0, 1, 0x0}}, + {F, {"BYPASS", 1, 1, 0x0}}, + {R, {"SYSTEM_CONTROL/TS_CHECKER_CONTROL", 0x48}}, + {F, {"BYPASS", 0, 1, 0x0}}, + {F, {"THRESHOLD", 1, 24, 0x186a0}}, + {R, {"SYSTEM_CONTROL/TS_CHECKER_EVT_UI_CNT", 0x4c}}, + {F, {"TIME_LOW", 0, 16, 0x0}}, + {F, {"TIME_HIGH", 16, 16, 0x0}}, + {R, {"SYSTEM_CONTROL/TS_CHECKER_EVT_BROKEN_CNT", 0x50}}, + {F, {"TIME_LOW", 0, 16, 0x0}}, + {F, {"TIME_HIGH", 16, 16, 0x0}}, + {R, {"SYSTEM_CONTROL/TS_CHECKER_EVT_UK_ERR_CNT", 0x54}}, + {F, {"TIME_LOW", 0, 16, 0x0}}, + {F, {"TIME_HIGH", 16, 16, 0x0}}, + {R, {"SYSTEM_CONTROL/BOARD_CONTROL_STATUS", 0x58}}, + {F, {"ENET_PWDN", 0, 1, 0x0}}, + {F, {"PAV_15W", 1, 1, 0x0}}, + {F, {"PAV_4P5W", 2, 1, 0x0}}, + {F, {"PAV_7P5W", 3, 1, 0x0}}, + {F, {"USB_EN_READ_PAV", 4, 1, 0x0}}, + {F, {"USB3_EN_REF_CLK", 5, 1, 0x1}}, + {F, {"USBCC_MUX_EN_N", 6, 1, 0x0}}, + {F, {"VMON_ALERT", 7, 1, 0x0}}, + {F, {"VMON_I2C_EN_LVLSHFT", 8, 1, 0x0}}, + {F, {"VERSION", 10, 2, 0x0}}, + {F, {"USB2PHY_RESETB", 12, 1, 0x1}}, + {F, {"ENET_RESET_N", 13, 1, 0x0}}, + {F, {"LDO_2V5_1V0_EN", 14, 1, 0x0}}, + {F, {"VMON_PU_TO_1V8", 15, 1, 0x0}}, + {F, {"USB_C_OUT1", 16, 1, 0x0}}, + {F, {"USB_C_OUT2", 17, 1, 0x0}}, + {R, {"SYSTEM_CONTROL/IO_CONTROL", 0x5c}}, + {F, {"SYNC_IN", 0, 1, 0x0}}, + {F, {"TRIG_IN", 1, 1, 0x0}}, + {F, {"SYNC_OUT_EN_FLT_CHK", 4, 1, 0x0}}, + {F, {"SYNC_OUT_EN_HSIDE", 5, 1, 0x0}}, + {F, {"SYNC_OUT_FAULT_ALERT", 6, 1, 0x0}}, + {F, {"SYNC_OUT", 7, 1, 0x0}}, + {F, {"SYNC_OUT_MODE", 8, 4, 0x0}}, + {R, {"SYSTEM_CONTROL/OUT_TH_RECOVERY_CONTROL", 0x60}}, + {F, {"ENABLE", 0, 1, 0x1}}, + {F, {"BYPASS", 1, 1, 0x1}}, + {R, {"SYSTEM_CONTROL/OUT_TS_CHECKER_CONTROL", 0x64}}, + {F, {"BYPASS", 0, 1, 0x1}}, + {F, {"THRESHOLD", 1, 24, 0x186a0}}, + {R, {"SYSTEM_CONTROL/OUT_TS_CHECKER_EVT_UI_CNT", 0x68}}, + {F, {"TIME_LOW", 0, 16, 0x0}}, + {F, {"TIME_HIGH", 16, 16, 0x0}}, + {R, {"SYSTEM_CONTROL/OUT_TS_CHECKER_EVT_BROKEN_CNT", 0x6c}}, + {F, {"TIME_LOW", 0, 16, 0x0}}, + {F, {"TIME_HIGH", 16, 16, 0x0}}, + {R, {"SYSTEM_CONTROL/OUT_TS_CHECKER_EVT_UK_ERR_CNT", 0x70}}, + {F, {"TIME_LOW", 0, 16, 0x0}}, + {F, {"TIME_HIGH", 16, 16, 0x0}}, + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/TEMP", 0x200}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VCC_INT", 0x202}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VCC_AUX", 0x204}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VP_VN", 0x206}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VREFP", 0x208}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VREFN", 0x20a}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VCC_BRAM", 0x20c}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/SUPPLY_OFFSET", 0x210}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/OFFSET", 0x212}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/GAIN_ERROR", 0x214}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VAUX0", 0x220}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VAUX1", 0x222}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VAUX2", 0x224}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VAUX3", 0x226}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VAUX4", 0x228}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VAUX5", 0x22a}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VAUX6", 0x22c}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VAUX7", 0x22e}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VAUX8", 0x230}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VAUX9", 0x232}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VAUX10", 0x234}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VAUX11", 0x236}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VAUX12", 0x238}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VAUX13", 0x23a}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VAUX14", 0x23c}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VAUX15", 0x23e}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/MAX_TEMP", 0x240}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/MAX_VCC_INT", 0x242}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/MAX_VCC_AUX", 0x244}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/MAX_VCC_BRAM", 0x246}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/MIN_TEMP", 0x248}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/MIN_VCC_INT", 0x24a}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/MIN_VCC_AUX", 0x24c}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/MIN_VCC_BRAM", 0x24e}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/FLAGS", 0x27e}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/CONF_REG0", 0x280}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/CONF_REG1", 0x282}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/CONF_REG2", 0x284}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/SEQ_REG0", 0x290}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/SEQ_REG1", 0x292}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/SEQ_REG2", 0x294}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/SEQ_REG3", 0x296}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/SEQ_REG4", 0x298}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/SEQ_REG5", 0x29a}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/SEQ_REG6", 0x29c}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/SEQ_REG7", 0x29e}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/ALARM_THR_REG0", 0x2a0}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/ALARM_THR_REG1", 0x2a2}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/ALARM_THR_REG2", 0x2a4}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/ALARM_THR_REG3", 0x2a6}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/ALARM_THR_REG4", 0x2a8}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/ALARM_THR_REG5", 0x2aa}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/ALARM_THR_REG6", 0x2ac}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/ALARM_THR_REG7", 0x2ae}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/ALARM_THR_REG8", 0x2b0}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/ALARM_THR_REG9", 0x2b2}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/ALARM_THR_REG10", 0x2b4}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/ALARM_THR_REG11", 0x2b6}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/ALARM_THR_REG12", 0x2b8}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/ALARM_THR_REG13", 0x2ba}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/ALARM_THR_REG14", 0x2bc}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/ALARM_THR_REG15", 0x2be}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR/EVT_ENABLE", 0x300}}, + {F, {"ALL_EVT", 0, 1, 0x0}}, + {F, {"TEMP_EVT", 1, 1, 0x0}}, + {F, {"VCC_INT_EVT", 2, 1, 0x0}}, + {F, {"VCC_AUX_EVT", 3, 1, 0x0}}, + {F, {"VCC_BRAM_EVT", 4, 1, 0x0}}, + {F, {"ALL_ALARM", 8, 1, 0x0}}, + {F, {"OVER_TEMP_ALARM", 9, 1, 0x0}}, + {F, {"USER_TEMP_ALARM", 10, 1, 0x0}}, + {F, {"VCC_INT_ALARM", 11, 1, 0x0}}, + {F, {"VCC_AUX_ALARM", 12, 1, 0x0}}, + {F, {"VCC_BRAM_ALARM", 13, 1, 0x0}}, + {F, {"SYSTEM_POWER_DOWN", 16, 1, 0x0}}, + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR/EVT_PERIOD", 0x304}}, + {F, {"VALUE", 0, 24, 0x186a0}}, + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR/EXT_TEMP_CONTROL", 0x308}}, + {F, {"STATUS_SYS_POWER_DOWN", 0, 1, 0x0}}, + {F, {"EXT_TEMP_MONITOR_EN", 1, 1, 0x0}}, + {F, {"EXT_TEMP_MONITOR_SPI_EN", 2, 1, 0x0}}, + {F, {"REMOTE_TEMP_MONITOR_EN", 3, 1, 0x0}}, + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR/EVK_EXT_TEMP_VALUE", 0x30c}}, + {F, {"VALUE", 0, 22, 0x0}}, + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR/REMOTE_TEMP_ADDR", 0x310}}, + {F, {"VALUE", 0, 24, 0x2030c}}, + {R, {"SYSTEM_MONITOR/ATIS_IF_MONITOR/CFG_ENABLE", 0x340}}, + {F, {"ALL_EVT", 0, 1, 0x0}}, + {F, {"TD_IDLE_TIME_EVT", 1, 1, 0x0}}, + {F, {"TD_IDLE_TIMEOUT_EVT", 2, 1, 0x0}}, + {F, {"APS_IDLE_TIME_EVT", 3, 1, 0x0}}, + {F, {"APS_IDLE_TIMEOUT_EVT", 4, 1, 0x0}}, + {F, {"GLOBAL_ILLUMINATION_EVT", 5, 1, 0x0}}, + {F, {"EM_TRIGGER_SEQ_EVT", 6, 1, 0x0}}, + {F, {"REFRACTORY_CLOCK_EVT", 7, 1, 0x0}}, + {R, {"SYSTEM_MONITOR/ATIS_IF_MONITOR/CFG_IDLE_TIME_THR", 0x344}}, + {F, {"VALUE", 0, 26, 0x2710}}, + {R, {"SYSTEM_MONITOR/ATIS_IF_MONITOR/CFG_IDLE_TIMEOUT_THR", 0x348}}, + {F, {"VALUE", 0, 26, 0x2710}}, + {R, {"SYSTEM_MONITOR/ATIS_IF_MONITOR/STAT_GLOBAL_ILLUMINATION", 0x34c}}, + {F, {"DATA", 0, 26, 0x0}}, + {F, {"VALID", 31, 1, 0x0}}, + {R, {"SYSTEM_MONITOR/ATIS_IF_MONITOR/STAT_REFRACTORY_CLOCK", 0x350}}, + {F, {"DATA", 0, 24, 0x0}}, + {R, {"SYSTEM_MONITOR/EXT_TRIGGERS/ENABLE", 0x360}}, + {F, {"TRIGGER_0", 0, 1, 0x0}}, + {F, {"TRIGGER_1", 1, 1, 0x0}}, + {F, {"TRIGGER_2", 2, 1, 0x0}}, + {F, {"TRIGGER_3", 3, 1, 0x0}}, + {R, {"SYSTEM_MONITOR/EXT_TRIGGERS/OUT_ENABLE", 0x364}}, + {F, {"VALUE", 0, 1, 0x0}}, + {R, {"SYSTEM_MONITOR/EXT_TRIGGERS/OUT_PULSE_PERIOD", 0x368}}, + {F, {"", 0, 32, 0x64}}, + {R, {"SYSTEM_MONITOR/EXT_TRIGGERS/OUT_PULSE_WIDTH", 0x36c}}, + {F, {"", 0, 32, 0x1}}, + {R, {"SYSTEM_MONITOR/EXT_TRIGGERS/OUT_REGISTER_MODE", 0x370}}, + {F, {"ENABLE", 0, 1, 0x0}}, + {F, {"VALUE", 1, 1, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/WHO_AM_I", 0x400}}, + {F, {"VALUE", 0, 8, 0xea}}, + {R, {"SYSTEM_MONITOR/IMU/GYRO_SMPLRT_DIV", 0x400}}, + {F, {"VALUE", 0, 8, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/I2C_MST_ODR_CONFIG", 0x400}}, + {F, {"I2C_MST_ODR_CONFIG", 0, 4, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/GYRO_CONFIG_1", 0x404}}, + {F, {"GYRO_FCHOICE", 0, 1, 0x1}}, + {F, {"GYRO_FS_SEL", 1, 2, 0x0}}, + {F, {"GYRO_DLPFCFG", 3, 3, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/I2C_MST_CTRL", 0x404}}, + {F, {"I2C_MST_CLK", 0, 4, 0x0}}, + {F, {"I2C_MST_P_NSR", 4, 1, 0x0}}, + {F, {"MULT_MST_EN", 7, 1, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/SELF_TEST_X_GYRO", 0x408}}, + {F, {"XG_ST_DATA", 0, 8, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/GYRO_CONFIG_2", 0x408}}, + {F, {"GYRO_AVGCFG", 0, 3, 0x0}}, + {F, {"ZGYRO_CTEN", 3, 1, 0x0}}, + {F, {"YGYRO_CTEN", 4, 1, 0x0}}, + {F, {"XGYRO_CTEN", 5, 1, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/I2C_MST_DELAY_CTRL", 0x408}}, + {F, {"I2C_SLV0_DELAY_EN", 0, 1, 0x0}}, + {F, {"I2C_SLV1_DELAY_EN", 1, 1, 0x0}}, + {F, {"I2C_SLV2_DELAY_EN", 2, 1, 0x0}}, + {F, {"I2C_SLV3_DELAY_EN", 3, 1, 0x0}}, + {F, {"I2C_SLV4_DELAY_EN", 4, 1, 0x0}}, + {F, {"DELAY_ES_SHADOW", 7, 1, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/USER_CTRL", 0x40c}}, + {F, {"I2C_MST_RST", 1, 1, 0x0}}, + {F, {"SRAM_RST", 2, 1, 0x0}}, + {F, {"DMP_RST", 3, 1, 0x0}}, + {F, {"I2C_IF_DIS", 4, 1, 0x0}}, + {F, {"I2C_MST_EN", 5, 1, 0x0}}, + {F, {"FIFO_EN", 6, 1, 0x0}}, + {F, {"DMP_EN", 7, 1, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/SELF_TEST_Y_GYRO", 0x40c}}, + {F, {"YG_ST_DATA", 0, 8, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/XG_OFFS_USRH", 0x40c}}, + {F, {"VALUE", 0, 8, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/I2C_SLV0_ADDR", 0x40c}}, + {F, {"I2C_ID_0", 0, 7, 0x0}}, + {F, {"I2C_SLV0_RNW", 7, 1, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/SELF_TEST_Z_GYRO", 0x410}}, + {F, {"ZG_ST_DATA", 0, 8, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/XG_OFFS_USRL", 0x410}}, + {F, {"VALUE", 0, 8, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/I2C_SLV0_REG", 0x410}}, + {F, {"VALUE", 0, 8, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/LP_CONFIG", 0x414}}, + {F, {"GYRO_CYCLE", 4, 1, 0x0}}, + {F, {"ACCEL_CYCLE", 5, 1, 0x0}}, + {F, {"I2C_MST_CYCLE", 6, 1, 0x1}}, + {R, {"SYSTEM_MONITOR/IMU/YG_OFFS_USRH", 0x414}}, + {F, {"VALUE", 0, 8, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/I2C_SLV0_CTRL", 0x414}}, + {F, {"I2C_SLV0_LENG", 0, 4, 0x0}}, + {F, {"I2C_SLV0_GRP", 4, 1, 0x0}}, + {F, {"I2C_SLV0_REG_DIS", 5, 1, 0x0}}, + {F, {"I2C_SLV0_BYTE_SW", 6, 1, 0x0}}, + {F, {"I2C_SLV0_EN", 7, 1, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/PWR_MGMT_1", 0x418}}, + {F, {"CLKSEL", 0, 3, 0x0}}, + {F, {"TEMP_DIS", 3, 1, 0x0}}, + {F, {"LP_EN", 5, 1, 0x0}}, + {F, {"SLEEP", 6, 1, 0x0}}, + {F, {"DEVICE_RESET", 7, 1, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/YG_OFFS_USRL", 0x418}}, + {F, {"VALUE", 0, 8, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/I2C_SLV0_DO", 0x418}}, + {F, {"VALUE", 0, 8, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/PWR_MGMT_2", 0x41c}}, + {F, {"DISABLE_GYRO", 0, 3, 0x6}}, + {F, {"DISABLE_ACCEL", 3, 3, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/ZG_OFFS_USRH", 0x41c}}, + {F, {"VALUE", 0, 8, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/I2C_SLV1_ADDR", 0x41c}}, + {F, {"I2C_ID_1", 0, 7, 0x0}}, + {F, {"I2C_SLV1_RNW", 7, 1, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/ZG_OFFS_USRL", 0x420}}, + {F, {"VALUE", 0, 8, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/I2C_SLV1_REG", 0x420}}, + {F, {"I2C_SLV1_REG", 0, 8, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/ODR_ALIGN_EN", 0x424}}, + {F, {"ODR_ALIGN_EN", 0, 1, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/I2C_SLV1_CTRL", 0x424}}, + {F, {"I2C_SLV1_LENG", 0, 4, 0x0}}, + {F, {"I2C_SLV1_GRP", 4, 1, 0x0}}, + {F, {"I2C_SLV1_REG_DIS", 5, 1, 0x0}}, + {F, {"I2C_SLV1_BYTE_SW", 6, 1, 0x0}}, + {F, {"I2C_SLV1_EN", 7, 1, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/I2C_SLV1_DO", 0x428}}, + {F, {"VALUE", 0, 8, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/I2C_SLV2_ADDR", 0x42c}}, + {F, {"I2C_ID_2", 0, 7, 0x0}}, + {F, {"I2C_SLV2_RNW", 7, 1, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/I2C_SLV2_REG", 0x430}}, + {F, {"VALUE", 0, 8, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/I2C_SLV2_CTRL", 0x434}}, + {F, {"I2C_SLV2_LENG", 0, 4, 0x0}}, + {F, {"I2C_SLV2_GRP", 4, 1, 0x0}}, + {F, {"I2C_SLV2_REG_DIS", 5, 1, 0x0}}, + {F, {"I2C_SLV2_BYTE_SW", 6, 1, 0x0}}, + {F, {"I2C_SLV2_EN", 7, 1, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/SELF_TEST_X_ACCEL", 0x438}}, + {F, {"XA_ST_DATA", 0, 8, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/I2C_SLV2_DO", 0x438}}, + {F, {"VALUE", 0, 8, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/INT_PIN_CFG", 0x43c}}, + {F, {"BYPASS_EN", 1, 1, 0x0}}, + {F, {"FSYNC_INT_MODE_EN", 2, 1, 0x0}}, + {F, {"ACTL_FSYNC", 3, 1, 0x0}}, + {F, {"INT_ANYRD_2CLEAR", 4, 1, 0x0}}, + {F, {"INT1_LATCH_INT_EN", 5, 1, 0x0}}, + {F, {"INT1_OPEN", 6, 1, 0x0}}, + {F, {"INT1_ACTL", 7, 1, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/SELF_TEST_Y_ACCEL", 0x43c}}, + {F, {"YA_ST_DATA", 0, 8, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/I2C_SLV3_ADDR", 0x43c}}, + {F, {"I2C_ID_3", 0, 7, 0x0}}, + {F, {"I2C_SLV3_RNW", 7, 1, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/INT_ENABLE", 0x440}}, + {F, {"I2C_MST_INT_EN", 0, 1, 0x0}}, + {F, {"DMP_INT1_EN", 1, 1, 0x0}}, + {F, {"PLL_RDY_EN", 2, 1, 0x0}}, + {F, {"WOM_INT_EN", 3, 1, 0x0}}, + {F, {"REG_WOF_EN", 7, 1, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/SELF_TEST_Z_ACCEL", 0x440}}, + {F, {"ZA_ST_DATA", 0, 8, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/ACCEL_SMPLRT_DIV_1", 0x440}}, + {F, {"VALUE", 0, 4, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/I2C_SLV3_REG", 0x440}}, + {F, {"VALUE", 0, 8, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/INT_ENABLE_1", 0x444}}, + {F, {"RAW_DATA_0_RDY_EN", 0, 1, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/ACCEL_SMPLRT_DIV_2", 0x444}}, + {F, {"VALUE", 0, 8, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/I2C_SLV3_CTRL", 0x444}}, + {F, {"I2C_SLV3_LENG", 0, 4, 0x0}}, + {F, {"I2C_SLV3_GRP", 4, 1, 0x0}}, + {F, {"I2C_SLV3_REG_DIS", 5, 1, 0x0}}, + {F, {"I2C_SLV3_BYTE_SW", 6, 1, 0x0}}, + {F, {"I2C_SLV3_EN", 7, 1, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/INT_ENABLE_2", 0x448}}, + {F, {"FIFO_OVERFLOW_EN", 0, 5, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/ACCEL_INTEL_CTRL", 0x448}}, + {F, {"ACCEL_INTEL_MODE_INT", 0, 1, 0x0}}, + {F, {"ACCEL_INTEL_EN", 1, 1, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/I2C_SLV3_DO", 0x448}}, + {F, {"VALUE", 0, 8, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/INT_ENABLE_3", 0x44c}}, + {F, {"FIFO_WM_EN", 0, 5, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/ACCEL_WOM_THR", 0x44c}}, + {F, {"WOM_THRESHOLD", 0, 8, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/I2C_SLV4_ADDR", 0x44c}}, + {F, {"I2C_ID_4", 0, 7, 0x0}}, + {F, {"I2C_SLV4_RNW", 7, 1, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/XA_OFFS_H", 0x450}}, + {F, {"VALUE", 0, 8, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/ACCEL_CONFIG", 0x450}}, + {F, {"ACCEL_FCHOICE", 0, 1, 0x1}}, + {F, {"ACCEL_FS_SEL", 1, 2, 0x0}}, + {F, {"ACCEL_DLPFCFG", 3, 3, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/I2C_SLV4_REG", 0x450}}, + {F, {"VALUE", 0, 8, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/XA_OFFS_L", 0x454}}, + {F, {"VALUE", 1, 7, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/ACCEL_CONFIG_2", 0x454}}, + {F, {"DEC3_CFG", 0, 2, 0x0}}, + {F, {"AZ_ST_EN_REG", 2, 1, 0x0}}, + {F, {"AY_ST_EN_REG", 3, 1, 0x0}}, + {F, {"AX_ST_EN_REG", 4, 1, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/I2C_SLV4_CTRL", 0x454}}, + {F, {"I2C_SLV4_DLY", 0, 5, 0x0}}, + {F, {"I2C_SLV4_REG_DIS", 5, 1, 0x0}}, + {F, {"I2C_SLV4_BYTE_SW", 6, 1, 0x0}}, + {F, {"I2C_SLV4_EN", 7, 1, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/I2C_SLV4_DO", 0x458}}, + {F, {"VALUE", 0, 8, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/I2C_MST_STATUS", 0x45c}}, + {F, {"I2C_SLV0_NACK", 0, 1, 0x0}}, + {F, {"I2C_SLV1_NACK", 1, 1, 0x0}}, + {F, {"I2C_SLV2_NACK", 2, 1, 0x0}}, + {F, {"I2C_SLV3_NACK", 3, 1, 0x0}}, + {F, {"I2C_SLV4_NACK", 4, 1, 0x0}}, + {F, {"I2C_LOST_ARB", 5, 1, 0x0}}, + {F, {"I2C_SLV4_DONE", 6, 1, 0x0}}, + {F, {"PASS_THROUGH", 7, 1, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/YA_OFFS_H", 0x45c}}, + {F, {"VALUE", 0, 8, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/I2C_SLV4_DI", 0x45c}}, + {F, {"VALUE", 0, 8, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/YA_OFFS_L", 0x460}}, + {F, {"VALUE", 1, 7, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/INT_STATUS", 0x464}}, + {F, {"I2C_MST_INT", 0, 1, 0x0}}, + {F, {"DMP_INT1", 1, 1, 0x0}}, + {F, {"PLL_RDY_INT", 2, 1, 0x0}}, + {F, {"WOM_INT", 3, 1, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/INT_STATUS_1", 0x468}}, + {F, {"RAW_DATA_0_RDY_INT", 0, 1, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/ZA_OFFS_H", 0x468}}, + {F, {"VALUE", 0, 8, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/INT_STATUS_2", 0x46c}}, + {F, {"FIFO_OVERFLOW_INT", 0, 5, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/ZA_OFFS_L", 0x46c}}, + {F, {"VALUE", 1, 7, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/INT_STATUS_3", 0x470}}, + {F, {"FIFO_WM_INT", 0, 5, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/DELAY_TIMEH", 0x4a0}}, + {F, {"VALUE", 0, 8, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/TIMEBASE_CORRECTION_PLL", 0x4a0}}, + {F, {"TBC_PLL", 0, 8, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/DELAY_TIMEL", 0x4a4}}, + {F, {"VALUE", 0, 8, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/ACCEL_XOUT_H", 0x4b4}}, + {F, {"VALUE", 0, 8, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/ACCEL_XOUT_L", 0x4b8}}, + {F, {"VALUE", 0, 8, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/ACCEL_YOUT_H", 0x4bc}}, + {F, {"VALUE", 0, 8, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/ACCEL_YOUT_L", 0x4c0}}, + {F, {"VALUE", 0, 8, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/ACCEL_ZOUT_H", 0x4c4}}, + {F, {"VALUE", 0, 8, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/ACCEL_ZOUT_L", 0x4c8}}, + {F, {"VALUE", 0, 8, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/GYRO_XOUT_H", 0x4cc}}, + {F, {"VALUE", 0, 8, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/GYRO_XOUT_L", 0x4d0}}, + {F, {"VALUE", 0, 8, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/GYRO_YOUT_H", 0x4d4}}, + {F, {"VALUE", 0, 8, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/GYRO_YOUT_L", 0x4d8}}, + {F, {"VALUE", 0, 8, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/GYRO_ZOUT_H", 0x4dc}}, + {F, {"VALUE", 0, 8, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/GYRO_ZOUT_L", 0x4e0}}, + {F, {"VALUE", 0, 8, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/TEMP_OUT_H", 0x4e4}}, + {F, {"VALUE", 0, 8, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/TEMP_OUT_L", 0x4e8}}, + {F, {"VALUE", 0, 8, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/EXT_SLV_SENS_DATA_00", 0x4ec}}, + {F, {"VALUE", 0, 8, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/EXT_SLV_SENS_DATA_01", 0x4f0}}, + {F, {"VALUE", 0, 8, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/EXT_SLV_SENS_DATA_02", 0x4f4}}, + {F, {"VALUE", 0, 8, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/EXT_SLV_SENS_DATA_03", 0x4f8}}, + {F, {"VALUE", 0, 8, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/EXT_SLV_SENS_DATA_04", 0x4fc}}, + {F, {"VALUE", 0, 8, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/EXT_SLV_SENS_DATA_05", 0x500}}, + {F, {"VALUE", 0, 8, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/EXT_SLV_SENS_DATA_06", 0x504}}, + {F, {"VALUE", 0, 8, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/EXT_SLV_SENS_DATA_07", 0x508}}, + {F, {"VALUE", 0, 8, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/EXT_SLV_SENS_DATA_08", 0x50c}}, + {F, {"VALUE", 0, 8, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/EXT_SLV_SENS_DATA_09", 0x510}}, + {F, {"VALUE", 0, 8, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/EXT_SLV_SENS_DATA_10", 0x514}}, + {F, {"VALUE", 0, 8, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/EXT_SLV_SENS_DATA_11", 0x518}}, + {F, {"VALUE", 0, 8, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/EXT_SLV_SENS_DATA_12", 0x51c}}, + {F, {"VALUE", 0, 8, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/EXT_SLV_SENS_DATA_13", 0x520}}, + {F, {"VALUE", 0, 8, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/EXT_SLV_SENS_DATA_14", 0x524}}, + {F, {"VALUE", 0, 8, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/EXT_SLV_SENS_DATA_15", 0x528}}, + {F, {"VALUE", 0, 8, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/EXT_SLV_SENS_DATA_16", 0x52c}}, + {F, {"VALUE", 0, 8, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/EXT_SLV_SENS_DATA_17", 0x530}}, + {F, {"VALUE", 0, 8, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/EXT_SLV_SENS_DATA_18", 0x534}}, + {F, {"VALUE", 0, 8, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/EXT_SLV_SENS_DATA_19", 0x538}}, + {F, {"VALUE", 0, 8, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/EXT_SLV_SENS_DATA_20", 0x53c}}, + {F, {"VALUE", 0, 8, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/EXT_SLV_SENS_DATA_21", 0x540}}, + {F, {"VALUE", 0, 8, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/EXT_SLV_SENS_DATA_22", 0x544}}, + {F, {"VALUE", 0, 8, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/EXT_SLV_SENS_DATA_23", 0x548}}, + {F, {"VALUE", 0, 8, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/FSYNC_CONFIG", 0x548}}, + {F, {"EXT_SYNC_SET", 0, 4, 0x0}}, + {F, {"WOF_EDGE_INT", 4, 1, 0x0}}, + {F, {"WOF_DEGLITCH_EN", 5, 1, 0x0}}, + {F, {"DELAY_TIME_EN", 7, 1, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/TEMP_CONFIG", 0x54c}}, + {F, {"TEMP_DLPFCFG", 0, 3, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/MOD_CTRL_USR", 0x550}}, + {F, {"REG_LP_DMP_EN", 0, 1, 0x1}}, + {R, {"SYSTEM_MONITOR/IMU/FIFO_EN_1", 0x598}}, + {F, {"SLV_0_FIFO_EN", 0, 1, 0x0}}, + {F, {"SLV_1_FIFO_EN", 1, 1, 0x0}}, + {F, {"SLV_2_FIFO_EN", 2, 1, 0x0}}, + {F, {"SLV_3_FIFO_EN", 3, 1, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/FIFO_EN_2", 0x59c}}, + {F, {"TEMP_FIFO_EN", 0, 1, 0x0}}, + {F, {"GYRO_X_FIFO_EN", 1, 1, 0x0}}, + {F, {"GYRO_Y_FIFO_EN", 2, 1, 0x0}}, + {F, {"GYRO_Z_FIFO_EN", 3, 1, 0x0}}, + {F, {"ACCEL_FIFO_EN", 4, 1, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/FIFO_RST", 0x5a0}}, + {F, {"FIFO_RESET", 0, 5, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/FIFO_MODE", 0x5a4}}, + {F, {"FIFO_MODE", 0, 5, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/FIFO_COUNTH", 0x5c0}}, + {F, {"FIFO_CNT", 0, 5, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/FIFO_COUNTL", 0x5c4}}, + {F, {"FIFO_CNT", 0, 8, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/FIFO_R_W", 0x5c8}}, + {F, {"VALUE", 0, 8, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/DATA_RDY_STATUS", 0x5d0}}, + {F, {"RAW_DATA_RDY", 0, 4, 0x0}}, + {F, {"WOF_STATUS", 7, 1, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/FIFO_CFG", 0x5d8}}, + {F, {"FIFO_CFG", 0, 1, 0x0}}, + {R, {"SYSTEM_MONITOR/IMU/REG_BANK_SEL", 0x5fc}}, + {F, {"USER_BANK", 4, 2, 0x0}}, + {R, {"SYSTEM_MONITOR/CONTROL/EVT_MERGE_CONTROL", 0x600}}, + {F, {"ENABLE", 0, 1, 0x1}}, + {F, {"BYPASS", 1, 1, 0x0}}, + {F, {"SOURCE", 2, 2, 0x0}}, + {R, {"SYSTEM_CONFIG/ID", 0x800}}, + {F, {"VALUE", 0, 8, 0x29}}, + {R, {"SYSTEM_CONFIG/VERSION", 0x804}}, + {F, {"MICRO", 0, 8, 0x0}}, + {F, {"MINOR", 8, 8, 0x0}}, + {F, {"MAJOR", 16, 8, 0x0}}, + {R, {"SYSTEM_CONFIG/BUILD_DATE", 0x808}}, + {F, {"VALUE", 0, 32, 0x0}}, + {R, {"SYSTEM_CONFIG/VERSION_CONTROL_ID", 0x80c}}, + {F, {"VALUE", 0, 32, 0x0}}, + {R, {"ESP/CONTROL/CONTROL", 0x1000}}, + {F, {"BYPASS", 0, 1, 0x1}}, + {F, {"AFK_TIME_BASE_EN", 1, 1, 0x0}}, + {F, {"STC_TIME_BASE_EN", 2, 1, 0x0}}, + {R, {"ESP/CONTROL/SPLITTER", 0x1004}}, + {F, {"BYPASS", 0, 1, 0x1}}, + {R, {"ESP/CONTROL/IN_EDF", 0x1008}}, + {F, {"BYPASS", 0, 1, 0x0}}, + {F, {"ENABLE", 1, 1, 0x0}}, + {R, {"ESP/CONTROL/AFK_FEATURE", 0x100c}}, + {F, {"VERSION", 0, 8, 0x0}}, + {F, {"PRESENT", 8, 1, 0x0}}, + {R, {"ESP/CONTROL/STC_FEATURE", 0x1010}}, + {F, {"VERSION", 0, 8, 0x0}}, + {F, {"PRESENT", 8, 1, 0x0}}, + {R, {"ESP/CONTROL/ERC_FEATURE", 0x1014}}, + {F, {"VERSION", 0, 8, 0x0}}, + {F, {"PRESENT", 8, 1, 0x0}}, + {R, {"ESP/CONTROL/OUT_GEN_LAST_CONTROL", 0x1020}}, + {F, {"BYPASS", 0, 1, 0x0}}, + {F, {"ENABLE", 1, 1, 0x1}}, + {F, {"GEN_LAST", 2, 1, 0x1}}, + {R, {"ESP/CONTROL/OUT_TH_RECOVERY_CONTROL", 0x1024}}, + {F, {"ENABLE", 0, 1, 0x1}}, + {F, {"BYPASS", 1, 1, 0x1}}, + {R, {"ESP/CONTROL/OUT_TS_CHECKER_CONTROL", 0x1028}}, + {F, {"BYPASS", 0, 1, 0x1}}, + {F, {"THRESHOLD", 1, 24, 0x186a0}}, + {R, {"ESP/CONTROL/OUT_TS_CHECKER_EVT_UI_CNT", 0x102c}}, + {F, {"TIME_LOW", 0, 16, 0x0}}, + {F, {"TIME_HIGH", 16, 16, 0x0}}, + {R, {"ESP/CONTROL/OUT_TS_CHECKER_EVT_BROKEN_CNT", 0x1030}}, + {F, {"TIME_LOW", 0, 16, 0x0}}, + {F, {"TIME_HIGH", 16, 16, 0x0}}, + {R, {"ESP/CONTROL/OUT_TS_CHECKER_EVT_UK_ERR_CNT", 0x1034}}, + {F, {"TIME_LOW", 0, 16, 0x0}}, + {F, {"TIME_HIGH", 16, 16, 0x0}}, + {R, {"ESP/AFK/pipeline_control", 0x1100}}, + {F, {"enable", 0, 1, 0x0}}, + {F, {"drop_nbackpressure", 1, 1, 0x0}}, + {F, {"bypass", 2, 1, 0x0}}, + {R, {"ESP/AFK/afk_param", 0x1104}}, + {F, {"counter_low", 0, 3, 0x4}}, + {F, {"counter_high", 3, 3, 0x6}}, + {F, {"invert", 6, 1, 0x0}}, + {F, {"drop_disable", 7, 1, 0x0}}, + {R, {"ESP/AFK/filter_period", 0x1108}}, + {F, {"min_cutoff_period", 0, 8, 0xf}}, + {F, {"max_cutoff_period", 8, 8, 0x9c}}, + {F, {"inverted_duty_cycle", 16, 4, 0x8}}, + {R, {"ESP/AFK/invalidation", 0x11c0}}, + {F, {"dt_fifo_wait_time", 0, 12, 0x5a0}}, + {F, {"dt_fifo_timeout", 12, 12, 0x5a}}, + {F, {"in_parallel", 24, 4, 0xa}}, + {F, {"flag_inv_busy", 28, 1, 0x0}}, + {R, {"ESP/AFK/initialization", 0x11c4}}, + {F, {"req_init", 0, 1, 0x0}}, + {F, {"flag_init_busy", 1, 1, 0x0}}, + {F, {"flag_init_done", 2, 1, 0x0}}, + {R, {"ESP/AFK/icn_sram_ctrl", 0x11c8}}, + {F, {"req_trigger", 0, 1, 0x0}}, + {F, {"req_type", 1, 1, 0x0}}, + {A, {"read", 0}}, + {A, {"write", 1}}, + {F, {"data_sel", 2, 3, 0x0}}, + {A, {"lastts_and_lastburstts", 1}}, + {A, {"str1", 4}}, + {A, {"str0", 2}}, + {A, {"counter_and_currentmask", 4}}, + {A, {"isflicking_and_filtermask", 2}}, + {A, {"alr", 1}}, + {R, {"ESP/AFK/icn_sram_address", 0x11cc}}, + {F, {"x_addr", 0, 11, 0x0}}, + {F, {"y_addr", 16, 11, 0x0}}, + {R, {"ESP/AFK/icn_sram_data", 0x11d0}}, + {F, {"val", 0, 32, 0x0}}, + {R, {"ESP/AFK/shadow_ctrl", 0x11d4}}, + {F, {"timer_en", 0, 1, 0x0}}, + {F, {"irq_sw_override", 1, 1, 0x0}}, + {F, {"reset_on_copy", 2, 1, 0x1}}, + {R, {"ESP/AFK/shadow_timer_threshold", 0x11d8}}, + {F, {"timer_threshold", 0, 32, 0x3e8}}, + {R, {"ESP/AFK/shadow_status", 0x11dc}}, + {F, {"shadow_valid", 0, 1, 0x0}}, + {F, {"shadow_overrun", 1, 1, 0x0}}, + {R, {"ESP/AFK/total_evt_cnt", 0x11e0}}, + {F, {"val", 0, 32, 0x0}}, + {R, {"ESP/AFK/flicker_evt_cnt", 0x11e4}}, + {F, {"val", 0, 32, 0x0}}, + {R, {"ESP/AFK/output_vector_cnt", 0x11e8}}, + {F, {"val", 0, 32, 0x0}}, + {R, {"ESP/AFK/chicken0_bits", 0x12c0}}, + {F, {"powerdown_enable", 0, 1, 0x1}}, + {F, {"inv_powerdown_enable", 1, 1, 0x1}}, + {F, {"sram_powerdown_enable", 2, 1, 0x0}}, + {F, {"sram_clk_gating_enable", 3, 1, 0x1}}, + {F, {"enable_inv_abs_timebase", 4, 1, 0x1}}, + {R, {"ESP/AFK/chicken1_bits", 0x12c4}}, + {F, {"enable_inv_alr_last_ts", 0, 1, 0x1}}, + {F, {"enable_inv_alr_last_burst", 1, 1, 0x1}}, + {F, {"sram_read_margin_set", 2, 2, 0x1}}, + {F, {"sram_write_margin_set", 4, 2, 0x1}}, + {F, {"enable_inv_abs_threshold", 16, 12, 0x80}}, + {R, {"ESP/AFK/chicken2_bits", 0x12c8}}, + {F, {"alr_sram_powerdown_enable", 0, 10, 0x0}}, + {F, {"str_sram0_powerdown_enable", 10, 10, 0x0}}, + {F, {"str_sram1_powerdown_enable", 20, 10, 0x0}}, + {R, {"ESP/STC/pipeline_control", 0x1300}}, + {F, {"enable", 0, 1, 0x0}}, + {F, {"drop_nbackpressure", 1, 1, 0x0}}, + {F, {"bypass", 2, 1, 0x0}}, + {R, {"ESP/STC/stc_param", 0x1304}}, + {F, {"enable", 0, 1, 0x0}}, + {F, {"threshold", 1, 19, 0x2710}}, + {F, {"disable_stc_cut_trail", 24, 1, 0x0}}, + {R, {"ESP/STC/trail_param", 0x1308}}, + {F, {"enable", 0, 1, 0x0}}, + {F, {"threshold", 1, 19, 0x186a0}}, + {R, {"ESP/STC/timestamping", 0x130c}}, + {F, {"prescaler", 0, 5, 0xd}}, + {F, {"multiplier", 5, 4, 0x1}}, + {F, {"enable_rightshift_round", 9, 1, 0x1}}, + {F, {"enable_last_ts_update_at_every_event", 16, 1, 0x0}}, + {R, {"ESP/STC/invalidation", 0x13c0}}, + {F, {"dt_fifo_wait_time", 0, 12, 0x4}}, + {F, {"dt_fifo_timeout", 12, 12, 0x118}}, + {F, {"in_parallel", 24, 4, 0xa}}, + {F, {"flag_inv_busy", 28, 1, 0x0}}, + {R, {"ESP/STC/initialization", 0x13c4}}, + {F, {"req_init", 0, 1, 0x0}}, + {F, {"flag_init_busy", 1, 1, 0x0}}, + {F, {"flag_init_done", 2, 1, 0x0}}, + {R, {"ESP/STC/icn_sram_ctrl", 0x13c8}}, + {F, {"req_trigger", 0, 1, 0x0}}, + {F, {"req_type", 1, 1, 0x0}}, + {A, {"read", 0}}, + {A, {"write", 1}}, + {F, {"data_sel", 2, 1, 0x0}}, + {A, {"lastts_and_lastburst_lastpol", 1}}, + {A, {"alr", 1}}, + {R, {"ESP/STC/icn_sram_address", 0x13cc}}, + {F, {"x_addr", 0, 11, 0x0}}, + {F, {"y_addr", 16, 11, 0x0}}, + {R, {"ESP/STC/icn_sram_data", 0x13d0}}, + {F, {"val", 0, 32, 0x0}}, + {R, {"ESP/STC/shadow_ctrl", 0x13d4}}, + {F, {"timer_en", 0, 1, 0x0}}, + {F, {"irq_sw_override", 1, 1, 0x0}}, + {F, {"reset_on_copy", 2, 1, 0x1}}, + {R, {"ESP/STC/shadow_timer_threshold", 0x13d8}}, + {F, {"timer_threshold", 0, 32, 0x3e8}}, + {R, {"ESP/STC/shadow_status", 0x13dc}}, + {F, {"shadow_valid", 0, 1, 0x0}}, + {F, {"shadow_overrun", 1, 1, 0x0}}, + {R, {"ESP/STC/total_evt_cnt", 0x13e0}}, + {F, {"val", 0, 32, 0x0}}, + {R, {"ESP/STC/stc_evt_cnt", 0x13e4}}, + {F, {"val", 0, 32, 0x0}}, + {R, {"ESP/STC/trail_evt_cnt", 0x13e8}}, + {F, {"val", 0, 32, 0x0}}, + {R, {"ESP/STC/output_vector_cnt", 0x13ec}}, + {F, {"val", 0, 32, 0x0}}, + {R, {"ESP/STC/chicken0_bits", 0x14c0}}, + {F, {"powerdown_enable", 0, 1, 0x1}}, + {F, {"inv_powerdown_enable", 1, 1, 0x1}}, + {F, {"sram_powerdown_enable", 2, 1, 0x0}}, + {F, {"sram_clk_gating_enable", 3, 1, 0x1}}, + {F, {"enable_inv_abs_timebase", 4, 1, 0x1}}, + {R, {"ESP/STC/chicken1_bits", 0x14c4}}, + {F, {"enable_inv_alr_last_ts", 0, 1, 0x1}}, + {F, {"unused0", 1, 15, 0x0}}, + {F, {"enable_inv_abs_threshold", 16, 12, 0x10}}, + {R, {"ESP/STC/chicken2_bits", 0x14c8}}, + {F, {"alr_sram_powerdown_enable", 0, 10, 0x0}}, + {R, {"ESP/OUT_EDF/pipeline_control", 0x1500}}, + {F, {"enable", 0, 1, 0x1}}, + {F, {"bypass", 1, 1, 0x0}}, + {F, {"preserve_last", 2, 1, 0x1}}, + {F, {"bypass_mem", 3, 2, 0x0}}, + {F, {"timeout", 16, 16, 0xffff}}, + {R, {"ESP/OUT_EDF/event_type_en", 0x1504}}, + {F, {"en_left_td_low", 0, 1, 0x1}}, + {F, {"en_left_td_high", 1, 1, 0x1}}, + {F, {"en_left_aps_low", 2, 1, 0x1}}, + {F, {"en_left_aps_high", 3, 1, 0x1}}, + {F, {"en_right_td_low", 4, 1, 0x1}}, + {F, {"en_right_td_high", 5, 1, 0x1}}, + {F, {"en_right_aps_low", 6, 1, 0x1}}, + {F, {"en_right_aps_high", 7, 1, 0x1}}, + {F, {"en_time_high", 8, 1, 0x1}}, + {F, {"en_stereo_disp", 9, 1, 0x0}}, + {F, {"en_ext_trigger", 10, 1, 0x1}}, + {F, {"en_gray_level", 11, 1, 0x0}}, + {F, {"en_opt_flow", 12, 1, 0x0}}, + {F, {"en_orientation", 13, 1, 0x0}}, + {F, {"en_others", 14, 1, 0x1}}, + {F, {"en_continued", 15, 1, 0x1}}, + {R, {"ESP/OUT_EDF/control", 0x1508}}, + {F, {"format", 0, 1, 0x0}}, + {A, {"2.0", 0}}, + {A, {"3.0", 1}}, + {R, {"ESP/OUT_EDF/dfifo0_v_ecc", 0x150c}}, + {F, {"ecc_fifo0_err0", 0, 1, 0x0}}, + {F, {"ecc_fifo0_err1", 1, 1, 0x0}}, + {R, {"ESP/OUT_EDF/dfifo0_d_ecc", 0x1510}}, + {F, {"ecc_fifo0_err0_addr", 0, 16, 0x0}}, + {F, {"ecc_fifo0_err1_addr", 16, 16, 0x0}}, + {R, {"ESP/OUT_EDF/dfifo1_v_ecc", 0x1514}}, + {F, {"ecc_fifo1_err0", 0, 1, 0x0}}, + {F, {"ecc_fifo1_err1", 1, 1, 0x0}}, + {R, {"ESP/OUT_EDF/dfifo1_d_ecc", 0x1518}}, + {F, {"ecc_fifo1_err0_addr", 0, 16, 0x0}}, + {F, {"ecc_fifo1_err1_addr", 16, 16, 0x0}}, + {R, {"PS_HOST_IF/AXI_DMA_PACKETIZER/CONTROL", 0x2000}}, + {F, {"BYPASS", 0, 1, 0x0}}, + {F, {"ENABLE_COUNTER_PATTERN", 1, 1, 0x0}}, + {R, {"PS_HOST_IF/AXI_DMA_PACKETIZER/PACKET_LENGTH", 0x2004}}, + {F, {"VALUE", 0, 32, 0x400}}, + {R, {"PS_HOST_IF/AXIL_BRIDGE/CONTROL", 0x2100}}, + {F, {"BUS_ERROR_EN", 0, 1, 0x0}}, + {R, {"PS_HOST_IF/AXIL_BRIDGE/ERROR_STATUS", 0x2104}}, + {F, {"CODE", 0, 16, 0x0}}, + {F, {"COUNT", 16, 16, 0x0}}, + {R, {"ESP/ERC/pipeline_control", 0x3000}}, + {F, {"enable", 0, 1, 0x0}}, + {F, {"bypass", 1, 1, 0x0}}, + {F, {"fifo0_bypass", 2, 1, 0x0}}, + {F, {"fifo1_bypass", 3, 1, 0x0}}, + {F, {"fifo2_bypass", 4, 1, 0x0}}, + {F, {"delay_fifo_pd", 5, 2, 0x0}}, + {F, {"drop_grid_pd", 7, 2, 0x0}}, + {F, {"t_drop_pd", 9, 1, 0x0}}, + {F, {"drop_grid0_wtsel", 10, 2, 0x1}}, + {F, {"drop_grid0_rtsel", 12, 2, 0x1}}, + {F, {"drop_grid1_wtsel", 14, 2, 0x1}}, + {F, {"drop_grid1_rtsel", 16, 2, 0x1}}, + {F, {"tdrop_wtsel", 18, 2, 0x1}}, + {F, {"tdrop_rtsel", 20, 2, 0x1}}, + {F, {"drop_en", 22, 1, 0x0}}, + {F, {"drop_on_full_en", 23, 1, 0x0}}, + {R, {"ESP/ERC/in_drop_rate_control", 0x3004}}, + {F, {"cfg_event_delay_fifo_en", 0, 1, 0x0}}, + {F, {"cfg_in_manual_drop_rate_en", 1, 1, 0x0}}, + {F, {"cfg_in_manual_TD_drop_rate_value", 2, 9, 0x0}}, + {R, {"ESP/ERC/reference_period", 0x3008}}, + {F, {"val", 0, 10, 0x80}}, + {R, {"ESP/ERC/td_target_event_rate", 0x300c}}, + {F, {"val", 0, 22, 0x80}}, + {R, {"ESP/ERC/delay_fifo_status", 0x3014}}, + {F, {"error", 0, 1, 0x0}}, + {R, {"ESP/ERC/td_actual_in_event_rate", 0x3018}}, + {F, {"val", 0, 22, 0x0}}, + {R, {"ESP/ERC/td_actual_in_drop_rate", 0x3020}}, + {F, {"val", 0, 9, 0x0}}, + {R, {"ESP/ERC/refine_drop_rate", 0x3028}}, + {F, {"cfg_in_drop_rate_TD_en", 0, 1, 0x0}}, + {F, {"cfg_drop_interest_level_TD_en", 1, 1, 0x0}}, + {F, {"cfg_out_drop_rate_fb_TD_en", 2, 1, 0x0}}, + {R, {"ESP/ERC/select_pong_grid_mem", 0x302c}}, + {F, {"val", 0, 1, 0x0}}, + {F, {"status", 1, 1, 0x0}}, + {R, {"ESP/ERC/td_actual_out_event_rate", 0x3034}}, + {F, {"val", 0, 22, 0x0}}, + {R, {"ESP/ERC/t_dropping_control", 0x3050}}, + {F, {"en", 0, 1, 0x0}}, + {R, {"ESP/ERC/h_dropping_control", 0x3060}}, + {F, {"en", 0, 1, 0x0}}, + {R, {"ESP/ERC/v_dropping_control", 0x3070}}, + {F, {"en", 0, 1, 0x0}}, + {R, {"ESP/ERC/evt_dropped", 0x307c}}, + {F, {"evt_dropped_cnt", 0, 32, 0x0}}, + {R, {"ESP/ERC/h_dropping_lut_00", 0x3080}}, + {F, {"v0", 0, 5, 0x0}}, + {F, {"v1", 8, 5, 0x0}}, + {F, {"v2", 16, 5, 0x0}}, + {F, {"v3", 24, 5, 0x0}}, + {R, {"ESP/ERC/h_dropping_lut_01", 0x3084}}, + {F, {"v0", 0, 5, 0x0}}, + {F, {"v1", 8, 5, 0x0}}, + {F, {"v2", 16, 5, 0x0}}, + {F, {"v3", 24, 5, 0x0}}, + {R, {"ESP/ERC/h_dropping_lut_02", 0x3088}}, + {F, {"v0", 0, 5, 0x0}}, + {F, {"v1", 8, 5, 0x0}}, + {F, {"v2", 16, 5, 0x0}}, + {F, {"v3", 24, 5, 0x0}}, + {R, {"ESP/ERC/h_dropping_lut_03", 0x308c}}, + {F, {"v0", 0, 5, 0x0}}, + {F, {"v1", 8, 5, 0x0}}, + {F, {"v2", 16, 5, 0x0}}, + {F, {"v3", 24, 5, 0x0}}, + {R, {"ESP/ERC/h_dropping_lut_04", 0x3090}}, + {F, {"v0", 0, 5, 0x0}}, + {F, {"v1", 8, 5, 0x0}}, + {F, {"v2", 16, 5, 0x0}}, + {F, {"v3", 24, 5, 0x0}}, + {R, {"ESP/ERC/h_dropping_lut_05", 0x3094}}, + {F, {"v0", 0, 5, 0x0}}, + {F, {"v1", 8, 5, 0x0}}, + {F, {"v2", 16, 5, 0x0}}, + {F, {"v3", 24, 5, 0x0}}, + {R, {"ESP/ERC/h_dropping_lut_06", 0x3098}}, + {F, {"v0", 0, 5, 0x0}}, + {F, {"v1", 8, 5, 0x0}}, + {F, {"v2", 16, 5, 0x0}}, + {F, {"v3", 24, 5, 0x0}}, + {R, {"ESP/ERC/h_dropping_lut_07", 0x309c}}, + {F, {"v0", 0, 5, 0x0}}, + {F, {"v1", 8, 5, 0x0}}, + {F, {"v2", 16, 5, 0x0}}, + {F, {"v3", 24, 5, 0x0}}, + {R, {"ESP/ERC/v_dropping_lut_00", 0x30c0}}, + {F, {"v0", 0, 5, 0x0}}, + {F, {"v1", 8, 5, 0x0}}, + {F, {"v2", 16, 5, 0x0}}, + {F, {"v3", 24, 5, 0x0}}, + {R, {"ESP/ERC/v_dropping_lut_01", 0x30c4}}, + {F, {"v0", 0, 5, 0x0}}, + {F, {"v1", 8, 5, 0x0}}, + {F, {"v2", 16, 5, 0x0}}, + {F, {"v3", 24, 5, 0x0}}, + {R, {"ESP/ERC/v_dropping_lut_02", 0x30c8}}, + {F, {"v0", 0, 5, 0x0}}, + {F, {"v1", 8, 5, 0x0}}, + {F, {"v2", 16, 5, 0x0}}, + {F, {"v3", 24, 5, 0x0}}, + {R, {"ESP/ERC/v_dropping_lut_03", 0x30cc}}, + {F, {"v0", 0, 5, 0x0}}, + {F, {"v1", 8, 5, 0x0}}, + {F, {"v2", 16, 5, 0x0}}, + {F, {"v3", 24, 5, 0x0}}, + {R, {"ESP/ERC/v_dropping_lut_04", 0x30d0}}, + {F, {"v0", 0, 5, 0x0}}, + {F, {"v1", 8, 5, 0x0}}, + {F, {"v2", 16, 5, 0x0}}, + {F, {"v3", 24, 5, 0x0}}, + {R, {"ESP/ERC/v_dropping_lut_05", 0x30d4}}, + {F, {"v0", 0, 5, 0x0}}, + {F, {"v1", 8, 5, 0x0}}, + {F, {"v2", 16, 5, 0x0}}, + {F, {"v3", 24, 5, 0x0}}, + {R, {"ESP/ERC/v_dropping_lut_06", 0x30d8}}, + {F, {"v0", 0, 5, 0x0}}, + {F, {"v1", 8, 5, 0x0}}, + {F, {"v2", 16, 5, 0x0}}, + {F, {"v3", 24, 5, 0x0}}, + {R, {"ESP/ERC/v_dropping_lut_07", 0x30dc}}, + {F, {"v0", 0, 5, 0x0}}, + {F, {"v1", 8, 5, 0x0}}, + {F, {"v2", 16, 5, 0x0}}, + {F, {"v3", 24, 5, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_00", 0x3400}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_01", 0x3404}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_02", 0x3408}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_03", 0x340c}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_04", 0x3410}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_05", 0x3414}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_06", 0x3418}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_07", 0x341c}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_08", 0x3420}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_09", 0x3424}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_10", 0x3428}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_11", 0x342c}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_12", 0x3430}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_13", 0x3434}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_14", 0x3438}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_15", 0x343c}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_16", 0x3440}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_17", 0x3444}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_18", 0x3448}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_19", 0x344c}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_20", 0x3450}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_21", 0x3454}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_22", 0x3458}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_23", 0x345c}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_24", 0x3460}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_25", 0x3464}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_26", 0x3468}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_27", 0x346c}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_28", 0x3470}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_29", 0x3474}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_30", 0x3478}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_31", 0x347c}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_32", 0x3480}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_33", 0x3484}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_34", 0x3488}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_35", 0x348c}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_36", 0x3490}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_37", 0x3494}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_38", 0x3498}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_39", 0x349c}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_40", 0x34a0}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_41", 0x34a4}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_42", 0x34a8}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_43", 0x34ac}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_44", 0x34b0}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_45", 0x34b4}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_46", 0x34b8}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_47", 0x34bc}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_48", 0x34c0}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_49", 0x34c4}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_50", 0x34c8}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_51", 0x34cc}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_52", 0x34d0}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_53", 0x34d4}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_54", 0x34d8}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_55", 0x34dc}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_56", 0x34e0}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_57", 0x34e4}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_58", 0x34e8}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_59", 0x34ec}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_60", 0x34f0}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_61", 0x34f4}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_62", 0x34f8}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_63", 0x34fc}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_64", 0x3500}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_65", 0x3504}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_66", 0x3508}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_67", 0x350c}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_68", 0x3510}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_69", 0x3514}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_70", 0x3518}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_71", 0x351c}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_72", 0x3520}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_73", 0x3524}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_74", 0x3528}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_75", 0x352c}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_76", 0x3530}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_77", 0x3534}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_78", 0x3538}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_79", 0x353c}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_80", 0x3540}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_81", 0x3544}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_82", 0x3548}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_83", 0x354c}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_84", 0x3550}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_85", 0x3554}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_86", 0x3558}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_87", 0x355c}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_88", 0x3560}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_89", 0x3564}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_90", 0x3568}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_91", 0x356c}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_92", 0x3570}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_93", 0x3574}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_94", 0x3578}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_95", 0x357c}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_96", 0x3580}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_97", 0x3584}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_98", 0x3588}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_99", 0x358c}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_100", 0x3590}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_101", 0x3594}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_102", 0x3598}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_103", 0x359c}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_104", 0x35a0}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_105", 0x35a4}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_106", 0x35a8}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_107", 0x35ac}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_108", 0x35b0}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_109", 0x35b4}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_110", 0x35b8}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_111", 0x35bc}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_112", 0x35c0}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_113", 0x35c4}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_114", 0x35c8}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_115", 0x35cc}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_116", 0x35d0}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_117", 0x35d4}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_118", 0x35d8}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_119", 0x35dc}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_120", 0x35e0}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_121", 0x35e4}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_122", 0x35e8}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_123", 0x35ec}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_124", 0x35f0}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_125", 0x35f4}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_126", 0x35f8}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_127", 0x35fc}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_128", 0x3600}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_129", 0x3604}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_130", 0x3608}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_131", 0x360c}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_132", 0x3610}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_133", 0x3614}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_134", 0x3618}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_135", 0x361c}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_136", 0x3620}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_137", 0x3624}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_138", 0x3628}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_139", 0x362c}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_140", 0x3630}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_141", 0x3634}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_142", 0x3638}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_143", 0x363c}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_144", 0x3640}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_145", 0x3644}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_146", 0x3648}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_147", 0x364c}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_148", 0x3650}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_149", 0x3654}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_150", 0x3658}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_151", 0x365c}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_152", 0x3660}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_153", 0x3664}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_154", 0x3668}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_155", 0x366c}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_156", 0x3670}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_157", 0x3674}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_158", 0x3678}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_159", 0x367c}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_160", 0x3680}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_161", 0x3684}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_162", 0x3688}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_163", 0x368c}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_164", 0x3690}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_165", 0x3694}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_166", 0x3698}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_167", 0x369c}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_168", 0x36a0}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_169", 0x36a4}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_170", 0x36a8}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_171", 0x36ac}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_172", 0x36b0}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_173", 0x36b4}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_174", 0x36b8}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_175", 0x36bc}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_176", 0x36c0}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_177", 0x36c4}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_178", 0x36c8}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_179", 0x36cc}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_180", 0x36d0}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_181", 0x36d4}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_182", 0x36d8}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_183", 0x36dc}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_184", 0x36e0}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_185", 0x36e4}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_186", 0x36e8}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_187", 0x36ec}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_188", 0x36f0}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_189", 0x36f4}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_190", 0x36f8}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_191", 0x36fc}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_192", 0x3700}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_193", 0x3704}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_194", 0x3708}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_195", 0x370c}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_196", 0x3710}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_197", 0x3714}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_198", 0x3718}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_199", 0x371c}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_200", 0x3720}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_201", 0x3724}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_202", 0x3728}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_203", 0x372c}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_204", 0x3730}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_205", 0x3734}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_206", 0x3738}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_207", 0x373c}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_208", 0x3740}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_209", 0x3744}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_210", 0x3748}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_211", 0x374c}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_212", 0x3750}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_213", 0x3754}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_214", 0x3758}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_215", 0x375c}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_216", 0x3760}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_217", 0x3764}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_218", 0x3768}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_219", 0x376c}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_220", 0x3770}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_221", 0x3774}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_222", 0x3778}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_223", 0x377c}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_224", 0x3780}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_225", 0x3784}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_226", 0x3788}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_227", 0x378c}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_228", 0x3790}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_229", 0x3794}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_230", 0x3798}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_231", 0x379c}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_232", 0x37a0}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_233", 0x37a4}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_234", 0x37a8}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_235", 0x37ac}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_236", 0x37b0}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_237", 0x37b4}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_238", 0x37b8}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_239", 0x37bc}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_240", 0x37c0}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_241", 0x37c4}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_242", 0x37c8}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_243", 0x37cc}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_244", 0x37d0}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_245", 0x37d4}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_246", 0x37d8}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_247", 0x37dc}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_248", 0x37e0}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_249", 0x37e4}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_250", 0x37e8}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_251", 0x37ec}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_252", 0x37f0}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_253", 0x37f4}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_254", 0x37f8}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/t_dropping_lut_255", 0x37fc}}, + {F, {"v0", 0, 9, 0x0}}, + {F, {"v1", 16, 9, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_000", 0x3800}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_000", 0x3800}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_001", 0x3804}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_001", 0x3804}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_002", 0x3808}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_002", 0x3808}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_003", 0x380c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_003", 0x380c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_004", 0x3810}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_004", 0x3810}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_005", 0x3814}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_005", 0x3814}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_006", 0x3818}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_006", 0x3818}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_007", 0x381c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_007", 0x381c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_008", 0x3820}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_008", 0x3820}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_009", 0x3824}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_009", 0x3824}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_010", 0x3828}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_010", 0x3828}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_011", 0x382c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_011", 0x382c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_012", 0x3830}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_012", 0x3830}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_013", 0x3834}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_013", 0x3834}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_014", 0x3838}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_014", 0x3838}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_015", 0x383c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_015", 0x383c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_016", 0x3840}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_016", 0x3840}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_017", 0x3844}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_017", 0x3844}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_018", 0x3848}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_018", 0x3848}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_019", 0x384c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_019", 0x384c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_020", 0x3850}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_020", 0x3850}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_021", 0x3854}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_021", 0x3854}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_022", 0x3858}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_022", 0x3858}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_023", 0x385c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_023", 0x385c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_024", 0x3860}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_024", 0x3860}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_025", 0x3864}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_025", 0x3864}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_026", 0x3868}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_026", 0x3868}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_027", 0x386c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_027", 0x386c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_028", 0x3870}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_028", 0x3870}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_029", 0x3874}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_029", 0x3874}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_030", 0x3878}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_030", 0x3878}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_031", 0x387c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_031", 0x387c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_032", 0x3880}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_032", 0x3880}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_033", 0x3884}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_033", 0x3884}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_034", 0x3888}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_034", 0x3888}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_035", 0x388c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_035", 0x388c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_036", 0x3890}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_036", 0x3890}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_037", 0x3894}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_037", 0x3894}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_038", 0x3898}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_038", 0x3898}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_039", 0x389c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_039", 0x389c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_040", 0x38a0}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_040", 0x38a0}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_041", 0x38a4}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_041", 0x38a4}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_042", 0x38a8}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_042", 0x38a8}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_043", 0x38ac}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_043", 0x38ac}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_044", 0x38b0}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_044", 0x38b0}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_045", 0x38b4}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_045", 0x38b4}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_046", 0x38b8}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_046", 0x38b8}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_047", 0x38bc}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_047", 0x38bc}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_048", 0x38c0}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_048", 0x38c0}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_049", 0x38c4}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_049", 0x38c4}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_050", 0x38c8}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_050", 0x38c8}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_051", 0x38cc}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_051", 0x38cc}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_052", 0x38d0}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_052", 0x38d0}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_053", 0x38d4}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_053", 0x38d4}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_054", 0x38d8}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_054", 0x38d8}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_055", 0x38dc}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_055", 0x38dc}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_056", 0x38e0}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_056", 0x38e0}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_057", 0x38e4}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_057", 0x38e4}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_058", 0x38e8}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_058", 0x38e8}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_059", 0x38ec}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_059", 0x38ec}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_060", 0x38f0}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_060", 0x38f0}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_061", 0x38f4}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_061", 0x38f4}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_062", 0x38f8}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_062", 0x38f8}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_063", 0x38fc}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_063", 0x38fc}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_064", 0x3900}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_064", 0x3900}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_065", 0x3904}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_065", 0x3904}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_066", 0x3908}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_066", 0x3908}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_067", 0x390c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_067", 0x390c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_068", 0x3910}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_068", 0x3910}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_069", 0x3914}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_069", 0x3914}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_070", 0x3918}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_070", 0x3918}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_071", 0x391c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_071", 0x391c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_072", 0x3920}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_072", 0x3920}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_073", 0x3924}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_073", 0x3924}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_074", 0x3928}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_074", 0x3928}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_075", 0x392c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_075", 0x392c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_076", 0x3930}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_076", 0x3930}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_077", 0x3934}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_077", 0x3934}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_078", 0x3938}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_078", 0x3938}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_079", 0x393c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_079", 0x393c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_080", 0x3940}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_080", 0x3940}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_081", 0x3944}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_081", 0x3944}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_082", 0x3948}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_082", 0x3948}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_083", 0x394c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_083", 0x394c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_084", 0x3950}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_084", 0x3950}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_085", 0x3954}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_085", 0x3954}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_086", 0x3958}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_086", 0x3958}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_087", 0x395c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_087", 0x395c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_088", 0x3960}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_088", 0x3960}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_089", 0x3964}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_089", 0x3964}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_090", 0x3968}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_090", 0x3968}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_091", 0x396c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_091", 0x396c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_092", 0x3970}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_092", 0x3970}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_093", 0x3974}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_093", 0x3974}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_094", 0x3978}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_094", 0x3978}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_095", 0x397c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_095", 0x397c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_096", 0x3980}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_096", 0x3980}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_097", 0x3984}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_097", 0x3984}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_098", 0x3988}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_098", 0x3988}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_099", 0x398c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_099", 0x398c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_100", 0x3990}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_100", 0x3990}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_101", 0x3994}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_101", 0x3994}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_102", 0x3998}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_102", 0x3998}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_103", 0x399c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_103", 0x399c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_104", 0x39a0}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_104", 0x39a0}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_105", 0x39a4}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_105", 0x39a4}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_106", 0x39a8}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_106", 0x39a8}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_107", 0x39ac}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_107", 0x39ac}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_108", 0x39b0}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_108", 0x39b0}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_109", 0x39b4}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_109", 0x39b4}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_110", 0x39b8}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_110", 0x39b8}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_111", 0x39bc}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_111", 0x39bc}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_112", 0x39c0}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_112", 0x39c0}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_113", 0x39c4}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_113", 0x39c4}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_114", 0x39c8}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_114", 0x39c8}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_115", 0x39cc}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_115", 0x39cc}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_116", 0x39d0}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_116", 0x39d0}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_117", 0x39d4}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_117", 0x39d4}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_118", 0x39d8}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_118", 0x39d8}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_119", 0x39dc}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_119", 0x39dc}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_120", 0x39e0}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_120", 0x39e0}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_121", 0x39e4}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_121", 0x39e4}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_122", 0x39e8}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_122", 0x39e8}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_123", 0x39ec}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_123", 0x39ec}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_124", 0x39f0}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_124", 0x39f0}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_125", 0x39f4}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_125", 0x39f4}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_126", 0x39f8}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_126", 0x39f8}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_127", 0x39fc}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_127", 0x39fc}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_128", 0x3a00}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_128", 0x3a00}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_129", 0x3a04}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_129", 0x3a04}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_130", 0x3a08}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_130", 0x3a08}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_131", 0x3a0c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_131", 0x3a0c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_132", 0x3a10}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_132", 0x3a10}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_133", 0x3a14}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_133", 0x3a14}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_134", 0x3a18}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_134", 0x3a18}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_135", 0x3a1c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_135", 0x3a1c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_136", 0x3a20}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_136", 0x3a20}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_137", 0x3a24}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_137", 0x3a24}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_138", 0x3a28}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_138", 0x3a28}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_139", 0x3a2c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_139", 0x3a2c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_140", 0x3a30}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_140", 0x3a30}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_141", 0x3a34}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_141", 0x3a34}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_142", 0x3a38}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_142", 0x3a38}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_143", 0x3a3c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_143", 0x3a3c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_144", 0x3a40}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_144", 0x3a40}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_145", 0x3a44}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_145", 0x3a44}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_146", 0x3a48}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_146", 0x3a48}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_147", 0x3a4c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_147", 0x3a4c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_148", 0x3a50}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_148", 0x3a50}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_149", 0x3a54}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_149", 0x3a54}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_150", 0x3a58}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_150", 0x3a58}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_151", 0x3a5c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_151", 0x3a5c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_152", 0x3a60}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_152", 0x3a60}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_153", 0x3a64}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_153", 0x3a64}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_154", 0x3a68}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_154", 0x3a68}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_155", 0x3a6c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_155", 0x3a6c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_156", 0x3a70}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_156", 0x3a70}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_157", 0x3a74}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_157", 0x3a74}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_158", 0x3a78}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_158", 0x3a78}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_159", 0x3a7c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_159", 0x3a7c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_160", 0x3a80}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_160", 0x3a80}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_161", 0x3a84}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_161", 0x3a84}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_162", 0x3a88}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_162", 0x3a88}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_163", 0x3a8c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_163", 0x3a8c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_164", 0x3a90}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_164", 0x3a90}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_165", 0x3a94}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_165", 0x3a94}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_166", 0x3a98}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_166", 0x3a98}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_167", 0x3a9c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_167", 0x3a9c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_168", 0x3aa0}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_168", 0x3aa0}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_169", 0x3aa4}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_169", 0x3aa4}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_170", 0x3aa8}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_170", 0x3aa8}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_171", 0x3aac}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_171", 0x3aac}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_172", 0x3ab0}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_172", 0x3ab0}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_173", 0x3ab4}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_173", 0x3ab4}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_174", 0x3ab8}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_174", 0x3ab8}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_175", 0x3abc}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_175", 0x3abc}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_176", 0x3ac0}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_176", 0x3ac0}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_177", 0x3ac4}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_177", 0x3ac4}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_178", 0x3ac8}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_178", 0x3ac8}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_179", 0x3acc}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_179", 0x3acc}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_180", 0x3ad0}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_180", 0x3ad0}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_181", 0x3ad4}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_181", 0x3ad4}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_182", 0x3ad8}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_182", 0x3ad8}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_183", 0x3adc}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_183", 0x3adc}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_184", 0x3ae0}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_184", 0x3ae0}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_185", 0x3ae4}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_185", 0x3ae4}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_186", 0x3ae8}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_186", 0x3ae8}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_187", 0x3aec}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_187", 0x3aec}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_188", 0x3af0}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_188", 0x3af0}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_189", 0x3af4}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_189", 0x3af4}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_190", 0x3af8}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_190", 0x3af8}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_191", 0x3afc}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_191", 0x3afc}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_192", 0x3b00}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_192", 0x3b00}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_193", 0x3b04}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_193", 0x3b04}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_194", 0x3b08}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_194", 0x3b08}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_195", 0x3b0c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_195", 0x3b0c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_196", 0x3b10}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_196", 0x3b10}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_197", 0x3b14}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_197", 0x3b14}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_198", 0x3b18}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_198", 0x3b18}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_199", 0x3b1c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_199", 0x3b1c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_200", 0x3b20}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_200", 0x3b20}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_201", 0x3b24}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_201", 0x3b24}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_202", 0x3b28}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_202", 0x3b28}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_203", 0x3b2c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_203", 0x3b2c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_204", 0x3b30}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_204", 0x3b30}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_205", 0x3b34}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_205", 0x3b34}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_206", 0x3b38}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_206", 0x3b38}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_207", 0x3b3c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_207", 0x3b3c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_208", 0x3b40}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_208", 0x3b40}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_209", 0x3b44}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_209", 0x3b44}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_210", 0x3b48}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_210", 0x3b48}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_211", 0x3b4c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_211", 0x3b4c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_212", 0x3b50}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_212", 0x3b50}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_213", 0x3b54}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_213", 0x3b54}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_214", 0x3b58}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_214", 0x3b58}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_215", 0x3b5c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_215", 0x3b5c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_216", 0x3b60}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_216", 0x3b60}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_217", 0x3b64}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_217", 0x3b64}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_218", 0x3b68}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_218", 0x3b68}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_219", 0x3b6c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_219", 0x3b6c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_220", 0x3b70}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_220", 0x3b70}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_221", 0x3b74}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_221", 0x3b74}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_222", 0x3b78}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_222", 0x3b78}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_223", 0x3b7c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_223", 0x3b7c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_224", 0x3b80}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_224", 0x3b80}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_225", 0x3b84}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_225", 0x3b84}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_226", 0x3b88}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_226", 0x3b88}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_227", 0x3b8c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_227", 0x3b8c}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_228", 0x3b90}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_228", 0x3b90}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/ping_drop_interest_level_229", 0x3b94}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"ESP/ERC/pong_drop_interest_level_229", 0x3b94}}, + {F, {"v0", 0, 6, 0x0}}, + {F, {"v1", 8, 6, 0x0}}, + {F, {"v2", 16, 6, 0x0}}, + {F, {"v3", 24, 6, 0x0}}, + {R, {"CCAM5_IF/MIPI_RX/CORE_CONFIG", 0x10000}}, + {F, {"CORE_ENABLE", 0, 1, 0x1}}, + {F, {"SOFT_RESET", 1, 1, 0x0}}, + {R, {"CCAM5_IF/MIPI_RX/PROTOCOL_CONFIG", 0x10004}}, + {F, {"ACTIVE_LANES", 0, 2, 0x1}}, + {F, {"MAX_LANES", 3, 2, 0x1}}, + {R, {"CCAM5_IF/MIPI_RX/CORE_STAT", 0x10010}}, + {F, {"SOFT_RESET", 0, 1, 0x0}}, + {F, {"STREAM_LINE_BUFFER_FULL", 1, 1, 0x0}}, + {F, {"SHORT_PACKET_FIFO_NOT_EMPTY", 2, 1, 0x0}}, + {F, {"SHORT_PACKET_FIFO_FULL", 3, 1, 0x0}}, + {F, {"PACKET_COUNT", 16, 16, 0x0}}, + {R, {"CCAM5_IF/MIPI_RX/GLOBAL_IRQ_ENABLE", 0x10020}}, + {F, {"", 0, 1, 0x0}}, + {R, {"CCAM5_IF/MIPI_RX/IRQ_STAT", 0x10024}}, + {F, {"VC0_ERR_FRAME_DATA", 0, 1, 0x0}}, + {F, {"VC0_ERR_FRAME_SYNC", 1, 1, 0x0}}, + {F, {"VC1_ERR_FRAME_DATA", 2, 1, 0x0}}, + {F, {"VC1_ERR_FRAME_SYNC", 3, 1, 0x0}}, + {F, {"VC2_ERR_FRAME_DATA", 4, 1, 0x0}}, + {F, {"VC2_ERR_FRAME_SYNC", 5, 1, 0x0}}, + {F, {"VC3_ERR_FRAME_DATA", 6, 1, 0x0}}, + {F, {"VC3_ERR_FRAME_SYNC", 7, 1, 0x0}}, + {F, {"ERR_ID", 8, 1, 0x0}}, + {F, {"ERR_CRC", 9, 1, 0x0}}, + {F, {"ERR_ECC_CORRECTED", 10, 1, 0x0}}, + {F, {"ERR_ECC_DOUBLE", 11, 1, 0x0}}, + {F, {"ERR_SOT_SYNC_HS", 12, 1, 0x0}}, + {F, {"ERR_SOT_HS", 13, 1, 0x0}}, + {F, {"STOP_STATE", 17, 1, 0x0}}, + {F, {"ST_LINE_BUF_FULL", 18, 1, 0x0}}, + {F, {"SHT_PKT_FIFO_N_EMPTY", 19, 1, 0x0}}, + {F, {"SHT_PKT_FIFO_FULL", 20, 1, 0x0}}, + {F, {"LANE_CONFIG_ERR", 21, 1, 0x0}}, + {F, {"WC_CORRUPTION", 22, 1, 0x0}}, + {F, {"RX_SKEWCALHS", 29, 1, 0x0}}, + {F, {"VCX FRAME ERROR", 30, 1, 0x0}}, + {F, {"FRAME_RECEIVED", 31, 1, 0x0}}, + {R, {"CCAM5_IF/MIPI_RX/IRQ_ENABLE", 0x10028}}, + {F, {"VC0_ERR_FRAME_DATA", 0, 1, 0x0}}, + {F, {"VC0_ERR_FRAME_SYNC", 1, 1, 0x0}}, + {F, {"VC1_ERR_FRAME_DATA", 2, 1, 0x0}}, + {F, {"VC1_ERR_FRAME_SYNC", 3, 1, 0x0}}, + {F, {"VC2_ERR_FRAME_DATA", 4, 1, 0x0}}, + {F, {"VC2_ERR_FRAME_SYNC", 5, 1, 0x0}}, + {F, {"VC3_ERR_FRAME_DATA", 6, 1, 0x0}}, + {F, {"VC3_ERR_FRAME_SYNC", 7, 1, 0x0}}, + {F, {"ERR_ID", 8, 1, 0x0}}, + {F, {"ERR_CRC", 9, 1, 0x0}}, + {F, {"ERR_ECC_CORRECTED", 10, 1, 0x0}}, + {F, {"ERR_ECC_DOUBLE", 11, 1, 0x0}}, + {F, {"ERR_SOT_SYNC_HS", 12, 1, 0x0}}, + {F, {"ERR_SOT_HS", 13, 1, 0x0}}, + {F, {"STOP_STATE", 17, 1, 0x0}}, + {F, {"ST_LINE_BUF_FULL", 18, 1, 0x0}}, + {F, {"SHT_PKT_FIFO_N_EMPTY", 19, 1, 0x0}}, + {F, {"SHT_PKT_FIFO_FULL", 20, 1, 0x0}}, + {F, {"LANE_CONFIG_ERR", 21, 1, 0x0}}, + {F, {"WC_CORRUPTION", 22, 1, 0x0}}, + {F, {"RX_SKEWCALHS", 29, 1, 0x0}}, + {F, {"FRAME_RECEIVED", 31, 1, 0x0}}, + {R, {"CCAM5_IF/MIPI_RX/GENERIC_SHT_PKT", 0x10030}}, + {F, {"DATA_TYPE", 0, 6, 0x0}}, + {F, {"VIRTUAL_CHANNEL", 6, 2, 0x0}}, + {F, {"DATA", 8, 16, 0x0}}, + {R, {"CCAM5_IF/MIPI_RX/VCX_FRAME_ERROR", 0x10034}}, + {F, {"FRAME_LEVEL_ERR_VC4", 0, 1, 0x0}}, + {F, {"FRAME_SYNC_ERR_VC4", 1, 1, 0x0}}, + {F, {"FRAME_LEVEL_ERR_VC5", 2, 1, 0x0}}, + {F, {"FRAME_SYNC_ERR_VC5", 3, 1, 0x0}}, + {F, {"FRAME_LEVEL_ERR_VC6", 4, 1, 0x0}}, + {F, {"FRAME_SYNC_ERR_VC6", 5, 1, 0x0}}, + {F, {"FRAME_LEVEL_ERR_VC7", 6, 1, 0x0}}, + {F, {"FRAME_SYNC_ERR_VC7", 7, 1, 0x0}}, + {F, {"FRAME_LEVEL_ERR_VC8", 8, 1, 0x0}}, + {F, {"FRAME_SYNC_ERR_VC8", 9, 1, 0x0}}, + {F, {"FRAME_LEVEL_ERR_VC9", 10, 1, 0x0}}, + {F, {"FRAME_SYNC_ERR_VC9", 11, 1, 0x0}}, + {F, {"FRAME_LEVEL_ERR_VC10", 12, 1, 0x0}}, + {F, {"FRAME_SYNC_ERR_VC10", 13, 1, 0x0}}, + {F, {"FRAME_LEVEL_ERR_VC11", 14, 1, 0x0}}, + {F, {"FRAME_SYNC_ERR_VC11", 15, 1, 0x0}}, + {F, {"FRAME_LEVEL_ERR_VC12", 16, 1, 0x0}}, + {F, {"FRAME_SYNC_ERR_VC12", 17, 1, 0x0}}, + {F, {"FRAME_LEVEL_ERR_VC13", 18, 1, 0x0}}, + {F, {"FRAME_SYNC_ERR_VC13", 19, 1, 0x0}}, + {F, {"FRAME_LEVEL_ERR_VC14", 20, 1, 0x0}}, + {F, {"FRAME_SYNC_ERR_VC14", 21, 1, 0x0}}, + {F, {"FRAME_LEVEL_ERR_VC15", 22, 1, 0x0}}, + {F, {"FRAME_SYNC_ERR_VC15", 23, 1, 0x0}}, + {R, {"CCAM5_IF/MIPI_RX/CLK_LANE_INFO", 0x1003c}}, + {F, {"RESERVED", 0, 1, 0x0}}, + {F, {"STOP_STATE", 1, 1, 0x0}}, + {R, {"CCAM5_IF/MIPI_RX/LANE0_INFO", 0x10040}}, + {F, {"SOT_SYNC_ERR", 0, 1, 0x0}}, + {F, {"SOT_ERR", 1, 1, 0x0}}, + {F, {"STOP_STATE", 5, 1, 0x0}}, + {R, {"CCAM5_IF/MIPI_RX/LANE1_INFO", 0x10044}}, + {F, {"SOT_SYNC_ERR", 0, 1, 0x0}}, + {F, {"SOT_ERR", 1, 1, 0x0}}, + {F, {"STOP_STATE", 5, 1, 0x0}}, + {R, {"CCAM5_IF/MIPI_RX/LANE2_INFO", 0x10048}}, + {F, {"SOT_SYNC_ERR", 0, 1, 0x0}}, + {F, {"SOT_ERR", 1, 1, 0x0}}, + {F, {"STOP_STATE", 5, 1, 0x0}}, + {R, {"CCAM5_IF/MIPI_RX/LANE3_INFO", 0x1004c}}, + {F, {"SOT_SYNC_ERR", 0, 1, 0x0}}, + {F, {"SOT_ERR", 1, 1, 0x0}}, + {F, {"STOP_STATE", 5, 1, 0x0}}, + {R, {"CCAM5_IF/MIPI_RX/VC0_IMAGE_INFO_1", 0x10060}}, + {F, {"BYTE_COUNT", 0, 16, 0x0}}, + {F, {"LINE_COUNT", 16, 16, 0x0}}, + {R, {"CCAM5_IF/MIPI_RX/VC0_IMAGE_INFO_2", 0x10064}}, + {F, {"DATA_TYPE", 0, 6, 0x0}}, + {R, {"CCAM5_IF/MIPI_RX/VC1_IMAGE_INFO_1", 0x10068}}, + {F, {"BYTE_COUNT", 0, 16, 0x0}}, + {F, {"LINE_COUNT", 16, 16, 0x0}}, + {R, {"CCAM5_IF/MIPI_RX/VC1_IMAGE_INFO_2", 0x1006c}}, + {F, {"DATA_TYPE", 0, 6, 0x0}}, + {R, {"CCAM5_IF/MIPI_RX/VC2_IMAGE_INFO_1", 0x10070}}, + {F, {"BYTE_COUNT", 0, 16, 0x0}}, + {F, {"LINE_COUNT", 16, 16, 0x0}}, + {R, {"CCAM5_IF/MIPI_RX/VC2_IMAGE_INFO_2", 0x10074}}, + {F, {"DATA_TYPE", 0, 6, 0x0}}, + {R, {"CCAM5_IF/MIPI_RX/VC3_IMAGE_INFO_1", 0x10078}}, + {F, {"BYTE_COUNT", 0, 16, 0x0}}, + {F, {"LINE_COUNT", 16, 16, 0x0}}, + {R, {"CCAM5_IF/MIPI_RX/VC3_IMAGE_INFO_2", 0x1007c}}, + {F, {"DATA_TYPE", 0, 6, 0x0}}, + {R, {"CCAM5_IF/MIPI_RX/VC4_IMAGE_INFO_1", 0x10080}}, + {F, {"BYTE_COUNT", 0, 16, 0x0}}, + {F, {"LINE_COUNT", 16, 16, 0x0}}, + {R, {"CCAM5_IF/MIPI_RX/VC4_IMAGE_INFO_2", 0x10084}}, + {F, {"DATA_TYPE", 0, 6, 0x0}}, + {R, {"CCAM5_IF/MIPI_RX/VC5_IMAGE_INFO_1", 0x10088}}, + {F, {"BYTE_COUNT", 0, 16, 0x0}}, + {F, {"LINE_COUNT", 16, 16, 0x0}}, + {R, {"CCAM5_IF/MIPI_RX/VC5_IMAGE_INFO_2", 0x1008c}}, + {F, {"DATA_TYPE", 0, 6, 0x0}}, + {R, {"CCAM5_IF/MIPI_RX/VC6_IMAGE_INFO_1", 0x10090}}, + {F, {"BYTE_COUNT", 0, 16, 0x0}}, + {F, {"LINE_COUNT", 16, 16, 0x0}}, + {R, {"CCAM5_IF/MIPI_RX/VC6_IMAGE_INFO_2", 0x10094}}, + {F, {"DATA_TYPE", 0, 6, 0x0}}, + {R, {"CCAM5_IF/MIPI_RX/VC7_IMAGE_INFO_1", 0x10098}}, + {F, {"BYTE_COUNT", 0, 16, 0x0}}, + {F, {"LINE_COUNT", 16, 16, 0x0}}, + {R, {"CCAM5_IF/MIPI_RX/VC7_IMAGE_INFO_2", 0x1009c}}, + {F, {"DATA_TYPE", 0, 6, 0x0}}, + {R, {"CCAM5_IF/MIPI_RX/VC8_IMAGE_INFO_1", 0x100a0}}, + {F, {"BYTE_COUNT", 0, 16, 0x0}}, + {F, {"LINE_COUNT", 16, 16, 0x0}}, + {R, {"CCAM5_IF/MIPI_RX/VC8_IMAGE_INFO_2", 0x100a4}}, + {F, {"DATA_TYPE", 0, 6, 0x0}}, + {R, {"CCAM5_IF/MIPI_RX/VC9_IMAGE_INFO_1", 0x100a8}}, + {F, {"BYTE_COUNT", 0, 16, 0x0}}, + {F, {"LINE_COUNT", 16, 16, 0x0}}, + {R, {"CCAM5_IF/MIPI_RX/VC9_IMAGE_INFO_2", 0x100ac}}, + {F, {"DATA_TYPE", 0, 6, 0x0}}, + {R, {"CCAM5_IF/MIPI_RX/VC10_IMAGE_INFO_1", 0x100b0}}, + {F, {"BYTE_COUNT", 0, 16, 0x0}}, + {F, {"LINE_COUNT", 16, 16, 0x0}}, + {R, {"CCAM5_IF/MIPI_RX/VC10_IMAGE_INFO_2", 0x100b4}}, + {F, {"DATA_TYPE", 0, 6, 0x0}}, + {R, {"CCAM5_IF/MIPI_RX/VC11_IMAGE_INFO_1", 0x100b8}}, + {F, {"BYTE_COUNT", 0, 16, 0x0}}, + {F, {"LINE_COUNT", 16, 16, 0x0}}, + {R, {"CCAM5_IF/MIPI_RX/VC11_IMAGE_INFO_2", 0x100bc}}, + {F, {"DATA_TYPE", 0, 6, 0x0}}, + {R, {"CCAM5_IF/MIPI_RX/VC12_IMAGE_INFO_1", 0x100c0}}, + {F, {"BYTE_COUNT", 0, 16, 0x0}}, + {F, {"LINE_COUNT", 16, 16, 0x0}}, + {R, {"CCAM5_IF/MIPI_RX/VC12_IMAGE_INFO_2", 0x100c4}}, + {F, {"DATA_TYPE", 0, 6, 0x0}}, + {R, {"CCAM5_IF/MIPI_RX/VC13_IMAGE_INFO_1", 0x100c8}}, + {F, {"BYTE_COUNT", 0, 16, 0x0}}, + {F, {"LINE_COUNT", 16, 16, 0x0}}, + {R, {"CCAM5_IF/MIPI_RX/VC13_IMAGE_INFO_2", 0x100cc}}, + {F, {"DATA_TYPE", 0, 6, 0x0}}, + {R, {"CCAM5_IF/MIPI_RX/VC14_IMAGE_INFO_1", 0x100d0}}, + {F, {"BYTE_COUNT", 0, 16, 0x0}}, + {F, {"LINE_COUNT", 16, 16, 0x0}}, + {R, {"CCAM5_IF/MIPI_RX/VC14_IMAGE_INFO_2", 0x100d4}}, + {F, {"DATA_TYPE", 0, 6, 0x0}}, + {R, {"CCAM5_IF/MIPI_RX/VC15_IMAGE_INFO_1", 0x100d8}}, + {F, {"BYTE_COUNT", 0, 16, 0x0}}, + {F, {"LINE_COUNT", 16, 16, 0x0}}, + {R, {"CCAM5_IF/MIPI_RX/VC15_IMAGE_INFO_2", 0x100dc}}, + {F, {"DATA_TYPE", 0, 6, 0x0}}, + {R, {"CCAM5_IF/MIPI_RX/CONTROL", 0x18000}}, + {F, {"SRST", 0, 1, 0x0}}, + {F, {"DPHY_EN", 1, 1, 0x1}}, + {R, {"CCAM5_IF/MIPI_RX/IDELAY_TAP_VALUE", 0x18004}}, + {F, {"LANE_0", 0, 5, 0x0}}, + {F, {"LANE_1", 8, 5, 0x0}}, + {F, {"LANE_2", 16, 5, 0x0}}, + {F, {"LANE_3", 24, 5, 0x0}}, + {R, {"CCAM5_IF/MIPI_RX/INIT", 0x18008}}, + {F, {"INIT_VAL", 0, 32, 0x186a0}}, + {R, {"CCAM5_IF/MIPI_RX/HS_TIMEOUT", 0x18010}}, + {F, {"RX_VALUE", 0, 32, 0x10005}}, + {R, {"CCAM5_IF/MIPI_RX/ESC_TIMEOUT", 0x18014}}, + {F, {"VALUE", 0, 32, 0x6400}}, + {R, {"CCAM5_IF/MIPI_RX/CL_STATUS", 0x18018}}, + {F, {"MODE", 0, 2, 0x0}}, + {F, {"ULPS", 2, 1, 0x0}}, + {F, {"INIT_DONE", 3, 1, 0x0}}, + {F, {"STOP_STATE", 4, 1, 0x0}}, + {F, {"ERR_CONTROL", 5, 1, 0x0}}, + {R, {"CCAM5_IF/MIPI_RX/LANE0_STATUS", 0x1801c}}, + {F, {"MODE", 0, 2, 0x0}}, + {F, {"ULPS", 2, 1, 0x0}}, + {F, {"INIT_DONE", 3, 1, 0x0}}, + {F, {"HS_ABORT", 4, 1, 0x0}}, + {F, {"ESC_ABORT", 5, 1, 0x0}}, + {F, {"STOP_STATE", 6, 1, 0x0}}, + {F, {"PKT_CNT", 16, 16, 0x0}}, + {R, {"CCAM5_IF/MIPI_RX/LANE1_STATUS", 0x18020}}, + {F, {"MODE", 0, 2, 0x0}}, + {F, {"ULPS", 2, 1, 0x0}}, + {F, {"INIT_DONE", 3, 1, 0x0}}, + {F, {"HS_ABORT", 4, 1, 0x0}}, + {F, {"ESC_ABORT", 5, 1, 0x0}}, + {F, {"STOP_STATE", 6, 1, 0x0}}, + {F, {"PKT_CNT", 16, 16, 0x0}}, + {R, {"CCAM5_IF/MIPI_RX/LANE2_STATUS", 0x18024}}, + {F, {"MODE", 0, 2, 0x0}}, + {F, {"ULPS", 2, 1, 0x0}}, + {F, {"INIT_DONE", 3, 1, 0x0}}, + {F, {"HS_ABORT", 4, 1, 0x0}}, + {F, {"ESC_ABORT", 5, 1, 0x0}}, + {F, {"STOP_STATE", 6, 1, 0x0}}, + {F, {"PKT_CNT", 16, 16, 0x0}}, + {R, {"CCAM5_IF/MIPI_RX/LANE3_STATUS", 0x18028}}, + {F, {"MODE", 0, 2, 0x0}}, + {F, {"ULPS", 2, 1, 0x0}}, + {F, {"INIT_DONE", 3, 1, 0x0}}, + {F, {"HS_ABORT", 4, 1, 0x0}}, + {F, {"ESC_ABORT", 5, 1, 0x0}}, + {F, {"STOP_STATE", 6, 1, 0x0}}, + {F, {"PKT_CNT", 16, 16, 0x0}}, + {R, {"CCAM5_IF/MIPI_RX/LANE0_HS_SETTLE", 0x18030}}, + {F, {"HS_SETTLE_NS", 0, 9, 0x8d}}, + {R, {"CCAM5_IF/MIPI_RX/LANE1_HS_SETTLE", 0x18048}}, + {F, {"HS_SETTLE_NS", 0, 9, 0x8d}}, + {R, {"CCAM5_IF/MIPI_RX/LANE2_HS_SETTLE", 0x1804c}}, + {F, {"HS_SETTLE_NS", 0, 9, 0x8d}}, + {R, {"CCAM5_IF/MIPI_RX/LANE3_HS_SETTLE", 0x18050}}, + {F, {"HS_SETTLE_NS", 0, 9, 0x8d}}, + {R, {"CCAM5_IF/MIPI_RX/LANE4_HS_SETTLE", 0x18054}}, + {F, {"HS_SETTLE_NS", 0, 9, 0x0}}, + {R, {"CCAM5_IF/MIPI_RX/LANE5_HS_SETTLE", 0x18058}}, + {F, {"HS_SETTLE_NS", 0, 9, 0x0}}, + {R, {"CCAM5_IF/MIPI_RX/LANE6_HS_SETTLE", 0x1805c}}, + {F, {"HS_SETTLE_NS", 0, 9, 0x0}}, + {R, {"CCAM5_IF/MIPI_RX/LANE7_HS_SETTLE", 0x18060}}, + {F, {"HS_SETTLE_NS", 0, 9, 0x0}}, + {R, {"CCAM5_IF/MIPI_RX/LANE4_STATUS", 0x18064}}, + {F, {"MODE", 0, 2, 0x0}}, + {F, {"ULPS", 2, 1, 0x0}}, + {F, {"INIT_DONE", 3, 1, 0x0}}, + {F, {"HS_ABORT", 4, 1, 0x0}}, + {F, {"ESC_ABORT", 5, 1, 0x0}}, + {F, {"STOP_STATE", 6, 1, 0x0}}, + {F, {"PKT_CNT", 16, 16, 0x0}}, + {R, {"CCAM5_IF/MIPI_RX/LANE5_STATUS", 0x18068}}, + {F, {"MODE", 0, 2, 0x0}}, + {F, {"ULPS", 2, 1, 0x0}}, + {F, {"INIT_DONE", 3, 1, 0x0}}, + {F, {"HS_ABORT", 4, 1, 0x0}}, + {F, {"ESC_ABORT", 5, 1, 0x0}}, + {F, {"STOP_STATE", 6, 1, 0x0}}, + {F, {"PKT_CNT", 16, 16, 0x0}}, + {R, {"CCAM5_IF/MIPI_RX/LANE6_STATUS", 0x1806c}}, + {F, {"MODE", 0, 2, 0x0}}, + {F, {"ULPS", 2, 1, 0x0}}, + {F, {"INIT_DONE", 3, 1, 0x0}}, + {F, {"HS_ABORT", 4, 1, 0x0}}, + {F, {"ESC_ABORT", 5, 1, 0x0}}, + {F, {"STOP_STATE", 6, 1, 0x0}}, + {F, {"PKT_CNT", 16, 16, 0x0}}, + {R, {"CCAM5_IF/MIPI_RX/LANE7_STATUS", 0x18070}}, + {F, {"MODE", 0, 2, 0x0}}, + {F, {"ULPS", 2, 1, 0x0}}, + {F, {"INIT_DONE", 3, 1, 0x0}}, + {F, {"HS_ABORT", 4, 1, 0x0}}, + {F, {"ESC_ABORT", 5, 1, 0x0}}, + {F, {"STOP_STATE", 6, 1, 0x0}}, + {F, {"PKT_CNT", 16, 16, 0x0}}, + {R, {"CCAM5_IF/MIPI_RX/IDELAY_TAP_VALUE_L4_TO_L7", 0x18074}}, + {F, {"LANE_4", 0, 5, 0x0}}, + {F, {"LANE_5", 8, 5, 0x0}}, + {F, {"LANE_6", 16, 5, 0x0}}, + {F, {"LANE_7", 24, 5, 0x0}}, + {R, {"CCAM5_IF/CONTROL/CONTROL", 0x1f000}}, + {F, {"ENABLE", 0, 1, 0x0}}, + {F, {"BYPASS", 1, 1, 0x0}}, + {F, {"LAST_CTRL_MODE", 11, 1, 0x0}}, + {F, {"HALF_WORD_SWAP", 12, 1, 0x0}}, + {F, {"AUX_PRESENCE", 16, 1, 0x0}}, + {F, {"MIPI_RX_PRESENCE", 17, 1, 0x0}}, + {F, {"TD_POL_INV", 20, 1, 0x0}}, + {F, {"EM_POL_INV", 21, 1, 0x0}}, + {F, {"GEN_LAST", 22, 1, 0x0}}, + {F, {"AUX_IN_MODE", 24, 1, 0x0}}, + {F, {"SMART_DROPPER_BYPASS", 28, 1, 0x1}}, + {R, {"CCAM5_IF/CONTROL/TRIGGER", 0x1f004}}, + {F, {"AFIFO_RESET", 0, 1, 0x0}}, + {R, {"CCAM5_IF/CONTROL/TEST_PATTERN_CONTROL", 0x1f008}}, + {F, {"EVT_TYPE", 0, 4, 0x0}}, + {F, {"EVT_FORMAT", 4, 2, 0x2}}, + {A, {"2.0", 2}}, + {A, {"3.0", 3}}, + {F, {"ENABLE", 8, 1, 0x0}}, + {F, {"VECTOR_MODE", 9, 1, 0x0}}, + {R, {"CCAM5_IF/CONTROL/TEST_PATTERN_N_PERIOD", 0x1f00c}}, + {F, {"VALID_RATIO", 0, 10, 0x0}}, + {F, {"LENGTH", 16, 16, 0x0}}, + {R, {"CCAM5_IF/CONTROL/TEST_PATTERN_P_PERIOD", 0x1f010}}, + {F, {"VALID_RATIO", 0, 10, 0x0}}, + {F, {"LENGTH", 16, 16, 0x0}}, + {R, {"CCAM5_IF/CONTROL/TEST_PATTERN_VECTOR", 0x1f014}}, + {F, {"SEED_VALUE", 0, 5, 0x1f}}, + {R, {"CCAM5_IF/CONTROL/OOB_FILTER_CONTROL", 0x1f018}}, + {F, {"ENABLE", 0, 1, 0x0}}, + {R, {"CCAM5_IF/CONTROL/OOB_FILTER_ORIGIN", 0x1f01c}}, + {F, {"Y", 0, 11, 0x0}}, + {F, {"X", 16, 11, 0x0}}, + {R, {"CCAM5_IF/CONTROL/OOB_FILTER_SIZE", 0x1f020}}, + {F, {"HEIGHT", 0, 11, 0x2cf}}, + {F, {"WIDTH", 16, 11, 0x4ff}}, + {R, {"CCAM5_IF/CONTROL/CCAM5_CONTROL", 0x1f024}}, + {F, {"PSU_EN", 0, 1, 0x0}}, + {F, {"RST_N", 1, 1, 0x0}}, + {F, {"BLOCKING_MODE", 2, 1, 0x1}}, + {R, {"CCAM5_IF/CONTROL/TRIGGER_FWD", 0x1f028}}, + {F, {"TRIGGER_ID", 0, 8, 0x0}}, + {F, {"ENABLE", 8, 1, 0x0}}, + {R, {"CCAM5_IF/CONTROL/MIPI_RX_CONTROL", 0x1f02c}}, + {F, {"VIDEO_RESET", 0, 1, 0x0}}, + {R, {"CCAM5_IF/CONTROL/TH_DROP_CNT", 0x1f030}}, + {F, {"VALUE", 0, 32, 0x0}}, + {R, {"CCAM5_IF/CONTROL/TL_DROP_CNT", 0x1f034}}, + {F, {"VALUE", 0, 32, 0x0}}, + {R, {"CCAM5_IF/CONTROL/EVT_DROP_CNT", 0x1f038}}, + {F, {"VALUE", 0, 32, 0x0}}, + {R, {"CCAM5_IF/AUX_IF/IODELAY/CONTROL", 0x1f200}}, + {F, {"READY_FF", 0, 1, 0x0}}, + {R, {"CCAM5_IF/AUX_IF/IODELAY/IODELAY_DEC", 0x1f204}}, + {F, {"DATA", 0, 16, 0x0}}, + {F, {"LAST", 16, 1, 0x0}}, + {F, {"VALID", 17, 1, 0x0}}, + {F, {"READY", 18, 1, 0x0}}, + {F, {"CLK", 19, 1, 0x0}}, + {R, {"CCAM5_IF/AUX_IF/IODELAY/IODELAY_INC", 0x1f208}}, + {F, {"DATA", 0, 16, 0x0}}, + {F, {"LAST", 16, 1, 0x0}}, + {F, {"VALID", 17, 1, 0x0}}, + {F, {"READY", 18, 1, 0x0}}, + {F, {"CLK", 19, 1, 0x0}}, + {R, {"CCAM5_IF/AUX_IF/IODELAY/IODELAY_LOAD", 0x1f20c}}, + {F, {"DATA", 0, 16, 0x0}}, + {F, {"LAST", 16, 1, 0x0}}, + {F, {"VALID", 17, 1, 0x0}}, + {F, {"READY", 18, 1, 0x0}}, + {F, {"CLK", 19, 1, 0x0}}, + {R, {"CCAM5_IF/AUX_IF/IODELAY/IODELAY_SET_VALUE_0", 0x1f210}}, + {F, {"LAST", 0, 5, 0x0}}, + {F, {"VALID", 8, 5, 0x0}}, + {F, {"READY", 16, 5, 0x1}}, + {F, {"CLK", 24, 5, 0x0}}, + {R, {"CCAM5_IF/AUX_IF/IODELAY/IODELAY_SET_VALUE_1", 0x1f214}}, + {F, {"DATA_0", 0, 5, 0x0}}, + {F, {"DATA_1", 8, 5, 0x0}}, + {F, {"DATA_2", 16, 5, 0x0}}, + {F, {"DATA_3", 24, 5, 0x0}}, + {R, {"CCAM5_IF/AUX_IF/IODELAY/IODELAY_SET_VALUE_2", 0x1f218}}, + {F, {"DATA_4", 0, 5, 0x0}}, + {F, {"DATA_5", 8, 5, 0x0}}, + {F, {"DATA_6", 16, 5, 0x0}}, + {F, {"DATA_7", 24, 5, 0x0}}, + {R, {"CCAM5_IF/AUX_IF/IODELAY/IODELAY_SET_VALUE_3", 0x1f21c}}, + {F, {"DATA_8", 0, 5, 0x0}}, + {F, {"DATA_9", 8, 5, 0x0}}, + {F, {"DATA_10", 16, 5, 0x0}}, + {F, {"DATA_11", 24, 5, 0x0}}, + {R, {"CCAM5_IF/AUX_IF/IODELAY/IODELAY_SET_VALUE_4", 0x1f220}}, + {F, {"DATA_12", 0, 5, 0x0}}, + {F, {"DATA_13", 8, 5, 0x0}}, + {F, {"DATA_14", 16, 5, 0x0}}, + {F, {"DATA_15", 24, 5, 0x0}}, + {R, {"CCAM5_IF/AUX_IF/IODELAY/IODELAY_GET_VALUE_0", 0x1f224}}, + {F, {"LAST", 0, 5, 0x0}}, + {F, {"VALID", 8, 5, 0x0}}, + {F, {"READY", 16, 5, 0x1}}, + {F, {"CLK", 24, 5, 0x0}}, + {R, {"CCAM5_IF/AUX_IF/IODELAY/IODELAY_GET_VALUE_1", 0x1f228}}, + {F, {"DATA_0", 0, 5, 0x0}}, + {F, {"DATA_1", 8, 5, 0x0}}, + {F, {"DATA_2", 16, 5, 0x0}}, + {F, {"DATA_3", 24, 5, 0x0}}, + {R, {"CCAM5_IF/AUX_IF/IODELAY/IODELAY_GET_VALUE_2", 0x1f22c}}, + {F, {"DATA_4", 0, 5, 0x0}}, + {F, {"DATA_5", 8, 5, 0x0}}, + {F, {"DATA_6", 16, 5, 0x0}}, + {F, {"DATA_7", 24, 5, 0x0}}, + {R, {"CCAM5_IF/AUX_IF/IODELAY/IODELAY_GET_VALUE_3", 0x1f230}}, + {F, {"DATA_8", 0, 5, 0x0}}, + {F, {"DATA_9", 8, 5, 0x0}}, + {F, {"DATA_10", 16, 5, 0x0}}, + {F, {"DATA_11", 24, 5, 0x0}}, + {R, {"CCAM5_IF/AUX_IF/IODELAY/IODELAY_GET_VALUE_4", 0x1f234}}, + {F, {"DATA_12", 0, 5, 0x0}}, + {F, {"DATA_13", 8, 5, 0x0}}, + {F, {"DATA_14", 16, 5, 0x0}}, + {F, {"DATA_15", 24, 5, 0x0}}, + {R, {"CCAM5_IF/AUX_IF/IODELAY/SAMPLE_CLK_EDGE", 0x1f238}}, + {F, {"DATA", 0, 16, 0x0}}, + {F, {"LAST", 16, 1, 0x0}}, + {F, {"VALID", 17, 1, 0x0}}, + {R, {"CCAM5_IF/VIP/CONTROL", 0x1f300}}, + {F, {"ENABLE", 0, 1, 0x0}}, + {F, {"RESET", 1, 1, 0x0}}, + {F, {"MODE", 2, 1, 0x0}}, + {F, {"STATUS", 3, 1, 0x0}}, + {F, {"DATA_STATUS", 4, 16, 0x0}}, + {R, {"CCAM5_IF/VIP/READY_N", 0x1f304}}, + {F, {"PERIOD", 0, 16, 0x0}}, + {F, {"VALID", 16, 16, 0x0}}, + {R, {"CCAM5_IF/VIP/READY_P", 0x1f308}}, + {F, {"PERIOD", 0, 16, 0x0}}, + {F, {"VALID", 16, 16, 0x0}}, + {R, {"CCAM5_IF/VIP/DEBUG", 0x1f30c}}, + {F, {"INPUT_COUNTER", 0, 32, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_CONTROL/ATIS_CONTROL", 0x20000}}, + {F, {"EN_VDDA", 0, 1, 0x0}}, + {F, {"EN_VDDC", 1, 1, 0x0}}, + {F, {"EN_VDDD", 2, 1, 0x0}}, + {F, {"SENSOR_SOFT_RESET", 3, 1, 0x1}}, + {F, {"IN_EVT_NO_BLOCKING_MODE", 4, 1, 0x1}}, + {F, {"SISLEY_HVGA_REMAP_BYPASS", 8, 1, 0x1}}, + {F, {"MASTER_MODE", 12, 1, 0x0}}, + {F, {"USE_EXT_START", 14, 1, 0x0}}, + {F, {"SENSOR_TB_IOBUF_EN_N", 15, 1, 0x1}}, + {F, {"SENSOR_TB_PE_RST_N", 16, 1, 0x1}}, + {F, {"TD_RSTN", 18, 1, 0x1}}, + {F, {"EM_RSTN", 19, 1, 0x1}}, + {F, {"EN_EXT_CTRL_RSTB", 20, 1, 0x0}}, + {F, {"FLIP_X_EN", 21, 1, 0x0}}, + {F, {"FLIP_Y_EN", 22, 1, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_CONTROL/BOARD_CONTROL_STATUS", 0x20004}}, + {F, {"VERSION", 0, 2, 0x1}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_CONTROL/CCAM2_CONTROL", 0x20008}}, + {F, {"HOST_IF_ENABLE", 8, 1, 0x0}}, + {F, {"STEREO_MERGE_ENABLE", 9, 1, 0x0}}, + {F, {"ENABLE_OUT_OF_FOV", 11, 1, 0x0}}, + {F, {"TH_RECOVERY_BYPASS", 12, 1, 0x0}}, + {F, {"CCAM_ID", 13, 1, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_CONTROL/CCAM2_TRIGGER", 0x2000c}}, + {F, {"SOFT_RESET", 0, 1, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_CONTROL/OUT_OF_FOV_FILTER_SIZE", 0x20010}}, + {F, {"WIDTH", 0, 11, 0x280}}, + {F, {"VALUE", 16, 11, 0x1e0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_CONTROL/OUT_OF_FOV_FILTER_ORIGIN", 0x20014}}, + {F, {"X", 0, 11, 0x280}}, + {F, {"Y", 16, 11, 0x1e0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_CONTROL/EVT_RATE_CONTROL", 0x20018}}, + {F, {"ENABLE", 0, 1, 0x0}}, + {F, {"T_DROP_FACTOR", 16, 16, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_CONTROL/DATA_INTEGRITY_MARKER_CONTROL", 0x2001c}}, + {F, {"BYPASS", 0, 1, 0x1}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_CONTROL/DATA_INTEGRITY_MARKER_NBBYTES", 0x20020}}, + {F, {"VALUE", 0, 32, 0x8000}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/TEMP", 0x20040}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VCC_INT", 0x20042}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VCC_AUX", 0x20044}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VP_VN", 0x20046}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VREFP", 0x20048}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VREFN", 0x2004a}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VCC_BRAM", 0x2004c}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/SUPPLY_OFFSET", 0x20050}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/OFFSET", 0x20052}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/GAIN_ERROR", 0x20054}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VAUX0", 0x20060}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VAUX1", 0x20062}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VAUX2", 0x20064}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VAUX3", 0x20066}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VAUX4", 0x20068}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VAUX5", 0x2006a}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VAUX6", 0x2006c}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VAUX7", 0x2006e}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VAUX8", 0x20070}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VAUX9", 0x20072}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VAUX10", 0x20074}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VAUX11", 0x20076}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VAUX12", 0x20078}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VAUX13", 0x2007a}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VAUX14", 0x2007c}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VAUX15", 0x2007e}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/MAX_TEMP", 0x20080}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/MAX_VCC_INT", 0x20082}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/MAX_VCC_AUX", 0x20084}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/MAX_VCC_BRAM", 0x20086}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/MIN_TEMP", 0x20088}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/MIN_VCC_INT", 0x2008a}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/MIN_VCC_AUX", 0x2008c}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/MIN_VCC_BRAM", 0x2008e}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/FLAGS", 0x200be}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/CONF_REG0", 0x200c0}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/CONF_REG1", 0x200c2}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/CONF_REG2", 0x200c4}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/SEQ_REG0", 0x200d0}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/SEQ_REG1", 0x200d2}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/SEQ_REG2", 0x200d4}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/SEQ_REG3", 0x200d6}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/SEQ_REG4", 0x200d8}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/SEQ_REG5", 0x200da}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/SEQ_REG6", 0x200dc}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/SEQ_REG7", 0x200de}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/ALARM_THR_REG0", 0x200e0}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/ALARM_THR_REG1", 0x200e2}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/ALARM_THR_REG2", 0x200e4}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/ALARM_THR_REG3", 0x200e6}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/ALARM_THR_REG4", 0x200e8}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/ALARM_THR_REG5", 0x200ea}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/ALARM_THR_REG6", 0x200ec}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/ALARM_THR_REG7", 0x200ee}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/ALARM_THR_REG8", 0x200f0}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/ALARM_THR_REG9", 0x200f2}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/ALARM_THR_REG10", 0x200f4}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/ALARM_THR_REG11", 0x200f6}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/ALARM_THR_REG12", 0x200f8}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/ALARM_THR_REG13", 0x200fa}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/ALARM_THR_REG14", 0x200fc}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/ALARM_THR_REG15", 0x200fe}}, + {F, {"VALUE", 0, 16, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/TEMP_VCC_MONITOR/EVT_ENABLE", 0x20140}}, + {F, {"ALL_EVT", 0, 1, 0x0}}, + {F, {"TEMP_EVT", 1, 1, 0x0}}, + {F, {"VCC_INT_EVT", 2, 1, 0x0}}, + {F, {"VCC_AUX_EVT", 3, 1, 0x0}}, + {F, {"VCC_BRAM_EVT", 4, 1, 0x0}}, + {F, {"ALL_ALARM", 8, 1, 0x0}}, + {F, {"OVER_TEMP_ALARM", 9, 1, 0x0}}, + {F, {"USER_TEMP_ALARM", 10, 1, 0x0}}, + {F, {"VCC_INT_ALARM", 11, 1, 0x0}}, + {F, {"VCC_AUX_ALARM", 12, 1, 0x0}}, + {F, {"VCC_BRAM_ALARM", 13, 1, 0x0}}, + {F, {"SYSTEM_POWER_DOWN", 16, 1, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/TEMP_VCC_MONITOR/EVT_PERIOD", 0x20144}}, + {F, {"VALUE", 0, 24, 0x186a0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/TEMP_VCC_MONITOR/EXT_TEMP_CONTROL", 0x20148}}, + {F, {"STATUS_SYS_POWER_DOWN", 0, 1, 0x0}}, + {F, {"EXT_TEMP_MONITOR_EN", 1, 1, 0x0}}, + {F, {"EXT_TEMP_MONITOR_SPI_EN", 2, 1, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/TEMP_VCC_MONITOR/EVK_EXT_TEMP_VALUE", 0x2014c}}, + {F, {"VALUE", 0, 22, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/ATIS_IF_MONITOR/CFG_ENABLE", 0x20180}}, + {F, {"ALL_EVT", 0, 1, 0x0}}, + {F, {"TD_IDLE_TIME_EVT", 1, 1, 0x0}}, + {F, {"TD_IDLE_TIMEOUT_EVT", 2, 1, 0x0}}, + {F, {"APS_IDLE_TIME_EVT", 3, 1, 0x0}}, + {F, {"APS_IDLE_TIMEOUT_EVT", 4, 1, 0x0}}, + {F, {"GLOBAL_ILLUMINATION_EVT", 5, 1, 0x0}}, + {F, {"EM_TRIGGER_SEQ_EVT", 6, 1, 0x0}}, + {F, {"REFRACTORY_CLOCK_EVT", 7, 1, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/ATIS_IF_MONITOR/CFG_IDLE_TIME_THR", 0x20184}}, + {F, {"VALUE", 0, 26, 0x2710}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/ATIS_IF_MONITOR/CFG_IDLE_TIMEOUT_THR", 0x20188}}, + {F, {"VALUE", 0, 26, 0x2710}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/ATIS_IF_MONITOR/STAT_GLOBAL_ILLUMINATION", 0x2018c}}, + {F, {"DATA", 0, 26, 0x0}}, + {F, {"VALID", 31, 1, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/ATIS_IF_MONITOR/STAT_REFRACTORY_CLOCK", 0x20190}}, + {F, {"DATA", 0, 24, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/EXT_TRIGGERS/ENABLE", 0x201a0}}, + {F, {"TRIGGER_0", 0, 1, 0x0}}, + {F, {"TRIGGER_1", 1, 1, 0x0}}, + {F, {"TRIGGER_2", 2, 1, 0x0}}, + {F, {"TRIGGER_3", 3, 1, 0x0}}, + {F, {"TRIGGER_4", 4, 1, 0x0}}, + {F, {"TRIGGER_5", 5, 1, 0x0}}, + {F, {"TRIGGER_6", 6, 1, 0x0}}, + {F, {"TRIGGER_7", 7, 1, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/EXT_TRIGGERS/OUT_ENABLE", 0x201a4}}, + {F, {"VALUE", 0, 1, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/EXT_TRIGGERS/OUT_PULSE_PERIOD", 0x201a8}}, + {F, {"", 0, 32, 0x64}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/EXT_TRIGGERS/OUT_PULSE_WIDTH", 0x201ac}}, + {F, {"", 0, 32, 0x1}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_MONITOR/EXT_TRIGGERS/OUT_REGISTER_MODE", 0x201b0}}, + {F, {"ENABLE", 0, 1, 0x0}}, + {F, {"VALUE", 1, 1, 0x0}}, + {R, {"CCAM5_IF/CCAM5/GEN31/global_ctrl", 0x20200}}, + {F, {"td_couple_ctrl", 0, 1, 0x0}}, + {F, {"sw_global_en", 1, 1, 0x0}}, + {F, {"bypass_digital_readout_ctrl", 2, 1, 0x0}}, + {F, {"bgen_rstn", 3, 1, 0x0}}, + {F, {"bgen_en", 4, 1, 0x0}}, + {R, {"CCAM5_IF/CCAM5/GEN31/roi_ctrl", 0x20204}}, + {F, {"roi_em_en", 0, 1, 0x1}}, + {F, {"roi_td_en", 1, 1, 0x1}}, + {F, {"roi_td_rstn", 3, 1, 0x1}}, + {F, {"roi_em_shadow_trigger", 4, 1, 0x0}}, + {F, {"roi_td_shadow_trigger", 5, 1, 0x0}}, + {F, {"roi_em_scan_en", 7, 1, 0x0}}, + {F, {"roi_td_scan_en", 8, 1, 0x0}}, + {R, {"CCAM5_IF/CCAM5/GEN31/readout_ctrl", 0x20208}}, + {F, {"ro_delay_rstn", 0, 1, 0x1}}, + {F, {"ro_interface_x_rstn", 1, 1, 0x1}}, + {F, {"ro_latch_y_rstn", 2, 1, 0x1}}, + {F, {"ro_ack_array_rstn", 3, 1, 0x1}}, + {F, {"ro_ctrl_rstn", 4, 1, 0x1}}, + {F, {"ro_latch_dum_connect_ctrl", 5, 1, 0x1}}, + {F, {"ro_latch_dum_rstn", 6, 1, 0x1}}, + {F, {"ro_pixel_dum_rstn", 7, 1, 0x1}}, + {F, {"ro_interface_y_rstn", 8, 1, 0x1}}, + {F, {"ro_latch_x_rstn", 9, 1, 0x1}}, + {F, {"ro_stat_x_ctrl", 10, 1, 0x0}}, + {F, {"ro_act_pux_ctrl", 11, 3, 0x1}}, + {F, {"ro_stat_y_ctrl", 14, 1, 0x0}}, + {F, {"ro_pipeline_ctrl", 16, 1, 0x0}}, + {F, {"ro_act_pdy_ctrl", 17, 3, 0x0}}, + {F, {"ro_act_pdx_ctrl", 20, 3, 0x0}}, + {F, {"ro_ack_y_ctrl", 23, 1, 0x0}}, + {F, {"ro_td_inv_req_ctrl", 26, 1, 0x0}}, + {F, {"ro_td_inv_pol_ctrl", 27, 1, 0x0}}, + {F, {"ro_td_inv_ack_ctrl", 28, 1, 0x0}}, + {F, {"ro_act_puy_ctrl", 29, 3, 0x2}}, + {R, {"CCAM5_IF/CCAM5/GEN31/test_bus_ctrl", 0x2020c}}, + {F, {"tp_sel_test_photodiode", 0, 1, 0x0}}, + {F, {"tp_diode", 1, 1, 0x0}}, + {F, {"tp_diode_tl", 2, 1, 0x0}}, + {F, {"tp_diode_tr", 3, 1, 0x0}}, + {F, {"tp_diode_br", 4, 1, 0x0}}, + {F, {"tp_diode_bl", 5, 1, 0x0}}, + {F, {"tp_photodiode_en", 6, 1, 0x1}}, + {F, {"tp_en", 7, 1, 0x0}}, + {F, {"tbus_sel_tpa1", 8, 4, 0x0}}, + {F, {"tbus_sel_tpa2", 12, 4, 0x0}}, + {F, {"tbus_sel_tpa3", 16, 4, 0x0}}, + {F, {"tbus_sel_tpa4", 20, 4, 0x0}}, + {F, {"tbus_sel_tpd1", 24, 4, 0x0}}, + {A, {"TD_FIFO_FULL", 0}}, + {A, {"SPI_ERROR", 5}}, + {A, {"ARB_VLD", 1}}, + {A, {"OOR_VLD", 3}}, + {A, {"ICN_REQ_X", 2}}, + {A, {"EVT_PERIOD", 4}}, + {F, {"tbus_sel_tpd2", 28, 4, 0x0}}, + {A, {"ARB_SEL", 5}}, + {A, {"ARB_RDY", 1}}, + {A, {"EM_FIFO_FULL", 0}}, + {A, {"ICN_REQ_Y", 2}}, + {A, {"OOR_TYP", 3}}, + {R, {"CCAM5_IF/CCAM5/GEN31/clk_sync_ctrl", 0x20210}}, + {F, {"clk_diff_hi_cm_ctrl", 1, 1, 0x1}}, + {F, {"clk_diff_iout_x2_ctrl", 2, 1, 0x1}}, + {F, {"clk_dc_up_ctrl", 3, 1, 0x0}}, + {R, {"CCAM5_IF/CCAM5/GEN31/lifo_ctrl", 0x20214}}, + {F, {"lifo_counter", 0, 26, 0x0}}, + {F, {"lifo_counter_valid", 29, 1, 0x0}}, + {F, {"lifo_cnt_en", 30, 1, 0x0}}, + {F, {"lifo_en", 31, 1, 0x0}}, + {R, {"CCAM5_IF/CCAM5/GEN31/chip_id", 0x20218}}, + {F, {"chip_id", 0, 32, 0x90200c03}}, + {R, {"CCAM5_IF/CCAM5/GEN31/spare_ctrl", 0x2021c}}, + {F, {"spare0", 0, 1, 0x0}}, + {F, {"spare1", 1, 1, 0x0}}, + {F, {"spare2", 2, 1, 0x0}}, + {F, {"spare3", 3, 1, 0x0}}, + {F, {"spare7downto4", 4, 4, 0x0}}, + {F, {"em_shutter", 8, 1, 0x0}}, + {F, {"spare21downto9", 9, 13, 0x0}}, + {F, {"rfeed_d_ctrl", 22, 1, 0x0}}, + {F, {"rfeed_a_ctrl", 23, 1, 0x0}}, + {F, {"tp_refr_clk_en", 24, 1, 0x0}}, + {F, {"tp_dark_en", 25, 1, 0x0}}, + {F, {"tp_qe_en", 26, 1, 0x0}}, + {F, {"spare27", 27, 1, 0x0}}, + {F, {"ro_top_act_pu_en", 28, 1, 0x0}}, + {F, {"spares31downto29", 29, 3, 0x0}}, + {R, {"CCAM5_IF/CCAM5/GEN31/oor_ctrl", 0x20220}}, + {F, {"oor_en", 0, 1, 0x0}}, + {F, {"oor_rm_td", 1, 1, 0x0}}, + {F, {"oor_rm_em", 2, 1, 0x0}}, + {R, {"CCAM5_IF/CCAM5/GEN31/td_oor_cnt", 0x20224}}, + {F, {"td_oor_cnt", 0, 32, 0x0}}, + {R, {"CCAM5_IF/CCAM5/GEN31/em_oor_cnt", 0x20228}}, + {F, {"em_oor_cnt", 0, 32, 0x0}}, + {R, {"CCAM5_IF/CCAM5/GEN31/td_oor_addr", 0x2022c}}, + {F, {"td_oor_addr_x", 0, 10, 0x0}}, + {F, {"td_oor_addr_y", 10, 9, 0x0}}, + {F, {"td_oor_addr_p", 19, 1, 0x0}}, + {R, {"CCAM5_IF/CCAM5/GEN31/em_oor_addr", 0x20230}}, + {F, {"em_oor_addr_x", 0, 10, 0x0}}, + {F, {"em_oor_addr_y", 10, 9, 0x0}}, + {F, {"em_oor_addr_p", 19, 1, 0x0}}, + {R, {"CCAM5_IF/CCAM5/GEN31/acr_ctrl", 0x20234}}, + {F, {"acr_en", 0, 1, 0x1}}, + {F, {"version_override", 1, 1, 0x0}}, + {F, {"version_id", 2, 1, 0x0}}, + {A, {"FORCED_VERSION_IS_TD", 0}}, + {A, {"FORCED_VERSION_IS_ATIS", 1}}, + {R, {"CCAM5_IF/CCAM5/GEN31/clk_out_ctrl", 0x20238}}, + {F, {"clk_out_en", 0, 1, 0x0}}, + {F, {"clk_gate_bypass", 1, 1, 0x0}}, + {F, {"clk_out_pol", 2, 1, 0x0}}, + {F, {"clk_timeout", 3, 8, 0x0}}, + {R, {"CCAM5_IF/CCAM5/GEN31/stst_ctrl", 0x2023c}}, + {F, {"stst_en", 0, 2, 0x0}}, + {A, {"STST_RAND", 3}}, + {A, {"STST_INCR", 2}}, + {A, {"STST_DISABLE", 0}}, + {A, {"STST_LFSR", 1}}, + {F, {"stst_div_factor", 2, 10, 0x0}}, + {R, {"CCAM5_IF/CCAM5/GEN31/rob_ctrl", 0x20240}}, + {F, {"ro_dual_ctrl", 0, 1, 0x0}}, + {F, {"ro_test_mode_ctrl", 1, 1, 0x0}}, + {F, {"ro_test_mode_sel_ctrl", 2, 1, 0x0}}, + {F, {"ro_addr_y_stat_crtl", 3, 1, 0x0}}, + {F, {"ro_addr_x_stat_crtl", 4, 1, 0x0}}, + {F, {"ro_stat_req_x_ctrl", 5, 1, 0x0}}, + {F, {"ro_stat_pol_ctrl", 6, 1, 0x0}}, + {F, {"ro_td_req_lat_ctrl", 7, 3, 0x2}}, + {F, {"ro_td_ack_lat_ctrl", 10, 3, 0x1}}, + {F, {"ro_em_addr_y_stat_ctrl", 13, 1, 0x0}}, + {F, {"ro_em_addr_x_stat_ctrl", 14, 1, 0x0}}, + {F, {"ro_em_stat_req_x_ctrl", 15, 1, 0x0}}, + {F, {"ro_em_stat_pol_ctrl", 16, 1, 0x0}}, + {F, {"ro_em_req_lat_ctrl", 17, 3, 0x2}}, + {F, {"ro_em_ack_lat_ctrl", 20, 3, 0x1}}, + {R, {"CCAM5_IF/CCAM5/GEN31/roe_ctrl", 0x20244}}, + {F, {"ro_em_delay_rstn", 0, 1, 0x1}}, + {F, {"ro_em_interface_x_rstn", 1, 1, 0x1}}, + {F, {"ro_em_latch_y_rstn", 2, 1, 0x1}}, + {F, {"ro_em_ack_array_rstn", 3, 1, 0x1}}, + {F, {"ro_em_ctrl_rstn", 4, 1, 0x1}}, + {F, {"ro_em_latch_connect_to", 5, 1, 0x1}}, + {F, {"ro_em_latch_dum_rstn", 6, 1, 0x1}}, + {F, {"ro_em_pixel_dum_rstn", 7, 1, 0x1}}, + {F, {"ro_em_interface_y_rstn", 8, 1, 0x1}}, + {F, {"ro_em_latch_x_rstn", 9, 1, 0x1}}, + {F, {"ro_em_stat_x_ctrl", 10, 1, 0x0}}, + {F, {"ro_em_act_pux_ctrl", 11, 3, 0x0}}, + {F, {"ro_em_stat_y_ctrl", 14, 1, 0x0}}, + {F, {"ro_em_pipeline_ctrl", 16, 1, 0x0}}, + {F, {"ro_em_act_pdy_ctrl", 17, 3, 0x0}}, + {F, {"ro_em_act_pdx_ctrl", 20, 3, 0x0}}, + {F, {"ro_em_ack_y_ctrl", 23, 1, 0x0}}, + {F, {"ro_em_inv_req_ctrl", 26, 1, 0x0}}, + {F, {"ro_em_inv_pol_ctrl", 27, 1, 0x0}}, + {F, {"ro_em_inv_ack_ctrl", 28, 1, 0x0}}, + {F, {"ro_em_act_puy_ctrl", 29, 3, 0x2}}, + {R, {"CCAM5_IF/CCAM5/GEN31/nfl_ctrl", 0x20248}}, + {F, {"nfl_en", 0, 1, 0x0}}, + {F, {"pre_cnt_thresh", 1, 7, 0x64}}, + {R, {"CCAM5_IF/CCAM5/GEN31/nfl_thresh", 0x2024c}}, + {F, {"evt_thresh", 0, 14, 0x32}}, + {F, {"period_cnt_thresh", 14, 10, 0x64}}, + {R, {"CCAM5_IF/CCAM5/GEN31/nfl_cnt", 0x20250}}, + {F, {"evt_thresh", 0, 14, 0x0}}, + {R, {"CCAM5_IF/CCAM5/GEN31/bgen_00", 0x20300}}, + {F, {"bias_vdac_val", 0, 8, 0x7f}}, + {F, {"bias_idac_val", 8, 13, 0x3e1}}, + {F, {"bias_internal_buffer", 21, 6, 0x8}}, + {F, {"bias_type", 27, 1, 0x1}}, + {F, {"bias_mode", 28, 1, 0x0}}, + {F, {"bias_polarity", 29, 1, 0x0}}, + {F, {"bias_enable", 30, 1, 0x1}}, + {F, {"bias_pad_enable", 31, 1, 0x0}}, + {R, {"CCAM5_IF/CCAM5/GEN31/bgen_01", 0x20304}}, + {F, {"bias_vdac_val", 0, 8, 0x7f}}, + {F, {"bias_idac_val", 8, 13, 0x3e1}}, + {F, {"bias_internal_buffer", 21, 6, 0x8}}, + {F, {"bias_type", 27, 1, 0x1}}, + {F, {"bias_mode", 28, 1, 0x0}}, + {F, {"bias_polarity", 29, 1, 0x0}}, + {F, {"bias_enable", 30, 1, 0x1}}, + {F, {"bias_pad_enable", 31, 1, 0x0}}, + {R, {"CCAM5_IF/CCAM5/GEN31/bgen_02", 0x20308}}, + {F, {"bias_vdac_val", 0, 8, 0x9b}}, + {F, {"bias_idac_val", 8, 13, 0x62}}, + {F, {"bias_internal_buffer", 21, 6, 0x8}}, + {F, {"bias_type", 27, 1, 0x1}}, + {F, {"bias_mode", 28, 1, 0x0}}, + {F, {"bias_polarity", 29, 1, 0x0}}, + {F, {"bias_enable", 30, 1, 0x1}}, + {F, {"bias_pad_enable", 31, 1, 0x0}}, + {R, {"CCAM5_IF/CCAM5/GEN31/bgen_03", 0x2030c}}, + {F, {"bias_vdac_val", 0, 8, 0xaa}}, + {F, {"bias_idac_val", 8, 13, 0x1b}}, + {F, {"bias_internal_buffer", 21, 6, 0x8}}, + {F, {"bias_type", 27, 1, 0x1}}, + {F, {"bias_mode", 28, 1, 0x0}}, + {F, {"bias_polarity", 29, 1, 0x0}}, + {F, {"bias_enable", 30, 1, 0x1}}, + {F, {"bias_pad_enable", 31, 1, 0x0}}, + {R, {"CCAM5_IF/CCAM5/GEN31/bgen_04", 0x20310}}, + {F, {"bias_vdac_val", 0, 8, 0x8d}}, + {F, {"bias_idac_val", 8, 13, 0x14d}}, + {F, {"bias_internal_buffer", 21, 6, 0x8}}, + {F, {"bias_type", 27, 1, 0x1}}, + {F, {"bias_mode", 28, 1, 0x0}}, + {F, {"bias_polarity", 29, 1, 0x0}}, + {F, {"bias_enable", 30, 1, 0x1}}, + {F, {"bias_pad_enable", 31, 1, 0x0}}, + {R, {"CCAM5_IF/CCAM5/GEN31/bgen_05", 0x20314}}, + {F, {"bias_vdac_val", 0, 8, 0x71}}, + {F, {"bias_idac_val", 8, 13, 0xdb7}}, + {F, {"bias_internal_buffer", 21, 6, 0x8}}, + {F, {"bias_type", 27, 1, 0x1}}, + {F, {"bias_mode", 28, 1, 0x0}}, + {F, {"bias_polarity", 29, 1, 0x1}}, + {F, {"bias_enable", 30, 1, 0x1}}, + {F, {"bias_pad_enable", 31, 1, 0x0}}, + {R, {"CCAM5_IF/CCAM5/GEN31/bgen_06", 0x20318}}, + {F, {"bias_vdac_val", 0, 8, 0x8d}}, + {F, {"bias_idac_val", 8, 13, 0x14d}}, + {F, {"bias_internal_buffer", 21, 6, 0x8}}, + {F, {"bias_type", 27, 1, 0x1}}, + {F, {"bias_mode", 28, 1, 0x0}}, + {F, {"bias_polarity", 29, 1, 0x0}}, + {F, {"bias_enable", 30, 1, 0x1}}, + {F, {"bias_pad_enable", 31, 1, 0x0}}, + {R, {"CCAM5_IF/CCAM5/GEN31/bgen_07", 0x2031c}}, + {F, {"bias_vdac_val", 0, 8, 0x8d}}, + {F, {"bias_idac_val", 8, 13, 0x14d}}, + {F, {"bias_internal_buffer", 21, 6, 0x8}}, + {F, {"bias_type", 27, 1, 0x1}}, + {F, {"bias_mode", 28, 1, 0x0}}, + {F, {"bias_polarity", 29, 1, 0x0}}, + {F, {"bias_enable", 30, 1, 0x1}}, + {F, {"bias_pad_enable", 31, 1, 0x0}}, + {R, {"CCAM5_IF/CCAM5/GEN31/bgen_08", 0x20320}}, + {F, {"bias_vdac_val", 0, 8, 0x3f}}, + {F, {"bias_idac_val", 8, 13, 0x2c}}, + {F, {"bias_internal_buffer", 21, 6, 0x8}}, + {F, {"bias_type", 27, 1, 0x1}}, + {F, {"bias_mode", 28, 1, 0x0}}, + {F, {"bias_polarity", 29, 1, 0x1}}, + {F, {"bias_enable", 30, 1, 0x1}}, + {F, {"bias_pad_enable", 31, 1, 0x0}}, + {R, {"CCAM5_IF/CCAM5/GEN31/bgen_09", 0x20324}}, + {F, {"bias_vdac_val", 0, 8, 0x37}}, + {F, {"bias_idac_val", 8, 13, 0x54}}, + {F, {"bias_internal_buffer", 21, 6, 0x8}}, + {F, {"bias_type", 27, 1, 0x1}}, + {F, {"bias_mode", 28, 1, 0x0}}, + {F, {"bias_polarity", 29, 1, 0x1}}, + {F, {"bias_enable", 30, 1, 0x1}}, + {F, {"bias_pad_enable", 31, 1, 0x0}}, + {R, {"CCAM5_IF/CCAM5/GEN31/bgen_10", 0x20328}}, + {F, {"bias_vdac_val", 0, 8, 0xb8}}, + {F, {"bias_idac_val", 8, 13, 0x166c}}, + {F, {"bias_internal_buffer", 21, 6, 0x8}}, + {F, {"bias_type", 27, 1, 0x1}}, + {F, {"bias_mode", 28, 1, 0x1}}, + {F, {"bias_polarity", 29, 1, 0x0}}, + {F, {"bias_enable", 30, 1, 0x1}}, + {F, {"bias_pad_enable", 31, 1, 0x0}}, + {R, {"CCAM5_IF/CCAM5/GEN31/bgen_11", 0x2032c}}, + {F, {"bias_vdac_val", 0, 8, 0x0}}, + {F, {"bias_idac_val", 8, 13, 0x0}}, + {F, {"bias_internal_buffer", 21, 6, 0x8}}, + {F, {"bias_type", 27, 1, 0x1}}, + {F, {"bias_mode", 28, 1, 0x1}}, + {F, {"bias_polarity", 29, 1, 0x1}}, + {F, {"bias_enable", 30, 1, 0x1}}, + {F, {"bias_pad_enable", 31, 1, 0x0}}, + {R, {"CCAM5_IF/CCAM5/GEN31/bgen_12", 0x20330}}, + {F, {"bias_vdac_val", 0, 8, 0xf8}}, + {F, {"bias_idac_val", 8, 13, 0x0}}, + {F, {"bias_internal_buffer", 21, 6, 0x8}}, + {F, {"bias_type", 27, 1, 0x1}}, + {F, {"bias_mode", 28, 1, 0x1}}, + {F, {"bias_polarity", 29, 1, 0x0}}, + {F, {"bias_enable", 30, 1, 0x1}}, + {F, {"bias_pad_enable", 31, 1, 0x0}}, + {R, {"CCAM5_IF/CCAM5/GEN31/bgen_13", 0x20334}}, + {F, {"bias_vdac_val", 0, 8, 0x2a}}, + {F, {"bias_idac_val", 8, 13, 0x2ce}}, + {F, {"bias_internal_buffer", 21, 6, 0x8}}, + {F, {"bias_type", 27, 1, 0x0}}, + {F, {"bias_mode", 28, 1, 0x1}}, + {F, {"bias_polarity", 29, 1, 0x1}}, + {F, {"bias_enable", 30, 1, 0x1}}, + {F, {"bias_pad_enable", 31, 1, 0x0}}, + {R, {"CCAM5_IF/CCAM5/GEN31/bgen_14", 0x20338}}, + {F, {"bias_vdac_val", 0, 8, 0x2f}}, + {F, {"bias_idac_val", 8, 13, 0x800}}, + {F, {"bias_internal_buffer", 21, 6, 0x8}}, + {F, {"bias_type", 27, 1, 0x0}}, + {F, {"bias_mode", 28, 1, 0x1}}, + {F, {"bias_polarity", 29, 1, 0x1}}, + {F, {"bias_enable", 30, 1, 0x1}}, + {F, {"bias_pad_enable", 31, 1, 0x0}}, + {R, {"CCAM5_IF/CCAM5/GEN31/bgen_15", 0x2033c}}, + {F, {"bias_vdac_val", 0, 8, 0x21}}, + {F, {"bias_idac_val", 8, 13, 0x83}}, + {F, {"bias_internal_buffer", 21, 6, 0x8}}, + {F, {"bias_type", 27, 1, 0x0}}, + {F, {"bias_mode", 28, 1, 0x1}}, + {F, {"bias_polarity", 29, 1, 0x1}}, + {F, {"bias_enable", 30, 1, 0x1}}, + {F, {"bias_pad_enable", 31, 1, 0x0}}, + {R, {"CCAM5_IF/CCAM5/GEN31/bgen_16", 0x20340}}, + {F, {"bias_vdac_val", 0, 8, 0xe3}}, + {F, {"bias_idac_val", 8, 13, 0x4}}, + {F, {"bias_internal_buffer", 21, 6, 0x8}}, + {F, {"bias_type", 27, 1, 0x1}}, + {F, {"bias_mode", 28, 1, 0x1}}, + {F, {"bias_polarity", 29, 1, 0x0}}, + {F, {"bias_enable", 30, 1, 0x1}}, + {F, {"bias_pad_enable", 31, 1, 0x0}}, + {R, {"CCAM5_IF/CCAM5/GEN31/bgen_17", 0x20344}}, + {F, {"bias_vdac_val", 0, 8, 0xf1}}, + {F, {"bias_idac_val", 8, 13, 0x0}}, + {F, {"bias_internal_buffer", 21, 6, 0x8}}, + {F, {"bias_type", 27, 1, 0x1}}, + {F, {"bias_mode", 28, 1, 0x1}}, + {F, {"bias_polarity", 29, 1, 0x0}}, + {F, {"bias_enable", 30, 1, 0x1}}, + {F, {"bias_pad_enable", 31, 1, 0x0}}, + {R, {"CCAM5_IF/CCAM5/GEN31/bgen_18", 0x20348}}, + {F, {"bias_vdac_val", 0, 8, 0x8d}}, + {F, {"bias_idac_val", 8, 13, 0x14d}}, + {F, {"bias_internal_buffer", 21, 6, 0x8}}, + {F, {"bias_type", 27, 1, 0x1}}, + {F, {"bias_mode", 28, 1, 0x0}}, + {F, {"bias_polarity", 29, 1, 0x0}}, + {F, {"bias_enable", 30, 1, 0x1}}, + {F, {"bias_pad_enable", 31, 1, 0x0}}, + {R, {"CCAM5_IF/CCAM5/GEN31/bgen_19", 0x2034c}}, + {F, {"bias_vdac_val", 0, 8, 0x1f}}, + {F, {"bias_idac_val", 8, 13, 0x57}}, + {F, {"bias_internal_buffer", 21, 6, 0x8}}, + {F, {"bias_type", 27, 1, 0x0}}, + {F, {"bias_mode", 28, 1, 0x1}}, + {F, {"bias_polarity", 29, 1, 0x1}}, + {F, {"bias_enable", 30, 1, 0x1}}, + {F, {"bias_pad_enable", 31, 1, 0x0}}, + {R, {"CCAM5_IF/CCAM5/GEN31/bgen_20", 0x20350}}, + {F, {"bias_vdac_val", 0, 8, 0x34}}, + {F, {"bias_idac_val", 8, 13, 0x125c}}, + {F, {"bias_internal_buffer", 21, 6, 0x8}}, + {F, {"bias_type", 27, 1, 0x0}}, + {F, {"bias_mode", 28, 1, 0x1}}, + {F, {"bias_polarity", 29, 1, 0x1}}, + {F, {"bias_enable", 30, 1, 0x1}}, + {F, {"bias_pad_enable", 31, 1, 0x0}}, + {R, {"CCAM5_IF/CCAM5/GEN31/bgen_21", 0x20354}}, + {F, {"bias_vdac_val", 0, 8, 0x2a}}, + {F, {"bias_idac_val", 8, 13, 0x2ce}}, + {F, {"bias_internal_buffer", 21, 6, 0x8}}, + {F, {"bias_type", 27, 1, 0x0}}, + {F, {"bias_mode", 28, 1, 0x1}}, + {F, {"bias_polarity", 29, 1, 0x1}}, + {F, {"bias_enable", 30, 1, 0x1}}, + {F, {"bias_pad_enable", 31, 1, 0x0}}, + {R, {"CCAM5_IF/CCAM5/GEN31/bgen_22", 0x20358}}, + {F, {"bias_vdac_val", 0, 8, 0xd6}}, + {F, {"bias_idac_val", 8, 13, 0x36}}, + {F, {"bias_internal_buffer", 21, 6, 0x8}}, + {F, {"bias_type", 27, 1, 0x0}}, + {F, {"bias_mode", 28, 1, 0x0}}, + {F, {"bias_polarity", 29, 1, 0x1}}, + {F, {"bias_enable", 30, 1, 0x1}}, + {F, {"bias_pad_enable", 31, 1, 0x0}}, + {R, {"CCAM5_IF/CCAM5/GEN31/bgen_23", 0x2035c}}, + {F, {"bias_vdac_val", 0, 8, 0xb1}}, + {F, {"bias_idac_val", 8, 13, 0x345}}, + {F, {"bias_internal_buffer", 21, 6, 0x8}}, + {F, {"bias_type", 27, 1, 0x0}}, + {F, {"bias_mode", 28, 1, 0x1}}, + {F, {"bias_polarity", 29, 1, 0x0}}, + {F, {"bias_enable", 30, 1, 0x1}}, + {F, {"bias_pad_enable", 31, 1, 0x0}}, + {R, {"CCAM5_IF/CCAM5/GEN31/bgen_24", 0x20360}}, + {F, {"bias_vdac_val", 0, 8, 0xd4}}, + {F, {"bias_idac_val", 8, 13, 0x4f}}, + {F, {"bias_internal_buffer", 21, 6, 0x8}}, + {F, {"bias_type", 27, 1, 0x0}}, + {F, {"bias_mode", 28, 1, 0x1}}, + {F, {"bias_polarity", 29, 1, 0x0}}, + {F, {"bias_enable", 30, 1, 0x1}}, + {F, {"bias_pad_enable", 31, 1, 0x0}}, + {R, {"CCAM5_IF/CCAM5/GEN31/bgen_25", 0x20364}}, + {F, {"bias_vdac_val", 0, 8, 0xd4}}, + {F, {"bias_idac_val", 8, 13, 0x2}}, + {F, {"bias_internal_buffer", 21, 6, 0x8}}, + {F, {"bias_type", 27, 1, 0x0}}, + {F, {"bias_mode", 28, 1, 0x1}}, + {F, {"bias_polarity", 29, 1, 0x0}}, + {F, {"bias_enable", 30, 1, 0x1}}, + {F, {"bias_pad_enable", 31, 1, 0x0}}, + {R, {"CCAM5_IF/CCAM5/GEN31/bgen_26", 0x20368}}, + {F, {"bias_vdac_val", 0, 8, 0x54}}, + {F, {"bias_idac_val", 8, 13, 0x132}}, + {F, {"bias_internal_buffer", 21, 6, 0x8}}, + {F, {"bias_type", 27, 1, 0x0}}, + {F, {"bias_mode", 28, 1, 0x0}}, + {F, {"bias_polarity", 29, 1, 0x1}}, + {F, {"bias_enable", 30, 1, 0x1}}, + {F, {"bias_pad_enable", 31, 1, 0x0}}, + {R, {"CCAM5_IF/CCAM5/GEN31/td_roi_x00", 0x20400}}, + {F, {"val", 0, 32, 0xffffffff}}, + {R, {"CCAM5_IF/CCAM5/GEN31/td_roi_x01", 0x20404}}, + {F, {"val", 0, 32, 0xffffffff}}, + {R, {"CCAM5_IF/CCAM5/GEN31/td_roi_x02", 0x20408}}, + {F, {"val", 0, 32, 0xffffffff}}, + {R, {"CCAM5_IF/CCAM5/GEN31/td_roi_x03", 0x2040c}}, + {F, {"val", 0, 32, 0xffffffff}}, + {R, {"CCAM5_IF/CCAM5/GEN31/td_roi_x04", 0x20410}}, + {F, {"val", 0, 32, 0xffffffff}}, + {R, {"CCAM5_IF/CCAM5/GEN31/td_roi_x05", 0x20414}}, + {F, {"val", 0, 32, 0xffffffff}}, + {R, {"CCAM5_IF/CCAM5/GEN31/td_roi_x06", 0x20418}}, + {F, {"val", 0, 32, 0xffffffff}}, + {R, {"CCAM5_IF/CCAM5/GEN31/td_roi_x07", 0x2041c}}, + {F, {"val", 0, 32, 0xffffffff}}, + {R, {"CCAM5_IF/CCAM5/GEN31/td_roi_x08", 0x20420}}, + {F, {"val", 0, 32, 0xffffffff}}, + {R, {"CCAM5_IF/CCAM5/GEN31/td_roi_x09", 0x20424}}, + {F, {"val", 0, 32, 0xffffffff}}, + {R, {"CCAM5_IF/CCAM5/GEN31/td_roi_x10", 0x20428}}, + {F, {"val", 0, 32, 0xffffffff}}, + {R, {"CCAM5_IF/CCAM5/GEN31/td_roi_x11", 0x2042c}}, + {F, {"val", 0, 32, 0xffffffff}}, + {R, {"CCAM5_IF/CCAM5/GEN31/td_roi_x12", 0x20430}}, + {F, {"val", 0, 32, 0xffffffff}}, + {R, {"CCAM5_IF/CCAM5/GEN31/td_roi_x13", 0x20434}}, + {F, {"val", 0, 32, 0xffffffff}}, + {R, {"CCAM5_IF/CCAM5/GEN31/td_roi_x14", 0x20438}}, + {F, {"val", 0, 32, 0xffffffff}}, + {R, {"CCAM5_IF/CCAM5/GEN31/td_roi_x15", 0x2043c}}, + {F, {"val", 0, 32, 0xffffffff}}, + {R, {"CCAM5_IF/CCAM5/GEN31/td_roi_x16", 0x20440}}, + {F, {"val", 0, 32, 0xffffffff}}, + {R, {"CCAM5_IF/CCAM5/GEN31/td_roi_x17", 0x20444}}, + {F, {"val", 0, 32, 0xffffffff}}, + {R, {"CCAM5_IF/CCAM5/GEN31/td_roi_x18", 0x20448}}, + {F, {"val", 0, 32, 0xffffffff}}, + {R, {"CCAM5_IF/CCAM5/GEN31/td_roi_x19", 0x2044c}}, + {F, {"val", 0, 32, 0xffffffff}}, + {R, {"CCAM5_IF/CCAM5/GEN31/td_roi_x20", 0x20450}}, + {F, {"val", 0, 4, 0x0}}, + {R, {"CCAM5_IF/CCAM5/GEN31/td_roi_y00", 0x20500}}, + {F, {"val", 0, 32, 0xffffffff}}, + {R, {"CCAM5_IF/CCAM5/GEN31/td_roi_y01", 0x20504}}, + {F, {"val", 0, 32, 0xffffffff}}, + {R, {"CCAM5_IF/CCAM5/GEN31/td_roi_y02", 0x20508}}, + {F, {"val", 0, 32, 0xffffffff}}, + {R, {"CCAM5_IF/CCAM5/GEN31/td_roi_y03", 0x2050c}}, + {F, {"val", 0, 32, 0xffffffff}}, + {R, {"CCAM5_IF/CCAM5/GEN31/td_roi_y04", 0x20510}}, + {F, {"val", 0, 32, 0xffffffff}}, + {R, {"CCAM5_IF/CCAM5/GEN31/td_roi_y05", 0x20514}}, + {F, {"val", 0, 32, 0xffffffff}}, + {R, {"CCAM5_IF/CCAM5/GEN31/td_roi_y06", 0x20518}}, + {F, {"val", 0, 32, 0xffffffff}}, + {R, {"CCAM5_IF/CCAM5/GEN31/td_roi_y07", 0x2051c}}, + {F, {"val", 0, 32, 0xffffffff}}, + {R, {"CCAM5_IF/CCAM5/GEN31/td_roi_y08", 0x20520}}, + {F, {"val", 0, 32, 0xffffffff}}, + {R, {"CCAM5_IF/CCAM5/GEN31/td_roi_y09", 0x20524}}, + {F, {"val", 0, 32, 0xffffffff}}, + {R, {"CCAM5_IF/CCAM5/GEN31/td_roi_y10", 0x20528}}, + {F, {"val", 0, 32, 0xffffffff}}, + {R, {"CCAM5_IF/CCAM5/GEN31/td_roi_y11", 0x2052c}}, + {F, {"val", 0, 32, 0xffffffff}}, + {R, {"CCAM5_IF/CCAM5/GEN31/td_roi_y12", 0x20530}}, + {F, {"val", 0, 32, 0xffffffff}}, + {R, {"CCAM5_IF/CCAM5/GEN31/td_roi_y13", 0x20534}}, + {F, {"val", 0, 32, 0xffffffff}}, + {R, {"CCAM5_IF/CCAM5/GEN31/td_roi_y14", 0x20538}}, + {F, {"val", 0, 32, 0xffffffff}}, + {R, {"CCAM5_IF/CCAM5/GEN31/td_roi_y15", 0x2053c}}, + {F, {"val", 0, 4, 0x0}}, + {R, {"CCAM5_IF/CCAM5/GEN31/em_roi_x00", 0x20600}}, + {F, {"val", 0, 32, 0xffffffff}}, + {R, {"CCAM5_IF/CCAM5/GEN31/em_roi_x01", 0x20604}}, + {F, {"val", 0, 32, 0xffffffff}}, + {R, {"CCAM5_IF/CCAM5/GEN31/em_roi_x02", 0x20608}}, + {F, {"val", 0, 32, 0xffffffff}}, + {R, {"CCAM5_IF/CCAM5/GEN31/em_roi_x03", 0x2060c}}, + {F, {"val", 0, 32, 0xffffffff}}, + {R, {"CCAM5_IF/CCAM5/GEN31/em_roi_x04", 0x20610}}, + {F, {"val", 0, 32, 0xffffffff}}, + {R, {"CCAM5_IF/CCAM5/GEN31/em_roi_x05", 0x20614}}, + {F, {"val", 0, 32, 0xffffffff}}, + {R, {"CCAM5_IF/CCAM5/GEN31/em_roi_x06", 0x20618}}, + {F, {"val", 0, 32, 0xffffffff}}, + {R, {"CCAM5_IF/CCAM5/GEN31/em_roi_x07", 0x2061c}}, + {F, {"val", 0, 32, 0xffffffff}}, + {R, {"CCAM5_IF/CCAM5/GEN31/em_roi_x08", 0x20620}}, + {F, {"val", 0, 32, 0xffffffff}}, + {R, {"CCAM5_IF/CCAM5/GEN31/em_roi_x09", 0x20624}}, + {F, {"val", 0, 32, 0xffffffff}}, + {R, {"CCAM5_IF/CCAM5/GEN31/em_roi_x10", 0x20628}}, + {F, {"val", 0, 32, 0xffffffff}}, + {R, {"CCAM5_IF/CCAM5/GEN31/em_roi_x11", 0x2062c}}, + {F, {"val", 0, 32, 0xffffffff}}, + {R, {"CCAM5_IF/CCAM5/GEN31/em_roi_x12", 0x20630}}, + {F, {"val", 0, 32, 0xffffffff}}, + {R, {"CCAM5_IF/CCAM5/GEN31/em_roi_x13", 0x20634}}, + {F, {"val", 0, 32, 0xffffffff}}, + {R, {"CCAM5_IF/CCAM5/GEN31/em_roi_x14", 0x20638}}, + {F, {"val", 0, 32, 0xffffffff}}, + {R, {"CCAM5_IF/CCAM5/GEN31/em_roi_x15", 0x2063c}}, + {F, {"val", 0, 32, 0xffffffff}}, + {R, {"CCAM5_IF/CCAM5/GEN31/em_roi_x16", 0x20640}}, + {F, {"val", 0, 32, 0xffffffff}}, + {R, {"CCAM5_IF/CCAM5/GEN31/em_roi_x17", 0x20644}}, + {F, {"val", 0, 32, 0xffffffff}}, + {R, {"CCAM5_IF/CCAM5/GEN31/em_roi_x18", 0x20648}}, + {F, {"val", 0, 32, 0xffffffff}}, + {R, {"CCAM5_IF/CCAM5/GEN31/em_roi_x19", 0x2064c}}, + {F, {"val", 0, 32, 0xffffffff}}, + {R, {"CCAM5_IF/CCAM5/GEN31/em_roi_x20", 0x20650}}, + {F, {"val", 0, 4, 0x0}}, + {R, {"CCAM5_IF/CCAM5/GEN31/em_roi_y00", 0x20700}}, + {F, {"val", 0, 32, 0xffffffff}}, + {R, {"CCAM5_IF/CCAM5/GEN31/em_roi_y01", 0x20704}}, + {F, {"val", 0, 32, 0xffffffff}}, + {R, {"CCAM5_IF/CCAM5/GEN31/em_roi_y02", 0x20708}}, + {F, {"val", 0, 32, 0xffffffff}}, + {R, {"CCAM5_IF/CCAM5/GEN31/em_roi_y03", 0x2070c}}, + {F, {"val", 0, 32, 0xffffffff}}, + {R, {"CCAM5_IF/CCAM5/GEN31/em_roi_y04", 0x20710}}, + {F, {"val", 0, 32, 0xffffffff}}, + {R, {"CCAM5_IF/CCAM5/GEN31/em_roi_y05", 0x20714}}, + {F, {"val", 0, 32, 0xffffffff}}, + {R, {"CCAM5_IF/CCAM5/GEN31/em_roi_y06", 0x20718}}, + {F, {"val", 0, 32, 0xffffffff}}, + {R, {"CCAM5_IF/CCAM5/GEN31/em_roi_y07", 0x2071c}}, + {F, {"val", 0, 32, 0xffffffff}}, + {R, {"CCAM5_IF/CCAM5/GEN31/em_roi_y08", 0x20720}}, + {F, {"val", 0, 32, 0xffffffff}}, + {R, {"CCAM5_IF/CCAM5/GEN31/em_roi_y09", 0x20724}}, + {F, {"val", 0, 32, 0xffffffff}}, + {R, {"CCAM5_IF/CCAM5/GEN31/em_roi_y10", 0x20728}}, + {F, {"val", 0, 32, 0xffffffff}}, + {R, {"CCAM5_IF/CCAM5/GEN31/em_roi_y11", 0x2072c}}, + {F, {"val", 0, 32, 0xffffffff}}, + {R, {"CCAM5_IF/CCAM5/GEN31/em_roi_y12", 0x20730}}, + {F, {"val", 0, 32, 0xffffffff}}, + {R, {"CCAM5_IF/CCAM5/GEN31/em_roi_y13", 0x20734}}, + {F, {"val", 0, 32, 0xffffffff}}, + {R, {"CCAM5_IF/CCAM5/GEN31/em_roi_y14", 0x20738}}, + {F, {"val", 0, 32, 0xffffffff}}, + {R, {"CCAM5_IF/CCAM5/GEN31/em_roi_y15", 0x2073c}}, + {F, {"val", 0, 4, 0x0}}, + {R, {"CCAM5_IF/CCAM5/GEN31_IF/TEST_PATTERN_CONTROL", 0x20740}}, + {F, {"ENABLE", 0, 1, 0x0}}, + {F, {"TYPE", 4, 1, 0x0}}, + {F, {"PIXEL_TYPE", 8, 1, 0x0}}, + {F, {"PIXEL_POLARITY", 12, 1, 0x0}}, + {R, {"CCAM5_IF/CCAM5/GEN31_IF/TEST_PATTERN_N_PERIOD", 0x20744}}, + {F, {"VALID_RATIO", 0, 10, 0x0}}, + {F, {"LENGTH", 16, 16, 0x0}}, + {R, {"CCAM5_IF/CCAM5/GEN31_IF/TEST_PATTERN_P_PERIOD", 0x20748}}, + {F, {"VALID_RATIO", 0, 10, 0x0}}, + {F, {"LENGTH", 16, 16, 0x0}}, + {R, {"CCAM5_IF/CCAM5/GEN31_IF/CONTROL", 0x2074c}}, + {F, {"SELF_ACK", 0, 1, 0x0}}, + {F, {"SENSOR_CLK_EN", 1, 1, 0x1}}, + {F, {"EM_RSTN_TRIGGER_EN", 4, 1, 0x0}}, + {R, {"CCAM5_IF/CCAM5/GEN31_IF/TRIGGERS", 0x20750}}, + {F, {"RESET_AFIFO", 0, 1, 0x0}}, + {F, {"TRIGGER_FWD_ID", 8, 8, 0x0}}, + {F, {"TRIGGER_FWD_ENABLE", 16, 1, 0x0}}, + {R, {"CCAM5_IF/CCAM5/GEN31_IF/EM_TRIGGER_PATTERN", 0x20754}}, + {F, {"ENABLE", 0, 1, 0x0}}, + {F, {"INIT", 1, 1, 0x0}}, + {F, {"START", 2, 1, 0x0}}, + {F, {"BUSY", 3, 1, 0x0}}, + {R, {"CCAM5_IF/CCAM5/GEN31_IODELAY/CONTROL", 0x20758}}, + {F, {"SENSOR_READY_FF", 0, 1, 0x0}}, + {R, {"CCAM5_IF/CCAM5/GEN31_IODELAY/IODELAY_DEC", 0x2075c}}, + {F, {"DX", 0, 10, 0x0}}, + {F, {"DY", 10, 9, 0x0}}, + {F, {"POLARITY", 19, 1, 0x0}}, + {F, {"TYPE", 20, 1, 0x0}}, + {F, {"VALID", 21, 1, 0x0}}, + {F, {"READY", 22, 1, 0x0}}, + {F, {"CLK", 23, 1, 0x0}}, + {R, {"CCAM5_IF/CCAM5/GEN31_IODELAY/IODELAY_INC", 0x20760}}, + {F, {"DX", 0, 10, 0x0}}, + {F, {"DY", 10, 9, 0x0}}, + {F, {"POLARITY", 19, 1, 0x0}}, + {F, {"TYPE", 20, 1, 0x0}}, + {F, {"VALID", 21, 1, 0x0}}, + {F, {"READY", 22, 1, 0x0}}, + {F, {"CLK", 23, 1, 0x0}}, + {R, {"CCAM5_IF/CCAM5/GEN31_IODELAY/IODELAY_LOAD", 0x20764}}, + {F, {"DX", 0, 10, 0x0}}, + {F, {"DY", 10, 9, 0x0}}, + {F, {"POLARITY", 19, 1, 0x0}}, + {F, {"TYPE", 20, 1, 0x0}}, + {F, {"VALID", 21, 1, 0x0}}, + {F, {"READY", 22, 1, 0x0}}, + {F, {"CLK", 23, 1, 0x0}}, + {R, {"CCAM5_IF/CCAM5/GEN31_IODELAY/IODELAY_SET_VALUE_0", 0x20768}}, + {F, {"TYPE", 0, 5, 0x0}}, + {F, {"VALID", 8, 5, 0x0}}, + {F, {"READY", 16, 5, 0x1}}, + {F, {"CLK", 24, 5, 0x0}}, + {R, {"CCAM5_IF/CCAM5/GEN31_IODELAY/IODELAY_SET_VALUE_1", 0x2076c}}, + {F, {"POLARITY", 0, 5, 0x0}}, + {F, {"DX_0", 8, 5, 0x0}}, + {F, {"DX_1", 16, 5, 0x0}}, + {F, {"DX_2", 24, 5, 0x0}}, + {R, {"CCAM5_IF/CCAM5/GEN31_IODELAY/IODELAY_SET_VALUE_2", 0x20770}}, + {F, {"DX_3", 0, 5, 0x0}}, + {F, {"DX_4", 8, 5, 0x0}}, + {F, {"DX_5", 16, 5, 0x0}}, + {F, {"DX_6", 24, 5, 0x0}}, + {R, {"CCAM5_IF/CCAM5/GEN31_IODELAY/IODELAY_SET_VALUE_3", 0x20774}}, + {F, {"DX_7", 0, 5, 0x0}}, + {F, {"DX_8", 8, 5, 0x0}}, + {F, {"DX_9", 16, 5, 0x0}}, + {F, {"DY_0", 24, 5, 0x0}}, + {R, {"CCAM5_IF/CCAM5/GEN31_IODELAY/IODELAY_SET_VALUE_4", 0x20778}}, + {F, {"DY_1", 0, 5, 0x0}}, + {F, {"DY_2", 8, 5, 0x0}}, + {F, {"DY_3", 16, 5, 0x0}}, + {F, {"DY_4", 24, 5, 0x0}}, + {R, {"CCAM5_IF/CCAM5/GEN31_IODELAY/IODELAY_SET_VALUE_5", 0x2077c}}, + {F, {"DY_5", 0, 5, 0x0}}, + {F, {"DY_6", 8, 5, 0x0}}, + {F, {"DY_7", 16, 5, 0x0}}, + {F, {"DY_8", 24, 5, 0x0}}, + {R, {"CCAM5_IF/CCAM5/GEN31_IODELAY/IODELAY_GET_VALUE_0", 0x20780}}, + {F, {"TYPE", 0, 5, 0x0}}, + {F, {"VALID", 8, 5, 0x0}}, + {F, {"READY", 16, 5, 0x1}}, + {F, {"CLK", 24, 5, 0x0}}, + {R, {"CCAM5_IF/CCAM5/GEN31_IODELAY/IODELAY_GET_VALUE_1", 0x20784}}, + {F, {"POLARITY", 0, 5, 0x0}}, + {F, {"DX_0", 8, 5, 0x0}}, + {F, {"DX_1", 16, 5, 0x0}}, + {F, {"DX_2", 24, 5, 0x0}}, + {R, {"CCAM5_IF/CCAM5/GEN31_IODELAY/IODELAY_GET_VALUE_2", 0x20788}}, + {F, {"DX_3", 0, 5, 0x0}}, + {F, {"DX_4", 8, 5, 0x0}}, + {F, {"DX_5", 16, 5, 0x0}}, + {F, {"DX_6", 24, 5, 0x0}}, + {R, {"CCAM5_IF/CCAM5/GEN31_IODELAY/IODELAY_GET_VALUE_3", 0x2078c}}, + {F, {"DX_7", 0, 5, 0x0}}, + {F, {"DX_8", 8, 5, 0x0}}, + {F, {"DX_9", 16, 5, 0x0}}, + {F, {"DY_0", 24, 5, 0x0}}, + {R, {"CCAM5_IF/CCAM5/GEN31_IODELAY/IODELAY_GET_VALUE_4", 0x20790}}, + {F, {"DY_1", 0, 5, 0x0}}, + {F, {"DY_2", 8, 5, 0x0}}, + {F, {"DY_3", 16, 5, 0x0}}, + {F, {"DY_4", 24, 5, 0x0}}, + {R, {"CCAM5_IF/CCAM5/GEN31_IODELAY/IODELAY_GET_VALUE_5", 0x20794}}, + {F, {"DY_5", 0, 5, 0x0}}, + {F, {"DY_6", 8, 5, 0x0}}, + {F, {"DY_7", 16, 5, 0x0}}, + {F, {"DY_8", 24, 5, 0x0}}, + {R, {"CCAM5_IF/CCAM5/GEN31_IODELAY/SAMPLE_CLK_EDGE", 0x20798}}, + {F, {"DX", 0, 10, 0x0}}, + {F, {"DY", 10, 9, 0x0}}, + {F, {"TYPE", 19, 1, 0x0}}, + {F, {"POLARITY", 20, 1, 0x0}}, + {F, {"VALID", 21, 1, 0x0}}, + {R, {"CCAM5_IF/CCAM5/VIP/CONTROL", 0x207a0}}, + {F, {"MODE", 0, 3, 0x0}}, + {F, {"RATE", 3, 10, 0x0}}, + {F, {"REPEAT", 16, 13, 0x0}}, + {F, {"DISABLE_OUTPUT", 29, 1, 0x0}}, + {F, {"FORCE_READY", 30, 1, 0x1}}, + {R, {"CCAM5_IF/CCAM5/VIP/TEST_STATUS", 0x207a4}}, + {F, {"STATUS", 0, 1, 0x0}}, + {F, {"RESET", 1, 1, 0x0}}, + {R, {"CCAM5_IF/CCAM5/VIP/PATTERN_TEST_DATA", 0x207a8}}, + {F, {"DATA", 0, 32, 0x0}}, + {R, {"CCAM5_IF/CCAM5/VIP/TEST_RESULT", 0x207ac}}, + {F, {"RESULT", 0, 32, 0x0}}, + {R, {"CCAM5_IF/CCAM5/VIP/VALID_COUNTER", 0x207b0}}, + {F, {"COUNTER", 0, 32, 0x0}}, + {R, {"CCAM5_IF/CCAM5/VIP/ERROR_COUNTER", 0x207b4}}, + {F, {"COUNTER", 0, 32, 0x0}}, + {R, {"CCAM5_IF/CCAM5/VIP/ERROR_INDEX", 0x207b8}}, + {F, {"INDEX", 0, 32, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_CONFIG/ID", 0x20800}}, + {F, {"VALUE", 0, 8, 0x23}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_CONFIG/VERSION", 0x20804}}, + {F, {"MICRO", 0, 8, 0x0}}, + {F, {"MINOR", 8, 8, 0x0}}, + {F, {"MAJOR", 16, 8, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_CONFIG/BUILD_DATE", 0x20808}}, + {F, {"VALUE", 0, 32, 0x0}}, + {R, {"CCAM5_IF/CCAM5/SYSTEM_CONFIG/VERSION_CONTROL_ID", 0x2080c}}, + {F, {"VALUE", 0, 32, 0x0}}, + {R, {"CCAM5_IF/CCAM5/MIPI_TX/CONTROL", 0x21500}}, + {F, {"ENABLE", 0, 1, 0x0}}, + {F, {"ENABLE_PACKET_TIMEOUT", 1, 1, 0x0}}, + {F, {"BLOCKING_MODE", 2, 1, 0x1}}, + {F, {"PADDING_BYPASS", 3, 1, 0x1}}, + {R, {"CCAM5_IF/CCAM5/MIPI_TX/DATA_IDENTIFIER", 0x21504}}, + {F, {"DATA_TYPE", 0, 6, 0x30}}, + {F, {"VIRTUAL_CHANNEL", 6, 2, 0x0}}, + {R, {"CCAM5_IF/CCAM5/MIPI_TX/FRAME_PERIOD", 0x21508}}, + {F, {"VALUE_US", 0, 16, 0x3f0}}, + {R, {"CCAM5_IF/CCAM5/MIPI_TX/PACKET_TIMEOUT", 0x2150c}}, + {F, {"VALUE_US", 0, 16, 0x1f8}}, + {R, {"CCAM5_IF/CCAM5/MIPI_TX/PACKET_SIZE", 0x21510}}, + {F, {"VALUE", 0, 14, 0x2000}}, + {R, {"CCAM5_IF/CCAM5/MIPI_TX/START_TIME", 0x21514}}, + {F, {"VALUE", 0, 16, 0x50}}, + {R, {"CCAM5_IF/CCAM5/MIPI_TX/START_FRAME_TIME", 0x21518}}, + {F, {"VALUE", 0, 16, 0x50}}, + {R, {"CCAM5_IF/CCAM5/MIPI_TX/END_FRAME_TIME", 0x2151c}}, + {F, {"VALUE", 0, 16, 0x50}}, + {R, {"CCAM5_IF/CCAM5/MIPI_TX/INTER_FRAME_TIME", 0x21520}}, + {F, {"VALUE", 0, 16, 0x50}}, + {R, {"CCAM5_IF/CCAM5/MIPI_TX/INTER_PACKET_TIME", 0x21524}}, + {F, {"VALUE", 0, 16, 0x50}}, + {R, {"CCAM5_IF/CCAM5/MIPI_TX/FEATURES", 0x21528}}, + {F, {"PADDING_PRESENT", 0, 1, 0x0}}, + {F, {"FIXED_FRAME_PRESENT", 1, 1, 0x0}}, + {R, {"CCAM5_IF/CCAM5/FLASH/ADDRESS_INIT", 0x21600}}, + {F, {"VAL", 0, 24, 0x0}}, + {R, {"CCAM5_IF/CCAM5/FLASH/FLASH_ACCESS", 0x21604}}, + {F, {"VAL", 0, 32, 0x0}}, + {R, {"CCAM5_IF/CCAM5/FLASH/WRITE_ENABLE", 0x21608}}, + {F, {"VAL", 0, 1, 0x0}}, + {R, {"CCAM5_IF/CCAM5/FLASH/SECTOR_ERASE", 0x2160c}}, + {F, {"VAL", 0, 24, 0x0}}, + {R, {"CCAM5_IF/CCAM5/FLASH/BULK_ERASE", 0x21610}}, + {F, {"VAL", 0, 1, 0x0}}, + {R, {"CCAM5_IF/CCAM5/FLASH/READ_STATUS", 0x21614}}, + {F, {"WRITE_IN_PROGRESS", 24, 1, 0x0}}, + {F, {"WRITE_ENABLE_LATCH", 25, 1, 0x0}}, + {F, {"BP_LSB", 26, 3, 0x0}}, + {F, {"TOP_BOTTOM", 29, 1, 0x0}}, + {F, {"BP_MSB", 30, 1, 0x0}}, + {F, {"STATUS_WRITE_ENABLE", 31, 1, 0x0}}, + {R, {"CCAM5_IF/CCAM5/FLASH/READ_FLAG", 0x21618}}, + {F, {"PROTECTION", 25, 1, 0x0}}, + {F, {"PROGRAM_SUSPEND", 26, 1, 0x0}}, + {F, {"PROGRAM", 28, 1, 0x0}}, + {F, {"ERASE", 29, 1, 0x0}}, + {F, {"ERASE_SUSPEND", 30, 1, 0x0}}, + {F, {"PROGRAM_ERASE", 31, 1, 0x0}} + +}; +unsigned int Gen31Evk2RegisterMapSize = sizeof(Gen31Evk2RegisterMap) / sizeof(Gen31Evk2RegisterMap[0]); + +#endif // METAVISION_HAL_GEN31_EVK2_REGISTERMAP_H diff --git a/hal_psee_plugins/include/devices/gen31/register_maps/gen31_evk3_device.h b/hal_psee_plugins/include/devices/gen31/register_maps/gen31_evk3_device.h new file mode 100644 index 000000000..6607b85c4 --- /dev/null +++ b/hal_psee_plugins/include/devices/gen31/register_maps/gen31_evk3_device.h @@ -0,0 +1,23 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_GEN31_EVK3_DEVICE_H +#define METAVISION_HAL_GEN31_EVK3_DEVICE_H + +#include "utils/register_map.h" + +namespace Metavision { + +void build_gen31_evk3_register_map(RegisterMap ®map); + +} // namespace Metavision + +#endif // METAVISION_HAL_GEN31_EVK3_DEVICE_H diff --git a/hal_psee_plugins/include/devices/gen41/gen41_antiflicker_module.h b/hal_psee_plugins/include/devices/gen41/gen41_antiflicker_module.h new file mode 100644 index 000000000..fb6e7f8b0 --- /dev/null +++ b/hal_psee_plugins/include/devices/gen41/gen41_antiflicker_module.h @@ -0,0 +1,41 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_GEN41_ANTIFLICKER_MODULE_H +#define METAVISION_HAL_GEN41_ANTIFLICKER_MODULE_H + +#include +#include + +#include "metavision/hal/facilities/i_antiflicker_module.h" + +namespace Metavision { + +class RegisterMap; + +class Gen41AntiFlickerModule : public I_AntiFlickerModule { +public: + Gen41AntiFlickerModule(const std::shared_ptr ®map, const std::string &sensor_prefix); + + virtual void enable() override; + virtual void disable() override; + + virtual void set_frequency(uint32_t frequency_center, uint32_t bandwidth, bool stop = true) override; + virtual void set_frequency_band(uint32_t min_freq, uint32_t max_freq, bool stop = true) override; + +private: + std::shared_ptr register_map_; + std::string sensor_prefix_; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_GEN41_ANTIFLICKER_MODULE_H diff --git a/hal_psee_plugins/include/devices/gen41/gen41_erc.h b/hal_psee_plugins/include/devices/gen41/gen41_erc.h new file mode 100644 index 000000000..936339c06 --- /dev/null +++ b/hal_psee_plugins/include/devices/gen41/gen41_erc.h @@ -0,0 +1,54 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_GEN41_ERC_H +#define METAVISION_HAL_GEN41_ERC_H + +#include +#include + +#include "facilities/psee_erc.h" + +namespace Metavision { + +class RegisterMap; +class PseeDeviceControl; +class TzDevice; + +class Gen41Erc : public PseeErc { +public: + Gen41Erc(const std::shared_ptr ®map, const std::string &prefix, + std::shared_ptr tzDev = nullptr); + + virtual void enable(bool en) override; + virtual bool is_enabled() override; + virtual void initialize() override; + virtual void erc_from_file(const std::string &) override; + virtual uint32_t get_count_period() const override; + virtual void set_cd_event_count(uint32_t count) override; + virtual uint32_t get_cd_event_count() override; + + void set_device_control(const std::shared_ptr &device_control); + +private: + static constexpr uint32_t CD_EVENT_COUNT_MAX = (1 << 22) - 1; + + std::shared_ptr register_map_; + std::shared_ptr dev_ctrl_; + std::shared_ptr tzDev_; + uint32_t cd_event_count_shadow_; + std::map>> lut_configs; + std::string prefix_; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_GEN41_ERC_H diff --git a/hal_psee_plugins/include/devices/gen41/gen41_evk2_issd.h b/hal_psee_plugins/include/devices/gen41/gen41_evk2_issd.h new file mode 100644 index 000000000..1433d9765 --- /dev/null +++ b/hal_psee_plugins/include/devices/gen41/gen41_evk2_issd.h @@ -0,0 +1,1019 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +// ISSD sequences generated by psee_issd_convert. +// Parameters: +// issd_csv_format_version=1.0 +// system=evk2_gen41_cd +// operator=Prophesee +// dry_run=False +// no_system=False +// strip_prefix=True +// sensor_version=None +// args= +// sensor=PseeEvk2Gen41 +// date=2021-09-16T16:42:11 +// psee_issd_version=1.1.3.215+g40ab73918.d20210008 +// psee_sensor_lib_version=3.3.0.486+g1106e0921.d20210015 +// issd_data_format_version=1.0 + +// clang-format off + +#ifndef METAVISION_HAL_GEN41_EVK2_ISSD_H +#define METAVISION_HAL_GEN41_EVK2_ISSD_H + +#include + +namespace Metavision { + +static const std::vector gen41_evk2_init = { + RegisterOperation::Read(0x00000800, 0x00000027, 0x000000FF), + RegisterOperation::Write(0x00000004, 0x00000111), + RegisterOperation::Write(0x00000000, 0x00000089), + RegisterOperation::Write(0x00000000, 0x0000008D), + RegisterOperation::Write(0x00000000, 0x000000CD), + RegisterOperation::Write(0x00000008, 0x0000004E), + RegisterOperation::Write(0x00002004, 0x00002000), + RegisterOperation::Write(0x00000014, 0x00000000), + RegisterOperation::Write(0x00000600, 0x00000001), + RegisterOperation::Write(0x00000044, 0x00000000), + RegisterOperation::Write(0x00000048, 0x00030D41), + RegisterOperation::Write(0x00000018, 0x00000000), + RegisterOperation::Write(0x00700000, 0x00000001), + RegisterOperation::Write(0x0070F000, 0x00400000), + RegisterOperation::Write(0x0070F000, 0x00400000), + RegisterOperation::Write(0x0070F000, 0x00400000), + RegisterOperation::Write(0x0070F030, 0x00000000), + RegisterOperation::Write(0x0070F030, 0x00000000), + RegisterOperation::Write(0x0070F030, 0x00000000), + RegisterOperation::Write(0x0070F030, 0x00000000), + RegisterOperation::Write(0x0070F000, 0x00400000), + RegisterOperation::Write(0x0070F030, 0x00000000), + RegisterOperation::Write(0x0070F038, 0x01405002), + RegisterOperation::Write(0x0070F038, 0x01405000), + RegisterOperation::Write(0x0070F024, 0x00000000), + RegisterOperation::Write(0x0070F024, 0x00000001), + RegisterOperation::Delay(500000), + RegisterOperation::Write(0x0070F024, 0x00000003), + RegisterOperation::Delay(500000), + RegisterOperation::Write(0x0070F030, 0x00000000), + RegisterOperation::Write(0x0070F030, 0x00000000), + RegisterOperation::Write(0x0070F038, 0x01405001), + RegisterOperation::Delay(1000), + RegisterOperation::Write(0x0070F030, 0x00000100), + RegisterOperation::Delay(1000), + RegisterOperation::Write(0x0070F030, 0x00000300), + // Digital INIT + RegisterOperation::Write(0x00100064, 0x00000001), + RegisterOperation::Write(0x0010B074, 0x00000002), + RegisterOperation::Write(0x0010B078, 0x00000078), + RegisterOperation::Write(0x00100000, 0x0C006402), + RegisterOperation::Write(0x00100000, 0x0C001402), + RegisterOperation::Write(0x00100000, 0x0C001442), + RegisterOperation::Write(0x0010B068, 0x00000004), + RegisterOperation::Write(0x0010B07C, 0x00000003), + RegisterOperation::Delay(1000), + RegisterOperation::Write(0x00100000, 0x4C001442), + RegisterOperation::Write(0x00100000, 0x4C00144A), + RegisterOperation::Write(0x00100000, 0x4C00140A), + RegisterOperation::Write(0x00100000, 0x4C00640A), + RegisterOperation::Write(0x00100000, 0x4C00644A), + RegisterOperation::Write(0x0010B080, 0x00000067), + RegisterOperation::Write(0x0010B084, 0x0000000F), + RegisterOperation::Write(0x0010B088, 0x00000027), + RegisterOperation::Write(0x0010B08C, 0x00000027), + RegisterOperation::Write(0x0010B090, 0x000000B7), + RegisterOperation::Write(0x0010B094, 0x00000047), + RegisterOperation::Write(0x0010B098, 0x0000002F), + RegisterOperation::Write(0x0010B09C, 0x0000004F), + RegisterOperation::Write(0x0010B0A0, 0x0000002F), + RegisterOperation::Write(0x0010B0A4, 0x00000027), + RegisterOperation::Write(0x0010B0AC, 0x00000028), + RegisterOperation::Write(0x0010B0CC, 0x00000001), + RegisterOperation::Write(0x0010B000, 0x00000158), + RegisterOperation::Write(0x0010B004, 0x0000008A), + RegisterOperation::Write(0x0010B01C, 0x00000030), + RegisterOperation::Write(0x0010B020, 0x00004000), + RegisterOperation::Write(0x0010B040, 0x00000007), + RegisterOperation::Write(0x0010A000, 0x00000101), + RegisterOperation::Delay(200), + RegisterOperation::Write(0x0010A008, 0x00002405), + RegisterOperation::Delay(200), + RegisterOperation::Write(0x0010A004, 0x00000101), + RegisterOperation::Delay(200), + RegisterOperation::Write(0x0010A020, 0x00000170), + RegisterOperation::Delay(200), + RegisterOperation::Write(0x0010B040, 0x0000000F), + RegisterOperation::Write(0x0010B004, 0x0000008A), + RegisterOperation::Delay(200), + RegisterOperation::Write(0x0010B0C8, 0x00000003), + RegisterOperation::Delay(200), + RegisterOperation::Write(0x0010B044, 0x00000001), + RegisterOperation::Write(0x0010B000, 0x00000159), + RegisterOperation::Write(0x00109008, 0x00000640), + RegisterOperation::Write(0x00108000, 0x0001E005), + RegisterOperation::Write(0x00107008, 0x00000001), + RegisterOperation::Write(0x00107000, 0x00070001), + RegisterOperation::Write(0x00106008, 0x000000C8), + RegisterOperation::Write(0x0010600C, 0x00000FA0), + RegisterOperation::Write(0x00106004, 0x00000001), + RegisterOperation::Write(0x0010602C, 0x00000001), + RegisterOperation::Write(0x00106800, 0x08080808), + RegisterOperation::Write(0x00106804, 0x08080808), + RegisterOperation::Write(0x00106808, 0x08080808), + RegisterOperation::Write(0x0010680C, 0x08080808), + RegisterOperation::Write(0x00106810, 0x08080808), + RegisterOperation::Write(0x00106814, 0x08080808), + RegisterOperation::Write(0x00106818, 0x08080808), + RegisterOperation::Write(0x0010681C, 0x08080808), + RegisterOperation::Write(0x00106820, 0x08080808), + RegisterOperation::Write(0x00106824, 0x08080808), + RegisterOperation::Write(0x00106828, 0x08080808), + RegisterOperation::Write(0x0010682C, 0x08080808), + RegisterOperation::Write(0x00106830, 0x08080808), + RegisterOperation::Write(0x00106834, 0x08080808), + RegisterOperation::Write(0x00106838, 0x08080808), + RegisterOperation::Write(0x0010683C, 0x08080808), + RegisterOperation::Write(0x00106840, 0x08080808), + RegisterOperation::Write(0x00106844, 0x08080808), + RegisterOperation::Write(0x00106848, 0x08080808), + RegisterOperation::Write(0x0010684C, 0x08080808), + RegisterOperation::Write(0x00106850, 0x08080808), + RegisterOperation::Write(0x00106854, 0x08080808), + RegisterOperation::Write(0x00106858, 0x08080808), + RegisterOperation::Write(0x0010685C, 0x08080808), + RegisterOperation::Write(0x00106860, 0x08080808), + RegisterOperation::Write(0x00106864, 0x08080808), + RegisterOperation::Write(0x00106868, 0x08080808), + RegisterOperation::Write(0x0010686C, 0x08080808), + RegisterOperation::Write(0x00106870, 0x08080808), + RegisterOperation::Write(0x00106874, 0x08080808), + RegisterOperation::Write(0x00106878, 0x08080808), + RegisterOperation::Write(0x0010687C, 0x08080808), + RegisterOperation::Write(0x00106880, 0x08080808), + RegisterOperation::Write(0x00106884, 0x08080808), + RegisterOperation::Write(0x00106888, 0x08080808), + RegisterOperation::Write(0x0010688C, 0x08080808), + RegisterOperation::Write(0x00106890, 0x08080808), + RegisterOperation::Write(0x00106894, 0x08080808), + RegisterOperation::Write(0x00106898, 0x08080808), + RegisterOperation::Write(0x0010689C, 0x08080808), + RegisterOperation::Write(0x001068A0, 0x08080808), + RegisterOperation::Write(0x001068A4, 0x08080808), + RegisterOperation::Write(0x001068A8, 0x08080808), + RegisterOperation::Write(0x001068AC, 0x08080808), + RegisterOperation::Write(0x001068B0, 0x08080808), + RegisterOperation::Write(0x001068B4, 0x08080808), + RegisterOperation::Write(0x001068B8, 0x08080808), + RegisterOperation::Write(0x001068BC, 0x08080808), + RegisterOperation::Write(0x001068C0, 0x08080808), + RegisterOperation::Write(0x001068C4, 0x08080808), + RegisterOperation::Write(0x001068C8, 0x08080808), + RegisterOperation::Write(0x001068CC, 0x08080808), + RegisterOperation::Write(0x001068D0, 0x08080808), + RegisterOperation::Write(0x001068D4, 0x08080808), + RegisterOperation::Write(0x001068D8, 0x08080808), + RegisterOperation::Write(0x001068DC, 0x08080808), + RegisterOperation::Write(0x001068E0, 0x08080808), + RegisterOperation::Write(0x001068E4, 0x08080808), + RegisterOperation::Write(0x001068E8, 0x08080808), + RegisterOperation::Write(0x001068EC, 0x08080808), + RegisterOperation::Write(0x001068F0, 0x08080808), + RegisterOperation::Write(0x001068F4, 0x08080808), + RegisterOperation::Write(0x001068F8, 0x08080808), + RegisterOperation::Write(0x001068FC, 0x08080808), + RegisterOperation::Write(0x00106900, 0x08080808), + RegisterOperation::Write(0x00106904, 0x08080808), + RegisterOperation::Write(0x00106908, 0x08080808), + RegisterOperation::Write(0x0010690C, 0x08080808), + RegisterOperation::Write(0x00106910, 0x08080808), + RegisterOperation::Write(0x00106914, 0x08080808), + RegisterOperation::Write(0x00106918, 0x08080808), + RegisterOperation::Write(0x0010691C, 0x08080808), + RegisterOperation::Write(0x00106920, 0x08080808), + RegisterOperation::Write(0x00106924, 0x08080808), + RegisterOperation::Write(0x00106928, 0x08080808), + RegisterOperation::Write(0x0010692C, 0x08080808), + RegisterOperation::Write(0x00106930, 0x08080808), + RegisterOperation::Write(0x00106934, 0x08080808), + RegisterOperation::Write(0x00106938, 0x08080808), + RegisterOperation::Write(0x0010693C, 0x08080808), + RegisterOperation::Write(0x00106940, 0x08080808), + RegisterOperation::Write(0x00106944, 0x08080808), + RegisterOperation::Write(0x00106948, 0x08080808), + RegisterOperation::Write(0x0010694C, 0x08080808), + RegisterOperation::Write(0x00106950, 0x08080808), + RegisterOperation::Write(0x00106954, 0x08080808), + RegisterOperation::Write(0x00106958, 0x08080808), + RegisterOperation::Write(0x0010695C, 0x08080808), + RegisterOperation::Write(0x00106960, 0x08080808), + RegisterOperation::Write(0x00106964, 0x08080808), + RegisterOperation::Write(0x00106968, 0x08080808), + RegisterOperation::Write(0x0010696C, 0x08080808), + RegisterOperation::Write(0x00106970, 0x08080808), + RegisterOperation::Write(0x00106974, 0x08080808), + RegisterOperation::Write(0x00106978, 0x08080808), + RegisterOperation::Write(0x0010697C, 0x08080808), + RegisterOperation::Write(0x00106980, 0x08080808), + RegisterOperation::Write(0x00106984, 0x08080808), + RegisterOperation::Write(0x00106988, 0x08080808), + RegisterOperation::Write(0x0010698C, 0x08080808), + RegisterOperation::Write(0x00106990, 0x08080808), + RegisterOperation::Write(0x00106994, 0x08080808), + RegisterOperation::Write(0x00106998, 0x08080808), + RegisterOperation::Write(0x0010699C, 0x08080808), + RegisterOperation::Write(0x001069A0, 0x08080808), + RegisterOperation::Write(0x001069A4, 0x08080808), + RegisterOperation::Write(0x001069A8, 0x08080808), + RegisterOperation::Write(0x001069AC, 0x08080808), + RegisterOperation::Write(0x001069B0, 0x08080808), + RegisterOperation::Write(0x001069B4, 0x08080808), + RegisterOperation::Write(0x001069B8, 0x08080808), + RegisterOperation::Write(0x001069BC, 0x08080808), + RegisterOperation::Write(0x001069C0, 0x08080808), + RegisterOperation::Write(0x001069C4, 0x08080808), + RegisterOperation::Write(0x001069C8, 0x08080808), + RegisterOperation::Write(0x001069CC, 0x08080808), + RegisterOperation::Write(0x001069D0, 0x08080808), + RegisterOperation::Write(0x001069D4, 0x08080808), + RegisterOperation::Write(0x001069D8, 0x08080808), + RegisterOperation::Write(0x001069DC, 0x08080808), + RegisterOperation::Write(0x001069E0, 0x08080808), + RegisterOperation::Write(0x001069E4, 0x08080808), + RegisterOperation::Write(0x001069E8, 0x08080808), + RegisterOperation::Write(0x001069EC, 0x08080808), + RegisterOperation::Write(0x001069F0, 0x08080808), + RegisterOperation::Write(0x001069F4, 0x08080808), + RegisterOperation::Write(0x001069F8, 0x08080808), + RegisterOperation::Write(0x001069FC, 0x08080808), + RegisterOperation::Write(0x00106A00, 0x08080808), + RegisterOperation::Write(0x00106A04, 0x08080808), + RegisterOperation::Write(0x00106A08, 0x08080808), + RegisterOperation::Write(0x00106A0C, 0x08080808), + RegisterOperation::Write(0x00106A10, 0x08080808), + RegisterOperation::Write(0x00106A14, 0x08080808), + RegisterOperation::Write(0x00106A18, 0x08080808), + RegisterOperation::Write(0x00106A1C, 0x08080808), + RegisterOperation::Write(0x00106A20, 0x08080808), + RegisterOperation::Write(0x00106A24, 0x08080808), + RegisterOperation::Write(0x00106A28, 0x08080808), + RegisterOperation::Write(0x00106A2C, 0x08080808), + RegisterOperation::Write(0x00106A30, 0x08080808), + RegisterOperation::Write(0x00106A34, 0x08080808), + RegisterOperation::Write(0x00106A38, 0x08080808), + RegisterOperation::Write(0x00106A3C, 0x08080808), + RegisterOperation::Write(0x00106A40, 0x08080808), + RegisterOperation::Write(0x00106A44, 0x08080808), + RegisterOperation::Write(0x00106A48, 0x08080808), + RegisterOperation::Write(0x00106A4C, 0x08080808), + RegisterOperation::Write(0x00106A50, 0x08080808), + RegisterOperation::Write(0x00106A54, 0x08080808), + RegisterOperation::Write(0x00106A58, 0x08080808), + RegisterOperation::Write(0x00106A5C, 0x08080808), + RegisterOperation::Write(0x00106A60, 0x08080808), + RegisterOperation::Write(0x00106A64, 0x08080808), + RegisterOperation::Write(0x00106A68, 0x08080808), + RegisterOperation::Write(0x00106A6C, 0x08080808), + RegisterOperation::Write(0x00106A70, 0x08080808), + RegisterOperation::Write(0x00106A74, 0x08080808), + RegisterOperation::Write(0x00106A78, 0x08080808), + RegisterOperation::Write(0x00106A7C, 0x08080808), + RegisterOperation::Write(0x00106A80, 0x08080808), + RegisterOperation::Write(0x00106A84, 0x08080808), + RegisterOperation::Write(0x00106A88, 0x08080808), + RegisterOperation::Write(0x00106A8C, 0x08080808), + RegisterOperation::Write(0x00106A90, 0x08080808), + RegisterOperation::Write(0x00106A94, 0x08080808), + RegisterOperation::Write(0x00106A98, 0x08080808), + RegisterOperation::Write(0x00106A9C, 0x08080808), + RegisterOperation::Write(0x00106AA0, 0x08080808), + RegisterOperation::Write(0x00106AA4, 0x08080808), + RegisterOperation::Write(0x00106AA8, 0x08080808), + RegisterOperation::Write(0x00106AAC, 0x08080808), + RegisterOperation::Write(0x00106AB0, 0x08080808), + RegisterOperation::Write(0x00106AB4, 0x08080808), + RegisterOperation::Write(0x00106AB8, 0x08080808), + RegisterOperation::Write(0x00106ABC, 0x08080808), + RegisterOperation::Write(0x00106AC0, 0x08080808), + RegisterOperation::Write(0x00106AC4, 0x08080808), + RegisterOperation::Write(0x00106AC8, 0x08080808), + RegisterOperation::Write(0x00106ACC, 0x08080808), + RegisterOperation::Write(0x00106AD0, 0x08080808), + RegisterOperation::Write(0x00106AD4, 0x08080808), + RegisterOperation::Write(0x00106AD8, 0x08080808), + RegisterOperation::Write(0x00106ADC, 0x08080808), + RegisterOperation::Write(0x00106AE0, 0x08080808), + RegisterOperation::Write(0x00106AE4, 0x08080808), + RegisterOperation::Write(0x00106AE8, 0x08080808), + RegisterOperation::Write(0x00106AEC, 0x08080808), + RegisterOperation::Write(0x00106AF0, 0x08080808), + RegisterOperation::Write(0x00106AF4, 0x08080808), + RegisterOperation::Write(0x00106AF8, 0x08080808), + RegisterOperation::Write(0x00106AFC, 0x08080808), + RegisterOperation::Write(0x00106B00, 0x08080808), + RegisterOperation::Write(0x00106B04, 0x08080808), + RegisterOperation::Write(0x00106B08, 0x08080808), + RegisterOperation::Write(0x00106B0C, 0x08080808), + RegisterOperation::Write(0x00106B10, 0x08080808), + RegisterOperation::Write(0x00106B14, 0x08080808), + RegisterOperation::Write(0x00106B18, 0x08080808), + RegisterOperation::Write(0x00106B1C, 0x08080808), + RegisterOperation::Write(0x00106B20, 0x08080808), + RegisterOperation::Write(0x00106B24, 0x08080808), + RegisterOperation::Write(0x00106B28, 0x08080808), + RegisterOperation::Write(0x00106B2C, 0x08080808), + RegisterOperation::Write(0x00106B30, 0x08080808), + RegisterOperation::Write(0x00106B34, 0x08080808), + RegisterOperation::Write(0x00106B38, 0x08080808), + RegisterOperation::Write(0x00106B3C, 0x08080808), + RegisterOperation::Write(0x00106B40, 0x08080808), + RegisterOperation::Write(0x00106B44, 0x08080808), + RegisterOperation::Write(0x00106B48, 0x08080808), + RegisterOperation::Write(0x00106B4C, 0x08080808), + RegisterOperation::Write(0x00106B50, 0x08080808), + RegisterOperation::Write(0x00106B54, 0x08080808), + RegisterOperation::Write(0x00106B58, 0x08080808), + RegisterOperation::Write(0x00106B5C, 0x08080808), + RegisterOperation::Write(0x00106B60, 0x08080808), + RegisterOperation::Write(0x00106B64, 0x08080808), + RegisterOperation::Write(0x00106B68, 0x08080808), + RegisterOperation::Write(0x00106B6C, 0x08080808), + RegisterOperation::Write(0x00106B70, 0x08080808), + RegisterOperation::Write(0x00106B74, 0x08080808), + RegisterOperation::Write(0x00106B78, 0x08080808), + RegisterOperation::Write(0x00106B7C, 0x08080808), + RegisterOperation::Write(0x00106B80, 0x08080808), + RegisterOperation::Write(0x00106B84, 0x08080808), + RegisterOperation::Write(0x00106B88, 0x08080808), + RegisterOperation::Write(0x00106B8C, 0x08080808), + RegisterOperation::Write(0x00106B90, 0x08080808), + RegisterOperation::Write(0x00106B94, 0x08080808), + RegisterOperation::Write(0x0010602C, 0x00000000), + RegisterOperation::Write(0x00106800, 0x00000000), + RegisterOperation::Write(0x00106804, 0x00000000), + RegisterOperation::Write(0x00106808, 0x00000000), + RegisterOperation::Write(0x0010680C, 0x00000000), + RegisterOperation::Write(0x00106810, 0x00000000), + RegisterOperation::Write(0x00106814, 0x00000000), + RegisterOperation::Write(0x00106818, 0x00000000), + RegisterOperation::Write(0x0010681C, 0x00000000), + RegisterOperation::Write(0x00106820, 0x00000000), + RegisterOperation::Write(0x00106824, 0x00000000), + RegisterOperation::Write(0x00106828, 0x00000000), + RegisterOperation::Write(0x0010682C, 0x00000000), + RegisterOperation::Write(0x00106830, 0x00000000), + RegisterOperation::Write(0x00106834, 0x00000000), + RegisterOperation::Write(0x00106838, 0x00000000), + RegisterOperation::Write(0x0010683C, 0x00000000), + RegisterOperation::Write(0x00106840, 0x00000000), + RegisterOperation::Write(0x00106844, 0x00000000), + RegisterOperation::Write(0x00106848, 0x00000000), + RegisterOperation::Write(0x0010684C, 0x00000000), + RegisterOperation::Write(0x00106850, 0x00000000), + RegisterOperation::Write(0x00106854, 0x00000000), + RegisterOperation::Write(0x00106858, 0x00000000), + RegisterOperation::Write(0x0010685C, 0x00000000), + RegisterOperation::Write(0x00106860, 0x00000000), + RegisterOperation::Write(0x00106864, 0x00000000), + RegisterOperation::Write(0x00106868, 0x00000000), + RegisterOperation::Write(0x0010686C, 0x00000000), + RegisterOperation::Write(0x00106870, 0x00000000), + RegisterOperation::Write(0x00106874, 0x00000000), + RegisterOperation::Write(0x00106878, 0x00000000), + RegisterOperation::Write(0x0010687C, 0x00000000), + RegisterOperation::Write(0x00106880, 0x00000000), + RegisterOperation::Write(0x00106884, 0x00000000), + RegisterOperation::Write(0x00106888, 0x00000000), + RegisterOperation::Write(0x0010688C, 0x00000000), + RegisterOperation::Write(0x00106890, 0x00000000), + RegisterOperation::Write(0x00106894, 0x00000000), + RegisterOperation::Write(0x00106898, 0x00000000), + RegisterOperation::Write(0x0010689C, 0x00000000), + RegisterOperation::Write(0x001068A0, 0x00000000), + RegisterOperation::Write(0x001068A4, 0x00000000), + RegisterOperation::Write(0x001068A8, 0x00000000), + RegisterOperation::Write(0x001068AC, 0x00000000), + RegisterOperation::Write(0x001068B0, 0x00000000), + RegisterOperation::Write(0x001068B4, 0x00000000), + RegisterOperation::Write(0x001068B8, 0x00000000), + RegisterOperation::Write(0x001068BC, 0x00000000), + RegisterOperation::Write(0x001068C0, 0x00000000), + RegisterOperation::Write(0x001068C4, 0x00000000), + RegisterOperation::Write(0x001068C8, 0x00000000), + RegisterOperation::Write(0x001068CC, 0x00000000), + RegisterOperation::Write(0x001068D0, 0x00000000), + RegisterOperation::Write(0x001068D4, 0x00000000), + RegisterOperation::Write(0x001068D8, 0x00000000), + RegisterOperation::Write(0x001068DC, 0x00000000), + RegisterOperation::Write(0x001068E0, 0x00000000), + RegisterOperation::Write(0x001068E4, 0x00000000), + RegisterOperation::Write(0x001068E8, 0x00000000), + RegisterOperation::Write(0x001068EC, 0x00000000), + RegisterOperation::Write(0x001068F0, 0x00000000), + RegisterOperation::Write(0x001068F4, 0x00000000), + RegisterOperation::Write(0x001068F8, 0x00000000), + RegisterOperation::Write(0x001068FC, 0x00000000), + RegisterOperation::Write(0x00106900, 0x00000000), + RegisterOperation::Write(0x00106904, 0x00000000), + RegisterOperation::Write(0x00106908, 0x00000000), + RegisterOperation::Write(0x0010690C, 0x00000000), + RegisterOperation::Write(0x00106910, 0x00000000), + RegisterOperation::Write(0x00106914, 0x00000000), + RegisterOperation::Write(0x00106918, 0x00000000), + RegisterOperation::Write(0x0010691C, 0x00000000), + RegisterOperation::Write(0x00106920, 0x00000000), + RegisterOperation::Write(0x00106924, 0x00000000), + RegisterOperation::Write(0x00106928, 0x00000000), + RegisterOperation::Write(0x0010692C, 0x00000000), + RegisterOperation::Write(0x00106930, 0x00000000), + RegisterOperation::Write(0x00106934, 0x00000000), + RegisterOperation::Write(0x00106938, 0x00000000), + RegisterOperation::Write(0x0010693C, 0x00000000), + RegisterOperation::Write(0x00106940, 0x00000000), + RegisterOperation::Write(0x00106944, 0x00000000), + RegisterOperation::Write(0x00106948, 0x00000000), + RegisterOperation::Write(0x0010694C, 0x00000000), + RegisterOperation::Write(0x00106950, 0x00000000), + RegisterOperation::Write(0x00106954, 0x00000000), + RegisterOperation::Write(0x00106958, 0x00000000), + RegisterOperation::Write(0x0010695C, 0x00000000), + RegisterOperation::Write(0x00106960, 0x00000000), + RegisterOperation::Write(0x00106964, 0x00000000), + RegisterOperation::Write(0x00106968, 0x00000000), + RegisterOperation::Write(0x0010696C, 0x00000000), + RegisterOperation::Write(0x00106970, 0x00000000), + RegisterOperation::Write(0x00106974, 0x00000000), + RegisterOperation::Write(0x00106978, 0x00000000), + RegisterOperation::Write(0x0010697C, 0x00000000), + RegisterOperation::Write(0x00106980, 0x00000000), + RegisterOperation::Write(0x00106984, 0x00000000), + RegisterOperation::Write(0x00106988, 0x00000000), + RegisterOperation::Write(0x0010698C, 0x00000000), + RegisterOperation::Write(0x00106990, 0x00000000), + RegisterOperation::Write(0x00106994, 0x00000000), + RegisterOperation::Write(0x00106998, 0x00000000), + RegisterOperation::Write(0x0010699C, 0x00000000), + RegisterOperation::Write(0x001069A0, 0x00000000), + RegisterOperation::Write(0x001069A4, 0x00000000), + RegisterOperation::Write(0x001069A8, 0x00000000), + RegisterOperation::Write(0x001069AC, 0x00000000), + RegisterOperation::Write(0x001069B0, 0x00000000), + RegisterOperation::Write(0x001069B4, 0x00000000), + RegisterOperation::Write(0x001069B8, 0x00000000), + RegisterOperation::Write(0x001069BC, 0x00000000), + RegisterOperation::Write(0x001069C0, 0x00000000), + RegisterOperation::Write(0x001069C4, 0x00000000), + RegisterOperation::Write(0x001069C8, 0x00000000), + RegisterOperation::Write(0x001069CC, 0x00000000), + RegisterOperation::Write(0x001069D0, 0x00000000), + RegisterOperation::Write(0x001069D4, 0x00000000), + RegisterOperation::Write(0x001069D8, 0x00000000), + RegisterOperation::Write(0x001069DC, 0x00000000), + RegisterOperation::Write(0x001069E0, 0x00000000), + RegisterOperation::Write(0x001069E4, 0x00000000), + RegisterOperation::Write(0x001069E8, 0x00000000), + RegisterOperation::Write(0x001069EC, 0x00000000), + RegisterOperation::Write(0x001069F0, 0x00000000), + RegisterOperation::Write(0x001069F4, 0x00000000), + RegisterOperation::Write(0x001069F8, 0x00000000), + RegisterOperation::Write(0x001069FC, 0x00000000), + RegisterOperation::Write(0x00106A00, 0x00000000), + RegisterOperation::Write(0x00106A04, 0x00000000), + RegisterOperation::Write(0x00106A08, 0x00000000), + RegisterOperation::Write(0x00106A0C, 0x00000000), + RegisterOperation::Write(0x00106A10, 0x00000000), + RegisterOperation::Write(0x00106A14, 0x00000000), + RegisterOperation::Write(0x00106A18, 0x00000000), + RegisterOperation::Write(0x00106A1C, 0x00000000), + RegisterOperation::Write(0x00106A20, 0x00000000), + RegisterOperation::Write(0x00106A24, 0x00000000), + RegisterOperation::Write(0x00106A28, 0x00000000), + RegisterOperation::Write(0x00106A2C, 0x00000000), + RegisterOperation::Write(0x00106A30, 0x00000000), + RegisterOperation::Write(0x00106A34, 0x00000000), + RegisterOperation::Write(0x00106A38, 0x00000000), + RegisterOperation::Write(0x00106A3C, 0x00000000), + RegisterOperation::Write(0x00106A40, 0x00000000), + RegisterOperation::Write(0x00106A44, 0x00000000), + RegisterOperation::Write(0x00106A48, 0x00000000), + RegisterOperation::Write(0x00106A4C, 0x00000000), + RegisterOperation::Write(0x00106A50, 0x00000000), + RegisterOperation::Write(0x00106A54, 0x00000000), + RegisterOperation::Write(0x00106A58, 0x00000000), + RegisterOperation::Write(0x00106A5C, 0x00000000), + RegisterOperation::Write(0x00106A60, 0x00000000), + RegisterOperation::Write(0x00106A64, 0x00000000), + RegisterOperation::Write(0x00106A68, 0x00000000), + RegisterOperation::Write(0x00106A6C, 0x00000000), + RegisterOperation::Write(0x00106A70, 0x00000000), + RegisterOperation::Write(0x00106A74, 0x00000000), + RegisterOperation::Write(0x00106A78, 0x00000000), + RegisterOperation::Write(0x00106A7C, 0x00000000), + RegisterOperation::Write(0x00106A80, 0x00000000), + RegisterOperation::Write(0x00106A84, 0x00000000), + RegisterOperation::Write(0x00106A88, 0x00000000), + RegisterOperation::Write(0x00106A8C, 0x00000000), + RegisterOperation::Write(0x00106A90, 0x00000000), + RegisterOperation::Write(0x00106A94, 0x00000000), + RegisterOperation::Write(0x00106A98, 0x00000000), + RegisterOperation::Write(0x00106A9C, 0x00000000), + RegisterOperation::Write(0x00106AA0, 0x00000000), + RegisterOperation::Write(0x00106AA4, 0x00000000), + RegisterOperation::Write(0x00106AA8, 0x00000000), + RegisterOperation::Write(0x00106AAC, 0x00000000), + RegisterOperation::Write(0x00106AB0, 0x00000000), + RegisterOperation::Write(0x00106AB4, 0x00000000), + RegisterOperation::Write(0x00106AB8, 0x00000000), + RegisterOperation::Write(0x00106ABC, 0x00000000), + RegisterOperation::Write(0x00106AC0, 0x00000000), + RegisterOperation::Write(0x00106AC4, 0x00000000), + RegisterOperation::Write(0x00106AC8, 0x00000000), + RegisterOperation::Write(0x00106ACC, 0x00000000), + RegisterOperation::Write(0x00106AD0, 0x00000000), + RegisterOperation::Write(0x00106AD4, 0x00000000), + RegisterOperation::Write(0x00106AD8, 0x00000000), + RegisterOperation::Write(0x00106ADC, 0x00000000), + RegisterOperation::Write(0x00106AE0, 0x00000000), + RegisterOperation::Write(0x00106AE4, 0x00000000), + RegisterOperation::Write(0x00106AE8, 0x00000000), + RegisterOperation::Write(0x00106AEC, 0x00000000), + RegisterOperation::Write(0x00106AF0, 0x00000000), + RegisterOperation::Write(0x00106AF4, 0x00000000), + RegisterOperation::Write(0x00106AF8, 0x00000000), + RegisterOperation::Write(0x00106AFC, 0x00000000), + RegisterOperation::Write(0x00106B00, 0x00000000), + RegisterOperation::Write(0x00106B04, 0x00000000), + RegisterOperation::Write(0x00106B08, 0x00000000), + RegisterOperation::Write(0x00106B0C, 0x00000000), + RegisterOperation::Write(0x00106B10, 0x00000000), + RegisterOperation::Write(0x00106B14, 0x00000000), + RegisterOperation::Write(0x00106B18, 0x00000000), + RegisterOperation::Write(0x00106B1C, 0x00000000), + RegisterOperation::Write(0x00106B20, 0x00000000), + RegisterOperation::Write(0x00106B24, 0x00000000), + RegisterOperation::Write(0x00106B28, 0x00000000), + RegisterOperation::Write(0x00106B2C, 0x00000000), + RegisterOperation::Write(0x00106B30, 0x00000000), + RegisterOperation::Write(0x00106B34, 0x00000000), + RegisterOperation::Write(0x00106B38, 0x00000000), + RegisterOperation::Write(0x00106B3C, 0x00000000), + RegisterOperation::Write(0x00106B40, 0x00000000), + RegisterOperation::Write(0x00106B44, 0x00000000), + RegisterOperation::Write(0x00106B48, 0x00000000), + RegisterOperation::Write(0x00106B4C, 0x00000000), + RegisterOperation::Write(0x00106B50, 0x00000000), + RegisterOperation::Write(0x00106B54, 0x00000000), + RegisterOperation::Write(0x00106B58, 0x00000000), + RegisterOperation::Write(0x00106B5C, 0x00000000), + RegisterOperation::Write(0x00106B60, 0x00000000), + RegisterOperation::Write(0x00106B64, 0x00000000), + RegisterOperation::Write(0x00106B68, 0x00000000), + RegisterOperation::Write(0x00106B6C, 0x00000000), + RegisterOperation::Write(0x00106B70, 0x00000000), + RegisterOperation::Write(0x00106B74, 0x00000000), + RegisterOperation::Write(0x00106B78, 0x00000000), + RegisterOperation::Write(0x00106B7C, 0x00000000), + RegisterOperation::Write(0x00106B80, 0x00000000), + RegisterOperation::Write(0x00106B84, 0x00000000), + RegisterOperation::Write(0x00106B88, 0x00000000), + RegisterOperation::Write(0x00106B8C, 0x00000000), + RegisterOperation::Write(0x00106B90, 0x00000000), + RegisterOperation::Write(0x00106B94, 0x00000000), + RegisterOperation::Write(0x00106400, 0x00010000), + RegisterOperation::Write(0x00106404, 0x00030002), + RegisterOperation::Write(0x00106408, 0x00050004), + RegisterOperation::Write(0x0010640C, 0x00070006), + RegisterOperation::Write(0x00106410, 0x00090008), + RegisterOperation::Write(0x00106414, 0x000B000A), + RegisterOperation::Write(0x00106418, 0x000D000C), + RegisterOperation::Write(0x0010641C, 0x000F000E), + RegisterOperation::Write(0x00106420, 0x00110010), + RegisterOperation::Write(0x00106424, 0x00130012), + RegisterOperation::Write(0x00106428, 0x00150014), + RegisterOperation::Write(0x0010642C, 0x00170016), + RegisterOperation::Write(0x00106430, 0x00190018), + RegisterOperation::Write(0x00106434, 0x001B001A), + RegisterOperation::Write(0x00106438, 0x001D001C), + RegisterOperation::Write(0x0010643C, 0x001F001E), + RegisterOperation::Write(0x00106440, 0x00210020), + RegisterOperation::Write(0x00106444, 0x00230022), + RegisterOperation::Write(0x00106448, 0x00250024), + RegisterOperation::Write(0x0010644C, 0x00270026), + RegisterOperation::Write(0x00106450, 0x00290028), + RegisterOperation::Write(0x00106454, 0x002B002A), + RegisterOperation::Write(0x00106458, 0x002D002C), + RegisterOperation::Write(0x0010645C, 0x002F002E), + RegisterOperation::Write(0x00106460, 0x00310030), + RegisterOperation::Write(0x00106464, 0x00330032), + RegisterOperation::Write(0x00106468, 0x00350034), + RegisterOperation::Write(0x0010646C, 0x00370036), + RegisterOperation::Write(0x00106470, 0x00390038), + RegisterOperation::Write(0x00106474, 0x003B003A), + RegisterOperation::Write(0x00106478, 0x003D003C), + RegisterOperation::Write(0x0010647C, 0x003F003E), + RegisterOperation::Write(0x00106480, 0x00410040), + RegisterOperation::Write(0x00106484, 0x00430042), + RegisterOperation::Write(0x00106488, 0x00450044), + RegisterOperation::Write(0x0010648C, 0x00470046), + RegisterOperation::Write(0x00106490, 0x00490048), + RegisterOperation::Write(0x00106494, 0x004B004A), + RegisterOperation::Write(0x00106498, 0x004D004C), + RegisterOperation::Write(0x0010649C, 0x004F004E), + RegisterOperation::Write(0x001064A0, 0x00510050), + RegisterOperation::Write(0x001064A4, 0x00530052), + RegisterOperation::Write(0x001064A8, 0x00550054), + RegisterOperation::Write(0x001064AC, 0x00570056), + RegisterOperation::Write(0x001064B0, 0x00590058), + RegisterOperation::Write(0x001064B4, 0x005B005A), + RegisterOperation::Write(0x001064B8, 0x005D005C), + RegisterOperation::Write(0x001064BC, 0x005F005E), + RegisterOperation::Write(0x001064C0, 0x00610060), + RegisterOperation::Write(0x001064C4, 0x00630062), + RegisterOperation::Write(0x001064C8, 0x00650064), + RegisterOperation::Write(0x001064CC, 0x00670066), + RegisterOperation::Write(0x001064D0, 0x00690068), + RegisterOperation::Write(0x001064D4, 0x006B006A), + RegisterOperation::Write(0x001064D8, 0x006D006C), + RegisterOperation::Write(0x001064DC, 0x006F006E), + RegisterOperation::Write(0x001064E0, 0x00710070), + RegisterOperation::Write(0x001064E4, 0x00730072), + RegisterOperation::Write(0x001064E8, 0x00750074), + RegisterOperation::Write(0x001064EC, 0x00770076), + RegisterOperation::Write(0x001064F0, 0x00790078), + RegisterOperation::Write(0x001064F4, 0x007B007A), + RegisterOperation::Write(0x001064F8, 0x007D007C), + RegisterOperation::Write(0x001064FC, 0x007F007E), + RegisterOperation::Write(0x00106500, 0x00810080), + RegisterOperation::Write(0x00106504, 0x00830082), + RegisterOperation::Write(0x00106508, 0x00850084), + RegisterOperation::Write(0x0010650C, 0x00870086), + RegisterOperation::Write(0x00106510, 0x00890088), + RegisterOperation::Write(0x00106514, 0x008B008A), + RegisterOperation::Write(0x00106518, 0x008D008C), + RegisterOperation::Write(0x0010651C, 0x008F008E), + RegisterOperation::Write(0x00106520, 0x00910090), + RegisterOperation::Write(0x00106524, 0x00930092), + RegisterOperation::Write(0x00106528, 0x00950094), + RegisterOperation::Write(0x0010652C, 0x00970096), + RegisterOperation::Write(0x00106530, 0x00990098), + RegisterOperation::Write(0x00106534, 0x009B009A), + RegisterOperation::Write(0x00106538, 0x009D009C), + RegisterOperation::Write(0x0010653C, 0x009F009E), + RegisterOperation::Write(0x00106540, 0x00A100A0), + RegisterOperation::Write(0x00106544, 0x00A300A2), + RegisterOperation::Write(0x00106548, 0x00A500A4), + RegisterOperation::Write(0x0010654C, 0x00A700A6), + RegisterOperation::Write(0x00106550, 0x00A900A8), + RegisterOperation::Write(0x00106554, 0x00AB00AA), + RegisterOperation::Write(0x00106558, 0x00AD00AC), + RegisterOperation::Write(0x0010655C, 0x00AF00AE), + RegisterOperation::Write(0x00106560, 0x00B100B0), + RegisterOperation::Write(0x00106564, 0x00B300B2), + RegisterOperation::Write(0x00106568, 0x00B500B4), + RegisterOperation::Write(0x0010656C, 0x00B700B6), + RegisterOperation::Write(0x00106570, 0x00B900B8), + RegisterOperation::Write(0x00106574, 0x00BB00BA), + RegisterOperation::Write(0x00106578, 0x00BD00BC), + RegisterOperation::Write(0x0010657C, 0x00BF00BE), + RegisterOperation::Write(0x00106580, 0x00C100C0), + RegisterOperation::Write(0x00106584, 0x00C300C2), + RegisterOperation::Write(0x00106588, 0x00C500C4), + RegisterOperation::Write(0x0010658C, 0x00C700C6), + RegisterOperation::Write(0x00106590, 0x00C900C8), + RegisterOperation::Write(0x00106594, 0x00CB00CA), + RegisterOperation::Write(0x00106598, 0x00CD00CC), + RegisterOperation::Write(0x0010659C, 0x00CF00CE), + RegisterOperation::Write(0x001065A0, 0x00D100D0), + RegisterOperation::Write(0x001065A4, 0x00D300D2), + RegisterOperation::Write(0x001065A8, 0x00D500D4), + RegisterOperation::Write(0x001065AC, 0x00D700D6), + RegisterOperation::Write(0x001065B0, 0x00D900D8), + RegisterOperation::Write(0x001065B4, 0x00DB00DA), + RegisterOperation::Write(0x001065B8, 0x00DD00DC), + RegisterOperation::Write(0x001065BC, 0x00DF00DE), + RegisterOperation::Write(0x001065C0, 0x00E100E0), + RegisterOperation::Write(0x001065C4, 0x00E300E2), + RegisterOperation::Write(0x001065C8, 0x00E500E4), + RegisterOperation::Write(0x001065CC, 0x00E700E6), + RegisterOperation::Write(0x001065D0, 0x00E900E8), + RegisterOperation::Write(0x001065D4, 0x00EB00EA), + RegisterOperation::Write(0x001065D8, 0x00ED00EC), + RegisterOperation::Write(0x001065DC, 0x00EF00EE), + RegisterOperation::Write(0x001065E0, 0x00F100F0), + RegisterOperation::Write(0x001065E4, 0x00F300F2), + RegisterOperation::Write(0x001065E8, 0x00F500F4), + RegisterOperation::Write(0x001065EC, 0x00F700F6), + RegisterOperation::Write(0x001065F0, 0x00F900F8), + RegisterOperation::Write(0x001065F4, 0x00FB00FA), + RegisterOperation::Write(0x001065F8, 0x00FD00FC), + RegisterOperation::Write(0x001065FC, 0x00FF00FE), + RegisterOperation::Write(0x00106600, 0x01010100), + RegisterOperation::Write(0x00106604, 0x01030102), + RegisterOperation::Write(0x00106608, 0x01050104), + RegisterOperation::Write(0x0010660C, 0x01070106), + RegisterOperation::Write(0x00106610, 0x01090108), + RegisterOperation::Write(0x00106614, 0x010B010A), + RegisterOperation::Write(0x00106618, 0x010D010C), + RegisterOperation::Write(0x0010661C, 0x010F010E), + RegisterOperation::Write(0x00106620, 0x01110110), + RegisterOperation::Write(0x00106624, 0x01130112), + RegisterOperation::Write(0x00106628, 0x01150114), + RegisterOperation::Write(0x0010662C, 0x01170116), + RegisterOperation::Write(0x00106630, 0x01190118), + RegisterOperation::Write(0x00106634, 0x011B011A), + RegisterOperation::Write(0x00106638, 0x011D011C), + RegisterOperation::Write(0x0010663C, 0x011F011E), + RegisterOperation::Write(0x00106640, 0x01210120), + RegisterOperation::Write(0x00106644, 0x01230122), + RegisterOperation::Write(0x00106648, 0x01250124), + RegisterOperation::Write(0x0010664C, 0x01270126), + RegisterOperation::Write(0x00106650, 0x01290128), + RegisterOperation::Write(0x00106654, 0x012B012A), + RegisterOperation::Write(0x00106658, 0x012D012C), + RegisterOperation::Write(0x0010665C, 0x012F012E), + RegisterOperation::Write(0x00106660, 0x01310130), + RegisterOperation::Write(0x00106664, 0x01330132), + RegisterOperation::Write(0x00106668, 0x01350134), + RegisterOperation::Write(0x0010666C, 0x01370136), + RegisterOperation::Write(0x00106670, 0x01390138), + RegisterOperation::Write(0x00106674, 0x013B013A), + RegisterOperation::Write(0x00106678, 0x013D013C), + RegisterOperation::Write(0x0010667C, 0x013F013E), + RegisterOperation::Write(0x00106680, 0x01410140), + RegisterOperation::Write(0x00106684, 0x01430142), + RegisterOperation::Write(0x00106688, 0x01450144), + RegisterOperation::Write(0x0010668C, 0x01470146), + RegisterOperation::Write(0x00106690, 0x01490148), + RegisterOperation::Write(0x00106694, 0x014B014A), + RegisterOperation::Write(0x00106698, 0x014D014C), + RegisterOperation::Write(0x0010669C, 0x014F014E), + RegisterOperation::Write(0x001066A0, 0x01510150), + RegisterOperation::Write(0x001066A4, 0x01530152), + RegisterOperation::Write(0x001066A8, 0x01550154), + RegisterOperation::Write(0x001066AC, 0x01570156), + RegisterOperation::Write(0x001066B0, 0x01590158), + RegisterOperation::Write(0x001066B4, 0x015B015A), + RegisterOperation::Write(0x001066B8, 0x015D015C), + RegisterOperation::Write(0x001066BC, 0x015F015E), + RegisterOperation::Write(0x001066C0, 0x01610160), + RegisterOperation::Write(0x001066C4, 0x01630162), + RegisterOperation::Write(0x001066C8, 0x01650164), + RegisterOperation::Write(0x001066CC, 0x01670166), + RegisterOperation::Write(0x001066D0, 0x01690168), + RegisterOperation::Write(0x001066D4, 0x016B016A), + RegisterOperation::Write(0x001066D8, 0x016D016C), + RegisterOperation::Write(0x001066DC, 0x016F016E), + RegisterOperation::Write(0x001066E0, 0x01710170), + RegisterOperation::Write(0x001066E4, 0x01730172), + RegisterOperation::Write(0x001066E8, 0x01750174), + RegisterOperation::Write(0x001066EC, 0x01770176), + RegisterOperation::Write(0x001066F0, 0x01790178), + RegisterOperation::Write(0x001066F4, 0x017B017A), + RegisterOperation::Write(0x001066F8, 0x017D017C), + RegisterOperation::Write(0x001066FC, 0x017F017E), + RegisterOperation::Write(0x00106700, 0x01810180), + RegisterOperation::Write(0x00106704, 0x01830182), + RegisterOperation::Write(0x00106708, 0x01850184), + RegisterOperation::Write(0x0010670C, 0x01870186), + RegisterOperation::Write(0x00106710, 0x01890188), + RegisterOperation::Write(0x00106714, 0x018B018A), + RegisterOperation::Write(0x00106718, 0x018D018C), + RegisterOperation::Write(0x0010671C, 0x018F018E), + RegisterOperation::Write(0x00106720, 0x01910190), + RegisterOperation::Write(0x00106724, 0x01930192), + RegisterOperation::Write(0x00106728, 0x01950194), + RegisterOperation::Write(0x0010672C, 0x01970196), + RegisterOperation::Write(0x00106730, 0x01990198), + RegisterOperation::Write(0x00106734, 0x019B019A), + RegisterOperation::Write(0x00106738, 0x019D019C), + RegisterOperation::Write(0x0010673C, 0x019F019E), + RegisterOperation::Write(0x00106740, 0x01A101A0), + RegisterOperation::Write(0x00106744, 0x01A301A2), + RegisterOperation::Write(0x00106748, 0x01A501A4), + RegisterOperation::Write(0x0010674C, 0x01A701A6), + RegisterOperation::Write(0x00106750, 0x01A901A8), + RegisterOperation::Write(0x00106754, 0x01AB01AA), + RegisterOperation::Write(0x00106758, 0x01AD01AC), + RegisterOperation::Write(0x0010675C, 0x01AF01AE), + RegisterOperation::Write(0x00106760, 0x01B101B0), + RegisterOperation::Write(0x00106764, 0x01B301B2), + RegisterOperation::Write(0x00106768, 0x01B501B4), + RegisterOperation::Write(0x0010676C, 0x01B701B6), + RegisterOperation::Write(0x00106770, 0x01B901B8), + RegisterOperation::Write(0x00106774, 0x01BB01BA), + RegisterOperation::Write(0x00106778, 0x01BD01BC), + RegisterOperation::Write(0x0010677C, 0x01BF01BE), + RegisterOperation::Write(0x00106780, 0x01C101C0), + RegisterOperation::Write(0x00106784, 0x01C301C2), + RegisterOperation::Write(0x00106788, 0x01C501C4), + RegisterOperation::Write(0x0010678C, 0x01C701C6), + RegisterOperation::Write(0x00106790, 0x01C901C8), + RegisterOperation::Write(0x00106794, 0x01CB01CA), + RegisterOperation::Write(0x00106798, 0x01CD01CC), + RegisterOperation::Write(0x0010679C, 0x01CF01CE), + RegisterOperation::Write(0x001067A0, 0x01D101D0), + RegisterOperation::Write(0x001067A4, 0x01D301D2), + RegisterOperation::Write(0x001067A8, 0x01D501D4), + RegisterOperation::Write(0x001067AC, 0x01D701D6), + RegisterOperation::Write(0x001067B0, 0x01D901D8), + RegisterOperation::Write(0x001067B4, 0x01DB01DA), + RegisterOperation::Write(0x001067B8, 0x01DD01DC), + RegisterOperation::Write(0x001067BC, 0x01DF01DE), + RegisterOperation::Write(0x001067C0, 0x01E101E0), + RegisterOperation::Write(0x001067C4, 0x01E301E2), + RegisterOperation::Write(0x001067C8, 0x01E501E4), + RegisterOperation::Write(0x001067CC, 0x01E701E6), + RegisterOperation::Write(0x001067D0, 0x01E901E8), + RegisterOperation::Write(0x001067D4, 0x01EB01EA), + RegisterOperation::Write(0x001067D8, 0x01ED01EC), + RegisterOperation::Write(0x001067DC, 0x01EF01EE), + RegisterOperation::Write(0x001067E0, 0x01F101F0), + RegisterOperation::Write(0x001067E4, 0x01F301F2), + RegisterOperation::Write(0x001067E8, 0x01F501F4), + RegisterOperation::Write(0x001067EC, 0x01F701F6), + RegisterOperation::Write(0x001067F0, 0x01F901F8), + RegisterOperation::Write(0x001067F4, 0x01FB01FA), + RegisterOperation::Write(0x001067F8, 0x01FD01FC), + RegisterOperation::Write(0x001067FC, 0x01FF01FE), + RegisterOperation::Write(0x00106080, 0x03020100), + RegisterOperation::Write(0x00106084, 0x07060504), + RegisterOperation::Write(0x00106088, 0x0B0A0908), + RegisterOperation::Write(0x0010608C, 0x0F0E0D0C), + RegisterOperation::Write(0x00106090, 0x13121110), + RegisterOperation::Write(0x00106094, 0x17161514), + RegisterOperation::Write(0x00106098, 0x1B1A1918), + RegisterOperation::Write(0x0010609C, 0x1F1E1D1C), + RegisterOperation::Write(0x001060C0, 0x03020100), + RegisterOperation::Write(0x001060C4, 0x07060504), + RegisterOperation::Write(0x001060C8, 0x0B0A0908), + RegisterOperation::Write(0x001060CC, 0x0F0E0D0C), + RegisterOperation::Write(0x001060D0, 0x13121110), + RegisterOperation::Write(0x001060D4, 0x17161514), + RegisterOperation::Write(0x001060D8, 0x1B1A1918), + RegisterOperation::Write(0x001060DC, 0x1F1E1D1C), + RegisterOperation::Write(0x00106028, 0x00000003), + RegisterOperation::Write(0x00106050, 0x00000000), + RegisterOperation::Write(0x00106060, 0x00000000), + RegisterOperation::Write(0x00106070, 0x00000000), + RegisterOperation::Write(0x00106000, 0x00155401), + RegisterOperation::Write(0x0010D000, 0x00000005), + RegisterOperation::Write(0x0010C000, 0x00000005), + RegisterOperation::Write(0x00109000, 0x00000208), + RegisterOperation::Write(0x00107008, 0x00000001), + RegisterOperation::Write(0x00107000, 0x00070001), + RegisterOperation::Write(0x00108000, 0x0001E085), + RegisterOperation::Write(0x00109008, 0x0000064A), + RegisterOperation::Write(0x00100044, 0xCCFFFCCF), + RegisterOperation::Write(0x00100004, 0xF0005442), + // Analog INIT + RegisterOperation::Write(0x00100004, 0xF0005042), + RegisterOperation::Write(0x0010002C, 0x00200224), + RegisterOperation::Write(0x0010A000, 0x00000101), + RegisterOperation::Write(0x0010A000, 0x000000A1), + RegisterOperation::Delay(200), + RegisterOperation::Read(0x0010A000, 0x000002A1, 0x00000200), + RegisterOperation::Write(0x0010A008, 0x00002405), + RegisterOperation::Delay(200), + RegisterOperation::Read(0x0010A008, 0x00082405, 0x00080000), + RegisterOperation::Write(0x0010A004, 0x00000101), + RegisterOperation::Write(0x0010A004, 0x000000A1), + RegisterOperation::Delay(200), + RegisterOperation::Read(0x0010A004, 0x000002A1, 0x00000200), + RegisterOperation::Write(0x0010A020, 0x00000170), + RegisterOperation::Write(0x0010A020, 0x00000160), + RegisterOperation::Delay(200), + RegisterOperation::Write(0x0010A008, 0x00082401), + RegisterOperation::Write(0x0010004C, 0x00007141), + RegisterOperation::Write(0x00100054, 0x00000210), + RegisterOperation::Write(0x00100008, 0x60000000), + RegisterOperation::Write(0x00101104, 0x00000001), + RegisterOperation::Write(0x0010A010, 0x0000A06B), + RegisterOperation::Delay(300), + RegisterOperation::Write(0x00101100, 0x00000004), + RegisterOperation::Delay(200), + RegisterOperation::Read(0x0010A010, 0x0180A06B, 0x00800000), + RegisterOperation::Write(0x0010A010, 0x0180A063), + RegisterOperation::Write(0x0010A00C, 0x00000404), + RegisterOperation::Write(0x0010A00C, 0x00000405), + RegisterOperation::Delay(1000), + RegisterOperation::Write(0x0010A00C, 0x00000401), + RegisterOperation::Delay(300), + RegisterOperation::Write(0x00100070, 0x00400000), + RegisterOperation::Write(0x0010006C, 0x0EE47117), + RegisterOperation::Delay(100), + RegisterOperation::Write(0x0010006C, 0x0EE4711F), + RegisterOperation::Delay(100), + RegisterOperation::Write(0x00100070, 0x00480000), + RegisterOperation::Delay(1000), + RegisterOperation::Write(0x00101044, 0x01A98A7C), + RegisterOperation::Write(0x00101040, 0x01A98A94), + RegisterOperation::Write(0x00101048, 0x01A98B94), + RegisterOperation::Write(0x0010101C, 0x01A1575B), + RegisterOperation::Write(0x00101050, 0x01A1B251), + RegisterOperation::Write(0x00101020, 0x01A9CD44), + RegisterOperation::Write(0x0010100C, 0x01A1FF00), + RegisterOperation::Write(0x00101018, 0x01A13734), + RegisterOperation::Write(0x00101010, 0x01A16373), + RegisterOperation::Write(0x00101014, 0x01A15050), + RegisterOperation::Write(0x00101004, 0x01A1E84A), + RegisterOperation::Write(0x00101008, 0x01210000), + RegisterOperation::Write(0x00101000, 0x01A1C469), + RegisterOperation::Write(0x0010104C, 0x01A19278), + RegisterOperation::Write(0x00101100, 0x00000005), + RegisterOperation::Write(0x0010002C, 0x0022C724), + RegisterOperation::Write(0x00100018, 0x00000200), + RegisterOperation::Read(0x00100014, 0xA0301003, 0xFFFFFFFF) +}; + +static const std::vector gen41_evk2_start = { + RegisterOperation::Write(0x00000044, 0x00000001), + RegisterOperation::Write(0x00000014, 0x00000001), + RegisterOperation::Write(0x0070F000, 0x00400001), + RegisterOperation::Write(0x0010B000, 0x00000159), + RegisterOperation::Write(0x00109028, 0x00000000), + RegisterOperation::Write(0x00109008, 0x0000064B), + // Analog START + RegisterOperation::Write(0x0010002C, 0x0022C724), + RegisterOperation::Write(0x00100004, 0xF0005442), + RegisterOperation::Write(0x00000018, 0x00000001), + RegisterOperation::WriteField(0x00000008, 0x0000004F, 0x1) +}; + +static const std::vector gen41_evk2_stop = { + RegisterOperation::Write(0x00000018, 0x00000000), + RegisterOperation::WriteField(0x00000008, 0x0000004E, 0x1), + // Analog STOP + RegisterOperation::Write(0x00100004, 0xF0005042), + RegisterOperation::Write(0x0010002C, 0x0022C324), + // Digital STOP + RegisterOperation::Read(0x0010C000, 0x00000005, 0x00000007), + RegisterOperation::Write(0x0010C000, 0x00000002), + RegisterOperation::Write(0x00109028, 0x00000002), + RegisterOperation::Write(0x0010C000, 0x00000005), + RegisterOperation::Delay(1000), + RegisterOperation::Write(0x00109008, 0x0000064A), + RegisterOperation::Read(0x00700010, 0x00030002, 0xFFFF000F), + RegisterOperation::Read(0x00700024, 0x00060000, 0xE07E3FFF), + RegisterOperation::Write(0x0010B000, 0x00000158), + RegisterOperation::Delay(300) +}; + +static const std::vector gen41_evk2_destroy = { + // Analog DESTROY + RegisterOperation::Write(0x00100070, 0x00400000), + RegisterOperation::Write(0x0010006C, 0x0EE47114), + RegisterOperation::Delay(500), + RegisterOperation::Write(0x0010A00C, 0x00000400), + RegisterOperation::Delay(500), + RegisterOperation::Write(0x0010A010, 0x00008068), + RegisterOperation::Delay(200), + RegisterOperation::Write(0x00101104, 0x00000000), + RegisterOperation::Delay(200), + RegisterOperation::Write(0x0010A020, 0x00000060), + RegisterOperation::Delay(200), + RegisterOperation::Write(0x0010A004, 0x000002A0), + RegisterOperation::Delay(200), + RegisterOperation::Write(0x0010A008, 0x00002400), + RegisterOperation::Delay(200), + RegisterOperation::Write(0x0010A000, 0x000002A0), + // Digital DESTROY + RegisterOperation::Write(0x0010B044, 0x00000000), + RegisterOperation::Write(0x0010B004, 0x0000000A), + RegisterOperation::Write(0x0010B040, 0x0000000E), + RegisterOperation::Write(0x0010B0C8, 0x00000000), + RegisterOperation::Write(0x0010B040, 0x00000006), + RegisterOperation::Write(0x0010B040, 0x00000004), + RegisterOperation::Write(0x00100000, 0x4C006442), + RegisterOperation::Write(0x00100000, 0x0C006442), + RegisterOperation::Write(0x0010B07C, 0x00000000), + RegisterOperation::Write(0x0070F030, 0x00000200), + RegisterOperation::Write(0x0070F030, 0x00000000), + RegisterOperation::Delay(1000), + RegisterOperation::Write(0x0070F038, 0x01405000), + RegisterOperation::Write(0x0070F024, 0x00000001), + RegisterOperation::Write(0x0070F024, 0x00000000), + RegisterOperation::Write(0x00000004, 0x00000777), + RegisterOperation::Write(0x00000004, 0x00010111), + RegisterOperation::Write(0x00000004, 0x00000000) +}; + +static Issd gen41_evk2_sequence = Issd{ + gen41_evk2_init, + gen41_evk2_start, + gen41_evk2_stop, + gen41_evk2_destroy, +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_GEN41_EVK2_ISSD_H + +// clang-format on diff --git a/hal_psee_plugins/include/devices/gen41/gen41_evk2_regmap_builder.h b/hal_psee_plugins/include/devices/gen41/gen41_evk2_regmap_builder.h new file mode 100644 index 000000000..1388a9de8 --- /dev/null +++ b/hal_psee_plugins/include/devices/gen41/gen41_evk2_regmap_builder.h @@ -0,0 +1,23 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_GEN41_EVK2_REGMAP_BUILDER_H +#define METAVISION_HAL_GEN41_EVK2_REGMAP_BUILDER_H + +#include "utils/register_map.h" + +namespace Metavision { + +void build_gen41_evk2_register_map(RegisterMap ®map); + +} // namespace Metavision + +#endif // METAVISION_HAL_GEN41_EVK2_REGMAP_BUILDER_H diff --git a/hal_psee_plugins/include/devices/gen41/gen41_evk2_tz_device.h b/hal_psee_plugins/include/devices/gen41/gen41_evk2_tz_device.h new file mode 100644 index 000000000..17e86262e --- /dev/null +++ b/hal_psee_plugins/include/devices/gen41/gen41_evk2_tz_device.h @@ -0,0 +1,61 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_GEN41_EVK2_TZ_DEVICE_H +#define METAVISION_HAL_GEN41_EVK2_TZ_DEVICE_H + +#include "devices/treuzell/tz_psee_video.h" +#include "devices/treuzell/tz_issd_device.h" +#include "devices/treuzell/tz_regmap_device.h" +#include "facilities/tz_monitoring.h" +#include "devices/treuzell/tz_main_device.h" +#include "devices/common/evk2_system_control.h" + +namespace Metavision { + +class TzEvk2Gen41 : public TzPseeVideo, public TzIssdDevice, public TemperatureProvider, public IlluminationProvider { +public: + TzEvk2Gen41(std::shared_ptr cmd, uint32_t dev_id, std::shared_ptr parent); + virtual ~TzEvk2Gen41(); + static std::shared_ptr build(std::shared_ptr cmd, uint32_t dev_id, + std::shared_ptr parent); + static bool can_build(std::shared_ptr, uint32_t dev_id); + + virtual void start(); + virtual void stop(); + virtual StreamFormat get_output_format(); + virtual long get_system_id(); + virtual bool set_mode_standalone(); + virtual bool set_mode_master(); + virtual bool set_mode_slave(); + virtual I_DeviceControl::SyncMode get_mode(); + virtual I_HW_Identification::SensorInfo get_sensor_info() { + return {4, 1}; + } + long long get_sensor_id(); + virtual int get_illumination(); + virtual int get_temperature(); + +protected: + virtual void spawn_facilities(DeviceBuilder &device_builder); + +private: + void temperature_init(); + void lifo_control(bool enable, bool out_en, bool cnt_en); + void iph_mirror_control(bool enable); + + Evk2SystemControl sys_ctrl_; + I_DeviceControl::SyncMode sync_mode_; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_GEN41_EVK2_TZ_DEVICE_H diff --git a/hal_psee_plugins/include/devices/gen41/gen41_evk3_issd.h b/hal_psee_plugins/include/devices/gen41/gen41_evk3_issd.h new file mode 100644 index 000000000..d10395fc5 --- /dev/null +++ b/hal_psee_plugins/include/devices/gen41/gen41_evk3_issd.h @@ -0,0 +1,968 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +// ISSD sequences generated by psee_issd_convert. +// Parameters: +// issd_csv_format_version=1.0 +// system=evk3_gen41_cd +// operator=Prophesee +// dry_run=False +// no_system=False +// strip_prefix=False +// sensor_version=None +// args=-s evk3_gen41_cd -o Prophesee +// sensor=PseeEvk3Gen41 +// date=2021-09-06T19:34:45 +// psee_issd_version=1.1.3.215+g40ab73918 +// psee_sensor_lib_version=3.3.0.486+g1106e0921.d20210015 +// issd_data_format_version=1.0 + +// clang-format off + +#ifndef METAVISION_HAL_GEN41_EVK3_ISSD_H +#define METAVISION_HAL_GEN41_EVK3_ISSD_H +namespace Metavision { + +static const std::vector gen41_evk3_init = { + RegisterOperation::Write(0x0000001C, 0x1), + // Digital INIT + RegisterOperation::Write(0x00000064, 0x1), + RegisterOperation::Write(0x0000B074, 0x2), + RegisterOperation::Write(0x0000B078, 0xa0), + RegisterOperation::Write(0x00000000, 0x10006402), + RegisterOperation::Write(0x00000000, 0x10001402), + RegisterOperation::Write(0x00000000, 0x10001442), + RegisterOperation::Write(0x0000B068, 0x4), + RegisterOperation::Write(0x0000B07C, 0x3), + RegisterOperation::Delay(1000), + RegisterOperation::Write(0x00000000, 0x50001442), + RegisterOperation::Write(0x00000000, 0x5000144a), + RegisterOperation::Write(0x00000000, 0x5000140a), + RegisterOperation::Write(0x00000000, 0x5000640a), + RegisterOperation::Write(0x00000000, 0x5000644a), + RegisterOperation::Write(0x0000B080, 0x77), + RegisterOperation::Write(0x0000B084, 0xf), + RegisterOperation::Write(0x0000B088, 0x37), + RegisterOperation::Write(0x0000B08C, 0x37), + RegisterOperation::Write(0x0000B090, 0xdf), + RegisterOperation::Write(0x0000B094, 0x57), + RegisterOperation::Write(0x0000B098, 0x37), + RegisterOperation::Write(0x0000B09C, 0x67), + RegisterOperation::Write(0x0000B0A0, 0x37), + RegisterOperation::Write(0x0000B0A4, 0x2f), + RegisterOperation::Write(0x0000B0AC, 0x28), + RegisterOperation::Write(0x0000B0CC, 0x1), + RegisterOperation::Write(0x0000B000, 0x2d8), + RegisterOperation::Write(0x0000B004, 0x8a), + RegisterOperation::Write(0x0000B01C, 0x30), + RegisterOperation::Write(0x0000B020, 0x2000), + RegisterOperation::Write(0x0000B02C, 0xff), + RegisterOperation::Write(0x0000B030, 0x3e80), + RegisterOperation::Write(0x0000B028, 0xfa0), + RegisterOperation::Write(0x0000B040, 0x7), + RegisterOperation::Write(0x0000A000, 0x101), + RegisterOperation::Delay(200), + RegisterOperation::Write(0x0000A008, 0x2405), + RegisterOperation::Delay(200), + RegisterOperation::Write(0x0000A004, 0x101), + RegisterOperation::Delay(200), + RegisterOperation::Write(0x0000A020, 0x170), + RegisterOperation::Delay(200), + RegisterOperation::Write(0x0000B040, 0xf), + RegisterOperation::Write(0x0000B004, 0x8a), + RegisterOperation::Delay(200), + RegisterOperation::Write(0x0000B0C8, 0x3), + RegisterOperation::Delay(200), + RegisterOperation::Write(0x0000B044, 0x1), + RegisterOperation::Write(0x0000B000, 0x2d9), + RegisterOperation::Write(0x00009008, 0x640), + RegisterOperation::Write(0x00008000, 0x1e005), + RegisterOperation::Write(0x00007008, 0x1), + RegisterOperation::Write(0x00007000, 0x70001), + RegisterOperation::Write(0x00006008, 0xc8), + RegisterOperation::Write(0x0000600C, 0xfa0), + RegisterOperation::Write(0x00006004, 0x1), + RegisterOperation::Write(0x0000602C, 0x1), + RegisterOperation::Write(0x00006800, 0x8080808), + RegisterOperation::Write(0x00006804, 0x8080808), + RegisterOperation::Write(0x00006808, 0x8080808), + RegisterOperation::Write(0x0000680C, 0x8080808), + RegisterOperation::Write(0x00006810, 0x8080808), + RegisterOperation::Write(0x00006814, 0x8080808), + RegisterOperation::Write(0x00006818, 0x8080808), + RegisterOperation::Write(0x0000681C, 0x8080808), + RegisterOperation::Write(0x00006820, 0x8080808), + RegisterOperation::Write(0x00006824, 0x8080808), + RegisterOperation::Write(0x00006828, 0x8080808), + RegisterOperation::Write(0x0000682C, 0x8080808), + RegisterOperation::Write(0x00006830, 0x8080808), + RegisterOperation::Write(0x00006834, 0x8080808), + RegisterOperation::Write(0x00006838, 0x8080808), + RegisterOperation::Write(0x0000683C, 0x8080808), + RegisterOperation::Write(0x00006840, 0x8080808), + RegisterOperation::Write(0x00006844, 0x8080808), + RegisterOperation::Write(0x00006848, 0x8080808), + RegisterOperation::Write(0x0000684C, 0x8080808), + RegisterOperation::Write(0x00006850, 0x8080808), + RegisterOperation::Write(0x00006854, 0x8080808), + RegisterOperation::Write(0x00006858, 0x8080808), + RegisterOperation::Write(0x0000685C, 0x8080808), + RegisterOperation::Write(0x00006860, 0x8080808), + RegisterOperation::Write(0x00006864, 0x8080808), + RegisterOperation::Write(0x00006868, 0x8080808), + RegisterOperation::Write(0x0000686C, 0x8080808), + RegisterOperation::Write(0x00006870, 0x8080808), + RegisterOperation::Write(0x00006874, 0x8080808), + RegisterOperation::Write(0x00006878, 0x8080808), + RegisterOperation::Write(0x0000687C, 0x8080808), + RegisterOperation::Write(0x00006880, 0x8080808), + RegisterOperation::Write(0x00006884, 0x8080808), + RegisterOperation::Write(0x00006888, 0x8080808), + RegisterOperation::Write(0x0000688C, 0x8080808), + RegisterOperation::Write(0x00006890, 0x8080808), + RegisterOperation::Write(0x00006894, 0x8080808), + RegisterOperation::Write(0x00006898, 0x8080808), + RegisterOperation::Write(0x0000689C, 0x8080808), + RegisterOperation::Write(0x000068A0, 0x8080808), + RegisterOperation::Write(0x000068A4, 0x8080808), + RegisterOperation::Write(0x000068A8, 0x8080808), + RegisterOperation::Write(0x000068AC, 0x8080808), + RegisterOperation::Write(0x000068B0, 0x8080808), + RegisterOperation::Write(0x000068B4, 0x8080808), + RegisterOperation::Write(0x000068B8, 0x8080808), + RegisterOperation::Write(0x000068BC, 0x8080808), + RegisterOperation::Write(0x000068C0, 0x8080808), + RegisterOperation::Write(0x000068C4, 0x8080808), + RegisterOperation::Write(0x000068C8, 0x8080808), + RegisterOperation::Write(0x000068CC, 0x8080808), + RegisterOperation::Write(0x000068D0, 0x8080808), + RegisterOperation::Write(0x000068D4, 0x8080808), + RegisterOperation::Write(0x000068D8, 0x8080808), + RegisterOperation::Write(0x000068DC, 0x8080808), + RegisterOperation::Write(0x000068E0, 0x8080808), + RegisterOperation::Write(0x000068E4, 0x8080808), + RegisterOperation::Write(0x000068E8, 0x8080808), + RegisterOperation::Write(0x000068EC, 0x8080808), + RegisterOperation::Write(0x000068F0, 0x8080808), + RegisterOperation::Write(0x000068F4, 0x8080808), + RegisterOperation::Write(0x000068F8, 0x8080808), + RegisterOperation::Write(0x000068FC, 0x8080808), + RegisterOperation::Write(0x00006900, 0x8080808), + RegisterOperation::Write(0x00006904, 0x8080808), + RegisterOperation::Write(0x00006908, 0x8080808), + RegisterOperation::Write(0x0000690C, 0x8080808), + RegisterOperation::Write(0x00006910, 0x8080808), + RegisterOperation::Write(0x00006914, 0x8080808), + RegisterOperation::Write(0x00006918, 0x8080808), + RegisterOperation::Write(0x0000691C, 0x8080808), + RegisterOperation::Write(0x00006920, 0x8080808), + RegisterOperation::Write(0x00006924, 0x8080808), + RegisterOperation::Write(0x00006928, 0x8080808), + RegisterOperation::Write(0x0000692C, 0x8080808), + RegisterOperation::Write(0x00006930, 0x8080808), + RegisterOperation::Write(0x00006934, 0x8080808), + RegisterOperation::Write(0x00006938, 0x8080808), + RegisterOperation::Write(0x0000693C, 0x8080808), + RegisterOperation::Write(0x00006940, 0x8080808), + RegisterOperation::Write(0x00006944, 0x8080808), + RegisterOperation::Write(0x00006948, 0x8080808), + RegisterOperation::Write(0x0000694C, 0x8080808), + RegisterOperation::Write(0x00006950, 0x8080808), + RegisterOperation::Write(0x00006954, 0x8080808), + RegisterOperation::Write(0x00006958, 0x8080808), + RegisterOperation::Write(0x0000695C, 0x8080808), + RegisterOperation::Write(0x00006960, 0x8080808), + RegisterOperation::Write(0x00006964, 0x8080808), + RegisterOperation::Write(0x00006968, 0x8080808), + RegisterOperation::Write(0x0000696C, 0x8080808), + RegisterOperation::Write(0x00006970, 0x8080808), + RegisterOperation::Write(0x00006974, 0x8080808), + RegisterOperation::Write(0x00006978, 0x8080808), + RegisterOperation::Write(0x0000697C, 0x8080808), + RegisterOperation::Write(0x00006980, 0x8080808), + RegisterOperation::Write(0x00006984, 0x8080808), + RegisterOperation::Write(0x00006988, 0x8080808), + RegisterOperation::Write(0x0000698C, 0x8080808), + RegisterOperation::Write(0x00006990, 0x8080808), + RegisterOperation::Write(0x00006994, 0x8080808), + RegisterOperation::Write(0x00006998, 0x8080808), + RegisterOperation::Write(0x0000699C, 0x8080808), + RegisterOperation::Write(0x000069A0, 0x8080808), + RegisterOperation::Write(0x000069A4, 0x8080808), + RegisterOperation::Write(0x000069A8, 0x8080808), + RegisterOperation::Write(0x000069AC, 0x8080808), + RegisterOperation::Write(0x000069B0, 0x8080808), + RegisterOperation::Write(0x000069B4, 0x8080808), + RegisterOperation::Write(0x000069B8, 0x8080808), + RegisterOperation::Write(0x000069BC, 0x8080808), + RegisterOperation::Write(0x000069C0, 0x8080808), + RegisterOperation::Write(0x000069C4, 0x8080808), + RegisterOperation::Write(0x000069C8, 0x8080808), + RegisterOperation::Write(0x000069CC, 0x8080808), + RegisterOperation::Write(0x000069D0, 0x8080808), + RegisterOperation::Write(0x000069D4, 0x8080808), + RegisterOperation::Write(0x000069D8, 0x8080808), + RegisterOperation::Write(0x000069DC, 0x8080808), + RegisterOperation::Write(0x000069E0, 0x8080808), + RegisterOperation::Write(0x000069E4, 0x8080808), + RegisterOperation::Write(0x000069E8, 0x8080808), + RegisterOperation::Write(0x000069EC, 0x8080808), + RegisterOperation::Write(0x000069F0, 0x8080808), + RegisterOperation::Write(0x000069F4, 0x8080808), + RegisterOperation::Write(0x000069F8, 0x8080808), + RegisterOperation::Write(0x000069FC, 0x8080808), + RegisterOperation::Write(0x00006A00, 0x8080808), + RegisterOperation::Write(0x00006A04, 0x8080808), + RegisterOperation::Write(0x00006A08, 0x8080808), + RegisterOperation::Write(0x00006A0C, 0x8080808), + RegisterOperation::Write(0x00006A10, 0x8080808), + RegisterOperation::Write(0x00006A14, 0x8080808), + RegisterOperation::Write(0x00006A18, 0x8080808), + RegisterOperation::Write(0x00006A1C, 0x8080808), + RegisterOperation::Write(0x00006A20, 0x8080808), + RegisterOperation::Write(0x00006A24, 0x8080808), + RegisterOperation::Write(0x00006A28, 0x8080808), + RegisterOperation::Write(0x00006A2C, 0x8080808), + RegisterOperation::Write(0x00006A30, 0x8080808), + RegisterOperation::Write(0x00006A34, 0x8080808), + RegisterOperation::Write(0x00006A38, 0x8080808), + RegisterOperation::Write(0x00006A3C, 0x8080808), + RegisterOperation::Write(0x00006A40, 0x8080808), + RegisterOperation::Write(0x00006A44, 0x8080808), + RegisterOperation::Write(0x00006A48, 0x8080808), + RegisterOperation::Write(0x00006A4C, 0x8080808), + RegisterOperation::Write(0x00006A50, 0x8080808), + RegisterOperation::Write(0x00006A54, 0x8080808), + RegisterOperation::Write(0x00006A58, 0x8080808), + RegisterOperation::Write(0x00006A5C, 0x8080808), + RegisterOperation::Write(0x00006A60, 0x8080808), + RegisterOperation::Write(0x00006A64, 0x8080808), + RegisterOperation::Write(0x00006A68, 0x8080808), + RegisterOperation::Write(0x00006A6C, 0x8080808), + RegisterOperation::Write(0x00006A70, 0x8080808), + RegisterOperation::Write(0x00006A74, 0x8080808), + RegisterOperation::Write(0x00006A78, 0x8080808), + RegisterOperation::Write(0x00006A7C, 0x8080808), + RegisterOperation::Write(0x00006A80, 0x8080808), + RegisterOperation::Write(0x00006A84, 0x8080808), + RegisterOperation::Write(0x00006A88, 0x8080808), + RegisterOperation::Write(0x00006A8C, 0x8080808), + RegisterOperation::Write(0x00006A90, 0x8080808), + RegisterOperation::Write(0x00006A94, 0x8080808), + RegisterOperation::Write(0x00006A98, 0x8080808), + RegisterOperation::Write(0x00006A9C, 0x8080808), + RegisterOperation::Write(0x00006AA0, 0x8080808), + RegisterOperation::Write(0x00006AA4, 0x8080808), + RegisterOperation::Write(0x00006AA8, 0x8080808), + RegisterOperation::Write(0x00006AAC, 0x8080808), + RegisterOperation::Write(0x00006AB0, 0x8080808), + RegisterOperation::Write(0x00006AB4, 0x8080808), + RegisterOperation::Write(0x00006AB8, 0x8080808), + RegisterOperation::Write(0x00006ABC, 0x8080808), + RegisterOperation::Write(0x00006AC0, 0x8080808), + RegisterOperation::Write(0x00006AC4, 0x8080808), + RegisterOperation::Write(0x00006AC8, 0x8080808), + RegisterOperation::Write(0x00006ACC, 0x8080808), + RegisterOperation::Write(0x00006AD0, 0x8080808), + RegisterOperation::Write(0x00006AD4, 0x8080808), + RegisterOperation::Write(0x00006AD8, 0x8080808), + RegisterOperation::Write(0x00006ADC, 0x8080808), + RegisterOperation::Write(0x00006AE0, 0x8080808), + RegisterOperation::Write(0x00006AE4, 0x8080808), + RegisterOperation::Write(0x00006AE8, 0x8080808), + RegisterOperation::Write(0x00006AEC, 0x8080808), + RegisterOperation::Write(0x00006AF0, 0x8080808), + RegisterOperation::Write(0x00006AF4, 0x8080808), + RegisterOperation::Write(0x00006AF8, 0x8080808), + RegisterOperation::Write(0x00006AFC, 0x8080808), + RegisterOperation::Write(0x00006B00, 0x8080808), + RegisterOperation::Write(0x00006B04, 0x8080808), + RegisterOperation::Write(0x00006B08, 0x8080808), + RegisterOperation::Write(0x00006B0C, 0x8080808), + RegisterOperation::Write(0x00006B10, 0x8080808), + RegisterOperation::Write(0x00006B14, 0x8080808), + RegisterOperation::Write(0x00006B18, 0x8080808), + RegisterOperation::Write(0x00006B1C, 0x8080808), + RegisterOperation::Write(0x00006B20, 0x8080808), + RegisterOperation::Write(0x00006B24, 0x8080808), + RegisterOperation::Write(0x00006B28, 0x8080808), + RegisterOperation::Write(0x00006B2C, 0x8080808), + RegisterOperation::Write(0x00006B30, 0x8080808), + RegisterOperation::Write(0x00006B34, 0x8080808), + RegisterOperation::Write(0x00006B38, 0x8080808), + RegisterOperation::Write(0x00006B3C, 0x8080808), + RegisterOperation::Write(0x00006B40, 0x8080808), + RegisterOperation::Write(0x00006B44, 0x8080808), + RegisterOperation::Write(0x00006B48, 0x8080808), + RegisterOperation::Write(0x00006B4C, 0x8080808), + RegisterOperation::Write(0x00006B50, 0x8080808), + RegisterOperation::Write(0x00006B54, 0x8080808), + RegisterOperation::Write(0x00006B58, 0x8080808), + RegisterOperation::Write(0x00006B5C, 0x8080808), + RegisterOperation::Write(0x00006B60, 0x8080808), + RegisterOperation::Write(0x00006B64, 0x8080808), + RegisterOperation::Write(0x00006B68, 0x8080808), + RegisterOperation::Write(0x00006B6C, 0x8080808), + RegisterOperation::Write(0x00006B70, 0x8080808), + RegisterOperation::Write(0x00006B74, 0x8080808), + RegisterOperation::Write(0x00006B78, 0x8080808), + RegisterOperation::Write(0x00006B7C, 0x8080808), + RegisterOperation::Write(0x00006B80, 0x8080808), + RegisterOperation::Write(0x00006B84, 0x8080808), + RegisterOperation::Write(0x00006B88, 0x8080808), + RegisterOperation::Write(0x00006B8C, 0x8080808), + RegisterOperation::Write(0x00006B90, 0x8080808), + RegisterOperation::Write(0x00006B94, 0x8080808), + RegisterOperation::Write(0x0000602C, 0x0), + RegisterOperation::Write(0x00006800, 0x0), + RegisterOperation::Write(0x00006804, 0x0), + RegisterOperation::Write(0x00006808, 0x0), + RegisterOperation::Write(0x0000680C, 0x0), + RegisterOperation::Write(0x00006810, 0x0), + RegisterOperation::Write(0x00006814, 0x0), + RegisterOperation::Write(0x00006818, 0x0), + RegisterOperation::Write(0x0000681C, 0x0), + RegisterOperation::Write(0x00006820, 0x0), + RegisterOperation::Write(0x00006824, 0x0), + RegisterOperation::Write(0x00006828, 0x0), + RegisterOperation::Write(0x0000682C, 0x0), + RegisterOperation::Write(0x00006830, 0x0), + RegisterOperation::Write(0x00006834, 0x0), + RegisterOperation::Write(0x00006838, 0x0), + RegisterOperation::Write(0x0000683C, 0x0), + RegisterOperation::Write(0x00006840, 0x0), + RegisterOperation::Write(0x00006844, 0x0), + RegisterOperation::Write(0x00006848, 0x0), + RegisterOperation::Write(0x0000684C, 0x0), + RegisterOperation::Write(0x00006850, 0x0), + RegisterOperation::Write(0x00006854, 0x0), + RegisterOperation::Write(0x00006858, 0x0), + RegisterOperation::Write(0x0000685C, 0x0), + RegisterOperation::Write(0x00006860, 0x0), + RegisterOperation::Write(0x00006864, 0x0), + RegisterOperation::Write(0x00006868, 0x0), + RegisterOperation::Write(0x0000686C, 0x0), + RegisterOperation::Write(0x00006870, 0x0), + RegisterOperation::Write(0x00006874, 0x0), + RegisterOperation::Write(0x00006878, 0x0), + RegisterOperation::Write(0x0000687C, 0x0), + RegisterOperation::Write(0x00006880, 0x0), + RegisterOperation::Write(0x00006884, 0x0), + RegisterOperation::Write(0x00006888, 0x0), + RegisterOperation::Write(0x0000688C, 0x0), + RegisterOperation::Write(0x00006890, 0x0), + RegisterOperation::Write(0x00006894, 0x0), + RegisterOperation::Write(0x00006898, 0x0), + RegisterOperation::Write(0x0000689C, 0x0), + RegisterOperation::Write(0x000068A0, 0x0), + RegisterOperation::Write(0x000068A4, 0x0), + RegisterOperation::Write(0x000068A8, 0x0), + RegisterOperation::Write(0x000068AC, 0x0), + RegisterOperation::Write(0x000068B0, 0x0), + RegisterOperation::Write(0x000068B4, 0x0), + RegisterOperation::Write(0x000068B8, 0x0), + RegisterOperation::Write(0x000068BC, 0x0), + RegisterOperation::Write(0x000068C0, 0x0), + RegisterOperation::Write(0x000068C4, 0x0), + RegisterOperation::Write(0x000068C8, 0x0), + RegisterOperation::Write(0x000068CC, 0x0), + RegisterOperation::Write(0x000068D0, 0x0), + RegisterOperation::Write(0x000068D4, 0x0), + RegisterOperation::Write(0x000068D8, 0x0), + RegisterOperation::Write(0x000068DC, 0x0), + RegisterOperation::Write(0x000068E0, 0x0), + RegisterOperation::Write(0x000068E4, 0x0), + RegisterOperation::Write(0x000068E8, 0x0), + RegisterOperation::Write(0x000068EC, 0x0), + RegisterOperation::Write(0x000068F0, 0x0), + RegisterOperation::Write(0x000068F4, 0x0), + RegisterOperation::Write(0x000068F8, 0x0), + RegisterOperation::Write(0x000068FC, 0x0), + RegisterOperation::Write(0x00006900, 0x0), + RegisterOperation::Write(0x00006904, 0x0), + RegisterOperation::Write(0x00006908, 0x0), + RegisterOperation::Write(0x0000690C, 0x0), + RegisterOperation::Write(0x00006910, 0x0), + RegisterOperation::Write(0x00006914, 0x0), + RegisterOperation::Write(0x00006918, 0x0), + RegisterOperation::Write(0x0000691C, 0x0), + RegisterOperation::Write(0x00006920, 0x0), + RegisterOperation::Write(0x00006924, 0x0), + RegisterOperation::Write(0x00006928, 0x0), + RegisterOperation::Write(0x0000692C, 0x0), + RegisterOperation::Write(0x00006930, 0x0), + RegisterOperation::Write(0x00006934, 0x0), + RegisterOperation::Write(0x00006938, 0x0), + RegisterOperation::Write(0x0000693C, 0x0), + RegisterOperation::Write(0x00006940, 0x0), + RegisterOperation::Write(0x00006944, 0x0), + RegisterOperation::Write(0x00006948, 0x0), + RegisterOperation::Write(0x0000694C, 0x0), + RegisterOperation::Write(0x00006950, 0x0), + RegisterOperation::Write(0x00006954, 0x0), + RegisterOperation::Write(0x00006958, 0x0), + RegisterOperation::Write(0x0000695C, 0x0), + RegisterOperation::Write(0x00006960, 0x0), + RegisterOperation::Write(0x00006964, 0x0), + RegisterOperation::Write(0x00006968, 0x0), + RegisterOperation::Write(0x0000696C, 0x0), + RegisterOperation::Write(0x00006970, 0x0), + RegisterOperation::Write(0x00006974, 0x0), + RegisterOperation::Write(0x00006978, 0x0), + RegisterOperation::Write(0x0000697C, 0x0), + RegisterOperation::Write(0x00006980, 0x0), + RegisterOperation::Write(0x00006984, 0x0), + RegisterOperation::Write(0x00006988, 0x0), + RegisterOperation::Write(0x0000698C, 0x0), + RegisterOperation::Write(0x00006990, 0x0), + RegisterOperation::Write(0x00006994, 0x0), + RegisterOperation::Write(0x00006998, 0x0), + RegisterOperation::Write(0x0000699C, 0x0), + RegisterOperation::Write(0x000069A0, 0x0), + RegisterOperation::Write(0x000069A4, 0x0), + RegisterOperation::Write(0x000069A8, 0x0), + RegisterOperation::Write(0x000069AC, 0x0), + RegisterOperation::Write(0x000069B0, 0x0), + RegisterOperation::Write(0x000069B4, 0x0), + RegisterOperation::Write(0x000069B8, 0x0), + RegisterOperation::Write(0x000069BC, 0x0), + RegisterOperation::Write(0x000069C0, 0x0), + RegisterOperation::Write(0x000069C4, 0x0), + RegisterOperation::Write(0x000069C8, 0x0), + RegisterOperation::Write(0x000069CC, 0x0), + RegisterOperation::Write(0x000069D0, 0x0), + RegisterOperation::Write(0x000069D4, 0x0), + RegisterOperation::Write(0x000069D8, 0x0), + RegisterOperation::Write(0x000069DC, 0x0), + RegisterOperation::Write(0x000069E0, 0x0), + RegisterOperation::Write(0x000069E4, 0x0), + RegisterOperation::Write(0x000069E8, 0x0), + RegisterOperation::Write(0x000069EC, 0x0), + RegisterOperation::Write(0x000069F0, 0x0), + RegisterOperation::Write(0x000069F4, 0x0), + RegisterOperation::Write(0x000069F8, 0x0), + RegisterOperation::Write(0x000069FC, 0x0), + RegisterOperation::Write(0x00006A00, 0x0), + RegisterOperation::Write(0x00006A04, 0x0), + RegisterOperation::Write(0x00006A08, 0x0), + RegisterOperation::Write(0x00006A0C, 0x0), + RegisterOperation::Write(0x00006A10, 0x0), + RegisterOperation::Write(0x00006A14, 0x0), + RegisterOperation::Write(0x00006A18, 0x0), + RegisterOperation::Write(0x00006A1C, 0x0), + RegisterOperation::Write(0x00006A20, 0x0), + RegisterOperation::Write(0x00006A24, 0x0), + RegisterOperation::Write(0x00006A28, 0x0), + RegisterOperation::Write(0x00006A2C, 0x0), + RegisterOperation::Write(0x00006A30, 0x0), + RegisterOperation::Write(0x00006A34, 0x0), + RegisterOperation::Write(0x00006A38, 0x0), + RegisterOperation::Write(0x00006A3C, 0x0), + RegisterOperation::Write(0x00006A40, 0x0), + RegisterOperation::Write(0x00006A44, 0x0), + RegisterOperation::Write(0x00006A48, 0x0), + RegisterOperation::Write(0x00006A4C, 0x0), + RegisterOperation::Write(0x00006A50, 0x0), + RegisterOperation::Write(0x00006A54, 0x0), + RegisterOperation::Write(0x00006A58, 0x0), + RegisterOperation::Write(0x00006A5C, 0x0), + RegisterOperation::Write(0x00006A60, 0x0), + RegisterOperation::Write(0x00006A64, 0x0), + RegisterOperation::Write(0x00006A68, 0x0), + RegisterOperation::Write(0x00006A6C, 0x0), + RegisterOperation::Write(0x00006A70, 0x0), + RegisterOperation::Write(0x00006A74, 0x0), + RegisterOperation::Write(0x00006A78, 0x0), + RegisterOperation::Write(0x00006A7C, 0x0), + RegisterOperation::Write(0x00006A80, 0x0), + RegisterOperation::Write(0x00006A84, 0x0), + RegisterOperation::Write(0x00006A88, 0x0), + RegisterOperation::Write(0x00006A8C, 0x0), + RegisterOperation::Write(0x00006A90, 0x0), + RegisterOperation::Write(0x00006A94, 0x0), + RegisterOperation::Write(0x00006A98, 0x0), + RegisterOperation::Write(0x00006A9C, 0x0), + RegisterOperation::Write(0x00006AA0, 0x0), + RegisterOperation::Write(0x00006AA4, 0x0), + RegisterOperation::Write(0x00006AA8, 0x0), + RegisterOperation::Write(0x00006AAC, 0x0), + RegisterOperation::Write(0x00006AB0, 0x0), + RegisterOperation::Write(0x00006AB4, 0x0), + RegisterOperation::Write(0x00006AB8, 0x0), + RegisterOperation::Write(0x00006ABC, 0x0), + RegisterOperation::Write(0x00006AC0, 0x0), + RegisterOperation::Write(0x00006AC4, 0x0), + RegisterOperation::Write(0x00006AC8, 0x0), + RegisterOperation::Write(0x00006ACC, 0x0), + RegisterOperation::Write(0x00006AD0, 0x0), + RegisterOperation::Write(0x00006AD4, 0x0), + RegisterOperation::Write(0x00006AD8, 0x0), + RegisterOperation::Write(0x00006ADC, 0x0), + RegisterOperation::Write(0x00006AE0, 0x0), + RegisterOperation::Write(0x00006AE4, 0x0), + RegisterOperation::Write(0x00006AE8, 0x0), + RegisterOperation::Write(0x00006AEC, 0x0), + RegisterOperation::Write(0x00006AF0, 0x0), + RegisterOperation::Write(0x00006AF4, 0x0), + RegisterOperation::Write(0x00006AF8, 0x0), + RegisterOperation::Write(0x00006AFC, 0x0), + RegisterOperation::Write(0x00006B00, 0x0), + RegisterOperation::Write(0x00006B04, 0x0), + RegisterOperation::Write(0x00006B08, 0x0), + RegisterOperation::Write(0x00006B0C, 0x0), + RegisterOperation::Write(0x00006B10, 0x0), + RegisterOperation::Write(0x00006B14, 0x0), + RegisterOperation::Write(0x00006B18, 0x0), + RegisterOperation::Write(0x00006B1C, 0x0), + RegisterOperation::Write(0x00006B20, 0x0), + RegisterOperation::Write(0x00006B24, 0x0), + RegisterOperation::Write(0x00006B28, 0x0), + RegisterOperation::Write(0x00006B2C, 0x0), + RegisterOperation::Write(0x00006B30, 0x0), + RegisterOperation::Write(0x00006B34, 0x0), + RegisterOperation::Write(0x00006B38, 0x0), + RegisterOperation::Write(0x00006B3C, 0x0), + RegisterOperation::Write(0x00006B40, 0x0), + RegisterOperation::Write(0x00006B44, 0x0), + RegisterOperation::Write(0x00006B48, 0x0), + RegisterOperation::Write(0x00006B4C, 0x0), + RegisterOperation::Write(0x00006B50, 0x0), + RegisterOperation::Write(0x00006B54, 0x0), + RegisterOperation::Write(0x00006B58, 0x0), + RegisterOperation::Write(0x00006B5C, 0x0), + RegisterOperation::Write(0x00006B60, 0x0), + RegisterOperation::Write(0x00006B64, 0x0), + RegisterOperation::Write(0x00006B68, 0x0), + RegisterOperation::Write(0x00006B6C, 0x0), + RegisterOperation::Write(0x00006B70, 0x0), + RegisterOperation::Write(0x00006B74, 0x0), + RegisterOperation::Write(0x00006B78, 0x0), + RegisterOperation::Write(0x00006B7C, 0x0), + RegisterOperation::Write(0x00006B80, 0x0), + RegisterOperation::Write(0x00006B84, 0x0), + RegisterOperation::Write(0x00006B88, 0x0), + RegisterOperation::Write(0x00006B8C, 0x0), + RegisterOperation::Write(0x00006B90, 0x0), + RegisterOperation::Write(0x00006B94, 0x0), + RegisterOperation::Write(0x00006400, 0x10000), + RegisterOperation::Write(0x00006404, 0x30002), + RegisterOperation::Write(0x00006408, 0x50004), + RegisterOperation::Write(0x0000640C, 0x70006), + RegisterOperation::Write(0x00006410, 0x90008), + RegisterOperation::Write(0x00006414, 0xb000a), + RegisterOperation::Write(0x00006418, 0xd000c), + RegisterOperation::Write(0x0000641C, 0xf000e), + RegisterOperation::Write(0x00006420, 0x110010), + RegisterOperation::Write(0x00006424, 0x130012), + RegisterOperation::Write(0x00006428, 0x150014), + RegisterOperation::Write(0x0000642C, 0x170016), + RegisterOperation::Write(0x00006430, 0x190018), + RegisterOperation::Write(0x00006434, 0x1b001a), + RegisterOperation::Write(0x00006438, 0x1d001c), + RegisterOperation::Write(0x0000643C, 0x1f001e), + RegisterOperation::Write(0x00006440, 0x210020), + RegisterOperation::Write(0x00006444, 0x230022), + RegisterOperation::Write(0x00006448, 0x250024), + RegisterOperation::Write(0x0000644C, 0x270026), + RegisterOperation::Write(0x00006450, 0x290028), + RegisterOperation::Write(0x00006454, 0x2b002a), + RegisterOperation::Write(0x00006458, 0x2d002c), + RegisterOperation::Write(0x0000645C, 0x2f002e), + RegisterOperation::Write(0x00006460, 0x310030), + RegisterOperation::Write(0x00006464, 0x330032), + RegisterOperation::Write(0x00006468, 0x350034), + RegisterOperation::Write(0x0000646C, 0x370036), + RegisterOperation::Write(0x00006470, 0x390038), + RegisterOperation::Write(0x00006474, 0x3b003a), + RegisterOperation::Write(0x00006478, 0x3d003c), + RegisterOperation::Write(0x0000647C, 0x3f003e), + RegisterOperation::Write(0x00006480, 0x410040), + RegisterOperation::Write(0x00006484, 0x430042), + RegisterOperation::Write(0x00006488, 0x450044), + RegisterOperation::Write(0x0000648C, 0x470046), + RegisterOperation::Write(0x00006490, 0x490048), + RegisterOperation::Write(0x00006494, 0x4b004a), + RegisterOperation::Write(0x00006498, 0x4d004c), + RegisterOperation::Write(0x0000649C, 0x4f004e), + RegisterOperation::Write(0x000064A0, 0x510050), + RegisterOperation::Write(0x000064A4, 0x530052), + RegisterOperation::Write(0x000064A8, 0x550054), + RegisterOperation::Write(0x000064AC, 0x570056), + RegisterOperation::Write(0x000064B0, 0x590058), + RegisterOperation::Write(0x000064B4, 0x5b005a), + RegisterOperation::Write(0x000064B8, 0x5d005c), + RegisterOperation::Write(0x000064BC, 0x5f005e), + RegisterOperation::Write(0x000064C0, 0x610060), + RegisterOperation::Write(0x000064C4, 0x630062), + RegisterOperation::Write(0x000064C8, 0x650064), + RegisterOperation::Write(0x000064CC, 0x670066), + RegisterOperation::Write(0x000064D0, 0x690068), + RegisterOperation::Write(0x000064D4, 0x6b006a), + RegisterOperation::Write(0x000064D8, 0x6d006c), + RegisterOperation::Write(0x000064DC, 0x6f006e), + RegisterOperation::Write(0x000064E0, 0x710070), + RegisterOperation::Write(0x000064E4, 0x730072), + RegisterOperation::Write(0x000064E8, 0x750074), + RegisterOperation::Write(0x000064EC, 0x770076), + RegisterOperation::Write(0x000064F0, 0x790078), + RegisterOperation::Write(0x000064F4, 0x7b007a), + RegisterOperation::Write(0x000064F8, 0x7d007c), + RegisterOperation::Write(0x000064FC, 0x7f007e), + RegisterOperation::Write(0x00006500, 0x810080), + RegisterOperation::Write(0x00006504, 0x830082), + RegisterOperation::Write(0x00006508, 0x850084), + RegisterOperation::Write(0x0000650C, 0x870086), + RegisterOperation::Write(0x00006510, 0x890088), + RegisterOperation::Write(0x00006514, 0x8b008a), + RegisterOperation::Write(0x00006518, 0x8d008c), + RegisterOperation::Write(0x0000651C, 0x8f008e), + RegisterOperation::Write(0x00006520, 0x910090), + RegisterOperation::Write(0x00006524, 0x930092), + RegisterOperation::Write(0x00006528, 0x950094), + RegisterOperation::Write(0x0000652C, 0x970096), + RegisterOperation::Write(0x00006530, 0x990098), + RegisterOperation::Write(0x00006534, 0x9b009a), + RegisterOperation::Write(0x00006538, 0x9d009c), + RegisterOperation::Write(0x0000653C, 0x9f009e), + RegisterOperation::Write(0x00006540, 0xa100a0), + RegisterOperation::Write(0x00006544, 0xa300a2), + RegisterOperation::Write(0x00006548, 0xa500a4), + RegisterOperation::Write(0x0000654C, 0xa700a6), + RegisterOperation::Write(0x00006550, 0xa900a8), + RegisterOperation::Write(0x00006554, 0xab00aa), + RegisterOperation::Write(0x00006558, 0xad00ac), + RegisterOperation::Write(0x0000655C, 0xaf00ae), + RegisterOperation::Write(0x00006560, 0xb100b0), + RegisterOperation::Write(0x00006564, 0xb300b2), + RegisterOperation::Write(0x00006568, 0xb500b4), + RegisterOperation::Write(0x0000656C, 0xb700b6), + RegisterOperation::Write(0x00006570, 0xb900b8), + RegisterOperation::Write(0x00006574, 0xbb00ba), + RegisterOperation::Write(0x00006578, 0xbd00bc), + RegisterOperation::Write(0x0000657C, 0xbf00be), + RegisterOperation::Write(0x00006580, 0xc100c0), + RegisterOperation::Write(0x00006584, 0xc300c2), + RegisterOperation::Write(0x00006588, 0xc500c4), + RegisterOperation::Write(0x0000658C, 0xc700c6), + RegisterOperation::Write(0x00006590, 0xc900c8), + RegisterOperation::Write(0x00006594, 0xcb00ca), + RegisterOperation::Write(0x00006598, 0xcd00cc), + RegisterOperation::Write(0x0000659C, 0xcf00ce), + RegisterOperation::Write(0x000065A0, 0xd100d0), + RegisterOperation::Write(0x000065A4, 0xd300d2), + RegisterOperation::Write(0x000065A8, 0xd500d4), + RegisterOperation::Write(0x000065AC, 0xd700d6), + RegisterOperation::Write(0x000065B0, 0xd900d8), + RegisterOperation::Write(0x000065B4, 0xdb00da), + RegisterOperation::Write(0x000065B8, 0xdd00dc), + RegisterOperation::Write(0x000065BC, 0xdf00de), + RegisterOperation::Write(0x000065C0, 0xe100e0), + RegisterOperation::Write(0x000065C4, 0xe300e2), + RegisterOperation::Write(0x000065C8, 0xe500e4), + RegisterOperation::Write(0x000065CC, 0xe700e6), + RegisterOperation::Write(0x000065D0, 0xe900e8), + RegisterOperation::Write(0x000065D4, 0xeb00ea), + RegisterOperation::Write(0x000065D8, 0xed00ec), + RegisterOperation::Write(0x000065DC, 0xef00ee), + RegisterOperation::Write(0x000065E0, 0xf100f0), + RegisterOperation::Write(0x000065E4, 0xf300f2), + RegisterOperation::Write(0x000065E8, 0xf500f4), + RegisterOperation::Write(0x000065EC, 0xf700f6), + RegisterOperation::Write(0x000065F0, 0xf900f8), + RegisterOperation::Write(0x000065F4, 0xfb00fa), + RegisterOperation::Write(0x000065F8, 0xfd00fc), + RegisterOperation::Write(0x000065FC, 0xff00fe), + RegisterOperation::Write(0x00006600, 0x1010100), + RegisterOperation::Write(0x00006604, 0x1030102), + RegisterOperation::Write(0x00006608, 0x1050104), + RegisterOperation::Write(0x0000660C, 0x1070106), + RegisterOperation::Write(0x00006610, 0x1090108), + RegisterOperation::Write(0x00006614, 0x10b010a), + RegisterOperation::Write(0x00006618, 0x10d010c), + RegisterOperation::Write(0x0000661C, 0x10f010e), + RegisterOperation::Write(0x00006620, 0x1110110), + RegisterOperation::Write(0x00006624, 0x1130112), + RegisterOperation::Write(0x00006628, 0x1150114), + RegisterOperation::Write(0x0000662C, 0x1170116), + RegisterOperation::Write(0x00006630, 0x1190118), + RegisterOperation::Write(0x00006634, 0x11b011a), + RegisterOperation::Write(0x00006638, 0x11d011c), + RegisterOperation::Write(0x0000663C, 0x11f011e), + RegisterOperation::Write(0x00006640, 0x1210120), + RegisterOperation::Write(0x00006644, 0x1230122), + RegisterOperation::Write(0x00006648, 0x1250124), + RegisterOperation::Write(0x0000664C, 0x1270126), + RegisterOperation::Write(0x00006650, 0x1290128), + RegisterOperation::Write(0x00006654, 0x12b012a), + RegisterOperation::Write(0x00006658, 0x12d012c), + RegisterOperation::Write(0x0000665C, 0x12f012e), + RegisterOperation::Write(0x00006660, 0x1310130), + RegisterOperation::Write(0x00006664, 0x1330132), + RegisterOperation::Write(0x00006668, 0x1350134), + RegisterOperation::Write(0x0000666C, 0x1370136), + RegisterOperation::Write(0x00006670, 0x1390138), + RegisterOperation::Write(0x00006674, 0x13b013a), + RegisterOperation::Write(0x00006678, 0x13d013c), + RegisterOperation::Write(0x0000667C, 0x13f013e), + RegisterOperation::Write(0x00006680, 0x1410140), + RegisterOperation::Write(0x00006684, 0x1430142), + RegisterOperation::Write(0x00006688, 0x1450144), + RegisterOperation::Write(0x0000668C, 0x1470146), + RegisterOperation::Write(0x00006690, 0x1490148), + RegisterOperation::Write(0x00006694, 0x14b014a), + RegisterOperation::Write(0x00006698, 0x14d014c), + RegisterOperation::Write(0x0000669C, 0x14f014e), + RegisterOperation::Write(0x000066A0, 0x1510150), + RegisterOperation::Write(0x000066A4, 0x1530152), + RegisterOperation::Write(0x000066A8, 0x1550154), + RegisterOperation::Write(0x000066AC, 0x1570156), + RegisterOperation::Write(0x000066B0, 0x1590158), + RegisterOperation::Write(0x000066B4, 0x15b015a), + RegisterOperation::Write(0x000066B8, 0x15d015c), + RegisterOperation::Write(0x000066BC, 0x15f015e), + RegisterOperation::Write(0x000066C0, 0x1610160), + RegisterOperation::Write(0x000066C4, 0x1630162), + RegisterOperation::Write(0x000066C8, 0x1650164), + RegisterOperation::Write(0x000066CC, 0x1670166), + RegisterOperation::Write(0x000066D0, 0x1690168), + RegisterOperation::Write(0x000066D4, 0x16b016a), + RegisterOperation::Write(0x000066D8, 0x16d016c), + RegisterOperation::Write(0x000066DC, 0x16f016e), + RegisterOperation::Write(0x000066E0, 0x1710170), + RegisterOperation::Write(0x000066E4, 0x1730172), + RegisterOperation::Write(0x000066E8, 0x1750174), + RegisterOperation::Write(0x000066EC, 0x1770176), + RegisterOperation::Write(0x000066F0, 0x1790178), + RegisterOperation::Write(0x000066F4, 0x17b017a), + RegisterOperation::Write(0x000066F8, 0x17d017c), + RegisterOperation::Write(0x000066FC, 0x17f017e), + RegisterOperation::Write(0x00006700, 0x1810180), + RegisterOperation::Write(0x00006704, 0x1830182), + RegisterOperation::Write(0x00006708, 0x1850184), + RegisterOperation::Write(0x0000670C, 0x1870186), + RegisterOperation::Write(0x00006710, 0x1890188), + RegisterOperation::Write(0x00006714, 0x18b018a), + RegisterOperation::Write(0x00006718, 0x18d018c), + RegisterOperation::Write(0x0000671C, 0x18f018e), + RegisterOperation::Write(0x00006720, 0x1910190), + RegisterOperation::Write(0x00006724, 0x1930192), + RegisterOperation::Write(0x00006728, 0x1950194), + RegisterOperation::Write(0x0000672C, 0x1970196), + RegisterOperation::Write(0x00006730, 0x1990198), + RegisterOperation::Write(0x00006734, 0x19b019a), + RegisterOperation::Write(0x00006738, 0x19d019c), + RegisterOperation::Write(0x0000673C, 0x19f019e), + RegisterOperation::Write(0x00006740, 0x1a101a0), + RegisterOperation::Write(0x00006744, 0x1a301a2), + RegisterOperation::Write(0x00006748, 0x1a501a4), + RegisterOperation::Write(0x0000674C, 0x1a701a6), + RegisterOperation::Write(0x00006750, 0x1a901a8), + RegisterOperation::Write(0x00006754, 0x1ab01aa), + RegisterOperation::Write(0x00006758, 0x1ad01ac), + RegisterOperation::Write(0x0000675C, 0x1af01ae), + RegisterOperation::Write(0x00006760, 0x1b101b0), + RegisterOperation::Write(0x00006764, 0x1b301b2), + RegisterOperation::Write(0x00006768, 0x1b501b4), + RegisterOperation::Write(0x0000676C, 0x1b701b6), + RegisterOperation::Write(0x00006770, 0x1b901b8), + RegisterOperation::Write(0x00006774, 0x1bb01ba), + RegisterOperation::Write(0x00006778, 0x1bd01bc), + RegisterOperation::Write(0x0000677C, 0x1bf01be), + RegisterOperation::Write(0x00006780, 0x1c101c0), + RegisterOperation::Write(0x00006784, 0x1c301c2), + RegisterOperation::Write(0x00006788, 0x1c501c4), + RegisterOperation::Write(0x0000678C, 0x1c701c6), + RegisterOperation::Write(0x00006790, 0x1c901c8), + RegisterOperation::Write(0x00006794, 0x1cb01ca), + RegisterOperation::Write(0x00006798, 0x1cd01cc), + RegisterOperation::Write(0x0000679C, 0x1cf01ce), + RegisterOperation::Write(0x000067A0, 0x1d101d0), + RegisterOperation::Write(0x000067A4, 0x1d301d2), + RegisterOperation::Write(0x000067A8, 0x1d501d4), + RegisterOperation::Write(0x000067AC, 0x1d701d6), + RegisterOperation::Write(0x000067B0, 0x1d901d8), + RegisterOperation::Write(0x000067B4, 0x1db01da), + RegisterOperation::Write(0x000067B8, 0x1dd01dc), + RegisterOperation::Write(0x000067BC, 0x1df01de), + RegisterOperation::Write(0x000067C0, 0x1e101e0), + RegisterOperation::Write(0x000067C4, 0x1e301e2), + RegisterOperation::Write(0x000067C8, 0x1e501e4), + RegisterOperation::Write(0x000067CC, 0x1e701e6), + RegisterOperation::Write(0x000067D0, 0x1e901e8), + RegisterOperation::Write(0x000067D4, 0x1eb01ea), + RegisterOperation::Write(0x000067D8, 0x1ed01ec), + RegisterOperation::Write(0x000067DC, 0x1ef01ee), + RegisterOperation::Write(0x000067E0, 0x1f101f0), + RegisterOperation::Write(0x000067E4, 0x1f301f2), + RegisterOperation::Write(0x000067E8, 0x1f501f4), + RegisterOperation::Write(0x000067EC, 0x1f701f6), + RegisterOperation::Write(0x000067F0, 0x1f901f8), + RegisterOperation::Write(0x000067F4, 0x1fb01fa), + RegisterOperation::Write(0x000067F8, 0x1fd01fc), + RegisterOperation::Write(0x000067FC, 0x1ff01fe), + RegisterOperation::Write(0x00006080, 0x3020100), + RegisterOperation::Write(0x00006084, 0x7060504), + RegisterOperation::Write(0x00006088, 0xb0a0908), + RegisterOperation::Write(0x0000608C, 0xf0e0d0c), + RegisterOperation::Write(0x00006090, 0x13121110), + RegisterOperation::Write(0x00006094, 0x17161514), + RegisterOperation::Write(0x00006098, 0x1b1a1918), + RegisterOperation::Write(0x0000609C, 0x1f1e1d1c), + RegisterOperation::Write(0x000060C0, 0x3020100), + RegisterOperation::Write(0x000060C4, 0x7060504), + RegisterOperation::Write(0x000060C8, 0xb0a0908), + RegisterOperation::Write(0x000060CC, 0xf0e0d0c), + RegisterOperation::Write(0x000060D0, 0x13121110), + RegisterOperation::Write(0x000060D4, 0x17161514), + RegisterOperation::Write(0x000060D8, 0x1b1a1918), + RegisterOperation::Write(0x000060DC, 0x1f1e1d1c), + RegisterOperation::Write(0x00006028, 0x3), + RegisterOperation::Write(0x00006050, 0x0), + RegisterOperation::Write(0x00006060, 0x0), + RegisterOperation::Write(0x00006070, 0x0), + RegisterOperation::Write(0x00006000, 0x155401), + RegisterOperation::Write(0x0000D000, 0x5), + RegisterOperation::Write(0x0000C000, 0x5), + RegisterOperation::Write(0x00009000, 0x208), + RegisterOperation::Write(0x00007008, 0x1), + RegisterOperation::Write(0x00007000, 0x70001), + RegisterOperation::Write(0x00008000, 0x1e085), + RegisterOperation::Write(0x00009008, 0x644), + RegisterOperation::Write(0x00000004, 0xf0005442), + // Analog INIT + RegisterOperation::Write(0x00000004, 0xf0005042), + RegisterOperation::Write(0x0000002C, 0x200224), + RegisterOperation::Write(0x0000A000, 0x101), + RegisterOperation::Write(0x0000A000, 0xa1), + RegisterOperation::Delay(200), + RegisterOperation::Read(0x0000A000, 0x2a1, 0x200), + RegisterOperation::Write(0x0000A008, 0x2405), + RegisterOperation::Delay(200), + RegisterOperation::Read(0x0000A008, 0x82405, 0x80000), + RegisterOperation::Write(0x0000A004, 0x101), + RegisterOperation::Write(0x0000A004, 0xa1), + RegisterOperation::Delay(200), + RegisterOperation::Read(0x0000A004, 0x2a1, 0x200), + RegisterOperation::Write(0x0000A020, 0x170), + RegisterOperation::Write(0x0000A020, 0x160), + RegisterOperation::Delay(200), + RegisterOperation::Write(0x0000A008, 0x82401), + RegisterOperation::Write(0x0000004C, 0x7141), + RegisterOperation::Write(0x00000054, 0x210), + RegisterOperation::Write(0x00000008, 0x60000000), + RegisterOperation::Write(0x00001104, 0x1), + RegisterOperation::Write(0x0000A010, 0xa06b), + RegisterOperation::Delay(300), + RegisterOperation::Write(0x00001100, 0x4), + RegisterOperation::Delay(200), + RegisterOperation::Read(0x0000A010, 0x180a06b, 0x800000), + RegisterOperation::Write(0x0000A010, 0x180a063), + RegisterOperation::Write(0x0000A00C, 0x404), + RegisterOperation::Write(0x0000A00C, 0x405), + RegisterOperation::Delay(1000), + RegisterOperation::Read(0x0000A00C, 0x20405, 0x20000), + RegisterOperation::Write(0x0000A00C, 0x20401), + RegisterOperation::Delay(300), + RegisterOperation::Write(0x00000070, 0x400000), + RegisterOperation::Write(0x0000006C, 0xee47117), + RegisterOperation::Delay(100), + RegisterOperation::Write(0x0000006C, 0xee4711f), + RegisterOperation::Delay(100), + RegisterOperation::Write(0x00000070, 0x480000), + RegisterOperation::Delay(1000), + RegisterOperation::Write(0x00001044, 0x1a98a7c), + RegisterOperation::Write(0x00001040, 0x1a98a94), + RegisterOperation::Write(0x00001048, 0x1a98b94), + RegisterOperation::Write(0x0000101C, 0x1a1575b), + RegisterOperation::Write(0x00001050, 0x1a1b251), + RegisterOperation::Write(0x00001020, 0x1a9cd44), + RegisterOperation::Write(0x0000100C, 0x1a1ff00), + RegisterOperation::Write(0x00001018, 0x1a13734), + RegisterOperation::Write(0x00001010, 0x1a16373), + RegisterOperation::Write(0x00001014, 0x1a15050), + RegisterOperation::Write(0x00001004, 0x1a1e84a), + RegisterOperation::Write(0x00001008, 0x1210000), + RegisterOperation::Write(0x00001000, 0x1a1c469), + RegisterOperation::Write(0x0000104C, 0x1a19278), + RegisterOperation::Write(0x00001100, 0x5), + RegisterOperation::Write(0x0000002C, 0x22c724), + RegisterOperation::Write(0x00000018, 0x200), + RegisterOperation::Read(0x00000014, 0xa0301003, 0xffffffff) +}; + +static const std::vector gen41_evk3_start = { + RegisterOperation::Write(0x0000B000, 0x2d9), + RegisterOperation::Write(0x00009028, 0x0), + RegisterOperation::WriteField(0x00009008, 0x645, 0x00000001), + // Analog START + RegisterOperation::Write(0x0000002C, 0x22c724), + RegisterOperation::Write(0x00000004, 0xf0005442) +}; + +static const std::vector gen41_evk3_stop = { + // Analog STOP + RegisterOperation::Write(0x00000004, 0xf0005042), + RegisterOperation::Write(0x0000002C, 0x22c324), + // Digital STOP + RegisterOperation::Read(0x0000C000, 0x5, 0x7), + RegisterOperation::Write(0x0000C000, 0x2), + RegisterOperation::Write(0x00009028, 0x2), + RegisterOperation::Write(0x0000C000, 0x5), + RegisterOperation::Delay(1000), + RegisterOperation::WriteField(0x00009008, 0x644, 0x1), + RegisterOperation::Write(0x0000B000, 0x2d8), + RegisterOperation::Delay(300), + RegisterOperation::Read(0x0000B000, 0x2dc, 0x7ff) +}; + +const std::vector gen41_evk3_destroy = { + // Analog DESTROY + RegisterOperation::Write(0x00000070, 0x400000), + RegisterOperation::Write(0x0000006C, 0xee47114), + RegisterOperation::Delay(500), + RegisterOperation::Write(0x0000A00C, 0x400), + RegisterOperation::Delay(500), + RegisterOperation::Write(0x0000A010, 0x8068), + RegisterOperation::Delay(200), + RegisterOperation::Write(0x00001104, 0x0), + RegisterOperation::Delay(200), + RegisterOperation::Write(0x0000A020, 0x60), + RegisterOperation::Delay(200), + RegisterOperation::Write(0x0000A004, 0x2a0), + RegisterOperation::Delay(200), + RegisterOperation::Write(0x0000A008, 0x2400), + RegisterOperation::Delay(200), + RegisterOperation::Write(0x0000A000, 0x2a0), + // Digital DESTROY + RegisterOperation::Write(0x0000B044, 0x0), + RegisterOperation::Read(0x0000B044, 0x0, 0x3), + RegisterOperation::Write(0x0000B004, 0xa), + RegisterOperation::Write(0x0000B040, 0xe), + RegisterOperation::Write(0x0000B0C8, 0x0), + RegisterOperation::Write(0x0000B040, 0x6), + RegisterOperation::Write(0x0000B040, 0x4), + RegisterOperation::Write(0x00000000, 0x50006442), + RegisterOperation::Write(0x00000000, 0x10006442), + RegisterOperation::Write(0x0000B07C, 0x0) +}; + +static Issd gen41_evk3_issd = Issd{ + gen41_evk3_init, + gen41_evk3_start, + gen41_evk3_stop, + gen41_evk3_destroy, +}; + +} // namespace Metavisiom + +#endif // METAVISION_HAL_GEN41_EVK3_ISSD_H + +// clang-format on diff --git a/hal_psee_plugins/include/devices/gen41/gen41_evk3_regmap_builder.h b/hal_psee_plugins/include/devices/gen41/gen41_evk3_regmap_builder.h new file mode 100644 index 000000000..00c8c37aa --- /dev/null +++ b/hal_psee_plugins/include/devices/gen41/gen41_evk3_regmap_builder.h @@ -0,0 +1,23 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_GEN41_EVK3_REGMAP_BUILDER_H +#define METAVISION_HAL_GEN41_EVK3_REGMAP_BUILDER_H + +#include "utils/register_map.h" + +namespace Metavision { + +void build_gen41_evk3_register_map(RegisterMap ®map); + +} // namespace Metavision + +#endif // METAVISION_HAL_GEN41_EVK3_REGMAP_BUILDER_H diff --git a/hal_psee_plugins/include/devices/gen41/gen41_ll_biases.h b/hal_psee_plugins/include/devices/gen41/gen41_ll_biases.h new file mode 100644 index 000000000..aed003350 --- /dev/null +++ b/hal_psee_plugins/include/devices/gen41/gen41_ll_biases.h @@ -0,0 +1,42 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_GEN41_LL_BIASES_H +#define METAVISION_HAL_GEN41_LL_BIASES_H + +#include +#include + +#include "metavision/hal/facilities/i_ll_biases.h" + +namespace Metavision { + +class I_HW_Register; + +class Gen41_LL_Biases : public I_LL_Biases { +public: + Gen41_LL_Biases(const std::shared_ptr &i_hw_register, const std::string &sensor_prefix); + + virtual bool set(const std::string &bias_name, int bias_value) override; + virtual int get(const std::string &bias_name) override; + virtual std::map get_all_biases() override; + +protected: + const std::shared_ptr &get_hw_register() const; + +private: + std::shared_ptr i_hw_register_; + std::string base_name_; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_GEN41_LL_BIASES_H diff --git a/hal_psee_plugins/include/devices/gen41/gen41_noise_filter_module.h b/hal_psee_plugins/include/devices/gen41/gen41_noise_filter_module.h new file mode 100644 index 000000000..73fb2fa20 --- /dev/null +++ b/hal_psee_plugins/include/devices/gen41/gen41_noise_filter_module.h @@ -0,0 +1,38 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_GEN41_NOISE_FILTER_MODULE_H +#define METAVISION_HAL_GEN41_NOISE_FILTER_MODULE_H + +#include +#include + +#include "metavision/hal/facilities/i_noise_filter_module.h" + +namespace Metavision { + +class RegisterMap; + +class Gen41NoiseFilterModule : public I_NoiseFilterModule { +public: + Gen41NoiseFilterModule(const std::shared_ptr ®map, const std::string &sensor_prefix); + + virtual void enable(I_NoiseFilterModule::Type type, uint32_t threshold) override; + virtual void disable() override; + +private: + std::shared_ptr register_map_; + std::string sensor_prefix_; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_GEN41_NOISE_FILTER_MODULE_H diff --git a/hal_psee_plugins/include/devices/gen41/gen41_roi_command.h b/hal_psee_plugins/include/devices/gen41/gen41_roi_command.h new file mode 100644 index 000000000..ef800e1ca --- /dev/null +++ b/hal_psee_plugins/include/devices/gen41/gen41_roi_command.h @@ -0,0 +1,42 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_GEN41_ROI_COMMAND_H +#define METAVISION_HAL_GEN41_ROI_COMMAND_H + +#include + +#include "facilities/psee_roi.h" + +namespace Metavision { + +class RegisterMap; + +class Gen41ROICommand : public PseeROI { +public: + Gen41ROICommand(int width, int height, const std::shared_ptr ®map, + const std::string &sensor_prefix); + + virtual void enable(bool state) override; + virtual void write_ROI(const std::vector &vroiparams) override; + +private: + void reset_to_full_roi(); + +private: + std::shared_ptr register_map_; + std::vector roi_save_; + std::string sensor_prefix_; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_GEN41_ROI_COMMAND_H diff --git a/hal_psee_plugins/include/devices/gen41/gen41_tz_device.h b/hal_psee_plugins/include/devices/gen41/gen41_tz_device.h new file mode 100644 index 000000000..f31d55752 --- /dev/null +++ b/hal_psee_plugins/include/devices/gen41/gen41_tz_device.h @@ -0,0 +1,57 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_GEN41_TZ_DEVICE_H +#define METAVISION_HAL_GEN41_TZ_DEVICE_H + +#include "devices/treuzell/tz_issd_device.h" +#include "devices/treuzell/tz_regmap_device.h" +#include "facilities/tz_monitoring.h" +#include "devices/treuzell/tz_main_device.h" + +namespace Metavision { + +class Gen41Erc; + +class TzGen41 : public TzIssdDevice, public IlluminationProvider, public TzMainDevice { +public: + TzGen41(std::shared_ptr cmd, uint32_t dev_id, std::shared_ptr parent); + virtual ~TzGen41(); + static std::shared_ptr build(std::shared_ptr cmd, uint32_t dev_id, + std::shared_ptr parent); + + static bool can_build(std::shared_ptr, uint32_t dev_id); + virtual StreamFormat get_output_format(); + virtual long get_system_id() const; + virtual bool set_mode_standalone(); + virtual bool set_mode_master(); + virtual bool set_mode_slave(); + virtual I_DeviceControl::SyncMode get_mode(); + virtual I_HW_Identification::SensorInfo get_sensor_info() { + return {4, 1}; + } + long long get_sensor_id(); + virtual int get_illumination(); + +protected: + virtual void spawn_facilities(DeviceBuilder &device_builder); + +private: + void time_base_config(bool external, bool master); + void lifo_control(bool enable, bool out_en, bool cnt_en); + void iph_mirror_control(bool enable); + + I_DeviceControl::SyncMode sync_mode_; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_GEN41_TZ_DEVICE_H diff --git a/hal_psee_plugins/include/devices/gen41/gen41_tz_trigger_event.h b/hal_psee_plugins/include/devices/gen41/gen41_tz_trigger_event.h new file mode 100644 index 000000000..77b61bdeb --- /dev/null +++ b/hal_psee_plugins/include/devices/gen41/gen41_tz_trigger_event.h @@ -0,0 +1,58 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_GEN41_TRIGGER_EVENT_H +#define METAVISION_HAL_GEN41_TRIGGER_EVENT_H + +#include +#include +#include + +#include "metavision/hal/facilities/i_trigger_in.h" + +namespace Metavision { + +class RegisterMap; +class TzDevice; + +class Gen41TzTriggerEvent : public I_TriggerIn { +public: + /// @brief Constructor + Gen41TzTriggerEvent(const std::shared_ptr ®ister_map, const std::string &prefix, + const std::shared_ptr tzDev); + + enum class Channels : uint32_t { TRIG_IN = 0 }; + + /// @brief Enables external trigger monitoring + /// @param channel External trigger's channel + bool enable(uint32_t channel); + + /// @brief Disables external trigger monitoring + /// @param channel External trigger's channel + bool disable(uint32_t channel); + + /// @brief Checks if trigger in index is enabled + /// @param channel External trigger's channel + /// @return true if trigger in index is enabled, False otherwise + bool is_enabled(uint32_t channel); + +private: + bool is_valid_id(uint32_t channel); + + std::shared_ptr register_map_; + std::shared_ptr tzDev_; + std::string prefix_; + const std::vector chan_ids_{Channels::TRIG_IN}; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_GEN41_TRIGGER_EVENT_H diff --git a/hal_psee_plugins/include/devices/gen41/register_maps/gen41_evk2_registermap.h b/hal_psee_plugins/include/devices/gen41/register_maps/gen41_evk2_registermap.h new file mode 100644 index 000000000..d25a4738a --- /dev/null +++ b/hal_psee_plugins/include/devices/gen41/register_maps/gen41_evk2_registermap.h @@ -0,0 +1,4879 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_GEN41_EVK2_REGISTERMAP_H +#define METAVISION_HAL_GEN41_EVK2_REGISTERMAP_H + +#include "utils/regmap_data.h" + +RegmapData Gen41Evk2RegisterMap[] = { + // clang-format off + + {R, {"SYSTEM_CONTROL/GLOBAL_CONTROL", 0x0000}}, + {F, {"MODE", 0, 2, 0x0}}, + {F, {"FORMAT", 2, 2, 0x2}}, + {A, {"raw", 0x0}}, + {A, {"2.0", 0x2}}, + {A, {"3.0", 0x3}}, + {F, {"CCAM_ID", 4, 2, 0x0}}, + {F, {"OUTPUT_FORMAT", 6, 2, 0x2}}, + {A, {"raw", 0x0}}, + {A, {"2.0", 0x2}}, + {A, {"3.0", 0x3}}, + + {R, {"SYSTEM_CONTROL/CLK_CONTROL", 0x0004}}, + {F, {"CORE_EN", 0, 1, 0x0}}, + {F, {"CORE_SOFT_RST", 1, 1, 0x0}}, + {F, {"CORE_REG_BANK_RST", 2, 1, 0x0}}, + {F, {"SENSOR_IF_EN", 4, 1, 0x0}}, + {F, {"SENSOR_IF_SOFT_RST", 5, 1, 0x0}}, + {F, {"SENSOR_IF_REG_BANK_RST", 6, 1, 0x0}}, + {F, {"HOST_IF_EN", 8, 1, 0x0}}, + {F, {"HOST_IF_SOFT_RST", 9, 1, 0x0}}, + {F, {"HOST_IF_REG_BANK_RST", 10, 1, 0x0}}, + {F, {"GLOBAL_RST", 16, 1, 0x0}}, + + {R, {"SYSTEM_CONTROL/TIME_BASE_CONTROL", 0x0008}}, + {F, {"ENABLE", 0, 1, 0x0}}, + {F, {"EXT_SYNC_MODE", 1, 1, 0x0}}, + {F, {"EXT_SYNC_ENABLE", 2, 1, 0x0}}, + {F, {"EXT_SYNC_MASTER", 3, 1, 0x0}}, + {F, {"EXT_SYNC_MASTER_SEL", 4, 1, 0x0}}, + {F, {"ENABLE_EXT_SYNC", 5, 1, 0x0}}, + {F, {"ENABLE_CAM_SYNC", 6, 1, 0x0}}, + + {R, {"SYSTEM_CONTROL/TIME_BASE_RESOLUTION", 0x000C}}, + {F, {"CLKS", 0, 16, 0x64}}, + + {R, {"SYSTEM_CONTROL/IMU_CONTROL", 0x0010}}, + {F, {"ENABLE", 0, 1, 0x0}}, + + {R, {"SYSTEM_CONTROL/EVT_DATA_FORMATTER_CONTROL", 0x0014}}, + {F, {"ENABLE", 0, 1, 0x0}}, + {F, {"BYPASS", 1, 1, 0x0}}, + + {R, {"SYSTEM_CONTROL/EVT_MERGE_CONTROL", 0x0018}}, + {F, {"ENABLE", 0, 1, 0x0}}, + {F, {"BYPASS", 1, 1, 0x0}}, + {F, {"SOURCE", 2, 1, 0x0}}, + + {R, {"SYSTEM_CONTROL/TH_RECOVERY_CONTROL", 0x0044}}, + {F, {"ENABLE", 0, 1, 0x0}}, + {F, {"BYPASS", 1, 1, 0x0}}, + + {R, {"SYSTEM_CONTROL/TS_CHECKER_CONTROL", 0x0048}}, + {F, {"BYPASS", 0, 1, 0x0}}, + {F, {"THRESHOLD", 1, 24, 0x186A0}}, + + {R, {"SYSTEM_CONTROL/TS_CHECKER_EVT_UI_CNT", 0x004C}}, + {F, {"TIME_LOW", 0, 16, 0x0}}, + {F, {"TIME_HIGH", 16, 16, 0x0}}, + + {R, {"SYSTEM_CONTROL/TS_CHECKER_EVT_BROKEN_CNT", 0x0050}}, + {F, {"TIME_LOW", 0, 16, 0x0}}, + {F, {"TIME_HIGH", 16, 16, 0x0}}, + + {R, {"SYSTEM_CONTROL/TS_CHECKER_EVT_UK_ERR_CNT", 0x0054}}, + {F, {"TIME_LOW", 0, 16, 0x0}}, + {F, {"TIME_HIGH", 16, 16, 0x0}}, + + {R, {"SYSTEM_CONTROL/BOARD_CONTROL_STATUS", 0x0058}}, + {F, {"ENET_PWDN", 0, 1, 0x0}}, + {F, {"PAV_15W", 1, 1, 0x0}}, + {F, {"PAV_4P5W", 2, 1, 0x0}}, + {F, {"PAV_7P5W", 3, 1, 0x0}}, + {F, {"USB_EN_READ_PAV", 4, 1, 0x0}}, + {F, {"USB3_EN_REF_CLK", 5, 1, 0x1}}, + {F, {"USBCC_MUX_EN_N", 6, 1, 0x0}}, + {F, {"VMON_ALERT", 7, 1, 0x0}}, + {F, {"VMON_I2C_EN_LVLSHFT", 8, 1, 0x0}}, + {F, {"VERSION", 10, 2, 0x0}}, + {F, {"USB2PHY_RESETB", 12, 1, 0x1}}, + {F, {"ENET_RESET_N", 13, 1, 0x0}}, + {F, {"LDO_2V5_1V0_EN", 14, 1, 0x0}}, + {F, {"VMON_PU_TO_1V8", 15, 1, 0x0}}, + {F, {"USB_C_OUT1", 16, 1, 0x0}}, + {F, {"USB_C_OUT2", 17, 1, 0x0}}, + + {R, {"SYSTEM_CONTROL/IO_CONTROL", 0x005C}}, + {F, {"SYNC_IN", 0, 1, 0x0}}, + {F, {"TRIG_IN", 1, 1, 0x0}}, + {F, {"SYNC_OUT_EN_FLT_CHK", 4, 1, 0x0}}, + {F, {"SYNC_OUT_EN_HSIDE", 5, 1, 0x0}}, + {F, {"SYNC_OUT_FAULT_ALERT", 6, 1, 0x0}}, + {F, {"SYNC_OUT", 7, 1, 0x0}}, + {F, {"SYNC_OUT_MODE", 8, 4, 0x0}}, + + {R, {"SYSTEM_CONTROL/OUT_TH_RECOVERY_CONTROL", 0x0060}}, + {F, {"ENABLE", 0, 1, 0x1}}, + {F, {"BYPASS", 1, 1, 0x1}}, + + {R, {"SYSTEM_CONTROL/OUT_TS_CHECKER_CONTROL", 0x0064}}, + {F, {"BYPASS", 0, 1, 0x1}}, + {F, {"THRESHOLD", 1, 24, 0x186A0}}, + + {R, {"SYSTEM_CONTROL/OUT_TS_CHECKER_EVT_UI_CNT", 0x0068}}, + {F, {"TIME_LOW", 0, 16, 0x0}}, + {F, {"TIME_HIGH", 16, 16, 0x0}}, + + {R, {"SYSTEM_CONTROL/OUT_TS_CHECKER_EVT_BROKEN_CNT", 0x006C}}, + {F, {"TIME_LOW", 0, 16, 0x0}}, + {F, {"TIME_HIGH", 16, 16, 0x0}}, + + {R, {"SYSTEM_CONTROL/OUT_TS_CHECKER_EVT_UK_ERR_CNT", 0x0070}}, + {F, {"TIME_LOW", 0, 16, 0x0}}, + {F, {"TIME_HIGH", 16, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/TEMP", 0x0200}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VCC_INT", 0x0202}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VCC_AUX", 0x0204}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VP_VN", 0x0206}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VREFP", 0x0208}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VREFN", 0x020A}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VCC_BRAM", 0x020C}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/SUPPLY_OFFSET", 0x0210}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/OFFSET", 0x0212}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/GAIN_ERROR", 0x0214}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VAUX0", 0x0220}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VAUX1", 0x0222}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VAUX2", 0x0224}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VAUX3", 0x0226}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VAUX4", 0x0228}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VAUX5", 0x022A}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VAUX6", 0x022C}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VAUX7", 0x022E}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VAUX8", 0x0230}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VAUX9", 0x0232}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VAUX10", 0x0234}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VAUX11", 0x0236}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VAUX12", 0x0238}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VAUX13", 0x023A}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VAUX14", 0x023C}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VAUX15", 0x023E}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/MAX_TEMP", 0x0240}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/MAX_VCC_INT", 0x0242}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/MAX_VCC_AUX", 0x0244}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/MAX_VCC_BRAM", 0x0246}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/MIN_TEMP", 0x0248}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/MIN_VCC_INT", 0x024A}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/MIN_VCC_AUX", 0x024C}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/MIN_VCC_BRAM", 0x024E}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/FLAGS", 0x027E}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/CONF_REG0", 0x0280}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/CONF_REG1", 0x0282}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/CONF_REG2", 0x0284}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/SEQ_REG0", 0x0290}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/SEQ_REG1", 0x0292}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/SEQ_REG2", 0x0294}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/SEQ_REG3", 0x0296}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/SEQ_REG4", 0x0298}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/SEQ_REG5", 0x029A}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/SEQ_REG6", 0x029C}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/SEQ_REG7", 0x029E}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/ALARM_THR_REG0", 0x02A0}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/ALARM_THR_REG1", 0x02A2}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/ALARM_THR_REG2", 0x02A4}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/ALARM_THR_REG3", 0x02A6}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/ALARM_THR_REG4", 0x02A8}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/ALARM_THR_REG5", 0x02AA}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/ALARM_THR_REG6", 0x02AC}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/ALARM_THR_REG7", 0x02AE}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/ALARM_THR_REG8", 0x02B0}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/ALARM_THR_REG9", 0x02B2}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/ALARM_THR_REG10", 0x02B4}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/ALARM_THR_REG11", 0x02B6}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/ALARM_THR_REG12", 0x02B8}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/ALARM_THR_REG13", 0x02BA}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/ALARM_THR_REG14", 0x02BC}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/ALARM_THR_REG15", 0x02BE}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR/EVT_ENABLE", 0x0300}}, + {F, {"ALL_EVT", 0, 1, 0x0}}, + {F, {"TEMP_EVT", 1, 1, 0x0}}, + {F, {"VCC_INT_EVT", 2, 1, 0x0}}, + {F, {"VCC_AUX_EVT", 3, 1, 0x0}}, + {F, {"VCC_BRAM_EVT", 4, 1, 0x0}}, + {F, {"ALL_ALARM", 8, 1, 0x0}}, + {F, {"OVER_TEMP_ALARM", 9, 1, 0x0}}, + {F, {"USER_TEMP_ALARM", 10, 1, 0x0}}, + {F, {"VCC_INT_ALARM", 11, 1, 0x0}}, + {F, {"VCC_AUX_ALARM", 12, 1, 0x0}}, + {F, {"VCC_BRAM_ALARM", 13, 1, 0x0}}, + {F, {"SYSTEM_POWER_DOWN", 16, 1, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR/EVT_PERIOD", 0x0304}}, + {F, {"VALUE", 0, 24, 0x186A0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR/EXT_TEMP_CONTROL", 0x0308}}, + {F, {"STATUS_SYS_POWER_DOWN", 0, 1, 0x0}}, + {F, {"EXT_TEMP_MONITOR_EN", 1, 1, 0x0}}, + {F, {"EXT_TEMP_MONITOR_SPI_EN", 2, 1, 0x0}}, + {F, {"REMOTE_TEMP_MONITOR_EN", 3, 1, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR/EVK_EXT_TEMP_VALUE", 0x030C}}, + {F, {"VALUE", 0, 22, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR/REMOTE_TEMP_ADDR", 0x0310}}, + {F, {"VALUE", 0, 24, 0x2030C}}, + + {R, {"SYSTEM_MONITOR/ATIS_IF_MONITOR/CFG_ENABLE", 0x0340}}, + {F, {"ALL_EVT", 0, 1, 0x0}}, + {F, {"TD_IDLE_TIME_EVT", 1, 1, 0x0}}, + {F, {"TD_IDLE_TIMEOUT_EVT", 2, 1, 0x0}}, + {F, {"APS_IDLE_TIME_EVT", 3, 1, 0x0}}, + {F, {"APS_IDLE_TIMEOUT_EVT", 4, 1, 0x0}}, + {F, {"GLOBAL_ILLUMINATION_EVT", 5, 1, 0x0}}, + {F, {"EM_TRIGGER_SEQ_EVT", 6, 1, 0x0}}, + {F, {"REFRACTORY_CLOCK_EVT", 7, 1, 0x0}}, + + {R, {"SYSTEM_MONITOR/ATIS_IF_MONITOR/CFG_IDLE_TIME_THR", 0x0344}}, + {F, {"VALUE", 0, 26, 0x2710}}, + + {R, {"SYSTEM_MONITOR/ATIS_IF_MONITOR/CFG_IDLE_TIMEOUT_THR", 0x0348}}, + {F, {"VALUE", 0, 26, 0x2710}}, + + {R, {"SYSTEM_MONITOR/ATIS_IF_MONITOR/STAT_GLOBAL_ILLUMINATION", 0x034C}}, + {F, {"DATA", 0, 26, 0x0}}, + {F, {"VALID", 31, 1, 0x0}}, + + {R, {"SYSTEM_MONITOR/ATIS_IF_MONITOR/STAT_REFRACTORY_CLOCK", 0x0350}}, + {F, {"DATA", 0, 24, 0x0}}, + + {R, {"SYSTEM_MONITOR/EXT_TRIGGERS/ENABLE", 0x0360}}, + {F, {"TRIGGER_0", 0, 1, 0x0}}, + {F, {"TRIGGER_1", 1, 1, 0x0}}, + {F, {"TRIGGER_2", 2, 1, 0x0}}, + {F, {"TRIGGER_3", 3, 1, 0x0}}, + {F, {"TRIGGER_4", 4, 1, 0x0}}, + + {R, {"SYSTEM_MONITOR/EXT_TRIGGERS/OUT_ENABLE", 0x0364}}, + {F, {"VALUE", 0, 1, 0x0}}, + + {R, {"SYSTEM_MONITOR/EXT_TRIGGERS/OUT_PULSE_PERIOD", 0x0368}}, + {F, {"", 0, 32, 0x64}}, + + {R, {"SYSTEM_MONITOR/EXT_TRIGGERS/OUT_PULSE_WIDTH", 0x036C}}, + {F, {"", 0, 32, 0x1}}, + + {R, {"SYSTEM_MONITOR/EXT_TRIGGERS/OUT_REGISTER_MODE", 0x0370}}, + {F, {"ENABLE", 0, 1, 0x0}}, + {F, {"VALUE", 1, 1, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/WHO_AM_I", 0x0400}}, + {F, {"VALUE", 0, 8, 0xEA}}, + + {R, {"SYSTEM_MONITOR/IMU/GYRO_SMPLRT_DIV", 0x0400}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/I2C_MST_ODR_CONFIG", 0x0400}}, + {F, {"I2C_MST_ODR_CONFIG", 0, 4, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/GYRO_CONFIG_1", 0x0404}}, + {F, {"GYRO_FCHOICE", 0, 1, 0x1}}, + {F, {"GYRO_FS_SEL", 1, 2, 0x0}}, + {F, {"GYRO_DLPFCFG", 3, 3, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/I2C_MST_CTRL", 0x0404}}, + {F, {"I2C_MST_CLK", 0, 4, 0x0}}, + {F, {"I2C_MST_P_NSR", 4, 1, 0x0}}, + {F, {"MULT_MST_EN", 7, 1, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/SELF_TEST_X_GYRO", 0x0408}}, + {F, {"XG_ST_DATA", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/GYRO_CONFIG_2", 0x0408}}, + {F, {"GYRO_AVGCFG", 0, 3, 0x0}}, + {F, {"ZGYRO_CTEN", 3, 1, 0x0}}, + {F, {"YGYRO_CTEN", 4, 1, 0x0}}, + {F, {"XGYRO_CTEN", 5, 1, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/I2C_MST_DELAY_CTRL", 0x0408}}, + {F, {"I2C_SLV0_DELAY_EN", 0, 1, 0x0}}, + {F, {"I2C_SLV1_DELAY_EN", 1, 1, 0x0}}, + {F, {"I2C_SLV2_DELAY_EN", 2, 1, 0x0}}, + {F, {"I2C_SLV3_DELAY_EN", 3, 1, 0x0}}, + {F, {"I2C_SLV4_DELAY_EN", 4, 1, 0x0}}, + {F, {"DELAY_ES_SHADOW", 7, 1, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/USER_CTRL", 0x040C}}, + {F, {"I2C_MST_RST", 1, 1, 0x0}}, + {F, {"SRAM_RST", 2, 1, 0x0}}, + {F, {"DMP_RST", 3, 1, 0x0}}, + {F, {"I2C_IF_DIS", 4, 1, 0x0}}, + {F, {"I2C_MST_EN", 5, 1, 0x0}}, + {F, {"FIFO_EN", 6, 1, 0x0}}, + {F, {"DMP_EN", 7, 1, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/SELF_TEST_Y_GYRO", 0x040C}}, + {F, {"YG_ST_DATA", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/XG_OFFS_USRH", 0x040C}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/I2C_SLV0_ADDR", 0x040C}}, + {F, {"I2C_ID_0", 0, 7, 0x0}}, + {F, {"I2C_SLV0_RNW", 7, 1, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/SELF_TEST_Z_GYRO", 0x0410}}, + {F, {"ZG_ST_DATA", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/XG_OFFS_USRL", 0x0410}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/I2C_SLV0_REG", 0x0410}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/LP_CONFIG", 0x0414}}, + {F, {"GYRO_CYCLE", 4, 1, 0x0}}, + {F, {"ACCEL_CYCLE", 5, 1, 0x0}}, + {F, {"I2C_MST_CYCLE", 6, 1, 0x1}}, + + {R, {"SYSTEM_MONITOR/IMU/YG_OFFS_USRH", 0x0414}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/I2C_SLV0_CTRL", 0x0414}}, + {F, {"I2C_SLV0_LENG", 0, 4, 0x0}}, + {F, {"I2C_SLV0_GRP", 4, 1, 0x0}}, + {F, {"I2C_SLV0_REG_DIS", 5, 1, 0x0}}, + {F, {"I2C_SLV0_BYTE_SW", 6, 1, 0x0}}, + {F, {"I2C_SLV0_EN", 7, 1, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/PWR_MGMT_1", 0x0418}}, + {F, {"CLKSEL", 0, 3, 0x0}}, + {F, {"TEMP_DIS", 3, 1, 0x0}}, + {F, {"LP_EN", 5, 1, 0x0}}, + {F, {"SLEEP", 6, 1, 0x0}}, + {F, {"DEVICE_RESET", 7, 1, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/YG_OFFS_USRL", 0x0418}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/I2C_SLV0_DO", 0x0418}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/PWR_MGMT_2", 0x041C}}, + {F, {"DISABLE_GYRO", 0, 3, 0x6}}, + {F, {"DISABLE_ACCEL", 3, 3, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/ZG_OFFS_USRH", 0x041C}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/I2C_SLV1_ADDR", 0x041C}}, + {F, {"I2C_ID_1", 0, 7, 0x0}}, + {F, {"I2C_SLV1_RNW", 7, 1, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/ZG_OFFS_USRL", 0x0420}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/I2C_SLV1_REG", 0x0420}}, + {F, {"I2C_SLV1_REG", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/ODR_ALIGN_EN", 0x0424}}, + {F, {"ODR_ALIGN_EN", 0, 1, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/I2C_SLV1_CTRL", 0x0424}}, + {F, {"I2C_SLV1_LENG", 0, 4, 0x0}}, + {F, {"I2C_SLV1_GRP", 4, 1, 0x0}}, + {F, {"I2C_SLV1_REG_DIS", 5, 1, 0x0}}, + {F, {"I2C_SLV1_BYTE_SW", 6, 1, 0x0}}, + {F, {"I2C_SLV1_EN", 7, 1, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/I2C_SLV1_DO", 0x0428}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/I2C_SLV2_ADDR", 0x042C}}, + {F, {"I2C_ID_2", 0, 7, 0x0}}, + {F, {"I2C_SLV2_RNW", 7, 1, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/I2C_SLV2_REG", 0x0430}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/I2C_SLV2_CTRL", 0x0434}}, + {F, {"I2C_SLV2_LENG", 0, 4, 0x0}}, + {F, {"I2C_SLV2_GRP", 4, 1, 0x0}}, + {F, {"I2C_SLV2_REG_DIS", 5, 1, 0x0}}, + {F, {"I2C_SLV2_BYTE_SW", 6, 1, 0x0}}, + {F, {"I2C_SLV2_EN", 7, 1, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/SELF_TEST_X_ACCEL", 0x0438}}, + {F, {"XA_ST_DATA", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/I2C_SLV2_DO", 0x0438}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/INT_PIN_CFG", 0x043C}}, + {F, {"BYPASS_EN", 1, 1, 0x0}}, + {F, {"FSYNC_INT_MODE_EN", 2, 1, 0x0}}, + {F, {"ACTL_FSYNC", 3, 1, 0x0}}, + {F, {"INT_ANYRD_2CLEAR", 4, 1, 0x0}}, + {F, {"INT1_LATCH_INT_EN", 5, 1, 0x0}}, + {F, {"INT1_OPEN", 6, 1, 0x0}}, + {F, {"INT1_ACTL", 7, 1, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/SELF_TEST_Y_ACCEL", 0x043C}}, + {F, {"YA_ST_DATA", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/I2C_SLV3_ADDR", 0x043C}}, + {F, {"I2C_ID_3", 0, 7, 0x0}}, + {F, {"I2C_SLV3_RNW", 7, 1, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/INT_ENABLE", 0x0440}}, + {F, {"I2C_MST_INT_EN", 0, 1, 0x0}}, + {F, {"DMP_INT1_EN", 1, 1, 0x0}}, + {F, {"PLL_RDY_EN", 2, 1, 0x0}}, + {F, {"WOM_INT_EN", 3, 1, 0x0}}, + {F, {"REG_WOF_EN", 7, 1, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/SELF_TEST_Z_ACCEL", 0x0440}}, + {F, {"ZA_ST_DATA", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/ACCEL_SMPLRT_DIV_1", 0x0440}}, + {F, {"VALUE", 0, 4, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/I2C_SLV3_REG", 0x0440}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/INT_ENABLE_1", 0x0444}}, + {F, {"RAW_DATA_0_RDY_EN", 0, 1, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/ACCEL_SMPLRT_DIV_2", 0x0444}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/I2C_SLV3_CTRL", 0x0444}}, + {F, {"I2C_SLV3_LENG", 0, 4, 0x0}}, + {F, {"I2C_SLV3_GRP", 4, 1, 0x0}}, + {F, {"I2C_SLV3_REG_DIS", 5, 1, 0x0}}, + {F, {"I2C_SLV3_BYTE_SW", 6, 1, 0x0}}, + {F, {"I2C_SLV3_EN", 7, 1, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/INT_ENABLE_2", 0x0448}}, + {F, {"FIFO_OVERFLOW_EN", 0, 5, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/ACCEL_INTEL_CTRL", 0x0448}}, + {F, {"ACCEL_INTEL_MODE_INT", 0, 1, 0x0}}, + {F, {"ACCEL_INTEL_EN", 1, 1, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/I2C_SLV3_DO", 0x0448}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/INT_ENABLE_3", 0x044C}}, + {F, {"FIFO_WM_EN", 0, 5, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/ACCEL_WOM_THR", 0x044C}}, + {F, {"WOM_THRESHOLD", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/I2C_SLV4_ADDR", 0x044C}}, + {F, {"I2C_ID_4", 0, 7, 0x0}}, + {F, {"I2C_SLV4_RNW", 7, 1, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/XA_OFFS_H", 0x0450}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/ACCEL_CONFIG", 0x0450}}, + {F, {"ACCEL_FCHOICE", 0, 1, 0x1}}, + {F, {"ACCEL_FS_SEL", 1, 2, 0x0}}, + {F, {"ACCEL_DLPFCFG", 3, 3, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/I2C_SLV4_REG", 0x0450}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/XA_OFFS_L", 0x0454}}, + {F, {"VALUE", 1, 7, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/ACCEL_CONFIG_2", 0x0454}}, + {F, {"DEC3_CFG", 0, 2, 0x0}}, + {F, {"AZ_ST_EN_REG", 2, 1, 0x0}}, + {F, {"AY_ST_EN_REG", 3, 1, 0x0}}, + {F, {"AX_ST_EN_REG", 4, 1, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/I2C_SLV4_CTRL", 0x0454}}, + {F, {"I2C_SLV4_DLY", 0, 5, 0x0}}, + {F, {"I2C_SLV4_REG_DIS", 5, 1, 0x0}}, + {F, {"I2C_SLV4_BYTE_SW", 6, 1, 0x0}}, + {F, {"I2C_SLV4_EN", 7, 1, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/I2C_SLV4_DO", 0x0458}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/I2C_MST_STATUS", 0x045C}}, + {F, {"I2C_SLV0_NACK", 0, 1, 0x0}}, + {F, {"I2C_SLV1_NACK", 1, 1, 0x0}}, + {F, {"I2C_SLV2_NACK", 2, 1, 0x0}}, + {F, {"I2C_SLV3_NACK", 3, 1, 0x0}}, + {F, {"I2C_SLV4_NACK", 4, 1, 0x0}}, + {F, {"I2C_LOST_ARB", 5, 1, 0x0}}, + {F, {"I2C_SLV4_DONE", 6, 1, 0x0}}, + {F, {"PASS_THROUGH", 7, 1, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/YA_OFFS_H", 0x045C}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/I2C_SLV4_DI", 0x045C}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/YA_OFFS_L", 0x0460}}, + {F, {"VALUE", 1, 7, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/INT_STATUS", 0x0464}}, + {F, {"I2C_MST_INT", 0, 1, 0x0}}, + {F, {"DMP_INT1", 1, 1, 0x0}}, + {F, {"PLL_RDY_INT", 2, 1, 0x0}}, + {F, {"WOM_INT", 3, 1, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/INT_STATUS_1", 0x0468}}, + {F, {"RAW_DATA_0_RDY_INT", 0, 1, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/ZA_OFFS_H", 0x0468}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/INT_STATUS_2", 0x046C}}, + {F, {"FIFO_OVERFLOW_INT", 0, 5, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/ZA_OFFS_L", 0x046C}}, + {F, {"VALUE", 1, 7, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/INT_STATUS_3", 0x0470}}, + {F, {"FIFO_WM_INT", 0, 5, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/DELAY_TIMEH", 0x04A0}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/TIMEBASE_CORRECTION_PLL", 0x04A0}}, + {F, {"TBC_PLL", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/DELAY_TIMEL", 0x04A4}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/ACCEL_XOUT_H", 0x04B4}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/ACCEL_XOUT_L", 0x04B8}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/ACCEL_YOUT_H", 0x04BC}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/ACCEL_YOUT_L", 0x04C0}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/ACCEL_ZOUT_H", 0x04C4}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/ACCEL_ZOUT_L", 0x04C8}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/GYRO_XOUT_H", 0x04CC}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/GYRO_XOUT_L", 0x04D0}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/GYRO_YOUT_H", 0x04D4}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/GYRO_YOUT_L", 0x04D8}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/GYRO_ZOUT_H", 0x04DC}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/GYRO_ZOUT_L", 0x04E0}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/TEMP_OUT_H", 0x04E4}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/TEMP_OUT_L", 0x04E8}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/EXT_SLV_SENS_DATA_00", 0x04EC}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/EXT_SLV_SENS_DATA_01", 0x04F0}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/EXT_SLV_SENS_DATA_02", 0x04F4}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/EXT_SLV_SENS_DATA_03", 0x04F8}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/EXT_SLV_SENS_DATA_04", 0x04FC}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/EXT_SLV_SENS_DATA_05", 0x0500}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/EXT_SLV_SENS_DATA_06", 0x0504}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/EXT_SLV_SENS_DATA_07", 0x0508}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/EXT_SLV_SENS_DATA_08", 0x050C}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/EXT_SLV_SENS_DATA_09", 0x0510}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/EXT_SLV_SENS_DATA_10", 0x0514}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/EXT_SLV_SENS_DATA_11", 0x0518}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/EXT_SLV_SENS_DATA_12", 0x051C}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/EXT_SLV_SENS_DATA_13", 0x0520}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/EXT_SLV_SENS_DATA_14", 0x0524}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/EXT_SLV_SENS_DATA_15", 0x0528}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/EXT_SLV_SENS_DATA_16", 0x052C}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/EXT_SLV_SENS_DATA_17", 0x0530}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/EXT_SLV_SENS_DATA_18", 0x0534}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/EXT_SLV_SENS_DATA_19", 0x0538}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/EXT_SLV_SENS_DATA_20", 0x053C}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/EXT_SLV_SENS_DATA_21", 0x0540}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/EXT_SLV_SENS_DATA_22", 0x0544}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/EXT_SLV_SENS_DATA_23", 0x0548}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/FSYNC_CONFIG", 0x0548}}, + {F, {"EXT_SYNC_SET", 0, 4, 0x0}}, + {F, {"WOF_EDGE_INT", 4, 1, 0x0}}, + {F, {"WOF_DEGLITCH_EN", 5, 1, 0x0}}, + {F, {"DELAY_TIME_EN", 7, 1, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/TEMP_CONFIG", 0x054C}}, + {F, {"TEMP_DLPFCFG", 0, 3, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/MOD_CTRL_USR", 0x0550}}, + {F, {"REG_LP_DMP_EN", 0, 1, 0x1}}, + + {R, {"SYSTEM_MONITOR/IMU/FIFO_EN_1", 0x0598}}, + {F, {"SLV_0_FIFO_EN", 0, 1, 0x0}}, + {F, {"SLV_1_FIFO_EN", 1, 1, 0x0}}, + {F, {"SLV_2_FIFO_EN", 2, 1, 0x0}}, + {F, {"SLV_3_FIFO_EN", 3, 1, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/FIFO_EN_2", 0x059C}}, + {F, {"TEMP_FIFO_EN", 0, 1, 0x0}}, + {F, {"GYRO_X_FIFO_EN", 1, 1, 0x0}}, + {F, {"GYRO_Y_FIFO_EN", 2, 1, 0x0}}, + {F, {"GYRO_Z_FIFO_EN", 3, 1, 0x0}}, + {F, {"ACCEL_FIFO_EN", 4, 1, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/FIFO_RST", 0x05A0}}, + {F, {"FIFO_RESET", 0, 5, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/FIFO_MODE", 0x05A4}}, + {F, {"FIFO_MODE", 0, 5, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/FIFO_COUNTH", 0x05C0}}, + {F, {"FIFO_CNT", 0, 5, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/FIFO_COUNTL", 0x05C4}}, + {F, {"FIFO_CNT", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/FIFO_R_W", 0x05C8}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/DATA_RDY_STATUS", 0x05D0}}, + {F, {"RAW_DATA_RDY", 0, 4, 0x0}}, + {F, {"WOF_STATUS", 7, 1, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/FIFO_CFG", 0x05D8}}, + {F, {"FIFO_CFG", 0, 1, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/REG_BANK_SEL", 0x05FC}}, + {F, {"USER_BANK", 4, 2, 0x0}}, + + {R, {"SYSTEM_MONITOR/CONTROL/EVT_MERGE_CONTROL", 0x0600}}, + {F, {"ENABLE", 0, 1, 0x1}}, + {F, {"BYPASS", 1, 1, 0x0}}, + {F, {"SOURCE", 2, 2, 0x0}}, + + {R, {"SYSTEM_CONFIG/ID", 0x0800}}, + {F, {"VALUE", 0, 8, 0x27}}, + + {R, {"SYSTEM_CONFIG/VERSION", 0x0804}}, + {F, {"MICRO", 0, 8, 0x0}}, + {F, {"MINOR", 8, 8, 0x0}}, + {F, {"MAJOR", 16, 8, 0x0}}, + + {R, {"SYSTEM_CONFIG/BUILD_DATE", 0x0808}}, + {F, {"VALUE", 0, 32, 0x0}}, + + {R, {"SYSTEM_CONFIG/VERSION_CONTROL_ID", 0x080C}}, + {F, {"VALUE", 0, 32, 0x0}}, + + {R, {"PS_HOST_IF/AXI_DMA_PACKETIZER/CONTROL", 0x2000}}, + {F, {"BYPASS", 0, 1, 0x0}}, + {F, {"ENABLE_COUNTER_PATTERN", 1, 1, 0x0}}, + + {R, {"PS_HOST_IF/AXI_DMA_PACKETIZER/PACKET_LENGTH", 0x2004}}, + {F, {"VALUE", 0, 32, 0x400}}, + + {R, {"PS_HOST_IF/AXIL_BRIDGE/CONTROL", 0x2100}}, + {F, {"BUS_ERROR_EN", 0, 1, 0x0}}, + + {R, {"PS_HOST_IF/AXIL_BRIDGE/ERROR_STATUS", 0x2104}}, + {F, {"CODE", 0, 16, 0x0}}, + {F, {"COUNT", 16, 16, 0x0}}, + + {R, {"SENSOR_IF/GEN41/roi_ctrl", 0x100004}}, + {F, {"roi_td_en", 1, 1, 0x0}}, + {F, {"roi_td_shadow_trigger", 5, 1, 0x0}}, + {F, {"td_roi_roni_n_en", 6, 1, 0x1}}, + {F, {"Reserved_8", 8, 1, 0x0}}, + {F, {"px_td_rstn", 10, 1, 0x1}}, + {F, {"Reserved_17_11", 11, 7, 0xA}}, + {F, {"Reserved_25", 25, 1, 0x0}}, + {F, {"Reserved_29_28", 28, 2, 0x3}}, + {F, {"Reserved_31_30", 30, 2, 0x3}}, + + {R, {"SENSOR_IF/GEN41/lifo_ctrl", 0x10000C}}, + {F, {"lifo_en", 0, 1, 0x0}}, + {F, {"lifo_out_en", 1, 1, 0x0}}, + {F, {"lifo_cnt_en", 2, 1, 0x0}}, + {F, {"Reserved_31_15", 15, 17, 0x0}}, + + {R, {"SENSOR_IF/GEN41/lifo_status", 0x100010}}, + {F, {"lifo_ton", 0, 29, 0x0}}, + {F, {"lifo_ton_valid", 29, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/Reserved_0014", 0x100014}}, + {F, {"Reserved_31_0", 0, 32, 0xA0301003}}, + + {R, {"SENSOR_IF/GEN41/refractory_ctrl", 0x100020}}, + {F, {"refr_counter", 0, 29, 0x0}}, + {F, {"refr_valid", 29, 1, 0x0}}, + {F, {"refr_cnt_en", 30, 1, 0x0}}, + {F, {"refr_en", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/roi_win_ctrl", 0x100034}}, + {F, {"roi_master_en", 0, 1, 0x0}}, + {F, {"roi_win_done", 1, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/roi_win_start_addr", 0x100038}}, + {F, {"roi_win_start_x", 0, 11, 0x0}}, + {F, {"roi_win_start_y", 16, 10, 0x0}}, + + {R, {"SENSOR_IF/GEN41/roi_win_end_addr", 0x10003C}}, + {F, {"roi_win_end_x", 0, 11, 0x4FF}}, + {F, {"roi_win_end_y", 16, 10, 0x2CF}}, + + {R, {"SENSOR_IF/GEN41/dig_pad2_ctrl", 0x100044}}, + {F, {"Reserved_11_0", 0, 12, 0xCCF}}, + {F, {"Reserved_15_12", 12, 4, 0xF}}, + {F, {"pad_sync", 16, 4, 0xF}}, + {F, {"Reserved_31_20", 20, 12, 0xCCF}}, + + {R, {"SENSOR_IF/GEN41/adc_control", 0x10004C}}, + {F, {"adc_en", 0, 1, 0x0}}, + {F, {"adc_clk_en", 1, 1, 0x0}}, + {F, {"adc_start", 2, 1, 0x0}}, + {F, {"Reserved_31_3", 3, 29, 0xE28}}, + + {R, {"SENSOR_IF/GEN41/adc_status", 0x100050}}, + {F, {"adc_dac_dyn", 0, 10, 0x0}}, + {F, {"Reserved_10", 10, 1, 0x0}}, + {F, {"adc_done_dyn", 11, 1, 0x0}}, + {F, {"Reserved_31_12", 12, 20, 0x0}}, + + {R, {"SENSOR_IF/GEN41/adc_misc_ctrl", 0x100054}}, + {F, {"Reserved_0", 0, 1, 0x0}}, + {F, {"adc_buf_cal_en", 1, 1, 0x0}}, + {F, {"Reserved_9_2", 2, 8, 0x4}}, + {F, {"adc_rng", 10, 2, 0x0}}, + {F, {"adc_temp", 12, 1, 0x0}}, + {F, {"Reserved_13", 13, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/temp_ctrl", 0x10005C}}, + {F, {"temp_buf_cal_en", 0, 1, 0x0}}, + {F, {"temp_buf_en", 1, 1, 0x0}}, + {F, {"Reserved_31_2", 2, 30, 0x20}}, + + {R, {"SENSOR_IF/GEN41/iph_mirr_ctrl", 0x100074}}, + {F, {"iph_mirr_en", 0, 1, 0x0}}, + {F, {"iph_mirr_amp_en", 1, 1, 0x0}}, + {F, {"Reserved_31_2", 2, 30, 0x0}}, + + {R, {"SENSOR_IF/GEN41/reqy_qmon_ctrl", 0x100088}}, + {F, {"reqy_qmon_en", 0, 1, 0x0}}, + {F, {"reqy_qmon_rstn", 1, 1, 0x0}}, + {F, {"Reserved_2", 2, 1, 0x0}}, + {F, {"Reserved_3", 3, 1, 0x0}}, + {F, {"Reserved_4", 4, 1, 0x0}}, + {F, {"Reserved_9_5", 5, 5, 0x4}}, + + {R, {"SENSOR_IF/GEN41/reqy_qmon_status", 0x10008C}}, + {F, {"reqy_qmon_sum", 0, 10, 0x0}}, + {F, {"reqy_qmon_trip", 10, 1, 0x0}}, + {F, {"Reserved_25_16", 16, 10, 0x0}}, + {F, {"Reserved_26", 26, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/bias/bias_fo", 0x101004}}, + {F, {"idac_ctl", 0, 8, 0x30}}, + {F, {"Reserved_27_8", 8, 20, 0x1A1E8}}, + {F, {"single_transfer", 28, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/bias/bias_hpf", 0x10100C}}, + {F, {"idac_ctl", 0, 8, 0x0}}, + {F, {"Reserved_27_8", 8, 20, 0x1A1FF}}, + {F, {"single_transfer", 28, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/bias/bias_diff_on", 0x101010}}, + {F, {"idac_ctl", 0, 8, 0x69}}, + {F, {"Reserved_27_8", 8, 20, 0x1A163}}, + {F, {"single_transfer", 28, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/bias/bias_diff", 0x101014}}, + {F, {"idac_ctl", 0, 8, 0x55}}, + {F, {"Reserved_27_8", 8, 20, 0x1A150}}, + {F, {"single_transfer", 28, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/bias/bias_diff_off", 0x101018}}, + {F, {"idac_ctl", 0, 8, 0x39}}, + {F, {"Reserved_27_8", 8, 20, 0x1A137}}, + {F, {"single_transfer", 28, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/bias/bias_refr", 0x101020}}, + {F, {"idac_ctl", 0, 8, 0x34}}, + {F, {"Reserved_27_8", 8, 20, 0x1A9CD}}, + {F, {"single_transfer", 28, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/bias/bgen_ctrl", 0x101100}}, + {F, {"burst_transfer", 0, 1, 0x0}}, + {F, {"Reserved_1", 1, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/roi/td_roi_x00", 0x102000}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/GEN41/roi/td_roi_x01", 0x102004}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/GEN41/roi/td_roi_x02", 0x102008}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/GEN41/roi/td_roi_x03", 0x10200C}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/GEN41/roi/td_roi_x04", 0x102010}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/GEN41/roi/td_roi_x05", 0x102014}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/GEN41/roi/td_roi_x06", 0x102018}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/GEN41/roi/td_roi_x07", 0x10201C}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/GEN41/roi/td_roi_x08", 0x102020}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/GEN41/roi/td_roi_x09", 0x102024}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/GEN41/roi/td_roi_x10", 0x102028}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/GEN41/roi/td_roi_x11", 0x10202C}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/GEN41/roi/td_roi_x12", 0x102030}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/GEN41/roi/td_roi_x13", 0x102034}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/GEN41/roi/td_roi_x14", 0x102038}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/GEN41/roi/td_roi_x15", 0x10203C}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/GEN41/roi/td_roi_x16", 0x102040}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/GEN41/roi/td_roi_x17", 0x102044}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/GEN41/roi/td_roi_x18", 0x102048}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/GEN41/roi/td_roi_x19", 0x10204C}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/GEN41/roi/td_roi_x20", 0x102050}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/GEN41/roi/td_roi_x21", 0x102054}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/GEN41/roi/td_roi_x22", 0x102058}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/GEN41/roi/td_roi_x23", 0x10205C}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/GEN41/roi/td_roi_x24", 0x102060}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/GEN41/roi/td_roi_x25", 0x102064}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/GEN41/roi/td_roi_x26", 0x102068}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/GEN41/roi/td_roi_x27", 0x10206C}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/GEN41/roi/td_roi_x28", 0x102070}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/GEN41/roi/td_roi_x29", 0x102074}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/GEN41/roi/td_roi_x30", 0x102078}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/GEN41/roi/td_roi_x31", 0x10207C}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/GEN41/roi/td_roi_x32", 0x102080}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/GEN41/roi/td_roi_x33", 0x102084}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/GEN41/roi/td_roi_x34", 0x102088}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/GEN41/roi/td_roi_x35", 0x10208C}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/GEN41/roi/td_roi_x36", 0x102090}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/GEN41/roi/td_roi_x37", 0x102094}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/GEN41/roi/td_roi_x38", 0x102098}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/GEN41/roi/td_roi_x39", 0x10209C}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/GEN41/roi/td_roi_y00", 0x104000}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/GEN41/roi/td_roi_y01", 0x104004}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/GEN41/roi/td_roi_y02", 0x104008}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/GEN41/roi/td_roi_y03", 0x10400C}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/GEN41/roi/td_roi_y04", 0x104010}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/GEN41/roi/td_roi_y05", 0x104014}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/GEN41/roi/td_roi_y06", 0x104018}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/GEN41/roi/td_roi_y07", 0x10401C}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/GEN41/roi/td_roi_y08", 0x104020}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/GEN41/roi/td_roi_y09", 0x104024}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/GEN41/roi/td_roi_y10", 0x104028}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/GEN41/roi/td_roi_y11", 0x10402C}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/GEN41/roi/td_roi_y12", 0x104030}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/GEN41/roi/td_roi_y13", 0x104034}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/GEN41/roi/td_roi_y14", 0x104038}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/GEN41/roi/td_roi_y15", 0x10403C}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/GEN41/roi/td_roi_y16", 0x104040}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/GEN41/roi/td_roi_y17", 0x104044}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/GEN41/roi/td_roi_y18", 0x104048}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/GEN41/roi/td_roi_y19", 0x10404C}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/GEN41/roi/td_roi_y20", 0x104050}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/GEN41/roi/td_roi_y21", 0x104054}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/GEN41/roi/td_roi_y22", 0x104058}}, + {F, {"effective", 0, 16, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFF}}, + {F, {"Reserved_16", 16, 1, 0x1}}, + {F, {"Reserved_17", 17, 1, 0x1}}, + {F, {"Reserved_19_18", 18, 2, 0x3}}, + {F, {"Reserved_21_20", 20, 2, 0x3}}, + {F, {"Reserved_22", 22, 1, 0x1}}, + {F, {"Reserved_23", 23, 1, 0x1}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6000", 0x106000}}, + {F, {"Reserved_0", 0, 1, 0x0}}, + {F, {"Reserved_1", 1, 1, 0x0}}, + {F, {"Reserved_2", 2, 1, 0x0}}, + {F, {"Reserved_3", 3, 1, 0x0}}, + {F, {"Reserved_4", 4, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/in_drop_rate_control", 0x106004}}, + {F, {"cfg_event_delay_fifo_en", 0, 1, 0x0}}, + {F, {"Reserved_1", 1, 1, 0x0}}, + {F, {"Reserved_10_2", 2, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/reference_period", 0x106008}}, + {F, {"erc_reference_period", 0, 10, 0x80}}, + + {R, {"SENSOR_IF/GEN41/erc/td_target_event_rate", 0x10600C}}, + {F, {"target_event_rate", 0, 22, 0x80}}, + + {R, {"SENSOR_IF/GEN41/erc/erc_enable", 0x106028}}, + {F, {"erc_en", 0, 1, 0x0}}, + {F, {"Reserved_1", 1, 1, 0x0}}, + {F, {"Reserved_2", 2, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_602C", 0x10602C}}, + {F, {"Reserved_0", 0, 1, 0x0}}, + {F, {"Reserved_1", 1, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_dropping_control", 0x106050}}, + {F, {"t_dropping_en", 0, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/h_dropping_control", 0x106060}}, + {F, {"h_dropping_en", 0, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/v_dropping_control", 0x106070}}, + {F, {"v_dropping_en", 0, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/h_drop_lut_00", 0x106080}}, + {F, {"hlut00", 0, 5, 0x0}}, + {F, {"hlut01", 8, 5, 0x0}}, + {F, {"hlut02", 16, 5, 0x0}}, + {F, {"hlut03", 24, 5, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/h_drop_lut_01", 0x106084}}, + {F, {"hlut04", 0, 5, 0x0}}, + {F, {"hlut05", 8, 5, 0x0}}, + {F, {"hlut06", 16, 5, 0x0}}, + {F, {"hlut07", 24, 5, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/h_drop_lut_02", 0x106088}}, + {F, {"hlut08", 0, 5, 0x0}}, + {F, {"hlut09", 8, 5, 0x0}}, + {F, {"hlut10", 16, 5, 0x0}}, + {F, {"hlut11", 24, 5, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/h_drop_lut_03", 0x10608C}}, + {F, {"hlut12", 0, 5, 0x0}}, + {F, {"hlut13", 8, 5, 0x0}}, + {F, {"hlut14", 16, 5, 0x0}}, + {F, {"hlut15", 24, 5, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/h_drop_lut_04", 0x106090}}, + {F, {"hlut16", 0, 5, 0x0}}, + {F, {"hlut17", 8, 5, 0x0}}, + {F, {"hlut18", 16, 5, 0x0}}, + {F, {"hlut19", 24, 5, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/h_drop_lut_05", 0x106094}}, + {F, {"hlut20", 0, 5, 0x0}}, + {F, {"hlut21", 8, 5, 0x0}}, + {F, {"hlut22", 16, 5, 0x0}}, + {F, {"hlut23", 24, 5, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/h_drop_lut_06", 0x106098}}, + {F, {"hlut24", 0, 5, 0x0}}, + {F, {"hlut25", 8, 5, 0x0}}, + {F, {"hlut26", 16, 5, 0x0}}, + {F, {"hlut27", 24, 5, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/h_drop_lut_07", 0x10609C}}, + {F, {"hlut28", 0, 5, 0x0}}, + {F, {"hlut29", 8, 5, 0x0}}, + {F, {"hlut30", 16, 5, 0x0}}, + {F, {"hlut31", 24, 5, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/v_drop_lut_00", 0x1060C0}}, + {F, {"vlut00", 0, 5, 0x0}}, + {F, {"vlut01", 8, 5, 0x0}}, + {F, {"vlut02", 16, 5, 0x0}}, + {F, {"vlut03", 24, 5, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/v_drop_lut_01", 0x1060C4}}, + {F, {"vlut04", 0, 5, 0x0}}, + {F, {"vlut05", 8, 5, 0x0}}, + {F, {"vlut06", 16, 5, 0x0}}, + {F, {"vlut07", 24, 5, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/v_drop_lut_02", 0x1060C8}}, + {F, {"vlut08", 0, 5, 0x0}}, + {F, {"vlut09", 8, 5, 0x0}}, + {F, {"vlut10", 16, 5, 0x0}}, + {F, {"vlut11", 24, 5, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/v_drop_lut_03", 0x1060CC}}, + {F, {"vlut12", 0, 5, 0x0}}, + {F, {"vlut13", 8, 5, 0x0}}, + {F, {"vlut14", 16, 5, 0x0}}, + {F, {"vlut15", 24, 5, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/v_drop_lut_04", 0x1060D0}}, + {F, {"vlut16", 0, 5, 0x0}}, + {F, {"vlut17", 8, 5, 0x0}}, + {F, {"vlut18", 16, 5, 0x0}}, + {F, {"vlut19", 24, 5, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/v_drop_lut_05", 0x1060D4}}, + {F, {"vlut20", 0, 5, 0x0}}, + {F, {"vlut21", 8, 5, 0x0}}, + {F, {"vlut22", 16, 5, 0x0}}, + {F, {"vlut23", 24, 5, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/v_drop_lut_06", 0x1060D8}}, + {F, {"vlut24", 0, 5, 0x0}}, + {F, {"vlut25", 8, 5, 0x0}}, + {F, {"vlut26", 16, 5, 0x0}}, + {F, {"vlut27", 24, 5, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/v_drop_lut_07", 0x1060DC}}, + {F, {"vlut28", 0, 5, 0x0}}, + {F, {"vlut29", 8, 5, 0x0}}, + {F, {"vlut30", 16, 5, 0x0}}, + {F, {"vlut31", 24, 5, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_00", 0x6400}}, + {F, {"tlut000", 0, 9, 0x0}}, + {F, {"tlut001", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_01", 0x6404}}, + {F, {"tlut002", 0, 9, 0x0}}, + {F, {"tlut003", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_02", 0x6408}}, + {F, {"tlut004", 0, 9, 0x0}}, + {F, {"tlut005", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_03", 0x640C}}, + {F, {"tlut006", 0, 9, 0x0}}, + {F, {"tlut007", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_04", 0x6410}}, + {F, {"tlut008", 0, 9, 0x0}}, + {F, {"tlut009", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_05", 0x6414}}, + {F, {"tlut010", 0, 9, 0x0}}, + {F, {"tlut011", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_06", 0x6418}}, + {F, {"tlut012", 0, 9, 0x0}}, + {F, {"tlut013", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_07", 0x641C}}, + {F, {"tlut014", 0, 9, 0x0}}, + {F, {"tlut015", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_08", 0x6420}}, + {F, {"tlut016", 0, 9, 0x0}}, + {F, {"tlut017", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_09", 0x6424}}, + {F, {"tlut018", 0, 9, 0x0}}, + {F, {"tlut019", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_10", 0x6428}}, + {F, {"tlut020", 0, 9, 0x0}}, + {F, {"tlut021", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_11", 0x642C}}, + {F, {"tlut022", 0, 9, 0x0}}, + {F, {"tlut023", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_12", 0x6430}}, + {F, {"tlut024", 0, 9, 0x0}}, + {F, {"tlut025", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_13", 0x6434}}, + {F, {"tlut026", 0, 9, 0x0}}, + {F, {"tlut027", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_14", 0x6438}}, + {F, {"tlut028", 0, 9, 0x0}}, + {F, {"tlut029", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_15", 0x643C}}, + {F, {"tlut030", 0, 9, 0x0}}, + {F, {"tlut031", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_16", 0x6440}}, + {F, {"tlut032", 0, 9, 0x0}}, + {F, {"tlut033", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_17", 0x6444}}, + {F, {"tlut034", 0, 9, 0x0}}, + {F, {"tlut035", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_18", 0x6448}}, + {F, {"tlut036", 0, 9, 0x0}}, + {F, {"tlut037", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_19", 0x644C}}, + {F, {"tlut038", 0, 9, 0x0}}, + {F, {"tlut039", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_20", 0x6450}}, + {F, {"tlut040", 0, 9, 0x0}}, + {F, {"tlut041", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_21", 0x6454}}, + {F, {"tlut042", 0, 9, 0x0}}, + {F, {"tlut043", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_22", 0x6458}}, + {F, {"tlut044", 0, 9, 0x0}}, + {F, {"tlut045", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_23", 0x645C}}, + {F, {"tlut046", 0, 9, 0x0}}, + {F, {"tlut047", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_24", 0x6460}}, + {F, {"tlut048", 0, 9, 0x0}}, + {F, {"tlut049", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_25", 0x6464}}, + {F, {"tlut050", 0, 9, 0x0}}, + {F, {"tlut051", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_26", 0x6468}}, + {F, {"tlut052", 0, 9, 0x0}}, + {F, {"tlut053", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_27", 0x646C}}, + {F, {"tlut054", 0, 9, 0x0}}, + {F, {"tlut055", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_28", 0x6470}}, + {F, {"tlut056", 0, 9, 0x0}}, + {F, {"tlut057", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_29", 0x6474}}, + {F, {"tlut058", 0, 9, 0x0}}, + {F, {"tlut059", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_30", 0x6478}}, + {F, {"tlut060", 0, 9, 0x0}}, + {F, {"tlut061", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_31", 0x647C}}, + {F, {"tlut062", 0, 9, 0x0}}, + {F, {"tlut063", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_32", 0x6480}}, + {F, {"tlut064", 0, 9, 0x0}}, + {F, {"tlut065", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_33", 0x6484}}, + {F, {"tlut066", 0, 9, 0x0}}, + {F, {"tlut067", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_34", 0x6488}}, + {F, {"tlut068", 0, 9, 0x0}}, + {F, {"tlut069", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_35", 0x648C}}, + {F, {"tlut070", 0, 9, 0x0}}, + {F, {"tlut071", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_36", 0x6490}}, + {F, {"tlut072", 0, 9, 0x0}}, + {F, {"tlut073", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_37", 0x6494}}, + {F, {"tlut074", 0, 9, 0x0}}, + {F, {"tlut075", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_38", 0x6498}}, + {F, {"tlut076", 0, 9, 0x0}}, + {F, {"tlut077", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_39", 0x649C}}, + {F, {"tlut078", 0, 9, 0x0}}, + {F, {"tlut079", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_40", 0x64A0}}, + {F, {"tlut080", 0, 9, 0x0}}, + {F, {"tlut081", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_41", 0x64A4}}, + {F, {"tlut082", 0, 9, 0x0}}, + {F, {"tlut083", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_42", 0x64A8}}, + {F, {"tlut084", 0, 9, 0x0}}, + {F, {"tlut085", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_43", 0x64AC}}, + {F, {"tlut086", 0, 9, 0x0}}, + {F, {"tlut087", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_44", 0x64B0}}, + {F, {"tlut088", 0, 9, 0x0}}, + {F, {"tlut089", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_45", 0x64B4}}, + {F, {"tlut090", 0, 9, 0x0}}, + {F, {"tlut091", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_46", 0x64B8}}, + {F, {"tlut092", 0, 9, 0x0}}, + {F, {"tlut093", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_47", 0x64BC}}, + {F, {"tlut094", 0, 9, 0x0}}, + {F, {"tlut095", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_48", 0x64C0}}, + {F, {"tlut096", 0, 9, 0x0}}, + {F, {"tlut097", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_49", 0x64C4}}, + {F, {"tlut098", 0, 9, 0x0}}, + {F, {"tlut099", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_50", 0x64C8}}, + {F, {"tlut100", 0, 9, 0x0}}, + {F, {"tlut101", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_51", 0x64CC}}, + {F, {"tlut102", 0, 9, 0x0}}, + {F, {"tlut103", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_52", 0x64D0}}, + {F, {"tlut104", 0, 9, 0x0}}, + {F, {"tlut105", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_53", 0x64D4}}, + {F, {"tlut106", 0, 9, 0x0}}, + {F, {"tlut107", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_54", 0x64D8}}, + {F, {"tlut108", 0, 9, 0x0}}, + {F, {"tlut109", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_55", 0x64DC}}, + {F, {"tlut110", 0, 9, 0x0}}, + {F, {"tlut111", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_56", 0x64E0}}, + {F, {"tlut112", 0, 9, 0x0}}, + {F, {"tlut113", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_57", 0x64E4}}, + {F, {"tlut114", 0, 9, 0x0}}, + {F, {"tlut115", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_58", 0x64E8}}, + {F, {"tlut116", 0, 9, 0x0}}, + {F, {"tlut117", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_59", 0x64EC}}, + {F, {"tlut118", 0, 9, 0x0}}, + {F, {"tlut119", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_60", 0x64F0}}, + {F, {"tlut120", 0, 9, 0x0}}, + {F, {"tlut121", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_61", 0x64F4}}, + {F, {"tlut122", 0, 9, 0x0}}, + {F, {"tlut123", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_62", 0x64F8}}, + {F, {"tlut124", 0, 9, 0x0}}, + {F, {"tlut125", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_63", 0x64FC}}, + {F, {"tlut126", 0, 9, 0x0}}, + {F, {"tlut127", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_64", 0x6500}}, + {F, {"tlut128", 0, 9, 0x0}}, + {F, {"tlut129", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_65", 0x6504}}, + {F, {"tlut130", 0, 9, 0x0}}, + {F, {"tlut131", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_66", 0x6508}}, + {F, {"tlut132", 0, 9, 0x0}}, + {F, {"tlut133", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_67", 0x650C}}, + {F, {"tlut134", 0, 9, 0x0}}, + {F, {"tlut135", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_68", 0x6510}}, + {F, {"tlut136", 0, 9, 0x0}}, + {F, {"tlut137", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_69", 0x6514}}, + {F, {"tlut138", 0, 9, 0x0}}, + {F, {"tlut139", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_70", 0x6518}}, + {F, {"tlut140", 0, 9, 0x0}}, + {F, {"tlut141", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_71", 0x651C}}, + {F, {"tlut142", 0, 9, 0x0}}, + {F, {"tlut143", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_72", 0x6520}}, + {F, {"tlut144", 0, 9, 0x0}}, + {F, {"tlut145", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_73", 0x6524}}, + {F, {"tlut146", 0, 9, 0x0}}, + {F, {"tlut147", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_74", 0x6528}}, + {F, {"tlut148", 0, 9, 0x0}}, + {F, {"tlut149", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_75", 0x652C}}, + {F, {"tlut150", 0, 9, 0x0}}, + {F, {"tlut151", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_76", 0x6530}}, + {F, {"tlut152", 0, 9, 0x0}}, + {F, {"tlut153", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_77", 0x6534}}, + {F, {"tlut154", 0, 9, 0x0}}, + {F, {"tlut155", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_78", 0x6538}}, + {F, {"tlut156", 0, 9, 0x0}}, + {F, {"tlut157", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_79", 0x653C}}, + {F, {"tlut158", 0, 9, 0x0}}, + {F, {"tlut159", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_80", 0x6540}}, + {F, {"tlut160", 0, 9, 0x0}}, + {F, {"tlut161", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_81", 0x6544}}, + {F, {"tlut162", 0, 9, 0x0}}, + {F, {"tlut163", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_82", 0x6548}}, + {F, {"tlut164", 0, 9, 0x0}}, + {F, {"tlut165", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_83", 0x654C}}, + {F, {"tlut166", 0, 9, 0x0}}, + {F, {"tlut167", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_84", 0x6550}}, + {F, {"tlut168", 0, 9, 0x0}}, + {F, {"tlut169", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_85", 0x6554}}, + {F, {"tlut170", 0, 9, 0x0}}, + {F, {"tlut171", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_86", 0x6558}}, + {F, {"tlut172", 0, 9, 0x0}}, + {F, {"tlut173", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_87", 0x655C}}, + {F, {"tlut174", 0, 9, 0x0}}, + {F, {"tlut175", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_88", 0x6560}}, + {F, {"tlut176", 0, 9, 0x0}}, + {F, {"tlut177", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_89", 0x6564}}, + {F, {"tlut178", 0, 9, 0x0}}, + {F, {"tlut179", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_90", 0x6568}}, + {F, {"tlut180", 0, 9, 0x0}}, + {F, {"tlut181", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_91", 0x656C}}, + {F, {"tlut182", 0, 9, 0x0}}, + {F, {"tlut183", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_92", 0x6570}}, + {F, {"tlut184", 0, 9, 0x0}}, + {F, {"tlut185", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_93", 0x6574}}, + {F, {"tlut186", 0, 9, 0x0}}, + {F, {"tlut187", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_94", 0x6578}}, + {F, {"tlut188", 0, 9, 0x0}}, + {F, {"tlut189", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_95", 0x657C}}, + {F, {"tlut190", 0, 9, 0x0}}, + {F, {"tlut191", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_96", 0x6580}}, + {F, {"tlut192", 0, 9, 0x0}}, + {F, {"tlut193", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_97", 0x6584}}, + {F, {"tlut194", 0, 9, 0x0}}, + {F, {"tlut195", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_98", 0x6588}}, + {F, {"tlut196", 0, 9, 0x0}}, + {F, {"tlut197", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_99", 0x658C}}, + {F, {"tlut198", 0, 9, 0x0}}, + {F, {"tlut199", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_100", 0x6590}}, + {F, {"tlut200", 0, 9, 0x0}}, + {F, {"tlut201", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_101", 0x6594}}, + {F, {"tlut202", 0, 9, 0x0}}, + {F, {"tlut203", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_102", 0x6598}}, + {F, {"tlut204", 0, 9, 0x0}}, + {F, {"tlut205", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_103", 0x659C}}, + {F, {"tlut206", 0, 9, 0x0}}, + {F, {"tlut207", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_104", 0x65A0}}, + {F, {"tlut208", 0, 9, 0x0}}, + {F, {"tlut209", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_105", 0x65A4}}, + {F, {"tlut210", 0, 9, 0x0}}, + {F, {"tlut211", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_106", 0x65A8}}, + {F, {"tlut212", 0, 9, 0x0}}, + {F, {"tlut213", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_107", 0x65AC}}, + {F, {"tlut214", 0, 9, 0x0}}, + {F, {"tlut215", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_108", 0x65B0}}, + {F, {"tlut216", 0, 9, 0x0}}, + {F, {"tlut217", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_109", 0x65B4}}, + {F, {"tlut218", 0, 9, 0x0}}, + {F, {"tlut219", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_110", 0x65B8}}, + {F, {"tlut220", 0, 9, 0x0}}, + {F, {"tlut221", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_111", 0x65BC}}, + {F, {"tlut222", 0, 9, 0x0}}, + {F, {"tlut223", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_112", 0x65C0}}, + {F, {"tlut224", 0, 9, 0x0}}, + {F, {"tlut225", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_113", 0x65C4}}, + {F, {"tlut226", 0, 9, 0x0}}, + {F, {"tlut227", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_114", 0x65C8}}, + {F, {"tlut228", 0, 9, 0x0}}, + {F, {"tlut229", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_115", 0x65CC}}, + {F, {"tlut230", 0, 9, 0x0}}, + {F, {"tlut231", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_116", 0x65D0}}, + {F, {"tlut232", 0, 9, 0x0}}, + {F, {"tlut233", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_117", 0x65D4}}, + {F, {"tlut234", 0, 9, 0x0}}, + {F, {"tlut235", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_118", 0x65D8}}, + {F, {"tlut236", 0, 9, 0x0}}, + {F, {"tlut237", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_119", 0x65DC}}, + {F, {"tlut238", 0, 9, 0x0}}, + {F, {"tlut239", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_120", 0x65E0}}, + {F, {"tlut240", 0, 9, 0x0}}, + {F, {"tlut241", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_121", 0x65E4}}, + {F, {"tlut242", 0, 9, 0x0}}, + {F, {"tlut243", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_122", 0x65E8}}, + {F, {"tlut244", 0, 9, 0x0}}, + {F, {"tlut245", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_123", 0x65EC}}, + {F, {"tlut246", 0, 9, 0x0}}, + {F, {"tlut247", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_124", 0x65F0}}, + {F, {"tlut248", 0, 9, 0x0}}, + {F, {"tlut249", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_125", 0x65F4}}, + {F, {"tlut250", 0, 9, 0x0}}, + {F, {"tlut251", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_126", 0x65F8}}, + {F, {"tlut252", 0, 9, 0x0}}, + {F, {"tlut253", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_127", 0x65FC}}, + {F, {"tlut254", 0, 9, 0x0}}, + {F, {"tlut255", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_128", 0x6600}}, + {F, {"tlut256", 0, 9, 0x0}}, + {F, {"tlut257", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_129", 0x6604}}, + {F, {"tlut258", 0, 9, 0x0}}, + {F, {"tlut259", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_130", 0x6608}}, + {F, {"tlut260", 0, 9, 0x0}}, + {F, {"tlut261", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_131", 0x660C}}, + {F, {"tlut262", 0, 9, 0x0}}, + {F, {"tlut263", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_132", 0x6610}}, + {F, {"tlut264", 0, 9, 0x0}}, + {F, {"tlut265", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_133", 0x6614}}, + {F, {"tlut266", 0, 9, 0x0}}, + {F, {"tlut267", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_134", 0x6618}}, + {F, {"tlut268", 0, 9, 0x0}}, + {F, {"tlut269", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_135", 0x661C}}, + {F, {"tlut270", 0, 9, 0x0}}, + {F, {"tlut271", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_136", 0x6620}}, + {F, {"tlut272", 0, 9, 0x0}}, + {F, {"tlut273", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_137", 0x6624}}, + {F, {"tlut274", 0, 9, 0x0}}, + {F, {"tlut275", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_138", 0x6628}}, + {F, {"tlut276", 0, 9, 0x0}}, + {F, {"tlut277", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_139", 0x662C}}, + {F, {"tlut278", 0, 9, 0x0}}, + {F, {"tlut279", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_140", 0x6630}}, + {F, {"tlut280", 0, 9, 0x0}}, + {F, {"tlut281", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_141", 0x6634}}, + {F, {"tlut282", 0, 9, 0x0}}, + {F, {"tlut283", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_142", 0x6638}}, + {F, {"tlut284", 0, 9, 0x0}}, + {F, {"tlut285", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_143", 0x663C}}, + {F, {"tlut286", 0, 9, 0x0}}, + {F, {"tlut287", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_144", 0x6640}}, + {F, {"tlut288", 0, 9, 0x0}}, + {F, {"tlut289", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_145", 0x6644}}, + {F, {"tlut290", 0, 9, 0x0}}, + {F, {"tlut291", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_146", 0x6648}}, + {F, {"tlut292", 0, 9, 0x0}}, + {F, {"tlut293", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_147", 0x664C}}, + {F, {"tlut294", 0, 9, 0x0}}, + {F, {"tlut295", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_148", 0x6650}}, + {F, {"tlut296", 0, 9, 0x0}}, + {F, {"tlut297", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_149", 0x6654}}, + {F, {"tlut298", 0, 9, 0x0}}, + {F, {"tlut299", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_150", 0x6658}}, + {F, {"tlut300", 0, 9, 0x0}}, + {F, {"tlut301", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_151", 0x665C}}, + {F, {"tlut302", 0, 9, 0x0}}, + {F, {"tlut303", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_152", 0x6660}}, + {F, {"tlut304", 0, 9, 0x0}}, + {F, {"tlut305", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_153", 0x6664}}, + {F, {"tlut306", 0, 9, 0x0}}, + {F, {"tlut307", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_154", 0x6668}}, + {F, {"tlut308", 0, 9, 0x0}}, + {F, {"tlut309", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_155", 0x666C}}, + {F, {"tlut310", 0, 9, 0x0}}, + {F, {"tlut311", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_156", 0x6670}}, + {F, {"tlut312", 0, 9, 0x0}}, + {F, {"tlut313", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_157", 0x6674}}, + {F, {"tlut314", 0, 9, 0x0}}, + {F, {"tlut315", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_158", 0x6678}}, + {F, {"tlut316", 0, 9, 0x0}}, + {F, {"tlut317", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_159", 0x667C}}, + {F, {"tlut318", 0, 9, 0x0}}, + {F, {"tlut319", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_160", 0x6680}}, + {F, {"tlut320", 0, 9, 0x0}}, + {F, {"tlut321", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_161", 0x6684}}, + {F, {"tlut322", 0, 9, 0x0}}, + {F, {"tlut323", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_162", 0x6688}}, + {F, {"tlut324", 0, 9, 0x0}}, + {F, {"tlut325", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_163", 0x668C}}, + {F, {"tlut326", 0, 9, 0x0}}, + {F, {"tlut327", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_164", 0x6690}}, + {F, {"tlut328", 0, 9, 0x0}}, + {F, {"tlut329", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_165", 0x6694}}, + {F, {"tlut330", 0, 9, 0x0}}, + {F, {"tlut331", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_166", 0x6698}}, + {F, {"tlut332", 0, 9, 0x0}}, + {F, {"tlut333", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_167", 0x669C}}, + {F, {"tlut334", 0, 9, 0x0}}, + {F, {"tlut335", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_168", 0x66A0}}, + {F, {"tlut336", 0, 9, 0x0}}, + {F, {"tlut337", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_169", 0x66A4}}, + {F, {"tlut338", 0, 9, 0x0}}, + {F, {"tlut339", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_170", 0x66A8}}, + {F, {"tlut340", 0, 9, 0x0}}, + {F, {"tlut341", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_171", 0x66AC}}, + {F, {"tlut342", 0, 9, 0x0}}, + {F, {"tlut343", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_172", 0x66B0}}, + {F, {"tlut344", 0, 9, 0x0}}, + {F, {"tlut345", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_173", 0x66B4}}, + {F, {"tlut346", 0, 9, 0x0}}, + {F, {"tlut347", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_174", 0x66B8}}, + {F, {"tlut348", 0, 9, 0x0}}, + {F, {"tlut349", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_175", 0x66BC}}, + {F, {"tlut350", 0, 9, 0x0}}, + {F, {"tlut351", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_176", 0x66C0}}, + {F, {"tlut352", 0, 9, 0x0}}, + {F, {"tlut353", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_177", 0x66C4}}, + {F, {"tlut354", 0, 9, 0x0}}, + {F, {"tlut355", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_178", 0x66C8}}, + {F, {"tlut356", 0, 9, 0x0}}, + {F, {"tlut357", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_179", 0x66CC}}, + {F, {"tlut358", 0, 9, 0x0}}, + {F, {"tlut359", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_180", 0x66D0}}, + {F, {"tlut360", 0, 9, 0x0}}, + {F, {"tlut361", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_181", 0x66D4}}, + {F, {"tlut362", 0, 9, 0x0}}, + {F, {"tlut363", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_182", 0x66D8}}, + {F, {"tlut364", 0, 9, 0x0}}, + {F, {"tlut365", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_183", 0x66DC}}, + {F, {"tlut366", 0, 9, 0x0}}, + {F, {"tlut367", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_184", 0x66E0}}, + {F, {"tlut368", 0, 9, 0x0}}, + {F, {"tlut369", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_185", 0x66E4}}, + {F, {"tlut370", 0, 9, 0x0}}, + {F, {"tlut371", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_186", 0x66E8}}, + {F, {"tlut372", 0, 9, 0x0}}, + {F, {"tlut373", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_187", 0x66EC}}, + {F, {"tlut374", 0, 9, 0x0}}, + {F, {"tlut375", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_188", 0x66F0}}, + {F, {"tlut376", 0, 9, 0x0}}, + {F, {"tlut377", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_189", 0x66F4}}, + {F, {"tlut378", 0, 9, 0x0}}, + {F, {"tlut379", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_190", 0x66F8}}, + {F, {"tlut380", 0, 9, 0x0}}, + {F, {"tlut381", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_191", 0x66FC}}, + {F, {"tlut382", 0, 9, 0x0}}, + {F, {"tlut383", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_192", 0x6700}}, + {F, {"tlut384", 0, 9, 0x0}}, + {F, {"tlut385", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_193", 0x6704}}, + {F, {"tlut386", 0, 9, 0x0}}, + {F, {"tlut387", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_194", 0x6708}}, + {F, {"tlut388", 0, 9, 0x0}}, + {F, {"tlut389", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_195", 0x670C}}, + {F, {"tlut390", 0, 9, 0x0}}, + {F, {"tlut391", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_196", 0x6710}}, + {F, {"tlut392", 0, 9, 0x0}}, + {F, {"tlut393", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_197", 0x6714}}, + {F, {"tlut394", 0, 9, 0x0}}, + {F, {"tlut395", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_198", 0x6718}}, + {F, {"tlut396", 0, 9, 0x0}}, + {F, {"tlut397", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_199", 0x671C}}, + {F, {"tlut398", 0, 9, 0x0}}, + {F, {"tlut399", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_200", 0x6720}}, + {F, {"tlut400", 0, 9, 0x0}}, + {F, {"tlut401", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_201", 0x6724}}, + {F, {"tlut402", 0, 9, 0x0}}, + {F, {"tlut403", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_202", 0x6728}}, + {F, {"tlut404", 0, 9, 0x0}}, + {F, {"tlut405", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_203", 0x672C}}, + {F, {"tlut406", 0, 9, 0x0}}, + {F, {"tlut407", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_204", 0x6730}}, + {F, {"tlut408", 0, 9, 0x0}}, + {F, {"tlut409", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_205", 0x6734}}, + {F, {"tlut410", 0, 9, 0x0}}, + {F, {"tlut411", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_206", 0x6738}}, + {F, {"tlut412", 0, 9, 0x0}}, + {F, {"tlut413", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_207", 0x673C}}, + {F, {"tlut414", 0, 9, 0x0}}, + {F, {"tlut415", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_208", 0x6740}}, + {F, {"tlut416", 0, 9, 0x0}}, + {F, {"tlut417", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_209", 0x6744}}, + {F, {"tlut418", 0, 9, 0x0}}, + {F, {"tlut419", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_210", 0x6748}}, + {F, {"tlut420", 0, 9, 0x0}}, + {F, {"tlut421", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_211", 0x674C}}, + {F, {"tlut422", 0, 9, 0x0}}, + {F, {"tlut423", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_212", 0x6750}}, + {F, {"tlut424", 0, 9, 0x0}}, + {F, {"tlut425", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_213", 0x6754}}, + {F, {"tlut426", 0, 9, 0x0}}, + {F, {"tlut427", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_214", 0x6758}}, + {F, {"tlut428", 0, 9, 0x0}}, + {F, {"tlut429", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_215", 0x675C}}, + {F, {"tlut430", 0, 9, 0x0}}, + {F, {"tlut431", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_216", 0x6760}}, + {F, {"tlut432", 0, 9, 0x0}}, + {F, {"tlut433", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_217", 0x6764}}, + {F, {"tlut434", 0, 9, 0x0}}, + {F, {"tlut435", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_218", 0x6768}}, + {F, {"tlut436", 0, 9, 0x0}}, + {F, {"tlut437", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_219", 0x676C}}, + {F, {"tlut438", 0, 9, 0x0}}, + {F, {"tlut439", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_220", 0x6770}}, + {F, {"tlut440", 0, 9, 0x0}}, + {F, {"tlut441", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_221", 0x6774}}, + {F, {"tlut442", 0, 9, 0x0}}, + {F, {"tlut443", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_222", 0x6778}}, + {F, {"tlut444", 0, 9, 0x0}}, + {F, {"tlut445", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_223", 0x677C}}, + {F, {"tlut446", 0, 9, 0x0}}, + {F, {"tlut447", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_224", 0x6780}}, + {F, {"tlut448", 0, 9, 0x0}}, + {F, {"tlut449", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_225", 0x6784}}, + {F, {"tlut450", 0, 9, 0x0}}, + {F, {"tlut451", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_226", 0x6788}}, + {F, {"tlut452", 0, 9, 0x0}}, + {F, {"tlut453", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_227", 0x678C}}, + {F, {"tlut454", 0, 9, 0x0}}, + {F, {"tlut455", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_228", 0x6790}}, + {F, {"tlut456", 0, 9, 0x0}}, + {F, {"tlut457", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_229", 0x6794}}, + {F, {"tlut458", 0, 9, 0x0}}, + {F, {"tlut459", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_230", 0x6798}}, + {F, {"tlut460", 0, 9, 0x0}}, + {F, {"tlut461", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_231", 0x679C}}, + {F, {"tlut462", 0, 9, 0x0}}, + {F, {"tlut463", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_232", 0x67A0}}, + {F, {"tlut464", 0, 9, 0x0}}, + {F, {"tlut465", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_233", 0x67A4}}, + {F, {"tlut466", 0, 9, 0x0}}, + {F, {"tlut467", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_234", 0x67A8}}, + {F, {"tlut468", 0, 9, 0x0}}, + {F, {"tlut469", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_235", 0x67AC}}, + {F, {"tlut470", 0, 9, 0x0}}, + {F, {"tlut471", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_236", 0x67B0}}, + {F, {"tlut472", 0, 9, 0x0}}, + {F, {"tlut473", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_237", 0x67B4}}, + {F, {"tlut474", 0, 9, 0x0}}, + {F, {"tlut475", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_238", 0x67B8}}, + {F, {"tlut476", 0, 9, 0x0}}, + {F, {"tlut477", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_239", 0x67BC}}, + {F, {"tlut478", 0, 9, 0x0}}, + {F, {"tlut479", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_240", 0x67C0}}, + {F, {"tlut480", 0, 9, 0x0}}, + {F, {"tlut481", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_241", 0x67C4}}, + {F, {"tlut482", 0, 9, 0x0}}, + {F, {"tlut483", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_242", 0x67C8}}, + {F, {"tlut484", 0, 9, 0x0}}, + {F, {"tlut485", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_243", 0x67CC}}, + {F, {"tlut486", 0, 9, 0x0}}, + {F, {"tlut487", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_244", 0x67D0}}, + {F, {"tlut488", 0, 9, 0x0}}, + {F, {"tlut489", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_245", 0x67D4}}, + {F, {"tlut490", 0, 9, 0x0}}, + {F, {"tlut491", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_246", 0x67D8}}, + {F, {"tlut492", 0, 9, 0x0}}, + {F, {"tlut493", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_247", 0x67DC}}, + {F, {"tlut494", 0, 9, 0x0}}, + {F, {"tlut495", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_248", 0x67E0}}, + {F, {"tlut496", 0, 9, 0x0}}, + {F, {"tlut497", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_249", 0x67E4}}, + {F, {"tlut498", 0, 9, 0x0}}, + {F, {"tlut499", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_250", 0x67E8}}, + {F, {"tlut500", 0, 9, 0x0}}, + {F, {"tlut501", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_251", 0x67EC}}, + {F, {"tlut502", 0, 9, 0x0}}, + {F, {"tlut503", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_252", 0x67F0}}, + {F, {"tlut504", 0, 9, 0x0}}, + {F, {"tlut505", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_253", 0x67F4}}, + {F, {"tlut506", 0, 9, 0x0}}, + {F, {"tlut507", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_254", 0x67F8}}, + {F, {"tlut508", 0, 9, 0x0}}, + {F, {"tlut509", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/t_drop_lut_255", 0x67FC}}, + {F, {"tlut510", 0, 9, 0x0}}, + {F, {"tlut511", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6800", 0x106800}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6804", 0x106804}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6808", 0x106808}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_680C", 0x10680C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6810", 0x106810}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6814", 0x106814}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6818", 0x106818}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_681C", 0x10681C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6820", 0x106820}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6824", 0x106824}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6828", 0x106828}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_682C", 0x10682C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6830", 0x106830}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6834", 0x106834}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6838", 0x106838}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_683C", 0x10683C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6840", 0x106840}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6844", 0x106844}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6848", 0x106848}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_684C", 0x10684C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6850", 0x106850}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6854", 0x106854}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6858", 0x106858}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_685C", 0x10685C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6860", 0x106860}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6864", 0x106864}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6868", 0x106868}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_686C", 0x10686C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6870", 0x106870}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6874", 0x106874}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6878", 0x106878}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_687C", 0x10687C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6880", 0x106880}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6884", 0x106884}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6888", 0x106888}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_688C", 0x10688C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6890", 0x106890}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6894", 0x106894}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6898", 0x106898}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_689C", 0x10689C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_68A0", 0x1068A0}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_68A4", 0x1068A4}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_68A8", 0x1068A8}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_68AC", 0x1068AC}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_68B0", 0x1068B0}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_68B4", 0x1068B4}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_68B8", 0x1068B8}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_68BC", 0x1068BC}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_68C0", 0x1068C0}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_68C4", 0x1068C4}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_68C8", 0x1068C8}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_68CC", 0x1068CC}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_68D0", 0x1068D0}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_68D4", 0x1068D4}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_68D8", 0x1068D8}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_68DC", 0x1068DC}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_68E0", 0x1068E0}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_68E4", 0x1068E4}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_68E8", 0x1068E8}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_68EC", 0x1068EC}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_68F0", 0x1068F0}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_68F4", 0x1068F4}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_68F8", 0x1068F8}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_68FC", 0x1068FC}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6900", 0x106900}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6904", 0x106904}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6908", 0x106908}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_690C", 0x10690C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6910", 0x106910}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6914", 0x106914}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6918", 0x106918}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_691C", 0x10691C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6920", 0x106920}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6924", 0x106924}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6928", 0x106928}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_692C", 0x10692C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6930", 0x106930}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6934", 0x106934}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6938", 0x106938}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_693C", 0x10693C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6940", 0x106940}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6944", 0x106944}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6948", 0x106948}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_694C", 0x10694C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6950", 0x106950}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6954", 0x106954}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6958", 0x106958}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_695C", 0x10695C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6960", 0x106960}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6964", 0x106964}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6968", 0x106968}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_696C", 0x10696C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6970", 0x106970}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6974", 0x106974}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6978", 0x106978}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_697C", 0x10697C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6980", 0x106980}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6984", 0x106984}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6988", 0x106988}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_698C", 0x10698C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6990", 0x106990}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6994", 0x106994}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6998", 0x106998}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_699C", 0x10699C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_69A0", 0x1069A0}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_69A4", 0x1069A4}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_69A8", 0x1069A8}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_69AC", 0x1069AC}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_69B0", 0x1069B0}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_69B4", 0x1069B4}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_69B8", 0x1069B8}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_69BC", 0x1069BC}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_69C0", 0x1069C0}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_69C4", 0x1069C4}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_69C8", 0x1069C8}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_69CC", 0x1069CC}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_69D0", 0x1069D0}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_69D4", 0x1069D4}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_69D8", 0x1069D8}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_69DC", 0x1069DC}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_69E0", 0x1069E0}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_69E4", 0x1069E4}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_69E8", 0x1069E8}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_69EC", 0x1069EC}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_69F0", 0x1069F0}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_69F4", 0x1069F4}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_69F8", 0x1069F8}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_69FC", 0x1069FC}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6A00", 0x106A00}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6A04", 0x106A04}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6A08", 0x106A08}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6A0C", 0x106A0C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6A10", 0x106A10}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6A14", 0x106A14}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6A18", 0x106A18}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6A1C", 0x106A1C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6A20", 0x106A20}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6A24", 0x106A24}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6A28", 0x106A28}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6A2C", 0x106A2C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6A30", 0x106A30}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6A34", 0x106A34}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6A38", 0x106A38}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6A3C", 0x106A3C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6A40", 0x106A40}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6A44", 0x106A44}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6A48", 0x106A48}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6A4C", 0x106A4C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6A50", 0x106A50}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6A54", 0x106A54}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6A58", 0x106A58}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6A5C", 0x106A5C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6A60", 0x106A60}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6A64", 0x106A64}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6A68", 0x106A68}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6A6C", 0x106A6C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6A70", 0x106A70}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6A74", 0x106A74}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6A78", 0x106A78}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6A7C", 0x106A7C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6A80", 0x106A80}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6A84", 0x106A84}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6A88", 0x106A88}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6A8C", 0x106A8C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6A90", 0x106A90}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6A94", 0x106A94}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6A98", 0x106A98}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6A9C", 0x106A9C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6AA0", 0x106AA0}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6AA4", 0x106AA4}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6AA8", 0x106AA8}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6AAC", 0x106AAC}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6AB0", 0x106AB0}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6AB4", 0x106AB4}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6AB8", 0x106AB8}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6ABC", 0x106ABC}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6AC0", 0x106AC0}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6AC4", 0x106AC4}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6AC8", 0x106AC8}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6ACC", 0x106ACC}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6AD0", 0x106AD0}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6AD4", 0x106AD4}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6AD8", 0x106AD8}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6ADC", 0x106ADC}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6AE0", 0x106AE0}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6AE4", 0x106AE4}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6AE8", 0x106AE8}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6AEC", 0x106AEC}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6AF0", 0x106AF0}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6AF4", 0x106AF4}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6AF8", 0x106AF8}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6AFC", 0x106AFC}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6B00", 0x106B00}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6B04", 0x106B04}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6B08", 0x106B08}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6B0C", 0x106B0C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6B10", 0x106B10}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6B14", 0x106B14}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6B18", 0x106B18}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6B1C", 0x106B1C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6B20", 0x106B20}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6B24", 0x106B24}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6B28", 0x106B28}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6B2C", 0x106B2C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6B30", 0x106B30}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6B34", 0x106B34}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6B38", 0x106B38}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6B3C", 0x106B3C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6B40", 0x106B40}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6B44", 0x106B44}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6B48", 0x106B48}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6B4C", 0x106B4C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6B50", 0x106B50}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6B54", 0x106B54}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6B58", 0x106B58}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6B5C", 0x106B5C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6B60", 0x106B60}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6B64", 0x106B64}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6B68", 0x106B68}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6B6C", 0x106B6C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6B70", 0x106B70}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6B74", 0x106B74}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6B78", 0x106B78}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6B7C", 0x106B7C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6B80", 0x106B80}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6B84", 0x106B84}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6B88", 0x106B88}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6B8C", 0x106B8C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6B90", 0x106B90}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/erc/Reserved_6B94", 0x106B94}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41/edf/pipeline_control", 0x107000}}, + {F, {"Reserved_0", 0, 1, 0x1}}, + {F, {"format", 1, 1, 0x0}}, + {F, {"Reserved_2", 2, 1, 0x0}}, + {F, {"Reserved_3", 3, 1, 0x0}}, + {F, {"Reserved_4", 4, 1, 0x0}}, + {F, {"Reserved_31_16", 16, 16, 0xFFFF}}, + + {R, {"SENSOR_IF/GEN41/edf/Reserved_7004", 0x107004}}, + {F, {"Reserved_10", 10, 1, 0x1}}, + + {R, {"SENSOR_IF/GEN41/ro/readout_ctrl", 0x109000}}, + {F, {"Reserved_4_0", 0, 5, 0x0}}, + {F, {"ro_inv_pol_td", 5, 1, 0x0}}, + {F, {"Reserved_7_6", 6, 2, 0x0}}, + {F, {"Reserved_31_8", 8, 24, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/time_base_ctrl", 0x109008}}, + {F, {"time_base_enable", 0, 1, 0x0}}, + {F, {"time_base_mode", 1, 1, 0x0}}, + {F, {"external_mode", 2, 1, 0x0}}, + {F, {"external_mode_enable", 3, 1, 0x0}}, + {F, {"Reserved_10_4", 4, 7, 0x64}}, + + {R, {"SENSOR_IF/GEN41/ro/dig_ctrl", 0x10900C}}, + {F, {"dig_crop_enable", 0, 3, 0x0}}, + {F, {"Reserved_31_3", 3, 29, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/dig_start_pos", 0x109010}}, + {F, {"dig_crop_start_x", 0, 11, 0x0}}, + {F, {"dig_crop_start_y", 16, 10, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/dig_end_pos", 0x109014}}, + {F, {"dig_crop_end_x", 0, 11, 0x0}}, + {F, {"dig_crop_end_y", 16, 10, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/ro_ctrl", 0x109028}}, + {F, {"area_cnt_en", 0, 1, 0x0}}, + {F, {"output_disable", 1, 1, 0x0}}, + {F, {"keep_th", 2, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/area_x0_addr", 0x10902C}}, + {F, {"x0_addr", 0, 11, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/area_x1_addr", 0x109030}}, + {F, {"x1_addr", 0, 11, 0x140}}, + + {R, {"SENSOR_IF/GEN41/ro/area_x2_addr", 0x109034}}, + {F, {"x2_addr", 0, 11, 0x280}}, + + {R, {"SENSOR_IF/GEN41/ro/area_x3_addr", 0x109038}}, + {F, {"x3_addr", 0, 11, 0x3C0}}, + + {R, {"SENSOR_IF/GEN41/ro/area_x4_addr", 0x10903C}}, + {F, {"x4_addr", 0, 11, 0x500}}, + + {R, {"SENSOR_IF/GEN41/ro/area_y0_addr", 0x109040}}, + {F, {"y0_addr", 0, 11, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/area_y1_addr", 0x109044}}, + {F, {"y1_addr", 0, 11, 0xB4}}, + + {R, {"SENSOR_IF/GEN41/ro/area_y2_addr", 0x109048}}, + {F, {"y2_addr", 0, 11, 0x168}}, + + {R, {"SENSOR_IF/GEN41/ro/area_y3_addr", 0x10904C}}, + {F, {"y3_addr", 0, 11, 0x21C}}, + + {R, {"SENSOR_IF/GEN41/ro/area_y4_addr", 0x109050}}, + {F, {"y4_addr", 0, 11, 0x2D0}}, + + {R, {"SENSOR_IF/GEN41/ro/counter_ctrl", 0x109054}}, + {F, {"count_en", 0, 1, 0x0}}, + {F, {"Reserved_1", 1, 1, 0x0}}, + {F, {"Reserved_2", 2, 1, 0x1}}, + + {R, {"SENSOR_IF/GEN41/ro/counter_timer_threshold", 0x109058}}, + {F, {"timer_threshold", 0, 32, 0x3E8}}, + + {R, {"SENSOR_IF/GEN41/ro/digital_mask_pixel_00", 0x109100}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/digital_mask_pixel_01", 0x109104}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/digital_mask_pixel_02", 0x109108}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/digital_mask_pixel_03", 0x10910C}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/digital_mask_pixel_04", 0x109110}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/digital_mask_pixel_05", 0x109114}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/digital_mask_pixel_06", 0x109118}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/digital_mask_pixel_07", 0x10911C}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/digital_mask_pixel_08", 0x109120}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/digital_mask_pixel_09", 0x109124}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/digital_mask_pixel_10", 0x109128}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/digital_mask_pixel_11", 0x10912C}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/digital_mask_pixel_12", 0x109130}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/digital_mask_pixel_13", 0x109134}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/digital_mask_pixel_14", 0x109138}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/digital_mask_pixel_15", 0x10913C}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/digital_mask_pixel_16", 0x109140}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/digital_mask_pixel_17", 0x109144}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/digital_mask_pixel_18", 0x109148}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/digital_mask_pixel_19", 0x10914C}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/digital_mask_pixel_20", 0x109150}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/digital_mask_pixel_21", 0x109154}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/digital_mask_pixel_22", 0x109158}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/digital_mask_pixel_23", 0x10915C}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/digital_mask_pixel_24", 0x109160}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/digital_mask_pixel_25", 0x109164}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/digital_mask_pixel_26", 0x109168}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/digital_mask_pixel_27", 0x10916C}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/digital_mask_pixel_28", 0x109170}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/digital_mask_pixel_29", 0x109174}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/digital_mask_pixel_30", 0x109178}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/digital_mask_pixel_31", 0x10917C}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/digital_mask_pixel_32", 0x109180}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/digital_mask_pixel_33", 0x109184}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/digital_mask_pixel_34", 0x109188}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/digital_mask_pixel_35", 0x10918C}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/digital_mask_pixel_36", 0x109190}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/digital_mask_pixel_37", 0x109194}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/digital_mask_pixel_38", 0x109198}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/digital_mask_pixel_39", 0x10919C}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/digital_mask_pixel_40", 0x1091A0}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/digital_mask_pixel_41", 0x1091A4}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/digital_mask_pixel_42", 0x1091A8}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/digital_mask_pixel_43", 0x1091AC}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/digital_mask_pixel_44", 0x1091B0}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/digital_mask_pixel_45", 0x1091B4}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/digital_mask_pixel_46", 0x1091B8}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/digital_mask_pixel_47", 0x1091BC}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/digital_mask_pixel_48", 0x1091C0}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/digital_mask_pixel_49", 0x1091C4}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/digital_mask_pixel_50", 0x1091C8}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/digital_mask_pixel_51", 0x1091CC}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/digital_mask_pixel_52", 0x1091D0}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/digital_mask_pixel_53", 0x1091D4}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/digital_mask_pixel_54", 0x1091D8}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/digital_mask_pixel_55", 0x1091DC}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/digital_mask_pixel_56", 0x1091E0}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/digital_mask_pixel_57", 0x1091E4}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/digital_mask_pixel_58", 0x1091E8}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/digital_mask_pixel_59", 0x1091EC}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/digital_mask_pixel_60", 0x1091F0}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/digital_mask_pixel_61", 0x1091F4}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/digital_mask_pixel_62", 0x1091F8}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/digital_mask_pixel_63", 0x1091FC}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/area_cnt00", 0x109200}}, + {F, {"area_cnt_val_00", 0, 32, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/area_cnt01", 0x109204}}, + {F, {"area_cnt_val_01", 0, 32, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/area_cnt02", 0x109208}}, + {F, {"area_cnt_val_02", 0, 32, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/area_cnt03", 0x10920C}}, + {F, {"area_cnt_val_03", 0, 32, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/area_cnt04", 0x109210}}, + {F, {"area_cnt_val_04", 0, 32, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/area_cnt05", 0x109214}}, + {F, {"area_cnt_val_05", 0, 32, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/area_cnt06", 0x109218}}, + {F, {"area_cnt_val_06", 0, 32, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/area_cnt07", 0x10921C}}, + {F, {"area_cnt_val_07", 0, 32, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/area_cnt08", 0x109220}}, + {F, {"area_cnt_val_08", 0, 32, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/area_cnt09", 0x109224}}, + {F, {"area_cnt_val_09", 0, 32, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/area_cnt10", 0x109228}}, + {F, {"area_cnt_val_10", 0, 32, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/area_cnt11", 0x10922C}}, + {F, {"area_cnt_val_11", 0, 32, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/area_cnt12", 0x109230}}, + {F, {"area_cnt_val_12", 0, 32, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/area_cnt13", 0x109234}}, + {F, {"area_cnt_val_13", 0, 32, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/area_cnt14", 0x109238}}, + {F, {"area_cnt_val_14", 0, 32, 0x0}}, + + {R, {"SENSOR_IF/GEN41/ro/area_cnt15", 0x10923C}}, + {F, {"area_cnt_val_15", 0, 32, 0x0}}, + + {R, {"SENSOR_IF/GEN41/afk/pipeline_control", 0x10C000}}, + {F, {"afk_en", 0, 3, 0x0}}, + + {R, {"SENSOR_IF/GEN41/afk/Reserved_C004", 0x10C004}}, + {F, {"Reserved_6", 6, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/afk/filter_period", 0x10C008}}, + {F, {"min_cutoff_period", 0, 8, 0xF}}, + {F, {"max_cutoff_period", 8, 8, 0x9C}}, + {F, {"Reserved_19_16", 16, 4, 0x8}}, + + {R, {"SENSOR_IF/GEN41/afk/invalidation", 0x10C0C0}}, + {F, {"dt_fifo_wait_time", 0, 12, 0x5A0}}, + {F, {"Reserved_23_12", 12, 12, 0x5A}}, + {F, {"Reserved_27_24", 24, 4, 0xA}}, + {F, {"Reserved_28", 28, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/afk/initialization", 0x10C0C4}}, + {F, {"afk_req_init", 0, 1, 0x0}}, + {F, {"Reserved_1", 1, 1, 0x0}}, + {F, {"afk_flag_init_done", 2, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41/stc/pipeline_control", 0x10D000}}, + {F, {"stc_trail_bypass", 0, 3, 0x0}}, + + {R, {"SENSOR_IF/GEN41/stc/stc_param", 0x10D004}}, + {F, {"stc_enable", 0, 1, 0x0}}, + {F, {"stc_threshold", 1, 19, 0x2710}}, + + {R, {"SENSOR_IF/GEN41/stc/trail_param", 0x10D008}}, + {F, {"trail_enable", 0, 1, 0x0}}, + {F, {"trail_threshold", 1, 19, 0x186A0}}, + + {R, {"SENSOR_IF/GEN41/stc/timestamping", 0x10D00C}}, + {F, {"prescaler", 0, 5, 0xD}}, + {F, {"multiplier", 5, 4, 0x1}}, + {F, {"Reserved_9", 9, 1, 0x1}}, + + {R, {"SENSOR_IF/GEN41/stc/Reserved_D0C0", 0x10D0C0}}, + {F, {"Reserved_23_12", 12, 12, 0x118}}, + + {R, {"SENSOR_IF/GEN41/stc/initialization", 0x10D0C4}}, + {F, {"stc_req_init", 0, 1, 0x0}}, + {F, {"Reserved_1", 1, 1, 0x0}}, + {F, {"stc_flag_init_done", 2, 1, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/CORE_CONFIG", 0x700000}}, + {F, {"CORE_ENABLE", 0, 1, 0x1}}, + {F, {"SOFT_RESET", 1, 1, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/PROTOCOL_CONFIG", 0x700004}}, + {F, {"ACTIVE_LANES", 0, 2, 0x1}}, + {F, {"MAX_LANES", 3, 2, 0x1}}, + + {R, {"SENSOR_IF/MIPI_RX/CORE_STAT", 0x700010}}, + {F, {"SOFT_RESET", 0, 1, 0x0}}, + {F, {"STREAM_LINE_BUFFER_FULL", 1, 1, 0x0}}, + {F, {"SHORT_PACKET_FIFO_NOT_EMPTY", 2, 1, 0x0}}, + {F, {"SHORT_PACKET_FIFO_FULL", 3, 1, 0x0}}, + {F, {"PACKET_COUNT", 16, 16, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/GLOBAL_IRQ_ENABLE", 0x700020}}, + {F, {"", 0, 1, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/IRQ_STAT", 0x700024}}, + {F, {"VC0_ERR_FRAME_DATA", 0, 1, 0x0}}, + {F, {"VC0_ERR_FRAME_SYNC", 1, 1, 0x0}}, + {F, {"VC1_ERR_FRAME_DATA", 2, 1, 0x0}}, + {F, {"VC1_ERR_FRAME_SYNC", 3, 1, 0x0}}, + {F, {"VC2_ERR_FRAME_DATA", 4, 1, 0x0}}, + {F, {"VC2_ERR_FRAME_SYNC", 5, 1, 0x0}}, + {F, {"VC3_ERR_FRAME_DATA", 6, 1, 0x0}}, + {F, {"VC3_ERR_FRAME_SYNC", 7, 1, 0x0}}, + {F, {"ERR_ID", 8, 1, 0x0}}, + {F, {"ERR_CRC", 9, 1, 0x0}}, + {F, {"ERR_ECC_CORRECTED", 10, 1, 0x0}}, + {F, {"ERR_ECC_DOUBLE", 11, 1, 0x0}}, + {F, {"ERR_SOT_SYNC_HS", 12, 1, 0x0}}, + {F, {"ERR_SOT_HS", 13, 1, 0x0}}, + {F, {"STOP_STATE", 17, 1, 0x0}}, + {F, {"ST_LINE_BUF_FULL", 18, 1, 0x0}}, + {F, {"SHT_PKT_FIFO_N_EMPTY", 19, 1, 0x0}}, + {F, {"SHT_PKT_FIFO_FULL", 20, 1, 0x0}}, + {F, {"LANE_CONFIG_ERR", 21, 1, 0x0}}, + {F, {"WC_CORRUPTION", 22, 1, 0x0}}, + {F, {"RX_SKEWCALHS", 29, 1, 0x0}}, + {F, {"VCX FRAME ERROR", 30, 1, 0x0}}, + {F, {"FRAME_RECEIVED", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/IRQ_ENABLE", 0x700028}}, + {F, {"VC0_ERR_FRAME_DATA", 0, 1, 0x0}}, + {F, {"VC0_ERR_FRAME_SYNC", 1, 1, 0x0}}, + {F, {"VC1_ERR_FRAME_DATA", 2, 1, 0x0}}, + {F, {"VC1_ERR_FRAME_SYNC", 3, 1, 0x0}}, + {F, {"VC2_ERR_FRAME_DATA", 4, 1, 0x0}}, + {F, {"VC2_ERR_FRAME_SYNC", 5, 1, 0x0}}, + {F, {"VC3_ERR_FRAME_DATA", 6, 1, 0x0}}, + {F, {"VC3_ERR_FRAME_SYNC", 7, 1, 0x0}}, + {F, {"ERR_ID", 8, 1, 0x0}}, + {F, {"ERR_CRC", 9, 1, 0x0}}, + {F, {"ERR_ECC_CORRECTED", 10, 1, 0x0}}, + {F, {"ERR_ECC_DOUBLE", 11, 1, 0x0}}, + {F, {"ERR_SOT_SYNC_HS", 12, 1, 0x0}}, + {F, {"ERR_SOT_HS", 13, 1, 0x0}}, + {F, {"STOP_STATE", 17, 1, 0x0}}, + {F, {"ST_LINE_BUF_FULL", 18, 1, 0x0}}, + {F, {"SHT_PKT_FIFO_N_EMPTY", 19, 1, 0x0}}, + {F, {"SHT_PKT_FIFO_FULL", 20, 1, 0x0}}, + {F, {"LANE_CONFIG_ERR", 21, 1, 0x0}}, + {F, {"WC_CORRUPTION", 22, 1, 0x0}}, + {F, {"RX_SKEWCALHS", 29, 1, 0x0}}, + {F, {"FRAME_RECEIVED", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/GENERIC_SHT_PKT", 0x700030}}, + {F, {"DATA_TYPE", 0, 6, 0x0}}, + {F, {"VIRTUAL_CHANNEL", 6, 2, 0x0}}, + {F, {"DATA", 8, 16, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/VCX_FRAME_ERROR", 0x700034}}, + {F, {"FRAME_LEVEL_ERR_VC4", 0, 1, 0x0}}, + {F, {"FRAME_SYNC_ERR_VC4", 1, 1, 0x0}}, + {F, {"FRAME_LEVEL_ERR_VC5", 2, 1, 0x0}}, + {F, {"FRAME_SYNC_ERR_VC5", 3, 1, 0x0}}, + {F, {"FRAME_LEVEL_ERR_VC6", 4, 1, 0x0}}, + {F, {"FRAME_SYNC_ERR_VC6", 5, 1, 0x0}}, + {F, {"FRAME_LEVEL_ERR_VC7", 6, 1, 0x0}}, + {F, {"FRAME_SYNC_ERR_VC7", 7, 1, 0x0}}, + {F, {"FRAME_LEVEL_ERR_VC8", 8, 1, 0x0}}, + {F, {"FRAME_SYNC_ERR_VC8", 9, 1, 0x0}}, + {F, {"FRAME_LEVEL_ERR_VC9", 10, 1, 0x0}}, + {F, {"FRAME_SYNC_ERR_VC9", 11, 1, 0x0}}, + {F, {"FRAME_LEVEL_ERR_VC10", 12, 1, 0x0}}, + {F, {"FRAME_SYNC_ERR_VC10", 13, 1, 0x0}}, + {F, {"FRAME_LEVEL_ERR_VC11", 14, 1, 0x0}}, + {F, {"FRAME_SYNC_ERR_VC11", 15, 1, 0x0}}, + {F, {"FRAME_LEVEL_ERR_VC12", 16, 1, 0x0}}, + {F, {"FRAME_SYNC_ERR_VC12", 17, 1, 0x0}}, + {F, {"FRAME_LEVEL_ERR_VC13", 18, 1, 0x0}}, + {F, {"FRAME_SYNC_ERR_VC13", 19, 1, 0x0}}, + {F, {"FRAME_LEVEL_ERR_VC14", 20, 1, 0x0}}, + {F, {"FRAME_SYNC_ERR_VC14", 21, 1, 0x0}}, + {F, {"FRAME_LEVEL_ERR_VC15", 22, 1, 0x0}}, + {F, {"FRAME_SYNC_ERR_VC15", 23, 1, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/CLK_LANE_INFO", 0x70003C}}, + {F, {"RESERVED", 0, 1, 0x0}}, + {F, {"STOP_STATE", 1, 1, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/LANE0_INFO", 0x700040}}, + {F, {"SOT_SYNC_ERR", 0, 1, 0x0}}, + {F, {"SOT_ERR", 1, 1, 0x0}}, + {F, {"STOP_STATE", 5, 1, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/LANE1_INFO", 0x700044}}, + {F, {"SOT_SYNC_ERR", 0, 1, 0x0}}, + {F, {"SOT_ERR", 1, 1, 0x0}}, + {F, {"STOP_STATE", 5, 1, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/LANE2_INFO", 0x700048}}, + {F, {"SOT_SYNC_ERR", 0, 1, 0x0}}, + {F, {"SOT_ERR", 1, 1, 0x0}}, + {F, {"STOP_STATE", 5, 1, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/LANE3_INFO", 0x70004C}}, + {F, {"SOT_SYNC_ERR", 0, 1, 0x0}}, + {F, {"SOT_ERR", 1, 1, 0x0}}, + {F, {"STOP_STATE", 5, 1, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/VC0_IMAGE_INFO_1", 0x700060}}, + {F, {"BYTE_COUNT", 0, 16, 0x0}}, + {F, {"LINE_COUNT", 16, 16, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/VC0_IMAGE_INFO_2", 0x700064}}, + {F, {"DATA_TYPE", 0, 6, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/VC1_IMAGE_INFO_1", 0x700068}}, + {F, {"BYTE_COUNT", 0, 16, 0x0}}, + {F, {"LINE_COUNT", 16, 16, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/VC1_IMAGE_INFO_2", 0x70006C}}, + {F, {"DATA_TYPE", 0, 6, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/VC2_IMAGE_INFO_1", 0x700070}}, + {F, {"BYTE_COUNT", 0, 16, 0x0}}, + {F, {"LINE_COUNT", 16, 16, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/VC2_IMAGE_INFO_2", 0x700074}}, + {F, {"DATA_TYPE", 0, 6, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/VC3_IMAGE_INFO_1", 0x700078}}, + {F, {"BYTE_COUNT", 0, 16, 0x0}}, + {F, {"LINE_COUNT", 16, 16, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/VC3_IMAGE_INFO_2", 0x70007C}}, + {F, {"DATA_TYPE", 0, 6, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/VC4_IMAGE_INFO_1", 0x700080}}, + {F, {"BYTE_COUNT", 0, 16, 0x0}}, + {F, {"LINE_COUNT", 16, 16, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/VC4_IMAGE_INFO_2", 0x700084}}, + {F, {"DATA_TYPE", 0, 6, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/VC5_IMAGE_INFO_1", 0x700088}}, + {F, {"BYTE_COUNT", 0, 16, 0x0}}, + {F, {"LINE_COUNT", 16, 16, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/VC5_IMAGE_INFO_2", 0x70008C}}, + {F, {"DATA_TYPE", 0, 6, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/VC6_IMAGE_INFO_1", 0x700090}}, + {F, {"BYTE_COUNT", 0, 16, 0x0}}, + {F, {"LINE_COUNT", 16, 16, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/VC6_IMAGE_INFO_2", 0x700094}}, + {F, {"DATA_TYPE", 0, 6, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/VC7_IMAGE_INFO_1", 0x700098}}, + {F, {"BYTE_COUNT", 0, 16, 0x0}}, + {F, {"LINE_COUNT", 16, 16, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/VC7_IMAGE_INFO_2", 0x70009C}}, + {F, {"DATA_TYPE", 0, 6, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/VC8_IMAGE_INFO_1", 0x7000A0}}, + {F, {"BYTE_COUNT", 0, 16, 0x0}}, + {F, {"LINE_COUNT", 16, 16, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/VC8_IMAGE_INFO_2", 0x7000A4}}, + {F, {"DATA_TYPE", 0, 6, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/VC9_IMAGE_INFO_1", 0x7000A8}}, + {F, {"BYTE_COUNT", 0, 16, 0x0}}, + {F, {"LINE_COUNT", 16, 16, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/VC9_IMAGE_INFO_2", 0x7000AC}}, + {F, {"DATA_TYPE", 0, 6, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/VC10_IMAGE_INFO_1", 0x7000B0}}, + {F, {"BYTE_COUNT", 0, 16, 0x0}}, + {F, {"LINE_COUNT", 16, 16, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/VC10_IMAGE_INFO_2", 0x7000B4}}, + {F, {"DATA_TYPE", 0, 6, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/VC11_IMAGE_INFO_1", 0x7000B8}}, + {F, {"BYTE_COUNT", 0, 16, 0x0}}, + {F, {"LINE_COUNT", 16, 16, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/VC11_IMAGE_INFO_2", 0x7000BC}}, + {F, {"DATA_TYPE", 0, 6, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/VC12_IMAGE_INFO_1", 0x7000C0}}, + {F, {"BYTE_COUNT", 0, 16, 0x0}}, + {F, {"LINE_COUNT", 16, 16, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/VC12_IMAGE_INFO_2", 0x7000C4}}, + {F, {"DATA_TYPE", 0, 6, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/VC13_IMAGE_INFO_1", 0x7000C8}}, + {F, {"BYTE_COUNT", 0, 16, 0x0}}, + {F, {"LINE_COUNT", 16, 16, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/VC13_IMAGE_INFO_2", 0x7000CC}}, + {F, {"DATA_TYPE", 0, 6, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/VC14_IMAGE_INFO_1", 0x7000D0}}, + {F, {"BYTE_COUNT", 0, 16, 0x0}}, + {F, {"LINE_COUNT", 16, 16, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/VC14_IMAGE_INFO_2", 0x7000D4}}, + {F, {"DATA_TYPE", 0, 6, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/VC15_IMAGE_INFO_1", 0x7000D8}}, + {F, {"BYTE_COUNT", 0, 16, 0x0}}, + {F, {"LINE_COUNT", 16, 16, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/VC15_IMAGE_INFO_2", 0x7000DC}}, + {F, {"DATA_TYPE", 0, 6, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/CONTROL", 0x708000}}, + {F, {"SRST", 0, 1, 0x0}}, + {F, {"DPHY_EN", 1, 1, 0x1}}, + + {R, {"SENSOR_IF/MIPI_RX/IDELAY_TAP_VALUE", 0x708004}}, + {F, {"LANE_0", 0, 5, 0x0}}, + {F, {"LANE_1", 8, 5, 0x0}}, + {F, {"LANE_2", 16, 5, 0x0}}, + {F, {"LANE_3", 24, 5, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/INIT", 0x708008}}, + {F, {"INIT_VAL", 0, 32, 0x186A0}}, + + {R, {"SENSOR_IF/MIPI_RX/HS_TIMEOUT", 0x708010}}, + {F, {"RX_VALUE", 0, 32, 0x10005}}, + + {R, {"SENSOR_IF/MIPI_RX/ESC_TIMEOUT", 0x708014}}, + {F, {"VALUE", 0, 32, 0x6400}}, + + {R, {"SENSOR_IF/MIPI_RX/CL_STATUS", 0x708018}}, + {F, {"MODE", 0, 2, 0x0}}, + {F, {"ULPS", 2, 1, 0x0}}, + {F, {"INIT_DONE", 3, 1, 0x0}}, + {F, {"STOP_STATE", 4, 1, 0x0}}, + {F, {"ERR_CONTROL", 5, 1, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/LANE0_STATUS", 0x70801C}}, + {F, {"MODE", 0, 2, 0x0}}, + {F, {"ULPS", 2, 1, 0x0}}, + {F, {"INIT_DONE", 3, 1, 0x0}}, + {F, {"HS_ABORT", 4, 1, 0x0}}, + {F, {"ESC_ABORT", 5, 1, 0x0}}, + {F, {"STOP_STATE", 6, 1, 0x0}}, + {F, {"PKT_CNT", 16, 16, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/LANE1_STATUS", 0x708020}}, + {F, {"MODE", 0, 2, 0x0}}, + {F, {"ULPS", 2, 1, 0x0}}, + {F, {"INIT_DONE", 3, 1, 0x0}}, + {F, {"HS_ABORT", 4, 1, 0x0}}, + {F, {"ESC_ABORT", 5, 1, 0x0}}, + {F, {"STOP_STATE", 6, 1, 0x0}}, + {F, {"PKT_CNT", 16, 16, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/LANE2_STATUS", 0x708024}}, + {F, {"MODE", 0, 2, 0x0}}, + {F, {"ULPS", 2, 1, 0x0}}, + {F, {"INIT_DONE", 3, 1, 0x0}}, + {F, {"HS_ABORT", 4, 1, 0x0}}, + {F, {"ESC_ABORT", 5, 1, 0x0}}, + {F, {"STOP_STATE", 6, 1, 0x0}}, + {F, {"PKT_CNT", 16, 16, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/LANE3_STATUS", 0x708028}}, + {F, {"MODE", 0, 2, 0x0}}, + {F, {"ULPS", 2, 1, 0x0}}, + {F, {"INIT_DONE", 3, 1, 0x0}}, + {F, {"HS_ABORT", 4, 1, 0x0}}, + {F, {"ESC_ABORT", 5, 1, 0x0}}, + {F, {"STOP_STATE", 6, 1, 0x0}}, + {F, {"PKT_CNT", 16, 16, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/LANE0_HS_SETTLE", 0x708030}}, + {F, {"HS_SETTLE_NS", 0, 9, 0x8D}}, + + {R, {"SENSOR_IF/MIPI_RX/LANE1_HS_SETTLE", 0x708048}}, + {F, {"HS_SETTLE_NS", 0, 9, 0x8D}}, + + {R, {"SENSOR_IF/MIPI_RX/LANE2_HS_SETTLE", 0x70804C}}, + {F, {"HS_SETTLE_NS", 0, 9, 0x8D}}, + + {R, {"SENSOR_IF/MIPI_RX/LANE3_HS_SETTLE", 0x708050}}, + {F, {"HS_SETTLE_NS", 0, 9, 0x8D}}, + + {R, {"SENSOR_IF/MIPI_RX/LANE4_HS_SETTLE", 0x708054}}, + {F, {"HS_SETTLE_NS", 0, 9, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/LANE5_HS_SETTLE", 0x708058}}, + {F, {"HS_SETTLE_NS", 0, 9, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/LANE6_HS_SETTLE", 0x70805C}}, + {F, {"HS_SETTLE_NS", 0, 9, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/LANE7_HS_SETTLE", 0x708060}}, + {F, {"HS_SETTLE_NS", 0, 9, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/LANE4_STATUS", 0x708064}}, + {F, {"MODE", 0, 2, 0x0}}, + {F, {"ULPS", 2, 1, 0x0}}, + {F, {"INIT_DONE", 3, 1, 0x0}}, + {F, {"HS_ABORT", 4, 1, 0x0}}, + {F, {"ESC_ABORT", 5, 1, 0x0}}, + {F, {"STOP_STATE", 6, 1, 0x0}}, + {F, {"PKT_CNT", 16, 16, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/LANE5_STATUS", 0x708068}}, + {F, {"MODE", 0, 2, 0x0}}, + {F, {"ULPS", 2, 1, 0x0}}, + {F, {"INIT_DONE", 3, 1, 0x0}}, + {F, {"HS_ABORT", 4, 1, 0x0}}, + {F, {"ESC_ABORT", 5, 1, 0x0}}, + {F, {"STOP_STATE", 6, 1, 0x0}}, + {F, {"PKT_CNT", 16, 16, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/LANE6_STATUS", 0x70806C}}, + {F, {"MODE", 0, 2, 0x0}}, + {F, {"ULPS", 2, 1, 0x0}}, + {F, {"INIT_DONE", 3, 1, 0x0}}, + {F, {"HS_ABORT", 4, 1, 0x0}}, + {F, {"ESC_ABORT", 5, 1, 0x0}}, + {F, {"STOP_STATE", 6, 1, 0x0}}, + {F, {"PKT_CNT", 16, 16, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/LANE7_STATUS", 0x708070}}, + {F, {"MODE", 0, 2, 0x0}}, + {F, {"ULPS", 2, 1, 0x0}}, + {F, {"INIT_DONE", 3, 1, 0x0}}, + {F, {"HS_ABORT", 4, 1, 0x0}}, + {F, {"ESC_ABORT", 5, 1, 0x0}}, + {F, {"STOP_STATE", 6, 1, 0x0}}, + {F, {"PKT_CNT", 16, 16, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/IDELAY_TAP_VALUE_L4_TO_L7", 0x708074}}, + {F, {"LANE_4", 0, 5, 0x0}}, + {F, {"LANE_5", 8, 5, 0x0}}, + {F, {"LANE_6", 16, 5, 0x0}}, + {F, {"LANE_7", 24, 5, 0x0}}, + + {R, {"SENSOR_IF/GEN41_IF_CTRL/CONTROL", 0x70F000}}, + {F, {"ENABLE", 0, 1, 0x0}}, + {F, {"BYPASS", 1, 1, 0x0}}, + {F, {"LAST_CTRL_MODE", 11, 1, 0x0}}, + {F, {"HALF_WORD_SWAP", 12, 1, 0x0}}, + {F, {"AUX_PRESENCE", 16, 1, 0x0}}, + {F, {"MIPI_RX_PRESENCE", 17, 1, 0x0}}, + {F, {"TD_POL_INV", 20, 1, 0x0}}, + {F, {"EM_POL_INV", 21, 1, 0x0}}, + {F, {"GEN_LAST", 22, 1, 0x0}}, + {F, {"AUX_IN_MODE", 24, 1, 0x0}}, + {F, {"AUX_8BN_4B", 25, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41_IF_CTRL/TRIGGER", 0x70F004}}, + {F, {"AFIFO_RESET", 0, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41_IF_CTRL/TEST_PATTERN_CONTROL", 0x70F008}}, + {F, {"EVT_TYPE", 0, 4, 0x0}}, + {F, {"EVT_FORMAT", 4, 2, 0x2}}, + {A, {"2.0", 0x2}}, + {A, {"3.0", 0x3}}, + {F, {"ENABLE", 8, 1, 0x0}}, + {F, {"VECTOR_MODE", 9, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41_IF_CTRL/TEST_PATTERN_N_PERIOD", 0x70F00C}}, + {F, {"VALID_RATIO", 0, 10, 0x0}}, + {F, {"LENGTH", 16, 16, 0x0}}, + + {R, {"SENSOR_IF/GEN41_IF_CTRL/TEST_PATTERN_P_PERIOD", 0x70F010}}, + {F, {"VALID_RATIO", 0, 10, 0x0}}, + {F, {"LENGTH", 16, 16, 0x0}}, + + {R, {"SENSOR_IF/GEN41_IF_CTRL/TEST_PATTERN_VECTOR", 0x70F014}}, + {F, {"SEED_VALUE", 0, 5, 0x1F}}, + + {R, {"SENSOR_IF/GEN41_IF_CTRL/OOB_FILTER_CONTROL", 0x70F018}}, + {F, {"ENABLE", 0, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41_IF_CTRL/OOB_FILTER_ORIGIN", 0x70F01C}}, + {F, {"Y", 0, 11, 0x0}}, + {F, {"X", 16, 11, 0x0}}, + + {R, {"SENSOR_IF/GEN41_IF_CTRL/OOB_FILTER_SIZE", 0x70F020}}, + {F, {"HEIGHT", 0, 11, 0x2CF}}, + {F, {"WIDTH", 16, 11, 0x4FF}}, + + {R, {"SENSOR_IF/GEN41_IF_CTRL/CCAM5_CONTROL", 0x70F024}}, + {F, {"PSU_EN", 0, 1, 0x0}}, + {F, {"RST_N", 1, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41_IF_CTRL/TRIGGER_FWD", 0x70F028}}, + {F, {"TRIGGER_ID", 0, 8, 0x0}}, + {F, {"ENABLE", 8, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41_IF_CTRL/MIPI_RX_CONTROL", 0x70F02C}}, + {F, {"VIDEO_RESET", 0, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41_IF_CTRL/GEN41_CTRL", 0x70F030}}, + {F, {"BOOT", 0, 1, 0x0}}, + {F, {"DFT_MODE", 1, 1, 0x0}}, + {F, {"TEST_MODE", 2, 1, 0x0}}, + {F, {"I2C_ADDR", 3, 1, 0x0}}, + {F, {"CPU_DEBUG", 4, 1, 0x0}}, + {F, {"AGPIO", 5, 2, 0x0}}, + {F, {"DGPIO", 7, 1, 0x0}}, + {F, {"ARST_N", 8, 1, 0x0}}, + {F, {"TDRST_N", 9, 1, 0x0}}, + {F, {"XCLEAR", 10, 1, 0x0}}, + {F, {"I2C_SPI_SEL", 11, 1, 0x0}}, + {F, {"TRIG_IO_DIR", 12, 1, 0x0}}, + {F, {"DGPIO_DIR", 13, 1, 0x0}}, + {F, {"DGPIO_VAL", 14, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41_IF_CTRL/GEN41_POWER_CTRL", 0x70F034}}, + {F, {"1V8_SYS", 0, 1, 0x0}}, + {F, {"3V3_SYS", 1, 1, 0x0}}, + {F, {"VDDLSC", 2, 1, 0x0}}, + {F, {"VDDPLL", 3, 1, 0x0}}, + {F, {"VDDLIF", 4, 1, 0x0}}, + {F, {"VDDMIF", 5, 1, 0x0}}, + {F, {"VDDIO", 6, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41_IF_CTRL/GEN41_CLK_CTRL", 0x70F038}}, + {F, {"ENABLE", 0, 1, 0x0}}, + {F, {"VALID", 1, 1, 0x0}}, + {F, {"VCO_HIGH_TIME", 10, 6, 0x0}}, + {F, {"VCO_LOW_TIME", 20, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41_AUX_IF/IODELAY_DEC", 0x710004}}, + {F, {"DATA", 0, 8, 0x0}}, + {F, {"VALID", 8, 1, 0x0}}, + {F, {"CLK", 9, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41_AUX_IF/IODELAY_INC", 0x710008}}, + {F, {"DATA", 0, 8, 0x0}}, + {F, {"VALID", 8, 1, 0x0}}, + {F, {"CLK", 9, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41_AUX_IF/IODELAY_LOAD", 0x71000C}}, + {F, {"DATA", 0, 8, 0x0}}, + {F, {"VALID", 8, 1, 0x0}}, + {F, {"CLK", 9, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41_AUX_IF/IODELAY_SET_VALUE_0", 0x710010}}, + {F, {"DATA_0", 0, 5, 0x0}}, + {F, {"DATA_1", 5, 5, 0x0}}, + {F, {"DATA_2", 10, 5, 0x0}}, + {F, {"DATA_3", 15, 5, 0x0}}, + {F, {"DATA_4", 20, 5, 0x0}}, + {F, {"DATA_5", 25, 5, 0x0}}, + + {R, {"SENSOR_IF/GEN41_AUX_IF/IODELAY_SET_VALUE_1", 0x710014}}, + {F, {"DATA_6", 0, 5, 0x0}}, + {F, {"DATA_7", 5, 5, 0x0}}, + {F, {"VALID", 10, 5, 0x0}}, + {F, {"CLK", 15, 5, 0x0}}, + + {R, {"SENSOR_IF/GEN41_AUX_IF/IODELAY_GET_VALUE_0", 0x710018}}, + {F, {"DATA_0", 0, 5, 0x0}}, + {F, {"DATA_1", 5, 5, 0x0}}, + {F, {"DATA_2", 10, 5, 0x0}}, + {F, {"DATA_3", 15, 5, 0x0}}, + {F, {"DATA_4", 20, 5, 0x0}}, + {F, {"DATA_5", 25, 5, 0x0}}, + + {R, {"SENSOR_IF/GEN41_AUX_IF/IODELAY_GET_VALUE_1", 0x71001C}}, + {F, {"DATA_6", 0, 5, 0x0}}, + {F, {"DATA_7", 5, 5, 0x0}}, + {F, {"VALID", 10, 5, 0x0}}, + {F, {"CLK", 15, 5, 0x0}}, + + {R, {"SENSOR_IF/GEN41_AUX_IF/SAMPLE_CLK_EDGE", 0x710020}}, + {F, {"DATA", 0, 8, 0x0}}, + {F, {"VALID", 8, 1, 0x0}}, + + {R, {"SENSOR_IF/VIP/CONTROL", 0x710100}}, + {F, {"MODE", 0, 3, 0x0}}, + {F, {"RATE", 3, 10, 0x0}}, + {F, {"REPEAT", 16, 13, 0x0}}, + {F, {"DISABLE_OUTPUT", 29, 1, 0x0}}, + {F, {"FORCE_READY", 30, 1, 0x1}}, + + {R, {"SENSOR_IF/VIP/TEST_STATUS", 0x710104}}, + {F, {"STATUS", 0, 1, 0x0}}, + {F, {"RESET", 1, 1, 0x0}}, + + {R, {"SENSOR_IF/VIP/PATTERN_TEST_DATA", 0x710108}}, + {F, {"DATA", 0, 32, 0x0}}, + + {R, {"SENSOR_IF/VIP/TEST_RESULT", 0x71010C}}, + {F, {"RESULT", 0, 32, 0x0}}, + + {R, {"SENSOR_IF/VIP/VALID_COUNTER", 0x710110}}, + {F, {"COUNTER", 0, 32, 0x0}}, + + {R, {"SENSOR_IF/VIP/ERROR_COUNTER", 0x710114}}, + {F, {"COUNTER", 0, 32, 0x0}}, + + {R, {"SENSOR_IF/VIP/ERROR_INDEX", 0x710118}}, + {F, {"INDEX", 0, 32, 0x0}} + + // clang-format on +}; + +unsigned int Gen41Evk2RegisterMapSize = sizeof(Gen41Evk2RegisterMap)/sizeof(Gen41Evk2RegisterMap[0]); + +#endif // METAVISION_HAL_GEN41_EVK2_REGISTERMAP_H diff --git a/hal_psee_plugins/include/devices/gen41/register_maps/gen41_evk3_registermap.h b/hal_psee_plugins/include/devices/gen41/register_maps/gen41_evk3_registermap.h new file mode 100644 index 000000000..1784186a3 --- /dev/null +++ b/hal_psee_plugins/include/devices/gen41/register_maps/gen41_evk3_registermap.h @@ -0,0 +1,3501 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_GEN41_EVK3_REGISTERMAP_H +#define METAVISION_HAL_GEN41_EVK3_REGISTERMAP_H + +#include "utils/regmap_data.h" + +RegmapData Gen41Evk3RegisterMap[] = { + // clang-format off + + {R, {"GEN41/roi_ctrl", 0x0004}}, + {F, {"roi_td_en", 1, 1, 0x0}}, + {F, {"roi_td_shadow_trigger", 5, 1, 0x0}}, + {F, {"td_roi_roni_n_en", 6, 1, 0x1}}, + {F, {"Reserved_8", 8, 1, 0x0}}, + {F, {"px_td_rstn", 10, 1, 0x1}}, + {F, {"Reserved_17_11", 11, 7, 0xA}}, + {F, {"Reserved_25", 25, 1, 0x0}}, + {F, {"Reserved_29_28", 28, 2, 0x3}}, + {F, {"Reserved_31_30", 30, 2, 0x3}}, + + {R, {"GEN41/lifo_ctrl", 0x000C}}, + {F, {"lifo_en", 0, 1, 0x0}}, + {F, {"lifo_out_en", 1, 1, 0x0}}, + {F, {"lifo_cnt_en", 2, 1, 0x0}}, + {F, {"Reserved_31_15", 15, 17, 0x0}}, + + {R, {"GEN41/lifo_status", 0x0010}}, + {F, {"lifo_ton", 0, 29, 0x0}}, + {F, {"lifo_ton_valid", 29, 1, 0x0}}, + + {R, {"GEN41/Reserved_0014", 0x0014}}, + {F, {"Reserved_31_0", 0, 32, 0xA0301003}}, + + {R, {"GEN41/refractory_ctrl", 0x0020}}, + {F, {"refr_counter", 0, 29, 0x0}}, + {F, {"refr_valid", 29, 1, 0x0}}, + {F, {"refr_cnt_en", 30, 1, 0x0}}, + {F, {"refr_en", 31, 1, 0x0}}, + + {R, {"GEN41/roi_win_ctrl", 0x0034}}, + {F, {"roi_master_en", 0, 1, 0x0}}, + {F, {"roi_win_done", 1, 1, 0x0}}, + + {R, {"GEN41/roi_win_start_addr", 0x0038}}, + {F, {"roi_win_start_x", 0, 11, 0x0}}, + {F, {"roi_win_start_y", 16, 10, 0x0}}, + + {R, {"GEN41/roi_win_end_addr", 0x003C}}, + {F, {"roi_win_end_x", 0, 11, 0x4FF}}, + {F, {"roi_win_end_y", 16, 10, 0x2CF}}, + + {R, {"GEN41/dig_pad2_ctrl", 0x0044}}, + {F, {"Reserved_11_0", 0, 12, 0xCCF}}, + {F, {"Reserved_15_12", 12, 4, 0xF}}, + {F, {"pad_sync", 16, 4, 0xF}}, + {F, {"Reserved_31_20", 20, 12, 0xCCF}}, + + {R, {"GEN41/adc_control", 0x004C}}, + {F, {"adc_en", 0, 1, 0x0}}, + {F, {"adc_clk_en", 1, 1, 0x0}}, + {F, {"adc_start", 2, 1, 0x0}}, + {F, {"Reserved_31_3", 3, 29, 0xE28}}, + + {R, {"GEN41/adc_status", 0x0050}}, + {F, {"adc_dac_dyn", 0, 10, 0x0}}, + {F, {"Reserved_10", 10, 1, 0x0}}, + {F, {"adc_done_dyn", 11, 1, 0x0}}, + {F, {"Reserved_31_12", 12, 20, 0x0}}, + + {R, {"GEN41/adc_misc_ctrl", 0x0054}}, + {F, {"Reserved_0", 0, 1, 0x0}}, + {F, {"adc_buf_cal_en", 1, 1, 0x0}}, + {F, {"Reserved_9_2", 2, 8, 0x4}}, + {F, {"adc_rng", 10, 2, 0x0}}, + {F, {"adc_temp", 12, 1, 0x0}}, + {F, {"Reserved_13", 13, 1, 0x0}}, + + {R, {"GEN41/temp_ctrl", 0x005C}}, + {F, {"temp_buf_cal_en", 0, 1, 0x0}}, + {F, {"temp_buf_en", 1, 1, 0x0}}, + {F, {"Reserved_31_2", 2, 30, 0x20}}, + + {R, {"GEN41/iph_mirr_ctrl", 0x0074}}, + {F, {"iph_mirr_en", 0, 1, 0x0}}, + {F, {"iph_mirr_amp_en", 1, 1, 0x0}}, + {F, {"Reserved_31_2", 2, 30, 0x0}}, + + {R, {"GEN41/reqy_qmon_ctrl", 0x0088}}, + {F, {"reqy_qmon_en", 0, 1, 0x0}}, + {F, {"reqy_qmon_rstn", 1, 1, 0x0}}, + {F, {"Reserved_2", 2, 1, 0x0}}, + {F, {"Reserved_3", 3, 1, 0x0}}, + {F, {"Reserved_4", 4, 1, 0x0}}, + {F, {"Reserved_9_5", 5, 5, 0x4}}, + + {R, {"GEN41/reqy_qmon_status", 0x008C}}, + {F, {"reqy_qmon_sum", 0, 10, 0x0}}, + {F, {"reqy_qmon_trip", 10, 1, 0x0}}, + {F, {"Reserved_25_16", 16, 10, 0x0}}, + {F, {"Reserved_26", 26, 1, 0x0}}, + + {R, {"GEN41/bias/bias_fo", 0x1004}}, + {F, {"idac_ctl", 0, 8, 0x30}}, + {F, {"Reserved_27_8", 8, 20, 0x1A1E8}}, + {F, {"single_transfer", 28, 1, 0x0}}, + + {R, {"GEN41/bias/bias_hpf", 0x100C}}, + {F, {"idac_ctl", 0, 8, 0x0}}, + {F, {"Reserved_27_8", 8, 20, 0x1A1FF}}, + {F, {"single_transfer", 28, 1, 0x0}}, + + {R, {"GEN41/bias/bias_diff_on", 0x1010}}, + {F, {"idac_ctl", 0, 8, 0x69}}, + {F, {"Reserved_27_8", 8, 20, 0x1A163}}, + {F, {"single_transfer", 28, 1, 0x0}}, + + {R, {"GEN41/bias/bias_diff", 0x1014}}, + {F, {"idac_ctl", 0, 8, 0x55}}, + {F, {"Reserved_27_8", 8, 20, 0x1A150}}, + {F, {"single_transfer", 28, 1, 0x0}}, + + {R, {"GEN41/bias/bias_diff_off", 0x1018}}, + {F, {"idac_ctl", 0, 8, 0x39}}, + {F, {"Reserved_27_8", 8, 20, 0x1A137}}, + {F, {"single_transfer", 28, 1, 0x0}}, + + {R, {"GEN41/bias/bias_refr", 0x1020}}, + {F, {"idac_ctl", 0, 8, 0x34}}, + {F, {"Reserved_27_8", 8, 20, 0x1A9CD}}, + {F, {"single_transfer", 28, 1, 0x0}}, + + {R, {"GEN41/bias/bgen_ctrl", 0x1100}}, + {F, {"burst_transfer", 0, 1, 0x0}}, + {F, {"Reserved_1", 1, 1, 0x0}}, + + {R, {"GEN41/roi/td_roi_x00", 0x2000}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"GEN41/roi/td_roi_x01", 0x2004}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"GEN41/roi/td_roi_x02", 0x2008}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"GEN41/roi/td_roi_x03", 0x200C}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"GEN41/roi/td_roi_x04", 0x2010}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"GEN41/roi/td_roi_x05", 0x2014}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"GEN41/roi/td_roi_x06", 0x2018}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"GEN41/roi/td_roi_x07", 0x201C}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"GEN41/roi/td_roi_x08", 0x2020}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"GEN41/roi/td_roi_x09", 0x2024}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"GEN41/roi/td_roi_x10", 0x2028}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"GEN41/roi/td_roi_x11", 0x202C}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"GEN41/roi/td_roi_x12", 0x2030}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"GEN41/roi/td_roi_x13", 0x2034}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"GEN41/roi/td_roi_x14", 0x2038}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"GEN41/roi/td_roi_x15", 0x203C}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"GEN41/roi/td_roi_x16", 0x2040}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"GEN41/roi/td_roi_x17", 0x2044}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"GEN41/roi/td_roi_x18", 0x2048}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"GEN41/roi/td_roi_x19", 0x204C}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"GEN41/roi/td_roi_x20", 0x2050}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"GEN41/roi/td_roi_x21", 0x2054}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"GEN41/roi/td_roi_x22", 0x2058}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"GEN41/roi/td_roi_x23", 0x205C}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"GEN41/roi/td_roi_x24", 0x2060}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"GEN41/roi/td_roi_x25", 0x2064}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"GEN41/roi/td_roi_x26", 0x2068}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"GEN41/roi/td_roi_x27", 0x206C}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"GEN41/roi/td_roi_x28", 0x2070}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"GEN41/roi/td_roi_x29", 0x2074}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"GEN41/roi/td_roi_x30", 0x2078}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"GEN41/roi/td_roi_x31", 0x207C}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"GEN41/roi/td_roi_x32", 0x2080}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"GEN41/roi/td_roi_x33", 0x2084}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"GEN41/roi/td_roi_x34", 0x2088}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"GEN41/roi/td_roi_x35", 0x208C}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"GEN41/roi/td_roi_x36", 0x2090}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"GEN41/roi/td_roi_x37", 0x2094}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"GEN41/roi/td_roi_x38", 0x2098}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"GEN41/roi/td_roi_x39", 0x209C}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"GEN41/roi/td_roi_y00", 0x4000}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"GEN41/roi/td_roi_y01", 0x4004}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"GEN41/roi/td_roi_y02", 0x4008}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"GEN41/roi/td_roi_y03", 0x400C}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"GEN41/roi/td_roi_y04", 0x4010}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"GEN41/roi/td_roi_y05", 0x4014}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"GEN41/roi/td_roi_y06", 0x4018}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"GEN41/roi/td_roi_y07", 0x401C}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"GEN41/roi/td_roi_y08", 0x4020}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"GEN41/roi/td_roi_y09", 0x4024}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"GEN41/roi/td_roi_y10", 0x4028}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"GEN41/roi/td_roi_y11", 0x402C}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"GEN41/roi/td_roi_y12", 0x4030}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"GEN41/roi/td_roi_y13", 0x4034}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"GEN41/roi/td_roi_y14", 0x4038}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"GEN41/roi/td_roi_y15", 0x403C}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"GEN41/roi/td_roi_y16", 0x4040}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"GEN41/roi/td_roi_y17", 0x4044}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"GEN41/roi/td_roi_y18", 0x4048}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"GEN41/roi/td_roi_y19", 0x404C}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"GEN41/roi/td_roi_y20", 0x4050}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"GEN41/roi/td_roi_y21", 0x4054}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"GEN41/roi/td_roi_y22", 0x4058}}, + {F, {"effective", 0, 16, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFF}}, + {F, {"Reserved_16", 16, 1, 0x1}}, + {F, {"Reserved_17", 17, 1, 0x1}}, + {F, {"Reserved_19_18", 18, 2, 0x3}}, + {F, {"Reserved_21_20", 20, 2, 0x3}}, + {F, {"Reserved_22", 22, 1, 0x1}}, + {F, {"Reserved_23", 23, 1, 0x1}}, + + {R, {"GEN41/erc/Reserved_6000", 0x6000}}, + {F, {"Reserved_0", 0, 1, 0x0}}, + {F, {"Reserved_1", 1, 1, 0x0}}, + {F, {"Reserved_2", 2, 1, 0x0}}, + {F, {"Reserved_3", 3, 1, 0x0}}, + {F, {"Reserved_4", 4, 1, 0x0}}, + + {R, {"GEN41/erc/in_drop_rate_control", 0x6004}}, + {F, {"cfg_event_delay_fifo_en", 0, 1, 0x0}}, + {F, {"Reserved_1", 1, 1, 0x0}}, + {F, {"Reserved_10_2", 2, 9, 0x0}}, + + {R, {"GEN41/erc/reference_period", 0x6008}}, + {F, {"erc_reference_period", 0, 10, 0x80}}, + + {R, {"GEN41/erc/td_target_event_rate", 0x600C}}, + {F, {"target_event_rate", 0, 22, 0x80}}, + + {R, {"GEN41/erc/erc_enable", 0x6028}}, + {F, {"erc_en", 0, 1, 0x0}}, + {F, {"Reserved_1", 1, 1, 0x0}}, + {F, {"Reserved_2", 2, 1, 0x0}}, + + {R, {"GEN41/erc/Reserved_602C", 0x602C}}, + {F, {"Reserved_0", 0, 1, 0x0}}, + {F, {"Reserved_1", 1, 1, 0x0}}, + + {R, {"GEN41/erc/t_dropping_control", 0x6050}}, + {F, {"t_dropping_en", 0, 1, 0x0}}, + + {R, {"GEN41/erc/h_dropping_control", 0x6060}}, + {F, {"h_dropping_en", 0, 1, 0x0}}, + + {R, {"GEN41/erc/v_dropping_control", 0x6070}}, + {F, {"v_dropping_en", 0, 1, 0x0}}, + + {R, {"GEN41/erc/h_drop_lut_00", 0x6080}}, + {F, {"hlut00", 0, 5, 0x0}}, + {F, {"hlut01", 8, 5, 0x0}}, + {F, {"hlut02", 16, 5, 0x0}}, + {F, {"hlut03", 24, 5, 0x0}}, + + {R, {"GEN41/erc/h_drop_lut_01", 0x6084}}, + {F, {"hlut04", 0, 5, 0x0}}, + {F, {"hlut05", 8, 5, 0x0}}, + {F, {"hlut06", 16, 5, 0x0}}, + {F, {"hlut07", 24, 5, 0x0}}, + + {R, {"GEN41/erc/h_drop_lut_02", 0x6088}}, + {F, {"hlut08", 0, 5, 0x0}}, + {F, {"hlut09", 8, 5, 0x0}}, + {F, {"hlut10", 16, 5, 0x0}}, + {F, {"hlut11", 24, 5, 0x0}}, + + {R, {"GEN41/erc/h_drop_lut_03", 0x608C}}, + {F, {"hlut12", 0, 5, 0x0}}, + {F, {"hlut13", 8, 5, 0x0}}, + {F, {"hlut14", 16, 5, 0x0}}, + {F, {"hlut15", 24, 5, 0x0}}, + + {R, {"GEN41/erc/h_drop_lut_04", 0x6090}}, + {F, {"hlut16", 0, 5, 0x0}}, + {F, {"hlut17", 8, 5, 0x0}}, + {F, {"hlut18", 16, 5, 0x0}}, + {F, {"hlut19", 24, 5, 0x0}}, + + {R, {"GEN41/erc/h_drop_lut_05", 0x6094}}, + {F, {"hlut20", 0, 5, 0x0}}, + {F, {"hlut21", 8, 5, 0x0}}, + {F, {"hlut22", 16, 5, 0x0}}, + {F, {"hlut23", 24, 5, 0x0}}, + + {R, {"GEN41/erc/h_drop_lut_06", 0x6098}}, + {F, {"hlut24", 0, 5, 0x0}}, + {F, {"hlut25", 8, 5, 0x0}}, + {F, {"hlut26", 16, 5, 0x0}}, + {F, {"hlut27", 24, 5, 0x0}}, + + {R, {"GEN41/erc/h_drop_lut_07", 0x609C}}, + {F, {"hlut28", 0, 5, 0x0}}, + {F, {"hlut29", 8, 5, 0x0}}, + {F, {"hlut30", 16, 5, 0x0}}, + {F, {"hlut31", 24, 5, 0x0}}, + + {R, {"GEN41/erc/v_drop_lut_00", 0x60C0}}, + {F, {"vlut00", 0, 5, 0x0}}, + {F, {"vlut01", 8, 5, 0x0}}, + {F, {"vlut02", 16, 5, 0x0}}, + {F, {"vlut03", 24, 5, 0x0}}, + + {R, {"GEN41/erc/v_drop_lut_01", 0x60C4}}, + {F, {"vlut04", 0, 5, 0x0}}, + {F, {"vlut05", 8, 5, 0x0}}, + {F, {"vlut06", 16, 5, 0x0}}, + {F, {"vlut07", 24, 5, 0x0}}, + + {R, {"GEN41/erc/v_drop_lut_02", 0x60C8}}, + {F, {"vlut08", 0, 5, 0x0}}, + {F, {"vlut09", 8, 5, 0x0}}, + {F, {"vlut10", 16, 5, 0x0}}, + {F, {"vlut11", 24, 5, 0x0}}, + + {R, {"GEN41/erc/v_drop_lut_03", 0x60CC}}, + {F, {"vlut12", 0, 5, 0x0}}, + {F, {"vlut13", 8, 5, 0x0}}, + {F, {"vlut14", 16, 5, 0x0}}, + {F, {"vlut15", 24, 5, 0x0}}, + + {R, {"GEN41/erc/v_drop_lut_04", 0x60D0}}, + {F, {"vlut16", 0, 5, 0x0}}, + {F, {"vlut17", 8, 5, 0x0}}, + {F, {"vlut18", 16, 5, 0x0}}, + {F, {"vlut19", 24, 5, 0x0}}, + + {R, {"GEN41/erc/v_drop_lut_05", 0x60D4}}, + {F, {"vlut20", 0, 5, 0x0}}, + {F, {"vlut21", 8, 5, 0x0}}, + {F, {"vlut22", 16, 5, 0x0}}, + {F, {"vlut23", 24, 5, 0x0}}, + + {R, {"GEN41/erc/v_drop_lut_06", 0x60D8}}, + {F, {"vlut24", 0, 5, 0x0}}, + {F, {"vlut25", 8, 5, 0x0}}, + {F, {"vlut26", 16, 5, 0x0}}, + {F, {"vlut27", 24, 5, 0x0}}, + + {R, {"GEN41/erc/v_drop_lut_07", 0x60DC}}, + {F, {"vlut28", 0, 5, 0x0}}, + {F, {"vlut29", 8, 5, 0x0}}, + {F, {"vlut30", 16, 5, 0x0}}, + {F, {"vlut31", 24, 5, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_00", 0x6400}}, + {F, {"tlut000", 0, 9, 0x0}}, + {F, {"tlut001", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_01", 0x6404}}, + {F, {"tlut002", 0, 9, 0x0}}, + {F, {"tlut003", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_02", 0x6408}}, + {F, {"tlut004", 0, 9, 0x0}}, + {F, {"tlut005", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_03", 0x640C}}, + {F, {"tlut006", 0, 9, 0x0}}, + {F, {"tlut007", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_04", 0x6410}}, + {F, {"tlut008", 0, 9, 0x0}}, + {F, {"tlut009", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_05", 0x6414}}, + {F, {"tlut010", 0, 9, 0x0}}, + {F, {"tlut011", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_06", 0x6418}}, + {F, {"tlut012", 0, 9, 0x0}}, + {F, {"tlut013", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_07", 0x641C}}, + {F, {"tlut014", 0, 9, 0x0}}, + {F, {"tlut015", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_08", 0x6420}}, + {F, {"tlut016", 0, 9, 0x0}}, + {F, {"tlut017", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_09", 0x6424}}, + {F, {"tlut018", 0, 9, 0x0}}, + {F, {"tlut019", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_10", 0x6428}}, + {F, {"tlut020", 0, 9, 0x0}}, + {F, {"tlut021", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_11", 0x642C}}, + {F, {"tlut022", 0, 9, 0x0}}, + {F, {"tlut023", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_12", 0x6430}}, + {F, {"tlut024", 0, 9, 0x0}}, + {F, {"tlut025", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_13", 0x6434}}, + {F, {"tlut026", 0, 9, 0x0}}, + {F, {"tlut027", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_14", 0x6438}}, + {F, {"tlut028", 0, 9, 0x0}}, + {F, {"tlut029", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_15", 0x643C}}, + {F, {"tlut030", 0, 9, 0x0}}, + {F, {"tlut031", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_16", 0x6440}}, + {F, {"tlut032", 0, 9, 0x0}}, + {F, {"tlut033", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_17", 0x6444}}, + {F, {"tlut034", 0, 9, 0x0}}, + {F, {"tlut035", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_18", 0x6448}}, + {F, {"tlut036", 0, 9, 0x0}}, + {F, {"tlut037", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_19", 0x644C}}, + {F, {"tlut038", 0, 9, 0x0}}, + {F, {"tlut039", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_20", 0x6450}}, + {F, {"tlut040", 0, 9, 0x0}}, + {F, {"tlut041", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_21", 0x6454}}, + {F, {"tlut042", 0, 9, 0x0}}, + {F, {"tlut043", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_22", 0x6458}}, + {F, {"tlut044", 0, 9, 0x0}}, + {F, {"tlut045", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_23", 0x645C}}, + {F, {"tlut046", 0, 9, 0x0}}, + {F, {"tlut047", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_24", 0x6460}}, + {F, {"tlut048", 0, 9, 0x0}}, + {F, {"tlut049", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_25", 0x6464}}, + {F, {"tlut050", 0, 9, 0x0}}, + {F, {"tlut051", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_26", 0x6468}}, + {F, {"tlut052", 0, 9, 0x0}}, + {F, {"tlut053", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_27", 0x646C}}, + {F, {"tlut054", 0, 9, 0x0}}, + {F, {"tlut055", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_28", 0x6470}}, + {F, {"tlut056", 0, 9, 0x0}}, + {F, {"tlut057", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_29", 0x6474}}, + {F, {"tlut058", 0, 9, 0x0}}, + {F, {"tlut059", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_30", 0x6478}}, + {F, {"tlut060", 0, 9, 0x0}}, + {F, {"tlut061", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_31", 0x647C}}, + {F, {"tlut062", 0, 9, 0x0}}, + {F, {"tlut063", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_32", 0x6480}}, + {F, {"tlut064", 0, 9, 0x0}}, + {F, {"tlut065", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_33", 0x6484}}, + {F, {"tlut066", 0, 9, 0x0}}, + {F, {"tlut067", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_34", 0x6488}}, + {F, {"tlut068", 0, 9, 0x0}}, + {F, {"tlut069", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_35", 0x648C}}, + {F, {"tlut070", 0, 9, 0x0}}, + {F, {"tlut071", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_36", 0x6490}}, + {F, {"tlut072", 0, 9, 0x0}}, + {F, {"tlut073", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_37", 0x6494}}, + {F, {"tlut074", 0, 9, 0x0}}, + {F, {"tlut075", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_38", 0x6498}}, + {F, {"tlut076", 0, 9, 0x0}}, + {F, {"tlut077", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_39", 0x649C}}, + {F, {"tlut078", 0, 9, 0x0}}, + {F, {"tlut079", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_40", 0x64A0}}, + {F, {"tlut080", 0, 9, 0x0}}, + {F, {"tlut081", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_41", 0x64A4}}, + {F, {"tlut082", 0, 9, 0x0}}, + {F, {"tlut083", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_42", 0x64A8}}, + {F, {"tlut084", 0, 9, 0x0}}, + {F, {"tlut085", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_43", 0x64AC}}, + {F, {"tlut086", 0, 9, 0x0}}, + {F, {"tlut087", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_44", 0x64B0}}, + {F, {"tlut088", 0, 9, 0x0}}, + {F, {"tlut089", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_45", 0x64B4}}, + {F, {"tlut090", 0, 9, 0x0}}, + {F, {"tlut091", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_46", 0x64B8}}, + {F, {"tlut092", 0, 9, 0x0}}, + {F, {"tlut093", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_47", 0x64BC}}, + {F, {"tlut094", 0, 9, 0x0}}, + {F, {"tlut095", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_48", 0x64C0}}, + {F, {"tlut096", 0, 9, 0x0}}, + {F, {"tlut097", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_49", 0x64C4}}, + {F, {"tlut098", 0, 9, 0x0}}, + {F, {"tlut099", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_50", 0x64C8}}, + {F, {"tlut100", 0, 9, 0x0}}, + {F, {"tlut101", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_51", 0x64CC}}, + {F, {"tlut102", 0, 9, 0x0}}, + {F, {"tlut103", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_52", 0x64D0}}, + {F, {"tlut104", 0, 9, 0x0}}, + {F, {"tlut105", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_53", 0x64D4}}, + {F, {"tlut106", 0, 9, 0x0}}, + {F, {"tlut107", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_54", 0x64D8}}, + {F, {"tlut108", 0, 9, 0x0}}, + {F, {"tlut109", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_55", 0x64DC}}, + {F, {"tlut110", 0, 9, 0x0}}, + {F, {"tlut111", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_56", 0x64E0}}, + {F, {"tlut112", 0, 9, 0x0}}, + {F, {"tlut113", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_57", 0x64E4}}, + {F, {"tlut114", 0, 9, 0x0}}, + {F, {"tlut115", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_58", 0x64E8}}, + {F, {"tlut116", 0, 9, 0x0}}, + {F, {"tlut117", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_59", 0x64EC}}, + {F, {"tlut118", 0, 9, 0x0}}, + {F, {"tlut119", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_60", 0x64F0}}, + {F, {"tlut120", 0, 9, 0x0}}, + {F, {"tlut121", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_61", 0x64F4}}, + {F, {"tlut122", 0, 9, 0x0}}, + {F, {"tlut123", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_62", 0x64F8}}, + {F, {"tlut124", 0, 9, 0x0}}, + {F, {"tlut125", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_63", 0x64FC}}, + {F, {"tlut126", 0, 9, 0x0}}, + {F, {"tlut127", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_64", 0x6500}}, + {F, {"tlut128", 0, 9, 0x0}}, + {F, {"tlut129", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_65", 0x6504}}, + {F, {"tlut130", 0, 9, 0x0}}, + {F, {"tlut131", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_66", 0x6508}}, + {F, {"tlut132", 0, 9, 0x0}}, + {F, {"tlut133", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_67", 0x650C}}, + {F, {"tlut134", 0, 9, 0x0}}, + {F, {"tlut135", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_68", 0x6510}}, + {F, {"tlut136", 0, 9, 0x0}}, + {F, {"tlut137", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_69", 0x6514}}, + {F, {"tlut138", 0, 9, 0x0}}, + {F, {"tlut139", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_70", 0x6518}}, + {F, {"tlut140", 0, 9, 0x0}}, + {F, {"tlut141", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_71", 0x651C}}, + {F, {"tlut142", 0, 9, 0x0}}, + {F, {"tlut143", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_72", 0x6520}}, + {F, {"tlut144", 0, 9, 0x0}}, + {F, {"tlut145", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_73", 0x6524}}, + {F, {"tlut146", 0, 9, 0x0}}, + {F, {"tlut147", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_74", 0x6528}}, + {F, {"tlut148", 0, 9, 0x0}}, + {F, {"tlut149", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_75", 0x652C}}, + {F, {"tlut150", 0, 9, 0x0}}, + {F, {"tlut151", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_76", 0x6530}}, + {F, {"tlut152", 0, 9, 0x0}}, + {F, {"tlut153", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_77", 0x6534}}, + {F, {"tlut154", 0, 9, 0x0}}, + {F, {"tlut155", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_78", 0x6538}}, + {F, {"tlut156", 0, 9, 0x0}}, + {F, {"tlut157", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_79", 0x653C}}, + {F, {"tlut158", 0, 9, 0x0}}, + {F, {"tlut159", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_80", 0x6540}}, + {F, {"tlut160", 0, 9, 0x0}}, + {F, {"tlut161", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_81", 0x6544}}, + {F, {"tlut162", 0, 9, 0x0}}, + {F, {"tlut163", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_82", 0x6548}}, + {F, {"tlut164", 0, 9, 0x0}}, + {F, {"tlut165", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_83", 0x654C}}, + {F, {"tlut166", 0, 9, 0x0}}, + {F, {"tlut167", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_84", 0x6550}}, + {F, {"tlut168", 0, 9, 0x0}}, + {F, {"tlut169", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_85", 0x6554}}, + {F, {"tlut170", 0, 9, 0x0}}, + {F, {"tlut171", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_86", 0x6558}}, + {F, {"tlut172", 0, 9, 0x0}}, + {F, {"tlut173", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_87", 0x655C}}, + {F, {"tlut174", 0, 9, 0x0}}, + {F, {"tlut175", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_88", 0x6560}}, + {F, {"tlut176", 0, 9, 0x0}}, + {F, {"tlut177", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_89", 0x6564}}, + {F, {"tlut178", 0, 9, 0x0}}, + {F, {"tlut179", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_90", 0x6568}}, + {F, {"tlut180", 0, 9, 0x0}}, + {F, {"tlut181", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_91", 0x656C}}, + {F, {"tlut182", 0, 9, 0x0}}, + {F, {"tlut183", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_92", 0x6570}}, + {F, {"tlut184", 0, 9, 0x0}}, + {F, {"tlut185", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_93", 0x6574}}, + {F, {"tlut186", 0, 9, 0x0}}, + {F, {"tlut187", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_94", 0x6578}}, + {F, {"tlut188", 0, 9, 0x0}}, + {F, {"tlut189", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_95", 0x657C}}, + {F, {"tlut190", 0, 9, 0x0}}, + {F, {"tlut191", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_96", 0x6580}}, + {F, {"tlut192", 0, 9, 0x0}}, + {F, {"tlut193", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_97", 0x6584}}, + {F, {"tlut194", 0, 9, 0x0}}, + {F, {"tlut195", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_98", 0x6588}}, + {F, {"tlut196", 0, 9, 0x0}}, + {F, {"tlut197", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_99", 0x658C}}, + {F, {"tlut198", 0, 9, 0x0}}, + {F, {"tlut199", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_100", 0x6590}}, + {F, {"tlut200", 0, 9, 0x0}}, + {F, {"tlut201", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_101", 0x6594}}, + {F, {"tlut202", 0, 9, 0x0}}, + {F, {"tlut203", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_102", 0x6598}}, + {F, {"tlut204", 0, 9, 0x0}}, + {F, {"tlut205", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_103", 0x659C}}, + {F, {"tlut206", 0, 9, 0x0}}, + {F, {"tlut207", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_104", 0x65A0}}, + {F, {"tlut208", 0, 9, 0x0}}, + {F, {"tlut209", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_105", 0x65A4}}, + {F, {"tlut210", 0, 9, 0x0}}, + {F, {"tlut211", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_106", 0x65A8}}, + {F, {"tlut212", 0, 9, 0x0}}, + {F, {"tlut213", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_107", 0x65AC}}, + {F, {"tlut214", 0, 9, 0x0}}, + {F, {"tlut215", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_108", 0x65B0}}, + {F, {"tlut216", 0, 9, 0x0}}, + {F, {"tlut217", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_109", 0x65B4}}, + {F, {"tlut218", 0, 9, 0x0}}, + {F, {"tlut219", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_110", 0x65B8}}, + {F, {"tlut220", 0, 9, 0x0}}, + {F, {"tlut221", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_111", 0x65BC}}, + {F, {"tlut222", 0, 9, 0x0}}, + {F, {"tlut223", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_112", 0x65C0}}, + {F, {"tlut224", 0, 9, 0x0}}, + {F, {"tlut225", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_113", 0x65C4}}, + {F, {"tlut226", 0, 9, 0x0}}, + {F, {"tlut227", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_114", 0x65C8}}, + {F, {"tlut228", 0, 9, 0x0}}, + {F, {"tlut229", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_115", 0x65CC}}, + {F, {"tlut230", 0, 9, 0x0}}, + {F, {"tlut231", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_116", 0x65D0}}, + {F, {"tlut232", 0, 9, 0x0}}, + {F, {"tlut233", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_117", 0x65D4}}, + {F, {"tlut234", 0, 9, 0x0}}, + {F, {"tlut235", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_118", 0x65D8}}, + {F, {"tlut236", 0, 9, 0x0}}, + {F, {"tlut237", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_119", 0x65DC}}, + {F, {"tlut238", 0, 9, 0x0}}, + {F, {"tlut239", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_120", 0x65E0}}, + {F, {"tlut240", 0, 9, 0x0}}, + {F, {"tlut241", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_121", 0x65E4}}, + {F, {"tlut242", 0, 9, 0x0}}, + {F, {"tlut243", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_122", 0x65E8}}, + {F, {"tlut244", 0, 9, 0x0}}, + {F, {"tlut245", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_123", 0x65EC}}, + {F, {"tlut246", 0, 9, 0x0}}, + {F, {"tlut247", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_124", 0x65F0}}, + {F, {"tlut248", 0, 9, 0x0}}, + {F, {"tlut249", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_125", 0x65F4}}, + {F, {"tlut250", 0, 9, 0x0}}, + {F, {"tlut251", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_126", 0x65F8}}, + {F, {"tlut252", 0, 9, 0x0}}, + {F, {"tlut253", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_127", 0x65FC}}, + {F, {"tlut254", 0, 9, 0x0}}, + {F, {"tlut255", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_128", 0x6600}}, + {F, {"tlut256", 0, 9, 0x0}}, + {F, {"tlut257", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_129", 0x6604}}, + {F, {"tlut258", 0, 9, 0x0}}, + {F, {"tlut259", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_130", 0x6608}}, + {F, {"tlut260", 0, 9, 0x0}}, + {F, {"tlut261", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_131", 0x660C}}, + {F, {"tlut262", 0, 9, 0x0}}, + {F, {"tlut263", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_132", 0x6610}}, + {F, {"tlut264", 0, 9, 0x0}}, + {F, {"tlut265", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_133", 0x6614}}, + {F, {"tlut266", 0, 9, 0x0}}, + {F, {"tlut267", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_134", 0x6618}}, + {F, {"tlut268", 0, 9, 0x0}}, + {F, {"tlut269", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_135", 0x661C}}, + {F, {"tlut270", 0, 9, 0x0}}, + {F, {"tlut271", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_136", 0x6620}}, + {F, {"tlut272", 0, 9, 0x0}}, + {F, {"tlut273", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_137", 0x6624}}, + {F, {"tlut274", 0, 9, 0x0}}, + {F, {"tlut275", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_138", 0x6628}}, + {F, {"tlut276", 0, 9, 0x0}}, + {F, {"tlut277", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_139", 0x662C}}, + {F, {"tlut278", 0, 9, 0x0}}, + {F, {"tlut279", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_140", 0x6630}}, + {F, {"tlut280", 0, 9, 0x0}}, + {F, {"tlut281", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_141", 0x6634}}, + {F, {"tlut282", 0, 9, 0x0}}, + {F, {"tlut283", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_142", 0x6638}}, + {F, {"tlut284", 0, 9, 0x0}}, + {F, {"tlut285", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_143", 0x663C}}, + {F, {"tlut286", 0, 9, 0x0}}, + {F, {"tlut287", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_144", 0x6640}}, + {F, {"tlut288", 0, 9, 0x0}}, + {F, {"tlut289", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_145", 0x6644}}, + {F, {"tlut290", 0, 9, 0x0}}, + {F, {"tlut291", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_146", 0x6648}}, + {F, {"tlut292", 0, 9, 0x0}}, + {F, {"tlut293", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_147", 0x664C}}, + {F, {"tlut294", 0, 9, 0x0}}, + {F, {"tlut295", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_148", 0x6650}}, + {F, {"tlut296", 0, 9, 0x0}}, + {F, {"tlut297", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_149", 0x6654}}, + {F, {"tlut298", 0, 9, 0x0}}, + {F, {"tlut299", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_150", 0x6658}}, + {F, {"tlut300", 0, 9, 0x0}}, + {F, {"tlut301", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_151", 0x665C}}, + {F, {"tlut302", 0, 9, 0x0}}, + {F, {"tlut303", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_152", 0x6660}}, + {F, {"tlut304", 0, 9, 0x0}}, + {F, {"tlut305", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_153", 0x6664}}, + {F, {"tlut306", 0, 9, 0x0}}, + {F, {"tlut307", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_154", 0x6668}}, + {F, {"tlut308", 0, 9, 0x0}}, + {F, {"tlut309", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_155", 0x666C}}, + {F, {"tlut310", 0, 9, 0x0}}, + {F, {"tlut311", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_156", 0x6670}}, + {F, {"tlut312", 0, 9, 0x0}}, + {F, {"tlut313", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_157", 0x6674}}, + {F, {"tlut314", 0, 9, 0x0}}, + {F, {"tlut315", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_158", 0x6678}}, + {F, {"tlut316", 0, 9, 0x0}}, + {F, {"tlut317", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_159", 0x667C}}, + {F, {"tlut318", 0, 9, 0x0}}, + {F, {"tlut319", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_160", 0x6680}}, + {F, {"tlut320", 0, 9, 0x0}}, + {F, {"tlut321", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_161", 0x6684}}, + {F, {"tlut322", 0, 9, 0x0}}, + {F, {"tlut323", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_162", 0x6688}}, + {F, {"tlut324", 0, 9, 0x0}}, + {F, {"tlut325", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_163", 0x668C}}, + {F, {"tlut326", 0, 9, 0x0}}, + {F, {"tlut327", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_164", 0x6690}}, + {F, {"tlut328", 0, 9, 0x0}}, + {F, {"tlut329", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_165", 0x6694}}, + {F, {"tlut330", 0, 9, 0x0}}, + {F, {"tlut331", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_166", 0x6698}}, + {F, {"tlut332", 0, 9, 0x0}}, + {F, {"tlut333", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_167", 0x669C}}, + {F, {"tlut334", 0, 9, 0x0}}, + {F, {"tlut335", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_168", 0x66A0}}, + {F, {"tlut336", 0, 9, 0x0}}, + {F, {"tlut337", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_169", 0x66A4}}, + {F, {"tlut338", 0, 9, 0x0}}, + {F, {"tlut339", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_170", 0x66A8}}, + {F, {"tlut340", 0, 9, 0x0}}, + {F, {"tlut341", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_171", 0x66AC}}, + {F, {"tlut342", 0, 9, 0x0}}, + {F, {"tlut343", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_172", 0x66B0}}, + {F, {"tlut344", 0, 9, 0x0}}, + {F, {"tlut345", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_173", 0x66B4}}, + {F, {"tlut346", 0, 9, 0x0}}, + {F, {"tlut347", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_174", 0x66B8}}, + {F, {"tlut348", 0, 9, 0x0}}, + {F, {"tlut349", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_175", 0x66BC}}, + {F, {"tlut350", 0, 9, 0x0}}, + {F, {"tlut351", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_176", 0x66C0}}, + {F, {"tlut352", 0, 9, 0x0}}, + {F, {"tlut353", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_177", 0x66C4}}, + {F, {"tlut354", 0, 9, 0x0}}, + {F, {"tlut355", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_178", 0x66C8}}, + {F, {"tlut356", 0, 9, 0x0}}, + {F, {"tlut357", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_179", 0x66CC}}, + {F, {"tlut358", 0, 9, 0x0}}, + {F, {"tlut359", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_180", 0x66D0}}, + {F, {"tlut360", 0, 9, 0x0}}, + {F, {"tlut361", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_181", 0x66D4}}, + {F, {"tlut362", 0, 9, 0x0}}, + {F, {"tlut363", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_182", 0x66D8}}, + {F, {"tlut364", 0, 9, 0x0}}, + {F, {"tlut365", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_183", 0x66DC}}, + {F, {"tlut366", 0, 9, 0x0}}, + {F, {"tlut367", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_184", 0x66E0}}, + {F, {"tlut368", 0, 9, 0x0}}, + {F, {"tlut369", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_185", 0x66E4}}, + {F, {"tlut370", 0, 9, 0x0}}, + {F, {"tlut371", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_186", 0x66E8}}, + {F, {"tlut372", 0, 9, 0x0}}, + {F, {"tlut373", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_187", 0x66EC}}, + {F, {"tlut374", 0, 9, 0x0}}, + {F, {"tlut375", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_188", 0x66F0}}, + {F, {"tlut376", 0, 9, 0x0}}, + {F, {"tlut377", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_189", 0x66F4}}, + {F, {"tlut378", 0, 9, 0x0}}, + {F, {"tlut379", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_190", 0x66F8}}, + {F, {"tlut380", 0, 9, 0x0}}, + {F, {"tlut381", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_191", 0x66FC}}, + {F, {"tlut382", 0, 9, 0x0}}, + {F, {"tlut383", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_192", 0x6700}}, + {F, {"tlut384", 0, 9, 0x0}}, + {F, {"tlut385", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_193", 0x6704}}, + {F, {"tlut386", 0, 9, 0x0}}, + {F, {"tlut387", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_194", 0x6708}}, + {F, {"tlut388", 0, 9, 0x0}}, + {F, {"tlut389", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_195", 0x670C}}, + {F, {"tlut390", 0, 9, 0x0}}, + {F, {"tlut391", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_196", 0x6710}}, + {F, {"tlut392", 0, 9, 0x0}}, + {F, {"tlut393", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_197", 0x6714}}, + {F, {"tlut394", 0, 9, 0x0}}, + {F, {"tlut395", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_198", 0x6718}}, + {F, {"tlut396", 0, 9, 0x0}}, + {F, {"tlut397", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_199", 0x671C}}, + {F, {"tlut398", 0, 9, 0x0}}, + {F, {"tlut399", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_200", 0x6720}}, + {F, {"tlut400", 0, 9, 0x0}}, + {F, {"tlut401", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_201", 0x6724}}, + {F, {"tlut402", 0, 9, 0x0}}, + {F, {"tlut403", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_202", 0x6728}}, + {F, {"tlut404", 0, 9, 0x0}}, + {F, {"tlut405", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_203", 0x672C}}, + {F, {"tlut406", 0, 9, 0x0}}, + {F, {"tlut407", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_204", 0x6730}}, + {F, {"tlut408", 0, 9, 0x0}}, + {F, {"tlut409", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_205", 0x6734}}, + {F, {"tlut410", 0, 9, 0x0}}, + {F, {"tlut411", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_206", 0x6738}}, + {F, {"tlut412", 0, 9, 0x0}}, + {F, {"tlut413", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_207", 0x673C}}, + {F, {"tlut414", 0, 9, 0x0}}, + {F, {"tlut415", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_208", 0x6740}}, + {F, {"tlut416", 0, 9, 0x0}}, + {F, {"tlut417", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_209", 0x6744}}, + {F, {"tlut418", 0, 9, 0x0}}, + {F, {"tlut419", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_210", 0x6748}}, + {F, {"tlut420", 0, 9, 0x0}}, + {F, {"tlut421", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_211", 0x674C}}, + {F, {"tlut422", 0, 9, 0x0}}, + {F, {"tlut423", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_212", 0x6750}}, + {F, {"tlut424", 0, 9, 0x0}}, + {F, {"tlut425", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_213", 0x6754}}, + {F, {"tlut426", 0, 9, 0x0}}, + {F, {"tlut427", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_214", 0x6758}}, + {F, {"tlut428", 0, 9, 0x0}}, + {F, {"tlut429", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_215", 0x675C}}, + {F, {"tlut430", 0, 9, 0x0}}, + {F, {"tlut431", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_216", 0x6760}}, + {F, {"tlut432", 0, 9, 0x0}}, + {F, {"tlut433", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_217", 0x6764}}, + {F, {"tlut434", 0, 9, 0x0}}, + {F, {"tlut435", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_218", 0x6768}}, + {F, {"tlut436", 0, 9, 0x0}}, + {F, {"tlut437", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_219", 0x676C}}, + {F, {"tlut438", 0, 9, 0x0}}, + {F, {"tlut439", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_220", 0x6770}}, + {F, {"tlut440", 0, 9, 0x0}}, + {F, {"tlut441", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_221", 0x6774}}, + {F, {"tlut442", 0, 9, 0x0}}, + {F, {"tlut443", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_222", 0x6778}}, + {F, {"tlut444", 0, 9, 0x0}}, + {F, {"tlut445", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_223", 0x677C}}, + {F, {"tlut446", 0, 9, 0x0}}, + {F, {"tlut447", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_224", 0x6780}}, + {F, {"tlut448", 0, 9, 0x0}}, + {F, {"tlut449", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_225", 0x6784}}, + {F, {"tlut450", 0, 9, 0x0}}, + {F, {"tlut451", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_226", 0x6788}}, + {F, {"tlut452", 0, 9, 0x0}}, + {F, {"tlut453", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_227", 0x678C}}, + {F, {"tlut454", 0, 9, 0x0}}, + {F, {"tlut455", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_228", 0x6790}}, + {F, {"tlut456", 0, 9, 0x0}}, + {F, {"tlut457", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_229", 0x6794}}, + {F, {"tlut458", 0, 9, 0x0}}, + {F, {"tlut459", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_230", 0x6798}}, + {F, {"tlut460", 0, 9, 0x0}}, + {F, {"tlut461", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_231", 0x679C}}, + {F, {"tlut462", 0, 9, 0x0}}, + {F, {"tlut463", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_232", 0x67A0}}, + {F, {"tlut464", 0, 9, 0x0}}, + {F, {"tlut465", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_233", 0x67A4}}, + {F, {"tlut466", 0, 9, 0x0}}, + {F, {"tlut467", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_234", 0x67A8}}, + {F, {"tlut468", 0, 9, 0x0}}, + {F, {"tlut469", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_235", 0x67AC}}, + {F, {"tlut470", 0, 9, 0x0}}, + {F, {"tlut471", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_236", 0x67B0}}, + {F, {"tlut472", 0, 9, 0x0}}, + {F, {"tlut473", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_237", 0x67B4}}, + {F, {"tlut474", 0, 9, 0x0}}, + {F, {"tlut475", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_238", 0x67B8}}, + {F, {"tlut476", 0, 9, 0x0}}, + {F, {"tlut477", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_239", 0x67BC}}, + {F, {"tlut478", 0, 9, 0x0}}, + {F, {"tlut479", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_240", 0x67C0}}, + {F, {"tlut480", 0, 9, 0x0}}, + {F, {"tlut481", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_241", 0x67C4}}, + {F, {"tlut482", 0, 9, 0x0}}, + {F, {"tlut483", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_242", 0x67C8}}, + {F, {"tlut484", 0, 9, 0x0}}, + {F, {"tlut485", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_243", 0x67CC}}, + {F, {"tlut486", 0, 9, 0x0}}, + {F, {"tlut487", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_244", 0x67D0}}, + {F, {"tlut488", 0, 9, 0x0}}, + {F, {"tlut489", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_245", 0x67D4}}, + {F, {"tlut490", 0, 9, 0x0}}, + {F, {"tlut491", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_246", 0x67D8}}, + {F, {"tlut492", 0, 9, 0x0}}, + {F, {"tlut493", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_247", 0x67DC}}, + {F, {"tlut494", 0, 9, 0x0}}, + {F, {"tlut495", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_248", 0x67E0}}, + {F, {"tlut496", 0, 9, 0x0}}, + {F, {"tlut497", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_249", 0x67E4}}, + {F, {"tlut498", 0, 9, 0x0}}, + {F, {"tlut499", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_250", 0x67E8}}, + {F, {"tlut500", 0, 9, 0x0}}, + {F, {"tlut501", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_251", 0x67EC}}, + {F, {"tlut502", 0, 9, 0x0}}, + {F, {"tlut503", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_252", 0x67F0}}, + {F, {"tlut504", 0, 9, 0x0}}, + {F, {"tlut505", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_253", 0x67F4}}, + {F, {"tlut506", 0, 9, 0x0}}, + {F, {"tlut507", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_254", 0x67F8}}, + {F, {"tlut508", 0, 9, 0x0}}, + {F, {"tlut509", 16, 9, 0x0}}, + + {R, {"GEN41/erc/t_drop_lut_255", 0x67FC}}, + {F, {"tlut510", 0, 9, 0x0}}, + {F, {"tlut511", 16, 9, 0x0}}, + + {R, {"GEN41/erc/Reserved_6800", 0x6800}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6804", 0x6804}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6808", 0x6808}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_680C", 0x680C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6810", 0x6810}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6814", 0x6814}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6818", 0x6818}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_681C", 0x681C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6820", 0x6820}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6824", 0x6824}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6828", 0x6828}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_682C", 0x682C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6830", 0x6830}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6834", 0x6834}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6838", 0x6838}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_683C", 0x683C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6840", 0x6840}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6844", 0x6844}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6848", 0x6848}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_684C", 0x684C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6850", 0x6850}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6854", 0x6854}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6858", 0x6858}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_685C", 0x685C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6860", 0x6860}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6864", 0x6864}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6868", 0x6868}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_686C", 0x686C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6870", 0x6870}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6874", 0x6874}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6878", 0x6878}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_687C", 0x687C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6880", 0x6880}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6884", 0x6884}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6888", 0x6888}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_688C", 0x688C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6890", 0x6890}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6894", 0x6894}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6898", 0x6898}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_689C", 0x689C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_68A0", 0x68A0}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_68A4", 0x68A4}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_68A8", 0x68A8}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_68AC", 0x68AC}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_68B0", 0x68B0}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_68B4", 0x68B4}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_68B8", 0x68B8}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_68BC", 0x68BC}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_68C0", 0x68C0}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_68C4", 0x68C4}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_68C8", 0x68C8}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_68CC", 0x68CC}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_68D0", 0x68D0}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_68D4", 0x68D4}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_68D8", 0x68D8}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_68DC", 0x68DC}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_68E0", 0x68E0}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_68E4", 0x68E4}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_68E8", 0x68E8}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_68EC", 0x68EC}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_68F0", 0x68F0}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_68F4", 0x68F4}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_68F8", 0x68F8}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_68FC", 0x68FC}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6900", 0x6900}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6904", 0x6904}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6908", 0x6908}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_690C", 0x690C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6910", 0x6910}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6914", 0x6914}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6918", 0x6918}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_691C", 0x691C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6920", 0x6920}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6924", 0x6924}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6928", 0x6928}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_692C", 0x692C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6930", 0x6930}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6934", 0x6934}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6938", 0x6938}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_693C", 0x693C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6940", 0x6940}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6944", 0x6944}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6948", 0x6948}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_694C", 0x694C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6950", 0x6950}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6954", 0x6954}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6958", 0x6958}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_695C", 0x695C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6960", 0x6960}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6964", 0x6964}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6968", 0x6968}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_696C", 0x696C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6970", 0x6970}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6974", 0x6974}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6978", 0x6978}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_697C", 0x697C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6980", 0x6980}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6984", 0x6984}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6988", 0x6988}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_698C", 0x698C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6990", 0x6990}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6994", 0x6994}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6998", 0x6998}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_699C", 0x699C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_69A0", 0x69A0}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_69A4", 0x69A4}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_69A8", 0x69A8}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_69AC", 0x69AC}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_69B0", 0x69B0}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_69B4", 0x69B4}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_69B8", 0x69B8}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_69BC", 0x69BC}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_69C0", 0x69C0}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_69C4", 0x69C4}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_69C8", 0x69C8}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_69CC", 0x69CC}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_69D0", 0x69D0}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_69D4", 0x69D4}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_69D8", 0x69D8}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_69DC", 0x69DC}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_69E0", 0x69E0}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_69E4", 0x69E4}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_69E8", 0x69E8}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_69EC", 0x69EC}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_69F0", 0x69F0}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_69F4", 0x69F4}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_69F8", 0x69F8}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_69FC", 0x69FC}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6A00", 0x6A00}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6A04", 0x6A04}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6A08", 0x6A08}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6A0C", 0x6A0C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6A10", 0x6A10}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6A14", 0x6A14}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6A18", 0x6A18}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6A1C", 0x6A1C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6A20", 0x6A20}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6A24", 0x6A24}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6A28", 0x6A28}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6A2C", 0x6A2C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6A30", 0x6A30}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6A34", 0x6A34}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6A38", 0x6A38}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6A3C", 0x6A3C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6A40", 0x6A40}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6A44", 0x6A44}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6A48", 0x6A48}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6A4C", 0x6A4C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6A50", 0x6A50}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6A54", 0x6A54}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6A58", 0x6A58}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6A5C", 0x6A5C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6A60", 0x6A60}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6A64", 0x6A64}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6A68", 0x6A68}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6A6C", 0x6A6C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6A70", 0x6A70}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6A74", 0x6A74}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6A78", 0x6A78}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6A7C", 0x6A7C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6A80", 0x6A80}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6A84", 0x6A84}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6A88", 0x6A88}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6A8C", 0x6A8C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6A90", 0x6A90}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6A94", 0x6A94}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6A98", 0x6A98}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6A9C", 0x6A9C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6AA0", 0x6AA0}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6AA4", 0x6AA4}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6AA8", 0x6AA8}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6AAC", 0x6AAC}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6AB0", 0x6AB0}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6AB4", 0x6AB4}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6AB8", 0x6AB8}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6ABC", 0x6ABC}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6AC0", 0x6AC0}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6AC4", 0x6AC4}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6AC8", 0x6AC8}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6ACC", 0x6ACC}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6AD0", 0x6AD0}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6AD4", 0x6AD4}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6AD8", 0x6AD8}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6ADC", 0x6ADC}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6AE0", 0x6AE0}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6AE4", 0x6AE4}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6AE8", 0x6AE8}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6AEC", 0x6AEC}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6AF0", 0x6AF0}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6AF4", 0x6AF4}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6AF8", 0x6AF8}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6AFC", 0x6AFC}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6B00", 0x6B00}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6B04", 0x6B04}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6B08", 0x6B08}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6B0C", 0x6B0C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6B10", 0x6B10}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6B14", 0x6B14}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6B18", 0x6B18}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6B1C", 0x6B1C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6B20", 0x6B20}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6B24", 0x6B24}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6B28", 0x6B28}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6B2C", 0x6B2C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6B30", 0x6B30}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6B34", 0x6B34}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6B38", 0x6B38}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6B3C", 0x6B3C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6B40", 0x6B40}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6B44", 0x6B44}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6B48", 0x6B48}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6B4C", 0x6B4C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6B50", 0x6B50}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6B54", 0x6B54}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6B58", 0x6B58}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6B5C", 0x6B5C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6B60", 0x6B60}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6B64", 0x6B64}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6B68", 0x6B68}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6B6C", 0x6B6C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6B70", 0x6B70}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6B74", 0x6B74}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6B78", 0x6B78}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6B7C", 0x6B7C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6B80", 0x6B80}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6B84", 0x6B84}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6B88", 0x6B88}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6B8C", 0x6B8C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6B90", 0x6B90}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/erc/Reserved_6B94", 0x6B94}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"GEN41/edf/pipeline_control", 0x7000}}, + {F, {"Reserved_0", 0, 1, 0x1}}, + {F, {"format", 1, 1, 0x0}}, + {F, {"Reserved_2", 2, 1, 0x0}}, + {F, {"Reserved_3", 3, 1, 0x0}}, + {F, {"Reserved_4", 4, 1, 0x0}}, + {F, {"Reserved_31_16", 16, 16, 0xFFFF}}, + + {R, {"GEN41/edf/Reserved_7004", 0x7004}}, + {F, {"Reserved_10", 10, 1, 0x1}}, + + {R, {"GEN41/ro/readout_ctrl", 0x9000}}, + {F, {"Reserved_4_0", 0, 5, 0x0}}, + {F, {"ro_inv_pol_td", 5, 1, 0x0}}, + {F, {"Reserved_7_6", 6, 2, 0x0}}, + {F, {"Reserved_31_8", 8, 24, 0x0}}, + + {R, {"GEN41/ro/time_base_ctrl", 0x9008}}, + {F, {"time_base_enable", 0, 1, 0x0}}, + {F, {"time_base_mode", 1, 1, 0x0}}, + {F, {"external_mode", 2, 1, 0x0}}, + {F, {"external_mode_enable", 3, 1, 0x0}}, + {F, {"Reserved_10_4", 4, 7, 0x64}}, + + {R, {"GEN41/ro/dig_ctrl", 0x900C}}, + {F, {"dig_crop_enable", 0, 3, 0x0}}, + {F, {"Reserved_31_3", 3, 29, 0x0}}, + + {R, {"GEN41/ro/dig_start_pos", 0x9010}}, + {F, {"dig_crop_start_x", 0, 11, 0x0}}, + {F, {"dig_crop_start_y", 16, 10, 0x0}}, + + {R, {"GEN41/ro/dig_end_pos", 0x9014}}, + {F, {"dig_crop_end_x", 0, 11, 0x0}}, + {F, {"dig_crop_end_y", 16, 10, 0x0}}, + + {R, {"GEN41/ro/ro_ctrl", 0x9028}}, + {F, {"area_cnt_en", 0, 1, 0x0}}, + {F, {"output_disable", 1, 1, 0x0}}, + {F, {"keep_th", 2, 1, 0x0}}, + + {R, {"GEN41/ro/area_x0_addr", 0x902C}}, + {F, {"x0_addr", 0, 11, 0x0}}, + + {R, {"GEN41/ro/area_x1_addr", 0x9030}}, + {F, {"x1_addr", 0, 11, 0x140}}, + + {R, {"GEN41/ro/area_x2_addr", 0x9034}}, + {F, {"x2_addr", 0, 11, 0x280}}, + + {R, {"GEN41/ro/area_x3_addr", 0x9038}}, + {F, {"x3_addr", 0, 11, 0x3C0}}, + + {R, {"GEN41/ro/area_x4_addr", 0x903C}}, + {F, {"x4_addr", 0, 11, 0x500}}, + + {R, {"GEN41/ro/area_y0_addr", 0x9040}}, + {F, {"y0_addr", 0, 11, 0x0}}, + + {R, {"GEN41/ro/area_y1_addr", 0x9044}}, + {F, {"y1_addr", 0, 11, 0xB4}}, + + {R, {"GEN41/ro/area_y2_addr", 0x9048}}, + {F, {"y2_addr", 0, 11, 0x168}}, + + {R, {"GEN41/ro/area_y3_addr", 0x904C}}, + {F, {"y3_addr", 0, 11, 0x21C}}, + + {R, {"GEN41/ro/area_y4_addr", 0x9050}}, + {F, {"y4_addr", 0, 11, 0x2D0}}, + + {R, {"GEN41/ro/counter_ctrl", 0x9054}}, + {F, {"count_en", 0, 1, 0x0}}, + {F, {"Reserved_1", 1, 1, 0x0}}, + {F, {"Reserved_2", 2, 1, 0x1}}, + + {R, {"GEN41/ro/counter_timer_threshold", 0x9058}}, + {F, {"timer_threshold", 0, 32, 0x3E8}}, + + {R, {"GEN41/ro/digital_mask_pixel_00", 0x9100}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"GEN41/ro/digital_mask_pixel_01", 0x9104}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"GEN41/ro/digital_mask_pixel_02", 0x9108}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"GEN41/ro/digital_mask_pixel_03", 0x910C}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"GEN41/ro/digital_mask_pixel_04", 0x9110}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"GEN41/ro/digital_mask_pixel_05", 0x9114}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"GEN41/ro/digital_mask_pixel_06", 0x9118}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"GEN41/ro/digital_mask_pixel_07", 0x911C}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"GEN41/ro/digital_mask_pixel_08", 0x9120}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"GEN41/ro/digital_mask_pixel_09", 0x9124}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"GEN41/ro/digital_mask_pixel_10", 0x9128}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"GEN41/ro/digital_mask_pixel_11", 0x912C}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"GEN41/ro/digital_mask_pixel_12", 0x9130}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"GEN41/ro/digital_mask_pixel_13", 0x9134}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"GEN41/ro/digital_mask_pixel_14", 0x9138}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"GEN41/ro/digital_mask_pixel_15", 0x913C}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"GEN41/ro/digital_mask_pixel_16", 0x9140}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"GEN41/ro/digital_mask_pixel_17", 0x9144}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"GEN41/ro/digital_mask_pixel_18", 0x9148}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"GEN41/ro/digital_mask_pixel_19", 0x914C}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"GEN41/ro/digital_mask_pixel_20", 0x9150}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"GEN41/ro/digital_mask_pixel_21", 0x9154}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"GEN41/ro/digital_mask_pixel_22", 0x9158}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"GEN41/ro/digital_mask_pixel_23", 0x915C}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"GEN41/ro/digital_mask_pixel_24", 0x9160}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"GEN41/ro/digital_mask_pixel_25", 0x9164}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"GEN41/ro/digital_mask_pixel_26", 0x9168}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"GEN41/ro/digital_mask_pixel_27", 0x916C}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"GEN41/ro/digital_mask_pixel_28", 0x9170}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"GEN41/ro/digital_mask_pixel_29", 0x9174}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"GEN41/ro/digital_mask_pixel_30", 0x9178}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"GEN41/ro/digital_mask_pixel_31", 0x917C}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"GEN41/ro/digital_mask_pixel_32", 0x9180}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"GEN41/ro/digital_mask_pixel_33", 0x9184}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"GEN41/ro/digital_mask_pixel_34", 0x9188}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"GEN41/ro/digital_mask_pixel_35", 0x918C}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"GEN41/ro/digital_mask_pixel_36", 0x9190}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"GEN41/ro/digital_mask_pixel_37", 0x9194}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"GEN41/ro/digital_mask_pixel_38", 0x9198}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"GEN41/ro/digital_mask_pixel_39", 0x919C}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"GEN41/ro/digital_mask_pixel_40", 0x91A0}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"GEN41/ro/digital_mask_pixel_41", 0x91A4}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"GEN41/ro/digital_mask_pixel_42", 0x91A8}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"GEN41/ro/digital_mask_pixel_43", 0x91AC}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"GEN41/ro/digital_mask_pixel_44", 0x91B0}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"GEN41/ro/digital_mask_pixel_45", 0x91B4}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"GEN41/ro/digital_mask_pixel_46", 0x91B8}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"GEN41/ro/digital_mask_pixel_47", 0x91BC}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"GEN41/ro/digital_mask_pixel_48", 0x91C0}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"GEN41/ro/digital_mask_pixel_49", 0x91C4}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"GEN41/ro/digital_mask_pixel_50", 0x91C8}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"GEN41/ro/digital_mask_pixel_51", 0x91CC}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"GEN41/ro/digital_mask_pixel_52", 0x91D0}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"GEN41/ro/digital_mask_pixel_53", 0x91D4}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"GEN41/ro/digital_mask_pixel_54", 0x91D8}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"GEN41/ro/digital_mask_pixel_55", 0x91DC}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"GEN41/ro/digital_mask_pixel_56", 0x91E0}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"GEN41/ro/digital_mask_pixel_57", 0x91E4}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"GEN41/ro/digital_mask_pixel_58", 0x91E8}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"GEN41/ro/digital_mask_pixel_59", 0x91EC}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"GEN41/ro/digital_mask_pixel_60", 0x91F0}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"GEN41/ro/digital_mask_pixel_61", 0x91F4}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"GEN41/ro/digital_mask_pixel_62", 0x91F8}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"GEN41/ro/digital_mask_pixel_63", 0x91FC}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"GEN41/ro/area_cnt00", 0x9200}}, + {F, {"area_cnt_val_00", 0, 32, 0x0}}, + + {R, {"GEN41/ro/area_cnt01", 0x9204}}, + {F, {"area_cnt_val_01", 0, 32, 0x0}}, + + {R, {"GEN41/ro/area_cnt02", 0x9208}}, + {F, {"area_cnt_val_02", 0, 32, 0x0}}, + + {R, {"GEN41/ro/area_cnt03", 0x920C}}, + {F, {"area_cnt_val_03", 0, 32, 0x0}}, + + {R, {"GEN41/ro/area_cnt04", 0x9210}}, + {F, {"area_cnt_val_04", 0, 32, 0x0}}, + + {R, {"GEN41/ro/area_cnt05", 0x9214}}, + {F, {"area_cnt_val_05", 0, 32, 0x0}}, + + {R, {"GEN41/ro/area_cnt06", 0x9218}}, + {F, {"area_cnt_val_06", 0, 32, 0x0}}, + + {R, {"GEN41/ro/area_cnt07", 0x921C}}, + {F, {"area_cnt_val_07", 0, 32, 0x0}}, + + {R, {"GEN41/ro/area_cnt08", 0x9220}}, + {F, {"area_cnt_val_08", 0, 32, 0x0}}, + + {R, {"GEN41/ro/area_cnt09", 0x9224}}, + {F, {"area_cnt_val_09", 0, 32, 0x0}}, + + {R, {"GEN41/ro/area_cnt10", 0x9228}}, + {F, {"area_cnt_val_10", 0, 32, 0x0}}, + + {R, {"GEN41/ro/area_cnt11", 0x922C}}, + {F, {"area_cnt_val_11", 0, 32, 0x0}}, + + {R, {"GEN41/ro/area_cnt12", 0x9230}}, + {F, {"area_cnt_val_12", 0, 32, 0x0}}, + + {R, {"GEN41/ro/area_cnt13", 0x9234}}, + {F, {"area_cnt_val_13", 0, 32, 0x0}}, + + {R, {"GEN41/ro/area_cnt14", 0x9238}}, + {F, {"area_cnt_val_14", 0, 32, 0x0}}, + + {R, {"GEN41/ro/area_cnt15", 0x923C}}, + {F, {"area_cnt_val_15", 0, 32, 0x0}}, + + {R, {"GEN41/afk/pipeline_control", 0xC000}}, + {F, {"afk_en", 0, 3, 0x0}}, + + {R, {"GEN41/afk/Reserved_C004", 0xC004}}, + {F, {"Reserved_6", 6, 1, 0x0}}, + + {R, {"GEN41/afk/filter_period", 0xC008}}, + {F, {"min_cutoff_period", 0, 8, 0xF}}, + {F, {"max_cutoff_period", 8, 8, 0x9C}}, + {F, {"Reserved_19_16", 16, 4, 0x8}}, + + {R, {"GEN41/afk/invalidation", 0xC0C0}}, + {F, {"dt_fifo_wait_time", 0, 12, 0x5A0}}, + {F, {"Reserved_23_12", 12, 12, 0x5A}}, + {F, {"Reserved_27_24", 24, 4, 0xA}}, + {F, {"Reserved_28", 28, 1, 0x0}}, + + {R, {"GEN41/afk/initialization", 0xC0C4}}, + {F, {"afk_req_init", 0, 1, 0x0}}, + {F, {"Reserved_1", 1, 1, 0x0}}, + {F, {"afk_flag_init_done", 2, 1, 0x0}}, + + {R, {"GEN41/stc/pipeline_control", 0xD000}}, + {F, {"stc_trail_bypass", 0, 3, 0x0}}, + + {R, {"GEN41/stc/stc_param", 0xD004}}, + {F, {"stc_enable", 0, 1, 0x0}}, + {F, {"stc_threshold", 1, 19, 0x2710}}, + + {R, {"GEN41/stc/trail_param", 0xD008}}, + {F, {"trail_enable", 0, 1, 0x0}}, + {F, {"trail_threshold", 1, 19, 0x186A0}}, + + {R, {"GEN41/stc/timestamping", 0xD00C}}, + {F, {"prescaler", 0, 5, 0xD}}, + {F, {"multiplier", 5, 4, 0x1}}, + {F, {"Reserved_9", 9, 1, 0x1}}, + + {R, {"GEN41/stc/Reserved_D0C0", 0xD0C0}}, + {F, {"Reserved_23_12", 12, 12, 0x118}}, + + {R, {"GEN41/stc/initialization", 0xD0C4}}, + {F, {"stc_req_init", 0, 1, 0x0}}, + {F, {"Reserved_1", 1, 1, 0x0}}, + {F, {"stc_flag_init_done", 2, 1, 0x0}} + + // clang-format on +}; + +unsigned int Gen41Evk3RegisterMapSize = sizeof(Gen41Evk3RegisterMap)/sizeof(Gen41Evk3RegisterMap[0]); + +#endif // METAVISION_HAL_GEN41_EVK3_REGISTERMAP_H diff --git a/hal_psee_plugins/include/devices/golden_fallbacks/golden_fallback_fx3_facilities_builder.h b/hal_psee_plugins/include/devices/golden_fallbacks/golden_fallback_fx3_facilities_builder.h new file mode 100644 index 000000000..fa1806853 --- /dev/null +++ b/hal_psee_plugins/include/devices/golden_fallbacks/golden_fallback_fx3_facilities_builder.h @@ -0,0 +1,26 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_GOLDEN_FALLBACK_FX3_FACILITIES_BUILDER_H +#define METAVISION_HAL_GOLDEN_FALLBACK_FX3_FACILITIES_BUILDER_H + +namespace Metavision { + +class DeviceBuilder; +class DeviceBuilderParameters; +class DeviceConfig; +bool build_golden_fallback_fx3_device(DeviceBuilder &device_builder, + const DeviceBuilderParameters &device_builder_params, + const DeviceConfig &device_config); + +} // namespace Metavision + +#endif // METAVISION_HAL_GOLDEN_FALLBACK_FX3_FACILITIES_BUILDER_H diff --git a/hal_psee_plugins/include/devices/golden_fallbacks/golden_fallback_treuzell_facilities_builder.h b/hal_psee_plugins/include/devices/golden_fallbacks/golden_fallback_treuzell_facilities_builder.h new file mode 100644 index 000000000..40daff09f --- /dev/null +++ b/hal_psee_plugins/include/devices/golden_fallbacks/golden_fallback_treuzell_facilities_builder.h @@ -0,0 +1,26 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_GOLDEN_FALLBACK_TREUZELL_FACILITIES_BUILDER_H +#define METAVISION_HAL_GOLDEN_FALLBACK_TREUZELL_FACILITIES_BUILDER_H + +namespace Metavision { + +class DeviceBuilder; +class DeviceBuilderParameters; +class DeviceConfig; +bool build_golden_fallback_treuzell_device(DeviceBuilder &device_builder, + const DeviceBuilderParameters &device_builder_params, + const DeviceConfig &device_config); + +} // namespace Metavision + +#endif // METAVISION_HAL_GOLDEN_FALLBACK_TREUZELL_FACILITIES_BUILDER_H diff --git a/hal_psee_plugins/include/devices/imx636/imx636_bias_settings.h b/hal_psee_plugins/include/devices/imx636/imx636_bias_settings.h new file mode 100644 index 000000000..73adaf1e5 --- /dev/null +++ b/hal_psee_plugins/include/devices/imx636/imx636_bias_settings.h @@ -0,0 +1,30 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +/* WARNING, THIS IS AN AUTO-GENERATED FILE. DO NOT MODIFY */ + +#ifndef METAVISION_HAL_IMX636_BIAS_SETTINGS_H +#define METAVISION_HAL_IMX636_BIAS_SETTINGS_H + +static constexpr int BIAS_FO_MIN_OFFSET = -35; +static constexpr int BIAS_FO_MAX_OFFSET = 55; +static constexpr int BIAS_HPF_MIN_OFFSET = 0; +static constexpr int BIAS_HPF_MAX_OFFSET = 120; +static constexpr int BIAS_DIFF_ON_MIN_OFFSET = -85; +static constexpr int BIAS_DIFF_ON_MAX_OFFSET = 140; +static constexpr int BIAS_DIFF_MIN_OFFSET = -32; +static constexpr int BIAS_DIFF_MAX_OFFSET = 16; +static constexpr int BIAS_DIFF_OFF_MIN_OFFSET = -35; +static constexpr int BIAS_DIFF_OFF_MAX_OFFSET = 190; +static constexpr int BIAS_REFR_MIN_OFFSET = -20; +static constexpr int BIAS_REFR_MAX_OFFSET = 235; + +#endif // METAVISION_HAL_IMX636_BIAS_SETTINGS_H diff --git a/hal_psee_plugins/include/devices/imx636/imx636_evk2_issd.h b/hal_psee_plugins/include/devices/imx636/imx636_evk2_issd.h new file mode 100644 index 000000000..7d9fd3a33 --- /dev/null +++ b/hal_psee_plugins/include/devices/imx636/imx636_evk2_issd.h @@ -0,0 +1,215 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +// ISSD sequences generated by psee_issd_convert. +// Parameters: +// issd_csv_format_version=1.0 +// system=evk2_imx636_cd +// operator=Prophesee +// dry_run=False +// no_system=False +// strip_prefix=False +// sensor_version=None +// args=-s evk2_imx636_cd +// sensor=PseeEvk2IMX636 +// date=2021-12-17T09:55:13 +// psee_issd_version=1.2.0.182+gb2ca43260.d20210009 +// psee_sensor_lib_version=3.4.0.145+gef81c7c75.d20210025 +// issd_data_format_version=1.0 + +// clang-format off + +#include + +namespace Metavision { + +const std::vector issd_evk2_imx636_init = { + RegisterOperation::Write(0x00000004, 0x00000111), + RegisterOperation::Write(0x00000000, 0x00000089), + RegisterOperation::Write(0x00000000, 0x0000008D), + RegisterOperation::Write(0x00000000, 0x000000CD), + RegisterOperation::Write(0x00000008, 0x0000004E), + RegisterOperation::Write(0x00002004, 0x00002000), + RegisterOperation::Write(0x00000014, 0x00000000), + RegisterOperation::Write(0x00000600, 0x00000001), + RegisterOperation::Write(0x00000044, 0x00000000), + RegisterOperation::Write(0x00000048, 0x00030D41), + RegisterOperation::Write(0x00000018, 0x00000000), + RegisterOperation::Write(0x00700000, 0x00000001), + RegisterOperation::Write(0x0070F000, 0x00400000), + RegisterOperation::Write(0x0070F000, 0x00400000), + RegisterOperation::Write(0x0070F000, 0x00400000), + RegisterOperation::Write(0x0070F030, 0x00000000), + RegisterOperation::Write(0x0070F030, 0x00000000), + RegisterOperation::Write(0x0070F030, 0x00000000), + RegisterOperation::Write(0x0070F030, 0x00000000), + RegisterOperation::Write(0x0070F000, 0x00400000), + RegisterOperation::Write(0x0070F030, 0x00000001), + RegisterOperation::Write(0x0070F038, 0x01405002), + RegisterOperation::Write(0x0070F038, 0x01405000), + RegisterOperation::Write(0x0070F024, 0x00000000), + RegisterOperation::Write(0x0070F024, 0x00000001), + RegisterOperation::Delay(500000), + RegisterOperation::Write(0x0070F024, 0x00000003), + RegisterOperation::Delay(500000), + RegisterOperation::Write(0x0070F030, 0x00000001), + RegisterOperation::Write(0x0070F030, 0x00000001), + RegisterOperation::Write(0x0070F038, 0x01405001), + RegisterOperation::Delay(1000), + RegisterOperation::Write(0x0070F030, 0x00000101), + RegisterOperation::Delay(1000), + RegisterOperation::Write(0x0070F030, 0x00000301), + RegisterOperation::Write(0x0010B000, 0x00000158), + RegisterOperation::Delay(300), + RegisterOperation::Write(0x0010B044, 0x00000000), + RegisterOperation::Write(0x0010B004, 0x0000000A), + RegisterOperation::Write(0x0010B040, 0x00000000), + RegisterOperation::Write(0x0010B0C8, 0x00000000), + RegisterOperation::Write(0x0010B040, 0x00000000), + RegisterOperation::Write(0x0010B040, 0x00000000), + RegisterOperation::Write(0x00100000, 0x4F006442), + RegisterOperation::Write(0x00100000, 0x0F006442), + RegisterOperation::Write(0x001000B8, 0x00000400), + RegisterOperation::Write(0x001000B8, 0x00000400), + RegisterOperation::Write(0x0010B07C, 0x00000000), + RegisterOperation::Write(0x0010B074, 0x00000002), + RegisterOperation::Write(0x0010B078, 0x00000078), + RegisterOperation::Write(0x001000C0, 0x00000108), + RegisterOperation::Write(0x001000C0, 0x00000208), + RegisterOperation::Write(0x0010B120, 0x00000001), + RegisterOperation::Write(0x0010E120, 0x00000000), + RegisterOperation::Write(0x0010B068, 0x00000004), + RegisterOperation::Write(0x0010B07C, 0x00000001), + RegisterOperation::Delay(10), + RegisterOperation::Write(0x0010B07C, 0x00000003), + RegisterOperation::Delay(1000), + RegisterOperation::Write(0x001000B8, 0x00000401), + RegisterOperation::Write(0x001000B8, 0x00000409), + RegisterOperation::Write(0x00100000, 0x4F006442), + RegisterOperation::Write(0x00100000, 0x4F00644A), + RegisterOperation::Write(0x0010B080, 0x00000067), + RegisterOperation::Write(0x0010B084, 0x0000000F), + RegisterOperation::Write(0x0010B088, 0x00000027), + RegisterOperation::Write(0x0010B08C, 0x00000027), + RegisterOperation::Write(0x0010B090, 0x000000B7), + RegisterOperation::Write(0x0010B094, 0x00000047), + RegisterOperation::Write(0x0010B098, 0x0000002F), + RegisterOperation::Write(0x0010B09C, 0x0000004F), + RegisterOperation::Write(0x0010B0A0, 0x0000002F), + RegisterOperation::Write(0x0010B0A4, 0x00000027), + RegisterOperation::Write(0x0010B0AC, 0x00000028), + RegisterOperation::Write(0x0010B0CC, 0x00000001), + RegisterOperation::Write(0x0010A000, 0x000B0501), + RegisterOperation::Delay(200), + RegisterOperation::Write(0x0010A008, 0x00002405), + RegisterOperation::Delay(200), + RegisterOperation::Write(0x0010A004, 0x000B0501), + RegisterOperation::Delay(200), + RegisterOperation::Write(0x0010A020, 0x00000150), + RegisterOperation::Delay(200), + RegisterOperation::Write(0x0010B040, 0x00000007), + RegisterOperation::Write(0x0010B064, 0x00000006), + RegisterOperation::Write(0x0010B040, 0x0000000F), + RegisterOperation::Delay(100), + RegisterOperation::Write(0x0010B004, 0x0000008A), + RegisterOperation::Delay(200), + RegisterOperation::Write(0x0010B0C8, 0x00000003), + RegisterOperation::Delay(200), + RegisterOperation::Write(0x0010B044, 0x00000001), + RegisterOperation::Write(0x0010B000, 0x0000015D), + RegisterOperation::Write(0x00109008, 0x0000064A), + RegisterOperation::Write(0x00100044, 0xCCFFCCCF), + RegisterOperation::Write(0x00100004, 0xF0005042), + RegisterOperation::Write(0x00100018, 0x00000200), + RegisterOperation::Write(0x00101014, 0x11A1504D), + RegisterOperation::Write(0x00109004, 0x00000000), + RegisterOperation::Delay(1000) +}; + +const std::vector issd_evk2_imx636_start = { + RegisterOperation::Write(0x00000044, 0x00000001), + RegisterOperation::Write(0x00000014, 0x00000001), + RegisterOperation::Write(0x0070F000, 0x00400001), + RegisterOperation::Write(0x0010B000, 0x0000015D), + RegisterOperation::Write(0x00109028, 0x00000000), + RegisterOperation::Write(0x00109008, 0x0000064B), + // Analog START + RegisterOperation::Write(0x0010002C, 0x0022C724), + RegisterOperation::Write(0x00100004, 0xF0005442), + RegisterOperation::Write(0x00000018, 0x00000001), + RegisterOperation::WriteField(0x00000008, 0x0000004F, 0x1) +}; + +const std::vector issd_evk2_imx636_stop = { + RegisterOperation::Write(0x00000018, 0x00000000), + RegisterOperation::WriteField(0x00000008, 0x0000004E, 0x00000001), + // Analog STOP + RegisterOperation::Write(0x00100004, 0xF0005042), + RegisterOperation::Write(0x0010002C, 0x0022C324), + // Digital STOP + RegisterOperation::Write(0x00109028, 0x00000002), + RegisterOperation::Delay(1000), + RegisterOperation::Write(0x00109008, 0x0000064A), + RegisterOperation::Write(0x0010B000, 0x0000015C), + RegisterOperation::Delay(300), +}; + +const std::vector issd_evk2_imx636_destroy = { + // Analog DESTROY + RegisterOperation::Write(0x00100070, 0x00400008), + RegisterOperation::Write(0x0010006C, 0x0EE47114), + RegisterOperation::Delay(500), + RegisterOperation::Write(0x0010A00C, 0x00020400), + RegisterOperation::Delay(500), + RegisterOperation::Write(0x0010A010, 0x00008068), + RegisterOperation::Delay(200), + RegisterOperation::Write(0x00101104, 0x00000000), + RegisterOperation::Delay(200), + RegisterOperation::Write(0x0010A020, 0x00000050), + RegisterOperation::Delay(200), + RegisterOperation::Write(0x0010A004, 0x000B0500), + RegisterOperation::Delay(200), + RegisterOperation::Write(0x0010A008, 0x00002404), + RegisterOperation::Delay(200), + RegisterOperation::Write(0x0010A000, 0x000B0500), + // Digital DESTROY + RegisterOperation::Write(0x0010B044, 0x00000000), + RegisterOperation::Write(0x0010B004, 0x0000000A), + RegisterOperation::Write(0x0010B040, 0x0000000E), + RegisterOperation::Write(0x0010B0C8, 0x00000000), + RegisterOperation::Write(0x0010B040, 0x00000006), + RegisterOperation::Write(0x0010B040, 0x00000004), + RegisterOperation::Write(0x00100000, 0x4F006442), + RegisterOperation::Write(0x00100000, 0x0F006442), + RegisterOperation::Write(0x001000B8, 0x00000401), + RegisterOperation::Write(0x001000B8, 0x00000400), + RegisterOperation::Write(0x0010B07C, 0x00000000), + RegisterOperation::Write(0x0070F030, 0x00000201), + RegisterOperation::Write(0x0070F030, 0x00000001), + RegisterOperation::Delay(1000), + RegisterOperation::Write(0x0070F038, 0x01405000), + RegisterOperation::Write(0x0070F024, 0x00000001), + RegisterOperation::Write(0x0070F024, 0x00000000), + RegisterOperation::Write(0x00000004, 0x00000777), + RegisterOperation::Write(0x00000004, 0x00010111), + RegisterOperation::Write(0x00000004, 0x00000000) +}; + +Issd issd_evk2_imx636_sequence = Issd{ + issd_evk2_imx636_init, + issd_evk2_imx636_start, + issd_evk2_imx636_stop, + issd_evk2_imx636_destroy, +}; + +} // namespace Metavision + +// clang-format on diff --git a/hal_psee_plugins/include/devices/imx636/imx636_evk2_regmap_builder.h b/hal_psee_plugins/include/devices/imx636/imx636_evk2_regmap_builder.h new file mode 100644 index 000000000..61b674568 --- /dev/null +++ b/hal_psee_plugins/include/devices/imx636/imx636_evk2_regmap_builder.h @@ -0,0 +1,23 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_IMX636_EVK2_REGMAP_BUILDER_H +#define METAVISION_HAL_IMX636_EVK2_REGMAP_BUILDER_H + +#include "utils/register_map.h" + +namespace Metavision { + +void build_imx636_evk2_register_map(RegisterMap ®map); + +} // namespace Metavision + +#endif // METAVISION_HAL_IMX636_EVK2_REGMAP_BUILDER_H diff --git a/hal_psee_plugins/include/devices/imx636/imx636_evk2_tz_device.h b/hal_psee_plugins/include/devices/imx636/imx636_evk2_tz_device.h new file mode 100644 index 000000000..4f1466beb --- /dev/null +++ b/hal_psee_plugins/include/devices/imx636/imx636_evk2_tz_device.h @@ -0,0 +1,61 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_IMX636_EVK2_TZ_DEVICE_H +#define METAVISION_HAL_IMX636_EVK2_TZ_DEVICE_H + +#include "devices/treuzell/tz_psee_video.h" +#include "devices/treuzell/tz_issd_device.h" +#include "devices/treuzell/tz_regmap_device.h" +#include "facilities/tz_monitoring.h" +#include "devices/treuzell/tz_main_device.h" +#include "devices/common/evk2_system_control.h" + +namespace Metavision { + +class TzEvk2Imx636 : public TzPseeVideo, public TzIssdDevice, public TemperatureProvider, public IlluminationProvider { +public: + TzEvk2Imx636(std::shared_ptr cmd, uint32_t dev_id, std::shared_ptr parent); + virtual ~TzEvk2Imx636(); + static std::shared_ptr build(std::shared_ptr cmd, uint32_t dev_id, + std::shared_ptr parent); + static bool can_build(std::shared_ptr, uint32_t dev_id); + + virtual void start(); + virtual void stop(); + virtual StreamFormat get_output_format(); + virtual long get_system_id(); + virtual bool set_mode_standalone(); + virtual bool set_mode_master(); + virtual bool set_mode_slave(); + virtual I_DeviceControl::SyncMode get_mode(); + virtual I_HW_Identification::SensorInfo get_sensor_info() { + return {4, 2}; + } + long long get_sensor_id(); + virtual int get_illumination(); + virtual int get_temperature(); + +protected: + virtual void spawn_facilities(DeviceBuilder &device_builder); + +private: + void temperature_init(); + void lifo_control(bool enable, bool out_en, bool cnt_en); + void iph_mirror_control(bool enable); + + Evk2SystemControl sys_ctrl_; + I_DeviceControl::SyncMode sync_mode_; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_IMX636_EVK2_TZ_DEVICE_H diff --git a/hal_psee_plugins/include/devices/imx636/imx636_evk3_issd.h b/hal_psee_plugins/include/devices/imx636/imx636_evk3_issd.h new file mode 100644 index 000000000..c533b31e1 --- /dev/null +++ b/hal_psee_plugins/include/devices/imx636/imx636_evk3_issd.h @@ -0,0 +1,177 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +// ISSD sequences generated by psee_issd_convert. +// Parameters: +// issd_csv_format_version=1.0 +// system=evk3_imx636_cd +// operator=Prophesee +// dry_run=False +// no_system=False +// strip_prefix=False +// sensor_version=None +// args=-s evk3_imx636_cd +// sensor=PseeEvk3IMX636 +// date=2021-12-17T08:54:08 +// psee_issd_version=1.2.0.182+gb2ca43260.d20210009 +// psee_sensor_lib_version=3.4.0.145+gef81c7c75.d20210025 +// issd_data_format_version=1.0 + +// clang-format off + +#include + +namespace Metavision { + +const std::vector issd_evk3_imx636_init = { + RegisterOperation::Write(0x0000001C, 0x00000001), + RegisterOperation::Delay(1000000), + RegisterOperation::Write(0x00400004, 0x00000001), + RegisterOperation::Delay(500000), + RegisterOperation::Write(0x00400004, 0x00000000), + RegisterOperation::Delay(1000000), + RegisterOperation::Write(0x0000B000, 0x00000158), + RegisterOperation::Delay(300), + RegisterOperation::Write(0x0000B044, 0x00000000), + RegisterOperation::Write(0x0000B004, 0x0000000A), + RegisterOperation::Write(0x0000B040, 0x00000000), + RegisterOperation::Write(0x0000B0C8, 0x00000000), + RegisterOperation::Write(0x0000B040, 0x00000000), + RegisterOperation::Write(0x0000B040, 0x00000000), + RegisterOperation::Write(0x00000000, 0x4F006442), + RegisterOperation::Write(0x00000000, 0x0F006442), + RegisterOperation::Write(0x000000B8, 0x00000400), + RegisterOperation::Write(0x000000B8, 0x00000400), + RegisterOperation::Write(0x0000B07C, 0x00000000), + RegisterOperation::Write(0x0000B074, 0x00000002), + RegisterOperation::Write(0x0000B078, 0x000000A0), + RegisterOperation::Write(0x000000C0, 0x00000108), + RegisterOperation::Write(0x000000C0, 0x00000208), + RegisterOperation::Write(0x0000B120, 0x00000001), + RegisterOperation::Write(0x0000E120, 0x00000000), + RegisterOperation::Write(0x0000B068, 0x00000004), + RegisterOperation::Write(0x0000B07C, 0x00000001), + RegisterOperation::Delay(10), + RegisterOperation::Write(0x0000B07C, 0x00000003), + RegisterOperation::Delay(1000), + RegisterOperation::Write(0x000000B8, 0x00000401), + RegisterOperation::Write(0x000000B8, 0x00000409), + RegisterOperation::Write(0x00000000, 0x4F006442), + RegisterOperation::Write(0x00000000, 0x4F00644A), + RegisterOperation::Write(0x0000B080, 0x00000077), + RegisterOperation::Write(0x0000B084, 0x0000000F), + RegisterOperation::Write(0x0000B088, 0x00000037), + RegisterOperation::Write(0x0000B08C, 0x00000037), + RegisterOperation::Write(0x0000B090, 0x000000DF), + RegisterOperation::Write(0x0000B094, 0x00000057), + RegisterOperation::Write(0x0000B098, 0x00000037), + RegisterOperation::Write(0x0000B09C, 0x00000067), + RegisterOperation::Write(0x0000B0A0, 0x00000037), + RegisterOperation::Write(0x0000B0A4, 0x0000002F), + RegisterOperation::Write(0x0000B0AC, 0x00000028), + RegisterOperation::Write(0x0000B0CC, 0x00000001), + RegisterOperation::Write(0x0000B000, 0x000002DC), + RegisterOperation::Write(0x0000B004, 0x0000008A), + RegisterOperation::Write(0x0000B01C, 0x00000030), + RegisterOperation::Write(0x0000B020, 0x00002000), + RegisterOperation::Write(0x0000B02C, 0x000000FF), + RegisterOperation::Write(0x0000B030, 0x00003E80), + RegisterOperation::Write(0x0000B028, 0x00000FA0), + RegisterOperation::Write(0x0000A000, 0x000B0501), + RegisterOperation::Delay(200), + RegisterOperation::Write(0x0000A008, 0x00002405), + RegisterOperation::Delay(200), + RegisterOperation::Write(0x0000A004, 0x000B0501), + RegisterOperation::Delay(200), + RegisterOperation::Write(0x0000A020, 0x00000150), + RegisterOperation::Delay(200), + RegisterOperation::Write(0x0000B040, 0x00000007), + RegisterOperation::Write(0x0000B064, 0x00000006), + RegisterOperation::Write(0x0000B040, 0x0000000F), + RegisterOperation::Delay(100), + RegisterOperation::Write(0x0000B004, 0x0000008A), + RegisterOperation::Delay(200), + RegisterOperation::Write(0x0000B0C8, 0x00000003), + RegisterOperation::Delay(200), + RegisterOperation::Write(0x0000B044, 0x00000001), + RegisterOperation::Write(0x0000B000, 0x000002DD), + RegisterOperation::Write(0x00009008, 0x00000644), + RegisterOperation::Write(0x00000004, 0xF0005042), + RegisterOperation::Write(0x00000018, 0x00000200), + RegisterOperation::Write(0x00001014, 0x11A1504D), + RegisterOperation::Write(0x00009004, 0x00000000), + RegisterOperation::Delay(1000) +}; + +const std::vector issd_evk3_imx636_start = { + RegisterOperation::Write(0x0000B000, 0x000002DD), + RegisterOperation::Write(0x00009028, 0x00000000), + RegisterOperation::WriteField(0x00009008, 0x645, 0x00000001), + + // Analog START + RegisterOperation::Write(0x0000002C, 0x0022C724), + RegisterOperation::Write(0x00000004, 0xF0005442) +}; + +const std::vector issd_evk3_imx636_stop = { + // Analog STOP + RegisterOperation::Write(0x00000004, 0xF0005042), + RegisterOperation::Write(0x0000002C, 0x0022C324), + // Digital STOP + RegisterOperation::Write(0x00009028, 0x00000002), + RegisterOperation::Delay(1000), + RegisterOperation::WriteField(0x00009008, 0x00000644, 0x00000001), + RegisterOperation::Write(0x0000B000, 0x000002DC), + RegisterOperation::Delay(300), +}; + +const std::vector issd_evk3_imx636_destroy = { + // Analog DESTROY + RegisterOperation::Write(0x00000070, 0x00400008), + RegisterOperation::Write(0x0000006C, 0x0EE47114), + RegisterOperation::Delay(500), + RegisterOperation::Write(0x0000A00C, 0x00020400), + RegisterOperation::Delay(500), + RegisterOperation::Write(0x0000A010, 0x00008068), + RegisterOperation::Delay(200), + RegisterOperation::Write(0x00001104, 0x00000000), + RegisterOperation::Delay(200), + RegisterOperation::Write(0x0000A020, 0x00000050), + RegisterOperation::Delay(200), + RegisterOperation::Write(0x0000A004, 0x000B0500), + RegisterOperation::Delay(200), + RegisterOperation::Write(0x0000A008, 0x00002404), + RegisterOperation::Delay(200), + RegisterOperation::Write(0x0000A000, 0x000B0500), + // Digital DESTROY + RegisterOperation::Write(0x0000B044, 0x00000000), + RegisterOperation::Write(0x0000B004, 0x0000000A), + RegisterOperation::Write(0x0000B040, 0x0000000E), + RegisterOperation::Write(0x0000B0C8, 0x00000000), + RegisterOperation::Write(0x0000B040, 0x00000006), + RegisterOperation::Write(0x0000B040, 0x00000004), + RegisterOperation::Write(0x00000000, 0x4F006442), + RegisterOperation::Write(0x00000000, 0x0F006442), + RegisterOperation::Write(0x000000B8, 0x00000401), + RegisterOperation::Write(0x000000B8, 0x00000400), + RegisterOperation::Write(0x0000B07C, 0x00000000) +}; + +Issd issd_evk3_imx636_sequence = Issd{ + issd_evk3_imx636_init, + issd_evk3_imx636_start, + issd_evk3_imx636_stop, + issd_evk3_imx636_destroy, +}; + +} // namespace Metavision + +// clang-format on diff --git a/hal_psee_plugins/include/devices/imx636/imx636_evk3_regmap_builder.h b/hal_psee_plugins/include/devices/imx636/imx636_evk3_regmap_builder.h new file mode 100644 index 000000000..60add5bf4 --- /dev/null +++ b/hal_psee_plugins/include/devices/imx636/imx636_evk3_regmap_builder.h @@ -0,0 +1,23 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_IMX636_EVK3_REGMAP_BUILDER_H +#define METAVISION_HAL_IMX636_EVK3_REGMAP_BUILDER_H + +#include "utils/register_map.h" + +namespace Metavision { + +void build_imx636_evk3_register_map(RegisterMap ®map); + +} // namespace Metavision + +#endif // METAVISION_HAL_IMX636_EVK3_REGMAP_BUILDER_H diff --git a/hal_psee_plugins/include/devices/imx636/imx636_ll_biases.h b/hal_psee_plugins/include/devices/imx636/imx636_ll_biases.h new file mode 100644 index 000000000..2586b5674 --- /dev/null +++ b/hal_psee_plugins/include/devices/imx636/imx636_ll_biases.h @@ -0,0 +1,42 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_IMX636_LL_BIASES_H +#define METAVISION_HAL_IMX636_LL_BIASES_H + +#include +#include + +#include "metavision/hal/facilities/i_ll_biases.h" + +namespace Metavision { + +class I_HW_Register; + +class Imx636_LL_Biases : public I_LL_Biases { +public: + Imx636_LL_Biases(const std::shared_ptr &i_hw_register, const std::string &sensor_prefix); + + virtual bool set(const std::string &bias_name, int bias_value) override; + virtual int get(const std::string &bias_name) override; + virtual std::map get_all_biases() override; + +protected: + const std::shared_ptr &get_hw_register() const; + +private: + std::shared_ptr i_hw_register_; + std::string base_name_; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_IMX636_LL_BIASES_H diff --git a/hal_psee_plugins/include/devices/imx636/imx636_tz_device.h b/hal_psee_plugins/include/devices/imx636/imx636_tz_device.h new file mode 100644 index 000000000..a3811ec0b --- /dev/null +++ b/hal_psee_plugins/include/devices/imx636/imx636_tz_device.h @@ -0,0 +1,59 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_IMX636_TZ_DEVICE_H +#define METAVISION_HAL_IMX636_TZ_DEVICE_H + +#include "devices/treuzell/tz_issd_device.h" +#include "devices/treuzell/tz_regmap_device.h" +#include "facilities/tz_monitoring.h" +#include "devices/treuzell/tz_main_device.h" + +namespace Metavision { + +class Gen41Erc; + +class TzImx636 : public TzIssdDevice, public IlluminationProvider, public TemperatureProvider, public TzMainDevice { +public: + TzImx636(std::shared_ptr cmd, uint32_t dev_id, std::shared_ptr parent); + virtual ~TzImx636(); + static std::shared_ptr build(std::shared_ptr cmd, uint32_t dev_id, + std::shared_ptr parent); + + static bool can_build(std::shared_ptr, uint32_t dev_id); + virtual StreamFormat get_output_format(); + virtual long get_system_id() const; + virtual bool set_mode_standalone(); + virtual bool set_mode_master(); + virtual bool set_mode_slave(); + virtual I_DeviceControl::SyncMode get_mode(); + virtual I_HW_Identification::SensorInfo get_sensor_info() { + return {4, 2}; + } + long long get_sensor_id(); + virtual int get_temperature(); + virtual int get_illumination(); + +protected: + virtual void spawn_facilities(DeviceBuilder &device_builder); + +private: + void temperature_init(); + void time_base_config(bool external, bool master); + void lifo_control(bool enable, bool out_en, bool cnt_en); + void iph_mirror_control(bool enable); + + I_DeviceControl::SyncMode sync_mode_; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_IMX636_TZ_DEVICE_H diff --git a/hal_psee_plugins/include/devices/imx636/register_maps/imx636_evk2_registermap.h b/hal_psee_plugins/include/devices/imx636/register_maps/imx636_evk2_registermap.h new file mode 100644 index 000000000..a6df761ff --- /dev/null +++ b/hal_psee_plugins/include/devices/imx636/register_maps/imx636_evk2_registermap.h @@ -0,0 +1,5050 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_IMX636_EVK2_REGISTERMAP_H +#define METAVISION_HAL_IMX636_EVK2_REGISTERMAP_H + +#include "utils/regmap_data.h" + +RegmapData Imx636Evk2RegisterMap[] = { + // clang-format off + + {R, {"SYSTEM_CONTROL/GLOBAL_CONTROL", 0x0000}}, + {F, {"MODE", 0, 2, 0x0}}, + {F, {"FORMAT", 2, 2, 0x2}}, + {A, {"raw", 0x0}}, + {A, {"2.0", 0x2}}, + {A, {"3.0", 0x3}}, + {F, {"CCAM_ID", 4, 2, 0x0}}, + {F, {"OUTPUT_FORMAT", 6, 2, 0x2}}, + {A, {"raw", 0x0}}, + {A, {"2.0", 0x2}}, + {A, {"3.0", 0x3}}, + + {R, {"SYSTEM_CONTROL/CLK_CONTROL", 0x0004}}, + {F, {"CORE_EN", 0, 1, 0x0}}, + {F, {"CORE_SOFT_RST", 1, 1, 0x0}}, + {F, {"CORE_REG_BANK_RST", 2, 1, 0x0}}, + {F, {"SENSOR_IF_EN", 4, 1, 0x0}}, + {F, {"SENSOR_IF_SOFT_RST", 5, 1, 0x0}}, + {F, {"SENSOR_IF_REG_BANK_RST", 6, 1, 0x0}}, + {F, {"HOST_IF_EN", 8, 1, 0x0}}, + {F, {"HOST_IF_SOFT_RST", 9, 1, 0x0}}, + {F, {"HOST_IF_REG_BANK_RST", 10, 1, 0x0}}, + {F, {"GLOBAL_RST", 16, 1, 0x0}}, + + {R, {"SYSTEM_CONTROL/TIME_BASE_CONTROL", 0x0008}}, + {F, {"ENABLE", 0, 1, 0x0}}, + {F, {"EXT_SYNC_MODE", 1, 1, 0x0}}, + {F, {"EXT_SYNC_ENABLE", 2, 1, 0x0}}, + {F, {"EXT_SYNC_MASTER", 3, 1, 0x0}}, + {F, {"EXT_SYNC_MASTER_SEL", 4, 1, 0x0}}, + {F, {"ENABLE_EXT_SYNC", 5, 1, 0x0}}, + {F, {"ENABLE_CAM_SYNC", 6, 1, 0x0}}, + + {R, {"SYSTEM_CONTROL/TIME_BASE_RESOLUTION", 0x000C}}, + {F, {"CLKS", 0, 16, 0x64}}, + + {R, {"SYSTEM_CONTROL/IMU_CONTROL", 0x0010}}, + {F, {"ENABLE", 0, 1, 0x0}}, + + {R, {"SYSTEM_CONTROL/EVT_DATA_FORMATTER_CONTROL", 0x0014}}, + {F, {"ENABLE", 0, 1, 0x0}}, + {F, {"BYPASS", 1, 1, 0x0}}, + + {R, {"SYSTEM_CONTROL/EVT_MERGE_CONTROL", 0x0018}}, + {F, {"ENABLE", 0, 1, 0x0}}, + {F, {"BYPASS", 1, 1, 0x0}}, + {F, {"SOURCE", 2, 1, 0x0}}, + + {R, {"SYSTEM_CONTROL/TH_RECOVERY_CONTROL", 0x0044}}, + {F, {"ENABLE", 0, 1, 0x0}}, + {F, {"BYPASS", 1, 1, 0x0}}, + + {R, {"SYSTEM_CONTROL/TS_CHECKER_CONTROL", 0x0048}}, + {F, {"BYPASS", 0, 1, 0x0}}, + {F, {"THRESHOLD", 1, 24, 0x186A0}}, + + {R, {"SYSTEM_CONTROL/TS_CHECKER_EVT_UI_CNT", 0x004C}}, + {F, {"TIME_LOW", 0, 16, 0x0}}, + {F, {"TIME_HIGH", 16, 16, 0x0}}, + + {R, {"SYSTEM_CONTROL/TS_CHECKER_EVT_BROKEN_CNT", 0x0050}}, + {F, {"TIME_LOW", 0, 16, 0x0}}, + {F, {"TIME_HIGH", 16, 16, 0x0}}, + + {R, {"SYSTEM_CONTROL/TS_CHECKER_EVT_UK_ERR_CNT", 0x0054}}, + {F, {"TIME_LOW", 0, 16, 0x0}}, + {F, {"TIME_HIGH", 16, 16, 0x0}}, + + {R, {"SYSTEM_CONTROL/BOARD_CONTROL_STATUS", 0x0058}}, + {F, {"ENET_PWDN", 0, 1, 0x0}}, + {F, {"PAV_15W", 1, 1, 0x0}}, + {F, {"PAV_4P5W", 2, 1, 0x0}}, + {F, {"PAV_7P5W", 3, 1, 0x0}}, + {F, {"USB_EN_READ_PAV", 4, 1, 0x0}}, + {F, {"USB3_EN_REF_CLK", 5, 1, 0x1}}, + {F, {"USBCC_MUX_EN_N", 6, 1, 0x0}}, + {F, {"VMON_ALERT", 7, 1, 0x0}}, + {F, {"VMON_I2C_EN_LVLSHFT", 8, 1, 0x0}}, + {F, {"VERSION", 10, 2, 0x0}}, + {F, {"USB2PHY_RESETB", 12, 1, 0x1}}, + {F, {"ENET_RESET_N", 13, 1, 0x0}}, + {F, {"LDO_2V5_1V0_EN", 14, 1, 0x0}}, + {F, {"VMON_PU_TO_1V8", 15, 1, 0x0}}, + {F, {"USB_C_OUT1", 16, 1, 0x0}}, + {F, {"USB_C_OUT2", 17, 1, 0x0}}, + + {R, {"SYSTEM_CONTROL/IO_CONTROL", 0x005C}}, + {F, {"SYNC_IN", 0, 1, 0x0}}, + {F, {"TRIG_IN", 1, 1, 0x0}}, + {F, {"SYNC_OUT_EN_FLT_CHK", 4, 1, 0x0}}, + {F, {"SYNC_OUT_EN_HSIDE", 5, 1, 0x0}}, + {F, {"SYNC_OUT_FAULT_ALERT", 6, 1, 0x0}}, + {F, {"SYNC_OUT", 7, 1, 0x0}}, + {F, {"SYNC_OUT_MODE", 8, 4, 0x0}}, + + {R, {"SYSTEM_CONTROL/OUT_TH_RECOVERY_CONTROL", 0x0060}}, + {F, {"ENABLE", 0, 1, 0x1}}, + {F, {"BYPASS", 1, 1, 0x1}}, + + {R, {"SYSTEM_CONTROL/OUT_TS_CHECKER_CONTROL", 0x0064}}, + {F, {"BYPASS", 0, 1, 0x1}}, + {F, {"THRESHOLD", 1, 24, 0x186A0}}, + + {R, {"SYSTEM_CONTROL/OUT_TS_CHECKER_EVT_UI_CNT", 0x0068}}, + {F, {"TIME_LOW", 0, 16, 0x0}}, + {F, {"TIME_HIGH", 16, 16, 0x0}}, + + {R, {"SYSTEM_CONTROL/OUT_TS_CHECKER_EVT_BROKEN_CNT", 0x006C}}, + {F, {"TIME_LOW", 0, 16, 0x0}}, + {F, {"TIME_HIGH", 16, 16, 0x0}}, + + {R, {"SYSTEM_CONTROL/OUT_TS_CHECKER_EVT_UK_ERR_CNT", 0x0070}}, + {F, {"TIME_LOW", 0, 16, 0x0}}, + {F, {"TIME_HIGH", 16, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/TEMP", 0x0200}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VCC_INT", 0x0202}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VCC_AUX", 0x0204}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VP_VN", 0x0206}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VREFP", 0x0208}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VREFN", 0x020A}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VCC_BRAM", 0x020C}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/SUPPLY_OFFSET", 0x0210}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/OFFSET", 0x0212}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/GAIN_ERROR", 0x0214}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VAUX0", 0x0220}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VAUX1", 0x0222}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VAUX2", 0x0224}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VAUX3", 0x0226}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VAUX4", 0x0228}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VAUX5", 0x022A}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VAUX6", 0x022C}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VAUX7", 0x022E}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VAUX8", 0x0230}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VAUX9", 0x0232}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VAUX10", 0x0234}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VAUX11", 0x0236}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VAUX12", 0x0238}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VAUX13", 0x023A}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VAUX14", 0x023C}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/VAUX15", 0x023E}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/MAX_TEMP", 0x0240}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/MAX_VCC_INT", 0x0242}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/MAX_VCC_AUX", 0x0244}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/MAX_VCC_BRAM", 0x0246}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/MIN_TEMP", 0x0248}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/MIN_VCC_INT", 0x024A}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/MIN_VCC_AUX", 0x024C}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/MIN_VCC_BRAM", 0x024E}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/FLAGS", 0x027E}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/CONF_REG0", 0x0280}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/CONF_REG1", 0x0282}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/CONF_REG2", 0x0284}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/SEQ_REG0", 0x0290}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/SEQ_REG1", 0x0292}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/SEQ_REG2", 0x0294}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/SEQ_REG3", 0x0296}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/SEQ_REG4", 0x0298}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/SEQ_REG5", 0x029A}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/SEQ_REG6", 0x029C}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/SEQ_REG7", 0x029E}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/ALARM_THR_REG0", 0x02A0}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/ALARM_THR_REG1", 0x02A2}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/ALARM_THR_REG2", 0x02A4}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/ALARM_THR_REG3", 0x02A6}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/ALARM_THR_REG4", 0x02A8}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/ALARM_THR_REG5", 0x02AA}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/ALARM_THR_REG6", 0x02AC}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/ALARM_THR_REG7", 0x02AE}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/ALARM_THR_REG8", 0x02B0}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/ALARM_THR_REG9", 0x02B2}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/ALARM_THR_REG10", 0x02B4}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/ALARM_THR_REG11", 0x02B6}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/ALARM_THR_REG12", 0x02B8}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/ALARM_THR_REG13", 0x02BA}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/ALARM_THR_REG14", 0x02BC}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR_XADC/ALARM_THR_REG15", 0x02BE}}, + {F, {"VALUE", 0, 16, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR/EVT_ENABLE", 0x0300}}, + {F, {"ALL_EVT", 0, 1, 0x0}}, + {F, {"TEMP_EVT", 1, 1, 0x0}}, + {F, {"VCC_INT_EVT", 2, 1, 0x0}}, + {F, {"VCC_AUX_EVT", 3, 1, 0x0}}, + {F, {"VCC_BRAM_EVT", 4, 1, 0x0}}, + {F, {"ALL_ALARM", 8, 1, 0x0}}, + {F, {"OVER_TEMP_ALARM", 9, 1, 0x0}}, + {F, {"USER_TEMP_ALARM", 10, 1, 0x0}}, + {F, {"VCC_INT_ALARM", 11, 1, 0x0}}, + {F, {"VCC_AUX_ALARM", 12, 1, 0x0}}, + {F, {"VCC_BRAM_ALARM", 13, 1, 0x0}}, + {F, {"SYSTEM_POWER_DOWN", 16, 1, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR/EVT_PERIOD", 0x0304}}, + {F, {"VALUE", 0, 24, 0x186A0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR/EXT_TEMP_CONTROL", 0x0308}}, + {F, {"STATUS_SYS_POWER_DOWN", 0, 1, 0x0}}, + {F, {"EXT_TEMP_MONITOR_EN", 1, 1, 0x0}}, + {F, {"EXT_TEMP_MONITOR_SPI_EN", 2, 1, 0x0}}, + {F, {"REMOTE_TEMP_MONITOR_EN", 3, 1, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR/EVK_EXT_TEMP_VALUE", 0x030C}}, + {F, {"VALUE", 0, 22, 0x0}}, + + {R, {"SYSTEM_MONITOR/TEMP_VCC_MONITOR/REMOTE_TEMP_ADDR", 0x0310}}, + {F, {"VALUE", 0, 24, 0x2030C}}, + + {R, {"SYSTEM_MONITOR/ATIS_IF_MONITOR/CFG_ENABLE", 0x0340}}, + {F, {"ALL_EVT", 0, 1, 0x0}}, + {F, {"TD_IDLE_TIME_EVT", 1, 1, 0x0}}, + {F, {"TD_IDLE_TIMEOUT_EVT", 2, 1, 0x0}}, + {F, {"APS_IDLE_TIME_EVT", 3, 1, 0x0}}, + {F, {"APS_IDLE_TIMEOUT_EVT", 4, 1, 0x0}}, + {F, {"GLOBAL_ILLUMINATION_EVT", 5, 1, 0x0}}, + {F, {"EM_TRIGGER_SEQ_EVT", 6, 1, 0x0}}, + {F, {"REFRACTORY_CLOCK_EVT", 7, 1, 0x0}}, + + {R, {"SYSTEM_MONITOR/ATIS_IF_MONITOR/CFG_IDLE_TIME_THR", 0x0344}}, + {F, {"VALUE", 0, 26, 0x2710}}, + + {R, {"SYSTEM_MONITOR/ATIS_IF_MONITOR/CFG_IDLE_TIMEOUT_THR", 0x0348}}, + {F, {"VALUE", 0, 26, 0x2710}}, + + {R, {"SYSTEM_MONITOR/ATIS_IF_MONITOR/STAT_GLOBAL_ILLUMINATION", 0x034C}}, + {F, {"DATA", 0, 26, 0x0}}, + {F, {"VALID", 31, 1, 0x0}}, + + {R, {"SYSTEM_MONITOR/ATIS_IF_MONITOR/STAT_REFRACTORY_CLOCK", 0x0350}}, + {F, {"DATA", 0, 24, 0x0}}, + + {R, {"SYSTEM_MONITOR/EXT_TRIGGERS/ENABLE", 0x0360}}, + {F, {"TRIGGER_0", 0, 1, 0x0}}, + {F, {"TRIGGER_1", 1, 1, 0x0}}, + {F, {"TRIGGER_2", 2, 1, 0x0}}, + {F, {"TRIGGER_3", 3, 1, 0x0}}, + {F, {"TRIGGER_4", 4, 1, 0x0}}, + + {R, {"SYSTEM_MONITOR/EXT_TRIGGERS/OUT_ENABLE", 0x0364}}, + {F, {"VALUE", 0, 1, 0x0}}, + + {R, {"SYSTEM_MONITOR/EXT_TRIGGERS/OUT_PULSE_PERIOD", 0x0368}}, + {F, {"", 0, 32, 0x64}}, + + {R, {"SYSTEM_MONITOR/EXT_TRIGGERS/OUT_PULSE_WIDTH", 0x036C}}, + {F, {"", 0, 32, 0x1}}, + + {R, {"SYSTEM_MONITOR/EXT_TRIGGERS/OUT_REGISTER_MODE", 0x0370}}, + {F, {"ENABLE", 0, 1, 0x0}}, + {F, {"VALUE", 1, 1, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/WHO_AM_I", 0x0400}}, + {F, {"VALUE", 0, 8, 0xEA}}, + + {R, {"SYSTEM_MONITOR/IMU/GYRO_SMPLRT_DIV", 0x0400}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/I2C_MST_ODR_CONFIG", 0x0400}}, + {F, {"I2C_MST_ODR_CONFIG", 0, 4, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/GYRO_CONFIG_1", 0x0404}}, + {F, {"GYRO_FCHOICE", 0, 1, 0x1}}, + {F, {"GYRO_FS_SEL", 1, 2, 0x0}}, + {F, {"GYRO_DLPFCFG", 3, 3, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/I2C_MST_CTRL", 0x0404}}, + {F, {"I2C_MST_CLK", 0, 4, 0x0}}, + {F, {"I2C_MST_P_NSR", 4, 1, 0x0}}, + {F, {"MULT_MST_EN", 7, 1, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/SELF_TEST_X_GYRO", 0x0408}}, + {F, {"XG_ST_DATA", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/GYRO_CONFIG_2", 0x0408}}, + {F, {"GYRO_AVGCFG", 0, 3, 0x0}}, + {F, {"ZGYRO_CTEN", 3, 1, 0x0}}, + {F, {"YGYRO_CTEN", 4, 1, 0x0}}, + {F, {"XGYRO_CTEN", 5, 1, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/I2C_MST_DELAY_CTRL", 0x0408}}, + {F, {"I2C_SLV0_DELAY_EN", 0, 1, 0x0}}, + {F, {"I2C_SLV1_DELAY_EN", 1, 1, 0x0}}, + {F, {"I2C_SLV2_DELAY_EN", 2, 1, 0x0}}, + {F, {"I2C_SLV3_DELAY_EN", 3, 1, 0x0}}, + {F, {"I2C_SLV4_DELAY_EN", 4, 1, 0x0}}, + {F, {"DELAY_ES_SHADOW", 7, 1, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/USER_CTRL", 0x040C}}, + {F, {"I2C_MST_RST", 1, 1, 0x0}}, + {F, {"SRAM_RST", 2, 1, 0x0}}, + {F, {"DMP_RST", 3, 1, 0x0}}, + {F, {"I2C_IF_DIS", 4, 1, 0x0}}, + {F, {"I2C_MST_EN", 5, 1, 0x0}}, + {F, {"FIFO_EN", 6, 1, 0x0}}, + {F, {"DMP_EN", 7, 1, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/SELF_TEST_Y_GYRO", 0x040C}}, + {F, {"YG_ST_DATA", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/XG_OFFS_USRH", 0x040C}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/I2C_SLV0_ADDR", 0x040C}}, + {F, {"I2C_ID_0", 0, 7, 0x0}}, + {F, {"I2C_SLV0_RNW", 7, 1, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/SELF_TEST_Z_GYRO", 0x0410}}, + {F, {"ZG_ST_DATA", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/XG_OFFS_USRL", 0x0410}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/I2C_SLV0_REG", 0x0410}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/LP_CONFIG", 0x0414}}, + {F, {"GYRO_CYCLE", 4, 1, 0x0}}, + {F, {"ACCEL_CYCLE", 5, 1, 0x0}}, + {F, {"I2C_MST_CYCLE", 6, 1, 0x1}}, + + {R, {"SYSTEM_MONITOR/IMU/YG_OFFS_USRH", 0x0414}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/I2C_SLV0_CTRL", 0x0414}}, + {F, {"I2C_SLV0_LENG", 0, 4, 0x0}}, + {F, {"I2C_SLV0_GRP", 4, 1, 0x0}}, + {F, {"I2C_SLV0_REG_DIS", 5, 1, 0x0}}, + {F, {"I2C_SLV0_BYTE_SW", 6, 1, 0x0}}, + {F, {"I2C_SLV0_EN", 7, 1, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/PWR_MGMT_1", 0x0418}}, + {F, {"CLKSEL", 0, 3, 0x0}}, + {F, {"TEMP_DIS", 3, 1, 0x0}}, + {F, {"LP_EN", 5, 1, 0x0}}, + {F, {"SLEEP", 6, 1, 0x0}}, + {F, {"DEVICE_RESET", 7, 1, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/YG_OFFS_USRL", 0x0418}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/I2C_SLV0_DO", 0x0418}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/PWR_MGMT_2", 0x041C}}, + {F, {"DISABLE_GYRO", 0, 3, 0x6}}, + {F, {"DISABLE_ACCEL", 3, 3, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/ZG_OFFS_USRH", 0x041C}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/I2C_SLV1_ADDR", 0x041C}}, + {F, {"I2C_ID_1", 0, 7, 0x0}}, + {F, {"I2C_SLV1_RNW", 7, 1, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/ZG_OFFS_USRL", 0x0420}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/I2C_SLV1_REG", 0x0420}}, + {F, {"I2C_SLV1_REG", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/ODR_ALIGN_EN", 0x0424}}, + {F, {"ODR_ALIGN_EN", 0, 1, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/I2C_SLV1_CTRL", 0x0424}}, + {F, {"I2C_SLV1_LENG", 0, 4, 0x0}}, + {F, {"I2C_SLV1_GRP", 4, 1, 0x0}}, + {F, {"I2C_SLV1_REG_DIS", 5, 1, 0x0}}, + {F, {"I2C_SLV1_BYTE_SW", 6, 1, 0x0}}, + {F, {"I2C_SLV1_EN", 7, 1, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/I2C_SLV1_DO", 0x0428}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/I2C_SLV2_ADDR", 0x042C}}, + {F, {"I2C_ID_2", 0, 7, 0x0}}, + {F, {"I2C_SLV2_RNW", 7, 1, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/I2C_SLV2_REG", 0x0430}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/I2C_SLV2_CTRL", 0x0434}}, + {F, {"I2C_SLV2_LENG", 0, 4, 0x0}}, + {F, {"I2C_SLV2_GRP", 4, 1, 0x0}}, + {F, {"I2C_SLV2_REG_DIS", 5, 1, 0x0}}, + {F, {"I2C_SLV2_BYTE_SW", 6, 1, 0x0}}, + {F, {"I2C_SLV2_EN", 7, 1, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/SELF_TEST_X_ACCEL", 0x0438}}, + {F, {"XA_ST_DATA", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/I2C_SLV2_DO", 0x0438}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/INT_PIN_CFG", 0x043C}}, + {F, {"BYPASS_EN", 1, 1, 0x0}}, + {F, {"FSYNC_INT_MODE_EN", 2, 1, 0x0}}, + {F, {"ACTL_FSYNC", 3, 1, 0x0}}, + {F, {"INT_ANYRD_2CLEAR", 4, 1, 0x0}}, + {F, {"INT1_LATCH_INT_EN", 5, 1, 0x0}}, + {F, {"INT1_OPEN", 6, 1, 0x0}}, + {F, {"INT1_ACTL", 7, 1, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/SELF_TEST_Y_ACCEL", 0x043C}}, + {F, {"YA_ST_DATA", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/I2C_SLV3_ADDR", 0x043C}}, + {F, {"I2C_ID_3", 0, 7, 0x0}}, + {F, {"I2C_SLV3_RNW", 7, 1, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/INT_ENABLE", 0x0440}}, + {F, {"I2C_MST_INT_EN", 0, 1, 0x0}}, + {F, {"DMP_INT1_EN", 1, 1, 0x0}}, + {F, {"PLL_RDY_EN", 2, 1, 0x0}}, + {F, {"WOM_INT_EN", 3, 1, 0x0}}, + {F, {"REG_WOF_EN", 7, 1, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/SELF_TEST_Z_ACCEL", 0x0440}}, + {F, {"ZA_ST_DATA", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/ACCEL_SMPLRT_DIV_1", 0x0440}}, + {F, {"VALUE", 0, 4, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/I2C_SLV3_REG", 0x0440}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/INT_ENABLE_1", 0x0444}}, + {F, {"RAW_DATA_0_RDY_EN", 0, 1, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/ACCEL_SMPLRT_DIV_2", 0x0444}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/I2C_SLV3_CTRL", 0x0444}}, + {F, {"I2C_SLV3_LENG", 0, 4, 0x0}}, + {F, {"I2C_SLV3_GRP", 4, 1, 0x0}}, + {F, {"I2C_SLV3_REG_DIS", 5, 1, 0x0}}, + {F, {"I2C_SLV3_BYTE_SW", 6, 1, 0x0}}, + {F, {"I2C_SLV3_EN", 7, 1, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/INT_ENABLE_2", 0x0448}}, + {F, {"FIFO_OVERFLOW_EN", 0, 5, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/ACCEL_INTEL_CTRL", 0x0448}}, + {F, {"ACCEL_INTEL_MODE_INT", 0, 1, 0x0}}, + {F, {"ACCEL_INTEL_EN", 1, 1, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/I2C_SLV3_DO", 0x0448}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/INT_ENABLE_3", 0x044C}}, + {F, {"FIFO_WM_EN", 0, 5, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/ACCEL_WOM_THR", 0x044C}}, + {F, {"WOM_THRESHOLD", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/I2C_SLV4_ADDR", 0x044C}}, + {F, {"I2C_ID_4", 0, 7, 0x0}}, + {F, {"I2C_SLV4_RNW", 7, 1, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/XA_OFFS_H", 0x0450}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/ACCEL_CONFIG", 0x0450}}, + {F, {"ACCEL_FCHOICE", 0, 1, 0x1}}, + {F, {"ACCEL_FS_SEL", 1, 2, 0x0}}, + {F, {"ACCEL_DLPFCFG", 3, 3, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/I2C_SLV4_REG", 0x0450}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/XA_OFFS_L", 0x0454}}, + {F, {"VALUE", 1, 7, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/ACCEL_CONFIG_2", 0x0454}}, + {F, {"DEC3_CFG", 0, 2, 0x0}}, + {F, {"AZ_ST_EN_REG", 2, 1, 0x0}}, + {F, {"AY_ST_EN_REG", 3, 1, 0x0}}, + {F, {"AX_ST_EN_REG", 4, 1, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/I2C_SLV4_CTRL", 0x0454}}, + {F, {"I2C_SLV4_DLY", 0, 5, 0x0}}, + {F, {"I2C_SLV4_REG_DIS", 5, 1, 0x0}}, + {F, {"I2C_SLV4_BYTE_SW", 6, 1, 0x0}}, + {F, {"I2C_SLV4_EN", 7, 1, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/I2C_SLV4_DO", 0x0458}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/I2C_MST_STATUS", 0x045C}}, + {F, {"I2C_SLV0_NACK", 0, 1, 0x0}}, + {F, {"I2C_SLV1_NACK", 1, 1, 0x0}}, + {F, {"I2C_SLV2_NACK", 2, 1, 0x0}}, + {F, {"I2C_SLV3_NACK", 3, 1, 0x0}}, + {F, {"I2C_SLV4_NACK", 4, 1, 0x0}}, + {F, {"I2C_LOST_ARB", 5, 1, 0x0}}, + {F, {"I2C_SLV4_DONE", 6, 1, 0x0}}, + {F, {"PASS_THROUGH", 7, 1, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/YA_OFFS_H", 0x045C}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/I2C_SLV4_DI", 0x045C}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/YA_OFFS_L", 0x0460}}, + {F, {"VALUE", 1, 7, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/INT_STATUS", 0x0464}}, + {F, {"I2C_MST_INT", 0, 1, 0x0}}, + {F, {"DMP_INT1", 1, 1, 0x0}}, + {F, {"PLL_RDY_INT", 2, 1, 0x0}}, + {F, {"WOM_INT", 3, 1, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/INT_STATUS_1", 0x0468}}, + {F, {"RAW_DATA_0_RDY_INT", 0, 1, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/ZA_OFFS_H", 0x0468}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/INT_STATUS_2", 0x046C}}, + {F, {"FIFO_OVERFLOW_INT", 0, 5, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/ZA_OFFS_L", 0x046C}}, + {F, {"VALUE", 1, 7, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/INT_STATUS_3", 0x0470}}, + {F, {"FIFO_WM_INT", 0, 5, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/DELAY_TIMEH", 0x04A0}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/TIMEBASE_CORRECTION_PLL", 0x04A0}}, + {F, {"TBC_PLL", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/DELAY_TIMEL", 0x04A4}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/ACCEL_XOUT_H", 0x04B4}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/ACCEL_XOUT_L", 0x04B8}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/ACCEL_YOUT_H", 0x04BC}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/ACCEL_YOUT_L", 0x04C0}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/ACCEL_ZOUT_H", 0x04C4}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/ACCEL_ZOUT_L", 0x04C8}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/GYRO_XOUT_H", 0x04CC}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/GYRO_XOUT_L", 0x04D0}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/GYRO_YOUT_H", 0x04D4}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/GYRO_YOUT_L", 0x04D8}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/GYRO_ZOUT_H", 0x04DC}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/GYRO_ZOUT_L", 0x04E0}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/TEMP_OUT_H", 0x04E4}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/TEMP_OUT_L", 0x04E8}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/EXT_SLV_SENS_DATA_00", 0x04EC}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/EXT_SLV_SENS_DATA_01", 0x04F0}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/EXT_SLV_SENS_DATA_02", 0x04F4}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/EXT_SLV_SENS_DATA_03", 0x04F8}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/EXT_SLV_SENS_DATA_04", 0x04FC}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/EXT_SLV_SENS_DATA_05", 0x0500}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/EXT_SLV_SENS_DATA_06", 0x0504}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/EXT_SLV_SENS_DATA_07", 0x0508}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/EXT_SLV_SENS_DATA_08", 0x050C}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/EXT_SLV_SENS_DATA_09", 0x0510}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/EXT_SLV_SENS_DATA_10", 0x0514}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/EXT_SLV_SENS_DATA_11", 0x0518}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/EXT_SLV_SENS_DATA_12", 0x051C}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/EXT_SLV_SENS_DATA_13", 0x0520}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/EXT_SLV_SENS_DATA_14", 0x0524}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/EXT_SLV_SENS_DATA_15", 0x0528}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/EXT_SLV_SENS_DATA_16", 0x052C}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/EXT_SLV_SENS_DATA_17", 0x0530}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/EXT_SLV_SENS_DATA_18", 0x0534}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/EXT_SLV_SENS_DATA_19", 0x0538}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/EXT_SLV_SENS_DATA_20", 0x053C}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/EXT_SLV_SENS_DATA_21", 0x0540}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/EXT_SLV_SENS_DATA_22", 0x0544}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/EXT_SLV_SENS_DATA_23", 0x0548}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/FSYNC_CONFIG", 0x0548}}, + {F, {"EXT_SYNC_SET", 0, 4, 0x0}}, + {F, {"WOF_EDGE_INT", 4, 1, 0x0}}, + {F, {"WOF_DEGLITCH_EN", 5, 1, 0x0}}, + {F, {"DELAY_TIME_EN", 7, 1, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/TEMP_CONFIG", 0x054C}}, + {F, {"TEMP_DLPFCFG", 0, 3, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/MOD_CTRL_USR", 0x0550}}, + {F, {"REG_LP_DMP_EN", 0, 1, 0x1}}, + + {R, {"SYSTEM_MONITOR/IMU/FIFO_EN_1", 0x0598}}, + {F, {"SLV_0_FIFO_EN", 0, 1, 0x0}}, + {F, {"SLV_1_FIFO_EN", 1, 1, 0x0}}, + {F, {"SLV_2_FIFO_EN", 2, 1, 0x0}}, + {F, {"SLV_3_FIFO_EN", 3, 1, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/FIFO_EN_2", 0x059C}}, + {F, {"TEMP_FIFO_EN", 0, 1, 0x0}}, + {F, {"GYRO_X_FIFO_EN", 1, 1, 0x0}}, + {F, {"GYRO_Y_FIFO_EN", 2, 1, 0x0}}, + {F, {"GYRO_Z_FIFO_EN", 3, 1, 0x0}}, + {F, {"ACCEL_FIFO_EN", 4, 1, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/FIFO_RST", 0x05A0}}, + {F, {"FIFO_RESET", 0, 5, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/FIFO_MODE", 0x05A4}}, + {F, {"FIFO_MODE", 0, 5, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/FIFO_COUNTH", 0x05C0}}, + {F, {"FIFO_CNT", 0, 5, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/FIFO_COUNTL", 0x05C4}}, + {F, {"FIFO_CNT", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/FIFO_R_W", 0x05C8}}, + {F, {"VALUE", 0, 8, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/DATA_RDY_STATUS", 0x05D0}}, + {F, {"RAW_DATA_RDY", 0, 4, 0x0}}, + {F, {"WOF_STATUS", 7, 1, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/FIFO_CFG", 0x05D8}}, + {F, {"FIFO_CFG", 0, 1, 0x0}}, + + {R, {"SYSTEM_MONITOR/IMU/REG_BANK_SEL", 0x05FC}}, + {F, {"USER_BANK", 4, 2, 0x0}}, + + {R, {"SYSTEM_MONITOR/CONTROL/EVT_MERGE_CONTROL", 0x0600}}, + {F, {"ENABLE", 0, 1, 0x1}}, + {F, {"BYPASS", 1, 1, 0x0}}, + {F, {"SOURCE", 2, 2, 0x0}}, + + {R, {"SYSTEM_CONFIG/ID", 0x0800}}, + {F, {"VALUE", 0, 8, 0x32}}, + + {R, {"SYSTEM_CONFIG/VERSION", 0x0804}}, + {F, {"MICRO", 0, 8, 0x0}}, + {F, {"MINOR", 8, 8, 0x0}}, + {F, {"MAJOR", 16, 8, 0x0}}, + + {R, {"SYSTEM_CONFIG/BUILD_DATE", 0x0808}}, + {F, {"VALUE", 0, 32, 0x0}}, + + {R, {"SYSTEM_CONFIG/VERSION_CONTROL_ID", 0x080C}}, + {F, {"VALUE", 0, 32, 0x0}}, + + {R, {"PS_HOST_IF/AXI_DMA_PACKETIZER/CONTROL", 0x2000}}, + {F, {"BYPASS", 0, 1, 0x0}}, + {F, {"ENABLE_COUNTER_PATTERN", 1, 1, 0x0}}, + + {R, {"PS_HOST_IF/AXI_DMA_PACKETIZER/PACKET_LENGTH", 0x2004}}, + {F, {"VALUE", 0, 32, 0x400}}, + + {R, {"PS_HOST_IF/AXIL_BRIDGE/CONTROL", 0x2100}}, + {F, {"BUS_ERROR_EN", 0, 1, 0x0}}, + + {R, {"PS_HOST_IF/AXIL_BRIDGE/ERROR_STATUS", 0x2104}}, + {F, {"CODE", 0, 16, 0x0}}, + {F, {"COUNT", 16, 16, 0x0}}, + + {R, {"SENSOR_IF/IMX636/roi_ctrl", 0x100004}}, + {F, {"roi_td_en", 1, 1, 0x0}}, + {F, {"roi_td_shadow_trigger", 5, 1, 0x0}}, + {F, {"td_roi_roni_n_en", 6, 1, 0x1}}, + {F, {"Reserved_8", 8, 1, 0x0}}, + {F, {"px_td_rstn", 10, 1, 0x0}}, + {F, {"Reserved_17_11", 11, 7, 0xA}}, + {F, {"Reserved_25", 25, 1, 0x0}}, + {F, {"Reserved_29_28", 28, 2, 0x3}}, + {F, {"Reserved_31_30", 30, 2, 0x3}}, + + {R, {"SENSOR_IF/IMX636/lifo_ctrl", 0x10000C}}, + {F, {"lifo_en", 0, 1, 0x0}}, + {F, {"lifo_out_en", 1, 1, 0x0}}, + {F, {"lifo_cnt_en", 2, 1, 0x0}}, + {F, {"Reserved_31_3", 3, 29, 0x0}}, + + {R, {"SENSOR_IF/IMX636/lifo_status", 0x100010}}, + {F, {"lifo_ton", 0, 29, 0x0}}, + {F, {"lifo_ton_valid", 29, 1, 0x0}}, + {F, {"Reserved_30", 30, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/Reserved_0014", 0x100014}}, + {F, {"Reserved_31_0", 0, 32, 0xA0401806}}, + + {R, {"SENSOR_IF/IMX636/spare0", 0x100018}}, + {F, {"Reserved_19_0", 0, 20, 0x0}}, + {F, {"gcd_rstn", 20, 1, 0x0}}, + {F, {"Reserved_31_21", 21, 11, 0x0}}, + + {R, {"SENSOR_IF/IMX636/refractory_ctrl", 0x100020}}, + {F, {"refr_counter", 0, 28, 0x0}}, + {F, {"refr_valid", 28, 1, 0x0}}, + {F, {"Reserved_29", 29, 1, 0x0}}, + {F, {"refr_cnt_en", 30, 1, 0x0}}, + {F, {"refr_en", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/roi_win_ctrl", 0x100034}}, + {F, {"roi_master_en", 0, 1, 0x0}}, + {F, {"roi_win_done", 1, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/roi_win_start_addr", 0x100038}}, + {F, {"roi_win_start_x", 0, 11, 0x0}}, + {F, {"roi_win_start_y", 16, 10, 0x0}}, + + {R, {"SENSOR_IF/IMX636/roi_win_end_addr", 0x10003C}}, + {F, {"roi_win_end_x", 0, 11, 0x4FF}}, + {F, {"roi_win_end_y", 16, 10, 0x2CF}}, + + {R, {"SENSOR_IF/IMX636/dig_pad2_ctrl", 0x100044}}, + {F, {"Reserved_15_0", 0, 16, 0xFCCF}}, + {F, {"pad_sync", 16, 4, 0xF}}, + {F, {"Reserved_31_20", 20, 12, 0xCCF}}, + + {R, {"SENSOR_IF/IMX636/adc_control", 0x10004C}}, + {F, {"adc_en", 0, 1, 0x0}}, + {F, {"adc_clk_en", 1, 1, 0x0}}, + {F, {"adc_start", 2, 1, 0x0}}, + {F, {"Reserved_31_3", 3, 29, 0xEC8}}, + + {R, {"SENSOR_IF/IMX636/adc_status", 0x100050}}, + {F, {"adc_dac_dyn", 0, 10, 0x0}}, + {F, {"Reserved_10", 10, 1, 0x0}}, + {F, {"adc_done_dyn", 11, 1, 0x0}}, + {F, {"Reserved_31_12", 12, 20, 0x0}}, + + {R, {"SENSOR_IF/IMX636/adc_misc_ctrl", 0x100054}}, + {F, {"Reserved_0", 0, 1, 0x0}}, + {F, {"adc_buf_cal_en", 1, 1, 0x0}}, + {F, {"Reserved_9_2", 2, 8, 0x84}}, + {F, {"adc_rng", 10, 2, 0x0}}, + {F, {"adc_temp", 12, 1, 0x0}}, + {F, {"Reserved_14_13", 13, 2, 0x0}}, + + {R, {"SENSOR_IF/IMX636/temp_ctrl", 0x10005C}}, + {F, {"temp_buf_cal_en", 0, 1, 0x0}}, + {F, {"temp_buf_en", 1, 1, 0x0}}, + {F, {"Reserved_31_2", 2, 30, 0x20}}, + + {R, {"SENSOR_IF/IMX636/iph_mirr_ctrl", 0x100074}}, + {F, {"iph_mirr_en", 0, 1, 0x0}}, + {F, {"iph_mirr_amp_en", 1, 1, 0x0}}, + {F, {"Reserved_31_2", 2, 30, 0x0}}, + + {R, {"SENSOR_IF/IMX636/gcd_ctrl1", 0x100078}}, + {F, {"gcd_en", 0, 1, 0x0}}, + {F, {"gcd_diffamp_en", 1, 1, 0x0}}, + {F, {"gcd_lpf_en", 2, 1, 0x0}}, + {F, {"Reserved_31_3", 3, 29, 0x8003BE9}}, + + {R, {"SENSOR_IF/IMX636/gcd_shadow_ctrl", 0x100090}}, + {F, {"Reserved_0", 0, 1, 0x0}}, + {F, {"gcd_irq_sw_override", 1, 1, 0x0}}, + {F, {"gcd_reset_on_copy", 2, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/gcd_shadow_status", 0x100094}}, + {F, {"gcd_shadow_valid", 0, 1, 0x0}}, + {F, {"Reserved_31_1", 1, 31, 0x0}}, + + {R, {"SENSOR_IF/IMX636/gcd_shadow_counter", 0x100098}}, + {F, {"gcd_shadow_cnt_off", 0, 16, 0x0}}, + {F, {"gcd_shadow_cnt_on", 16, 16, 0x0}}, + + {R, {"SENSOR_IF/IMX636/stop_sequence_control", 0x1000C8}}, + {F, {"stop_sequence_start", 0, 1, 0x0}}, + {F, {"Reserved_15_8", 8, 8, 0x1}}, + + {R, {"SENSOR_IF/IMX636/bias/bias_fo", 0x101004}}, + {F, {"idac_ctl", 0, 8, 0x0}}, + {F, {"Reserved_27_8", 8, 20, 0x3A1E8}}, + {F, {"single_transfer", 28, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/bias/bias_hpf", 0x10100C}}, + {F, {"idac_ctl", 0, 8, 0x0}}, + {F, {"Reserved_27_8", 8, 20, 0x3A1FF}}, + {F, {"single_transfer", 28, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/bias/bias_diff_on", 0x101010}}, + {F, {"idac_ctl", 0, 8, 0x0}}, + {F, {"Reserved_27_8", 8, 20, 0x1A163}}, + {F, {"single_transfer", 28, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/bias/bias_diff", 0x101014}}, + {F, {"idac_ctl", 0, 8, 0x4D}}, + {F, {"Reserved_27_8", 8, 20, 0x1A150}}, + {F, {"single_transfer", 28, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/bias/bias_diff_off", 0x101018}}, + {F, {"idac_ctl", 0, 8, 0x0}}, + {F, {"Reserved_27_8", 8, 20, 0x1A137}}, + {F, {"single_transfer", 28, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/bias/bias_refr", 0x101020}}, + {F, {"idac_ctl", 0, 8, 0x14}}, + {F, {"Reserved_27_8", 8, 20, 0x38296}}, + {F, {"single_transfer", 28, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/bias/bgen_ctrl", 0x101100}}, + {F, {"burst_transfer", 0, 1, 0x0}}, + {F, {"Reserved_1", 1, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/roi/td_roi_x00", 0x102000}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/IMX636/roi/td_roi_x01", 0x102004}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/IMX636/roi/td_roi_x02", 0x102008}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/IMX636/roi/td_roi_x03", 0x10200C}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/IMX636/roi/td_roi_x04", 0x102010}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/IMX636/roi/td_roi_x05", 0x102014}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/IMX636/roi/td_roi_x06", 0x102018}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/IMX636/roi/td_roi_x07", 0x10201C}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/IMX636/roi/td_roi_x08", 0x102020}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/IMX636/roi/td_roi_x09", 0x102024}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/IMX636/roi/td_roi_x10", 0x102028}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/IMX636/roi/td_roi_x11", 0x10202C}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/IMX636/roi/td_roi_x12", 0x102030}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/IMX636/roi/td_roi_x13", 0x102034}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/IMX636/roi/td_roi_x14", 0x102038}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/IMX636/roi/td_roi_x15", 0x10203C}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/IMX636/roi/td_roi_x16", 0x102040}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/IMX636/roi/td_roi_x17", 0x102044}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/IMX636/roi/td_roi_x18", 0x102048}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/IMX636/roi/td_roi_x19", 0x10204C}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/IMX636/roi/td_roi_x20", 0x102050}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/IMX636/roi/td_roi_x21", 0x102054}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/IMX636/roi/td_roi_x22", 0x102058}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/IMX636/roi/td_roi_x23", 0x10205C}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/IMX636/roi/td_roi_x24", 0x102060}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/IMX636/roi/td_roi_x25", 0x102064}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/IMX636/roi/td_roi_x26", 0x102068}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/IMX636/roi/td_roi_x27", 0x10206C}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/IMX636/roi/td_roi_x28", 0x102070}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/IMX636/roi/td_roi_x29", 0x102074}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/IMX636/roi/td_roi_x30", 0x102078}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/IMX636/roi/td_roi_x31", 0x10207C}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/IMX636/roi/td_roi_x32", 0x102080}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/IMX636/roi/td_roi_x33", 0x102084}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/IMX636/roi/td_roi_x34", 0x102088}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/IMX636/roi/td_roi_x35", 0x10208C}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/IMX636/roi/td_roi_x36", 0x102090}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/IMX636/roi/td_roi_x37", 0x102094}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/IMX636/roi/td_roi_x38", 0x102098}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/IMX636/roi/td_roi_x39", 0x10209C}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/IMX636/roi/td_roi_y00", 0x104000}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/IMX636/roi/td_roi_y01", 0x104004}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/IMX636/roi/td_roi_y02", 0x104008}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/IMX636/roi/td_roi_y03", 0x10400C}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/IMX636/roi/td_roi_y04", 0x104010}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/IMX636/roi/td_roi_y05", 0x104014}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/IMX636/roi/td_roi_y06", 0x104018}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/IMX636/roi/td_roi_y07", 0x10401C}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/IMX636/roi/td_roi_y08", 0x104020}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/IMX636/roi/td_roi_y09", 0x104024}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/IMX636/roi/td_roi_y10", 0x104028}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/IMX636/roi/td_roi_y11", 0x10402C}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/IMX636/roi/td_roi_y12", 0x104030}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/IMX636/roi/td_roi_y13", 0x104034}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/IMX636/roi/td_roi_y14", 0x104038}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/IMX636/roi/td_roi_y15", 0x10403C}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/IMX636/roi/td_roi_y16", 0x104040}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/IMX636/roi/td_roi_y17", 0x104044}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/IMX636/roi/td_roi_y18", 0x104048}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/IMX636/roi/td_roi_y19", 0x10404C}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/IMX636/roi/td_roi_y20", 0x104050}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/IMX636/roi/td_roi_y21", 0x104054}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"SENSOR_IF/IMX636/roi/td_roi_y22", 0x104058}}, + {F, {"effective", 0, 16, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFF}}, + {F, {"Reserved_16", 16, 1, 0x1}}, + {F, {"Reserved_17", 17, 1, 0x1}}, + {F, {"Reserved_19_18", 18, 2, 0x3}}, + {F, {"Reserved_21_20", 20, 2, 0x3}}, + {F, {"Reserved_22", 22, 1, 0x1}}, + {F, {"Reserved_23", 23, 1, 0x1}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6000", 0x106000}}, + {F, {"Reserved_0", 0, 1, 0x0}}, + {F, {"Reserved_1", 1, 1, 0x0}}, + {F, {"Reserved_2", 2, 1, 0x0}}, + {F, {"Reserved_3", 3, 1, 0x0}}, + {F, {"Reserved_4", 4, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/in_drop_rate_control", 0x106004}}, + {F, {"cfg_event_delay_fifo_en", 0, 1, 0x0}}, + {F, {"Reserved_1", 1, 1, 0x0}}, + {F, {"Reserved_10_2", 2, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/reference_period", 0x106008}}, + {F, {"erc_reference_period", 0, 10, 0x80}}, + + {R, {"SENSOR_IF/IMX636/erc/td_target_event_rate", 0x10600C}}, + {F, {"target_event_rate", 0, 22, 0x80}}, + + {R, {"SENSOR_IF/IMX636/erc/erc_enable", 0x106028}}, + {F, {"erc_en", 0, 1, 0x0}}, + {F, {"Reserved_1", 1, 1, 0x0}}, + {F, {"Reserved_2", 2, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_602C", 0x10602C}}, + {F, {"Reserved_0", 0, 1, 0x0}}, + {F, {"Reserved_1", 1, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_dropping_control", 0x106050}}, + {F, {"t_dropping_en", 0, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/h_dropping_control", 0x106060}}, + {F, {"h_dropping_en", 0, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/v_dropping_control", 0x106070}}, + {F, {"v_dropping_en", 0, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/h_drop_lut_00", 0x106080}}, + {F, {"hlut00", 0, 5, 0x0}}, + {F, {"hlut01", 8, 5, 0x0}}, + {F, {"hlut02", 16, 5, 0x0}}, + {F, {"hlut03", 24, 5, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/h_drop_lut_01", 0x106084}}, + {F, {"hlut04", 0, 5, 0x0}}, + {F, {"hlut05", 8, 5, 0x0}}, + {F, {"hlut06", 16, 5, 0x0}}, + {F, {"hlut07", 24, 5, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/h_drop_lut_02", 0x106088}}, + {F, {"hlut08", 0, 5, 0x0}}, + {F, {"hlut09", 8, 5, 0x0}}, + {F, {"hlut10", 16, 5, 0x0}}, + {F, {"hlut11", 24, 5, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/h_drop_lut_03", 0x10608C}}, + {F, {"hlut12", 0, 5, 0x0}}, + {F, {"hlut13", 8, 5, 0x0}}, + {F, {"hlut14", 16, 5, 0x0}}, + {F, {"hlut15", 24, 5, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/h_drop_lut_04", 0x106090}}, + {F, {"hlut16", 0, 5, 0x0}}, + {F, {"hlut17", 8, 5, 0x0}}, + {F, {"hlut18", 16, 5, 0x0}}, + {F, {"hlut19", 24, 5, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/h_drop_lut_05", 0x106094}}, + {F, {"hlut20", 0, 5, 0x0}}, + {F, {"hlut21", 8, 5, 0x0}}, + {F, {"hlut22", 16, 5, 0x0}}, + {F, {"hlut23", 24, 5, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/h_drop_lut_06", 0x106098}}, + {F, {"hlut24", 0, 5, 0x0}}, + {F, {"hlut25", 8, 5, 0x0}}, + {F, {"hlut26", 16, 5, 0x0}}, + {F, {"hlut27", 24, 5, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/h_drop_lut_07", 0x10609C}}, + {F, {"hlut28", 0, 5, 0x0}}, + {F, {"hlut29", 8, 5, 0x0}}, + {F, {"hlut30", 16, 5, 0x0}}, + {F, {"hlut31", 24, 5, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/v_drop_lut_00", 0x1060C0}}, + {F, {"vlut00", 0, 5, 0x0}}, + {F, {"vlut01", 8, 5, 0x0}}, + {F, {"vlut02", 16, 5, 0x0}}, + {F, {"vlut03", 24, 5, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/v_drop_lut_01", 0x1060C4}}, + {F, {"vlut04", 0, 5, 0x0}}, + {F, {"vlut05", 8, 5, 0x0}}, + {F, {"vlut06", 16, 5, 0x0}}, + {F, {"vlut07", 24, 5, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/v_drop_lut_02", 0x1060C8}}, + {F, {"vlut08", 0, 5, 0x0}}, + {F, {"vlut09", 8, 5, 0x0}}, + {F, {"vlut10", 16, 5, 0x0}}, + {F, {"vlut11", 24, 5, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/v_drop_lut_03", 0x1060CC}}, + {F, {"vlut12", 0, 5, 0x0}}, + {F, {"vlut13", 8, 5, 0x0}}, + {F, {"vlut14", 16, 5, 0x0}}, + {F, {"vlut15", 24, 5, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/v_drop_lut_04", 0x1060D0}}, + {F, {"vlut16", 0, 5, 0x0}}, + {F, {"vlut17", 8, 5, 0x0}}, + {F, {"vlut18", 16, 5, 0x0}}, + {F, {"vlut19", 24, 5, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/v_drop_lut_05", 0x1060D4}}, + {F, {"vlut20", 0, 5, 0x0}}, + {F, {"vlut21", 8, 5, 0x0}}, + {F, {"vlut22", 16, 5, 0x0}}, + {F, {"vlut23", 24, 5, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/v_drop_lut_06", 0x1060D8}}, + {F, {"vlut24", 0, 5, 0x0}}, + {F, {"vlut25", 8, 5, 0x0}}, + {F, {"vlut26", 16, 5, 0x0}}, + {F, {"vlut27", 24, 5, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/v_drop_lut_07", 0x1060DC}}, + {F, {"vlut28", 0, 5, 0x0}}, + {F, {"vlut29", 8, 5, 0x0}}, + {F, {"vlut30", 16, 5, 0x0}}, + {F, {"vlut31", 24, 5, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_00", 0x106400}}, + {F, {"tlut000", 0, 9, 0x0}}, + {F, {"tlut001", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_01", 0x106404}}, + {F, {"tlut002", 0, 9, 0x0}}, + {F, {"tlut003", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_02", 0x106408}}, + {F, {"tlut004", 0, 9, 0x0}}, + {F, {"tlut005", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_03", 0x10640C}}, + {F, {"tlut006", 0, 9, 0x0}}, + {F, {"tlut007", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_04", 0x106410}}, + {F, {"tlut008", 0, 9, 0x0}}, + {F, {"tlut009", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_05", 0x106414}}, + {F, {"tlut010", 0, 9, 0x0}}, + {F, {"tlut011", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_06", 0x106418}}, + {F, {"tlut012", 0, 9, 0x0}}, + {F, {"tlut013", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_07", 0x10641C}}, + {F, {"tlut014", 0, 9, 0x0}}, + {F, {"tlut015", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_08", 0x106420}}, + {F, {"tlut016", 0, 9, 0x0}}, + {F, {"tlut017", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_09", 0x106424}}, + {F, {"tlut018", 0, 9, 0x0}}, + {F, {"tlut019", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_10", 0x106428}}, + {F, {"tlut020", 0, 9, 0x0}}, + {F, {"tlut021", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_11", 0x10642C}}, + {F, {"tlut022", 0, 9, 0x0}}, + {F, {"tlut023", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_12", 0x106430}}, + {F, {"tlut024", 0, 9, 0x0}}, + {F, {"tlut025", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_13", 0x106434}}, + {F, {"tlut026", 0, 9, 0x0}}, + {F, {"tlut027", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_14", 0x106438}}, + {F, {"tlut028", 0, 9, 0x0}}, + {F, {"tlut029", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_15", 0x10643C}}, + {F, {"tlut030", 0, 9, 0x0}}, + {F, {"tlut031", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_16", 0x106440}}, + {F, {"tlut032", 0, 9, 0x0}}, + {F, {"tlut033", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_17", 0x106444}}, + {F, {"tlut034", 0, 9, 0x0}}, + {F, {"tlut035", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_18", 0x106448}}, + {F, {"tlut036", 0, 9, 0x0}}, + {F, {"tlut037", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_19", 0x10644C}}, + {F, {"tlut038", 0, 9, 0x0}}, + {F, {"tlut039", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_20", 0x106450}}, + {F, {"tlut040", 0, 9, 0x0}}, + {F, {"tlut041", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_21", 0x106454}}, + {F, {"tlut042", 0, 9, 0x0}}, + {F, {"tlut043", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_22", 0x106458}}, + {F, {"tlut044", 0, 9, 0x0}}, + {F, {"tlut045", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_23", 0x10645C}}, + {F, {"tlut046", 0, 9, 0x0}}, + {F, {"tlut047", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_24", 0x106460}}, + {F, {"tlut048", 0, 9, 0x0}}, + {F, {"tlut049", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_25", 0x106464}}, + {F, {"tlut050", 0, 9, 0x0}}, + {F, {"tlut051", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_26", 0x106468}}, + {F, {"tlut052", 0, 9, 0x0}}, + {F, {"tlut053", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_27", 0x10646C}}, + {F, {"tlut054", 0, 9, 0x0}}, + {F, {"tlut055", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_28", 0x106470}}, + {F, {"tlut056", 0, 9, 0x0}}, + {F, {"tlut057", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_29", 0x106474}}, + {F, {"tlut058", 0, 9, 0x0}}, + {F, {"tlut059", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_30", 0x106478}}, + {F, {"tlut060", 0, 9, 0x0}}, + {F, {"tlut061", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_31", 0x10647C}}, + {F, {"tlut062", 0, 9, 0x0}}, + {F, {"tlut063", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_32", 0x106480}}, + {F, {"tlut064", 0, 9, 0x0}}, + {F, {"tlut065", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_33", 0x106484}}, + {F, {"tlut066", 0, 9, 0x0}}, + {F, {"tlut067", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_34", 0x106488}}, + {F, {"tlut068", 0, 9, 0x0}}, + {F, {"tlut069", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_35", 0x10648C}}, + {F, {"tlut070", 0, 9, 0x0}}, + {F, {"tlut071", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_36", 0x106490}}, + {F, {"tlut072", 0, 9, 0x0}}, + {F, {"tlut073", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_37", 0x106494}}, + {F, {"tlut074", 0, 9, 0x0}}, + {F, {"tlut075", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_38", 0x106498}}, + {F, {"tlut076", 0, 9, 0x0}}, + {F, {"tlut077", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_39", 0x10649C}}, + {F, {"tlut078", 0, 9, 0x0}}, + {F, {"tlut079", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_40", 0x1064A0}}, + {F, {"tlut080", 0, 9, 0x0}}, + {F, {"tlut081", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_41", 0x1064A4}}, + {F, {"tlut082", 0, 9, 0x0}}, + {F, {"tlut083", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_42", 0x1064A8}}, + {F, {"tlut084", 0, 9, 0x0}}, + {F, {"tlut085", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_43", 0x1064AC}}, + {F, {"tlut086", 0, 9, 0x0}}, + {F, {"tlut087", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_44", 0x1064B0}}, + {F, {"tlut088", 0, 9, 0x0}}, + {F, {"tlut089", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_45", 0x1064B4}}, + {F, {"tlut090", 0, 9, 0x0}}, + {F, {"tlut091", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_46", 0x1064B8}}, + {F, {"tlut092", 0, 9, 0x0}}, + {F, {"tlut093", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_47", 0x1064BC}}, + {F, {"tlut094", 0, 9, 0x0}}, + {F, {"tlut095", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_48", 0x1064C0}}, + {F, {"tlut096", 0, 9, 0x0}}, + {F, {"tlut097", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_49", 0x1064C4}}, + {F, {"tlut098", 0, 9, 0x0}}, + {F, {"tlut099", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_50", 0x1064C8}}, + {F, {"tlut100", 0, 9, 0x0}}, + {F, {"tlut101", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_51", 0x1064CC}}, + {F, {"tlut102", 0, 9, 0x0}}, + {F, {"tlut103", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_52", 0x1064D0}}, + {F, {"tlut104", 0, 9, 0x0}}, + {F, {"tlut105", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_53", 0x1064D4}}, + {F, {"tlut106", 0, 9, 0x0}}, + {F, {"tlut107", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_54", 0x1064D8}}, + {F, {"tlut108", 0, 9, 0x0}}, + {F, {"tlut109", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_55", 0x1064DC}}, + {F, {"tlut110", 0, 9, 0x0}}, + {F, {"tlut111", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_56", 0x1064E0}}, + {F, {"tlut112", 0, 9, 0x0}}, + {F, {"tlut113", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_57", 0x1064E4}}, + {F, {"tlut114", 0, 9, 0x0}}, + {F, {"tlut115", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_58", 0x1064E8}}, + {F, {"tlut116", 0, 9, 0x0}}, + {F, {"tlut117", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_59", 0x1064EC}}, + {F, {"tlut118", 0, 9, 0x0}}, + {F, {"tlut119", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_60", 0x1064F0}}, + {F, {"tlut120", 0, 9, 0x0}}, + {F, {"tlut121", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_61", 0x1064F4}}, + {F, {"tlut122", 0, 9, 0x0}}, + {F, {"tlut123", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_62", 0x1064F8}}, + {F, {"tlut124", 0, 9, 0x0}}, + {F, {"tlut125", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_63", 0x1064FC}}, + {F, {"tlut126", 0, 9, 0x0}}, + {F, {"tlut127", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_64", 0x106500}}, + {F, {"tlut128", 0, 9, 0x0}}, + {F, {"tlut129", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_65", 0x106504}}, + {F, {"tlut130", 0, 9, 0x0}}, + {F, {"tlut131", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_66", 0x106508}}, + {F, {"tlut132", 0, 9, 0x0}}, + {F, {"tlut133", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_67", 0x10650C}}, + {F, {"tlut134", 0, 9, 0x0}}, + {F, {"tlut135", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_68", 0x106510}}, + {F, {"tlut136", 0, 9, 0x0}}, + {F, {"tlut137", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_69", 0x106514}}, + {F, {"tlut138", 0, 9, 0x0}}, + {F, {"tlut139", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_70", 0x106518}}, + {F, {"tlut140", 0, 9, 0x0}}, + {F, {"tlut141", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_71", 0x10651C}}, + {F, {"tlut142", 0, 9, 0x0}}, + {F, {"tlut143", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_72", 0x106520}}, + {F, {"tlut144", 0, 9, 0x0}}, + {F, {"tlut145", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_73", 0x106524}}, + {F, {"tlut146", 0, 9, 0x0}}, + {F, {"tlut147", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_74", 0x106528}}, + {F, {"tlut148", 0, 9, 0x0}}, + {F, {"tlut149", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_75", 0x10652C}}, + {F, {"tlut150", 0, 9, 0x0}}, + {F, {"tlut151", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_76", 0x106530}}, + {F, {"tlut152", 0, 9, 0x0}}, + {F, {"tlut153", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_77", 0x106534}}, + {F, {"tlut154", 0, 9, 0x0}}, + {F, {"tlut155", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_78", 0x106538}}, + {F, {"tlut156", 0, 9, 0x0}}, + {F, {"tlut157", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_79", 0x10653C}}, + {F, {"tlut158", 0, 9, 0x0}}, + {F, {"tlut159", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_80", 0x106540}}, + {F, {"tlut160", 0, 9, 0x0}}, + {F, {"tlut161", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_81", 0x106544}}, + {F, {"tlut162", 0, 9, 0x0}}, + {F, {"tlut163", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_82", 0x106548}}, + {F, {"tlut164", 0, 9, 0x0}}, + {F, {"tlut165", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_83", 0x10654C}}, + {F, {"tlut166", 0, 9, 0x0}}, + {F, {"tlut167", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_84", 0x106550}}, + {F, {"tlut168", 0, 9, 0x0}}, + {F, {"tlut169", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_85", 0x106554}}, + {F, {"tlut170", 0, 9, 0x0}}, + {F, {"tlut171", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_86", 0x106558}}, + {F, {"tlut172", 0, 9, 0x0}}, + {F, {"tlut173", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_87", 0x10655C}}, + {F, {"tlut174", 0, 9, 0x0}}, + {F, {"tlut175", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_88", 0x106560}}, + {F, {"tlut176", 0, 9, 0x0}}, + {F, {"tlut177", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_89", 0x106564}}, + {F, {"tlut178", 0, 9, 0x0}}, + {F, {"tlut179", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_90", 0x106568}}, + {F, {"tlut180", 0, 9, 0x0}}, + {F, {"tlut181", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_91", 0x10656C}}, + {F, {"tlut182", 0, 9, 0x0}}, + {F, {"tlut183", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_92", 0x106570}}, + {F, {"tlut184", 0, 9, 0x0}}, + {F, {"tlut185", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_93", 0x106574}}, + {F, {"tlut186", 0, 9, 0x0}}, + {F, {"tlut187", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_94", 0x106578}}, + {F, {"tlut188", 0, 9, 0x0}}, + {F, {"tlut189", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_95", 0x10657C}}, + {F, {"tlut190", 0, 9, 0x0}}, + {F, {"tlut191", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_96", 0x106580}}, + {F, {"tlut192", 0, 9, 0x0}}, + {F, {"tlut193", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_97", 0x106584}}, + {F, {"tlut194", 0, 9, 0x0}}, + {F, {"tlut195", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_98", 0x106588}}, + {F, {"tlut196", 0, 9, 0x0}}, + {F, {"tlut197", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_99", 0x10658C}}, + {F, {"tlut198", 0, 9, 0x0}}, + {F, {"tlut199", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_100", 0x106590}}, + {F, {"tlut200", 0, 9, 0x0}}, + {F, {"tlut201", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_101", 0x106594}}, + {F, {"tlut202", 0, 9, 0x0}}, + {F, {"tlut203", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_102", 0x106598}}, + {F, {"tlut204", 0, 9, 0x0}}, + {F, {"tlut205", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_103", 0x10659C}}, + {F, {"tlut206", 0, 9, 0x0}}, + {F, {"tlut207", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_104", 0x1065A0}}, + {F, {"tlut208", 0, 9, 0x0}}, + {F, {"tlut209", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_105", 0x1065A4}}, + {F, {"tlut210", 0, 9, 0x0}}, + {F, {"tlut211", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_106", 0x1065A8}}, + {F, {"tlut212", 0, 9, 0x0}}, + {F, {"tlut213", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_107", 0x1065AC}}, + {F, {"tlut214", 0, 9, 0x0}}, + {F, {"tlut215", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_108", 0x1065B0}}, + {F, {"tlut216", 0, 9, 0x0}}, + {F, {"tlut217", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_109", 0x1065B4}}, + {F, {"tlut218", 0, 9, 0x0}}, + {F, {"tlut219", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_110", 0x1065B8}}, + {F, {"tlut220", 0, 9, 0x0}}, + {F, {"tlut221", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_111", 0x1065BC}}, + {F, {"tlut222", 0, 9, 0x0}}, + {F, {"tlut223", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_112", 0x1065C0}}, + {F, {"tlut224", 0, 9, 0x0}}, + {F, {"tlut225", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_113", 0x1065C4}}, + {F, {"tlut226", 0, 9, 0x0}}, + {F, {"tlut227", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_114", 0x1065C8}}, + {F, {"tlut228", 0, 9, 0x0}}, + {F, {"tlut229", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_115", 0x1065CC}}, + {F, {"tlut230", 0, 9, 0x0}}, + {F, {"tlut231", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_116", 0x1065D0}}, + {F, {"tlut232", 0, 9, 0x0}}, + {F, {"tlut233", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_117", 0x1065D4}}, + {F, {"tlut234", 0, 9, 0x0}}, + {F, {"tlut235", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_118", 0x1065D8}}, + {F, {"tlut236", 0, 9, 0x0}}, + {F, {"tlut237", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_119", 0x1065DC}}, + {F, {"tlut238", 0, 9, 0x0}}, + {F, {"tlut239", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_120", 0x1065E0}}, + {F, {"tlut240", 0, 9, 0x0}}, + {F, {"tlut241", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_121", 0x1065E4}}, + {F, {"tlut242", 0, 9, 0x0}}, + {F, {"tlut243", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_122", 0x1065E8}}, + {F, {"tlut244", 0, 9, 0x0}}, + {F, {"tlut245", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_123", 0x1065EC}}, + {F, {"tlut246", 0, 9, 0x0}}, + {F, {"tlut247", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_124", 0x1065F0}}, + {F, {"tlut248", 0, 9, 0x0}}, + {F, {"tlut249", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_125", 0x1065F4}}, + {F, {"tlut250", 0, 9, 0x0}}, + {F, {"tlut251", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_126", 0x1065F8}}, + {F, {"tlut252", 0, 9, 0x0}}, + {F, {"tlut253", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_127", 0x1065FC}}, + {F, {"tlut254", 0, 9, 0x0}}, + {F, {"tlut255", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_128", 0x106600}}, + {F, {"tlut256", 0, 9, 0x0}}, + {F, {"tlut257", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_129", 0x106604}}, + {F, {"tlut258", 0, 9, 0x0}}, + {F, {"tlut259", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_130", 0x106608}}, + {F, {"tlut260", 0, 9, 0x0}}, + {F, {"tlut261", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_131", 0x10660C}}, + {F, {"tlut262", 0, 9, 0x0}}, + {F, {"tlut263", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_132", 0x106610}}, + {F, {"tlut264", 0, 9, 0x0}}, + {F, {"tlut265", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_133", 0x106614}}, + {F, {"tlut266", 0, 9, 0x0}}, + {F, {"tlut267", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_134", 0x106618}}, + {F, {"tlut268", 0, 9, 0x0}}, + {F, {"tlut269", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_135", 0x10661C}}, + {F, {"tlut270", 0, 9, 0x0}}, + {F, {"tlut271", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_136", 0x106620}}, + {F, {"tlut272", 0, 9, 0x0}}, + {F, {"tlut273", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_137", 0x106624}}, + {F, {"tlut274", 0, 9, 0x0}}, + {F, {"tlut275", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_138", 0x106628}}, + {F, {"tlut276", 0, 9, 0x0}}, + {F, {"tlut277", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_139", 0x10662C}}, + {F, {"tlut278", 0, 9, 0x0}}, + {F, {"tlut279", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_140", 0x106630}}, + {F, {"tlut280", 0, 9, 0x0}}, + {F, {"tlut281", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_141", 0x106634}}, + {F, {"tlut282", 0, 9, 0x0}}, + {F, {"tlut283", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_142", 0x106638}}, + {F, {"tlut284", 0, 9, 0x0}}, + {F, {"tlut285", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_143", 0x10663C}}, + {F, {"tlut286", 0, 9, 0x0}}, + {F, {"tlut287", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_144", 0x106640}}, + {F, {"tlut288", 0, 9, 0x0}}, + {F, {"tlut289", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_145", 0x106644}}, + {F, {"tlut290", 0, 9, 0x0}}, + {F, {"tlut291", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_146", 0x106648}}, + {F, {"tlut292", 0, 9, 0x0}}, + {F, {"tlut293", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_147", 0x10664C}}, + {F, {"tlut294", 0, 9, 0x0}}, + {F, {"tlut295", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_148", 0x106650}}, + {F, {"tlut296", 0, 9, 0x0}}, + {F, {"tlut297", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_149", 0x106654}}, + {F, {"tlut298", 0, 9, 0x0}}, + {F, {"tlut299", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_150", 0x106658}}, + {F, {"tlut300", 0, 9, 0x0}}, + {F, {"tlut301", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_151", 0x10665C}}, + {F, {"tlut302", 0, 9, 0x0}}, + {F, {"tlut303", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_152", 0x106660}}, + {F, {"tlut304", 0, 9, 0x0}}, + {F, {"tlut305", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_153", 0x106664}}, + {F, {"tlut306", 0, 9, 0x0}}, + {F, {"tlut307", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_154", 0x106668}}, + {F, {"tlut308", 0, 9, 0x0}}, + {F, {"tlut309", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_155", 0x10666C}}, + {F, {"tlut310", 0, 9, 0x0}}, + {F, {"tlut311", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_156", 0x106670}}, + {F, {"tlut312", 0, 9, 0x0}}, + {F, {"tlut313", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_157", 0x106674}}, + {F, {"tlut314", 0, 9, 0x0}}, + {F, {"tlut315", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_158", 0x106678}}, + {F, {"tlut316", 0, 9, 0x0}}, + {F, {"tlut317", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_159", 0x10667C}}, + {F, {"tlut318", 0, 9, 0x0}}, + {F, {"tlut319", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_160", 0x106680}}, + {F, {"tlut320", 0, 9, 0x0}}, + {F, {"tlut321", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_161", 0x106684}}, + {F, {"tlut322", 0, 9, 0x0}}, + {F, {"tlut323", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_162", 0x106688}}, + {F, {"tlut324", 0, 9, 0x0}}, + {F, {"tlut325", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_163", 0x10668C}}, + {F, {"tlut326", 0, 9, 0x0}}, + {F, {"tlut327", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_164", 0x106690}}, + {F, {"tlut328", 0, 9, 0x0}}, + {F, {"tlut329", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_165", 0x106694}}, + {F, {"tlut330", 0, 9, 0x0}}, + {F, {"tlut331", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_166", 0x106698}}, + {F, {"tlut332", 0, 9, 0x0}}, + {F, {"tlut333", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_167", 0x10669C}}, + {F, {"tlut334", 0, 9, 0x0}}, + {F, {"tlut335", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_168", 0x1066A0}}, + {F, {"tlut336", 0, 9, 0x0}}, + {F, {"tlut337", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_169", 0x1066A4}}, + {F, {"tlut338", 0, 9, 0x0}}, + {F, {"tlut339", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_170", 0x1066A8}}, + {F, {"tlut340", 0, 9, 0x0}}, + {F, {"tlut341", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_171", 0x1066AC}}, + {F, {"tlut342", 0, 9, 0x0}}, + {F, {"tlut343", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_172", 0x1066B0}}, + {F, {"tlut344", 0, 9, 0x0}}, + {F, {"tlut345", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_173", 0x1066B4}}, + {F, {"tlut346", 0, 9, 0x0}}, + {F, {"tlut347", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_174", 0x1066B8}}, + {F, {"tlut348", 0, 9, 0x0}}, + {F, {"tlut349", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_175", 0x1066BC}}, + {F, {"tlut350", 0, 9, 0x0}}, + {F, {"tlut351", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_176", 0x1066C0}}, + {F, {"tlut352", 0, 9, 0x0}}, + {F, {"tlut353", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_177", 0x1066C4}}, + {F, {"tlut354", 0, 9, 0x0}}, + {F, {"tlut355", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_178", 0x1066C8}}, + {F, {"tlut356", 0, 9, 0x0}}, + {F, {"tlut357", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_179", 0x1066CC}}, + {F, {"tlut358", 0, 9, 0x0}}, + {F, {"tlut359", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_180", 0x1066D0}}, + {F, {"tlut360", 0, 9, 0x0}}, + {F, {"tlut361", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_181", 0x1066D4}}, + {F, {"tlut362", 0, 9, 0x0}}, + {F, {"tlut363", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_182", 0x1066D8}}, + {F, {"tlut364", 0, 9, 0x0}}, + {F, {"tlut365", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_183", 0x1066DC}}, + {F, {"tlut366", 0, 9, 0x0}}, + {F, {"tlut367", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_184", 0x1066E0}}, + {F, {"tlut368", 0, 9, 0x0}}, + {F, {"tlut369", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_185", 0x1066E4}}, + {F, {"tlut370", 0, 9, 0x0}}, + {F, {"tlut371", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_186", 0x1066E8}}, + {F, {"tlut372", 0, 9, 0x0}}, + {F, {"tlut373", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_187", 0x1066EC}}, + {F, {"tlut374", 0, 9, 0x0}}, + {F, {"tlut375", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_188", 0x1066F0}}, + {F, {"tlut376", 0, 9, 0x0}}, + {F, {"tlut377", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_189", 0x1066F4}}, + {F, {"tlut378", 0, 9, 0x0}}, + {F, {"tlut379", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_190", 0x1066F8}}, + {F, {"tlut380", 0, 9, 0x0}}, + {F, {"tlut381", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_191", 0x1066FC}}, + {F, {"tlut382", 0, 9, 0x0}}, + {F, {"tlut383", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_192", 0x106700}}, + {F, {"tlut384", 0, 9, 0x0}}, + {F, {"tlut385", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_193", 0x106704}}, + {F, {"tlut386", 0, 9, 0x0}}, + {F, {"tlut387", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_194", 0x106708}}, + {F, {"tlut388", 0, 9, 0x0}}, + {F, {"tlut389", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_195", 0x10670C}}, + {F, {"tlut390", 0, 9, 0x0}}, + {F, {"tlut391", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_196", 0x106710}}, + {F, {"tlut392", 0, 9, 0x0}}, + {F, {"tlut393", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_197", 0x106714}}, + {F, {"tlut394", 0, 9, 0x0}}, + {F, {"tlut395", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_198", 0x106718}}, + {F, {"tlut396", 0, 9, 0x0}}, + {F, {"tlut397", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_199", 0x10671C}}, + {F, {"tlut398", 0, 9, 0x0}}, + {F, {"tlut399", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_200", 0x106720}}, + {F, {"tlut400", 0, 9, 0x0}}, + {F, {"tlut401", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_201", 0x106724}}, + {F, {"tlut402", 0, 9, 0x0}}, + {F, {"tlut403", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_202", 0x106728}}, + {F, {"tlut404", 0, 9, 0x0}}, + {F, {"tlut405", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_203", 0x10672C}}, + {F, {"tlut406", 0, 9, 0x0}}, + {F, {"tlut407", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_204", 0x106730}}, + {F, {"tlut408", 0, 9, 0x0}}, + {F, {"tlut409", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_205", 0x106734}}, + {F, {"tlut410", 0, 9, 0x0}}, + {F, {"tlut411", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_206", 0x106738}}, + {F, {"tlut412", 0, 9, 0x0}}, + {F, {"tlut413", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_207", 0x10673C}}, + {F, {"tlut414", 0, 9, 0x0}}, + {F, {"tlut415", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_208", 0x106740}}, + {F, {"tlut416", 0, 9, 0x0}}, + {F, {"tlut417", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_209", 0x106744}}, + {F, {"tlut418", 0, 9, 0x0}}, + {F, {"tlut419", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_210", 0x106748}}, + {F, {"tlut420", 0, 9, 0x0}}, + {F, {"tlut421", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_211", 0x10674C}}, + {F, {"tlut422", 0, 9, 0x0}}, + {F, {"tlut423", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_212", 0x106750}}, + {F, {"tlut424", 0, 9, 0x0}}, + {F, {"tlut425", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_213", 0x106754}}, + {F, {"tlut426", 0, 9, 0x0}}, + {F, {"tlut427", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_214", 0x106758}}, + {F, {"tlut428", 0, 9, 0x0}}, + {F, {"tlut429", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_215", 0x10675C}}, + {F, {"tlut430", 0, 9, 0x0}}, + {F, {"tlut431", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_216", 0x106760}}, + {F, {"tlut432", 0, 9, 0x0}}, + {F, {"tlut433", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_217", 0x106764}}, + {F, {"tlut434", 0, 9, 0x0}}, + {F, {"tlut435", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_218", 0x106768}}, + {F, {"tlut436", 0, 9, 0x0}}, + {F, {"tlut437", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_219", 0x10676C}}, + {F, {"tlut438", 0, 9, 0x0}}, + {F, {"tlut439", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_220", 0x106770}}, + {F, {"tlut440", 0, 9, 0x0}}, + {F, {"tlut441", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_221", 0x106774}}, + {F, {"tlut442", 0, 9, 0x0}}, + {F, {"tlut443", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_222", 0x106778}}, + {F, {"tlut444", 0, 9, 0x0}}, + {F, {"tlut445", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_223", 0x10677C}}, + {F, {"tlut446", 0, 9, 0x0}}, + {F, {"tlut447", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_224", 0x106780}}, + {F, {"tlut448", 0, 9, 0x0}}, + {F, {"tlut449", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_225", 0x106784}}, + {F, {"tlut450", 0, 9, 0x0}}, + {F, {"tlut451", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_226", 0x106788}}, + {F, {"tlut452", 0, 9, 0x0}}, + {F, {"tlut453", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_227", 0x10678C}}, + {F, {"tlut454", 0, 9, 0x0}}, + {F, {"tlut455", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_228", 0x106790}}, + {F, {"tlut456", 0, 9, 0x0}}, + {F, {"tlut457", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_229", 0x106794}}, + {F, {"tlut458", 0, 9, 0x0}}, + {F, {"tlut459", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_230", 0x106798}}, + {F, {"tlut460", 0, 9, 0x0}}, + {F, {"tlut461", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_231", 0x10679C}}, + {F, {"tlut462", 0, 9, 0x0}}, + {F, {"tlut463", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_232", 0x1067A0}}, + {F, {"tlut464", 0, 9, 0x0}}, + {F, {"tlut465", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_233", 0x1067A4}}, + {F, {"tlut466", 0, 9, 0x0}}, + {F, {"tlut467", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_234", 0x1067A8}}, + {F, {"tlut468", 0, 9, 0x0}}, + {F, {"tlut469", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_235", 0x1067AC}}, + {F, {"tlut470", 0, 9, 0x0}}, + {F, {"tlut471", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_236", 0x1067B0}}, + {F, {"tlut472", 0, 9, 0x0}}, + {F, {"tlut473", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_237", 0x1067B4}}, + {F, {"tlut474", 0, 9, 0x0}}, + {F, {"tlut475", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_238", 0x1067B8}}, + {F, {"tlut476", 0, 9, 0x0}}, + {F, {"tlut477", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_239", 0x1067BC}}, + {F, {"tlut478", 0, 9, 0x0}}, + {F, {"tlut479", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_240", 0x1067C0}}, + {F, {"tlut480", 0, 9, 0x0}}, + {F, {"tlut481", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_241", 0x1067C4}}, + {F, {"tlut482", 0, 9, 0x0}}, + {F, {"tlut483", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_242", 0x1067C8}}, + {F, {"tlut484", 0, 9, 0x0}}, + {F, {"tlut485", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_243", 0x1067CC}}, + {F, {"tlut486", 0, 9, 0x0}}, + {F, {"tlut487", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_244", 0x1067D0}}, + {F, {"tlut488", 0, 9, 0x0}}, + {F, {"tlut489", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_245", 0x1067D4}}, + {F, {"tlut490", 0, 9, 0x0}}, + {F, {"tlut491", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_246", 0x1067D8}}, + {F, {"tlut492", 0, 9, 0x0}}, + {F, {"tlut493", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_247", 0x1067DC}}, + {F, {"tlut494", 0, 9, 0x0}}, + {F, {"tlut495", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_248", 0x1067E0}}, + {F, {"tlut496", 0, 9, 0x0}}, + {F, {"tlut497", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_249", 0x1067E4}}, + {F, {"tlut498", 0, 9, 0x0}}, + {F, {"tlut499", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_250", 0x1067E8}}, + {F, {"tlut500", 0, 9, 0x0}}, + {F, {"tlut501", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_251", 0x1067EC}}, + {F, {"tlut502", 0, 9, 0x0}}, + {F, {"tlut503", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_252", 0x1067F0}}, + {F, {"tlut504", 0, 9, 0x0}}, + {F, {"tlut505", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_253", 0x1067F4}}, + {F, {"tlut506", 0, 9, 0x0}}, + {F, {"tlut507", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_254", 0x1067F8}}, + {F, {"tlut508", 0, 9, 0x0}}, + {F, {"tlut509", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/t_drop_lut_255", 0x1067FC}}, + {F, {"tlut510", 0, 9, 0x0}}, + {F, {"tlut511", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6800", 0x106800}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6804", 0x106804}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6808", 0x106808}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_680C", 0x10680C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6810", 0x106810}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6814", 0x106814}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6818", 0x106818}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_681C", 0x10681C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6820", 0x106820}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6824", 0x106824}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6828", 0x106828}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_682C", 0x10682C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6830", 0x106830}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6834", 0x106834}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6838", 0x106838}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_683C", 0x10683C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6840", 0x106840}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6844", 0x106844}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6848", 0x106848}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_684C", 0x10684C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6850", 0x106850}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6854", 0x106854}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6858", 0x106858}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_685C", 0x10685C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6860", 0x106860}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6864", 0x106864}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6868", 0x106868}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_686C", 0x10686C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6870", 0x106870}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6874", 0x106874}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6878", 0x106878}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_687C", 0x10687C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6880", 0x106880}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6884", 0x106884}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6888", 0x106888}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_688C", 0x10688C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6890", 0x106890}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6894", 0x106894}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6898", 0x106898}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_689C", 0x10689C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_68A0", 0x1068A0}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_68A4", 0x1068A4}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_68A8", 0x1068A8}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_68AC", 0x1068AC}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_68B0", 0x1068B0}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_68B4", 0x1068B4}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_68B8", 0x1068B8}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_68BC", 0x1068BC}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_68C0", 0x1068C0}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_68C4", 0x1068C4}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_68C8", 0x1068C8}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_68CC", 0x1068CC}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_68D0", 0x1068D0}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_68D4", 0x1068D4}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_68D8", 0x1068D8}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_68DC", 0x1068DC}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_68E0", 0x1068E0}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_68E4", 0x1068E4}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_68E8", 0x1068E8}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_68EC", 0x1068EC}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_68F0", 0x1068F0}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_68F4", 0x1068F4}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_68F8", 0x1068F8}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_68FC", 0x1068FC}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6900", 0x106900}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6904", 0x106904}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6908", 0x106908}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_690C", 0x10690C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6910", 0x106910}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6914", 0x106914}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6918", 0x106918}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_691C", 0x10691C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6920", 0x106920}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6924", 0x106924}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6928", 0x106928}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_692C", 0x10692C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6930", 0x106930}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6934", 0x106934}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6938", 0x106938}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_693C", 0x10693C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6940", 0x106940}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6944", 0x106944}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6948", 0x106948}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_694C", 0x10694C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6950", 0x106950}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6954", 0x106954}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6958", 0x106958}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_695C", 0x10695C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6960", 0x106960}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6964", 0x106964}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6968", 0x106968}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_696C", 0x10696C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6970", 0x106970}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6974", 0x106974}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6978", 0x106978}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_697C", 0x10697C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6980", 0x106980}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6984", 0x106984}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6988", 0x106988}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_698C", 0x10698C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6990", 0x106990}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6994", 0x106994}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6998", 0x106998}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_699C", 0x10699C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_69A0", 0x1069A0}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_69A4", 0x1069A4}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_69A8", 0x1069A8}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_69AC", 0x1069AC}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_69B0", 0x1069B0}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_69B4", 0x1069B4}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_69B8", 0x1069B8}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_69BC", 0x1069BC}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_69C0", 0x1069C0}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_69C4", 0x1069C4}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_69C8", 0x1069C8}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_69CC", 0x1069CC}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_69D0", 0x1069D0}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_69D4", 0x1069D4}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_69D8", 0x1069D8}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_69DC", 0x1069DC}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_69E0", 0x1069E0}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_69E4", 0x1069E4}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_69E8", 0x1069E8}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_69EC", 0x1069EC}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_69F0", 0x1069F0}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_69F4", 0x1069F4}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_69F8", 0x1069F8}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_69FC", 0x1069FC}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6A00", 0x106A00}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6A04", 0x106A04}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6A08", 0x106A08}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6A0C", 0x106A0C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6A10", 0x106A10}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6A14", 0x106A14}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6A18", 0x106A18}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6A1C", 0x106A1C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6A20", 0x106A20}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6A24", 0x106A24}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6A28", 0x106A28}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6A2C", 0x106A2C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6A30", 0x106A30}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6A34", 0x106A34}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6A38", 0x106A38}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6A3C", 0x106A3C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6A40", 0x106A40}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6A44", 0x106A44}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6A48", 0x106A48}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6A4C", 0x106A4C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6A50", 0x106A50}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6A54", 0x106A54}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6A58", 0x106A58}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6A5C", 0x106A5C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6A60", 0x106A60}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6A64", 0x106A64}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6A68", 0x106A68}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6A6C", 0x106A6C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6A70", 0x106A70}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6A74", 0x106A74}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6A78", 0x106A78}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6A7C", 0x106A7C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6A80", 0x106A80}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6A84", 0x106A84}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6A88", 0x106A88}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6A8C", 0x106A8C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6A90", 0x106A90}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6A94", 0x106A94}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6A98", 0x106A98}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6A9C", 0x106A9C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6AA0", 0x106AA0}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6AA4", 0x106AA4}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6AA8", 0x106AA8}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6AAC", 0x106AAC}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6AB0", 0x106AB0}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6AB4", 0x106AB4}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6AB8", 0x106AB8}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6ABC", 0x106ABC}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6AC0", 0x106AC0}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6AC4", 0x106AC4}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6AC8", 0x106AC8}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6ACC", 0x106ACC}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6AD0", 0x106AD0}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6AD4", 0x106AD4}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6AD8", 0x106AD8}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6ADC", 0x106ADC}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6AE0", 0x106AE0}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6AE4", 0x106AE4}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6AE8", 0x106AE8}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6AEC", 0x106AEC}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6AF0", 0x106AF0}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6AF4", 0x106AF4}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6AF8", 0x106AF8}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6AFC", 0x106AFC}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6B00", 0x106B00}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6B04", 0x106B04}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6B08", 0x106B08}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6B0C", 0x106B0C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6B10", 0x106B10}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6B14", 0x106B14}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6B18", 0x106B18}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6B1C", 0x106B1C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6B20", 0x106B20}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6B24", 0x106B24}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6B28", 0x106B28}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6B2C", 0x106B2C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6B30", 0x106B30}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6B34", 0x106B34}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6B38", 0x106B38}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6B3C", 0x106B3C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6B40", 0x106B40}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6B44", 0x106B44}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6B48", 0x106B48}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6B4C", 0x106B4C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6B50", 0x106B50}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6B54", 0x106B54}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6B58", 0x106B58}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6B5C", 0x106B5C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6B60", 0x106B60}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6B64", 0x106B64}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6B68", 0x106B68}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6B6C", 0x106B6C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6B70", 0x106B70}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6B74", 0x106B74}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6B78", 0x106B78}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6B7C", 0x106B7C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6B80", 0x106B80}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6B84", 0x106B84}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6B88", 0x106B88}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6B8C", 0x106B8C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6B90", 0x106B90}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/erc/Reserved_6B94", 0x106B94}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"SENSOR_IF/IMX636/edf/pipeline_control", 0x107000}}, + {F, {"Reserved_0", 0, 1, 0x1}}, + {F, {"format", 1, 1, 0x0}}, + {F, {"Reserved_2", 2, 1, 0x0}}, + {F, {"Reserved_3", 3, 1, 0x0}}, + {F, {"Reserved_4", 4, 1, 0x0}}, + {F, {"Reserved_31_16", 16, 16, 0xFFFF}}, + + {R, {"SENSOR_IF/IMX636/edf/Reserved_7004", 0x107004}}, + {F, {"Reserved_10", 10, 1, 0x1}}, + + {R, {"SENSOR_IF/IMX636/ro/readout_ctrl", 0x109000}}, + {F, {"Reserved_0", 0, 1, 0x0}}, + {F, {"ro_td_self_test_en", 1, 1, 0x0}}, + {F, {"Reserved_3", 3, 1, 0x1}}, + {F, {"Reserved_4", 4, 1, 0x0}}, + {F, {"ro_inv_pol_td", 5, 1, 0x0}}, + {F, {"Reserved_7_6", 6, 2, 0x0}}, + {F, {"Reserved_31_8", 8, 24, 0x2}}, + + {R, {"SENSOR_IF/IMX636/ro/ro_fsm_ctrl", 0x109004}}, + {F, {"readout_wait", 0, 16, 0x1E}}, + {F, {"Reserved_31_16", 16, 16, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/time_base_ctrl", 0x109008}}, + {F, {"time_base_enable", 0, 1, 0x0}}, + {F, {"time_base_mode", 1, 1, 0x0}}, + {F, {"external_mode", 2, 1, 0x0}}, + {F, {"external_mode_enable", 3, 1, 0x0}}, + {F, {"Reserved_10_4", 4, 7, 0x64}}, + + {R, {"SENSOR_IF/IMX636/ro/dig_ctrl", 0x10900C}}, + {F, {"dig_crop_enable", 0, 3, 0x0}}, + {F, {"Reserved_31_5", 5, 27, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/dig_start_pos", 0x109010}}, + {F, {"dig_crop_start_x", 0, 11, 0x0}}, + {F, {"dig_crop_start_y", 16, 10, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/dig_end_pos", 0x109014}}, + {F, {"dig_crop_end_x", 0, 11, 0x0}}, + {F, {"dig_crop_end_y", 16, 10, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/ro_ctrl", 0x109028}}, + {F, {"area_cnt_en", 0, 1, 0x0}}, + {F, {"output_disable", 1, 1, 0x0}}, + {F, {"keep_th", 2, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/area_x0_addr", 0x10902C}}, + {F, {"x0_addr", 0, 11, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/area_x1_addr", 0x109030}}, + {F, {"x1_addr", 0, 11, 0x140}}, + + {R, {"SENSOR_IF/IMX636/ro/area_x2_addr", 0x109034}}, + {F, {"x2_addr", 0, 11, 0x280}}, + + {R, {"SENSOR_IF/IMX636/ro/area_x3_addr", 0x109038}}, + {F, {"x3_addr", 0, 11, 0x3C0}}, + + {R, {"SENSOR_IF/IMX636/ro/area_x4_addr", 0x10903C}}, + {F, {"x4_addr", 0, 11, 0x500}}, + + {R, {"SENSOR_IF/IMX636/ro/area_y0_addr", 0x109040}}, + {F, {"y0_addr", 0, 11, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/area_y1_addr", 0x109044}}, + {F, {"y1_addr", 0, 11, 0xB4}}, + + {R, {"SENSOR_IF/IMX636/ro/area_y2_addr", 0x109048}}, + {F, {"y2_addr", 0, 11, 0x168}}, + + {R, {"SENSOR_IF/IMX636/ro/area_y3_addr", 0x10904C}}, + {F, {"y3_addr", 0, 11, 0x21C}}, + + {R, {"SENSOR_IF/IMX636/ro/area_y4_addr", 0x109050}}, + {F, {"y4_addr", 0, 11, 0x2D0}}, + + {R, {"SENSOR_IF/IMX636/ro/counter_ctrl", 0x109054}}, + {F, {"count_en", 0, 1, 0x0}}, + {F, {"Reserved_1", 1, 1, 0x0}}, + {F, {"Reserved_2", 2, 1, 0x1}}, + + {R, {"SENSOR_IF/IMX636/ro/counter_timer_threshold", 0x109058}}, + {F, {"timer_threshold", 0, 32, 0x3E8}}, + + {R, {"SENSOR_IF/IMX636/ro/digital_mask_pixel_00", 0x109100}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/digital_mask_pixel_01", 0x109104}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/digital_mask_pixel_02", 0x109108}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/digital_mask_pixel_03", 0x10910C}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/digital_mask_pixel_04", 0x109110}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/digital_mask_pixel_05", 0x109114}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/digital_mask_pixel_06", 0x109118}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/digital_mask_pixel_07", 0x10911C}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/digital_mask_pixel_08", 0x109120}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/digital_mask_pixel_09", 0x109124}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/digital_mask_pixel_10", 0x109128}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/digital_mask_pixel_11", 0x10912C}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/digital_mask_pixel_12", 0x109130}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/digital_mask_pixel_13", 0x109134}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/digital_mask_pixel_14", 0x109138}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/digital_mask_pixel_15", 0x10913C}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/digital_mask_pixel_16", 0x109140}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/digital_mask_pixel_17", 0x109144}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/digital_mask_pixel_18", 0x109148}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/digital_mask_pixel_19", 0x10914C}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/digital_mask_pixel_20", 0x109150}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/digital_mask_pixel_21", 0x109154}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/digital_mask_pixel_22", 0x109158}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/digital_mask_pixel_23", 0x10915C}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/digital_mask_pixel_24", 0x109160}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/digital_mask_pixel_25", 0x109164}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/digital_mask_pixel_26", 0x109168}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/digital_mask_pixel_27", 0x10916C}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/digital_mask_pixel_28", 0x109170}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/digital_mask_pixel_29", 0x109174}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/digital_mask_pixel_30", 0x109178}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/digital_mask_pixel_31", 0x10917C}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/digital_mask_pixel_32", 0x109180}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/digital_mask_pixel_33", 0x109184}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/digital_mask_pixel_34", 0x109188}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/digital_mask_pixel_35", 0x10918C}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/digital_mask_pixel_36", 0x109190}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/digital_mask_pixel_37", 0x109194}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/digital_mask_pixel_38", 0x109198}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/digital_mask_pixel_39", 0x10919C}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/digital_mask_pixel_40", 0x1091A0}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/digital_mask_pixel_41", 0x1091A4}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/digital_mask_pixel_42", 0x1091A8}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/digital_mask_pixel_43", 0x1091AC}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/digital_mask_pixel_44", 0x1091B0}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/digital_mask_pixel_45", 0x1091B4}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/digital_mask_pixel_46", 0x1091B8}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/digital_mask_pixel_47", 0x1091BC}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/digital_mask_pixel_48", 0x1091C0}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/digital_mask_pixel_49", 0x1091C4}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/digital_mask_pixel_50", 0x1091C8}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/digital_mask_pixel_51", 0x1091CC}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/digital_mask_pixel_52", 0x1091D0}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/digital_mask_pixel_53", 0x1091D4}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/digital_mask_pixel_54", 0x1091D8}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/digital_mask_pixel_55", 0x1091DC}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/digital_mask_pixel_56", 0x1091E0}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/digital_mask_pixel_57", 0x1091E4}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/digital_mask_pixel_58", 0x1091E8}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/digital_mask_pixel_59", 0x1091EC}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/digital_mask_pixel_60", 0x1091F0}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/digital_mask_pixel_61", 0x1091F4}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/digital_mask_pixel_62", 0x1091F8}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/digital_mask_pixel_63", 0x1091FC}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/area_cnt00", 0x109200}}, + {F, {"area_cnt_val_00", 0, 32, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/area_cnt01", 0x109204}}, + {F, {"area_cnt_val_01", 0, 32, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/area_cnt02", 0x109208}}, + {F, {"area_cnt_val_02", 0, 32, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/area_cnt03", 0x10920C}}, + {F, {"area_cnt_val_03", 0, 32, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/area_cnt04", 0x109210}}, + {F, {"area_cnt_val_04", 0, 32, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/area_cnt05", 0x109214}}, + {F, {"area_cnt_val_05", 0, 32, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/area_cnt06", 0x109218}}, + {F, {"area_cnt_val_06", 0, 32, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/area_cnt07", 0x10921C}}, + {F, {"area_cnt_val_07", 0, 32, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/area_cnt08", 0x109220}}, + {F, {"area_cnt_val_08", 0, 32, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/area_cnt09", 0x109224}}, + {F, {"area_cnt_val_09", 0, 32, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/area_cnt10", 0x109228}}, + {F, {"area_cnt_val_10", 0, 32, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/area_cnt11", 0x10922C}}, + {F, {"area_cnt_val_11", 0, 32, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/area_cnt12", 0x109230}}, + {F, {"area_cnt_val_12", 0, 32, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/area_cnt13", 0x109234}}, + {F, {"area_cnt_val_13", 0, 32, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/area_cnt14", 0x109238}}, + {F, {"area_cnt_val_14", 0, 32, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/area_cnt15", 0x10923C}}, + {F, {"area_cnt_val_15", 0, 32, 0x0}}, + + {R, {"SENSOR_IF/IMX636/ro/evt_vector_cnt_val", 0x109244}}, + {F, {"evt_vector_cnt_val", 0, 32, 0x0}}, + + {R, {"SENSOR_IF/IMX636/mipi_csi/mipi_control", 0x10B000}}, + {F, {"mipi_csi_enable", 0, 1, 0x0}}, + {F, {"Reserved_1", 1, 1, 0x0}}, + {F, {"Reserved_2", 2, 1, 0x0}}, + {F, {"mipi_data_lane1", 3, 1, 0x1}}, + {F, {"mipi_data_lane2", 4, 1, 0x1}}, + {F, {"mipi_packet_timeout_enable", 5, 1, 0x0}}, + {F, {"line_blanking_clk_disable", 6, 1, 0x1}}, + {F, {"Reserved_7", 7, 1, 0x0}}, + {F, {"Reserved_8", 8, 1, 0x1}}, + {F, {"frame_blanking_en", 9, 1, 0x0}}, + {F, {"Reserved_31_10", 10, 22, 0x0}}, + + {R, {"SENSOR_IF/IMX636/mipi_csi/mipi_packet_size", 0x10B020}}, + {F, {"mipi_packet_size", 0, 15, 0x2000}}, + + {R, {"SENSOR_IF/IMX636/mipi_csi/mipi_packet_timeout", 0x10B024}}, + {F, {"mipi_packet_timeout", 0, 16, 0x40}}, + + {R, {"SENSOR_IF/IMX636/mipi_csi/mipi_frame_period", 0x10B028}}, + {F, {"mipi_frame_period", 4, 12, 0x7D}}, + + {R, {"SENSOR_IF/IMX636/mipi_csi/mipi_frame_blanking", 0x10B030}}, + {F, {"mipi_frame_blanking", 0, 16, 0x0}}, + + {R, {"SENSOR_IF/IMX636/afk/pipeline_control", 0x10C000}}, + {F, {"afk_en", 0, 3, 0x0}}, + + {R, {"SENSOR_IF/IMX636/afk/Reserved_C004", 0x10C004}}, + {F, {"Reserved_6", 6, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/afk/filter_period", 0x10C008}}, + {F, {"min_cutoff_period", 0, 8, 0xF}}, + {F, {"max_cutoff_period", 8, 8, 0x9C}}, + {F, {"Reserved_19_16", 16, 4, 0x8}}, + + {R, {"SENSOR_IF/IMX636/afk/invalidation", 0x10C0C0}}, + {F, {"dt_fifo_wait_time", 0, 12, 0x5A0}}, + {F, {"Reserved_23_12", 12, 12, 0x5A}}, + {F, {"Reserved_27_24", 24, 4, 0xA}}, + {F, {"Reserved_28", 28, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/afk/initialization", 0x10C0C4}}, + {F, {"afk_req_init", 0, 1, 0x0}}, + {F, {"Reserved_1", 1, 1, 0x0}}, + {F, {"afk_flag_init_done", 2, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/stc/pipeline_control", 0x10D000}}, + {F, {"stc_trail_bypass", 0, 3, 0x0}}, + + {R, {"SENSOR_IF/IMX636/stc/stc_param", 0x10D004}}, + {F, {"stc_enable", 0, 1, 0x0}}, + {F, {"stc_threshold", 1, 19, 0x2710}}, + {F, {"disable_stc_cut_trail1", 24, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/stc/trail_param", 0x10D008}}, + {F, {"trail_enable", 0, 1, 0x0}}, + {F, {"trail_threshold", 1, 19, 0x186A0}}, + + {R, {"SENSOR_IF/IMX636/stc/timestamping", 0x10D00C}}, + {F, {"prescaler", 0, 5, 0xD}}, + {F, {"multiplier", 5, 4, 0x1}}, + {F, {"Reserved_9", 9, 1, 0x1}}, + {F, {"disable_stc_cut_trail2", 16, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/stc/Reserved_D0C0", 0x10D0C0}}, + {F, {"Reserved_23_12", 12, 12, 0x118}}, + + {R, {"SENSOR_IF/IMX636/stc/initialization", 0x10D0C4}}, + {F, {"stc_req_init", 0, 1, 0x0}}, + {F, {"Reserved_1", 1, 1, 0x0}}, + {F, {"stc_flag_init_done", 2, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/slvs/slvs_control", 0x10E000}}, + {F, {"slvs_llp_enable", 0, 1, 0x0}}, + {F, {"Reserved_1", 1, 1, 0x0}}, + {F, {"Reserved_2", 2, 1, 0x1}}, + {F, {"slvs_packet_timeout_enable", 5, 1, 0x0}}, + {F, {"Reserved_8", 8, 1, 0x1}}, + {F, {"slvs_frame_blanking_en", 9, 1, 0x0}}, + + {R, {"SENSOR_IF/IMX636/slvs/slvs_packet_size", 0x10E020}}, + {F, {"slvs_packet_size", 0, 14, 0x1000}}, + + {R, {"SENSOR_IF/IMX636/slvs/slvs_packet_timeout", 0x10E024}}, + {F, {"slvs_packet_timeout", 0, 16, 0x40}}, + + {R, {"SENSOR_IF/IMX636/slvs/slvs_frame_blanking", 0x10E030}}, + {F, {"slvs_frame_blanking", 0, 16, 0x0}}, + + {R, {"SENSOR_IF/IMX636/slvs/slvs_phy_logic_ctrl_00", 0x10E150}}, + {F, {"oportsel", 0, 2, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/CORE_CONFIG", 0x700000}}, + {F, {"CORE_ENABLE", 0, 1, 0x1}}, + {F, {"SOFT_RESET", 1, 1, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/PROTOCOL_CONFIG", 0x700004}}, + {F, {"ACTIVE_LANES", 0, 2, 0x1}}, + {F, {"MAX_LANES", 3, 2, 0x1}}, + + {R, {"SENSOR_IF/MIPI_RX/CORE_STAT", 0x700010}}, + {F, {"SOFT_RESET", 0, 1, 0x0}}, + {F, {"STREAM_LINE_BUFFER_FULL", 1, 1, 0x0}}, + {F, {"SHORT_PACKET_FIFO_NOT_EMPTY", 2, 1, 0x0}}, + {F, {"SHORT_PACKET_FIFO_FULL", 3, 1, 0x0}}, + {F, {"PACKET_COUNT", 16, 16, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/GLOBAL_IRQ_ENABLE", 0x700020}}, + {F, {"", 0, 1, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/IRQ_STAT", 0x700024}}, + {F, {"VC0_ERR_FRAME_DATA", 0, 1, 0x0}}, + {F, {"VC0_ERR_FRAME_SYNC", 1, 1, 0x0}}, + {F, {"VC1_ERR_FRAME_DATA", 2, 1, 0x0}}, + {F, {"VC1_ERR_FRAME_SYNC", 3, 1, 0x0}}, + {F, {"VC2_ERR_FRAME_DATA", 4, 1, 0x0}}, + {F, {"VC2_ERR_FRAME_SYNC", 5, 1, 0x0}}, + {F, {"VC3_ERR_FRAME_DATA", 6, 1, 0x0}}, + {F, {"VC3_ERR_FRAME_SYNC", 7, 1, 0x0}}, + {F, {"ERR_ID", 8, 1, 0x0}}, + {F, {"ERR_CRC", 9, 1, 0x0}}, + {F, {"ERR_ECC_CORRECTED", 10, 1, 0x0}}, + {F, {"ERR_ECC_DOUBLE", 11, 1, 0x0}}, + {F, {"ERR_SOT_SYNC_HS", 12, 1, 0x0}}, + {F, {"ERR_SOT_HS", 13, 1, 0x0}}, + {F, {"STOP_STATE", 17, 1, 0x0}}, + {F, {"ST_LINE_BUF_FULL", 18, 1, 0x0}}, + {F, {"SHT_PKT_FIFO_N_EMPTY", 19, 1, 0x0}}, + {F, {"SHT_PKT_FIFO_FULL", 20, 1, 0x0}}, + {F, {"LANE_CONFIG_ERR", 21, 1, 0x0}}, + {F, {"WC_CORRUPTION", 22, 1, 0x0}}, + {F, {"RX_SKEWCALHS", 29, 1, 0x0}}, + {F, {"VCX FRAME ERROR", 30, 1, 0x0}}, + {F, {"FRAME_RECEIVED", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/IRQ_ENABLE", 0x700028}}, + {F, {"VC0_ERR_FRAME_DATA", 0, 1, 0x0}}, + {F, {"VC0_ERR_FRAME_SYNC", 1, 1, 0x0}}, + {F, {"VC1_ERR_FRAME_DATA", 2, 1, 0x0}}, + {F, {"VC1_ERR_FRAME_SYNC", 3, 1, 0x0}}, + {F, {"VC2_ERR_FRAME_DATA", 4, 1, 0x0}}, + {F, {"VC2_ERR_FRAME_SYNC", 5, 1, 0x0}}, + {F, {"VC3_ERR_FRAME_DATA", 6, 1, 0x0}}, + {F, {"VC3_ERR_FRAME_SYNC", 7, 1, 0x0}}, + {F, {"ERR_ID", 8, 1, 0x0}}, + {F, {"ERR_CRC", 9, 1, 0x0}}, + {F, {"ERR_ECC_CORRECTED", 10, 1, 0x0}}, + {F, {"ERR_ECC_DOUBLE", 11, 1, 0x0}}, + {F, {"ERR_SOT_SYNC_HS", 12, 1, 0x0}}, + {F, {"ERR_SOT_HS", 13, 1, 0x0}}, + {F, {"STOP_STATE", 17, 1, 0x0}}, + {F, {"ST_LINE_BUF_FULL", 18, 1, 0x0}}, + {F, {"SHT_PKT_FIFO_N_EMPTY", 19, 1, 0x0}}, + {F, {"SHT_PKT_FIFO_FULL", 20, 1, 0x0}}, + {F, {"LANE_CONFIG_ERR", 21, 1, 0x0}}, + {F, {"WC_CORRUPTION", 22, 1, 0x0}}, + {F, {"RX_SKEWCALHS", 29, 1, 0x0}}, + {F, {"FRAME_RECEIVED", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/GENERIC_SHT_PKT", 0x700030}}, + {F, {"DATA_TYPE", 0, 6, 0x0}}, + {F, {"VIRTUAL_CHANNEL", 6, 2, 0x0}}, + {F, {"DATA", 8, 16, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/VCX_FRAME_ERROR", 0x700034}}, + {F, {"FRAME_LEVEL_ERR_VC4", 0, 1, 0x0}}, + {F, {"FRAME_SYNC_ERR_VC4", 1, 1, 0x0}}, + {F, {"FRAME_LEVEL_ERR_VC5", 2, 1, 0x0}}, + {F, {"FRAME_SYNC_ERR_VC5", 3, 1, 0x0}}, + {F, {"FRAME_LEVEL_ERR_VC6", 4, 1, 0x0}}, + {F, {"FRAME_SYNC_ERR_VC6", 5, 1, 0x0}}, + {F, {"FRAME_LEVEL_ERR_VC7", 6, 1, 0x0}}, + {F, {"FRAME_SYNC_ERR_VC7", 7, 1, 0x0}}, + {F, {"FRAME_LEVEL_ERR_VC8", 8, 1, 0x0}}, + {F, {"FRAME_SYNC_ERR_VC8", 9, 1, 0x0}}, + {F, {"FRAME_LEVEL_ERR_VC9", 10, 1, 0x0}}, + {F, {"FRAME_SYNC_ERR_VC9", 11, 1, 0x0}}, + {F, {"FRAME_LEVEL_ERR_VC10", 12, 1, 0x0}}, + {F, {"FRAME_SYNC_ERR_VC10", 13, 1, 0x0}}, + {F, {"FRAME_LEVEL_ERR_VC11", 14, 1, 0x0}}, + {F, {"FRAME_SYNC_ERR_VC11", 15, 1, 0x0}}, + {F, {"FRAME_LEVEL_ERR_VC12", 16, 1, 0x0}}, + {F, {"FRAME_SYNC_ERR_VC12", 17, 1, 0x0}}, + {F, {"FRAME_LEVEL_ERR_VC13", 18, 1, 0x0}}, + {F, {"FRAME_SYNC_ERR_VC13", 19, 1, 0x0}}, + {F, {"FRAME_LEVEL_ERR_VC14", 20, 1, 0x0}}, + {F, {"FRAME_SYNC_ERR_VC14", 21, 1, 0x0}}, + {F, {"FRAME_LEVEL_ERR_VC15", 22, 1, 0x0}}, + {F, {"FRAME_SYNC_ERR_VC15", 23, 1, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/CLK_LANE_INFO", 0x70003C}}, + {F, {"RESERVED", 0, 1, 0x0}}, + {F, {"STOP_STATE", 1, 1, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/LANE0_INFO", 0x700040}}, + {F, {"SOT_SYNC_ERR", 0, 1, 0x0}}, + {F, {"SOT_ERR", 1, 1, 0x0}}, + {F, {"STOP_STATE", 5, 1, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/LANE1_INFO", 0x700044}}, + {F, {"SOT_SYNC_ERR", 0, 1, 0x0}}, + {F, {"SOT_ERR", 1, 1, 0x0}}, + {F, {"STOP_STATE", 5, 1, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/LANE2_INFO", 0x700048}}, + {F, {"SOT_SYNC_ERR", 0, 1, 0x0}}, + {F, {"SOT_ERR", 1, 1, 0x0}}, + {F, {"STOP_STATE", 5, 1, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/LANE3_INFO", 0x70004C}}, + {F, {"SOT_SYNC_ERR", 0, 1, 0x0}}, + {F, {"SOT_ERR", 1, 1, 0x0}}, + {F, {"STOP_STATE", 5, 1, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/VC0_IMAGE_INFO_1", 0x700060}}, + {F, {"BYTE_COUNT", 0, 16, 0x0}}, + {F, {"LINE_COUNT", 16, 16, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/VC0_IMAGE_INFO_2", 0x700064}}, + {F, {"DATA_TYPE", 0, 6, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/VC1_IMAGE_INFO_1", 0x700068}}, + {F, {"BYTE_COUNT", 0, 16, 0x0}}, + {F, {"LINE_COUNT", 16, 16, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/VC1_IMAGE_INFO_2", 0x70006C}}, + {F, {"DATA_TYPE", 0, 6, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/VC2_IMAGE_INFO_1", 0x700070}}, + {F, {"BYTE_COUNT", 0, 16, 0x0}}, + {F, {"LINE_COUNT", 16, 16, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/VC2_IMAGE_INFO_2", 0x700074}}, + {F, {"DATA_TYPE", 0, 6, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/VC3_IMAGE_INFO_1", 0x700078}}, + {F, {"BYTE_COUNT", 0, 16, 0x0}}, + {F, {"LINE_COUNT", 16, 16, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/VC3_IMAGE_INFO_2", 0x70007C}}, + {F, {"DATA_TYPE", 0, 6, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/VC4_IMAGE_INFO_1", 0x700080}}, + {F, {"BYTE_COUNT", 0, 16, 0x0}}, + {F, {"LINE_COUNT", 16, 16, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/VC4_IMAGE_INFO_2", 0x700084}}, + {F, {"DATA_TYPE", 0, 6, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/VC5_IMAGE_INFO_1", 0x700088}}, + {F, {"BYTE_COUNT", 0, 16, 0x0}}, + {F, {"LINE_COUNT", 16, 16, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/VC5_IMAGE_INFO_2", 0x70008C}}, + {F, {"DATA_TYPE", 0, 6, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/VC6_IMAGE_INFO_1", 0x700090}}, + {F, {"BYTE_COUNT", 0, 16, 0x0}}, + {F, {"LINE_COUNT", 16, 16, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/VC6_IMAGE_INFO_2", 0x700094}}, + {F, {"DATA_TYPE", 0, 6, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/VC7_IMAGE_INFO_1", 0x700098}}, + {F, {"BYTE_COUNT", 0, 16, 0x0}}, + {F, {"LINE_COUNT", 16, 16, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/VC7_IMAGE_INFO_2", 0x70009C}}, + {F, {"DATA_TYPE", 0, 6, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/VC8_IMAGE_INFO_1", 0x7000A0}}, + {F, {"BYTE_COUNT", 0, 16, 0x0}}, + {F, {"LINE_COUNT", 16, 16, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/VC8_IMAGE_INFO_2", 0x7000A4}}, + {F, {"DATA_TYPE", 0, 6, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/VC9_IMAGE_INFO_1", 0x7000A8}}, + {F, {"BYTE_COUNT", 0, 16, 0x0}}, + {F, {"LINE_COUNT", 16, 16, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/VC9_IMAGE_INFO_2", 0x7000AC}}, + {F, {"DATA_TYPE", 0, 6, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/VC10_IMAGE_INFO_1", 0x7000B0}}, + {F, {"BYTE_COUNT", 0, 16, 0x0}}, + {F, {"LINE_COUNT", 16, 16, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/VC10_IMAGE_INFO_2", 0x7000B4}}, + {F, {"DATA_TYPE", 0, 6, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/VC11_IMAGE_INFO_1", 0x7000B8}}, + {F, {"BYTE_COUNT", 0, 16, 0x0}}, + {F, {"LINE_COUNT", 16, 16, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/VC11_IMAGE_INFO_2", 0x7000BC}}, + {F, {"DATA_TYPE", 0, 6, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/VC12_IMAGE_INFO_1", 0x7000C0}}, + {F, {"BYTE_COUNT", 0, 16, 0x0}}, + {F, {"LINE_COUNT", 16, 16, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/VC12_IMAGE_INFO_2", 0x7000C4}}, + {F, {"DATA_TYPE", 0, 6, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/VC13_IMAGE_INFO_1", 0x7000C8}}, + {F, {"BYTE_COUNT", 0, 16, 0x0}}, + {F, {"LINE_COUNT", 16, 16, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/VC13_IMAGE_INFO_2", 0x7000CC}}, + {F, {"DATA_TYPE", 0, 6, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/VC14_IMAGE_INFO_1", 0x7000D0}}, + {F, {"BYTE_COUNT", 0, 16, 0x0}}, + {F, {"LINE_COUNT", 16, 16, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/VC14_IMAGE_INFO_2", 0x7000D4}}, + {F, {"DATA_TYPE", 0, 6, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/VC15_IMAGE_INFO_1", 0x7000D8}}, + {F, {"BYTE_COUNT", 0, 16, 0x0}}, + {F, {"LINE_COUNT", 16, 16, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/VC15_IMAGE_INFO_2", 0x7000DC}}, + {F, {"DATA_TYPE", 0, 6, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/CONTROL", 0x708000}}, + {F, {"SRST", 0, 1, 0x0}}, + {F, {"DPHY_EN", 1, 1, 0x1}}, + + {R, {"SENSOR_IF/MIPI_RX/IDELAY_TAP_VALUE", 0x708004}}, + {F, {"LANE_0", 0, 5, 0x0}}, + {F, {"LANE_1", 8, 5, 0x0}}, + {F, {"LANE_2", 16, 5, 0x0}}, + {F, {"LANE_3", 24, 5, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/INIT", 0x708008}}, + {F, {"INIT_VAL", 0, 32, 0x186A0}}, + + {R, {"SENSOR_IF/MIPI_RX/HS_TIMEOUT", 0x708010}}, + {F, {"RX_VALUE", 0, 32, 0x10005}}, + + {R, {"SENSOR_IF/MIPI_RX/ESC_TIMEOUT", 0x708014}}, + {F, {"VALUE", 0, 32, 0x6400}}, + + {R, {"SENSOR_IF/MIPI_RX/CL_STATUS", 0x708018}}, + {F, {"MODE", 0, 2, 0x0}}, + {F, {"ULPS", 2, 1, 0x0}}, + {F, {"INIT_DONE", 3, 1, 0x0}}, + {F, {"STOP_STATE", 4, 1, 0x0}}, + {F, {"ERR_CONTROL", 5, 1, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/LANE0_STATUS", 0x70801C}}, + {F, {"MODE", 0, 2, 0x0}}, + {F, {"ULPS", 2, 1, 0x0}}, + {F, {"INIT_DONE", 3, 1, 0x0}}, + {F, {"HS_ABORT", 4, 1, 0x0}}, + {F, {"ESC_ABORT", 5, 1, 0x0}}, + {F, {"STOP_STATE", 6, 1, 0x0}}, + {F, {"PKT_CNT", 16, 16, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/LANE1_STATUS", 0x708020}}, + {F, {"MODE", 0, 2, 0x0}}, + {F, {"ULPS", 2, 1, 0x0}}, + {F, {"INIT_DONE", 3, 1, 0x0}}, + {F, {"HS_ABORT", 4, 1, 0x0}}, + {F, {"ESC_ABORT", 5, 1, 0x0}}, + {F, {"STOP_STATE", 6, 1, 0x0}}, + {F, {"PKT_CNT", 16, 16, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/LANE2_STATUS", 0x708024}}, + {F, {"MODE", 0, 2, 0x0}}, + {F, {"ULPS", 2, 1, 0x0}}, + {F, {"INIT_DONE", 3, 1, 0x0}}, + {F, {"HS_ABORT", 4, 1, 0x0}}, + {F, {"ESC_ABORT", 5, 1, 0x0}}, + {F, {"STOP_STATE", 6, 1, 0x0}}, + {F, {"PKT_CNT", 16, 16, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/LANE3_STATUS", 0x708028}}, + {F, {"MODE", 0, 2, 0x0}}, + {F, {"ULPS", 2, 1, 0x0}}, + {F, {"INIT_DONE", 3, 1, 0x0}}, + {F, {"HS_ABORT", 4, 1, 0x0}}, + {F, {"ESC_ABORT", 5, 1, 0x0}}, + {F, {"STOP_STATE", 6, 1, 0x0}}, + {F, {"PKT_CNT", 16, 16, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/LANE0_HS_SETTLE", 0x708030}}, + {F, {"HS_SETTLE_NS", 0, 9, 0x8D}}, + + {R, {"SENSOR_IF/MIPI_RX/LANE1_HS_SETTLE", 0x708048}}, + {F, {"HS_SETTLE_NS", 0, 9, 0x8D}}, + + {R, {"SENSOR_IF/MIPI_RX/LANE2_HS_SETTLE", 0x70804C}}, + {F, {"HS_SETTLE_NS", 0, 9, 0x8D}}, + + {R, {"SENSOR_IF/MIPI_RX/LANE3_HS_SETTLE", 0x708050}}, + {F, {"HS_SETTLE_NS", 0, 9, 0x8D}}, + + {R, {"SENSOR_IF/MIPI_RX/LANE4_HS_SETTLE", 0x708054}}, + {F, {"HS_SETTLE_NS", 0, 9, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/LANE5_HS_SETTLE", 0x708058}}, + {F, {"HS_SETTLE_NS", 0, 9, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/LANE6_HS_SETTLE", 0x70805C}}, + {F, {"HS_SETTLE_NS", 0, 9, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/LANE7_HS_SETTLE", 0x708060}}, + {F, {"HS_SETTLE_NS", 0, 9, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/LANE4_STATUS", 0x708064}}, + {F, {"MODE", 0, 2, 0x0}}, + {F, {"ULPS", 2, 1, 0x0}}, + {F, {"INIT_DONE", 3, 1, 0x0}}, + {F, {"HS_ABORT", 4, 1, 0x0}}, + {F, {"ESC_ABORT", 5, 1, 0x0}}, + {F, {"STOP_STATE", 6, 1, 0x0}}, + {F, {"PKT_CNT", 16, 16, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/LANE5_STATUS", 0x708068}}, + {F, {"MODE", 0, 2, 0x0}}, + {F, {"ULPS", 2, 1, 0x0}}, + {F, {"INIT_DONE", 3, 1, 0x0}}, + {F, {"HS_ABORT", 4, 1, 0x0}}, + {F, {"ESC_ABORT", 5, 1, 0x0}}, + {F, {"STOP_STATE", 6, 1, 0x0}}, + {F, {"PKT_CNT", 16, 16, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/LANE6_STATUS", 0x70806C}}, + {F, {"MODE", 0, 2, 0x0}}, + {F, {"ULPS", 2, 1, 0x0}}, + {F, {"INIT_DONE", 3, 1, 0x0}}, + {F, {"HS_ABORT", 4, 1, 0x0}}, + {F, {"ESC_ABORT", 5, 1, 0x0}}, + {F, {"STOP_STATE", 6, 1, 0x0}}, + {F, {"PKT_CNT", 16, 16, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/LANE7_STATUS", 0x708070}}, + {F, {"MODE", 0, 2, 0x0}}, + {F, {"ULPS", 2, 1, 0x0}}, + {F, {"INIT_DONE", 3, 1, 0x0}}, + {F, {"HS_ABORT", 4, 1, 0x0}}, + {F, {"ESC_ABORT", 5, 1, 0x0}}, + {F, {"STOP_STATE", 6, 1, 0x0}}, + {F, {"PKT_CNT", 16, 16, 0x0}}, + + {R, {"SENSOR_IF/MIPI_RX/IDELAY_TAP_VALUE_L4_TO_L7", 0x708074}}, + {F, {"LANE_4", 0, 5, 0x0}}, + {F, {"LANE_5", 8, 5, 0x0}}, + {F, {"LANE_6", 16, 5, 0x0}}, + {F, {"LANE_7", 24, 5, 0x0}}, + + {R, {"SENSOR_IF/GEN41_IF_CTRL/CONTROL", 0x70F000}}, + {F, {"ENABLE", 0, 1, 0x0}}, + {F, {"BYPASS", 1, 1, 0x0}}, + {F, {"LAST_CTRL_MODE", 11, 1, 0x0}}, + {F, {"HALF_WORD_SWAP", 12, 1, 0x0}}, + {F, {"AUX_PRESENCE", 16, 1, 0x0}}, + {F, {"MIPI_RX_PRESENCE", 17, 1, 0x0}}, + {F, {"SLVS_RX_PRESENCE", 18, 1, 0x0}}, + {F, {"TD_POL_INV", 20, 1, 0x0}}, + {F, {"EM_POL_INV", 21, 1, 0x0}}, + {F, {"GEN_LAST", 22, 1, 0x0}}, + {F, {"AUX_IN_MODE", 24, 1, 0x0}}, + {F, {"AUX_8BN_4B", 25, 1, 0x0}}, + {F, {"SLVS_IN_MODE", 26, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41_IF_CTRL/TRIGGER", 0x70F004}}, + {F, {"AFIFO_RESET", 0, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41_IF_CTRL/TEST_PATTERN_CONTROL", 0x70F008}}, + {F, {"EVT_TYPE", 0, 4, 0x0}}, + {F, {"EVT_FORMAT", 4, 2, 0x2}}, + {A, {"2.0", 0x2}}, + {A, {"3.0", 0x3}}, + {F, {"ENABLE", 8, 1, 0x0}}, + {F, {"VECTOR_MODE", 9, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41_IF_CTRL/TEST_PATTERN_N_PERIOD", 0x70F00C}}, + {F, {"VALID_RATIO", 0, 10, 0x0}}, + {F, {"LENGTH", 16, 16, 0x0}}, + + {R, {"SENSOR_IF/GEN41_IF_CTRL/TEST_PATTERN_P_PERIOD", 0x70F010}}, + {F, {"VALID_RATIO", 0, 10, 0x0}}, + {F, {"LENGTH", 16, 16, 0x0}}, + + {R, {"SENSOR_IF/GEN41_IF_CTRL/TEST_PATTERN_VECTOR", 0x70F014}}, + {F, {"SEED_VALUE", 0, 5, 0x1F}}, + + {R, {"SENSOR_IF/GEN41_IF_CTRL/OOB_FILTER_CONTROL", 0x70F018}}, + {F, {"ENABLE", 0, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41_IF_CTRL/OOB_FILTER_ORIGIN", 0x70F01C}}, + {F, {"Y", 0, 11, 0x0}}, + {F, {"X", 16, 11, 0x0}}, + + {R, {"SENSOR_IF/GEN41_IF_CTRL/OOB_FILTER_SIZE", 0x70F020}}, + {F, {"HEIGHT", 0, 11, 0x2CF}}, + {F, {"WIDTH", 16, 11, 0x4FF}}, + + {R, {"SENSOR_IF/GEN41_IF_CTRL/CCAM5_CONTROL", 0x70F024}}, + {F, {"PSU_EN", 0, 1, 0x0}}, + {F, {"RST_N", 1, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41_IF_CTRL/TRIGGER_FWD", 0x70F028}}, + {F, {"TRIGGER_ID", 0, 8, 0x0}}, + {F, {"ENABLE", 8, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41_IF_CTRL/MIPI_RX_CONTROL", 0x70F02C}}, + {F, {"VIDEO_RESET", 0, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41_IF_CTRL/GEN41_CTRL", 0x70F030}}, + {F, {"BOOT", 0, 1, 0x0}}, + {F, {"DFT_MODE", 1, 1, 0x0}}, + {F, {"TEST_MODE", 2, 1, 0x0}}, + {F, {"I2C_ADDR", 3, 1, 0x0}}, + {F, {"CPU_DEBUG", 4, 1, 0x0}}, + {F, {"AGPIO", 5, 2, 0x0}}, + {F, {"DGPIO", 7, 1, 0x0}}, + {F, {"ARST_N", 8, 1, 0x0}}, + {F, {"TDRST_N", 9, 1, 0x0}}, + {F, {"XCLEAR", 10, 1, 0x0}}, + {F, {"I2C_SPI_SEL", 11, 1, 0x0}}, + {F, {"TRIG_IO_DIR", 12, 1, 0x0}}, + {F, {"DGPIO_DIR", 13, 1, 0x0}}, + {F, {"DGPIO_VAL", 14, 1, 0x0}}, + {F, {"OMODE_BUF", 15, 1, 0x0}}, + {F, {"CPUSTAIT_BUF", 16, 1, 0x0}}, + {F, {"TPA_SEL_1V", 17, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41_IF_CTRL/GEN41_POWER_CTRL", 0x70F034}}, + {F, {"1V8_SYS", 0, 1, 0x0}}, + {F, {"3V3_SYS", 1, 1, 0x0}}, + {F, {"VDDLSC", 2, 1, 0x0}}, + {F, {"VDDPLL", 3, 1, 0x0}}, + {F, {"VDDLIF", 4, 1, 0x0}}, + {F, {"VDDMIF", 5, 1, 0x0}}, + {F, {"VDDIO", 6, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41_IF_CTRL/GEN41_CLK_CTRL", 0x70F038}}, + {F, {"ENABLE", 0, 1, 0x0}}, + {F, {"VALID", 1, 1, 0x0}}, + {F, {"VCO_HIGH_TIME", 10, 6, 0x0}}, + {F, {"VCO_LOW_TIME", 20, 6, 0x0}}, + + {R, {"SENSOR_IF/GEN41_AUX_IF/IODELAY_DEC", 0x710004}}, + {F, {"DATA", 0, 8, 0x0}}, + {F, {"VALID", 8, 1, 0x0}}, + {F, {"CLK", 9, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41_AUX_IF/IODELAY_INC", 0x710008}}, + {F, {"DATA", 0, 8, 0x0}}, + {F, {"VALID", 8, 1, 0x0}}, + {F, {"CLK", 9, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41_AUX_IF/IODELAY_LOAD", 0x71000C}}, + {F, {"DATA", 0, 8, 0x0}}, + {F, {"VALID", 8, 1, 0x0}}, + {F, {"CLK", 9, 1, 0x0}}, + + {R, {"SENSOR_IF/GEN41_AUX_IF/IODELAY_SET_VALUE_0", 0x710010}}, + {F, {"DATA_0", 0, 5, 0x0}}, + {F, {"DATA_1", 5, 5, 0x0}}, + {F, {"DATA_2", 10, 5, 0x0}}, + {F, {"DATA_3", 15, 5, 0x0}}, + {F, {"DATA_4", 20, 5, 0x0}}, + {F, {"DATA_5", 25, 5, 0x0}}, + + {R, {"SENSOR_IF/GEN41_AUX_IF/IODELAY_SET_VALUE_1", 0x710014}}, + {F, {"DATA_6", 0, 5, 0x0}}, + {F, {"DATA_7", 5, 5, 0x0}}, + {F, {"VALID", 10, 5, 0x0}}, + {F, {"CLK", 15, 5, 0x0}}, + + {R, {"SENSOR_IF/GEN41_AUX_IF/IODELAY_GET_VALUE_0", 0x710018}}, + {F, {"DATA_0", 0, 5, 0x0}}, + {F, {"DATA_1", 5, 5, 0x0}}, + {F, {"DATA_2", 10, 5, 0x0}}, + {F, {"DATA_3", 15, 5, 0x0}}, + {F, {"DATA_4", 20, 5, 0x0}}, + {F, {"DATA_5", 25, 5, 0x0}}, + + {R, {"SENSOR_IF/GEN41_AUX_IF/IODELAY_GET_VALUE_1", 0x71001C}}, + {F, {"DATA_6", 0, 5, 0x0}}, + {F, {"DATA_7", 5, 5, 0x0}}, + {F, {"VALID", 10, 5, 0x0}}, + {F, {"CLK", 15, 5, 0x0}}, + + {R, {"SENSOR_IF/GEN41_AUX_IF/SAMPLE_CLK_EDGE", 0x710020}}, + {F, {"DATA", 0, 8, 0x0}}, + {F, {"VALID", 8, 1, 0x0}}, + + {R, {"SENSOR_IF/VIP/CONTROL", 0x710100}}, + {F, {"MODE", 0, 3, 0x0}}, + {F, {"RATE", 3, 10, 0x0}}, + {F, {"REPEAT", 16, 13, 0x0}}, + {F, {"DISABLE_OUTPUT", 29, 1, 0x0}}, + {F, {"FORCE_READY", 30, 1, 0x1}}, + + {R, {"SENSOR_IF/VIP/TEST_STATUS", 0x710104}}, + {F, {"STATUS", 0, 1, 0x0}}, + {F, {"RESET", 1, 1, 0x0}}, + + {R, {"SENSOR_IF/VIP/PATTERN_TEST_DATA", 0x710108}}, + {F, {"DATA", 0, 32, 0x0}}, + + {R, {"SENSOR_IF/VIP/TEST_RESULT", 0x71010C}}, + {F, {"RESULT", 0, 32, 0x0}}, + + {R, {"SENSOR_IF/VIP/VALID_COUNTER", 0x710110}}, + {F, {"COUNTER", 0, 32, 0x0}}, + + {R, {"SENSOR_IF/VIP/ERROR_COUNTER", 0x710114}}, + {F, {"COUNTER", 0, 32, 0x0}}, + + {R, {"SENSOR_IF/VIP/ERROR_INDEX", 0x710118}}, + {F, {"INDEX", 0, 32, 0x0}}, + + {R, {"SENSOR_IF/SLVS_RX/CORE_CONFIG", 0x710200}}, + {F, {"CORE_ENABLE", 0, 1, 0x0}}, + {F, {"DATA_FORMAT", 1, 2, 0x3}}, + + {R, {"SENSOR_IF/SLVS_RX/PROTOCOL_CONFIG", 0x710204}}, + {F, {"ACTIVE_LANES", 0, 2, 0x3}}, + {F, {"EN_IN_BYTE_ENDIANNESS_SWAP", 4, 1, 0x0}}, + {F, {"EN_PLD_BYTE_ORDER_SWAP", 8, 1, 0x0}}, + {F, {"EN_PLD_BYTE_ENDIANNESS_SWAP", 12, 1, 0x0}}, + + {R, {"SENSOR_IF/SLVS_RX/CORE_STAT", 0x710208}}, + {F, {"SOFT_RESET", 0, 1, 0x0}}, + {F, {"OUT_BUFFER_FULL", 1, 1, 0x0}}, + {F, {"PHASE_DETECT_LOCKED", 4, 4, 0x0}}, + {F, {"ACCU_REG_LOCKED", 8, 4, 0x0}}, + {F, {"PACKET_COUNT", 16, 16, 0x0}}, + + {R, {"SENSOR_IF/SLVS_RX/SYNC1_CODE_MSB", 0x71020C}}, + {F, {"VALUE", 0, 32, 0xDB0DB1DB}}, + + {R, {"SENSOR_IF/SLVS_RX/SYNC1_CODE_LSB", 0x710210}}, + {F, {"VALUE", 0, 32, 0x2DB3DB4D}}, + + {R, {"SENSOR_IF/SLVS_RX/SYNC2_CODE_MSB", 0x710214}}, + {F, {"VALUE", 0, 32, 0xB5DB6DB7}}, + + {R, {"SENSOR_IF/SLVS_RX/SYNC2_CODE_LSB", 0x710218}}, + {F, {"VALUE", 0, 32, 0xDB8DB9DB}}, + + {R, {"SENSOR_IF/SLVS_RX/SYNC3_CODE_MSB", 0x71021C}}, + {F, {"VALUE", 0, 32, 0xADBBDBCD}}, + + {R, {"SENSOR_IF/SLVS_RX/SYNC3_CODE_LSB", 0x710220}}, + {F, {"VALUE", 0, 32, 0xBDDBEDBF}}, + + {R, {"SENSOR_IF/SLVS_RX/SYNC4_FS_CODE_MSB", 0x710224}}, + {F, {"VALUE", 0, 32, 0x0}}, + + {R, {"SENSOR_IF/SLVS_RX/SYNC4_FS_CODE_LSB", 0x710228}}, + {F, {"VALUE", 0, 32, 0x0}}, + + {R, {"SENSOR_IF/SLVS_RX/SYNC4_FE_CODE_MSB", 0x71022C}}, + {F, {"VALUE", 0, 32, 0x0}}, + + {R, {"SENSOR_IF/SLVS_RX/SYNC4_FE_CODE_LSB", 0x710230}}, + {F, {"VALUE", 0, 32, 0x4000}}, + + {R, {"SENSOR_IF/SLVS_RX/SYNC4_SAV_CODE_MSB", 0x710234}}, + {F, {"VALUE", 0, 32, 0x0}}, + + {R, {"SENSOR_IF/SLVS_RX/SYNC4_SAV_CODE_LSB", 0x710238}}, + {F, {"VALUE", 0, 32, 0x8000}}, + + {R, {"SENSOR_IF/SLVS_RX/SYNC4_EAV_CODE_MSB", 0x71023C}}, + {F, {"VALUE", 0, 32, 0x0}}, + + {R, {"SENSOR_IF/SLVS_RX/SYNC4_EAV_CODE_LSB", 0x710240}}, + {F, {"VALUE", 0, 32, 0xC000}}, + + {R, {"SENSOR_IF/SLVS_RX/BLK_CODE_MSB", 0x710244}}, + {F, {"VALUE", 0, 32, 0xB0B1B2B3}}, + + {R, {"SENSOR_IF/SLVS_RX/BLK_CODE_LSB", 0x710248}}, + {F, {"VALUE", 0, 32, 0xB4B5B6B7}}, + + {R, {"SENSOR_IF/SLVS_RX/DMY_CODE_MSB", 0x71024C}}, + {F, {"VALUE", 0, 32, 0x99999999}}, + + {R, {"SENSOR_IF/SLVS_RX/DMY_CODE_LSB", 0x710250}}, + {F, {"VALUE", 0, 32, 0x99999999}}, + + {R, {"SENSOR_IF/SLVS_RX/IODELAY_LOAD", 0x710254}}, + {F, {"LANE_0", 0, 1, 0x0}}, + {F, {"LANE_1", 8, 1, 0x0}}, + {F, {"LANE_2", 16, 1, 0x0}}, + {F, {"LANE_3", 24, 1, 0x0}}, + {F, {"BUSY", 31, 1, 0x0}}, + + {R, {"SENSOR_IF/SLVS_RX/IODELAY_SET_VALUE_0", 0x710258}}, + {F, {"LANE_0", 0, 9, 0x0}}, + {F, {"LANE_1", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/SLVS_RX/IODELAY_SET_VALUE_1", 0x71025C}}, + {F, {"LANE_2", 0, 9, 0x0}}, + {F, {"LANE_3", 16, 9, 0x0}}, + + {R, {"SENSOR_IF/SLVS_RX/STAT_IODELAY_SET_VALUE_0", 0x710260}}, + {F, {"LANE_0", 0, 9, 0x0}}, + {F, {"LANE_1", 18, 9, 0x0}}, + + {R, {"SENSOR_IF/SLVS_RX/STAT_IODELAY_SET_VALUE_1", 0x710264}}, + {F, {"LANE_2", 0, 9, 0x0}}, + {F, {"LANE_3", 18, 9, 0x0}} + + // clang-format on +}; + +unsigned int Imx636Evk2RegisterMapSize = sizeof(Imx636Evk2RegisterMap)/sizeof(Imx636Evk2RegisterMap[0]); + +#endif // METAVISION_HAL_IMX636_EVK2_REGISTERMAP_H diff --git a/hal_psee_plugins/include/devices/imx636/register_maps/imx636_evk3_registermap.h b/hal_psee_plugins/include/devices/imx636/register_maps/imx636_evk3_registermap.h new file mode 100644 index 000000000..7553d8c78 --- /dev/null +++ b/hal_psee_plugins/include/devices/imx636/register_maps/imx636_evk3_registermap.h @@ -0,0 +1,3573 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_IMX636_EVK3_REGISTERMAP_H +#define METAVISION_HAL_IMX636_EVK3_REGISTERMAP_H + +#include "utils/regmap_data.h" + +RegmapData Imx636Evk3RegisterMap[] = { + // clang-format off + + {R, {"IMX636/roi_ctrl", 0x0004}}, + {F, {"roi_td_en", 1, 1, 0x0}}, + {F, {"roi_td_shadow_trigger", 5, 1, 0x0}}, + {F, {"td_roi_roni_n_en", 6, 1, 0x1}}, + {F, {"Reserved_8", 8, 1, 0x0}}, + {F, {"px_td_rstn", 10, 1, 0x0}}, + {F, {"Reserved_17_11", 11, 7, 0xA}}, + {F, {"Reserved_25", 25, 1, 0x0}}, + {F, {"Reserved_29_28", 28, 2, 0x3}}, + {F, {"Reserved_31_30", 30, 2, 0x3}}, + + {R, {"IMX636/lifo_ctrl", 0x000C}}, + {F, {"lifo_en", 0, 1, 0x0}}, + {F, {"lifo_out_en", 1, 1, 0x0}}, + {F, {"lifo_cnt_en", 2, 1, 0x0}}, + {F, {"Reserved_31_3", 3, 29, 0x0}}, + + {R, {"IMX636/lifo_status", 0x0010}}, + {F, {"lifo_ton", 0, 29, 0x0}}, + {F, {"lifo_ton_valid", 29, 1, 0x0}}, + {F, {"Reserved_30", 30, 1, 0x0}}, + + {R, {"IMX636/Reserved_0014", 0x0014}}, + {F, {"Reserved_31_0", 0, 32, 0xA0401806}}, + + {R, {"IMX636/spare0", 0x0018}}, + {F, {"Reserved_19_0", 0, 20, 0x0}}, + {F, {"gcd_rstn", 20, 1, 0x0}}, + {F, {"Reserved_31_21", 21, 11, 0x0}}, + + {R, {"IMX636/refractory_ctrl", 0x0020}}, + {F, {"refr_counter", 0, 28, 0x0}}, + {F, {"refr_valid", 28, 1, 0x0}}, + {F, {"Reserved_29", 29, 1, 0x0}}, + {F, {"refr_cnt_en", 30, 1, 0x0}}, + {F, {"refr_en", 31, 1, 0x0}}, + + {R, {"IMX636/roi_win_ctrl", 0x0034}}, + {F, {"roi_master_en", 0, 1, 0x0}}, + {F, {"roi_win_done", 1, 1, 0x0}}, + + {R, {"IMX636/roi_win_start_addr", 0x0038}}, + {F, {"roi_win_start_x", 0, 11, 0x0}}, + {F, {"roi_win_start_y", 16, 10, 0x0}}, + + {R, {"IMX636/roi_win_end_addr", 0x003C}}, + {F, {"roi_win_end_x", 0, 11, 0x4FF}}, + {F, {"roi_win_end_y", 16, 10, 0x2CF}}, + + {R, {"IMX636/dig_pad2_ctrl", 0x0044}}, + {F, {"Reserved_15_0", 0, 16, 0xFCCF}}, + {F, {"pad_sync", 16, 4, 0xF}}, + {F, {"Reserved_31_20", 20, 12, 0xCCF}}, + + {R, {"IMX636/adc_control", 0x004C}}, + {F, {"adc_en", 0, 1, 0x0}}, + {F, {"adc_clk_en", 1, 1, 0x0}}, + {F, {"adc_start", 2, 1, 0x0}}, + {F, {"Reserved_31_3", 3, 29, 0xEC8}}, + + {R, {"IMX636/adc_status", 0x0050}}, + {F, {"adc_dac_dyn", 0, 10, 0x0}}, + {F, {"Reserved_10", 10, 1, 0x0}}, + {F, {"adc_done_dyn", 11, 1, 0x0}}, + {F, {"Reserved_31_12", 12, 20, 0x0}}, + + {R, {"IMX636/adc_misc_ctrl", 0x0054}}, + {F, {"Reserved_0", 0, 1, 0x0}}, + {F, {"adc_buf_cal_en", 1, 1, 0x0}}, + {F, {"Reserved_9_2", 2, 8, 0x84}}, + {F, {"adc_rng", 10, 2, 0x0}}, + {F, {"adc_temp", 12, 1, 0x0}}, + {F, {"Reserved_14_13", 13, 2, 0x0}}, + + {R, {"IMX636/temp_ctrl", 0x005C}}, + {F, {"temp_buf_cal_en", 0, 1, 0x0}}, + {F, {"temp_buf_en", 1, 1, 0x0}}, + {F, {"Reserved_31_2", 2, 30, 0x20}}, + + {R, {"IMX636/iph_mirr_ctrl", 0x0074}}, + {F, {"iph_mirr_en", 0, 1, 0x0}}, + {F, {"iph_mirr_amp_en", 1, 1, 0x0}}, + {F, {"Reserved_31_2", 2, 30, 0x0}}, + + {R, {"IMX636/gcd_ctrl1", 0x0078}}, + {F, {"gcd_en", 0, 1, 0x0}}, + {F, {"gcd_diffamp_en", 1, 1, 0x0}}, + {F, {"gcd_lpf_en", 2, 1, 0x0}}, + {F, {"Reserved_31_3", 3, 29, 0x8003BE9}}, + + {R, {"IMX636/gcd_shadow_ctrl", 0x0090}}, + {F, {"Reserved_0", 0, 1, 0x0}}, + {F, {"gcd_irq_sw_override", 1, 1, 0x0}}, + {F, {"gcd_reset_on_copy", 2, 1, 0x0}}, + + {R, {"IMX636/gcd_shadow_status", 0x0094}}, + {F, {"gcd_shadow_valid", 0, 1, 0x0}}, + {F, {"Reserved_31_1", 1, 31, 0x0}}, + + {R, {"IMX636/gcd_shadow_counter", 0x0098}}, + {F, {"gcd_shadow_cnt_off", 0, 16, 0x0}}, + {F, {"gcd_shadow_cnt_on", 16, 16, 0x0}}, + + {R, {"IMX636/stop_sequence_control", 0x00C8}}, + {F, {"stop_sequence_start", 0, 1, 0x0}}, + {F, {"Reserved_15_8", 8, 8, 0x1}}, + + {R, {"IMX636/bias/bias_fo", 0x1004}}, + {F, {"idac_ctl", 0, 8, 0x0}}, + {F, {"Reserved_27_8", 8, 20, 0x3A1E8}}, + {F, {"single_transfer", 28, 1, 0x0}}, + + {R, {"IMX636/bias/bias_hpf", 0x100C}}, + {F, {"idac_ctl", 0, 8, 0x0}}, + {F, {"Reserved_27_8", 8, 20, 0x3A1FF}}, + {F, {"single_transfer", 28, 1, 0x0}}, + + {R, {"IMX636/bias/bias_diff_on", 0x1010}}, + {F, {"idac_ctl", 0, 8, 0x0}}, + {F, {"Reserved_27_8", 8, 20, 0x1A163}}, + {F, {"single_transfer", 28, 1, 0x0}}, + + {R, {"IMX636/bias/bias_diff", 0x1014}}, + {F, {"idac_ctl", 0, 8, 0x4D}}, + {F, {"Reserved_27_8", 8, 20, 0x1A150}}, + {F, {"single_transfer", 28, 1, 0x0}}, + + {R, {"IMX636/bias/bias_diff_off", 0x1018}}, + {F, {"idac_ctl", 0, 8, 0x0}}, + {F, {"Reserved_27_8", 8, 20, 0x1A137}}, + {F, {"single_transfer", 28, 1, 0x0}}, + + {R, {"IMX636/bias/bias_refr", 0x1020}}, + {F, {"idac_ctl", 0, 8, 0x14}}, + {F, {"Reserved_27_8", 8, 20, 0x38296}}, + {F, {"single_transfer", 28, 1, 0x0}}, + + {R, {"IMX636/bias/bgen_ctrl", 0x1100}}, + {F, {"burst_transfer", 0, 1, 0x0}}, + {F, {"Reserved_1", 1, 1, 0x0}}, + + {R, {"IMX636/roi/td_roi_x00", 0x2000}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"IMX636/roi/td_roi_x01", 0x2004}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"IMX636/roi/td_roi_x02", 0x2008}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"IMX636/roi/td_roi_x03", 0x200C}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"IMX636/roi/td_roi_x04", 0x2010}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"IMX636/roi/td_roi_x05", 0x2014}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"IMX636/roi/td_roi_x06", 0x2018}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"IMX636/roi/td_roi_x07", 0x201C}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"IMX636/roi/td_roi_x08", 0x2020}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"IMX636/roi/td_roi_x09", 0x2024}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"IMX636/roi/td_roi_x10", 0x2028}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"IMX636/roi/td_roi_x11", 0x202C}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"IMX636/roi/td_roi_x12", 0x2030}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"IMX636/roi/td_roi_x13", 0x2034}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"IMX636/roi/td_roi_x14", 0x2038}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"IMX636/roi/td_roi_x15", 0x203C}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"IMX636/roi/td_roi_x16", 0x2040}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"IMX636/roi/td_roi_x17", 0x2044}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"IMX636/roi/td_roi_x18", 0x2048}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"IMX636/roi/td_roi_x19", 0x204C}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"IMX636/roi/td_roi_x20", 0x2050}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"IMX636/roi/td_roi_x21", 0x2054}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"IMX636/roi/td_roi_x22", 0x2058}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"IMX636/roi/td_roi_x23", 0x205C}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"IMX636/roi/td_roi_x24", 0x2060}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"IMX636/roi/td_roi_x25", 0x2064}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"IMX636/roi/td_roi_x26", 0x2068}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"IMX636/roi/td_roi_x27", 0x206C}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"IMX636/roi/td_roi_x28", 0x2070}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"IMX636/roi/td_roi_x29", 0x2074}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"IMX636/roi/td_roi_x30", 0x2078}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"IMX636/roi/td_roi_x31", 0x207C}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"IMX636/roi/td_roi_x32", 0x2080}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"IMX636/roi/td_roi_x33", 0x2084}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"IMX636/roi/td_roi_x34", 0x2088}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"IMX636/roi/td_roi_x35", 0x208C}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"IMX636/roi/td_roi_x36", 0x2090}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"IMX636/roi/td_roi_x37", 0x2094}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"IMX636/roi/td_roi_x38", 0x2098}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"IMX636/roi/td_roi_x39", 0x209C}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"IMX636/roi/td_roi_y00", 0x4000}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"IMX636/roi/td_roi_y01", 0x4004}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"IMX636/roi/td_roi_y02", 0x4008}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"IMX636/roi/td_roi_y03", 0x400C}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"IMX636/roi/td_roi_y04", 0x4010}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"IMX636/roi/td_roi_y05", 0x4014}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"IMX636/roi/td_roi_y06", 0x4018}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"IMX636/roi/td_roi_y07", 0x401C}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"IMX636/roi/td_roi_y08", 0x4020}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"IMX636/roi/td_roi_y09", 0x4024}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"IMX636/roi/td_roi_y10", 0x4028}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"IMX636/roi/td_roi_y11", 0x402C}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"IMX636/roi/td_roi_y12", 0x4030}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"IMX636/roi/td_roi_y13", 0x4034}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"IMX636/roi/td_roi_y14", 0x4038}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"IMX636/roi/td_roi_y15", 0x403C}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"IMX636/roi/td_roi_y16", 0x4040}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"IMX636/roi/td_roi_y17", 0x4044}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"IMX636/roi/td_roi_y18", 0x4048}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"IMX636/roi/td_roi_y19", 0x404C}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"IMX636/roi/td_roi_y20", 0x4050}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"IMX636/roi/td_roi_y21", 0x4054}}, + {F, {"effective", 0, 32, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFFFFFF}}, + + {R, {"IMX636/roi/td_roi_y22", 0x4058}}, + {F, {"effective", 0, 16, 0x0}}, + {A, {"enable", 0x0}}, + {A, {"disable", 0xFFFF}}, + {F, {"Reserved_16", 16, 1, 0x1}}, + {F, {"Reserved_17", 17, 1, 0x1}}, + {F, {"Reserved_19_18", 18, 2, 0x3}}, + {F, {"Reserved_21_20", 20, 2, 0x3}}, + {F, {"Reserved_22", 22, 1, 0x1}}, + {F, {"Reserved_23", 23, 1, 0x1}}, + + {R, {"IMX636/erc/Reserved_6000", 0x6000}}, + {F, {"Reserved_0", 0, 1, 0x0}}, + {F, {"Reserved_1", 1, 1, 0x0}}, + {F, {"Reserved_2", 2, 1, 0x0}}, + {F, {"Reserved_3", 3, 1, 0x0}}, + {F, {"Reserved_4", 4, 1, 0x0}}, + + {R, {"IMX636/erc/in_drop_rate_control", 0x6004}}, + {F, {"cfg_event_delay_fifo_en", 0, 1, 0x0}}, + {F, {"Reserved_1", 1, 1, 0x0}}, + {F, {"Reserved_10_2", 2, 9, 0x0}}, + + {R, {"IMX636/erc/reference_period", 0x6008}}, + {F, {"erc_reference_period", 0, 10, 0x80}}, + + {R, {"IMX636/erc/td_target_event_rate", 0x600C}}, + {F, {"target_event_rate", 0, 22, 0x80}}, + + {R, {"IMX636/erc/erc_enable", 0x6028}}, + {F, {"erc_en", 0, 1, 0x0}}, + {F, {"Reserved_1", 1, 1, 0x0}}, + {F, {"Reserved_2", 2, 1, 0x0}}, + + {R, {"IMX636/erc/Reserved_602C", 0x602C}}, + {F, {"Reserved_0", 0, 1, 0x0}}, + {F, {"Reserved_1", 1, 1, 0x0}}, + + {R, {"IMX636/erc/t_dropping_control", 0x6050}}, + {F, {"t_dropping_en", 0, 1, 0x0}}, + + {R, {"IMX636/erc/h_dropping_control", 0x6060}}, + {F, {"h_dropping_en", 0, 1, 0x0}}, + + {R, {"IMX636/erc/v_dropping_control", 0x6070}}, + {F, {"v_dropping_en", 0, 1, 0x0}}, + + {R, {"IMX636/erc/h_drop_lut_00", 0x6080}}, + {F, {"hlut00", 0, 5, 0x0}}, + {F, {"hlut01", 8, 5, 0x0}}, + {F, {"hlut02", 16, 5, 0x0}}, + {F, {"hlut03", 24, 5, 0x0}}, + + {R, {"IMX636/erc/h_drop_lut_01", 0x6084}}, + {F, {"hlut04", 0, 5, 0x0}}, + {F, {"hlut05", 8, 5, 0x0}}, + {F, {"hlut06", 16, 5, 0x0}}, + {F, {"hlut07", 24, 5, 0x0}}, + + {R, {"IMX636/erc/h_drop_lut_02", 0x6088}}, + {F, {"hlut08", 0, 5, 0x0}}, + {F, {"hlut09", 8, 5, 0x0}}, + {F, {"hlut10", 16, 5, 0x0}}, + {F, {"hlut11", 24, 5, 0x0}}, + + {R, {"IMX636/erc/h_drop_lut_03", 0x608C}}, + {F, {"hlut12", 0, 5, 0x0}}, + {F, {"hlut13", 8, 5, 0x0}}, + {F, {"hlut14", 16, 5, 0x0}}, + {F, {"hlut15", 24, 5, 0x0}}, + + {R, {"IMX636/erc/h_drop_lut_04", 0x6090}}, + {F, {"hlut16", 0, 5, 0x0}}, + {F, {"hlut17", 8, 5, 0x0}}, + {F, {"hlut18", 16, 5, 0x0}}, + {F, {"hlut19", 24, 5, 0x0}}, + + {R, {"IMX636/erc/h_drop_lut_05", 0x6094}}, + {F, {"hlut20", 0, 5, 0x0}}, + {F, {"hlut21", 8, 5, 0x0}}, + {F, {"hlut22", 16, 5, 0x0}}, + {F, {"hlut23", 24, 5, 0x0}}, + + {R, {"IMX636/erc/h_drop_lut_06", 0x6098}}, + {F, {"hlut24", 0, 5, 0x0}}, + {F, {"hlut25", 8, 5, 0x0}}, + {F, {"hlut26", 16, 5, 0x0}}, + {F, {"hlut27", 24, 5, 0x0}}, + + {R, {"IMX636/erc/h_drop_lut_07", 0x609C}}, + {F, {"hlut28", 0, 5, 0x0}}, + {F, {"hlut29", 8, 5, 0x0}}, + {F, {"hlut30", 16, 5, 0x0}}, + {F, {"hlut31", 24, 5, 0x0}}, + + {R, {"IMX636/erc/v_drop_lut_00", 0x60C0}}, + {F, {"vlut00", 0, 5, 0x0}}, + {F, {"vlut01", 8, 5, 0x0}}, + {F, {"vlut02", 16, 5, 0x0}}, + {F, {"vlut03", 24, 5, 0x0}}, + + {R, {"IMX636/erc/v_drop_lut_01", 0x60C4}}, + {F, {"vlut04", 0, 5, 0x0}}, + {F, {"vlut05", 8, 5, 0x0}}, + {F, {"vlut06", 16, 5, 0x0}}, + {F, {"vlut07", 24, 5, 0x0}}, + + {R, {"IMX636/erc/v_drop_lut_02", 0x60C8}}, + {F, {"vlut08", 0, 5, 0x0}}, + {F, {"vlut09", 8, 5, 0x0}}, + {F, {"vlut10", 16, 5, 0x0}}, + {F, {"vlut11", 24, 5, 0x0}}, + + {R, {"IMX636/erc/v_drop_lut_03", 0x60CC}}, + {F, {"vlut12", 0, 5, 0x0}}, + {F, {"vlut13", 8, 5, 0x0}}, + {F, {"vlut14", 16, 5, 0x0}}, + {F, {"vlut15", 24, 5, 0x0}}, + + {R, {"IMX636/erc/v_drop_lut_04", 0x60D0}}, + {F, {"vlut16", 0, 5, 0x0}}, + {F, {"vlut17", 8, 5, 0x0}}, + {F, {"vlut18", 16, 5, 0x0}}, + {F, {"vlut19", 24, 5, 0x0}}, + + {R, {"IMX636/erc/v_drop_lut_05", 0x60D4}}, + {F, {"vlut20", 0, 5, 0x0}}, + {F, {"vlut21", 8, 5, 0x0}}, + {F, {"vlut22", 16, 5, 0x0}}, + {F, {"vlut23", 24, 5, 0x0}}, + + {R, {"IMX636/erc/v_drop_lut_06", 0x60D8}}, + {F, {"vlut24", 0, 5, 0x0}}, + {F, {"vlut25", 8, 5, 0x0}}, + {F, {"vlut26", 16, 5, 0x0}}, + {F, {"vlut27", 24, 5, 0x0}}, + + {R, {"IMX636/erc/v_drop_lut_07", 0x60DC}}, + {F, {"vlut28", 0, 5, 0x0}}, + {F, {"vlut29", 8, 5, 0x0}}, + {F, {"vlut30", 16, 5, 0x0}}, + {F, {"vlut31", 24, 5, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_00", 0x6400}}, + {F, {"tlut000", 0, 9, 0x0}}, + {F, {"tlut001", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_01", 0x6404}}, + {F, {"tlut002", 0, 9, 0x0}}, + {F, {"tlut003", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_02", 0x6408}}, + {F, {"tlut004", 0, 9, 0x0}}, + {F, {"tlut005", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_03", 0x640C}}, + {F, {"tlut006", 0, 9, 0x0}}, + {F, {"tlut007", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_04", 0x6410}}, + {F, {"tlut008", 0, 9, 0x0}}, + {F, {"tlut009", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_05", 0x6414}}, + {F, {"tlut010", 0, 9, 0x0}}, + {F, {"tlut011", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_06", 0x6418}}, + {F, {"tlut012", 0, 9, 0x0}}, + {F, {"tlut013", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_07", 0x641C}}, + {F, {"tlut014", 0, 9, 0x0}}, + {F, {"tlut015", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_08", 0x6420}}, + {F, {"tlut016", 0, 9, 0x0}}, + {F, {"tlut017", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_09", 0x6424}}, + {F, {"tlut018", 0, 9, 0x0}}, + {F, {"tlut019", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_10", 0x6428}}, + {F, {"tlut020", 0, 9, 0x0}}, + {F, {"tlut021", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_11", 0x642C}}, + {F, {"tlut022", 0, 9, 0x0}}, + {F, {"tlut023", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_12", 0x6430}}, + {F, {"tlut024", 0, 9, 0x0}}, + {F, {"tlut025", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_13", 0x6434}}, + {F, {"tlut026", 0, 9, 0x0}}, + {F, {"tlut027", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_14", 0x6438}}, + {F, {"tlut028", 0, 9, 0x0}}, + {F, {"tlut029", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_15", 0x643C}}, + {F, {"tlut030", 0, 9, 0x0}}, + {F, {"tlut031", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_16", 0x6440}}, + {F, {"tlut032", 0, 9, 0x0}}, + {F, {"tlut033", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_17", 0x6444}}, + {F, {"tlut034", 0, 9, 0x0}}, + {F, {"tlut035", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_18", 0x6448}}, + {F, {"tlut036", 0, 9, 0x0}}, + {F, {"tlut037", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_19", 0x644C}}, + {F, {"tlut038", 0, 9, 0x0}}, + {F, {"tlut039", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_20", 0x6450}}, + {F, {"tlut040", 0, 9, 0x0}}, + {F, {"tlut041", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_21", 0x6454}}, + {F, {"tlut042", 0, 9, 0x0}}, + {F, {"tlut043", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_22", 0x6458}}, + {F, {"tlut044", 0, 9, 0x0}}, + {F, {"tlut045", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_23", 0x645C}}, + {F, {"tlut046", 0, 9, 0x0}}, + {F, {"tlut047", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_24", 0x6460}}, + {F, {"tlut048", 0, 9, 0x0}}, + {F, {"tlut049", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_25", 0x6464}}, + {F, {"tlut050", 0, 9, 0x0}}, + {F, {"tlut051", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_26", 0x6468}}, + {F, {"tlut052", 0, 9, 0x0}}, + {F, {"tlut053", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_27", 0x646C}}, + {F, {"tlut054", 0, 9, 0x0}}, + {F, {"tlut055", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_28", 0x6470}}, + {F, {"tlut056", 0, 9, 0x0}}, + {F, {"tlut057", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_29", 0x6474}}, + {F, {"tlut058", 0, 9, 0x0}}, + {F, {"tlut059", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_30", 0x6478}}, + {F, {"tlut060", 0, 9, 0x0}}, + {F, {"tlut061", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_31", 0x647C}}, + {F, {"tlut062", 0, 9, 0x0}}, + {F, {"tlut063", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_32", 0x6480}}, + {F, {"tlut064", 0, 9, 0x0}}, + {F, {"tlut065", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_33", 0x6484}}, + {F, {"tlut066", 0, 9, 0x0}}, + {F, {"tlut067", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_34", 0x6488}}, + {F, {"tlut068", 0, 9, 0x0}}, + {F, {"tlut069", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_35", 0x648C}}, + {F, {"tlut070", 0, 9, 0x0}}, + {F, {"tlut071", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_36", 0x6490}}, + {F, {"tlut072", 0, 9, 0x0}}, + {F, {"tlut073", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_37", 0x6494}}, + {F, {"tlut074", 0, 9, 0x0}}, + {F, {"tlut075", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_38", 0x6498}}, + {F, {"tlut076", 0, 9, 0x0}}, + {F, {"tlut077", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_39", 0x649C}}, + {F, {"tlut078", 0, 9, 0x0}}, + {F, {"tlut079", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_40", 0x64A0}}, + {F, {"tlut080", 0, 9, 0x0}}, + {F, {"tlut081", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_41", 0x64A4}}, + {F, {"tlut082", 0, 9, 0x0}}, + {F, {"tlut083", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_42", 0x64A8}}, + {F, {"tlut084", 0, 9, 0x0}}, + {F, {"tlut085", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_43", 0x64AC}}, + {F, {"tlut086", 0, 9, 0x0}}, + {F, {"tlut087", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_44", 0x64B0}}, + {F, {"tlut088", 0, 9, 0x0}}, + {F, {"tlut089", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_45", 0x64B4}}, + {F, {"tlut090", 0, 9, 0x0}}, + {F, {"tlut091", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_46", 0x64B8}}, + {F, {"tlut092", 0, 9, 0x0}}, + {F, {"tlut093", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_47", 0x64BC}}, + {F, {"tlut094", 0, 9, 0x0}}, + {F, {"tlut095", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_48", 0x64C0}}, + {F, {"tlut096", 0, 9, 0x0}}, + {F, {"tlut097", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_49", 0x64C4}}, + {F, {"tlut098", 0, 9, 0x0}}, + {F, {"tlut099", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_50", 0x64C8}}, + {F, {"tlut100", 0, 9, 0x0}}, + {F, {"tlut101", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_51", 0x64CC}}, + {F, {"tlut102", 0, 9, 0x0}}, + {F, {"tlut103", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_52", 0x64D0}}, + {F, {"tlut104", 0, 9, 0x0}}, + {F, {"tlut105", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_53", 0x64D4}}, + {F, {"tlut106", 0, 9, 0x0}}, + {F, {"tlut107", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_54", 0x64D8}}, + {F, {"tlut108", 0, 9, 0x0}}, + {F, {"tlut109", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_55", 0x64DC}}, + {F, {"tlut110", 0, 9, 0x0}}, + {F, {"tlut111", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_56", 0x64E0}}, + {F, {"tlut112", 0, 9, 0x0}}, + {F, {"tlut113", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_57", 0x64E4}}, + {F, {"tlut114", 0, 9, 0x0}}, + {F, {"tlut115", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_58", 0x64E8}}, + {F, {"tlut116", 0, 9, 0x0}}, + {F, {"tlut117", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_59", 0x64EC}}, + {F, {"tlut118", 0, 9, 0x0}}, + {F, {"tlut119", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_60", 0x64F0}}, + {F, {"tlut120", 0, 9, 0x0}}, + {F, {"tlut121", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_61", 0x64F4}}, + {F, {"tlut122", 0, 9, 0x0}}, + {F, {"tlut123", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_62", 0x64F8}}, + {F, {"tlut124", 0, 9, 0x0}}, + {F, {"tlut125", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_63", 0x64FC}}, + {F, {"tlut126", 0, 9, 0x0}}, + {F, {"tlut127", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_64", 0x6500}}, + {F, {"tlut128", 0, 9, 0x0}}, + {F, {"tlut129", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_65", 0x6504}}, + {F, {"tlut130", 0, 9, 0x0}}, + {F, {"tlut131", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_66", 0x6508}}, + {F, {"tlut132", 0, 9, 0x0}}, + {F, {"tlut133", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_67", 0x650C}}, + {F, {"tlut134", 0, 9, 0x0}}, + {F, {"tlut135", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_68", 0x6510}}, + {F, {"tlut136", 0, 9, 0x0}}, + {F, {"tlut137", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_69", 0x6514}}, + {F, {"tlut138", 0, 9, 0x0}}, + {F, {"tlut139", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_70", 0x6518}}, + {F, {"tlut140", 0, 9, 0x0}}, + {F, {"tlut141", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_71", 0x651C}}, + {F, {"tlut142", 0, 9, 0x0}}, + {F, {"tlut143", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_72", 0x6520}}, + {F, {"tlut144", 0, 9, 0x0}}, + {F, {"tlut145", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_73", 0x6524}}, + {F, {"tlut146", 0, 9, 0x0}}, + {F, {"tlut147", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_74", 0x6528}}, + {F, {"tlut148", 0, 9, 0x0}}, + {F, {"tlut149", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_75", 0x652C}}, + {F, {"tlut150", 0, 9, 0x0}}, + {F, {"tlut151", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_76", 0x6530}}, + {F, {"tlut152", 0, 9, 0x0}}, + {F, {"tlut153", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_77", 0x6534}}, + {F, {"tlut154", 0, 9, 0x0}}, + {F, {"tlut155", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_78", 0x6538}}, + {F, {"tlut156", 0, 9, 0x0}}, + {F, {"tlut157", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_79", 0x653C}}, + {F, {"tlut158", 0, 9, 0x0}}, + {F, {"tlut159", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_80", 0x6540}}, + {F, {"tlut160", 0, 9, 0x0}}, + {F, {"tlut161", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_81", 0x6544}}, + {F, {"tlut162", 0, 9, 0x0}}, + {F, {"tlut163", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_82", 0x6548}}, + {F, {"tlut164", 0, 9, 0x0}}, + {F, {"tlut165", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_83", 0x654C}}, + {F, {"tlut166", 0, 9, 0x0}}, + {F, {"tlut167", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_84", 0x6550}}, + {F, {"tlut168", 0, 9, 0x0}}, + {F, {"tlut169", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_85", 0x6554}}, + {F, {"tlut170", 0, 9, 0x0}}, + {F, {"tlut171", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_86", 0x6558}}, + {F, {"tlut172", 0, 9, 0x0}}, + {F, {"tlut173", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_87", 0x655C}}, + {F, {"tlut174", 0, 9, 0x0}}, + {F, {"tlut175", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_88", 0x6560}}, + {F, {"tlut176", 0, 9, 0x0}}, + {F, {"tlut177", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_89", 0x6564}}, + {F, {"tlut178", 0, 9, 0x0}}, + {F, {"tlut179", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_90", 0x6568}}, + {F, {"tlut180", 0, 9, 0x0}}, + {F, {"tlut181", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_91", 0x656C}}, + {F, {"tlut182", 0, 9, 0x0}}, + {F, {"tlut183", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_92", 0x6570}}, + {F, {"tlut184", 0, 9, 0x0}}, + {F, {"tlut185", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_93", 0x6574}}, + {F, {"tlut186", 0, 9, 0x0}}, + {F, {"tlut187", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_94", 0x6578}}, + {F, {"tlut188", 0, 9, 0x0}}, + {F, {"tlut189", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_95", 0x657C}}, + {F, {"tlut190", 0, 9, 0x0}}, + {F, {"tlut191", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_96", 0x6580}}, + {F, {"tlut192", 0, 9, 0x0}}, + {F, {"tlut193", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_97", 0x6584}}, + {F, {"tlut194", 0, 9, 0x0}}, + {F, {"tlut195", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_98", 0x6588}}, + {F, {"tlut196", 0, 9, 0x0}}, + {F, {"tlut197", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_99", 0x658C}}, + {F, {"tlut198", 0, 9, 0x0}}, + {F, {"tlut199", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_100", 0x6590}}, + {F, {"tlut200", 0, 9, 0x0}}, + {F, {"tlut201", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_101", 0x6594}}, + {F, {"tlut202", 0, 9, 0x0}}, + {F, {"tlut203", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_102", 0x6598}}, + {F, {"tlut204", 0, 9, 0x0}}, + {F, {"tlut205", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_103", 0x659C}}, + {F, {"tlut206", 0, 9, 0x0}}, + {F, {"tlut207", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_104", 0x65A0}}, + {F, {"tlut208", 0, 9, 0x0}}, + {F, {"tlut209", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_105", 0x65A4}}, + {F, {"tlut210", 0, 9, 0x0}}, + {F, {"tlut211", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_106", 0x65A8}}, + {F, {"tlut212", 0, 9, 0x0}}, + {F, {"tlut213", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_107", 0x65AC}}, + {F, {"tlut214", 0, 9, 0x0}}, + {F, {"tlut215", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_108", 0x65B0}}, + {F, {"tlut216", 0, 9, 0x0}}, + {F, {"tlut217", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_109", 0x65B4}}, + {F, {"tlut218", 0, 9, 0x0}}, + {F, {"tlut219", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_110", 0x65B8}}, + {F, {"tlut220", 0, 9, 0x0}}, + {F, {"tlut221", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_111", 0x65BC}}, + {F, {"tlut222", 0, 9, 0x0}}, + {F, {"tlut223", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_112", 0x65C0}}, + {F, {"tlut224", 0, 9, 0x0}}, + {F, {"tlut225", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_113", 0x65C4}}, + {F, {"tlut226", 0, 9, 0x0}}, + {F, {"tlut227", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_114", 0x65C8}}, + {F, {"tlut228", 0, 9, 0x0}}, + {F, {"tlut229", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_115", 0x65CC}}, + {F, {"tlut230", 0, 9, 0x0}}, + {F, {"tlut231", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_116", 0x65D0}}, + {F, {"tlut232", 0, 9, 0x0}}, + {F, {"tlut233", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_117", 0x65D4}}, + {F, {"tlut234", 0, 9, 0x0}}, + {F, {"tlut235", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_118", 0x65D8}}, + {F, {"tlut236", 0, 9, 0x0}}, + {F, {"tlut237", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_119", 0x65DC}}, + {F, {"tlut238", 0, 9, 0x0}}, + {F, {"tlut239", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_120", 0x65E0}}, + {F, {"tlut240", 0, 9, 0x0}}, + {F, {"tlut241", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_121", 0x65E4}}, + {F, {"tlut242", 0, 9, 0x0}}, + {F, {"tlut243", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_122", 0x65E8}}, + {F, {"tlut244", 0, 9, 0x0}}, + {F, {"tlut245", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_123", 0x65EC}}, + {F, {"tlut246", 0, 9, 0x0}}, + {F, {"tlut247", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_124", 0x65F0}}, + {F, {"tlut248", 0, 9, 0x0}}, + {F, {"tlut249", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_125", 0x65F4}}, + {F, {"tlut250", 0, 9, 0x0}}, + {F, {"tlut251", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_126", 0x65F8}}, + {F, {"tlut252", 0, 9, 0x0}}, + {F, {"tlut253", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_127", 0x65FC}}, + {F, {"tlut254", 0, 9, 0x0}}, + {F, {"tlut255", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_128", 0x6600}}, + {F, {"tlut256", 0, 9, 0x0}}, + {F, {"tlut257", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_129", 0x6604}}, + {F, {"tlut258", 0, 9, 0x0}}, + {F, {"tlut259", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_130", 0x6608}}, + {F, {"tlut260", 0, 9, 0x0}}, + {F, {"tlut261", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_131", 0x660C}}, + {F, {"tlut262", 0, 9, 0x0}}, + {F, {"tlut263", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_132", 0x6610}}, + {F, {"tlut264", 0, 9, 0x0}}, + {F, {"tlut265", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_133", 0x6614}}, + {F, {"tlut266", 0, 9, 0x0}}, + {F, {"tlut267", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_134", 0x6618}}, + {F, {"tlut268", 0, 9, 0x0}}, + {F, {"tlut269", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_135", 0x661C}}, + {F, {"tlut270", 0, 9, 0x0}}, + {F, {"tlut271", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_136", 0x6620}}, + {F, {"tlut272", 0, 9, 0x0}}, + {F, {"tlut273", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_137", 0x6624}}, + {F, {"tlut274", 0, 9, 0x0}}, + {F, {"tlut275", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_138", 0x6628}}, + {F, {"tlut276", 0, 9, 0x0}}, + {F, {"tlut277", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_139", 0x662C}}, + {F, {"tlut278", 0, 9, 0x0}}, + {F, {"tlut279", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_140", 0x6630}}, + {F, {"tlut280", 0, 9, 0x0}}, + {F, {"tlut281", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_141", 0x6634}}, + {F, {"tlut282", 0, 9, 0x0}}, + {F, {"tlut283", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_142", 0x6638}}, + {F, {"tlut284", 0, 9, 0x0}}, + {F, {"tlut285", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_143", 0x663C}}, + {F, {"tlut286", 0, 9, 0x0}}, + {F, {"tlut287", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_144", 0x6640}}, + {F, {"tlut288", 0, 9, 0x0}}, + {F, {"tlut289", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_145", 0x6644}}, + {F, {"tlut290", 0, 9, 0x0}}, + {F, {"tlut291", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_146", 0x6648}}, + {F, {"tlut292", 0, 9, 0x0}}, + {F, {"tlut293", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_147", 0x664C}}, + {F, {"tlut294", 0, 9, 0x0}}, + {F, {"tlut295", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_148", 0x6650}}, + {F, {"tlut296", 0, 9, 0x0}}, + {F, {"tlut297", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_149", 0x6654}}, + {F, {"tlut298", 0, 9, 0x0}}, + {F, {"tlut299", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_150", 0x6658}}, + {F, {"tlut300", 0, 9, 0x0}}, + {F, {"tlut301", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_151", 0x665C}}, + {F, {"tlut302", 0, 9, 0x0}}, + {F, {"tlut303", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_152", 0x6660}}, + {F, {"tlut304", 0, 9, 0x0}}, + {F, {"tlut305", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_153", 0x6664}}, + {F, {"tlut306", 0, 9, 0x0}}, + {F, {"tlut307", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_154", 0x6668}}, + {F, {"tlut308", 0, 9, 0x0}}, + {F, {"tlut309", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_155", 0x666C}}, + {F, {"tlut310", 0, 9, 0x0}}, + {F, {"tlut311", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_156", 0x6670}}, + {F, {"tlut312", 0, 9, 0x0}}, + {F, {"tlut313", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_157", 0x6674}}, + {F, {"tlut314", 0, 9, 0x0}}, + {F, {"tlut315", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_158", 0x6678}}, + {F, {"tlut316", 0, 9, 0x0}}, + {F, {"tlut317", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_159", 0x667C}}, + {F, {"tlut318", 0, 9, 0x0}}, + {F, {"tlut319", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_160", 0x6680}}, + {F, {"tlut320", 0, 9, 0x0}}, + {F, {"tlut321", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_161", 0x6684}}, + {F, {"tlut322", 0, 9, 0x0}}, + {F, {"tlut323", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_162", 0x6688}}, + {F, {"tlut324", 0, 9, 0x0}}, + {F, {"tlut325", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_163", 0x668C}}, + {F, {"tlut326", 0, 9, 0x0}}, + {F, {"tlut327", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_164", 0x6690}}, + {F, {"tlut328", 0, 9, 0x0}}, + {F, {"tlut329", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_165", 0x6694}}, + {F, {"tlut330", 0, 9, 0x0}}, + {F, {"tlut331", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_166", 0x6698}}, + {F, {"tlut332", 0, 9, 0x0}}, + {F, {"tlut333", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_167", 0x669C}}, + {F, {"tlut334", 0, 9, 0x0}}, + {F, {"tlut335", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_168", 0x66A0}}, + {F, {"tlut336", 0, 9, 0x0}}, + {F, {"tlut337", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_169", 0x66A4}}, + {F, {"tlut338", 0, 9, 0x0}}, + {F, {"tlut339", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_170", 0x66A8}}, + {F, {"tlut340", 0, 9, 0x0}}, + {F, {"tlut341", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_171", 0x66AC}}, + {F, {"tlut342", 0, 9, 0x0}}, + {F, {"tlut343", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_172", 0x66B0}}, + {F, {"tlut344", 0, 9, 0x0}}, + {F, {"tlut345", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_173", 0x66B4}}, + {F, {"tlut346", 0, 9, 0x0}}, + {F, {"tlut347", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_174", 0x66B8}}, + {F, {"tlut348", 0, 9, 0x0}}, + {F, {"tlut349", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_175", 0x66BC}}, + {F, {"tlut350", 0, 9, 0x0}}, + {F, {"tlut351", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_176", 0x66C0}}, + {F, {"tlut352", 0, 9, 0x0}}, + {F, {"tlut353", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_177", 0x66C4}}, + {F, {"tlut354", 0, 9, 0x0}}, + {F, {"tlut355", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_178", 0x66C8}}, + {F, {"tlut356", 0, 9, 0x0}}, + {F, {"tlut357", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_179", 0x66CC}}, + {F, {"tlut358", 0, 9, 0x0}}, + {F, {"tlut359", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_180", 0x66D0}}, + {F, {"tlut360", 0, 9, 0x0}}, + {F, {"tlut361", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_181", 0x66D4}}, + {F, {"tlut362", 0, 9, 0x0}}, + {F, {"tlut363", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_182", 0x66D8}}, + {F, {"tlut364", 0, 9, 0x0}}, + {F, {"tlut365", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_183", 0x66DC}}, + {F, {"tlut366", 0, 9, 0x0}}, + {F, {"tlut367", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_184", 0x66E0}}, + {F, {"tlut368", 0, 9, 0x0}}, + {F, {"tlut369", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_185", 0x66E4}}, + {F, {"tlut370", 0, 9, 0x0}}, + {F, {"tlut371", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_186", 0x66E8}}, + {F, {"tlut372", 0, 9, 0x0}}, + {F, {"tlut373", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_187", 0x66EC}}, + {F, {"tlut374", 0, 9, 0x0}}, + {F, {"tlut375", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_188", 0x66F0}}, + {F, {"tlut376", 0, 9, 0x0}}, + {F, {"tlut377", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_189", 0x66F4}}, + {F, {"tlut378", 0, 9, 0x0}}, + {F, {"tlut379", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_190", 0x66F8}}, + {F, {"tlut380", 0, 9, 0x0}}, + {F, {"tlut381", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_191", 0x66FC}}, + {F, {"tlut382", 0, 9, 0x0}}, + {F, {"tlut383", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_192", 0x6700}}, + {F, {"tlut384", 0, 9, 0x0}}, + {F, {"tlut385", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_193", 0x6704}}, + {F, {"tlut386", 0, 9, 0x0}}, + {F, {"tlut387", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_194", 0x6708}}, + {F, {"tlut388", 0, 9, 0x0}}, + {F, {"tlut389", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_195", 0x670C}}, + {F, {"tlut390", 0, 9, 0x0}}, + {F, {"tlut391", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_196", 0x6710}}, + {F, {"tlut392", 0, 9, 0x0}}, + {F, {"tlut393", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_197", 0x6714}}, + {F, {"tlut394", 0, 9, 0x0}}, + {F, {"tlut395", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_198", 0x6718}}, + {F, {"tlut396", 0, 9, 0x0}}, + {F, {"tlut397", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_199", 0x671C}}, + {F, {"tlut398", 0, 9, 0x0}}, + {F, {"tlut399", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_200", 0x6720}}, + {F, {"tlut400", 0, 9, 0x0}}, + {F, {"tlut401", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_201", 0x6724}}, + {F, {"tlut402", 0, 9, 0x0}}, + {F, {"tlut403", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_202", 0x6728}}, + {F, {"tlut404", 0, 9, 0x0}}, + {F, {"tlut405", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_203", 0x672C}}, + {F, {"tlut406", 0, 9, 0x0}}, + {F, {"tlut407", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_204", 0x6730}}, + {F, {"tlut408", 0, 9, 0x0}}, + {F, {"tlut409", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_205", 0x6734}}, + {F, {"tlut410", 0, 9, 0x0}}, + {F, {"tlut411", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_206", 0x6738}}, + {F, {"tlut412", 0, 9, 0x0}}, + {F, {"tlut413", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_207", 0x673C}}, + {F, {"tlut414", 0, 9, 0x0}}, + {F, {"tlut415", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_208", 0x6740}}, + {F, {"tlut416", 0, 9, 0x0}}, + {F, {"tlut417", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_209", 0x6744}}, + {F, {"tlut418", 0, 9, 0x0}}, + {F, {"tlut419", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_210", 0x6748}}, + {F, {"tlut420", 0, 9, 0x0}}, + {F, {"tlut421", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_211", 0x674C}}, + {F, {"tlut422", 0, 9, 0x0}}, + {F, {"tlut423", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_212", 0x6750}}, + {F, {"tlut424", 0, 9, 0x0}}, + {F, {"tlut425", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_213", 0x6754}}, + {F, {"tlut426", 0, 9, 0x0}}, + {F, {"tlut427", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_214", 0x6758}}, + {F, {"tlut428", 0, 9, 0x0}}, + {F, {"tlut429", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_215", 0x675C}}, + {F, {"tlut430", 0, 9, 0x0}}, + {F, {"tlut431", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_216", 0x6760}}, + {F, {"tlut432", 0, 9, 0x0}}, + {F, {"tlut433", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_217", 0x6764}}, + {F, {"tlut434", 0, 9, 0x0}}, + {F, {"tlut435", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_218", 0x6768}}, + {F, {"tlut436", 0, 9, 0x0}}, + {F, {"tlut437", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_219", 0x676C}}, + {F, {"tlut438", 0, 9, 0x0}}, + {F, {"tlut439", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_220", 0x6770}}, + {F, {"tlut440", 0, 9, 0x0}}, + {F, {"tlut441", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_221", 0x6774}}, + {F, {"tlut442", 0, 9, 0x0}}, + {F, {"tlut443", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_222", 0x6778}}, + {F, {"tlut444", 0, 9, 0x0}}, + {F, {"tlut445", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_223", 0x677C}}, + {F, {"tlut446", 0, 9, 0x0}}, + {F, {"tlut447", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_224", 0x6780}}, + {F, {"tlut448", 0, 9, 0x0}}, + {F, {"tlut449", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_225", 0x6784}}, + {F, {"tlut450", 0, 9, 0x0}}, + {F, {"tlut451", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_226", 0x6788}}, + {F, {"tlut452", 0, 9, 0x0}}, + {F, {"tlut453", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_227", 0x678C}}, + {F, {"tlut454", 0, 9, 0x0}}, + {F, {"tlut455", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_228", 0x6790}}, + {F, {"tlut456", 0, 9, 0x0}}, + {F, {"tlut457", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_229", 0x6794}}, + {F, {"tlut458", 0, 9, 0x0}}, + {F, {"tlut459", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_230", 0x6798}}, + {F, {"tlut460", 0, 9, 0x0}}, + {F, {"tlut461", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_231", 0x679C}}, + {F, {"tlut462", 0, 9, 0x0}}, + {F, {"tlut463", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_232", 0x67A0}}, + {F, {"tlut464", 0, 9, 0x0}}, + {F, {"tlut465", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_233", 0x67A4}}, + {F, {"tlut466", 0, 9, 0x0}}, + {F, {"tlut467", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_234", 0x67A8}}, + {F, {"tlut468", 0, 9, 0x0}}, + {F, {"tlut469", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_235", 0x67AC}}, + {F, {"tlut470", 0, 9, 0x0}}, + {F, {"tlut471", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_236", 0x67B0}}, + {F, {"tlut472", 0, 9, 0x0}}, + {F, {"tlut473", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_237", 0x67B4}}, + {F, {"tlut474", 0, 9, 0x0}}, + {F, {"tlut475", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_238", 0x67B8}}, + {F, {"tlut476", 0, 9, 0x0}}, + {F, {"tlut477", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_239", 0x67BC}}, + {F, {"tlut478", 0, 9, 0x0}}, + {F, {"tlut479", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_240", 0x67C0}}, + {F, {"tlut480", 0, 9, 0x0}}, + {F, {"tlut481", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_241", 0x67C4}}, + {F, {"tlut482", 0, 9, 0x0}}, + {F, {"tlut483", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_242", 0x67C8}}, + {F, {"tlut484", 0, 9, 0x0}}, + {F, {"tlut485", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_243", 0x67CC}}, + {F, {"tlut486", 0, 9, 0x0}}, + {F, {"tlut487", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_244", 0x67D0}}, + {F, {"tlut488", 0, 9, 0x0}}, + {F, {"tlut489", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_245", 0x67D4}}, + {F, {"tlut490", 0, 9, 0x0}}, + {F, {"tlut491", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_246", 0x67D8}}, + {F, {"tlut492", 0, 9, 0x0}}, + {F, {"tlut493", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_247", 0x67DC}}, + {F, {"tlut494", 0, 9, 0x0}}, + {F, {"tlut495", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_248", 0x67E0}}, + {F, {"tlut496", 0, 9, 0x0}}, + {F, {"tlut497", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_249", 0x67E4}}, + {F, {"tlut498", 0, 9, 0x0}}, + {F, {"tlut499", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_250", 0x67E8}}, + {F, {"tlut500", 0, 9, 0x0}}, + {F, {"tlut501", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_251", 0x67EC}}, + {F, {"tlut502", 0, 9, 0x0}}, + {F, {"tlut503", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_252", 0x67F0}}, + {F, {"tlut504", 0, 9, 0x0}}, + {F, {"tlut505", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_253", 0x67F4}}, + {F, {"tlut506", 0, 9, 0x0}}, + {F, {"tlut507", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_254", 0x67F8}}, + {F, {"tlut508", 0, 9, 0x0}}, + {F, {"tlut509", 16, 9, 0x0}}, + + {R, {"IMX636/erc/t_drop_lut_255", 0x67FC}}, + {F, {"tlut510", 0, 9, 0x0}}, + {F, {"tlut511", 16, 9, 0x0}}, + + {R, {"IMX636/erc/Reserved_6800", 0x6800}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6804", 0x6804}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6808", 0x6808}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_680C", 0x680C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6810", 0x6810}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6814", 0x6814}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6818", 0x6818}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_681C", 0x681C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6820", 0x6820}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6824", 0x6824}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6828", 0x6828}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_682C", 0x682C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6830", 0x6830}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6834", 0x6834}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6838", 0x6838}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_683C", 0x683C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6840", 0x6840}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6844", 0x6844}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6848", 0x6848}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_684C", 0x684C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6850", 0x6850}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6854", 0x6854}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6858", 0x6858}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_685C", 0x685C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6860", 0x6860}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6864", 0x6864}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6868", 0x6868}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_686C", 0x686C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6870", 0x6870}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6874", 0x6874}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6878", 0x6878}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_687C", 0x687C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6880", 0x6880}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6884", 0x6884}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6888", 0x6888}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_688C", 0x688C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6890", 0x6890}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6894", 0x6894}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6898", 0x6898}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_689C", 0x689C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_68A0", 0x68A0}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_68A4", 0x68A4}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_68A8", 0x68A8}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_68AC", 0x68AC}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_68B0", 0x68B0}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_68B4", 0x68B4}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_68B8", 0x68B8}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_68BC", 0x68BC}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_68C0", 0x68C0}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_68C4", 0x68C4}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_68C8", 0x68C8}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_68CC", 0x68CC}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_68D0", 0x68D0}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_68D4", 0x68D4}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_68D8", 0x68D8}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_68DC", 0x68DC}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_68E0", 0x68E0}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_68E4", 0x68E4}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_68E8", 0x68E8}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_68EC", 0x68EC}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_68F0", 0x68F0}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_68F4", 0x68F4}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_68F8", 0x68F8}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_68FC", 0x68FC}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6900", 0x6900}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6904", 0x6904}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6908", 0x6908}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_690C", 0x690C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6910", 0x6910}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6914", 0x6914}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6918", 0x6918}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_691C", 0x691C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6920", 0x6920}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6924", 0x6924}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6928", 0x6928}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_692C", 0x692C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6930", 0x6930}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6934", 0x6934}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6938", 0x6938}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_693C", 0x693C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6940", 0x6940}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6944", 0x6944}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6948", 0x6948}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_694C", 0x694C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6950", 0x6950}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6954", 0x6954}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6958", 0x6958}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_695C", 0x695C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6960", 0x6960}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6964", 0x6964}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6968", 0x6968}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_696C", 0x696C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6970", 0x6970}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6974", 0x6974}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6978", 0x6978}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_697C", 0x697C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6980", 0x6980}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6984", 0x6984}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6988", 0x6988}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_698C", 0x698C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6990", 0x6990}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6994", 0x6994}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6998", 0x6998}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_699C", 0x699C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_69A0", 0x69A0}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_69A4", 0x69A4}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_69A8", 0x69A8}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_69AC", 0x69AC}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_69B0", 0x69B0}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_69B4", 0x69B4}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_69B8", 0x69B8}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_69BC", 0x69BC}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_69C0", 0x69C0}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_69C4", 0x69C4}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_69C8", 0x69C8}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_69CC", 0x69CC}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_69D0", 0x69D0}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_69D4", 0x69D4}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_69D8", 0x69D8}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_69DC", 0x69DC}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_69E0", 0x69E0}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_69E4", 0x69E4}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_69E8", 0x69E8}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_69EC", 0x69EC}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_69F0", 0x69F0}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_69F4", 0x69F4}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_69F8", 0x69F8}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_69FC", 0x69FC}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6A00", 0x6A00}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6A04", 0x6A04}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6A08", 0x6A08}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6A0C", 0x6A0C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6A10", 0x6A10}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6A14", 0x6A14}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6A18", 0x6A18}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6A1C", 0x6A1C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6A20", 0x6A20}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6A24", 0x6A24}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6A28", 0x6A28}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6A2C", 0x6A2C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6A30", 0x6A30}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6A34", 0x6A34}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6A38", 0x6A38}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6A3C", 0x6A3C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6A40", 0x6A40}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6A44", 0x6A44}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6A48", 0x6A48}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6A4C", 0x6A4C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6A50", 0x6A50}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6A54", 0x6A54}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6A58", 0x6A58}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6A5C", 0x6A5C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6A60", 0x6A60}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6A64", 0x6A64}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6A68", 0x6A68}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6A6C", 0x6A6C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6A70", 0x6A70}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6A74", 0x6A74}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6A78", 0x6A78}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6A7C", 0x6A7C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6A80", 0x6A80}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6A84", 0x6A84}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6A88", 0x6A88}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6A8C", 0x6A8C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6A90", 0x6A90}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6A94", 0x6A94}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6A98", 0x6A98}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6A9C", 0x6A9C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6AA0", 0x6AA0}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6AA4", 0x6AA4}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6AA8", 0x6AA8}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6AAC", 0x6AAC}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6AB0", 0x6AB0}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6AB4", 0x6AB4}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6AB8", 0x6AB8}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6ABC", 0x6ABC}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6AC0", 0x6AC0}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6AC4", 0x6AC4}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6AC8", 0x6AC8}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6ACC", 0x6ACC}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6AD0", 0x6AD0}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6AD4", 0x6AD4}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6AD8", 0x6AD8}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6ADC", 0x6ADC}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6AE0", 0x6AE0}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6AE4", 0x6AE4}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6AE8", 0x6AE8}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6AEC", 0x6AEC}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6AF0", 0x6AF0}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6AF4", 0x6AF4}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6AF8", 0x6AF8}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6AFC", 0x6AFC}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6B00", 0x6B00}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6B04", 0x6B04}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6B08", 0x6B08}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6B0C", 0x6B0C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6B10", 0x6B10}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6B14", 0x6B14}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6B18", 0x6B18}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6B1C", 0x6B1C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6B20", 0x6B20}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6B24", 0x6B24}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6B28", 0x6B28}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6B2C", 0x6B2C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6B30", 0x6B30}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6B34", 0x6B34}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6B38", 0x6B38}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6B3C", 0x6B3C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6B40", 0x6B40}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6B44", 0x6B44}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6B48", 0x6B48}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6B4C", 0x6B4C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6B50", 0x6B50}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6B54", 0x6B54}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6B58", 0x6B58}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6B5C", 0x6B5C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6B60", 0x6B60}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6B64", 0x6B64}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6B68", 0x6B68}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6B6C", 0x6B6C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6B70", 0x6B70}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6B74", 0x6B74}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6B78", 0x6B78}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6B7C", 0x6B7C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6B80", 0x6B80}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6B84", 0x6B84}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6B88", 0x6B88}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6B8C", 0x6B8C}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6B90", 0x6B90}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/erc/Reserved_6B94", 0x6B94}}, + {F, {"Reserved_5_0", 0, 6, 0x0}}, + {F, {"Reserved_13_8", 8, 6, 0x0}}, + {F, {"Reserved_21_16", 16, 6, 0x0}}, + {F, {"Reserved_29_24", 24, 6, 0x0}}, + + {R, {"IMX636/edf/pipeline_control", 0x7000}}, + {F, {"Reserved_0", 0, 1, 0x1}}, + {F, {"format", 1, 1, 0x0}}, + {F, {"Reserved_2", 2, 1, 0x0}}, + {F, {"Reserved_3", 3, 1, 0x0}}, + {F, {"Reserved_4", 4, 1, 0x0}}, + {F, {"Reserved_31_16", 16, 16, 0xFFFF}}, + + {R, {"IMX636/edf/Reserved_7004", 0x7004}}, + {F, {"Reserved_10", 10, 1, 0x1}}, + + {R, {"IMX636/ro/readout_ctrl", 0x9000}}, + {F, {"Reserved_0", 0, 1, 0x0}}, + {F, {"ro_td_self_test_en", 1, 1, 0x0}}, + {F, {"Reserved_3", 3, 1, 0x1}}, + {F, {"Reserved_4", 4, 1, 0x0}}, + {F, {"ro_inv_pol_td", 5, 1, 0x0}}, + {F, {"Reserved_7_6", 6, 2, 0x0}}, + {F, {"Reserved_31_8", 8, 24, 0x2}}, + + {R, {"IMX636/ro/ro_fsm_ctrl", 0x9004}}, + {F, {"readout_wait", 0, 16, 0x1E}}, + {F, {"Reserved_31_16", 16, 16, 0x0}}, + + {R, {"IMX636/ro/time_base_ctrl", 0x9008}}, + {F, {"time_base_enable", 0, 1, 0x0}}, + {F, {"time_base_mode", 1, 1, 0x0}}, + {F, {"external_mode", 2, 1, 0x0}}, + {F, {"external_mode_enable", 3, 1, 0x0}}, + {F, {"Reserved_10_4", 4, 7, 0x64}}, + + {R, {"IMX636/ro/dig_ctrl", 0x900C}}, + {F, {"dig_crop_enable", 0, 3, 0x0}}, + {F, {"Reserved_31_5", 5, 27, 0x0}}, + + {R, {"IMX636/ro/dig_start_pos", 0x9010}}, + {F, {"dig_crop_start_x", 0, 11, 0x0}}, + {F, {"dig_crop_start_y", 16, 10, 0x0}}, + + {R, {"IMX636/ro/dig_end_pos", 0x9014}}, + {F, {"dig_crop_end_x", 0, 11, 0x0}}, + {F, {"dig_crop_end_y", 16, 10, 0x0}}, + + {R, {"IMX636/ro/ro_ctrl", 0x9028}}, + {F, {"area_cnt_en", 0, 1, 0x0}}, + {F, {"output_disable", 1, 1, 0x0}}, + {F, {"keep_th", 2, 1, 0x0}}, + + {R, {"IMX636/ro/area_x0_addr", 0x902C}}, + {F, {"x0_addr", 0, 11, 0x0}}, + + {R, {"IMX636/ro/area_x1_addr", 0x9030}}, + {F, {"x1_addr", 0, 11, 0x140}}, + + {R, {"IMX636/ro/area_x2_addr", 0x9034}}, + {F, {"x2_addr", 0, 11, 0x280}}, + + {R, {"IMX636/ro/area_x3_addr", 0x9038}}, + {F, {"x3_addr", 0, 11, 0x3C0}}, + + {R, {"IMX636/ro/area_x4_addr", 0x903C}}, + {F, {"x4_addr", 0, 11, 0x500}}, + + {R, {"IMX636/ro/area_y0_addr", 0x9040}}, + {F, {"y0_addr", 0, 11, 0x0}}, + + {R, {"IMX636/ro/area_y1_addr", 0x9044}}, + {F, {"y1_addr", 0, 11, 0xB4}}, + + {R, {"IMX636/ro/area_y2_addr", 0x9048}}, + {F, {"y2_addr", 0, 11, 0x168}}, + + {R, {"IMX636/ro/area_y3_addr", 0x904C}}, + {F, {"y3_addr", 0, 11, 0x21C}}, + + {R, {"IMX636/ro/area_y4_addr", 0x9050}}, + {F, {"y4_addr", 0, 11, 0x2D0}}, + + {R, {"IMX636/ro/counter_ctrl", 0x9054}}, + {F, {"count_en", 0, 1, 0x0}}, + {F, {"Reserved_1", 1, 1, 0x0}}, + {F, {"Reserved_2", 2, 1, 0x1}}, + + {R, {"IMX636/ro/counter_timer_threshold", 0x9058}}, + {F, {"timer_threshold", 0, 32, 0x3E8}}, + + {R, {"IMX636/ro/digital_mask_pixel_00", 0x9100}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"IMX636/ro/digital_mask_pixel_01", 0x9104}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"IMX636/ro/digital_mask_pixel_02", 0x9108}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"IMX636/ro/digital_mask_pixel_03", 0x910C}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"IMX636/ro/digital_mask_pixel_04", 0x9110}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"IMX636/ro/digital_mask_pixel_05", 0x9114}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"IMX636/ro/digital_mask_pixel_06", 0x9118}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"IMX636/ro/digital_mask_pixel_07", 0x911C}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"IMX636/ro/digital_mask_pixel_08", 0x9120}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"IMX636/ro/digital_mask_pixel_09", 0x9124}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"IMX636/ro/digital_mask_pixel_10", 0x9128}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"IMX636/ro/digital_mask_pixel_11", 0x912C}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"IMX636/ro/digital_mask_pixel_12", 0x9130}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"IMX636/ro/digital_mask_pixel_13", 0x9134}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"IMX636/ro/digital_mask_pixel_14", 0x9138}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"IMX636/ro/digital_mask_pixel_15", 0x913C}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"IMX636/ro/digital_mask_pixel_16", 0x9140}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"IMX636/ro/digital_mask_pixel_17", 0x9144}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"IMX636/ro/digital_mask_pixel_18", 0x9148}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"IMX636/ro/digital_mask_pixel_19", 0x914C}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"IMX636/ro/digital_mask_pixel_20", 0x9150}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"IMX636/ro/digital_mask_pixel_21", 0x9154}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"IMX636/ro/digital_mask_pixel_22", 0x9158}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"IMX636/ro/digital_mask_pixel_23", 0x915C}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"IMX636/ro/digital_mask_pixel_24", 0x9160}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"IMX636/ro/digital_mask_pixel_25", 0x9164}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"IMX636/ro/digital_mask_pixel_26", 0x9168}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"IMX636/ro/digital_mask_pixel_27", 0x916C}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"IMX636/ro/digital_mask_pixel_28", 0x9170}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"IMX636/ro/digital_mask_pixel_29", 0x9174}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"IMX636/ro/digital_mask_pixel_30", 0x9178}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"IMX636/ro/digital_mask_pixel_31", 0x917C}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"IMX636/ro/digital_mask_pixel_32", 0x9180}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"IMX636/ro/digital_mask_pixel_33", 0x9184}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"IMX636/ro/digital_mask_pixel_34", 0x9188}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"IMX636/ro/digital_mask_pixel_35", 0x918C}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"IMX636/ro/digital_mask_pixel_36", 0x9190}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"IMX636/ro/digital_mask_pixel_37", 0x9194}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"IMX636/ro/digital_mask_pixel_38", 0x9198}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"IMX636/ro/digital_mask_pixel_39", 0x919C}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"IMX636/ro/digital_mask_pixel_40", 0x91A0}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"IMX636/ro/digital_mask_pixel_41", 0x91A4}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"IMX636/ro/digital_mask_pixel_42", 0x91A8}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"IMX636/ro/digital_mask_pixel_43", 0x91AC}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"IMX636/ro/digital_mask_pixel_44", 0x91B0}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"IMX636/ro/digital_mask_pixel_45", 0x91B4}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"IMX636/ro/digital_mask_pixel_46", 0x91B8}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"IMX636/ro/digital_mask_pixel_47", 0x91BC}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"IMX636/ro/digital_mask_pixel_48", 0x91C0}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"IMX636/ro/digital_mask_pixel_49", 0x91C4}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"IMX636/ro/digital_mask_pixel_50", 0x91C8}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"IMX636/ro/digital_mask_pixel_51", 0x91CC}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"IMX636/ro/digital_mask_pixel_52", 0x91D0}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"IMX636/ro/digital_mask_pixel_53", 0x91D4}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"IMX636/ro/digital_mask_pixel_54", 0x91D8}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"IMX636/ro/digital_mask_pixel_55", 0x91DC}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"IMX636/ro/digital_mask_pixel_56", 0x91E0}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"IMX636/ro/digital_mask_pixel_57", 0x91E4}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"IMX636/ro/digital_mask_pixel_58", 0x91E8}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"IMX636/ro/digital_mask_pixel_59", 0x91EC}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"IMX636/ro/digital_mask_pixel_60", 0x91F0}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"IMX636/ro/digital_mask_pixel_61", 0x91F4}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"IMX636/ro/digital_mask_pixel_62", 0x91F8}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"IMX636/ro/digital_mask_pixel_63", 0x91FC}}, + {F, {"x", 0, 11, 0x0}}, + {F, {"y", 16, 11, 0x0}}, + {F, {"valid", 31, 1, 0x0}}, + + {R, {"IMX636/ro/area_cnt00", 0x9200}}, + {F, {"area_cnt_val_00", 0, 32, 0x0}}, + + {R, {"IMX636/ro/area_cnt01", 0x9204}}, + {F, {"area_cnt_val_01", 0, 32, 0x0}}, + + {R, {"IMX636/ro/area_cnt02", 0x9208}}, + {F, {"area_cnt_val_02", 0, 32, 0x0}}, + + {R, {"IMX636/ro/area_cnt03", 0x920C}}, + {F, {"area_cnt_val_03", 0, 32, 0x0}}, + + {R, {"IMX636/ro/area_cnt04", 0x9210}}, + {F, {"area_cnt_val_04", 0, 32, 0x0}}, + + {R, {"IMX636/ro/area_cnt05", 0x9214}}, + {F, {"area_cnt_val_05", 0, 32, 0x0}}, + + {R, {"IMX636/ro/area_cnt06", 0x9218}}, + {F, {"area_cnt_val_06", 0, 32, 0x0}}, + + {R, {"IMX636/ro/area_cnt07", 0x921C}}, + {F, {"area_cnt_val_07", 0, 32, 0x0}}, + + {R, {"IMX636/ro/area_cnt08", 0x9220}}, + {F, {"area_cnt_val_08", 0, 32, 0x0}}, + + {R, {"IMX636/ro/area_cnt09", 0x9224}}, + {F, {"area_cnt_val_09", 0, 32, 0x0}}, + + {R, {"IMX636/ro/area_cnt10", 0x9228}}, + {F, {"area_cnt_val_10", 0, 32, 0x0}}, + + {R, {"IMX636/ro/area_cnt11", 0x922C}}, + {F, {"area_cnt_val_11", 0, 32, 0x0}}, + + {R, {"IMX636/ro/area_cnt12", 0x9230}}, + {F, {"area_cnt_val_12", 0, 32, 0x0}}, + + {R, {"IMX636/ro/area_cnt13", 0x9234}}, + {F, {"area_cnt_val_13", 0, 32, 0x0}}, + + {R, {"IMX636/ro/area_cnt14", 0x9238}}, + {F, {"area_cnt_val_14", 0, 32, 0x0}}, + + {R, {"IMX636/ro/area_cnt15", 0x923C}}, + {F, {"area_cnt_val_15", 0, 32, 0x0}}, + + {R, {"IMX636/ro/evt_vector_cnt_val", 0x9244}}, + {F, {"evt_vector_cnt_val", 0, 32, 0x0}}, + + {R, {"IMX636/mipi_csi/mipi_control", 0xB000}}, + {F, {"mipi_csi_enable", 0, 1, 0x0}}, + {F, {"Reserved_1", 1, 1, 0x0}}, + {F, {"Reserved_2", 2, 1, 0x0}}, + {F, {"mipi_data_lane1", 3, 1, 0x1}}, + {F, {"mipi_data_lane2", 4, 1, 0x1}}, + {F, {"mipi_packet_timeout_enable", 5, 1, 0x0}}, + {F, {"line_blanking_clk_disable", 6, 1, 0x1}}, + {F, {"Reserved_7", 7, 1, 0x0}}, + {F, {"Reserved_8", 8, 1, 0x1}}, + {F, {"frame_blanking_en", 9, 1, 0x0}}, + {F, {"Reserved_31_10", 10, 22, 0x0}}, + + {R, {"IMX636/mipi_csi/mipi_packet_size", 0xB020}}, + {F, {"mipi_packet_size", 0, 15, 0x2000}}, + + {R, {"IMX636/mipi_csi/mipi_packet_timeout", 0xB024}}, + {F, {"mipi_packet_timeout", 0, 16, 0x40}}, + + {R, {"IMX636/mipi_csi/mipi_frame_period", 0xB028}}, + {F, {"mipi_frame_period", 4, 12, 0x7D}}, + + {R, {"IMX636/mipi_csi/mipi_frame_blanking", 0xB030}}, + {F, {"mipi_frame_blanking", 0, 16, 0x0}}, + + {R, {"IMX636/afk/pipeline_control", 0xC000}}, + {F, {"afk_en", 0, 3, 0x0}}, + + {R, {"IMX636/afk/Reserved_C004", 0xC004}}, + {F, {"Reserved_6", 6, 1, 0x0}}, + + {R, {"IMX636/afk/filter_period", 0xC008}}, + {F, {"min_cutoff_period", 0, 8, 0xF}}, + {F, {"max_cutoff_period", 8, 8, 0x9C}}, + {F, {"Reserved_19_16", 16, 4, 0x8}}, + + {R, {"IMX636/afk/invalidation", 0xC0C0}}, + {F, {"dt_fifo_wait_time", 0, 12, 0x5A0}}, + {F, {"Reserved_23_12", 12, 12, 0x5A}}, + {F, {"Reserved_27_24", 24, 4, 0xA}}, + {F, {"Reserved_28", 28, 1, 0x0}}, + + {R, {"IMX636/afk/initialization", 0xC0C4}}, + {F, {"afk_req_init", 0, 1, 0x0}}, + {F, {"Reserved_1", 1, 1, 0x0}}, + {F, {"afk_flag_init_done", 2, 1, 0x0}}, + + {R, {"IMX636/stc/pipeline_control", 0xD000}}, + {F, {"stc_trail_bypass", 0, 3, 0x0}}, + + {R, {"IMX636/stc/stc_param", 0xD004}}, + {F, {"stc_enable", 0, 1, 0x0}}, + {F, {"stc_threshold", 1, 19, 0x2710}}, + {F, {"disable_stc_cut_trail1", 24, 1, 0x0}}, + + {R, {"IMX636/stc/trail_param", 0xD008}}, + {F, {"trail_enable", 0, 1, 0x0}}, + {F, {"trail_threshold", 1, 19, 0x186A0}}, + + {R, {"IMX636/stc/timestamping", 0xD00C}}, + {F, {"prescaler", 0, 5, 0xD}}, + {F, {"multiplier", 5, 4, 0x1}}, + {F, {"Reserved_9", 9, 1, 0x1}}, + {F, {"disable_stc_cut_trail2", 16, 1, 0x0}}, + + {R, {"IMX636/stc/Reserved_D0C0", 0xD0C0}}, + {F, {"Reserved_23_12", 12, 12, 0x118}}, + + {R, {"IMX636/stc/initialization", 0xD0C4}}, + {F, {"stc_req_init", 0, 1, 0x0}}, + {F, {"Reserved_1", 1, 1, 0x0}}, + {F, {"stc_flag_init_done", 2, 1, 0x0}}, + + {R, {"IMX636/slvs/slvs_control", 0xE000}}, + {F, {"slvs_llp_enable", 0, 1, 0x0}}, + {F, {"Reserved_1", 1, 1, 0x0}}, + {F, {"Reserved_2", 2, 1, 0x1}}, + {F, {"slvs_packet_timeout_enable", 5, 1, 0x0}}, + {F, {"Reserved_8", 8, 1, 0x1}}, + {F, {"slvs_frame_blanking_en", 9, 1, 0x0}}, + + {R, {"IMX636/slvs/slvs_packet_size", 0xE020}}, + {F, {"slvs_packet_size", 0, 14, 0x1000}}, + + {R, {"IMX636/slvs/slvs_packet_timeout", 0xE024}}, + {F, {"slvs_packet_timeout", 0, 16, 0x40}}, + + {R, {"IMX636/slvs/slvs_frame_blanking", 0xE030}}, + {F, {"slvs_frame_blanking", 0, 16, 0x0}}, + + {R, {"IMX636/slvs/slvs_phy_logic_ctrl_00", 0xE150}}, + {F, {"oportsel", 0, 2, 0x0}} + + // clang-format on +}; + +unsigned int Imx636Evk3RegisterMapSize = sizeof(Imx636Evk3RegisterMap)/sizeof(Imx636Evk3RegisterMap[0]); + +#endif // METAVISION_HAL_IMX636_EVK3_REGISTERMAP_H diff --git a/hal_psee_plugins/include/devices/others/i2c_eeprom.h b/hal_psee_plugins/include/devices/others/i2c_eeprom.h new file mode 100644 index 000000000..bf5719c04 --- /dev/null +++ b/hal_psee_plugins/include/devices/others/i2c_eeprom.h @@ -0,0 +1,34 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include "cstdint" +#include +#include + +enum class I2cEepromCmd : uint8_t { + WRITE = 0xBA, + READ = 0xBB, + STATUS = 0xBC, +}; + +class I2cEeprom { +public: + uint8_t dev_addr_; + uint32_t mem_addr_max_ = 0x1FFFF; + uint32_t mem_size_ = mem_addr_max_ * 8; + uint16_t mem_page_size_ = 256; + + I2cEeprom(uint8_t addr); + ~I2cEeprom(); + int read(libusb_device_handle *dev_handle, uint32_t mem_addr, std::vector &vread, unsigned int bytes); + int write(libusb_device_handle *dev_handle, uint32_t mem_addr, std::vector &vdata); + int get_status(libusb_device_handle *dev_handle); +}; diff --git a/hal_psee_plugins/include/devices/treuzell/ti_tmp103.h b/hal_psee_plugins/include/devices/treuzell/ti_tmp103.h new file mode 100644 index 000000000..c42a7dd6c --- /dev/null +++ b/hal_psee_plugins/include/devices/treuzell/ti_tmp103.h @@ -0,0 +1,42 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_TI_TMP103_H +#define METAVISION_HAL_TI_TMP103_H + +#include "devices/treuzell/tz_device.h" +#include "facilities/tz_monitoring.h" + +namespace Metavision { + +class DeviceBuilder; +class DeviceBuilderParameters; +class DeviceConfig; + +class TiTmp103 : public TzDevice, public TemperatureProvider { +public: + TiTmp103(std::shared_ptr cmd, uint32_t dev_id, std::shared_ptr parent); + virtual ~TiTmp103(); + static std::shared_ptr build(std::shared_ptr cmd, uint32_t dev_id, + std::shared_ptr parent); + + virtual void start(); + virtual void stop(); + virtual StreamFormat get_output_format(); + virtual int get_temperature(); + +protected: + virtual void spawn_facilities(DeviceBuilder &device_builder); +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_TI_TMP103_H diff --git a/hal_psee_plugins/include/devices/treuzell/tz_device.h b/hal_psee_plugins/include/devices/treuzell/tz_device.h new file mode 100644 index 000000000..fb7eb04f9 --- /dev/null +++ b/hal_psee_plugins/include/devices/treuzell/tz_device.h @@ -0,0 +1,94 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef TZ_DEVICE_H +#define TZ_DEVICE_H + +#include +#include +#include +#include +#include +#include + +#include "metavision/hal/facilities/i_hw_identification.h" +#include "metavision/hal/facilities/i_geometry.h" +#include "metavision/hal/utils/device_builder.h" + +namespace Metavision { + +class DeviceBuilder; +class DeviceConfig; +class TzLibUSBBoardCommand; +class TzDeviceBuilder; +class LibUSBContext; + +class TzDevice : public std::enable_shared_from_this { +public: + struct StreamFormat { + std::string name; + std::unique_ptr geometry; + }; + std::string get_name(); + std::vector get_compatible(); + virtual void get_device_info(I_HW_Identification::SystemInfo &info, std::string prefix); + virtual StreamFormat get_output_format() = 0; + + virtual void start() = 0; + virtual void stop() = 0; + +protected: + TzDevice(std::shared_ptr cmd, uint32_t dev_id, std::shared_ptr parent); + /* to be called by the TzDeviceBuilder, once the shared pointer on the TzDevice exists */ + virtual void spawn_facilities(DeviceBuilder &device_builder) = 0; + virtual ~TzDevice(); + std::shared_ptr parent; + std::weak_ptr child; + std::shared_ptr cmd; + uint32_t tzID; + friend TzDeviceBuilder; +}; + +class TzDeviceBuilder { +public: + using Build_Fun = std::function(std::shared_ptr, uint32_t id, + std::shared_ptr parent)>; + using Check_Fun = std::function, uint32_t id)>; + void insert(std::string key, Build_Fun method, Check_Fun buildable = nullptr) { + map.insert({key, {method, buildable}}); + } + bool can_build(std::shared_ptr); + bool can_build_device(std::shared_ptr, uint32_t dev_id); + /****************************************************************************************************************** + The builder is meant to evolve to be able to manage future use cases: + * builder will, for the board having the required serial, build a TzDevice for every device plugged on the board. + * TzDevice derivated classes will implement, when necessary, the init/start/stop/destroy (ISSD) sequencies for the + device, and spawn the facilities as defined by Metavision HAL. + * As the TzDevice need to give a reference of itself to the facilities, and the lifetime of objects is managed + using shared pointers, the constructor is protected, and the construction is done through a static method. + * The order of device build may be important as some devices depend on others for power or clock. Today, it is + assumed that building it treuzell index order is fine, but, if needed, commands may be added in Treuzell to + describe chaining. The builder shall build device in appropriate order. At some point, some devices may choose + how to build others, it is not implemented yet, but suggested implementation, if needed, would be to add a + specific interface to devices requiring this, and detect it through runtine type information (rtti) + * The builder will also spawn the device control and propagate start/stop as needed. The propagation mechanism will + be strictly internal, and can be rewritten to manage multiple successors if needed at some point in the future. + ******************************************************************************************************************/ + bool build_devices(std::shared_ptr cmd, DeviceBuilder &device_builder, + const DeviceConfig &config); + +private: + std::unordered_map> map; + friend TzDevice; +}; + +} // namespace Metavision +#endif /* TZ_DEVICE_H */ diff --git a/hal_psee_plugins/include/devices/treuzell/tz_device_control.h b/hal_psee_plugins/include/devices/treuzell/tz_device_control.h new file mode 100644 index 000000000..b5a82ffe9 --- /dev/null +++ b/hal_psee_plugins/include/devices/treuzell/tz_device_control.h @@ -0,0 +1,69 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_TZ_DEVICE_CONTROL_H +#define METAVISION_HAL_TZ_DEVICE_CONTROL_H + +#include +#include + +#include "metavision/hal/facilities/i_device_control.h" + +namespace Metavision { + +class TzDevice; + +/// @brief Device Control facility controls camera mode and allows to start, reset and stop it. +class TzDeviceControl : public I_DeviceControl { +public: + TzDeviceControl(std::vector> &devices); + ~TzDeviceControl(); + + /// @brief Restarts the device and the connection with it + virtual void reset() override final; + + /// @brief Starts the generation of events from the camera side + /// @warning All triggers will be disabled at stop. User should re-enable required triggers before start. + virtual void start() override final; + + /// @brief Stops the generation of events from the camera side + virtual void stop() override final; + + /// @brief Sets the camera in standalone mode. + /// + /// The camera does not interact with other devices. + /// @return true on success + virtual bool set_mode_standalone() override final; + + /// @brief Sets the camera as master + /// + /// The camera sends clock signal to another device + /// @return true on success + virtual bool set_mode_master() override final; + + /// @brief Sets the camera as slave + /// + /// The camera receives the clock from another device + /// @return true on success + virtual bool set_mode_slave() override final; + + /// @brief Retrieves Synchronization mode + /// @return synchronization mode + virtual SyncMode get_mode() override final; + +private: + bool streaming_; + std::vector> devices_; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_TZ_DEVICE_CONTROL_H diff --git a/hal_psee_plugins/include/devices/treuzell/tz_issd_device.h b/hal_psee_plugins/include/devices/treuzell/tz_issd_device.h new file mode 100644 index 000000000..48ca1b35f --- /dev/null +++ b/hal_psee_plugins/include/devices/treuzell/tz_issd_device.h @@ -0,0 +1,40 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_TZ_ISSD_DEVICE_H +#define METAVISION_HAL_TZ_ISSD_DEVICE_H + +#include "devices/treuzell/tz_regmap_device.h" + +namespace Metavision { + +class RegisterOperation; +struct Issd; + +class TzIssdDevice : public virtual TzDeviceWithRegmap { +public: + TzIssdDevice(const Issd &issd); + virtual ~TzIssdDevice(); + + virtual void start(); + virtual void stop(); + +private: + void initialize(); + void destroy(); + void ApplyRegisterOperationSequence(const std::vector sequence); + void ApplyRegisterOperation(const RegisterOperation operation); + const Issd &issd; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_TZ_ISSD_DEVICE_H diff --git a/hal_psee_plugins/include/devices/treuzell/tz_main_device.h b/hal_psee_plugins/include/devices/treuzell/tz_main_device.h new file mode 100644 index 000000000..f158c5c0b --- /dev/null +++ b/hal_psee_plugins/include/devices/treuzell/tz_main_device.h @@ -0,0 +1,67 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef TZ_MAIN_DEVICE_H +#define TZ_MAIN_DEVICE_H + +#include "metavision/hal/facilities/i_device_control.h" +#include "metavision/hal/facilities/i_hw_identification.h" + +namespace Metavision { + +// This is an interface for the pipeline element that will implement sensor modes +class TzMainDevice { +public: + /// @brief Get the system ID of the device. + /// + /// Prophesee FPGA designs have a system ID, on other system, use a hard-coded value. + /// @return the system ID + virtual long get_system_id() const { + return 0; + } + + /// @brief Sets the camera in standalone mode. + /// + /// The camera does not interact with other devices. + /// @return true on success + virtual bool set_mode_standalone() = 0; + + /// @brief Sets the camera as master + /// + /// The camera sends clock signal to another device + /// @return true on success + virtual bool set_mode_master() = 0; + + /// @brief Sets the camera as slave + /// + /// The camera receives the clock from another device + /// @return true on success + virtual bool set_mode_slave() = 0; + + /// @brief Retrieves Synchronization mode + /// @return synchronization mode + virtual I_DeviceControl::SyncMode get_mode() = 0; + + /// @brief Provides information on the sensor used in the system + /// + /// Allow to get hardware information such as the sensor generation + /// @return a filled SensorInfo structure + virtual I_HW_Identification::SensorInfo get_sensor_info() = 0; + + /// @brief Returns the version number for this system + /// @return System version as an integer + virtual long get_system_version() const { + return 0; + } +}; + +} // namespace Metavision +#endif /* TZ_MAIN_DEVICE_H */ diff --git a/hal_psee_plugins/include/devices/treuzell/tz_psee_fpga_device.h b/hal_psee_plugins/include/devices/treuzell/tz_psee_fpga_device.h new file mode 100644 index 000000000..8e815d098 --- /dev/null +++ b/hal_psee_plugins/include/devices/treuzell/tz_psee_fpga_device.h @@ -0,0 +1,31 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_TZ_PSEE_FPGA_DEVICE_H +#define METAVISION_HAL_TZ_PSEE_FPGA_DEVICE_H + +#include "devices/treuzell/tz_device.h" + +namespace Metavision { + +class TzPseeFpgaDevice : public virtual TzDevice { +public: + TzPseeFpgaDevice(); + virtual void get_device_info(I_HW_Identification::SystemInfo &info, std::string prefix); + uint32_t get_system_id() const; + uint32_t get_system_version() const; + uint32_t get_system_build_date() const; + uint32_t get_system_version_control_id() const; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_TZ_PSEE_FPGA_DEVICE_H diff --git a/hal_openeb_plugins/include/common/raw_file_discovery.h b/hal_psee_plugins/include/devices/treuzell/tz_psee_video.h similarity index 54% rename from hal_openeb_plugins/include/common/raw_file_discovery.h rename to hal_psee_plugins/include/devices/treuzell/tz_psee_video.h index 618bd8016..a9ef5c116 100644 --- a/hal_openeb_plugins/include/common/raw_file_discovery.h +++ b/hal_psee_plugins/include/devices/treuzell/tz_psee_video.h @@ -9,30 +9,35 @@ * See the License for the specific language governing permissions and limitations under the License. * **********************************************************************************************************************/ -#ifndef RAW_FILE_DISCOVERY_H -#define RAW_FILE_DISCOVERY_H +#ifndef METAVISION_HAL_TZ_PSEE_VIDEO_H +#define METAVISION_HAL_TZ_PSEE_VIDEO_H -#include +#include "devices/treuzell/tz_psee_fpga_device.h" +#include "devices/treuzell/tz_main_device.h" namespace Metavision { -class RawGeometry; - -/// @brief Discovers devices from RAW files -/// -/// This class is the implementation of HAL's class @ref Metavision::FileDiscovery -class RawFileDiscovery : public Metavision::FileDiscovery { +class TzPseeVideo : public TzPseeFpgaDevice, public TzMainDevice { public: - /// @brief Discovers a device and initializes a corresponding @ref DeviceBuilder - /// @param device_builder Device builder to configure so that it can build a @ref Device from the parameters - /// @param stream The stream to read events from - /// @param header Header of the input stream, containing identification information for the stream's source - /// @param config For building the camera from a file - /// @return true if a device builder could be discovered from the parameters - bool discover(Metavision::DeviceBuilder &device_builder, std::unique_ptr &stream, - const Metavision::RawFileHeader &header, const Metavision::RawFileConfig &config) override; + TzPseeVideo(std::shared_ptr cmd, uint32_t dev_id, std::shared_ptr parent); + virtual void spawn_facilities(DeviceBuilder &device_builder); + static std::shared_ptr build(std::shared_ptr cmd, uint32_t dev_id, + std::shared_ptr parent); + + virtual StreamFormat get_output_format(); + virtual void start(); + virtual void stop(); + virtual long get_system_id() const; + virtual long get_system_version() const; + virtual bool set_mode_standalone(); + virtual bool set_mode_master(); + virtual bool set_mode_slave(); + virtual I_DeviceControl::SyncMode get_mode(); + virtual I_HW_Identification::SensorInfo get_sensor_info() { + return {0, 0}; + } }; } // namespace Metavision -#endif // RAW_FILE_DISCOVERY_H \ No newline at end of file +#endif // METAVISION_HAL_TZ_PSEE_VIDEO_H diff --git a/hal_psee_plugins/include/devices/treuzell/tz_regmap_device.h b/hal_psee_plugins/include/devices/treuzell/tz_regmap_device.h new file mode 100644 index 000000000..77f174d07 --- /dev/null +++ b/hal_psee_plugins/include/devices/treuzell/tz_regmap_device.h @@ -0,0 +1,57 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef TZ_REGMAP_DEVICE_H +#define TZ_REGMAP_DEVICE_H + +#include +#include +#include +#include "devices/treuzell/tz_device.h" + +namespace Metavision { + +class TzLibUSBBoardCommand; +class RegisterMap; + +class TzDeviceWithRegmap : public virtual TzDevice { + using Register_Addr = uint32_t; + using RegmapBuilder = void (*)(RegisterMap &); + +public: + /// @brief Writes shadow register (value stored on computer side) + void write_register(Register_Addr regist, uint32_t value); + + /// @brief Reads shadow register (value stored on computer side) + /// @return The value of the register + uint32_t read_register(Register_Addr regist); + + /// @brief Loads the register on the board side with the value stored on computer + /// @return Nothing to express that the method loads the value from the board and stores it + void load_register(Register_Addr regist); + + void set_register_bit(Register_Addr regist, int idx, bool state); + void send_register(Register_Addr regist); + void send_register_bit(Register_Addr regist, int idx, bool state); + uint32_t read_register_bit(Register_Addr register_addr, int idx); + void init_register(Register_Addr regist, uint32_t value); + +protected: + TzDeviceWithRegmap(RegmapBuilder builder); + std::map mregister_state; + std::shared_ptr register_map; + +private: + bool has_register(Register_Addr regist); +}; + +} // namespace Metavision +#endif /* TZ_REGMAP_DEVICE_H */ diff --git a/hal_psee_plugins/include/devices/treuzell/tz_streamer.h b/hal_psee_plugins/include/devices/treuzell/tz_streamer.h new file mode 100644 index 000000000..88ba39737 --- /dev/null +++ b/hal_psee_plugins/include/devices/treuzell/tz_streamer.h @@ -0,0 +1,40 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_TZ_STREAMER_H +#define METAVISION_HAL_TZ_STREAMER_H + +#include "devices/treuzell/tz_device.h" + +namespace Metavision { + +class DeviceBuilder; +class DeviceBuilderParameters; +class DeviceConfig; + +class TzStreamer : public TzDevice { +public: + TzStreamer(std::shared_ptr cmd, uint32_t dev_id, std::shared_ptr parent); + virtual ~TzStreamer(); + static std::shared_ptr build(std::shared_ptr cmd, uint32_t dev_id, + std::shared_ptr parent); + + virtual void start(); + virtual void stop(); + virtual StreamFormat get_output_format(); + +protected: + virtual void spawn_facilities(DeviceBuilder &device_builder); +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_TZ_STREAMER_H diff --git a/hal_psee_plugins/include/devices/utils/device_system_id.h b/hal_psee_plugins/include/devices/utils/device_system_id.h new file mode 100644 index 000000000..e60a4578d --- /dev/null +++ b/hal_psee_plugins/include/devices/utils/device_system_id.h @@ -0,0 +1,223 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_DEVICE_SYSTEM_ID_H +#define METAVISION_HAL_DEVICE_SYSTEM_ID_H + +#include +#include +#include + +namespace Metavision { + +#define SYSTEM_FLAG_EVK_PROXY 0x80 + +enum SystemId : long { + SYSTEM_CCAM2_STEREO = 0x08, + SYSTEM_CCAM2_STEREO_MAPPING = 0x09, + SYSTEM_STEREO_DEMO = 0x0A, + SYSTEM_CCAM3_STEREO_LEFT_GTP = 0x0B, + SYSTEM_CCAM3_STEREO_LEFT = 0x0D, + SYSTEM_CCAM2_STEREO_MERGE_IMU = 0x0F, + SYSTEM_CCAM3_GOLDEN_FALLBACK = 0x11, + SYSTEM_CCAM5_GOLDEN_FALLBACK = 0x12, + SYSTEM_CCAM3_GEN2 = 0x14, + SYSTEM_CCAM3_GEN3 = 0x15, + SYSTEM_CCAM3_GEN31 = 0x1C, + SYSTEM_CCAM3_GEN4 = 0x1A, // Regular Gen 4 evk + SYSTEM_CCAM4_GEN3 = 0x17, // Onboard rev A + SYSTEM_CCAM4_GEN3_EVK = (SYSTEM_FLAG_EVK_PROXY | SYSTEM_CCAM4_GEN3), // Onboard rev A + SYSTEM_CCAM4_GEN3_REV_B = 0x19, // Onboard rev B + SYSTEM_CCAM4_GEN3_REV_B_EVK = (SYSTEM_FLAG_EVK_PROXY | SYSTEM_CCAM4_GEN3_REV_B), // Onboard rev B + SYSTEM_CCAM4_GEN4_EVK = (SYSTEM_FLAG_EVK_PROXY | SYSTEM_CCAM3_GEN4), // Onboard + SYSTEM_CCAM4_GEN3_REV_B_EVK_BRIDGE = 0x1D, + SYSTEM_CCAM5_GEN31 = 0x23, + SYSTEM_CCAM5_GEN4 = 0x1E, + SYSTEM_CCAM5_GEN4_FIXED_FRAME = 0x2E, + SYSTEM_CCAM5_GEN4_EVK_BRIDGE = 0x20, + SYSTEM_VISIONCAM_GEN3 = 0x21, + SYSTEM_VISIONCAM_GEN3_EVK = (SYSTEM_FLAG_EVK_PROXY | SYSTEM_VISIONCAM_GEN3), + SYSTEM_VISIONCAM_GEN31 = 0x22, + SYSTEM_VISIONCAM_GEN31_EVK = (SYSTEM_FLAG_EVK_PROXY | SYSTEM_VISIONCAM_GEN31), + SYSTEM_CX3_CCAM5_GEN4 = SYSTEM_CCAM5_GEN4, + SYSTEM_EVK2_GEN31 = 0x29, + SYSTEM_EVK2_GEN4 = 0x1F, + SYSTEM_EVK2_GEN41 = 0x27, + SYSTEM_EVK3_GEN31_EVT2 = SYSTEM_CCAM5_GEN31, + SYSTEM_EVK3_GEN31_EVT3 = 0x28, + SYSTEM_EVK3_GEN41 = 0x30, + SYSTEM_EVK3_IMX636 = 0x31, + SYSTEM_EVK2_IMX636 = 0x32, + SYSTEM_INVALID_NO_FPGA = static_cast(0xFFFFFFFF) +}; + +static const std::map> EM_SUBSYSTEM_IDS{ + {SYSTEM_CCAM3_GEN4, {0x20100841}}, + {SYSTEM_CCAM4_GEN4_EVK, {0x20100841}}, + {SYSTEM_CCAM3_GEN3, {0x0503, 0x0403}}, + {SYSTEM_CCAM4_GEN3, {0x0503, 0x0403}}, + {SYSTEM_CCAM4_GEN3_EVK, {0x0503, 0x0403}}, + {SYSTEM_CCAM4_GEN3_REV_B, {0x0503, 0x0403}}, + {SYSTEM_CCAM4_GEN3_REV_B_EVK, {0x0503, 0x0403}}, + {SYSTEM_CCAM3_GEN31, {0x0c03}}, + {SYSTEM_CCAM4_GEN3_REV_B_EVK_BRIDGE, {0x0503, 0x0403}}, + {SYSTEM_CCAM5_GEN4_EVK_BRIDGE, {0x20100841}}, + {SYSTEM_EVK2_GEN4, {0x3141}}, +}; + +static inline bool device_is_gen3_EM(long sub_system_id) { + for (const auto &id : EM_SUBSYSTEM_IDS.at(SystemId::SYSTEM_CCAM3_GEN3)) { + if ((sub_system_id & 0xFFFF) == id) { + return true; + } + } + return false; +} + +// clang-format off +static const std::map SYSTEMS_NAME = { + { SYSTEM_CCAM2_STEREO, "GEN 1 QVGA CD EM EVK"}, + { SYSTEM_CCAM2_STEREO_MAPPING, "GEN 1 QVGA CD EM EVK"}, + { SYSTEM_STEREO_DEMO, "GEN 1 QVGA CD EM EVK"}, + { SYSTEM_CCAM3_STEREO_LEFT_GTP, "GEN 1 QVGA CD EM EVK"}, + { SYSTEM_CCAM3_STEREO_LEFT, "GEN 1 QVGA CD EM EVK"}, + { SYSTEM_CCAM2_STEREO_MERGE_IMU, "GEN 1 QVGA CD EM EVK"}, + { SYSTEM_CCAM3_GEN2, "GEN 2 VGA CD EVK"}, + { SYSTEM_CCAM3_GEN3, "GEN 3 EVK"}, + { SYSTEM_CCAM4_GEN3, "GEN 3 EMBEDDED"}, + { SYSTEM_CCAM4_GEN3_EVK, "GEN 3 EMBEDDED EVK"}, + { SYSTEM_CCAM4_GEN3_REV_B, "GEN 3 EMBEDDED"}, + { SYSTEM_CCAM4_GEN3_REV_B_EVK, "GEN 3 EMBEDDED EVK"}, + { SYSTEM_CCAM3_GEN4, "GEN 4 HD"}, + { SYSTEM_CCAM4_GEN4_EVK, "GEN 4 HD EVK"}, + { SYSTEM_CCAM4_GEN3_REV_B_EVK_BRIDGE, "GEN 3 EMBEDDED EVK BRIDGE"}, + { SYSTEM_CCAM3_GEN31, "GEN 3.1 EVK"}, + { SYSTEM_CCAM5_GEN4_EVK_BRIDGE, "GEN 4 HD EVK BRIDGE"}, + { SYSTEM_CX3_CCAM5_GEN4, "GEN 4 CX3 Proto"}, + { SYSTEM_VISIONCAM_GEN3, "GEN 3 VCXM EMBEDDED"}, + { SYSTEM_VISIONCAM_GEN31, "GEN 3.1 VCXM EMBEDDED"}, + { SYSTEM_VISIONCAM_GEN3_EVK, "GEN 3 VCXM EVK"}, + { SYSTEM_VISIONCAM_GEN31_EVK, "GEN 3.1 VCXM EVK"}, + { SYSTEM_EVK3_GEN31_EVT2, "GEN 3.1 VGA EVK3 EVT2"}, + { SYSTEM_EVK3_GEN31_EVT3, "GEN 3.1 VGA EVK2 EVT3"}, + { SYSTEM_EVK3_GEN41, "GEN 4.1 HD EVK3"}, + { SYSTEM_EVK2_IMX636, "IMX636 HD EVK2"}, + { SYSTEM_EVK3_IMX636, "IMX636 HD EVK3"} +}; +// clang-format on + +enum DataTransferProtocol : uint8_t { + USB, + EMBEDDED, +}; + +// clang-format off +static const std::map SYSTEMS_DATA_TRANSFER_PROTOCOL = { + { SYSTEM_CCAM2_STEREO, DataTransferProtocol::USB}, + { SYSTEM_CCAM2_STEREO_MAPPING, DataTransferProtocol::USB}, + { SYSTEM_STEREO_DEMO, DataTransferProtocol::USB}, + { SYSTEM_CCAM3_STEREO_LEFT_GTP, DataTransferProtocol::USB}, + { SYSTEM_CCAM3_STEREO_LEFT, DataTransferProtocol::USB}, + { SYSTEM_CCAM2_STEREO_MERGE_IMU, DataTransferProtocol::USB}, + { SYSTEM_CCAM3_GEN2, DataTransferProtocol::USB}, + { SYSTEM_CCAM3_GEN3, DataTransferProtocol::USB}, + { SYSTEM_CCAM4_GEN3, DataTransferProtocol::EMBEDDED}, + { SYSTEM_CCAM4_GEN3_EVK, DataTransferProtocol::USB}, + { SYSTEM_CCAM4_GEN3_REV_B, DataTransferProtocol::EMBEDDED}, + { SYSTEM_CCAM4_GEN3_REV_B_EVK, DataTransferProtocol::USB}, + { SYSTEM_CCAM3_GEN4, DataTransferProtocol::USB}, + { SYSTEM_CCAM4_GEN4_EVK, DataTransferProtocol::USB}, + { SYSTEM_CCAM4_GEN3_REV_B_EVK_BRIDGE, DataTransferProtocol::USB}, + { SYSTEM_CCAM3_GEN31, DataTransferProtocol::USB}, + { SYSTEM_CCAM5_GEN4_EVK_BRIDGE, DataTransferProtocol::USB}, + { SYSTEM_CX3_CCAM5_GEN4, DataTransferProtocol::USB}, + { SYSTEM_VISIONCAM_GEN3, DataTransferProtocol::USB}, + { SYSTEM_VISIONCAM_GEN31, DataTransferProtocol::USB}, + { SYSTEM_VISIONCAM_GEN3_EVK, DataTransferProtocol::USB}, + { SYSTEM_VISIONCAM_GEN31_EVK, DataTransferProtocol::USB}, + { SYSTEM_EVK3_GEN31_EVT2, DataTransferProtocol::USB}, + { SYSTEM_EVK3_GEN31_EVT3, DataTransferProtocol::USB}, + { SYSTEM_EVK3_GEN41, DataTransferProtocol::USB}, + { SYSTEM_EVK2_IMX636, DataTransferProtocol::USB}, + { SYSTEM_EVK3_IMX636, DataTransferProtocol::USB} +}; +// clang-format on + +static const std::string GEN3_CD_SYSTEM_SUFFIX = " VGA CD"; +static const std::string GEN3_EM_SYSTEM_SUFFIX = " HVGA CD EM"; +static const std::string GEN4_CD_SYSTEM_SUFFIX = " CD"; +static const std::string GEN4_EM_SYSTEM_SUFFIX = " CD EM"; + +inline bool systemid2version(long system_id, uint16_t &major_version, uint16_t &minor_version) { + bool result = true; + switch (system_id) { + case SystemId::SYSTEM_CCAM2_STEREO: + case SystemId::SYSTEM_CCAM2_STEREO_MAPPING: + case SystemId::SYSTEM_STEREO_DEMO: + case SystemId::SYSTEM_CCAM3_STEREO_LEFT_GTP: + case SystemId::SYSTEM_CCAM3_STEREO_LEFT: + case SystemId::SYSTEM_CCAM2_STEREO_MERGE_IMU: + major_version = 1; + minor_version = 0; + break; + case SystemId::SYSTEM_CCAM3_GEN2: + major_version = 2; + minor_version = 0; + break; + case SystemId::SYSTEM_CCAM3_GEN3: + case SystemId::SYSTEM_CCAM4_GEN3: + case SystemId::SYSTEM_CCAM4_GEN3_EVK: + case SystemId::SYSTEM_VISIONCAM_GEN3: + case SystemId::SYSTEM_VISIONCAM_GEN3_EVK: + case SystemId::SYSTEM_CCAM4_GEN3_REV_B: + case SystemId::SYSTEM_CCAM4_GEN3_REV_B_EVK: + case SystemId::SYSTEM_CCAM4_GEN3_REV_B_EVK_BRIDGE: + major_version = 3; + minor_version = 0; + break; + case SystemId::SYSTEM_VISIONCAM_GEN31: + case SystemId::SYSTEM_VISIONCAM_GEN31_EVK: + case SystemId::SYSTEM_CCAM3_GEN31: + case SystemId::SYSTEM_EVK2_GEN31: + case SystemId::SYSTEM_EVK3_GEN31_EVT2: + case SystemId::SYSTEM_EVK3_GEN31_EVT3: + major_version = 3; + minor_version = 1; + break; + case SystemId::SYSTEM_CCAM3_GEN4: + case SystemId::SYSTEM_CCAM4_GEN4_EVK: + case SystemId::SYSTEM_CCAM5_GEN4_EVK_BRIDGE: + case SystemId::SYSTEM_CX3_CCAM5_GEN4: + case SystemId::SYSTEM_EVK2_GEN4: + major_version = 4; + minor_version = 0; + break; + case SystemId::SYSTEM_EVK2_GEN41: + case SystemId::SYSTEM_EVK3_GEN41: + major_version = 4; + minor_version = 1; + break; + case SystemId::SYSTEM_EVK2_IMX636: + case SystemId::SYSTEM_EVK3_IMX636: + major_version = 4; + minor_version = 2; + break; + default: + major_version = -1; + minor_version = 0; + result = false; + break; + } + return result; +} +} // namespace Metavision + +#endif // METAVISION_HAL_DEVICE_SYSTEM_ID_H diff --git a/hal_openeb_plugins/include/common/raw_evt_base.h b/hal_psee_plugins/include/devices/utils/evt_format.h similarity index 88% rename from hal_openeb_plugins/include/common/raw_evt_base.h rename to hal_psee_plugins/include/devices/utils/evt_format.h index 6d99c111b..497728897 100644 --- a/hal_openeb_plugins/include/common/raw_evt_base.h +++ b/hal_psee_plugins/include/devices/utils/evt_format.h @@ -9,15 +9,13 @@ * See the License for the specific language governing permissions and limitations under the License. * **********************************************************************************************************************/ -#ifndef RAW_EVT_BASE_H -#define RAW_EVT_BASE_H - -#include +#ifndef METAVISION_HAL_EVT_FORMAT_H +#define METAVISION_HAL_EVT_FORMAT_H namespace Metavision { -typedef uint8_t EventTypesUnderlying_t; +enum class EvtFormat { EVT2_0 = 2, EVT3_0 = 3 }; } // namespace Metavision -#endif // RAW_EVT_BASE_H +#endif // METAVISION_HAL_EVT_FORMAT_H diff --git a/hal_psee_plugins/include/devices/utils/gen3/gen3_pattern_checkers.h b/hal_psee_plugins/include/devices/utils/gen3/gen3_pattern_checkers.h new file mode 100644 index 000000000..634a708d4 --- /dev/null +++ b/hal_psee_plugins/include/devices/utils/gen3/gen3_pattern_checkers.h @@ -0,0 +1,55 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_GEN3_PATTERN_CHECKERS_H +#define METAVISION_HAL_GEN3_PATTERN_CHECKERS_H + +#include "utils/psee_pattern_generator_checker.h" + +namespace Metavision { + +class Gen3PatternChecker : public PseePatternGeneratorChecker::PatternChecker { +protected: + virtual bool check_init(const Event2d *&ev_begin, const Event2d *ev_end); + +protected: + /// Last event processed + Event2d last_ev_; + +private: + /// Checks if first event has been received to begin the pattern verification + bool is_init_{false}; +}; + +class ColumnPatternChecker : public Gen3PatternChecker { +public: + ColumnPatternChecker(int width, int height); + std::vector check(const Event2d *ev_begin, + const Event2d *ev_end) override final; + +private: + const int height_; + const int pixels_count_; +}; + +class SlashPatternChecker : public Gen3PatternChecker { +public: + SlashPatternChecker(int width, int height); + std::vector check(const Event2d *ev_begin, + const Event2d *ev_end) override final; + +private: + const int pattern_min_dim_; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_GEN3_PATTERN_CHECKERS_H diff --git a/hal_psee_plugins/include/devices/utils/register_maps/common/ccam2_system_monitor_trigger_ext_adc.h b/hal_psee_plugins/include/devices/utils/register_maps/common/ccam2_system_monitor_trigger_ext_adc.h new file mode 100644 index 000000000..1d9832b5b --- /dev/null +++ b/hal_psee_plugins/include/devices/utils/register_maps/common/ccam2_system_monitor_trigger_ext_adc.h @@ -0,0 +1,199 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef SRC_INC_CCAM2_SYSTEM_MONITOR_STRIGGER_EXT_ADC_H_ +#define SRC_INC_CCAM2_SYSTEM_MONITOR_STRIGGER_EXT_ADC_H_ + +RegmapData CCAM2SystemMonitorTriggerExtADC[] = {{R, {{"TEMP_VCC_MONITOR_XADC/TEMP", 0x0}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"TEMP_VCC_MONITOR_XADC/VCC_INT", 0x2}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"TEMP_VCC_MONITOR_XADC/VCC_AUX", 0x4}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"TEMP_VCC_MONITOR_XADC/VP_VN", 0x6}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"TEMP_VCC_MONITOR_XADC/VREFP", 0x8}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"TEMP_VCC_MONITOR_XADC/VREFN", 0xa}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"TEMP_VCC_MONITOR_XADC/VCC_BRAM", 0xc}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"TEMP_VCC_MONITOR_XADC/SUPPLY_OFFSET", 0x10}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"TEMP_VCC_MONITOR_XADC/OFFSET", 0x12}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"TEMP_VCC_MONITOR_XADC/GAIN_ERROR", 0x14}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"TEMP_VCC_MONITOR_XADC/VAUX0", 0x20}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"TEMP_VCC_MONITOR_XADC/VAUX1", 0x22}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"TEMP_VCC_MONITOR_XADC/VAUX2", 0x24}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"TEMP_VCC_MONITOR_XADC/VAUX3", 0x26}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"TEMP_VCC_MONITOR_XADC/VAUX4", 0x28}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"TEMP_VCC_MONITOR_XADC/VAUX5", 0x2a}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"TEMP_VCC_MONITOR_XADC/VAUX6", 0x2c}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"TEMP_VCC_MONITOR_XADC/VAUX7", 0x2e}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"TEMP_VCC_MONITOR_XADC/VAUX8", 0x30}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"TEMP_VCC_MONITOR_XADC/VAUX9", 0x32}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"TEMP_VCC_MONITOR_XADC/VAUX10", 0x34}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"TEMP_VCC_MONITOR_XADC/VAUX11", 0x36}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"TEMP_VCC_MONITOR_XADC/VAUX12", 0x38}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"TEMP_VCC_MONITOR_XADC/VAUX13", 0x3a}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"TEMP_VCC_MONITOR_XADC/VAUX14", 0x3c}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"TEMP_VCC_MONITOR_XADC/VAUX15", 0x3e}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"TEMP_VCC_MONITOR_XADC/MAX_TEMP", 0x40}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"TEMP_VCC_MONITOR_XADC/MAX_VCC_INT", 0x42}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"TEMP_VCC_MONITOR_XADC/MAX_VCC_AUX", 0x44}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"TEMP_VCC_MONITOR_XADC/MAX_VCC_BRAM", 0x46}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"TEMP_VCC_MONITOR_XADC/MIN_TEMP", 0x48}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"TEMP_VCC_MONITOR_XADC/MIN_VCC_INT", 0x4a}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"TEMP_VCC_MONITOR_XADC/MIN_VCC_AUX", 0x4c}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"TEMP_VCC_MONITOR_XADC/MIN_VCC_BRAM", 0x4e}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"TEMP_VCC_MONITOR_XADC/FLAGS", 0x7e}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"TEMP_VCC_MONITOR_XADC/CONF_REG0", 0x80}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"TEMP_VCC_MONITOR_XADC/CONF_REG1", 0x82}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"TEMP_VCC_MONITOR_XADC/CONF_REG2", 0x84}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"TEMP_VCC_MONITOR_XADC/SEQ_REG0", 0x90}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"TEMP_VCC_MONITOR_XADC/SEQ_REG1", 0x92}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"TEMP_VCC_MONITOR_XADC/SEQ_REG2", 0x94}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"TEMP_VCC_MONITOR_XADC/SEQ_REG3", 0x96}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"TEMP_VCC_MONITOR_XADC/SEQ_REG4", 0x98}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"TEMP_VCC_MONITOR_XADC/SEQ_REG5", 0x9a}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"TEMP_VCC_MONITOR_XADC/SEQ_REG6", 0x9c}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"TEMP_VCC_MONITOR_XADC/SEQ_REG7", 0x9e}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"TEMP_VCC_MONITOR_XADC/ALARM_THR_REG0", 0xa0}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"TEMP_VCC_MONITOR_XADC/ALARM_THR_REG1", 0xa2}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"TEMP_VCC_MONITOR_XADC/ALARM_THR_REG2", 0xa4}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"TEMP_VCC_MONITOR_XADC/ALARM_THR_REG3", 0xa6}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"TEMP_VCC_MONITOR_XADC/ALARM_THR_REG4", 0xa8}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"TEMP_VCC_MONITOR_XADC/ALARM_THR_REG5", 0xaa}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"TEMP_VCC_MONITOR_XADC/ALARM_THR_REG6", 0xac}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"TEMP_VCC_MONITOR_XADC/ALARM_THR_REG7", 0xae}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"TEMP_VCC_MONITOR_XADC/ALARM_THR_REG8", 0xb0}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"TEMP_VCC_MONITOR_XADC/ALARM_THR_REG9", 0xb2}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"TEMP_VCC_MONITOR_XADC/ALARM_THR_REG10", 0xb4}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"TEMP_VCC_MONITOR_XADC/ALARM_THR_REG11", 0xb6}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"TEMP_VCC_MONITOR_XADC/ALARM_THR_REG12", 0xb8}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"TEMP_VCC_MONITOR_XADC/ALARM_THR_REG13", 0xba}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"TEMP_VCC_MONITOR_XADC/ALARM_THR_REG14", 0xbc}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"TEMP_VCC_MONITOR_XADC/ALARM_THR_REG15", 0xbe}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"TEMP_VCC_MONITOR/EVT_ENABLE", 0x100}}}, + {F, {{"ALL_EVT", 0, 1, 0x0}}}, + {F, {{"TEMP_EVT", 1, 1, 0x0}}}, + {F, {{"VCC_INT_EVT", 2, 1, 0x0}}}, + {F, {{"VCC_AUX_EVT", 3, 1, 0x0}}}, + {F, {{"VCC_BRAM_EVT", 4, 1, 0x0}}}, + {F, {{"ALL_ALARM", 8, 1, 0x0}}}, + {F, {{"OVER_TEMP_ALARM", 9, 1, 0x0}}}, + {F, {{"USER_TEMP_ALARM", 10, 1, 0x0}}}, + {F, {{"VCC_INT_ALARM", 11, 1, 0x0}}}, + {F, {{"VCC_AUX_ALARM", 12, 1, 0x0}}}, + {F, {{"VCC_BRAM_ALARM", 13, 1, 0x0}}}, + {F, {{"SYSTEM_POWER_DOWN", 16, 1, 0x0}}}, + {R, {{"TEMP_VCC_MONITOR/EVT_PERIOD", 0x104}}}, + {F, {{"", 0, 24, 0x186a0}}}, + {R, {{"TEMP_VCC_MONITOR/EXT_TEMP_CONTROL", 0x108}}}, + {F, {{"STATUS_SYS_POWER_DOWN", 0, 1, 0x0}}}, + {F, {{"EXT_TEMP_MONITOR_EN", 1, 1, 0x0}}}, + {F, {{"EXT_TEMP_MONITOR_SPI_EN", 2, 1, 0x0}}}, + {F, {{"REMOTE_TEMP_MONITOR_EN", 3, 1, 0x0}}}, + {R, {{"TEMP_VCC_MONITOR/EVK_EXT_TEMP_VALUE", 0x10c}}}, + {F, {{"", 0, 22, 0x0}}}, + {R, {{"ATIS_IF_MONITOR/CFG_ENABLE", 0x140}}}, + {F, {{"ALL_EVT", 0, 1, 0x0}}}, + {F, {{"TD_IDLE_TIME_EVT", 1, 1, 0x0}}}, + {F, {{"TD_IDLE_TIMEOUT_EVT", 2, 1, 0x0}}}, + {F, {{"APS_IDLE_TIME_EVT", 3, 1, 0x0}}}, + {F, {{"APS_IDLE_TIMEOUT_EVT", 4, 1, 0x0}}}, + {F, {{"GLOBAL_ILLUMINATION_EVT", 5, 1, 0x0}}}, + {F, {{"EM_TRIGGER_SEQ_EVT", 6, 1, 0x0}}}, + {F, {{"REFRACTORY_CLOCK_EVT", 7, 1, 0x0}}}, + {R, {{"ATIS_IF_MONITOR/CFG_IDLE_TIME_THR", 0x144}}}, + {F, {{"VALUE", 0, 26, 0x2710}}}, + {R, {{"ATIS_IF_MONITOR/CFG_IDLE_TIMEOUT_THR", 0x148}}}, + {F, {{"VALUE", 0, 26, 0x2710}}}, + {R, {{"ATIS_IF_MONITOR/STAT_GLOBAL_ILLUMINATION", 0x14c}}}, + {F, {{"DATA", 0, 26, 0x0}}}, + {F, {{"VALID", 31, 1, 0x0}}}, + {R, {{"ATIS_IF_MONITOR/STAT_REFRACTORY_CLOCK", 0x150}}}, + {F, {{"DATA", 0, 24, 0x0}}}, + {R, {{"EXT_TRIGGERS/ENABLE", 0x160}}}, + {F, {{"TRIGGER_0", 0, 1, 0x0}}}, + {F, {{"TRIGGER_1", 1, 1, 0x0}}}, + {F, {{"TRIGGER_2", 2, 1, 0x0}}}, + {F, {{"TRIGGER_3", 3, 1, 0x0}}}, + {F, {{"TRIGGER_4", 4, 1, 0x0}}}, + {F, {{"TRIGGER_5", 5, 1, 0x0}}}, + {F, {{"TRIGGER_6", 6, 1, 0x0}}}, + {F, {{"TRIGGER_7", 7, 1, 0x0}}}, + {R, {{"EXT_TRIGGERS/OUT_ENABLE", 0x164}}}, + {F, {{"VALUE", 0, 1, 0x0}}}, + {R, {{"EXT_TRIGGERS/OUT_PULSE_PERIOD", 0x168}}}, + {F, {{"", 0, 32, 0x64}}}, + {R, {{"EXT_TRIGGERS/OUT_PULSE_WIDTH", 0x16c}}}, + {F, {{"", 0, 32, 0x1}}} + +}; +unsigned int CCAM2SystemMonitorTriggerExtADCSize = + sizeof(CCAM2SystemMonitorTriggerExtADC) / sizeof(CCAM2SystemMonitorTriggerExtADC[0]); + +#endif diff --git a/hal_psee_plugins/include/devices/utils/register_maps/common/ccam3_single_gen3_tep_register_control_registermap.h b/hal_psee_plugins/include/devices/utils/register_maps/common/ccam3_single_gen3_tep_register_control_registermap.h new file mode 100644 index 000000000..769ffc33b --- /dev/null +++ b/hal_psee_plugins/include/devices/utils/register_maps/common/ccam3_single_gen3_tep_register_control_registermap.h @@ -0,0 +1,114 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_CCAM3_SINGLE_GEN3_TEP_REGISTER_CONTROL_REGISTERMAP_H +#define METAVISION_HAL_CCAM3_SINGLE_GEN3_TEP_REGISTER_CONTROL_REGISTERMAP_H + +RegmapData ccam3_single_gen3_TEPRegisterControlRegisterMap[] = {{R, {{"ATIS_CONTROL", 0x0}}}, + {F, {{"EN_VDDA", 0, 1, 0x0}}}, + {F, {{"EN_VDDC", 1, 1, 0x0}}}, + {F, {{"EN_VDDD", 2, 1, 0x0}}}, + {F, {{"SENSOR_SOFT_RESET", 3, 1, 0x1}}}, + {F, {{"IN_EVT_NO_BLOCKING_MODE", 4, 1, 0x1}}}, + {F, {{"SISLEY_HVGA_REMAP_BYPASS", 8, 1, 0x1}}}, + {F, {{"MASTER_MODE", 12, 1, 0x0}}}, + {F, {{"MASTER_ENABLE", 13, 1, 0x0}}}, + {F, {{"USE_EXT_START", 14, 1, 0x0}}}, + {F, {{"SENSOR_TB_IOBUF_EN_N", 15, 1, 0x1}}}, + {F, {{"SENSOR_TB_PE_RST_N", 16, 1, 0x0}}}, + {F, {{"TD_RSTN", 18, 1, 0x1}}}, + {F, {{"EM_RSTN", 19, 1, 0x1}}}, + {F, {{"EN_EXT_CTRL_RSTB", 20, 1, 0x0}}}, + {F, {{"CFG_FLIP_X_EN", 21, 1, 0x0}}}, + {F, {{"CFG_FLIP_Y_EN", 22, 1, 0x0}}}, + {R, {{"ATIS_BIASROI_UPDATE_VALUE0", 0x2}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"ATIS_BIASROI_UPDATE_VALUE1", 0x4}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"ATIS_BIAS_UPDATE_VALUE2", 0x6}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"CCAM2_CONTROL", 0x8}}}, + {F, {{"ENABLE_64BITS_EVENT", 3, 1, 0x0}}}, + {F, {{"BYPASS_MAPPING", 5, 1, 0x1}}}, + {F, {{"HOST_IF_ENABLE", 8, 1, 0x0}}}, + {F, {{"STEREO_MERGE_ENABLE", 9, 1, 0x0}}}, + {F, {{"ENABLE_IMU", 10, 1, 0x0}}}, + {F, {{"ENABLE_OUT_OF_FOV", 11, 1, 0x0}}}, + {R, {{"TRIGGERS", 0xa}}}, + {F, {{"SOFT_RESET", 0, 1, 0x0}}}, + {F, {{"BIAS_DIN_VALID", 1, 1, 0x0}}}, + {F, {{"TS_RESET", 2, 1, 0x0}}}, + {F, {{"ROI_DIN", 3, 1, 0x0}}}, + {F, {{"FIFO_RESET", 7, 1, 0x0}}}, + {F, {{"FLASH_ACCESS", 8, 1, 0x0}}}, + {F, {{"MAPPING_FETCH", 9, 1, 0x0}}}, + {F, {{"PROG_DAC", 10, 1, 0x0}}}, + {F, {{"DAC_DIN_VALID", 11, 1, 0x0}}}, + {R, {{"SYSTEM_STATUS", 0xc}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"FOUT_LSB_STATUS", 0xe}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"FOUT_MSB_STATUS", 0x10}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"FIFO_WRCOUNT_STATUS", 0x12}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"FIFO_CHECKPIX_STATUS", 0x14}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"TLAST_REARMUS", 0x16}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"OVERFLOW_HITCOUNT", 0x18}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"CCAM2_MODE", 0x1a}}}, + {F, {{"MODE", 0, 2, 0x0}}}, + {F, {{"ATIS_DEBUG_SEL", 4, 12, 0x1}}}, + {R, {{"SERIAL_LSB", 0x1c}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"SERIAL_MSB", 0x20}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"NOTIFY_PACKETCOUNT", 0x22}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"SNFETCH_FADDR_LSB", 0x24}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"SNFETCH_FADDR_MSB", 0x26}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"SNFETCH_RDATA_LSB", 0x28}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"SNFETCH_RDATA_MSB", 0x2a}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"SNFETCH_READ_ITER", 0x2c}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"SNFETCH_TIME_COUNT", 0x2e}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"BIAS_LOAD_ITERATION_COUNT", 0x30}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"FLASH_PROGRAM_SEL_SLAVE", 0x32}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"OUT_OF_FOV_FILTER_X", 0x34}}}, + {F, {{"WIDTH", 0, 11, 0x280}}}, + {F, {{"ORIGIN", 16, 11, 0x0}}}, + {R, {{"OUT_OF_FOV_FILTER_Y", 0x36}}}, + {F, {{"HEIGHT", 0, 11, 0x1e0}}}, + {F, {{"ORIGIN", 16, 11, 0x0}}}, + {R, {{"TEP_EVT_RATE_CONTROL_ENABLE", 0x38}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"TEP_EVT_RATE_CONTROL_T_DROP_FACTOR", 0x3a}}}, + {F, {{"VALUE", 0, 16, 0x0}}}, + {R, {{"EXT_SYNC_OUT_MODE", 0x3c}}}, + {F, {{"VALUE", 0, 1, 0x0}}}, + {R, {{"IMAGE_SIZE", 0x3e}}}, + {F, {{"HEIGHT", 0, 11, 0x1e0}}}, + {F, {{"WIDTH", 16, 11, 0x280}}} + +}; +unsigned int ccam3_single_sisley_TEPRegisterControlRegisterMapSize = + sizeof(ccam3_single_gen3_TEPRegisterControlRegisterMap) / + sizeof(ccam3_single_gen3_TEPRegisterControlRegisterMap[0]); +#endif // METAVISION_HAL_CCAM3_SINGLE_GEN3_TEP_REGISTER_CONTROL_REGISTERMAP_H diff --git a/hal_psee_plugins/include/devices/utils/register_maps/common/imu_registermap.h b/hal_psee_plugins/include/devices/utils/register_maps/common/imu_registermap.h new file mode 100644 index 000000000..f6baa6715 --- /dev/null +++ b/hal_psee_plugins/include/devices/utils/register_maps/common/imu_registermap.h @@ -0,0 +1,26 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef SRC_INC_IMU_REGISTERMAP_H_ +#define SRC_INC_IMU_REGISTERMAP_H_ + +RegmapData IMURegisterMap[] = { + {R, {{"AX_MSB", 0x3b}}}, {F, {{"VALUE", 0, 8, 0x0}}}, {R, {{"AX_LSB", 0x3c}}}, {F, {{"VALUE", 0, 8, 0x0}}}, + {R, {{"AY_MSB", 0x3d}}}, {F, {{"VALUE", 0, 8, 0x0}}}, {R, {{"AY_LSB", 0x3e}}}, {F, {{"VALUE", 0, 8, 0x0}}}, + {R, {{"AZ_MSB", 0x3f}}}, {F, {{"VALUE", 0, 8, 0x0}}}, {R, {{"AZ_LSB", 0x40}}}, {F, {{"VALUE", 0, 8, 0x0}}}, + {R, {{"GX_MSB", 0x43}}}, {F, {{"VALUE", 0, 8, 0x0}}}, {R, {{"GX_LSB", 0x44}}}, {F, {{"VALUE", 0, 8, 0x0}}}, + {R, {{"GY_MSB", 0x45}}}, {F, {{"VALUE", 0, 8, 0x0}}}, {R, {{"GY_LSB", 0x46}}}, {F, {{"VALUE", 0, 8, 0x0}}}, + {R, {{"GZ_MSB", 0x47}}}, {F, {{"VALUE", 0, 8, 0x0}}}, {R, {{"GZ_LSB", 0x48}}}, {F, {{"VALUE", 0, 8, 0x0}}}, + {R, {{"WHOAMI", 0x75}}}, {F, {{"VALUE", 0, 8, 0x68}}} + +}; +unsigned int IMURegisterMapSize = sizeof(IMURegisterMap) / sizeof(IMURegisterMap[0]); +#endif diff --git a/hal_psee_plugins/include/devices/utils/register_maps/common/mipitx_registermap.h b/hal_psee_plugins/include/devices/utils/register_maps/common/mipitx_registermap.h new file mode 100644 index 000000000..a8b70794b --- /dev/null +++ b/hal_psee_plugins/include/devices/utils/register_maps/common/mipitx_registermap.h @@ -0,0 +1,27 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef SRC_INC_MIPITX_REGISTERMAP_H_ +#define SRC_INC_MIPITX_REGISTERMAP_H_ + +RegmapData MIPITXRegisterMap[] = { + {R, {{"CONTROL", 0x0}}}, {F, {{"ENABLE", 0, 1, 0x0}}}, {F, {{"ENABLE_PACKET_TIMEOUT", 1, 1, 0x0}}}, + {R, {{"DATA_IDENTIFIER", 0x4}}}, {F, {{"DATA_TYPE", 0, 6, 0x30}}}, {F, {{"VIRTUAL_CHANNEL", 6, 2, 0x0}}}, + {R, {{"FRAME_PERIOD", 0x8}}}, {F, {{"VALUE_US", 0, 16, 0x3f0}}}, {R, {{"PACKET_TIMEOUT", 0xc}}}, + {F, {{"VALUE_US", 0, 16, 0x1f8}}}, {R, {{"PACKET_SIZE", 0x10}}}, {F, {{"VALUE", 0, 14, 0x2000}}}, + {R, {{"START_TIME", 0x14}}}, {F, {{"VALUE", 0, 16, 0x50}}}, {R, {{"START_FRAME_TIME", 0x18}}}, + {F, {{"VALUE", 0, 16, 0x50}}}, {R, {{"END_FRAME_TIME", 0x1c}}}, {F, {{"VALUE", 0, 16, 0x50}}}, + {R, {{"INTER_FRAME_TIME", 0x20}}}, {F, {{"VALUE", 0, 16, 0x50}}}, {R, {{"INTER_PACKET_TIME", 0x24}}}, + {F, {{"VALUE", 0, 16, 0x50}}} + +}; +unsigned int MIPITXRegisterMapSize = sizeof(MIPITXRegisterMap) / sizeof(MIPITXRegisterMap[0]); +#endif diff --git a/hal_psee_plugins/include/devices/utils/register_maps/common/spi_flash_master_registermap.h b/hal_psee_plugins/include/devices/utils/register_maps/common/spi_flash_master_registermap.h new file mode 100644 index 000000000..1a1f83db6 --- /dev/null +++ b/hal_psee_plugins/include/devices/utils/register_maps/common/spi_flash_master_registermap.h @@ -0,0 +1,42 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef SRC_INC_SPIFLASH_MASTER_REGISTERMAP_H_ +#define SRC_INC_SPIFLASH_MASTER_REGISTERMAP_H_ + +RegmapData SPIFlashMasterRegisterMap[] = {{R, {{"ADDRESS_INIT", 0x0}}}, + {F, {{"", 0, 24, 0x0}}}, + {R, {{"FLASH_ACCESS", 0x4}}}, + {F, {{"", 0, 32, 0x0}}}, + {R, {{"WRITE_ENABLE", 0x8}}}, + {F, {{"", 0, 1, 0x0}}}, + {R, {{"SECTOR_ERASE", 0xc}}}, + {F, {{"", 0, 24, 0x0}}}, + {R, {{"BULK_ERASE", 0x10}}}, + {F, {{"", 0, 1, 0x0}}}, + {R, {{"READ_STATUS", 0x14}}}, + {F, {{"WRITE_IN_PROGRESS", 24, 1, 0x0}}}, + {F, {{"WRITE_ENABLE_LATCH", 25, 1, 0x0}}}, + {F, {{"BP_LSB", 26, 3, 0x0}}}, + {F, {{"TOP_BOTTOM", 29, 1, 0x0}}}, + {F, {{"BP_MSB", 30, 1, 0x0}}}, + {F, {{"STATUS_WRITE_ENABLE", 31, 1, 0x0}}}, + {R, {{"READ_FLAG", 0x18}}}, + {F, {{"PROTECTION", 25, 1, 0x0}}}, + {F, {{"PROGRAM_SUSPEND", 26, 1, 0x0}}}, + {F, {{"PROGRAM", 28, 1, 0x0}}}, + {F, {{"ERASE", 29, 1, 0x0}}}, + {F, {{"ERASE_SUSPEND", 30, 1, 0x0}}}, + {F, {{"PROGRAM_ERASE", 31, 1, 0x0}}} + +}; +unsigned int SPIFlashMasterRegisterMapSize = sizeof(SPIFlashMasterRegisterMap) / sizeof(SPIFlashMasterRegisterMap[0]); +#endif diff --git a/hal_psee_plugins/include/devices/utils/register_maps/common/stereo_fx3_hostif_registermap.h b/hal_psee_plugins/include/devices/utils/register_maps/common/stereo_fx3_hostif_registermap.h new file mode 100644 index 000000000..eaa242d1f --- /dev/null +++ b/hal_psee_plugins/include/devices/utils/register_maps/common/stereo_fx3_hostif_registermap.h @@ -0,0 +1,27 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef SRC_INC_STEREO_FX3_HOSTIF_REGISTERMAP_H_ +#define SRC_INC_STEREO_FX3_HOSTIF_REGISTERMAP_H_ + +RegmapData stereo_FX3HostIFRegisterMap[] = {{R, {{"PKT_END_ENABLE", 0x0}}}, + {F, {{"SHORT_PACKET_ENABLE", 0, 1, 0x1}}}, + {F, {{"SHORT_PACKET_ENABLE_SKIP", 1, 1, 0x0}}}, + {R, {{"PKT_END_INTERVAL_US", 0x4}}}, + {F, {{"", 0, 32, 0x400}}}, + {R, {{"PKT_END_DATA_COUNT", 0x8}}}, + {F, {{"", 0, 32, 0x400}}} + +}; +unsigned int stereo_FX3HostIFRegisterMapSize = + sizeof(stereo_FX3HostIFRegisterMap) / sizeof(stereo_FX3HostIFRegisterMap[0]); + +#endif diff --git a/hal_psee_plugins/include/devices/utils/register_maps/common/system_config_registermap.h b/hal_psee_plugins/include/devices/utils/register_maps/common/system_config_registermap.h new file mode 100644 index 000000000..bfbab31a9 --- /dev/null +++ b/hal_psee_plugins/include/devices/utils/register_maps/common/system_config_registermap.h @@ -0,0 +1,23 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef SRC_INC_SYSTEM_CONFIG_REGISTERMAP_H_ +#define SRC_INC_SYSTEM_CONFIG_REGISTERMAP_H_ + +RegmapData SystemConfigRegisterMap[] = { + {R, {{"ID", 0x0}}}, {F, {{"VALUE", 0, 8, 0x1c}}}, {R, {{"VERSION", 0x4}}}, + {F, {{"MICRO", 0, 8, 0x0}}}, {F, {{"MINOR", 8, 8, 0x0}}}, {F, {{"MAJOR", 16, 8, 0x0}}}, + {R, {{"BUILD_DATE", 0x8}}}, {F, {{"VALUE", 0, 32, 0x0}}}, {R, {{"VERSION_CONTROL_ID", 0xc}}}, + {F, {{"VALUE", 0, 32, 0x0}}} + +}; +unsigned int SystemConfigRegisterMapSize = sizeof(SystemConfigRegisterMap) / sizeof(SystemConfigRegisterMap[0]); +#endif diff --git a/hal_psee_plugins/include/facilities/experimental/psee_afk_registers_api_v0.h b/hal_psee_plugins/include/facilities/experimental/psee_afk_registers_api_v0.h new file mode 100644 index 000000000..c47ef7e27 --- /dev/null +++ b/hal_psee_plugins/include/facilities/experimental/psee_afk_registers_api_v0.h @@ -0,0 +1,132 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_PSEE_AFK_REGISTERS_API_V0_H +#define METAVISION_HAL_PSEE_AFK_REGISTERS_API_V0_H + +#include +#include + +#include "metavision/hal/facilities/i_antiflicker_module.h" + +namespace Metavision { + +/** + * Interface for the Registers of the AFK API v0 commands + */ +class PseeAFKRegistersAPIv0 : public I_AntiFlickerModule { +public: + enum class AFKModes { BYPASS, ON, OFF_DROP, OFF_NDROP, OUT }; + + /// @brief Enables the anti-flicker filter + virtual void enable() override final; + + /// @brief Disables the anti-flicker filter + virtual void disable() override final; + + /// @brief Sets anti-flicker parameters. + /// + /// Defines the frequency band to be kept or removed : + /// [frequency_center - bandwidth/2, frequency_center + bandwidth/2] + /// This frequency range should be in the range [50 - 500] Hz + /// + /// @param frequency_center Center of the frequency band (in Hz) + /// @param bandwidth Range of frequencies around the frequency_center (in Hz) + /// @param stop If true, band-stop (by default); if false, band-pass + /// + /// @note band-stop removes all frequencies between min and max + /// band-pass removes all events outside of the band sequence defined + /// @throw exception if frequency band is not in the range [50 - 500] Hz + virtual void set_frequency(uint32_t frequency_center, uint32_t bandwidth, bool stop = true) override final; + + /// @brief Sets anti-flicker parameters. + /// + /// Defines the frequency band to be kept or removed in the range [50 - 500] Hz + /// + /// @param min_freq Lower frequency of the band (in Hz) + /// @param max_freq Higher frequency of the band (in Hz) + /// @param stop If true, band-stop; if false, band-pass + /// + /// @note band-stop removes all frequencies between min and max + /// band-pass removes all events outside of the band sequence defined + /// @throw exception if frequencies are outside of the range [50 - 500] Hz + virtual void set_frequency_band(uint32_t min_freq, uint32_t max_freq, bool stop = true) override final; + + /// @brief Changes the behavior of the anti-flicker (AFK) filter + /// + /// @param enable If true activates the AFK filter + /// @param drop_nbackpressure If AFK is disabled and drop_nbackpressure is true, events are dropped to avoid + /// backpressure + /// @param bypass If AFK is enabled and bypass is true, the AFK filter is bypassed + virtual void set_pipeline_control(bool enable, bool drop_nbackpressure, bool bypass) = 0; + virtual void get_pipeline_control(bool &enable, bool &drop_nbackpressure, bool &bypass) = 0; + + /// @brief Changes the AFK parameters + /// + /// @param counter_low Threshold under which the event is not flickering anymore + /// @param counter_high Threshold upper which the event is not flickering anymore + /// @param invert filter Events that are not flickering + /// @param drop_disable Disable the drop of events + virtual void set_afk_param(uint32_t counter_low, uint32_t counter_high, bool invert, bool drop_disable) = 0; + virtual void get_afk_param(uint32_t &counter_low, uint32_t &counter_high, bool &invert, bool &drop_disable) = 0; + + /// @brief Sets the filter period + virtual void set_filter_period(uint32_t min_cutoff_period, uint32_t max_cutoff_period, + uint32_t inverted_duty_cycle) = 0; + virtual void get_filter_period(uint32_t &min_cutoff_period, uint32_t &max_cutoff_period, + uint32_t &inverted_duty_cycle) = 0; + + /// @brief Invalidation of the memory + /// + /// To avoid considering old values the memory should be invalidate with a period lower than a threshold + /// The setting of theses parameter is a tradeoff between back pressure and consumption + /// The dt_fifo_timeout should be at least 1 readout full lines time to guarantee the detection of deadtime. + /// the readout full line can take 90 clock cycles. + /// + /// @param dt_fifo_wait_time Dead time; it should be greater than 4 + /// @param dt_fifo_timeout Timeout while waiting for a dead time to do the invalidation recommended to be > 90 + /// @param in_parallel Number of invalidation done in parallel (possible values: 1, 2, 5, 10) + /// @param flag_inv_busy Read only value? + /// + /// @note (dt_fifo_wait_time + dt_fifo_timeout) * (10/in_parallel) * 720 * T clk (us) < 2^LSB (253 - + /// max_cutoff_period)(us) + /// Recommendation before the characterization: + /// - in_parallel 10 + /// - dt_fifo_timeout 90 + /// - dt_fifo_wait_time variable depending on the equation + virtual void set_invalidation(uint32_t dt_fifo_wait_time, uint32_t dt_fifo_timeout, uint32_t in_parallel, + bool flag_inv_busy) = 0; + virtual void get_invalidation(uint32_t &dt_fifo_wait_time, uint32_t &dt_fifo_timeout, uint32_t &in_parallel, + bool &flag_inv_busy) = 0; + + virtual void set_initialization(bool req_init, bool flag_init_busy, bool flag_init_done) = 0; + virtual void get_initialization(bool &req_init, bool &flag_init_busy, bool &flag_init_done) = 0; + + virtual uint32_t to_period(uint32_t) = 0; + virtual uint32_t to_inverted_duty_cycle(float) = 0; + + // higher level apis: + virtual bool is_present() = 0; + virtual AFKModes get_mode() = 0; + virtual bool set_mode(AFKModes) = 0; + virtual void initialize() = 0; + virtual void start() = 0; + virtual void stop() = 0; + +private: + virtual bool wait_for_init() = 0; + + bool initialized_ = false; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_PSEE_AFK_REGISTERS_API_V0_H diff --git a/hal_psee_plugins/include/facilities/experimental/psee_stc_registers_api_v0.h b/hal_psee_plugins/include/facilities/experimental/psee_stc_registers_api_v0.h new file mode 100644 index 000000000..174cc406b --- /dev/null +++ b/hal_psee_plugins/include/facilities/experimental/psee_stc_registers_api_v0.h @@ -0,0 +1,87 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_PSEE_STC_REGISTERS_API_V0_H +#define METAVISION_HAL_PSEE_STC_REGISTERS_API_V0_H + +#include +#include + +#include "metavision/hal/facilities/i_facility.h" +#include "metavision/hal/facilities/i_noise_filter_module.h" + +namespace Metavision { + +/** + * Interface for the Registers of the STC API v0 commands + */ +class PseeSTCRegistersAPIv0 : public I_NoiseFilterModule { +public: + enum class STCModes { BYPASS, ON, OFF_DROP, OFF_NDROP, OUT }; + + virtual void enable(Type type, uint32_t threshold) override final; + virtual void disable() override final; + + virtual void set_pipeline_control(bool enable, bool drop_nbackpressure, bool bypass) = 0; + virtual void get_pipeline_control(bool &enable, bool &drop_nbackpressure, bool &bypass) = 0; + + virtual void set_stc_param(bool enable, uint32_t threshold) = 0; + virtual void get_stc_param(bool &enable, uint32_t &threshold) = 0; + + virtual void set_trail_param(bool enable, uint32_t threshold) = 0; + virtual void get_trail_param(bool &enable, uint32_t &threshold) = 0; + + virtual void set_timestamping(uint32_t prescaler, uint32_t multiplier, bool enable_rightshift_round) = 0; + virtual void get_timestamping(uint32_t &prescaler, uint32_t &multiplier, bool &enable_rightshift_round) = 0; + + virtual void set_invalidation(uint32_t dt_fifo_wait_time, uint32_t dt_fifo_timeout, uint32_t in_parallel, + bool flag_inv_busy) = 0; + virtual void get_invalidation(uint32_t &dt_fifo_wait_time, uint32_t &dt_fifo_timeout, uint32_t &in_parallel, + bool &flag_inv_busy) = 0; + + virtual void set_initialization(bool req_init, bool flag_init_busy, bool flag_init_done) = 0; + virtual void get_initialization(bool &req_init, bool &flag_init_busy, bool &flag_init_done) = 0; + + virtual void set_shadow_ctrl(bool timer_en, bool irq_sw_override, bool reset_on_copy) = 0; + virtual void get_shadow_ctrl(bool &timer_en, bool &irq_sw_override, bool &reset_on_copy) = 0; + + virtual void set_shadow_timer_threshold(uint32_t timer_threshold) = 0; + virtual void get_shadow_timer_threshold(uint32_t &timer_threshold) = 0; + + virtual void set_shadow_status(bool shadow_valid, bool shadow_overrun) = 0; + virtual void get_shadow_status(bool &shadow_valid, bool &shadow_overrun) = 0; + + virtual void get_total_evt_cnt(uint32_t &val) = 0; + + virtual void get_stc_evt_cnt(uint32_t &val) = 0; + + virtual void get_trail_evt_cnt(uint32_t &val) = 0; + + virtual void get_output_vector_cnt(uint32_t &val) = 0; + + virtual void set_chicken1_bits(bool enable_inv_alr_last_ts, uint32_t enable_inv_abs_threshold) = 0; + virtual void get_chicken1_bits(bool &enable_inv_alr_last_ts, uint32_t &enable_inv_abs_threshold) = 0; + + // higher level apis: + virtual bool is_present() = 0; + virtual STCModes get_mode() = 0; + virtual bool set_mode(STCModes) = 0; + virtual void initialize() = 0; + virtual void start() = 0; + virtual void stop() = 0; + +private: + virtual bool wait_for_init() = 0; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_PSEE_STC_REGISTERS_API_V0_H diff --git a/hal_psee_plugins/include/facilities/psee_device_control.h b/hal_psee_plugins/include/facilities/psee_device_control.h new file mode 100644 index 000000000..1435f40ff --- /dev/null +++ b/hal_psee_plugins/include/facilities/psee_device_control.h @@ -0,0 +1,110 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_PSEE_DEVICE_CONTROL_H +#define METAVISION_HAL_PSEE_DEVICE_CONTROL_H + +#include +#include + +#include "metavision/hal/facilities/i_device_control.h" +#include "devices/utils/evt_format.h" + +namespace Metavision { + +class PseeTriggerIn; +class PseeTriggerOut; + +/// @brief Device Control facility controls camera mode and allows to start, reset and stop it. +class PseeDeviceControl : public I_DeviceControl { +public: + PseeDeviceControl(EvtFormat fmt); + + /// @brief Starts the generation of events from the camera side + /// @warning All triggers will be disabled at stop. User should re-enable required triggers before start. + virtual void start() override final; + + /// @brief Stops the generation of events from the camera side + virtual void stop() override final; + + /// @brief Sets the camera streaming EVT format + bool set_evt_format(EvtFormat fmt); + + /// @brief Retrieves EVT format + /// @return event format + EvtFormat get_evt_format(); + + /// @brief Sets the camera in standalone mode. + /// + /// The camera does not interact with other devices. + /// @return true on success + virtual bool set_mode_standalone() override final; + + /// @brief Sets the camera as master + /// + /// The camera sends clock signal to another device + /// @return true on success + virtual bool set_mode_master() override final; + + /// @brief Sets the camera as slave + /// + /// The camera receives the clock from another device + /// @return true on success + virtual bool set_mode_slave() override final; + + /// @brief Retrieves Synchronization mode + /// @return synchronization mode + virtual SyncMode get_mode() override final; + + virtual long long get_sensor_id(); + + /// @brief Gets the trigger in facility + /// @param checked If true, will throw an exception if the trigger in facility has not been set + /// @return The trigger in facility + std::shared_ptr get_trigger_in(bool checked = true) const; + void set_trigger_in(const std::shared_ptr &trigger_in); + + /// @brief Gets the trigger out facility + /// @param checked If true, will throw an exception if the trigger out facility has not been set + /// @return The trigger out facility + std::shared_ptr get_trigger_out(bool checked = true) const; + void set_trigger_out(const std::shared_ptr &trigger_out); + +protected: + virtual void initialize(); + virtual void destroy(); + +private: + virtual void setup() override; + virtual void teardown() override; + + virtual void start_impl() = 0; + virtual void stop_impl() = 0; + + virtual bool set_evt_format_impl(EvtFormat fmt) = 0; + virtual bool set_mode_standalone_impl() = 0; + virtual bool set_mode_slave_impl() = 0; + virtual bool set_mode_master_impl() = 0; + + // ---------------------------------------------------------------------- + // Important : store those as weak_ptrs to avoid cyclic ownership issues + std::weak_ptr trigger_out_; + std::weak_ptr trigger_in_; + // ---------------------------------------------------------------------- + + EvtFormat evt_format_; + SyncMode sync_mode_; + bool streaming_; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_PSEE_DEVICE_CONTROL_H diff --git a/hal_psee_plugins/include/facilities/psee_erc.h b/hal_psee_plugins/include/facilities/psee_erc.h new file mode 100644 index 000000000..8b1c49a13 --- /dev/null +++ b/hal_psee_plugins/include/facilities/psee_erc.h @@ -0,0 +1,26 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_PSEE_ERC_H +#define METAVISION_HAL_PSEE_ERC_H + +#include "metavision/hal/facilities/i_erc.h" + +namespace Metavision { + +class PseeErc : public I_Erc { +public: + virtual void initialize() = 0; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_PSEE_ERC_H diff --git a/hal_psee_plugins/include/facilities/psee_hw_register.h b/hal_psee_plugins/include/facilities/psee_hw_register.h new file mode 100644 index 000000000..200a86ec5 --- /dev/null +++ b/hal_psee_plugins/include/facilities/psee_hw_register.h @@ -0,0 +1,41 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_PSEE_HW_REGISTER_H +#define METAVISION_HAL_PSEE_HW_REGISTER_H + +#include +#include + +#include "metavision/hal/facilities/i_hw_register.h" + +namespace Metavision { + +class RegisterMap; + +class PseeHWRegister : public I_HW_Register { +public: + PseeHWRegister(const std::shared_ptr &map); + + virtual void write_register(uint32_t address, uint32_t v) override; + virtual uint32_t read_register(uint32_t address) override; + virtual void write_register(const std::string &address, uint32_t v) override; + virtual uint32_t read_register(const std::string &address) override; + virtual void write_register(const std::string &address, const std::string &bitfield, uint32_t v) override; + virtual uint32_t read_register(const std::string &address, const std::string &bitfield) override; + +private: + std::shared_ptr regmap_; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_PSEE_HW_REGISTER_H diff --git a/hal_psee_plugins/include/facilities/psee_monitoring.h b/hal_psee_plugins/include/facilities/psee_monitoring.h new file mode 100644 index 000000000..b7ac503b1 --- /dev/null +++ b/hal_psee_plugins/include/facilities/psee_monitoring.h @@ -0,0 +1,35 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_PSEE_MONITORING_H +#define METAVISION_HAL_PSEE_MONITORING_H + +#include + +#include "metavision/hal/facilities/i_monitoring.h" + +namespace Metavision { + +class I_HW_Register; +class PseeMonitoring : public I_Monitoring { +public: + PseeMonitoring(const std::shared_ptr &i_hw_register); + +protected: + const std::shared_ptr &get_hw_register() const; + +private: + std::shared_ptr i_hw_register_; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_PSEE_MONITORING_H diff --git a/hal_psee_plugins/include/facilities/psee_roi.h b/hal_psee_plugins/include/facilities/psee_roi.h new file mode 100644 index 000000000..2ec232c7f --- /dev/null +++ b/hal_psee_plugins/include/facilities/psee_roi.h @@ -0,0 +1,83 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_PSEE_ROI_H +#define METAVISION_HAL_PSEE_ROI_H + +#include "metavision/hal/facilities/i_roi.h" + +namespace Metavision { + +class PseeROI : public I_ROI { +public: + PseeROI(int width, int height); + + /// @brief Returns the default device width + /// + /// This values is obtained from the default Device passed in the constructor of the class. + int device_width() const; + + /// @brief Returns the default device height + /// + /// This values is obtained from the default Device passed in the constructor of the class. + int device_height() const; + + /// @brief Creates several rectangular ROI in bitword register format + /// @param vroi Vector of ROI to transform to bitword register format + virtual std::vector create_ROIs(const std::vector &vroi) override; + + /// @brief Sets ROI from bitword (register format) + /// @param vroiparams A sensor ROI + /// @param is_enabled If true, applies ROI + virtual void set_ROIs_from_bitword(const std::vector &vroiparams, bool is_enabled) override; + + /// @brief Sets several rectangular ROI in bitword register format from binary map of a line and a column + /// + /// The binary maps arguments must have the sensor's dimension + /// Unstated lines or columns in the inputs are enabled. Excess of information (input size > sensor's dimension) is + /// discarded. + /// @param cols_to_enable Vector of boolean representing the binary map of the columns to disable (0) or to enable + /// (1) + /// @param rows_to_enable Vector of boolean representing the binary map of the rows to disable (0) or to enable (1) + /// @param is_enabled If true, applies ROI + /// @return true if input have the correct dimension and thus the ROI is set correctly, false otherwise + virtual bool set_ROIs(const std::vector &cols_to_enable, const std::vector &rows_to_enable, + bool is_enabled) override; + +protected: + static std::vector create_ROIs(const std::vector &vroi, int device_width, int device_height, + bool x_flipped, int word_size); + + /// @brief Creates several rectangular ROI in bitword register format + /// @param cols_to_enable Vector of boolean representing the binary map of the columns to disable (0) or to enable + /// (1) + /// @param rows_to_enable Vector of boolean representing the binary map of the rows to disable (0) or to enable (1) + std::vector create_ROIs(const std::vector &cols_to_enable, const std::vector &rows_to_enable); + + /// Returns if x axis is flipped for coding the ROI + virtual bool roi_x_flipped() const; + + /// Returns word size + virtual int get_word_size() const; + + /// Writes ROI parameters + virtual void write_ROI(const std::vector &vroiparams) = 0; + +private: + void program_ROI_Helper(const std::vector &vroiparams, bool enable); + + int device_height_{0}; + int device_width_{0}; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_PSEE_ROI_H diff --git a/hal_openeb_plugins/include/common/raw_geometry.h b/hal_psee_plugins/include/facilities/psee_trigger_in.h similarity index 70% rename from hal_openeb_plugins/include/common/raw_geometry.h rename to hal_psee_plugins/include/facilities/psee_trigger_in.h index e6ea7e59a..92254f27e 100644 --- a/hal_openeb_plugins/include/common/raw_geometry.h +++ b/hal_psee_plugins/include/facilities/psee_trigger_in.h @@ -9,32 +9,30 @@ * See the License for the specific language governing permissions and limitations under the License. * **********************************************************************************************************************/ -#ifndef RAW_GEOMETRY_H -#define RAW_GEOMETRY_H +#ifndef METAVISION_HAL_PSEE_TRIGGER_IN_H +#define METAVISION_HAL_PSEE_TRIGGER_IN_H -#include +#include + +#include "metavision/hal/facilities/i_trigger_in.h" namespace Metavision { -class RawGeometry : public Metavision::I_Geometry { -public: - RawGeometry(const int width, const int height); +class PseeDeviceControl; - /// @brief Returns width of the sensor in pixels - /// - /// @return Sensor's width - int get_width() const override final; +class PseeTriggerIn : public I_TriggerIn { +public: + PseeTriggerIn(const std::shared_ptr &device_control); - /// @brief Returns height of the sensor in pixels - /// - /// @return Sensor's height - int get_height() const override final; +protected: + const std::shared_ptr &get_device_control(); private: - int width_; - int height_; + void setup() override final; + + std::shared_ptr device_control_; }; } // namespace Metavision -#endif // RAW_GEOMETRY_H +#endif // METAVISION_HAL_PSEE_TRIGGER_IN_H diff --git a/hal_psee_plugins/include/facilities/psee_trigger_out.h b/hal_psee_plugins/include/facilities/psee_trigger_out.h new file mode 100644 index 000000000..bbb1085d1 --- /dev/null +++ b/hal_psee_plugins/include/facilities/psee_trigger_out.h @@ -0,0 +1,38 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_PSEE_TRIGGER_OUT_H +#define METAVISION_HAL_PSEE_TRIGGER_OUT_H + +#include + +#include "metavision/hal/facilities/i_trigger_out.h" + +namespace Metavision { +class PseeDeviceControl; + +class PseeTriggerOut : public I_TriggerOut { +public: + PseeTriggerOut(const std::shared_ptr &device_control); + +protected: + const std::shared_ptr &get_device_control() const; + +private: + void setup() override final; + void teardown() override final; + + std::shared_ptr device_control_; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_PSEE_TRIGGER_OUT_H diff --git a/hal_psee_plugins/include/facilities/tz_monitoring.h b/hal_psee_plugins/include/facilities/tz_monitoring.h new file mode 100644 index 000000000..c041c8a28 --- /dev/null +++ b/hal_psee_plugins/include/facilities/tz_monitoring.h @@ -0,0 +1,54 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_TZ_MONITORING_H +#define METAVISION_HAL_TZ_MONITORING_H + +#include + +#include "metavision/hal/facilities/i_monitoring.h" + +namespace Metavision { + +class TemperatureProvider { +public: + /// @brief Gets temperature + /// @return Sensor's temperature (in C) + virtual int get_temperature() = 0; +}; + +class IlluminationProvider { +public: + /// @brief Gets illumination + /// @return Sensor's illumination (in lux) + virtual int get_illumination() = 0; +}; + +class TzMonitoring : public I_Monitoring { +public: + TzMonitoring(const std::shared_ptr &temp, const std::shared_ptr &illu); + + /// @brief Gets temperature + /// @return Sensor's temperature (in C) + virtual int get_temperature(); + + /// @brief Gets illumination + /// @return Sensor's illumination (in lux) + virtual int get_illumination(); + +private: + std::shared_ptr temp_; + std::shared_ptr illu_; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_TZ_MONITORING_H diff --git a/hal/cpp/src/facilities/i_trigger_out.cpp b/hal_psee_plugins/include/geometries/hd_geometry.h similarity index 86% rename from hal/cpp/src/facilities/i_trigger_out.cpp rename to hal_psee_plugins/include/geometries/hd_geometry.h index d536907b8..bf8f0852b 100644 --- a/hal/cpp/src/facilities/i_trigger_out.cpp +++ b/hal_psee_plugins/include/geometries/hd_geometry.h @@ -9,12 +9,15 @@ * See the License for the specific language governing permissions and limitations under the License. * **********************************************************************************************************************/ -#include "metavision/hal/facilities/i_trigger_out.h" +#ifndef METAVISION_HAL_HD_GEOMETRY_H +#define METAVISION_HAL_HD_GEOMETRY_H + +#include "geometries/tgeometry.h" namespace Metavision { -bool I_TriggerOut::loopback(bool) { - return false; -} +using HDGeometry = TGeometry<1280, 720>; } // namespace Metavision + +#endif // METAVISION_HAL_HD_GEOMETRY_H diff --git a/hal_psee_plugins/include/geometries/hvga_geometry.h b/hal_psee_plugins/include/geometries/hvga_geometry.h new file mode 100644 index 000000000..29d835861 --- /dev/null +++ b/hal_psee_plugins/include/geometries/hvga_geometry.h @@ -0,0 +1,23 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_HVGA_GEOMETRY_H +#define METAVISION_HAL_HVGA_GEOMETRY_H + +#include "geometries/tgeometry.h" + +namespace Metavision { + +using HVGAGeometry = TGeometry<480, 360>; + +} // namespace Metavision + +#endif // METAVISION_HAL_HVGA_GEOMETRY_H diff --git a/hal_psee_plugins/include/geometries/tgeometry.h b/hal_psee_plugins/include/geometries/tgeometry.h new file mode 100644 index 000000000..bf32761f5 --- /dev/null +++ b/hal_psee_plugins/include/geometries/tgeometry.h @@ -0,0 +1,42 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_TGEOMETRY_H +#define METAVISION_HAL_TGEOMETRY_H + +#include "metavision/hal/facilities/i_geometry.h" + +namespace Metavision { + +template +class TGeometry : public I_Geometry { +public: + virtual int get_width() const override final { + return width_; + } + + virtual int get_height() const override final { + return height_; + } + +public: + static constexpr int width_ = WIDTH; + static constexpr int height_ = HEIGHT; +}; + +template +constexpr int TGeometry::width_; +template +constexpr int TGeometry::height_; + +} // namespace Metavision + +#endif // METAVISION_HAL_TGEOMETRY_H diff --git a/hal_psee_plugins/include/geometries/vga_geometry.h b/hal_psee_plugins/include/geometries/vga_geometry.h new file mode 100644 index 000000000..aee356ec4 --- /dev/null +++ b/hal_psee_plugins/include/geometries/vga_geometry.h @@ -0,0 +1,23 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_VGA_GEOMETRY_H +#define METAVISION_HAL_VGA_GEOMETRY_H + +#include "geometries/tgeometry.h" + +namespace Metavision { + +using VGAGeometry = TGeometry<640, 480>; + +} // namespace Metavision + +#endif // METAVISION_HAL_VGA_GEOMETRY_H diff --git a/hal_psee_plugins/include/plugin/psee_plugin.h b/hal_psee_plugins/include/plugin/psee_plugin.h new file mode 100644 index 000000000..bf025e549 --- /dev/null +++ b/hal_psee_plugins/include/plugin/psee_plugin.h @@ -0,0 +1,26 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_PSEE_PLUGIN_H +#define METAVISION_HAL_PSEE_PLUGIN_H + +#include + +namespace Metavision { + +const std::string &get_psee_plugin_integrator_name(); + +class Plugin; +void initialize_psee_plugin(Plugin &plugin); + +} // namespace Metavision + +#endif // METAVISION_HAL_PSEE_PLUGIN_H diff --git a/hal_psee_plugins/include/utils/device_builder_factory.h b/hal_psee_plugins/include/utils/device_builder_factory.h new file mode 100644 index 000000000..661ca6565 --- /dev/null +++ b/hal_psee_plugins/include/utils/device_builder_factory.h @@ -0,0 +1,43 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_DEVICE_BUILDER_FACTORY_H +#define METAVISION_HAL_DEVICE_BUILDER_FACTORY_H + +#include +#include +#include +#include +#include + +namespace Metavision { + +class DeviceBuilder; +class DeviceBuilderParameters; +class DeviceConfig; +using DeviceBuilderCallback = + std::function; + +class DeviceBuilderFactory { +public: + bool build(long key, DeviceBuilder &device_builder, const DeviceBuilderParameters &device_builder_parameters, + const DeviceConfig &device_config); + bool insert(long key, const DeviceBuilderCallback &callback); + bool remove(long key); + bool contains(long key); + +private: + std::unordered_map builder_map_; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_DEVICE_BUILDER_FACTORY_H diff --git a/hal_psee_plugins/include/utils/psee_hal_plugin_error_code.h b/hal_psee_plugins/include/utils/psee_hal_plugin_error_code.h new file mode 100644 index 000000000..245987f32 --- /dev/null +++ b/hal_psee_plugins/include/utils/psee_hal_plugin_error_code.h @@ -0,0 +1,43 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_PSEE_HAL_PLUGIN_ERROR_CODE_H +#define METAVISION_HAL_PSEE_HAL_PLUGIN_ERROR_CODE_H + +#include "metavision/hal/utils/hal_error_code.h" + +namespace Metavision { + +/// Failed Initialization Error specific code +namespace PseeHalPluginErrorCode { +enum : HalErrorCodeType { + // Failed initialization errors + BoardCommandNotFound = HalErrorCode::InternalInitializationError | 0xA, + UnknownSystemId = HalErrorCode::InternalInitializationError | 0xB, + InvalidFPGAState = HalErrorCode::InternalInitializationError | 0xE, + DeviceControlNotFound = HalErrorCode::InternalInitializationError | 0xF, + TriggerInNotFound = HalErrorCode::InternalInitializationError | 0x10, + TriggerOutNotFound = HalErrorCode::InternalInitializationError | 0x11, + ErcNotFound = HalErrorCode::InternalInitializationError | 0x12, + HWRegisterNotFound = HalErrorCode::InternalInitializationError | 0x13, + STCModuleNotFound = HalErrorCode::InternalInitializationError | 0x14, + AFKModuleNotFound = HalErrorCode::InternalInitializationError | 0x15, + ERCModuleNotFound = HalErrorCode::InternalInitializationError | 0x16, + EventsStreamNotFound = HalErrorCode::InternalInitializationError | 0x20, + CCam5NotBooted = HalErrorCode::InternalInitializationError | 0x21, + SensorInitError = HalErrorCode::InternalInitializationError | 0x22, + UnknownFormat = HalErrorCode::InternalInitializationError | 0x23, +}; +} + +} // namespace Metavision + +#endif // METAVISION_HAL_PSEE_HAL_PLUGIN_ERROR_CODE_H diff --git a/hal_psee_plugins/include/utils/psee_hal_utils.h b/hal_psee_plugins/include/utils/psee_hal_utils.h new file mode 100644 index 000000000..a5b949786 --- /dev/null +++ b/hal_psee_plugins/include/utils/psee_hal_utils.h @@ -0,0 +1,23 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_PSEE_HAL_UTILS_H +#define METAVISION_HAL_PSEE_HAL_UTILS_H + +namespace Metavision { + +/// @brief Checks whether expert mode (env var MV_FLAGS_HAL_EXPERT_MODE) is on +/// @return True if expert mode is enabled, False otherwise +bool is_expert_mode_enabled(); + +} // namespace Metavision + +#endif // METAVISION_HAL_PSEE_HAL_UTILS_H diff --git a/hal_psee_plugins/include/utils/psee_pattern_generator.h b/hal_psee_plugins/include/utils/psee_pattern_generator.h new file mode 100644 index 000000000..348d80b2f --- /dev/null +++ b/hal_psee_plugins/include/utils/psee_pattern_generator.h @@ -0,0 +1,103 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_PSEE_PATTERN_GENERATOR_H +#define METAVISION_HAL_PSEE_PATTERN_GENERATOR_H + +#include + +namespace Metavision { + +/// @brief Virtual interface to handle a sensor's pattern generator +/// +/// The pattern generator of the sensor's generates a controlled stream of events according to a fixed configuration and +/// dynamics periods. The pattern generator configuration defines the pattern model type, the type of event generated, +/// and the polarity of the events generated. It must be decided before enabling the pattern generator. A pattern +/// generator period is defined by a duration (in 10 * ns) during which it generates a fixed event rate (in Mev/s). 2 +/// periods (called n and p) can be configured dynamically (before or after enabling) +class PseePatternGenerator { +public: + /// @brief Hold all the pattern generator properties for enabling + /// + struct Configuration { + /// @brief Holds pattern type scan type + /// + enum class PatternType : uint8_t { + /// goes through all the pixels column wise + Column = 0, + + /// goes through the diagonal: x = y (from 0); + Slash = 1, + + /// Evt3 vectorized pattern + Vector = 2, + }; + + /// @brief Holds generated pixel type + /// + enum class PixelType : uint8_t { + CD = 0, + EM = 1, + }; + + PatternType pattern_type{PatternType::Column}; + PixelType pixel_type{PixelType::CD}; + uint8_t pixel_polarity{0}; + }; /// struct Configuration + + virtual ~PseePatternGenerator() {} + + /// @brief Configures the pattern generator according to the input and enables it. + /// + /// @param configuration The pattern generator configuration to set. + /// @return If the pattern was effectively enabled with the input configuration + virtual bool enable(const Configuration &configuration) = 0; + + /// @brief Gets the sensor's pattern geometry + /// + virtual void get_pattern_geometry(int &width, int &height) const = 0; + + /// @brief Disables the pattern generator + /// + virtual void disable() = 0; + + /// @brief Returns if the pattern generator is enabled + /// + virtual bool is_enabled() = 0; + + /// @brief Sets the duration of the first and second period of the pattern generator. + /// + /// Step duration is 10 ns i.e. passing 100 as step_count is equivalent to set a period of 1000 ns. + /// Max period length is (2^16 - 1) * 10 ns i.e. max step count is (2^16 - 1) + /// + /// During this period length, the pattern generator generates events at a fixed rate (\ref set_period_rate). + /// Periods n and p alternate i.e. N Mev/s are generated during n_step_count*10ns and then P Mev/s are generated + /// during p_step_count*10ns and so on. + /// + /// @param n_step_count the first period step count. Sets a period of n_step_count*10ns + /// @param p_step_count the first period step count. Sets a period of p_step_count*10ns + virtual void set_period_step_count(uint16_t n_step_count, uint16_t p_step_count) = 0; + + /// @brief Sets the event rate generated during the first and second periods. + /// + /// @param n_rate_Mev_s the rate of the first period in Mev/s + /// @param p_rate_Mev_s the rate of the second period in Mev/s + virtual void set_period_rate(uint8_t n_rate_Mev_s, uint8_t p_rate_Mev_s) = 0; + +protected: + /// state variable to know if default values are to be set + bool is_period_rate_set_{false}; + bool is_period_length_set_{false}; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_PSEE_PATTERN_GENERATOR_H diff --git a/hal_psee_plugins/include/utils/psee_pattern_generator_checker.h b/hal_psee_plugins/include/utils/psee_pattern_generator_checker.h new file mode 100644 index 000000000..ef0d47e54 --- /dev/null +++ b/hal_psee_plugins/include/utils/psee_pattern_generator_checker.h @@ -0,0 +1,45 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_PSEE_PATTERN_GENERATOR_CHECKER_H +#define METAVISION_HAL_PSEE_PATTERN_GENERATOR_CHECKER_H + +#include + +#include "metavision/sdk/base/events/event2d.h" +#include "utils/psee_pattern_generator.h" + +using Event2d = Metavision::Event2d; + +namespace Metavision { + +class PseePatternGeneratorChecker { +public: + struct Error { + int idx; + size_t lost; + }; + + class PatternChecker { + public: + virtual ~PatternChecker(); + virtual std::vector check(const Event2d *ev_begin, const Event2d *ev_end) = 0; + }; + + virtual ~PseePatternGeneratorChecker(); + + /// @brief Returns a pattern checker for the sensor + virtual PatternChecker *build_pattern_checker(const PseePatternGenerator::Configuration &configuration) const = 0; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_PSEE_PATTERN_GENERATOR_CHECKER_H diff --git a/hal_psee_plugins/include/utils/register_map.h b/hal_psee_plugins/include/utils/register_map.h new file mode 100644 index 000000000..78b15fab5 --- /dev/null +++ b/hal_psee_plugins/include/utils/register_map.h @@ -0,0 +1,167 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_REGISTER_MAP_H +#define METAVISION_HAL_REGISTER_MAP_H + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "metavision/hal/utils/hal_log.h" + +namespace Metavision { + +class RegisterMap { +public: + class Field { + public: + Field() = default; + Field(const Field &) = default; + Field(const std::string &n, uint8_t start, uint8_t len, uint32_t default_value = 0, + const std::map &aliases = {}); + + void add_alias(const std::string &name, uint32_t value); + uint8_t get_start() const; + uint8_t get_len() const; + void set_start(uint8_t b); + void set_len(uint8_t b); + const std::string &get_name() const; + void set_name(const std::string &n); + + void set_bitfield_in_value(uint32_t v, uint32_t ®ister_value) const; + uint32_t get_bitfield_in_value(uint32_t register_value) const; + void set_default_bitfield_in_value(uint32_t ®ister_value) const; + uint32_t get_alias_value(const std::string &alias) const; + + private: + void init_mask(); + std::string name_; + uint8_t start_; + uint8_t len_; + uint32_t mask_ = 0; + uint32_t default_value_ = 0; + std::map aliases_; + }; + + class Register; + class RegisterAccess; + class FieldAccess { + public: + friend class Register; + friend class RegisterAccess; + void write_value(uint32_t v); + Field *get_field(); + uint32_t read_value(); + FieldAccess &operator=(const std::string &alias); + FieldAccess &operator=(uint32_t v); + + private: + FieldAccess(Register *reg, Field *field); + Field *field_; + Register *register_; + }; + + class RegisterAccess { + public: + friend class RegisterMap; + + void write_value(uint32_t v); + void write_value(const std::map &bitfields); + void write_value(const std::pair &bitfield); + void write_value(const std::string &bitfieldname, const std::string &bitfieldvalue); + void write_value(const std::map &bitfield); + /* void write_value(const std::string &field, const std::string &alias); */ + + RegisterAccess &operator=(uint32_t v); + RegisterAccess &operator=(const std::map &bitfields); + /* RegisterAccess &operator=(std::string &alias); */ + + FieldAccess operator[](const std::string &name); + + uint32_t read_value(); + uint32_t get_value(); + uint32_t get_address(); + std::string get_name() const; + + private: + RegisterAccess(Register *field); + Register *register_; + }; + + class Register { + public: + Register() = default; + Register(const Register &) = default; + Register(const std::string &n, uint32_t address, std::initializer_list l = {}); + + uint32_t get_address() const; + void set_address(uint32_t addr); + const std::string &get_name() const; + void set_name(const std::string &n); + + void set_register_map(RegisterMap *register_map); + Register &add_field(const Field &f); + + void write_value(uint32_t v); + void write_value(const std::string fieldname, uint32_t value); + void write_value(const std::map &bitfields); + void write_value(const std::pair &bitfield); + void write_value(const std::string &bitfieldname, const std::string &bitfieldvalue); + + Register &operator=(uint32_t v); + Register &operator=(const std::map &bitfields); + + FieldAccess operator[](const std::string &name); + + uint32_t read_value(); + uint32_t get_value(); + Field *bit_to_field(uint32_t bit); + + private: + std::string name_; + uint32_t address_ = 0; + RegisterMap *register_map_ = nullptr; + std::map name_to_field_; + }; + + RegisterMap(); + + RegisterAccess operator[](uint32_t addr); + RegisterAccess operator[](const std::string &name); + + void add_register(const Register &r); + + void write(uint32_t address, uint32_t v); + uint32_t read(uint32_t address); + + typedef std::function write_cb_t; + typedef std::function read_cb_t; + void set_write_cb(write_cb_t cb); + void set_read_cb(read_cb_t cb); + + void dump(); + +private: + write_cb_t write_cb_; + read_cb_t read_cb_; + std::map> addr_to_register_; + std::map> name_to_register_; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_REGISTER_MAP_H diff --git a/sdk/modules/base/cpp/include/metavision/sdk/base/events/event_illuminance.h b/hal_psee_plugins/include/utils/regmap_data.h similarity index 60% rename from sdk/modules/base/cpp/include/metavision/sdk/base/events/event_illuminance.h rename to hal_psee_plugins/include/utils/regmap_data.h index df32cfcda..d21b15494 100644 --- a/sdk/modules/base/cpp/include/metavision/sdk/base/events/event_illuminance.h +++ b/hal_psee_plugins/include/utils/regmap_data.h @@ -9,31 +9,41 @@ * See the License for the specific language governing permissions and limitations under the License. * **********************************************************************************************************************/ -#ifndef METAVISION_SDK_BASE_EVENT_ILLUMINANCE_H -#define METAVISION_SDK_BASE_EVENT_ILLUMINANCE_H - -#include "metavision/sdk/base/utils/timestamp.h" - -namespace Metavision { - -/// @brief Class representing an Illuminance event -/// @note This class is deprecated since version 2.1.0 and will be removed in next releases -struct EventIlluminance { - /// @brief Default constructor - EventIlluminance() = default; - - /// @brief Constructor - /// @param time Timestamp at which the event happened (in us) - /// @param illum Illuminance value (in lux) - EventIlluminance(timestamp time, float illum) : t(time), illuminance(illum) {} - - /// @brief Timestamp at which the event happened (in us) - timestamp t; - - /// @brief Illuminance value (in lux) - float illuminance; +#ifndef METAVISION_HAL_REGMAP_DATA_H +#define METAVISION_HAL_REGMAP_DATA_H + +#include +#include + +#include "utils/register_map.h" + +enum TypeRegmapData { R, F, A }; // Register, Field, Alias + +struct RegmapData { + TypeRegmapData type; + struct FieldData { + const char *name; + uint32_t start; + uint32_t len; + uint32_t default_value; + }; + struct RegisterData { + const char *name; + uint32_t addr; + }; + struct AliasData { + const char *name; + uint32_t value; + }; + union { + FieldData field_data; + RegisterData register_data; + AliasData alias_data; + }; }; +namespace Metavision { +void init_device_regmap(RegisterMap ®map, std::vector> &); } // namespace Metavision -#endif // METAVISION_SDK_BASE_EVENT_ILLUMINANCE_H +#endif // METAVISION_HAL_REGMAP_DATA_H diff --git a/hal_psee_plugins/lib/CMakeLists.txt b/hal_psee_plugins/lib/CMakeLists.txt new file mode 100644 index 000000000..976dbdbef --- /dev/null +++ b/hal_psee_plugins/lib/CMakeLists.txt @@ -0,0 +1,426 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. + +# Compile code that is used multiple times in object libraries : + +set(lib_common_obj_list + metavision_hal_psee_plugin_obj +) + +set(lib_camera_obj_list "") +if (NOT ANDROID) + set(lib_camera_obj_list + metavision_hal_gen3_camera_obj + metavision_hal_gen3_pattern_checkers_obj + metavision_hal_gen31_camera_obj + metavision_hal_gen41_camera_obj + metavision_hal_imx636_camera_obj + metavision_hal_fx3_protocol_obj + metavision_hal_treuzell_protocol_obj + metavision_hal_ccam3_obj + metavision_hal_psee_video_obj + metavision_hal_ti_tmp103_obj + metavision_hal_gen31_fx3_system_obj + metavision_hal_gen31_evk2_system_obj + metavision_hal_gen31_evk3_system_obj + metavision_hal_gen41_evk2_system_obj + metavision_hal_gen41_evk3_system_obj + metavision_hal_imx636_evk2_system_obj + metavision_hal_imx636_evk3_system_obj + metavision_hal_libusb_utils_obj + ) + if(HAL_GEN4_SUPPORT) + list(APPEND lib_camera_obj_list + metavision_hal_gen4_camera_obj + metavision_hal_gen4_fx3_system_obj + metavision_hal_gen4_evk2_system_obj + ) + endif(HAL_GEN4_SUPPORT) +endif (NOT ANDROID) + +set(lib_obj_list ${lib_common_obj_list} ${lib_camera_obj_list}) + +foreach(lib_obj ${lib_obj_list}) + add_library(${lib_obj} OBJECT) + target_link_libraries(${lib_obj} + PUBLIC + metavision_hal + ) + target_include_directories(${lib_obj} + PUBLIC + $ + ) + + # The following line is needed because when linking a shared library to an object one, + # the object library needs to be compiled with -fPIC + # cf https://stackoverflow.com/questions/50600708/combining-cmake-object-libraries-with-shared-libraries + set_target_properties(${lib_obj} + PROPERTIES + POSITION_INDEPENDENT_CODE ON + ) +endforeach() + +# Custom target for all plugins (useful to use as a dependency) +add_custom_target(hal_plugins) + +# Android does not support live cameras -> we need to compile only the common objects for RAW file reading. +if (NOT ANDROID) + # Otherwise, all the code for live cameras is compiled + + ######################### + # Camera lib objects + foreach(lib_obj ${lib_camera_obj_list}) + target_link_libraries(${lib_obj} + PUBLIC + libusb-1.0 + ) + + target_include_directories(${lib_obj} + PRIVATE + ${biasgen_calib_files_dir} + ) + endforeach() +endif (NOT ANDROID) + +set(hal_psee_plugins_target_file_list) + +set(plugin_list + hal_plugin_gen3_fx3 + hal_plugin_gen31_fx3 + hal_plugin_gen31_evk2 + hal_plugin_gen31_evk3 + hal_plugin_gen41_evk2 + hal_plugin_gen41_evk3 + hal_plugin_imx636_evk2 + hal_plugin_imx636_evk3 + hal_plugin_imx636_evk4 + hal_plugin_golden_fallbacks + hal_plugin_prophesee +) + +if(HAL_GEN4_SUPPORT) + list(APPEND plugin_list + hal_plugin_gen4_fx3 + hal_plugin_gen4_evk2 + ) +endif(HAL_GEN4_SUPPORT) + +foreach(plugin ${plugin_list}) + # Declare the plugin as a shared library + add_library(${plugin} SHARED) + add_dependencies(hal_plugins ${plugin}) + + target_sources(${plugin} + PRIVATE + $ + $ + ) + + target_link_libraries(${plugin} + PRIVATE + metavision_hal_psee_plugin_obj + metavision_hal_info_obj + PUBLIC + metavision_hal + ) + + target_include_directories(${plugin} + PRIVATE + ${biasgen_calib_files_dir} + ) + + if(NOT ${CMAKE_VERSION} VERSION_LESS "3.13.3" AND NOT APPLE AND NOT MSVC) + target_link_options(${plugin} PRIVATE "LINKER:-z,defs") + endif() + + list(APPEND hal_psee_plugins_target_file_list $) + + if(NOT plugin STREQUAL "hal_plugin_prophesee") + # instead of setting the RUNTIME/LIBRARY_OUTPUT_DIRECTORY property on the target, we manually copy + # the library : this will work for linux and windows and avoid the automatic copy of the DLLs the + # plugin depends on by MSVC + add_custom_command(TARGET ${plugin} POST_BUILD + COMMAND ${CMAKE_COMMAND} -E make_directory "${HAL_BUILD_PLUGIN_PATH}" + COMMAND ${CMAKE_COMMAND} -E copy "$" "${HAL_BUILD_PLUGIN_PATH}") + + list(APPEND hal_psee_plugins_target_file_list "${HAL_BUILD_PLUGIN_PATH}/$") + + install(TARGETS ${plugin} + LIBRARY DESTINATION "${HAL_INSTALL_PLUGIN_RELATIVE_PATH}" COMPONENT metavision-hal-prophesee-plugins + RUNTIME DESTINATION "${HAL_INSTALL_PLUGIN_RELATIVE_PATH}" COMPONENT metavision-hal-prophesee-plugins + #ARCHIVE : we don't want to install .lib files for the plugins, it's useless + ) + else() + # We put the Universal plugin in a separate folder, and don't install it with Metavision + add_custom_command(TARGET ${plugin} POST_BUILD + COMMAND ${CMAKE_COMMAND} -E make_directory "${HAL_BUILD_PLUGIN_PATH}_universal" + COMMAND ${CMAKE_COMMAND} -E copy "$" "${HAL_BUILD_PLUGIN_PATH}_universal") + + list(APPEND hal_psee_plugins_target_file_list "${HAL_BUILD_PLUGIN_PATH}_universal/$") + endif() + +endforeach() + +if (NOT ANDROID) +# Linkage with generic hal plugin object +target_sources(hal_plugin_gen3_fx3 + PRIVATE + $ + $ + $ + $ + $ +) + +target_link_libraries(hal_plugin_gen3_fx3 + PRIVATE + metavision_hal_gen3_camera_obj + metavision_hal_gen3_pattern_checkers_obj + metavision_hal_fx3_protocol_obj + metavision_hal_ccam3_obj + metavision_hal_libusb_utils_obj +) + +# Linkage with generic hal plugin object +target_sources(hal_plugin_gen31_fx3 + PRIVATE + $ + $ + $ + $ + $ + $ +) + +target_link_libraries(hal_plugin_gen31_fx3 + PRIVATE + metavision_hal_gen31_camera_obj + metavision_hal_gen3_pattern_checkers_obj + metavision_hal_fx3_protocol_obj + metavision_hal_ccam3_obj + metavision_hal_gen31_fx3_system_obj + metavision_hal_libusb_utils_obj +) + +# Linkage with generic hal plugin object +target_sources(hal_plugin_gen31_evk2 + PRIVATE + $ + $ + $ + $ + $ + $ +) + +target_link_libraries(hal_plugin_gen31_evk2 + PRIVATE + metavision_hal_gen31_camera_obj + metavision_hal_gen3_pattern_checkers_obj + metavision_hal_treuzell_protocol_obj + metavision_hal_psee_video_obj + metavision_hal_gen31_evk2_system_obj + metavision_hal_libusb_utils_obj +) + +# Linkage with generic hal plugin object +target_sources(hal_plugin_gen31_evk3 + PRIVATE + $ + $ + $ + $ + $ + $ +) + +target_link_libraries(hal_plugin_gen31_evk3 + PRIVATE + metavision_hal_gen31_camera_obj + metavision_hal_gen3_pattern_checkers_obj + metavision_hal_treuzell_protocol_obj + metavision_hal_ti_tmp103_obj + metavision_hal_gen31_evk3_system_obj + metavision_hal_libusb_utils_obj +) + +if(HAL_GEN4_SUPPORT) + # Linkage with generic hal plugin object + target_sources(hal_plugin_gen4_fx3 + PRIVATE + $ + $ + $ + $ + $ + ) + + target_link_libraries(hal_plugin_gen4_fx3 + PRIVATE + metavision_hal_gen4_camera_obj + metavision_hal_fx3_protocol_obj + metavision_hal_ccam3_obj + metavision_hal_gen4_fx3_system_obj + metavision_hal_libusb_utils_obj + ) + + # Linkage with generic hal plugin object + target_sources(hal_plugin_gen4_evk2 + PRIVATE + $ + $ + $ + $ + $ + ) + + target_link_libraries(hal_plugin_gen4_evk2 + PRIVATE + metavision_hal_gen4_camera_obj + metavision_hal_treuzell_protocol_obj + metavision_hal_psee_video_obj + metavision_hal_gen4_evk2_system_obj + metavision_hal_libusb_utils_obj + ) +endif(HAL_GEN4_SUPPORT) + +# Linkage with generic hal plugin object +target_sources(hal_plugin_gen41_evk2 + PRIVATE + $ + $ + $ + $ + $ +) + +target_link_libraries(hal_plugin_gen41_evk2 + PRIVATE + metavision_hal_gen41_camera_obj + metavision_hal_treuzell_protocol_obj + metavision_hal_psee_video_obj + metavision_hal_gen41_evk2_system_obj + metavision_hal_libusb_utils_obj +) + +# Linkage with generic hal plugin object +target_sources(hal_plugin_gen41_evk3 + PRIVATE + $ + $ + $ + $ + $ +) + +target_link_libraries(hal_plugin_gen41_evk3 + PRIVATE + metavision_hal_gen41_camera_obj + metavision_hal_treuzell_protocol_obj + metavision_hal_ti_tmp103_obj + metavision_hal_gen41_evk3_system_obj + metavision_hal_libusb_utils_obj +) + +# Linkage with generic hal plugin object +target_sources(hal_plugin_imx636_evk2 + PRIVATE + $ + $ + $ + $ + $ + $ +) + +target_link_libraries(hal_plugin_imx636_evk2 + PRIVATE + metavision_hal_gen41_camera_obj + metavision_hal_imx636_camera_obj + metavision_hal_treuzell_protocol_obj + metavision_hal_psee_video_obj + metavision_hal_imx636_evk2_system_obj + metavision_hal_libusb_utils_obj +) + +# Linkage with generic hal plugin object +target_sources(hal_plugin_imx636_evk3 + PRIVATE + $ + $ + $ + $ + $ + $ +) + +target_link_libraries(hal_plugin_imx636_evk3 + PRIVATE + metavision_hal_gen41_camera_obj + metavision_hal_imx636_camera_obj + metavision_hal_treuzell_protocol_obj + metavision_hal_ti_tmp103_obj + metavision_hal_imx636_evk3_system_obj + metavision_hal_libusb_utils_obj +) + +# Linkage with generic hal plugin object +target_sources(hal_plugin_imx636_evk4 + PRIVATE + $ + $ + $ + $ + $ + $ +) + +target_link_libraries(hal_plugin_imx636_evk4 + PRIVATE + metavision_hal_gen41_camera_obj + metavision_hal_imx636_camera_obj + metavision_hal_treuzell_protocol_obj + metavision_hal_ti_tmp103_obj + metavision_hal_imx636_evk3_system_obj + metavision_hal_libusb_utils_obj +) + +target_sources(hal_plugin_golden_fallbacks + PRIVATE + $ + $ + $ +) + +target_link_libraries(hal_plugin_golden_fallbacks + PRIVATE + metavision_hal_treuzell_protocol_obj + metavision_hal_fx3_protocol_obj + metavision_hal_libusb_utils_obj +) + +foreach(object ${lib_camera_obj_list}) + # Linkage with generic hal plugin object + target_sources(hal_plugin_prophesee + PRIVATE + $ + ) + + target_link_libraries(hal_plugin_prophesee + PRIVATE + ${object} + ) +endforeach() + +endif(NOT ANDROID) + +if(EXISTS "${PROJECT_SOURCE_DIR}/licensing/LICENSE_METAVISION_INTELLIGENCE") + install(FILES ${PROJECT_SOURCE_DIR}/licensing/LICENSE_METAVISION_INTELLIGENCE + DESTINATION share/metavision/licensing) +endif() diff --git a/hal_openeb_plugins/CMakeLists.txt b/hal_psee_plugins/resources/CMakeLists.txt similarity index 70% rename from hal_openeb_plugins/CMakeLists.txt rename to hal_psee_plugins/resources/CMakeLists.txt index b5989209d..66cffa9cf 100644 --- a/hal_openeb_plugins/CMakeLists.txt +++ b/hal_psee_plugins/resources/CMakeLists.txt @@ -7,11 +7,10 @@ # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and limitations under the License. -# Add libraries (plugins) -set(metavision_hal_openeb_plugins_include_dir "${CMAKE_CURRENT_SOURCE_DIR}/include") -add_subdirectory(lib) +add_subdirectory(rules) -# Add sources plugins -add_subdirectory(src) - -add_cpack_component(PRIVATE metavision-hal-openeb-plugins) \ No newline at end of file +# Install biases +install(DIRECTORY biases + DESTINATION share/metavision/hal/resources + COMPONENT metavision-hal-prophesee-plugins +) diff --git a/hal_psee_plugins/resources/biases/gen31_CD_standard.bias b/hal_psee_plugins/resources/biases/gen31_CD_standard.bias new file mode 100644 index 000000000..ebc549853 --- /dev/null +++ b/hal_psee_plugins/resources/biases/gen31_CD_standard.bias @@ -0,0 +1,7 @@ +299 % bias_diff +221 % bias_diff_off +384 % bias_diff_on +1477 % bias_fo +1499 % bias_hpf +1250 % bias_pr +1500 % bias_refr diff --git a/hal_psee_plugins/resources/biases/gen3_CD_standard.bias b/hal_psee_plugins/resources/biases/gen3_CD_standard.bias new file mode 100644 index 000000000..354a0eb4e --- /dev/null +++ b/hal_psee_plugins/resources/biases/gen3_CD_standard.bias @@ -0,0 +1,7 @@ +300 % bias_diff +225 % bias_diff_off +375 % bias_diff_on +1725 % bias_fo +1500 % bias_hpf +1500 % bias_pr +1500 % bias_refr diff --git a/hal_psee_plugins/resources/biases/gen41_CD_standard.bias b/hal_psee_plugins/resources/biases/gen41_CD_standard.bias new file mode 100644 index 000000000..c6c72e295 --- /dev/null +++ b/hal_psee_plugins/resources/biases/gen41_CD_standard.bias @@ -0,0 +1,6 @@ +80 % bias_diff +52 % bias_diff_off +115 % bias_diff_on +74 % bias_fo +0 % bias_hpf +68 % bias_refr diff --git a/hal_psee_plugins/resources/biases/gen4_CD_standard.bias b/hal_psee_plugins/resources/biases/gen4_CD_standard.bias new file mode 100644 index 000000000..21c43f2bb --- /dev/null +++ b/hal_psee_plugins/resources/biases/gen4_CD_standard.bias @@ -0,0 +1,7 @@ +69 % bias_diff +52 % bias_diff_off +112 % bias_diff_on +23 % bias_fo_n +48 % bias_hpf +131 % bias_pr +45 % bias_refr diff --git a/hal_psee_plugins/resources/biases/gen4_EM_CD_only_standard.bias b/hal_psee_plugins/resources/biases/gen4_EM_CD_only_standard.bias new file mode 100644 index 000000000..c9cd1b021 --- /dev/null +++ b/hal_psee_plugins/resources/biases/gen4_EM_CD_only_standard.bias @@ -0,0 +1,7 @@ +84 % bias_diff +64 % bias_diff_off +120 % bias_diff_on +48 % bias_fo_p +64 % bias_hpf +131 % bias_pr +74 % bias_refr diff --git a/hal_psee_plugins/resources/biases/imx636_CD_standard.bias b/hal_psee_plugins/resources/biases/imx636_CD_standard.bias new file mode 100644 index 000000000..138fd7b9d --- /dev/null +++ b/hal_psee_plugins/resources/biases/imx636_CD_standard.bias @@ -0,0 +1,6 @@ +0 % bias_diff +0 % bias_diff_off +0 % bias_diff_on +0 % bias_fo +0 % bias_hpf +0 % bias_refr diff --git a/hal_psee_plugins/resources/rules/88-cyusb.rules b/hal_psee_plugins/resources/rules/88-cyusb.rules new file mode 100644 index 000000000..16a6871e0 --- /dev/null +++ b/hal_psee_plugins/resources/rules/88-cyusb.rules @@ -0,0 +1,6 @@ +# Cypress USB driver for FX2 and FX3 (C) Cypress Semiconductor Corporation / ATR-LABS +# Rules written by V. Radhakrishnan ( rk@atr-labs.com ) +# Cypress USB vendor ID = 0x04b4 +# Note: The cy_renumerate.sh script is required only when using Cypress SDK cyusb_linux tool (to flash via USB) +KERNEL=="*", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ACTION=="add", ATTR{idVendor}=="04b4", MODE="666", TAG="cyusb_dev", RUN+="/usr/local/bin/cy_renumerate.sh A" +KERNEL=="*", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ACTION=="remove", TAG=="cyusb_dev", RUN+="/usr/local/bin/cy_renumerate.sh R" diff --git a/hal_psee_plugins/resources/rules/99-evkv2.rules b/hal_psee_plugins/resources/rules/99-evkv2.rules new file mode 100644 index 000000000..ad8adcef7 --- /dev/null +++ b/hal_psee_plugins/resources/rules/99-evkv2.rules @@ -0,0 +1 @@ +ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="03fd", ATTR{idProduct}=="5832", MODE="0666" \ No newline at end of file diff --git a/hal_psee_plugins/resources/rules/CMakeLists.txt b/hal_psee_plugins/resources/rules/CMakeLists.txt new file mode 100644 index 000000000..70d2bb834 --- /dev/null +++ b/hal_psee_plugins/resources/rules/CMakeLists.txt @@ -0,0 +1,27 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. + +if((NOT WIN32) AND (NOT APPLE) AND (NOT ANDROID)) + + set(rules + ${CMAKE_CURRENT_SOURCE_DIR}/88-cyusb.rules + ${CMAKE_CURRENT_SOURCE_DIR}/99-evkv2.rules + ) + foreach(rule ${rules}) + install(FILES ${rule} + DESTINATION share/metavision/hal/resources/rules + COMPONENT metavision-hal-prophesee-plugins + ) + install(FILES ${rule} + DESTINATION /etc/udev/rules.d + COMPONENT metavision-hal-prophesee-plugins + ) + endforeach(rule) + +endif((NOT WIN32) AND (NOT APPLE) AND (NOT ANDROID)) \ No newline at end of file diff --git a/hal_psee_plugins/src/CMakeLists.txt b/hal_psee_plugins/src/CMakeLists.txt new file mode 100644 index 000000000..c70bce9d5 --- /dev/null +++ b/hal_psee_plugins/src/CMakeLists.txt @@ -0,0 +1,16 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. + +add_subdirectory(boards) +if (NOT ANDROID) + add_subdirectory(devices) + add_subdirectory(facilities) + add_subdirectory(utils) +endif (NOT ANDROID) +add_subdirectory(plugin) diff --git a/hal_psee_plugins/src/boards/CMakeLists.txt b/hal_psee_plugins/src/boards/CMakeLists.txt new file mode 100644 index 000000000..2a5cdd3f7 --- /dev/null +++ b/hal_psee_plugins/src/boards/CMakeLists.txt @@ -0,0 +1,15 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. + +if (NOT ANDROID) + add_subdirectory(treuzell) + add_subdirectory(fx3) + add_subdirectory(utils) +endif(NOT ANDROID) +add_subdirectory(rawfile) diff --git a/hal_psee_plugins/src/boards/fx3/CMakeLists.txt b/hal_psee_plugins/src/boards/fx3/CMakeLists.txt new file mode 100644 index 000000000..7c28bfc57 --- /dev/null +++ b/hal_psee_plugins/src/boards/fx3/CMakeLists.txt @@ -0,0 +1,14 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. + +target_sources(metavision_hal_fx3_protocol_obj PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/fx3_camera_discovery.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/fx3_libusb_board_command.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/fx3_hw_identification.cpp +) diff --git a/hal_psee_plugins/src/boards/fx3/fx3_camera_discovery.cpp b/hal_psee_plugins/src/boards/fx3/fx3_camera_discovery.cpp new file mode 100644 index 000000000..83d7643b4 --- /dev/null +++ b/hal_psee_plugins/src/boards/fx3/fx3_camera_discovery.cpp @@ -0,0 +1,90 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include +#include +#include +#include +#include + +#include "boards/rawfile/psee_raw_file_header.h" +#include "boards/fx3/fx3_camera_discovery.h" +#include "facilities/psee_device_control.h" +#include "boards/utils/psee_libusb_board_command.h" +#include "metavision/hal/utils/device_config.h" +#include "metavision/hal/utils/hal_log.h" +#include "metavision/hal/facilities/i_events_stream.h" +#include "metavision/hal/facilities/i_decoder.h" +#include "boards/fx3/fx3_libusb_board_command.h" +#include "devices/utils/device_system_id.h" +#include "metavision/hal/utils/hal_exception.h" +#include "utils/psee_hal_plugin_error_code.h" +#include "boards/utils/psee_libusb_data_transfer.h" + +namespace Metavision { + +CameraDiscovery::SerialList Fx3CameraDiscovery::list() { + CameraDiscovery::SerialList ret; + auto serials = Fx3LibUSBBoardCommand::get_list_serial(); + for (auto serial : serials) { + Fx3LibUSBBoardCommand cmd; + cmd.open(serial); + SystemId system_id = static_cast(cmd.get_system_id()); + if (device_builder_factory().contains(system_id)) { + ret.push_back(serial); + } + } + return ret; +} + +CameraDiscovery::SystemList Fx3CameraDiscovery::list_available_sources() { + CameraDiscovery::SystemList system_list; + CameraDiscovery::SerialList ret = Fx3LibUSBBoardCommand::get_list_serial(); + + for (auto serial : ret) { + Fx3LibUSBBoardCommand cmd; + cmd.open(serial); + SystemId system_id = static_cast(cmd.get_system_id()); + if (device_builder_factory().contains(system_id)) { + system_list.push_back({serial, USB_LINK, system_id}); + } + } + return system_list; +} + +bool Fx3CameraDiscovery::discover(DeviceBuilder &device_builder, const std::string &serial, + const DeviceConfig &config) { + CameraDiscovery::SerialList ret = list(); + if (ret.empty()) + return false; + if (serial != "" && std::find(ret.begin(), ret.end(), serial) == ret.end()) + return false; + + auto fx3boardcmd = std::make_shared(); + if (!fx3boardcmd->open(serial)) { + return false; + } + + long fx3_version = fx3boardcmd->get_board_version(); + long system_id = fx3boardcmd->get_system_id(); + if (fx3_version == 2) { + DeviceBuilderParameters params(fx3boardcmd); + if (device_builder_factory().build(system_id, device_builder, params, config)) { + return true; + } + } else { + MV_HAL_LOG_ERROR() << "####### Fx3 Version != 2"; + } + + return false; +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/boards/fx3/fx3_hw_identification.cpp b/hal_psee_plugins/src/boards/fx3/fx3_hw_identification.cpp new file mode 100644 index 000000000..828b52fe6 --- /dev/null +++ b/hal_psee_plugins/src/boards/fx3/fx3_hw_identification.cpp @@ -0,0 +1,122 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include +#include + +#include "boards/rawfile/psee_raw_file_header.h" +#include "facilities/psee_device_control.h" +#include "boards/utils/psee_libusb_board_command.h" +#include "boards/fx3/fx3_hw_identification.h" +#include "devices/utils/device_system_id.h" +#include "metavision/hal/facilities/i_plugin_software_info.h" +#include "metavision/hal/utils/hal_exception.h" +#include "utils/psee_hal_plugin_error_code.h" +#include "geometries/hd_geometry.h" +#include "geometries/vga_geometry.h" + +namespace Metavision { + +Fx3HWIdentification::Fx3HWIdentification(const std::shared_ptr &plugin_sw_info, + const std::shared_ptr &board_cmd, bool is_EVT3, + long subsystem_ID, const std::string &integrator) : + I_HW_Identification(plugin_sw_info), + icmd_(board_cmd), + sensor_info_({0, 0}), + is_evt3_(is_EVT3), + subsystem_ID_(subsystem_ID), + integrator_(integrator) { + if (!icmd_) { + throw(HalException(PseeHalPluginErrorCode::BoardCommandNotFound, "Board command is null.")); + } + sensor_info_ = get_sensor_info(); +} + +std::string Fx3HWIdentification::get_serial() const { + return icmd_->get_serial(); +} +long Fx3HWIdentification::get_system_id() const { + return icmd_->get_system_id(); +} + +std::string Fx3HWIdentification::get_integrator() const { + return integrator_; +} +std::string Fx3HWIdentification::get_connection_type() const { + return "USB"; +} + +std::vector Fx3HWIdentification::get_available_raw_format() const { + auto sensor_info = get_sensor_info(); + std::vector available_formats; + available_formats.push_back("EVT2"); + if (sensor_info.major_version_ == 4) { + available_formats.push_back("EVT3"); + } + return available_formats; +} + +I_HW_Identification::SensorInfo Fx3HWIdentification::get_sensor_info() const { + if (sensor_info_.major_version_ != 0) { + return sensor_info_; + } + I_HW_Identification::SensorInfo sensor_info; + long system_id = icmd_->get_system_id(); + systemid2version(system_id, sensor_info.major_version_, sensor_info.minor_version_); + return sensor_info; +} + +I_HW_Identification::SystemInfo Fx3HWIdentification::get_system_info() const { + auto infos = I_HW_Identification::get_system_info(); + infos.insert({"FX3 ID", std::to_string(icmd_->get_board_id())}); + long fx3_version = icmd_->get_board_release_version(); + std::string version = std::to_string((fx3_version >> 16) & 0xFF) + "." + std::to_string((fx3_version >> 8) & 0xFF) + + "." + std::to_string((fx3_version >> 0) & 0xFF); + infos.insert({"FX3 Release Version", version}); + time_t fx3_build_date = (time_t)icmd_->get_board_build_date(); + const char *fx3_build_date_charptr = asctime(localtime(&fx3_build_date)); + std::string fx3_build_date_str = fx3_build_date_charptr == 0 ? "NA" : std::string(fx3_build_date_charptr); + fx3_build_date_str.pop_back(); + infos.insert({"FX3 Build Date", fx3_build_date_str}); + std::stringstream stream; + stream << "0x" << std::hex << icmd_->get_board_version_control_id(); + std::string result(stream.str()); + infos.insert({"FX3 Version Control ID", result}); + infos.insert({"FX3 Speed", std::to_string(icmd_->get_board_speed())}); + time_t system_build_date = (time_t)icmd_->get_system_build_date(); + const char *system_build_date_charptr = asctime(localtime(&system_build_date)); + std::string system_build_date_str = system_build_date_charptr == 0 ? "NA" : std::string(system_build_date_charptr); + system_build_date_str.pop_back(); + infos.insert({"System Build Date", system_build_date_str}); + std::stringstream system_stream; + system_stream << "0x" << std::hex << icmd_->get_system_version_control_id(); + std::string system_result(system_stream.str()); + infos.insert({"System Version Control ID", system_result}); + return infos; +} + +long Fx3HWIdentification::get_system_version() const { + return icmd_->get_system_version(); +} + +RawFileHeader Fx3HWIdentification::get_header_impl() const { + // By chance, we won't build Evk1 with non-HD Gen4.x sensors + auto is_HD = (get_sensor_info().major_version_ == 4); + auto hd = HDGeometry(); + auto vga = VGAGeometry(); + I_Geometry &geometry = is_HD ? static_cast(hd) : static_cast(vga); + PseeRawFileHeader header(*this, geometry); + header.set_sub_system_id(subsystem_ID_); + header.set_format(is_evt3_ ? "EVT3" : "EVT2"); + return header; +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/boards/fx3/fx3_libusb_board_command.cpp b/hal_psee_plugins/src/boards/fx3/fx3_libusb_board_command.cpp new file mode 100644 index 000000000..467c41ab1 --- /dev/null +++ b/hal_psee_plugins/src/boards/fx3/fx3_libusb_board_command.cpp @@ -0,0 +1,179 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include +#include + +#include "metavision/hal/utils/hal_log.h" +#include "boards/utils/vendor_command_definition.h" +#include "boards/utils/config_registers_map.h" +#include "boards/fx3/fx3_libusb_board_command.h" +#include "devices/utils/device_system_id.h" + +namespace Metavision { + +Fx3LibUSBBoardCommand::Fx3LibUSBBoardCommand() = default; + +Fx3LibUSBBoardCommand::Fx3LibUSBBoardCommand(libusb_device_handle *dev_handle) : PseeLibUSBBoardCommand(dev_handle) {} + +std::string Fx3LibUSBBoardCommand::get_serial() { + long version = get_board_version(); + uint32_t val = -1; + + long FPGA_boot_state = wait_fpga_boot_state(); + + if (FPGA_boot_state) { + MV_HAL_LOG_TRACE() << "FPGA is properly configured"; + } else { + MV_HAL_LOG_ERROR() << "FPGA is not properly configured"; + } + if (version == 3) { + // CCam5 Gen41 + val = control_read_register_32bits(CMD_READ_SYSTEM_ID, 0x00); + } else if (version == 2) { + // CCam3 Evk1 + val = control_read_register_32bits(CMD_READ_REGFPGA_32, 0); + val = control_read_register_32bits(CMD_READ_REGFPGA_32, TEP_SERIAL_MSB_ADDR); + // At this stage, only the MSB register value is returned as serial number is 16 bits limited. + } else { + // CCam2 Legacy + val = control_read_register_16bits(CMD_READ, TEP_SERIAL_MSB_ADDR); + } + std::ostringstream ostr; + ostr //<< std::showbase // show the 0x prefix + << std::internal // fill between the prefix and the number + << std::setfill('0') << std::setw(8) << std::hex; + ostr << val; + ostr << std::dec; + return ostr.str(); +} + +long Fx3LibUSBBoardCommand::try_to_flush() { + int actual = 0; + long total_flush = 0; + long last_flush = 0; + int r = 0; + int num_iterations = 0; + int max_iterations = 8; + int max_data = 300000; + + MV_HAL_LOG_TRACE() << "Start flushing"; + MV_HAL_LOG_TRACE() << "Hard flush"; + + if (dev_handle_) { + libusb_clear_halt(dev_handle_, (1 | LIBUSB_ENDPOINT_IN)); + } + + do { + if (num_iterations != 0 || total_flush != 0) { + MV_HAL_LOG_TRACE() << "Flushing" << total_flush; + } + + last_flush = total_flush; + // send_ccam2ctrl_command(TEP_CCAM2_CONTROL_ENABLE_FX3_HOST_IF_BIT_IDX, 0); // Enables the FX3 host I/F and + // also serves to add a delay. Keep this line, unless the FX3 will not have time to change buffers and reply. + write_register(TEP_TRIGGERS_ADDR, 0); + + do { + uint8_t buf[1024]; + actual = 0; + r = bulk_transfer(buf, 1024, 100, actual); // 2ms + total_flush += actual; + if (total_flush > max_data) { + break; + } + } while (r == 0 && actual > 0); + + num_iterations++; + + if (num_iterations > max_iterations) { + MV_HAL_LOG_WARNING() << "Aborting flush: maximum number of iterations reached!"; + break; + } + + if (total_flush > max_data) { + MV_HAL_LOG_WARNING() << "Aborting flush: maximum data amount reached!"; + break; + } + } while (last_flush != total_flush); + + MV_HAL_LOG_TRACE() << "Flushed" << total_flush; + return total_flush; +} + +// ------------------------------ +// Static methods + +PseeLibUSBBoardCommand::ListSerial Fx3LibUSBBoardCommand::get_list_serial() { + ListSerial lserial; + if (!init_libusb()) { + return lserial; + } + get_all_serial(nullptr, lserial); + return lserial; +} + +void Fx3LibUSBBoardCommand::get_all_serial(libusb_context *ctx, ListSerial &lserial) { + libusb_device **devs; + int cnt = libusb_get_device_list(ctx, &devs); // get the list of devices + if (cnt <= 0) { + MV_HAL_LOG_TRACE() << "EVK1 libusb BC: USB Device list empty cnt=" << cnt; + return; + } + + MV_HAL_LOG_TRACE() << "EVK1 libusb BC: libusb_get_device_list found" << cnt << "devices"; + + for (int i = 0; i < cnt; i++) { + libusb_device_descriptor desc; + int r = libusb_get_device_descriptor(devs[i], &desc); + if (r < 0) { + MV_HAL_LOG_ERROR() << "Failed to get device descriptor r=" << r; + return; + } + if ((desc.idVendor == 0x04b4) && + ((desc.idProduct == 0x00f1) || (desc.idProduct == 0x00f4) || (desc.idProduct == 0x00bc))) { + libusb_device_handle *dev_handle = nullptr; + r = libusb_open(devs[i], &dev_handle); + if (r != 0) { + MV_HAL_LOG_ERROR() << "Unable to open device"; + continue; + } else { + MV_HAL_LOG_TRACE() << "EVK1 libusb BC: PSEE device found"; + } + if (libusb_kernel_driver_active(dev_handle, 0) == 1) { // find out if kernel driver is attached + MV_HAL_LOG_TRACE() << "Kernel Driver Active"; + if (libusb_detach_kernel_driver(dev_handle, 0) == 0) // detach it + MV_HAL_LOG_TRACE() << "Kernel Driver Detached!"; + } + r = libusb_claim_interface(dev_handle, 0); // claim interface 0 (the first) of device + if (r < 0) { + MV_HAL_LOG_ERROR() << Log::no_space << "Camera is busy (r=" << r << ")"; + libusb_close(dev_handle); + continue; + } + + // Assert LIBUSB_SPEED is at minimum LIBUSB_SPEED_SUPER + Fx3LibUSBBoardCommand cmd(dev_handle); + int speed = libusb_get_device_speed(devs[i]); + const auto cur_serial = cmd.get_serial(); + if (speed < LIBUSB_SPEED_SUPER) { + MV_HAL_LOG_WARNING() + << "Your EVK camera" << cur_serial + << "isn't connected in USB3. Please verify your connection or some malfunction may occur."; + } + + // Add device even if possibly USB 2 + lserial.push_back(cur_serial); + } + } + libusb_free_device_list(devs, 1); // free the list, unref the devices in it +} +} // namespace Metavision \ No newline at end of file diff --git a/hal_psee_plugins/src/boards/rawfile/CMakeLists.txt b/hal_psee_plugins/src/boards/rawfile/CMakeLists.txt new file mode 100644 index 000000000..263b78b1b --- /dev/null +++ b/hal_psee_plugins/src/boards/rawfile/CMakeLists.txt @@ -0,0 +1,14 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. + +target_sources(metavision_hal_psee_plugin_obj PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/file_hw_identification.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/psee_file_discovery.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/psee_raw_file_header.cpp +) \ No newline at end of file diff --git a/hal_psee_plugins/src/boards/rawfile/file_hw_identification.cpp b/hal_psee_plugins/src/boards/rawfile/file_hw_identification.cpp new file mode 100644 index 000000000..002240ce2 --- /dev/null +++ b/hal_psee_plugins/src/boards/rawfile/file_hw_identification.cpp @@ -0,0 +1,61 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include +#include +#include +#include + +#include "metavision/hal/utils/hal_log.h" +#include "metavision/hal/utils/hal_error_code.h" +#include "metavision/hal/utils/hal_exception.h" +#include "devices/utils/device_system_id.h" +#include "boards/rawfile/file_hw_identification.h" +#include "metavision/hal/facilities/i_hw_identification.h" + +namespace Metavision { + +FileHWIdentification::FileHWIdentification(const std::shared_ptr &plugin_sw_info, + const PseeRawFileHeader &raw_header) : + I_HW_Identification(plugin_sw_info), raw_header_(raw_header) {} + +std::string FileHWIdentification::get_serial() const { + return raw_header_.get_serial(); +} + +long FileHWIdentification::get_system_id() const { + return raw_header_.get_system_id(); +} + +I_HW_Identification::SensorInfo FileHWIdentification::get_sensor_info() const { + return raw_header_.get_sensor_info(); +} + +long FileHWIdentification::get_system_version() const { + return raw_header_.get_system_version(); +} + +std::vector FileHWIdentification::get_available_raw_format() const { + return {raw_header_.get_format()}; +} + +std::string FileHWIdentification::get_integrator() const { + return raw_header_.get_integrator_name(); +} + +std::string FileHWIdentification::get_connection_type() const { + return "File"; +} + +RawFileHeader FileHWIdentification::get_header_impl() const { + return raw_header_; +} +} // namespace Metavision diff --git a/hal_psee_plugins/src/boards/rawfile/psee_file_discovery.cpp b/hal_psee_plugins/src/boards/rawfile/psee_file_discovery.cpp new file mode 100644 index 000000000..46f35fe04 --- /dev/null +++ b/hal_psee_plugins/src/boards/rawfile/psee_file_discovery.cpp @@ -0,0 +1,93 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include +#include + +#include "boards/rawfile/psee_file_discovery.h" +#include "decoders/evt2/evt2_decoder.h" +#include "decoders/evt2/future/evt2_decoder.h" +#include "decoders/evt3/evt3_decoder.h" +#include "decoders/evt3/future/evt3_decoder.h" +#include "boards/rawfile/psee_raw_file_header.h" +#include "boards/rawfile/file_hw_identification.h" +#include "metavision/hal/facilities/i_event_decoder.h" +#include "metavision/hal/facilities/i_events_stream.h" +#include "metavision/hal/facilities/future/i_events_stream.h" +#include "metavision/hal/utils/device_builder.h" +#include "metavision/hal/utils/file_data_transfer.h" +#include "metavision/hal/utils/future/file_data_transfer.h" +#include "metavision/hal/utils/raw_file_config.h" +#include "metavision/sdk/base/events/event_cd.h" +#include "metavision/sdk/base/events/event_ext_trigger.h" +#include "metavision/hal/utils/hal_log.h" + +namespace Metavision { + +bool PseeFileDiscovery::discover(DeviceBuilder &device_builder, std::unique_ptr &stream, + const RawFileHeader &header, const RawFileConfig &file_config) { + try { + PseeRawFileHeader psee_header(header); + std::unique_ptr geometry = psee_header.get_geometry(); + std::string format = psee_header.get_format(); + + // header ill-formed => can't handle this file + if (!geometry) { + return false; + } + + auto file_hw_id = device_builder.add_facility( + std::make_unique(device_builder.get_plugin_software_info(), psee_header)); + + auto i_geometry = device_builder.add_facility(std::move(geometry)); + auto cd_decoder = device_builder.add_facility(std::make_unique>()); + auto ext_trig_decoder = device_builder.add_facility(std::make_unique>()); + + // TODO MV-166: remove block creating Future facilities + { + std::shared_ptr decoder; + if (format == "EVT3" && i_geometry) { + decoder = device_builder.add_facility(std::make_unique( + file_config.do_time_shifting_, i_geometry->get_height(), cd_decoder, ext_trig_decoder)); + } else if (format == "EVT2") { + decoder = device_builder.add_facility( + std::make_unique(file_config.do_time_shifting_, cd_decoder, ext_trig_decoder)); + } else { + return false; + } + device_builder.add_facility(std::make_unique( + std::make_unique(stream.get(), decoder->get_raw_event_size_bytes(), + file_config), + file_hw_id, decoder)); + } + { + std::shared_ptr decoder; + if (format == "EVT3" && i_geometry) { + decoder = device_builder.add_facility(std::make_unique( + file_config.do_time_shifting_, i_geometry->get_height(), cd_decoder, ext_trig_decoder)); + } else if (format == "EVT2") { + decoder = device_builder.add_facility( + std::make_unique(file_config.do_time_shifting_, cd_decoder, ext_trig_decoder)); + } else { + return false; + } + device_builder.add_facility(std::make_unique( + std::make_unique(std::move(stream), decoder->get_raw_event_size_bytes(), file_config), + file_hw_id)); + } + return true; + } catch (std::exception &e) { + MV_HAL_LOG_TRACE() << "Could not read file:" << e.what(); + return false; + } +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/boards/rawfile/psee_raw_file_header.cpp b/hal_psee_plugins/src/boards/rawfile/psee_raw_file_header.cpp new file mode 100644 index 000000000..b42170a05 --- /dev/null +++ b/hal_psee_plugins/src/boards/rawfile/psee_raw_file_header.cpp @@ -0,0 +1,273 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include +#include +#include +#include +#include + +#include "metavision/hal/utils/hal_log.h" +#include "devices/utils/device_system_id.h" +#include "boards/rawfile/psee_raw_file_header.h" +#include "metavision/sdk/base/utils/string.h" +#include "metavision/hal/utils/hal_exception.h" +#include "utils/psee_hal_plugin_error_code.h" + +namespace Metavision { + +namespace { + +static const std::string format_key = "format"; +static const std::string geometry_key = "geometry"; +static const std::string sensor_gen_key = "sensor_generation"; +static const std::string system_id_key = "system_ID"; +static const std::string subsystem_id_key = "subsystem_ID"; +static const std::string firmware_version_key = "firmware_version"; +static const std::string serial_number_key = "serial_number"; + +static const std::string subsystem_id_key_legacy = "sub_system_ID"; +static const std::string legacy_events_type_key = "evt"; +static const std::string legacy_evt3_value = "3.0"; +static const std::string legacy_evt2_value = "2.0"; + +} // anonymous namespace + +class Geometry : public Metavision::I_Geometry { +private: + int width_; + int height_; + +public: + Geometry(const int width, const int height) : width_(width), height_(height) {} + int get_width() const override final { + return width_; + } + int get_height() const override final { + return height_; + } +}; + +PseeRawFileHeader::PseeRawFileHeader(const I_HW_Identification &hw, const I_Geometry &geometry) { + set_serial(hw.get_serial()); + set_system_id(hw.get_system_id()); + set_sensor_info(hw.get_sensor_info()); + set_system_version(hw.get_system_version()); + set_geometry(geometry); + auto available_format = hw.get_available_raw_format(); + if (available_format.empty()) { + throw(HalException(PseeHalPluginErrorCode::UnknownFormat, "System advertises no output format")); + } + set_format(available_format[0]); // caller shall fix format if it's not the 1st one +} + +PseeRawFileHeader::PseeRawFileHeader(std::istream &stream) : RawFileHeader(stream) { + check_header(); +} +PseeRawFileHeader::PseeRawFileHeader(const HeaderMap &header) : RawFileHeader(header) { + check_header(); +} +PseeRawFileHeader::PseeRawFileHeader(const RawFileHeader &raw_header) : + PseeRawFileHeader(raw_header.get_header_map()) {} + +void PseeRawFileHeader::set_serial(std::string serial) { + set_field(serial_number_key, serial); +} + +std::string PseeRawFileHeader::get_serial() const { + return get_field(serial_number_key); +} + +void PseeRawFileHeader::set_system_id(long system_id) { + set_field(system_id_key, std::to_string(system_id)); +} + +long PseeRawFileHeader::get_system_id() const { + const auto &str = get_field(system_id_key); + unsigned long result; + if (!unsigned_long_from_str(str, result)) { + return -1; + } + return result; +} + +void PseeRawFileHeader::set_sub_system_id(long subsytem_id) { + set_field(subsystem_id_key, std::to_string(subsytem_id)); +} + +long PseeRawFileHeader::get_sub_system_id() const { + std::string system_sub_id_as_string = get_field(subsystem_id_key_legacy); + unsigned long result; + if (system_sub_id_as_string.empty()) { + system_sub_id_as_string = get_field(subsystem_id_key); + } + if (!unsigned_long_from_str(system_sub_id_as_string, result)) { + return -1; + } + return result; +} + +void PseeRawFileHeader::set_sensor_info(const I_HW_Identification::SensorInfo &sensor) { + set_field(sensor_gen_key, sensor.as_string()); +} + +I_HW_Identification::SensorInfo PseeRawFileHeader::get_sensor_info() const { + std::string sensor_str = get_field(sensor_gen_key); + I_HW_Identification::SensorInfo sensor_info = {0, 0}; + try { + std::string str; + std::istringstream sensor(sensor_str); + std::getline(sensor, str, '.'); + sensor_info.major_version_ = std::stoi(str); + std::getline(sensor, str, '.'); + sensor_info.minor_version_ = std::stoi(str); + } catch (std::exception &e) {} + return sensor_info; +} + +void PseeRawFileHeader::set_system_version(long system_version) { + const std::string system_version_str = std::to_string(((system_version >> 16) & 0xFF)) + "." + + std::to_string(((system_version >> 8) & 0xFF)) + "." + + std::to_string(((system_version >> 0) & 0xFF)); + set_field(firmware_version_key, system_version_str); +} + +long PseeRawFileHeader::get_system_version() const { + auto value = get_field(firmware_version_key); + long ret = -1; + try { + ret = 0; + for (int i = 0; i < 3; i++) { + ret <<= 8; + size_t nb_number = 0; + ret += std::stol(value, &nb_number, 10); + value.erase(0, nb_number + 1); + } + } catch (const std::exception &) { ret = -1; } + return ret; +} + +void PseeRawFileHeader::set_geometry(const Metavision::I_Geometry &geometry) { + set_field(geometry_key, std::to_string(geometry.get_width()) + "x" + std::to_string(geometry.get_height())); +} + +std::unique_ptr PseeRawFileHeader::get_geometry() const { + std::string geometry_str = get_field(geometry_key); + try { + int width = 0, height = 0; + std::string str; + std::istringstream geometry(geometry_str); + // Expected format: 1080x720 + // This code isn't guaranteed to detect malformed headers + std::getline(geometry, str, 'x'); + width = std::stoi(str); + std::getline(geometry, str, 'x'); + height = std::stoi(str); + if (!width || !height) { + throw std::invalid_argument("Sensor surface can't be null"); + } + return std::make_unique(width, height); + } catch (...) { + /* Use catch-all handler on purpose, as `stoi(¨¨)` may throw exceptions that + * are of other type than std::exception on some platforms (eg. Android...) + */ + return nullptr; + } +} + +void PseeRawFileHeader::set_format(const std::string &format) { + set_field(format_key, format); + // Keep previous field version for old readers + if (format == "EVT2") { + set_field(legacy_events_type_key, legacy_evt2_value); + } else if (format == "EVT3") { + set_field(legacy_events_type_key, legacy_evt3_value); + } +} + +std::string PseeRawFileHeader::get_format() const { + return get_field(format_key); +} + +struct SystemConfig { + Metavision::I_HW_Identification::SensorInfo sensor_info_; + Geometry geometry_; + std::string format_; +}; + +void PseeRawFileHeader::check_header() { + // Here, we check if we can handle the file, possibly by infering HW information from the system ID + std::string integrator_name = get_integrator_name(); + if (integrator_name.empty()) { + MV_HAL_LOG_INFO() << "Invalid RAW : no integrator found in header, assuming it is a RAW " + "written with previous versions of Prophesee's software"; + integrator_name = get_psee_plugin_integrator_name(); + set_integrator_name(integrator_name); + } + + static const std::map system_id_map = { + {SYSTEM_CCAM3_GEN3, {{3, 0}, Geometry(640, 480), "EVT2"}}, + {SYSTEM_CCAM3_GEN31, {{3, 1}, Geometry(640, 480), "EVT2"}}, + {SYSTEM_CCAM3_GEN4, {{4, 0}, Geometry(1280, 720), "EVT2"}}, // Evt2 was default with old headers + {SYSTEM_CCAM4_GEN3, {{3, 0}, Geometry(640, 480), "EVT2"}}, + {SYSTEM_CCAM4_GEN3_EVK, {{3, 0}, Geometry(640, 480), "EVT2"}}, + {SYSTEM_CCAM4_GEN3_REV_B, {{3, 0}, Geometry(640, 480), "EVT2"}}, + {SYSTEM_CCAM4_GEN3_REV_B_EVK, {{3, 0}, Geometry(640, 480), "EVT2"}}, + {SYSTEM_CCAM4_GEN3_REV_B_EVK_BRIDGE, {{3, 0}, Geometry(640, 480), "EVT2"}}, + {SYSTEM_CCAM5_GEN31, {{3, 1}, Geometry(640, 480), "EVT2"}}, + {SYSTEM_CCAM5_GEN4, {{4, 0}, Geometry(1280, 720), "EVT3"}}, + {SYSTEM_CCAM5_GEN4_FIXED_FRAME, {{4, 0}, Geometry(1280, 720), "EVT3"}}, + {SYSTEM_VISIONCAM_GEN3, {{3, 0}, Geometry(640, 480), "EVT2"}}, + {SYSTEM_VISIONCAM_GEN3_EVK, {{3, 0}, Geometry(640, 480), "EVT2"}}, + {SYSTEM_VISIONCAM_GEN31, {{3, 1}, Geometry(640, 480), "EVT2"}}, + {SYSTEM_VISIONCAM_GEN31_EVK, {{3, 1}, Geometry(640, 480), "EVT2"}}, + {SYSTEM_CX3_CCAM5_GEN4, {{4, 0}, Geometry(1280, 720), "EVT3"}}, + {SYSTEM_EVK2_GEN31, {{3, 1}, Geometry(640, 480), "EVT2"}}, + {SYSTEM_EVK2_GEN4, {{4, 0}, Geometry(1280, 720), "EVT2"}}, // Evt2 was default with old headers + {SYSTEM_EVK2_GEN41, {{4, 1}, Geometry(1280, 720), "EVT2"}}, // Evt2 was default with old headers + {SYSTEM_EVK3_GEN31_EVT2, {{3, 1}, Geometry(640, 480), "EVT2"}}, + {SYSTEM_EVK3_GEN31_EVT3, {{3, 1}, Geometry(640, 480), "EVT3"}}, + {SYSTEM_EVK3_GEN41, {{4, 1}, Geometry(1280, 720), "EVT3"}}, + }; + long system_id = get_system_id(); + auto info = system_id_map.find(system_id); + + // If there is no serial, don't invent one + // Same for system id + // We don't need sensor info to decode the file, but we may infer it from systemID + if (get_field(sensor_gen_key).empty()) { + if (info != system_id_map.end()) { + set_sensor_info(info->second.sensor_info_); + } + } + + if (!get_geometry()) { + if (info != system_id_map.end()) { + set_geometry(info->second.geometry_); + } else { + throw(HalException(PseeHalPluginErrorCode::BoardCommandNotFound, "Could not get Raw file sensor geometry")); + } + } + + if (get_field(format_key).empty()) { + if (get_field(legacy_events_type_key) == legacy_evt2_value) { + set_format("EVT2"); + } else if (get_field(legacy_events_type_key) == legacy_evt3_value) { + set_format("EVT3"); + } else if (info != system_id_map.end()) { + set_format(info->second.format_); + } else { + throw(HalException(PseeHalPluginErrorCode::BoardCommandNotFound, "Could not get Raw file event format")); + } + } +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/boards/treuzell/CMakeLists.txt b/hal_psee_plugins/src/boards/treuzell/CMakeLists.txt new file mode 100644 index 000000000..a79892342 --- /dev/null +++ b/hal_psee_plugins/src/boards/treuzell/CMakeLists.txt @@ -0,0 +1,17 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. + +target_sources(metavision_hal_treuzell_protocol_obj PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/tz_camera_discovery.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/tz_libusb_board_command.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/tz_board_data_transfer.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/tz_hw_identification.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/tz_control_frame.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/tz_libusb.cpp +) diff --git a/hal_psee_plugins/src/boards/treuzell/tz_board_data_transfer.cpp b/hal_psee_plugins/src/boards/treuzell/tz_board_data_transfer.cpp new file mode 100644 index 000000000..cd1659d9c --- /dev/null +++ b/hal_psee_plugins/src/boards/treuzell/tz_board_data_transfer.cpp @@ -0,0 +1,299 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include + +#ifdef _WIN32 +#ifndef _MSC_VER +#define WIN_CALLBACK_DECL __stdcall +#else +#define WIN_CALLBACK_DECL WINAPI +#endif +#else +#define WIN_CALLBACK_DECL +#endif + +#include "boards/treuzell/tz_board_data_transfer.h" +#include "boards/treuzell/tz_libusb_board_command.h" +#include "boards/utils/config_registers_map.h" + +#include "metavision/hal/utils/hal_log.h" + +const static int USB_TIME_OUT = 100; +static const int N_ASYNC_TRANFERS_PER_DEVICE = 20; +const static int PACKET_SIZE = 128 * 1024; + +namespace Metavision { + +uint32_t TzBoardDataTransfer::timeout_cnt_; +TzBoardDataTransfer::TzBoardDataTransfer(const std::shared_ptr &cmd, + uint32_t raw_event_size_bytes) : + DataTransfer(raw_event_size_bytes), cmd_(cmd) { + flush(); +} + +void TzBoardDataTransfer::preprocess_transfer(libusb_transfer *transfer) { + if (transfer->status == LIBUSB_TRANSFER_TIMED_OUT) { + if (transfer->actual_length != 0) { + timeout_cnt_ = 0; + } else { + timeout_cnt_++; + if (timeout_cnt_ >= 100) { + MV_HAL_LOG_TRACE() << "\rBulk Transfer NACK " << timeout_cnt_; + } + } + } else if (transfer->status == LIBUSB_TRANSFER_COMPLETED) { + if (timeout_cnt_ != 0) { + timeout_cnt_ = 0; + } + } +} + +class TzBoardDataTransfer::UserParamForAsyncBulkCallback { +public: + UserParamForAsyncBulkCallback(int id, const std::shared_ptr &cmd, + TzBoardDataTransfer &libusb_data_transfer); + ~UserParamForAsyncBulkCallback(); + static void WIN_CALLBACK_DECL async_bulk_cb(struct libusb_transfer *transfer); + + void start(); + void stop(); + +private: + bool proceed_async_bulk(struct libusb_transfer *transfer); + + const static int timeout_ = USB_TIME_OUT; + DataTransfer::BufferPtr buf_; + std::mutex transfer_mutex_; + libusb_transfer *transfer_{nullptr}; + bool stop_ = true; + std::atomic submitted_transfer_{false}; + std::shared_ptr cmd_; + TzBoardDataTransfer &libusb_data_transfer_; +}; + +TzBoardDataTransfer::~TzBoardDataTransfer() { + stop_impl(); +} + +void TzBoardDataTransfer::start_impl(BufferPtr buffer) { + initiate_async_transfers(); +} + +void TzBoardDataTransfer::run_impl() { + MV_HAL_LOG_TRACE() << "poll thread running"; + while (!should_stop() && active_bulks_transfers_ > 0) { + struct timeval tv = {0, 1}; + libusb_handle_events_timeout(cmd_->libusb_ctx->ctx(), &tv); + } + MV_HAL_LOG_TRACE() << "poll thread shutting down"; + + release_async_transfers(); +} + +void TzBoardDataTransfer::stop_impl() { + for (auto &transfer : vtransfer_) { + transfer->stop(); + } +} + +void TzBoardDataTransfer::initiate_async_transfers() { + for (int i = 0; i < N_ASYNC_TRANFERS_PER_DEVICE; ++i) { + vtransfer_.push_back(std::make_unique(i, cmd_, *this)); + vtransfer_.back()->start(); + } +} + +void TzBoardDataTransfer::release_async_transfers() { + vtransfer_.clear(); +} + +TzBoardDataTransfer::UserParamForAsyncBulkCallback::UserParamForAsyncBulkCallback( + int id, const std::shared_ptr &cmd, TzBoardDataTransfer &libusb_data_transfer) : + cmd_(cmd), libusb_data_transfer_(libusb_data_transfer) { + buf_ = libusb_data_transfer.get_buffer(); + buf_->resize(PACKET_SIZE); + transfer_ = + libusb_data_transfer.contruct_async_bulk_transfer(buf_->data(), PACKET_SIZE, async_bulk_cb, this, timeout_); +} + +TzBoardDataTransfer::UserParamForAsyncBulkCallback::~UserParamForAsyncBulkCallback() { + stop(); + + // Wait for submitted transfer to be processed before releasing this object. + while (submitted_transfer_) { + struct timeval tv = {0, 1}; + libusb_handle_events_timeout(cmd_->libusb_ctx->ctx(), &tv); + }; + + if (transfer_) { + free_async_bulk_transfer(transfer_); + transfer_ = nullptr; + } +} + +void WIN_CALLBACK_DECL + TzBoardDataTransfer::UserParamForAsyncBulkCallback::async_bulk_cb(struct libusb_transfer *transfer) { + if (!transfer->user_data) + return; + + UserParamForAsyncBulkCallback *param = static_cast(transfer->user_data); + const bool ret = param->proceed_async_bulk(transfer); + if (!ret) { + param->stop(); + } + param->submitted_transfer_ = ret; +} + +bool TzBoardDataTransfer::UserParamForAsyncBulkCallback::proceed_async_bulk(struct libusb_transfer *transfer) { + std::lock_guard lock(transfer_mutex_); + + assert(transfer == transfer_); + assert(transfer->buffer == buf_->data()); + + if (stop_) { + return false; + } + + libusb_data_transfer_.preprocess_transfer(transfer); + + if (transfer->status != LIBUSB_TRANSFER_COMPLETED && transfer->status != LIBUSB_TRANSFER_TIMED_OUT) { + { + MV_HAL_LOG_ERROR() << "ErrTransfert"; + MV_HAL_LOG_ERROR() << libusb_error_name(transfer->status); + if (transfer->status == LIBUSB_TRANSFER_NO_DEVICE) { + MV_HAL_LOG_ERROR() << "LIBUSB_TRANSFER_NO_DEVICE"; + return false; + } + } + int r = submit_transfer(transfer); + if (r != 0) { + MV_HAL_LOG_ERROR() << "Resubmit Error after Error"; + MV_HAL_LOG_ERROR() << libusb_error_name(r); + return false; + } + return true; + } + + const auto remainder = transfer->actual_length % libusb_data_transfer_.get_raw_event_size_bytes(); + if (remainder) { + MV_HAL_LOG_WARNING() << "Buffer is not a multiple of a RAW events byte size (" + << libusb_data_transfer_.get_raw_event_size_bytes() << "). A RAW event has been dropped."; + } + + buf_->resize(transfer->actual_length - remainder); + auto next_buf = libusb_data_transfer_.transfer_data(buf_); + + next_buf->resize(PACKET_SIZE); + transfer->buffer = next_buf->data(); + buf_ = next_buf; + int r = submit_transfer(transfer); + if (r != 0) { + MV_HAL_LOG_ERROR() << "Resubmit error after transfer OK"; + MV_HAL_LOG_ERROR() << libusb_error_name(r); + return false; + } + + return true; +} + +void TzBoardDataTransfer::UserParamForAsyncBulkCallback::start() { + std::lock_guard lock(transfer_mutex_); // avoid concurrent access to stop + + submitted_transfer_ = true; + int r = submit_transfer(transfer_); + if (r != 0) { + MV_HAL_LOG_ERROR() << "Submit error in start"; + MV_HAL_LOG_ERROR() << libusb_error_name(r); + return; + } + + stop_ = false; + ++libusb_data_transfer_.active_bulks_transfers_; +} + +void TzBoardDataTransfer::UserParamForAsyncBulkCallback::stop() { + std::lock_guard lock(transfer_mutex_); + if (stop_) { + return; + } + stop_ = true; + --libusb_data_transfer_.active_bulks_transfers_; +} + +void TzBoardDataTransfer::prepare_async_bulk_transfer(libusb_transfer *transfer, unsigned char *buf, int packet_size, + libusb_transfer_cb_fn async_bulk_cb, void *user_data, + unsigned int timeout) { + libusb_fill_bulk_transfer(transfer, cmd_->dev_handle_, cmd_->bEpCommAddress, buf, packet_size, async_bulk_cb, + user_data, timeout); + transfer->flags &= ~LIBUSB_TRANSFER_FREE_BUFFER; + transfer->flags &= ~LIBUSB_TRANSFER_FREE_TRANSFER; +} + +libusb_transfer *TzBoardDataTransfer::contruct_async_bulk_transfer(unsigned char *buf, int packet_size, + libusb_transfer_cb_fn async_bulk_cb, void *user_data, + unsigned int timeout) { + if (!cmd_->dev_handle_) { + return nullptr; + } + libusb_transfer *transfer = nullptr; + transfer = libusb_alloc_transfer(0); + if (!transfer) { + MV_HAL_LOG_ERROR() << "libusb_alloc_transfer Failed"; + return transfer; + } + prepare_async_bulk_transfer(transfer, buf, packet_size, async_bulk_cb, user_data, timeout); + return transfer; +} + +void TzBoardDataTransfer::free_async_bulk_transfer(libusb_transfer *transfer) { + libusb_free_transfer(transfer); +} + +int TzBoardDataTransfer::bulk_transfer(unsigned char *buf, int packet_size, unsigned int timeout, int &actual_size) { + if (cmd_->dev_handle_) { + return libusb_bulk_transfer(cmd_->dev_handle_, cmd_->bEpCommAddress, buf, packet_size, &actual_size, 100); + } else { + return LIBUSB_ERROR_NO_DEVICE; + } +} + +int TzBoardDataTransfer::submit_transfer(libusb_transfer *transfer) { + int r = 0; + r = libusb_submit_transfer(transfer); + if (r < 0) { + MV_HAL_LOG_ERROR() << "USB Submit Error"; + } + return r; +} + +void TzBoardDataTransfer::flush() { + int bytes_cnt; + long total_flush = 0; + int r; + int flush_max_data = 512 << 10; // 512kB + + MV_HAL_LOG_TRACE() << "Data Transfer: Try to flush"; + + do { + uint8_t buf[16 << 10]; + r = libusb_bulk_transfer(cmd_->dev_handle_, cmd_->bEpCommAddress, buf, 16 << 10, &bytes_cnt, 100); + if ((r == 0) || (r == LIBUSB_ERROR_TIMEOUT)) + total_flush += bytes_cnt; + if (total_flush >= flush_max_data) { + break; + } + } while (r == 0 && bytes_cnt > 0); + + MV_HAL_LOG_TRACE() << "Total of " << total_flush << " bytes flushed"; +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/boards/treuzell/tz_camera_discovery.cpp b/hal_psee_plugins/src/boards/treuzell/tz_camera_discovery.cpp new file mode 100644 index 000000000..e83810d86 --- /dev/null +++ b/hal_psee_plugins/src/boards/treuzell/tz_camera_discovery.cpp @@ -0,0 +1,102 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include +#include +#include +#include +#include + +#include "boards/treuzell/tz_camera_discovery.h" +#include "boards/treuzell/tz_libusb_board_command.h" +#include "utils/device_builder_factory.h" +#include "devices/utils/device_system_id.h" +#include "metavision/hal/utils/hal_exception.h" +#include "utils/psee_hal_plugin_error_code.h" +#include "metavision/hal/utils/hal_log.h" + +namespace Metavision { + +TzCameraDiscovery::TzCameraDiscovery() : + libusb_ctx(std::make_shared()), builder(std::make_unique()) {} + +std::vector> TzCameraDiscovery::list_boards() { + std::vector> boards; + libusb_device **devs; + + ssize_t cnt = libusb_get_device_list(libusb_ctx->ctx(), &devs); // get the list of devices + if (cnt <= 0) { + MV_HAL_LOG_TRACE() << "libusb BC: USB Device list empty cnt=" << cnt; + return boards; + } + + MV_HAL_LOG_TRACE() << "libusb BC: libusb_get_device_list found" << cnt << "devices"; + + for (ssize_t i = 0; i < cnt; i++) { + libusb_device_descriptor desc; + int r = libusb_get_device_descriptor(devs[i], &desc); + if (r < 0) { + MV_HAL_LOG_TRACE() << "Failed to get device descriptor"; + continue; + } + + try { + MV_HAL_LOG_TRACE() << "Create board command for device " << std::hex << desc.idVendor << ":" + << desc.idProduct << std::dec; + std::shared_ptr cmd = + std::make_shared(libusb_ctx, devs[i], desc); + if (builder->can_build(cmd)) + boards.push_back(cmd); + } catch (const HalException &e) { + MV_HAL_LOG_TRACE() << e.what(); + continue; + } + } + libusb_free_device_list(devs, 1); // free the list, unref the devices in it + + return boards; +} + +CameraDiscovery::SerialList TzCameraDiscovery::list() { + CameraDiscovery::SerialList ret; + auto boards = list_boards(); + for (auto board : boards) { + ret.push_back(board->get_serial()); + } + return ret; +} + +CameraDiscovery::SystemList TzCameraDiscovery::list_available_sources() { + CameraDiscovery::SystemList system_list; + auto boards = list_boards(); + for (auto board : boards) { + // Last argument is the system ID, but we can't know how many the board has before building the devices + system_list.push_back({board->get_serial(), USB_LINK, 0}); + } + return system_list; +} + +bool TzCameraDiscovery::discover(DeviceBuilder &device_builder, const std::string &serial, const DeviceConfig &config) { + auto boards = list_boards(); + for (auto board : boards) { + if (serial != "" && (board->get_serial() != serial)) + continue; + if (board->get_board_speed() < LIBUSB_SPEED_SUPER) { + MV_HAL_LOG_ERROR() << "Your EVK camera" << serial + << "isn't connected in USB3. Please check your connection."; + continue; + } + return builder->build_devices(board, device_builder, config); + } + return false; +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/boards/treuzell/tz_control_frame.cpp b/hal_psee_plugins/src/boards/treuzell/tz_control_frame.cpp new file mode 100644 index 000000000..df892fcd0 --- /dev/null +++ b/hal_psee_plugins/src/boards/treuzell/tz_control_frame.cpp @@ -0,0 +1,163 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include "boards/treuzell/tz_control_frame.h" +#include "boards/treuzell/treuzell_command_definition.h" +#include +#include + +namespace Metavision { + +struct ctrlFrameHeader { + uint32_t property; + uint32_t size; +}; + +TzCtrlFrame::TzCtrlFrame(uint32_t property) { + struct ctrlFrameHeader *frame; + vect.resize(8); + frame = reinterpret_cast(vect.data()); + frame->property = property; + frame->size = 0; +} + +// do nothing. children classes will manage it +TzCtrlFrame::TzCtrlFrame() {} + +TzCtrlFrame::~TzCtrlFrame() {} + +uint32_t TzCtrlFrame::get_property() { + struct ctrlFrameHeader *frame = reinterpret_cast(vect.data()); + return frame->property; +} + +uint8_t *TzCtrlFrame::frame() { + update_size(); + return vect.data(); +} + +std::size_t TzCtrlFrame::frame_size() { + return vect.size(); +} + +void TzCtrlFrame::swap_and_check_answer(std::vector &x) { + uint32_t req_property = get_property(); + struct ctrlFrameHeader *frame; + + if (x.size() < sizeof(ctrlFrameHeader)) + throw std::system_error(TZ_TOO_SHORT, TzError()); + + vect.swap(x); + frame = reinterpret_cast(vect.data()); + // Most devices are currently broken, rely on USB for size + // if (frame->size != (vect.size() - sizeof(ctrlFrameHeader))) + // throw std::system_error(TZ_SIZE_MISMATCH, TzError()); + if (frame->property == TZ_UNKNOWN_CMD) + throw std::system_error(TZ_NOT_IMPLEMENTED, TzError()); + if (frame->property == (req_property | TZ_FAILURE_FLAG)) + throw std::system_error(TZ_COMMAND_FAILED, TzError()); + if (frame->property != req_property) + throw std::system_error(TZ_PROPERTY_MISMATCH, TzError()); +} + +void TzCtrlFrame::update_size() { + int32_t payload_size = vect.size() - sizeof(ctrlFrameHeader); + if (payload_size < 0) + throw std::length_error("payload resized to less than 0"); + struct ctrlFrameHeader *frame = reinterpret_cast(vect.data()); + frame->size = payload_size; +} + +/* + * Treuzell generic frame with most knowledge in the caller + */ + +TzGenericCtrlFrame::TzGenericCtrlFrame(uint32_t property) : TzCtrlFrame(property) {} + +TzGenericCtrlFrame::~TzGenericCtrlFrame() {} + +uint8_t *TzGenericCtrlFrame::payload() { + return vect.data() + sizeof(ctrlFrameHeader); +} + +std::size_t TzGenericCtrlFrame::payload_size() { + int32_t payload_size = vect.size() - sizeof(ctrlFrameHeader); + if (payload_size < 0) + throw std::length_error("payload resized to less than 0"); + return payload_size; +} + +void TzGenericCtrlFrame::push_back32(const uint32_t &val) { + vect.push_back(val & 0xFF); + vect.push_back((val >> 8) & 0xFF); + vect.push_back((val >> 16) & 0xFF); + vect.push_back((val >> 24) & 0xFF); +} + +void TzGenericCtrlFrame::push_back32(const std::vector &src) { + vect.reserve(vect.size() + (sizeof(uint32_t) * src.size())); + for (auto const &val : src) + push_back32(val); +} + +uint32_t TzGenericCtrlFrame::get32(std::size_t index) { + if (payload_size() < ((index + 1) * (sizeof(uint32_t)))) + throw std::system_error(TZ_TOO_SHORT, TzError()); + return *((uint32_t *)(payload() + (index * sizeof(uint32_t)))); +} + +uint64_t TzGenericCtrlFrame::get64(std::size_t index) { + if (payload_size() < ((index + 1) * (sizeof(uint64_t)))) + throw std::system_error(TZ_TOO_SHORT, TzError()); + return *((uint64_t *)(payload() + (index * sizeof(uint64_t)))); +} + +TzDeviceStringsCtrlFrame::TzDeviceStringsCtrlFrame(uint32_t property, uint32_t device) : TzCtrlFrame(property) { + vect.push_back(device & 0xFF); + vect.push_back((device >> 8) & 0xFF); + vect.push_back((device >> 16) & 0xFF); + vect.push_back((device >> 24) & 0xFF); +} + +std::vector TzDeviceStringsCtrlFrame::get_strings() { + std::vector res; + + // TzCtrlFrame already checked request status + uint8_t *frame = vect.data(); + std::size_t remaining = vect.size(); + frame += sizeof(ctrlFrameHeader); + remaining -= sizeof(ctrlFrameHeader); + + // check if the frame is large enough to contain the device id + if (remaining < sizeof(uint32_t)) + throw std::system_error(TZ_TOO_SHORT, TzError()); + + frame += sizeof(uint32_t); + remaining -= sizeof(uint32_t); + + // the frame shall at least contain the NULL terminator + if (!remaining) + throw std::system_error(TZ_TOO_SHORT, TzError()); + if (*(frame + remaining - 1) != '\0') + throw std::system_error(TZ_INVALID_ANSWER, TzError(), "compatible string shall be NULL-terminated"); + + while (remaining) { + std::string str((char *)frame); + // str.size() doesn't include a NULL terminator + frame += str.size() + 1; + remaining -= str.size() + 1; + res.push_back(str); + } + + return res; +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/boards/treuzell/tz_hw_identification.cpp b/hal_psee_plugins/src/boards/treuzell/tz_hw_identification.cpp new file mode 100644 index 000000000..42784e2d7 --- /dev/null +++ b/hal_psee_plugins/src/boards/treuzell/tz_hw_identification.cpp @@ -0,0 +1,113 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include +#include + +#include "facilities/psee_device_control.h" +#include "boards/treuzell/tz_hw_identification.h" +#include "devices/treuzell/tz_device.h" +#include "devices/treuzell/tz_main_device.h" +#include "boards/rawfile/psee_raw_file_header.h" +#include "devices/utils/device_system_id.h" +#include "boards/treuzell/tz_libusb_board_command.h" +#include "metavision/hal/utils/hal_exception.h" +#include "utils/psee_hal_plugin_error_code.h" +#include "boards/treuzell/tz_control_frame.h" +#include "boards/treuzell/treuzell_command_definition.h" +#include "metavision/hal/utils/hal_log.h" + +namespace Metavision { + +TzHWIdentification::TzHWIdentification(const std::shared_ptr &plugin_sw_info, + const std::shared_ptr &cmd, + std::vector> &devices) : + I_HW_Identification(plugin_sw_info), icmd_(cmd), sensor_info_({0, 0}), devices_(devices) { + if (!icmd_) { + throw(HalException(PseeHalPluginErrorCode::BoardCommandNotFound, "Board command is null.")); + } +} + +std::string TzHWIdentification::get_serial() const { + return icmd_->get_serial(); +} + +long TzHWIdentification::get_system_id() const { + for (auto dev : devices_) { + if (auto main_dev = dynamic_cast(dev.get())) + return main_dev->get_system_id(); + } + return 0; +} + +I_HW_Identification::SensorInfo TzHWIdentification::get_sensor_info() const { + for (auto dev : devices_) { + if (auto main_dev = dynamic_cast(dev.get())) + return main_dev->get_sensor_info(); + } + return sensor_info_; +} + +long TzHWIdentification::get_system_version() const { + for (auto dev : devices_) { + if (auto main_dev = dynamic_cast(dev.get())) + return main_dev->get_system_version(); + } + return 0; +} + +std::vector TzHWIdentification::get_available_raw_format() const { + std::vector available_formats; + + if (!devices_.empty()) { + available_formats.push_back(devices_[0]->get_output_format().name); + } + return available_formats; +} + +std::string TzHWIdentification::get_integrator() const { + return icmd_->get_manufacturer(); +} + +I_HW_Identification::SystemInfo TzHWIdentification::get_system_info() const { + auto infos = I_HW_Identification::get_system_info(); + + long board_version = icmd_->get_version(); + std::string version = std::to_string((board_version >> 16) & 0xFF) + "." + + std::to_string((board_version >> 8) & 0xFF) + "." + + std::to_string((board_version >> 0) & 0xFF); + infos.insert({icmd_->get_name() + " Release Version", version}); + + time_t build_date = icmd_->get_build_date(); + const char *board_build_date_charptr = asctime(localtime(&build_date)); + std::string board_build_date_str = board_build_date_charptr == 0 ? "NA" : std::string(board_build_date_charptr); + board_build_date_str.pop_back(); + infos.insert({icmd_->get_name() + " Build Date", board_build_date_str}); + + infos.insert({icmd_->get_name() + " Speed", std::to_string(icmd_->get_board_speed())}); + + for (auto dev : devices_) + dev->get_device_info(infos, "device"); + + return infos; +} + +std::string TzHWIdentification::get_connection_type() const { + return "USB"; +} + +RawFileHeader TzHWIdentification::get_header_impl() const { + auto format = devices_[0]->get_output_format(); + PseeRawFileHeader header(*this, *format.geometry); + return header; +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/boards/treuzell/tz_libusb.cpp b/hal_psee_plugins/src/boards/treuzell/tz_libusb.cpp new file mode 100644 index 000000000..8ddeb381e --- /dev/null +++ b/hal_psee_plugins/src/boards/treuzell/tz_libusb.cpp @@ -0,0 +1,30 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include "boards/treuzell/tz_libusb.h" + +namespace Metavision { + +LibUSBContext::LibUSBContext() { + int err; + if (err = libusb_init(&ctx_)) + throw std::system_error(err, LibUsbError()); +} + +LibUSBContext::~LibUSBContext() { + libusb_exit(ctx_); +} + +libusb_context *LibUSBContext::ctx() { + return ctx_; +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/boards/treuzell/tz_libusb_board_command.cpp b/hal_psee_plugins/src/boards/treuzell/tz_libusb_board_command.cpp new file mode 100644 index 000000000..a846dbff7 --- /dev/null +++ b/hal_psee_plugins/src/boards/treuzell/tz_libusb_board_command.cpp @@ -0,0 +1,386 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include +#include +#ifndef _MSC_VER +#else +#include +#include +#endif +#include +#include + +#include "metavision/hal/utils/hal_log.h" +#include "boards/utils/config_registers_map.h" +#include "boards/treuzell/tz_libusb_board_command.h" +#include "boards/treuzell/treuzell_command_definition.h" +#include "boards/treuzell/tz_control_frame.h" +#include "devices/utils/device_system_id.h" +#include "metavision/hal/utils/hal_exception.h" +#include "utils/psee_hal_plugin_error_code.h" + +#ifdef USE_JAVA_BINDINGS +#include "is_usb_java.h" +#endif + +#define PSEE_EVK_PROTOCOL 0 + +#define TZ_MAX_ANSWER_SIZE 1024 + +namespace Metavision { + +// By default, nothing is supported, because we want boards to be ignored by the plugins that can manage it, so that +// only one open a given board +std::vector TzLibUSBBoardCommand::known_usb_ids; + +TzLibUSBBoardCommand::TzLibUSBBoardCommand(std::shared_ptr ctx, libusb_device *dev, + libusb_device_descriptor &desc) : + libusb_ctx(ctx) { + // Check only the first device configuration + struct libusb_config_descriptor *config; + int r = libusb_get_config_descriptor(dev, 0, &config); + if (r != LIBUSB_SUCCESS) { + throw(HalException(PseeHalPluginErrorCode::BoardCommandNotFound, "config descriptor not readable.")); + } + + // Look for a treuzell interface + bInterfaceNumber = -1; + for (int ifc = 0; ifc < config->bNumInterfaces; ifc++) { + const struct libusb_interface *interface = &config->interface[ifc]; + // Check each setting + for (int altsetting = 0; altsetting < interface->num_altsetting; altsetting++) { + const struct libusb_interface_descriptor *ifc_desc = &interface->altsetting[altsetting]; + // Check if USB class is the expected one + bool supported = false; + for (const auto &id : TzLibUSBBoardCommand::known_usb_ids) { + if ((id.vid && (desc.idVendor == id.vid)) && (id.pid && (desc.idProduct == id.pid)) && + (ifc_desc->bInterfaceClass == id.usb_class) && (ifc_desc->bInterfaceSubClass == (id.subclass))) { + supported = true; + } + } + + if (!supported) { + continue; + } + + // Check if the interface has the expected structure + if ((ifc_desc->bInterfaceProtocol == PSEE_EVK_PROTOCOL) && (ifc_desc->bNumEndpoints == 3) && + ((ifc_desc->endpoint[0]).bmAttributes == LIBUSB_TRANSFER_TYPE_BULK) && + (((ifc_desc->endpoint[0]).bEndpointAddress & 0x80) == LIBUSB_ENDPOINT_IN) && + ((ifc_desc->endpoint[1]).bmAttributes == LIBUSB_TRANSFER_TYPE_BULK) && + (((ifc_desc->endpoint[1]).bEndpointAddress & 0x80) == LIBUSB_ENDPOINT_OUT) && + ((ifc_desc->endpoint[2]).bmAttributes == LIBUSB_TRANSFER_TYPE_BULK) && + (((ifc_desc->endpoint[2]).bEndpointAddress & 0x80) == LIBUSB_ENDPOINT_IN)) { + bInterfaceNumber = ifc_desc->bInterfaceNumber; + bEpControlIn = (ifc_desc->endpoint[0]).bEndpointAddress; + bEpControlOut = (ifc_desc->endpoint[1]).bEndpointAddress; + bEpCommAddress = (ifc_desc->endpoint[2]).bEndpointAddress; + break; + } + } + if (bInterfaceNumber >= 0) + break; + } + libusb_free_config_descriptor(config); + if (bInterfaceNumber < 0) { + throw(HalException(PseeHalPluginErrorCode::BoardCommandNotFound, "no treuzell interface found.")); + } + + // Open device. + r = libusb_open(dev, &dev_handle_); + if (r != 0) + throw(HalException(PseeHalPluginErrorCode::BoardCommandNotFound, "Unable to open device")); + + if (libusb_kernel_driver_active(dev_handle_, bInterfaceNumber) == 1) { // find out if kernel driver is attached + MV_HAL_LOG_TRACE() << "Kernel Driver Active"; + if (libusb_detach_kernel_driver(dev_handle_, bInterfaceNumber) == 0) // detach it + MV_HAL_LOG_TRACE() << "Kernel Driver Detached!"; + } + r = libusb_claim_interface(dev_handle_, bInterfaceNumber); + if (r < 0) { + libusb_close(dev_handle_); + throw(HalException(PseeHalPluginErrorCode::BoardCommandNotFound, "Camera is busy")); + } + MV_HAL_LOG_TRACE() << "Claimed interface"; + dev_speed_ = (libusb_speed)libusb_get_device_speed(dev); + + if (desc.iManufacturer) { + char buf[128]; // 256 bytes UTF-16LE, shrinked down to pure ASCII + if (libusb_get_string_descriptor_ascii(dev_handle_, desc.iManufacturer, (unsigned char *)buf, 128) > 0) + manufacturer = buf; + } + + if (desc.iProduct) { + char buf[128]; // 256 bytes UTF-16LE, shrinked down to pure ASCII + if (libusb_get_string_descriptor_ascii(dev_handle_, desc.iProduct, (unsigned char *)buf, 128) > 0) + product = buf; + } + + try { + TzGenericCtrlFrame req(TZ_PROP_RELEASE_VERSION); + transfer_tz_frame(req); + version = req.get32(0); + } catch (const std::system_error &e) { MV_HAL_LOG_TRACE() << "Got no board version:" << e.what(); } + + try { + TzGenericCtrlFrame req(TZ_PROP_BUILD_DATE); + transfer_tz_frame(req); + build_date = req.get64(0); + } catch (const std::system_error &e) { MV_HAL_LOG_TRACE() << "Got no build date:" << e.what(); } +} + +TzLibUSBBoardCommand::~TzLibUSBBoardCommand() { + int r = libusb_release_interface(dev_handle_, bInterfaceNumber); // release the claimed interface + if (r != 0) { + MV_HAL_LOG_WARNING() << "Cannot release interface"; + } else { + MV_HAL_LOG_TRACE() << "Released interface"; + } + // Old Evk2s used the global device reset to reset their Tz interface + if ((product == "EVKv2") && (version < 0x010600)) + libusb_reset_device(dev_handle_); + libusb_close(dev_handle_); +} + +std::string TzLibUSBBoardCommand::get_name() { + return product; +} + +std::string TzLibUSBBoardCommand::get_manufacturer() { + return manufacturer; +} + +time_t TzLibUSBBoardCommand::get_build_date() { + return build_date; +} + +uint32_t TzLibUSBBoardCommand::get_version() { + return version; +} + +long TzLibUSBBoardCommand::get_board_speed() { + if (!dev_handle_) { + return -1; + } + + switch (dev_speed_) { + case LIBUSB_SPEED_LOW: + return 1; // Actual speed would be 1.5Mbit/s but we use integral type. + case LIBUSB_SPEED_FULL: + return 12; + case LIBUSB_SPEED_HIGH: + return 480; + case LIBUSB_SPEED_SUPER: + return 5000; +#if LIBUSB_API_VERSION >= 0x01000106 + // Compiling on 1.0.22 or newer, which starts support for SSP. + case LIBUSB_SPEED_SUPER_PLUS: + return 10000; +#endif + case LIBUSB_SPEED_UNKNOWN: + default: + return 0; // Unknown speed is indicated as 0. + } +} + +std::string TzLibUSBBoardCommand::get_serial() { + TzGenericCtrlFrame req(TZ_PROP_SERIAL); + transfer_tz_frame(req); + + std::ostringstream ostr; + ostr //<< std::showbase // show the 0x prefix + << std::internal // fill between the prefix and the number + << std::setfill('0') << std::setw(8) << std::hex; + try { + ostr << req.get64(0); + } catch (const std::system_error &e) { + // Some implementations only have 32-bits serials + if (e.code().value() == TZ_TOO_SHORT) + ostr << req.get32(0); + else + throw e; + } + ostr << std::dec; + return ostr.str(); +} + +void TzLibUSBBoardCommand::write_register(Register_Addr register_addr, uint32_t value) { + init_register(register_addr, value); + send_register(register_addr); +} + +uint32_t TzLibUSBBoardCommand::read_register(Register_Addr regist) { + auto it = mregister_state.find(regist); + if (it == mregister_state.end()) { + return 0; + } + + return it->second; +} + +void TzLibUSBBoardCommand::load_register(Register_Addr regist) { + init_register(regist, read_device_register(0, regist)[0]); +} + +void TzLibUSBBoardCommand::set_register_bit(Register_Addr register_addr, int idx, bool state) { + auto it = mregister_state.find(register_addr); + if (it == mregister_state.end()) { + it = mregister_state.insert(std::make_pair(register_addr, static_cast(0))).first; + } + if (state) { + it->second |= (1 << idx); + } else { + it->second &= ~(1 << idx); + } +} + +void TzLibUSBBoardCommand::send_register(Register_Addr register_addr) { + uint32_t val = 0; + if (has_register(register_addr)) { + val = read_register(register_addr); + } + write_device_register(0, register_addr, std::vector(1, val)); +} + +void TzLibUSBBoardCommand::send_register_bit(Register_Addr register_addr, int idx, bool state) { + set_register_bit(register_addr, idx, state); + send_register(register_addr); +} + +uint32_t TzLibUSBBoardCommand::read_register_bit(Register_Addr register_addr, int idx) { + MV_HAL_LOG_DEBUG() << __PRETTY_FUNCTION__ << register_addr; + auto it = mregister_state.find(register_addr); + if (it == mregister_state.end()) { + return 0; + } + + return (it->second >> idx) & 1; +} + +void TzLibUSBBoardCommand::init_register(Register_Addr regist, uint32_t value) { + mregister_state[regist] = value; +} + +bool TzLibUSBBoardCommand::has_register(Register_Addr regist) { + auto it = mregister_state.find(regist); + return it != mregister_state.end(); +} + +bool TzLibUSBBoardCommand::reset_device() { +#ifndef _WINDOWS + if (dev_handle_) { + int r = libusb_reset_device(dev_handle_); + if (r == 0) { + MV_HAL_LOG_TRACE() << "libusb BC: USB Reset"; + return true; + } else { + MV_HAL_LOG_ERROR() << libusb_error_name(r); + return false; + } + } else { + return false; + } +#else + return true; +#endif +} + +void TzLibUSBBoardCommand::transfer_tz_frame(TzCtrlFrame &req) { + int res, sent; + std::vector answer(TZ_MAX_ANSWER_SIZE); + + if (!dev_handle_) + throw std::runtime_error("no libusb dev_handle"); + + /* send the command */ + res = libusb_bulk_transfer(dev_handle_, bEpControlOut, req.frame(), req.frame_size(), &sent, 1000); + if (res < 0) + throw std::system_error(res, LibUsbError()); + + /* get the result */ + res = libusb_bulk_transfer(dev_handle_, bEpControlIn, answer.data(), answer.size(), &sent, 1000); + if (res < 0) + throw std::system_error(res, LibUsbError()); + answer.resize(sent); + req.swap_and_check_answer(answer); +} + +unsigned int TzLibUSBBoardCommand::get_device_count() { + TzGenericCtrlFrame req(TZ_PROP_DEVICES); + transfer_tz_frame(req); + return req.get32(0); +} + +std::vector TzLibUSBBoardCommand::read_device_register(uint32_t device, uint32_t address, int nval) { + TzGenericCtrlFrame req(TZ_PROP_DEVICE_REG32); + + req.push_back32(device); + req.push_back32(address); + req.push_back32(nval); + + try { + transfer_tz_frame(req); + } catch (std::system_error &e) { + if (e.code() == std::error_code(TZ_COMMAND_FAILED, TzError())) { + // in this case, req has been set with the device answer + int err = req.get32(2); + throw std::system_error(err, std::generic_category()); + } else { + throw e; + } + } + if (req.get32(0) != device) + throw std::system_error(TZ_PROPERTY_MISMATCH, TzError(), "device id mismatch"); + if (req.get32(1) != address) + throw std::system_error(TZ_PROPERTY_MISMATCH, TzError(), "address mismatch"); + if (req.payload_size() < ((nval + 2) * sizeof(uint32_t))) + throw std::system_error(TZ_TOO_SHORT, TzError()); + + std::vector res(nval); + memcpy(res.data(), req.payload() + (2 * sizeof(uint32_t)), nval * sizeof(uint32_t)); + + MV_HAL_LOG_DEBUG() << "read_device_register dev " << device << " addr " << address << " val:"; + for (auto const &val : res) + MV_HAL_LOG_DEBUG() << val; + + return res; +} + +void TzLibUSBBoardCommand::write_device_register(uint32_t device, uint32_t address, const std::vector &val) { + TzGenericCtrlFrame req(TZ_PROP_DEVICE_REG32 | TZ_WRITE_FLAG); + + req.push_back32(device); + req.push_back32(address); + req.push_back32(val); + + MV_HAL_LOG_DEBUG() << "write_device_register dev " << device << " addr " << address << " val:"; + for (auto const &value : val) + MV_HAL_LOG_DEBUG() << val; + + try { + transfer_tz_frame(req); + } catch (std::system_error &e) { + if (e.code() == std::error_code(TZ_COMMAND_FAILED, TzError())) { + // in this case, req has been set with the device answer + int err = req.get32(2); + throw std::system_error(err, std::generic_category()); + } else { + throw e; + } + } + if (req.get32(0) != device) + throw std::system_error(TZ_PROPERTY_MISMATCH, TzError(), "device id mismatch"); + if (req.get32(1) != address) + throw std::system_error(TZ_PROPERTY_MISMATCH, TzError(), "address mismatch"); +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/boards/utils/CMakeLists.txt b/hal_psee_plugins/src/boards/utils/CMakeLists.txt new file mode 100644 index 000000000..4bd92db21 --- /dev/null +++ b/hal_psee_plugins/src/boards/utils/CMakeLists.txt @@ -0,0 +1,15 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. + +target_sources(metavision_hal_libusb_utils_obj PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/psee_camera_discovery.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/psee_libusb_data_transfer.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/psee_libusb_board_command.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/utils_fx3_ram_flash.cpp +) diff --git a/sdk/modules/driver/cpp/src/illuminance_module.cpp b/hal_psee_plugins/src/boards/utils/psee_camera_discovery.cpp similarity index 81% rename from sdk/modules/driver/cpp/src/illuminance_module.cpp rename to hal_psee_plugins/src/boards/utils/psee_camera_discovery.cpp index 47230cc47..c802dca23 100644 --- a/sdk/modules/driver/cpp/src/illuminance_module.cpp +++ b/hal_psee_plugins/src/boards/utils/psee_camera_discovery.cpp @@ -9,15 +9,16 @@ * See the License for the specific language governing permissions and limitations under the License. * **********************************************************************************************************************/ -#include "metavision/sdk/driver/illuminance_module.h" -#include "metavision/sdk/driver/camera_exception.h" +#include "boards/utils/psee_camera_discovery.h" namespace Metavision { -IlluminanceModule::~IlluminanceModule() {} +DeviceBuilderFactory &PseeCameraDiscovery::device_builder_factory() { + return factory_; +} -void IlluminanceModule::enable() { - throw CameraException(CameraErrorCode::DeprecatedFeature, "IlluminanceModule not available."); +void PseeCameraDiscovery::register_device_builder(long system_id, const DeviceBuilderCallback &cb) { + factory_.insert(system_id, cb); } } // namespace Metavision diff --git a/hal_psee_plugins/src/boards/utils/psee_libusb_board_command.cpp b/hal_psee_plugins/src/boards/utils/psee_libusb_board_command.cpp new file mode 100644 index 000000000..de698b366 --- /dev/null +++ b/hal_psee_plugins/src/boards/utils/psee_libusb_board_command.cpp @@ -0,0 +1,535 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include "metavision/hal/utils/hal_log.h" +#include "boards/utils/psee_libusb_board_command.h" +#include "boards/utils/utils_fx3_ram_flash.h" +#include "boards/utils/vendor_command_definition.h" +#include "boards/utils/config_registers_map.h" + +namespace Metavision { + +std::mutex PseeLibUSBBoardCommand::protect_libusb_submit_; + +PseeLibUSBBoardCommand::PseeLibUSBBoardCommand() = default; + +PseeLibUSBBoardCommand::PseeLibUSBBoardCommand(libusb_device_handle *dev_handle) { + dev_handle_ = dev_handle; + dev_speed_ = LIBUSB_SPEED_UNKNOWN; +} + +PseeLibUSBBoardCommand::~PseeLibUSBBoardCommand() { + if (dev_handle_) { + int r = libusb_release_interface(dev_handle_, 0); // release the claimed interface + if (r != 0) { + MV_HAL_LOG_WARNING() << "Cannot release interface"; + } else { + MV_HAL_LOG_TRACE() << "Released interface"; + } + libusb_close(dev_handle_); // close the device we opened + } +} + +bool PseeLibUSBBoardCommand::open(const std::string &serial) { + if (!init_libusb()) { + return false; + } + get_ccam2_with_serial(nullptr, serial); + return dev_handle_ != nullptr; +} + +long PseeLibUSBBoardCommand::get_board_version() { + uint16_t val = control_read_register_16bits(CMD_READ_VERSION_FX3, 0x00); + return val; +} + +long PseeLibUSBBoardCommand::get_board_id() { + uint32_t val = control_read_register_32bits(CMD_READ_FX3_ID, 0x00, false); + return val; +} + +long PseeLibUSBBoardCommand::get_board_release_version() { + uint32_t val = control_read_register_32bits(CMD_READ_FX3_RELEASE_VERSION, 0x00, false); + return val; +} + +long PseeLibUSBBoardCommand::get_board_build_date() { + uint32_t val = control_read_register_32bits(CMD_READ_FX3_BUILD_DATE, 0x00, false); + return val; +} + +long PseeLibUSBBoardCommand::get_board_speed() { + if (!dev_handle_) { + return -1; + } + + switch (dev_speed_) { + case LIBUSB_SPEED_LOW: + return 1; // Actual speed would be 1.5Mbit/s but we use integral type. + case LIBUSB_SPEED_FULL: + return 12; + case LIBUSB_SPEED_HIGH: + return 480; + case LIBUSB_SPEED_SUPER: + return 5000; +#if LIBUSB_API_VERSION >= 0x01000106 + // Compiling on 1.0.22 or newer, which starts support for SSP. + case LIBUSB_SPEED_SUPER_PLUS: + return 10000; +#endif + case LIBUSB_SPEED_UNKNOWN: + default: + return 0; // Unknown speed is indicated as 0. + } +} + +long PseeLibUSBBoardCommand::get_board_version_control_id() { + uint32_t val = control_read_register_32bits(CMD_READ_FX3_VERSION_CONTROL_ID, 0x00, false); + return val; +} + +uint32_t PseeLibUSBBoardCommand::control_read_register_32bits(uint8_t usbvendorcmd, uint32_t address, bool big_endian) { + uint32_t val = -1; + if (!dev_handle_) { + MV_HAL_LOG_ERROR() << "ERR no dev_handle"; + return val; + } + unsigned char data[8]; + int r = libusb_control_transfer(dev_handle_, + 0xC0 + //(LIBUSB_REQUEST_TYPE_VENDOR | LIBUSB_ENDPOINT_IN) + , + usbvendorcmd, uint16_t(address & 0xFFFF), uint16_t((address >> 16) & 0xFFFF), data, + 8, 0); + if (r <= 0) { + MV_HAL_LOG_ERROR() << "control_read_register_32bits" << r << "err" << libusb_error_name(r); + } + + auto log_op = MV_HAL_LOG_DEBUG() << "control_read_32bits " << r << " "; + if (r <= 0) + log_op << "err" << libusb_error_name(r); + else if (data[0] != 0x40) { + log_op << std::hex << long(usbvendorcmd) << long(address) << long(data[0]) << long(data[1]) << long(data[2]) + << long(data[3]) << long(data[4]) << long(data[5]) << long(data[6]) << long(data[7]) << big_endian; + log_op << "transaction failed - returned error code is:" << Metavision::Log::no_space << long(data[0]) + << long(data[1]) << std::endl; + } else { + log_op << std::hex << long(usbvendorcmd) << long(address) << long(data[0]) << long(data[1]) << long(data[2]) + << long(data[3]) << long(data[4]) << long(data[5]) << long(data[6]) << long(data[7]) << big_endian; + log_op << std::endl; + } + + if (big_endian) { + val = data[7]; + val |= data[6] << 8; + val |= data[5] << 16; + val |= data[4] << 24; + } else { + val = data[0]; + val |= data[1] << 8; + val |= data[2] << 16; + val |= data[3] << 24; + } + log_op << "value" << std::hex << val << std::dec; + return val; +} + +uint16_t PseeLibUSBBoardCommand::control_read_register_16bits(uint8_t usbvendorcmd, uint32_t address) { + uint16_t val = -1; + if (!dev_handle_) { + MV_HAL_LOG_ERROR() << "ERR no dev_handle"; + return val; + } + unsigned char data[4]; + int r = libusb_control_transfer(dev_handle_, + 0xC0 + //(LIBUSB_REQUEST_TYPE_VENDOR | LIBUSB_ENDPOINT_IN) + , + usbvendorcmd, address, 0, data, 4, 0); + if (r <= 0) { + MV_HAL_LOG_ERROR() << "control_read_register_16bits" << r << "err" << libusb_error_name(r); + } + + auto log_op = MV_HAL_LOG_DEBUG() << "control_read_register_16bits" << r; + if (r <= 0) + log_op << "err" << libusb_error_name(r); + else + log_op << std::hex << long(usbvendorcmd) << long(address) << long(data[0]) << long(data[1]) << long(data[2]) + << long(data[3]); + log_op << std::endl; + val = data[2]; + val |= static_cast(data[3]) << 8; + + log_op << "value " << std::hex << val << std::dec; + return val; +} + +void PseeLibUSBBoardCommand::control_write_register_32bits(uint8_t usbvendorcmd, uint32_t address, uint32_t val) { + if (!dev_handle_) { + MV_HAL_LOG_ERROR() << "ERR no dev_handle"; + return; + } + unsigned char data[8]; + + data[0] = (val >> 24) & 0xFF; + data[1] = (val >> 16) & 0xFF; + data[2] = (val >> 8) & 0xFF; + data[3] = (val)&0xFF; + data[4] = 1; + data[5] = 2; + data[6] = 3; + data[7] = 4; + + int r = libusb_control_transfer(dev_handle_, + 0x40 + //(LIBUSB_REQUEST_TYPE_VENDOR | LIBUSB_ENDPOINT_OUT) + , + usbvendorcmd, uint16_t(address & 0xFFFF), uint16_t((address >> 16) & 0xFFFF), data, + 4, 0); + if (r <= 0) { + MV_HAL_LOG_ERROR() << "control_write_register_32bits" << r << "err" << libusb_error_name(r); + } + auto log_op = MV_HAL_LOG_DEBUG() << "control_write_register_32bits " << r; + if (r <= 0) + log_op << std::hex << long(usbvendorcmd) << long(address) << val << std::dec + << "transaction failed - returned error code is :" << long(data[0]) << long(data[1]) << long(data[2]) + << long(data[3]) << long(data[4]) << long(data[5]) << long(data[6]) << long(data[7]); + else + log_op << std::hex << long(usbvendorcmd) << long(address) << val << std::dec << "status" << r; + if (r <= 0) + log_op << "err" << libusb_error_name(r); + log_op << std::endl; +} + +void PseeLibUSBBoardCommand::control_write_vector_32bits(uint32_t base_address, const std::vector &val) { + if (!dev_handle_) { + MV_HAL_LOG_ERROR() << "ERR no dev_handle"; + return; + } + std::vector data; + for (uint32_t v : val) { + data.push_back((v >> 24) & 0xFF); + data.push_back((v >> 16) & 0xFF); + data.push_back((v >> 8) & 0xFF); + data.push_back((v)&0xFF); + } + int r = libusb_control_transfer( + dev_handle_, + 0x40 + //(LIBUSB_REQUEST_TYPE_VENDOR | LIBUSB_ENDPOINT_OUT) + , + ((base_address == CCAM2IF_LEFT_BASE_ADDRESS) ? CMD_WRITE_VEC_REGFPGA_32 : CMD_WRITE_VEC_SLAVE_REGFPGA_32), 0, 0, + data.data(), data.size(), 0); + + if (r <= 0) { + MV_HAL_LOG_ERROR() << "control_write_vector_32bits" << r << "err" << libusb_error_name(r); + } + + auto log_op = MV_HAL_LOG_DEBUG() << "control_write_vector_32bits" << r; + MV_HAL_LOG_DEBUG() << std::hex << "size" << data.size() << std::dec; + for (auto i : val) { + log_op << std::hex << long(i) << ","; + } + log_op << std::endl; + if (r <= 0) + log_op << "err" << libusb_error_name(r); +} + +void PseeLibUSBBoardCommand::control_write_register_8bits(uint8_t usbvendorcmd, uint8_t address, uint8_t val) { + int r = libusb_control_transfer(dev_handle_, + 0x40 + //(LIBUSB_REQUEST_TYPE_VENDOR | LIBUSB_ENDPOINT_OUT) + , + usbvendorcmd, address, 0, &val, 1, 0); + if (r <= 0) { + MV_HAL_LOG_ERROR() << "control_write_register_8bits" << r << "err" << libusb_error_name(r); + } + { + auto log_op = MV_HAL_LOG_DEBUG() << "control_write_register_8bits" << r; + log_op << std::hex << long(usbvendorcmd) << long(address) << val << std::dec; + if (r <= 0) + log_op << "err" << libusb_error_name(r); + log_op << std::endl; + } +} + +uint8_t PseeLibUSBBoardCommand::control_read_register_8bits(uint8_t usbvendorcmd, uint8_t address) { + unsigned char data[4]; + uint8_t val; + int r = libusb_control_transfer(dev_handle_, + 0xC0 + //(LIBUSB_REQUEST_TYPE_VENDOR | LIBUSB_ENDPOINT_IN) + , + usbvendorcmd, address, 0, data, 4, 0); + if (r <= 0) { + MV_HAL_LOG_ERROR() << "control_read_register_8bits" << r << "err" << libusb_error_name(r); + return 0; + } + + { + auto log_op = MV_HAL_LOG_DEBUG() << "control_read_register_8bits" << r; + if (r <= 0) + log_op << "err" << libusb_error_name(r); + else + log_op << std::hex << long(usbvendorcmd) << long(address) << long(data[0]) << long(data[1]) << long(data[2]) + << long(data[3]); + } + + val = data[2]; + MV_HAL_LOG_DEBUG() << "value" << std::hex << int(val) << std::dec; + return val; +} + +libusb_transfer *PseeLibUSBBoardCommand::contruct_async_bulk_transfer(unsigned char *buf, int packet_size, + libusb_transfer_cb_fn async_bulk_cb, + void *user_data, unsigned int timeout) { + if (!dev_handle_) { + return nullptr; + } + libusb_transfer *transfer = nullptr; + transfer = libusb_alloc_transfer(0); + if (!transfer) { + MV_HAL_LOG_ERROR() << "libusb_alloc_transfer Failed"; + return transfer; + } + prepare_async_bulk_transfer(transfer, buf, packet_size, async_bulk_cb, user_data, timeout); + return transfer; +} + +void PseeLibUSBBoardCommand::prepare_async_bulk_transfer(libusb_transfer *transfer, unsigned char *buf, int packet_size, + libusb_transfer_cb_fn async_bulk_cb, void *user_data, + unsigned int timeout) { + libusb_fill_bulk_transfer(transfer, dev_handle_, (1 | LIBUSB_ENDPOINT_IN), buf, packet_size, async_bulk_cb, + user_data, timeout); + transfer->flags &= ~LIBUSB_TRANSFER_FREE_BUFFER; + transfer->flags &= ~LIBUSB_TRANSFER_FREE_TRANSFER; +} + +void PseeLibUSBBoardCommand::free_async_bulk_transfer(libusb_transfer *transfer) { + libusb_free_transfer(transfer); +} + +int PseeLibUSBBoardCommand::submit_transfer(libusb_transfer *transfer) { + std::lock_guard guard(protect_libusb_submit_); + int r = 0; + r = libusb_submit_transfer(transfer); + if (r < 0) { + MV_HAL_LOG_ERROR() << "USB Submit Error"; + } + return r; +} + +int PseeLibUSBBoardCommand::bulk_transfer(unsigned char *buf, int packet_size, unsigned int timeout, int &actual_size) { + if (dev_handle_) { + return libusb_bulk_transfer(dev_handle_, (1 | LIBUSB_ENDPOINT_IN), buf, packet_size, &actual_size, 100); // 2ms + } else { + return LIBUSB_ERROR_NO_DEVICE; + } +} + +void PseeLibUSBBoardCommand::get_ccam2_with_serial(libusb_context *ctx, const std::string &serial) { + if (dev_handle_) { + libusb_close(dev_handle_); + dev_handle_ = nullptr; + dev_speed_ = LIBUSB_SPEED_UNKNOWN; + } + + libusb_device **devs; + int cnt = libusb_get_device_list(ctx, &devs); // get the list of devices + if (cnt <= 0) { + MV_HAL_LOG_TRACE() << "Device list empty"; + return; + } + libusb_device_handle *dev_handle = nullptr; + + for (int i = 0; i < cnt; i++) { + libusb_device_descriptor desc; + int r = libusb_get_device_descriptor(devs[i], &desc); + if (r < 0) { + MV_HAL_LOG_TRACE() << "Failed to get device descriptor"; + return; + } + if ((desc.idVendor == 0x04b4) && + ((desc.idProduct == 0x00f1) || (desc.idProduct == 0x00f4) || (desc.idProduct == 0x00bc))) { + r = libusb_open(devs[i], &dev_handle); + if (r != 0) { + MV_HAL_LOG_TRACE() << "Unable to open device"; + continue; + } + if (libusb_kernel_driver_active(dev_handle, 0) == 1) { // find out if kernel driver is attached + MV_HAL_LOG_TRACE() << "Kernel driver active"; + if (libusb_detach_kernel_driver(dev_handle, 0) == 0) // detach it + MV_HAL_LOG_TRACE() << "Kernel driver detached!"; + } + r = libusb_claim_interface(dev_handle, 0); // claim interface 0 (the first) of device + if (r < 0) { + MV_HAL_LOG_TRACE() << "Cannot claim interface"; + libusb_close(dev_handle); + dev_handle = nullptr; + continue; + } + dev_speed_ = (libusb_speed)libusb_get_device_speed(devs[i]); + dev_handle_ = dev_handle; + std::string cur_serial = + get_serial(); // Done even if serial is "" because get_serial check if FPGA has boot + if (cur_serial == serial || serial == "") { + break; + } + dev_handle_ = nullptr; + dev_speed_ = LIBUSB_SPEED_UNKNOWN; + libusb_release_interface(dev_handle, 0); + libusb_close(dev_handle); + dev_handle = nullptr; + } + } + libusb_free_device_list(devs, 1); // free the list, unref the devices in it + + // Not reseting the usb device leads to not flushing the usb data in the driver + // It leads to time discrepancies at camera start if camera is not unplugged + // Reseting the device is equivalent to an unplug but should not be necessary. + // Reseting the device on windows is not necessary as the usb driver behaves correctly +#ifndef _WIN32 + MV_HAL_LOG_TRACE() << "Reset device"; + if (dev_handle_) { + libusb_reset_device(dev_handle_); + } +#endif +} + +void PseeLibUSBBoardCommand::write_register(Register_Addr register_addr, uint32_t value) { + init_register(register_addr, value); + send_register(register_addr); +} + +uint32_t PseeLibUSBBoardCommand::read_register(Register_Addr regist) { + auto it = mregister_state.find(regist); + if (it == mregister_state.end()) { + return 0; + } + + return it->second; +} + +void PseeLibUSBBoardCommand::load_register(Register_Addr regist) { + uint32_t value = control_read_register_32bits(CMD_READ_REGFPGA_32, regist); + init_register(regist, value); +} + +void PseeLibUSBBoardCommand::set_register_bit(Register_Addr register_addr, int idx, bool state) { + auto it = mregister_state.find(register_addr); + if (it == mregister_state.end()) { + it = mregister_state.insert(std::make_pair(register_addr, static_cast(0))).first; + } + if (state) { + it->second |= (1 << idx); + } else { + it->second &= ~(1 << idx); + } +} + +void PseeLibUSBBoardCommand::send_register(Register_Addr register_addr) { + uint32_t val = 0; + if (has_register(register_addr)) { + val = read_register(register_addr); + } + control_write_register_32bits(CMD_WRITE_REGFPGA_32, register_addr, val); +} + +void PseeLibUSBBoardCommand::send_register_bit(Register_Addr register_addr, int idx, bool state) { + set_register_bit(register_addr, idx, state); + send_register(register_addr); +} + +uint32_t PseeLibUSBBoardCommand::read_register_bit(Register_Addr register_addr, int idx) { + MV_HAL_LOG_DEBUG() << __PRETTY_FUNCTION__ << register_addr; + auto it = mregister_state.find(register_addr); + if (it == mregister_state.end()) { + return 0; + } + + return (it->second >> idx) & 1; +} + +void PseeLibUSBBoardCommand::init_register(Register_Addr regist, uint32_t value) { + mregister_state[regist] = value; +} + +bool PseeLibUSBBoardCommand::has_register(Register_Addr regist) { + auto it = mregister_state.find(regist); + return it != mregister_state.end(); +} + +bool PseeLibUSBBoardCommand::wait_fpga_boot_state() { + long FPGA_boot_state = check_fpga_boot_state(); + std::chrono::time_point const start = std::chrono::system_clock::now(); + std::chrono::duration time_elapsed_s{}; + + while (!FPGA_boot_state && time_elapsed_s.count() < 10) { + FPGA_boot_state = check_fpga_boot_state(); + time_elapsed_s = std::chrono::system_clock::now() - start; + } + return FPGA_boot_state; +} + +void PseeLibUSBBoardCommand::reset_fpga() { + control_write_register_32bits(CMD_RESET_FPGA, 0x34, 0); +} + +long PseeLibUSBBoardCommand::check_fpga_boot_state() { + uint16_t val = control_read_register_16bits(CMD_CHECK_FPGA_BOOT_STATE, 0x00); + return val; +} + +long PseeLibUSBBoardCommand::get_system_id() { + long FPGA_boot_state = wait_fpga_boot_state(); + if (!FPGA_boot_state) { + return SYSTEM_INVALID_NO_FPGA; + } + uint16_t val = control_read_register_16bits(CMD_READ_SYSTEM_ID, 0x00); + return val; +} + +long PseeLibUSBBoardCommand::get_system_version() { + uint32_t val_32 = control_read_register_32bits(CMD_READ_REGFPGA_32, STEREO_SYSTEM_CONFIG_VERSION_ADDR); + return val_32; +} + +unsigned int PseeLibUSBBoardCommand::get_system_build_date() { + uint32_t val_32 = control_read_register_32bits(CMD_READ_REGFPGA_32, STEREO_SYSTEM_CONFIG_BUILD_DATE_ADDR); + return val_32; +} + +unsigned int PseeLibUSBBoardCommand::get_system_version_control_id() { + uint32_t val_32 = control_read_register_32bits(CMD_READ_REGFPGA_32, STEREO_SYSTEM_CONFIG_VERSION_CONTROL_ID_ADDR); + return val_32; +} + +long PseeLibUSBBoardCommand::get_temperature() { + return -1; +} + +long PseeLibUSBBoardCommand::get_illumination() { + return -1; +} + +// ------------------------------ +// Static methods + +bool PseeLibUSBBoardCommand::init_libusb() { + int r; // for return values + r = libusb_init(nullptr); // initialize the library for the session we just declared + if (r < 0) { + MV_HAL_LOG_ERROR() << "An error occured while initializing libusb:" << libusb_error_name(r); + } + return r >= 0; +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/boards/utils/psee_libusb_data_transfer.cpp b/hal_psee_plugins/src/boards/utils/psee_libusb_data_transfer.cpp new file mode 100644 index 000000000..95e2a4e56 --- /dev/null +++ b/hal_psee_plugins/src/boards/utils/psee_libusb_data_transfer.cpp @@ -0,0 +1,214 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include + +#ifdef _WIN32 +#ifndef _MSC_VER +#define WIN_CALLBACK_DECL __stdcall +#else +#define WIN_CALLBACK_DECL WINAPI +#endif +#else +#define WIN_CALLBACK_DECL +#endif + +#include "boards/utils/psee_libusb_data_transfer.h" +#include "boards/utils/psee_libusb_board_command.h" +#include "boards/utils/config_registers_map.h" + +#include "metavision/hal/utils/hal_log.h" + +const static int USB_TIME_OUT = 100; +static const int N_ASYNC_TRANFERS_PER_DEVICE = 20; +const static int PACKET_SIZE = 128 * 1024; + +namespace Metavision { + +class PseeLibUSBDataTransfer::UserParamForAsyncBulkCallback { +public: + UserParamForAsyncBulkCallback(int id, const std::shared_ptr &cmd, + PseeLibUSBDataTransfer &libusb_data_transfer); + ~UserParamForAsyncBulkCallback(); + static void WIN_CALLBACK_DECL async_bulk_cb(struct libusb_transfer *transfer); + + void start(); + void stop(); + +private: + bool proceed_async_bulk(struct libusb_transfer *transfer); + + const static int timeout_ = USB_TIME_OUT; + DataTransfer::BufferPtr buf_; + std::mutex transfer_mutex_; + libusb_transfer *transfer_{nullptr}; + bool stop_ = true; + std::atomic submitted_transfer_{false}; + std::shared_ptr cmd_; + PseeLibUSBDataTransfer &libusb_data_transfer_; +}; + +PseeLibUSBDataTransfer::PseeLibUSBDataTransfer(const std::shared_ptr &cmd, + uint32_t raw_event_size_bytes) : + DataTransfer(raw_event_size_bytes), cmd_(cmd) {} + +PseeLibUSBDataTransfer::~PseeLibUSBDataTransfer() { + stop_impl(); + cmd_->try_to_flush(); +} + +void PseeLibUSBDataTransfer::start_impl(BufferPtr buffer) { + initiate_async_transfers(); +} + +void PseeLibUSBDataTransfer::run_impl() { + MV_HAL_LOG_TRACE() << "poll thread running"; + while (!should_stop() && active_bulks_transfers_ > 0) { + struct timeval tv = {0, 1}; + libusb_handle_events_timeout(nullptr, &tv); + } + MV_HAL_LOG_TRACE() << "poll thread shutting down"; + + release_async_transfers(); +} + +void PseeLibUSBDataTransfer::stop_impl() { + for (auto &transfer : vtransfer_) { + transfer->stop(); + } +} + +void PseeLibUSBDataTransfer::initiate_async_transfers() { + for (int i = 0; i < N_ASYNC_TRANFERS_PER_DEVICE; ++i) { + vtransfer_.push_back(std::make_unique(i, cmd_, *this)); + vtransfer_.back()->start(); + } +} + +void PseeLibUSBDataTransfer::release_async_transfers() { + vtransfer_.clear(); +} + +PseeLibUSBDataTransfer::UserParamForAsyncBulkCallback::UserParamForAsyncBulkCallback( + int id, const std::shared_ptr &cmd, PseeLibUSBDataTransfer &libusb_data_transfer) : + cmd_(cmd), libusb_data_transfer_(libusb_data_transfer) { + buf_ = libusb_data_transfer.get_buffer(); + buf_->resize(PACKET_SIZE); + transfer_ = cmd->contruct_async_bulk_transfer(buf_->data(), PACKET_SIZE, async_bulk_cb, this, timeout_); +} + +PseeLibUSBDataTransfer::UserParamForAsyncBulkCallback::~UserParamForAsyncBulkCallback() { + stop(); + + // Wait for submitted transfer to be processed before releasing this object. + while (submitted_transfer_) { + struct timeval tv = {0, 1}; + libusb_handle_events_timeout(nullptr, &tv); + }; + + if (transfer_) { + cmd_->free_async_bulk_transfer(transfer_); + transfer_ = nullptr; + } +} + +void WIN_CALLBACK_DECL + PseeLibUSBDataTransfer::UserParamForAsyncBulkCallback::async_bulk_cb(struct libusb_transfer *transfer) { + if (!transfer->user_data) + return; + + UserParamForAsyncBulkCallback *param = static_cast(transfer->user_data); + const bool ret = param->proceed_async_bulk(transfer); + if (!ret) { + param->stop(); + } + param->submitted_transfer_ = ret; +} + +void PseeLibUSBDataTransfer::preprocess_transfer(libusb_transfer *) {} + +bool PseeLibUSBDataTransfer::UserParamForAsyncBulkCallback::proceed_async_bulk(struct libusb_transfer *transfer) { + std::lock_guard lock(transfer_mutex_); + + assert(transfer == transfer_); + assert(transfer->buffer == buf_->data()); + + if (stop_) { + return false; + } + + libusb_data_transfer_.preprocess_transfer(transfer); + + if (transfer->status != LIBUSB_TRANSFER_COMPLETED && transfer->status != LIBUSB_TRANSFER_TIMED_OUT) { + { + MV_HAL_LOG_ERROR() << "ErrTransfert"; + MV_HAL_LOG_ERROR() << libusb_error_name(transfer->status); + if (transfer->status == LIBUSB_TRANSFER_NO_DEVICE) { + MV_HAL_LOG_ERROR() << "LIBUSB_TRANSFER_NO_DEVICE"; + return false; + } + } + int r = cmd_->submit_transfer(transfer); + if (r != 0) { + MV_HAL_LOG_ERROR() << "Resubmit Error after Error"; + MV_HAL_LOG_ERROR() << libusb_error_name(r); + return false; + } + return true; + } + + const auto remainder = transfer->actual_length % libusb_data_transfer_.get_raw_event_size_bytes(); + if (remainder) { + MV_HAL_LOG_WARNING() << "Buffer is not a multiple of a RAW events byte size (" + << libusb_data_transfer_.get_raw_event_size_bytes() << "). A RAW event has been dropped."; + } + + buf_->resize(transfer->actual_length - remainder); + auto next_buf = libusb_data_transfer_.transfer_data(buf_); + + next_buf->resize(PACKET_SIZE); + transfer->buffer = next_buf->data(); + buf_ = next_buf; + int r = cmd_->submit_transfer(transfer); + if (r != 0) { + MV_HAL_LOG_ERROR() << "Resubmit error after transfer OK"; + MV_HAL_LOG_ERROR() << libusb_error_name(r); + return false; + } + + return true; +} + +void PseeLibUSBDataTransfer::UserParamForAsyncBulkCallback::start() { + std::lock_guard lock(transfer_mutex_); // avoid concurrent access to stop + + submitted_transfer_ = true; + int r = cmd_->submit_transfer(transfer_); + if (r != 0) { + MV_HAL_LOG_ERROR() << "Submit error in start"; + MV_HAL_LOG_ERROR() << libusb_error_name(r); + return; + } + + stop_ = false; + ++libusb_data_transfer_.active_bulks_transfers_; +} + +void PseeLibUSBDataTransfer::UserParamForAsyncBulkCallback::stop() { + std::lock_guard lock(transfer_mutex_); + if (stop_) { + return; + } + stop_ = true; + --libusb_data_transfer_.active_bulks_transfers_; +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/boards/utils/utils_fx3_ram_flash.cpp b/hal_psee_plugins/src/boards/utils/utils_fx3_ram_flash.cpp new file mode 100644 index 000000000..f1dda8dc1 --- /dev/null +++ b/hal_psee_plugins/src/boards/utils/utils_fx3_ram_flash.cpp @@ -0,0 +1,573 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include +#ifndef _MSC_VER +#include +#else +#define NOMINMAX +#include +#include +#include +#endif +#include +#include +#include +#include +#include +#include + +#include "metavision/hal/utils/hal_log.h" +#include "boards/utils/utils_fx3_ram_flash.h" + +namespace LoadApplicativeFirmwareToFx3RAM { + +#define MAX_FWIMG_SIZE (512 * 1024) // Maximum size of the firmware binary. +#define MAX_WRITE_SIZE (2 * 1024) // Max. size of data that can be written through one vendor command. + +#define VENDORCMD_TIMEOUT (5000) // Timeout for each vendor command is set to 5 seconds. + +#define GET_LSW(v) ((unsigned short)((v)&0xFFFF)) +#define GET_MSW(v) ((unsigned short)((v) >> 16)) + +const int i2c_eeprom_size[] = {1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072}; + +int read_firmware_image(const char *filename, unsigned char *buf, int *romsize) { + int fd; + + struct stat filestat; + + // Verify that the file size does not exceed our limits. + if (stat(filename, &filestat) != 0) { + MV_HAL_LOG_ERROR() << "Failed to stat file" << filename; + return -1; + } + + int filesize = filestat.st_size; + if (filesize > MAX_FWIMG_SIZE) { + MV_HAL_LOG_ERROR() << "File size exceeds maximum firmware image size"; + return -2; + } + + fd = open(filename, O_RDONLY); + if (fd < 0) { + MV_HAL_LOG_ERROR() << "File not found"; + return -3; + } + ssize_t r = read(fd, buf, 2); /* Read first 2 bytes, must be equal to 'CY' */ + if (r >= 2 && strncmp((char *)buf, "CY", 2)) { + MV_HAL_LOG_ERROR() << "Image does not have 'CY' at start. aborting"; + return -4; + } + r = read(fd, buf, 1); /* Read 1 byte. bImageCTL */ + if (r >= 1 && (buf[0] & 0x01)) { + MV_HAL_LOG_ERROR() << "Image does not contain executable code"; + return -5; + } + if (romsize != 0) + *romsize = i2c_eeprom_size[(buf[0] >> 1) & 0x07]; + + r = read(fd, buf, 1); /* Read 1 byte. bImageType */ + if (r >= 1 && !(buf[0] == 0xB0)) { + MV_HAL_LOG_ERROR() << "Not a normal FW binary with checksum"; + return -6; + } + + // Read the complete firmware binary into a local buffer. + lseek(fd, 0, SEEK_SET); + r = read(fd, buf, filesize); + + close(fd); + return filesize; +} + +int ram_write(libusb_device_handle *h, unsigned char *buf, unsigned int ramAddress, int len) { + int r; + int index = 0; + int size; + + while (len > 0) { + size = (len > MAX_WRITE_SIZE) ? MAX_WRITE_SIZE : len; + r = libusb_control_transfer(h, 0x40, 0xA0, GET_LSW(ramAddress), GET_MSW(ramAddress), &buf[index], size, + VENDORCMD_TIMEOUT); + if (r != size) { + printf("Vendor write to FX3 RAM failed\n"); + return -1; + } + + ramAddress += size; + index += size; + len -= size; + } + + return 0; +} + +int fx3_usbboot_download(libusb_device_handle *h, const char *filename) { + unsigned char *fwBuf; + unsigned int *data_p; + unsigned int i, checksum; + unsigned int address, length; + int r, index; + + fwBuf = (unsigned char *)calloc(1, MAX_FWIMG_SIZE); + if (fwBuf == 0) { + printf("Failed to allocate buffer to store firmware binary\n"); + // sb->showMessage("Error: Failed to get memory for download\n", 5000); + return -1; + } + + // Read the firmware image into the local RAM buffer. + int filesize = read_firmware_image(filename, fwBuf, NULL); + if (filesize <= 0) { + printf("Failed to read firmware file %s\n", filename); + // sb->showMessage("Error: Failed to read firmware binary\n", 5000); + free(fwBuf); + return -2; + } + + // Run through each section of code, and use vendor commands to download them to RAM. + index = 4; + checksum = 0; + while (index < filesize) { + data_p = (unsigned int *)(fwBuf + index); + length = data_p[0]; + address = data_p[1]; + if (length != 0) { + for (i = 0; i < length; i++) + checksum += data_p[2 + i]; + r = ram_write(h, fwBuf + index + 8, address, length * 4); + if (r != 0) { + printf("Failed to download data to FX3 RAM\n"); + free(fwBuf); + return -3; + } + } else { + if (checksum != data_p[2]) { + printf("Checksum error in firmware binary\n"); + free(fwBuf); + return -4; + } + + r = libusb_control_transfer(h, 0x40, 0xA0, GET_LSW(address), GET_MSW(address), NULL, 0, VENDORCMD_TIMEOUT); + if (r != 0) + printf("Ignored error in control transfer: %d\n", r); + break; + } + + index += (8 + length * 4); + } + + free(fwBuf); + return 0; +} +} // namespace LoadApplicativeFirmwareToFx3RAM + +FlashCmd::FlashCmd() {} + +FlashCmd FlashCmd::FlashCmdFx3() { + FlashCmd ret; + return ret; +} + +FlashCmd FlashCmd::FlashCmdFpga() { + FlashCmd ret; + ret.Write = 0xC5; + ret.Read = 0xC6; + ret.Erase = 0xC7; + ret.Status = 0xC7; + + ret.step = 4096; + ret.erasestep = 65536; + + ret.default_test_sector = 600; + return ret; +} + +int FlashCmd::flash_test(libusb_device_handle *dev_handle, int *err_bad_flash, bool erase, bool write, bool read) { + std::vector vdata; + for (long i = 0; i != step; ++i) { + vdata.push_back(i); + } + + MV_HAL_LOG_TRACE() << "Size to flash" << vdata.size(); + long sectore_erased = -1; + long num_err = 0; + unsigned long offset = default_test_sector * step; + + int sector = offset / step; + int sector_to_erase = offset / erasestep; + + MV_HAL_LOG_TRACE() << "Sector" << sector; + + if (sector_to_erase != sectore_erased) { + if (erase) { + erase_sector(dev_handle, sector_to_erase, num_err); + sectore_erased = sector_to_erase; + } + } + if (write) { + write_sector_over_erased_offset(dev_handle, sector, vdata, 0, num_err); + } + if (read || write) { + std::vector vorig = vdata; + std::vector vread; + if (read_sector(dev_handle, sector, vread, num_err)) { + if (read) { + dump_data(vread); + } + } + if (write) { + if (vorig != vread) { + MV_HAL_LOG_WARNING() << "Bad flash"; + ++(*err_bad_flash); + ++num_err; + } + } + } + return 0; +} + +int FlashCmd::flash(libusb_device_handle *dev_handle, const char *filename, unsigned long start_sector, long max_sector, + long file_offset, int *err_bad_flash) { + std::ifstream infile(filename, std::ios::in | std::ifstream::binary); + if (file_offset > 0) { + infile.ignore(file_offset); + } + std::vector vdata((std::istreambuf_iterator(infile)), std::istreambuf_iterator()); + + if (vdata.empty()) { + MV_HAL_LOG_ERROR() << "Unable to read" << filename; + return -1; + } + + while (vdata.size() % step) { + vdata.push_back(0); + } + + MV_HAL_LOG_INFO() << "Size to flash" << vdata.size(); + return flash_offset_sector(dev_handle, vdata, start_sector, max_sector, err_bad_flash); +} + +int FlashCmd::dump(libusb_device_handle *dev_handle, const char *filename, int *err_bad_flash) { + std::ofstream outfile(filename, std::ios::out | std::ifstream::binary); + std::vector vdata; //( (std::istreambuf_iterator(infile)), std::istreambuf_iterator() ); + + int ret = dump_flash(dev_handle, vdata, err_bad_flash); + std::copy(vdata.begin(), vdata.end(), std::ostreambuf_iterator(outfile)); + return ret; +} + +int FlashCmd::flash_map(libusb_device_handle *dev_handle, long start_sector, const std::string &findexes, + const std::string &ftargets, int *err_bad_flash) { + std::vector vdata; + long nindex = 0; + coe_2_data(findexes, vdata, nindex); + + MV_HAL_LOG_TRACE() << nindex << "indexes read"; + + long ntargets = 0; + coe_2_data(ftargets, vdata, ntargets); + + MV_HAL_LOG_TRACE() << ntargets << "targets read"; + while (vdata.size() % step) { + vdata.push_back(0); + } + + MV_HAL_LOG_TRACE() << "Size to flash" << vdata.size(); + return flash_offset_sector(dev_handle, vdata, start_sector, -1, err_bad_flash); +} + +int FlashCmd::flash_calib3d(libusb_device_handle *dev_handle, long start_sector, const std::string &calib3d, + int *err_bad_flash) { + std::ifstream infile(calib3d, std::ios::in | std::ifstream::binary); + std::vector vdata((std::istreambuf_iterator(infile)), std::istreambuf_iterator()); + while (vdata.size() % step) { + vdata.push_back(0); + } + + MV_HAL_LOG_TRACE() << "Size to flash" << vdata.size(); + return flash_offset_sector(dev_handle, vdata, start_sector, -1, err_bad_flash); + + return 1; +} + +int FlashCmd::dump_calib3d(libusb_device_handle *dev_handle, std::vector &vdata, long start_sector, + int *err_bad_flash) { + long num_err = 0; + for (int sector = start_sector; sector < start_sector + 1000; ++sector) { + std::vector vread; //(step,0); + read_sector(dev_handle, sector, vread, num_err); + vdata.insert(vdata.end(), vread.begin(), vread.end()); + auto it = vread.rbegin(); + if (it == vread.rend()) + break; + uint8_t vlast = *it; + ++it; + if (it == vread.rend()) + break; + uint8_t vlast_1 = *it; + if ((vlast == 0 && vlast_1 == 0) || (vlast == 0xFF && vlast_1 == 0xFF)) { + break; + } + + if (num_err > 10) + break; + } + return 0; +} + +int FlashCmd::flash_offset_sector(libusb_device_handle *dev_handle, std::vector &vdata, + unsigned long start_sector, long max_sector, int *err_bad_flash) { + long offset = start_sector * step; + if (offset % erasestep) { + MV_HAL_LOG_ERROR() << "The start sector must be at the beginning of an erase sector"; + return 0; + } + long sectore_erased = -1; + long num_err = 0; + long last_index = vdata.size() + offset - 1; + if (max_sector >= 0) { + long max_index = ((max_sector + 1) * step) - 1; + last_index = last_index >= max_index ? max_index : last_index; + } + for (long index = offset; index <= last_index; index += step) { + int sector = index / step; + int sector_to_erase = index / erasestep; + + if (sector_to_erase != sectore_erased) { + erase_sector(dev_handle, sector_to_erase, num_err); + sectore_erased = sector_to_erase; + } + write_sector_over_erased_offset(dev_handle, sector, vdata, index - offset, num_err); + + std::vector vorig(&vdata[index - offset], &vdata[index - offset] + step); + std::vector vread; //(step,0); + read_sector(dev_handle, sector, vread, num_err); + if (vorig != vread) { + MV_HAL_LOG_WARNING() << "Bad flash"; + ++(*err_bad_flash); + ++num_err; + } + } + return 0; +} + +int FlashCmd::dump_flash(libusb_device_handle *dev_handle, std::vector &vdata, int *err_bad_flash) { + return dump_flash_offset_sector(dev_handle, vdata, 0, 1023, err_bad_flash); +} + +int FlashCmd::dump_flash_offset_sector(libusb_device_handle *dev_handle, std::vector &vdata, long start_sector, + long end_sector, int *err_bad_flash) { + vdata.clear(); + long num_err = 0; + for (int sector = start_sector; sector <= end_sector; ++sector) { + std::vector vread; //(step,0); + read_sector(dev_handle, sector, vread, num_err); + vdata.insert(vdata.end(), vread.begin(), vread.end()); + + if (num_err > 10) + break; + } + return 0; +} + +int FlashCmd::flash_serial(libusb_device_handle *dev_handle, int *err_bad_flash, long sector, + uint16_t serial_to_write) { + std::vector vserial_to_write; + vserial_to_write.push_back((serial_to_write >> 8) & 0xFF); + vserial_to_write.push_back(serial_to_write & 0xFF); + + return flash_serial(dev_handle, err_bad_flash, sector, vserial_to_write); +} + +int FlashCmd::flash_serial(libusb_device_handle *dev_handle, int *err_bad_flash, long sector, + std::vector serial_to_write) { + std::vector vdata; + + using SizeType = std::vector::size_type; + + long sectore_erased = -1; + long num_err = 0; + long sectorstart = (((sector * step) / erasestep) * erasestep) / step; + for (long index = 0; index < erasestep / step; index += 1) { + std::vector vread; //(step,0); + read_sector(dev_handle, index + sectorstart, vread, num_err); + vdata.insert(vdata.end(), vread.begin(), vread.end()); + } + + // TODO: + // we should think about how to store both serial + length(serial) on memory, to be more generic + for (SizeType i = 0; i < serial_to_write.size(); i++) { + vdata[(sector - sectorstart) * step + i] = serial_to_write[i]; + } + + long offset = sectorstart * step; + for (SizeType index = offset; index < vdata.size() + offset; index += step) { + int sector = index / step; + int sector_to_erase = index / erasestep; + + int r = 0; + uint8_t status; + if (sector_to_erase != sectore_erased) { + erase_sector(dev_handle, sector_to_erase, num_err); + + sectore_erased = sector_to_erase; + } + + r = libusb_control_transfer(dev_handle, 0x40 /*(LIBUSB_REQUEST_TYPE_VENDOR | LIBUSB_ENDPOINT_OUT)*/, Write, 0, + sector, &vdata[index - offset], step, 0); + if (r <= 0) { + MV_HAL_LOG_WARNING() << "Error writing :" << libusb_error_name(r); + ++num_err; + } + + do { + int r = libusb_control_transfer(dev_handle, (LIBUSB_REQUEST_TYPE_VENDOR | LIBUSB_ENDPOINT_IN), Status, 0, 0, + &status, 1, 0); + if (r <= 0) { + MV_HAL_LOG_WARNING() << "Error reading status :" << libusb_error_name(r); + ++num_err; + } + } while (status != 0); + + std::vector vorig(&vdata[index - offset], &vdata[index - offset] + step); + std::vector vread(step, 0); + if (read_sector(dev_handle, sector, vread, num_err)) {} + + if (vorig != vread) { + MV_HAL_LOG_WARNING() << "Bad flash"; + ++(*err_bad_flash); + ++num_err; + } + } + return 0; +} + +int FlashCmd::flash_system_id(libusb_device_handle *dev_handle, int *err_bad_flash, long sector, + long system_id_to_write) { + return flash_serial(dev_handle, err_bad_flash, sector, system_id_to_write); +} + +bool FlashCmd::wait_for_status(libusb_device_handle *dev_handle) { + uint8_t status; + + do { + int r = libusb_control_transfer(dev_handle, (LIBUSB_REQUEST_TYPE_VENDOR | LIBUSB_ENDPOINT_IN), Status, 0, 0, + &status, 1, 0); + if (r <= 0) { + MV_HAL_LOG_ERROR() << "Error reading status :" << libusb_error_name(r); + return false; + } + } while (status != 0); + return true; +} + +void FlashCmd::coe_2_data(const std::string &ftargets, std::vector &vdata, long &ntargets) { + std::string stmp; + std::ifstream infile_target(ftargets); + if (infile_target) + std::getline(infile_target, stmp); + if (infile_target) + std::getline(infile_target, stmp); + ntargets = 0; + while (infile_target) { +#ifdef __ANDROID__ + long i; + infile_target >> i; + ++ntargets; + vdata.push_back(i & 0xFF); + vdata.push_back((i >> 8) & 0xFF); + vdata.push_back((i >> 16) & 0xFF); + vdata.push_back((i >> 24) & 0xFF); +#else + std::getline(infile_target, stmp); + try { + long i = std::stol(stmp); + ++ntargets; + vdata.push_back(i & 0xFF); + vdata.push_back((i >> 8) & 0xFF); + vdata.push_back((i >> 16) & 0xFF); + vdata.push_back((i >> 24) & 0xFF); + } catch (...) {} +#endif + } +} + +void FlashCmd::erase_sector(libusb_device_handle *dev_handle, int sector_to_erase, long &num_err) { + MV_HAL_LOG_TRACE() << "Erase sector" << sector_to_erase; + int r = libusb_control_transfer(dev_handle, 0x40 /*(LIBUSB_REQUEST_TYPE_VENDOR | LIBUSB_ENDPOINT_OUT)*/, Erase, 1, + sector_to_erase, nullptr, 0, 0); + if (r < 0) { + MV_HAL_LOG_WARNING() << "Error erase :" << libusb_error_name(r); + ++num_err; + } + if (!wait_for_status(dev_handle)) { + ++num_err; + } +} + +bool FlashCmd::read_sector(libusb_device_handle *dev_handle, int sector, std::vector &vread, long &num_err) { + MV_HAL_LOG_TRACE() << "Read sector" << sector; + vread.resize(step, 0); + std::fill(vread.begin(), vread.end(), 0); + int r = libusb_control_transfer(dev_handle, (LIBUSB_REQUEST_TYPE_VENDOR | LIBUSB_ENDPOINT_IN), Read, 0, sector, + &vread[0], step, 0); + if (r <= 0) { + MV_HAL_LOG_ERROR() << "Error read :" << libusb_error_name(r); + ++num_err; + return false; + } + return true; +} + +bool FlashCmd::write_sector_over_erased_offset(libusb_device_handle *dev_handle, int sector, + std::vector &vdata, unsigned long offset, long &num_err) { + if (vdata.size() < offset + step) { + MV_HAL_LOG_ERROR() << "Error write : not enough datas to fill a sector"; + ++num_err; + + return 0; + } + MV_HAL_LOG_INFO() << "Write sector" << sector; + int r = libusb_control_transfer(dev_handle, 0x40 /*(LIBUSB_REQUEST_TYPE_VENDOR | LIBUSB_ENDPOINT_OUT)*/, Write, 0, + sector, &vdata[offset], step, 0); + + if (r <= 0) { + MV_HAL_LOG_ERROR() << "Error write :" << libusb_error_name(r); + ++num_err; + return 0; + } + + if (!wait_for_status(dev_handle)) { + ++num_err; + } + return 1; +} + +bool FlashCmd::write_sector_over_erased(libusb_device_handle *dev_handle, int sector, std::vector &vdata, + long &num_err) { + return write_sector_over_erased_offset(dev_handle, sector, vdata, 0, num_err); +} + +void FlashCmd::dump_data(const std::vector &vdata) { + auto log_op = MV_HAL_LOG_TRACE() << Metavision::Log::no_space; + int max_i = std::min(1000, static_cast(vdata.size())); + for (int i = 0; i < max_i; ++i) { + if (i % 16 == 0) + log_op << i << " : "; + log_op << std::hex << long(vdata[i]) << " " << std::dec; + if (i % 4) + log_op << " "; + if (i % 16 == 15) + log_op << std::endl; + } +} diff --git a/hal_psee_plugins/src/devices/CMakeLists.txt b/hal_psee_plugins/src/devices/CMakeLists.txt new file mode 100644 index 000000000..78958075b --- /dev/null +++ b/hal_psee_plugins/src/devices/CMakeLists.txt @@ -0,0 +1,21 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. + +add_subdirectory(golden_fallbacks) +add_subdirectory(utils) +add_subdirectory(common) +add_subdirectory(treuzell) +add_subdirectory(gen3) +add_subdirectory(gen31) +if (EXISTS "${CMAKE_CURRENT_LIST_DIR}/gen4") + add_subdirectory(gen4) +endif(EXISTS "${CMAKE_CURRENT_LIST_DIR}/gen4") +add_subdirectory(gen41) +add_subdirectory(imx636) +add_subdirectory(others) diff --git a/hal_psee_plugins/src/devices/common/CMakeLists.txt b/hal_psee_plugins/src/devices/common/CMakeLists.txt new file mode 100644 index 000000000..b8367aacd --- /dev/null +++ b/hal_psee_plugins/src/devices/common/CMakeLists.txt @@ -0,0 +1,22 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. + +target_sources(metavision_hal_ccam3_obj PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/system_control.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/ccam3_system_control.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/ccam_trigger_event.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/ccam_trigger_out.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/ccam_monitoring.cpp +) + +target_sources(metavision_hal_psee_video_obj PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/evk2_system_control.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/evk2_tz_trigger_event.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/evk2_tz_trigger_out.cpp +) diff --git a/hal_psee_plugins/src/devices/common/ccam3_system_control.cpp b/hal_psee_plugins/src/devices/common/ccam3_system_control.cpp new file mode 100644 index 000000000..b20190f18 --- /dev/null +++ b/hal_psee_plugins/src/devices/common/ccam3_system_control.cpp @@ -0,0 +1,33 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include + +#include "devices/common/ccam3_system_control.h" +#include "utils/register_map.h" + +using vfield = std::map; + +namespace Metavision { + +CCam3SystemControl::CCam3SystemControl(const std::shared_ptr ®map, const std::string &prefix) : + SystemControl(regmap, prefix), prefix_(prefix), register_map_(regmap) {} + +void CCam3SystemControl::imu_control(bool enable) { + /*Control the IMU i/f logic. + + Args: + enable (int): IMU state (0 or 1) + */ + (*register_map_)[prefix_ + "IMU_CONTROL"]["ENABLE"].write_value(enable); +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/devices/common/ccam_monitoring.cpp b/hal_psee_plugins/src/devices/common/ccam_monitoring.cpp new file mode 100644 index 000000000..2b3940197 --- /dev/null +++ b/hal_psee_plugins/src/devices/common/ccam_monitoring.cpp @@ -0,0 +1,64 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include +#include +#include +#include + +#include "devices/common/ccam_monitoring.h" +#include "metavision/hal/facilities/i_hw_register.h" + +namespace Metavision { + +CCamMonitoring::CCamMonitoring(const std::shared_ptr &i_hw_register, const std::string &fpga_prefix, + const std::string &sensor_prefix) : + PseeMonitoring(i_hw_register), fpga_prefix_(fpga_prefix), sensor_prefix_(sensor_prefix) { + // Enable temperature reading + get_hw_register()->write_register(fpga_prefix_ + "SYSTEM_MONITOR/TEMP_VCC_MONITOR/EXT_TEMP_CONTROL", + "EXT_TEMP_MONITOR_SPI_EN", 1); +} + +int CCamMonitoring::get_temperature() { + auto r = get_hw_register()->read_register(fpga_prefix_ + "SYSTEM_MONITOR/TEMP_VCC_MONITOR/EVK_EXT_TEMP_VALUE"); + if (r != decltype(r)(-1)) + return r / 4096; + return -1; +} + +int CCamMonitoring::get_illumination() { + auto hw_register = get_hw_register(); + hw_register->write_register(sensor_prefix_ + "lifo_ctrl", "lifo_en", 0); + hw_register->write_register(sensor_prefix_ + "lifo_ctrl", "lifo_cnt_en", 0); + hw_register->write_register(sensor_prefix_ + "lifo_ctrl", "lifo_en", true); + hw_register->write_register(sensor_prefix_ + "lifo_ctrl", "lifo_cnt_en", true); + bool valid = false; + uint16_t retries = 0; + uint32_t counter = 0; + while (valid == false && retries < 10) { + auto reg_val = hw_register->read_register(sensor_prefix_ + "lifo_ctrl"); + valid = reg_val & 1 << 29; + counter = reg_val & ((1 << 27) - 1); + retries += 1; + } + + if (!valid) { + return -1; + } + + if (counter != decltype(counter)(-1)) { + float t = float(counter) / 100.; + return powf(10, 3.5 - logf(t * 0.37) / logf(10)); + } + return -1; +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/devices/common/ccam_trigger_event.cpp b/hal_psee_plugins/src/devices/common/ccam_trigger_event.cpp new file mode 100644 index 000000000..4f180aebb --- /dev/null +++ b/hal_psee_plugins/src/devices/common/ccam_trigger_event.cpp @@ -0,0 +1,66 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include "devices/common/ccam_trigger_event.h" +#include "utils/register_map.h" + +namespace Metavision { + +CCamTriggerEvent::CCamTriggerEvent(const std::shared_ptr ®ister_map, + const std::shared_ptr &device_control, + const std::string &prefix) : + PseeTriggerIn(device_control), register_map_(register_map), prefix_(prefix) { + for (const auto &id : chan_ids_) { + disable(static_cast(id)); + } +} + +bool CCamTriggerEvent::is_valid_id(uint32_t channel) { + for (const auto &id : chan_ids_) { + if (static_cast(id) == channel) { + return true; + } + } + return false; +} + +bool CCamTriggerEvent::enable(uint32_t channel) { + bool valid = is_valid_id(channel); + + if (valid) { + (*register_map_)[prefix_ + "SYSTEM_MONITOR/EXT_TRIGGERS/ENABLE"]["TRIGGER_" + std::to_string(channel)] + .write_value(1); + } + return valid; +} + +bool CCamTriggerEvent::disable(uint32_t channel) { + bool valid = is_valid_id(channel); + + if (valid) { + (*register_map_)[prefix_ + "SYSTEM_MONITOR/EXT_TRIGGERS/ENABLE"]["TRIGGER_" + std::to_string(channel)] + .write_value(0); + } + return valid; +} + +bool CCamTriggerEvent::is_enabled(uint32_t channel) { + bool valid = is_valid_id(channel); + long value = 0; + + if (valid) { + value = (*register_map_)[prefix_ + "SYSTEM_MONITOR/EXT_TRIGGERS/ENABLE"]["TRIGGER_" + std::to_string(channel)] + .read_value(); + } + return valid && (value == 1); +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/devices/common/ccam_trigger_out.cpp b/hal_psee_plugins/src/devices/common/ccam_trigger_out.cpp new file mode 100644 index 000000000..cd0bef124 --- /dev/null +++ b/hal_psee_plugins/src/devices/common/ccam_trigger_out.cpp @@ -0,0 +1,88 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifdef _MSC_VER +#define NOMINMAX // libusb.h includes windows.h which defines min max macros that we don't want +#endif + +#include +#include + +#include "devices/common/ccam_trigger_out.h" +#include "facilities/psee_device_control.h" +#include "utils/register_map.h" + +namespace Metavision { + +CCamTriggerOut::CCamTriggerOut(const std::shared_ptr ®map, + const std::shared_ptr &device_control, const std::string &prefix) : + PseeTriggerOut(device_control), prefix_(prefix), register_map_(regmap) { + disable(); +} + +bool CCamTriggerOut::enable() { + if (get_device_control()->get_mode() == I_DeviceControl::SyncMode::MASTER) + return false; + + if (prefix_.empty()) { + // Gen31 evk1 + (*register_map_)["SYSTEM_CONTROL/EXT_SYNC_OUT_MODE"].write_value(1); + } else { + // Gen4 evk1 + (*register_map_)[prefix_ + "SYSTEM_CONTROL/TIME_BASE_CONTROL"]["EXT_SYNC_OUT_TRIGGER_MODE"].write_value(1); + } + (*register_map_)[prefix_ + "SYSTEM_MONITOR/EXT_TRIGGERS/OUT_ENABLE"].write_value(1); + return true; +} + +void CCamTriggerOut::disable() { + if (prefix_.empty()) { + (*register_map_)["SYSTEM_CONTROL/EXT_SYNC_OUT_MODE"].write_value(0); + } else { + (*register_map_)[prefix_ + "SYSTEM_CONTROL/TIME_BASE_CONTROL"]["EXT_SYNC_OUT_TRIGGER_MODE"].write_value(0); + } + (*register_map_)[prefix_ + "SYSTEM_MONITOR/EXT_TRIGGERS/OUT_ENABLE"].write_value(0); +} + +void CCamTriggerOut::set_duty_cycle(double period_ratio) { + /* + * Convert the ratio (between 0 and 1) to a signal duration + * -> if ratio is 0.5 i.e. 50%, then the pulse will last 50% of the pulse period + * -> example: + * pulse period is 1000us + * duty cycle is 0.5 + * Then the signal will last 500us every 1000 us. + */ + + period_ratio_ = std::min(1., std::max(0., period_ratio)); + const auto signal_period_us = + (*register_map_)[prefix_ + "SYSTEM_MONITOR/EXT_TRIGGERS/OUT_PULSE_PERIOD"].read_value(); + + (*register_map_)[prefix_ + "SYSTEM_MONITOR/EXT_TRIGGERS/OUT_PULSE_WIDTH"].write_value(signal_period_us * + period_ratio_); +} + +void CCamTriggerOut::set_period(uint32_t signal_period_us) { + (*register_map_)[prefix_ + "SYSTEM_MONITOR/EXT_TRIGGERS/OUT_PULSE_PERIOD"].write_value(signal_period_us); + /* reapply duty cycle in order to update pulse width */ + set_duty_cycle(period_ratio_); +} + +bool CCamTriggerOut::is_enabled() { + bool sync_out = + prefix_.empty() ? + (*register_map_)["SYSTEM_CONTROL/EXT_SYNC_OUT_MODE"].read_value() : + (*register_map_)[prefix_ + "SYSTEM_CONTROL/TIME_BASE_CONTROL"]["EXT_SYNC_OUT_TRIGGER_MODE"].read_value(); + bool out_en = (*register_map_)[prefix_ + "SYSTEM_MONITOR/EXT_TRIGGERS/OUT_ENABLE"].read_value(); + return out_en && sync_out; +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/devices/common/evk2_system_control.cpp b/hal_psee_plugins/src/devices/common/evk2_system_control.cpp new file mode 100644 index 000000000..887f00d39 --- /dev/null +++ b/hal_psee_plugins/src/devices/common/evk2_system_control.cpp @@ -0,0 +1,319 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include + +#include "devices/common/evk2_system_control.h" +#include "metavision/hal/utils/hal_log.h" +#include "utils/register_map.h" + +using vfield = std::map; + +namespace Metavision { + +Evk2SystemControl::Evk2SystemControl(const std::shared_ptr ®map, const std::string &prefix) : + register_map_(regmap), + sys_ctrl_regbank_(prefix + "SYSTEM_CONTROL/"), + sys_mon_regbank_(prefix + "SYSTEM_MONITOR/"), + ps_host_if_regbank_(prefix + "PS_HOST_IF/") {} + +bool Evk2SystemControl::apply_resets() { + (*register_map_)[sys_ctrl_regbank_ + "CLK_CONTROL"].write_value(vfield{{"CORE_SOFT_RST", 1}, + {"CORE_REG_BANK_RST", 1}, + {"SENSOR_IF_SOFT_RST", 1}, + {"SENSOR_IF_REG_BANK_RST", 1}, + {"HOST_IF_SOFT_RST", 1}, + {"HOST_IF_REG_BANK_RST", 1}}); + + (*register_map_)[sys_ctrl_regbank_ + "CLK_CONTROL"]["GLOBAL_RST"].write_value(1); + + return (*register_map_)[sys_ctrl_regbank_ + "CLK_CONTROL"].read_value() == 0; +} + +void Evk2SystemControl::set_evt_format(uint32_t fmt) { + uint32_t len = 0; + + switch (fmt) { + case 2: + len = 4096; + break; + case 3: + len = 8192; + break; + default: + std::cerr << "Unknown event format\n"; + return; + } + + (*register_map_)[sys_ctrl_regbank_ + "GLOBAL_CONTROL"]["FORMAT"] = fmt; + (*register_map_)[sys_ctrl_regbank_ + "GLOBAL_CONTROL"]["OUTPUT_FORMAT"] = fmt; + (*register_map_)[ps_host_if_regbank_ + "AXI_DMA_PACKETIZER/PACKET_LENGTH"]["VALUE"] = len; +} + +void Evk2SystemControl::clk_control(bool enable) { + (*register_map_)[sys_ctrl_regbank_ + "CLK_CONTROL"].write_value( + vfield{{"CORE_EN", 1}, {"SENSOR_IF_EN", 1}, {"HOST_IF_EN", 1}}); +} + +void Evk2SystemControl::time_base_config(bool ext_sync, bool master, bool master_sel, bool fwd_up, bool fwd_down) { + /*Control the time base and synchronization settings. + + ---------------- + Time-base config + ---------------- + Internal mode: ext_sync_mode_i = 0 + - Enable with only enable_i + + External mode: ext_sync_mode_i = 1 + - Enable with enable_i and ext_sync_enable_i + - Sync source is sync_in when ext_sync_master_i = 0 + - Sync source is internal when ext_sync_master_i = 1 + + Output internal sync signal on sync_out when ext_sync_mode_i = '1' and ext_sync_master_i = '1' + + --------------------- + Sync in/out selection + --------------------- + When enable_cam_sync = 0: + - ext0_sync_o = 0 + When enable_cam_sync = 1: + - ext0_sync_o = ext1_sync_i when ext_sync_master = 0 + - ext0_sync_o = int_sync_i when ext_sync_master = 1 + + When enable_ext_sync = 0: + - ext1_sync_o = 0 + When enable_ext_sync = 1: + - ext1_sync_o = ext0_sync_i when ext_sync_master = 0 + - ext1_sync_o = int_sync_i when ext_sync_master = 1 + + int_sync_o = ext0_sync_i when ext_sync_master_sel = 0 + int_sync_o = ext1_sync_i when ext_sync_master_sel = 1 + + --------------------------------- + Sync in/out mapping for Evk2 Zynq + --------------------------------- + ext0 = CCam5 + ext1 = MoBo sync_in/out IOs + int = Internal timebase + + ext0_sync_i = CCam5 sync_out + ext0_sync_o = CCam5 sync_in + ext1_sync_i = MoBo sync_in + ext1_sync_o = MoBo sync_out + int_sync_i = Internal sync_out + int_sync_o = Internal sync_in + + If enable_cam_sync = 1 + CCam5 sync_in = MoBo sync_in (ext_sync_master = 0) + CCam5 sync_in = Internal sync_out (ext_sync_master = 1) + + If enable_ext_sync = 1 + MoBo sync_out = CCam5 sync_out (ext_sync_master = 0) + MoBo sync_out = Internal sync_out (ext_sync_master = 1) + + Internal sync_in = CCam5 sync_out (ext_sync_master_sel = 0) + Internal sync_in = MoBo sync_in (ext_sync_master_sel = 1) + */ + + (*register_map_)[sys_ctrl_regbank_ + "TIME_BASE_CONTROL"].write_value(vfield{{"ENABLE", 0}, + {"EXT_SYNC_MODE", ext_sync}, + {"EXT_SYNC_ENABLE", ext_sync}, + {"EXT_SYNC_MASTER", master}, + {"EXT_SYNC_MASTER_SEL", master_sel}, + {"ENABLE_EXT_SYNC", fwd_up}, + {"ENABLE_CAM_SYNC", fwd_down}}); +} + +void Evk2SystemControl::time_base_control(bool enable) { + /*Enable the time base. + + Args: + enable (bool): Time base state + */ + (*register_map_)[sys_ctrl_regbank_ + "TIME_BASE_CONTROL"]["ENABLE"].write_value(enable); +} + +void Evk2SystemControl::merge_config(bool bypass, int source) { + /*Merge Config + + Args: + bypass (bool): Bypasses the event merge + source (int) : '0' pattern/sensor event stream, + '1' monitoring event stream + */ + + (*register_map_)[sys_ctrl_regbank_ + "EVT_MERGE_CONTROL"].write_value( + vfield{{"BYPASS", bypass}, {"SOURCE", source}}); +} + +void Evk2SystemControl::merge_control(bool enable) { + /*Merge Control + + Arg: + enable (bool): Enable merge block to process events + */ + (*register_map_)[sys_ctrl_regbank_ + "EVT_MERGE_CONTROL"]["ENABLE"].write_value(enable); +} + +void Evk2SystemControl::th_recovery_config(bool bypass) { + /*TH Recovery Config. + + Args: + bypass (bool): Bypasses TH Recovery logic + */ + (*register_map_)[sys_ctrl_regbank_ + "TH_RECOVERY_CONTROL"]["BYPASS"].write_value(bypass); +} + +void Evk2SystemControl::th_recovery_control(bool enable) { + /*TH Recovery Control. + + Args: + enable (bool): Enable TH Recovery logic + */ + (*register_map_)[sys_ctrl_regbank_ + "TH_RECOVERY_CONTROL"]["ENABLE"].write_value(enable); +} + +void Evk2SystemControl::out_th_recovery_config(bool bypass) { + /*Output TH Recovery Config. + + Args: + bypass (bool): Bypasses Output TH Recovery logic + */ + (*register_map_)[sys_ctrl_regbank_ + "OUT_TH_RECOVERY_CONTROL"]["BYPASS"].write_value(bypass); +} + +void Evk2SystemControl::out_th_recovery_control(bool enable) { + /*Output TH Recovery Control. + + Args: + enable (bool): Enable Output TH Recovery logic + */ + (*register_map_)[sys_ctrl_regbank_ + "OUT_TH_RECOVERY_CONTROL"]["ENABLE"].write_value(enable); +} + +void Evk2SystemControl::data_formatter_config(bool bypass) { + /*Event Data Formatter Config. + + Args: + bypass (int, optional): Bypasses the event data formatter + */ + (*register_map_)[sys_ctrl_regbank_ + "EVT_DATA_FORMATTER_CONTROL"]["BYPASS"].write_value(bypass); +} + +void Evk2SystemControl::data_formatter_control(bool enable) { + /*Event Data Formatter Control. + + Args: + enable (bool) : Enable Data Formatter logic + */ + (*register_map_)[sys_ctrl_regbank_ + "EVT_DATA_FORMATTER_CONTROL"]["ENABLE"].write_value(enable); +} + +void Evk2SystemControl::set_mode(int mode) { + /*Set the system mode: Init, Master or Slave. + + Args: + mode (int, optional): System mode + */ + (*register_map_)[sys_ctrl_regbank_ + "GLOBAL_CONTROL"]["MODE"].write_value(mode); +} + +void Evk2SystemControl::monitoring_merge_config(bool bypass, int source) { + /*Monitoring Merge Config + + Args: + bypass (bool): Bypasses the event merge + source (int) : '0' pattern/sensor event stream, + '1' monitoring event stream + */ + + (*register_map_)[sys_mon_regbank_ + "CONTROL/EVT_MERGE_CONTROL"].write_value( + vfield{{"BYPASS", bypass}, {"SOURCE", source}}); +} + +void Evk2SystemControl::monitoring_merge_control(bool enable) { + /*Monitoring Merge Control + + Arg: + enable (bool): Enable merge block to process events + */ + (*register_map_)[sys_mon_regbank_ + "CONTROL/EVT_MERGE_CONTROL"]["ENABLE"].write_value(enable); +} + +void Evk2SystemControl::ts_checker_config(bool bypass) { + /*TS Checker Config + + Arg: + bypass (bool): Bypasses the ts checker block + */ + (*register_map_)[sys_ctrl_regbank_ + "TS_CHECKER_CONTROL"]["BYPASS"].write_value(bypass); +} + +void Evk2SystemControl::sync_out_pin_config(bool trig_out_override) { + /* Sync out IO pin source configuration. + Override pin to output trigger out pulse instead of sync out signal. + + Arg: + trig_out_override (bool): select signal to forward to FPGA IO (false -> sync_out, true -> trigget_out) + */ + + // Select mode to forward + (*register_map_)[sys_ctrl_regbank_ + "IO_CONTROL"]["SYNC_OUT_MODE"].write_value(trig_out_override); + + // Enable multi drivers detector + // (*register_map_)[sys_ctrl_regbank_ + "IO_CONTROL"]["SYNC_OUT_EN_FLT_CHK"].write_value(1); +} + +bool Evk2SystemControl::sync_out_pin_control(bool enable) { + /*Sync out IO pin external gate control. + + Arg: + enable (bool) : Enable/disable external line's photo MOS to connect FPGA IO to external connector + */ + + // Enable/disable external MOS gate between FPGA IO and Evk2 connector + (*register_map_)[sys_ctrl_regbank_ + "IO_CONTROL"]["SYNC_OUT_EN_HSIDE"].write_value(enable); + return true; + + /* Code removed as some Evk2 MoBo come with fault alert chip not mounted + // Check if sync out IO pin is not driven + if (get_sync_out_pin_fault_alert()) { + MV_HAL_LOG_ERROR() << "SYNC OUT pin is driven by an external signal."; + return false; + } else { + // Enable line's photo MOS to connect FPGA IO to external connector + (*register_map_)[sys_ctrl_regbank_ + "IO_CONTROL"]["SYNC_OUT_EN_HSIDE"].write_value(1); + return true; + }*/ +} + +bool Evk2SystemControl::get_sync_out_pin_fault_alert() { + // External sync out connector fault detector (multi drivers detector) + bool isDriven = false; + + for (int i = 0; i < 20; ++i) { + isDriven = (*register_map_)[sys_ctrl_regbank_ + "IO_CONTROL"]["SYNC_OUT_FAULT_ALERT"].read_value() == 1; + MV_HAL_LOG_DEBUG() << "Fault =" << isDriven; + if (isDriven) { + return true; + } + } + return false; +} + +bool Evk2SystemControl::is_trigger_out_enabled() { + bool trig_out_en = (*register_map_)[sys_mon_regbank_ + "EXT_TRIGGERS/OUT_ENABLE"].read_value(); + bool io_pin_en = (*register_map_)[sys_ctrl_regbank_ + "IO_CONTROL"]["SYNC_OUT_MODE"].read_value(); + bool hside_en = (*register_map_)[sys_ctrl_regbank_ + "IO_CONTROL"]["SYNC_OUT_EN_HSIDE"].read_value(); + return trig_out_en && io_pin_en && hside_en; +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/devices/common/evk2_tz_trigger_event.cpp b/hal_psee_plugins/src/devices/common/evk2_tz_trigger_event.cpp new file mode 100644 index 000000000..b99c3152b --- /dev/null +++ b/hal_psee_plugins/src/devices/common/evk2_tz_trigger_event.cpp @@ -0,0 +1,65 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include "devices/common/evk2_tz_trigger_event.h" +#include "utils/register_map.h" + +namespace Metavision { + +Evk2TzTriggerEvent::Evk2TzTriggerEvent(const std::shared_ptr ®ister_map, const std::string &prefix, + const std::shared_ptr tzDev) : + register_map_(register_map), prefix_(prefix), tzDev_(tzDev) { + for (const auto &id : chan_ids_) { + disable(static_cast(id)); + } +} + +bool Evk2TzTriggerEvent::is_valid_id(uint32_t channel) { + for (const auto &id : chan_ids_) { + if (static_cast(id) == channel) { + return true; + } + } + return false; +} + +bool Evk2TzTriggerEvent::enable(uint32_t channel) { + bool valid = is_valid_id(channel); + + if (valid) { + (*register_map_)[prefix_ + "SYSTEM_MONITOR/EXT_TRIGGERS/ENABLE"]["TRIGGER_" + std::to_string(channel)] + .write_value(1); + } + return valid; +} + +bool Evk2TzTriggerEvent::disable(uint32_t channel) { + bool valid = is_valid_id(channel); + + if (valid) { + (*register_map_)[prefix_ + "SYSTEM_MONITOR/EXT_TRIGGERS/ENABLE"]["TRIGGER_" + std::to_string(channel)] + .write_value(0); + } + return valid; +} + +bool Evk2TzTriggerEvent::is_enabled(uint32_t channel) { + bool valid = is_valid_id(channel); + long value = 0; + + if (valid) { + value = (*register_map_)[prefix_ + "SYSTEM_MONITOR/EXT_TRIGGERS/ENABLE"]["TRIGGER_" + std::to_string(channel)] + .read_value(); + } + return valid && (value == 1); +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/devices/common/evk2_tz_trigger_out.cpp b/hal_psee_plugins/src/devices/common/evk2_tz_trigger_out.cpp new file mode 100644 index 000000000..48e81e282 --- /dev/null +++ b/hal_psee_plugins/src/devices/common/evk2_tz_trigger_out.cpp @@ -0,0 +1,86 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include + +#include "devices/common/evk2_tz_trigger_out.h" +#include "metavision/hal/facilities/i_trigger_out.h" +#include "devices/treuzell/tz_psee_video.h" +#include "utils/register_map.h" +#include "metavision/hal/utils/hal_log.h" + +namespace Metavision { + +Evk2TzTriggerOut::Evk2TzTriggerOut(const std::shared_ptr ®map, const std::string &prefix, + const std::shared_ptr tzDev) : + register_map_(regmap), prefix_(prefix), tz_dev_(tzDev) { + disable(); +} + +Evk2TzTriggerOut::~Evk2TzTriggerOut() { + disable(); +} + +bool Evk2TzTriggerOut::enable() { + if (tz_dev_->get_mode() == I_DeviceControl::SyncMode::MASTER) { + MV_HAL_LOG_WARNING() << "Master sync mode is enabled. Cannot enable trigger out."; + return false; + } + + (*register_map_)[prefix_ + "SYSTEM_CONTROL/IO_CONTROL"]["SYNC_OUT_MODE"].write_value(1); + (*register_map_)[prefix_ + "SYSTEM_CONTROL/IO_CONTROL"]["SYNC_OUT_EN_HSIDE"].write_value(1); + (*register_map_)[prefix_ + "SYSTEM_MONITOR/EXT_TRIGGERS/OUT_ENABLE"]["VALUE"].write_value(1); + return true; +} + +void Evk2TzTriggerOut::disable() { + (*register_map_)[prefix_ + "SYSTEM_MONITOR/EXT_TRIGGERS/OUT_ENABLE"]["VALUE"].write_value(0); + + if (tz_dev_->get_mode() != I_DeviceControl::SyncMode::MASTER) { + (*register_map_)[prefix_ + "SYSTEM_CONTROL/IO_CONTROL"]["SYNC_OUT_MODE"].write_value(0); + (*register_map_)[prefix_ + "SYSTEM_CONTROL/IO_CONTROL"]["SYNC_OUT_EN_HSIDE"].write_value(0); + } else { + MV_HAL_LOG_DEBUG() << "Master sync mode is enabled. SYNC_OUT_MODE/EN_HSIDE config will not be changed."; + } +} + +void Evk2TzTriggerOut::set_duty_cycle(double period_ratio) { + /* + * Convert the ratio (between 0 and 1) to a signal duration + * -> if ratio is 0.5 i.e. 50%, then the pulse will last 50% of the pulse period + * -> example: + * pulse period is 1000us + * duty cycle is 0.5 + * Then the signal will last 500us every 1000 us. + */ + + period_ratio_ = std::min(1., std::max(0., period_ratio)); + const auto signal_period_us = + (*register_map_)[prefix_ + "SYSTEM_MONITOR/EXT_TRIGGERS/OUT_PULSE_PERIOD"].read_value(); + + (*register_map_)[prefix_ + "SYSTEM_MONITOR/EXT_TRIGGERS/OUT_PULSE_WIDTH"].write_value(signal_period_us * + period_ratio_); +} + +void Evk2TzTriggerOut::set_period(uint32_t signal_period_us) { + (*register_map_)[prefix_ + "SYSTEM_MONITOR/EXT_TRIGGERS/OUT_PULSE_PERIOD"].write_value(signal_period_us); + /* reapply duty cycle in order to update pulse width */ + set_duty_cycle(period_ratio_); +} + +bool Evk2TzTriggerOut::is_enabled() { + bool sync_out = (*register_map_)[prefix_ + "SYSTEM_CONTROL/IO_CONTROL"]["SYNC_OUT_MODE"].read_value(); + bool hside_en = (*register_map_)[prefix_ + "SYSTEM_CONTROL/IO_CONTROL"]["SYNC_OUT_EN_HSIDE"].read_value(); + bool out_en = (*register_map_)[prefix_ + "SYSTEM_MONITOR/EXT_TRIGGERS/OUT_ENABLE"].read_value(); + return out_en && sync_out && hside_en; +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/devices/common/system_control.cpp b/hal_psee_plugins/src/devices/common/system_control.cpp new file mode 100644 index 000000000..372ecc68c --- /dev/null +++ b/hal_psee_plugins/src/devices/common/system_control.cpp @@ -0,0 +1,211 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include + +#include "devices/common/system_control.h" +#include "utils/register_map.h" + +using vfield = std::map; + +namespace Metavision { + +SystemControl::SystemControl(const std::shared_ptr ®map, const std::string &prefix) : + prefix_(prefix), register_map_(regmap) {} + +bool SystemControl::apply_resets() { + (*register_map_)[prefix_ + "CLK_CONTROL"].write_value(vfield{{"CORE_SOFT_RST", 1}, + {"CORE_REG_BANK_RST", 1}, + {"SENSOR_IF_SOFT_RST", 1}, + {"SENSOR_IF_REG_BANK_RST", 1}, + {"HOST_IF_SOFT_RST", 1}, + {"HOST_IF_REG_BANK_RST", 1}}); + + (*register_map_)[prefix_ + "CLK_CONTROL"]["GLOBAL_RST"].write_value(1); + + return (*register_map_)[prefix_ + "CLK_CONTROL"].read_value() == 0; +} + +SystemControl::~SystemControl() {} + +void SystemControl::set_evt_format(uint32_t fmt) { + (*register_map_)[prefix_ + "GLOBAL_CONTROL"]["FORMAT"].write_value(fmt); +} + +void SystemControl::clk_control(bool enable) { + (*register_map_)[prefix_ + "CLK_CONTROL"].write_value( + vfield{{"CORE_EN", enable}, {"SENSOR_IF_EN", enable}, {"HOST_IF_EN", enable}}); +} + +void SystemControl::time_base_config(bool ext_sync, bool master, bool master_sel, bool fwd_up, bool fwd_down) { + /*Control the time base and synchronization settings. + + ---------------- + Time-base config + ---------------- + Internal mode: ext_sync_mode_i = 0 + - Enable with only enable_i + + External mode: ext_sync_mode_i = 1 + - Enable with enable_i and ext_sync_enable_i + - Sync source is sync_in when ext_sync_master_i = 0 + - Sync source is internal when ext_sync_master_i = 1 + + Output internal sync signal on sync_out when ext_sync_mode_i = '1' and ext_sync_master_i = '1' + + --------------------- + Sync in/out selection + --------------------- + When enable_cam_sync = 0: + - ext0_sync_o = 0 + When enable_cam_sync = 1: + - ext0_sync_o = ext1_sync_i when ext_sync_master = 0 + - ext0_sync_o = int_sync_i when ext_sync_master = 1 + + When enable_ext_sync = 0: + - ext1_sync_o = 0 + When enable_ext_sync = 1: + - ext1_sync_o = ext0_sync_i when ext_sync_master = 0 + - ext1_sync_o = int_sync_i when ext_sync_master = 1 + + int_sync_o = ext0_sync_i when ext_sync_master_sel = 0 + int_sync_o = ext1_sync_i when ext_sync_master_sel = 1 + + ----------------------------------- + Sync in/out mapping for CCam3/CCam5 + ----------------------------------- + ext0 = moorea + ext1 = FPGA sync_in/out header + int = Internal timebase + + ext0_sync_i = moorea_sync_out + ext0_sync_o = moorea_sync_in + ext1_sync_i = FPGA sync_in + ext1_sync_o = FPGA sync_out + int_sync_i = Internal sync_out + int_sync_o = Internal sync_in + + If enable_cam_sync = 1 + moorea_sync_in = FPGA sync_in (ext_sync_master = 0) + moorea_sync_in = Internal sync_out (ext_sync_master = 1) + + If enable_ext_sync = 1 + FPGA sync_out = moorea_sync_out (ext_sync_master = 0) + FPGA sync_out = Internal sync_out (ext_sync_master = 1) + + Internal sync_in = moorea_sync_out (ext_sync_master_sel = 0) + Internal sync_in = FPGA sync_in (ext_sync_master_sel = 1) + */ + + (*register_map_)[prefix_ + "TIME_BASE_CONTROL"].write_value(vfield{{"ENABLE", 0}, + {"EXT_SYNC_MODE", ext_sync}, + {"EXT_SYNC_ENABLE", ext_sync}, + {"EXT_SYNC_MASTER", master}, + {"EXT_SYNC_MASTER_SEL", master_sel}, + {"ENABLE_EXT_SYNC", fwd_up}, + {"ENABLE_CAM_SYNC", fwd_down}}); +} + +void SystemControl::time_base_control(bool enable) { + /*Enable the time base. + + Args: + enable (bool): Time base state + */ + (*register_map_)[prefix_ + "TIME_BASE_CONTROL"]["ENABLE"].write_value(enable); +} + +void SystemControl::merge_config(bool bypass, int source) { + /*Merge Config + + Args: + bypass (bool): Bypasses the event merge + source (int) : '0' pattern/sensor event stream, + '1' monitoring event stream + */ + + (*register_map_)[prefix_ + "EVT_MERGE_CONTROL"].write_value(vfield{{"BYPASS", bypass}, {"SOURCE", source}}); +} + +void SystemControl::merge_control(bool enable) { + /*Merge Control + + Arg: + enable (bool): Enable merge block to process events + */ + (*register_map_)[prefix_ + "EVT_MERGE_CONTROL"]["ENABLE"].write_value(enable); +} + +void SystemControl::th_recovery_config(bool bypass) { + /*TH Recovery Config. + + Args: + bypass (bool): Bypasses TH Recovery logic + */ + (*register_map_)[prefix_ + "TH_RECOVERY_CONTROL"]["BYPASS"].write_value(bypass); +} + +void SystemControl::th_recovery_control(bool enable) { + /*TH Recovery Control. + + Args: + enable (bool): Enable TH Recovery logic + */ + (*register_map_)[prefix_ + "TH_RECOVERY_CONTROL"]["ENABLE"].write_value(enable); +} + +void SystemControl::data_formatter_config(bool bypass) { + /*Event Data Formatter Config. + + Args: + bypass (int, optional): Bypasses the event data formatter + */ + (*register_map_)[prefix_ + "EVT_DATA_FORMATTER_CONTROL"]["BYPASS"].write_value(bypass); +} + +void SystemControl::data_formatter_control(bool enable) { + /*Event Data Formatter Control. + + Args: + enable (bool) : Enable Data Formatter logic + */ + (*register_map_)[prefix_ + "EVT_DATA_FORMATTER_CONTROL"]["ENABLE"].write_value(enable); +} + +void SystemControl::set_mode(int mode) { + /*Set the system mode: Init, Master or Slave. + + Args: + mode (int, optional): System mode + */ + (*register_map_)[prefix_ + "GLOBAL_CONTROL"]["MODE"].write_value(mode); +} + +void SystemControl::sync_out_pin_control(bool trig_out_override) { + // Override sync out pin to output trigger out pulse instead + (*register_map_)[prefix_ + "TIME_BASE_CONTROL"]["EXT_SYNC_OUT_TRIGGER_MODE"].write_value(trig_out_override); +} + +void SystemControl::oob_filter_control(bool enable) { + (*register_map_)[prefix_ + "OOB_FILTER_CONTROL"]["ENABLE"].write_value(enable); +} + +void SystemControl::oob_filter_origin(int x, int y) { + (*register_map_)[prefix_ + "OOB_FILTER_ORIGIN"]["Y"].write_value(y); + (*register_map_)[prefix_ + "OOB_FILTER_ORIGIN"]["X"].write_value(x); +} + +void SystemControl::oob_filter_size(int width, int height) { + (*register_map_)[prefix_ + "OOB_FILTER_SIZE"]["WIDTH"].write_value(width); + (*register_map_)[prefix_ + "OOB_FILTER_SIZE"]["HEIGHT"].write_value(height); +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/devices/gen3/CMakeLists.txt b/hal_psee_plugins/src/devices/gen3/CMakeLists.txt new file mode 100644 index 000000000..e33d50872 --- /dev/null +++ b/hal_psee_plugins/src/devices/gen3/CMakeLists.txt @@ -0,0 +1,20 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. + +target_sources(metavision_hal_gen3_camera_obj PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/gen3_device_control.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/gen3_fx3_device_control.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/gen3_fx3_facilities_builder.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/gen3_ll_biases.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/gen3_pattern_generator_checker.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/gen3_pattern_generator.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/gen3_roi_command.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/gen3_trigger_event.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/gen3_trigger_out.cpp +) diff --git a/hal_psee_plugins/src/devices/gen3/gen3_device_control.cpp b/hal_psee_plugins/src/devices/gen3/gen3_device_control.cpp new file mode 100644 index 000000000..0801b6143 --- /dev/null +++ b/hal_psee_plugins/src/devices/gen3/gen3_device_control.cpp @@ -0,0 +1,476 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include +#include +#include +#include + +#include "metavision/hal/utils/hal_log.h" +#include "boards/utils/psee_libusb_board_command.h" +#include "facilities/psee_trigger_in.h" +#include "facilities/psee_trigger_out.h" +#include "metavision/hal/facilities/i_events_stream.h" +#include "boards/utils/config_registers_map.h" +#include "devices/gen3/gen3_device_control.h" +#include "devices/gen3/legacy_regmap_headers/legacy/stereo_pc_mapping.h" +#include "devices/gen3/legacy_regmap_headers/tep_register_control_register_map.h" +#include "devices/utils/device_system_id.h" +#include "geometries/vga_geometry.h" +#include "geometries/hvga_geometry.h" +#include "metavision/hal/utils/hal_exception.h" +#include "utils/psee_hal_plugin_error_code.h" + +namespace Metavision { + +uint32_t base_address = CCAM3_SYS_REG_BASE_ADDR; +uint32_t base_sensor_address = CCAM3_SENSOR_IF_BASE_ADDR; + +Gen3DeviceControl::Gen3DeviceControl(const std::shared_ptr &board_cmd) : + PseeDeviceControl(EvtFormat::EVT2_0), + icmd_(board_cmd), + base_address_(CCAM3_SYS_REG_BASE_ADDR), + base_sensor_address_(CCAM3_SENSOR_IF_BASE_ADDR) {} + +void Gen3DeviceControl::destroy_camera() { + enable_LDO0_VDDA(false); + enable_SW_CTRL_BGEN_RSTN(false); + enable_LDO2_VDDD(false); + enable_LDO1_VDDC(false); +} + +void Gen3DeviceControl::initialize_common_0() { + enable_LDO0_VDDA(false); + enable_LDO2_VDDD(false); + enable_LDO1_VDDC(false); +} + +void Gen3DeviceControl::initialize_common_1() { + icmd_->try_to_flush(); + reset_ts_internal(); + set_mode_init(); + + // ---------------------------------------------------------------------------- + // INIT + + enable_LDO1_VDDC(true); // VDDC + enable_LDO2_VDDD(true); // VDDD + enable_SW_CTRL_BGEN_RSTN(true); +} + +void Gen3DeviceControl::start_camera_common_0(bool is_gen3EM) { + // reset_ts(); + set_mode_standalone_impl(); // default synchronization mode + + disable_roi_reset(true); + if (is_gen3EM) { + enable_hvga_bypass(false); + set_oob_filter_bounds(HVGAGeometry::width_, HVGAGeometry::height_); + } else { + enable_hvga_bypass(true); + set_oob_filter_bounds(VGAGeometry::width_, VGAGeometry::height_); + } + + enable_oob_filter(true); + enable_master_reset(false); +} + +void Gen3DeviceControl::start_camera_common_1(bool is_gen3EM) { + enable_stereo_merge_module(true); + enable_ctrl_sync(); + enable_readout(true); + + if (is_gen3EM) { + icmd_->set_register_bit(base_sensor_address_ + SISLEY_SENSOR_READOUT_CTRL_ADDR, + SISLEY_SENSOR_READOUT_CTRL_RO_STAT_X_BIT_IDX, true); + + icmd_->set_register_bit(base_sensor_address_ + SISLEY_SENSOR_READOUT_CTRL_ADDR, + SISLEY_SENSOR_READOUT_CTRL_RO_ACT_PUX_BIT_IDX, true); + icmd_->set_register_bit(base_sensor_address_ + SISLEY_SENSOR_READOUT_CTRL_ADDR, + SISLEY_SENSOR_READOUT_CTRL_RO_ACT_PUX_BIT_IDX + 1, true); + icmd_->set_register_bit(base_sensor_address_ + SISLEY_SENSOR_READOUT_CTRL_ADDR, + SISLEY_SENSOR_READOUT_CTRL_RO_ACT_PUX_BIT_IDX + 2, false); + + icmd_->set_register_bit(base_sensor_address_ + SISLEY_SENSOR_READOUT_CTRL_ADDR, + SISLEY_SENSOR_READOUT_CTRL_RO_ACT_PUY_BIT_IDX, true); + + icmd_->send_register_bit(base_sensor_address_ + SISLEY_SENSOR_READOUT_CTRL_ADDR, + SISLEY_SENSOR_READOUT_CTRL_RO_INV_POL_EM_BIT_IDX, true); // invert EM polarity + } + + // this needs to be done before roi for em as this function initialize the value for the ROI register + enable_roi_TD(true); + + if (is_gen3EM) { + enable_roi_EM(true); + } + + enable_test_bus(); + enable_spare_control(true); +} + +void Gen3DeviceControl::stop_camera_common() { + enable_stereo_merge_module(false); + set_mode_init(); + auto trigger_in = get_trigger_in(false); + if (trigger_in) { + for (uint32_t i = 0; i < 8; ++i) { + trigger_in->disable(i); + } + } +} + +void Gen3DeviceControl::disable_roi_reset(bool state) { + // -------------- Disable ROI reset + MV_HAL_LOG_DEBUG() << "-------------- Disable ROI reset"; + MV_HAL_LOG_DEBUG() << Metavision::Log::no_space << std::hex << std::showbase << std::internal << std::setfill('0') + << base_address_ + SYSTEM_CONTROL_ADDR << std::dec << "\t|\t" + << TEP_ATIS_CONTROL_ROI_TD_RSTN_BIT_IDX << std::dec << " " << (state ? 1 : 0); + icmd_->send_register_bit(base_address_ + SYSTEM_CONTROL_ADDR, TEP_ATIS_CONTROL_ROI_TD_RSTN_BIT_IDX, + state); // Disable ROI reset +} + +void Gen3DeviceControl::enable_hvga_bypass(bool state) { + MV_HAL_LOG_DEBUG() << "-------------- Bypass HVGA remap"; + MV_HAL_LOG_DEBUG() << Metavision::Log::no_space << std::hex << std::showbase << std::internal << std::setfill('0') + << base_address_ + SYSTEM_CONTROL_ADDR << std::dec << "\t|\t" + << TEP_ATIS_CONTROL_SISLEY_HVGA_REMAP_BYPASS_BIT_IDX << std::dec << " " << (state ? 1 : 0); + icmd_->send_register_bit(base_address_ + SYSTEM_CONTROL_ADDR, TEP_ATIS_CONTROL_SISLEY_HVGA_REMAP_BYPASS_BIT_IDX, + state); // Bypass HVGA remap +} + +void Gen3DeviceControl::set_oob_filter_bounds(int width, int height) { + MV_HAL_LOG_DEBUG() << "-------------- Set OOB filter bounds"; + MV_HAL_LOG_DEBUG() << std::hex << std::showbase << std::internal << std::setfill('0') + << CCAM3_OUT_OF_FOV_FILTER_WIDTH_ADDR << "\t|\t" << width << std::dec; + MV_HAL_LOG_DEBUG() << std::hex << std::showbase << std::internal << std::setfill('0') + << CCAM3_OUT_OF_FOV_FILTER_HEIGHT_ADDR << "\t|\t" << height << std::dec; + icmd_->write_register(base_address_ + CCAM3_OUT_OF_FOV_FILTER_WIDTH_ADDR, width); + icmd_->write_register(base_address_ + CCAM3_OUT_OF_FOV_FILTER_HEIGHT_ADDR, height); +} + +void Gen3DeviceControl::enable_oob_filter(bool state) { + MV_HAL_LOG_DEBUG() << "-------------- OOB filter"; + MV_HAL_LOG_DEBUG() << std::hex << std::showbase << std::internal << std::setfill('0') + << base_address_ + CCAM2_CONTROL_ADDR << std::dec << "\t|\t" + << TEP_CCAM2_CONTROL_ENABLE_OUT_OF_FOV_BIT_IDX << std::dec << " " << (state ? 1 : 0); + icmd_->send_register_bit(base_address_ + CCAM2_CONTROL_ADDR, TEP_CCAM2_CONTROL_ENABLE_OUT_OF_FOV_BIT_IDX, state); +} + +void Gen3DeviceControl::enable_master_reset(bool state) { + // -------------- Gen3 deassert master reset + MV_HAL_LOG_DEBUG() << "-------------- Gen3 deassert master reset"; + MV_HAL_LOG_DEBUG() << std::hex << std::showbase << std::internal << std::setfill('0') + << base_address_ + SYSTEM_CONTROL_ADDR << std::dec << "\t|\t" + << TEP_ATIS_CONTROL_SENSOR_SOFT_RESET_BIT_IDX << std::dec << " " << (state ? 1 : 0); + icmd_->send_register_bit(base_address_ + SYSTEM_CONTROL_ADDR, TEP_ATIS_CONTROL_SENSOR_SOFT_RESET_BIT_IDX, + state); // Gen3 deassert master reset +} + +void Gen3DeviceControl::enable_ctrl_sync() { + // CONTROL SYNC + uint32_t clksync_ctrl = 0x0; + clksync_ctrl |= (1 << SISLEY_SENSOR_CLKSYNC_CTRL_CLKOUT_EN_BIT_IDX); + clksync_ctrl |= (1 << SISLEY_SENSOR_CLKSYNC_CTRL_CLK_DIFF_HI_CM_BIT_IDX); + clksync_ctrl |= (1 << SISLEY_SENSOR_CLKSYNC_CTRL_CLK_DIFF_IOUT_X2_BIT_IDX); + // clksync_ctrl |= (1 << SISLEY_SENSOR_CLKSYNC_CTRL_CLK_POLARITY_BIT_IDX); + clksync_ctrl |= (0x7 << SISLEY_SENSOR_CLKSYNC_CTRL_RO_TD_REQ_LAT_BIT_IDX); /// setting 3 bits + + MV_HAL_LOG_DEBUG() << "----------------------------------------------------------------------------"; + MV_HAL_LOG_DEBUG() << "CONTROL SYNC"; + MV_HAL_LOG_DEBUG() << std::hex << std::showbase << std::internal << std::setfill('0') + << base_sensor_address_ + SISLEY_SENSOR_CLKSYNC_CTRL_ADDR << "\t|\t" << clksync_ctrl << std::dec; + icmd_->write_register(base_sensor_address_ + SISLEY_SENSOR_CLKSYNC_CTRL_ADDR, clksync_ctrl); +} + +void Gen3DeviceControl::enable_readout(bool state) { + // ---------------------------------------------------------------------------- + // READOUT + icmd_->init_register(base_sensor_address_ + SISLEY_SENSOR_READOUT_CTRL_ADDR, 0x0); + icmd_->set_register_bit(base_sensor_address_ + SISLEY_SENSOR_READOUT_CTRL_ADDR, + SISLEY_SENSOR_READOUT_CTRL_RO_DELAY_RSTN_BIT_IDX, state); + icmd_->set_register_bit(base_sensor_address_ + SISLEY_SENSOR_READOUT_CTRL_ADDR, + SISLEY_SENSOR_READOUT_CTRL_RO_INTERFACE_X_RSTN_BIT_IDX, state); + icmd_->set_register_bit(base_sensor_address_ + SISLEY_SENSOR_READOUT_CTRL_ADDR, + SISLEY_SENSOR_READOUT_CTRL_RO_LATCH_Y_RSTN_BIT_IDX, state); + icmd_->set_register_bit(base_sensor_address_ + SISLEY_SENSOR_READOUT_CTRL_ADDR, + SISLEY_SENSOR_READOUT_CTRL_RO_ACK_ARRAY_RSTN_BIT_IDX, state); + icmd_->set_register_bit(base_sensor_address_ + SISLEY_SENSOR_READOUT_CTRL_ADDR, + SISLEY_SENSOR_READOUT_CTRL_RO_CTRL_RSTN_BIT_IDX, state); + icmd_->set_register_bit(base_sensor_address_ + SISLEY_SENSOR_READOUT_CTRL_ADDR, + SISLEY_SENSOR_READOUT_CTRL_RO_LATCH_DUM_CONNECT_BIT_IDX, state); + icmd_->set_register_bit(base_sensor_address_ + SISLEY_SENSOR_READOUT_CTRL_ADDR, + SISLEY_SENSOR_READOUT_CTRL_RO_LATCH_DUM_RSTN_BIT_IDX, state); + icmd_->set_register_bit(base_sensor_address_ + SISLEY_SENSOR_READOUT_CTRL_ADDR, + SISLEY_SENSOR_READOUT_CTRL_RO_PIXEL_DUM_RSTN_BIT_IDX, state); + icmd_->set_register_bit(base_sensor_address_ + SISLEY_SENSOR_READOUT_CTRL_ADDR, + SISLEY_SENSOR_READOUT_CTRL_RO_INTERFACE_Y_RSTN_BIT_IDX, state); + icmd_->set_register_bit(base_sensor_address_ + SISLEY_SENSOR_READOUT_CTRL_ADDR, + SISLEY_SENSOR_READOUT_CTRL_RO_LATCH_X_RSTN_BIT_IDX, state); + + uint32_t readout_ctrl = icmd_->read_register(base_sensor_address_ + SISLEY_SENSOR_READOUT_CTRL_ADDR); + MV_HAL_LOG_DEBUG() << "----------------------------------------------------------------------------"; + MV_HAL_LOG_DEBUG() << "READOUT"; + MV_HAL_LOG_DEBUG() << std::hex << std::showbase << std::internal << std::setfill('0') + << base_sensor_address_ + SISLEY_SENSOR_READOUT_CTRL_ADDR << "\t|\t" << readout_ctrl << std::dec; + + icmd_->send_register(base_sensor_address_ + SISLEY_SENSOR_READOUT_CTRL_ADDR); +} + +void Gen3DeviceControl::enable_roi_TD(bool state) { + // ---------------------------------------------------------------------------- + // ROI + // -- Enable TD ROi + icmd_->init_register(base_sensor_address_ + SISLEY_SENSOR_ROI_CTRL_ADDR, SISLEY_SENSOR_ROI_CTRL); + icmd_->set_register_bit(base_sensor_address_ + SISLEY_SENSOR_ROI_CTRL_ADDR, + SISLEY_SENSOR_ROI_CTRL_ROI_TD_EN_BIT_IDX, state); + icmd_->set_register_bit(base_sensor_address_ + SISLEY_SENSOR_ROI_CTRL_ADDR, + SISLEY_SENSOR_ROI_CTRL_ROI_TD_SHADOW_TRIG_BIT_IDX, state); + uint32_t enable_roi = icmd_->read_register(base_sensor_address_ + SISLEY_SENSOR_ROI_CTRL_ADDR); + MV_HAL_LOG_DEBUG() << "----------------------------------------------------------------------------"; + MV_HAL_LOG_DEBUG() << "ROI"; + MV_HAL_LOG_DEBUG() << std::hex << std::showbase << std::internal << std::setfill('0') + << base_sensor_address_ + SISLEY_SENSOR_ROI_CTRL_ADDR << "\t|\t" << enable_roi << std::dec; + icmd_->send_register(base_sensor_address_ + SISLEY_SENSOR_ROI_CTRL_ADDR); +} +void Gen3DeviceControl::enable_roi_EM(bool state) { + // ---------------------------------------------------------------------------- + // ROI EM + // -- Enable EM ROI + icmd_->set_register_bit(base_sensor_address_ + SISLEY_SENSOR_ROI_CTRL_ADDR, + SISLEY_SENSOR_ROI_CTRL_ROI_EM_EN_BIT_IDX, state); + icmd_->set_register_bit(base_sensor_address_ + SISLEY_SENSOR_ROI_CTRL_ADDR, + SISLEY_SENSOR_ROI_CTRL_ROI_EM_SHADOW_TRIG_BIT_IDX, state); + + uint32_t enable_roi = icmd_->read_register(base_sensor_address_ + SISLEY_SENSOR_ROI_CTRL_ADDR); + MV_HAL_LOG_DEBUG() << "----------------------------------------------------------------------------"; + MV_HAL_LOG_DEBUG() << "ROI EM"; + MV_HAL_LOG_DEBUG() << std::hex << std::showbase << std::internal << std::setfill('0') + << base_sensor_address_ + SISLEY_SENSOR_ROI_CTRL_ADDR << "\t|\t" << enable_roi << std::dec; + icmd_->send_register(base_sensor_address_ + SISLEY_SENSOR_ROI_CTRL_ADDR); +} + +void Gen3DeviceControl::enable_test_bus() { + // ---------------------------------------------------------------------------- + // TEST BUS + icmd_->init_register(base_sensor_address_ + SISLEY_SENSOR_TESTBUS_CTRL_ADDR, SISLEY_SENSOR_TESTBUS_CTRL); + icmd_->set_register_bit(base_sensor_address_ + SISLEY_SENSOR_TESTBUS_CTRL_ADDR, + SISLEY_SENSOR_TESTBUS_CTRL_TP_SEL_TEST_PHOTODIODE_BIT_IDX, 1); + icmd_->set_register_bit(base_sensor_address_ + SISLEY_SENSOR_TESTBUS_CTRL_ADDR, + SISLEY_SENSOR_TESTBUS_CTRL_TP_PIXEL_EN_BIT_IDX, 1); + icmd_->set_register_bit(base_sensor_address_ + SISLEY_SENSOR_TESTBUS_CTRL_ADDR, + SISLEY_SENSOR_TESTBUS_CTRL_TBUS_SEL_TPA1_BIT_IDX, 1); + icmd_->set_register_bit(base_sensor_address_ + SISLEY_SENSOR_TESTBUS_CTRL_ADDR, + SISLEY_SENSOR_TESTBUS_CTRL_TBUS_SEL_TPA2_BIT_IDX, 1); + icmd_->set_register_bit(base_sensor_address_ + SISLEY_SENSOR_TESTBUS_CTRL_ADDR, + SISLEY_SENSOR_TESTBUS_CTRL_TBUS_SEL_TPA3_BIT_IDX, 1); + icmd_->set_register_bit(base_sensor_address_ + SISLEY_SENSOR_TESTBUS_CTRL_ADDR, + SISLEY_SENSOR_TESTBUS_CTRL_TBUS_SEL_TPA4_BIT_IDX, 1); + + icmd_->set_register_bit(base_sensor_address_ + SISLEY_SENSOR_TESTBUS_CTRL_ADDR, + SISLEY_SENSOR_TESTBUS_CTRL_TP_PIXEL_DIODE_EN_BIT_IDX, 0); + uint32_t testbus_ctrl = icmd_->read_register(base_sensor_address_ + SISLEY_SENSOR_TESTBUS_CTRL_ADDR); + MV_HAL_LOG_DEBUG() << "----------------------------------------------------------------------------"; + MV_HAL_LOG_DEBUG() << "TEST BUS" << std::endl; + MV_HAL_LOG_DEBUG() << std::hex << std::showbase << std::internal << std::setfill('0') + << base_sensor_address_ + SISLEY_SENSOR_TESTBUS_CTRL_ADDR << "\t|\t" << testbus_ctrl << std::dec; + icmd_->send_register(base_sensor_address_ + SISLEY_SENSOR_TESTBUS_CTRL_ADDR); +} + +void Gen3DeviceControl::enable_spare_control(bool state) { + // ---------------------------------------------------------------------------- + // SPARE CTRL + icmd_->init_register(base_sensor_address_ + SISLEY_SENSOR_SPARE_CTRL_ADDR, SISLEY_SENSOR_SPARE_CTRL); + icmd_->set_register_bit(base_address_ + SISLEY_SENSOR_SPARE_CTRL_ADDR, + SISLEY_SENSOR_SPARE_CTRL_RO_ADDR_Y_STAT_BIT_IDX, state); + icmd_->set_register_bit(base_address_ + SISLEY_SENSOR_SPARE_CTRL_ADDR, + SISLEY_SENSOR_SPARE_CTRL_RO_ADDR_X_STAT_BIT_IDX, state); + icmd_->set_register_bit(base_address_ + SISLEY_SENSOR_SPARE_CTRL_ADDR, SISLEY_SENSOR_SPARE_CTRL_B_TM_BIT_IDX, + state); + uint32_t spare_ctrl = icmd_->read_register(base_address_ + SISLEY_SENSOR_SPARE_CTRL_ADDR); + MV_HAL_LOG_DEBUG() << "----------------------------------------------------------------------------"; + MV_HAL_LOG_DEBUG() << "SPARE CTRL"; + MV_HAL_LOG_DEBUG() << std::hex << std::showbase << std::internal << std::setfill('0') + << base_sensor_address_ + SISLEY_SENSOR_SPARE_CTRL_ADDR << "\t|\t" << spare_ctrl << std::dec; + icmd_->send_register(base_sensor_address_ + SISLEY_SENSOR_SPARE_CTRL_ADDR); +} + +void Gen3DeviceControl::low_consumption_startup_post_biases_initialize() { + enable_LDO0_VDDA(true); // TO do after biases and before start +} + +void Gen3DeviceControl::enable_stereo_merge_module(bool state) { + // -------------- Disable Stereo Merge module + MV_HAL_LOG_DEBUG() << "-------------- Disable Stereo Merge module"; + MV_HAL_LOG_DEBUG() << std::hex << std::showbase << std::internal << std::setfill('0') + << base_address_ + CCAM2_CONTROL_ADDR << std::dec << "\t|\t" + << TEP_CCAM2_CONTROL_STEREO_MERGE_ENABLE_BIT_IDX << std::dec << " " << (state ? 1 : 0); + icmd_->send_register_bit(base_address_ + CCAM2_CONTROL_ADDR, TEP_CCAM2_CONTROL_STEREO_MERGE_ENABLE_BIT_IDX, + state); // Enable Stereo Merge module +} + +void Gen3DeviceControl::set_mode_init() { + icmd_->set_register_bit(base_address_ + TEP_CCAM2_MODE_ADDR, TEP_CCAM2_MODE_MODE_BIT_IDX, + TEP_CCAM2_CONTROL_MODE_INIT & 1); + icmd_->set_register_bit(base_address_ + TEP_CCAM2_MODE_ADDR, TEP_CCAM2_MODE_MODE_BIT_IDX + 1, + (TEP_CCAM2_CONTROL_MODE_INIT >> 1) & 1); + icmd_->send_register(base_address_ + TEP_CCAM2_MODE_ADDR); +} + +void Gen3DeviceControl::set_mode_run_slave() { + icmd_->set_register_bit(base_address_ + TEP_CCAM2_MODE_ADDR, TEP_CCAM2_MODE_MODE_BIT_IDX, + TEP_CCAM2_CONTROL_MODE_SLAVE & 1); + icmd_->set_register_bit(base_address_ + TEP_CCAM2_MODE_ADDR, TEP_CCAM2_MODE_MODE_BIT_IDX + 1, + (TEP_CCAM2_CONTROL_MODE_SLAVE >> 1) & 1); + icmd_->send_register(base_address_ + TEP_CCAM2_MODE_ADDR); +} + +void Gen3DeviceControl::enable_LDO0_VDDA(bool enable) { + // -------------- ENABLE/DISABLE LDO 0 + MV_HAL_LOG_DEBUG() << (enable ? "-------------- ENABLE LDO 0" : "-------------- DISABLE LDO 0"); + MV_HAL_LOG_DEBUG() << std::hex << std::showbase << std::internal << std::setfill('0') + << base_address_ + SYSTEM_CONTROL_ADDR << std::dec << "\t|\t" << TEP_ATIS_CONTROL_EN_VDDA_BIT_IDX + << " " << (enable ? 1 : 0); + icmd_->send_register_bit(base_address_ + SYSTEM_CONTROL_ADDR, TEP_ATIS_CONTROL_EN_VDDA_BIT_IDX, + enable ? 1 : 0); // Enable LDO 0 +} + +void Gen3DeviceControl::enable_LDO1_VDDC(bool enable) { + // -------------- ENABLE/DISABLE LDO 1 + MV_HAL_LOG_DEBUG() << (enable ? "-------------- ENABLE LDO 1" : "-------------- DISABLE LDO 1"); + MV_HAL_LOG_DEBUG() << std::hex << std::showbase << std::internal << std::setfill('0') + << base_address_ + SYSTEM_CONTROL_ADDR << std::dec << "\t|\t" << TEP_ATIS_CONTROL_EN_VDDC_BIT_IDX + << std::dec << " " << (enable ? 1 : 0); + icmd_->send_register_bit(base_address_ + SYSTEM_CONTROL_ADDR, TEP_ATIS_CONTROL_EN_VDDC_BIT_IDX, + enable ? 1 : 0); // Enable LDO 1 +} +void Gen3DeviceControl::enable_LDO2_VDDD(bool enable) { + // -------------- ENABLE/DISABLE LDO 2 + MV_HAL_LOG_DEBUG() << (enable ? "-------------- ENABLE LDO 2" : "-------------- DISABLE LDO 2"); + MV_HAL_LOG_DEBUG() << std::hex << std::showbase << std::internal << std::setfill('0') + << base_address_ + SYSTEM_CONTROL_ADDR << std::dec << "\t|\t" << TEP_ATIS_CONTROL_EN_VDDD_BIT_IDX + << std::dec << " " << (enable ? 1 : 0); + icmd_->send_register_bit(base_address_ + SYSTEM_CONTROL_ADDR, TEP_ATIS_CONTROL_EN_VDDD_BIT_IDX, + enable ? 1 : 0); // Enable LDO 2 +} + +void Gen3DeviceControl::set_CTRL_SW_bit(bool enable) { + // -------------- Enable analog + MV_HAL_LOG_DEBUG() << (enable ? "-------------- Enable analog" : "-------------- Disable analog"); + MV_HAL_LOG_DEBUG() << std::hex << std::showbase << std::internal << std::setfill('0') + << base_sensor_address_ + SISLEY_SENSOR_GLOBAL_CTRL_ADDR << "\t|\t" + << SISLEY_SENSOR_GLOBAL_CTRL_SW_GLOBAL_EN_BIT_IDX << std::dec << " " << (enable ? 1 : 0); + icmd_->set_register_bit(base_sensor_address_ + SISLEY_SENSOR_GLOBAL_CTRL_ADDR, + SISLEY_SENSOR_GLOBAL_CTRL_SW_GLOBAL_EN_BIT_IDX, + enable); // Enable analog +} + +void Gen3DeviceControl::set_CTRL_BGEN_bit(bool enable) { + MV_HAL_LOG_DEBUG() << (enable ? "-------------- Enable Ctrl Bgen" : "-------------- Disable Ctrl Bgen"); + MV_HAL_LOG_DEBUG() << std::hex << std::showbase << std::internal << std::setfill('0') + << base_sensor_address_ + SISLEY_SENSOR_GLOBAL_CTRL_ADDR << "\t|\t" + << SISLEY_SENSOR_GLOBAL_CTRL_BGEN_EN_BIT_IDX << std::dec << " " << (enable ? 1 : 0); + icmd_->set_register_bit(base_sensor_address_ + SISLEY_SENSOR_GLOBAL_CTRL_ADDR, + SISLEY_SENSOR_GLOBAL_CTRL_BGEN_EN_BIT_IDX, enable); + + std::this_thread::sleep_for(std::chrono::microseconds(1000)); +} + +void Gen3DeviceControl::set_CTRL_BGEN_RSTN_bit(bool enable) { + MV_HAL_LOG_DEBUG() << (enable ? "-------------- Enable Bgen RSTN" : "-------------- Disable Bgen RSTN"); + MV_HAL_LOG_DEBUG() << std::hex << std::showbase << std::internal << std::setfill('0') + << base_sensor_address_ + SISLEY_SENSOR_GLOBAL_CTRL_ADDR << "\t|\t" + << SISLEY_SENSOR_GLOBAL_CTRL_BGEN_RSTN_BIT_IDX << std::dec << " " << (enable ? 1 : 0); + icmd_->set_register_bit(base_sensor_address_ + SISLEY_SENSOR_GLOBAL_CTRL_ADDR, + SISLEY_SENSOR_GLOBAL_CTRL_BGEN_RSTN_BIT_IDX, enable); +} + +void Gen3DeviceControl::enable_SW_CTRL_BGEN_RSTN(bool enable) { + set_CTRL_SW_bit(enable); + set_CTRL_BGEN_bit(enable); + set_CTRL_BGEN_RSTN_bit(enable); + icmd_->send_register(base_sensor_address_ + SISLEY_SENSOR_GLOBAL_CTRL_ADDR); +} + +void Gen3DeviceControl::reset() {} + +void Gen3DeviceControl::reset_ts_internal() { + // -------------- SOFT RESET + int bit_value = 1; + MV_HAL_LOG_DEBUG() << "-------------- SOFT RESET"; + MV_HAL_LOG_DEBUG() << std::hex << std::showbase << std::internal << std::setfill('0') + << base_address_ + TEP_TRIGGERS_ADDR << std::dec << "\t|\t" << TEP_TRIGGER_SOFT_RESET_BIT_IDX + << std::dec << " " << bit_value; + + icmd_->send_register_bit(base_address_ + TEP_TRIGGERS_ADDR, TEP_TRIGGER_SOFT_RESET_BIT_IDX, + bit_value); // Soft reset the system +} + +long long Gen3DeviceControl::get_sensor_id() { + icmd_->load_register(base_sensor_address_ + SISLEY_SENSOR_CHIP_ID_ADDR); + return icmd_->read_register(base_sensor_address_ + SISLEY_SENSOR_CHIP_ID_ADDR); +} + +long long Gen3DeviceControl::get_sensor_id(PseeLibUSBBoardCommand &board_cmd) { + board_cmd.load_register(base_sensor_address + SISLEY_SENSOR_CHIP_ID_ADDR); + return board_cmd.read_register(base_sensor_address + SISLEY_SENSOR_CHIP_ID_ADDR); +} + +bool Gen3DeviceControl::is_gen3EM() { + long sensor_id = get_sensor_id(); + return is_gen3EM(sensor_id); +} + +bool Gen3DeviceControl::is_gen3EM(long sensor_id) { + return device_is_gen3_EM(sensor_id); +} + +bool Gen3DeviceControl::is_gen3EM(PseeLibUSBBoardCommand &board_cmd) { + board_cmd.load_register(base_sensor_address + SISLEY_SENSOR_CHIP_ID_ADDR); + auto sensor_id = board_cmd.read_register(base_sensor_address + SISLEY_SENSOR_CHIP_ID_ADDR); + return device_is_gen3_EM(sensor_id); +} + +uint32_t Gen3DeviceControl::get_base_address() { + return base_address_; +} + +bool Gen3DeviceControl::set_mode_master_impl() { + if (get_trigger_out()->is_enabled()) { + return false; + } + icmd_->send_register_bit(get_base_address() + CCAM2_SYSTEM_CONTROL_ATIS_CONTROL_ADDR, + CCAM2_SYSTEM_CONTROL_ATIS_CONTROL_MASTER_MODE_BIT_IDX, true); + icmd_->send_register_bit(get_base_address() + CCAM2_SYSTEM_CONTROL_ATIS_CONTROL_ADDR, + CCAM2_SYSTEM_CONTROL_ATIS_CONTROL_USE_EXT_START_BIT_IDX, true); + return true; +} + +bool Gen3DeviceControl::set_mode_slave_impl() { + if (get_trigger_in()->is_enabled(7)) { + return false; + } + icmd_->send_register_bit(get_base_address() + CCAM2_SYSTEM_CONTROL_ATIS_CONTROL_ADDR, + CCAM2_SYSTEM_CONTROL_ATIS_CONTROL_MASTER_MODE_BIT_IDX, false); + icmd_->send_register_bit(get_base_address() + CCAM2_SYSTEM_CONTROL_ATIS_CONTROL_ADDR, + CCAM2_SYSTEM_CONTROL_ATIS_CONTROL_USE_EXT_START_BIT_IDX, true); + return true; +} + +bool Gen3DeviceControl::set_mode_standalone_impl() { + icmd_->send_register_bit(get_base_address() + CCAM2_SYSTEM_CONTROL_ATIS_CONTROL_ADDR, + CCAM2_SYSTEM_CONTROL_ATIS_CONTROL_MASTER_MODE_BIT_IDX, true); + icmd_->send_register_bit(get_base_address() + CCAM2_SYSTEM_CONTROL_ATIS_CONTROL_ADDR, + CCAM2_SYSTEM_CONTROL_ATIS_CONTROL_USE_EXT_START_BIT_IDX, false); + return true; +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/devices/gen3/gen3_fx3_device_control.cpp b/hal_psee_plugins/src/devices/gen3/gen3_fx3_device_control.cpp new file mode 100644 index 000000000..322b50791 --- /dev/null +++ b/hal_psee_plugins/src/devices/gen3/gen3_fx3_device_control.cpp @@ -0,0 +1,78 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include + +#include "metavision/hal/utils/hal_log.h" +#include "boards/utils/psee_libusb_board_command.h" +#include "devices/gen3/legacy_regmap_headers/tep_register_control_register_map.h" +#include "devices/gen3/legacy_regmap_headers/legacy/stereo_pc_mapping.h" +#include "devices/gen3/gen3_fx3_device_control.h" + +namespace Metavision { + +Gen3Fx3DeviceControl::Gen3Fx3DeviceControl(const std::shared_ptr &board_cmd) : + Gen3DeviceControl(board_cmd) {} + +void Gen3Fx3DeviceControl::enable_interface(bool state) { + MV_HAL_LOG_DEBUG() << "-------------- Disable FX3 interface"; + MV_HAL_LOG_DEBUG() << Metavision::Log::no_space << std::hex << std::showbase << std::internal << std::setfill('0') + << get_base_address() + CCAM2_CONTROL_ADDR << std::dec << "\t|\t" + << TEP_CCAM2_CONTROL_HOST_IF_ENABLE_BIT_IDX << std::dec << " " << (state ? 1 : 0); + icmd_->send_register_bit(get_base_address() + CCAM2_CONTROL_ADDR, TEP_CCAM2_CONTROL_HOST_IF_ENABLE_BIT_IDX, + state); // Enable FX3 interface +} + +void Gen3Fx3DeviceControl::start_impl() { + bool gen3EM = is_gen3EM(); + start_camera_common_0(gen3EM); + enable_interface(true); + + start_camera_common_1(gen3EM); +#ifdef __ANDROID__ + icmd_->write_register(get_base_address() + CCAM3_FX3_HOST_IF_PKT_END_ENABLE_ADDR, 0x0); +#endif +} + +void Gen3Fx3DeviceControl::stop_impl() { + enable_interface(false); + stop_camera_common(); +} + +void Gen3Fx3DeviceControl::initialize() { + Gen3DeviceControl::initialize(); + initialize_common_0(); + stop_impl(); + initialize_common_1(); +} + +void Gen3Fx3DeviceControl::destroy() { + destroy_camera(); + Gen3DeviceControl::destroy(); +} + +bool Gen3Fx3DeviceControl::set_evt_format_impl(EvtFormat fmt) { + return false; +} + +void Gen3Fx3DeviceControl::reset_ts_internal() { + // Performs a hard reset (via FPGA pin) if FX3 FW version is at or above 1.3.0 + // Otherwise performs a soft reset by setting the TEP_TRIGGER_SOFT_RESET_BIT + if (icmd_->get_board_release_version() >= 0x00010300) { + // -------------- HARD RESET + MV_HAL_LOG_DEBUG() << "-------------- HARD RESET"; + icmd_->reset_fpga(); + } + // -------------- SOFT RESET + Gen3DeviceControl::reset_ts_internal(); +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/devices/gen3/gen3_fx3_facilities_builder.cpp b/hal_psee_plugins/src/devices/gen3/gen3_fx3_facilities_builder.cpp new file mode 100644 index 000000000..9882530fe --- /dev/null +++ b/hal_psee_plugins/src/devices/gen3/gen3_fx3_facilities_builder.cpp @@ -0,0 +1,80 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifdef _MSC_VER +#define NOMINMAX +#endif + +#include "boards/fx3/fx3_camera_discovery.h" +#include "boards/fx3/fx3_hw_identification.h" +#include "boards/fx3/fx3_libusb_board_command.h" +#include "boards/utils/psee_libusb_data_transfer.h" +#include "decoders/evt2/evt2_decoder.h" +#include "devices/gen3/gen3_fx3_device_control.h" +#include "devices/gen3/gen3_fx3_facilities_builder.h" +#include "devices/gen3/gen3_ll_biases.h" +#include "devices/gen3/gen3_pattern_generator.h" +#include "devices/gen3/gen3_pattern_generator_checker.h" +#include "devices/gen3/gen3_roi_command.h" +#include "devices/gen3/gen3_trigger_event.h" +#include "devices/gen3/gen3_trigger_out.h" +#include "geometries/vga_geometry.h" +#include "metavision/hal/facilities/i_events_stream.h" +#include "metavision/hal/utils/device_builder.h" +#include "metavision/sdk/base/events/event_cd.h" +#include "metavision/sdk/base/events/event_ext_trigger.h" +#include "plugin/psee_plugin.h" + +namespace Metavision { + +bool build_gen3_fx3_device(DeviceBuilder &device_builder, const DeviceBuilderParameters &device_builder_params, + const DeviceConfig &device_config) { + Fx3CameraDiscovery::DeviceBuilderParameters params = + static_cast(device_builder_params); + if (Gen3DeviceControl::is_gen3EM(*params.board_cmd)) { + return false; + } + + auto board_cmd = params.board_cmd; + + auto hw_identification = device_builder.add_facility(std::make_unique( + device_builder.get_plugin_software_info(), board_cmd, false, Gen3Fx3DeviceControl::get_sensor_id(*board_cmd), + get_psee_plugin_integrator_name())); + + auto geometry = device_builder.add_facility(std::make_unique()); + auto cd_event_decoder = device_builder.add_facility(std::make_unique>()); + auto ext_trigger_event_decoder = device_builder.add_facility(std::make_unique>()); + auto decoder = + device_builder.add_facility(std::make_unique(false, cd_event_decoder, ext_trigger_event_decoder)); + auto events_stream = device_builder.add_facility(std::make_unique( + std::make_unique(board_cmd, decoder->get_raw_event_size_bytes()), hw_identification)); + + auto gen3_device_control = device_builder.add_facility(std::make_unique(board_cmd)); + device_builder.add_facility(std::make_unique(board_cmd)); + gen3_device_control->low_consumption_startup_post_biases_initialize(); + + device_builder.add_facility(std::make_unique(board_cmd, gen3_device_control)); + std::shared_ptr trigger_out; + if (board_cmd->get_system_version() >= 0x30000) { + device_builder.add_facility(std::make_unique(board_cmd, gen3_device_control)); + } + + device_builder.add_facility( + std::make_unique(geometry->get_width(), geometry->get_height(), board_cmd)); + + // those facilities are not exposed in the public API yet + // device_builder.add_facility(std::make_unique(board_cmd)); + // device_builder.add_facility(std::make_unique()); + + return true; +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/devices/gen3/gen3_ll_biases.cpp b/hal_psee_plugins/src/devices/gen3/gen3_ll_biases.cpp new file mode 100644 index 000000000..c88f9bd1d --- /dev/null +++ b/hal_psee_plugins/src/devices/gen3/gen3_ll_biases.cpp @@ -0,0 +1,398 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include +#include +#include +#include + +#include "metavision/hal/utils/hal_log.h" +#include "boards/utils/psee_libusb_board_command.h" +#include "devices/gen3/gen3_ll_biases.h" +#include "devices/gen3/legacy_regmap_headers/legacy/stereo_pc_mapping.h" +#include "utils/psee_hal_utils.h" + +namespace Metavision { + +namespace { + +#include "gen3_idac.calib.cc" +#include "vdac18_8m1.calib.cc" + +class Gen3LLBias { +public: + enum class Mode { + Current = 0, + Voltage = 1, + }; + + Gen3LLBias(long value, const std::pair &range, Mode mode, int index, bool modifiable = true) : + value(value), range(range), mode(mode), index(index), modifiable(modifiable) {} + + long value; + std::pair range; + Mode mode = Mode::Voltage; + int index; + bool modifiable; +}; + +std::map vdac18_map_s; + +std::map load_vdac18_calibration(std::istream &ifs, bool is_voltage, long long config) { + std::map calibration_data; + char buf[256]; + + // Read data + unsigned int mv_value, dec_value, bin_value, pn_value, cas_value, prev_value, next_value; + while (!ifs.eof()) { + ifs.getline(buf, sizeof(buf)); + if (buf[0] == '%') { + continue; + } + if (ifs.gcount() != 0) { + sscanf(buf, "%u , %u , %u , %u , %u , %u , %u", &mv_value, &dec_value, &prev_value, &next_value, &pn_value, + &cas_value, &bin_value); + long long bin_data = (0LL << 31) // bias enable + + (1LL << 30) // output enable + + ((pn_value == 1 ? 1LL : 0LL) << 29) + ((cas_value == 1 ? 1LL : 0LL) << 28) + + ((is_voltage ? 1LL : 0LL) << 27) + (config << 21) + bin_value; + + calibration_data.insert({(long)mv_value, bin_data}); + + } else { + continue; + } + } + + return calibration_data; +} + +bool load_vdac18_calibration() { + if (vdac18_map_s.size() == 0) { + std::string str(vdac18_8m1); + std::istringstream mistr(str); + vdac18_map_s = load_vdac18_calibration(mistr, true, 8); + } + + if (vdac18_map_s.size() == 0) { + MV_HAL_LOG_ERROR() << "Unable to open gen3_vdac calibration"; + return false; + } + + return true; +} + +long long get_vdac18_values(long value) { + if (vdac18_map_s.empty()) { + load_vdac18_calibration(); + } + return vdac18_map_s[value]; +} + +struct CodeSysleyIDAC { + int code_; + enum Mos { P, N } mos_; + bool cas_; +}; + +std::map s_mvtocode; +bool load_v_to_code(std::istream &ifs) { + s_mvtocode.clear(); + while (ifs) { + std::string tmp; + std::getline(ifs, tmp); + if (tmp.empty()) + break; + std::istringstream istr(tmp); + int v; + CodeSysleyIDAC codeidac; + istr >> v; + istr >> codeidac.code_; + std::string idac; + istr >> idac; + if (idac == "PCas") { + codeidac.mos_ = CodeSysleyIDAC::P; + codeidac.cas_ = true; + } else if (idac == "PwoCas") { + codeidac.mos_ = CodeSysleyIDAC::P; + codeidac.cas_ = false; + } else if (idac == "NCas") { + codeidac.mos_ = CodeSysleyIDAC::N; + codeidac.cas_ = true; + } else if (idac == "NwoCas") { + codeidac.mos_ = CodeSysleyIDAC::N; + codeidac.cas_ = false; + } else { + break; + } + s_mvtocode[v] = codeidac; + } + return s_mvtocode.size() == 1801; +} + +bool load_v_to_code() { + std::string str(gen3_idac); + std::istringstream mistr(str); + if (!load_v_to_code(mistr)) { + return false; + } + return true; +} + +struct CCam3BiasEncoding { + uint32_t voltage_value_ : 8; + uint32_t current_value_ : 13; + + uint32_t buffer_value_ : 6; + uint32_t type_ : 1; // Current Voltage + uint32_t cas_code_ : 1; + uint32_t polarity_ : 1; + uint32_t bias_enable_ : 1; + uint32_t pad_enable_ : 1; + + CCam3BiasEncoding() { + pad_enable_ = 0; + bias_enable_ = 0; + polarity_ = 1; + cas_code_ = 1; + type_ = 0; + buffer_value_ = 0; + current_value_ = 0; + voltage_value_ = 0; + } + + CCam3BiasEncoding(uint32_t bias_enable) { + pad_enable_ = bias_enable; + bias_enable_ = bias_enable; + polarity_ = 1; + cas_code_ = 1; + type_ = 0x1; + buffer_value_ = bias_enable_ ? 0x08 : 0x01; + current_value_ = 1; + voltage_value_ = 0; + } +}; + +union BiasEncodingCast { + CCam3BiasEncoding bias_encoding; + long raw; + BiasEncodingCast() { + raw = 0; + } +}; + +long get_ccam3_bias_encoding(const Gen3LLBias &bias, int bias_value, bool bias_disabled = false) { + if (s_mvtocode.empty()) { + bool loaded = load_v_to_code(); + if (!loaded) { + MV_HAL_LOG_ERROR() << "Unable to open gen3_idac calibration"; + } + } + + BiasEncodingCast encoder; + encoder.bias_encoding = CCam3BiasEncoding(!bias_disabled); + + if (bias.mode == Gen3LLBias::Mode::Current) { + int v = bias_value; + if (!Metavision::is_expert_mode_enabled()) { + if (v < 0) + v = 0; + if (v > 1800) + v = 1800; + } + auto it = s_mvtocode.find(v); + if (it != s_mvtocode.end()) { + CodeSysleyIDAC codeidac = it->second; + encoder.bias_encoding.current_value_ = codeidac.code_; + encoder.bias_encoding.voltage_value_ = 0; + encoder.bias_encoding.type_ = 0; + encoder.bias_encoding.cas_code_ = !codeidac.cas_; + encoder.bias_encoding.polarity_ = codeidac.mos_ == CodeSysleyIDAC::N; + encoder.bias_encoding.buffer_value_ = 0x08; + } else { + MV_HAL_LOG_WARNING() << "Err value not found in LUT" << v; + encoder.bias_encoding.voltage_value_ = + static_cast(round(static_cast(bias_value * 255) / 1800.)) & 0xFF; + if (bias_value < 900) { + encoder.bias_encoding.polarity_ = 1; + } else { + encoder.bias_encoding.polarity_ = 0; + } + } + } else { + long calib_encoding = get_vdac18_values(bias_value); + encoder.bias_encoding.current_value_ = 0x1; + encoder.bias_encoding.voltage_value_ = (calib_encoding >> 0) & 0xFF; + encoder.bias_encoding.type_ = (calib_encoding >> 27) & 1; + encoder.bias_encoding.cas_code_ = (calib_encoding >> 28) & 1; + encoder.bias_encoding.polarity_ = (calib_encoding >> 29) & 1; + } + return encoder.raw; +} + +std::map &get_full_biases_map() { + // clang-format off + static std::map biases_map { + {"bias_latchout_or_pu", Gen3LLBias(100, {0, 1800}, Gen3LLBias::Mode::Voltage, 0)}, + {"bias_reqx_or_pu", Gen3LLBias(100, {0, 1800}, Gen3LLBias::Mode::Voltage, 1)}, + {"bias_req_pux", Gen3LLBias(1200, {0, 1800}, Gen3LLBias::Mode::Voltage, 2)}, + {"bias_req_puy", Gen3LLBias(1200, {0, 1800}, Gen3LLBias::Mode::Voltage, 3)}, + {"bias_del_reqx_or", Gen3LLBias(1000, {0, 1800}, Gen3LLBias::Mode::Voltage, 4)}, + {"bias_sendreq_pdx", Gen3LLBias(800, {0, 1800}, Gen3LLBias::Mode::Voltage, 5)}, + {"bias_sendreq_pdy", Gen3LLBias(1000, {0, 1800}, Gen3LLBias::Mode::Voltage, 6)}, + {"bias_del_ack_array", Gen3LLBias(1000, {0, 1800}, Gen3LLBias::Mode::Voltage, 7)}, + {"bias_del_timeout", Gen3LLBias(450, {0, 1800}, Gen3LLBias::Mode::Voltage, 8)}, + {"bias_inv", Gen3LLBias(500, {0, 1800}, Gen3LLBias::Mode::Voltage, 9)}, + {"bias_refr", Gen3LLBias(1500, {1300, 1800}, Gen3LLBias::Mode::Voltage, 10)}, + {"bias_clk", Gen3LLBias(600, {0, 1800}, Gen3LLBias::Mode::Voltage, 11)}, + {"bias_overflow", Gen3LLBias(0, {0, 1800}, Gen3LLBias::Mode::Voltage, 12)}, + {"bias_tail", Gen3LLBias(0, {0, 1800}, Gen3LLBias::Mode::Voltage, 13)}, + {"bias_out", Gen3LLBias(0, {0, 1800}, Gen3LLBias::Mode::Voltage, 14)}, + {"bias_hyst", Gen3LLBias(0, {0, 1800}, Gen3LLBias::Mode::Voltage, 15)}, + {"bias_vrefl", Gen3LLBias(0, {0, 1800}, Gen3LLBias::Mode::Voltage, 16)}, + {"bias_vrefh", Gen3LLBias(0, {0, 1800}, Gen3LLBias::Mode::Voltage, 17)}, + {"bias_cas", Gen3LLBias(1000, {0, 1800}, Gen3LLBias::Mode::Voltage, 18)}, + {"bias_diff_off", Gen3LLBias(225, {0, 1800}, Gen3LLBias::Mode::Voltage, 19)}, + {"bias_diff_on", Gen3LLBias(375, {0, 1800}, Gen3LLBias::Mode::Voltage, 20)}, + {"bias_diff", Gen3LLBias(300, {0, 1800}, Gen3LLBias::Mode::Voltage, 21)}, + {"bias_fo", Gen3LLBias(1725, {1650, 1800}, Gen3LLBias::Mode::Voltage, 22)}, + {"bias_pr", Gen3LLBias(1500, {1200, 1800}, Gen3LLBias::Mode::Voltage, 23)}, + {"bias_bulk", Gen3LLBias(1500, {0, 1800}, Gen3LLBias::Mode::Voltage, 24)}, + {"bias_hpf", Gen3LLBias(1500, {0, 1800}, Gen3LLBias::Mode::Voltage, 25)}, + {"bias_buf", Gen3LLBias(600, {0, 1800}, Gen3LLBias::Mode::Voltage, 26)}, + }; + // clang-format on + + return biases_map; +} + +std::map &get_biases_map() { + // clang-format off + static std::map biases_map { + {"bias_refr", Gen3LLBias(1500, {1300, 1800}, Gen3LLBias::Mode::Voltage, 10, true)}, + {"bias_diff_off", Gen3LLBias(225, {0, 1800}, Gen3LLBias::Mode::Voltage, 19, true)}, + {"bias_diff_on", Gen3LLBias(375, {0, 1800}, Gen3LLBias::Mode::Voltage, 20, true)}, + {"bias_diff", Gen3LLBias(300, {0, 1800}, Gen3LLBias::Mode::Voltage, 21, false)}, + {"bias_fo", Gen3LLBias(1725, {1650, 1800}, Gen3LLBias::Mode::Voltage, 22, true)}, + {"bias_pr", Gen3LLBias(1500, {1200, 1800}, Gen3LLBias::Mode::Voltage, 23, true)}, + {"bias_hpf", Gen3LLBias(1500, {0, 1800}, Gen3LLBias::Mode::Voltage, 25, true)}, + }; + // clang-format on + + return biases_map; +} +} /* namespace */ + +struct Gen3_LL_Biases::Private { + Private(const std::shared_ptr &cmd) : cmd(cmd) { + base_sensor_address = CCAM3_SENSOR_IF_BASE_ADDR; + base_bgen_address = CCAM3_SISLEY_IBGEN_BASE_ADDR; + + // initialize gen3 biases by loading reference biases during construction + biases_map = get_full_biases_map(); + for (auto &&it = biases_map.begin(); it != biases_map.end(); ++it) { + set(it->first, it->second.value); + } + + // set default bias map + biases_map = get_biases_map(); + } + + bool set(const std::string &bias_name, int bias_value) { + auto it = biases_map.find(bias_name); + if (it == biases_map.end()) { + return false; + } + auto &bias = it->second; + if (!bias.modifiable) { + return false; + } + + if (bias_name == "bias_diff_on") { + auto b = get("bias_diff"); + if (b == -1) { + MV_HAL_LOG_WARNING() << "Cannot clamp bias"; + } else { + if (bias_value < b + 1) + bias_value = b + 1; + } + } + if (bias_name == "bias_diff_off") { + auto b = get("bias_diff"); + if (b == -1) { + MV_HAL_LOG_WARNING() << "Cannot clamp bias"; + } else { + if (bias_value > b - 1) + bias_value = b - 1; + } + } + + if (!Metavision::is_expert_mode_enabled()) { + if (bias_value > bias.range.second) { + bias_value = bias.range.second; + } + if (bias_value < bias.range.first) { + bias_value = bias.range.first; + } + } + + uint32_t encoding = get_ccam3_bias_encoding(bias, bias_value); + if (encoding > 0) { + cmd->write_register(base_bgen_address + 4 * bias.index, encoding); + bias.value = bias_value; + } else { + MV_HAL_LOG_WARNING() << "Could not set bias" << bias_name; + } + + return true; + } + + int get(const std::string &bias_name) const { + auto it = biases_map.find(bias_name); + if (it == biases_map.end()) { + return -1; + } + + return it->second.value; + } + + std::map get_all_biases() { + std::map ret; + for (auto &b : biases_map) { + ret[b.first] = b.second.value; + } + return ret; + } + + std::shared_ptr cmd; + uint32_t base_bgen_address; + uint32_t base_sensor_address; + std::map biases_map; +}; + +Gen3_LL_Biases::Gen3_LL_Biases(const std::shared_ptr &board_cmd) : + pimpl_(new Private(board_cmd)) {} + +Gen3_LL_Biases::~Gen3_LL_Biases() = default; + +bool Gen3_LL_Biases::set(const std::string &bias_name, int bias_value) { + return pimpl_->set(bias_name, bias_value); +} + +int Gen3_LL_Biases::get(const std::string &bias_name) { + return pimpl_->get(bias_name); +} + +std::map Gen3_LL_Biases::get_all_biases() { + return pimpl_->get_all_biases(); +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/devices/gen3/gen3_pattern_generator.cpp b/hal_psee_plugins/src/devices/gen3/gen3_pattern_generator.cpp new file mode 100644 index 000000000..f610a77b5 --- /dev/null +++ b/hal_psee_plugins/src/devices/gen3/gen3_pattern_generator.cpp @@ -0,0 +1,149 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include + +#include "boards/utils/psee_libusb_board_command.h" +#include "devices/gen3/gen3_pattern_generator.h" +#include "devices/gen3/legacy_regmap_headers/legacy/stereo_pc_mapping.h" +#include "metavision/hal/utils/hal_log.h" + +namespace Metavision { + +static constexpr uint16_t DEFAULT_PG_LENGTH = 3072; +static constexpr uint16_t DEFAULT_PG_STEP_COUNT = 1; +static constexpr uint32_t P_PERIOD_LENGTH_MASK = ((1 << CCAM3_SISLEY_IF_TEST_PATTERN_P_PERIOD_LENGTH_WIDTH) - 1); +static constexpr uint32_t N_PERIOD_LENGTH_MASK = ((1 << CCAM3_SISLEY_IF_TEST_PATTERN_N_PERIOD_LENGTH_WIDTH) - 1); +static constexpr uint32_t P_PERIOD_RATIO_MASK = ((1 << CCAM3_SISLEY_IF_TEST_PATTERN_P_PERIOD_VALID_RATIO_WIDTH) - 1); +static constexpr uint32_t N_PERIOD_RATIO_MASK = ((1 << CCAM3_SISLEY_IF_TEST_PATTERN_N_PERIOD_VALID_RATIO_WIDTH) - 1); + +Gen3PatternGenerator::Gen3PatternGenerator(const std::shared_ptr &board_cmd) : + board_command_(board_cmd) { + disable(); +} + +Gen3PatternGenerator::~Gen3PatternGenerator() { + disable(); +} + +bool Gen3PatternGenerator::enable(const PseePatternGenerator::Configuration &configuration) { + if (configuration.pattern_type != PseePatternGenerator::Configuration::PatternType::Column && + configuration.pattern_type != PseePatternGenerator::Configuration::PatternType::Slash) { + MV_HAL_LOG_ERROR() + << "Failed to enable pattern generator. Unsupported input pattern type for this sensor. Supported " + "types are Column or Slash."; + return false; + } + + // Some pattern generator configurations can be set only if it is disabled. + disable(); + + // set the pattern config + uint32_t pattern_config = 0; + + pattern_config |= + (static_cast(configuration.pattern_type) << CCAM3_SISLEY_IF_TEST_PATTERN_CONTROL_TYPE_BIT_IDX); + pattern_config |= + (static_cast(configuration.pixel_type) << CCAM3_SISLEY_IF_TEST_PATTERN_CONTROL_PIXEL_TYPE_BIT_IDX); + pattern_config |= (configuration.pixel_polarity << CCAM3_SISLEY_IF_TEST_PATTERN_CONTROL_PIXEL_POLARITY_BIT_IDX); + pattern_config |= (1 << CCAM3_SISLEY_IF_TEST_PATTERN_CONTROL_ENABLE_BIT_IDX); // enables + + if (!is_period_rate_set_) { + set_period_rate(DEFAULT_PG_STEP_COUNT, DEFAULT_PG_STEP_COUNT); + } + + if (!is_period_length_set_) { + set_period_step_count(DEFAULT_PG_LENGTH, DEFAULT_PG_LENGTH); + } + + board_command_->write_register(CCAM3_SISLEY_IF_TEST_PATTERN_CONTROL_ADDR, pattern_config); + + return true; +} + +void Gen3PatternGenerator::disable() { + board_command_->send_register_bit(CCAM3_SISLEY_IF_TEST_PATTERN_CONTROL_ADDR, + CCAM3_SISLEY_IF_TEST_PATTERN_CONTROL_ENABLE_BIT_IDX, 0); +} + +bool Gen3PatternGenerator::is_enabled() { + return board_command_->read_register_bit(CCAM3_SISLEY_IF_TEST_PATTERN_CONTROL_ADDR, + CCAM3_SISLEY_IF_TEST_PATTERN_CONTROL_ENABLE_BIT_IDX); +} + +void Gen3PatternGenerator::get_pattern_geometry(int &width, int &height) const { + width = PATTERN_GENERATOR_WIDTH; + height = PATTERN_GENERATOR_HEIGHT; +} + +void Gen3PatternGenerator::set_period_step_count(uint16_t n_step_count, uint16_t p_step_count) { + if (p_step_count == 0) { + p_step_count = n_step_count; + } + if (n_step_count == 0) { + return; + } + + const auto n_period_length = n_step_count * 10; // 10 ns is the step length + const auto p_period_length = p_step_count * 10; // 10 ns is the step length + + // Keep the period ratio unchanged + uint32_t n_period_reg_value = board_command_->read_register(CCAM3_SISLEY_IF_TEST_PATTERN_N_PERIOD_ADDR) & + (N_PERIOD_RATIO_MASK << CCAM3_SISLEY_IF_TEST_PATTERN_N_PERIOD_VALID_RATIO_BIT_IDX); + uint32_t p_period_reg_value = board_command_->read_register(CCAM3_SISLEY_IF_TEST_PATTERN_P_PERIOD_ADDR) & + (P_PERIOD_RATIO_MASK << CCAM3_SISLEY_IF_TEST_PATTERN_P_PERIOD_VALID_RATIO_BIT_IDX); + + const uint32_t n_period_length_reg_value = (n_period_length & N_PERIOD_LENGTH_MASK) + << CCAM3_SISLEY_IF_TEST_PATTERN_N_PERIOD_LENGTH_BIT_IDX; + const uint32_t p_period_length_reg_value = (p_period_length & P_PERIOD_LENGTH_MASK) + << CCAM3_SISLEY_IF_TEST_PATTERN_P_PERIOD_LENGTH_BIT_IDX; + + // write the full bitset + board_command_->write_register(CCAM3_SISLEY_IF_TEST_PATTERN_N_PERIOD_ADDR, + n_period_length_reg_value | n_period_reg_value); + board_command_->write_register(CCAM3_SISLEY_IF_TEST_PATTERN_P_PERIOD_ADDR, + p_period_length_reg_value | p_period_reg_value); + + is_period_length_set_ = true; +} + +void Gen3PatternGenerator::set_period_rate(uint8_t n_rate_Mev_s, uint8_t p_rate_Mev_s) { + if (p_rate_Mev_s == 0) { + p_rate_Mev_s = n_rate_Mev_s; + } + if (n_rate_Mev_s == 0) { + return; + } + + // Keep the period length unchanged + uint32_t n_period_reg_value = board_command_->read_register(CCAM3_SISLEY_IF_TEST_PATTERN_N_PERIOD_ADDR) & + (N_PERIOD_LENGTH_MASK << CCAM3_SISLEY_IF_TEST_PATTERN_N_PERIOD_LENGTH_BIT_IDX); + uint32_t p_period_reg_value = board_command_->read_register(CCAM3_SISLEY_IF_TEST_PATTERN_P_PERIOD_ADDR) & + (P_PERIOD_LENGTH_MASK << CCAM3_SISLEY_IF_TEST_PATTERN_P_PERIOD_LENGTH_BIT_IDX); + + // PG can generate 1 event per clock cycle with a clock period of 10 ns. And there are 1024 cycles. + // So at most you can generate up to 1023 ev / 10240 ns which is equivalent to 100*1023/1024 Mev/s. + // Rate step is thus 100/1024 Mev/s. + // In the register you write the ratio i.e. number of steps (actual rate requested/rate_step). + const uint32_t n_period_ratio_reg_value = ((1024 * n_rate_Mev_s / 100) & N_PERIOD_RATIO_MASK) + << CCAM3_SISLEY_IF_TEST_PATTERN_N_PERIOD_VALID_RATIO_BIT_IDX; + const uint32_t p_period_ratio_reg_value = ((1024 * p_rate_Mev_s / 100) & P_PERIOD_RATIO_MASK) + << CCAM3_SISLEY_IF_TEST_PATTERN_P_PERIOD_VALID_RATIO_BIT_IDX; + + // write the full bitset + board_command_->write_register(CCAM3_SISLEY_IF_TEST_PATTERN_N_PERIOD_ADDR, + n_period_ratio_reg_value | n_period_reg_value); + board_command_->write_register(CCAM3_SISLEY_IF_TEST_PATTERN_P_PERIOD_ADDR, + p_period_ratio_reg_value | p_period_reg_value); + + is_period_rate_set_ = true; +} +} // namespace Metavision diff --git a/hal_psee_plugins/src/devices/gen3/gen3_pattern_generator_checker.cpp b/hal_psee_plugins/src/devices/gen3/gen3_pattern_generator_checker.cpp new file mode 100644 index 000000000..1c4c83357 --- /dev/null +++ b/hal_psee_plugins/src/devices/gen3/gen3_pattern_generator_checker.cpp @@ -0,0 +1,34 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include "metavision/hal/utils/hal_log.h" +#include "devices/gen3/gen3_pattern_generator.h" +#include "devices/gen3/gen3_pattern_generator_checker.h" +#include "devices/utils/gen3/gen3_pattern_checkers.h" + +namespace Metavision { + +PseePatternGeneratorChecker::PatternChecker * + Gen3PatternGeneratorChecker::build_pattern_checker(const PseePatternGenerator::Configuration &configuration) const { + switch (configuration.pattern_type) { + case PseePatternGenerator::Configuration::PatternType::Column: + return new ColumnPatternChecker(Gen3PatternGenerator::PATTERN_GENERATOR_WIDTH, + Gen3PatternGenerator::PATTERN_GENERATOR_HEIGHT); + case PseePatternGenerator::Configuration::PatternType::Slash: + return new SlashPatternChecker(Gen3PatternGenerator::PATTERN_GENERATOR_WIDTH, + Gen3PatternGenerator::PATTERN_GENERATOR_HEIGHT); + default: + MV_HAL_LOG_ERROR() << "Unavailable pattern type for this sensor. Available patterns are Column or Slash."; + return nullptr; + } +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/devices/gen3/gen3_roi_command.cpp b/hal_psee_plugins/src/devices/gen3/gen3_roi_command.cpp new file mode 100644 index 000000000..0520a2804 --- /dev/null +++ b/hal_psee_plugins/src/devices/gen3/gen3_roi_command.cpp @@ -0,0 +1,93 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include +#include + +#include "metavision/hal/utils/hal_log.h" +#include "boards/utils/psee_libusb_board_command.h" +#include "devices/gen3/gen3_roi_command.h" +#include "devices/gen3/legacy_regmap_headers/legacy/stereo_pc_mapping.h" + +namespace Metavision { + +Gen3ROICommand::Gen3ROICommand(int width, int height, const std::shared_ptr &board_cmd) : + PseeROI(width, height), icmd_(board_cmd), base_sensor_address_(CCAM3_SENSOR_IF_BASE_ADDR) { + /// this step is necessary because of a flaw in sensor conception that enables half ROI by default. + /// If the ROI is not set to the full pixel matrix, then a ring of width 1 appears. + enable(false); +} + +void Gen3ROICommand::reset_to_full_roi() { + constexpr int roi_step = 0x004; + uint32_t col_td_ind, row_td_ind; + + // setting x registers + for (col_td_ind = CCAM3_SISLEY_ROI_TD_X_START_ADDR; col_td_ind < CCAM3_SISLEY_ROI_TD_X_LAST_ADDR; + col_td_ind += roi_step) { + MV_HAL_LOG_DEBUG() << Metavision::Log::no_space << std::hex << std::showbase << std::internal + << std::setfill('0') << col_td_ind << "\t|\t" << 0XFFFFFFFF << std::dec; + icmd_->write_register(col_td_ind, 0xFFFFFFFF); + } + + // setting y registers + for (row_td_ind = CCAM3_SISLEY_ROI_TD_Y_START_ADDR; row_td_ind < CCAM3_SISLEY_ROI_TD_Y_LAST_ADDR; + row_td_ind += roi_step) { + MV_HAL_LOG_DEBUG() << Metavision::Log::no_space << std::hex << std::showbase << std::internal + << std::setfill('0') << row_td_ind << "\t|\t" << 0XFFFFFFFF << std::dec; + icmd_->write_register(row_td_ind, 0XFFFFFFFF); + } +} + +void Gen3ROICommand::write_ROI(const std::vector &vroiparams) { + constexpr int roi_step = 0x004; + uint32_t param_ind = 0; + uint32_t col_td_ind, row_td_ind; + roi_save_ = vroiparams; + + if (vroiparams.size() != 35) { + MV_HAL_LOG_WARNING() << "Data provided to write ROI is not of the good size for Gen3 sensor"; + return; + } + + // setting x registers + for (col_td_ind = CCAM3_SISLEY_ROI_TD_X_START_ADDR; col_td_ind < CCAM3_SISLEY_ROI_TD_X_LAST_ADDR; + col_td_ind += roi_step, ++param_ind) { + MV_HAL_LOG_DEBUG() << Metavision::Log::no_space << std::hex << std::showbase << std::internal + << std::setfill('0') << col_td_ind << "\t|\t" << vroiparams[param_ind] << std::dec; + icmd_->write_register(col_td_ind, vroiparams[param_ind]); + } + + // setting y registers + for (row_td_ind = CCAM3_SISLEY_ROI_TD_Y_START_ADDR; row_td_ind < CCAM3_SISLEY_ROI_TD_Y_LAST_ADDR; + row_td_ind += roi_step, ++param_ind) { + MV_HAL_LOG_DEBUG() << Metavision::Log::no_space << std::hex << std::showbase << std::internal + << std::setfill('0') << row_td_ind << "\t|\t" << vroiparams[param_ind] << std::dec + << std::endl; + icmd_->write_register(row_td_ind, vroiparams[param_ind]); + } +} + +void Gen3ROICommand::enable(bool state) { + if (!state) { + reset_to_full_roi(); + } else { + write_ROI(roi_save_); + } + + icmd_->write_register(base_sensor_address_ + SISLEY_SENSOR_ROI_CTRL_ADDR, SISLEY_SENSOR_ROI_CTRL); + icmd_->send_register_bit(base_sensor_address_ + SISLEY_SENSOR_ROI_CTRL_ADDR, + SISLEY_SENSOR_ROI_CTRL_ROI_TD_EN_BIT_IDX, 1); + icmd_->send_register_bit(base_sensor_address_ + SISLEY_SENSOR_ROI_CTRL_ADDR, + SISLEY_SENSOR_ROI_CTRL_ROI_TD_SHADOW_TRIG_BIT_IDX, 1); +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/devices/gen3/gen3_trigger_event.cpp b/hal_psee_plugins/src/devices/gen3/gen3_trigger_event.cpp new file mode 100644 index 000000000..f77afabc4 --- /dev/null +++ b/hal_psee_plugins/src/devices/gen3/gen3_trigger_event.cpp @@ -0,0 +1,62 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include + +#include "facilities/psee_device_control.h" +#include "boards/utils/psee_libusb_board_command.h" +#include "devices/gen3/legacy_regmap_headers/ccam3_single_gen3.h" +#include "devices/gen3/gen3_trigger_event.h" +#include "metavision/hal/utils/hal_exception.h" +#include "utils/psee_hal_plugin_error_code.h" + +namespace Metavision { + +Gen3TriggerEvent::Gen3TriggerEvent(const std::shared_ptr &board_cmd, + const std::shared_ptr &device_control) : + PseeTriggerIn(device_control), icmd_(board_cmd), base_address_(CCAM3_SYS_REG_BASE_ADDR) { + if (!icmd_) { + throw(HalException(PseeHalPluginErrorCode::BoardCommandNotFound, "Board command is null.")); + } + for (uint32_t i = 0; i < 8; ++i) { + disable(i); + } +} + +bool Gen3TriggerEvent::enable(uint32_t channel) { + if (channel != 0 && channel != 6 && channel != 7) { + return false; + } + + if (channel == 7 && get_device_control()->get_mode() == I_DeviceControl::SyncMode::SLAVE) { + return false; + } + + icmd_->send_register_bit(base_address_ + CCAM3_SYSTEM_MONITOR_EXT_TRIGGERS_ENABLE_ADDR, channel, true); + return true; +} + +bool Gen3TriggerEvent::disable(uint32_t channel) { + if (channel != 0 && channel != 6 && channel != 7) { + return false; + } + + icmd_->send_register_bit(base_address_ + CCAM3_SYSTEM_MONITOR_EXT_TRIGGERS_ENABLE_ADDR, channel, false); + return true; +} + +bool Gen3TriggerEvent::is_enabled(uint32_t index) { + if (index != 0 && index != 6 && index != 7) { + return false; + } + return icmd_->read_register_bit(base_address_ + CCAM3_SYSTEM_MONITOR_EXT_TRIGGERS_ENABLE_ADDR, index); +} +} // namespace Metavision diff --git a/hal_psee_plugins/src/devices/gen3/gen3_trigger_out.cpp b/hal_psee_plugins/src/devices/gen3/gen3_trigger_out.cpp new file mode 100644 index 000000000..d7cd935b7 --- /dev/null +++ b/hal_psee_plugins/src/devices/gen3/gen3_trigger_out.cpp @@ -0,0 +1,93 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifdef _MSC_VER +#define NOMINMAX // libusb.h includes windows.h which defines min max macros that we don't want +#endif + +#include +#include + +#include "facilities/psee_device_control.h" +#include "boards/utils/psee_libusb_board_command.h" +#include "devices/gen3/gen3_trigger_out.h" +#include "devices/gen3/legacy_regmap_headers/ccam3_single_gen3.h" + +static constexpr uint32_t MAX_SIGNAL_PERIOD_US_FPGA_OLDER_THAN_3_0 = (1 << 8) - 1; + +namespace Metavision { + +Gen3TriggerOut::Gen3TriggerOut(const std::shared_ptr &board_cmd, + const std::shared_ptr &device_control) : + PseeTriggerOut(device_control), board_command_(board_cmd) { + disable(); +} + +bool Gen3TriggerOut::enable() { + if (get_device_control()->get_mode() == I_DeviceControl::SyncMode::MASTER) { + return false; + } + board_command_->send_register_bit(CCAM3_EXT_SYNC_OUT_MODE_ADDR, CCAM3_EXT_SYNC_OUT_MODE_VALUE_BIT_IDX, 1); + + board_command_->send_register_bit(CCAM3_SYSTEM_MONITOR_EXT_TRIGGERS_OUT_ENABLE_ADDR, + CCAM3_SYSTEM_MONITOR_EXT_TRIGGERS_OUT_ENABLE_VALUE_BIT_IDX, 1); + return true; +} + +void Gen3TriggerOut::disable() { + board_command_->send_register_bit(CCAM3_EXT_SYNC_OUT_MODE_ADDR, CCAM3_EXT_SYNC_OUT_MODE_VALUE_BIT_IDX, 0); + + board_command_->send_register_bit(CCAM3_SYSTEM_MONITOR_EXT_TRIGGERS_OUT_ENABLE_ADDR, + CCAM3_SYSTEM_MONITOR_EXT_TRIGGERS_OUT_ENABLE_VALUE_BIT_IDX, 0); +} + +void Gen3TriggerOut::set_duty_cycle(double period_ratio) { + /* + * Convert the ratio (between 0 and 1) to a signal duration + * -> if ratio is 0.5 i.e. 50%, then the pulse will last 50% of the pulse period + * -> example: + * pulse period is 1000us + * duty cycle is 0.5 + * Then the signal will last 500us every 1000 us. + */ + period_ratio_ = std::min(1., std::max(0., period_ratio)); + const auto signal_period_us = + board_command_->read_register(CCAM3_SYSTEM_MONITOR_EXT_TRIGGERS_OUT_PULSE_PERIOD_ADDR); + + board_command_->write_register(CCAM3_SYSTEM_MONITOR_EXT_TRIGGERS_OUT_PULSE_WIDTH_ADDR, + signal_period_us * period_ratio_); +} + +void Gen3TriggerOut::set_period(uint32_t signal_period_us) { + /* + * Triggers out on 32 bits are supported only from fpga version 3.0. + * Before trigger out were supported only on Pronto and with 8 bits resolutions for the duty cycle + * With newer system version, the resolution is 32 bits + */ + if (board_command_->get_system_version() < 0x3000) { + signal_period_us = std::max(2u, std::min(signal_period_us, MAX_SIGNAL_PERIOD_US_FPGA_OLDER_THAN_3_0)); + } + + board_command_->write_register(CCAM3_SYSTEM_MONITOR_EXT_TRIGGERS_OUT_PULSE_PERIOD_ADDR, signal_period_us); + /* reapply duty cycle in order to update pulse width */ + set_duty_cycle(period_ratio_); +} + +bool Gen3TriggerOut::is_enabled() { + bool sync_out_en = + board_command_->read_register_bit(CCAM3_EXT_SYNC_OUT_MODE_ADDR, CCAM3_EXT_SYNC_OUT_MODE_VALUE_BIT_IDX); + + bool trig_out_en = board_command_->read_register_bit(CCAM3_SYSTEM_MONITOR_EXT_TRIGGERS_OUT_ENABLE_ADDR, + CCAM3_SYSTEM_MONITOR_EXT_TRIGGERS_OUT_ENABLE_VALUE_BIT_IDX); + return sync_out_en && trig_out_en; +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/devices/gen31/CMakeLists.txt b/hal_psee_plugins/src/devices/gen31/CMakeLists.txt new file mode 100644 index 000000000..fa55e34b6 --- /dev/null +++ b/hal_psee_plugins/src/devices/gen31/CMakeLists.txt @@ -0,0 +1,43 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. + +target_sources(metavision_hal_gen31_camera_obj PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/gen31_analog.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/gen31_device_control.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/gen31_digital.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/gen31_event_rate_noise_filter_module.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/gen31_ll_biases.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/gen31_monitoring.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/gen31_pattern_generator_checker.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/gen31_pattern_generator.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/gen31_roi_command.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/gen31_sensor_if_ctrl.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/gen31_sensor.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/gen31_system_control.cpp +) + +target_sources(metavision_hal_gen31_fx3_system_obj PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/gen31_evk1_device.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/gen31_evk1_fpga.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/gen31_fx3_device_control.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/gen31_fx3_facilities_builder.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/gen31_trigger_event.cpp +) + +target_sources(metavision_hal_gen31_evk2_system_obj PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/gen31_evk2_regmap_builder.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/gen31_evk2_tz_device.cpp +) + +target_sources(metavision_hal_gen31_evk3_system_obj PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/gen31_evk3_device.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/gen31_ccam5_tz_device.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/gen31_ccam5_trigger_event.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/gen31_ccam5_trigger_out.cpp +) diff --git a/hal_psee_plugins/src/devices/gen31/gen31_analog.cpp b/hal_psee_plugins/src/devices/gen31/gen31_analog.cpp new file mode 100644 index 000000000..0b0d4ce6a --- /dev/null +++ b/hal_psee_plugins/src/devices/gen31/gen31_analog.cpp @@ -0,0 +1,143 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include +#include +#include "devices/gen31/gen31_analog.h" +#include "utils/register_map.h" + +namespace Metavision { + +Gen31Analog::Gen31Analog(const std::shared_ptr ®ister_map, const std::string &prefix, bool is_em) : + prefix_(prefix), register_map_(register_map), is_em_(is_em) {} + +void Gen31Analog::init() { + (*register_map_)[prefix_ + "spare_ctrl"]["em_shutter"] = true; + (*register_map_)[prefix_ + "global_ctrl"]["bgen_en"] = true; + (*register_map_)[prefix_ + "global_ctrl"]["bgen_rstn"] = true; + (*register_map_)[prefix_ + "global_ctrl"]["sw_global_en"] = true; + + if (is_em_) { + (*register_map_)[prefix_ + "acr_ctrl"]["acr_en"] = false; + (*register_map_)[prefix_ + "spare_ctrl"]["em_shutter"] = false; + (*register_map_)[prefix_ + "global_ctrl"]["td_couple_ctrl"] = true; + (*register_map_)[prefix_ + "roi_ctrl"]["roi_em_shadow_trigger"] = true; + } else { + (*register_map_)[prefix_ + "rob_ctrl"]["ro_dual_ctrl"] = true; + } + + (*register_map_)[prefix_ + "bgen_00"]["bias_vdac_val"] = 176; + (*register_map_)[prefix_ + "bgen_01"]["bias_vdac_val"] = 176; + + // Enable state machine reqY active pull down of TD readout + (*register_map_)[prefix_ + "readout_ctrl"]["ro_act_pdy_ctrl"] = 1; + // Disable state machine reqX active pull down of TD readout + (*register_map_)[prefix_ + "readout_ctrl"]["ro_act_pdx_ctrl"] = 0; + // Disable pixel reqX active pull up of TD readout + (*register_map_)[prefix_ + "readout_ctrl"]["ro_act_pux_ctrl"] = 0; + // Enable state machine reqY active pull down of EM readout + (*register_map_)[prefix_ + "roe_ctrl"]["ro_em_act_pdy_ctrl"] = 1; + // Disable state machine reqX active pull down of EM readout + (*register_map_)[prefix_ + "roe_ctrl"]["ro_em_act_pdx_ctrl"] = 0; + // Disable pixel reqX active pull up of EM readout + (*register_map_)[prefix_ + "roe_ctrl"]["ro_em_act_pux_ctrl"] = 0; + // Enable pixel reqX active pull up from top row for both TD and EM readout + (*register_map_)[prefix_ + "spare_ctrl"]["ro_top_act_pu_en"] = 1; + // Enable column reqX active pull down for both TD and EM readout + (*register_map_)[prefix_ + "spare_ctrl"]["spare0"] = 1; + // Tune bias del ack array to avoid out of range addresses + (*register_map_)[prefix_ + "bgen_07"]["bias_vdac_val"] = 0xC0; + // Set bias_diff_off to VDAC mode to avoid overheating issue + (*register_map_)[prefix_ + "bgen_19"]["bias_type"] = 1; + (*register_map_)[prefix_ + "bgen_19"]["bias_vdac_val"] = 0x1E; + // Set bias_diff_on to VDAC mode to avoid overheating issue + // Tune bias_diff_on voltage after overheating issue and validation campaign + (*register_map_)[prefix_ + "bgen_20"]["bias_type"] = 1; + (*register_map_)[prefix_ + "bgen_20"]["bias_vdac_val"] = 0x35; + // Set bias_diff to VDAC mode to avoid overheating issue + // Tune bias_diff voltage after overheating issue and validation campaign + (*register_map_)[prefix_ + "bgen_21"]["bias_type"] = 1; + (*register_map_)[prefix_ + "bgen_21"]["bias_vdac_val"] = 0x29; + // Tune bias_fo value to improve latency. + (*register_map_)[prefix_ + "bgen_22"]["bias_idac_val"] = 0x3D; + + // Enable output clock gating to save power + (*register_map_)[prefix_ + "clk_out_ctrl"]["clk_gate_bypass"] = 0; + // Enable out of range checks + (*register_map_)[prefix_ + "oor_ctrl"]["oor_en"] = 1; + + analog_td_rstn(false); + + (*register_map_)[prefix_ + "roi_ctrl"]["roi_td_en"] = true; + (*register_map_)[prefix_ + "td_roi_x20"]["val"] = false; + (*register_map_)[prefix_ + "td_roi_y15"]["val"] = false; + (*register_map_)[prefix_ + "roi_ctrl"]["roi_td_shadow_trigger"] = true; +} + +void Gen31Analog::start() { + // Save user configuration given to the facility + uint32_t evt_thresh = (*register_map_)[prefix_ + "nfl_thresh"]["evt_thresh"].read_value(); + uint32_t period_cnt = (*register_map_)[prefix_ + "nfl_thresh"]["period_cnt_thresh"].read_value(); + bool enable = (*register_map_)[prefix_ + "nfl_ctrl"]["nfl_en"].read_value(); + + // Enable the noise filter and set to max (dropping all events). + // This will prevent the initial event burst when starting. + (*register_map_)[prefix_ + "nfl_thresh"]["evt_thresh"] = 0x3FFF; + (*register_map_)[prefix_ + "nfl_thresh"]["period_cnt_thresh"] = 0xA; + (*register_map_)[prefix_ + "nfl_ctrl"]["nfl_en"] = true; + + analog_td_rstn(true); + + // Wait for event burst to be filtered out + std::this_thread::sleep_for(std::chrono::milliseconds(500)); + + // Disable the noise filter (allowing events to pass again) and restore user settings. + (*register_map_)[prefix_ + "nfl_ctrl"]["nfl_en"] = false; + (*register_map_)[prefix_ + "nfl_thresh"]["evt_thresh"] = evt_thresh; + (*register_map_)[prefix_ + "nfl_thresh"]["period_cnt_thresh"] = period_cnt; + (*register_map_)[prefix_ + "nfl_ctrl"]["nfl_en"] = enable; +} + +void Gen31Analog::stop() { + analog_td_rstn(false); +} + +void Gen31Analog::destroy() {} + +void Gen31Analog::analog_td_rstn(bool rstn) { + (*register_map_)[prefix_ + "roi_ctrl"]["roi_td_rstn"] = rstn; +} + +void Gen31Analog::analog_em_rstn(bool rstn) { + (*register_map_)[prefix_ + "roi_ctrl"]["em_shutter"] = rstn; +} + +void Gen31Analog::enable_lifo_measurement() { + (*register_map_)[prefix_ + "lifo_ctrl"]["lifo_en"] = true; +} + +uint32_t Gen31Analog::lifo_counter() { + (*register_map_)[prefix_ + "lifo_ctrl"]["lifo_cnt_en"] = true; + bool valid = false; + uint16_t retries = 0; + uint32_t counter = 0; + while (valid == false && retries < 10) { + auto reg_val = (*register_map_)[prefix_ + "lifo_ctrl"].read_value(); + valid = reg_val & 1 << 29; + counter = reg_val & ((1 << 27) - 1); + retries += 1; + } + if (valid) + return -1; + return counter; +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/devices/gen31/gen31_ccam5_fpga.cpp b/hal_psee_plugins/src/devices/gen31/gen31_ccam5_fpga.cpp new file mode 100644 index 000000000..244e11f9b --- /dev/null +++ b/hal_psee_plugins/src/devices/gen31/gen31_ccam5_fpga.cpp @@ -0,0 +1,108 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include "devices/gen31/gen31_ccam5_fpga.h" +#include "geometries/vga_geometry.h" +#include "metavision/hal/utils/hal_log.h" +#include "utils/register_map.h" + +namespace Metavision { +namespace { +std::string SYSTEM_CONFIG_PREFIX = "SYSTEM_CONFIG/"; +std::string SYSTEM_CONTROL_PREFIX = "SYSTEM_CONTROL/"; +std::string SYSTEM_MONITOR_PREFIX = "SYSTEM_MONITOR/"; +} // namespace + +using vfield = std::map; + +Gen31CCam5Fpga::Gen31CCam5Fpga(const std::shared_ptr ®map, const std::string &root_prefix, + const std::string &sensor_if_prefix) : + root_prefix_(root_prefix), + sensor_if_prefix_(sensor_if_prefix), + register_map_(regmap), + sys_ctrl_(register_map_, get_system_control_prefix()), + sensor_if_(register_map_, get_sensor_if_prefix()) {} + +void Gen31CCam5Fpga::set_timebase_master(bool enable) { + timebase_master_ = enable; +} + +void Gen31CCam5Fpga::set_timebase_ext_sync(bool enable) { + timebase_ext_sync_ = enable; +} + +bool Gen31CCam5Fpga::get_timebase_master() const { + return timebase_master_; +} + +bool Gen31CCam5Fpga::get_timebase_ext_sync() const { + return timebase_ext_sync_; +} + +std::string Gen31CCam5Fpga::get_root_prefix() const { + return root_prefix_; +} + +std::string Gen31CCam5Fpga::get_sensor_if_prefix() const { + return sensor_if_prefix_; +} + +std::string Gen31CCam5Fpga::get_system_config_prefix() const { + return root_prefix_ + SYSTEM_CONFIG_PREFIX; +} + +std::string Gen31CCam5Fpga::get_system_control_prefix() const { + return root_prefix_ + SYSTEM_CONTROL_PREFIX; +} + +std::string Gen31CCam5Fpga::get_system_monitor_prefix() const { + return root_prefix_ + SYSTEM_MONITOR_PREFIX; +} + +void Gen31CCam5Fpga::init() { + MV_HAL_LOG_TRACE() << "CCam5 Gen31 Init"; + sys_ctrl_.sensor_atis_control_clear(); + sys_ctrl_.soft_reset("CCAM2_TRIGGER"); + sys_ctrl_.sensor_prepowerup(); + sys_ctrl_.timebase_config(timebase_ext_sync_, timebase_master_); + // TODO: configure IODELAY + // self.sensor_if__ioctrl = SensorIfIoctrl(sensor_if__ioctrl_rmap) + sys_ctrl_.host_if_control(true); + (*register_map_)[get_root_prefix() + "MIPI_TX/FRAME_PERIOD"]["VALUE_US"] = 0x3e8; + (*register_map_)[get_root_prefix() + "MIPI_TX/INTER_FRAME_TIME"]["VALUE"] = 0x640; + (*register_map_)[get_root_prefix() + "MIPI_TX/CONTROL"]["ENABLE"] = true; + + (*register_map_)[get_system_control_prefix() + "OUT_OF_FOV_FILTER_SIZE"]["WIDTH"] = VGAGeometry::width_; + (*register_map_)[get_system_control_prefix() + "OUT_OF_FOV_FILTER_ORIGIN"]["X"] = 0; + (*register_map_)[get_system_control_prefix() + "OUT_OF_FOV_FILTER_SIZE"]["VALUE"] = VGAGeometry::height_; + (*register_map_)[get_system_control_prefix() + "OUT_OF_FOV_FILTER_ORIGIN"]["Y"] = 0; + (*register_map_)[get_system_control_prefix() + "CCAM2_CONTROL"]["ENABLE_OUT_OF_FOV"] = true; + + sensor_if_.sensor_turn_on_clock(); +} + +void Gen31CCam5Fpga::start() { + MV_HAL_LOG_TRACE() << "CCam5 Gen31 Start"; + sys_ctrl_.sensor_powerup(); + sys_ctrl_.timebase_control(true); +} +void Gen31CCam5Fpga::stop() { + MV_HAL_LOG_TRACE() << "CCam5 Gen31 Stop"; + sys_ctrl_.timebase_control(false); + sys_ctrl_.sensor_prepowerdown(); +} +void Gen31CCam5Fpga::destroy() { + MV_HAL_LOG_TRACE() << "CCam5 Gen31 Destroy"; + sensor_if_.sensor_turn_off_clock(); + sys_ctrl_.sensor_powerdown(); + sys_ctrl_.soft_reset("CCAM2_TRIGGER"); +} +} // namespace Metavision diff --git a/hal_psee_plugins/src/devices/gen31/gen31_ccam5_trigger_event.cpp b/hal_psee_plugins/src/devices/gen31/gen31_ccam5_trigger_event.cpp new file mode 100644 index 000000000..cdd5efa10 --- /dev/null +++ b/hal_psee_plugins/src/devices/gen31/gen31_ccam5_trigger_event.cpp @@ -0,0 +1,51 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include "devices/gen31/gen31_ccam5_trigger_event.h" +#include "utils/register_map.h" + +namespace Metavision { + +Gen31Ccam5TriggerEvent::Gen31Ccam5TriggerEvent(const std::shared_ptr ®ister_map, + const std::shared_ptr &device) : + tzDev_(device), register_map_(register_map) { + for (uint32_t i = 0; i < 8; ++i) { + disable(i); + } +} + +bool Gen31Ccam5TriggerEvent::enable(uint32_t channel) { + if (channel != 0 && channel != 6) { + return false; + } + + (*register_map_)["SYSTEM_MONITOR/EXT_TRIGGERS/ENABLE"]["TRIGGER_" + std::to_string(channel)] = true; + return true; +} + +bool Gen31Ccam5TriggerEvent::disable(uint32_t channel) { + if (channel != 0 && channel != 6) { + return false; + } + + (*register_map_)["SYSTEM_MONITOR/EXT_TRIGGERS/ENABLE"]["TRIGGER_" + std::to_string(channel)] = false; + return true; +} + +bool Gen31Ccam5TriggerEvent::is_enabled(uint32_t index) { + if (index != 0 && index != 6) { + return false; + } + + return (*register_map_)["SYSTEM_MONITOR/EXT_TRIGGERS/ENABLE"]["TRIGGER_" + std::to_string(index)].read_value(); +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/devices/gen31/gen31_ccam5_trigger_out.cpp b/hal_psee_plugins/src/devices/gen31/gen31_ccam5_trigger_out.cpp new file mode 100644 index 000000000..592d0ca93 --- /dev/null +++ b/hal_psee_plugins/src/devices/gen31/gen31_ccam5_trigger_out.cpp @@ -0,0 +1,79 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifdef _MSC_VER +#define NOMINMAX // libusb.h includes windows.h which defines min max macros that we don't want +#endif + +#include +#include + +#include "devices/gen31/gen31_ccam5_trigger_out.h" +#include "devices/gen31/gen31_ccam5_tz_device.h" +#include "utils/register_map.h" + +static constexpr uint32_t MAX_SIGNAL_PERIOD_US_FPGA_OLDER_THAN_3_0 = (1 << 8) - 1; + +namespace Metavision { + +Gen31Ccam5TriggerOut::Gen31Ccam5TriggerOut(const std::shared_ptr ®map, + const std::shared_ptr &dev) : + tz_dev_(dev), register_map_(regmap) { + disable(); +} + +bool Gen31Ccam5TriggerOut::enable() { + if (tz_dev_->get_mode() == I_DeviceControl::SyncMode::MASTER) + return false; + (*register_map_)["SYSTEM_MONITOR/EXT_TRIGGERS/OUT_ENABLE"] = 1; + return true; +} + +void Gen31Ccam5TriggerOut::disable() { + (*register_map_)["SYSTEM_MONITOR/EXT_TRIGGERS/OUT_ENABLE"] = 0; +} + +void Gen31Ccam5TriggerOut::set_duty_cycle(double period_ratio) { + /* + * Convert the ratio (between 0 and 1) to a signal duration + * -> if ratio is 0.5 i.e. 50%, then the pulse will last 50% of the pulse period + * -> example: + * pulse period is 1000us + * duty cycle is 0.5 + * Then the signal will last 500us every 1000 us. + */ + period_ratio_ = std::min(1., std::max(0., period_ratio)); + const auto signal_period_us = (*register_map_)["SYSTEM_MONITOR/EXT_TRIGGERS/OUT_PULSE_PERIOD"].read_value(); + + (*register_map_)["SYSTEM_MONITOR/EXT_TRIGGERS/OUT_PULSE_WIDTH"] = + static_cast(signal_period_us * period_ratio_); +} + +void Gen31Ccam5TriggerOut::set_period(uint32_t signal_period_us) { + /* + * Triggers out on 32 bits are supported only from fpga version 3.0. + * Before trigger out were supported only on Pronto and with 8 bits resolutions for the duty cycle + * With newer system version, the resolution is 32 bits + */ + if ((*register_map_)["SYSTEM_CONFIG/VERSION"].read_value() < 0x3000) { + signal_period_us = std::max(2u, std::min(signal_period_us, MAX_SIGNAL_PERIOD_US_FPGA_OLDER_THAN_3_0)); + } + + (*register_map_)["SYSTEM_MONITOR/EXT_TRIGGERS/OUT_PULSE_PERIOD"] = signal_period_us; + /* reapply duty cycle in order to update pulse width */ + set_duty_cycle(period_ratio_); +} + +bool Gen31Ccam5TriggerOut::is_enabled() { + return (*register_map_)["SYSTEM_MONITOR/EXT_TRIGGERS/OUT_ENABLE"].read_value(); +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/devices/gen31/gen31_ccam5_tz_device.cpp b/hal_psee_plugins/src/devices/gen31/gen31_ccam5_tz_device.cpp new file mode 100644 index 000000000..b8375835e --- /dev/null +++ b/hal_psee_plugins/src/devices/gen31/gen31_ccam5_tz_device.cpp @@ -0,0 +1,150 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifdef _MSC_VER +#define NOMINMAX +#endif + +#include "devices/gen31/gen31_ccam5_tz_device.h" +#include "devices/utils/device_system_id.h" +#include "boards/treuzell/tz_libusb_board_command.h" +#include "devices/treuzell/tz_device.h" +#include "devices/common/issd.h" +#include "devices/gen31/gen31_evk3_issd.h" +#include "devices/gen31/gen31_event_rate_noise_filter_module.h" +#include "devices/gen31/gen31_ccam5_trigger_event.h" +#include "devices/gen31/gen31_ccam5_trigger_out.h" +#include "devices/gen31/gen31_ll_biases.h" +//#include "devices/gen31/gen31_pattern_generator.h" +#include "devices/gen31/gen31_roi_command.h" +#include "devices/gen31/register_maps/gen31_evk3_device.h" +#include "facilities/psee_hw_register.h" +#include "geometries/vga_geometry.h" +#include "metavision/hal/utils/device_builder.h" +#include "plugin/psee_plugin.h" +#include "metavision/hal/utils/hal_error_code.h" +#include "metavision/hal/utils/hal_exception.h" +#include + +namespace Metavision { + +namespace { +std::string CCAM5_PREFIX = ""; +std::string SENSOR_IF_PREFIX = "SENSOR_IF/GEN31_IF/"; +std::string SENSOR_PREFIX = "SENSOR_IF/GEN31/"; +} // namespace + +TzCcam5Gen31::TzCcam5Gen31(std::shared_ptr cmd, uint32_t dev_id, + std::shared_ptr parent) : + TzDevice(cmd, dev_id, parent), + TzPseeFpgaDevice(), + TzDeviceWithRegmap(build_gen31_evk3_register_map), + TzIssdDevice(gen31_evk3_sequence) { + (*register_map)["SENSOR_IF/GEN31/lifo_ctrl"]["lifo_en"] = 0x1; + sync_mode_ = I_DeviceControl::SyncMode::STANDALONE; +} + +std::shared_ptr TzCcam5Gen31::build(std::shared_ptr cmd, uint32_t dev_id, + std::shared_ptr parent) { + if (cmd->read_device_register(dev_id, 0x800)[0] != SYSTEM_EVK3_GEN31_EVT3) + throw HalException(HalErrorCode::FailedInitialization, "Wrong FPGA system ID"); + return std::make_shared(cmd, dev_id, parent); +} + +void TzCcam5Gen31::spawn_facilities(DeviceBuilder &device_builder) { + device_builder.add_facility(std::make_unique(register_map, shared_from_this())); + device_builder.add_facility(std::make_unique( + register_map, std::dynamic_pointer_cast(shared_from_this()))); + + auto hw_register = device_builder.add_facility(std::make_unique(register_map)); + device_builder.add_facility(std::make_unique(hw_register, SENSOR_PREFIX)); + device_builder.add_facility(std::make_unique(hw_register, SENSOR_PREFIX)); + + auto geometry = VGAGeometry(); + device_builder.add_facility( + std::make_unique(geometry.get_width(), geometry.get_height(), register_map, SENSOR_PREFIX)); + // those facilities are not exposed in the public API yet + // device_builder.add_facility(std::make_unique(register_map)); +} + +TzCcam5Gen31::~TzCcam5Gen31() {} + +long TzCcam5Gen31::get_system_id() const { + return TzPseeFpgaDevice::get_system_id(); +} + +long TzCcam5Gen31::get_system_version() const { + return TzPseeFpgaDevice::get_system_version(); +} + +long long TzCcam5Gen31::get_sensor_id() { + return (*register_map)["SENSOR_IF/GEN31/chip_id"].read_value(); +} + +TzDevice::StreamFormat TzCcam5Gen31::get_output_format() { + return {std::string("EVT3"), std::make_unique()}; +} + +bool TzCcam5Gen31::set_mode_standalone() { + (*register_map)["SYSTEM_CONTROL/ATIS_CONTROL"]["MASTER_MODE"] = 0x1; + (*register_map)["SYSTEM_CONTROL/ATIS_CONTROL"]["USE_EXT_START"] = 0x0; + + sync_mode_ = I_DeviceControl::SyncMode::STANDALONE; + return true; +} + +bool TzCcam5Gen31::set_mode_master() { + (*register_map)["SYSTEM_CONTROL/ATIS_CONTROL"]["MASTER_MODE"] = 0x1; + (*register_map)["SYSTEM_CONTROL/ATIS_CONTROL"]["USE_EXT_START"] = 0x1; + + sync_mode_ = I_DeviceControl::SyncMode::MASTER; + return true; +} + +bool TzCcam5Gen31::set_mode_slave() { + (*register_map)["SYSTEM_CONTROL/ATIS_CONTROL"]["MASTER_MODE"] = 0x0; + (*register_map)["SYSTEM_CONTROL/ATIS_CONTROL"]["USE_EXT_START"] = 0x1; + + sync_mode_ = I_DeviceControl::SyncMode::SLAVE; + return true; +} + +I_DeviceControl::SyncMode TzCcam5Gen31::get_mode() { + return sync_mode_; +} + +int TzCcam5Gen31::get_illumination() { + (*register_map)["SENSOR_IF/GEN31/lifo_ctrl"].write_value(0); + (*register_map)["SENSOR_IF/GEN31/lifo_ctrl"]["lifo_en"] = 1; + (*register_map)["SENSOR_IF/GEN31/lifo_ctrl"]["lifo_cnt_en"] = 1; + bool valid = false; + uint16_t retries = 0; + uint32_t counter = 0; + while (valid == false && retries < 10) { + auto reg_val = (*register_map)["SENSOR_IF/GEN31/lifo_ctrl"].read_value(); + reg_val = (*register_map)["SENSOR_IF/GEN31/lifo_ctrl"].read_value(); + valid = reg_val & 1 << 29; + counter = reg_val & ((1 << 27) - 1); + retries += 1; + } + + if (!valid) { + return -1; + } + + if (counter != decltype(counter)(-1)) { + float t = float(counter) / 100.; + return powf(10, 3.5 - logf(t * 0.37) / logf(10)); + } + return -1; +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/devices/gen31/gen31_device_control.cpp b/hal_psee_plugins/src/devices/gen31/gen31_device_control.cpp new file mode 100644 index 000000000..4a1ac5f83 --- /dev/null +++ b/hal_psee_plugins/src/devices/gen31/gen31_device_control.cpp @@ -0,0 +1,135 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include +#include +#include +#include + +#include "boards/utils/config_registers_map.h" +#include "devices/gen31/ccam_gen31_helpers.h" +#include "devices/gen31/gen31_device_control.h" +#include "devices/gen31/gen31_evk1_fpga.h" +#include "devices/gen31/gen31_sensor.h" +#include "devices/utils/device_system_id.h" +#include "boards/utils/psee_libusb_board_command.h" +#include "facilities/psee_trigger_in.h" +#include "facilities/psee_trigger_out.h" +#include "geometries/hvga_geometry.h" +#include "geometries/vga_geometry.h" +#include "utils/register_map.h" + +namespace Metavision { +using vfield = std::map; + +Gen31DeviceControl::Gen31DeviceControl(const std::shared_ptr ®ister_map, + const std::shared_ptr &fpga, + const std::shared_ptr &sensor) : + PseeDeviceControl(EvtFormat::EVT2_0), register_map_(register_map), fpga_(fpga), sensor_(sensor) {} + +void Gen31DeviceControl::terminate_camera() { + sensor_->destroy(); + fpga_->destroy(); +} + +void Gen31DeviceControl::fpga_init() { + fpga_->init(); +} + +void Gen31DeviceControl::start_impl() { + fpga_->start(); + sensor_->start(); +} + +void Gen31DeviceControl::destroy_camera() { + sensor_->destroy(); + fpga_->destroy(); +} + +void Gen31DeviceControl::sensor_init() { + sensor_->init(); +} + +void Gen31DeviceControl::start_camera_common(bool is_gen31EM, bool allow_dual_readout) { + fpga_->start(); + sensor_->start(); +} + +void Gen31DeviceControl::stop_camera_common() { + sensor_->stop(); + fpga_->stop(); +} + +void Gen31DeviceControl::reset() {} + +void Gen31DeviceControl::reset_ts_internal() { + /* fpga_->soft_reset(); */ +} + +long long Gen31DeviceControl::get_sensor_id() { + return get_sensor_id((*register_map_)); +} + +long long Gen31DeviceControl::get_sensor_id(RegisterMap ®ister_map) { + return register_map["SENSOR_IF/GEN31/chip_id"].read_value(); +} + +bool Gen31DeviceControl::is_gen31EM() { + long sensor_id = get_sensor_id(); + return is_gen31EM(sensor_id); +} + +bool Gen31DeviceControl::is_gen31EM(long sensor_id) { + if (getenv("FORCE_GEN31EM")) { + return true; + } + for (const auto &id : EM_SUBSYSTEM_IDS.at(SystemId::SYSTEM_CCAM3_GEN31)) { + if ((sensor_id & 0xFFFF) == id) { + return true; + } + } + return false; +} + +bool Gen31DeviceControl::is_gen31EM(RegisterMap ®ister_map) { + auto sensor_id = get_sensor_id(register_map); + return is_gen31EM(sensor_id); +} + +bool Gen31DeviceControl::set_evt_format_impl(EvtFormat fmt) { + return false; +} + +bool Gen31DeviceControl::set_mode_standalone_impl() { + (*register_map_)["SYSTEM_CONTROL/ATIS_CONTROL"]["MASTER_MODE"] = 0x1; + (*register_map_)["SYSTEM_CONTROL/ATIS_CONTROL"]["USE_EXT_START"] = 0x0; + return true; +} + +bool Gen31DeviceControl::set_mode_master_impl() { + if (get_trigger_out()->is_enabled()) { + return false; + } + (*register_map_)["SYSTEM_CONTROL/ATIS_CONTROL"]["MASTER_MODE"] = 0x1; + (*register_map_)["SYSTEM_CONTROL/ATIS_CONTROL"]["USE_EXT_START"] = 0x1; + return true; +} + +bool Gen31DeviceControl::set_mode_slave_impl() { + if (get_trigger_in()->is_enabled(7)) { + return false; + } + (*register_map_)["SYSTEM_CONTROL/ATIS_CONTROL"]["MASTER_MODE"] = 0x0; + (*register_map_)["SYSTEM_CONTROL/ATIS_CONTROL"]["USE_EXT_START"] = 0x1; + return true; +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/devices/gen31/gen31_digital.cpp b/hal_psee_plugins/src/devices/gen31/gen31_digital.cpp new file mode 100644 index 000000000..de4d919dd --- /dev/null +++ b/hal_psee_plugins/src/devices/gen31/gen31_digital.cpp @@ -0,0 +1,41 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include "devices/gen31/gen31_digital.h" +#include "utils/register_map.h" + +namespace Metavision { +using vfield = std::map; + +Gen31Digital::Gen31Digital(const std::shared_ptr ®ister_map, const std::string &prefix) : + prefix_(prefix), register_map_(register_map) {} + +long long Gen31Digital::get_chip_id() { + return (*register_map_)[prefix_ + "chip_id"].read_value(); +} + +void Gen31Digital::init() { + (*register_map_)[prefix_ + "clk_out_ctrl"].write_value(vfield{ + {"clk_out_en", true}, + {"clk_gate_bypass", false}, + }); +} + +void Gen31Digital::start() {} + +void Gen31Digital::stop() {} + +void Gen31Digital::destroy() { + (*register_map_)[prefix_ + "clk_out_ctrl"].write_value(vfield{ + {"clk_out_en", false}, + }); +} +} // namespace Metavision diff --git a/hal_psee_plugins/src/devices/gen31/gen31_event_rate_noise_filter_module.cpp b/hal_psee_plugins/src/devices/gen31/gen31_event_rate_noise_filter_module.cpp new file mode 100644 index 000000000..be1abd1a9 --- /dev/null +++ b/hal_psee_plugins/src/devices/gen31/gen31_event_rate_noise_filter_module.cpp @@ -0,0 +1,93 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include +#include + +#include "devices/gen31/gen31_event_rate_noise_filter_module.h" +#include "metavision/hal/facilities/i_hw_register.h" +#include "metavision/hal/utils/hal_exception.h" +#include "utils/psee_hal_plugin_error_code.h" + +namespace Metavision { + +constexpr uint32_t Gen31_EventRateNoiseFilterModule::min_time_window_us_; +constexpr uint32_t Gen31_EventRateNoiseFilterModule::max_time_window_us_; +constexpr uint32_t Gen31_EventRateNoiseFilterModule::min_event_rate_threshold_kev_s; +constexpr uint32_t Gen31_EventRateNoiseFilterModule::max_event_rate_threshold_kev_s; + +// Gen3.1 event rate noise filter class +// +// The number of events per event period is programmable via the register evt_thresh. +// Period length in ‘us’ is programmable in the period_cnt_thresh register. +// Valid values range from 1 to 1023. +// The microsecond tick can be adjusted using the “pre_cnt_thresh” (i.e. in case the sensor runs at frequency lower +// than 100MHz). Longer is the period, smoother is the event rate calculation, but higher is the latency. Using small +// “period_cnt_thresh”, on the contrary, will result in shorter latency but also shorter integration causing less +// precise event rate estimation. +// User has to program the event threshold (measured in number of event per period) below which events are not +// transmitted. The event rate supported ranges from 25kevt/s to 10Mevt/s. By default the block is configured to output +// events above 500kevt/s (50 events every 100us). The user is responsible for programming in a consistent way the +// above mentioned parameters in order to reach the best tradeoff between latency and precision. + +Gen31_EventRateNoiseFilterModule::Gen31_EventRateNoiseFilterModule(const std::shared_ptr &i_hw_register, + const std::string &prefix) : + i_hw_register_(i_hw_register), base_name_(prefix) { + if (!i_hw_register_) { + throw(HalException(PseeHalPluginErrorCode::HWRegisterNotFound, "HW Register facility is null.")); + } +} + +void Gen31_EventRateNoiseFilterModule::enable(bool enable_filter) { + get_hw_register()->write_register(base_name_ + "nfl_ctrl", "nfl_en", enable_filter); + get_event_rate_threshold(); +} + +bool Gen31_EventRateNoiseFilterModule::set_time_window(uint32_t window_length_us) { + if (window_length_us < min_time_window_us_ || window_length_us > max_time_window_us_) { + return false; + } + + get_hw_register()->write_register(base_name_ + "nfl_thresh", "period_cnt_thresh", window_length_us); + return true; +} + +uint32_t Gen31_EventRateNoiseFilterModule::get_time_window() { + return get_hw_register()->read_register(base_name_ + "nfl_thresh", "period_cnt_thresh"); +} + +bool Gen31_EventRateNoiseFilterModule::set_event_rate_threshold(uint32_t threshold_kev_s) { + if (threshold_kev_s < min_event_rate_threshold_kev_s || threshold_kev_s > max_event_rate_threshold_kev_s) { + return false; + } + + set_time_window(max_time_window_us_); // Maximum time resolution to ensures we are closest to the user input + // threshold (1023 us latency) though it is invisible in term of user + // experience. + + auto min_event_count_in_time_shifting_window = + std::round((threshold_kev_s / 1000.) * get_time_window()); // ev per microseconds + get_hw_register()->write_register(base_name_ + "nfl_thresh", "evt_thresh", min_event_count_in_time_shifting_window); + get_event_rate_threshold(); + return true; +} + +uint32_t Gen31_EventRateNoiseFilterModule::get_event_rate_threshold() { + current_threshold_kev_s_ = std::round( + (get_hw_register()->read_register(base_name_ + "nfl_thresh", "evt_thresh") * 1000.) / get_time_window()); + return current_threshold_kev_s_; +} + +const std::shared_ptr &Gen31_EventRateNoiseFilterModule::get_hw_register() { + return i_hw_register_; +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/devices/gen31/gen31_evk1_device.cpp b/hal_psee_plugins/src/devices/gen31/gen31_evk1_device.cpp new file mode 100644 index 000000000..73627f1a9 --- /dev/null +++ b/hal_psee_plugins/src/devices/gen31/gen31_evk1_device.cpp @@ -0,0 +1,39 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include "utils/register_map.h" +#include "utils/regmap_data.h" +#include "devices/utils/register_maps/common/ccam2_system_monitor_trigger_ext_adc.h" +#include "devices/utils/register_maps/common/ccam3_single_gen3_tep_register_control_registermap.h" +#include "devices/utils/register_maps/common/imu_registermap.h" +#include "devices/utils/register_maps/common/system_config_registermap.h" +#include "devices/gen31/register_maps/ccam3_single_gen31_sensorif_registermap.h" +#include "devices/utils/register_maps/common/stereo_fx3_hostif_registermap.h" + +namespace Metavision { + +void build_gen31_register_map(RegisterMap ®map) { + std::vector> CCAM3SingleGen31RegisterMap_init = { + std::make_tuple(CCAM2SystemMonitorTriggerExtADC, CCAM2SystemMonitorTriggerExtADCSize, "SYSTEM_MONITOR", 64), + std::make_tuple(ccam3_single_gen3_TEPRegisterControlRegisterMap, + ccam3_single_sisley_TEPRegisterControlRegisterMapSize, "SYSTEM_CONTROL", 0), + std::make_tuple(IMURegisterMap, IMURegisterMapSize, "IMU", 6400), + std::make_tuple(SystemConfigRegisterMap, SystemConfigRegisterMapSize, "SYSTEM_CONFIG", 2048), + std::make_tuple(ccam3_single_gen31_Gen31SensorIFRegisterMap, ccam3_single_gen31_Gen31SensorIFRegisterMapSize, + "SENSOR_IF", 512), + std::make_tuple(stereo_FX3HostIFRegisterMap, stereo_FX3HostIFRegisterMapSize, "FX3_HOST_IF", 5120), + + }; + + init_device_regmap(regmap, CCAM3SingleGen31RegisterMap_init); +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/devices/gen31/gen31_evk1_fpga.cpp b/hal_psee_plugins/src/devices/gen31/gen31_evk1_fpga.cpp new file mode 100644 index 000000000..97153f7a0 --- /dev/null +++ b/hal_psee_plugins/src/devices/gen31/gen31_evk1_fpga.cpp @@ -0,0 +1,69 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include "devices/gen31/gen31_evk1_fpga.h" +#include "geometries/vga_geometry.h" +#include "geometries/hvga_geometry.h" +#include "utils/register_map.h" + +namespace Metavision { + +Gen31Evk1Fpga::Gen31Evk1Fpga(const std::shared_ptr ®map, bool is_em) : + register_map_(regmap), + sys_ctrl_(register_map_, "SYSTEM_CONTROL/"), + sensor_if_(register_map_, "SENSOR_IF/GEN31_IF/"), + is_em_(is_em) {} + +void Gen31Evk1Fpga::init() { + sys_ctrl_.sensor_atis_control_clear(); + sys_ctrl_.soft_reset("TRIGGERS"); + sys_ctrl_.sensor_prepowerup(); + sys_ctrl_.timebase_config(false, true); + // TODO: configure IODELAY + // self.sensor_if__ioctrl = SensorIfIoctrl(sensor_if__ioctrl_rmap) + sys_ctrl_.host_if_control(true); + sys_ctrl_.no_blocking_control(true); + if (is_em_) { + sys_ctrl_.hvga_remap_control(true); + (*register_map_)["SYSTEM_CONTROL/OUT_OF_FOV_FILTER_X"]["WIDTH"] = HVGAGeometry::width_; + (*register_map_)["SYSTEM_CONTROL/OUT_OF_FOV_FILTER_X"]["ORIGIN"] = 0; + (*register_map_)["SYSTEM_CONTROL/OUT_OF_FOV_FILTER_Y"]["HEIGHT"] = HVGAGeometry::height_; + (*register_map_)["SYSTEM_CONTROL/OUT_OF_FOV_FILTER_X"]["ORIGIN"] = 0; + (*register_map_)["SYSTEM_CONTROL/CCAM2_CONTROL"]["ENABLE_OUT_OF_FOV"] = true; + } else { + sys_ctrl_.hvga_remap_control(false); + (*register_map_)["SYSTEM_CONTROL/OUT_OF_FOV_FILTER_X"]["WIDTH"] = VGAGeometry::width_; + (*register_map_)["SYSTEM_CONTROL/OUT_OF_FOV_FILTER_X"]["ORIGIN"] = 0; + (*register_map_)["SYSTEM_CONTROL/OUT_OF_FOV_FILTER_Y"]["HEIGHT"] = VGAGeometry::height_; + (*register_map_)["SYSTEM_CONTROL/OUT_OF_FOV_FILTER_X"]["ORIGIN"] = 0; + (*register_map_)["SYSTEM_CONTROL/CCAM2_CONTROL"]["ENABLE_OUT_OF_FOV"] = true; + } + + sensor_if_.sensor_turn_on_clock(); + sys_ctrl_.sensor_powerup(); + (*register_map_)["SYSTEM_MONITOR/TEMP_VCC_MONITOR/EXT_TEMP_CONTROL"]["EXT_TEMP_MONITOR_SPI_EN"] = true; +} + +void Gen31Evk1Fpga::start() { + sys_ctrl_.timebase_control(true); +} + +void Gen31Evk1Fpga::stop() { + sys_ctrl_.timebase_control(false); +} + +void Gen31Evk1Fpga::destroy() { + sys_ctrl_.sensor_prepowerdown(); + sensor_if_.sensor_turn_off_clock(); + sys_ctrl_.sensor_powerdown(); + sys_ctrl_.soft_reset("TRIGGERS"); +} +} // namespace Metavision diff --git a/hal_psee_plugins/src/devices/gen31/gen31_evk2_interface_control.cpp b/hal_psee_plugins/src/devices/gen31/gen31_evk2_interface_control.cpp new file mode 100644 index 000000000..fd2a0348e --- /dev/null +++ b/hal_psee_plugins/src/devices/gen31/gen31_evk2_interface_control.cpp @@ -0,0 +1,37 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include "devices/gen31/gen31_evk2_interface_control.h" +#include "utils/register_map.h" + +namespace Metavision { +namespace { +std::string REGBANK_PREFIX = "PSEE/CCAM5_IF/CONTROL/"; +} // namespace + +Gen31Evk2InterfaceControl::Gen31Evk2InterfaceControl(const std::shared_ptr ®map) : + register_map_(regmap) {} + +void Gen31Evk2InterfaceControl::enable(bool enable) { + // Enable bridge if + (*register_map_)[REGBANK_PREFIX + "CONTROL"]["ENABLE"].write_value(enable); +} + +void Gen31Evk2InterfaceControl::bypass(bool bypass) { + // Bypass bridge if + (*register_map_)[REGBANK_PREFIX + "CONTROL"]["BYPASS"].write_value(bypass); +} + +void Gen31Evk2InterfaceControl::gen_last(bool enable) { + (*register_map_)[REGBANK_PREFIX + "CONTROL"]["GEN_LAST"].write_value(enable); +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/devices/gen31/gen31_evk2_regmap_builder.cpp b/hal_psee_plugins/src/devices/gen31/gen31_evk2_regmap_builder.cpp new file mode 100644 index 000000000..fa5268a03 --- /dev/null +++ b/hal_psee_plugins/src/devices/gen31/gen31_evk2_regmap_builder.cpp @@ -0,0 +1,29 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include + +#include "devices/gen31/gen31_evk2_regmap_builder.h" +#include "utils/regmap_data.h" +#include "devices/gen31/register_maps/gen31_evk2_registermap.h" + +namespace Metavision { + +void build_gen31_evk2_register_map(RegisterMap ®map) { + std::vector> Gen31Evk2RegisterMap_init = { + std::make_tuple(Gen31Evk2RegisterMap, Gen31Evk2RegisterMapSize, "PSEE", 0), + }; + + init_device_regmap(regmap, Gen31Evk2RegisterMap_init); + regmap.dump(); +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/devices/gen31/gen31_evk2_tz_device.cpp b/hal_psee_plugins/src/devices/gen31/gen31_evk2_tz_device.cpp new file mode 100644 index 000000000..8892274ba --- /dev/null +++ b/hal_psee_plugins/src/devices/gen31/gen31_evk2_tz_device.cpp @@ -0,0 +1,199 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifdef _MSC_VER +#define NOMINMAX +#endif + +#include "devices/gen31/gen31_evk2_tz_device.h" +#include "devices/utils/device_system_id.h" +#include "boards/treuzell/tz_libusb_board_command.h" +#include "devices/common/issd.h" +#include "devices/gen31/gen31_evk2_issd.h" +#include "devices/gen31/gen31_event_rate_noise_filter_module.h" +#include "devices/gen31/gen31_ll_biases.h" +//#include "devices/gen31/gen31_pattern_generator.h" +#include "devices/gen31/gen31_roi_command.h" +#include "devices/gen31/gen31_evk2_regmap_builder.h" +#include "devices/common/evk2_tz_trigger_event.h" +#include "devices/common/evk2_tz_trigger_out.h" +#include "facilities/psee_hw_register.h" +#include "geometries/vga_geometry.h" +#include "metavision/hal/facilities/i_events_stream.h" +#include "metavision/hal/utils/device_builder.h" +#include "plugin/psee_plugin.h" +#include + +namespace Metavision { +namespace { +std::string ROOT_PREFIX = "PSEE/"; +std::string CCAM5_PREFIX = ROOT_PREFIX + "CCAM5_IF/CCAM5/"; +std::string SENSOR_PREFIX = CCAM5_PREFIX + "GEN31/"; +} // namespace + +TzEvk2Gen31::TzEvk2Gen31(std::shared_ptr cmd, uint32_t dev_id, std::shared_ptr parent) : + TzDevice(cmd, dev_id, parent), + TzPseeVideo(cmd, dev_id, parent), + TzDeviceWithRegmap(build_gen31_evk2_register_map), + TzIssdDevice(gen31_evk2_sequence), + sys_ctrl_(register_map, ROOT_PREFIX) { + (*register_map)[CCAM5_PREFIX + "SYSTEM_MONITOR/TEMP_VCC_MONITOR/EXT_TEMP_CONTROL"]["EXT_TEMP_MONITOR_SPI_EN"] + .write_value(1); + (*register_map)[SENSOR_PREFIX + "lifo_ctrl"]["lifo_en"] = 0x1; + sync_mode_ = I_DeviceControl::SyncMode::STANDALONE; +} + +std::shared_ptr TzEvk2Gen31::build(std::shared_ptr cmd, uint32_t dev_id, + std::shared_ptr parent) { + if (can_build(cmd, dev_id)) + return std::make_shared(cmd, dev_id, parent); + else + return nullptr; +} + +bool TzEvk2Gen31::can_build(std::shared_ptr cmd, uint32_t dev_id) { + return (cmd->read_device_register(dev_id, 0x800)[0] == SYSTEM_EVK2_GEN31); +} + +void TzEvk2Gen31::spawn_facilities(DeviceBuilder &device_builder) { + auto hw_register = device_builder.add_facility(std::make_unique(register_map)); + device_builder.add_facility(std::make_unique(hw_register, SENSOR_PREFIX)); + device_builder.add_facility(std::make_unique(hw_register, SENSOR_PREFIX)); + + auto geometry = VGAGeometry(); + device_builder.add_facility( + std::make_unique(geometry.get_width(), geometry.get_height(), register_map, SENSOR_PREFIX)); + // those facilities are not exposed in the public API yet + // device_builder.add_facility(std::make_unique(register_map)); + + device_builder.add_facility(std::make_unique(register_map, "PSEE/", shared_from_this())); + device_builder.add_facility(std::make_unique( + register_map, "PSEE/", std::dynamic_pointer_cast(shared_from_this()))); +} + +TzEvk2Gen31::~TzEvk2Gen31() {} + +void TzEvk2Gen31::start() { + TzIssdDevice::start(); +} + +void TzEvk2Gen31::stop() { + TzIssdDevice::stop(); +} + +long long TzEvk2Gen31::get_sensor_id() { + return (*register_map)[SENSOR_PREFIX + "chip_id"].read_value(); +} + +TzDevice::StreamFormat TzEvk2Gen31::get_output_format() { + return {std::string("EVT2"), std::make_unique()}; +} + +long TzEvk2Gen31::get_system_id() { + return cmd->read_device_register(tzID, 0x800)[0]; +} + +bool TzEvk2Gen31::set_mode_standalone() { + /* time_base_config(ext_sync, master, master_sel, fwd_up, fwd_down) + - ext_sync = 1 --| + - master = 1 ----> generate internal sync_out + - master_sel = 0 -> Don't care since master = 1. Time-base counter is auto-generated. + - fwd_up = 0 -> IOs sync_out = 0 + - fwd_down = 1 -> ccam5 sync_in = internal sync_out + */ + sys_ctrl_.time_base_config(true, true, false, false, true); + + if (!sys_ctrl_.is_trigger_out_enabled()) { + // Disabled sync out IO + sys_ctrl_.sync_out_pin_control(false); + sys_ctrl_.sync_out_pin_config(false); + } + sync_mode_ = I_DeviceControl::SyncMode::STANDALONE; + return true; +} + +bool TzEvk2Gen31::set_mode_master() { + /* time_base_config(ext_sync, master, master_sel, fwd_up, fwd_down) + - ext_sync = 1 --| + - master = 1 ----> generate internal sync_out + - master_sel = 0 -> Don't care since master = 1. Time-base counter is auto-generated. + - fwd_up = 1 -> IOs sync_out = internal sync_out + - fwd_down = 1 -> ccam5 sync_in = internal sync_out + */ + if (sys_ctrl_.is_trigger_out_enabled()) { + MV_HAL_LOG_WARNING() << "Switching to master sync mode. Trigger out will be overridden."; + } + + sys_ctrl_.time_base_config(true, true, false, true, true); + sys_ctrl_.sync_out_pin_config(false); + sys_ctrl_.sync_out_pin_control(true); + sync_mode_ = I_DeviceControl::SyncMode::MASTER; + return true; +} + +bool TzEvk2Gen31::set_mode_slave() { + /* time_base_config(ext_sync, master, master_sel, fwd_up, fwd_down) + - ext_sync = 1 --| + - master = 0 ----> Use sync_in from mux master_sel + - master_sel = 1 -> internal sync_in = IOs sync_in + - fwd_up = 0 -> IOs sync_out = 0 + - fwd_down = 1 -> ccam5 sync_in = IOs sync_in + */ + sys_ctrl_.time_base_config(true, false, true, false, true); + + if (!sys_ctrl_.is_trigger_out_enabled()) { + // Disabled sync out IO + sys_ctrl_.sync_out_pin_control(false); + sys_ctrl_.sync_out_pin_config(false); + } + sync_mode_ = I_DeviceControl::SyncMode::SLAVE; + return true; +} + +I_DeviceControl::SyncMode TzEvk2Gen31::get_mode() { + return sync_mode_; +} + +int TzEvk2Gen31::get_temperature() { + auto r = (*register_map)[CCAM5_PREFIX + "SYSTEM_MONITOR/TEMP_VCC_MONITOR/EVK_EXT_TEMP_VALUE"].read_value(); + if (r != decltype(r)(-1)) + return r / 4096; + return -1; +} + +int TzEvk2Gen31::get_illumination() { + (*register_map)[SENSOR_PREFIX + "lifo_ctrl"].write_value(0); + (*register_map)[SENSOR_PREFIX + "lifo_ctrl"]["lifo_en"] = 1; + (*register_map)[SENSOR_PREFIX + "lifo_ctrl"]["lifo_cnt_en"] = 1; + + bool valid = false; + uint16_t retries = 0; + uint32_t counter = 0; + while (valid == false && retries < 10) { + auto reg_val = (*register_map)[SENSOR_PREFIX + "lifo_ctrl"].read_value(); + reg_val = (*register_map)[SENSOR_PREFIX + "lifo_ctrl"].read_value(); + valid = reg_val & 1 << 29; + counter = reg_val & ((1 << 27) - 1); + retries += 1; + } + + if (!valid) { + return -1; + } + + if (counter != decltype(counter)(-1)) { + float t = float(counter) / 100.; + return powf(10, 3.5 - logf(t * 0.37) / logf(10)); + } + return -1; +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/devices/gen31/gen31_evk3_device.cpp b/hal_psee_plugins/src/devices/gen31/gen31_evk3_device.cpp new file mode 100644 index 000000000..0ac594369 --- /dev/null +++ b/hal_psee_plugins/src/devices/gen31/gen31_evk3_device.cpp @@ -0,0 +1,39 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include "utils/register_map.h" +#include "utils/regmap_data.h" + +namespace Metavision { +void build_gen31_evk3_register_map(RegisterMap ®map) { +#include "devices/gen31/register_maps/ccam5_single_gen31_system_control_registermap.h" +#include "devices/utils/register_maps/common/ccam2_system_monitor_trigger_ext_adc.h" +#include "devices/utils/register_maps/common/system_config_registermap.h" +#include "devices/gen31/register_maps/ccam3_single_gen31_sensorif_registermap.h" +#include "devices/utils/register_maps/common/mipitx_registermap.h" +#include "devices/utils/register_maps/common/spi_flash_master_registermap.h" + + std::vector> CCAM5SingleGen31RegisterMap_init = { + std::make_tuple(ccam5_single_gen31_SystemControlRegisterMap, ccam5_single_gen31_SystemControlRegisterMapSize, + "SYSTEM_CONTROL", 0), + std::make_tuple(CCAM2SystemMonitorTriggerExtADC, CCAM2SystemMonitorTriggerExtADCSize, "SYSTEM_MONITOR", 0x40), + + std::make_tuple(ccam3_single_gen31_Gen31SensorIFRegisterMap, ccam3_single_gen31_Gen31SensorIFRegisterMapSize, + "SENSOR_IF", 0x200), + std::make_tuple(SystemConfigRegisterMap, SystemConfigRegisterMapSize, "SYSTEM_CONFIG", 0x800), + std::make_tuple(MIPITXRegisterMap, MIPITXRegisterMapSize, "MIPI_TX", 0x1500), + std::make_tuple(SPIFlashMasterRegisterMap, SPIFlashMasterRegisterMapSize, "FLASH", 0x1600), + + }; + + init_device_regmap(regmap, CCAM5SingleGen31RegisterMap_init); +} +} // namespace Metavision diff --git a/hal_psee_plugins/src/devices/gen31/gen31_fx3_device_control.cpp b/hal_psee_plugins/src/devices/gen31/gen31_fx3_device_control.cpp new file mode 100644 index 000000000..aeeff9c3f --- /dev/null +++ b/hal_psee_plugins/src/devices/gen31/gen31_fx3_device_control.cpp @@ -0,0 +1,59 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include "metavision/hal/utils/hal_log.h" +#include "devices/gen31/gen31_fx3_device_control.h" +#include "boards/utils/psee_libusb_board_command.h" +#include "devices/gen31/gen31_evk1_fpga.h" +#include "devices/gen31/gen31_sensor.h" +#include "utils/register_map.h" + +namespace Metavision { +namespace { +std::string SENSOR_PREFIX = "SENSOR_IF/GEN31/"; +} // namespace + +Gen31Fx3DeviceControl::Gen31Fx3DeviceControl(const std::shared_ptr ®ister_map) : + Gen31DeviceControl(register_map, std::make_shared(register_map, is_gen31EM(*register_map)), + std::make_shared(register_map, SENSOR_PREFIX, is_gen31EM(*register_map))) {} + +void Gen31Fx3DeviceControl::enable_interface(bool state) { + (*register_map_)["SYSTEM_CONTROL/CCAM2_CONTROL"]["HOST_IF_EN"] = state; +} + +void Gen31Fx3DeviceControl::start_impl() { + bool gen31EM = is_gen31EM(); + start_camera_common(gen31EM); +} + +void Gen31Fx3DeviceControl::stop_impl() { + stop_camera_common(); +} + +std::string Gen31Fx3DeviceControl::get_sensor_prefix() const { + return SENSOR_PREFIX; +} + +void Gen31Fx3DeviceControl::initialize() { + Gen31DeviceControl::initialize(); + destroy_camera(); + fpga_init(); + sensor_init(); +} + +void Gen31Fx3DeviceControl::destroy() { + destroy_camera(); + Gen31DeviceControl::destroy(); +} + +void Gen31Fx3DeviceControl::reset_ts_internal() {} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/devices/gen31/gen31_fx3_facilities_builder.cpp b/hal_psee_plugins/src/devices/gen31/gen31_fx3_facilities_builder.cpp new file mode 100644 index 000000000..7e28e0ca9 --- /dev/null +++ b/hal_psee_plugins/src/devices/gen31/gen31_fx3_facilities_builder.cpp @@ -0,0 +1,90 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifdef _MSC_VER +#define NOMINMAX +#endif + +#include "boards/fx3/fx3_camera_discovery.h" +#include "boards/fx3/fx3_hw_identification.h" +#include "boards/fx3/fx3_libusb_board_command.h" +#include "boards/utils/psee_libusb_data_transfer.h" +#include "decoders/evt2/evt2_decoder.h" +#include "devices/gen31/gen31_event_rate_noise_filter_module.h" +#include "devices/gen31/gen31_fx3_device_control.h" +#include "devices/gen31/gen31_fx3_facilities_builder.h" +#include "devices/gen31/gen31_ll_biases.h" +#include "devices/gen31/gen31_monitoring.h" +#include "devices/gen31/gen31_pattern_generator.h" +#include "devices/gen31/gen31_roi_command.h" +#include "devices/gen31/gen31_trigger_event.h" +#include "devices/common/ccam_trigger_out.h" +#include "devices/gen31/register_maps/gen31_evk1_device.h" +#include "facilities/psee_hw_register.h" +#include "geometries/vga_geometry.h" +#include "metavision/hal/facilities/i_events_stream.h" +#include "metavision/hal/utils/device_builder.h" +#include "metavision/sdk/base/events/event_cd.h" +#include "metavision/sdk/base/events/event_ext_trigger.h" +#include "plugin/psee_plugin.h" + +namespace Metavision { + +bool build_gen31_fx3_device(DeviceBuilder &device_builder, const DeviceBuilderParameters &device_builder_params, + const DeviceConfig &device_config) { + Fx3CameraDiscovery::DeviceBuilderParameters params = + static_cast(device_builder_params); + + auto board_cmd = params.board_cmd; + auto register_map = std::make_shared(); + build_gen31_register_map(*register_map); + register_map->set_read_cb([board_cmd](uint32_t address) { + board_cmd->load_register(address); + return board_cmd->read_register(address); + }); + register_map->set_write_cb([board_cmd](uint32_t address, uint32_t v) { board_cmd->write_register(address, v); }); + + auto hw_identification = device_builder.add_facility(std::make_unique( + device_builder.get_plugin_software_info(), board_cmd, false, + (long)Gen31Fx3DeviceControl::get_sensor_id(*register_map), get_psee_plugin_integrator_name())); + + auto geometry = device_builder.add_facility(std::make_unique()); + auto cd_event_decoder = device_builder.add_facility(std::make_unique>()); + auto ext_trigger_event_decoder = device_builder.add_facility(std::make_unique>()); + auto decoder = + device_builder.add_facility(std::make_unique(false, cd_event_decoder, ext_trigger_event_decoder)); + auto events_stream = device_builder.add_facility(std::make_unique( + std::make_unique(board_cmd, decoder->get_raw_event_size_bytes()), hw_identification)); + + auto gen31_device_control = device_builder.add_facility(std::make_unique(register_map)); + + device_builder.add_facility(std::make_unique(register_map, gen31_device_control)); + if (board_cmd->get_system_version() >= 0x30000) { + device_builder.add_facility(std::make_unique(register_map, gen31_device_control, "")); + } + + auto sensor_prefix = gen31_device_control->get_sensor_prefix(); + auto hw_register = device_builder.add_facility(std::make_unique(register_map)); + device_builder.add_facility(std::make_unique(hw_register, sensor_prefix)); + device_builder.add_facility(std::make_unique(hw_register, sensor_prefix)); + + device_builder.add_facility(std::make_unique(hw_register)); + + device_builder.add_facility( + std::make_unique(geometry->get_width(), geometry->get_height(), register_map, sensor_prefix)); + + // those facilities are not exposed in the public API yet + // device_builder.add_facility(std::make_unique(register_map)); + + return true; +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/devices/gen31/gen31_ll_biases.cpp b/hal_psee_plugins/src/devices/gen31/gen31_ll_biases.cpp new file mode 100644 index 000000000..9c6fa3de9 --- /dev/null +++ b/hal_psee_plugins/src/devices/gen31/gen31_ll_biases.cpp @@ -0,0 +1,571 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include +#include +#include +#include + +#include "metavision/hal/utils/hal_log.h" +#include "devices/gen31/gen31_ll_biases.h" +#include "metavision/hal/facilities/i_hw_register.h" +#include "metavision/hal/utils/hal_exception.h" +#include "utils/psee_hal_plugin_error_code.h" +#include "utils/psee_hal_utils.h" + +// bias_diff, bias_diff_on, bias_diff_off, bias fo, bias_hpf, bias_refr, bias_pr +namespace { +class Gen31LLBias { +public: + enum class BiasType { + PMOSThick = 0, + PMOSThin = 1, + NMOSThick = 2, + NMOSThin = 3, + RailP = 4, + }; + enum class Mode { + Current = 0, + Voltage = 1, + }; + + Gen31LLBias(long min_value, long max_value, Mode mode, bool modifiable, std::string register_name, BiasType btype) : + register_name_(register_name), + mode_(mode), + btype_(btype), + modifiable_(modifiable), + min_value_(min_value), + max_value_(max_value) {} + + ~Gen31LLBias() {} + Mode mode() const { + return mode_; + } + BiasType get_bias_type() const { + return btype_; + } + bool is_modifiable() const { + return modifiable_; + } + const std::string &get_register_name() const { + return register_name_; + } + bool is_in_range(long value) const { + return Metavision::is_expert_mode_enabled() || (min_value_ <= value && value <= max_value_); + } + +private: + std::string register_name_; + Mode mode_ = Mode::Voltage; + BiasType btype_; + bool modifiable_; + + const long min_value_; + const long max_value_; +}; + +struct CCam3BiasEncoding { + uint32_t voltage_value_ : 8; + uint32_t current_value_ : 13; + + uint32_t buffer_value_ : 6; + uint32_t type_ : 1; // Current Voltage + uint32_t cas_code_ : 1; + uint32_t polarity_ : 1; + uint32_t bias_enable_ : 1; + uint32_t pad_enable_ : 1; + + CCam3BiasEncoding() { + pad_enable_ = 0; + bias_enable_ = true; + polarity_ = 1; + cas_code_ = 1; + type_ = 0x1; + buffer_value_ = 0x8; // bias_enable_ ? 0x08 : 0x01; + current_value_ = 1; + voltage_value_ = 0; + } + struct Cmp_VDac { + bool operator()(const CCam3BiasEncoding &c1, const CCam3BiasEncoding &c2) const { + if (c1.polarity_ < c2.polarity_) + return true; + if (c1.polarity_ > c2.polarity_) + return false; + if (c1.cas_code_ < c2.cas_code_) + return true; + if (c1.cas_code_ > c2.cas_code_) + return false; + return c1.voltage_value_ < c2.voltage_value_; + } + }; + struct Cmp_IDac { + bool operator()(const CCam3BiasEncoding &c1, const CCam3BiasEncoding &c2) const { + if (c1.polarity_ < c2.polarity_) + return true; + if (c1.polarity_ > c2.polarity_) + return false; + if (c1.cas_code_ < c2.cas_code_) + return true; + if (c1.cas_code_ > c2.cas_code_) + return false; + return c1.current_value_ < c2.current_value_; + } + }; +}; + +union BiasEncodingCast { + CCam3BiasEncoding bias_encoding; + long raw; + BiasEncodingCast() { + raw = 0; + } +}; + +// {"bias_latchout_or_pu", new Gen31Bias("bias_latchout_or_pu", 1250, {0, 1800}, Bias::Mode::Voltage, +// Bias::standard, false, 0, Gen31Bias::BiasType::PMOSThin, false)}, + +std::map &get_gen31_biases_map() { + static std::map biases_map{ + {"bias_diff_off", + Gen31LLBias(0, 1800, Gen31LLBias::Mode::Voltage, true, "bgen_19", Gen31LLBias::BiasType::NMOSThin)}, + {"bias_diff_on", + Gen31LLBias(0, 1800, Gen31LLBias::Mode::Voltage, true, "bgen_20", Gen31LLBias::BiasType::NMOSThin)}, + {"bias_diff", + Gen31LLBias(200, 400, Gen31LLBias::Mode::Voltage, false, "bgen_21", Gen31LLBias::BiasType::NMOSThin)}, + {"bias_fo", Gen31LLBias(1250, 1800, Gen31LLBias::Mode::Current, true, "bgen_22", Gen31LLBias::BiasType::RailP)}, + {"bias_pr", + Gen31LLBias(975, 1800, Gen31LLBias::Mode::Current, true, "bgen_23", Gen31LLBias::BiasType::PMOSThick)}, + {"bias_refr", + Gen31LLBias(1300, 1800, Gen31LLBias::Mode::Current, true, "bgen_24", Gen31LLBias::BiasType::NMOSThin)}, + {"bias_hpf", + Gen31LLBias(900, 1800, Gen31LLBias::Mode::Current, true, "bgen_25", Gen31LLBias::BiasType::PMOSThick)}, + }; + return biases_map; +} + +#include "gen3_idac_n_thick.calib.cc" +#include "gen3_idac_n_thin.calib.cc" +#include "gen3_idac_p_thick.calib.cc" +#include "gen3_idac_p_thin.calib.cc" +#include "gen3_idac_railp.calib.cc" +#include "vdac18_8m1.calib.cc" + +std::map vdac18_map_s; +std::map inv_vdac18_map_s; + +std::map load_vdac18_calibration(std::istream &ifs, bool is_voltage, long long config) { + std::map calibration_data; + char buf[256]; + + // Read data + unsigned int mv_value, dec_value, bin_value, pn_value, cas_value, prev_value, next_value; + while (!ifs.eof()) { + ifs.getline(buf, sizeof(buf)); + if (buf[0] == '%') { + continue; + } + if (ifs.gcount() != 0) { + sscanf(buf, "%u , %u , %u , %u , %u , %u , %u", &mv_value, &dec_value, &prev_value, &next_value, &pn_value, + &cas_value, &bin_value); + long long bin_data = (0LL << 31) // bias enable + + (1LL << 30) // output enable + + ((pn_value == 1 ? 1LL : 0LL) << 29) + ((cas_value == 1 ? 1LL : 0LL) << 28) + + ((is_voltage ? 1LL : 0LL) << 27) + (config << 21) + bin_value; + + calibration_data.insert({(long)mv_value, bin_data}); + + } else { + continue; + } + } + + return calibration_data; +} + +bool load_vdac18_calibration(std::map &vdac18_map_s) { + if (vdac18_map_s.size() == 0) { + std::string str(vdac18_8m1); + std::istringstream mistr(str); + vdac18_map_s = load_vdac18_calibration(mistr, true, 8); + } + + if (vdac18_map_s.size() == 0) { + MV_HAL_LOG_ERROR() << "Failed loading vdac calibration."; + return false; + } + + return true; +} + +void init_map_vdac18() { + if (vdac18_map_s.empty()) { + load_vdac18_calibration(vdac18_map_s); + } + if (inv_vdac18_map_s.empty()) { + for (auto &v : vdac18_map_s) { + CCam3BiasEncoding c; + c.current_value_ = 0x0; + c.voltage_value_ = (v.second >> 0) & 0xFF; + c.type_ = 1; + c.cas_code_ = (v.second >> 28) & 1; + c.polarity_ = 0; + if (inv_vdac18_map_s.find(c) == inv_vdac18_map_s.end()) { + inv_vdac18_map_s[c] = v.first; + } + c.polarity_ = 1; + if (inv_vdac18_map_s.find(c) == inv_vdac18_map_s.end()) { + inv_vdac18_map_s[c] = v.first; + } + } + } +} + +long long get_vdac18_values(long value) { + if (vdac18_map_s.empty()) { + init_map_vdac18(); + } + return vdac18_map_s[value]; +} +int get_inv_vdac18_values(CCam3BiasEncoding value) { + if (inv_vdac18_map_s.empty()) { + init_map_vdac18(); + } + if (inv_vdac18_map_s.find(value) != inv_vdac18_map_s.end()) + return inv_vdac18_map_s[value]; + return -1; +} + +struct CodeGen31IDAC { + int code_; + enum Mos { P, N } mos_; + bool cas_; +}; + +std::map s_p_thin_mvtocode; +std::map s_p_thick_mvtocode; +std::map s_n_thin_mvtocode; +std::map s_n_thick_mvtocode; +std::map s_railp_mvtocode; + +std::map s_inv_p_thin_mvtocode; +std::map s_inv_p_thick_mvtocode; +std::map s_inv_n_thin_mvtocode; +std::map s_inv_n_thick_mvtocode; +std::map s_inv_railp_mvtocode; + +bool load_idac_v_to_code(std::istream &ifs, std::map &mvtocode) { + mvtocode.clear(); + while (ifs) { + std::string tmp; + std::getline(ifs, tmp); + if (tmp.empty()) { + break; + } + std::istringstream istr(tmp); + int v; + CodeGen31IDAC codeidac; + istr >> v; + istr >> codeidac.code_; + std::string idac; + istr >> idac; + if (idac == "PCas") { + codeidac.mos_ = CodeGen31IDAC::P; + codeidac.cas_ = true; + } else if (idac == "PwoCas") { + codeidac.mos_ = CodeGen31IDAC::P; + codeidac.cas_ = false; + } else if (idac == "NCas") { + codeidac.mos_ = CodeGen31IDAC::N; + codeidac.cas_ = true; + } else if (idac == "NwoCas") { + codeidac.mos_ = CodeGen31IDAC::N; + codeidac.cas_ = false; + } else if (idac == "RailP") { + codeidac.mos_ = CodeGen31IDAC::N; + codeidac.cas_ = false; + } else { + break; + } + mvtocode[v] = codeidac; + } + return mvtocode.size() == 1801; +} + +bool load_idac_v_to_code(const char *embeded_calib, std::map &mvtocode, + std::map &inv_map) { + std::string str(embeded_calib); + std::istringstream mistr(str); + if (!load_idac_v_to_code(mistr, mvtocode)) { + MV_HAL_LOG_ERROR() << "Error loading internal calibration"; + return false; + } + for (auto &v : mvtocode) { + CCam3BiasEncoding c; + + CodeGen31IDAC codeidac = v.second; + c.current_value_ = codeidac.code_; + c.voltage_value_ = 0; + c.type_ = 0; + c.cas_code_ = !codeidac.cas_; + c.polarity_ = codeidac.mos_ == CodeGen31IDAC::N; + c.buffer_value_ = 0x08; + + if (inv_map.find(c) == inv_map.end()) { + inv_map[c] = v.first; + } + c.polarity_ = 1; + if (inv_map.find(c) == inv_map.end()) { + inv_map[c] = v.first; + } + } + + return true; +} + +void init_map_idac() { + if (s_p_thin_mvtocode.empty()) { + if (!load_idac_v_to_code(gen3_idac_p_thin, s_p_thin_mvtocode, s_inv_p_thin_mvtocode)) { + MV_HAL_LOG_ERROR() << "Unable to open gen3_idac_p_thin.calib"; + } + } + if (s_n_thin_mvtocode.empty()) { + if (!load_idac_v_to_code(gen3_idac_n_thin, s_n_thin_mvtocode, s_inv_n_thin_mvtocode)) { + MV_HAL_LOG_ERROR() << "Unable to open gen3_idac_n_thin.calib"; + } + } + if (s_p_thick_mvtocode.empty()) { + if (!load_idac_v_to_code(gen3_idac_p_thick, s_p_thick_mvtocode, s_inv_p_thick_mvtocode)) { + MV_HAL_LOG_ERROR() << "Unable to open gen3_idac_p_thick.calib"; + } + } + if (s_n_thick_mvtocode.empty()) { + if (!load_idac_v_to_code(gen3_idac_n_thick, s_n_thick_mvtocode, s_inv_n_thick_mvtocode)) { + MV_HAL_LOG_ERROR() << "Unable to open gen3_idac_n_thick.calib"; + } + } + if (s_railp_mvtocode.empty()) { + if (!load_idac_v_to_code(gen3_idac_railp, s_railp_mvtocode, s_inv_railp_mvtocode)) { + MV_HAL_LOG_ERROR() << "Unable to open gen3_idac_railp.calib"; + } + } +} + +int get_inv_idac_values(CCam3BiasEncoding value, + const std::map &inv_map) { + init_map_idac(); + auto it = inv_map.find(value); + if (it == inv_map.end()) + return -1; + return it->second; +} + +long get_ccam3_gen31_bias_encoding(const Gen31LLBias &bias, int bias_value) { + // if idacsisley an,d current mode we read the encode from a specikic file + init_map_idac(); + std::map *mvtocode = NULL; + switch (bias.get_bias_type()) { + case Gen31LLBias::BiasType::PMOSThin: + mvtocode = &s_p_thin_mvtocode; + break; + case Gen31LLBias::BiasType::PMOSThick: + mvtocode = &s_p_thick_mvtocode; + break; + case Gen31LLBias::BiasType::NMOSThin: + mvtocode = &s_n_thin_mvtocode; + break; + case Gen31LLBias::BiasType::NMOSThick: + mvtocode = &s_n_thick_mvtocode; + break; + case Gen31LLBias::BiasType::RailP: + mvtocode = &s_railp_mvtocode; + break; + default: + MV_HAL_LOG_WARNING() << "Unknown bias type"; + } + + BiasEncodingCast encoder; + encoder.bias_encoding = CCam3BiasEncoding(); + + long calib_encoding = 0; + int v = bias_value; + if (!Metavision::is_expert_mode_enabled()) { + if (v < 0) + v = 0; + if (v > 1800) + v = 1800; + } + + switch (bias.mode()) { + case Gen31LLBias::Mode::Voltage: + calib_encoding = get_vdac18_values(v); + encoder.bias_encoding.current_value_ = 0x0; + encoder.bias_encoding.voltage_value_ = (calib_encoding >> 0) & 0xFF; + encoder.bias_encoding.type_ = (calib_encoding >> 27) & 1; + encoder.bias_encoding.cas_code_ = (calib_encoding >> 28) & 1; + switch (bias.get_bias_type()) { + case Gen31LLBias::BiasType::PMOSThin: + case Gen31LLBias::BiasType::PMOSThick: + case Gen31LLBias::BiasType::RailP: + encoder.bias_encoding.polarity_ = 0; + break; + case Gen31LLBias::BiasType::NMOSThin: + case Gen31LLBias::BiasType::NMOSThick: + encoder.bias_encoding.polarity_ = 1; + break; + default: + MV_HAL_LOG_WARNING() << "Unknown bias type"; + } + break; + case Gen31LLBias::Mode::Current: + auto it = mvtocode->find(v); + if (it != mvtocode->end()) { + CodeGen31IDAC codeidac = it->second; + encoder.bias_encoding.current_value_ = codeidac.code_; + encoder.bias_encoding.voltage_value_ = 0; + encoder.bias_encoding.type_ = 0; + encoder.bias_encoding.cas_code_ = !codeidac.cas_; + encoder.bias_encoding.polarity_ = codeidac.mos_ == CodeGen31IDAC::N; + encoder.bias_encoding.buffer_value_ = 0x08; + } else { + MV_HAL_LOG_ERROR() << "Err no value for" << v; + encoder.bias_encoding.voltage_value_ = + static_cast(round(static_cast(v * 255) / 1800.)) & 0xFF; + if (v < 900) { + encoder.bias_encoding.polarity_ = 1; + } else { + encoder.bias_encoding.polarity_ = 0; + } + } + break; + } + + return encoder.raw; +} + +} // namespace + +namespace Metavision { + +Gen31_LL_Biases::Gen31_LL_Biases(const std::shared_ptr &i_hw_register, const std::string &prefix) : + i_hw_register_(i_hw_register), base_name_(prefix) { + if (!i_hw_register_) { + throw(HalException(PseeHalPluginErrorCode::HWRegisterNotFound, "HW Register facility is null.")); + } +} + +bool Gen31_LL_Biases::set(const std::string &bias_name, int bias_value) { + auto it = get_gen31_biases_map().find(bias_name); + if (it == get_gen31_biases_map().end()) { + return false; + } + if (it->second.is_modifiable() == false) { + return false; + } + if (!it->second.is_in_range(bias_value)) { + MV_HAL_LOG_WARNING() << bias_value << "is not in acceptable range for" << bias_name; + return false; + } + + if (bias_name == "bias_diff_on") { + auto bias_diff = get("bias_diff"); + auto bias_fo = get("bias_fo"); + auto delta = 75; + if (bias_fo < 1350) { + delta = 95; + } + if (bias_value < bias_diff + delta) { + bias_value = bias_diff + delta; + MV_HAL_LOG_WARNING() << "Current bias_diff_on minimal value is" << bias_value; + return false; + } + } + if (bias_name == "bias_diff_off") { + auto bias_diff = get("bias_diff"); + auto bias_fo = get("bias_fo"); + auto delta = 65; + if (bias_fo < 1350) { + delta = 85; + } + if (bias_value > bias_diff - delta) { + bias_value = bias_diff - delta; + MV_HAL_LOG_WARNING() << "Current bias_diff_off maximal value is" << bias_value; + return false; + } + } + if (bias_name == "bias_refr") { + auto bias_fo = get("bias_fo"); + if (bias_fo < 1400) { + if (bias_value > 1350) { + bias_value = 1350; + MV_HAL_LOG_WARNING() << "Current bias_refr maximal value is" << bias_value; + return false; + } + } + } + + long reg = get_ccam3_gen31_bias_encoding(it->second, bias_value); + get_hw_register()->write_register(base_name_ + it->second.get_register_name(), reg); + return true; +} + +int Gen31_LL_Biases::get(const std::string &bias_name) { + auto it = get_gen31_biases_map().find(bias_name); + if (it == get_gen31_biases_map().end()) { + return -1; + } + + auto r = get_hw_register()->read_register(base_name_ + it->second.get_register_name()); + if (r == uint32_t(-1)) + return -1; + BiasEncodingCast encoder; + encoder.raw = r; + if (encoder.bias_encoding.type_ == 1) { + return get_inv_vdac18_values(encoder.bias_encoding); + } else { + decltype(s_inv_p_thin_mvtocode) *inv_map = nullptr; + switch (it->second.get_bias_type()) { + case Gen31LLBias::BiasType::PMOSThin: + inv_map = &s_inv_p_thin_mvtocode; + break; + case Gen31LLBias::BiasType::PMOSThick: + inv_map = &s_inv_p_thick_mvtocode; + break; + case Gen31LLBias::BiasType::NMOSThin: + inv_map = &s_inv_n_thin_mvtocode; + break; + case Gen31LLBias::BiasType::NMOSThick: + inv_map = &s_inv_n_thick_mvtocode; + break; + case Gen31LLBias::BiasType::RailP: + inv_map = &s_inv_railp_mvtocode; + break; + default: + MV_HAL_LOG_ERROR() << "Unknown bias type"; + } + + return get_inv_idac_values(encoder.bias_encoding, *inv_map); + } + return -1; +} + +std::map Gen31_LL_Biases::get_all_biases() { + std::map ret; + for (auto &b : get_gen31_biases_map()) { + ret[b.first] = get(b.first); + } + return ret; +} + +const std::shared_ptr &Gen31_LL_Biases::get_hw_register() const { + return i_hw_register_; +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/devices/gen31/gen31_monitoring.cpp b/hal_psee_plugins/src/devices/gen31/gen31_monitoring.cpp new file mode 100644 index 000000000..0349cc17f --- /dev/null +++ b/hal_psee_plugins/src/devices/gen31/gen31_monitoring.cpp @@ -0,0 +1,61 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include +#include +#include + +#include "devices/gen31/gen31_monitoring.h" +#include "metavision/hal/facilities/i_hw_register.h" +#include "metavision/hal/utils/hal_exception.h" +#include "utils/psee_hal_plugin_error_code.h" + +namespace Metavision { + +Gen31Monitoring::Gen31Monitoring(const std::shared_ptr &i_hw_register) : PseeMonitoring(i_hw_register) { + get_hw_register()->write_register("SENSOR_IF/GEN31/lifo_ctrl", "lifo_en", true); +} + +int Gen31Monitoring::get_temperature() { + auto r = get_hw_register()->read_register("SYSTEM_MONITOR/TEMP_VCC_MONITOR/EVK_EXT_TEMP_VALUE"); + if (r != decltype(r)(-1)) + return r / 4096; + return -1; +} + +int Gen31Monitoring::get_illumination() { + auto hw_register = get_hw_register(); + hw_register->write_register("SENSOR_IF/GEN31/lifo_ctrl", 0); + hw_register->write_register("SENSOR_IF/GEN31/lifo_ctrl", "lifo_en", true); + hw_register->write_register("SENSOR_IF/GEN31/lifo_ctrl", "lifo_cnt_en", true); + bool valid = false; + uint16_t retries = 0; + uint32_t counter = 0; + while (valid == false && retries < 10) { + auto reg_val = hw_register->read_register("SENSOR_IF/GEN31/lifo_ctrl"); + reg_val = hw_register->read_register("SENSOR_IF/GEN31/lifo_ctrl"); + valid = reg_val & 1 << 29; + counter = reg_val & ((1 << 27) - 1); + retries += 1; + } + + if (!valid) { + return -1; + } + + if (counter != decltype(counter)(-1)) { + float t = float(counter) / 100.; + return powf(10, 3.5 - logf(t * 0.37) / logf(10)); + } + return -1; +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/devices/gen31/gen31_pattern_generator.cpp b/hal_psee_plugins/src/devices/gen31/gen31_pattern_generator.cpp new file mode 100644 index 000000000..1b8d7db4e --- /dev/null +++ b/hal_psee_plugins/src/devices/gen31/gen31_pattern_generator.cpp @@ -0,0 +1,113 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include + +#include "devices/gen31/gen31_pattern_generator.h" +#include "boards/utils/psee_libusb_board_command.h" +#include "metavision/hal/utils/hal_log.h" +#include "utils/register_map.h" + +namespace Metavision { +using vfield = std::map; + +static constexpr uint16_t DEFAULT_PG_LENGTH = 3072; +static constexpr uint16_t DEFAULT_PG_STEP_COUNT = 1; + +Gen31PatternGenerator::Gen31PatternGenerator(const std::shared_ptr ®map) : register_map_(regmap) { + disable(); +} + +Gen31PatternGenerator::~Gen31PatternGenerator() { + disable(); +} + +bool Gen31PatternGenerator::enable(const PseePatternGenerator::Configuration &configuration) { + if (configuration.pattern_type != PseePatternGenerator::Configuration::PatternType::Column && + configuration.pattern_type != PseePatternGenerator::Configuration::PatternType::Slash) { + MV_HAL_LOG_ERROR() + << "Failed to enable pattern generator. Unsupported input pattern type for this sensor. Supported " + "types are Column or Slash."; + return false; + } + + // Some pattern generator configurations can be set only if it is disabled. + disable(); + + if (!is_period_rate_set_) { + set_period_rate(DEFAULT_PG_STEP_COUNT, DEFAULT_PG_STEP_COUNT); + } + + if (!is_period_length_set_) { + set_period_step_count(DEFAULT_PG_LENGTH, DEFAULT_PG_LENGTH); + } + + (*register_map_)["GEN31_IF/TEST_PATTERN_CONTROL"].write_value(vfield{ + {"ENABLE", true}, + {"TYPE", (uint32_t)configuration.pattern_type}, + {"PIXEL_TYPE", (uint32_t)configuration.pixel_type}, + {"PIXEL_POLARITY", (uint32_t)configuration.pixel_polarity}, + }); + + return true; +} + +void Gen31PatternGenerator::disable() { + (*register_map_)["SENSOR_IF/GEN31_IF/TEST_PATTERN_CONTROL"]["ENABLE"] = 0; +} + +bool Gen31PatternGenerator::is_enabled() { + return (*register_map_)["SENSOR_IF/GEN31_IF/TEST_PATTERN_CONTROL"]["ENABLE"].read_value(); +} + +void Gen31PatternGenerator::get_pattern_geometry(int &width, int &height) const { + width = PATTERN_GENERATOR_WIDTH; + height = PATTERN_GENERATOR_HEIGHT; +} + +void Gen31PatternGenerator::set_period_step_count(uint16_t n_step_count, uint16_t p_step_count) { + if (p_step_count == 0) { + p_step_count = n_step_count; + } + if (n_step_count == 0) { + return; + } + + const auto n_period_length = n_step_count * 10; // 10 ns is the step length + const auto p_period_length = p_step_count * 10; // 10 ns is the step length + + (*register_map_)["SENSOR_IF/GEN31_IF/TEST_PATTERN_N_PERIOD"]["LENGTH"] = n_period_length; + (*register_map_)["SENSOR_IF/GEN31_IF/TEST_PATTERN_P_PERIOD"]["LENGTH"] = p_period_length; + + is_period_length_set_ = true; +} + +void Gen31PatternGenerator::set_period_rate(uint8_t n_rate_Mev_s, uint8_t p_rate_Mev_s) { + if (p_rate_Mev_s == 0) { + p_rate_Mev_s = n_rate_Mev_s; + } + if (n_rate_Mev_s == 0) { + return; + } + + // PG can generate 1 event per clock cycle with a clock period of 10 ns. And there are 1024 cycles. + // So at most you can generate up to 1023 ev / 10240 ns which is equivalent to 100*1023/1024 Mev/s. + // Rate step is thus 100/1024 Mev/s. + // In the register you write the ratio i.e. number of steps (actual rate requested/rate_step). + const uint32_t n_period_ratio_reg_value = (1024 * n_rate_Mev_s / 100); + const uint32_t p_period_ratio_reg_value = (1024 * p_rate_Mev_s / 100); + + (*register_map_)["SENSOR_IF/GEN31_IF/TEST_PATTERN_N_PERIOD"]["VALID_RATIO"] = n_period_ratio_reg_value; + (*register_map_)["SENSOR_IF/GEN31_IF/TEST_PATTERN_P_PERIOD"]["VALID_RATIO"] = p_period_ratio_reg_value; + + is_period_rate_set_ = true; +} +} // namespace Metavision diff --git a/hal_psee_plugins/src/devices/gen31/gen31_pattern_generator_checker.cpp b/hal_psee_plugins/src/devices/gen31/gen31_pattern_generator_checker.cpp new file mode 100644 index 000000000..977a40c8f --- /dev/null +++ b/hal_psee_plugins/src/devices/gen31/gen31_pattern_generator_checker.cpp @@ -0,0 +1,34 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include "metavision/hal/utils/hal_log.h" +#include "devices/gen31/gen31_pattern_generator.h" +#include "devices/utils/gen3/gen3_pattern_checkers.h" +#include "devices/gen31/gen31_pattern_generator_checker.h" + +namespace Metavision { + +PseePatternGeneratorChecker::PatternChecker *Gen31PatternGeneratorChecker::build_pattern_checker( + const PseePatternGenerator::Configuration &configuration) const { + switch (configuration.pattern_type) { + case PseePatternGenerator::Configuration::PatternType::Column: + return new ColumnPatternChecker(Gen31PatternGenerator::PATTERN_GENERATOR_WIDTH, + Gen31PatternGenerator::PATTERN_GENERATOR_HEIGHT); + case PseePatternGenerator::Configuration::PatternType::Slash: + return new SlashPatternChecker(Gen31PatternGenerator::PATTERN_GENERATOR_WIDTH, + Gen31PatternGenerator::PATTERN_GENERATOR_HEIGHT); + default: + MV_HAL_LOG_ERROR() << "Unavailable pattern type for this sensor. Available patterns are Column or Slash."; + return nullptr; + } +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/devices/gen31/gen31_roi_command.cpp b/hal_psee_plugins/src/devices/gen31/gen31_roi_command.cpp new file mode 100644 index 000000000..a8ebc30d2 --- /dev/null +++ b/hal_psee_plugins/src/devices/gen31/gen31_roi_command.cpp @@ -0,0 +1,90 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include +#include + +#include "metavision/hal/utils/hal_log.h" +#include "boards/utils/psee_libusb_board_command.h" + +#include "devices/gen31/gen31_roi_command.h" +#include "utils/register_map.h" + +namespace Metavision { + +Gen31ROICommand::Gen31ROICommand(int width, int height, const std::shared_ptr ®map, + const std::string &prefix) : + PseeROI(width, height), register_map_(regmap), prefix_(prefix) { + /// this step is necessary because of a flaw in sensor conception that enables half ROI by default. + /// If the ROI is not set to the full pixel matrix, then a ring of width 1 appears + enable(false); +} + +void Gen31ROICommand::reset_to_full_roi() { + constexpr int roi_step = 0x004; + uint32_t col_td_ind, row_td_ind; + uint32_t td_start, td_end; + + // setting x registers + td_start = (*register_map_)[prefix_ + "td_roi_x00"].get_address(); + td_end = (*register_map_)[prefix_ + "td_roi_x20"].get_address(); + for (col_td_ind = td_start; col_td_ind < td_end; col_td_ind += roi_step) { + (*register_map_)[col_td_ind] = 0xFFFFFFFF; + } + + // setting y registers + td_start = (*register_map_)[prefix_ + "td_roi_y00"].get_address(); + td_end = (*register_map_)[prefix_ + "td_roi_y15"].get_address(); + for (row_td_ind = td_start; row_td_ind < td_end; row_td_ind += roi_step) { + (*register_map_)[row_td_ind] = 0xFFFFFFFF; + } +} + +void Gen31ROICommand::write_ROI(const std::vector &vroiparams) { + constexpr int roi_step = 0x004; + uint32_t param_ind = 0; + uint32_t col_td_ind, row_td_ind; + uint32_t td_start, td_end; + roi_save_ = vroiparams; + + if (vroiparams.size() != 35) { + MV_HAL_LOG_WARNING() << "Data provided to write ROI is not of the good size for Gen31 sensor"; + return; + } + + // setting x registers + td_start = (*register_map_)[prefix_ + "td_roi_x00"].get_address(); + td_end = (*register_map_)[prefix_ + "td_roi_x20"].get_address(); + for (col_td_ind = td_start; col_td_ind < td_end; col_td_ind += roi_step, ++param_ind) { + (*register_map_)[col_td_ind] = vroiparams[param_ind]; + } + + // setting y registers + td_start = (*register_map_)[prefix_ + "td_roi_y00"].get_address(); + td_end = (*register_map_)[prefix_ + "td_roi_y15"].get_address(); + for (row_td_ind = td_start; row_td_ind < td_end; row_td_ind += roi_step, ++param_ind) { + (*register_map_)[row_td_ind] = vroiparams[param_ind]; + } +} + +void Gen31ROICommand::enable(bool state) { + if (!state) { + reset_to_full_roi(); + } else { + write_ROI(roi_save_); + } + + (*register_map_)[prefix_ + "roi_ctrl"]["roi_td_en"] = true; + (*register_map_)[prefix_ + "roi_ctrl"]["roi_td_shadow_trigger"] = true; + (*register_map_)[prefix_ + "roi_ctrl"]["roi_td_shadow_trigger"] = false; +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/devices/gen31/gen31_sensor.cpp b/hal_psee_plugins/src/devices/gen31/gen31_sensor.cpp new file mode 100644 index 000000000..a1f0e589e --- /dev/null +++ b/hal_psee_plugins/src/devices/gen31/gen31_sensor.cpp @@ -0,0 +1,92 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include + +#include "devices/gen31/gen31_sensor.h" +#include "metavision/hal/utils/hal_log.h" +#include "utils/register_map.h" + +namespace Metavision { + +using vfield = std::map; + +Gen31Sensor::Gen31Sensor(const std::shared_ptr ®map, const std::string &prefix, bool is_em) : + register_map_(regmap), + prefix_(prefix), + analog_(register_map_, prefix, is_em), + digital_(register_map_, prefix), + is_em_(is_em) {} + +long long Gen31Sensor::get_chip_id() { + return digital_.get_chip_id(); +} + +void Gen31Sensor::init() { + MV_HAL_LOG_TRACE() << "Sensor Gen31 Init"; + digital_.init(); + bgen_init(); + analog_.init(); +} + +void Gen31Sensor::start() { + digital_.start(); + // roi + (*register_map_)[prefix_ + "roi_ctrl"]["roi_td_en"] = true; + (*register_map_)[prefix_ + "roi_ctrl"]["roi_td_shadow_trigger"] = true; + if (is_em_) + (*register_map_)[prefix_ + "roi_ctrl"]["roi_em_en"] = true; + analog_.start(); +} + +void Gen31Sensor::stop() { + MV_HAL_LOG_TRACE() << "Sensor Gen31 Stop"; + analog_.stop(); + digital_.stop(); +} + +void Gen31Sensor::destroy() { + MV_HAL_LOG_TRACE() << "Sensor Gen31 Destroy"; + analog_.destroy(); + digital_.destroy(); +} + +void Gen31Sensor::bgen_init() { + (*register_map_)[prefix_ + "bgen_00"] = 0x5900009f; + (*register_map_)[prefix_ + "bgen_01"] = 0x5900009f; + (*register_map_)[prefix_ + "bgen_02"] = 0x5900009b; + (*register_map_)[prefix_ + "bgen_03"] = 0x590000a9; + (*register_map_)[prefix_ + "bgen_04"] = 0x7900008c; + (*register_map_)[prefix_ + "bgen_05"] = 0x79000070; + (*register_map_)[prefix_ + "bgen_06"] = 0x7900008c; + (*register_map_)[prefix_ + "bgen_07"] = 0x790000c0; + (*register_map_)[prefix_ + "bgen_08"] = 0x7900003e; + (*register_map_)[prefix_ + "bgen_09"] = 0x79000036; + (*register_map_)[prefix_ + "bgen_10"] = 0x590000b7; + (*register_map_)[prefix_ + "bgen_11"] = 0x79000000; + (*register_map_)[prefix_ + "bgen_12"] = 0x790000f7; + (*register_map_)[prefix_ + "bgen_13"] = 0x7102c400; + (*register_map_)[prefix_ + "bgen_14"] = 0x7107ff00; + (*register_map_)[prefix_ + "bgen_15"] = 0x71008200; + (*register_map_)[prefix_ + "bgen_16"] = 0x790000e2; + (*register_map_)[prefix_ + "bgen_17"] = 0x790000f0; + (*register_map_)[prefix_ + "bgen_18"] = 0x7900008c; + (*register_map_)[prefix_ + "bgen_19"] = 0x7900001f; + (*register_map_)[prefix_ + "bgen_20"] = 0x79000033; + (*register_map_)[prefix_ + "bgen_21"] = 0x79000029; + (*register_map_)[prefix_ + "bgen_22"] = 0x71003600; + (*register_map_)[prefix_ + "bgen_23"] = 0x51034f00; + (*register_map_)[prefix_ + "bgen_24"] = 0x51004f00; + (*register_map_)[prefix_ + "bgen_25"] = 0x51000100; + (*register_map_)[prefix_ + "bgen_26"] = 0x61013100; +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/devices/gen31/gen31_sensor_if_ctrl.cpp b/hal_psee_plugins/src/devices/gen31/gen31_sensor_if_ctrl.cpp new file mode 100644 index 000000000..a7dafb211 --- /dev/null +++ b/hal_psee_plugins/src/devices/gen31/gen31_sensor_if_ctrl.cpp @@ -0,0 +1,57 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include "devices/gen31/gen31_sensor_if_ctrl.h" +#include "utils/register_map.h" + +namespace Metavision { +using vfield = std::map; + +Gen31SensorIfCtrl::Gen31SensorIfCtrl(const std::shared_ptr ®ister_map, const std::string &prefix) : + prefix_(prefix), register_map_(register_map) {} + +void Gen31SensorIfCtrl::enable_test_pattern(uint32_t n_period = 0x0C00, uint32_t n_valid_ratio = 10, + uint32_t p_period = 0x1400, uint32_t p_valid_ratio = 25, + bool enable = true) { + (*register_map_)[prefix_ + "TEST_PATTERN_N_PERIOD"].write_value( + vfield{{"LENGTH", n_period}, {"VALID_RATIO", n_valid_ratio}}); + (*register_map_)[prefix_ + "TEST_PATTERN_P_PERIOD"].write_value( + vfield{{"LENGTH", p_period}, {"VALID_RATIO", p_valid_ratio}}); + + (*register_map_)[prefix_ + "TEST_PATTERN_CONTROL"]["EBABLE"] = enable; +} + +void Gen31SensorIfCtrl::sensor_turn_on_clock() { + (*register_map_)[prefix_ + "CONTROL"]["SENSOR_CLK_EN"] = true; +} + +void Gen31SensorIfCtrl::sensor_turn_off_clock() { + (*register_map_)[prefix_ + "CONTROL"]["SENSOR_CLK_EN"] = false; +} + +void Gen31SensorIfCtrl::self_pattern_config(uint32_t ratio = 42) { + (*register_map_)[prefix_ + "TEST_PATTERN_CONTROL"]["ENABLE"] = false; + (*register_map_)[prefix_ + "TEST_PATTERN_N_PERIOD"].write_value(vfield{{"LENGTH", 0x0C00}, {"VALID_RATIO", ratio}}); + (*register_map_)[prefix_ + "TEST_PATTERN_P_PERIOD"].write_value({{"LENGTH", 0x1400}, {"VALID_RATIO", ratio}}); +} + +void Gen31SensorIfCtrl::self_pattern_control(bool enable) { + (*register_map_)[prefix_ + "TEST_PATTERN_CONTROL"]["ENABLE"] = enable; +} + +void Gen31SensorIfCtrl::trigger_fwd_config(uint32_t channel_id = 6) { + (*register_map_)[prefix_ + "TRIGGERS"]["TRIGGER_FWD_ID"] = channel_id; +} + +void Gen31SensorIfCtrl::trigger_fwd_control(bool enable) { + (*register_map_)[prefix_ + "TRIGGERS"]["TRIGGER_FWD_ENABLE"] = enable; +} +} // namespace Metavision diff --git a/hal_psee_plugins/src/devices/gen31/gen31_system_control.cpp b/hal_psee_plugins/src/devices/gen31/gen31_system_control.cpp new file mode 100644 index 000000000..a2a28c648 --- /dev/null +++ b/hal_psee_plugins/src/devices/gen31/gen31_system_control.cpp @@ -0,0 +1,101 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include "devices/gen31/gen31_system_control.h" +#include "utils/register_map.h" + +namespace Metavision { +using vfield = std::map; + +Gen31SystemControl::Gen31SystemControl(const std::shared_ptr ®ister_map, const std::string &prefix) : + prefix_(prefix), register_map_(register_map) {} + +void Gen31SystemControl::sensor_atis_control_clear(void) { + (*register_map_)[prefix_ + "ATIS_CONTROL"].write_value(0); +} + +void Gen31SystemControl::sensor_prepowerup(void) { + sensor_roi_td_rstn(false); + sensor_em_rstn(false); + sensor_soft_reset(true); + sensor_enable_vddc(true); + sensor_enable_vddd(true); + sensor_soft_reset(false); +} +void Gen31SystemControl::sensor_prepowerdown(void) { + sensor_roi_td_rstn(false); + sensor_enable_vdda(false); +} + +void Gen31SystemControl::sensor_powerdown(void) { + sensor_soft_reset(false); + sensor_enable_vddc(false); + sensor_enable_vddd(false); +} +void Gen31SystemControl::sensor_enable_vdda(bool enable) { + (*register_map_)[prefix_ + "ATIS_CONTROL"]["EN_VDDA"].write_value(enable); +} + +void Gen31SystemControl::sensor_enable_vddc(bool enable) { + (*register_map_)[prefix_ + "ATIS_CONTROL"]["EN_VDDC"].write_value(enable); +} + +void Gen31SystemControl::sensor_enable_vddd(bool enable) { + (*register_map_)[prefix_ + "ATIS_CONTROL"]["EN_VDDD"].write_value(enable); +} + +void Gen31SystemControl::sensor_soft_reset(bool reset) { + (*register_map_)[prefix_ + "ATIS_CONTROL"]["SENSOR_SOFT_RESET"].write_value(reset); +} + +void Gen31SystemControl::sensor_roi_td_rstn(bool rstn) { + (*register_map_)[prefix_ + "ATIS_CONTROL"]["TD_RSTN"].write_value(rstn); +} + +void Gen31SystemControl::sensor_em_rstn(bool rstn) { + (*register_map_)[prefix_ + "ATIS_CONTROL"]["EM_RSTN"].write_value(rstn); +} + +void Gen31SystemControl::sensor_powerup(void) { + sensor_enable_vdda(true); + sensor_roi_td_rstn(true); + sensor_em_rstn(true); +} + +void Gen31SystemControl::soft_reset(std::string reg_obj) { + // can we please have consistent register names ? thanks ! + (*register_map_)[prefix_ + reg_obj]["SOFT_RESET"].write_value(false); + (*register_map_)[prefix_ + reg_obj]["SOFT_RESET"].write_value(true); +} + +void Gen31SystemControl::hvga_remap_control(bool enable) { + (*register_map_)[prefix_ + "ATIS_CONTROL"]["SISLEY_HVGA_REMAP_BYPASS"].write_value(!enable); +} + +void Gen31SystemControl::no_blocking_control(bool enable) { + (*register_map_)[prefix_ + "ATIS_CONTROL"]["IN_EVT_NO_BLOCKING_MODE"].write_value(enable); +} + +void Gen31SystemControl::host_if_control(bool enable) { + (*register_map_)[prefix_ + "CCAM2_CONTROL"]["HOST_IF_ENABLE"].write_value(enable); +} + +void Gen31SystemControl::timebase_control(bool enable) { + (*register_map_)[prefix_ + "CCAM2_CONTROL"]["STEREO_MERGE_ENABLE"].write_value(enable); +} + +void Gen31SystemControl::timebase_config(bool ext_sync, bool master) { + (*register_map_)[prefix_ + "ATIS_CONTROL"].write_value(vfield{ + {"MASTER_MODE", master}, + {"USE_EXT_START", ext_sync}, + }); +} +} // namespace Metavision diff --git a/hal_psee_plugins/src/devices/gen31/gen31_trigger_event.cpp b/hal_psee_plugins/src/devices/gen31/gen31_trigger_event.cpp new file mode 100644 index 000000000..f969f8d15 --- /dev/null +++ b/hal_psee_plugins/src/devices/gen31/gen31_trigger_event.cpp @@ -0,0 +1,56 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include "devices/gen31/gen31_trigger_event.h" +#include "facilities/psee_device_control.h" +#include "utils/register_map.h" + +namespace Metavision { + +Gen31TriggerEvent::Gen31TriggerEvent(const std::shared_ptr ®ister_map, + const std::shared_ptr &device_control) : + PseeTriggerIn(device_control), register_map_(register_map) { + for (uint32_t i = 0; i < 8; ++i) { + disable(i); + } +} + +bool Gen31TriggerEvent::enable(uint32_t channel) { + if (channel != 0 && channel != 6 && channel != 7) { + return false; + } + + if (channel == 7 && get_device_control()->get_mode() == I_DeviceControl::SyncMode::SLAVE) { + return false; + } + + (*register_map_)["SYSTEM_MONITOR/EXT_TRIGGERS/ENABLE"]["TRIGGER_" + std::to_string(channel)] = true; + return true; +} + +bool Gen31TriggerEvent::disable(uint32_t channel) { + if (channel != 0 && channel != 6 && channel != 7) { + return false; + } + + (*register_map_)["SYSTEM_MONITOR/EXT_TRIGGERS/ENABLE"]["TRIGGER_" + std::to_string(channel)] = false; + return true; +} + +bool Gen31TriggerEvent::is_enabled(uint32_t index) { + if (index != 0 && index != 6 && index != 7) { + return false; + } + + return (*register_map_)["SYSTEM_MONITOR/EXT_TRIGGERS/ENABLE"]["TRIGGER_" + std::to_string(index)].read_value(); +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/devices/gen41/CMakeLists.txt b/hal_psee_plugins/src/devices/gen41/CMakeLists.txt new file mode 100644 index 000000000..c160eb497 --- /dev/null +++ b/hal_psee_plugins/src/devices/gen41/CMakeLists.txt @@ -0,0 +1,27 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. + +target_sources(metavision_hal_gen41_camera_obj PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/gen41_ll_biases.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/gen41_roi_command.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/gen41_antiflicker_module.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/gen41_noise_filter_module.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/gen41_erc.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/gen41_tz_trigger_event.cpp +) + +target_sources(metavision_hal_gen41_evk2_system_obj PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/gen41_evk2_regmap_builder.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/gen41_evk2_tz_device.cpp +) + +target_sources(metavision_hal_gen41_evk3_system_obj PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/gen41_evk3_regmap_builder.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/gen41_tz_device.cpp +) diff --git a/hal_psee_plugins/src/devices/gen41/gen41_antiflicker_module.cpp b/hal_psee_plugins/src/devices/gen41/gen41_antiflicker_module.cpp new file mode 100644 index 000000000..f329c97bc --- /dev/null +++ b/hal_psee_plugins/src/devices/gen41/gen41_antiflicker_module.cpp @@ -0,0 +1,90 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include "devices/gen41/gen41_antiflicker_module.h" +#include "utils/register_map.h" + +namespace Metavision { + +namespace { +// Invalidation Speed +int invalidation_dt_fifo_wait_time = 1630; +} // namespace + +Gen41AntiFlickerModule::Gen41AntiFlickerModule(const std::shared_ptr ®ister_map, + const std::string &sensor_prefix) : + register_map_(register_map), sensor_prefix_(sensor_prefix) {} + +void Gen41AntiFlickerModule::enable() { + (*register_map_)[sensor_prefix_ + "afk/pipeline_control"]["afk_en"].write_value(0b001); +} + +void Gen41AntiFlickerModule::disable() { + (*register_map_)[sensor_prefix_ + "afk/pipeline_control"]["afk_en"].write_value(0b101); +} + +void Gen41AntiFlickerModule::set_frequency(uint32_t frequency_center, uint32_t bandwidth, bool stop) { + uint32_t freq_min; + uint32_t freq_max; + freq_min = frequency_center - bandwidth / 2; + freq_max = frequency_center + bandwidth / 2; + set_frequency_band(freq_min, freq_max); +} + +void Gen41AntiFlickerModule::set_frequency_band(uint32_t min_freq, uint32_t max_freq, bool stop) { + // Check frequency values + if (min_freq < 50 || max_freq > 500 || min_freq > max_freq) { + MV_HAL_LOG_ERROR() << "Bad AFK frequencies"; + return; + } + + // Store AFK status + auto afk_en_prev = (*register_map_)[sensor_prefix_ + "afk/pipeline_control"]["afk_en"].read_value(); + + // Disable AFK before changing frequency + disable(); + + // Check sram init done + bool init_done = 0; + for (int i = 0; i < 3; i++) { + init_done = (*register_map_)[sensor_prefix_ + "afk/initialization"]["afk_flag_init_done"].read_value(); + if (init_done == 1) { + break; + } + } + if (init_done == 0) { + MV_HAL_LOG_ERROR() << "Bad AFK initialization"; + return; + } + + // Set new algorithm configuration + int filter_period_min_cutoff_period; + filter_period_min_cutoff_period = 1e6 / max_freq; + filter_period_min_cutoff_period = filter_period_min_cutoff_period >> 7; + + int filter_period_max_cutoff_period; + filter_period_max_cutoff_period = 1e6 / min_freq; + filter_period_max_cutoff_period = filter_period_max_cutoff_period >> 7; + + (*register_map_)[sensor_prefix_ + "afk/invalidation"].write_value( + {"dt_fifo_wait_time", invalidation_dt_fifo_wait_time}); + (*register_map_)[sensor_prefix_ + "afk/filter_period"].write_value( + {{"min_cutoff_period", filter_period_min_cutoff_period}, + {"max_cutoff_period", filter_period_max_cutoff_period}, + {"Reserved_19_16", 8}}); + + (*register_map_)[sensor_prefix_ + "afk/Reserved_C004"]["Reserved_6"].write_value(int(!stop)); + + // Restore AFK status + (*register_map_)[sensor_prefix_ + "afk/pipeline_control"]["afk_en"].write_value(afk_en_prev); +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/devices/gen41/gen41_erc.cpp b/hal_psee_plugins/src/devices/gen41/gen41_erc.cpp new file mode 100644 index 000000000..1e6a3a5de --- /dev/null +++ b/hal_psee_plugins/src/devices/gen41/gen41_erc.cpp @@ -0,0 +1,169 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include +#include +#include + +#include "devices/gen41/gen41_erc.h" +#include "utils/register_map.h" +#include "metavision/hal/utils/hal_log.h" + +using vfield = std::map; + +namespace Metavision { + +namespace { +constexpr uint32_t CD_EVENT_COUNT_DEFAULT = 4000; + +std::string hex_to_string(int number, int n_digits) { + std::stringstream ss; + ss << std::uppercase << std::hex << std::setw(n_digits) << std::setfill('0') << number; + return ss.str(); +} + +std::string int_to_string(int number, int n_digits) { + std::stringstream ss; + ss << std::dec << std::setw(n_digits) << std::setfill('0') << number; + return ss.str(); +} + +} // namespace + +constexpr uint32_t Gen41Erc::CD_EVENT_COUNT_MAX; + +Gen41Erc::Gen41Erc(const std::shared_ptr ®ister_map, const std::string &prefix, + std::shared_ptr tzDev) : + register_map_(register_map), cd_event_count_shadow_(CD_EVENT_COUNT_DEFAULT), prefix_(prefix), tzDev_(tzDev) { + // Set Default Configuration + for (auto i = 0; i < 230; ++i) { + lut_configs["Reserved"][i] = std::make_tuple(0x8, 0x8, 0x8, 0x8); + } + for (auto i = 0; i < 256; ++i) { + lut_configs["t_drop_lut"][i] = std::make_tuple((i * 2) + 0, (i * 2) + 1, 0, 0); + } +} + +void Gen41Erc::enable(bool en) { + (*register_map_)[prefix_ + "t_dropping_control"].write_value({"t_dropping_en", en}); + + if (en) { + set_cd_event_count(cd_event_count_shadow_); + } +} + +bool Gen41Erc::is_enabled() { + bool res_1 = (*register_map_)[prefix_ + "Reserved_6000"]["Reserved_1"].read_value(); + bool res_0 = (*register_map_)[prefix_ + "Reserved_6000"]["Reserved_0"].read_value(); + bool t_dropping_en = (*register_map_)[prefix_ + "t_dropping_control"]["t_dropping_en"].read_value(); + return t_dropping_en && res_0 && !res_1; +} + +void Gen41Erc::initialize() { + MV_HAL_LOG_TRACE() << "Gen41 ERC Init"; + + (*register_map_)[prefix_ + "Reserved_6000"].write_value( + vfield{{"Reserved_0", 0}, {"Reserved_1", 0}, {"Reserved_2", 0}, {"Reserved_3", 0}, {"Reserved_4", 0}}); + + char *config = getenv("ERC_CONFIGURATION_PATH"); + + if (config) { + // A file was given to override default configuration + erc_from_file(std::string(config)); + } + + (*register_map_)[prefix_ + "in_drop_rate_control"]["cfg_event_delay_fifo_en"].write_value(1); + (*register_map_)[prefix_ + "reference_period"].write_value({"erc_reference_period", 200}); + (*register_map_)[prefix_ + "td_target_event_rate"].write_value({"target_event_rate", cd_event_count_shadow_}); + (*register_map_)[prefix_ + "erc_enable"].write_value({{"erc_en", 1}, {"Reserved_1", 1}, {"Reserved_2", 0}}); + + (*register_map_)[prefix_ + "Reserved_602C"]["Reserved_0"].write_value(1); + for (auto i = 0; i < 230; ++i) { + (*register_map_)[prefix_ + "Reserved_" + hex_to_string((26624 + 4 * i), 4)].write_value( + {{"Reserved_5_0", std::get<0>(lut_configs["Reserved"][i])}, + {"Reserved_13_8", std::get<1>(lut_configs["Reserved"][i])}, + {"Reserved_21_16", std::get<2>(lut_configs["Reserved"][i])}, + {"Reserved_29_24", std::get<3>(lut_configs["Reserved"][i])}}); + } + (*register_map_)[prefix_ + "Reserved_602C"]["Reserved_0"].write_value(0); + + int j = 0; + + for (auto i = 0; i < 256; ++i) { + std::string lut_index; + std::string lut_field_index_0; + std::string lut_field_index_1; + + lut_index = int_to_string(i, 2); + lut_field_index_0 = int_to_string(j, 3); + lut_field_index_1 = int_to_string(j + 1, 3); + + (*register_map_)[prefix_ + "t_drop_lut_" + lut_index].write_value( + {{"tlut" + lut_field_index_0, std::get<0>(lut_configs["t_drop_lut"][i])}, + {"tlut" + lut_field_index_1, std::get<1>(lut_configs["t_drop_lut"][i])}}); + + j += 2; + } + (*register_map_)[prefix_ + "t_dropping_control"].write_value({"t_dropping_en", 0}); + (*register_map_)[prefix_ + "h_dropping_control"].write_value({"h_dropping_en", 0}); + (*register_map_)[prefix_ + "v_dropping_control"].write_value({"v_dropping_en", 0}); + + (*register_map_)[prefix_ + "Reserved_6000"].write_value({{"Reserved_0", 1}, {"Reserved_1", 0}}); +} + +void Gen41Erc::erc_from_file(const std::string &file_path) { + uint32_t num, v0, v1, v2, v3; + std::string reg_name; + std::ifstream erc_file(file_path.c_str(), std::ios::in); + + MV_HAL_LOG_TRACE() << "Loading ERC configuration from file" << file_path; + + if (!erc_file.is_open()) { + MV_HAL_LOG_WARNING() << "Could not open file at" << Metavision::Log::no_space << file_path << ": ERC not set."; + return; + } + + while (erc_file >> reg_name >> std::hex >> num >> v0 >> v1 >> v2 >> v3) { + lut_configs[reg_name][num] = std::make_tuple(v0, v1, v2, v3); + } +} + +uint32_t Gen41Erc::get_count_period() const { + return (*register_map_)[prefix_ + "reference_period"].read_value(); +} + +void Gen41Erc::set_cd_event_count(uint32_t count) { + if (count > CD_EVENT_COUNT_MAX) { + MV_HAL_LOG_WARNING() << "Could not set CD count to" << count << ": setting it to maximum allowed value" + << CD_EVENT_COUNT_MAX; + count = CD_EVENT_COUNT_MAX; + } + (*register_map_)[prefix_ + "td_target_event_rate"].write_value(count); + cd_event_count_shadow_ = count; +} + +uint32_t Gen41Erc::get_cd_event_count() { + return (*register_map_)[prefix_ + "td_target_event_rate"].read_value(); +} + +void Gen41Erc::set_device_control(const std::shared_ptr &device_control) { + /* Stores DeviceControl facility pointer. + + The goal is to guarantee that Gen41Erc will always be destroyed/freed before its DeviceControl. + DeviceControl, when freed, will power down the sensor. Hence, further call to Gen41Erc methods will not + be sent to its hardware or in case of Evk2 will break USB link. + + Note: Gen41Erc is used by DeviceControl through a weak pointer to avoid cyclic references + */ + dev_ctrl_ = device_control; +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/devices/gen41/gen41_evk2_regmap_builder.cpp b/hal_psee_plugins/src/devices/gen41/gen41_evk2_regmap_builder.cpp new file mode 100644 index 000000000..23ae1a69d --- /dev/null +++ b/hal_psee_plugins/src/devices/gen41/gen41_evk2_regmap_builder.cpp @@ -0,0 +1,31 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include +#include + +#include "devices/gen41/gen41_evk2_regmap_builder.h" +#include "devices/gen41/register_maps/gen41_evk2_registermap.h" +#include "utils/regmap_data.h" +#include "utils/register_map.h" + +namespace Metavision { + +void build_gen41_evk2_register_map(RegisterMap ®map) { + std::vector> Gen41Evk2RegisterMap_init = { + std::make_tuple(Gen41Evk2RegisterMap, Gen41Evk2RegisterMapSize, "PSEE", 0), + }; + + init_device_regmap(regmap, Gen41Evk2RegisterMap_init); + regmap.dump(); +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/devices/gen41/gen41_evk2_tz_device.cpp b/hal_psee_plugins/src/devices/gen41/gen41_evk2_tz_device.cpp new file mode 100644 index 000000000..9d7104a3f --- /dev/null +++ b/hal_psee_plugins/src/devices/gen41/gen41_evk2_tz_device.cpp @@ -0,0 +1,272 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifdef _MSC_VER +#define NOMINMAX +#endif + +#include "devices/gen41/gen41_evk2_tz_device.h" +#include "devices/utils/device_system_id.h" +#include "boards/treuzell/tz_libusb_board_command.h" +#include "devices/common/issd.h" +#include "devices/gen41/gen41_evk2_issd.h" +#include "devices/gen41/gen41_antiflicker_module.h" +#include "devices/gen41/gen41_erc.h" +#include "devices/gen41/gen41_ll_biases.h" +#include "devices/gen41/gen41_noise_filter_module.h" +#include "devices/gen41/gen41_roi_command.h" +#include "devices/gen41/gen41_evk2_regmap_builder.h" +#include "devices/common/evk2_tz_trigger_event.h" +#include "devices/common/evk2_tz_trigger_out.h" +#include "facilities/psee_hw_register.h" +#include "geometries/hd_geometry.h" +#include "metavision/hal/facilities/i_events_stream.h" +#include "metavision/hal/utils/device_builder.h" +#include "plugin/psee_plugin.h" +#include +#include +#include + +namespace Metavision { +namespace { +std::string ROOT_PREFIX = "PSEE/"; +std::string SENSOR_PREFIX = ROOT_PREFIX + "SENSOR_IF/GEN41/"; +} // namespace + +TzEvk2Gen41::TzEvk2Gen41(std::shared_ptr cmd, uint32_t dev_id, std::shared_ptr parent) : + TzDevice(cmd, dev_id, parent), + TzPseeVideo(cmd, dev_id, parent), + TzDeviceWithRegmap(build_gen41_evk2_register_map), + TzIssdDevice(gen41_evk2_sequence), + sys_ctrl_(register_map, ROOT_PREFIX) { + sync_mode_ = I_DeviceControl::SyncMode::STANDALONE; + temperature_init(); + iph_mirror_control(true); + std::this_thread::sleep_for(std::chrono::milliseconds(1)); + lifo_control(true, true, true); +} + +std::shared_ptr TzEvk2Gen41::build(std::shared_ptr cmd, uint32_t dev_id, + std::shared_ptr parent) { + if (can_build(cmd, dev_id)) + return std::make_shared(cmd, dev_id, parent); + else + return nullptr; +} + +bool TzEvk2Gen41::can_build(std::shared_ptr cmd, uint32_t dev_id) { + return (cmd->read_device_register(dev_id, 0x800)[0] == SYSTEM_EVK2_GEN41); +} + +void TzEvk2Gen41::spawn_facilities(DeviceBuilder &device_builder) { + device_builder.add_facility(std::make_unique(register_map, SENSOR_PREFIX)); + device_builder.add_facility(std::make_unique(register_map, SENSOR_PREFIX)); + + auto erc = device_builder.add_facility(std::make_unique(register_map, SENSOR_PREFIX + "erc/")); + erc->initialize(); + erc->enable(true); + + auto hw_register = device_builder.add_facility(std::make_unique(register_map)); + device_builder.add_facility(std::make_unique(hw_register, SENSOR_PREFIX)); + + auto geometry = HDGeometry(); + device_builder.add_facility( + std::make_unique(geometry.get_width(), geometry.get_height(), register_map, SENSOR_PREFIX)); + + device_builder.add_facility(std::make_unique(register_map, "PSEE/", shared_from_this())); + device_builder.add_facility(std::make_unique( + register_map, "PSEE/", std::dynamic_pointer_cast(shared_from_this()))); +} + +TzEvk2Gen41::~TzEvk2Gen41() {} + +void TzEvk2Gen41::start() { + TzIssdDevice::start(); +} + +void TzEvk2Gen41::stop() { + TzIssdDevice::stop(); +} + +long long TzEvk2Gen41::get_sensor_id() { + return (*register_map)[SENSOR_PREFIX + "chip_id"].read_value(); +} + +TzDevice::StreamFormat TzEvk2Gen41::get_output_format() { + return {std::string("EVT3"), std::make_unique()}; +} + +long TzEvk2Gen41::get_system_id() { + return cmd->read_device_register(tzID, 0x800)[0]; +} + +bool TzEvk2Gen41::set_mode_standalone() { + /* time_base_config(ext_sync, master, master_sel, fwd_up, fwd_down) + - ext_sync = 1 --| + - master = 1 ----> generate internal sync_out + - master_sel = 0 -> Don't care since master = 1. Time-base counter is auto-generated. + - fwd_up = 0 -> IOs sync_out = 0 + - fwd_down = 1 -> ccam5 sync_in = internal sync_out + */ + sys_ctrl_.time_base_config(true, true, false, false, true); + + if (!sys_ctrl_.is_trigger_out_enabled()) { + // Disabled sync out IO + sys_ctrl_.sync_out_pin_control(false); + sys_ctrl_.sync_out_pin_config(false); + } + sync_mode_ = I_DeviceControl::SyncMode::STANDALONE; + return true; +} + +bool TzEvk2Gen41::set_mode_master() { + /* time_base_config(ext_sync, master, master_sel, fwd_up, fwd_down) + - ext_sync = 1 --| + - master = 1 ----> generate internal sync_out + - master_sel = 0 -> Don't care since master = 1. Time-base counter is auto-generated. + - fwd_up = 1 -> IOs sync_out = internal sync_out + - fwd_down = 1 -> ccam5 sync_in = internal sync_out + */ + if (sys_ctrl_.is_trigger_out_enabled()) { + MV_HAL_LOG_WARNING() << "Switching to master sync mode. Trigger out will be overridden."; + } + + sys_ctrl_.time_base_config(true, true, false, true, true); + sys_ctrl_.sync_out_pin_config(false); + sys_ctrl_.sync_out_pin_control(true); + sync_mode_ = I_DeviceControl::SyncMode::MASTER; + return true; +} + +bool TzEvk2Gen41::set_mode_slave() { + /* time_base_config(ext_sync, master, master_sel, fwd_up, fwd_down) + - ext_sync = 1 --| + - master = 0 ----> Use sync_in from mux master_sel + - master_sel = 1 -> internal sync_in = IOs sync_in + - fwd_up = 0 -> IOs sync_out = 0 + - fwd_down = 1 -> ccam5 sync_in = IOs sync_in + */ + sys_ctrl_.time_base_config(true, false, true, false, true); + + if (!sys_ctrl_.is_trigger_out_enabled()) { + // Disabled sync out IO + sys_ctrl_.sync_out_pin_control(false); + sys_ctrl_.sync_out_pin_config(false); + } + sync_mode_ = I_DeviceControl::SyncMode::SLAVE; + return true; +} + +I_DeviceControl::SyncMode TzEvk2Gen41::get_mode() { + return sync_mode_; +} + +int TzEvk2Gen41::get_temperature() { + (*register_map)[SENSOR_PREFIX + "adc_control"]["adc_clk_en"].write_value(1); + (*register_map)[SENSOR_PREFIX + "adc_misc_ctrl"]["adc_temp"].write_value(1); + (*register_map)[SENSOR_PREFIX + "adc_control"]["adc_start"].write_value(1); + + bool valid = false; + uint16_t retries = 0; + uint32_t counter = 0; + uint32_t status = 0; + uint32_t temp_val = 0; + + while (valid == false && retries < 5) { + status = (*register_map)[SENSOR_PREFIX + "adc_status"]["adc_done_dyn"].read_value(); + temp_val = (*register_map)[SENSOR_PREFIX + "adc_status"]["adc_dac_dyn"].read_value(); + valid = status & 1; + retries += 1; + } + + if (!valid) { + MV_HAL_LOG_ERROR() << "Failed to get temperature"; + return -1; + } + + (*register_map)[SENSOR_PREFIX + "adc_control"]["adc_clk_en"].write_value(0); + + return ((0.190 * temp_val) - 56); +} + +int TzEvk2Gen41::get_illumination() { + bool valid = false; + uint16_t retries = 0; + uint32_t counter = 0; + + while (valid == false && retries < 10) { + uint32_t reg_val = (*register_map)[SENSOR_PREFIX + "lifo_status"].read_value(); + valid = reg_val & 1 << 29; + counter = reg_val & ((1 << 27) - 1); + retries += 1; + } + + if (!valid) { + MV_HAL_LOG_ERROR() << "Failed to get illumination"; + return -1; + } + + if (counter != decltype(counter)(-1)) { + float t = float(counter) / 100.; + return powf(10, 3.5 - logf(t * 0.37) / logf(10)); + } + return -1; +} + +void TzEvk2Gen41::temperature_init() { + // Temperature ADC init + (*register_map)[SENSOR_PREFIX + "adc_control"]["adc_en"].write_value(1); + (*register_map)[SENSOR_PREFIX + "adc_control"]["adc_clk_en"].write_value(1); + (*register_map)[SENSOR_PREFIX + "adc_misc_ctrl"]["adc_buf_cal_en"].write_value(1); + std::this_thread::sleep_for(std::chrono::microseconds(100)); + + // Temperature sensor init + (*register_map)[SENSOR_PREFIX + "temp_ctrl"]["temp_buf_en"].write_value(1); + (*register_map)[SENSOR_PREFIX + "temp_ctrl"]["temp_buf_cal_en"].write_value(1); + std::this_thread::sleep_for(std::chrono::microseconds(100)); + + (*register_map)[SENSOR_PREFIX + "adc_control"]["adc_clk_en"].write_value(0); +} + +void TzEvk2Gen41::lifo_control(bool enable, bool out_en, bool cnt_en) { + /* Control the LIFO settings. + + Args: + enable (bool): Puts the LIFO in ready mode. + out_en (bool): Turns on the LIFO. + cnt_en (bool): Turns on the LIFO counter in the digital to start integrating. + + */ + + if (enable && out_en) { + (*register_map)[SENSOR_PREFIX + "lifo_ctrl"]["lifo_en"].write_value(enable); + std::this_thread::sleep_for(std::chrono::milliseconds(1)); + (*register_map)[SENSOR_PREFIX + "lifo_ctrl"]["lifo_out_en"].write_value(out_en); + std::this_thread::sleep_for(std::chrono::milliseconds(1)); + } else if (enable && !out_en) { + (*register_map)[SENSOR_PREFIX + "lifo_ctrl"]["lifo_en"].write_value(enable); + } else if (!enable && out_en) { + (*register_map)[SENSOR_PREFIX + "lifo_ctrl"]["lifo_out_en"].write_value(out_en); + } else if (!enable && !out_en) { + (*register_map)[SENSOR_PREFIX + "lifo_ctrl"]["lifo_en"].write_value(enable); + (*register_map)[SENSOR_PREFIX + "lifo_ctrl"]["lifo_out_en"].write_value(out_en); + } + (*register_map)[SENSOR_PREFIX + "lifo_ctrl"]["lifo_cnt_en"].write_value(cnt_en); +} + +void TzEvk2Gen41::iph_mirror_control(bool enable) { + (*register_map)[SENSOR_PREFIX + "iph_mirr_ctrl"]["iph_mirr_en"].write_value(enable); + std::this_thread::sleep_for(std::chrono::microseconds(20)); + (*register_map)[SENSOR_PREFIX + "iph_mirr_ctrl"]["iph_mirr_amp_en"].write_value(enable); + std::this_thread::sleep_for(std::chrono::microseconds(20)); +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/devices/gen41/gen41_evk3_regmap_builder.cpp b/hal_psee_plugins/src/devices/gen41/gen41_evk3_regmap_builder.cpp new file mode 100644 index 000000000..28594fec0 --- /dev/null +++ b/hal_psee_plugins/src/devices/gen41/gen41_evk3_regmap_builder.cpp @@ -0,0 +1,31 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include +#include + +#include "devices/gen41/gen41_evk3_regmap_builder.h" +#include "devices/gen41/register_maps/gen41_evk3_registermap.h" +#include "utils/regmap_data.h" +#include "utils/register_map.h" + +namespace Metavision { + +void build_gen41_evk3_register_map(RegisterMap ®map) { + std::vector> Gen41Evk3RegisterMap_init = { + std::make_tuple(Gen41Evk3RegisterMap, Gen41Evk3RegisterMapSize, "PSEE", 0), + }; + + init_device_regmap(regmap, Gen41Evk3RegisterMap_init); + regmap.dump(); +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/devices/gen41/gen41_ll_biases.cpp b/hal_psee_plugins/src/devices/gen41/gen41_ll_biases.cpp new file mode 100644 index 000000000..7209f5cd8 --- /dev/null +++ b/hal_psee_plugins/src/devices/gen41/gen41_ll_biases.cpp @@ -0,0 +1,150 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include "devices/gen41/gen41_ll_biases.h" +#include "metavision/hal/facilities/i_hw_register.h" +#include "metavision/hal/utils/hal_log.h" +#include "metavision/hal/utils/hal_exception.h" +#include "utils/psee_hal_plugin_error_code.h" +#include "utils/psee_hal_utils.h" + +namespace Metavision { + +static constexpr uint32_t BIAS_CONF = 0x11A10000; + +class Gen41LLBias { +public: + Gen41LLBias(int min_value, int max_value, bool modifiable, std::string register_name) { + min_value_ = min_value; + max_value_ = max_value; + register_name_ = register_name; + modifiable_ = modifiable; + } + + ~Gen41LLBias() {} + bool is_modifiable() const { + return modifiable_; + } + const std::string &get_register_name() const { + return register_name_; + } + bool is_in_range(const int value) { + return (min_value_ <= value && value <= max_value_); + } + +private: + int min_value_; + int max_value_; + std::string register_name_; + bool modifiable_; +}; + +std::map &get_gen41_biases_map() { + static std::map biases_map_; + return biases_map_; +} + +uint32_t get_gen41_bias_encoding(const Gen41LLBias &bias, int bias_value) { + if (!Metavision::is_expert_mode_enabled()) { + if (bias_value < 0) { + bias_value = 0; + } + if (bias_value > 255) { + bias_value = 255; + } + } + return (uint32_t)bias_value | BIAS_CONF; +} + +} // namespace Metavision + +namespace Metavision { + +Gen41_LL_Biases::Gen41_LL_Biases(const std::shared_ptr &i_hw_register, + const std::string &sensor_prefix) : + i_hw_register_(i_hw_register), base_name_(sensor_prefix) { + if (!i_hw_register_) { + throw(HalException(PseeHalPluginErrorCode::HWRegisterNotFound, "HW Register facility is null.")); + } + // Init map with the values in the registers + auto &gen41_biases_map = get_gen41_biases_map(); + gen41_biases_map.clear(); + gen41_biases_map.insert({"bias_fo", Gen41LLBias(0x2D, 0x6E, true, "bias/bias_fo")}); + gen41_biases_map.insert({"bias_hpf", Gen41LLBias(0x00, 0x78, true, "bias/bias_hpf")}); + gen41_biases_map.insert({"bias_diff_on", Gen41LLBias(0x00, 0x8C, true, "bias/bias_diff_on")}); + gen41_biases_map.insert({"bias_diff", Gen41LLBias(0x34, 0x64, false, "bias/bias_diff")}); + gen41_biases_map.insert({"bias_diff_off", Gen41LLBias(0x19, 0xFF, true, "bias/bias_diff_off")}); + gen41_biases_map.insert({"bias_refr", Gen41LLBias(0x14, 0x64, true, "bias/bias_refr")}); +} + +bool Gen41_LL_Biases::set(const std::string &bias_name, int bias_value) { + auto it = get_gen41_biases_map().find(bias_name); + if (it == get_gen41_biases_map().end()) { + return false; + } + if (it->second.is_modifiable() == false) { + return false; + } + if (!it->second.is_in_range(bias_value)) { + MV_HAL_LOG_WARNING() << bias_value << "is not in acceptable range for" << bias_name; + return false; + } + + if (bias_name == "bias_diff_on") { + auto b = get("bias_diff"); + if (bias_value < b + 15) { + bias_value = b + 15; + MV_HAL_LOG_WARNING() << "Current bias_diff_on minimal value is" << bias_value; + return false; + } + } + if (bias_name == "bias_diff_off") { + auto b = get("bias_diff"); + if (bias_value > b - 15) { + bias_value = b - 15; + MV_HAL_LOG_WARNING() << "Current bias_diff_off maximal value is" << bias_value; + return false; + } + } + auto reg = get_gen41_bias_encoding(it->second, bias_value); + get_hw_register()->write_register(base_name_ + it->second.get_register_name(), reg); + return true; +} + +int Gen41_LL_Biases::get(const std::string &bias_name) { + auto it = get_gen41_biases_map().find(bias_name); + if (it == get_gen41_biases_map().end()) { + return -1; + } + + auto r = get_hw_register()->read_register(base_name_ + it->second.get_register_name()); + if (r == uint32_t(-1)) + return -1; + r = r & 0xFF; + if (r > 255) { + return -1; + } + return r; +} + +std::map Gen41_LL_Biases::get_all_biases() { + std::map ret; + for (auto &b : get_gen41_biases_map()) { + ret[b.first] = get(b.first); + } + return ret; +} + +const std::shared_ptr &Gen41_LL_Biases::get_hw_register() const { + return i_hw_register_; +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/devices/gen41/gen41_noise_filter_module.cpp b/hal_psee_plugins/src/devices/gen41/gen41_noise_filter_module.cpp new file mode 100644 index 000000000..c61087f7a --- /dev/null +++ b/hal_psee_plugins/src/devices/gen41/gen41_noise_filter_module.cpp @@ -0,0 +1,183 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include +#include + +#include "devices/gen41/gen41_noise_filter_module.h" +#include "utils/register_map.h" + +namespace Metavision { + +namespace { +std::map> stc_threshold_params = { + {1, {{"presc", 12}, {"mult", 15}, {"Reserved_D0C0_23_12", 90}}}, + {2, {{"presc", 10}, {"mult", 3}, {"Reserved_D0C0_23_12", 90}}}, + {3, {{"presc", 11}, {"mult", 5}, {"Reserved_D0C0_23_12", 95}}}, + {4, {{"presc", 9}, {"mult", 1}, {"Reserved_D0C0_23_12", 102}}}, + {5, {{"presc", 13}, {"mult", 15}, {"Reserved_D0C0_23_12", 90}}}, + {6, {{"presc", 11}, {"mult", 3}, {"Reserved_D0C0_23_12", 114}}}, + {7, {{"presc", 11}, {"mult", 3}, {"Reserved_D0C0_23_12", 90}}}, + {8, {{"presc", 12}, {"mult", 5}, {"Reserved_D0C0_23_12", 109}}}, + {9, {{"presc", 13}, {"mult", 9}, {"Reserved_D0C0_23_12", 122}}}, + {10, {{"presc", 13}, {"mult", 9}, {"Reserved_D0C0_23_12", 90}}}, + {11, {{"presc", 10}, {"mult", 1}, {"Reserved_D0C0_23_12", 102}}}, + {12, {{"presc", 14}, {"mult", 15}, {"Reserved_D0C0_23_12", 109}}}, + {13, {{"presc", 13}, {"mult", 7}, {"Reserved_D0C0_23_12", 117}}}, + {14, {{"presc", 14}, {"mult", 13}, {"Reserved_D0C0_23_12", 127}}}, + {15, {{"presc", 12}, {"mult", 3}, {"Reserved_D0C0_23_12", 138}}}, + {16, {{"presc", 12}, {"mult", 3}, {"Reserved_D0C0_23_12", 90}}}, + {17, {{"presc", 12}, {"mult", 3}, {"Reserved_D0C0_23_12", 90}}}, + {18, {{"presc", 14}, {"mult", 11}, {"Reserved_D0C0_23_12", 99}}}, + {19, {{"presc", 13}, {"mult", 5}, {"Reserved_D0C0_23_12", 109}}}, + {20, {{"presc", 13}, {"mult", 5}, {"Reserved_D0C0_23_12", 109}}}, + {21, {{"presc", 14}, {"mult", 9}, {"Reserved_D0C0_23_12", 122}}}, + {22, {{"presc", 14}, {"mult", 9}, {"Reserved_D0C0_23_12", 122}}}, + {23, {{"presc", 11}, {"mult", 1}, {"Reserved_D0C0_23_12", 209}}}, + {24, {{"presc", 11}, {"mult", 1}, {"Reserved_D0C0_23_12", 138}}}, + {25, {{"presc", 11}, {"mult", 1}, {"Reserved_D0C0_23_12", 138}}}, + {26, {{"presc", 15}, {"mult", 15}, {"Reserved_D0C0_23_12", 147}}}, + {27, {{"presc", 15}, {"mult", 15}, {"Reserved_D0C0_23_12", 147}}}, + {28, {{"presc", 14}, {"mult", 7}, {"Reserved_D0C0_23_12", 158}}}, + {29, {{"presc", 14}, {"mult", 7}, {"Reserved_D0C0_23_12", 158}}}, + {30, {{"presc", 15}, {"mult", 13}, {"Reserved_D0C0_23_12", 170}}}, + {31, {{"presc", 15}, {"mult", 13}, {"Reserved_D0C0_23_12", 170}}}, + {32, {{"presc", 13}, {"mult", 3}, {"Reserved_D0C0_23_12", 185}}}, + {33, {{"presc", 13}, {"mult", 3}, {"Reserved_D0C0_23_12", 185}}}, + {34, {{"presc", 13}, {"mult", 3}, {"Reserved_D0C0_23_12", 185}}}, + {35, {{"presc", 13}, {"mult", 3}, {"Reserved_D0C0_23_12", 90}}}, + {36, {{"presc", 13}, {"mult", 3}, {"Reserved_D0C0_23_12", 90}}}, + {37, {{"presc", 15}, {"mult", 11}, {"Reserved_D0C0_23_12", 202}}}, + {38, {{"presc", 15}, {"mult", 11}, {"Reserved_D0C0_23_12", 99}}}, + {39, {{"presc", 15}, {"mult", 11}, {"Reserved_D0C0_23_12", 99}}}, + {40, {{"presc", 15}, {"mult", 11}, {"Reserved_D0C0_23_12", 99}}}, + {41, {{"presc", 14}, {"mult", 5}, {"Reserved_D0C0_23_12", 109}}}, + {42, {{"presc", 14}, {"mult", 5}, {"Reserved_D0C0_23_12", 109}}}, + {43, {{"presc", 14}, {"mult", 5}, {"Reserved_D0C0_23_12", 109}}}, + {44, {{"presc", 14}, {"mult", 5}, {"Reserved_D0C0_23_12", 109}}}, + {45, {{"presc", 15}, {"mult", 9}, {"Reserved_D0C0_23_12", 248}}}, + {46, {{"presc", 15}, {"mult", 9}, {"Reserved_D0C0_23_12", 122}}}, + {47, {{"presc", 15}, {"mult", 9}, {"Reserved_D0C0_23_12", 122}}}, + {48, {{"presc", 15}, {"mult", 9}, {"Reserved_D0C0_23_12", 122}}}, + {49, {{"presc", 15}, {"mult", 9}, {"Reserved_D0C0_23_12", 122}}}, + {50, {{"presc", 12}, {"mult", 1}, {"Reserved_D0C0_23_12", 280}}}, + {51, {{"presc", 12}, {"mult", 1}, {"Reserved_D0C0_23_12", 280}}}, + {52, {{"presc", 12}, {"mult", 1}, {"Reserved_D0C0_23_12", 138}}}, + {53, {{"presc", 12}, {"mult", 1}, {"Reserved_D0C0_23_12", 138}}}, + {54, {{"presc", 12}, {"mult", 1}, {"Reserved_D0C0_23_12", 138}}}, + {55, {{"presc", 12}, {"mult", 1}, {"Reserved_D0C0_23_12", 138}}}, + {56, {{"presc", 16}, {"mult", 15}, {"Reserved_D0C0_23_12", 147}}}, + {57, {{"presc", 16}, {"mult", 15}, {"Reserved_D0C0_23_12", 147}}}, + {58, {{"presc", 16}, {"mult", 15}, {"Reserved_D0C0_23_12", 147}}}, + {59, {{"presc", 15}, {"mult", 7}, {"Reserved_D0C0_23_12", 158}}}, + {60, {{"presc", 15}, {"mult", 7}, {"Reserved_D0C0_23_12", 158}}}, + {61, {{"presc", 15}, {"mult", 7}, {"Reserved_D0C0_23_12", 158}}}, + {62, {{"presc", 15}, {"mult", 7}, {"Reserved_D0C0_23_12", 158}}}, + {63, {{"presc", 15}, {"mult", 7}, {"Reserved_D0C0_23_12", 158}}}, + {64, {{"presc", 16}, {"mult", 13}, {"Reserved_D0C0_23_12", 171}}}, + {65, {{"presc", 16}, {"mult", 13}, {"Reserved_D0C0_23_12", 171}}}, + {66, {{"presc", 16}, {"mult", 13}, {"Reserved_D0C0_23_12", 171}}}, + {67, {{"presc", 16}, {"mult", 13}, {"Reserved_D0C0_23_12", 171}}}, + {68, {{"presc", 16}, {"mult", 13}, {"Reserved_D0C0_23_12", 171}}}, + {69, {{"presc", 14}, {"mult", 3}, {"Reserved_D0C0_23_12", 185}}}, + {70, {{"presc", 14}, {"mult", 3}, {"Reserved_D0C0_23_12", 185}}}, + {71, {{"presc", 14}, {"mult", 3}, {"Reserved_D0C0_23_12", 185}}}, + {72, {{"presc", 14}, {"mult", 3}, {"Reserved_D0C0_23_12", 185}}}, + {73, {{"presc", 14}, {"mult", 3}, {"Reserved_D0C0_23_12", 185}}}, + {74, {{"presc", 16}, {"mult", 11}, {"Reserved_D0C0_23_12", 409}}}, + {75, {{"presc", 16}, {"mult", 11}, {"Reserved_D0C0_23_12", 202}}}, + {76, {{"presc", 16}, {"mult", 11}, {"Reserved_D0C0_23_12", 202}}}, + {77, {{"presc", 16}, {"mult", 11}, {"Reserved_D0C0_23_12", 202}}}, + {78, {{"presc", 16}, {"mult", 11}, {"Reserved_D0C0_23_12", 202}}}, + {79, {{"presc", 16}, {"mult", 11}, {"Reserved_D0C0_23_12", 202}}}, + {80, {{"presc", 16}, {"mult", 11}, {"Reserved_D0C0_23_12", 202}}}, + {81, {{"presc", 15}, {"mult", 5}, {"Reserved_D0C0_23_12", 451}}}, + {82, {{"presc", 15}, {"mult", 5}, {"Reserved_D0C0_23_12", 223}}}, + {83, {{"presc", 15}, {"mult", 5}, {"Reserved_D0C0_23_12", 223}}}, + {84, {{"presc", 15}, {"mult", 5}, {"Reserved_D0C0_23_12", 223}}}, + {85, {{"presc", 15}, {"mult", 5}, {"Reserved_D0C0_23_12", 223}}}, + {86, {{"presc", 15}, {"mult", 5}, {"Reserved_D0C0_23_12", 223}}}, + {87, {{"presc", 15}, {"mult", 5}, {"Reserved_D0C0_23_12", 223}}}, + {88, {{"presc", 15}, {"mult", 5}, {"Reserved_D0C0_23_12", 223}}}, + {89, {{"presc", 16}, {"mult", 9}, {"Reserved_D0C0_23_12", 501}}}, + {90, {{"presc", 16}, {"mult", 9}, {"Reserved_D0C0_23_12", 501}}}, + {91, {{"presc", 16}, {"mult", 9}, {"Reserved_D0C0_23_12", 501}}}, + {92, {{"presc", 16}, {"mult", 9}, {"Reserved_D0C0_23_12", 248}}}, + {93, {{"presc", 16}, {"mult", 9}, {"Reserved_D0C0_23_12", 248}}}, + {94, {{"presc", 16}, {"mult", 9}, {"Reserved_D0C0_23_12", 248}}}, + {95, {{"presc", 16}, {"mult", 9}, {"Reserved_D0C0_23_12", 248}}}, + {96, {{"presc", 16}, {"mult", 9}, {"Reserved_D0C0_23_12", 248}}}, + {97, {{"presc", 16}, {"mult", 9}, {"Reserved_D0C0_23_12", 248}}}, + {98, {{"presc", 16}, {"mult", 9}, {"Reserved_D0C0_23_12", 248}}}, + {99, {{"presc", 13}, {"mult", 1}, {"Reserved_D0C0_23_12", 564}}}, + {100, {{"presc", 13}, {"mult", 1}, {"Reserved_D0C0_23_12", 564}}}}; +} + +Gen41NoiseFilterModule::Gen41NoiseFilterModule(const std::shared_ptr ®ister_map, + const std::string &sensor_prefix) : + register_map_(register_map), sensor_prefix_(sensor_prefix) {} + +void Gen41NoiseFilterModule::enable(I_NoiseFilterModule::Type type, uint32_t threshold) { + uint32_t threshold_ms = 0; + + if (threshold < 1000 || threshold > 100000) { + MV_HAL_LOG_ERROR() << "Bad STC threshold value"; + return; + } else { + threshold_ms = std::roundf(threshold / 1000.0); + } + // Bypass filter + disable(); + + // Start sram init + (*register_map_)[sensor_prefix_ + "stc/initialization"]["stc_flag_init_done"].write_value(1); + (*register_map_)[sensor_prefix_ + "stc/initialization"]["stc_req_init"].write_value(1); + + // Setup new configuration + if (type == I_NoiseFilterModule::Type::STC) { + (*register_map_)[sensor_prefix_ + "stc/stc_param"].write_value( + {{"stc_enable", 1}, {"stc_threshold", threshold_ms * 1000}}); + (*register_map_)[sensor_prefix_ + "stc/trail_param"].write_value({"trail_enable", 0}); + + } else if (type == I_NoiseFilterModule::Type::TRAIL) { + (*register_map_)[sensor_prefix_ + "stc/stc_param"].write_value({"stc_enable", 0}); + (*register_map_)[sensor_prefix_ + "stc/trail_param"].write_value( + {{"trail_enable", 1}, {"trail_threshold", threshold_ms * 1000}}); + } + + (*register_map_)[sensor_prefix_ + "stc/timestamping"].write_value( + {{"prescaler", stc_threshold_params[threshold_ms]["presc"]}, + {"multiplier", stc_threshold_params[threshold_ms]["mult"]}}); + (*register_map_)[sensor_prefix_ + "stc/Reserved_D0C0"].write_value( + {"Reserved_23_12", stc_threshold_params[threshold_ms]["Reserved_D0C0_23_12"]}); + + // Check sram init done + bool init_done = 0; + for (int i = 0; i < 3; i++) { + init_done = (*register_map_)[sensor_prefix_ + "stc/initialization"]["stc_flag_init_done"].read_value(); + if (init_done == 1) { + break; + } + } + if (init_done == 0) { + MV_HAL_LOG_ERROR() << "Bad STC initialization"; + return; + } + + // Enable filter + (*register_map_)[sensor_prefix_ + "stc/pipeline_control"]["stc_trail_bypass"].write_value(0b001); +} + +void Gen41NoiseFilterModule::disable() { + (*register_map_)[sensor_prefix_ + "stc/pipeline_control"]["stc_trail_bypass"].write_value(0b101); +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/devices/gen41/gen41_roi_command.cpp b/hal_psee_plugins/src/devices/gen41/gen41_roi_command.cpp new file mode 100644 index 000000000..07fc2fb9c --- /dev/null +++ b/hal_psee_plugins/src/devices/gen41/gen41_roi_command.cpp @@ -0,0 +1,92 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include + +#include "devices/gen41/gen41_roi_command.h" +#include "utils/register_map.h" + +namespace Metavision { + +Gen41ROICommand::Gen41ROICommand(int width, int height, const std::shared_ptr ®map, + const std::string &sensor_prefix) : + PseeROI(width, height), register_map_(regmap), sensor_prefix_(sensor_prefix) { + reset_to_full_roi(); +} + +void Gen41ROICommand::reset_to_full_roi() { + constexpr int roi_step = 0x004; + uint32_t col_td_ind, row_td_ind; + uint32_t td_roi_x00_addr, td_roi_x39_addr; + uint32_t td_roi_y00_addr, td_roi_y22_addr; + + // setting x registers + td_roi_x00_addr = (*register_map_)[sensor_prefix_ + "roi/td_roi_x00"].get_address(); + td_roi_x39_addr = (*register_map_)[sensor_prefix_ + "roi/td_roi_x39"].get_address(); + for (col_td_ind = td_roi_x00_addr; col_td_ind <= td_roi_x39_addr; col_td_ind += roi_step) { + (*register_map_)[col_td_ind]["effective"] = "enable"; + } + + // setting y registers + td_roi_y00_addr = (*register_map_)[sensor_prefix_ + "roi/td_roi_y00"].get_address(); + td_roi_y22_addr = (*register_map_)[sensor_prefix_ + "roi/td_roi_y22"].get_address(); + for (row_td_ind = td_roi_y00_addr; row_td_ind <= td_roi_y22_addr; row_td_ind += roi_step) { + (*register_map_)[row_td_ind]["effective"] = "enable"; + } +} + +void Gen41ROICommand::write_ROI(const std::vector &vroiparams) { + constexpr int roi_step = 0x004; + uint32_t param_ind = 0; + uint32_t col_td_ind, row_td_ind; + roi_save_ = vroiparams; + uint32_t td_roi_x00_addr, td_roi_x39_addr, td_roi_x40_addr; + uint32_t td_roi_y00_addr, td_roi_y22_addr; + + td_roi_x00_addr = (*register_map_)[sensor_prefix_ + "roi/td_roi_x00"].get_address(); + td_roi_x39_addr = (*register_map_)[sensor_prefix_ + "roi/td_roi_x39"].get_address(); + + td_roi_y00_addr = (*register_map_)[sensor_prefix_ + "roi/td_roi_y00"].get_address(); + td_roi_y22_addr = (*register_map_)[sensor_prefix_ + "roi/td_roi_y22"].get_address(); + uint32_t xsize = ((td_roi_x39_addr - td_roi_x00_addr) / roi_step) + 1; + uint32_t ysize = ((td_roi_y22_addr - td_roi_y00_addr) / roi_step) + 1; + if (vroiparams.size() != (xsize + ysize)) { + MV_HAL_LOG_WARNING() << "Error setting roi for Gen 41 sensor."; + } + + // setting x registers + for (col_td_ind = td_roi_x00_addr; col_td_ind <= td_roi_x39_addr; col_td_ind += roi_step, ++param_ind) { + (*register_map_)[col_td_ind] = ~vroiparams[param_ind]; + } + + // setting y registers + for (row_td_ind = td_roi_y00_addr; row_td_ind <= td_roi_y22_addr; row_td_ind += roi_step, ++param_ind) { + uint32_t v = ~vroiparams[param_ind]; + if (row_td_ind == td_roi_y22_addr) { + v |= 0xffff0000; + } + (*register_map_)[row_td_ind] = v; + } +} + +void Gen41ROICommand::enable(bool state) { + write_ROI(roi_save_); + if (!state) { + reset_to_full_roi(); + + } else { + write_ROI(roi_save_); + } + (*register_map_)[sensor_prefix_ + "roi_ctrl"].write_value( + {{"roi_td_en", 1}, {"px_td_rstn", 1}, {"roi_td_shadow_trigger", 1}}); +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/devices/gen41/gen41_tz_device.cpp b/hal_psee_plugins/src/devices/gen41/gen41_tz_device.cpp new file mode 100644 index 000000000..0fb8525d9 --- /dev/null +++ b/hal_psee_plugins/src/devices/gen41/gen41_tz_device.cpp @@ -0,0 +1,207 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifdef _MSC_VER +#define NOMINMAX +#endif + +#include "devices/gen41/gen41_tz_device.h" +#include "devices/utils/device_system_id.h" +#include "boards/treuzell/tz_libusb_board_command.h" +#include "devices/treuzell/tz_device.h" +#include "devices/common/issd.h" +#include "devices/gen41/gen41_evk3_issd.h" +#include "devices/gen41/gen41_antiflicker_module.h" +#include "devices/gen41/gen41_erc.h" +#include "devices/gen41/gen41_ll_biases.h" +#include "devices/gen41/gen41_noise_filter_module.h" +#include "devices/gen41/gen41_roi_command.h" +#include "devices/gen41/gen41_evk3_regmap_builder.h" +#include "devices/gen41/gen41_tz_trigger_event.h" +#include "facilities/psee_hw_register.h" +#include "geometries/hd_geometry.h" +#include "metavision/hal/facilities/i_events_stream.h" +#include "metavision/hal/utils/device_builder.h" +#include "plugin/psee_plugin.h" +#include +#include +#include + +using vfield = std::map; + +namespace Metavision { +namespace { +std::string ROOT_PREFIX = "PSEE/"; +std::string SENSOR_PREFIX = ROOT_PREFIX + "GEN41/"; +} // namespace + +TzGen41::TzGen41(std::shared_ptr cmd, uint32_t dev_id, std::shared_ptr parent) : + TzDevice(cmd, dev_id, parent), TzIssdDevice(gen41_evk3_issd), TzDeviceWithRegmap(build_gen41_evk3_register_map) { + sync_mode_ = I_DeviceControl::SyncMode::STANDALONE; + iph_mirror_control(true); + std::this_thread::sleep_for(std::chrono::milliseconds(1)); + lifo_control(true, true, true); +} + +std::shared_ptr TzGen41::build(std::shared_ptr cmd, uint32_t dev_id, + std::shared_ptr parent) { + if (can_build(cmd, dev_id)) { + return std::make_shared(cmd, dev_id, parent); + } else { + return nullptr; + } +} + +bool TzGen41::can_build(std::shared_ptr cmd, uint32_t dev_id) { + auto ret = cmd->read_device_register(dev_id, 0x14)[0]; + return (ret == 0xA0301003 || ret == 0xA0301002); +} + +void TzGen41::spawn_facilities(DeviceBuilder &device_builder) { + device_builder.add_facility(std::make_unique(register_map, SENSOR_PREFIX)); + device_builder.add_facility(std::make_unique(register_map, SENSOR_PREFIX)); + + auto erc = device_builder.add_facility( + std::make_unique(register_map, SENSOR_PREFIX + "erc/", shared_from_this())); + erc->initialize(); + erc->enable(true); + + auto geometry = HDGeometry(); + + auto hw_register = device_builder.add_facility(std::make_unique(register_map)); + + device_builder.add_facility(std::make_unique(hw_register, SENSOR_PREFIX)); + + device_builder.add_facility( + std::make_unique(geometry.get_width(), geometry.get_height(), register_map, SENSOR_PREFIX)); + + device_builder.add_facility(std::make_unique(register_map, SENSOR_PREFIX, shared_from_this())); +} + +TzGen41::~TzGen41() {} + +long long TzGen41::get_sensor_id() { + return (*register_map)[SENSOR_PREFIX + "chip_id"].read_value(); +} + +TzDevice::StreamFormat TzGen41::get_output_format() { + return {std::string("EVT3"), std::make_unique()}; +} + +long TzGen41::get_system_id() const { + return SystemId::SYSTEM_EVK3_GEN41; +} + +bool TzGen41::set_mode_standalone() { + time_base_config(false, true); + + sync_mode_ = I_DeviceControl::SyncMode::STANDALONE; + return true; +} + +bool TzGen41::set_mode_master() { + time_base_config(true, true); + + sync_mode_ = I_DeviceControl::SyncMode::MASTER; + return true; +} + +bool TzGen41::set_mode_slave() { + time_base_config(true, false); + + sync_mode_ = I_DeviceControl::SyncMode::SLAVE; + return true; +} + +I_DeviceControl::SyncMode TzGen41::get_mode() { + return sync_mode_; +} + +int TzGen41::get_illumination() { + bool valid = false; + uint16_t retries = 0; + uint32_t counter = 0; + + while (valid == false && retries < 10) { + uint32_t reg_val = (*register_map)[SENSOR_PREFIX + "lifo_status"].read_value(); + valid = reg_val & 1 << 29; + counter = reg_val & ((1 << 27) - 1); + retries += 1; + } + + if (!valid) { + MV_HAL_LOG_ERROR() << "Failed to get illumination"; + return -1; + } + + if (counter != decltype(counter)(-1)) { + float t = float(counter) / 100.; + return powf(10, 3.5 - logf(t * 0.37) / logf(10)); + } + return -1; +} + +void TzGen41::time_base_config(bool external, bool master) { + /* Configure sensor time base settings. + By default, the sensor is in monocular mode + */ + (*register_map)[SENSOR_PREFIX + "ro/time_base_ctrl"].write_value(vfield{ + {"time_base_mode", external}, // 0 : Internal, 1 : External + {"external_mode", master}, // 0 : Slave, 1 : Master (valid when in external mode) + {"external_mode_enable", external}, // 0 : External mode disabled, 1 : External mode enabled + {"Reserved_10_4", 100} // default 100 = 1us + }); + + if (external) { + if (master) { + // set SYNCHRO IO to output mode + (*register_map)[SENSOR_PREFIX + "dig_pad2_ctrl"]["pad_sync"].write_value(0b1100); + } else { + // set SYNCHRO IO to input mode + (*register_map)[SENSOR_PREFIX + "dig_pad2_ctrl"]["pad_sync"].write_value(0b1111); + } + } +} + +void TzGen41::lifo_control(bool enable, bool out_en, bool cnt_en) { + /* Control the LIFO settings. + + Args: + enable (bool): Puts the LIFO in ready mode. + out_en (bool): Turns on the LIFO. + cnt_en (bool): Turns on the LIFO counter in the digital to start integrating. + + */ + + if (enable && out_en) { + (*register_map)[SENSOR_PREFIX + "lifo_ctrl"]["lifo_en"].write_value(enable); + std::this_thread::sleep_for(std::chrono::milliseconds(1)); + (*register_map)[SENSOR_PREFIX + "lifo_ctrl"]["lifo_out_en"].write_value(out_en); + std::this_thread::sleep_for(std::chrono::milliseconds(1)); + } else if (enable && !out_en) { + (*register_map)[SENSOR_PREFIX + "lifo_ctrl"]["lifo_en"].write_value(enable); + } else if (!enable && out_en) { + (*register_map)[SENSOR_PREFIX + "lifo_ctrl"]["lifo_out_en"].write_value(out_en); + } else if (!enable && !out_en) { + (*register_map)[SENSOR_PREFIX + "lifo_ctrl"]["lifo_en"].write_value(enable); + (*register_map)[SENSOR_PREFIX + "lifo_ctrl"]["lifo_out_en"].write_value(out_en); + } + (*register_map)[SENSOR_PREFIX + "lifo_ctrl"]["lifo_cnt_en"].write_value(cnt_en); +} + +void TzGen41::iph_mirror_control(bool enable) { + (*register_map)[SENSOR_PREFIX + "iph_mirr_ctrl"]["iph_mirr_en"].write_value(enable); + std::this_thread::sleep_for(std::chrono::microseconds(20)); + (*register_map)[SENSOR_PREFIX + "iph_mirr_ctrl"]["iph_mirr_amp_en"].write_value(enable); + std::this_thread::sleep_for(std::chrono::microseconds(20)); +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/devices/gen41/gen41_tz_trigger_event.cpp b/hal_psee_plugins/src/devices/gen41/gen41_tz_trigger_event.cpp new file mode 100644 index 000000000..4909c47d7 --- /dev/null +++ b/hal_psee_plugins/src/devices/gen41/gen41_tz_trigger_event.cpp @@ -0,0 +1,67 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include "devices/gen41/gen41_tz_trigger_event.h" +#include "utils/register_map.h" + +using vfield = std::map; + +namespace Metavision { + +Gen41TzTriggerEvent::Gen41TzTriggerEvent(const std::shared_ptr ®ister_map, const std::string &prefix, + const std::shared_ptr tzDev) : + register_map_(register_map), prefix_(prefix), tzDev_(tzDev) { + for (const auto &id : chan_ids_) { + disable(static_cast(id)); + } +} + +bool Gen41TzTriggerEvent::is_valid_id(uint32_t channel) { + for (const auto &id : chan_ids_) { + if (static_cast(id) == channel) { + return true; + } + } + return false; +} + +bool Gen41TzTriggerEvent::enable(uint32_t channel) { + bool valid = is_valid_id(channel); + + if (valid) { + (*register_map_)[prefix_ + "dig_pad2_ctrl"]["Reserved_15_12"].write_value(0b1111); + (*register_map_)[prefix_ + "edf/Reserved_7004"]["Reserved_10"].write_value(1); + } + return valid; +} + +bool Gen41TzTriggerEvent::disable(uint32_t channel) { + bool valid = is_valid_id(channel); + + if (valid) { + (*register_map_)[prefix_ + "edf/Reserved_7004"]["Reserved_10"].write_value(0); + } + return valid; +} + +bool Gen41TzTriggerEvent::is_enabled(uint32_t channel) { + bool valid = is_valid_id(channel); + long value = 0; + long value2 = 0; + + if (valid) { + value = (*register_map_)[prefix_ + "dig_pad2_ctrl"]["Reserved_15_12"].read_value(); + value2 = (*register_map_)[prefix_ + "edf/Reserved_7004"]["Reserved_10"].read_value(); + } + return valid && (value == 0xF) && (value2 == 1); +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/devices/golden_fallbacks/CMakeLists.txt b/hal_psee_plugins/src/devices/golden_fallbacks/CMakeLists.txt new file mode 100644 index 000000000..d0961d591 --- /dev/null +++ b/hal_psee_plugins/src/devices/golden_fallbacks/CMakeLists.txt @@ -0,0 +1,19 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. + +if(TARGET hal_plugin_prophesee) +target_sources(hal_plugin_prophesee PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/golden_fallback_fx3_facilities_builder.cpp +) +endif() + +target_sources(hal_plugin_golden_fallbacks PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/golden_fallback_treuzell_facilities_builder.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/golden_fallback_fx3_facilities_builder.cpp +) diff --git a/hal_psee_plugins/src/devices/golden_fallbacks/golden_fallback_fx3_facilities_builder.cpp b/hal_psee_plugins/src/devices/golden_fallbacks/golden_fallback_fx3_facilities_builder.cpp new file mode 100644 index 000000000..8dfd23679 --- /dev/null +++ b/hal_psee_plugins/src/devices/golden_fallbacks/golden_fallback_fx3_facilities_builder.cpp @@ -0,0 +1,27 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include "devices/golden_fallbacks/golden_fallback_fx3_facilities_builder.h" +#include "metavision/hal/utils/device_config.h" +#include "metavision/hal/utils/hal_exception.h" +#include "metavision/hal/utils/device_builder.h" + +namespace Metavision { + +bool build_golden_fallback_fx3_device(DeviceBuilder &device_builder, + const DeviceBuilderParameters &device_builder_params, + const DeviceConfig &device_config) { + throw HalException( + HalErrorCode::GoldenFallbackBooted, + "The FPGA seems to be in an invalid state, contact the support for help at support@prophesee.ai."); +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/devices/golden_fallbacks/golden_fallback_treuzell_facilities_builder.cpp b/hal_psee_plugins/src/devices/golden_fallbacks/golden_fallback_treuzell_facilities_builder.cpp new file mode 100644 index 000000000..bb6336bf6 --- /dev/null +++ b/hal_psee_plugins/src/devices/golden_fallbacks/golden_fallback_treuzell_facilities_builder.cpp @@ -0,0 +1,27 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include "devices/golden_fallbacks/golden_fallback_treuzell_facilities_builder.h" +#include "metavision/hal/utils/device_config.h" +#include "metavision/hal/utils/hal_exception.h" +#include "metavision/hal/utils/device_builder.h" + +namespace Metavision { + +bool build_golden_fallback_treuzell_device(DeviceBuilder &device_builder, + const DeviceBuilderParameters &device_builder_params, + const DeviceConfig &device_config) { + throw HalException( + HalErrorCode::GoldenFallbackBooted, + "The FPGA seems to be in an invalid state, contact the support for help at support@prophesee.ai."); +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/devices/imx636/CMakeLists.txt b/hal_psee_plugins/src/devices/imx636/CMakeLists.txt new file mode 100644 index 000000000..03fb67020 --- /dev/null +++ b/hal_psee_plugins/src/devices/imx636/CMakeLists.txt @@ -0,0 +1,22 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. + +target_sources(metavision_hal_imx636_camera_obj PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/imx636_ll_biases.cpp +) + +target_sources(metavision_hal_imx636_evk2_system_obj PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/imx636_evk2_regmap_builder.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/imx636_evk2_tz_device.cpp +) + +target_sources(metavision_hal_imx636_evk3_system_obj PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/imx636_evk3_regmap_builder.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/imx636_tz_device.cpp +) diff --git a/hal_psee_plugins/src/devices/imx636/imx636_evk2_regmap_builder.cpp b/hal_psee_plugins/src/devices/imx636/imx636_evk2_regmap_builder.cpp new file mode 100644 index 000000000..61af0e058 --- /dev/null +++ b/hal_psee_plugins/src/devices/imx636/imx636_evk2_regmap_builder.cpp @@ -0,0 +1,31 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include +#include + +#include "devices/imx636/imx636_evk2_regmap_builder.h" +#include "devices/imx636/register_maps/imx636_evk2_registermap.h" +#include "utils/regmap_data.h" +#include "utils/register_map.h" + +namespace Metavision { + +void build_imx636_evk2_register_map(RegisterMap ®map) { + std::vector> Imx636Evk2RegisterMap_init = { + std::make_tuple(Imx636Evk2RegisterMap, Imx636Evk2RegisterMapSize, "PSEE", 0), + }; + + init_device_regmap(regmap, Imx636Evk2RegisterMap_init); + regmap.dump(); +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/devices/imx636/imx636_evk2_tz_device.cpp b/hal_psee_plugins/src/devices/imx636/imx636_evk2_tz_device.cpp new file mode 100644 index 000000000..2e1aea5f8 --- /dev/null +++ b/hal_psee_plugins/src/devices/imx636/imx636_evk2_tz_device.cpp @@ -0,0 +1,273 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifdef _MSC_VER +#define NOMINMAX +#endif + +#include "devices/imx636/imx636_evk2_tz_device.h" +#include "devices/utils/device_system_id.h" +#include "boards/treuzell/tz_libusb_board_command.h" +#include "devices/common/issd.h" +#include "devices/imx636/imx636_evk2_issd.h" +#include "devices/gen41/gen41_antiflicker_module.h" +#include "devices/gen41/gen41_erc.h" +#include "devices/imx636/imx636_ll_biases.h" +#include "devices/gen41/gen41_noise_filter_module.h" +#include "devices/gen41/gen41_roi_command.h" +#include "devices/imx636/imx636_evk2_regmap_builder.h" +#include "devices/common/evk2_tz_trigger_event.h" +#include "devices/common/evk2_tz_trigger_out.h" +#include "facilities/psee_hw_register.h" +#include "geometries/hd_geometry.h" +#include "metavision/hal/facilities/i_events_stream.h" +#include "metavision/hal/utils/device_builder.h" +#include "plugin/psee_plugin.h" +#include +#include +#include + +namespace Metavision { +namespace { +std::string ROOT_PREFIX = "PSEE/"; +std::string SENSOR_PREFIX = ROOT_PREFIX + "SENSOR_IF/IMX636/"; +} // namespace + +TzEvk2Imx636::TzEvk2Imx636(std::shared_ptr cmd, uint32_t dev_id, + std::shared_ptr parent) : + TzDevice(cmd, dev_id, parent), + TzPseeVideo(cmd, dev_id, parent), + TzDeviceWithRegmap(build_imx636_evk2_register_map), + TzIssdDevice(issd_evk2_imx636_sequence), + sys_ctrl_(register_map, ROOT_PREFIX) { + sync_mode_ = I_DeviceControl::SyncMode::STANDALONE; + temperature_init(); + iph_mirror_control(true); + std::this_thread::sleep_for(std::chrono::milliseconds(1)); + lifo_control(true, true, true); +} + +std::shared_ptr TzEvk2Imx636::build(std::shared_ptr cmd, uint32_t dev_id, + std::shared_ptr parent) { + if (can_build(cmd, dev_id)) + return std::make_shared(cmd, dev_id, parent); + else + return nullptr; +} + +bool TzEvk2Imx636::can_build(std::shared_ptr cmd, uint32_t dev_id) { + return (cmd->read_device_register(dev_id, 0x800)[0] == SYSTEM_EVK2_IMX636); +} + +void TzEvk2Imx636::spawn_facilities(DeviceBuilder &device_builder) { + device_builder.add_facility(std::make_unique(register_map, SENSOR_PREFIX)); + device_builder.add_facility(std::make_unique(register_map, SENSOR_PREFIX)); + + auto erc = device_builder.add_facility(std::make_unique(register_map, SENSOR_PREFIX + "erc/")); + erc->initialize(); + erc->enable(true); + + auto hw_register = device_builder.add_facility(std::make_unique(register_map)); + device_builder.add_facility(std::make_unique(hw_register, SENSOR_PREFIX)); + + auto geometry = HDGeometry(); + device_builder.add_facility( + std::make_unique(geometry.get_width(), geometry.get_height(), register_map, SENSOR_PREFIX)); + + device_builder.add_facility(std::make_unique(register_map, "PSEE/", shared_from_this())); + device_builder.add_facility(std::make_unique( + register_map, "PSEE/", std::dynamic_pointer_cast(shared_from_this()))); +} + +TzEvk2Imx636::~TzEvk2Imx636() {} + +void TzEvk2Imx636::start() { + TzIssdDevice::start(); +} + +void TzEvk2Imx636::stop() { + TzIssdDevice::stop(); +} + +long long TzEvk2Imx636::get_sensor_id() { + return (*register_map)[SENSOR_PREFIX + "chip_id"].read_value(); +} + +TzDevice::StreamFormat TzEvk2Imx636::get_output_format() { + return {std::string("EVT3"), std::make_unique()}; +} + +long TzEvk2Imx636::get_system_id() { + return cmd->read_device_register(tzID, 0x800)[0]; +} + +bool TzEvk2Imx636::set_mode_standalone() { + /* time_base_config(ext_sync, master, master_sel, fwd_up, fwd_down) + - ext_sync = 1 --| + - master = 1 ----> generate internal sync_out + - master_sel = 0 -> Don't care since master = 1. Time-base counter is auto-generated. + - fwd_up = 0 -> IOs sync_out = 0 + - fwd_down = 1 -> ccam5 sync_in = internal sync_out + */ + sys_ctrl_.time_base_config(true, true, false, false, true); + + if (!sys_ctrl_.is_trigger_out_enabled()) { + // Disabled sync out IO + sys_ctrl_.sync_out_pin_control(false); + sys_ctrl_.sync_out_pin_config(false); + } + sync_mode_ = I_DeviceControl::SyncMode::STANDALONE; + return true; +} + +bool TzEvk2Imx636::set_mode_master() { + /* time_base_config(ext_sync, master, master_sel, fwd_up, fwd_down) + - ext_sync = 1 --| + - master = 1 ----> generate internal sync_out + - master_sel = 0 -> Don't care since master = 1. Time-base counter is auto-generated. + - fwd_up = 1 -> IOs sync_out = internal sync_out + - fwd_down = 1 -> ccam5 sync_in = internal sync_out + */ + if (sys_ctrl_.is_trigger_out_enabled()) { + MV_HAL_LOG_WARNING() << "Switching to master sync mode. Trigger out will be overridden."; + } + + sys_ctrl_.time_base_config(true, true, false, true, true); + sys_ctrl_.sync_out_pin_config(false); + sys_ctrl_.sync_out_pin_control(true); + sync_mode_ = I_DeviceControl::SyncMode::MASTER; + return true; +} + +bool TzEvk2Imx636::set_mode_slave() { + /* time_base_config(ext_sync, master, master_sel, fwd_up, fwd_down) + - ext_sync = 1 --| + - master = 0 ----> Use sync_in from mux master_sel + - master_sel = 1 -> internal sync_in = IOs sync_in + - fwd_up = 0 -> IOs sync_out = 0 + - fwd_down = 1 -> ccam5 sync_in = IOs sync_in + */ + sys_ctrl_.time_base_config(true, false, true, false, true); + + if (!sys_ctrl_.is_trigger_out_enabled()) { + // Disabled sync out IO + sys_ctrl_.sync_out_pin_control(false); + sys_ctrl_.sync_out_pin_config(false); + } + sync_mode_ = I_DeviceControl::SyncMode::SLAVE; + return true; +} + +I_DeviceControl::SyncMode TzEvk2Imx636::get_mode() { + return sync_mode_; +} + +int TzEvk2Imx636::get_temperature() { + (*register_map)[SENSOR_PREFIX + "adc_control"]["adc_clk_en"].write_value(1); + (*register_map)[SENSOR_PREFIX + "adc_misc_ctrl"]["adc_temp"].write_value(1); + (*register_map)[SENSOR_PREFIX + "adc_control"]["adc_start"].write_value(1); + + bool valid = false; + uint16_t retries = 0; + uint32_t counter = 0; + uint32_t status = 0; + uint32_t temp_val = 0; + + while (valid == false && retries < 5) { + status = (*register_map)[SENSOR_PREFIX + "adc_status"]["adc_done_dyn"].read_value(); + temp_val = (*register_map)[SENSOR_PREFIX + "adc_status"]["adc_dac_dyn"].read_value(); + valid = status & 1; + retries += 1; + } + + if (!valid) { + MV_HAL_LOG_ERROR() << "Failed to get temperature"; + return -1; + } + + (*register_map)[SENSOR_PREFIX + "adc_control"]["adc_clk_en"].write_value(0); + + return ((0.190 * temp_val) - 56); +} + +int TzEvk2Imx636::get_illumination() { + bool valid = false; + uint16_t retries = 0; + uint32_t counter = 0; + + while (valid == false && retries < 10) { + uint32_t reg_val = (*register_map)[SENSOR_PREFIX + "lifo_status"].read_value(); + valid = reg_val & 1 << 29; + counter = reg_val & ((1 << 27) - 1); + retries += 1; + } + + if (!valid) { + MV_HAL_LOG_ERROR() << "Failed to get illumination"; + return -1; + } + + if (counter != decltype(counter)(-1)) { + float t = float(counter) / 100.; + return powf(10, 3.5 - logf(t * 0.37) / logf(10)); + } + return -1; +} + +void TzEvk2Imx636::temperature_init() { + // Temperature ADC init + (*register_map)[SENSOR_PREFIX + "adc_control"]["adc_en"].write_value(1); + (*register_map)[SENSOR_PREFIX + "adc_control"]["adc_clk_en"].write_value(1); + (*register_map)[SENSOR_PREFIX + "adc_misc_ctrl"]["adc_buf_cal_en"].write_value(1); + std::this_thread::sleep_for(std::chrono::microseconds(100)); + + // Temperature sensor init + (*register_map)[SENSOR_PREFIX + "temp_ctrl"]["temp_buf_en"].write_value(1); + (*register_map)[SENSOR_PREFIX + "temp_ctrl"]["temp_buf_cal_en"].write_value(1); + std::this_thread::sleep_for(std::chrono::microseconds(100)); + + (*register_map)[SENSOR_PREFIX + "adc_control"]["adc_clk_en"].write_value(0); +} + +void TzEvk2Imx636::lifo_control(bool enable, bool out_en, bool cnt_en) { + /* Control the LIFO settings. + + Args: + enable (bool): Puts the LIFO in ready mode. + out_en (bool): Turns on the LIFO. + cnt_en (bool): Turns on the LIFO counter in the digital to start integrating. + + */ + + if (enable && out_en) { + (*register_map)[SENSOR_PREFIX + "lifo_ctrl"]["lifo_en"].write_value(enable); + std::this_thread::sleep_for(std::chrono::milliseconds(1)); + (*register_map)[SENSOR_PREFIX + "lifo_ctrl"]["lifo_out_en"].write_value(out_en); + std::this_thread::sleep_for(std::chrono::milliseconds(1)); + } else if (enable && !out_en) { + (*register_map)[SENSOR_PREFIX + "lifo_ctrl"]["lifo_en"].write_value(enable); + } else if (!enable && out_en) { + (*register_map)[SENSOR_PREFIX + "lifo_ctrl"]["lifo_out_en"].write_value(out_en); + } else if (!enable && !out_en) { + (*register_map)[SENSOR_PREFIX + "lifo_ctrl"]["lifo_en"].write_value(enable); + (*register_map)[SENSOR_PREFIX + "lifo_ctrl"]["lifo_out_en"].write_value(out_en); + } + (*register_map)[SENSOR_PREFIX + "lifo_ctrl"]["lifo_cnt_en"].write_value(cnt_en); +} + +void TzEvk2Imx636::iph_mirror_control(bool enable) { + (*register_map)[SENSOR_PREFIX + "iph_mirr_ctrl"]["iph_mirr_en"].write_value(enable); + std::this_thread::sleep_for(std::chrono::microseconds(20)); + (*register_map)[SENSOR_PREFIX + "iph_mirr_ctrl"]["iph_mirr_amp_en"].write_value(enable); + std::this_thread::sleep_for(std::chrono::microseconds(20)); +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/devices/imx636/imx636_evk3_regmap_builder.cpp b/hal_psee_plugins/src/devices/imx636/imx636_evk3_regmap_builder.cpp new file mode 100644 index 000000000..0dc983caa --- /dev/null +++ b/hal_psee_plugins/src/devices/imx636/imx636_evk3_regmap_builder.cpp @@ -0,0 +1,31 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include +#include + +#include "devices/imx636/imx636_evk3_regmap_builder.h" +#include "devices/imx636/register_maps/imx636_evk3_registermap.h" +#include "utils/regmap_data.h" +#include "utils/register_map.h" + +namespace Metavision { + +void build_imx636_evk3_register_map(RegisterMap ®map) { + std::vector> Imx636Evk3RegisterMap_init = { + std::make_tuple(Imx636Evk3RegisterMap, Imx636Evk3RegisterMapSize, "PSEE", 0), + }; + + init_device_regmap(regmap, Imx636Evk3RegisterMap_init); + regmap.dump(); +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/devices/imx636/imx636_ll_biases.cpp b/hal_psee_plugins/src/devices/imx636/imx636_ll_biases.cpp new file mode 100644 index 000000000..f3abc29bf --- /dev/null +++ b/hal_psee_plugins/src/devices/imx636/imx636_ll_biases.cpp @@ -0,0 +1,266 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include "devices/imx636/imx636_ll_biases.h" +#include "devices/imx636/imx636_bias_settings.h" +#include "metavision/hal/facilities/i_hw_register.h" +#include "metavision/hal/utils/hal_log.h" +#include "metavision/hal/utils/hal_exception.h" +#include "utils/psee_hal_plugin_error_code.h" +#include "utils/psee_hal_utils.h" + +namespace Metavision { + +static constexpr uint32_t BIAS_CONF = 0x11A10000; + +class Imx636LLBias { +public: + Imx636LLBias(bool modifiable, std::string register_name, int sensor_offset, int current_value, int factory_default, + int min_offset, int max_offset) { + register_name_ = register_name; + modifiable_ = modifiable; + current_offset_ = sensor_offset; + factory_default_ = factory_default; + current_value_ = factory_default; + min_offset_ = min_offset; + max_offset_ = max_offset; + + display_bias(); + } + + ~Imx636LLBias() {} + bool is_modifiable() const { + return modifiable_; + } + const std::string &get_register_name() const { + return register_name_; + } + int get_current_offset() { + return current_offset_; + } + void set_current_offset(const int val) { + current_offset_ = val; + } + int get_current_value() { + return current_value_; + } + void set_current_value(const int val) { + current_value_ = val; + } + int get_factory_default_value() { + return factory_default_; + } + void set_factory_default_value(const int val) { + factory_default_ = val; + } + int get_min_offset() { + return min_offset_; + } + int get_max_offset() { + return max_offset_; + } + void display_bias() { + MV_HAL_LOG_TRACE() << "register name:" << register_name_ << ", factory default:" << factory_default_ + << ", current value:" << current_value_ << ", current offset:" << current_offset_ + << ", min offset:" << min_offset_ << ", max offset:" << max_offset_; + } + +private: + std::string register_name_; + bool modifiable_; + int current_value_; + int current_offset_; + int factory_default_; + int min_offset_; + int max_offset_; +}; + +std::map &get_imx636_biases_map() { + static std::map biases_map_; + return biases_map_; +} + +uint32_t get_imx636_bias_encoding(const Imx636LLBias &bias, int bias_value) { + if (!Metavision::is_expert_mode_enabled()) { + if (bias_value < 0) { + bias_value = 0; + } + if (bias_value > 255) { + bias_value = 255; + } + } + return (uint32_t)bias_value | BIAS_CONF; +} + +} // namespace Metavision + +namespace Metavision { + +Imx636_LL_Biases::Imx636_LL_Biases(const std::shared_ptr &i_hw_register, + const std::string &sensor_prefix) : + i_hw_register_(i_hw_register), base_name_(sensor_prefix) { + if (!i_hw_register_) { + throw(HalException(PseeHalPluginErrorCode::HWRegisterNotFound, "HW Register facility is null.")); + } + + std::string BIAS_PATH = "bias/"; + + std::string bias_fo_name = "bias_fo"; + std::string bias_hpf_name = "bias_hpf"; + std::string bias_diff_on_name = "bias_diff_on"; + std::string bias_diff_name = "bias_diff"; + std::string bias_diff_off_name = "bias_diff_off"; + std::string bias_refr_name = "bias_refr"; + + int bias_fo_sensor_current_offset = 0; + int bias_hpf_sensor_current_offset = 0; + int bias_diff_on_sensor_current_offset = 0; + int bias_diff_sensor_current_offset = 0; + int bias_diff_off_sensor_current_offset = 0; + int bias_refr_sensor_current_offset = 0; + + int bias_fo_factory_default = 0xff & (get_hw_register()->read_register(base_name_ + BIAS_PATH + bias_fo_name)); + int bias_hpf_factory_default = 0xff & (get_hw_register()->read_register(base_name_ + BIAS_PATH + bias_hpf_name)); + int bias_diff_on_factory_default = + 0xff & (get_hw_register()->read_register(base_name_ + BIAS_PATH + bias_diff_on_name)); + int bias_diff_factory_default = 0xff & (get_hw_register()->read_register(base_name_ + BIAS_PATH + bias_diff_name)); + int bias_diff_off_factory_default = + 0xff & (get_hw_register()->read_register(base_name_ + BIAS_PATH + bias_diff_off_name)); + int bias_refr_factory_default = 0xff & (get_hw_register()->read_register(base_name_ + BIAS_PATH + bias_refr_name)); + + int bias_fo_current_value = bias_fo_factory_default; + int bias_hpf_current_value = bias_hpf_factory_default; + int bias_diff_on_current_value = bias_diff_on_factory_default; + int bias_diff_current_value = bias_diff_factory_default; + int bias_diff_off_current_value = bias_diff_off_factory_default; + int bias_refr_current_value = bias_refr_factory_default; + + int bias_fo_min_offset = BIAS_FO_MIN_OFFSET; + int bias_fo_max_offset = BIAS_FO_MAX_OFFSET; + int bias_hpf_min_offset = BIAS_HPF_MIN_OFFSET; + int bias_hpf_max_offset = BIAS_HPF_MAX_OFFSET; + int bias_diff_on_min_offset = BIAS_DIFF_ON_MIN_OFFSET; + int bias_diff_on_max_offset = BIAS_DIFF_ON_MAX_OFFSET; + int bias_diff_min_offset = BIAS_DIFF_MIN_OFFSET; + int bias_diff_max_offset = BIAS_DIFF_MAX_OFFSET; + int bias_diff_off_min_offset = BIAS_DIFF_OFF_MIN_OFFSET; + int bias_diff_off_max_offset = BIAS_DIFF_OFF_MAX_OFFSET; + int bias_refr_min_offset = BIAS_REFR_MIN_OFFSET; + int bias_refr_max_offset = BIAS_REFR_MAX_OFFSET; + + bool bias_fo_modifiable = true; + bool bias_hpf_modifiable = true; + bool bias_diff_on_modifiable = true; + bool bias_diff_modifiable = false; + bool bias_diff_off_modifiable = true; + bool bias_refr_modifiable = true; + + Imx636LLBias fo(bias_fo_modifiable, BIAS_PATH + bias_fo_name, bias_fo_sensor_current_offset, bias_fo_current_value, + bias_fo_factory_default, bias_fo_min_offset, bias_fo_max_offset); + Imx636LLBias hpf(bias_hpf_modifiable, BIAS_PATH + bias_hpf_name, bias_hpf_sensor_current_offset, + bias_hpf_current_value, bias_hpf_factory_default, bias_hpf_min_offset, bias_hpf_max_offset); + Imx636LLBias diff_on(bias_diff_on_modifiable, BIAS_PATH + bias_diff_on_name, bias_diff_on_sensor_current_offset, + bias_diff_on_current_value, bias_diff_on_factory_default, bias_diff_on_min_offset, + bias_diff_on_max_offset); + Imx636LLBias diff(bias_diff_modifiable, BIAS_PATH + bias_diff_name, bias_diff_sensor_current_offset, + bias_diff_current_value, bias_diff_factory_default, bias_diff_min_offset, bias_diff_max_offset); + Imx636LLBias diff_off(bias_diff_off_modifiable, BIAS_PATH + bias_diff_off_name, bias_diff_off_sensor_current_offset, + bias_diff_off_current_value, bias_diff_off_factory_default, bias_diff_off_min_offset, + bias_diff_off_max_offset); + Imx636LLBias refr(bias_refr_modifiable, BIAS_PATH + bias_refr_name, bias_refr_sensor_current_offset, + bias_refr_current_value, bias_refr_factory_default, bias_refr_min_offset, bias_refr_max_offset); + + // Init map with the values in the registers + auto &imx636_biases_map = get_imx636_biases_map(); + imx636_biases_map.clear(); + imx636_biases_map.insert({bias_fo_name, fo}); + imx636_biases_map.insert({bias_hpf_name, hpf}); + imx636_biases_map.insert({bias_diff_on_name, diff_on}); + imx636_biases_map.insert({bias_diff_name, diff}); + imx636_biases_map.insert({bias_diff_off_name, diff_off}); + imx636_biases_map.insert({bias_refr_name, refr}); +} + +/** + * @brief Attempts to adjust the bias by some offset + * + * @param bias_name Bias to adjust + * @param bias_value Offset to adjust by + * @return true if successful, false otherwise + */ +bool Imx636_LL_Biases::set(const std::string &bias_name, int bias_value) { + auto it = get_imx636_biases_map().find(bias_name); + if (it == get_imx636_biases_map().end()) { + return false; + } + if (it->second.is_modifiable() == false) { + return false; + } + + // Display old bias settings + it->second.display_bias(); + + // What the new value will be if all checks pass + auto potential_update_value = it->second.get_factory_default_value() + bias_value; + // Check bounds + if (!Metavision::is_expert_mode_enabled()) { + if (bias_value < it->second.get_min_offset()) { + MV_HAL_LOG_WARNING() << "Attempted to set" << bias_name << "offset lower than min offset of" + << it->second.get_min_offset(); + return false; + } else if (bias_value > it->second.get_max_offset()) { + MV_HAL_LOG_WARNING() << "Attempted to set" << bias_name << "offset greater than max offset of" + << it->second.get_max_offset(); + return false; + } + } + + // Update the value + it->second.set_current_value(potential_update_value); + // Tracking the total offset for later + it->second.set_current_offset(bias_value); + it->second.display_bias(); + + // Update the hardware + auto reg = get_imx636_bias_encoding(it->second, it->second.get_current_value()); + get_hw_register()->write_register(base_name_ + it->second.get_register_name(), reg); + return true; +} + +/** + * @brief get the current bias offset + * + * @param bias_name name of the desired bias + * @return int the offset + */ +int Imx636_LL_Biases::get(const std::string &bias_name) { + auto it = get_imx636_biases_map().find(bias_name); + if (it == get_imx636_biases_map().end()) { + MV_HAL_LOG_WARNING() << "Failed Bias Name check"; + return -1; + } + it->second.display_bias(); + return it->second.get_current_offset(); +} + +std::map Imx636_LL_Biases::get_all_biases() { + std::map ret; + for (auto &b : get_imx636_biases_map()) { + ret[b.first] = get(b.first); + } + return ret; +} + +const std::shared_ptr &Imx636_LL_Biases::get_hw_register() const { + return i_hw_register_; +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/devices/imx636/imx636_tz_device.cpp b/hal_psee_plugins/src/devices/imx636/imx636_tz_device.cpp new file mode 100644 index 000000000..ba3e98025 --- /dev/null +++ b/hal_psee_plugins/src/devices/imx636/imx636_tz_device.cpp @@ -0,0 +1,253 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifdef _MSC_VER +#define NOMINMAX +#endif + +#include "devices/imx636/imx636_tz_device.h" +#include "devices/utils/device_system_id.h" +#include "boards/treuzell/tz_libusb_board_command.h" +#include "devices/treuzell/tz_device.h" +#include "devices/common/issd.h" +#include "devices/imx636/imx636_evk3_issd.h" +#include "devices/imx636/imx636_ll_biases.h" +#include "devices/gen41/gen41_antiflicker_module.h" +#include "devices/gen41/gen41_erc.h" +#include "devices/gen41/gen41_noise_filter_module.h" +#include "devices/gen41/gen41_roi_command.h" +#include "devices/imx636/imx636_evk3_regmap_builder.h" +#include "devices/gen41/gen41_tz_trigger_event.h" +#include "facilities/psee_hw_register.h" +#include "geometries/hd_geometry.h" +#include "metavision/hal/facilities/i_events_stream.h" +#include "metavision/hal/utils/device_builder.h" +#include "plugin/psee_plugin.h" +#include +#include +#include + +using vfield = std::map; + +namespace Metavision { +namespace { +std::string ROOT_PREFIX = "PSEE/"; +std::string SENSOR_PREFIX = ROOT_PREFIX + "IMX636/"; +} // namespace + +TzImx636::TzImx636(std::shared_ptr cmd, uint32_t dev_id, std::shared_ptr parent) : + TzDevice(cmd, dev_id, parent), + TzIssdDevice(issd_evk3_imx636_sequence), + TzDeviceWithRegmap(build_imx636_evk3_register_map) { + sync_mode_ = I_DeviceControl::SyncMode::STANDALONE; + temperature_init(); + iph_mirror_control(true); + std::this_thread::sleep_for(std::chrono::milliseconds(1)); + lifo_control(true, true, true); +} + +std::shared_ptr TzImx636::build(std::shared_ptr cmd, uint32_t dev_id, + std::shared_ptr parent) { + if (can_build(cmd, dev_id)) { + return std::make_shared(cmd, dev_id, parent); + } else { + return nullptr; + } +} + +bool TzImx636::can_build(std::shared_ptr cmd, uint32_t dev_id) { + return (cmd->read_device_register(dev_id, 0x14)[0] == 0xA0401806); +} + +void TzImx636::spawn_facilities(DeviceBuilder &device_builder) { + device_builder.add_facility(std::make_unique(register_map, SENSOR_PREFIX)); + device_builder.add_facility(std::make_unique(register_map, SENSOR_PREFIX)); + + auto erc = device_builder.add_facility( + std::make_unique(register_map, SENSOR_PREFIX + "erc/", shared_from_this())); + erc->initialize(); + erc->enable(true); + + auto geometry = HDGeometry(); + + auto hw_register = device_builder.add_facility(std::make_unique(register_map)); + + device_builder.add_facility(std::make_unique(hw_register, SENSOR_PREFIX)); + + device_builder.add_facility( + std::make_unique(geometry.get_width(), geometry.get_height(), register_map, SENSOR_PREFIX)); + + device_builder.add_facility(std::make_unique(register_map, SENSOR_PREFIX, shared_from_this())); +} + +TzImx636::~TzImx636() {} + +long long TzImx636::get_sensor_id() { + return (*register_map)[SENSOR_PREFIX + "chip_id"].read_value(); +} + +TzDevice::StreamFormat TzImx636::get_output_format() { + return {std::string("EVT3"), std::make_unique()}; +} + +long TzImx636::get_system_id() const { + return SystemId::SYSTEM_EVK3_IMX636; +} + +bool TzImx636::set_mode_standalone() { + time_base_config(false, true); + + sync_mode_ = I_DeviceControl::SyncMode::STANDALONE; + return true; +} + +bool TzImx636::set_mode_master() { + time_base_config(true, true); + + sync_mode_ = I_DeviceControl::SyncMode::MASTER; + return true; +} + +bool TzImx636::set_mode_slave() { + time_base_config(true, false); + + sync_mode_ = I_DeviceControl::SyncMode::SLAVE; + return true; +} + +I_DeviceControl::SyncMode TzImx636::get_mode() { + return sync_mode_; +} + +int TzImx636::get_temperature() { + (*register_map)[SENSOR_PREFIX + "adc_control"]["adc_clk_en"].write_value(1); + (*register_map)[SENSOR_PREFIX + "adc_misc_ctrl"]["adc_temp"].write_value(1); + (*register_map)[SENSOR_PREFIX + "adc_control"]["adc_start"].write_value(1); + + bool valid = false; + uint16_t retries = 0; + uint32_t counter = 0; + uint32_t status = 0; + uint32_t temp_val = 0; + + while (valid == false && retries < 5) { + status = (*register_map)[SENSOR_PREFIX + "adc_status"]["adc_done_dyn"].read_value(); + temp_val = (*register_map)[SENSOR_PREFIX + "adc_status"]["adc_dac_dyn"].read_value(); + valid = status & 1; + retries += 1; + } + + if (!valid) { + MV_HAL_LOG_ERROR() << "Failed to get temperature"; + return -1; + } + + (*register_map)[SENSOR_PREFIX + "adc_control"]["adc_clk_en"].write_value(0); + + return ((0.190 * temp_val) - 56); +} + +int TzImx636::get_illumination() { + bool valid = false; + uint16_t retries = 0; + uint32_t counter = 0; + + while (valid == false && retries < 10) { + uint32_t reg_val = (*register_map)[SENSOR_PREFIX + "lifo_status"].read_value(); + valid = reg_val & 1 << 29; + counter = reg_val & ((1 << 27) - 1); + retries += 1; + } + + if (!valid) { + MV_HAL_LOG_ERROR() << "Failed to get illumination"; + return -1; + } + + if (counter != decltype(counter)(-1)) { + float t = float(counter) / 100.; + return powf(10, 3.5 - logf(t * 0.37) / logf(10)); + } + return -1; +} + +void TzImx636::temperature_init() { + // Temperature ADC init + (*register_map)[SENSOR_PREFIX + "adc_control"]["adc_en"].write_value(1); + (*register_map)[SENSOR_PREFIX + "adc_control"]["adc_clk_en"].write_value(1); + (*register_map)[SENSOR_PREFIX + "adc_misc_ctrl"]["adc_buf_cal_en"].write_value(1); + std::this_thread::sleep_for(std::chrono::microseconds(100)); + + // Temperature sensor init + (*register_map)[SENSOR_PREFIX + "temp_ctrl"]["temp_buf_en"].write_value(1); + (*register_map)[SENSOR_PREFIX + "temp_ctrl"]["temp_buf_cal_en"].write_value(1); + std::this_thread::sleep_for(std::chrono::microseconds(100)); + + (*register_map)[SENSOR_PREFIX + "adc_control"]["adc_clk_en"].write_value(0); +} + +/** + * @brief Configure sensor time base settings. By default, the sensor is in monocular mode + * + * @param external if true external time base, otherwise, use internal + * @param master if true, use master mode, else slave mode + */ +void TzImx636::time_base_config(bool external, bool master) { + (*register_map)[SENSOR_PREFIX + "ro/time_base_ctrl"].write_value(vfield{ + {"time_base_mode", external}, // 0 : Internal, 1 : External + {"external_mode", master}, // 0 : Slave, 1 : Master (valid when in external mode) + {"external_mode_enable", external}, // 0 : External mode disabled, 1 : External mode enabled + {"Reserved_10_4", 100} // default 100 = 1us + }); + + if (external) { + if (master) { + // set SYNCHRO IO to output mode + (*register_map)[SENSOR_PREFIX + "dig_pad2_ctrl"]["pad_sync"].write_value(0b1100); + } else { + // set SYNCHRO IO to input mode + (*register_map)[SENSOR_PREFIX + "dig_pad2_ctrl"]["pad_sync"].write_value(0b1111); + } + } +} + +/** + * @brief Control the LIFO settings + * + * @param enable puts the LIFO in ready mode + * @param out_en turns on the LIFO + * @param cnt_en turns on the LIFO counter in the digital to start integrating. + */ +void TzImx636::lifo_control(bool enable, bool out_en, bool cnt_en) { + if (enable && out_en) { + (*register_map)[SENSOR_PREFIX + "lifo_ctrl"]["lifo_en"].write_value(enable); + std::this_thread::sleep_for(std::chrono::milliseconds(1)); + (*register_map)[SENSOR_PREFIX + "lifo_ctrl"]["lifo_out_en"].write_value(out_en); + std::this_thread::sleep_for(std::chrono::milliseconds(1)); + } else if (enable && !out_en) { + (*register_map)[SENSOR_PREFIX + "lifo_ctrl"]["lifo_en"].write_value(enable); + } else if (!enable && out_en) { + (*register_map)[SENSOR_PREFIX + "lifo_ctrl"]["lifo_out_en"].write_value(out_en); + } else if (!enable && !out_en) { + (*register_map)[SENSOR_PREFIX + "lifo_ctrl"]["lifo_en"].write_value(enable); + (*register_map)[SENSOR_PREFIX + "lifo_ctrl"]["lifo_out_en"].write_value(out_en); + } + (*register_map)[SENSOR_PREFIX + "lifo_ctrl"]["lifo_cnt_en"].write_value(cnt_en); +} + +void TzImx636::iph_mirror_control(bool enable) { + (*register_map)[SENSOR_PREFIX + "iph_mirr_ctrl"]["iph_mirr_en"].write_value(enable); + std::this_thread::sleep_for(std::chrono::microseconds(20)); + (*register_map)[SENSOR_PREFIX + "iph_mirr_ctrl"]["iph_mirr_amp_en"].write_value(enable); + std::this_thread::sleep_for(std::chrono::microseconds(20)); +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/devices/others/CMakeLists.txt b/hal_psee_plugins/src/devices/others/CMakeLists.txt new file mode 100644 index 000000000..c8457329a --- /dev/null +++ b/hal_psee_plugins/src/devices/others/CMakeLists.txt @@ -0,0 +1,12 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. + +target_sources(metavision_hal_gen41_evk3_system_obj PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/i2c_eeprom.cpp +) diff --git a/hal_psee_plugins/src/devices/others/i2c_eeprom.cpp b/hal_psee_plugins/src/devices/others/i2c_eeprom.cpp new file mode 100644 index 000000000..a733c6d88 --- /dev/null +++ b/hal_psee_plugins/src/devices/others/i2c_eeprom.cpp @@ -0,0 +1,144 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include "devices/others/i2c_eeprom.h" +#include "metavision/hal/utils/hal_log.h" +#include +#include + +#define VCMD_SET LIBUSB_ENDPOINT_OUT | LIBUSB_REQUEST_TYPE_VENDOR | LIBUSB_RECIPIENT_DEVICE +#define VCMD_GET LIBUSB_ENDPOINT_IN | LIBUSB_REQUEST_TYPE_VENDOR | LIBUSB_RECIPIENT_DEVICE + +I2cEeprom::I2cEeprom(uint8_t addr) { + dev_addr_ = addr; +} + +I2cEeprom::~I2cEeprom() {} + +int I2cEeprom::read(libusb_device_handle *dev_handle, uint32_t mem_addr, std::vector &vread, + unsigned int bytes) { + if (mem_addr > mem_addr_max_) { + MV_LOG_ERROR() << Metavision::Log::no_space << "I2C EEPROM address 0x" << std::hex << mem_addr << std::dec + << " is out of range."; + return -1; + } + + if (mem_addr + bytes > (mem_addr_max_ + 1)) { + MV_LOG_ERROR() << "EEPROM data to read exceed memory size (roll-over safety)."; + MV_LOG_INFO() << Metavision::Log::no_space << "Selected base address: 0x" << std::hex << std::setw(5) + << std::setfill('0') << mem_addr; + MV_LOG_INFO() << Metavision::Log::no_space << "Requested bytes count: " << bytes; + MV_LOG_INFO() << Metavision::Log::no_space << "Memory max address: 0x" << std::hex << std::setw(5) + << std::setfill('0') << mem_addr_max_; + MV_LOG_INFO() << Metavision::Log::no_space + << "Memory size (from base address): " << (mem_addr_max_ - mem_addr + 1) << " byte(s)"; + MV_LOG_INFO() << Metavision::Log::no_space << "Memory total size: " << mem_size_ << " bytes"; + return -1; + } + + // Memory address is encoded using 17 bits. Bit 16 is given during I2C device address phase using bit 1. + // I2C device select code is composed as followed: + // - Bits 8-2: I2C device address + // - Bit 1: Memory address bit 16. + // - Bit 0: Mode selection (R/W). + uint8_t dev_sel_code = dev_addr_ | ((mem_addr >> 16) & 0x1); + uint16_t sub_mem_addr = (mem_addr & 0xFFFF); + vread.resize(bytes); + + // USB vendor specific control transfer will forward all I2C transfer parameters to CX3 + // using wIndex to pass I2C device select code, wValue for Memory address and wLength for bytes count. + int r = libusb_control_transfer(dev_handle, VCMD_GET, (uint8_t)I2cEepromCmd::READ, dev_sel_code, sub_mem_addr, + &vread[0], bytes, 0); + if (r <= 0) { + MV_LOG_ERROR() << "I2C EEPROM read error:" << libusb_error_name(r); + + if (r == LIBUSB_ERROR_PIPE) { + // Stall packet was send by the device indicating an error during I2C transfer + get_status(dev_handle); + } + return -1; + } + return 0; +} + +int I2cEeprom::write(libusb_device_handle *dev_handle, uint32_t mem_addr, std::vector &vdata) { + unsigned int bytes = vdata.size(); + + if (mem_addr > mem_addr_max_) { + MV_LOG_ERROR() << Metavision::Log::no_space << "I2C EEPROM address 0x" << std::hex << mem_addr << std::dec + << " is out of range."; + return -1; + } + + if (bytes > mem_page_size_) { + MV_LOG_ERROR() << Metavision::Log::no_space << "I2C EEPROM page size cannot exceed " << mem_page_size_ + << " bytes. (Found " << bytes << ")"; + return -1; + } + + uint8_t page_addr = mem_addr & 0xFF; + + if (page_addr + bytes > 256) { + MV_LOG_ERROR() << "I2C EEPROM data to write exceed page size (roll-over safety)."; + MV_LOG_INFO() << Metavision::Log::no_space << "Selected page address: 0x" << std::hex << std::setw(5) + << std::setfill('0') << mem_addr; + MV_LOG_INFO() << Metavision::Log::no_space << "Requested bytes count: " << bytes; + MV_LOG_INFO() << Metavision::Log::no_space << "Page base address: 0x" << std::hex << std::setw(5) + << std::setfill('0') << (mem_addr & 0x1FF00); + MV_LOG_INFO() << Metavision::Log::no_space << "Page max address: 0x" << std::hex << std::setw(5) + << std::setfill('0') << ((mem_addr & 0x1FF00) + mem_page_size_ - 1); + MV_LOG_INFO() << Metavision::Log::no_space << "Page size: " << mem_page_size_ << " bytes"; + return -1; + } + + // Memory address is encoded using 17 bits. Bit 16 is given during I2C device address phase using bit 1. + // I2C device select code is composed as followed: + // - Bits 8-2: I2C device address + // - Bit 1: Memory address bit 16. + // - Bit 0: Mode selection (R/W). + uint8_t dev_sel_code = dev_addr_ | ((mem_addr >> 16) & 0x01); + uint16_t sub_mem_addr = (mem_addr & 0xFFFF); + + int r = libusb_control_transfer(dev_handle, VCMD_SET, (uint8_t)I2cEepromCmd::WRITE, dev_sel_code, sub_mem_addr, + &vdata[0], (uint16_t)bytes, 0); + + if (r <= 0) { + MV_LOG_ERROR() << "I2C EEPROM write error:" << libusb_error_name(r); + return -1; + } else { + if (static_cast(r) != bytes) { + MV_LOG_ERROR() << "I2C EEPROM write error. Not all bytes were received by the device."; + return -1; + } + if (get_status(dev_handle) != 0) { + return -1; + } + } + return 0; +} + +int I2cEeprom::get_status(libusb_device_handle *dev_handle) { + uint8_t status; + + int r = libusb_control_transfer(dev_handle, VCMD_GET, (uint8_t)I2cEepromCmd::STATUS, dev_addr_, 0, &status, 1, 0); + + if (r <= 0) { + MV_LOG_ERROR() << "I2C EEPROM status error:" << libusb_error_name(r); + return -1; + } + + if (status != 0) { + MV_LOG_ERROR() << Metavision::Log::no_space << "I2C driver error code: 0x" << std::hex << (status & 0xFF); + } + r = status; + + return r; +} \ No newline at end of file diff --git a/hal_psee_plugins/src/devices/treuzell/CMakeLists.txt b/hal_psee_plugins/src/devices/treuzell/CMakeLists.txt new file mode 100644 index 000000000..fb06dd6db --- /dev/null +++ b/hal_psee_plugins/src/devices/treuzell/CMakeLists.txt @@ -0,0 +1,30 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. + +target_sources(metavision_hal_treuzell_protocol_obj PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/tz_device.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/tz_streamer.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/tz_device_control.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/tz_regmap_device.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/tz_issd_device.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/tz_psee_fpga_device.cpp +) + +target_sources(metavision_hal_psee_video_obj PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/tz_psee_video.cpp +) +if(TARGET hal_plugin_prophesee) +target_sources(hal_plugin_prophesee PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/tz_psee_video_build.cpp +) +endif() + +target_sources(metavision_hal_ti_tmp103_obj PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/ti_tmp103.cpp +) diff --git a/hal_psee_plugins/src/devices/treuzell/ti_tmp103.cpp b/hal_psee_plugins/src/devices/treuzell/ti_tmp103.cpp new file mode 100644 index 000000000..ddba9d312 --- /dev/null +++ b/hal_psee_plugins/src/devices/treuzell/ti_tmp103.cpp @@ -0,0 +1,41 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include "devices/treuzell/ti_tmp103.h" +#include "boards/treuzell/tz_libusb_board_command.h" + +namespace Metavision { + +TiTmp103::TiTmp103(std::shared_ptr cmd, uint32_t dev_id, std::shared_ptr parent) : + TzDevice(cmd, dev_id, parent) {} + +std::shared_ptr TiTmp103::build(std::shared_ptr cmd, uint32_t dev_id, + std::shared_ptr parent) { + return std::make_shared(cmd, dev_id, parent); +} + +void TiTmp103::spawn_facilities(DeviceBuilder &device_builder) {} + +TiTmp103::~TiTmp103() {} + +void TiTmp103::start() {} + +void TiTmp103::stop() {} + +TzDevice::StreamFormat TiTmp103::get_output_format() { + return {std::string("NONE"), nullptr}; +} + +int TiTmp103::get_temperature() { + return cmd->read_device_register(tzID, 0)[0]; +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/devices/treuzell/tz_device.cpp b/hal_psee_plugins/src/devices/treuzell/tz_device.cpp new file mode 100644 index 000000000..6c971fdf1 --- /dev/null +++ b/hal_psee_plugins/src/devices/treuzell/tz_device.cpp @@ -0,0 +1,201 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifdef _MSC_VER +#define NOMINMAX +#endif + +#include "devices/treuzell/tz_device.h" +#include "boards/treuzell/tz_libusb_board_command.h" +#include "boards/treuzell/tz_control_frame.h" +#include "boards/treuzell/treuzell_command_definition.h" +#include "metavision/hal/utils/hal_log.h" + +// For system build +#include "metavision/hal/utils/device_builder.h" +#include "metavision/hal/utils/device_config.h" +#include + +// For board-wide facilities +#include "boards/treuzell/tz_hw_identification.h" +#include "decoders/evt2/evt2_decoder.h" +#include "decoders/evt3/evt3_decoder.h" +#include "metavision/hal/facilities/i_events_stream.h" +#include "boards/treuzell/tz_board_data_transfer.h" +#include "devices/treuzell/tz_device_control.h" +#include "facilities/tz_monitoring.h" + +namespace Metavision { + +TzDevice::TzDevice(std::shared_ptr cmd, uint32_t dev_id, std::shared_ptr parent) : + cmd(cmd), tzID(dev_id), parent(parent) {} + +TzDevice::~TzDevice() {} + +std::string TzDevice::get_name() { + TzDeviceStringsCtrlFrame name(TZ_PROP_DEVICE_NAME, tzID); + cmd->transfer_tz_frame(name); + return name.get_strings()[0]; +} + +std::vector TzDevice::get_compatible() { + TzDeviceStringsCtrlFrame compat(TZ_PROP_DEVICE_COMPATIBLE, tzID); + cmd->transfer_tz_frame(compat); + return compat.get_strings(); +} + +void TzDevice::get_device_info(I_HW_Identification::SystemInfo &infos, std::string prefix) { + try { + infos.insert({prefix + std::to_string(tzID) + " name", get_name()}); + } catch (const std::system_error &e) { MV_HAL_LOG_TRACE() << "Dev" << tzID << "got no name string:" << e.what(); } + + try { + for (auto str : get_compatible()) + infos.insert({prefix + std::to_string(tzID) + " compatible", str}); + } catch (const std::system_error &e) { MV_HAL_LOG_TRACE() << "Dev" << tzID << "got no compat string:" << e.what(); } +} + +bool TzDeviceBuilder::can_build(std::shared_ptr cmd) { + try { + auto device_count = cmd->get_device_count(); + + for (uint32_t i = 0; i < device_count; i++) + if (!can_build_device(cmd, i)) + return false; + return true; + } catch (const std::system_error &e) { + MV_HAL_LOG_WARNING() << "Could not enumerate devices on board" << cmd->get_name() << e.what(); + return false; + } +} + +bool TzDeviceBuilder::can_build_device(std::shared_ptr cmd, uint32_t dev_id) { + std::vector compat_str; + try { + TzDeviceStringsCtrlFrame compat(TZ_PROP_DEVICE_COMPATIBLE, dev_id); + cmd->transfer_tz_frame(compat); + compat_str = compat.get_strings(); + } catch (const std::system_error &e) { + // On some old devices (treuzell-kernel 1.4.0, cx3 3.0.0), a compatibility string was used as name + try { + TzDeviceStringsCtrlFrame name(TZ_PROP_DEVICE_NAME, dev_id); + cmd->transfer_tz_frame(name); + compat_str = name.get_strings(); + } catch (const std::system_error &e2) { + MV_HAL_LOG_WARNING() << "Failed to get compatibility string from treuzell device" << dev_id << e.what(); + return false; + } + } + + for (auto str : compat_str) { + auto build = map.find(str); + if (build != map.end()) { + // if the device has a specific can_build method in the pair, call it + if (!build->second.second || build->second.second(cmd, dev_id)) + return true; + } + } + return false; +} + +bool TzDeviceBuilder::build_devices(std::shared_ptr cmd, DeviceBuilder &device_builder, + const DeviceConfig &config) { + auto device_count = cmd->get_device_count(); + std::vector> devices; + std::shared_ptr dev; + + for (uint32_t i = 0; i < device_count; i++) { + std::vector compat_str; + std::string name; + std::shared_ptr next; + + try { + TzDeviceStringsCtrlFrame name_frame(TZ_PROP_DEVICE_NAME, i); + cmd->transfer_tz_frame(name_frame); + name = name_frame.get_strings()[0]; + } catch (const std::system_error &e) { + MV_HAL_LOG_INFO() << "Could not get name for treuzell device" << i << e.what(); + } + + try { + TzDeviceStringsCtrlFrame compat(TZ_PROP_DEVICE_COMPATIBLE, i); + cmd->transfer_tz_frame(compat); + compat_str = compat.get_strings(); + } catch (const std::system_error &e) { + // On some old devices (treuzell-kernel 1.4.0, cx3 3.0.0), a compatibility string was used as name + compat_str.push_back(name); + } + + for (auto str : compat_str) { + MV_HAL_LOG_TRACE() << "Checking str" << str; + auto build = map.find(str); + if (build != map.end()) { + // Call the first member of the pair + next = build->second.first(cmd, i, dev); + if (next) { + devices.push_back(next); + if (dev) + dev->child = next; + dev = next; + dev->spawn_facilities(device_builder); + break; + } + } else { + MV_HAL_LOG_TRACE() << "Found no build method for " << str; + } + } + } + if (devices.empty()) + return false; + auto hw_identification = device_builder.add_facility( + std::make_unique(device_builder.get_plugin_software_info(), cmd, devices)); + auto format = devices[0]->get_output_format(); + std::shared_ptr geometry; + if (format.geometry) + geometry = device_builder.add_facility(std::move(format.geometry)); + auto cd_event_decoder = device_builder.add_facility(std::make_unique>()); + auto ext_trigger_event_decoder = device_builder.add_facility(std::make_unique>()); + std::shared_ptr decoder; + if (format.name == "EVT3" && geometry) { + MV_HAL_LOG_TRACE() << "Adding EVT3 decoder"; + decoder = device_builder.add_facility( + std::make_unique(false, geometry->get_height(), cd_event_decoder, ext_trigger_event_decoder)); + } else if (format.name == "EVT2") { + MV_HAL_LOG_TRACE() << "Adding EVT2 decoder"; + decoder = device_builder.add_facility( + std::make_unique(false, cd_event_decoder, ext_trigger_event_decoder)); + } else { + MV_HAL_LOG_WARNING() << "System is streaming unknown format" << format.name; + } + if (decoder) + device_builder.add_facility(std::make_unique( + std::make_unique(cmd, decoder->get_raw_event_size_bytes()), hw_identification)); + + std::shared_ptr temp; + std::shared_ptr illu; + for (auto device : devices) { + auto tdev = std::dynamic_pointer_cast(device); + if (tdev) + temp = tdev; + } + for (auto device : devices) { + auto idev = std::dynamic_pointer_cast(device); + if (idev) + illu = idev; + } + if (temp || illu) + device_builder.add_facility(std::make_unique(temp, illu)); + + device_builder.add_facility(std::make_unique(devices)); + return true; +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/devices/treuzell/tz_device_control.cpp b/hal_psee_plugins/src/devices/treuzell/tz_device_control.cpp new file mode 100644 index 000000000..b7e66709b --- /dev/null +++ b/hal_psee_plugins/src/devices/treuzell/tz_device_control.cpp @@ -0,0 +1,110 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include + +#include "devices/treuzell/tz_device_control.h" +#include "devices/treuzell/tz_device.h" +#include "devices/treuzell/tz_main_device.h" +#include "metavision/hal/utils/hal_exception.h" +#include "utils/psee_hal_plugin_error_code.h" + +namespace Metavision { + +TzDeviceControl::TzDeviceControl(std::vector> &devices) : + devices_(devices), streaming_(false) { + // Directly start every devices, except the one actually producing data + for (auto dev : devices_) { + auto main_dev = dynamic_cast(dev.get()); + if (!main_dev) + dev.get()->start(); + } +} + +TzDeviceControl::~TzDeviceControl() { + // Stop streaming if the caller program "forgot" + if (streaming_) { + stop(); + } + // Stop intermediate blocks + for (auto dev = devices_.rbegin(); dev != devices_.rend(); dev++) { + auto main_dev = dynamic_cast((*dev).get()); + if (!main_dev) + (*dev).get()->stop(); + } +} + +void TzDeviceControl::reset() { + return; +} + +void TzDeviceControl::start() { + streaming_ = true; + // Start only the main device, the others are always running + for (auto dev : devices_) + if (auto main_dev = dynamic_cast(dev.get())) + dev.get()->start(); +} + +void TzDeviceControl::stop() { + // Stop only the main device, the others are always running + for (auto dev = devices_.rbegin(); dev != devices_.rend(); dev++) + if (auto main_dev = dynamic_cast((*dev).get())) + (*dev).get()->stop(); + streaming_ = false; +} + +bool TzDeviceControl::set_mode_standalone() { + if (streaming_) { + return false; + } + for (auto dev : devices_) { + if (auto main_dev = dynamic_cast(dev.get())) { + return main_dev->set_mode_standalone(); + } + } + return false; +} + +bool TzDeviceControl::set_mode_master() { + if (streaming_) { + return false; + } + for (auto dev : devices_) { + if (auto main_dev = dynamic_cast(dev.get())) { + return main_dev->set_mode_master(); + } + } + return false; +} + +bool TzDeviceControl::set_mode_slave() { + if (streaming_) { + return false; + } + for (auto dev : devices_) { + if (auto main_dev = dynamic_cast(dev.get())) { + return main_dev->set_mode_slave(); + } + } + return false; +} + +I_DeviceControl::SyncMode TzDeviceControl::get_mode() { + for (auto dev : devices_) { + if (auto main_dev = dynamic_cast(dev.get())) { + return main_dev->get_mode(); + } + } + return I_DeviceControl::SyncMode::STANDALONE; +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/devices/treuzell/tz_issd_device.cpp b/hal_psee_plugins/src/devices/treuzell/tz_issd_device.cpp new file mode 100644 index 000000000..91d60fbc6 --- /dev/null +++ b/hal_psee_plugins/src/devices/treuzell/tz_issd_device.cpp @@ -0,0 +1,75 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include "devices/treuzell/tz_issd_device.h" +#include "boards/treuzell/tz_libusb_board_command.h" +#include "devices/common/issd.h" +#include "utils/register_map.h" +#include + +namespace Metavision { + +TzIssdDevice::TzIssdDevice(const Issd &issd) : issd(issd) { + stop(); + destroy(); + initialize(); +} + +TzIssdDevice::~TzIssdDevice() { + destroy(); +} + +void TzIssdDevice::initialize() { + ApplyRegisterOperationSequence(issd.init); +} + +void TzIssdDevice::destroy() { + ApplyRegisterOperationSequence(issd.destroy); +} + +void TzIssdDevice::start() { + ApplyRegisterOperationSequence(issd.start); +} + +void TzIssdDevice::stop() { + ApplyRegisterOperationSequence(issd.stop); +} + +void TzIssdDevice::ApplyRegisterOperation(const RegisterOperation operation) { + switch (operation.action) { + case RegisterAction::READ: { + uint32_t value = (*register_map).read(operation.address); + } break; + case RegisterAction::WRITE: { + (*register_map).write(operation.address, operation.data); + } break; + case RegisterAction::WRITE_FIELD: { + uint32_t saved_fields = (*register_map).read(operation.address) & (~operation.mask); + uint32_t write_field = operation.data & operation.mask; + uint32_t write_reg = saved_fields | write_field; + (*register_map).write(operation.address, write_reg); + } break; + case RegisterAction::DELAY: { + std::this_thread::sleep_for(std::chrono::milliseconds(operation.usec / 1000)); + } break; + default: + // FIXME raise error. + break; + }; +} + +void TzIssdDevice::ApplyRegisterOperationSequence(const std::vector sequence) { + for (auto operation : sequence) { + ApplyRegisterOperation(operation); + } +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/devices/treuzell/tz_psee_fpga_device.cpp b/hal_psee_plugins/src/devices/treuzell/tz_psee_fpga_device.cpp new file mode 100644 index 000000000..273ed7df9 --- /dev/null +++ b/hal_psee_plugins/src/devices/treuzell/tz_psee_fpga_device.cpp @@ -0,0 +1,65 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include "devices/treuzell/tz_psee_fpga_device.h" +#include "boards/treuzell/tz_libusb_board_command.h" +#include +#include + +#define STEREO_SYSTEM_CONFIG_ID_ADDR 0x00000800 +#define STEREO_SYSTEM_CONFIG_VERSION_ADDR 0x00000804 +#define STEREO_SYSTEM_CONFIG_BUILD_DATE_ADDR 0x00000808 +#define STEREO_SYSTEM_CONFIG_VERSION_CONTROL_ID_ADDR 0x0000080c + +namespace Metavision { + +TzPseeFpgaDevice::TzPseeFpgaDevice() {} + +void TzPseeFpgaDevice::get_device_info(I_HW_Identification::SystemInfo &infos, std::string prefix) { + TzDevice::get_device_info(infos, prefix); + + infos.insert({prefix + std::to_string(tzID) + " system ID", std::to_string(get_system_id())}); + + long system_version = get_system_version(); + std::string version = std::to_string((system_version >> 16) & 0xFF) + "." + + std::to_string((system_version >> 8) & 0xFF) + "." + + std::to_string((system_version >> 0) & 0xFF); + infos.insert({prefix + std::to_string(tzID) + " version", version}); + + time_t system_build_date = (time_t)get_system_build_date(); + const char *system_build_date_charptr = asctime(localtime(&system_build_date)); + std::string system_build_date_str = system_build_date_charptr == 0 ? "NA" : std::string(system_build_date_charptr); + system_build_date_str.pop_back(); + infos.insert({prefix + std::to_string(tzID) + " build date", system_build_date_str}); + + std::stringstream system_stream; + system_stream << "0x" << std::hex << get_system_version_control_id(); + std::string system_result(system_stream.str()); + infos.insert({prefix + std::to_string(tzID) + " VCS commit", system_result}); +} + +uint32_t TzPseeFpgaDevice::get_system_id() const { + return cmd->read_device_register(tzID, STEREO_SYSTEM_CONFIG_ID_ADDR)[0]; +} + +uint32_t TzPseeFpgaDevice::get_system_version() const { + return cmd->read_device_register(tzID, STEREO_SYSTEM_CONFIG_VERSION_ADDR)[0]; +} + +uint32_t TzPseeFpgaDevice::get_system_build_date() const { + return cmd->read_device_register(tzID, STEREO_SYSTEM_CONFIG_BUILD_DATE_ADDR)[0]; +} + +uint32_t TzPseeFpgaDevice::get_system_version_control_id() const { + return cmd->read_device_register(tzID, STEREO_SYSTEM_CONFIG_VERSION_CONTROL_ID_ADDR)[0]; +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/devices/treuzell/tz_psee_video.cpp b/hal_psee_plugins/src/devices/treuzell/tz_psee_video.cpp new file mode 100644 index 000000000..51e3aef91 --- /dev/null +++ b/hal_psee_plugins/src/devices/treuzell/tz_psee_video.cpp @@ -0,0 +1,63 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifdef _MSC_VER +#define NOMINMAX +#endif + +#include "devices/treuzell/tz_psee_video.h" +#include "boards/treuzell/tz_libusb_board_command.h" +#include "boards/treuzell/tz_control_frame.h" + +namespace Metavision { + +TzPseeVideo::TzPseeVideo(std::shared_ptr cmd, uint32_t dev_id, std::shared_ptr parent) : + TzDevice(cmd, dev_id, parent), TzPseeFpgaDevice() {} + +void TzPseeVideo::spawn_facilities(DeviceBuilder &device_builder) {} + +TzDevice::StreamFormat TzPseeVideo::get_output_format() { + return {std::string("NONE"), nullptr}; +} + +void TzPseeVideo::start() { + throw std::system_error(TZ_NOT_IMPLEMENTED, TzError()); +} + +void TzPseeVideo::stop() { + throw std::system_error(TZ_NOT_IMPLEMENTED, TzError()); +} + +long TzPseeVideo::get_system_id() const { + return TzPseeFpgaDevice::get_system_id(); +} + +long TzPseeVideo::get_system_version() const { + return TzPseeFpgaDevice::get_system_version(); +} + +bool TzPseeVideo::set_mode_standalone() { + return false; +} + +bool TzPseeVideo::set_mode_master() { + return false; +} + +bool TzPseeVideo::set_mode_slave() { + return false; +} + +I_DeviceControl::SyncMode TzPseeVideo::get_mode() { + return I_DeviceControl::SyncMode::STANDALONE; +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/devices/treuzell/tz_psee_video_build.cpp b/hal_psee_plugins/src/devices/treuzell/tz_psee_video_build.cpp new file mode 100644 index 000000000..dc2345747 --- /dev/null +++ b/hal_psee_plugins/src/devices/treuzell/tz_psee_video_build.cpp @@ -0,0 +1,49 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifdef _MSC_VER +#define NOMINMAX +#endif + +#include "devices/treuzell/tz_psee_video.h" +#include "devices/gen31/gen31_evk2_tz_device.h" +#ifdef HAL_GEN4_SUPPORT +#include "devices/gen4/gen4_evk2_tz_device.h" +#endif +#include "devices/gen41/gen41_evk2_tz_device.h" +#include "devices/imx636/imx636_evk2_tz_device.h" +#include "devices/utils/device_system_id.h" +#include "boards/treuzell/tz_libusb_board_command.h" +#include "devices/treuzell/tz_device.h" +#include "boards/treuzell/tz_control_frame.h" +#include "metavision/hal/utils/device_builder.h" + +namespace Metavision { + +std::shared_ptr TzPseeVideo::build(std::shared_ptr cmd, uint32_t dev_id, + std::shared_ptr parent) { + switch (cmd->read_device_register(dev_id, 0x800)[0]) { + case SYSTEM_EVK2_GEN31: + return std::make_shared(cmd, dev_id, parent); +#ifdef HAL_GEN4_SUPPORT + case SYSTEM_EVK2_GEN4: + return std::make_shared(cmd, dev_id, parent); +#endif + case SYSTEM_EVK2_GEN41: + return std::make_shared(cmd, dev_id, parent); + case SYSTEM_EVK2_IMX636: + return std::make_shared(cmd, dev_id, parent); + default: + return std::make_shared(cmd, dev_id, parent); + } +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/devices/treuzell/tz_regmap_device.cpp b/hal_psee_plugins/src/devices/treuzell/tz_regmap_device.cpp new file mode 100644 index 000000000..81d9d347b --- /dev/null +++ b/hal_psee_plugins/src/devices/treuzell/tz_regmap_device.cpp @@ -0,0 +1,90 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include "devices/treuzell/tz_regmap_device.h" +#include "boards/treuzell/tz_libusb_board_command.h" +#include "metavision/hal/utils/hal_log.h" +#include "utils/register_map.h" + +namespace Metavision { + +TzDeviceWithRegmap::TzDeviceWithRegmap(RegmapBuilder builder) : register_map(std::make_shared()) { + builder(*register_map); + register_map->set_read_cb([this](uint32_t address) { + load_register(address); + return read_register(address); + }); + register_map->set_write_cb([this](uint32_t address, uint32_t v) { write_register(address, v); }); +} + +void TzDeviceWithRegmap::write_register(Register_Addr register_addr, uint32_t value) { + init_register(register_addr, value); + send_register(register_addr); +} + +uint32_t TzDeviceWithRegmap::read_register(Register_Addr regist) { + auto it = mregister_state.find(regist); + if (it == mregister_state.end()) { + return 0; + } + + return it->second; +} + +void TzDeviceWithRegmap::load_register(Register_Addr regist) { + init_register(regist, cmd->read_device_register(tzID, regist)[0]); +} + +void TzDeviceWithRegmap::set_register_bit(Register_Addr register_addr, int idx, bool state) { + auto it = mregister_state.find(register_addr); + if (it == mregister_state.end()) { + it = mregister_state.insert(std::make_pair(register_addr, static_cast(0))).first; + } + if (state) { + it->second |= (1 << idx); + } else { + it->second &= ~(1 << idx); + } +} + +void TzDeviceWithRegmap::send_register(Register_Addr register_addr) { + uint32_t val = 0; + if (has_register(register_addr)) { + val = read_register(register_addr); + } + cmd->write_device_register(tzID, register_addr, std::vector(1, val)); +} + +void TzDeviceWithRegmap::send_register_bit(Register_Addr register_addr, int idx, bool state) { + set_register_bit(register_addr, idx, state); + send_register(register_addr); +} + +uint32_t TzDeviceWithRegmap::read_register_bit(Register_Addr register_addr, int idx) { + MV_HAL_LOG_DEBUG() << __PRETTY_FUNCTION__ << register_addr; + auto it = mregister_state.find(register_addr); + if (it == mregister_state.end()) { + return 0; + } + + return (it->second >> idx) & 1; +} + +void TzDeviceWithRegmap::init_register(Register_Addr regist, uint32_t value) { + mregister_state[regist] = value; +} + +bool TzDeviceWithRegmap::has_register(Register_Addr regist) { + auto it = mregister_state.find(regist); + return it != mregister_state.end(); +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/devices/treuzell/tz_streamer.cpp b/hal_psee_plugins/src/devices/treuzell/tz_streamer.cpp new file mode 100644 index 000000000..9c00752a9 --- /dev/null +++ b/hal_psee_plugins/src/devices/treuzell/tz_streamer.cpp @@ -0,0 +1,58 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include "devices/treuzell/tz_streamer.h" +#include "boards/treuzell/tz_libusb_board_command.h" +#include "boards/treuzell/tz_control_frame.h" +#include "boards/treuzell/treuzell_command_definition.h" + +namespace Metavision { + +TzStreamer::TzStreamer(std::shared_ptr cmd, uint32_t dev_id, std::shared_ptr parent) : + TzDevice(cmd, dev_id, parent) { + // Try to stop any previous activity. Ignore failure, as it is the expected behavior from a stopped device + try { + stop(); + } catch (std::system_error &e) {} +} + +std::shared_ptr TzStreamer::build(std::shared_ptr cmd, uint32_t dev_id, + std::shared_ptr parent) { + return std::make_shared(cmd, dev_id, parent); +} + +void TzStreamer::spawn_facilities(DeviceBuilder &device_builder) {} + +TzStreamer::~TzStreamer() {} + +void TzStreamer::start() { + TzGenericCtrlFrame streamon(TZ_PROP_DEVICE_STREAM | TZ_WRITE_FLAG); + streamon.push_back32(tzID); + streamon.push_back32(1); + cmd->transfer_tz_frame(streamon); +} + +void TzStreamer::stop() { + TzGenericCtrlFrame streamoff(TZ_PROP_DEVICE_STREAM | TZ_WRITE_FLAG); + streamoff.push_back32(tzID); + streamoff.push_back32(0); + cmd->transfer_tz_frame(streamoff); +} + +TzDevice::StreamFormat TzStreamer::get_output_format() { + auto input = child.lock(); + if (input) + return input->get_output_format(); + else + return {std::string("NONE"), nullptr}; +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/devices/utils/CMakeLists.txt b/hal_psee_plugins/src/devices/utils/CMakeLists.txt new file mode 100644 index 000000000..fe99d67cd --- /dev/null +++ b/hal_psee_plugins/src/devices/utils/CMakeLists.txt @@ -0,0 +1,33 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. + +target_sources(metavision_hal_gen3_pattern_checkers_obj PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/gen3/gen3_pattern_checkers.cpp +) + +# Calib +set(list_calib + vdac18_8m1.calib + gen3_idac.calib + gen3_idac_n_thick.calib + gen3_idac_n_thin.calib + gen3_idac_p_thick.calib + gen3_idac_p_thin.calib + gen3_idac_railp.calib +) + +include(bin2h) +message(STATUS "Generating internal bias files.") +foreach(CALIB_NAME ${list_calib}) + message(STATUS " - ${CALIB_NAME}") + # Bin2h way, generates a hex array of chars (works on all compilers, but slower to generate). + string(REGEX REPLACE "\\.[^.]*$" "" CALIB_NAME_NO_EXT ${CALIB_NAME}) + bin2h(SOURCE_FILE "${PROJECT_SOURCE_DIR}/hal_psee_plugins/biasgen/${CALIB_NAME}" VARIABLE_NAME "CALIB") + configure_file(calib.cc.in "${biasgen_calib_files_dir}/${CALIB_NAME}.cc") +endforeach(CALIB_NAME ${list_calib}) diff --git a/hal_psee_plugins/src/devices/utils/calib.cc.in b/hal_psee_plugins/src/devices/utils/calib.cc.in new file mode 100644 index 000000000..a83253978 --- /dev/null +++ b/hal_psee_plugins/src/devices/utils/calib.cc.in @@ -0,0 +1,10 @@ +// auto-generated (bin2h) + +const unsigned char @CALIB_NAME_NO_EXT@_UC[] = { +@CALIB_DATA@, +0x00 +}; + +const size_t @CALIB_NAME_NO_EXT@_SIZE = @CALIB_SIZE@; + +const char *@CALIB_NAME_NO_EXT@ = (const char *)@CALIB_NAME_NO_EXT@_UC; diff --git a/hal_psee_plugins/src/devices/utils/gen3/gen3_pattern_checkers.cpp b/hal_psee_plugins/src/devices/utils/gen3/gen3_pattern_checkers.cpp new file mode 100644 index 000000000..5054ffcfe --- /dev/null +++ b/hal_psee_plugins/src/devices/utils/gen3/gen3_pattern_checkers.cpp @@ -0,0 +1,118 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include + +#include "devices/utils/gen3/gen3_pattern_checkers.h" + +namespace Metavision { + +bool Gen3PatternChecker::check_init(const Event2d *&ev, const Event2d *ev_end) { + if (is_init_) { + return true; + } + + if (ev < ev_end) { + is_init_ = true; + last_ev_ = *ev; + ++ev; + return true; + } + return false; +} + +ColumnPatternChecker::ColumnPatternChecker(int width, int height) : height_(height), pixels_count_(width * height) {} + +SlashPatternChecker::SlashPatternChecker(int width, int height) : pattern_min_dim_(std::min(width, height)) {} + +std::vector ColumnPatternChecker::check(const Event2d *ev_begin, + const Event2d *ev_end) { + std::vector errors_found; + const Event2d *ev = ev_begin; + + if (!check_init(ev, ev_end)) { + return errors_found; + } + + // Column scan: goes column wise from 0 to height, from 0 to width + int new_ev_index; + int last_ev_index = (last_ev_.x * height_ + last_ev_.y); + + while (ev < ev_end) { + new_ev_index = (ev->x * height_ + ev->y); + int index_diff = new_ev_index - last_ev_index; + + /* + * Two successive pixels always have an index diff of 1 except if we reach the bottom right corner. + * In this case the new event will occur at the top left corner. Thus the index diff is 0 - + ((pattern_width_ + * - 1) * patter_height + pattern_height - 1) Which is -(pattern_pixels_count_ - 1) + */ + if ((index_diff != 1) && (index_diff != (-(pixels_count_ - 1)))) { + /* + * Compute the data missing from the index difference. When no data are missing, this + * This line handles both cases when index_diff is > 1 or index_diff <= 0 + * if index diff is 0 (i.e. new event is the same as the previous) then we expect a full pattern gap + * (pattern_pixels_count_ - 1). + */ + uint32_t missing = (pixels_count_ + index_diff - 1) % pixels_count_; + PseePatternGeneratorChecker::Error error; + error.idx = std::distance(ev_begin, ev); + error.lost = missing; + errors_found.push_back(error); + } /* end if */ + + last_ev_index = new_ev_index; + last_ev_ = *ev; + ++ev; + } /* end while */ + return errors_found; +} + +std::vector SlashPatternChecker::check(const Event2d *ev_begin, + const Event2d *ev_end) { + std::vector errors_found; + const Event2d *ev = ev_begin; + + if (!check_init(ev, ev_end)) { + return errors_found; + } + + // slash scan: goes diagonaly from 0 to min(pattern_width, pattern_height) + for (; ev < ev_end; ++ev) { + int index_diff = ev->x - last_ev_.x; + /* + * Two successive pixels always have an index diff of 1 except if we reach the bottom right corner. + * In this case the new event will occur at the top left corner. As we have a slash pattern type, we follow + the + * diagonal from 0,0 to (minimal pattern dimension, minimal pattern dimension). Thus the index diff is 0 - + * (pattern_min_dimension_ - 1) which is -(pattern_min_dimension_ - 1) + */ + if ((index_diff != 1) && (index_diff != (-(pattern_min_dim_ - 1)))) { + /* + * Compute the data missing from the index difference. When no data are missing, this + * This line handles both cases when index_diff is > 1 or index_diff <= 0 + * if index diff is 0 (i.e. new event is the same as the previous) then we expect a full pattern gap + * (pattern_pixels_count_ - 1). + */ + uint32_t missing = (pattern_min_dim_ + index_diff - 1) % pattern_min_dim_; + PseePatternGeneratorChecker::Error error; + error.idx = std::distance(ev_begin, ev); + error.lost = missing; + errors_found.push_back(error); + } /* end if */ + + last_ev_ = *ev; + } /* end while */ + return errors_found; +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/facilities/CMakeLists.txt b/hal_psee_plugins/src/facilities/CMakeLists.txt new file mode 100644 index 000000000..eaa8ab3db --- /dev/null +++ b/hal_psee_plugins/src/facilities/CMakeLists.txt @@ -0,0 +1,22 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. + +target_sources(metavision_hal_libusb_utils_obj PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/psee_device_control.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/psee_hw_register.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/psee_monitoring.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/psee_roi.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/psee_trigger_in.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/psee_trigger_out.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/tz_monitoring.cpp + + # Experimental facilities + ${CMAKE_CURRENT_SOURCE_DIR}/experimental/psee_afk_registers_api_v0.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/experimental/psee_stc_registers_api_v0.cpp +) diff --git a/hal_psee_plugins/src/facilities/experimental/psee_afk_registers_api_v0.cpp b/hal_psee_plugins/src/facilities/experimental/psee_afk_registers_api_v0.cpp new file mode 100644 index 000000000..24bd0f04b --- /dev/null +++ b/hal_psee_plugins/src/facilities/experimental/psee_afk_registers_api_v0.cpp @@ -0,0 +1,113 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include + +#include "facilities/experimental/psee_afk_registers_api_v0.h" +#include "metavision/hal/utils/hal_error_code.h" +#include "metavision/hal/utils/hal_exception.h" + +namespace Metavision { + +void PseeAFKRegistersAPIv0::enable() { + if (!initialized_) { + initialize(); + initialized_ = true; + } + + set_mode(AFKModes::ON); + start(); +} + +void PseeAFKRegistersAPIv0::disable() { + set_mode(AFKModes::BYPASS); + stop(); + wait_for_init(); +} + +void PseeAFKRegistersAPIv0::set_frequency(uint32_t frequency_center, uint32_t bandwidth, bool stop) { + if (frequency_center < 50 || frequency_center > 500) { + throw HalException(HalErrorCode::InvalidAFKValue, + "Antiflicker frequency center: " + std::to_string(frequency_center) + + " is not in the range [50, 500]"); + } + + // Divide the bandwith by 2 to ease the computation + bandwidth = bandwidth / 2; + + if (frequency_center - bandwidth < 50) { + throw HalException(HalErrorCode::InvalidAFKValue, + "Antiflicker lower frequency: " + std::to_string(frequency_center - bandwidth) + + " is lower than 50." + + " Either increase the frequency_center to: " + std::to_string(bandwidth + 50) + + " or decrease the bandwidth to: " + std::to_string((frequency_center - 50) * 2)); + } + if (frequency_center + bandwidth > 500) { + throw HalException(HalErrorCode::InvalidAFKValue, + "Antiflicker lower frequency: " + std::to_string(frequency_center + bandwidth) + + " is greater than 500." + + " Either decrease the frequency_center to: " + std::to_string(500 - bandwidth) + + " or decrease the bandwidth to: " + std::to_string((500 - frequency_center) * 2)); + } + + set_frequency_band(frequency_center - bandwidth, frequency_center + bandwidth, stop); +} + +void PseeAFKRegistersAPIv0::set_frequency_band(uint32_t min_freq, uint32_t max_freq, bool stop) { + if (min_freq >= max_freq) { + throw HalException(HalErrorCode::InvalidAFKValue, + "Antiflicker min frequency: " + std::to_string(min_freq) + + " should be less than max frequency: " + std::to_string(max_freq)); + } + + if (min_freq < 50 || max_freq > 500) { + throw HalException(HalErrorCode::InvalidAFKValue, "Antiflicker min frequency: " + std::to_string(min_freq) + + " max frequency: " + std::to_string(max_freq) + + " is not in the range [50, 500]"); + } + + if (!initialized_) { + initialize(); + initialized_ = true; + } + + // Keep mode to restart after the configuration in the same mode + auto mode = get_mode(); + + // Disable the afk while reconfiguring it + disable(); + + uint32_t min_period = to_period(max_freq); + uint32_t max_period = to_period(min_freq); + + set_filter_period(min_period, max_period, to_inverted_duty_cycle(0.5)); + uint32_t counter_low = 0; + uint32_t counter_high = 0; + bool invert = 0; + bool drop_disable = 0; + get_afk_param(counter_low, counter_high, invert, drop_disable); + set_afk_param(counter_low, counter_high, !stop, false); + uint32_t in_parallel = 10; // As recommended before characterization + uint32_t dt_fifo_timeout = 90; // As recommended + + uint32_t dt_fifo_wait_time = ((253 - max_period) * 2 ^ 7) / ((720 * 10) / (0.01 * in_parallel)) - dt_fifo_timeout; + if (dt_fifo_wait_time < 4) { + dt_fifo_timeout -= 4 - dt_fifo_wait_time; + dt_fifo_wait_time = 4; + } + set_invalidation(dt_fifo_wait_time >> 7, dt_fifo_timeout, in_parallel, true); + + // Restart the AFK in the same mode as before + set_mode(mode); + start(); +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/facilities/experimental/psee_stc_registers_api_v0.cpp b/hal_psee_plugins/src/facilities/experimental/psee_stc_registers_api_v0.cpp new file mode 100644 index 000000000..6eef83514 --- /dev/null +++ b/hal_psee_plugins/src/facilities/experimental/psee_stc_registers_api_v0.cpp @@ -0,0 +1,101 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include +#include + +#include "facilities/experimental/psee_stc_registers_api_v0.h" + +namespace { + +void noise_filter_parameters(uint32_t threshold, uint32_t &best_prescaler, uint32_t &best_multiplier, + uint32_t &max_invalidation_period, uint32_t nbits_prescaler = 5, + uint32_t nbits_multiplier = 4, uint32_t bitdepth = 4, uint32_t refresh_speed = 2592) { + double best_precision = std::numeric_limits::max(); + best_prescaler = std::numeric_limits::max(); + best_multiplier = std::numeric_limits::max(); + max_invalidation_period = std::numeric_limits::max(); + for (uint32_t prescaler = 1; prescaler < (1UL << nbits_prescaler); prescaler++) { + uint32_t min_multiplier = ((1UL << (prescaler - 1)) / threshold); + min_multiplier = min_multiplier <= 1 ? 1 : min_multiplier - 1; + uint64_t max_multiplier = + (((uint64_t)((1UL << bitdepth) - 2) << prescaler) - ((1UL << (prescaler - 1)))) / threshold; + + max_multiplier = max_multiplier >= (1UL << nbits_multiplier) ? (1UL << nbits_multiplier) : max_multiplier; + for (uint32_t multiplier = min_multiplier; multiplier < (1UL << nbits_multiplier); multiplier++) { + uint32_t low_res_threshold = ((multiplier * threshold) + ((1UL << (prescaler - 1)))) >> prescaler; + if (low_res_threshold >= (uint32_t)((1UL << bitdepth) - 2)) { + // increasing the multiplier will increase low_res_threshold no need + // to go futher + continue; + } + if (low_res_threshold == 0) { + // should not happen a lot since the min_multiplier is computed + continue; + } + double precision = (1L << (prescaler)) / multiplier - 1; + + if (precision >= best_precision) { + continue; + } + + uint32_t invalidation_period = ((1UL << bitdepth) - 2 - low_res_threshold) * precision; + if (invalidation_period < refresh_speed) { + continue; + } + if (invalidation_period == 0) { + continue; + } + + max_invalidation_period = invalidation_period; + best_prescaler = prescaler; + best_multiplier = multiplier; + best_precision = precision; + } + } +} + +} // anonymous namespace + +namespace Metavision { + +void PseeSTCRegistersAPIv0::enable(Type type, uint32_t threshold) { + disable(); + uint32_t prescaler = 0; + uint32_t multiplier = 0; + uint32_t invalidation_period = 0; + + noise_filter_parameters(threshold, prescaler, multiplier, invalidation_period); + int32_t dt_fifo_timeout = (double)(100 / (4 * 720)) * 0.9 * invalidation_period - 4; + if (dt_fifo_timeout < 0) { + dt_fifo_timeout = 0; + } + + if (type == I_NoiseFilterModule::Type::STC) { + set_trail_param(false, threshold); + set_stc_param(true, threshold); + set_timestamping(prescaler, multiplier, true); + } + if (type == I_NoiseFilterModule::Type::TRAIL) { + set_stc_param(false, threshold); + set_trail_param(true, threshold); + set_timestamping(prescaler, multiplier, true); + } + set_invalidation(4, dt_fifo_timeout, 10, false); + set_mode(STCModes::ON); + start(); +} + +void PseeSTCRegistersAPIv0::disable() { + stop(); +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/facilities/psee_device_control.cpp b/hal_psee_plugins/src/facilities/psee_device_control.cpp new file mode 100644 index 000000000..1b7ea01d2 --- /dev/null +++ b/hal_psee_plugins/src/facilities/psee_device_control.cpp @@ -0,0 +1,126 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include + +#include "facilities/psee_device_control.h" +#include "metavision/hal/utils/hal_exception.h" +#include "utils/psee_hal_plugin_error_code.h" + +namespace Metavision { + +PseeDeviceControl::PseeDeviceControl(EvtFormat fmt) : + evt_format_(fmt), sync_mode_(SyncMode::STANDALONE), streaming_(false) {} + +void PseeDeviceControl::start() { + start_impl(); + streaming_ = true; +} + +void PseeDeviceControl::stop() { + stop_impl(); + streaming_ = false; +} + +bool PseeDeviceControl::set_evt_format(EvtFormat fmt) { + if (streaming_) { + return false; + } + bool valid = set_evt_format_impl(fmt); + if (valid) { + evt_format_ = fmt; + } + return valid; +} + +EvtFormat PseeDeviceControl::get_evt_format() { + return evt_format_; +} + +bool PseeDeviceControl::set_mode_standalone() { + if (streaming_) { + return false; + } + bool valid = set_mode_standalone_impl(); + if (valid) { + sync_mode_ = I_DeviceControl::SyncMode::STANDALONE; + } + return valid; +} + +bool PseeDeviceControl::set_mode_slave() { + if (streaming_) { + return false; + } + bool valid = set_mode_slave_impl(); + if (valid) { + sync_mode_ = I_DeviceControl::SyncMode::SLAVE; + } + return valid; +} + +bool PseeDeviceControl::set_mode_master() { + if (streaming_) { + return false; + } + bool valid = set_mode_master_impl(); + if (valid) { + sync_mode_ = I_DeviceControl::SyncMode::MASTER; + } + return valid; +} + +I_DeviceControl::SyncMode PseeDeviceControl::get_mode() { + return sync_mode_; +} + +long long PseeDeviceControl::get_sensor_id() { + return -1; +} + +std::shared_ptr PseeDeviceControl::get_trigger_in(bool checked) const { + auto trigger_in = trigger_in_.lock(); + if (checked && !trigger_in) { + throw(HalException(PseeHalPluginErrorCode::TriggerInNotFound, "Trigger in facility not set.")); + } + return trigger_in; +} + +void PseeDeviceControl::set_trigger_in(const std::shared_ptr &trigger_in) { + trigger_in_ = trigger_in; +} + +std::shared_ptr PseeDeviceControl::get_trigger_out(bool checked) const { + auto trigger_out = trigger_out_.lock(); + if (checked && !trigger_out) { + throw(HalException(PseeHalPluginErrorCode::TriggerOutNotFound, "Trigger out facility not set.")); + } + return trigger_out; +} + +void PseeDeviceControl::set_trigger_out(const std::shared_ptr &trigger_out) { + trigger_out_ = trigger_out; +} + +void PseeDeviceControl::initialize() {} + +void PseeDeviceControl::destroy() {} + +void PseeDeviceControl::setup() { + initialize(); +} + +void PseeDeviceControl::teardown() { + stop(); + destroy(); +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/facilities/psee_hw_register.cpp b/hal_psee_plugins/src/facilities/psee_hw_register.cpp new file mode 100644 index 000000000..4f9583473 --- /dev/null +++ b/hal_psee_plugins/src/facilities/psee_hw_register.cpp @@ -0,0 +1,43 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include "facilities/psee_hw_register.h" +#include "utils/register_map.h" + +namespace Metavision { + +PseeHWRegister::PseeHWRegister(const std::shared_ptr &map) : regmap_(map) {} + +void PseeHWRegister::write_register(uint32_t address, uint32_t v) { + (*regmap_)[address].write_value(v); +} + +uint32_t PseeHWRegister::read_register(uint32_t address) { + return (*regmap_)[address].read_value(); +} + +void PseeHWRegister::write_register(const std::string &address, uint32_t v) { + (*regmap_)[address].write_value(v); +} + +uint32_t PseeHWRegister::read_register(const std::string &address) { + return (*regmap_)[address].read_value(); +} + +void PseeHWRegister::write_register(const std::string &address, const std::string &bitfield, uint32_t v) { + (*regmap_)[address][bitfield].write_value(v); +} + +uint32_t PseeHWRegister::read_register(const std::string &address, const std::string &bitfield) { + return (*regmap_)[address][bitfield].read_value(); +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/facilities/psee_monitoring.cpp b/hal_psee_plugins/src/facilities/psee_monitoring.cpp new file mode 100644 index 000000000..516a3370e --- /dev/null +++ b/hal_psee_plugins/src/facilities/psee_monitoring.cpp @@ -0,0 +1,29 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include "facilities/psee_monitoring.h" +#include "metavision/hal/facilities/i_hw_register.h" +#include "metavision/hal/utils/hal_exception.h" +#include "utils/psee_hal_plugin_error_code.h" + +namespace Metavision { + +PseeMonitoring::PseeMonitoring(const std::shared_ptr &hw_register) : i_hw_register_(hw_register) { + if (!hw_register) { + throw(HalException(PseeHalPluginErrorCode::HWRegisterNotFound, "HW Register facility not set.")); + } +} + +const std::shared_ptr &PseeMonitoring::get_hw_register() const { + return i_hw_register_; +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/facilities/psee_roi.cpp b/hal_psee_plugins/src/facilities/psee_roi.cpp new file mode 100644 index 000000000..6c56c0f24 --- /dev/null +++ b/hal_psee_plugins/src/facilities/psee_roi.cpp @@ -0,0 +1,180 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include // std::min + +#include "facilities/psee_roi.h" +#include "metavision/hal/facilities/i_geometry.h" +#include "metavision/hal/utils/device_roi.h" + +namespace Metavision { + +namespace { + +std::vector get_roi_bitword(const std::vector &is_pixel_in_roi, int word_size) { + std::vector roi; + const int nelem = is_pixel_in_roi.size(); + unsigned int p1 = 0; + auto pixel_ind = 0; + for (; pixel_ind < nelem; ++pixel_ind) { + if (is_pixel_in_roi[pixel_ind]) { + p1 |= (1 << (pixel_ind % word_size)); + } + + if (((pixel_ind + 1) % word_size) == 0) { + roi.push_back(p1); + p1 = 0; + } + } + if (pixel_ind % word_size != 0) { + roi.push_back(p1); + } + return roi; +} + +} // anonymous namespace + +PseeROI::PseeROI(int width, int height) : device_height_(height), device_width_(width) {} + +int PseeROI::device_width() const { + return device_width_; +} + +int PseeROI::device_height() const { + return device_height_; +} + +std::vector PseeROI::create_ROIs(const std::vector &vroi) { + return create_ROIs(vroi, device_width_, device_height_, roi_x_flipped(), get_word_size()); +} + +void PseeROI::set_ROIs_from_bitword(const std::vector &vroiparams, bool is_enabled) { + program_ROI_Helper(vroiparams, is_enabled); +} + +bool PseeROI::set_ROIs(const std::vector &cols_to_enable, const std::vector &rows_to_enable, + bool is_enabled) { + if ((cols_to_enable.size() != static_cast(device_width_)) || + (rows_to_enable.size() != static_cast(device_height_))) { + return false; + } + program_ROI_Helper(create_ROIs(cols_to_enable, rows_to_enable), is_enabled); + return true; +} + +std::vector PseeROI::create_ROIs(const std::vector &vroi, int device_width, int device_height, + bool x_flipped, int word_size) { + const auto nelem = device_width + device_height; + auto is_pixel_in_roi = std::vector(nelem, false); + + for (auto const &roi : vroi) { + // clamp into [0, width - 1] and [0, height - 1] + const auto max_x = std::min(roi.x_ + roi.width_, device_width); + const auto max_y = std::min(roi.y_ + roi.height_, device_height); + const auto min_x = std::max(roi.x_, 0); + const auto min_y = std::max(roi.y_, 0); + + for (auto col_ind = min_x; col_ind < max_x; ++col_ind) { + const auto ind = x_flipped ? device_width - 1 - col_ind : col_ind; + is_pixel_in_roi[ind] = true; + } + + for (auto row_ind = (device_width + min_y); row_ind < (device_width + max_y); ++row_ind) { + is_pixel_in_roi[row_ind] = true; + } + } + + return get_roi_bitword(is_pixel_in_roi, word_size); +} + +std::vector PseeROI::create_ROIs(const std::vector &cols_to_enable, + const std::vector &rows_to_enable) { + auto vroi = std::vector(); + auto vxroi = std::vector>(); + auto vyroi = std::vector>(); + + /* + * Here, we convert the boolean vector into a vector of DeviceROI which are converted into a bitword vector + * with the function create_ROIs(std::vector) + */ + + size_t col_index = 0; + bool prev_to_enable = false; + std::pair cur_roi; + for (auto to_enable : cols_to_enable) { + if (to_enable) { + if (!prev_to_enable) { + prev_to_enable = true; + cur_roi.first = col_index; + } + } else { + if (prev_to_enable) { + cur_roi.second = col_index - cur_roi.first; + prev_to_enable = false; + vxroi.push_back(cur_roi); + } + } + ++col_index; + } + + if (prev_to_enable) { + cur_roi.second = col_index - cur_roi.first; + prev_to_enable = false; + vxroi.push_back(cur_roi); + } + + size_t row_index = 0; + prev_to_enable = false; + for (auto to_enable : rows_to_enable) { + if (to_enable) { + if (!prev_to_enable) { + prev_to_enable = true; + cur_roi.first = row_index; + } + } else { + if (prev_to_enable) { + cur_roi.second = row_index - cur_roi.first; + prev_to_enable = false; + vyroi.push_back(cur_roi); + } + } + ++row_index; + } + + if (prev_to_enable) { + cur_roi.second = row_index - cur_roi.first; + prev_to_enable = false; + vyroi.push_back(cur_roi); + } + + for (auto xroi : vxroi) { + for (auto yroi : vyroi) { + vroi.push_back(DeviceRoi(xroi.first, yroi.first, xroi.second, yroi.second)); + } + } + + return create_ROIs(vroi); +} + +bool PseeROI::roi_x_flipped() const { + return false; +} + +int PseeROI::get_word_size() const { + return 32; +} + +void PseeROI::program_ROI_Helper(const std::vector &vroiparams, bool is_enabled) { + write_ROI(vroiparams); + enable(is_enabled); +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/facilities/psee_trigger_in.cpp b/hal_psee_plugins/src/facilities/psee_trigger_in.cpp new file mode 100644 index 000000000..001af254c --- /dev/null +++ b/hal_psee_plugins/src/facilities/psee_trigger_in.cpp @@ -0,0 +1,34 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include "facilities/psee_trigger_in.h" +#include "facilities/psee_device_control.h" +#include "metavision/hal/utils/hal_exception.h" +#include "utils/psee_hal_plugin_error_code.h" + +namespace Metavision { + +PseeTriggerIn::PseeTriggerIn(const std::shared_ptr &device_control) : + device_control_(device_control) { + if (!device_control_) { + throw(HalException(PseeHalPluginErrorCode::DeviceControlNotFound, "Device control facility is null.")); + } +} + +void PseeTriggerIn::setup() { + device_control_->set_trigger_in(std::static_pointer_cast(shared_from_this())); +} + +const std::shared_ptr &PseeTriggerIn::get_device_control() { + return device_control_; +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/facilities/psee_trigger_out.cpp b/hal_psee_plugins/src/facilities/psee_trigger_out.cpp new file mode 100644 index 000000000..af5013488 --- /dev/null +++ b/hal_psee_plugins/src/facilities/psee_trigger_out.cpp @@ -0,0 +1,38 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include "facilities/psee_trigger_out.h" +#include "facilities/psee_device_control.h" +#include "metavision/hal/utils/hal_exception.h" +#include "utils/psee_hal_plugin_error_code.h" + +namespace Metavision { + +PseeTriggerOut::PseeTriggerOut(const std::shared_ptr &device_control) : + device_control_(device_control) { + if (!device_control_) { + throw(HalException(PseeHalPluginErrorCode::DeviceControlNotFound, "Device control facility is null.")); + } +} + +void PseeTriggerOut::setup() { + get_device_control()->set_trigger_out(std::static_pointer_cast(shared_from_this())); +} + +const std::shared_ptr &PseeTriggerOut::get_device_control() const { + return device_control_; +} + +void PseeTriggerOut::teardown() { + disable(); +} + +} // namespace Metavision diff --git a/sdk/modules/driver/cpp/src/imu_module.cpp b/hal_psee_plugins/src/facilities/tz_monitoring.cpp similarity index 73% rename from sdk/modules/driver/cpp/src/imu_module.cpp rename to hal_psee_plugins/src/facilities/tz_monitoring.cpp index 2adb8c096..ce061476e 100644 --- a/sdk/modules/driver/cpp/src/imu_module.cpp +++ b/hal_psee_plugins/src/facilities/tz_monitoring.cpp @@ -9,19 +9,24 @@ * See the License for the specific language governing permissions and limitations under the License. * **********************************************************************************************************************/ -#include "metavision/sdk/driver/imu_module.h" -#include "metavision/sdk/driver/camera_exception.h" +#include "facilities/tz_monitoring.h" namespace Metavision { -ImuModule::~ImuModule() {} +TzMonitoring::TzMonitoring(const std::shared_ptr &temp, + const std::shared_ptr &illu) : + temp_(temp), illu_(illu) {} -void ImuModule::enable() { - throw CameraException(CameraErrorCode::DeprecatedFeature, "ImuModule not available."); +int TzMonitoring::get_temperature() { + if (temp_) + return temp_->get_temperature(); + return -274; } -void ImuModule::disable() { - throw CameraException(CameraErrorCode::DeprecatedFeature, "ImuModule not available."); +int TzMonitoring::get_illumination() { + if (illu_) + return illu_->get_illumination(); + return 0; } } // namespace Metavision diff --git a/hal_psee_plugins/src/plugin/CMakeLists.txt b/hal_psee_plugins/src/plugin/CMakeLists.txt new file mode 100644 index 000000000..2441d2725 --- /dev/null +++ b/hal_psee_plugins/src/plugin/CMakeLists.txt @@ -0,0 +1,65 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. + +target_sources(metavision_hal_psee_plugin_obj PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/psee_plugin.cpp) + +if(TARGET hal_plugin_gen3_fx3) +target_sources(hal_plugin_gen3_fx3 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/psee_gen3_evk1.cpp) +endif() + +if(TARGET hal_plugin_gen31_fx3) +target_sources(hal_plugin_gen31_fx3 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/psee_gen31_evk1.cpp) +endif() + +if(TARGET hal_plugin_gen31_evk2) +target_sources(hal_plugin_gen31_evk2 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/psee_gen31_evk2.cpp) +endif() + +if(TARGET hal_plugin_gen31_evk3) +target_sources(hal_plugin_gen31_evk3 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/psee_gen31_evk3.cpp) +endif() + +if(TARGET hal_plugin_gen4_fx3) +target_sources(hal_plugin_gen4_fx3 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/psee_gen4_evk1.cpp) +endif() + +if(TARGET hal_plugin_gen4_evk2) +target_sources(hal_plugin_gen4_evk2 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/psee_gen4_evk2.cpp) +endif() + +if(TARGET hal_plugin_gen41_evk2) +target_sources(hal_plugin_gen41_evk2 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/psee_gen41_evk2.cpp) +endif() + +if(TARGET hal_plugin_gen41_evk3) +target_sources(hal_plugin_gen41_evk3 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/psee_gen41_evk3.cpp) +endif() + +if(TARGET hal_plugin_imx636_evk2) +target_sources(hal_plugin_imx636_evk2 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/psee_imx636_evk2.cpp) +endif() + +if(TARGET hal_plugin_imx636_evk3) +target_sources(hal_plugin_imx636_evk3 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/psee_imx636_evk3.cpp) +endif() + +if(TARGET hal_plugin_imx636_evk4) +target_sources(hal_plugin_imx636_evk4 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/psee_imx636_evk4.cpp) +endif() + +if(TARGET hal_plugin_golden_fallbacks) + target_sources(hal_plugin_golden_fallbacks PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/psee_golden_fallbacks.cpp) +endif() + +if(TARGET hal_plugin_prophesee) +target_sources(hal_plugin_prophesee PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/psee_universal.cpp) +if(HAL_GEN4_SUPPORT) + target_compile_definitions(hal_plugin_prophesee PRIVATE "HAL_GEN4_SUPPORT") +endif(HAL_GEN4_SUPPORT) +endif() diff --git a/hal_psee_plugins/src/plugin/psee_gen31_evk1.cpp b/hal_psee_plugins/src/plugin/psee_gen31_evk1.cpp new file mode 100644 index 000000000..5dfc60e58 --- /dev/null +++ b/hal_psee_plugins/src/plugin/psee_gen31_evk1.cpp @@ -0,0 +1,37 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#if !defined(__ANDROID__) || defined(ANDROID_USES_LIBUSB) +#include "boards/fx3/fx3_camera_discovery.h" +#include "devices/gen31/gen31_fx3_facilities_builder.h" +#endif +#include "boards/rawfile/psee_file_discovery.h" +#include "devices/utils/device_system_id.h" +#include "metavision/hal/plugin/plugin.h" +#include "metavision/hal/plugin/plugin_entrypoint.h" +#include "metavision/hal/utils/hal_software_info.h" +#include "plugin/psee_plugin.h" + +void initialize_plugin(void *plugin_ptr) { + using namespace Metavision; + + Plugin &plugin = plugin_cast(plugin_ptr); + initialize_psee_plugin(plugin); + +#if !defined(__ANDROID__) || defined(ANDROID_USES_LIBUSB) + // Register live camera discoveries + auto &fx3_disc = plugin.add_camera_discovery(std::make_unique()); + fx3_disc.register_device_builder(SYSTEM_CCAM3_GEN31, build_gen31_fx3_device); +#endif + + // Register raw file discoveries + auto &file_disc = plugin.add_file_discovery(std::make_unique()); +} diff --git a/hal_psee_plugins/src/plugin/psee_gen31_evk2.cpp b/hal_psee_plugins/src/plugin/psee_gen31_evk2.cpp new file mode 100644 index 000000000..d9751b11b --- /dev/null +++ b/hal_psee_plugins/src/plugin/psee_gen31_evk2.cpp @@ -0,0 +1,42 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#if !defined(__ANDROID__) || defined(ANDROID_USES_LIBUSB) +#include "boards/treuzell/tz_camera_discovery.h" +#include "boards/treuzell/tz_libusb_board_command.h" +#include "devices/treuzell/tz_streamer.h" +#include "devices/gen31/gen31_evk2_tz_device.h" +#endif +#include "boards/rawfile/psee_file_discovery.h" +#include "devices/utils/device_system_id.h" +#include "metavision/hal/plugin/plugin.h" +#include "metavision/hal/plugin/plugin_entrypoint.h" +#include "metavision/hal/utils/hal_software_info.h" +#include "plugin/psee_plugin.h" + +void initialize_plugin(void *plugin_ptr) { + using namespace Metavision; + + Plugin &plugin = plugin_cast(plugin_ptr); + initialize_psee_plugin(plugin); + +#if !defined(__ANDROID__) || defined(ANDROID_USES_LIBUSB) + // Register the known USB vendor ID, with the subclass used for Treuzell + TzLibUSBBoardCommand::add_usb_id(0x03fd, 0x5832, 0x19); + TzLibUSBBoardCommand::add_usb_id(0x03fd, 0x5832, 0x0); + // Register live camera discoveries + auto &evk2_disc = plugin.add_camera_discovery(std::make_unique()); + evk2_disc.factory().insert("treuzell,streamer", TzStreamer::build); + evk2_disc.factory().insert("psee,video", TzEvk2Gen31::build, TzEvk2Gen31::can_build); +#endif + + auto &file_disc = plugin.add_file_discovery(std::make_unique()); +} diff --git a/hal_psee_plugins/src/plugin/psee_gen31_evk3.cpp b/hal_psee_plugins/src/plugin/psee_gen31_evk3.cpp new file mode 100644 index 000000000..b922c7a81 --- /dev/null +++ b/hal_psee_plugins/src/plugin/psee_gen31_evk3.cpp @@ -0,0 +1,44 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#if !defined(__ANDROID__) || defined(ANDROID_USES_LIBUSB) +#include "boards/treuzell/tz_camera_discovery.h" +#include "boards/treuzell/tz_libusb_board_command.h" +#include "devices/treuzell/tz_streamer.h" +#include "devices/gen31/gen31_ccam5_tz_device.h" +#include "devices/treuzell/ti_tmp103.h" +#endif +#include "boards/rawfile/psee_file_discovery.h" +#include "devices/utils/device_system_id.h" +#include "metavision/hal/plugin/plugin.h" +#include "metavision/hal/plugin/plugin_entrypoint.h" +#include "metavision/hal/utils/hal_software_info.h" +#include "plugin/psee_plugin.h" + +void initialize_plugin(void *plugin_ptr) { + using namespace Metavision; + + Plugin &plugin = plugin_cast(plugin_ptr); + initialize_psee_plugin(plugin); + +#if !defined(__ANDROID__) || defined(ANDROID_USES_LIBUSB) + // Register the known USB vendor ID, with the subclass used for Treuzell + TzLibUSBBoardCommand::add_usb_id(0x04b4, 0x00f4, 0x19); + // Register live camera discoveries + auto &evk3_disc = plugin.add_camera_discovery(std::make_unique()); + evk3_disc.factory().insert("treuzell,streamer", TzStreamer::build); + evk3_disc.factory().insert("psee,ccam5_fpga", TzCcam5Gen31::build); + evk3_disc.factory().insert("ti,tmp103", TiTmp103::build); +#endif + + // Register raw file discoveries + auto &file_disc = plugin.add_file_discovery(std::make_unique()); +} diff --git a/hal_psee_plugins/src/plugin/psee_gen3_evk1.cpp b/hal_psee_plugins/src/plugin/psee_gen3_evk1.cpp new file mode 100644 index 000000000..f5609a896 --- /dev/null +++ b/hal_psee_plugins/src/plugin/psee_gen3_evk1.cpp @@ -0,0 +1,37 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#if !defined(__ANDROID__) || defined(ANDROID_USES_LIBUSB) +#include "boards/fx3/fx3_camera_discovery.h" +#include "devices/gen3/gen3_fx3_facilities_builder.h" +#endif +#include "boards/rawfile/psee_file_discovery.h" +#include "devices/utils/device_system_id.h" +#include "metavision/hal/plugin/plugin.h" +#include "metavision/hal/plugin/plugin_entrypoint.h" +#include "metavision/hal/utils/hal_software_info.h" +#include "plugin/psee_plugin.h" + +void initialize_plugin(void *plugin_ptr) { + using namespace Metavision; + + Plugin &plugin = plugin_cast(plugin_ptr); + initialize_psee_plugin(plugin); + +#if !defined(__ANDROID__) || defined(ANDROID_USES_LIBUSB) + // Register live camera discoveries + auto &fx3_disc = plugin.add_camera_discovery(std::make_unique()); + fx3_disc.register_device_builder(SYSTEM_CCAM3_GEN3, build_gen3_fx3_device); +#endif + + // Register raw file discoveries + auto &file_disc = plugin.add_file_discovery(std::make_unique()); +} diff --git a/hal_psee_plugins/src/plugin/psee_gen41_evk2.cpp b/hal_psee_plugins/src/plugin/psee_gen41_evk2.cpp new file mode 100644 index 000000000..030dc49fd --- /dev/null +++ b/hal_psee_plugins/src/plugin/psee_gen41_evk2.cpp @@ -0,0 +1,42 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#if !defined(__ANDROID__) || defined(ANDROID_USES_LIBUSB) +#include "boards/treuzell/tz_camera_discovery.h" +#include "boards/treuzell/tz_libusb_board_command.h" +#include "devices/treuzell/tz_streamer.h" +#include "devices/gen41/gen41_evk2_tz_device.h" +#endif +#include "boards/rawfile/psee_file_discovery.h" +#include "devices/utils/device_system_id.h" +#include "metavision/hal/plugin/plugin.h" +#include "metavision/hal/plugin/plugin_entrypoint.h" +#include "metavision/hal/utils/hal_software_info.h" +#include "plugin/psee_plugin.h" + +void initialize_plugin(void *plugin_ptr) { + using namespace Metavision; + + Plugin &plugin = plugin_cast(plugin_ptr); + initialize_psee_plugin(plugin); + +#if !defined(__ANDROID__) || defined(ANDROID_USES_LIBUSB) + // Register the known USB vendor ID, with the subclass used for Treuzell + TzLibUSBBoardCommand::add_usb_id(0x03fd, 0x5832, 0x19); + TzLibUSBBoardCommand::add_usb_id(0x03fd, 0x5832, 0x0); + // Register live camera discoveries + auto &evk2_disc = plugin.add_camera_discovery(std::make_unique()); + evk2_disc.factory().insert("treuzell,streamer", TzStreamer::build); + evk2_disc.factory().insert("psee,video", TzEvk2Gen41::build, TzEvk2Gen41::can_build); +#endif + + auto &file_disc = plugin.add_file_discovery(std::make_unique()); +} diff --git a/hal_psee_plugins/src/plugin/psee_gen41_evk3.cpp b/hal_psee_plugins/src/plugin/psee_gen41_evk3.cpp new file mode 100644 index 000000000..b127c6e0b --- /dev/null +++ b/hal_psee_plugins/src/plugin/psee_gen41_evk3.cpp @@ -0,0 +1,44 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#if !defined(__ANDROID__) || defined(ANDROID_USES_LIBUSB) +#include "boards/treuzell/tz_camera_discovery.h" +#include "boards/treuzell/tz_libusb_board_command.h" +#include "devices/treuzell/tz_streamer.h" +#include "devices/gen41/gen41_tz_device.h" +#include "devices/treuzell/ti_tmp103.h" +#endif +#include "boards/rawfile/psee_file_discovery.h" +#include "devices/utils/device_system_id.h" +#include "metavision/hal/plugin/plugin.h" +#include "metavision/hal/plugin/plugin_entrypoint.h" +#include "metavision/hal/utils/hal_software_info.h" +#include "plugin/psee_plugin.h" + +void initialize_plugin(void *plugin_ptr) { + using namespace Metavision; + + Plugin &plugin = plugin_cast(plugin_ptr); + initialize_psee_plugin(plugin); + +#if !defined(__ANDROID__) || defined(ANDROID_USES_LIBUSB) + // Register the known USB vendor ID, with the subclass used for Treuzell + TzLibUSBBoardCommand::add_usb_id(0x04b4, 0x00f4, 0x19); + // Register live camera discoveries + auto &evk3_disc = plugin.add_camera_discovery(std::make_unique()); + evk3_disc.factory().insert("treuzell,streamer", TzStreamer::build); + evk3_disc.factory().insert("psee,ccam5_gen41", TzGen41::build, TzGen41::can_build); + evk3_disc.factory().insert("ti,tmp103", TiTmp103::build); +#endif + + // Register raw file discoveries + auto &file_disc = plugin.add_file_discovery(std::make_unique()); +} diff --git a/hal_psee_plugins/src/plugin/psee_gen4_evk1.cpp b/hal_psee_plugins/src/plugin/psee_gen4_evk1.cpp new file mode 100644 index 000000000..e5593dce8 --- /dev/null +++ b/hal_psee_plugins/src/plugin/psee_gen4_evk1.cpp @@ -0,0 +1,36 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#if !defined(__ANDROID__) || defined(ANDROID_USES_LIBUSB) +#include "boards/fx3/fx3_camera_discovery.h" +#include "devices/gen4/gen4_evk1_facilities_builder.h" +#endif +#include "boards/rawfile/psee_file_discovery.h" +#include "devices/utils/device_system_id.h" +#include "metavision/hal/plugin/plugin.h" +#include "metavision/hal/plugin/plugin_entrypoint.h" +#include "metavision/hal/utils/hal_software_info.h" +#include "plugin/psee_plugin.h" + +void initialize_plugin(void *plugin_ptr) { + using namespace Metavision; + + Plugin &plugin = plugin_cast(plugin_ptr); + initialize_psee_plugin(plugin); + +#if !defined(__ANDROID__) || defined(ANDROID_USES_LIBUSB) + // Register live camera discoveries + auto &fx3_disc = plugin.add_camera_discovery(std::make_unique()); + fx3_disc.register_device_builder(SYSTEM_CCAM3_GEN4, build_gen4_evk1_device); +#endif + + auto &file_disc = plugin.add_file_discovery(std::make_unique()); +} diff --git a/hal_psee_plugins/src/plugin/psee_gen4_evk2.cpp b/hal_psee_plugins/src/plugin/psee_gen4_evk2.cpp new file mode 100644 index 000000000..e6783a259 --- /dev/null +++ b/hal_psee_plugins/src/plugin/psee_gen4_evk2.cpp @@ -0,0 +1,42 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#if !defined(__ANDROID__) || defined(ANDROID_USES_LIBUSB) +#include "boards/treuzell/tz_camera_discovery.h" +#include "boards/treuzell/tz_libusb_board_command.h" +#include "devices/treuzell/tz_streamer.h" +#include "devices/gen4/gen4_evk2_tz_device.h" +#endif +#include "boards/rawfile/psee_file_discovery.h" +#include "devices/utils/device_system_id.h" +#include "metavision/hal/plugin/plugin.h" +#include "metavision/hal/plugin/plugin_entrypoint.h" +#include "metavision/hal/utils/hal_software_info.h" +#include "plugin/psee_plugin.h" + +void initialize_plugin(void *plugin_ptr) { + using namespace Metavision; + + Plugin &plugin = plugin_cast(plugin_ptr); + initialize_psee_plugin(plugin); + +#if !defined(__ANDROID__) || defined(ANDROID_USES_LIBUSB) + // Register the known USB vendor ID, with the subclass used for Treuzell + TzLibUSBBoardCommand::add_usb_id(0x03fd, 0x5832, 0x19); + TzLibUSBBoardCommand::add_usb_id(0x03fd, 0x5832, 0x0); + // Register live camera discoveries + auto &evk2_disc = plugin.add_camera_discovery(std::make_unique()); + evk2_disc.factory().insert("treuzell,streamer", TzStreamer::build); + evk2_disc.factory().insert("psee,video", TzEvk2Gen4::build, TzEvk2Gen4::can_build); +#endif + + auto &file_disc = plugin.add_file_discovery(std::make_unique()); +} diff --git a/hal_psee_plugins/src/plugin/psee_golden_fallbacks.cpp b/hal_psee_plugins/src/plugin/psee_golden_fallbacks.cpp new file mode 100644 index 000000000..1deea64cf --- /dev/null +++ b/hal_psee_plugins/src/plugin/psee_golden_fallbacks.cpp @@ -0,0 +1,39 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#if !defined(__ANDROID__) || defined(ANDROID_USES_LIBUSB) +#include "devices/golden_fallbacks/golden_fallback_treuzell_facilities_builder.h" +#include "devices/golden_fallbacks/golden_fallback_fx3_facilities_builder.h" +#include "boards/treuzell/tz_camera_discovery.h" +#include "boards/fx3/fx3_camera_discovery.h" +#endif +#include "devices/utils/device_system_id.h" +#include "metavision/hal/plugin/plugin.h" +#include "metavision/hal/plugin/plugin_entrypoint.h" +#include "metavision/hal/utils/hal_software_info.h" +#include "plugin/psee_plugin.h" + +void initialize_plugin(void *plugin_ptr) { + using namespace Metavision; + + Plugin &plugin = plugin_cast(plugin_ptr); + initialize_psee_plugin(plugin); + +#if !defined(__ANDROID__) || defined(ANDROID_USES_LIBUSB) + // Fx3 golden fallback + auto &fx3_disc = plugin.add_camera_discovery(std::make_unique()); + fx3_disc.register_device_builder(SYSTEM_CCAM3_GOLDEN_FALLBACK, build_golden_fallback_fx3_device); + + // Treuzell golden fallback (a.k.a evk2 & evk3) + auto &evk2_disc = plugin.add_camera_discovery(std::make_unique()); + evk2_disc.register_device_builder(SYSTEM_CCAM5_GOLDEN_FALLBACK, build_golden_fallback_treuzell_device); +#endif +} diff --git a/hal_psee_plugins/src/plugin/psee_imx636_evk2.cpp b/hal_psee_plugins/src/plugin/psee_imx636_evk2.cpp new file mode 100644 index 000000000..69e608707 --- /dev/null +++ b/hal_psee_plugins/src/plugin/psee_imx636_evk2.cpp @@ -0,0 +1,42 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#if !defined(__ANDROID__) || defined(ANDROID_USES_LIBUSB) +#include "boards/treuzell/tz_camera_discovery.h" +#include "boards/treuzell/tz_libusb_board_command.h" +#include "devices/treuzell/tz_streamer.h" +#include "devices/imx636/imx636_evk2_tz_device.h" +#endif +#include "boards/rawfile/psee_file_discovery.h" +#include "devices/utils/device_system_id.h" +#include "metavision/hal/plugin/plugin.h" +#include "metavision/hal/plugin/plugin_entrypoint.h" +#include "metavision/hal/utils/hal_software_info.h" +#include "plugin/psee_plugin.h" + +void initialize_plugin(void *plugin_ptr) { + using namespace Metavision; + + Plugin &plugin = plugin_cast(plugin_ptr); + initialize_psee_plugin(plugin); + +#if !defined(__ANDROID__) || defined(ANDROID_USES_LIBUSB) + // Register the known USB vendor ID, with the subclass used for Treuzell + TzLibUSBBoardCommand::add_usb_id(0x03fd, 0x5832, 0x19); + TzLibUSBBoardCommand::add_usb_id(0x03fd, 0x5832, 0x0); + // Register live camera discoveries + auto &evk2_disc = plugin.add_camera_discovery(std::make_unique()); + evk2_disc.factory().insert("treuzell,streamer", TzStreamer::build); + evk2_disc.factory().insert("psee,video", TzEvk2Imx636::build, TzEvk2Imx636::can_build); +#endif + + auto &file_disc = plugin.add_file_discovery(std::make_unique()); +} diff --git a/hal_psee_plugins/src/plugin/psee_imx636_evk3.cpp b/hal_psee_plugins/src/plugin/psee_imx636_evk3.cpp new file mode 100644 index 000000000..bc9de7378 --- /dev/null +++ b/hal_psee_plugins/src/plugin/psee_imx636_evk3.cpp @@ -0,0 +1,44 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#if !defined(__ANDROID__) || defined(ANDROID_USES_LIBUSB) +#include "boards/treuzell/tz_camera_discovery.h" +#include "boards/treuzell/tz_libusb_board_command.h" +#include "devices/treuzell/tz_streamer.h" +#include "devices/imx636/imx636_tz_device.h" +#include "devices/treuzell/ti_tmp103.h" +#endif +#include "boards/rawfile/psee_file_discovery.h" +#include "devices/utils/device_system_id.h" +#include "metavision/hal/plugin/plugin.h" +#include "metavision/hal/plugin/plugin_entrypoint.h" +#include "metavision/hal/utils/hal_software_info.h" +#include "plugin/psee_plugin.h" + +void initialize_plugin(void *plugin_ptr) { + using namespace Metavision; + + Plugin &plugin = plugin_cast(plugin_ptr); + initialize_psee_plugin(plugin); + +#if !defined(__ANDROID__) || defined(ANDROID_USES_LIBUSB) + // Register the known USB vendor ID, with the subclass used for Treuzell + TzLibUSBBoardCommand::add_usb_id(0x04b4, 0x00f4, 0x19); + // Register live camera discoveries + auto &evk3_disc = plugin.add_camera_discovery(std::make_unique()); + evk3_disc.factory().insert("treuzell,streamer", TzStreamer::build); + evk3_disc.factory().insert("psee,ccam5_gen42", TzImx636::build, TzImx636::can_build); + evk3_disc.factory().insert("ti,tmp103", TiTmp103::build); +#endif + + // Register raw file discoveries + auto &file_disc = plugin.add_file_discovery(std::make_unique()); +} diff --git a/hal_psee_plugins/src/plugin/psee_imx636_evk4.cpp b/hal_psee_plugins/src/plugin/psee_imx636_evk4.cpp new file mode 100644 index 000000000..de280179f --- /dev/null +++ b/hal_psee_plugins/src/plugin/psee_imx636_evk4.cpp @@ -0,0 +1,44 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#if !defined(__ANDROID__) || defined(ANDROID_USES_LIBUSB) +#include "boards/treuzell/tz_camera_discovery.h" +#include "boards/treuzell/tz_libusb_board_command.h" +#include "devices/treuzell/tz_streamer.h" +#include "devices/imx636/imx636_tz_device.h" +#include "devices/treuzell/ti_tmp103.h" +#endif +#include "boards/rawfile/psee_file_discovery.h" +#include "devices/utils/device_system_id.h" +#include "metavision/hal/plugin/plugin.h" +#include "metavision/hal/plugin/plugin_entrypoint.h" +#include "metavision/hal/utils/hal_software_info.h" +#include "plugin/psee_plugin.h" + +void initialize_plugin(void *plugin_ptr) { + using namespace Metavision; + + Plugin &plugin = plugin_cast(plugin_ptr); + initialize_psee_plugin(plugin); + +#if !defined(__ANDROID__) || defined(ANDROID_USES_LIBUSB) + // Register the known USB vendor ID, with the subclass used for Treuzell + TzLibUSBBoardCommand::add_usb_id(0x04b4, 0x00f5, 0x19); + // Register live camera discoveries + auto &evk4_disc = plugin.add_camera_discovery(std::make_unique()); + evk4_disc.factory().insert("treuzell,streamer", TzStreamer::build); + evk4_disc.factory().insert("psee,ccam5_gen42", TzImx636::build, TzImx636::can_build); + evk4_disc.factory().insert("ti,tmp103", TiTmp103::build); +#endif + + // Register raw file discoveries + auto &file_disc = plugin.add_file_discovery(std::make_unique()); +} diff --git a/hal_psee_plugins/src/plugin/psee_plugin.cpp b/hal_psee_plugins/src/plugin/psee_plugin.cpp new file mode 100644 index 000000000..da7c46c53 --- /dev/null +++ b/hal_psee_plugins/src/plugin/psee_plugin.cpp @@ -0,0 +1,29 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include "metavision/hal/plugin/plugin.h" +#include "metavision/hal/utils/hal_software_info.h" +#include "plugin/psee_plugin.h" + +namespace Metavision { + +const std::string &get_psee_plugin_integrator_name() { + static const std::string integrator("Prophesee"); + return integrator; +} + +void initialize_psee_plugin(Plugin &plugin) { + plugin.set_integrator_name(get_psee_plugin_integrator_name()); + plugin.set_plugin_info(get_hal_software_info()); + plugin.set_hal_info(get_hal_software_info()); +} + +} // namespace Metavision \ No newline at end of file diff --git a/hal_psee_plugins/src/plugin/psee_universal.cpp b/hal_psee_plugins/src/plugin/psee_universal.cpp new file mode 100644 index 000000000..fb4fd87ac --- /dev/null +++ b/hal_psee_plugins/src/plugin/psee_universal.cpp @@ -0,0 +1,67 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#if !defined(__ANDROID__) || defined(ANDROID_USES_LIBUSB) +#include "devices/gen3/gen3_fx3_facilities_builder.h" +#include "devices/gen31/gen31_fx3_facilities_builder.h" +#ifdef HAL_GEN4_SUPPORT +#include "devices/gen4/gen4_evk1_facilities_builder.h" +#endif +#include "devices/golden_fallbacks/golden_fallback_treuzell_facilities_builder.h" +#include "devices/golden_fallbacks/golden_fallback_fx3_facilities_builder.h" +#include "devices/treuzell/tz_streamer.h" +#include "devices/gen31/gen31_ccam5_tz_device.h" +#include "devices/gen41/gen41_tz_device.h" +#include "devices/imx636/imx636_tz_device.h" +#include "devices/treuzell/tz_psee_video.h" +#include "devices/treuzell/ti_tmp103.h" +#include "boards/fx3/fx3_camera_discovery.h" +#include "boards/treuzell/tz_camera_discovery.h" +#include "boards/treuzell/tz_libusb_board_command.h" +#endif +#include "boards/rawfile/psee_file_discovery.h" +#include "devices/utils/device_system_id.h" +#include "metavision/hal/plugin/plugin.h" +#include "metavision/hal/plugin/plugin_entrypoint.h" +#include "metavision/hal/utils/hal_software_info.h" +#include "plugin/psee_plugin.h" + +void initialize_plugin(void *plugin_ptr) { + using namespace Metavision; + + Plugin &plugin = plugin_cast(plugin_ptr); + initialize_psee_plugin(plugin); + +#if !defined(__ANDROID__) || defined(ANDROID_USES_LIBUSB) + // Register the known USB vendor ID, with the subclass used for Treuzell + TzLibUSBBoardCommand::add_usb_id(0x03fd, 0x5832, 0x19); + TzLibUSBBoardCommand::add_usb_id(0x03fd, 0x5832, 0x0); + TzLibUSBBoardCommand::add_usb_id(0x04b4, 0x00f4, 0x19); + TzLibUSBBoardCommand::add_usb_id(0x04b4, 0x00f5, 0x19); + // Register live camera discoveries + auto &fx3_disc = plugin.add_camera_discovery(std::make_unique()); + fx3_disc.register_device_builder(SYSTEM_CCAM3_GEN3, build_gen3_fx3_device); + fx3_disc.register_device_builder(SYSTEM_CCAM3_GEN31, build_gen31_fx3_device); +#ifdef HAL_GEN4_SUPPORT + fx3_disc.register_device_builder(SYSTEM_CCAM3_GEN4, build_gen4_evk1_device); +#endif + fx3_disc.register_device_builder(SYSTEM_CCAM3_GOLDEN_FALLBACK, build_golden_fallback_fx3_device); + auto &tz_disc = plugin.add_camera_discovery(std::make_unique()); + tz_disc.factory().insert("treuzell,streamer", TzStreamer::build); + tz_disc.factory().insert("psee,video", TzPseeVideo::build); + tz_disc.factory().insert("psee,ccam5_fpga", TzCcam5Gen31::build); + tz_disc.factory().insert("psee,ccam5_gen41", TzGen41::build); + tz_disc.factory().insert("psee,ccam5_gen42", TzImx636::build); + tz_disc.factory().insert("ti,tmp103", TiTmp103::build); +#endif + + auto &file_disc = plugin.add_file_discovery(std::make_unique()); +} diff --git a/hal_psee_plugins/src/utils/CMakeLists.txt b/hal_psee_plugins/src/utils/CMakeLists.txt new file mode 100644 index 000000000..a7b885f7c --- /dev/null +++ b/hal_psee_plugins/src/utils/CMakeLists.txt @@ -0,0 +1,16 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. + +target_sources(metavision_hal_psee_plugin_obj PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/device_builder_factory.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/psee_pattern_generator_checker.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/register_map.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/regmap_data.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/psee_hal_utils.cpp +) diff --git a/hal_psee_plugins/src/utils/device_builder_factory.cpp b/hal_psee_plugins/src/utils/device_builder_factory.cpp new file mode 100644 index 000000000..efbcef9f2 --- /dev/null +++ b/hal_psee_plugins/src/utils/device_builder_factory.cpp @@ -0,0 +1,58 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include +#include +#include + +#include "metavision/hal/utils/device_builder.h" +#include "metavision/hal/utils/hal_log.h" +#include "utils/device_builder_factory.h" + +namespace Metavision { + +bool DeviceBuilderFactory::insert(long key, const DeviceBuilderCallback &device_builder_cb) { + auto iter = builder_map_.find(key); + if (iter != builder_map_.end()) { + MV_HAL_LOG_ERROR() << "Trying to insert an existing key:" << std::to_string(key); + return false; + } + builder_map_.insert(iter, {key, device_builder_cb}); + return true; +} + +bool DeviceBuilderFactory::remove(long key) { + auto iter = builder_map_.find(key); + if (iter == builder_map_.end()) { + MV_HAL_LOG_ERROR() << "Key was not registered"; + return false; + } + builder_map_.erase(iter); + return true; +} + +bool DeviceBuilderFactory::build(long key, DeviceBuilder &device_builder, + const DeviceBuilderParameters &device_builder_params, + const DeviceConfig &device_config) { + auto iter = builder_map_.find(key); + if (iter == builder_map_.end()) { + MV_HAL_LOG_ERROR() << "Trying to build a device with a key that was not registered before"; + return {}; + } + return iter->second(device_builder, device_builder_params, device_config); +} + +bool DeviceBuilderFactory::contains(long key) { + auto iter = builder_map_.find(key); + return iter != builder_map_.end(); +} + +} // namespace Metavision \ No newline at end of file diff --git a/hal_psee_plugins/src/utils/psee_hal_utils.cpp b/hal_psee_plugins/src/utils/psee_hal_utils.cpp new file mode 100644 index 000000000..d83302387 --- /dev/null +++ b/hal_psee_plugins/src/utils/psee_hal_utils.cpp @@ -0,0 +1,28 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include +#include + +#include "utils/psee_hal_utils.h" + +namespace Metavision { + +bool is_expert_mode_enabled() { + static const char *expert_mode_var = getenv("MV_FLAGS_HAL_EXPERT_MODE"); + + if (expert_mode_var == nullptr) { + expert_mode_var = "0"; + } + return !strcmp(expert_mode_var, "1"); +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/utils/psee_pattern_generator_checker.cpp b/hal_psee_plugins/src/utils/psee_pattern_generator_checker.cpp new file mode 100644 index 000000000..e3f23beb1 --- /dev/null +++ b/hal_psee_plugins/src/utils/psee_pattern_generator_checker.cpp @@ -0,0 +1,20 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include "utils/psee_pattern_generator_checker.h" + +namespace Metavision { + +PseePatternGeneratorChecker::~PseePatternGeneratorChecker() = default; + +PseePatternGeneratorChecker::PatternChecker::~PatternChecker() = default; + +} // namespace Metavision diff --git a/hal_psee_plugins/src/utils/register_map.cpp b/hal_psee_plugins/src/utils/register_map.cpp new file mode 100644 index 000000000..843ae9db2 --- /dev/null +++ b/hal_psee_plugins/src/utils/register_map.cpp @@ -0,0 +1,416 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include +#include +#include +#include + +#include "utils/register_map.h" +#include "metavision/hal/utils/hal_log.h" + +namespace Metavision { + +// Dummy Null Stream to redirect Log Registers +class NullStreamBuf : public std::streambuf { +protected: + int overflow(int c) override; +}; + +int NullStreamBuf::overflow(int c) { + return c; +} + +NullStreamBuf gNullStream; +std::ostream NullOStream(&gNullStream); + +namespace detail { +namespace hal { +template +Metavision::LoggingOperation log_registers(const std::string &file, int line, const std::string &function) { +#ifndef _WIN32 + if (getenv("LOG_REGISTERS")) { + return Metavision::LoggingOperation(Metavision::getLogStream(), PrefixFmt, file, line, function); + } +#endif + // Default to NullStream + return Metavision::LoggingOperation(NullOStream, PrefixFmt, file, line, function); +} +} // namespace hal +} // namespace detail + +#define MV_HAL_LOG_REGISTERS MV_LOG_WRAP(Metavision::detail::hal::log_registers, Metavision::LogLevel::Debug) + +RegisterMap::Field::Field(const std::string &n, uint8_t start, uint8_t len, uint32_t default_value, + const std::map &aliases) : + name_(n), start_(start), len_(len) { + init_mask(); + aliases_ = aliases; + default_value_ = default_value; +} + +void RegisterMap::Field::add_alias(const std::string &name, uint32_t value) { + aliases_[name] = value; +} + +const std::string &RegisterMap::Field::get_name() const { + return name_; +} + +void RegisterMap::Field::set_name(const std::string &n) { + name_ = n; +} + +void RegisterMap::Field::set_bitfield_in_value(uint32_t v, uint32_t ®ister_value) const { + register_value = (register_value & ~mask_) | ((v << start_) & mask_); +} +uint32_t RegisterMap::Field::get_bitfield_in_value(uint32_t register_value) const { + return (register_value & mask_) >> start_; +} +void RegisterMap::Field::set_default_bitfield_in_value(uint32_t ®ister_value) const { + set_bitfield_in_value(default_value_, register_value); +} +uint32_t RegisterMap::Field::get_alias_value(const std::string &alias) const { + auto it = aliases_.find(alias); + if (it == aliases_.end()) + return -1; + return it->second; +} + +void RegisterMap::Field::init_mask() { + uint32_t m = 0; + for (auto i = 0; i < len_; ++i) { + m = (m << 1) | 1; + } + m <<= start_; + mask_ = m; +} + +uint8_t RegisterMap::Field::get_start() const { + return start_; +} + +void RegisterMap::Field::set_start(uint8_t start) { + start_ = start; + init_mask(); +} + +uint8_t RegisterMap::Field::get_len() const { + return len_; +} + +void RegisterMap::Field::set_len(uint8_t len) { + len_ = len; + init_mask(); +} + +RegisterMap::Field *RegisterMap::FieldAccess::get_field() { + return field_; +} +void RegisterMap::FieldAccess::write_value(uint32_t v) { + if (field_ && register_) { + MV_HAL_LOG_REGISTERS() << "Write Register" << register_->get_name() << "Field" << field_->get_name() << std::hex + << v << std::dec; + uint32_t cur_value = register_->get_value(); + field_->set_bitfield_in_value(v, cur_value); + register_->write_value(cur_value); + } else { + if (register_) { + MV_HAL_LOG_ERROR() << "Write: Invalid field for register" << register_->get_name(); + } else { + MV_HAL_LOG_ERROR() << "Write: Invalid register"; + } + } +} +uint32_t RegisterMap::FieldAccess::read_value() { + if (field_ && register_) { + uint32_t cur_value = register_->read_value(); + return field_->get_bitfield_in_value(cur_value); + } + MV_HAL_LOG_ERROR() << "Read: Invalid register or field"; + return 0; +} +RegisterMap::FieldAccess::FieldAccess(Register *reg, Field *field) { + field_ = field; + register_ = reg; +} + +void RegisterMap::RegisterAccess::write_value(uint32_t v) { + if (register_) { + register_->write_value(v); + MV_HAL_LOG_REGISTERS() << "Write Register" << register_->get_name() << std::hex << v << std::dec; + } +} + +void RegisterMap::RegisterAccess::write_value(const std::map &bitfields) { + if (register_) { + register_->write_value(bitfields); + for (auto v : bitfields) { + MV_HAL_LOG_REGISTERS() << "Write Register" << register_->get_name() << "Field" << v.first << v.second; + } + } +} +void RegisterMap::RegisterAccess::write_value(const std::pair &bitfield) { + if (register_) { + register_->write_value(bitfield); + } +} +void RegisterMap::RegisterAccess::write_value(const std::string &bitfieldname, const std::string &bitfieldvalue) { + if (register_) { + register_->write_value(bitfieldname, bitfieldvalue); + } +} + +void RegisterMap::RegisterAccess::write_value(const std::map &l) { + if (register_) { + for (auto p : l) { + register_->write_value(p.first, p.second); + } + } +} + +RegisterMap::RegisterAccess &RegisterMap::RegisterAccess::operator=(uint32_t v) { + if (register_) { + (*register_) = v; + MV_HAL_LOG_REGISTERS() << "Write Register" << register_->get_name() << std::hex << v << std::dec; + } + return *this; +} + +RegisterMap::FieldAccess &RegisterMap::FieldAccess::operator=(const std::string &alias) { + if (field_ && register_) { + register_->write_value(field_->get_name(), alias); + } + return *this; +} + +RegisterMap::FieldAccess &RegisterMap::FieldAccess::operator=(uint32_t v) { + if (field_ && register_) { + register_->write_value(field_->get_name(), v); + } + return *this; +} + +RegisterMap::RegisterAccess &RegisterMap::RegisterAccess::operator=(const std::map &bitfields) { + for (auto v : bitfields) { + MV_HAL_LOG_REGISTERS() << "Write Register" << register_->get_name() << "Field" << v.first; + } + if (register_) { + (*register_) = bitfields; + } + return *this; +} + +RegisterMap::FieldAccess RegisterMap::RegisterAccess::operator[](const std::string &name) { + if (register_) { + return (*register_)[name]; + } + return RegisterMap::FieldAccess(nullptr, nullptr); +} + +uint32_t RegisterMap::RegisterAccess::read_value() { + if (register_) { + return register_->read_value(); + } + return -1; +} +uint32_t RegisterMap::RegisterAccess::get_value() { + if (register_) { + return register_->read_value(); + } + return -1; +} + +uint32_t RegisterMap::RegisterAccess::get_address() { + if (register_) { + return register_->get_address(); + } + return -1; +} + +std::string RegisterMap::RegisterAccess::get_name() const { + if (register_) { + return register_->get_name(); + } + return std::string(); +} + +RegisterMap::RegisterAccess::RegisterAccess(Register *reg) : register_(reg) {} + +RegisterMap::Register::Register(const std::string &n, uint32_t address, std::initializer_list l) : + name_(n), address_(address) { + for (auto f : l) { + add_field(f); + } +} + +uint32_t RegisterMap::Register::get_address() const { + return address_; +} + +void RegisterMap::Register::set_address(uint32_t address) { + address_ = address; +} + +const std::string &RegisterMap::Register::get_name() const { + return name_; +} + +void RegisterMap::Register::set_name(const std::string &n) { + name_ = n; +} + +RegisterMap::FieldAccess RegisterMap::Register::operator[](const std::string &name) { + auto it = name_to_field_.find(name); + if (it == name_to_field_.end()) { + MV_HAL_LOG_ERROR() << "Unknown field" << name << "for register" << this->get_name(); + return FieldAccess(nullptr, nullptr); + } + return FieldAccess(this, &it->second); +} + +RegisterMap::Register &RegisterMap::Register::add_field(const Field &f) { + name_to_field_[f.get_name()] = f; + return *this; +} + +void RegisterMap::Register::set_register_map(RegisterMap *register_map) { + register_map_ = register_map; +} + +RegisterMap::Register &RegisterMap::Register::operator=(uint32_t v) { + if (register_map_) { + MV_HAL_LOG_REGISTERS() << "Write" << name_ << std::hex << v << std::dec; + register_map_->write(address_, v); + } + return *this; +} + +RegisterMap::Register &RegisterMap::Register::operator=(const std::map &bitfields) { + auto val = this->read_value(); + for (auto v : bitfields) { + auto it = name_to_field_.find(v.first); + if (it != name_to_field_.end()) { + it->second.set_bitfield_in_value(v.second, val); + } else { + MV_HAL_LOG_ERROR() << "Unknown field" << v.first << "for register" << this->get_name(); + } + } + *this = val; + return *this; +} + +void RegisterMap::Register::write_value(uint32_t v) { + MV_HAL_LOG_REGISTERS() << "Write Register" << this->get_name() << std::hex << v << std::dec; + *this = v; +} + +void RegisterMap::Register::write_value(const std::string fieldname, uint32_t value) { + this->write_value({{fieldname, value}}); +} + +void RegisterMap::Register::write_value(const std::map &bitfields) { + *this = bitfields; +} +void RegisterMap::Register::write_value(const std::pair &bitfield) { + *this = std::map{bitfield}; +} +void RegisterMap::Register::write_value(const std::string &bitfieldname, const std::string &bitfieldvalue) { + auto it = name_to_field_.find(bitfieldname); + if (it != name_to_field_.end()) { + *this = {std::pair{bitfieldname, it->second.get_alias_value(bitfieldvalue)}}; + } +} + +uint32_t RegisterMap::Register::read_value() { + if (register_map_) { + MV_HAL_LOG_REGISTERS() << "register_map_->read" << name_; + return register_map_->read(address_); + } + return -1; +} +RegisterMap::Field *RegisterMap::Register::bit_to_field(uint32_t bit) { + for (auto &it : name_to_field_) { + auto name = it.first; + auto &field = it.second; + if (field.get_start() <= bit && bit < field.get_start() + field.get_len()) { + return &field; + } + } + return nullptr; +} + +uint32_t RegisterMap::Register::get_value() { + return this->read_value(); +} + +RegisterMap::RegisterMap() { + set_write_cb([](uint32_t address, uint32_t v) {}); + set_read_cb([](uint32_t address) { return uint32_t(-1); }); +} + +RegisterMap::RegisterAccess RegisterMap::operator[](uint32_t addr) { + auto it = addr_to_register_.find(addr); + if (it == addr_to_register_.end()) { + MV_HAL_LOG_ERROR() << "Unknown register address" << addr; + return RegisterAccess(nullptr); + } + return RegisterAccess(it->second.get()); +} + +RegisterMap::RegisterAccess RegisterMap::operator[](const std::string &name) { + auto it = name_to_register_.find(name); + if (it == name_to_register_.end()) { + MV_HAL_LOG_ERROR() << "Unknown register" << name; + return RegisterAccess(nullptr); + } + return RegisterAccess(it->second.get()); +} + +void RegisterMap::add_register(const Register &r) { + std::shared_ptr ptr = std::make_shared(r); + addr_to_register_[ptr->get_address()] = ptr; + name_to_register_[ptr->get_name()] = ptr; + ptr->set_register_map(this); +} + +void RegisterMap::write(uint32_t address, uint32_t v) { + if (getenv("LOG_REGISTERS")) { + std::ostringstream s(std::ostringstream::ate); + s << "write, 0x" << std::setw(8) << std::setfill('0') << std::hex << address; + s << ", 0x" << std::setw(8) << std::setfill('0') << std::hex << v; + MV_HAL_LOG_INFO() << s.str(); + } + write_cb_(address, v); +} +uint32_t RegisterMap::read(uint32_t address) { + uint32_t v = read_cb_(address); + if (getenv("LOG_REGISTERS")) { + std::ostringstream s(std::ostringstream::ate); + s << "read, 0x" << std::setw(8) << std::setfill('0') << std::hex << address; + s << ", 0x" << std::setw(8) << std::setfill('0') << std::hex << v; + MV_HAL_LOG_INFO() << s.str(); + } + return v; +} +void RegisterMap::set_write_cb(write_cb_t cb) { + write_cb_ = cb; +} +void RegisterMap::set_read_cb(read_cb_t cb) { + read_cb_ = cb; +} + +void RegisterMap::dump() { + for (auto &a : name_to_register_) + MV_HAL_LOG_REGISTERS() << a.first; +} + +} // namespace Metavision diff --git a/hal_psee_plugins/src/utils/regmap_data.cpp b/hal_psee_plugins/src/utils/regmap_data.cpp new file mode 100644 index 000000000..0aa5a32c7 --- /dev/null +++ b/hal_psee_plugins/src/utils/regmap_data.cpp @@ -0,0 +1,65 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include "utils/regmap_data.h" + +namespace Metavision { +void init_device_regmap(RegisterMap ®map, + std::vector> &device_regmap_description) { + bool is_curreg_valid = false; + bool is_curfield_valid = false; + RegisterMap::Register curreg; + RegisterMap::Field curfield; + for (auto sub_desc : device_regmap_description) { + RegmapData *curdata = std::get<0>(sub_desc); + size_t size = std::get<1>(sub_desc); + std::string sub_name(std::get<2>(sub_desc)); + RegmapData *data_end = curdata + size; + std::string prefix = ""; + + if (sub_name.length() != 0) { + prefix = sub_name + "/"; + } + + for (; curdata != data_end; ++curdata) { + if (curdata->type == R) { + if (is_curfield_valid) { + curreg.add_field(curfield); + } + if (is_curreg_valid) { + regmap.add_register(curreg); + } + curreg = RegisterMap::Register(prefix + curdata->register_data.name, + curdata->register_data.addr + std::get<3>(sub_desc)); + is_curreg_valid = true; + is_curfield_valid = false; + } else if (curdata->type == F) { + if (is_curfield_valid) { + curreg.add_field(curfield); + } + is_curfield_valid = true; + curfield = RegisterMap::Field(curdata->field_data.name, curdata->field_data.start, + curdata->field_data.len, curdata->field_data.default_value); + } else if (curdata->type == A) { + if (is_curfield_valid) { + curfield.add_alias(curdata->alias_data.name, curdata->alias_data.value); + } + } + } + if (is_curfield_valid) { + curreg.add_field(curfield); + } + if (is_curreg_valid) { + regmap.add_register(curreg); + } + } +} +} // namespace Metavision diff --git a/hal_psee_plugins/test/CMakeLists.txt b/hal_psee_plugins/test/CMakeLists.txt new file mode 100644 index 000000000..64d77e37c --- /dev/null +++ b/hal_psee_plugins/test/CMakeLists.txt @@ -0,0 +1,53 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. + +# Utils library for encoding with PSEE plugin format : +add_library(metavision_hal_psee_plugins_gtest_utils INTERFACE) +target_include_directories(metavision_hal_psee_plugins_gtest_utils INTERFACE + ${CMAKE_CURRENT_SOURCE_DIR}/gtest_utils +) +target_link_libraries(metavision_hal_psee_plugins_gtest_utils + INTERFACE + metavision_hal_psee_plugin_obj +) + +# Tests for PSEE plugins +set(metavision_hal_psee_plugins_tests_src + ${CMAKE_CURRENT_SOURCE_DIR}/device_discovery_psee_plugins_gtest.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/event_encoders_gtest.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/file_data_transfer_gtest.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/file_events_stream_gtest.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/gen31_event_rate_noise_filter_module_gtest.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/i_events_stream_gtest.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/future/i_events_stream_gtest.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/psee_decoder_gtest.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/tencoder_gtest.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/timer_high_encoder_gtest.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/raw_file_header_gtest.cpp +) +add_executable(gtest_metavision_hal_psee_plugins ${metavision_hal_psee_plugins_tests_src} $) +target_link_libraries(gtest_metavision_hal_psee_plugins + PRIVATE + metavision_hal + metavision_hal_discovery + metavision_hal_psee_plugins_gtest_utils + MetavisionUtils::gtest-main + Boost::filesystem +) + +target_include_directories(gtest_metavision_hal_psee_plugins + PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR} +) + +if(HAL_GEN4_SUPPORT) + target_compile_definitions(gtest_metavision_hal_psee_plugins PRIVATE "HAL_GEN4_SUPPORT") +endif(HAL_GEN4_SUPPORT) + +register_gtest(TEST hal-psee-plugins-unit-tests TARGET gtest_metavision_hal_psee_plugins) diff --git a/hal_psee_plugins/test/device_discovery_psee_plugins_gtest.cpp b/hal_psee_plugins/test/device_discovery_psee_plugins_gtest.cpp new file mode 100644 index 000000000..883b51dcb --- /dev/null +++ b/hal_psee_plugins/test/device_discovery_psee_plugins_gtest.cpp @@ -0,0 +1,559 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include +#include +#include +#include + +#include "metavision/utils/gtest/gtest_with_tmp_dir.h" +#include "metavision/utils/gtest/gtest_custom.h" +#include "metavision/sdk/base/events/event_cd.h" +#include "metavision/sdk/base/events/event_ext_trigger.h" +#include "metavision/hal/device/device_discovery.h" +#include "metavision/hal/device/device.h" +#include "metavision/hal/utils/hal_exception.h" +#include "metavision/hal/facilities/i_hw_identification.h" +#include "metavision/hal/facilities/i_geometry.h" +#include "metavision/hal/facilities/i_trigger_in.h" +#include "metavision/hal/facilities/i_trigger_out.h" +#include "metavision/hal/facilities/i_ll_biases.h" +#include "metavision/hal/facilities/i_event_rate_noise_filter_module.h" +#include "metavision/hal/facilities/i_decoder.h" +#include "metavision/hal/facilities/i_event_decoder.h" +#include "metavision/hal/facilities/i_device_control.h" +#include "metavision/hal/facilities/i_hw_register.h" +#include "metavision/hal/facilities/i_roi.h" +#include "metavision/hal/facilities/i_monitoring.h" +#include "metavision/hal/facilities/i_plugin_software_info.h" +#include "metavision/hal/facilities/i_events_stream.h" +#include "devices/utils/device_system_id.h" +#include "geometries/vga_geometry.h" +#include "geometries/hd_geometry.h" +#include "boards/rawfile/psee_raw_file_header.h" + +using namespace Metavision; + +class DeviceDiscoveryPseePlugins_GTest : public GTestWithTmpDir { +protected: + virtual void SetUp() override { + static int raw_counter = 1; + rawfile_to_log_path_ = tmpdir_handler_->get_full_path("rawfile_" + std::to_string(++raw_counter) + ".raw"); + } + + void write_header(RawFileHeader header_to_write) { + std::ofstream rawfile_to_log(rawfile_to_log_path_, std::ios::out | std::ios::binary); + if (!rawfile_to_log.is_open()) { + std::cerr << "Could not open file for writing at " << rawfile_to_log_path_ << std::endl; + FAIL(); + } + + rawfile_to_log << header_to_write; + rawfile_to_log.close(); + } + + std::string rawfile_to_log_path_; +}; + +static const std::vector offline_supported_system_ids{{ + SystemId::SYSTEM_CCAM3_GEN3, + SystemId::SYSTEM_CCAM3_GEN31, + SystemId::SYSTEM_EVK3_GEN31_EVT2, + SystemId::SYSTEM_EVK3_GEN31_EVT3, + SystemId::SYSTEM_EVK2_GEN31, + SystemId::SYSTEM_CCAM4_GEN3, + SystemId::SYSTEM_CCAM4_GEN3_EVK, + SystemId::SYSTEM_CCAM4_GEN3_REV_B, + SystemId::SYSTEM_CCAM4_GEN3_REV_B_EVK, + SystemId::SYSTEM_CCAM4_GEN3_REV_B_EVK_BRIDGE, + SystemId::SYSTEM_VISIONCAM_GEN3, + SystemId::SYSTEM_VISIONCAM_GEN3_EVK, + SystemId::SYSTEM_VISIONCAM_GEN31, + SystemId::SYSTEM_VISIONCAM_GEN31_EVK, + SystemId::SYSTEM_EVK2_GEN41, +#ifdef HAL_GEN4_SUPPORT + SystemId::SYSTEM_CCAM3_GEN4, + SystemId::SYSTEM_EVK2_GEN4, +#endif +}}; + +static const std::vector offline_unsupported_system_ids{ + {SystemId::SYSTEM_CCAM3_GEN2, SystemId::SYSTEM_CCAM2_STEREO, SystemId::SYSTEM_CCAM2_STEREO_MAPPING, + SystemId::SYSTEM_STEREO_DEMO, SystemId::SYSTEM_CCAM3_STEREO_LEFT_GTP, SystemId::SYSTEM_CCAM3_STEREO_LEFT, + SystemId::SYSTEM_CCAM2_STEREO_MERGE_IMU, SystemId::SYSTEM_CCAM3_GEN2, SystemId::SYSTEM_CCAM4_GEN4_EVK, + SystemId::SYSTEM_CCAM5_GEN4_EVK_BRIDGE, SystemId::SYSTEM_INVALID_NO_FPGA}}; + +TEST_F(DeviceDiscoveryPseePlugins_GTest, offline_supported_system_id_are_not_unsupported_in_the_gtest) { + for (const auto system_id : offline_supported_system_ids) { + ASSERT_TRUE(std::find(offline_unsupported_system_ids.cbegin(), offline_unsupported_system_ids.cend(), + system_id) == offline_unsupported_system_ids.cend()); + } +} + +TEST_F(DeviceDiscoveryPseePlugins_GTest, open_rawfile_succeeds_without_integrator_and_plugin_name) { + std::unique_ptr device; + for (const long system_id : offline_supported_system_ids) { + auto header = std::stringstream(); + header << "\% Date 2014-02-28 13:37:42" << std::endl + << "\% system_ID " << system_id << std::endl + << "\% serial_number 00001337" << std::endl; + write_header(RawFileHeader(header)); + ASSERT_NO_THROW(device = DeviceDiscovery::open_raw_file(rawfile_to_log_path_)); + + // If no info is provided, we assume that it's an old RAW file that only + // psee plugins can open + + I_HW_Identification *hw_id = device->get_facility(); + ASSERT_EQ("Prophesee", hw_id->get_integrator()); + } +} + +TEST_F(DeviceDiscoveryPseePlugins_GTest, open_rawfile_succeeds_with_integrator_and_no_plugin_name) { + std::unique_ptr device; + for (const long system_id : offline_supported_system_ids) { + auto header = std::stringstream(); + header << "\% Date 2014-02-28 13:37:42" << std::endl + << "\% system_ID " << system_id << std::endl + << "\% integrator_name Prophesee" << std::endl + << "\% serial_number 00001337" << std::endl; + write_header(RawFileHeader(header)); + ASSERT_NO_THROW(device = DeviceDiscovery::open_raw_file(rawfile_to_log_path_)); + I_HW_Identification *hw_id = device->get_facility(); + ASSERT_EQ("Prophesee", hw_id->get_integrator()); + } +} + +TEST_F(DeviceDiscoveryPseePlugins_GTest, open_rawfile_succeeds_with_no_integrator_and_plugin_name) { + std::unique_ptr device; + for (const long system_id : offline_supported_system_ids) { + std::string plugin_name; + switch (system_id) { + case SystemId::SYSTEM_CCAM3_GEN3: + case SystemId::SYSTEM_CCAM4_GEN3: + case SystemId::SYSTEM_CCAM4_GEN3_EVK: + case SystemId::SYSTEM_CCAM4_GEN3_REV_B: + case SystemId::SYSTEM_CCAM4_GEN3_REV_B_EVK: + case SystemId::SYSTEM_CCAM4_GEN3_REV_B_EVK_BRIDGE: + case SystemId::SYSTEM_VISIONCAM_GEN3: + case SystemId::SYSTEM_VISIONCAM_GEN3_EVK: + plugin_name = "hal_plugin_gen3_fx3"; + break; + case SystemId::SYSTEM_CCAM3_GEN31: + case SystemId::SYSTEM_VISIONCAM_GEN31: + case SystemId::SYSTEM_VISIONCAM_GEN31_EVK: + plugin_name = "hal_plugin_gen31_fx3"; + break; + case SystemId::SYSTEM_EVK3_GEN31_EVT2: + case SystemId::SYSTEM_EVK3_GEN31_EVT3: + plugin_name = "hal_plugin_gen31_evk3"; + break; + case SystemId::SYSTEM_EVK2_GEN31: + plugin_name = "hal_plugin_gen31_evk2"; + break; + case SystemId::SYSTEM_CCAM3_GEN4: + plugin_name = "hal_plugin_gen4_fx3"; + break; + case SystemId::SYSTEM_EVK2_GEN4: + plugin_name = "hal_plugin_gen4_evk2"; + break; + case SystemId::SYSTEM_EVK2_GEN41: + plugin_name = "hal_plugin_gen41_evk2"; + break; + default: + std::cerr + << "This is an enum fallback that should not have been reached. Is the input camera supported but not " + "handled in this test ?" + << std::endl; + FAIL(); + } + + auto header = std::stringstream(); + header << "\% Date 2014-02-28 13:37:42" << std::endl + << "\% system_ID " << system_id << std::endl + << "\% plugin_name " << plugin_name << std::endl + << "\% serial_number 00001337" << std::endl; + write_header(RawFileHeader(header)); + ASSERT_NO_THROW(device = DeviceDiscovery::open_raw_file(rawfile_to_log_path_)); + + I_PluginSoftwareInfo *plugin_soft_info = device->get_facility(); + ASSERT_EQ(plugin_name, plugin_soft_info->get_plugin_name()); + } +} + +TEST_F(DeviceDiscoveryPseePlugins_GTest, open_rawfile_fails_with_bad_integrator_name) { + std::unique_ptr device; + for (const long system_id : offline_supported_system_ids) { + auto header = std::stringstream(); + header << "\% Date 2014-02-28 13:37:42" << std::endl + << "\% system_ID " << system_id << std::endl + << "\% integrator_name _aZ0$fooBar@%!" << std::endl + << "\% serial_number 00001337" << std::endl; + write_header(RawFileHeader(header)); + ASSERT_THROW(device = DeviceDiscovery::open_raw_file(rawfile_to_log_path_), HalException); + } +} + +TEST_F(DeviceDiscoveryPseePlugins_GTest, open_rawfile_fails_with_bad_plugin_name) { + std::unique_ptr device; + // This test actually tests HAL, as Psee plugins don't care about their name + for (const long system_id : offline_supported_system_ids) { + auto header = std::stringstream(); + header << "\% Date 2014-02-28 13:37:42" << std::endl + << "\% system_ID " << system_id << std::endl + << "\% plugin_name _aZ0$fooBar@%!" << std::endl + << "\% serial_number 00001337" << std::endl; + write_header(RawFileHeader(header)); + ASSERT_THROW(device = DeviceDiscovery::open_raw_file(rawfile_to_log_path_), HalException); + } +} + +TEST_F(DeviceDiscoveryPseePlugins_GTest, open_rawfile_fails_with_bad_integrator_and_plugin_name) { + std::unique_ptr device; + for (const long system_id : offline_supported_system_ids) { + auto header = std::stringstream(); + header << "\% Date 2014-02-28 13:37:42" << std::endl + << "\% system_ID " << system_id << std::endl + << "\% integrator_name _aZ0$fooBar@%!" << std::endl + << "\% plugin_name _aZ0$fooBar@%!" << std::endl + << "\% serial_number 00001337" << std::endl; + write_header(RawFileHeader(header)); + ASSERT_THROW(device = DeviceDiscovery::open_raw_file(rawfile_to_log_path_), HalException); + } +} + +TEST_F(DeviceDiscoveryPseePlugins_GTest, open_rawfile_success_with_supported_system_ids) { + for (const long system_id : offline_supported_system_ids) { + auto header = std::stringstream(); + header << "\% Date 2014-02-28 13:37:42" << std::endl + << "\% system_ID " << system_id << std::endl + << "\% serial_number 00001337" << std::endl; + write_header(RawFileHeader(header)); + + std::unique_ptr device; + ASSERT_NO_THROW(device = DeviceDiscovery::open_raw_file(rawfile_to_log_path_)); + + // Check hw identification + I_HW_Identification *hw_id = device->get_facility(); + ASSERT_NE(nullptr, hw_id); + ASSERT_EQ(system_id, hw_id->get_system_id()); + ASSERT_EQ("File", hw_id->get_connection_type()); + + // Check decoder + I_Decoder *decoder = device->get_facility(); + ASSERT_NE(nullptr, decoder); + + // Check geometry + I_Geometry *geometry = device->get_facility(); + ASSERT_NE(nullptr, geometry); + + switch (system_id) { + case SystemId::SYSTEM_CCAM3_GEN3: + case SystemId::SYSTEM_CCAM4_GEN3: + case SystemId::SYSTEM_CCAM4_GEN3_EVK: + case SystemId::SYSTEM_CCAM4_GEN3_REV_B: + case SystemId::SYSTEM_CCAM4_GEN3_REV_B_EVK: + case SystemId::SYSTEM_CCAM4_GEN3_REV_B_EVK_BRIDGE: + case SystemId::SYSTEM_VISIONCAM_GEN3: + case SystemId::SYSTEM_VISIONCAM_GEN3_EVK: + ASSERT_EQ("3.0", hw_id->get_sensor_info().as_string()); + ASSERT_EQ(VGAGeometry::width_, geometry->get_width()); + ASSERT_EQ(VGAGeometry::height_, geometry->get_height()); + ASSERT_EQ(4, decoder->get_raw_event_size_bytes()); + break; + case SystemId::SYSTEM_CCAM3_GEN31: + case SystemId::SYSTEM_EVK3_GEN31_EVT2: + case SystemId::SYSTEM_EVK2_GEN31: + case SystemId::SYSTEM_VISIONCAM_GEN31: + case SystemId::SYSTEM_VISIONCAM_GEN31_EVK: + ASSERT_EQ("3.1", hw_id->get_sensor_info().as_string()); + ASSERT_EQ(VGAGeometry::width_, geometry->get_width()); + ASSERT_EQ(VGAGeometry::height_, geometry->get_height()); + ASSERT_EQ(4, decoder->get_raw_event_size_bytes()); + break; + case SystemId::SYSTEM_EVK3_GEN31_EVT3: + ASSERT_EQ("3.1", hw_id->get_sensor_info().as_string()); + ASSERT_EQ(VGAGeometry::width_, geometry->get_width()); + ASSERT_EQ(VGAGeometry::height_, geometry->get_height()); + ASSERT_EQ(2, decoder->get_raw_event_size_bytes()); + break; + case SystemId::SYSTEM_CCAM3_GEN4: + case SystemId::SYSTEM_EVK2_GEN4: + ASSERT_EQ("4.0", hw_id->get_sensor_info().as_string()); + ASSERT_EQ(HDGeometry::width_, geometry->get_width()); + ASSERT_EQ(HDGeometry::height_, geometry->get_height()); + ASSERT_EQ(4, + decoder->get_raw_event_size_bytes()); // Default fallback when no evt format is indicated in the + // rawfile header + break; + case SystemId::SYSTEM_EVK2_GEN41: + ASSERT_EQ("4.1", hw_id->get_sensor_info().as_string()); + ASSERT_EQ(HDGeometry::width_, geometry->get_width()); + ASSERT_EQ(HDGeometry::height_, geometry->get_height()); + ASSERT_EQ(4, + decoder->get_raw_event_size_bytes()); // Default fallback when no evt format is indicated in the + // rawfile header + break; + default: + std::cerr + << "This is an enum fallback that should not have been reached. Is the input camera supported but not " + "handled in this test ?" + << std::endl; + FAIL(); + } + + // Check other facilities presence + ASSERT_NE(nullptr, device->get_facility()); + ASSERT_NE(nullptr, device->get_facility()); + ASSERT_NE(nullptr, device->get_facility>()); + ASSERT_NE(nullptr, device->get_facility>()); + } +} + +TEST_F(DeviceDiscoveryPseePlugins_GTest, open_rawfile_with_geometry_and_format) { + // Just test VGA EVT2 and HD EVT3, should have a reasonable code coverage + { + auto header = std::stringstream(); + header << "\% format EVT3" << std::endl << "\% geometry 1280x720" << std::endl; + write_header(RawFileHeader(header)); + std::unique_ptr device; + ASSERT_NO_THROW(device = DeviceDiscovery::open_raw_file(rawfile_to_log_path_)); + + // Check decoder + I_Decoder *decoder = device->get_facility(); + ASSERT_NE(nullptr, decoder); + + // Check geometry + I_Geometry *geometry = device->get_facility(); + ASSERT_NE(nullptr, geometry); + + ASSERT_EQ(HDGeometry::width_, geometry->get_width()); + ASSERT_EQ(HDGeometry::height_, geometry->get_height()); + ASSERT_EQ(2, decoder->get_raw_event_size_bytes()); + + // Check facilites presence + ASSERT_NE(nullptr, device->get_facility()); + ASSERT_NE(nullptr, device->get_facility()); + ASSERT_NE(nullptr, device->get_facility>()); + ASSERT_NE(nullptr, device->get_facility>()); + } + { + auto header = std::stringstream(); + header << "\% format EVT2" << std::endl << "\% geometry 640x480" << std::endl; + write_header(RawFileHeader(header)); + std::unique_ptr device; + ASSERT_NO_THROW(device = DeviceDiscovery::open_raw_file(rawfile_to_log_path_)); + + // Check decoder + I_Decoder *decoder = device->get_facility(); + ASSERT_NE(nullptr, decoder); + + // Check geometry + I_Geometry *geometry = device->get_facility(); + ASSERT_NE(nullptr, geometry); + + ASSERT_EQ(VGAGeometry::width_, geometry->get_width()); + ASSERT_EQ(VGAGeometry::height_, geometry->get_height()); + ASSERT_EQ(4, decoder->get_raw_event_size_bytes()); + + // Check facilites presence + ASSERT_NE(nullptr, device->get_facility()); + ASSERT_NE(nullptr, device->get_facility()); + ASSERT_NE(nullptr, device->get_facility>()); + ASSERT_NE(nullptr, device->get_facility>()); + } +} + +TEST_F(DeviceDiscoveryPseePlugins_GTest, open_rawfile_with_unknown_format) { + auto header = std::stringstream(); + header << "\% format UNSUPPORTED_FORMAT" << std::endl << "\% geometry 1280x720" << std::endl; + write_header(RawFileHeader(header)); + std::unique_ptr device; + ASSERT_THROW(device = DeviceDiscovery::open_raw_file(rawfile_to_log_path_), HalException); +} + +TEST_F(DeviceDiscoveryPseePlugins_GTest, open_rawfile_doesnt_have_board_facilities) { + for (const long system_id : offline_supported_system_ids) { + auto header = std::stringstream(); + header << "\% Date 2014-02-28 13:37:42" << std::endl + << "\% system_ID " << system_id << std::endl + << "\% serial_number 00001337" << std::endl; + write_header(RawFileHeader(header)); + + std::unique_ptr device; + ASSERT_NO_THROW(device = DeviceDiscovery::open_raw_file(rawfile_to_log_path_)); + + // Check hw identification + ASSERT_EQ(nullptr, device->get_facility()); + ASSERT_EQ(nullptr, device->get_facility()); + ASSERT_EQ(nullptr, device->get_facility()); + ASSERT_EQ(nullptr, device->get_facility()); + ASSERT_EQ(nullptr, device->get_facility()); + ASSERT_EQ(nullptr, device->get_facility()); + ASSERT_EQ(nullptr, device->get_facility()); + } +} + +TEST_F(DeviceDiscoveryPseePlugins_GTest, open_rawfile_does_not_work_with_unsupported_id) { + for (const long system_id : offline_unsupported_system_ids) { + auto header = std::stringstream(); + header << "\% Date 2014-02-28 13:37:42" << std::endl + << "\% system_ID " << system_id << std::endl + << "\% serial_number 00001337" << std::endl; + write_header(RawFileHeader(header)); + + std::unique_ptr device; + EXPECT_THROW(device = DeviceDiscovery::open_raw_file(rawfile_to_log_path_), HalException); + } +} + +TEST_WITH_CAMERA(DeviceDiscoveryRepositoryNoF_GTest, open_camera_check_facilities_existence, + camera_params(camera_param().integrator("Prophesee").generation("3.0"), + camera_param().integrator("Prophesee").generation("3.1").board("fx3"), + camera_param().integrator("Prophesee").generation("3.1").board("cx3"), + camera_param().generation("4.0"))) { + std::unique_ptr device; + try { + device = DeviceDiscovery::open(""); + } catch (const HalException &e) { + std::cerr << "Plug a camera to run this test." << std::endl; + FAIL(); + } + + ASSERT_NE(nullptr, device.get()); + + // Check board facilities presence + ASSERT_NE(nullptr, device->get_facility()); + ASSERT_NE(nullptr, device->get_facility()); + ASSERT_NE(nullptr, device->get_facility()); + ASSERT_NE(nullptr, device->get_facility()); + ASSERT_NE(nullptr, device->get_facility()); + ASSERT_NE(nullptr, device->get_facility()); + ASSERT_NE(nullptr, device->get_facility()); + ASSERT_NE(nullptr, device->get_facility()); + + // check others facilities presence + ASSERT_NE(nullptr, device->get_facility()); + ASSERT_NE(nullptr, device->get_facility()); + ASSERT_NE(nullptr, device->get_facility()); + ASSERT_NE(nullptr, device->get_facility>()); + ASSERT_NE(nullptr, device->get_facility>()); +} + +TEST_WITH_CAMERA(DeviceDiscoveryRepositoryNoF_GTest, open_camera_check_facilities_existence_no_triggers, + camera_params(camera_param().integrator("Prophesee").generation("3.1").board("evk2"), + camera_param().integrator("Prophesee").generation("3.1").board("evk3"))) { + std::unique_ptr device; + try { + device = DeviceDiscovery::open(""); + } catch (const HalException &e) { + std::cerr << "Plug a camera to run this test." << std::endl; + FAIL(); + } + + ASSERT_NE(nullptr, device.get()); + + // Check board facilities presence + ASSERT_NE(nullptr, device->get_facility()); + ASSERT_NE(nullptr, device->get_facility()); + ASSERT_NE(nullptr, device->get_facility()); + ASSERT_NE(nullptr, device->get_facility()); + ASSERT_NE(nullptr, device->get_facility()); + ASSERT_NE(nullptr, device->get_facility()); + + // check others facilities presence + ASSERT_NE(nullptr, device->get_facility()); + ASSERT_NE(nullptr, device->get_facility()); + ASSERT_NE(nullptr, device->get_facility>()); + ASSERT_NE(nullptr, device->get_facility>()); +} + +TEST_WITH_CAMERA(DeviceDiscoveryRepositoryNoF_GTest, open_camera_build_gen3, + camera_params(camera_param().integrator("Prophesee").generation("3.0"))) { + std::unique_ptr device; + try { + device = DeviceDiscovery::open(""); + } catch (const HalException &e) { + std::cerr << "Plug a camera to run this test." << std::endl; + FAIL(); + } + + ASSERT_NE(nullptr, device.get()); + + // Assert the the needed facilities for this test exist + I_Decoder *decoder = device->get_facility(); + ASSERT_NE(nullptr, decoder); + I_Geometry *geometry = device->get_facility(); + ASSERT_NE(nullptr, geometry); + + // Now check the information on the device + ASSERT_EQ(VGAGeometry::width_, geometry->get_width()); + ASSERT_EQ(VGAGeometry::height_, geometry->get_height()); + ASSERT_EQ(4, decoder->get_raw_event_size_bytes()); +} + +TEST_WITH_CAMERA(DeviceDiscoveryRepositoryNoF_GTest, open_camera_build_gen31, + camera_params(camera_param().integrator("Prophesee").generation("3.1"))) { + std::unique_ptr device; + try { + device = DeviceDiscovery::open(""); + } catch (const HalException &e) { + std::cerr << "Plug a camera to run this test." << std::endl; + FAIL(); + } + + ASSERT_NE(nullptr, device.get()); + + // Assert the the needed facilities for this test exist + I_Decoder *decoder = device->get_facility(); + ASSERT_NE(nullptr, decoder); + I_Geometry *geometry = device->get_facility(); + ASSERT_NE(nullptr, geometry); + I_HW_Identification *hw_id_ = device->get_facility(); + ASSERT_NE(nullptr, hw_id_); + + // Now check the information on the device + ASSERT_NE(nullptr, device->get_facility()); + ASSERT_NE(nullptr, device->get_facility()); + ASSERT_NE(nullptr, device->get_facility()); + ASSERT_EQ(VGAGeometry::width_, geometry->get_width()); + ASSERT_EQ(VGAGeometry::height_, geometry->get_height()); + if (hw_id_->get_system_id() == 0x28) { + ASSERT_EQ(2, decoder->get_raw_event_size_bytes()); + } else { + ASSERT_EQ(4, decoder->get_raw_event_size_bytes()); + } +} + +TEST_WITH_CAMERA(DeviceDiscoveryRepositoryNoF_GTest, open_camera_build_gen4, + camera_params(camera_param().integrator("Prophesee").generation("4.0"))) { + std::unique_ptr device; + try { + device = DeviceDiscovery::open(""); + } catch (const HalException &e) { + std::cerr << "Plug a camera to run this test." << std::endl; + FAIL(); + } + + ASSERT_NE(nullptr, device.get()); + + // Assert the the needed facilities for this test exist + I_Decoder *decoder = device->get_facility(); + ASSERT_NE(nullptr, decoder); + I_Geometry *geometry = device->get_facility(); + ASSERT_NE(nullptr, geometry); + + // Now check the information on the device + ASSERT_NE(nullptr, device->get_facility()); + ASSERT_NE(nullptr, device->get_facility()); + ASSERT_EQ(HDGeometry::width_, geometry->get_width()); + ASSERT_EQ(HDGeometry::height_, geometry->get_height()); + ASSERT_EQ(2, decoder->get_raw_event_size_bytes()); +} diff --git a/hal_psee_plugins/test/event_encoders_gtest.cpp b/hal_psee_plugins/test/event_encoders_gtest.cpp new file mode 100644 index 000000000..1aa4c8a84 --- /dev/null +++ b/hal_psee_plugins/test/event_encoders_gtest.cpp @@ -0,0 +1,124 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include +#include +#include + +#include "metavision/sdk/base/events/event_cd.h" +#include "event_encoder.h" +#include "evt2_raw_format.h" + +using namespace Metavision; + +class EventEncoders_GTest : public ::testing::Test { +protected: + virtual void SetUp() override {} + + virtual void TearDown() override {} +}; + +TEST_F(EventEncoders_GTest, get_size_encoded) { + // Event2d Cd + EXPECT_EQ(4, BatchEventEncoder::get_size_encoded()); + + // Ext Triggers + EXPECT_EQ(4, BatchEventEncoder::get_size_encoded()); +} + +TEST_F(EventEncoders_GTest, register_empty_buffer) { + std::vector v; + auto it = v.begin(), it_end = v.end(); + BatchEventEncoder event_encoder; + event_encoder.register_buffer(it, it_end); + EXPECT_EQ(std::numeric_limits::max(), event_encoder.get_next_timestamp_to_encode()); + EXPECT_TRUE(event_encoder.is_done()); +} + +TEST_F(EventEncoders_GTest, register_buffer) { + std::vector v = {{1, 2, 0, 153}, {456, 275, 1, 207}, {45, 180, 1, 510}}; + auto it = v.begin(), it_end = v.end(); + BatchEventEncoder event_encoder; + event_encoder.register_buffer(it, it_end); + EXPECT_EQ(153, event_encoder.get_next_timestamp_to_encode()); + EXPECT_FALSE(event_encoder.is_done()); +} + +TEST_F(EventEncoders_GTest, evt2_encode_cd) { + using Format = Evt2RawFormat; + int time_mask = 0x3F; // Take only 6 lower bits + + std::vector v = {{1, 2, 0, 153}, {456, 255, 1, 2407}, {45, 180, 1, 10010}}; + auto it = v.begin(), it_end = v.end(); + BatchEventEncoder event_encoder; + event_encoder.register_buffer(it, it_end); + + ASSERT_EQ(sizeof(EVT2Event2D), event_encoder.get_size_encoded()); + EVT2Event2D encoded_ev; + + event_encoder.encode_next_event(reinterpret_cast(&encoded_ev)); + EXPECT_EQ(1, encoded_ev.x); + EXPECT_EQ(2, encoded_ev.y); + EXPECT_EQ(0, encoded_ev.type); // Polarity 0 + EXPECT_EQ(153 & time_mask, encoded_ev.timestamp); + + EXPECT_EQ(2407, event_encoder.get_next_timestamp_to_encode()); + + event_encoder.encode_next_event(reinterpret_cast(&encoded_ev)); + EXPECT_EQ(456, encoded_ev.x); + EXPECT_EQ(255, encoded_ev.y); + EXPECT_EQ(1, encoded_ev.type); // Polarity 1 + EXPECT_EQ(2407 & time_mask, encoded_ev.timestamp); + + EXPECT_EQ(10010, event_encoder.get_next_timestamp_to_encode()); + + event_encoder.encode_next_event(reinterpret_cast(&encoded_ev)); + EXPECT_EQ(45, encoded_ev.x); + EXPECT_EQ(180, encoded_ev.y); + EXPECT_EQ(1, encoded_ev.type); // Polarity 1 + EXPECT_EQ(10010 & time_mask, encoded_ev.timestamp); +} + +TEST_F(EventEncoders_GTest, evt2_encode_ext_triggers) { + using Format = Evt2RawFormat; + int time_mask = 0x3F; // Take only 6 lower bits + + std::vector v = {EventExtTrigger(1, 3000, 2), EventExtTrigger(0, 6000, 1), + EventExtTrigger(1, 9000, 3)}; + auto it = v.begin(), it_end = v.end(); + BatchEventEncoder event_encoder; + event_encoder.register_buffer(it, it_end); + + ASSERT_EQ(sizeof(EVT2EventExtTrigger), event_encoder.get_size_encoded()); + EVT2EventExtTrigger encoded_ev; + + event_encoder.encode_next_event(reinterpret_cast(&encoded_ev)); + EXPECT_EQ(1, encoded_ev.value); + EXPECT_EQ(2, encoded_ev.id); + EXPECT_EQ(10, encoded_ev.type); // Polarity 0 + EXPECT_EQ(3000 & time_mask, encoded_ev.timestamp); + + EXPECT_EQ(6000, event_encoder.get_next_timestamp_to_encode()); + + event_encoder.encode_next_event(reinterpret_cast(&encoded_ev)); + EXPECT_EQ(0, encoded_ev.value); + EXPECT_EQ(1, encoded_ev.id); + EXPECT_EQ(10, encoded_ev.type); // Polarity 1 + EXPECT_EQ(6000 & time_mask, encoded_ev.timestamp); + + EXPECT_EQ(9000, event_encoder.get_next_timestamp_to_encode()); + + event_encoder.encode_next_event(reinterpret_cast(&encoded_ev)); + EXPECT_EQ(1, encoded_ev.value); + EXPECT_EQ(3, encoded_ev.id); + EXPECT_EQ(10, encoded_ev.type); // Polarity 1 + EXPECT_EQ(9000 & time_mask, encoded_ev.timestamp); +} diff --git a/hal_psee_plugins/test/file_data_transfer_gtest.cpp b/hal_psee_plugins/test/file_data_transfer_gtest.cpp new file mode 100644 index 000000000..ba853e8b7 --- /dev/null +++ b/hal_psee_plugins/test/file_data_transfer_gtest.cpp @@ -0,0 +1,228 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include +#include +#include +#include +#include +#include + +#include "metavision/hal/utils/hal_exception.h" +#include "metavision/hal/utils/file_data_transfer.h" +#include "metavision/utils/gtest/gtest_with_tmp_dir.h" + +using namespace Metavision; + +class FileDataTransfer_Gtest : public GTestWithTmpDir { +protected: + virtual void SetUp() override { + // Create and open the rawfile + static int raw_counter = 1; + rawfile_to_log_path_ = tmpdir_handler_->get_full_path("rawfile_" + std::to_string(++raw_counter) + ".raw"); + rawfile_to_log_from_rawfile_path_ = rawfile_to_log_path_ + ".logged"; + } + + virtual void TearDown() override { + close_raw(); + } + + void open_raw() { + rawfile_to_log_.reset(new std::ofstream(rawfile_to_log_path_, std::ios::out | std::ios::binary)); + if (!rawfile_to_log_) { + std::cerr << "Could not open file for writing at " << rawfile_to_log_path_ << std::endl; + FAIL(); + } + } + + void close_raw() { + if (rawfile_to_log_) { + rawfile_to_log_->close(); + rawfile_to_log_.reset(nullptr); + } + } + + std::vector write_ref_data() { + open_raw(); + uint32_t n_buffers_count = 0; + auto data_to_write = std::vector(bytes_per_written_buffer_default_); + std::iota(data_to_write.begin(), data_to_write.end(), 1); + + std::vector data_ref; + + const size_t expected_data_size = n_buffers_default_ * bytes_per_written_buffer_default_; + + // writes data + while (++n_buffers_count <= n_buffers_default_) { + // write data + data_ref.insert(data_ref.end(), data_to_write.begin(), data_to_write.end()); + rawfile_to_log_->write(reinterpret_cast(data_to_write.data()), data_to_write.size()); + } + + EXPECT_EQ(data_ref.size(), expected_data_size); + + close_raw(); + return data_ref; + } + + bool open_file_data_transfer(uint32_t raw_events_per_read = raw_events_per_read_default_, + uint32_t read_buffers_count = read_buffers_count_) { + auto ifs = std::make_unique(rawfile_to_log_path_, std::ios::binary); + RawFileConfig config; + config.n_events_to_read_ = raw_events_per_read; + config.n_read_buffers_ = read_buffers_count; + + file_data_transfer_.reset(new FileDataTransfer(std::move(ifs), raw_event_size_bytes_, config)); + if (!file_data_transfer_ || !file_data_transfer_) { + file_data_transfer_.reset(nullptr); + return false; + } + + return true; + } + +public: + static constexpr uint32_t raw_event_size_bytes_ = 4; + static constexpr uint32_t bytes_per_written_buffer_default_ = 100, n_buffers_default_ = 5; + static constexpr uint32_t raw_events_per_read_default_ = 23; + static constexpr uint32_t read_buffers_count_ = 3; + +protected: + std::unique_ptr file_data_transfer_; + + std::unique_ptr rawfile_to_log_; + std::string rawfile_to_log_path_; + std::string rawfile_to_log_from_rawfile_path_; +}; + +constexpr uint32_t FileDataTransfer_Gtest::raw_event_size_bytes_; +constexpr uint32_t FileDataTransfer_Gtest::read_buffers_count_; +constexpr uint32_t FileDataTransfer_Gtest::bytes_per_written_buffer_default_; +constexpr uint32_t FileDataTransfer_Gtest::n_buffers_default_; +constexpr uint32_t FileDataTransfer_Gtest::raw_events_per_read_default_; + +TEST_F(FileDataTransfer_Gtest, file_does_not_exists) { + //////////////////////////////////////////////////////////////////////////////// + // PURPOSE + // Check that you can't read a file that doesn't exist + + ASSERT_EQ(nullptr, file_data_transfer_.get()); +} + +TEST_F(FileDataTransfer_Gtest, reading_integrity) { + // GIVEN a RAW file with known content + auto data_ref = write_ref_data(); + + // WHEN opening the data transfer to read the file + ASSERT_TRUE(open_file_data_transfer()); + + // AND WHEN copying the read data in a buffer + std::vector data_read; + file_data_transfer_->add_new_buffer_callback( + [&](auto &buffer) { data_read.insert(data_read.end(), buffer->cbegin(), buffer->cend()); }); + + // AND WHEN setting a callback on stop + std::atomic stopped{false}; + file_data_transfer_->add_status_changed_callback( + [&](auto status) { stopped = status == DataTransfer::Status::Stopped; }); + + file_data_transfer_->start(); + while (!stopped) { + std::this_thread::sleep_for(std::chrono::milliseconds(1)); + } + + // AND THEN the data read must be the same + ASSERT_EQ(data_ref, data_read); +} + +TEST_F(FileDataTransfer_Gtest, memory_usage) { + // GIVEN a RAW file with known content + auto data_ref = write_ref_data(); + + // WHEN opening the data transfer to read the file + ASSERT_TRUE(open_file_data_transfer()); + + // AND WHEN keeping the buffers in memory + std::vector data_read; + std::vector buffers; + std::mutex buffers_safety; + + file_data_transfer_->add_new_buffer_callback([&](auto &buffer) { + std::lock_guard lock(buffers_safety); + buffers.push_back(buffer); + // THEN each buffer contains at most the requested RAW events to read count in bytes + ASSERT_LE(buffer->size(), raw_events_per_read_default_ * raw_event_size_bytes_); + }); + + // AND WHEN setting a callback on stop + std::atomic stopped{false}; + file_data_transfer_->add_status_changed_callback( + [&](auto status) { stopped = status == DataTransfer::Status::Stopped; }); + + file_data_transfer_->start(); + + // AND THEN the number of buffers transferred can not be greater than the maximum requested (read_buffers_count_) + constexpr uint32_t max_trials = 10; + uint32_t trials = 0; + while (!stopped) { + std::this_thread::sleep_for(std::chrono::milliseconds(10)); + // Here we expect the RAW file to be read fully in less than 100ms. + // If more buffer than the number expected are transferred, it should occur in this time interval. + // If everything goes as expected, the number of buffers is always less or equal to the expected count. + std::lock_guard lock(buffers_safety); + ASSERT_LE(buffers.size(), read_buffers_count_); + ++trials; + if (trials >= max_trials) { + for (auto &buffer : buffers) { + data_read.insert(data_read.end(), buffer->cbegin(), buffer->cend()); + } + // release the buffers so the the object pool can reuse them + buffers.clear(); + } + } + + // Data read + ASSERT_EQ(data_ref, data_read); +} + +TEST_F(FileDataTransfer_Gtest, invalid_parameters) { + // GIVEN a RAW file with known content + auto data_ref = write_ref_data(); + + // WHEN opening the data transfer to read the file with invalid parameters + // RAW events per read = 0 or read buffers count < 2 + ASSERT_THROW(open_file_data_transfer(0), HalException); + ASSERT_THROW(open_file_data_transfer(1, 1), HalException); +} + +TEST_F(FileDataTransfer_Gtest, remove_calback) { + // GIVEN a RAW file with known content + auto data_ref = write_ref_data(); + + // WHEN opening the data transfer to read the file + ASSERT_TRUE(open_file_data_transfer()); + + bool called = false; + auto id = file_data_transfer_->add_status_changed_callback([&](auto status) { called = true; }); + + std::atomic stopped{false}; + file_data_transfer_->add_status_changed_callback( + [&](auto status) { stopped = status == DataTransfer::Status::Stopped; }); + + // remove the callback + file_data_transfer_->remove_callback(id); + + file_data_transfer_->start(); + while (!stopped) { + std::this_thread::sleep_for(std::chrono::milliseconds(1)); + } + ASSERT_FALSE(called); +} diff --git a/hal_psee_plugins/test/file_events_stream_gtest.cpp b/hal_psee_plugins/test/file_events_stream_gtest.cpp new file mode 100644 index 000000000..231496aa7 --- /dev/null +++ b/hal_psee_plugins/test/file_events_stream_gtest.cpp @@ -0,0 +1,407 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include +#include +#include +#include +#include +#include + +#include "metavision/utils/gtest/gtest_with_tmp_dir.h" +#include "metavision/sdk/base/events/event_cd.h" +#include "metavision/hal/device/device_discovery.h" +#include "metavision/hal/device/device.h" +#include "metavision/hal/utils/hal_exception.h" +#include "metavision/hal/facilities/i_events_stream.h" +#include "metavision/hal/facilities/i_hw_identification.h" +#include "metavision/hal/facilities/i_decoder.h" +#include "devices/utils/device_system_id.h" +#include "boards/rawfile/psee_raw_file_header.h" +#include "decoders/evt2/evt2_decoder.h" + +using namespace Metavision; + +using RawEventType = EVT2Decoder::Event_Word_Type; + +class FileEventsStream_Gtest : public GTestWithTmpDir { +protected: + virtual void SetUp() override { + reset_device(); + + // Create and open the rawfile + static int raw_counter = 1; + rawfile_to_log_path_ = tmpdir_handler_->get_full_path("rawfile_" + std::to_string(++raw_counter) + ".raw"); + rawfile_to_log_from_rawfile_path_ = rawfile_to_log_path_ + ".logged"; + + config_.n_read_buffers_ = n_read_buffers_default_; + config_.n_events_to_read_ = n_events_to_read_default_; + } + + virtual void TearDown() override { + close_raw(); + } + + void reset_device() { + // create instances + device_.reset(); + + file_events_stream_ = nullptr; + file_events_stream_ = nullptr; + } + + void open_raw() { + rawfile_to_log_.reset(new std::ofstream(rawfile_to_log_path_, std::ios::out | std::ios::binary)); + if (!rawfile_to_log_) { + std::cerr << "Could not open file for writing at " << rawfile_to_log_path_ << std::endl; + FAIL(); + } + } + + void close_raw() { + if (rawfile_to_log_) { + rawfile_to_log_->close(); + rawfile_to_log_.reset(nullptr); + } + } + + PseeRawFileHeader write_random_header() { + auto header = std::stringstream(); + header << "\% Date 2014-02-28 13:37:42" << std::endl + << "\% system_ID " << gen31_system_id << std::endl + << "\% integrator_name Prophesee" << std::endl + << "\% firmware_version 0.0.0" << std::endl + << "\% plugin_name hal_plugin_gen31_fx3" << std::endl + << "\% evt 2.0" << std::endl + << "\% subsystem_ID " << dummy_sub_system_id_ << std::endl + << "\% " << dummy_custom_key_ << " " << dummy_custom_value_ << std::endl + << "\% serial_number " << dummy_serial_ << std::endl; + PseeRawFileHeader header_to_write(header); + + (*rawfile_to_log_) << header_to_write; + + return header_to_write; + } + + std::vector write_ref_data() { + uint32_t n_buffers_count = 0; + auto data_to_write = std::vector(n_events_per_writen_buffer_default_); + std::iota(data_to_write.begin(), data_to_write.end(), 1); + + std::vector data_ref; + + const size_t expected_data_size = n_buffers_default_ * n_events_per_writen_buffer_default_; + + // writes data + while (++n_buffers_count <= n_buffers_default_) { + // write data + data_ref.insert(data_ref.end(), data_to_write.begin(), data_to_write.end()); + rawfile_to_log_->write(reinterpret_cast(data_to_write.data()), + data_to_write.size() * sizeof(RawEventType)); + } + + EXPECT_EQ(data_ref.size(), expected_data_size); + + return data_ref; + } + + bool open_file_events_stream(std::string file_to_load = "") { + reset_device(); + bool ret = true; + file_to_load = file_to_load != "" ? file_to_load : rawfile_to_log_path_; + + // Tries to build a regular File Events Stream + // As it needs to have access to the 'find_neighboor...' function from the decoder, we open the rawfile with + // device. Then we get the decoder. + device_ = DeviceDiscovery::open_raw_file(file_to_load, config_); + + if (!device_) { + // If device couldn't be built, we don't do anything with it and we keep going + // The idea here is ONLY to test the File Event Stream class + reset_device(); + } else { + file_events_stream_ = device_->get_facility(); + file_id_ = device_->get_facility(); + decoder_ = device_->get_facility(); + + return (file_events_stream_ != nullptr); + } + + return true; + } + + bool open_and_start_file_events_stream(std::string file_to_load = "") { + if (open_file_events_stream(file_to_load)) { + file_events_stream_->start(); + return true; + } + + return false; + } + +public: + static constexpr uint32_t n_events_per_writen_buffer_default_ = 20, n_buffers_default_ = 5; + static constexpr uint32_t n_events_to_read_default_ = 15; // fixed size buffers + static constexpr uint32_t n_read_buffers_default_ = 3; + static constexpr uint32_t n_events_read_in_last_buffer_ = + (n_events_per_writen_buffer_default_ * n_buffers_default_) % n_events_to_read_default_; + + static const std::string dummy_serial_; + static const std::string dummy_events_type_; + static const std::string dummy_custom_key_; + static const std::string dummy_custom_value_; + + static constexpr SystemId gen31_system_id = SystemId::SYSTEM_CCAM3_GEN31; + static constexpr long dummy_sub_system_id_ = 0; + static constexpr long dummy_system_version_ = 0; + +protected: + std::unique_ptr device_; + I_EventsStream *file_events_stream_ = nullptr; + I_Decoder *decoder_ = nullptr; + I_HW_Identification *file_id_ = nullptr; + + std::unique_ptr rawfile_to_log_; + std::string rawfile_to_log_path_; + std::string rawfile_to_log_from_rawfile_path_; + RawFileConfig config_; +}; + +constexpr uint32_t FileEventsStream_Gtest::n_events_per_writen_buffer_default_; +constexpr uint32_t FileEventsStream_Gtest::n_read_buffers_default_; +constexpr uint32_t FileEventsStream_Gtest::n_buffers_default_; +constexpr uint32_t FileEventsStream_Gtest::n_events_to_read_default_; +constexpr uint32_t FileEventsStream_Gtest::n_events_read_in_last_buffer_; + +constexpr long FileEventsStream_Gtest::dummy_system_version_; +constexpr SystemId FileEventsStream_Gtest::gen31_system_id; +const long FileEventsStream_Gtest::dummy_sub_system_id_; +const std::string FileEventsStream_Gtest::dummy_serial_ = "dummy_serial"; +const std::string FileEventsStream_Gtest::dummy_events_type_ = "events_type"; +const std::string FileEventsStream_Gtest::dummy_custom_key_ = "custom"; +const std::string FileEventsStream_Gtest::dummy_custom_value_ = "field"; + +TEST_F(FileEventsStream_Gtest, file_does_not_exists) { + //////////////////////////////////////////////////////////////////////////////// + // PURPOSE + // Check that you can't read a file that doesn't exist + + ASSERT_THROW(open_and_start_file_events_stream(), HalException); +} + +TEST_F(FileEventsStream_Gtest, header_expected) { + //////////////////////////////////////////////////////////////////////////////// + // PURPOSE + // Checks that the read header contains the same information as the written one + + open_raw(); + auto written_header = write_random_header(); + write_ref_data(); + close_raw(); + + ASSERT_TRUE(open_and_start_file_events_stream()); + auto a = written_header.get_header_map(); + auto b = file_id_->get_header().get_header_map(); + ASSERT_EQ(a, b); +} + +TEST_F(FileEventsStream_Gtest, reading_all_data) { + //////////////////////////////////////////////////////////////////////////////// + // PURPOSE + // Check that file events streams reads all data + + open_raw(); + write_random_header(); + auto data_ref = write_ref_data(); + close_raw(); + + // Loads the file + ASSERT_TRUE(open_and_start_file_events_stream()); + + std::vector data_read; + long n_bytes_polled; + + while (file_events_stream_->wait_next_buffer() > 0) { + auto data = reinterpret_cast(file_events_stream_->get_latest_raw_data(n_bytes_polled)); + ASSERT_TRUE(n_bytes_polled == (n_events_to_read_default_ * decoder_->get_raw_event_size_bytes()) || + n_bytes_polled == (n_events_read_in_last_buffer_ * decoder_->get_raw_event_size_bytes())); + data_read.insert(data_read.end(), data, data + n_bytes_polled / decoder_->get_raw_event_size_bytes()); + } + + ASSERT_EQ(data_ref, data_read); + + // End of file + ASSERT_EQ(file_events_stream_->wait_next_buffer(), -1); +} + +TEST_F(FileEventsStream_Gtest, do_not_read_if_not_started) { + //////////////////////////////////////////////////////////////////////////////// + // PURPOSE + // Verify that we can not read until start is called + + open_raw(); + write_random_header(); + write_ref_data(); + close_raw(); + + ASSERT_TRUE(open_file_events_stream()); + + // fails to read + ASSERT_EQ(-1, file_events_stream_->wait_next_buffer()); + + // Enable the streaming + file_events_stream_->start(); + + // read data successfully + ASSERT_EQ(1, file_events_stream_->wait_next_buffer()); +} + +TEST_F(FileEventsStream_Gtest, file_events_stream_read_param) { + //////////////////////////////////////////////////////////////////////////////// + // PURPOSE + // If read params + + open_raw(); + write_random_header(); + auto data_ref = write_ref_data(); + close_raw(); + + config_.n_read_buffers_ = 0; + ASSERT_THROW(open_and_start_file_events_stream(), HalException); + + config_.n_read_buffers_ = 1; + ASSERT_THROW(open_and_start_file_events_stream(), HalException); + + config_.n_events_to_read_ = 0; + ASSERT_THROW(open_and_start_file_events_stream(), HalException); +} + +TEST_F(FileEventsStream_Gtest, rawfile_logging_input_output_same_name_fails) { + //////////////////////////////////////////////////////////////////////////////// + // PURPOSE + // You can't log to the same file you are reading + + open_raw(); + write_random_header(); + write_ref_data(); + close_raw(); + + // Open should return nullptr + ASSERT_TRUE(open_file_events_stream()); + ASSERT_FALSE(file_events_stream_->log_raw_data(rawfile_to_log_path_)); +} + +TEST_F(FileEventsStream_Gtest, rawfile_logging_header_is_same_from_input_to_output) { + //////////////////////////////////////////////////////////////////////////////// + // PURPOSE + // Expects that the header file of the source RAW file is the same as the header in the output file + + open_raw(); + auto written_header = write_random_header(); + write_ref_data(); + close_raw(); + + ASSERT_TRUE(open_file_events_stream()); + ASSERT_TRUE(file_events_stream_->log_raw_data(rawfile_to_log_from_rawfile_path_)); + file_events_stream_->start(); + + long n_bytes_polled; + while (file_events_stream_->wait_next_buffer() > 0) { + file_events_stream_->get_latest_raw_data(n_bytes_polled); + } + + reset_device(); + ASSERT_TRUE(open_and_start_file_events_stream(rawfile_to_log_from_rawfile_path_)); + + written_header.remove_date(); + auto header = file_id_->get_header(); + header.remove_date(); + ASSERT_EQ(written_header.get_header_map(), header.get_header_map()); +} + +TEST_F(FileEventsStream_Gtest, rawfile_logging_data_logged_is_data_read) { + //////////////////////////////////////////////////////////////////////////////// + // PURPOSE + // Expect that what is logged from the rawfile is what is read + + open_raw(); + write_random_header(); + auto data_ref = write_ref_data(); + close_raw(); + + ASSERT_TRUE(open_file_events_stream()); + long n_bytes_polled; + + ASSERT_TRUE(file_events_stream_->log_raw_data(rawfile_to_log_from_rawfile_path_)); + file_events_stream_->start(); + while (file_events_stream_->wait_next_buffer() > 0) { + file_events_stream_->get_latest_raw_data(n_bytes_polled); + } + reset_device(); + + // Read logged file + ASSERT_TRUE(open_and_start_file_events_stream(rawfile_to_log_from_rawfile_path_)); + + std::vector data_read; + while (file_events_stream_->wait_next_buffer() > 0) { + auto data = reinterpret_cast(file_events_stream_->get_latest_raw_data(n_bytes_polled)); + ASSERT_TRUE(n_bytes_polled == n_events_to_read_default_ * decoder_->get_raw_event_size_bytes() || + n_bytes_polled == n_events_read_in_last_buffer_ * decoder_->get_raw_event_size_bytes()); + data_read.insert(data_read.end(), data, data + n_bytes_polled / decoder_->get_raw_event_size_bytes()); + } + + ASSERT_EQ(data_ref, data_read); + + // End of file + ASSERT_EQ(-1, file_events_stream_->wait_next_buffer()); +} + +TEST_F(FileEventsStream_Gtest, reading_from_custom_istream) { + //////////////////////////////////////////////////////////////////////////////// + // PURPOSE + // Check that file events streams reads all data + + open_raw(); + auto header = write_random_header(); + auto data_ref = write_ref_data(); + close_raw(); + + auto ss = new std::stringstream(std::ios::in | std::ios::out | std::ios::binary); + std::unique_ptr stream(ss); + + *ss << header; + ss->write(reinterpret_cast(data_ref.data()), data_ref.size() * sizeof(RawEventType)); + + device_ = DeviceDiscovery::open_stream(std::move(stream), config_); + ASSERT_NE(nullptr, device_.get()); + + file_events_stream_ = device_->get_facility(); + file_id_ = device_->get_facility(); + decoder_ = device_->get_facility(); + ASSERT_NE(nullptr, file_events_stream_); + ASSERT_NE(nullptr, file_id_); + + file_events_stream_->start(); + + std::vector data_read; + long n_bytes_polled; + while (file_events_stream_->wait_next_buffer() > 0) { + auto data = reinterpret_cast(file_events_stream_->get_latest_raw_data(n_bytes_polled)); + ASSERT_TRUE(n_bytes_polled == n_events_to_read_default_ * decoder_->get_raw_event_size_bytes() || + n_bytes_polled == n_events_read_in_last_buffer_ * decoder_->get_raw_event_size_bytes()); + data_read.insert(data_read.end(), data, data + n_bytes_polled / decoder_->get_raw_event_size_bytes()); + } + + ASSERT_EQ(data_ref, data_read); + + // End of file + ASSERT_EQ(file_events_stream_->wait_next_buffer(), -1); +} diff --git a/hal_psee_plugins/test/future/i_events_stream_gtest.cpp b/hal_psee_plugins/test/future/i_events_stream_gtest.cpp new file mode 100644 index 000000000..ab69c96f8 --- /dev/null +++ b/hal_psee_plugins/test/future/i_events_stream_gtest.cpp @@ -0,0 +1,530 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include +#include + +#include "metavision/utils/gtest/gtest_custom.h" +#include "metavision/hal/facilities/future/i_events_stream.h" +#include "metavision/hal/facilities/future/i_decoder.h" +#include "metavision/hal/facilities/i_event_decoder.h" +#include "metavision/hal/facilities/i_hal_software_info.h" +#include "metavision/hal/facilities/i_plugin_software_info.h" +#include "metavision/hal/device/device.h" +#include "metavision/hal/utils/hal_log.h" +#include "metavision/hal/device/device_discovery.h" +#include "metavision/sdk/base/utils/generic_header.h" + +using namespace Metavision; + +class I_EventsStream_Gtest : public ::testing::Test { +protected: + virtual void SetUp() override { + datasets_.push_back( + (boost::filesystem::path(GtestsParameters::instance().dataset_dir) / "openeb" / "gen31_timer.raw") + .string()); + datasets_.push_back( + (boost::filesystem::path(GtestsParameters::instance().dataset_dir) / "openeb" / "gen4_evt2_hand.raw") + .string()); + datasets_.push_back( + (boost::filesystem::path(GtestsParameters::instance().dataset_dir) / "openeb" / "gen4_evt3_hand.raw") + .string()); + } + + virtual void TearDown() override {} + + bool open_dataset(const std::string &dataset_name, Future::RawFileConfig config = Future::RawFileConfig()) { + device_ = DeviceDiscovery::open_raw_file(dataset_name, config); + return nullptr != device_.get(); + } + +protected: + std::unique_ptr device_; + std::vector datasets_; +}; + +TEST_F_WITH_DATASET(I_EventsStream_Gtest, valid_index_file) { + //////////////////////////////////////////////////////////////////////////////// + // PURPOSE + // Check that when reading a file, a valid index is generated + + std::array sizes = {"121064697", "71825543", "96786995"}; + std::array ts_shifts = {"7451072", "66619456", "14663680"}; + char magic_number_array[] = {'\x54', '\xe2', '\x61', '\xbd', '\x57', '\x4c', '\x0d', '\x30', '\x47', '\x34', + '\x5d', '\xdc', '\x04', '\x49', '\x2a', '\x5a', '\xde', '\x09', '\xd3', '\x61'}; + std::array magic_number; + std::copy(magic_number_array, magic_number_array + sizeof(magic_number_array), magic_number.data()); + + for (size_t i = 0; i < datasets_.size(); ++i) { + const auto &dataset = datasets_[i]; + // Remove the index file if any + std::string path; + boost::filesystem::remove(dataset + ".tmp_index"); + ASSERT_FALSE(boost::filesystem::exists(dataset + ".tmp_index")); + + // Open the file and generate the index + ASSERT_TRUE(open_dataset(dataset)); + + constexpr uint32_t max_trials = 1000; + uint32_t trials = 1; + // Ensure the index have been built + auto fes = device_->get_facility(); + ASSERT_NE(nullptr, fes); + timestamp a, b; + auto s = fes->get_seek_range(a, b); + for (trials = 1; s != Metavision::Future::I_EventsStream::IndexStatus::Good && trials < max_trials; ++trials) { + std::this_thread::sleep_for(std::chrono::milliseconds(100)); + s = fes->get_seek_range(a, b); + } + ASSERT_LT(trials, max_trials); + + // Check the index content + std::ifstream index_file(dataset + ".tmp_index", std::ios::binary); + ASSERT_TRUE(index_file); + GenericHeader index_header(index_file); +#if defined _WIN32 + EXPECT_EQ("Windows", index_header.get_field("platform")); +#elif defined __APPLE__ + EXPECT_EQ("Darwin", index_header.get_field("platform")); +#else + EXPECT_EQ("Linux", index_header.get_field("platform")); +#endif + EXPECT_EQ(device_->get_facility()->get_software_info().get_version(), + index_header.get_field("hal_version")); + EXPECT_EQ(device_->get_facility()->get_software_info().get_version(), + index_header.get_field("hal_plugin_version")); + EXPECT_EQ(sizes[i], index_header.get_field("size")); + EXPECT_EQ("2000", index_header.get_field("bookmark_period_us")); + EXPECT_EQ("2.0", index_header.get_field("index_version")); + EXPECT_EQ(ts_shifts[i], index_header.get_field("ts_shift_us")); + + index_file.clear(); + index_file.seekg(-magic_number.size(), std::ios::end); + std::array buf; + ASSERT_TRUE(index_file.read(buf.data(), magic_number.size())); + for (size_t i = 0; i < magic_number.size(); ++i) { + EXPECT_EQ(magic_number[i], buf[i]); + } + } +} + +TEST_F_WITH_DATASET(I_EventsStream_Gtest, invalid_index_file) { + //////////////////////////////////////////////////////////////////////////////// + // PURPOSE + // Check that an invalid index file is replaced by a valid one when reading a file + + char magic_number_array[] = {'\x54', '\xe2', '\x61', '\xbd', '\x57', '\x4c', '\x0d', '\x30', '\x47', '\x34', + '\x5d', '\xdc', '\x04', '\x49', '\x2a', '\x5a', '\xde', '\x09', '\xd3', '\x61'}; + std::array magic_number; + std::copy(magic_number_array, magic_number_array + sizeof(magic_number_array), magic_number.data()); + + for (size_t i = 0; i < datasets_.size(); ++i) { + const auto &dataset = datasets_[i]; + std::cout << "\n========================================" << std::endl; + std::cout << "Path = " << dataset << std::endl; + + // Remove the index file if any + std::string path; + boost::filesystem::remove(dataset + ".tmp_index"); + ASSERT_FALSE(boost::filesystem::exists(dataset + ".tmp_index")); + + // Open the file and generate the index + ASSERT_TRUE(open_dataset(dataset)); + + constexpr uint32_t max_trials = 1000; + uint32_t trials = 1; + // Ensure the index have been built + auto fes = device_->get_facility(); + ASSERT_NE(nullptr, fes); + timestamp a, b; + auto s = fes->get_seek_range(a, b); + for (trials = 1; s != Metavision::Future::I_EventsStream::IndexStatus::Good && trials < max_trials; ++trials) { + std::this_thread::sleep_for(std::chrono::milliseconds(100)); + s = fes->get_seek_range(a, b); + } + ASSERT_LT(trials, max_trials); + + // Get ref index content + std::ifstream ref_index_file(dataset + ".tmp_index", std::ios::binary); + GenericHeader ref_index_header(ref_index_file); + ref_index_header.remove_date(); // this will differ for each comparison + std::vector ref_index_content((std::istreambuf_iterator(ref_index_file)), + (std::istreambuf_iterator())); + + // Mess up the index file and check that it is automatically recreated with correct content when opening the + // file again + const std::unordered_map keys = { + {"platform", "blorb"}, {"hal_version", "X.Y.Z"}, {"hal_plugin_version", "X.Y.Z"}, {"size", "42"}, + {"bookmark_period_us", "3.14"}, {"index_version", "X.Y.Z"}, {"ts_shift_us", "gna"}, + }; + for (const auto &p : keys) { + std::cout << "Messing up key " << p.first << std::endl; + // Mess up the index + GenericHeader out_index_header(ref_index_header.get_header_map()); + out_index_header.set_field(p.first, p.second); + + // Write index file + std::ofstream out_index_file(dataset + ".tmp_index", std::ios::binary); + out_index_file << out_index_header; + out_index_file.write(ref_index_content.data(), ref_index_content.size()); + out_index_file.close(); + + // Open the file and get the index + ASSERT_TRUE(open_dataset(dataset)); + + constexpr uint32_t max_trials = 1000; + uint32_t trials = 1; + // Ensure the index have been built + auto fes = device_->get_facility(); + ASSERT_NE(nullptr, fes); + timestamp a, b; + auto s = fes->get_seek_range(a, b); + for (trials = 1; s != Metavision::Future::I_EventsStream::IndexStatus::Good && trials < max_trials; + ++trials) { + std::this_thread::sleep_for(std::chrono::milliseconds(100)); + s = fes->get_seek_range(a, b); + } + ASSERT_LT(trials, max_trials); + + // Check that the index file has indeed the ref content, not the messed up one + std::ifstream in_index_file(dataset + ".tmp_index", std::ios::binary); + ASSERT_TRUE(in_index_file); + GenericHeader in_index_header(in_index_file); + in_index_header.remove_date(); // this will differ for each comparison + std::vector in_index_content((std::istreambuf_iterator(in_index_file)), + (std::istreambuf_iterator())); + + EXPECT_NE(ref_index_header.to_string(), out_index_header.to_string()); + EXPECT_EQ(ref_index_header.to_string(), in_index_header.to_string()); + EXPECT_EQ(ref_index_content.size(), in_index_content.size()); + for (size_t i = 0; i < ref_index_content.size(); ++i) { + EXPECT_EQ(ref_index_content[i], in_index_content[i]); + } + } + + { + std::cout << "Messing up magic number" << std::endl; + // Write index file + std::ofstream out_index_file(dataset + ".tmp_index", std::ios::binary); + out_index_file << ref_index_header; + std::vector out_index_content = ref_index_content; + std::fill(out_index_content.begin() + out_index_content.size() - magic_number.size(), + out_index_content.begin() + out_index_content.size(), static_cast(42)); + out_index_file.write(out_index_content.data(), out_index_content.size()); + out_index_file.close(); + + // Open the file and get the index + ASSERT_TRUE(open_dataset(dataset)); + + constexpr uint32_t max_trials = 1000; + uint32_t trials = 1; + // Ensure the index have been built + auto fes = device_->get_facility(); + ASSERT_NE(nullptr, fes); + timestamp a, b; + auto s = fes->get_seek_range(a, b); + for (trials = 1; s != Metavision::Future::I_EventsStream::IndexStatus::Good && trials < max_trials; + ++trials) { + std::this_thread::sleep_for(std::chrono::milliseconds(100)); + s = fes->get_seek_range(a, b); + } + ASSERT_LT(trials, max_trials); + + // Check that the index file has indeed the ref content, not the messed up one + std::ifstream in_index_file(dataset + ".tmp_index", std::ios::binary); + ASSERT_TRUE(in_index_file); + GenericHeader in_index_header(in_index_file); + in_index_header.remove_date(); // this will differ for each comparison + std::vector in_index_content((std::istreambuf_iterator(in_index_file)), + (std::istreambuf_iterator())); + + EXPECT_EQ(ref_index_header.to_string(), in_index_header.to_string()); + EXPECT_EQ(ref_index_content.size(), in_index_content.size()); + for (size_t i = 0; i < ref_index_content.size(); ++i) { + EXPECT_EQ(ref_index_content[i], in_index_content[i]); + } + } + } +} + +TEST_F_WITH_DATASET(I_EventsStream_Gtest, seek_range) { + //////////////////////////////////////////////////////////////////////////////// + // PURPOSE + // Check range decoding of the file control + + std::vector delete_index{{true, false}}; + std::vector time_shift{{true, false}}; + + for (const auto &do_delete : delete_index) { + MV_HAL_LOG_INFO() << (do_delete ? "Index building from scratch" : "Index loaded from file"); + for (const auto &dataset : datasets_) { + if (do_delete) { + std::string path; + boost::filesystem::remove(dataset + ".tmp_index"); + ASSERT_FALSE(boost::filesystem::exists(dataset + ".tmp_index")); + } + + MV_HAL_LOG_INFO() << "\tTesting dataset" << dataset; + for (const auto &do_time_shifting : time_shift) { + // Builds the device from the dataset + MV_HAL_LOG_INFO() << "\t\tTime shift:" << (do_time_shifting ? "enabled" : "disabled"); + Future::RawFileConfig config; + config.do_time_shifting_ = do_time_shifting; + ASSERT_TRUE(open_dataset(dataset, config)); + + // Ensures the index have been built and one can retrieve the timestamp range + auto fes = device_->get_facility(); + ASSERT_NE(nullptr, fes); + + timestamp first_indexed_event_ts_us, last_indexed_event_ts_us; + auto index_status = fes->get_seek_range(first_indexed_event_ts_us, last_indexed_event_ts_us); + constexpr uint32_t max_trials = 1000; + uint32_t trials = 1; + while (index_status != Metavision::Future::I_EventsStream::IndexStatus::Good && trials != max_trials) { + std::this_thread::sleep_for(std::chrono::milliseconds(100)); + ++trials; + index_status = fes->get_seek_range(first_indexed_event_ts_us, last_indexed_event_ts_us); + } + + ASSERT_LT(trials, max_trials); + + EXPECT_GT(last_indexed_event_ts_us, first_indexed_event_ts_us); + + auto decoder = device_->get_facility(); + ASSERT_NE(nullptr, decoder); + EXPECT_EQ(do_time_shifting, decoder->is_time_shifting_enabled()); + + // Decode the full dataset + // -- First compute the first event timestamp using the decoder + fes->start(); + timestamp first_decoded_event_ts_us = decoder->get_last_timestamp(); + EXPECT_EQ(timestamp(-1), first_decoded_event_ts_us); + timestamp last_decoded_event_ts_us; + long bytes_polled_count; + while (fes->wait_next_buffer() > 0) { + auto data = fes->get_latest_raw_data(bytes_polled_count); + auto data_next = data + decoder->get_raw_event_size_bytes(); + auto data_end = data + bytes_polled_count; + + for (; first_decoded_event_ts_us == decoder->get_last_timestamp() && data != data_end; + data = data_next, data_next += decoder->get_raw_event_size_bytes()) { + decoder->decode(data, data_next); + } + + if (data != data_end) { + first_decoded_event_ts_us = decoder->get_last_timestamp(); + decoder->decode(data, data_end); + break; + } + } + // -- Then decode the full dataset until the end + while (fes->wait_next_buffer() > 0) { + auto data = fes->get_latest_raw_data(bytes_polled_count); + decoder->decode(data, data + bytes_polled_count); + } + last_decoded_event_ts_us = decoder->get_last_timestamp(); + + // Checks the value correspondence with what has been decoded + EXPECT_EQ(first_decoded_event_ts_us, first_indexed_event_ts_us); + EXPECT_GE(last_decoded_event_ts_us, last_indexed_event_ts_us); // Last bookmark is not the last event. + + // If time shift, check the coherence of the first timestamps compare to the timeshift + timestamp ts_shift_us; + if (do_time_shifting) { + EXPECT_TRUE(decoder->get_timestamp_shift(ts_shift_us)); + EXPECT_LE(ts_shift_us, + first_indexed_event_ts_us + + ts_shift_us); // First_ts is the timestamp of the first non timer high event + } + } + } + } +} + +TEST_F_WITH_DATASET(I_EventsStream_Gtest, file_index_seek) { + //////////////////////////////////////////////////////////////////////////////// + // PURPOSE + // Check seeking feature of the file control + + Future::RawFileConfig config; + config.n_events_to_read_ = 10000; + + std::vector delete_index{{true, false}}; + std::vector time_shift{{true, false}}; + + for (const auto &do_delete : delete_index) { + MV_HAL_LOG_INFO() << (do_delete ? "Index building from scratch" : "Index loaded from file"); + for (const auto &dataset : datasets_) { + if (do_delete) { + std::string path; + boost::filesystem::remove(dataset + ".tmp_index"); + ASSERT_FALSE(boost::filesystem::exists(dataset + ".tmp_index")); + } + + MV_HAL_LOG_INFO() << "\tTesting dataset" << dataset; + for (const auto &do_time_shifting : time_shift) { + // Builds the device from the dataset + MV_HAL_LOG_INFO() << "\t\tTime shift:" << (do_time_shifting ? "enabled" : "disabled"); + config.do_time_shifting_ = do_time_shifting; + ASSERT_TRUE(open_dataset(dataset, config)); + + // Ensures the index have been built and one can retrieve the timestamp range + auto fes = device_->get_facility(); + ASSERT_NE(nullptr, fes); + + timestamp first_indexed_event_ts_us, last_indexed_event_ts_us; + auto index_status = fes->get_seek_range(first_indexed_event_ts_us, last_indexed_event_ts_us); + constexpr uint32_t max_trials = 1000; + uint32_t trials = 1; + while (index_status != Metavision::Future::I_EventsStream::IndexStatus::Good && trials != max_trials) { + std::this_thread::sleep_for(std::chrono::milliseconds(100)); + ++trials; + index_status = fes->get_seek_range(first_indexed_event_ts_us, last_indexed_event_ts_us); + } + + ASSERT_LT(trials, max_trials); + ASSERT_GT(last_indexed_event_ts_us, first_indexed_event_ts_us); + + auto decoder = device_->get_facility(); + auto cd_decoder = device_->get_facility>(); + ASSERT_NE(nullptr, decoder); + ASSERT_NE(nullptr, cd_decoder); + ASSERT_EQ(do_time_shifting, decoder->is_time_shifting_enabled()); + + // Start polling data + fes->start(); + + // GTest necessity only: + // Initialize the decoder (i.e. wait to reach the first decodable event) + // This is needed so that the seeking capability is validated + bool valid_event = false; + long bytes_polled_count; + cd_decoder->add_event_buffer_callback([&](auto, auto) { valid_event = true; }); + uint8_t *data; + while (!valid_event) { + // Read data from the file + ASSERT_TRUE(fes->wait_next_buffer() > 0); + data = fes->get_latest_raw_data(bytes_polled_count); + decoder->decode(data, data + bytes_polled_count); + } + + // ------------------------------ + // Check seeking at the beginning + MV_HAL_LOG_INFO() << "\t\t\tSeek first event"; + timestamp reached_ts; + ASSERT_EQ(Future::I_EventsStream::SeekStatus::Success, + fes->seek(first_indexed_event_ts_us, reached_ts)); + ASSERT_EQ(first_indexed_event_ts_us, reached_ts); + decoder->reset_timestamp(reached_ts); + ASSERT_EQ(decoder->get_last_timestamp(), reached_ts); + + ASSERT_TRUE(fes->wait_next_buffer() > 0); + // Decode a single event and check that the timestamp is correct + data = fes->get_latest_raw_data(bytes_polled_count); + + // The first event decoded must have a timestamp that is equal to the first event's timestamp + decoder->decode(data, data + decoder->get_raw_event_size_bytes()); + ASSERT_EQ(decoder->get_last_timestamp(), first_indexed_event_ts_us); + + // ------------------------------ + // Check seeking in the range of possible timestamps + MV_HAL_LOG_INFO() << "\t\t\tSeek in range of available timestamp"; + + std::vector targets; + const timestamp timestamp_step = (last_indexed_event_ts_us - first_indexed_event_ts_us) / 10; + for (uint32_t step = 1; step <= 10; ++step) { + targets.push_back(first_indexed_event_ts_us + step * timestamp_step); + } + + // Seeks back and forth in the file + using SizeType = std::vector::size_type; + for (SizeType i = 0; i < targets.size(); ++i) { + auto target_ts_us = i % 2 ? targets[targets.size() - i] : targets[i]; + ASSERT_EQ(Future::I_EventsStream::SeekStatus::Success, fes->seek(target_ts_us, reached_ts)); + decoder->reset_timestamp(reached_ts); + ASSERT_LE(reached_ts, target_ts_us); + + // Read data from the file + ASSERT_TRUE(fes->wait_next_buffer() > 0); + data = fes->get_latest_raw_data(bytes_polled_count); + + // The first event decoded must have a timestamp that is equal to the reached timestamp + decoder->decode(data, data + decoder->get_raw_event_size_bytes()); + ASSERT_EQ(decoder->get_last_timestamp(), reached_ts); + } + + // ------------------------------ + // Check seeking at the end of the file + MV_HAL_LOG_INFO() << "\t\t\tSeek last event"; + ASSERT_EQ(Future::I_EventsStream::SeekStatus::Success, fes->seek(last_indexed_event_ts_us, reached_ts)); + ASSERT_LE(reached_ts, last_indexed_event_ts_us); + decoder->reset_timestamp(reached_ts); + + // Read data from the file + ASSERT_TRUE(fes->wait_next_buffer() > 0); + data = fes->get_latest_raw_data(bytes_polled_count); + + // The first event decoded must have a timestamp that is equal to the reached timestamp + decoder->decode(data, data + decoder->get_raw_event_size_bytes()); + ASSERT_EQ(decoder->get_last_timestamp(), reached_ts); + } + } + } +} + +TEST_F_WITH_DATASET(I_EventsStream_Gtest, decode_evt3_nevents_monotonous_timestamps) { + // GIVEN a RAW file in EVT3 format with a known content + std::string dataset_file_path = + (boost::filesystem::path(GtestsParameters::instance().dataset_dir) / "openeb" / "gen4_evt3_hand.raw").string(); + + // AND a device configured to read by batches of n events + RawFileConfig cfg; + cfg.n_events_to_read_ = 10000; + std::unique_ptr device(DeviceDiscovery::open_raw_file(dataset_file_path, cfg)); + + if (!device) { + std::cerr << "Failed to open raw file." << std::endl; + FAIL(); + } + + // AND a PSEE decoder of CD & triggers events + auto decoder = device->get_facility(); + auto es = device->get_facility(); + + ASSERT_NE(nullptr, decoder); + ASSERT_NE(nullptr, es); + + es->start(); + + // WHEN we stream and decode data byte by byte + Metavision::timestamp previous_ts_last = 0; + long int bytes_polled_count; + while (es->wait_next_buffer() >= 0) { + auto raw_buffer = es->get_latest_raw_data(bytes_polled_count); + auto raw_buffer_end = raw_buffer + bytes_polled_count; + auto raw_data_to_decode_count = 1; + auto raw_buffer_decode_to = raw_buffer + raw_data_to_decode_count; + + for (; raw_buffer < raw_buffer_end;) { + decoder->decode(raw_buffer, raw_buffer_decode_to); + + // THEN the timestamps increase monotonously + Metavision::timestamp current_ts_last = decoder->get_last_timestamp(); + if (current_ts_last > 0) { + ASSERT_GE(current_ts_last, previous_ts_last); + previous_ts_last = current_ts_last; + } + + raw_buffer = raw_buffer_decode_to; + raw_buffer_decode_to = std::min(raw_buffer + raw_data_to_decode_count, raw_buffer_end); + } + } +} diff --git a/hal_psee_plugins/test/gen31_event_rate_noise_filter_module_gtest.cpp b/hal_psee_plugins/test/gen31_event_rate_noise_filter_module_gtest.cpp new file mode 100644 index 000000000..0136d903e --- /dev/null +++ b/hal_psee_plugins/test/gen31_event_rate_noise_filter_module_gtest.cpp @@ -0,0 +1,98 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include +#include +#include +#include + +#include "metavision/utils/gtest/gtest_custom.h" +#include "metavision/hal/device/device_discovery.h" +#include "metavision/hal/device/device.h" +#include "metavision/hal/utils/hal_exception.h" +#include "metavision/hal/facilities/i_hw_identification.h" +#include "metavision/hal/facilities/i_event_rate_noise_filter_module.h" +#include "metavision/hal/facilities/i_device_control.h" +#include "metavision/hal/facilities/i_events_stream.h" +#include "decoders/base/event_base.h" +#include "decoders/evt2/evt2_event_types.h" +#include "devices/gen31/gen31_event_rate_noise_filter_module.h" + +using namespace Metavision; + +class Gen31EventRateNoiseFilterModule_GTest : public ::testing::Test { +public: + void TearDown() override { + device_.reset(nullptr); + ev_rate_ = nullptr; + } + + void open() { + try { + device_ = DeviceDiscovery::open(""); + } catch (const HalException &e) { + std::cerr << "Plug a camera to run this test." << std::endl; + FAIL(); + return; + } + + ASSERT_NE(nullptr, device_.get()); + + ev_rate_ = device_->get_facility(); + ASSERT_NE(nullptr, ev_rate_); + } + +protected: + std::unique_ptr device_; + I_EventRateNoiseFilterModule *ev_rate_{nullptr}; + + static constexpr uint32_t min_event_rate_threshold_kev_s_ = + Gen31_EventRateNoiseFilterModule::min_event_rate_threshold_kev_s; + static constexpr uint32_t max_event_rate_threshold_kev_s_ = + Gen31_EventRateNoiseFilterModule::max_event_rate_threshold_kev_s; + static constexpr uint32_t in_range_event_rate_threshold_kev_s_ = + (max_event_rate_threshold_kev_s_ - min_event_rate_threshold_kev_s_) / 2; +}; + +constexpr uint32_t Gen31EventRateNoiseFilterModule_GTest::min_event_rate_threshold_kev_s_; +constexpr uint32_t Gen31EventRateNoiseFilterModule_GTest::max_event_rate_threshold_kev_s_; +constexpr uint32_t Gen31EventRateNoiseFilterModule_GTest::in_range_event_rate_threshold_kev_s_; + +TEST_F_WITH_CAMERA(Gen31EventRateNoiseFilterModule_GTest, i_event_rate_gen31_event_rate_threshold, + camera_params(camera_param().integrator("Prophesee").generation("3.1"))) { + open(); + + constexpr uint32_t lower_out_of_range_time_window = 0; + constexpr uint32_t greater_out_of_range_time_window = max_event_rate_threshold_kev_s_ + 1; + + // Compute expected error as we converting kev/s in ev/us and the latter one is rounded + uint32_t expected_max_error_kev_s = std::abs(in_range_event_rate_threshold_kev_s_ - + 1000 * std::round(in_range_event_rate_threshold_kev_s_ / 1000.)); + + // GIVEN Valid values for the event rate threshold + // WHEN setting each of them + // THEN The value set in the sensor is the correct one + ASSERT_TRUE(ev_rate_->set_event_rate_threshold(min_event_rate_threshold_kev_s_)); + ASSERT_NEAR(min_event_rate_threshold_kev_s_, ev_rate_->get_event_rate_threshold(), expected_max_error_kev_s); + ASSERT_TRUE(ev_rate_->set_event_rate_threshold(max_event_rate_threshold_kev_s_)); + ASSERT_NEAR(max_event_rate_threshold_kev_s_, ev_rate_->get_event_rate_threshold(), expected_max_error_kev_s); + ASSERT_TRUE(ev_rate_->set_event_rate_threshold(in_range_event_rate_threshold_kev_s_)); + ASSERT_NEAR(in_range_event_rate_threshold_kev_s_, ev_rate_->get_event_rate_threshold(), expected_max_error_kev_s); + + // GIVEN Invalid values for the event rate threshold + // WHEN setting each of them + // THEN The value set in the sensor is not changed (equal to the last set) + const auto currently_time_window = ev_rate_->get_event_rate_threshold(); + ASSERT_FALSE(ev_rate_->set_event_rate_threshold(lower_out_of_range_time_window)); + ASSERT_EQ(currently_time_window, ev_rate_->get_event_rate_threshold()); + ASSERT_FALSE(ev_rate_->set_event_rate_threshold(greater_out_of_range_time_window)); + ASSERT_EQ(currently_time_window, ev_rate_->get_event_rate_threshold()); +} diff --git a/hal_psee_plugins/test/gtest_utils/device_builder_maker.h b/hal_psee_plugins/test/gtest_utils/device_builder_maker.h new file mode 100644 index 000000000..832cc6fb3 --- /dev/null +++ b/hal_psee_plugins/test/gtest_utils/device_builder_maker.h @@ -0,0 +1,29 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_DEVICE_BUILDER_MAKER_H +#define METAVISION_HAL_DEVICE_BUILDER_MAKER_H + +#include "metavision/hal/utils/device_builder.h" +#include "metavision/hal/utils/hal_software_info.h" +#include "metavision/hal/facilities/i_hal_software_info.h" +#include "metavision/hal/facilities/i_plugin_software_info.h" + +namespace Metavision { + +inline DeviceBuilder make_device_builder(const std::string &plugin_name = std::string()) { + return DeviceBuilder(std::make_unique(Metavision::get_hal_software_info()), + std::make_unique(plugin_name, Metavision::get_hal_software_info())); +} + +} // namespace Metavision + +#endif // METAVISION_HAL_DEVICE_BUILDER_MAKER_H diff --git a/hal_psee_plugins/test/gtest_utils/encoding_policies.h b/hal_psee_plugins/test/gtest_utils/encoding_policies.h new file mode 100644 index 000000000..be84e6e80 --- /dev/null +++ b/hal_psee_plugins/test/gtest_utils/encoding_policies.h @@ -0,0 +1,34 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_ENCODING_POLICIES_H +#define METAVISION_HAL_ENCODING_POLICIES_H + +#include "event_raw_format_traits.h" + +namespace Metavision { + +////////////////////////////////////////// +template +class TimerHighRedundancyPolicyT { +public: + static constexpr unsigned int REDUNDANCY_FACTOR = FACTOR; +}; + +template +constexpr unsigned int TimerHighRedundancyPolicyT::REDUNDANCY_FACTOR; + +using TimerHighRedundancyNone = TimerHighRedundancyPolicyT<1>; +using TimerHighRedundancyEvt2Default = TimerHighRedundancyPolicyT<4>; // Default for Evt2 + +} // namespace Metavision + +#endif // METAVISION_HAL_ENCODING_POLICIES_H diff --git a/hal_psee_plugins/test/gtest_utils/event_encoder.h b/hal_psee_plugins/test/gtest_utils/event_encoder.h new file mode 100644 index 000000000..474179612 --- /dev/null +++ b/hal_psee_plugins/test/gtest_utils/event_encoder.h @@ -0,0 +1,71 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_EVENT_ENCODER_H +#define METAVISION_HAL_EVENT_ENCODER_H + +#include +#include +#include + +#include "metavision/sdk/base/utils/timestamp.h" +#include "event_raw_format_traits.h" + +namespace Metavision { + +template +struct EventEncoder { + template + static void encode_event( + typename event_raw_format_traits::template EncodedEvent::Type *ev_encoded, + const DecodedEventtype *ev_decoded); +}; + +template +struct BatchEventEncoder { + using DecodedEventType = decltype(typename std::iterator_traits::value_type()); + + void register_buffer(EventIteratorType begin, EventIteratorType end) { + next_to_encode_ = begin; + last_ = end; + } + + inline Metavision::timestamp get_next_timestamp_to_encode() { + return (next_to_encode_ == last_) ? std::numeric_limits::max() : next_to_encode_->t; + } + + template + static constexpr size_t get_size_encoded() { + return event_raw_format_traits::template EncodedEvent::number_of_bytes(); + } + + template + inline void encode_next_event(uint8_t *encoded_ev) { + auto ev_td = reinterpret_cast< + typename event_raw_format_traits::template EncodedEvent::Type *>(encoded_ev); + EventEncoder::template encode_event(ev_td, &*next_to_encode_); + ++next_to_encode_; + } + + inline bool is_done() const { + return next_to_encode_ == last_; + } + +private: + EventIteratorType next_to_encode_; + EventIteratorType last_; +}; + +} // namespace Metavision + +#include "event_encoder_impl.h" + +#endif // METAVISION_HAL_EVENT_ENCODER_H diff --git a/hal_psee_plugins/test/gtest_utils/event_encoder_impl.h b/hal_psee_plugins/test/gtest_utils/event_encoder_impl.h new file mode 100644 index 000000000..e32ce092e --- /dev/null +++ b/hal_psee_plugins/test/gtest_utils/event_encoder_impl.h @@ -0,0 +1,47 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_EVENT_ENCODER_IMPL_H +#define METAVISION_HAL_EVENT_ENCODER_IMPL_H + +#include "metavision/sdk/base/events/event_cd.h" +#include "metavision/sdk/base/events/event_ext_trigger.h" +#include "decoders/base/base_event_types.h" + +namespace Metavision { + +template +template +void EventEncoder::encode_event( // Default is Event CD + typename event_raw_format_traits::template EncodedEvent::Type *ev_encoded, + const DecodedEventtype *ev_decoded) { + ev_encoded->x = ev_decoded->x; + ev_encoded->y = ev_decoded->y; + ev_encoded->timestamp = ev_decoded->t; + ev_encoded->type = + ev_decoded->p ? + static_cast(event_raw_format_traits::EnumType::LEFT_TD_HIGH) : + static_cast(event_raw_format_traits::EnumType::LEFT_TD_LOW); +} + +template<> +template +void EventEncoder::encode_event( + typename event_raw_format_traits::template EncodedEvent::Type *ev_encoded, + const Metavision::EventExtTrigger *ev_decoded) { + ev_encoded->timestamp = ev_decoded->t; + ev_encoded->id = ev_decoded->id; + ev_encoded->value = ev_decoded->p; + ev_encoded->type = static_cast(event_raw_format_traits::EnumType::EXT_TRIGGER); +} +} // namespace Metavision + +#endif // METAVISION_HAL_EVENT_ENCODER_IMPL_H diff --git a/hal_psee_plugins/test/gtest_utils/event_raw_format_traits.h b/hal_psee_plugins/test/gtest_utils/event_raw_format_traits.h new file mode 100644 index 000000000..7852e2173 --- /dev/null +++ b/hal_psee_plugins/test/gtest_utils/event_raw_format_traits.h @@ -0,0 +1,22 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_EVENT_RAW_FORMAT_TRAITS_H +#define METAVISION_HAL_EVENT_RAW_FORMAT_TRAITS_H + +namespace Metavision { + +template +struct event_raw_format_traits {}; + +} // namespace Metavision + +#endif // METAVISION_HAL_EVENT_RAW_FORMAT_TRAITS_H diff --git a/sdk/modules/base/cpp/include/metavision/sdk/base/events/event_temperature.h b/hal_psee_plugins/test/gtest_utils/event_raw_format_traits_details.h similarity index 55% rename from sdk/modules/base/cpp/include/metavision/sdk/base/events/event_temperature.h rename to hal_psee_plugins/test/gtest_utils/event_raw_format_traits_details.h index eca9349c6..a87836b27 100644 --- a/sdk/modules/base/cpp/include/metavision/sdk/base/events/event_temperature.h +++ b/hal_psee_plugins/test/gtest_utils/event_raw_format_traits_details.h @@ -9,37 +9,35 @@ * See the License for the specific language governing permissions and limitations under the License. * **********************************************************************************************************************/ -#ifndef METAVISION_SDK_BASE_EVENT_TEMPERATURE_H -#define METAVISION_SDK_BASE_EVENT_TEMPERATURE_H +#ifndef METAVISION_HAL_EVENT_RAW_FORMAT_TRAITS_DETAILS_H +#define METAVISION_HAL_EVENT_RAW_FORMAT_TRAITS_DETAILS_H -#include "metavision/sdk/base/utils/timestamp.h" +#include namespace Metavision { - -/// @brief Class representing a Temperature event -/// @note This class is deprecated since version 2.1.0 and will be removed in next releases -struct EventTemperature { - /// @brief Default constructor - EventTemperature() = default; - - /// @brief Constructor - /// @param t Timestamp of the event - /// @param s Source sensor of the event, see @ref source - /// @param v Value of the temperature - EventTemperature(timestamp t, short s, float v) : t(t), source(s), value(v) {} - - /// @brief Timestamp of the event - timestamp t; - - /// @brief Source sensor of the event. Each device can have - /// multiple temperature sensors. The exact ID corresponding - /// to each sensor changes with differing devices. - short source; - - /// @brief Temperature in degrees Celsius - float value; +namespace detail { + +template +struct encoded_event_type {}; + +// Common class for Evt 1, 2 and 2.1 (evt 3 is too different, need to be handled separately) +template +struct event_raw_format_common_base { + using BaseEventType = BaseRaw; + + // Encoded Event + template + struct EncodedEvent { + using Type = typename detail::encoded_event_type::Type; + static constexpr size_t number_of_words() { + return std::max(sizeof(Type), sizeof(BaseEventType)) / sizeof(BaseEventType); // Because of EVT2.1 + }; + static constexpr size_t number_of_bytes() { + return number_of_words() * sizeof(BaseEventType); + }; + }; }; - +} // namespace detail } // namespace Metavision -#endif // METAVISION_SDK_BASE_EVENT_TEMPERATURE_H +#endif // METAVISION_HAL_EVENT_RAW_FORMAT_TRAITS_DETAILS_H diff --git a/hal_psee_plugins/test/gtest_utils/evt2_raw_format.h b/hal_psee_plugins/test/gtest_utils/evt2_raw_format.h new file mode 100644 index 000000000..5296112b9 --- /dev/null +++ b/hal_psee_plugins/test/gtest_utils/evt2_raw_format.h @@ -0,0 +1,59 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_EVT2_RAW_FORMAT_H +#define METAVISION_HAL_EVT2_RAW_FORMAT_H + +#include "metavision/sdk/base/events/event_cd.h" +#include "metavision/sdk/base/events/event_ext_trigger.h" +#include "decoders/base/event_base.h" +#include "decoders/evt2/evt2_event_types.h" +#include "event_raw_format_traits.h" +#include "event_raw_format_traits_details.h" + +namespace Metavision { + +struct Evt2RawFormat {}; + +namespace detail { + +template<> +struct encoded_event_type { + using Type = EVT2Event2D; +}; + +template<> +struct encoded_event_type { + using Type = EVT2EventExtTrigger; +}; + +// By default Event2d for CD +template<> +struct encoded_event_type { + using Type = typename encoded_event_type::Type; +}; + +} // namespace detail + +template<> +struct event_raw_format_traits + : public detail::event_raw_format_common_base { + using EnumType = EVT2EventTypes; + + // number of lower bits of TIME HIGH + static const char NLowerBitsTH = EVT2EventsTimeStampBits; + static constexpr Metavision::timestamp MaxTimestamp = Metavision::timestamp((1 << 28) - 1) + << EVT2EventsTimeStampBits; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_EVT2_RAW_FORMAT_H diff --git a/hal_psee_plugins/test/gtest_utils/evt3_raw_format.h b/hal_psee_plugins/test/gtest_utils/evt3_raw_format.h new file mode 100644 index 000000000..f35f5fa7d --- /dev/null +++ b/hal_psee_plugins/test/gtest_utils/evt3_raw_format.h @@ -0,0 +1,39 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_EVT3_RAW_FORMAT_H +#define METAVISION_HAL_EVT3_RAW_FORMAT_H + +#include "metavision/sdk/base/events/event_cd.h" +#include "metavision/sdk/base/events/event_ext_trigger.h" +#include "decoders/base/event_base.h" +#include "decoders/evt3/evt3_event_types.h" +#include "event_raw_format_traits.h" +#include "event_raw_format_traits_details.h" + +namespace Metavision { + +struct Evt3RawFormat {}; + +template<> +struct event_raw_format_traits { + using BaseEventType = Evt3Raw::RawEvent; + using EnumType = Evt3EventTypes_4bits; + static const char NLowerBitsTH = 12; + static const char NHigherBitsTH = 12; + static constexpr Metavision::timestamp MaxTimestamp = + Metavision::timestamp((1 << (NLowerBitsTH + NHigherBitsTH)) - 1); +}; +constexpr Metavision::timestamp event_raw_format_traits::MaxTimestamp; + +} // namespace Metavision + +#endif // METAVISION_HAL_EVT3_RAW_FORMAT_H diff --git a/hal_psee_plugins/test/gtest_utils/gen3CD_device.h b/hal_psee_plugins/test/gtest_utils/gen3CD_device.h new file mode 100644 index 000000000..684d1aae1 --- /dev/null +++ b/hal_psee_plugins/test/gtest_utils/gen3CD_device.h @@ -0,0 +1,34 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_GEN3CD_DEVICE_H +#define METAVISION_HAL_GEN3CD_DEVICE_H + +#include "geometries/vga_geometry.h" +#include "metavision_device_traits.h" +#include "evt2_raw_format.h" + +namespace Metavision { + +struct Gen3CDDevice {}; + +template<> +struct metavision_device_traits { + using RawEventFormat = Evt2RawFormat; + using Geometry = VGAGeometry; + + static constexpr SystemId SYSTEM_ID_DEFAULT = SystemId::SYSTEM_CCAM3_GEN3; + static constexpr long SUBSYSTEM_ID_DEFAULT = -1; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_GEN3CD_DEVICE_H diff --git a/hal_psee_plugins/test/gtest_utils/gen4CD_device.h b/hal_psee_plugins/test/gtest_utils/gen4CD_device.h new file mode 100644 index 000000000..b5dfa49bd --- /dev/null +++ b/hal_psee_plugins/test/gtest_utils/gen4CD_device.h @@ -0,0 +1,34 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_GEN4CD_DEVICE_H +#define METAVISION_HAL_GEN4CD_DEVICE_H + +#include "metavision_device_traits.h" +#include "evt3_raw_format.h" +#include "geometries/hd_geometry.h" + +namespace Metavision { + +struct Gen4CDDevice {}; + +template<> +struct metavision_device_traits { + using RawEventFormat = Evt3RawFormat; + using Geometry = HDGeometry; + + static constexpr SystemId SYSTEM_ID_DEFAULT = SystemId::SYSTEM_CCAM3_GEN4; + static constexpr long SUBSYSTEM_ID_DEFAULT = -1; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_GEN4CD_DEVICE_H diff --git a/hal_psee_plugins/test/gtest_utils/metavision_device_traits.h b/hal_psee_plugins/test/gtest_utils/metavision_device_traits.h new file mode 100644 index 000000000..608ff64e8 --- /dev/null +++ b/hal_psee_plugins/test/gtest_utils/metavision_device_traits.h @@ -0,0 +1,32 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_DEVICE_TRAITS_H +#define METAVISION_HAL_DEVICE_TRAITS_H + +#include "devices/utils/device_system_id.h" +#include "geometries/tgeometry.h" + +namespace Metavision { + +template +struct metavision_device_traits { + using RawEventFormat = void; + using Geometry = TGeometry<0, 0>; + static constexpr bool HAS_EM = false; + + static constexpr SystemId SYSTEM_ID_DEFAULT = SystemId::SYSTEM_INVALID_NO_FPGA; + static constexpr long SUBSYSTEM_ID_DEFAULT = -1; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_DEVICE_TRAITS_H diff --git a/hal_psee_plugins/test/gtest_utils/tencoder.h b/hal_psee_plugins/test/gtest_utils/tencoder.h new file mode 100644 index 000000000..190f66591 --- /dev/null +++ b/hal_psee_plugins/test/gtest_utils/tencoder.h @@ -0,0 +1,144 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_TENCODER_H +#define METAVISION_HAL_TENCODER_H + +#include +#include +#include + +#include "tencoder_details.h" +#include "encoding_policies.h" +#include "event_raw_format_traits.h" +#include "timer_high_encoder.h" + +namespace Metavision { +struct Evt21RawFormat; + +template +class TEncoder { +public: + using VoidTypeCallbackRawWord = std::function; + + TEncoder(Metavision::timestamp t_step = 5000) : current_size_(SIZE_BUFFER_BEGIN_), step_(t_step) { + encoded_events_.resize(current_size_); + init_pointers(); + } + + ~TEncoder() {} + + void set_encode_event_callback(const VoidTypeCallbackRawWord &cb) { + cb_on_encode_ = cb; + } + + void reset() { + is_initialized = false; + } + + template + void encode(EventIteratorTypeN... pn) { + static_assert( + sizeof...(EventIteratorTypeN) > 1, + "Error : need to call encode() with at least 2 parameters, representing the range of the events to encode"); + static_assert(sizeof...(EventIteratorTypeN) % 2 == 0, + "Error : need to call encode() with an even number of parameters."); + detail::TupleOfEncodersWrapper, EventIteratorTypeN...> + ts(pn...); + + if (ts.done()) { + return; + } + + if (!is_initialized) { + ts.init_time_high(ts.next_timestamp_to_encode()); + next_upper_limit = (ts.next_timestamp_to_encode() / step_ + 1) * step_; + + init_pointers(); + + is_initialized = true; + } else { + ts.init_time_high(last_next_th); + } + + while (true) { + // Encode events + if (ts.template encode_up_to(next_upper_limit, encoded_event_current_ptr_, + encoded_event_end_ptr_)) { + if (!ts.done()) { + write_packet(); + } else { + break; + } + } else { + // Means we need to allocate more memory + double_size(); + } + } + + last_next_th = ts.get_next_timer_high(); + } + + // To update last packet + void flush() { + if (encoded_event_current_ptr_ != encoded_events_.data()) { + write_packet(); + } + } + +private: + void write_packet() { + uint8_t *end = encoded_event_current_ptr_; + + // Call the cb and reset pointers : + cb_on_encode_(encoded_events_.data(), end); + + // Reset : + init_pointers(); + next_upper_limit += step_; + } + + void init_pointers() { + // Add begin manual event : + // Cannot encode it right away because we do not know the size yet of the buffer + // so we just store the place for now : + encoded_event_current_ptr_ = encoded_events_.data(); + encoded_event_end_ptr_ = encoded_events_.data() + current_size_; // Keep the place for the last manual event + } + + void double_size() { + auto old_position = std::distance(encoded_events_.data(), encoded_event_current_ptr_); + current_size_ = 2 * current_size_; + encoded_events_.resize(current_size_); + encoded_event_current_ptr_ = encoded_events_.data() + old_position; + encoded_event_end_ptr_ = encoded_events_.data() + current_size_; + } + + bool is_initialized = false; + + static void callback_on_encode_default(const uint8_t *, const uint8_t *) {} + VoidTypeCallbackRawWord cb_on_encode_ = callback_on_encode_default; + + static constexpr size_t SIZE_BUFFER_BEGIN_ = 1000; + size_t current_size_; + std::vector encoded_events_; + uint8_t *encoded_event_current_ptr_; + uint8_t *encoded_event_end_ptr_; + + Metavision::timestamp last_next_th = 0; + + const Metavision::timestamp step_; + Metavision::timestamp next_upper_limit{0}; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_TENCODER_H diff --git a/hal_psee_plugins/test/gtest_utils/tencoder_details.h b/hal_psee_plugins/test/gtest_utils/tencoder_details.h new file mode 100644 index 000000000..e1d6e8e45 --- /dev/null +++ b/hal_psee_plugins/test/gtest_utils/tencoder_details.h @@ -0,0 +1,158 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_TENCODER_DETAILS_H +#define METAVISION_HAL_TENCODER_DETAILS_H + +#include +#include + +#include "event_encoder.h" + +namespace Metavision { + +namespace detail { + +template +struct TupleofEventEncodersMaker { + using Type = std::tuple<>; +}; + +template +struct TupleofEventEncodersMaker> { + using TypeRest = typename TupleofEventEncodersMaker>::Type; + using Type = decltype( + std::tuple_cat(std::declval>>(), std::declval())); +}; + +template +struct TupleofEncodersMaker { + using TypeRest = typename TupleofEventEncodersMaker< + std::tuple>::Type; + using Type = decltype(std::tuple_cat(std::declval>(), std::declval())); +}; + +template +struct TupleOfEncodersWrapper { + using TupleOfEncodersType = typename TupleofEncodersMaker::Type; + static constexpr size_t NUMBER_OF_ENCODERS = std::tuple_size::value; + + TupleOfEncodersWrapper(EventIteratorTypeN... pn) { + register_encoders<1>(pn...); + update_time<1>(); // From 1 and not 0 because we want to set next_timestamp_to_encode_ to time of the oldest of + // the events, in order to be able later to initialize the time high decoder + } + + void init_time_high(Metavision::timestamp t) { + // We set the time high decoder to t + std::get<0>(t_).initialize(t); + next_timestamp_to_encode_ = std::numeric_limits::max(); + update_time<0>(); + } + + // Return true if it finished encoding, false if not (because no more available size) + template + bool encode_up_to(Metavision::timestamp upper_limit, uint8_t *&encoded_events_current_ptr, + const uint8_t *encoded_events_end) { + while (next_timestamp_to_encode_ < upper_limit && !done()) { + if (!encode_next(encoded_events_current_ptr, encoded_events_end)) { + return false; + } + } + + return true; + } + + Metavision::timestamp get_next_timer_high() const { + return std::get<0>(t_).get_next_timestamp_to_encode(); + } + Metavision::timestamp next_timestamp_to_encode() const { + return next_timestamp_to_encode_; + } + + bool done() { + return are_done<1>(); // From 1 because we do not consider timehigh + } + +private: + template + inline typename std::enable_if::type are_done() { + return true; + } + + template + inline typename std::enable_if<(I > 0 && I < NUMBER_OF_ENCODERS), bool>::type are_done() { + if (!std::get(t_).is_done()) { + return false; + } + return are_done(); + } + + template + inline typename std::enable_if::type update_time() {} + + template + inline typename std::enable_if<(I < NUMBER_OF_ENCODERS), void>::type update_time() { + Metavision::timestamp next_timestamp_to_encode = std::get(t_).get_next_timestamp_to_encode(); + if (next_timestamp_to_encode < next_timestamp_to_encode_) { + next_timestamp_to_encode_ = next_timestamp_to_encode; + idx_next_encoder_ = I; + } + update_time(); + } + + template + inline void register_encoders(EventIteratorType1 p1, EventIteratorType1 p2) { + std::get(t_).register_buffer(p1, p2); + } + + template + inline void register_encoders(EventIteratorType1 p1, EventIteratorType1 p2, EventIteratorTypeRest... pn) { + std::get(t_).register_buffer(p1, p2); + register_encoders(pn...); + } + + template + inline typename std::enable_if::type + encode_next(uint8_t *&encoded_events_current_ptr, const uint8_t *encoded_events_end) { + return true; + } + + template + inline typename std::enable_if<(I < NUMBER_OF_ENCODERS), bool>::type + encode_next(uint8_t *&encoded_events_current_ptr, const uint8_t *encoded_events_end) { + if (idx_next_encoder_ == I) { + if (encoded_events_current_ptr + std::get(t_).template get_size_encoded() > + encoded_events_end) { + return false; + } + std::get(t_).template encode_next_event(encoded_events_current_ptr); + encoded_events_current_ptr += std::get(t_).template get_size_encoded(); + + // NEED TO UPDATE NEXT TIMESTAMP + next_timestamp_to_encode_ = std::numeric_limits::max(); + update_time<0>(); + return true; + } + + return encode_next(encoded_events_current_ptr, encoded_events_end); + } + + TupleOfEncodersType t_; + int idx_next_encoder_{0}; + Metavision::timestamp next_timestamp_to_encode_{std::numeric_limits::max()}; +}; + +} // namespace detail +} // namespace Metavision + +#endif // METAVISION_HAL_TENCODER_DETAILS_H diff --git a/hal_psee_plugins/test/gtest_utils/tencoder_gtest_common.h b/hal_psee_plugins/test/gtest_utils/tencoder_gtest_common.h new file mode 100644 index 000000000..64f7b4b4b --- /dev/null +++ b/hal_psee_plugins/test/gtest_utils/tencoder_gtest_common.h @@ -0,0 +1,278 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_TENCODER_GTEST_COMMON_H +#define METAVISION_HAL_TENCODER_GTEST_COMMON_H + +#include + +#include +#include + +#include "metavision/sdk/base/events/event_ext_trigger.h" +#include "metavision/sdk/base/events/event_cd.h" +#include "metavision/hal/facilities/i_event_decoder.h" +#include "metavision/hal/device/device.h" +#include "metavision/hal/facilities/i_decoder.h" +#include "metavision/hal/utils/device_builder.h" +#include "decoders/evt2/evt2_decoder.h" +#include "metavision/hal/facilities/i_event_decoder.h" +#include "evt2_raw_format.h" +#include "tencoder.h" +#include "geometries/vga_geometry.h" +#include "device_builder_maker.h" + +namespace detail { +template +std::vector make_vector(const T (&array)[N]) noexcept { + return std::vector{array, array + N}; +} +} // namespace detail + +template +struct event2d_types_def { + using event2d_TD_class = Metavision::EventCD; +}; + +// Helper functions to test for event equality +inline void expect_event_equality(const Metavision::Event2d &left, const Metavision::Event2d &right) { + EXPECT_EQ(left.x, right.x); + EXPECT_EQ(left.y, right.y); + EXPECT_EQ(left.p, right.p); + EXPECT_EQ(left.t, right.t); +} + +inline void expect_event_equality(const Metavision::EventExtTrigger &left, const Metavision::EventExtTrigger &right) { + EXPECT_EQ(left.p, right.p); + EXPECT_EQ(left.t, right.t); + EXPECT_EQ(left.id, right.id); +} + +template +void compare_vectors(const std::vector &events_expected, const std::vector &events) { + // Now, check that what we decoded back is the same as what we encoded + ASSERT_EQ(events_expected.size(), events.size()); + for (auto it = events.begin(), it_expected = events_expected.begin(), it_end = events.end(); it != it_end; + ++it, ++it_expected) { + expect_event_equality(*it_expected, *it); + } +} + +template +size_t count_how_many_time_high(const RawBaseType &ev_to_find, const std::vector &encoded) { + size_t tot_size_encoded = encoded.size(); + size_t count = 0; + if (tot_size_encoded % sizeof(RawBaseType) != 0) { + std::cerr << "ERROR : size mismatch. " << tot_size_encoded << " vs " << sizeof(RawBaseType) << std::endl; + } + + const RawBaseType *ptr_begin(reinterpret_cast(encoded.data())); + const RawBaseType *ptr_end(reinterpret_cast(encoded.data() + tot_size_encoded)); + for (auto ptr = ptr_begin; ptr != ptr_end; ++ptr) { + if (ptr->type == ev_to_find.type && ptr->trail == ev_to_find.trail) { + ++count; + } + } + return count; +} + +using namespace Metavision; + +template +inline void build_decoder(DeviceBuilder &device_builder) {} + +template +inline std::vector build_vector_of_events() { + return std::vector(); +} + +template<> +inline void build_decoder(DeviceBuilder &device_builder) { + static constexpr bool TimeShiftingEnabled = false; + + auto cd_event_decoder = device_builder.add_facility(std::make_unique>()); + auto ext_trigger_event_decoder = device_builder.add_facility(std::make_unique>()); + device_builder.add_facility( + std::make_unique(TimeShiftingEnabled, cd_event_decoder, ext_trigger_event_decoder)); +} + +template +void register_decode_event_cb(Device &device, std::vector &decoded_events) { + auto event_decoder = device.get_facility>(); + event_decoder->add_event_buffer_callback([&decoded_events](const EventType *begin, const EventType *end) { + decoded_events.insert(decoded_events.end(), begin, end); + }); +} + +template +void register_decode_event_cb(Device &device, std::vector &decoded_events, + std::vector &...decoded_events_other) { + auto event_decoder = device.get_facility>(); + event_decoder->add_event_buffer_callback([&decoded_events](const EventType *begin, const EventType *end) { + decoded_events.insert(decoded_events.end(), begin, end); + }); + + register_decode_event_cb(device, decoded_events_other...); +} + +template +void setup_decoders_and_decode(std::vector &encoded_events, std::vector &decoded_events, + std::vector &...decoded_events_other) { + DeviceBuilder device_builder = make_device_builder(); + build_decoder(device_builder); + auto device = device_builder(); + + register_decode_event_cb(*device, decoded_events, decoded_events_other...); + + device->get_facility()->decode(encoded_events.data(), encoded_events.data() + encoded_events.size()); +} + +template +void encode_events_and_decode_them_back(const std::vector &events_to_encode, + std::vector &decoded_events, int slices = 1) { + std::vector encoded_events; + + // Encode the events + using EncoderType = TEncoder; + EncoderType encoder; + encoder.set_encode_event_callback( + [&encoded_events](const uint8_t *b, const uint8_t *e) { encoded_events.insert(encoded_events.end(), b, e); }); + + size_t n_to_decode = events_to_encode.size(); + auto it = events_to_encode.data(); + auto it_end = it + n_to_decode; + size_t step = n_to_decode / slices; + if (slices == 1 || step == 0) { + encoder.encode(it, it_end); + } else { + while (it + step <= it_end) { + encoder.encode(it, it + step); + it += step; + } + encoder.encode(it, it_end); + } + encoder.flush(); + + // Now, decode back the events + setup_decoders_and_decode(encoded_events, decoded_events); +} + +template +void encode_all_events_and_decode_them_back(const std::vector &events_to_encode, + std::vector &decoded_events) { + std::vector encoded_events; + + // Encode the events + using EncoderType = TEncoder; + EncoderType encoder; + encoder.set_encode_event_callback( + [&encoded_events](const uint8_t *b, const uint8_t *e) { encoded_events.insert(encoded_events.end(), b, e); }); + + encoder.encode(events_to_encode.cbegin(), events_to_encode.cend()); + encoder.flush(); + + // Now, decode back the events + setup_decoders_and_decode(encoded_events, decoded_events); +} + +template<> +inline std::vector build_vector_of_events() { + // clang-format off + std::vector events = { + Metavision::Event2d(331, 261, 0, 1589), Metavision::Event2d(7, 127, 0, 3040), Metavision::Event2d(468, 114, 0, 4416), Metavision::Event2d(560, 3, 0, 5794), + Metavision::Event2d(222, 253, 1, 7020), Metavision::Event2d(288, 8, 1, 8868), Metavision::Event2d(314, 296, 1, 10480), Metavision::Event2d(16, 383, 0, 11977), + Metavision::Event2d(502, 87, 0, 13431), Metavision::Event2d(428, 133, 0, 14877), Metavision::Event2d(589, 8, 0, 16168), Metavision::Event2d(117, 261, 0, 17436), + Metavision::Event2d(298, 301, 0, 18956), Metavision::Event2d(614, 340, 0, 20543), Metavision::Event2d(576, 2, 0, 22044), Metavision::Event2d(355, 345, 0, 23532), + Metavision::Event2d(622, 341, 0, 24955), Metavision::Event2d(543, 340, 0, 26220), Metavision::Event2d(569, 471, 0, 27678), Metavision::Event2d(549, 477, 0, 29244), + Metavision::Event2d(533, 341, 0, 30897), Metavision::Event2d(638, 336, 0, 32535), Metavision::Event2d(591, 7, 0, 34007), Metavision::Event2d(624, 173, 0, 35481), + Metavision::Event2d(335, 433, 1, 36900), Metavision::Event2d(353, 341, 0, 38405), Metavision::Event2d(454, 243, 0, 40063), Metavision::Event2d(579, 237, 0, 41756), + Metavision::Event2d(607, 381, 1, 43436), Metavision::Event2d(39, 300, 1, 44967), Metavision::Event2d(611, 187, 0, 46435), Metavision::Event2d(554, 282, 0, 47857), + Metavision::Event2d(542, 355, 1, 49551), Metavision::Event2d(591, 215, 0, 51227), Metavision::Event2d(610, 52, 0, 52812), Metavision::Event2d(152, 433, 0, 54286), + Metavision::Event2d(193, 340, 0, 55751), Metavision::Event2d(461, 372, 1, 57181), Metavision::Event2d(53, 348, 0, 58627), Metavision::Event2d(199, 340, 0, 60222), + Metavision::Event2d(421, 448, 0, 61841), Metavision::Event2d(629, 56, 1, 63300), Metavision::Event2d(130, 313, 0, 64713), Metavision::Event2d(579, 33, 0, 66008), + Metavision::Event2d(574, 333, 0, 67308), Metavision::Event2d(228, 82, 0, 68815), Metavision::Event2d(521, 358, 1, 70322), Metavision::Event2d(577, 333, 0, 71834), + Metavision::Event2d(550, 357, 0, 73187), Metavision::Event2d(553, 284, 0, 74505), Metavision::Event2d(289, 388, 0, 75754), Metavision::Event2d(628, 334, 0, 76950), + Metavision::Event2d(288, 8, 1, 78226), Metavision::Event2d(546, 334, 0, 79694), Metavision::Event2d(39, 300, 0, 81040), Metavision::Event2d(293, 299, 0, 82427), + Metavision::Event2d(548, 351, 1, 83709), Metavision::Event2d(542, 354, 0, 84873), Metavision::Event2d(523, 332, 0, 86026), Metavision::Event2d(382, 412, 0, 87271), + Metavision::Event2d(466, 359, 0, 88489), Metavision::Event2d(629, 333, 0, 89722), Metavision::Event2d(8, 200, 1, 91044), Metavision::Event2d(540, 257, 0, 92330), + Metavision::Event2d(374, 404, 0, 93548), Metavision::Event2d(218, 291, 0, 94759), Metavision::Event2d(522, 262, 0, 95818), Metavision::Event2d(458, 408, 1, 96923), + Metavision::Event2d(587, 224, 0, 98070), Metavision::Event2d(580, 0, 1, 99294), Metavision::Event2d(4, 334, 0, 100526), Metavision::Event2d(562, 242, 0, 101719), + Metavision::Event2d(302, 95, 1, 102869), Metavision::Event2d(554, 276, 0, 103972), Metavision::Event2d(458, 408, 1, 105079), Metavision::Event2d(527, 332, 0, 106183), + Metavision::Event2d(101, 243, 0, 107308), Metavision::Event2d(550, 350, 0, 108484), Metavision::Event2d(604, 331, 0, 109715), Metavision::Event2d(562, 325, 0, 110930), + Metavision::Event2d(536, 332, 0, 112167), Metavision::Event2d(584, 30, 0, 113378), Metavision::Event2d(635, 328, 0, 114433), Metavision::Event2d(538, 257, 0, 115458), + Metavision::Event2d(617, 50, 0, 116540), Metavision::Event2d(607, 187, 0, 117600), Metavision::Event2d(565, 323, 0, 118708), Metavision::Event2d(620, 30, 0, 119883), + Metavision::Event2d(587, 222, 0, 121097), Metavision::Event2d(545, 323, 0, 122261), Metavision::Event2d(108, 268, 0, 123368), Metavision::Event2d(479, 7, 0, 124426), + Metavision::Event2d(637, 327, 0, 125417), Metavision::Event2d(557, 242, 0, 126442), Metavision::Event2d(526, 340, 1, 127455), Metavision::Event2d(579, 325, 0, 128604), + Metavision::Event2d(291, 296, 0, 129728), Metavision::Event2d(531, 381, 1, 130830), Metavision::Event2d(122, 336, 1, 131928), Metavision::Event2d(355, 334, 0, 132986), + Metavision::Event2d(537, 259, 0, 134026), Metavision::Event2d(381, 84, 1, 135081), Metavision::Event2d(596, 331, 0, 136042), Metavision::Event2d(611, 181, 0, 137014), + Metavision::Event2d(569, 0, 0, 137965), Metavision::Event2d(601, 331, 0, 139033), Metavision::Event2d(547, 280, 0, 140146), Metavision::Event2d(365, 71, 0, 141204), + Metavision::Event2d(131, 319, 0, 142242), Metavision::Event2d(611, 328, 0, 143277), Metavision::Event2d(622, 383, 0, 144244), Metavision::Event2d(605, 40, 0, 145175), + Metavision::Event2d(457, 182, 0, 146084), Metavision::Event2d(599, 273, 1, 146945), Metavision::Event2d(547, 318, 1, 147927), Metavision::Event2d(597, 330, 0, 148953), + Metavision::Event2d(343, 340, 0, 149999), Metavision::Event2d(11, 288, 0, 150988), Metavision::Event2d(133, 312, 0, 152014), Metavision::Event2d(616, 178, 0, 153003), + Metavision::Event2d(606, 326, 0, 154026), Metavision::Event2d(428, 133, 0, 154892), Metavision::Event2d(575, 319, 0, 155769), Metavision::Event2d(633, 323, 0, 156644), + Metavision::Event2d(535, 342, 0, 157538), Metavision::Event2d(554, 316, 1, 158482), Metavision::Event2d(590, 259, 0, 159388), Metavision::Event2d(533, 261, 0, 160300), + Metavision::Event2d(20, 293, 0, 161228), Metavision::Event2d(561, 241, 0, 162056), Metavision::Event2d(542, 321, 0, 162961), Metavision::Event2d(325, 2, 0, 163694), + Metavision::Event2d(294, 317, 0, 164489), Metavision::Event2d(210, 72, 0, 165219), Metavision::Event2d(629, 322, 0, 165935), Metavision::Event2d(583, 25, 0, 166607), + Metavision::Event2d(461, 372, 1, 167379), Metavision::Event2d(555, 256, 0, 168145), Metavision::Event2d(129, 343, 1, 168919), Metavision::Event2d(527, 266, 0, 169720), + Metavision::Event2d(127, 344, 1, 170454), Metavision::Event2d(600, 34, 0, 171222), Metavision::Event2d(563, 237, 0, 171968), Metavision::Event2d(591, 26, 0, 172801), + Metavision::Event2d(139, 311, 0, 173389), Metavision::Event2d(543, 317, 0, 174103), Metavision::Event2d(117, 336, 0, 174798), Metavision::Event2d(116, 347, 1, 175450), + Metavision::Event2d(122, 318, 0, 176105), Metavision::Event2d(634, 321, 0, 176808), Metavision::Event2d(155, 477, 0, 177401), Metavision::Event2d(361, 43, 0, 178037), + Metavision::Event2d(549, 268, 0, 178687), Metavision::Event2d(293, 329, 1, 179386), Metavision::Event2d(152, 433, 1, 180110), Metavision::Event2d(548, 242, 0, 180844), + Metavision::Event2d(0, 479, 0, 181480), Metavision::Event2d(543, 284, 0, 182168), Metavision::Event2d(118, 339, 0, 182831), Metavision::Event2d(600, 199, 0, 183419), + Metavision::Event2d(214, 375, 0, 184068), Metavision::Event2d(572, 230, 0, 184677), Metavision::Event2d(627, 226, 0, 185275), Metavision::Event2d(615, 176, 0, 185892), + Metavision::Event2d(573, 208, 0, 186506), Metavision::Event2d(601, 266, 0, 187081), Metavision::Event2d(602, 321, 0, 187684), Metavision::Event2d(617, 221, 0, 188331), + Metavision::Event2d(581, 318, 0, 188948), Metavision::Event2d(600, 270, 0, 189615), Metavision::Event2d(322, 263, 0, 190303), Metavision::Event2d(116, 342, 0, 190967), + Metavision::Event2d(593, 207, 0, 191607), Metavision::Event2d(115, 344, 0, 192257), Metavision::Event2d(293, 334, 1, 192885), Metavision::Event2d(574, 312, 0, 193520), + Metavision::Event2d(123, 347, 0, 194116), Metavision::Event2d(291, 286, 0, 194759), Metavision::Event2d(567, 344, 0, 195336), Metavision::Event2d(68, 377, 0, 195932), + Metavision::Event2d(578, 222, 0, 196581), Metavision::Event2d(105, 270, 0, 197186), Metavision::Event2d(101, 243, 1, 197853), Metavision::Event2d(608, 37, 0, 198479), + Metavision::Event2d(490, 467, 1, 199144), Metavision::Event2d(137, 319, 1, 199799), Metavision::Event2d(623, 216, 1, 200470), Metavision::Event2d(556, 236, 0, 201153), + Metavision::Event2d(590, 263, 0, 201806), Metavision::Event2d(543, 314, 0, 202462), Metavision::Event2d(551, 237, 0, 203090), Metavision::Event2d(322, 257, 0, 203750), + Metavision::Event2d(297, 328, 0, 204358), Metavision::Event2d(25, 357, 0, 204956), Metavision::Event2d(590, 207, 0, 205570), Metavision::Event2d(122, 329, 0, 206200), + Metavision::Event2d(622, 316, 0, 206783), Metavision::Event2d(542, 310, 0, 207432), Metavision::Event2d(572, 224, 0, 208066), Metavision::Event2d(317, 340, 1, 208744), + Metavision::Event2d(295, 325, 0, 209382), Metavision::Event2d(254, 351, 0, 210050), Metavision::Event2d(78, 350, 0, 210707), Metavision::Event2d(92, 377, 1, 211384), + Metavision::Event2d(559, 270, 1, 212102), Metavision::Event2d(79, 350, 0, 212812), Metavision::Event2d(82, 346, 0, 213477), Metavision::Event2d(267, 441, 0, 214158), + Metavision::Event2d(127, 303, 0, 214773), Metavision::Event2d(32, 67, 0, 215403), Metavision::Event2d(436, 27, 1, 216036), Metavision::Event2d(609, 315, 0, 216620), + Metavision::Event2d(287, 293, 1, 217220), Metavision::Event2d(313, 349, 1, 217920), Metavision::Event2d(574, 288, 1, 218535), Metavision::Event2d(292, 312, 0, 219208), + Metavision::Event2d(200, 308, 0, 219879), Metavision::Event2d(97, 375, 1, 220539), Metavision::Event2d(312, 348, 1, 221172), Metavision::Event2d(13, 268, 1, 221860) + }; + // clang-format on + return events; +} + +template<> +inline std::vector build_vector_of_events() { + // clang-format off + std::vector events = { + Metavision::EventExtTrigger(0, 1589, 28), Metavision::EventExtTrigger(0, 3040, 10), Metavision::EventExtTrigger(0, 4416, 6), Metavision::EventExtTrigger(0, 5794, 13), Metavision::EventExtTrigger(1, 7020, 23), + Metavision::EventExtTrigger(1, 8868, 4), Metavision::EventExtTrigger(1, 10480, 22), Metavision::EventExtTrigger(0, 11977, 6), Metavision::EventExtTrigger(0, 13431, 3), Metavision::EventExtTrigger(0, 14877, 1), + Metavision::EventExtTrigger(0, 16168, 8), Metavision::EventExtTrigger(0, 17436, 7), Metavision::EventExtTrigger(0, 18956, 5), Metavision::EventExtTrigger(0, 20543, 25), Metavision::EventExtTrigger(0, 22044, 29), + Metavision::EventExtTrigger(0, 23532, 4), Metavision::EventExtTrigger(0, 24955, 9), Metavision::EventExtTrigger(0, 26220, 21), Metavision::EventExtTrigger(0, 27678, 13), Metavision::EventExtTrigger(0, 29244, 22), + Metavision::EventExtTrigger(0, 30897, 0), Metavision::EventExtTrigger(0, 32535, 8), Metavision::EventExtTrigger(0, 34007, 27), Metavision::EventExtTrigger(0, 35481, 0), Metavision::EventExtTrigger(1, 36900, 26), + Metavision::EventExtTrigger(0, 38405, 17), Metavision::EventExtTrigger(0, 40063, 11), Metavision::EventExtTrigger(0, 41756, 10), Metavision::EventExtTrigger(1, 43436, 25), Metavision::EventExtTrigger(1, 44967, 10), + Metavision::EventExtTrigger(0, 46435, 0), Metavision::EventExtTrigger(0, 47857, 18), Metavision::EventExtTrigger(1, 49551, 21), Metavision::EventExtTrigger(0, 51227, 3), Metavision::EventExtTrigger(0, 52812, 29), + Metavision::EventExtTrigger(0, 54286, 9), Metavision::EventExtTrigger(0, 55751, 7), Metavision::EventExtTrigger(1, 57181, 19), Metavision::EventExtTrigger(0, 58627, 13), Metavision::EventExtTrigger(0, 60222, 10), + Metavision::EventExtTrigger(0, 61841, 18), Metavision::EventExtTrigger(1, 63300, 21), Metavision::EventExtTrigger(0, 64713, 15), Metavision::EventExtTrigger(0, 66008, 23), Metavision::EventExtTrigger(0, 67308, 11), + Metavision::EventExtTrigger(0, 68815, 10), Metavision::EventExtTrigger(1, 70322, 26), Metavision::EventExtTrigger(0, 71834, 20), Metavision::EventExtTrigger(0, 73187, 29), Metavision::EventExtTrigger(0, 74505, 6), + Metavision::EventExtTrigger(0, 82427, 6), Metavision::EventExtTrigger(1, 83709, 17), Metavision::EventExtTrigger(0, 84873, 5), Metavision::EventExtTrigger(0, 86026, 16), Metavision::EventExtTrigger(0, 87271, 7), + Metavision::EventExtTrigger(0, 106183, 21), Metavision::EventExtTrigger(0, 107308, 23), Metavision::EventExtTrigger(0, 108484, 2), Metavision::EventExtTrigger(0, 109715, 6), Metavision::EventExtTrigger(0, 110930, 20), + Metavision::EventExtTrigger(0, 134026, 30), Metavision::EventExtTrigger(1, 135081, 25), Metavision::EventExtTrigger(0, 136042, 8), Metavision::EventExtTrigger(0, 137014, 7), Metavision::EventExtTrigger(0, 137965, 5), + Metavision::EventExtTrigger(0, 139033, 18), Metavision::EventExtTrigger(0, 140146, 26), Metavision::EventExtTrigger(0, 141204, 29), Metavision::EventExtTrigger(0, 142242, 18), Metavision::EventExtTrigger(0, 143277, 30), + Metavision::EventExtTrigger(0, 144244, 16), Metavision::EventExtTrigger(0, 145175, 23), Metavision::EventExtTrigger(0, 146084, 10), Metavision::EventExtTrigger(1, 146945, 29), Metavision::EventExtTrigger(1, 147927, 8), + Metavision::EventExtTrigger(0, 148953, 22), Metavision::EventExtTrigger(0, 149999, 6), Metavision::EventExtTrigger(0, 150988, 0), Metavision::EventExtTrigger(0, 152014, 19), Metavision::EventExtTrigger(0, 153003, 20), + Metavision::EventExtTrigger(1, 158482, 14), Metavision::EventExtTrigger(0, 159388, 27), Metavision::EventExtTrigger(0, 160300, 2), Metavision::EventExtTrigger(0, 161228, 21), Metavision::EventExtTrigger(0, 162056, 19), + Metavision::EventExtTrigger(0, 162961, 21), Metavision::EventExtTrigger(0, 163694, 16), Metavision::EventExtTrigger(0, 164489, 11), Metavision::EventExtTrigger(0, 165219, 27), Metavision::EventExtTrigger(0, 165935, 21), + Metavision::EventExtTrigger(0, 166607, 17), Metavision::EventExtTrigger(1, 167379, 10), Metavision::EventExtTrigger(0, 168145, 14), Metavision::EventExtTrigger(1, 168919, 11), Metavision::EventExtTrigger(0, 169720, 29) + }; + // clang-format on + return events; +} + +#endif // METAVISION_HAL_TENCODER_GTEST_COMMON_H diff --git a/hal_psee_plugins/test/gtest_utils/timer_high_encoder.h b/hal_psee_plugins/test/gtest_utils/timer_high_encoder.h new file mode 100644 index 000000000..46246f3f7 --- /dev/null +++ b/hal_psee_plugins/test/gtest_utils/timer_high_encoder.h @@ -0,0 +1,85 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_TIMER_HIGH_ENCODER_H +#define METAVISION_HAL_TIMER_HIGH_ENCODER_H + +#include + +#include "metavision/sdk/base/utils/timestamp.h" +#include "decoders/base/base_event_types.h" +#include "event_raw_format_traits.h" + +namespace Metavision { + +template +struct TimerHighEncoder { + static constexpr char N_LOWER_BITS_TH = event_raw_format_traits::NLowerBitsTH; + static constexpr Metavision::timestamp TH_STEP = (1ul << N_LOWER_BITS_TH); + static constexpr Metavision::timestamp TH_NEXT_STEP = TH_STEP / TimerHighRedundancyPolicy::REDUNDANCY_FACTOR; + + // This function does not need to be template, but doing so we can use the same syntax as for the BatchEventEncoder, + // thus generalizing better the class TupleOfEncoders (because we do not need to handle the special case of + // time high, it will be automatically done). + // However, it does not make sense for the template type to be != from EvtFormat, so we enforce it + template::value>> + static constexpr size_t get_size_encoded() { + return sizeof(typename event_raw_format_traits::BaseEventType); + } + + TimerHighEncoder() {} + + /// Initialize next time high + void initialize(Metavision::timestamp base) { + next_th_ = (base / TH_NEXT_STEP) * TH_NEXT_STEP; + update_current_th(); + } + + // This function does not need to be template, but doing so we can use the same syntax as for the BatchEventEncoder, + // thus generalizing better the class TupleOfEncoders (because we do not need to handle the special case of + // time high, it will be automatically done). + // However, it does not make sense for the template type to be != from EvtFormat, so we enforce it + template::value>> + void encode_next_event(uint8_t *encoded_ev) { + auto ev_th = reinterpret_cast::BaseEventType *>(encoded_ev); + ev_th->trail = next_th_ >> N_LOWER_BITS_TH; + ev_th->type = static_cast(event_raw_format_traits::EnumType::EVT_TIME_HIGH); + + update_current_th(); + next_th_ += TH_NEXT_STEP; + } + + Metavision::timestamp get_next_timestamp_to_encode() const { + return next_th_; + } + + Metavision::timestamp get_current_time_high() const { + return current_th_; + } + +private: + template + typename std::enable_if<(FACTOR <= 1), void>::type update_current_th() { + current_th_ = next_th_; + } + + template + typename std::enable_if::type update_current_th() { + current_th_ = next_th_ & ~((static_cast(1) << N_LOWER_BITS_TH) - 1); + } + + Metavision::timestamp current_th_ = 0; + Metavision::timestamp next_th_ = 0; +}; + +} // namespace Metavision + +#endif // METAVISION_HAL_TIMER_HIGH_ENCODER_H diff --git a/hal_psee_plugins/test/i_events_stream_gtest.cpp b/hal_psee_plugins/test/i_events_stream_gtest.cpp new file mode 100644 index 000000000..ba51b88ae --- /dev/null +++ b/hal_psee_plugins/test/i_events_stream_gtest.cpp @@ -0,0 +1,423 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include +#include + +#include "metavision/hal/facilities/i_hw_identification.h" +#include "metavision/hal/facilities/i_plugin_software_info.h" +#include "metavision/sdk/base/events/event_cd.h" +#include "metavision/utils/gtest/gtest_with_tmp_dir.h" +#include "metavision/hal/facilities/i_event_decoder.h" +#include "metavision/hal/facilities/i_events_stream.h" +#include "metavision/hal/utils/data_transfer.h" +#include "metavision/hal/utils/file_data_transfer.h" +#include "metavision/hal/device/device.h" +#include "metavision/hal/device/device_discovery.h" +#include "metavision/hal/utils/device_builder.h" +#include "metavision/utils/gtest/gtest_custom.h" +#include "boards/rawfile/psee_raw_file_header.h" +#include "geometries/vga_geometry.h" +#include "decoders/evt2/evt2_decoder.h" +#include "metavision/hal/facilities/i_decoder.h" +#include "metavision/hal/facilities/i_hw_identification.h" +#include "tencoder.h" +#include "gen3CD_device.h" +#include "device_builder_maker.h" + +using namespace Metavision; + +class MockHWIdentification : public I_HW_Identification { +public: + MockHWIdentification(const std::shared_ptr &plugin_sw_info, long system_id) : + I_HW_Identification(plugin_sw_info), system_id_(system_id) {} + + virtual std::string get_serial() const override { + return dummy_serial_; + } + virtual long get_system_id() const override { + return system_id_; + } + virtual SensorInfo get_sensor_info() const override { + return SensorInfo(); + } + virtual long get_system_version() const override { + return dummy_system_version_; + } + virtual std::vector get_available_raw_format() const override { + std::vector available_formats; + available_formats.push_back(std::string("EVT2")); + return available_formats; + } + virtual std::string get_integrator() const override { + return dummy_integrator_name_; + } + virtual SystemInfo get_system_info() const override { + return SystemInfo(); + } + virtual std::string get_connection_type() const override { + return std::string(); + } + + virtual RawFileHeader get_header_impl() const override { + PseeRawFileHeader header(*this, VGAGeometry()); + header.set_sub_system_id(dummy_sub_system_id_); + header.set_format(is_evt3 ? "EVT3" : "EVT2"); + header.set_field(dummy_custom_key_, dummy_custom_value_); + return header; + } + + long system_id_; + static const std::string dummy_serial_; + static const std::string dummy_integrator_name_; + static const std::string dummy_custom_key_; + static const std::string dummy_custom_value_; + + static constexpr bool is_evt3 = false; + static constexpr long dummy_sub_system_id_ = 3; + static constexpr long dummy_system_version_ = 0; +}; + +constexpr long MockHWIdentification::dummy_system_version_; +constexpr long MockHWIdentification::dummy_sub_system_id_; +constexpr bool MockHWIdentification::is_evt3; +const std::string MockHWIdentification::dummy_serial_ = "dummy_serial"; +const std::string MockHWIdentification::dummy_integrator_name_ = "integator_name"; +const std::string MockHWIdentification::dummy_custom_key_ = "custom"; +const std::string MockHWIdentification::dummy_custom_value_ = "field"; + +class MockDataTransfer : public DataTransfer { +public: + MockDataTransfer() : DataTransfer(4) {} + + void trigger_transfer(const std::vector &data) { + buffer_->clear(); + buffer_->insert(buffer_->end(), data.cbegin(), data.cend()); + transfer_data(buffer_); + } + +private: + void start_impl(BufferPtr buffer) final { + buffer_ = buffer; + } + + void run_impl() final { + while (!should_stop()) { + std::this_thread::sleep_for(std::chrono::milliseconds(1)); + } + } + + BufferPtr buffer_; +}; + +class I_EventsStream_GTest : public GTestWithTmpDir { +public: + I_EventsStream_GTest(long system_id = metavision_device_traits::SYSTEM_ID_DEFAULT) : + system_id_(system_id) { + reset(); + } + + virtual ~I_EventsStream_GTest() {} + + void reset() { + dt_ = new MockDataTransfer(); + std::unique_ptr dt(dt_); + // needed by MockHWIdentification::get_header + auto plugin_sw_info = + std::make_shared(dummy_plugin_name_, SoftwareInfo(0, 0, 0, "", "", "", "")); + // needed by MockEventsStream::log_raw_data + hw_identification_ = std::make_shared(plugin_sw_info, system_id_); + events_stream_ = std::make_shared(std::move(dt), hw_identification_); + events_stream_->start(); + } + + static const std::string dummy_plugin_name_; + +protected: + virtual void SetUp() override {} + + virtual void TearDown() override {} + + // Needed facilities, + std::unique_ptr device_; + std::shared_ptr hw_identification_; + std::shared_ptr events_stream_; + MockDataTransfer *dt_ = nullptr; + long system_id_; +}; + +const std::string I_EventsStream_GTest::dummy_plugin_name_ = "plugin_name"; + +TEST_F(I_EventsStream_GTest, add_sub_system_id_to_header) { + // Create tmp file + std::string filename = tmpdir_handler_->get_full_path("log.raw"); + events_stream_->log_raw_data(filename); + events_stream_->stop_log_raw_data(); + + // Now read the subid from the header and verify that it is the one set + std::ifstream file(filename); + auto header = PseeRawFileHeader(file); + ASSERT_EQ(MockHWIdentification::dummy_sub_system_id_, header.get_sub_system_id()); + file.close(); +} + +TEST_F(I_EventsStream_GTest, poll_buffer) { + ASSERT_EQ(0, events_stream_->poll_buffer()); + std::vector data = {1, 2, 3, 4, 5}; + dt_->trigger_transfer(data); + ASSERT_EQ(1, events_stream_->poll_buffer()); +} + +TEST_F(I_EventsStream_GTest, add_data_triggers_wait_next_buffer) { + std::condition_variable wait_var; + std::mutex triggered_mutex; + bool triggered = false; + auto thread = std::thread([this, &wait_var, &triggered_mutex, &triggered]() { + EXPECT_EQ(1, events_stream_->wait_next_buffer()); // waits for a buffer + { + std::unique_lock wait_lock(triggered_mutex); + triggered = true; + } + wait_var.notify_one(); + }); + + while (!thread.joinable()) {} // wait thread to be started + + // trigger with add data + std::vector data = {1, 2, 3, 4, 5}; + dt_->trigger_transfer(data); + + // Wait for the trigger to be processed (add a timeout to not wait forever) + auto now = std::chrono::system_clock::now(); + { + std::unique_lock wait_lock(triggered_mutex); + wait_var.wait_until(wait_lock, now + std::chrono::seconds(1), [&triggered]() { return triggered; }); + } + + EXPECT_TRUE( + triggered); // check that we did trigger the condition and that we did not wake up because of the timeout + events_stream_->stop(); + thread.join(); +} + +TEST_F(I_EventsStream_GTest, stop_triggers_wait_next_buffer) { + std::condition_variable wait_var; + std::mutex triggered_mutex_; + bool triggered = false; + auto thread = std::thread([this, &wait_var, &triggered_mutex_, &triggered]() { + events_stream_->wait_next_buffer(); // waits for a trigger + { + std::unique_lock wait_lock(triggered_mutex_); + triggered = true; + } + wait_var.notify_one(); + }); + + while (!thread.joinable()) {} // wait thread to be started + + // trigger with stop + events_stream_->stop(); + + // Wait for the trigger to be processed (add a timeout to not wait forever) + auto now = std::chrono::system_clock::now(); + std::unique_lock wait_lock(triggered_mutex_); + wait_var.wait_until(wait_lock, now + std::chrono::seconds(1), + [&triggered]() { return triggered; }); // to avoid dead lock + + EXPECT_TRUE( + triggered); // check that we did trigger the condition and that we did not wake up because of the timeout + events_stream_->stop(); + thread.join(); +} + +TEST_WITH_DATASET(EventsStream_GTest, stop_on_recording_does_not_drop_buffers) { + // Read the dataset provided + std::string dataset_file_path = + (boost::filesystem::path(GtestsParameters::instance().dataset_dir) / "openeb" / "gen4_evt3_hand.raw").string(); + + std::unique_ptr device = Metavision::DeviceDiscovery::open_raw_file(dataset_file_path); + EXPECT_TRUE(device != nullptr); + + long int n_raw = 0; + Metavision::I_EventsStream *i_eventsstream = device->get_facility(); + while (true) { + i_eventsstream->start(); + // allow reading thread to accumulate some buffers that could be dropped when we stop the events stream + std::this_thread::sleep_for(std::chrono::milliseconds(50)); + if (i_eventsstream->wait_next_buffer() < 0) { + break; + } + long int n_rawbytes = 0; + I_EventsStream::RawData *ev_buffer = i_eventsstream->get_latest_raw_data(n_rawbytes); + n_raw += n_rawbytes; + i_eventsstream->stop(); + } + + ASSERT_EQ(96786804, n_raw); +} + +template +class I_EventsStreamT_GTest : public I_EventsStream_GTest { +public: + I_EventsStreamT_GTest() : I_EventsStream_GTest(metavision_device_traits::SYSTEM_ID_DEFAULT) { + build_events(); + } + + virtual ~I_EventsStreamT_GTest() {} + +protected: + void build_events(); + + I_Decoder *create_decoder(); + + virtual void SetUp() override { + I_EventsStream_GTest::SetUp(); + } + + virtual void TearDown() override { + I_EventsStream_GTest::TearDown(); + } + + std::vector events1_, events2_; +}; + +template<> +I_Decoder *I_EventsStreamT_GTest::create_decoder() { + static constexpr bool TimeShiftingEnabled = false; + + DeviceBuilder device_builder = make_device_builder(); + + auto cd_event_decoder = device_builder.add_facility(std::make_unique>()); + auto ext_trigger_event_decoder = device_builder.add_facility(std::make_unique>()); + auto decoder = device_builder.add_facility( + std::make_unique(TimeShiftingEnabled, cd_event_decoder, ext_trigger_event_decoder)); + device_ = device_builder(); + + return decoder.get(); +} + +template<> +void I_EventsStreamT_GTest::build_events() { + events1_ = { + {16, 345, 1, 1642}, {3, 360, 0, 3292}, {365, 61, 1, 4977}, {119, 44, 0, 6631}, {24, 349, 1, 8258}, + {41, 339, 1, 9908}, {132, 52, 0, 11577}, {373, 106, 1, 13210}, {2, 334, 1, 14842}, {8, 379, 1, 16516}, + {329, 89, 1, 18179}, {45, 380, 1, 19810}, {22, 350, 0, 21510}, {329, 93, 1, 23207}, {67, 249, 0, 24944}, + {11, 240, 1, 26619}, {12, 353, 1, 28315}, {35, 422, 1, 30047}, {256, 117, 1, 31821}, {14, 311, 0, 33520}, + {128, 66, 1, 35253}, {44, 284, 0, 37005}, {72, 248, 0, 38783}, {9, 369, 1, 40490}, {30, 323, 1, 42220}, + {16, 325, 1, 43976}, {45, 321, 1, 45754}, {26, 322, 1, 47477}, {30, 317, 1, 49236}, {116, 57, 1, 50977}, + {249, 47, 1, 52740}, {122, 47, 0, 54440}, {12, 373, 1, 56164}, {43, 332, 0, 57866}, {38, 369, 1, 59574}, + {2, 328, 0, 61313}, {16, 355, 1, 63035}, {32, 308, 1, 64797}, {296, 109, 0, 66553}, {40, 308, 1, 68284}, + {358, 54, 1, 70002}, {287, 47, 1, 71769}, {326, 28, 1, 73513}, {68, 223, 0, 75246}, {34, 304, 1, 77010}, + {359, 53, 1, 78756}, {72, 222, 0, 80496}, {1, 326, 0, 82262}, {284, 105, 0, 84020}, {123, 36, 1, 85803}, + {142, 54, 1, 87545}, {12, 278, 0, 89275}, {287, 112, 1, 91028}, {278, 102, 0, 92819}, {11, 334, 1, 94596}, + {40, 287, 1, 96320}, {120, 32, 1, 98113}, {78, 223, 0, 99845}, {53, 336, 1, 101530}, {345, 47, 0, 103286}, + {35, 295, 0, 105032}, {8, 321, 1, 106761}, {254, 36, 1, 108485}, {23, 281, 1, 110214}, {36, 296, 0, 111941}, + {4, 279, 1, 113679}, {239, 51, 1, 115390}, {50, 251, 0, 117156}}; +} + +typedef ::testing::Types TestingTypes; + +TYPED_TEST_CASE(I_EventsStreamT_GTest, TestingTypes); + +TYPED_TEST(I_EventsStreamT_GTest, test_log) { + // Get tmp file name + std::string filename(this->tmpdir_handler_->get_full_path("log.raw")); + + // Firmware, serial, system_id and data are added through the + // common events stream automatically + this->events_stream_->log_raw_data(filename); + + using EvtFormat = typename metavision_device_traits::RawEventFormat; + + TEncoder encoder; + std::vector data; + + encoder.set_encode_event_callback( + [&data](const uint8_t *ev, const uint8_t *ev_end) { data.insert(data.end(), ev, ev_end); }); + + // Encode + encoder.encode(this->events1_.data(), this->events1_.data() + this->events1_.size()); + encoder.flush(); + long n_events; + this->events_stream_->get_latest_raw_data(n_events); + this->dt_->trigger_transfer(data); + + // REMARK : as of today, in order to log we have to call + // get_latest_raw_data before add_data and after + // TODO : remove this following line if we modify the behaviour + // of log_data (for example if we log when calling add_data or if + // we log in a separate thread) + this->events_stream_->get_latest_raw_data(n_events); + this->events_stream_->stop_log_raw_data(); + + // Now open the file and verify what is written : + std::ifstream file(filename, std::ios::in | std::ios::binary); + ASSERT_TRUE(file.is_open()); + + // Get the header + PseeRawFileHeader header_read(file); + ASSERT_FALSE(header_read.empty()); + ASSERT_EQ(MockHWIdentification::dummy_serial_, header_read.get_serial()); + ASSERT_EQ(MockHWIdentification::is_evt3 ? "EVT3" : "EVT2", header_read.get_format()); + ASSERT_EQ(this->system_id_, header_read.get_system_id()); + ASSERT_EQ(MockHWIdentification::dummy_sub_system_id_, header_read.get_sub_system_id()); + ASSERT_EQ(MockHWIdentification::dummy_integrator_name_, header_read.get_integrator_name()); + ASSERT_EQ(MockHWIdentification::dummy_custom_value_, + header_read.get_field(MockHWIdentification::dummy_custom_key_)); + + // Read the file + + // Check length + auto position_first_data = file.tellg(); // Get the current position in the file + file.seekg(0, std::ios::end); // Go to the end of the file + auto n_tot_data = (file.tellg() - position_first_data); // Compute the number of data + file.seekg(position_first_data); // Reset the position at the + // first event + char *buffer = new char[n_tot_data]; + + // Read data as a block: + file.read(buffer, n_tot_data); + ASSERT_EQ(n_tot_data, file.gcount()); + + // Verify we have read everything + file.read(buffer, n_tot_data); + ASSERT_EQ(0, file.gcount()); + ASSERT_TRUE(file.eof()); + file.close(); + + // Decode the buffer received : + uint8_t *buffer_to_decode = reinterpret_cast(buffer); + + // Decoder + auto decoder = this->create_decoder(); + + std::vector decoded_events; + auto td_decoder = this->device_->template get_facility>(); + td_decoder->add_event_buffer_callback([&decoded_events](const EventCD *begin, const EventCD *end) { + decoded_events.insert(decoded_events.end(), begin, end); + }); + + decoder->decode(buffer_to_decode, buffer_to_decode + n_tot_data); + + ASSERT_EQ(this->events1_.size(), decoded_events.size()); + auto it_expected = this->events1_.begin(); + auto it = decoded_events.begin(); + + using SizeType = std::vector::size_type; + for (SizeType i = 0, max_i = this->events1_.size(); i < max_i; ++i, ++it, ++it_expected) { + EXPECT_EQ(it_expected->x, it->x); + EXPECT_EQ(it_expected->y, it->y); + EXPECT_EQ(it_expected->p, it->p); + EXPECT_EQ(it_expected->t, it->t); + } + + delete[] buffer; +} diff --git a/hal_psee_plugins/test/psee_decoder_gtest.cpp b/hal_psee_plugins/test/psee_decoder_gtest.cpp new file mode 100644 index 000000000..1ead0b05d --- /dev/null +++ b/hal_psee_plugins/test/psee_decoder_gtest.cpp @@ -0,0 +1,496 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include +#include +#include +#include +#include + +#include "metavision/utils/gtest/gtest_with_tmp_dir.h" +#include "metavision/utils/gtest/gtest_custom.h" +#include "metavision/sdk/base/events/event_cd.h" +#include "metavision/sdk/base/utils/get_time.h" +#include "metavision/hal/device/device_discovery.h" +#include "metavision/hal/device/device.h" +#include "metavision/hal/facilities/i_event_decoder.h" +#include "metavision/hal/facilities/i_events_stream.h" +#include "metavision/hal/utils/hal_exception.h" +#include "metavision/hal/facilities/i_decoder.h" +#include "devices/utils/device_system_id.h" +#include "boards/rawfile/psee_raw_file_header.h" +#include "tencoder_gtest_common.h" + +using namespace Metavision; +class PseeDecoder_Gtest : public GTestWithTmpDir { +protected: + virtual void SetUp() { + tmp_file_ = tmpdir_handler_->get_full_path("PseeDecoder_Gtest.raw"); + } + + virtual void TearDown() { + close_file(); + } + + void write_header(const PseeRawFileHeader &header) { + (*log_raw_data_) << header; + } + + PseeRawFileHeader get_default_header() { + auto header = std::stringstream(); + header << "\% Date 2014-02-28 13:37:42" << std::endl + << "\% system_ID " << dummy_system_id << std::endl + << "\% integrator_name " << get_psee_plugin_integrator_name() << std::endl + << "\% plugin_name hal_plugin_gen31_fx3" << std::endl + << "\% firmware_version 0.0.0" << std::endl + << "\% evt 2.0" << std::endl + << "\% subsystem_ID " << dummy_sub_system_id_ << std::endl + << "\% " << dummy_custom_key_ << " " << dummy_custom_value_ << std::endl + << "\% serial_number " << dummy_serial_ << std::endl; + return PseeRawFileHeader(header); + } + + void open_file() { + log_raw_data_.reset(new std::ofstream(tmp_file_, std::ios::binary)); + } + + void close_file() { + if (log_raw_data_) { + log_raw_data_->close(); + } + } + + std::pair, std::vector> write_evt2_raw_data_with_trigger() { + std::pair, std::vector> data; + open_file(); + + write_header(get_default_header()); + + data.first = build_vector_of_events(); + data.second = build_vector_of_events(); + TEncoder encoder; + encoder.set_encode_event_callback([&](const uint8_t *data, const uint8_t *data_end) { + log_raw_data_->write(reinterpret_cast(data), std::distance(data, data_end)); + bytes_written_ += std::distance(data, data_end); + }); + + encoder.encode(data.first.cbegin(), data.first.cend(), data.second.cbegin(), data.second.cend()); + encoder.flush(); + close_file(); + + return data; + } + + std::string tmp_file_; + std::unique_ptr log_raw_data_; + size_t bytes_written_{0}; + + static const std::string dummy_serial_; + static const std::string dummy_plugin_name_; + static const std::string integrator_name_; + static const std::string dummy_events_type_; + static const std::string dummy_custom_key_; + static const std::string dummy_custom_value_; + + static constexpr SystemId dummy_system_id = SystemId::SYSTEM_CCAM3_GEN31; + static constexpr long dummy_system_version_ = 0; + static constexpr long dummy_sub_system_id_ = 0; +}; + +constexpr long PseeDecoder_Gtest::dummy_system_version_; +constexpr SystemId PseeDecoder_Gtest::dummy_system_id; +constexpr long PseeDecoder_Gtest::dummy_sub_system_id_; +const std::string PseeDecoder_Gtest::dummy_serial_ = "dummy_serial"; +const std::string PseeDecoder_Gtest::dummy_plugin_name_ = "plugin_name"; +const std::string PseeDecoder_Gtest::integrator_name_ = get_psee_plugin_integrator_name(); +const std::string PseeDecoder_Gtest::dummy_events_type_ = "events_type"; +const std::string PseeDecoder_Gtest::dummy_custom_key_ = "custom"; +const std::string PseeDecoder_Gtest::dummy_custom_value_ = "field"; + +using SizeTypeFirst = std::vector::size_type; +using SizeTypeSecond = std::vector::size_type; + +TEST_F(PseeDecoder_Gtest, decode_evt2_data_nominal) { + // GIVEN a RAW file in EVT2 format with a known content + const auto expected_events = write_evt2_raw_data_with_trigger(); + std::vector received_cd_events; + std::vector received_triggers_events; + + RawFileConfig cfg; + cfg.do_time_shifting_ = false; + std::unique_ptr device(DeviceDiscovery::open_raw_file(tmp_file_, cfg)); + + if (!device) { + std::cerr << "Failed to open raw file." << std::endl; + FAIL(); + } + + // AND a PSEE decoder of CD & triggers events + auto decoder = device->get_facility(); + auto cd_decoder = device->get_facility>(); + auto trigger_decoder = device->get_facility>(); + auto es = device->get_facility(); + + ASSERT_NE(nullptr, decoder); + ASSERT_NE(nullptr, cd_decoder); + ASSERT_NE(nullptr, trigger_decoder); + ASSERT_NE(nullptr, es); + + cd_decoder->add_event_buffer_callback( + [&](auto ev_begin, auto ev_end) { received_cd_events.insert(received_cd_events.end(), ev_begin, ev_end); }); + trigger_decoder->add_event_buffer_callback([&](auto trigger, auto trigger_end) { + received_triggers_events.insert(received_triggers_events.end(), trigger, trigger_end); + }); + + es->start(); + + // WHEN we stream and decode the events in the file + long int bytes_polled_count; + while (es->wait_next_buffer() >= 0) { + auto raw_buffer = es->get_latest_raw_data(bytes_polled_count); + decoder->decode(raw_buffer, raw_buffer + bytes_polled_count); + } + + // THEN We decode the same data CD & triggers that are encoded in the RAW file + ASSERT_EQ(expected_events.first.size(), received_cd_events.size()); + for (SizeTypeFirst i = 0, i_end = expected_events.first.size(); i < i_end; ++i) { + ASSERT_EQ(expected_events.first[i].x, received_cd_events[i].x); + ASSERT_EQ(expected_events.first[i].y, received_cd_events[i].y); + ASSERT_EQ(expected_events.first[i].p, received_cd_events[i].p); + ASSERT_EQ(expected_events.first[i].t, received_cd_events[i].t); + } + + ASSERT_EQ(expected_events.second.size(), received_triggers_events.size()); + for (SizeTypeSecond i = 0, i_end = expected_events.second.size(); i < i_end; ++i) { + ASSERT_EQ(expected_events.second[i].p, received_triggers_events[i].p); + ASSERT_EQ(expected_events.second[i].t, received_triggers_events[i].t); + ASSERT_EQ(expected_events.second[i].id, received_triggers_events[i].id); + } +} + +TEST_F(PseeDecoder_Gtest, decode_evt2_data_random_split_in_buffer) { + // GIVEN a RAW file in EVT2 format with a known content + const auto expected_events = write_evt2_raw_data_with_trigger(); + std::vector received_cd_events; + std::vector received_triggers_events; + + RawFileConfig cfg; + cfg.do_time_shifting_ = false; + std::unique_ptr device(DeviceDiscovery::open_raw_file(tmp_file_, cfg)); + + if (!device) { + std::cerr << "Failed to open raw file." << std::endl; + FAIL(); + } + + // AND a PSEE decoder of CD & triggers events + auto decoder = device->get_facility(); + auto cd_decoder = device->get_facility>(); + auto trigger_decoder = device->get_facility>(); + auto es = device->get_facility(); + + ASSERT_NE(nullptr, decoder); + ASSERT_NE(nullptr, cd_decoder); + ASSERT_NE(nullptr, trigger_decoder); + ASSERT_NE(nullptr, es); + + cd_decoder->add_event_buffer_callback( + [&](auto ev_begin, auto ev_end) { received_cd_events.insert(received_cd_events.end(), ev_begin, ev_end); }); + trigger_decoder->add_event_buffer_callback([&](auto trigger, auto trigger_end) { + received_triggers_events.insert(received_triggers_events.end(), trigger, trigger_end); + }); + + es->start(); + + // WHEN we stream and decode events in buffer of random size + long int bytes_polled_count; + while (es->wait_next_buffer() >= 0) { + auto raw_buffer = es->get_latest_raw_data(bytes_polled_count); + auto raw_buffer_end = raw_buffer + bytes_polled_count; + auto raw_data_to_decode_count = 2 * (bytes_polled_count / 10) + + 1; // Ensures odd number of bytes so that we have split in middle of raw event + auto raw_buffer_decode_to = raw_buffer + raw_data_to_decode_count; + + for (; raw_buffer < raw_buffer_end;) { + decoder->decode(raw_buffer, raw_buffer_decode_to); + raw_buffer = raw_buffer_decode_to; + raw_buffer_decode_to = std::min(raw_buffer + raw_data_to_decode_count, raw_buffer_end); + } + } + + // THEN We decode the same data CD & triggers that are encoded in the RAW file + ASSERT_EQ(expected_events.first.size(), received_cd_events.size()); + for (SizeTypeFirst i = 0, i_end = expected_events.first.size(); i < i_end; ++i) { + ASSERT_EQ(expected_events.first[i].x, received_cd_events[i].x); + ASSERT_EQ(expected_events.first[i].y, received_cd_events[i].y); + ASSERT_EQ(expected_events.first[i].p, received_cd_events[i].p); + ASSERT_EQ(expected_events.first[i].t, received_cd_events[i].t); + } + + ASSERT_EQ(expected_events.second.size(), received_triggers_events.size()); + for (SizeTypeSecond i = 0, i_end = expected_events.second.size(); i < i_end; ++i) { + ASSERT_EQ(expected_events.second[i].p, received_triggers_events[i].p); + ASSERT_EQ(expected_events.second[i].t, received_triggers_events[i].t); + ASSERT_EQ(expected_events.second[i].id, received_triggers_events[i].id); + } +} + +TEST_F(PseeDecoder_Gtest, decode_evt2_data_byte_by_byte) { + // GIVEN a RAW file in EVT2 format with a known content + const auto expected_events = write_evt2_raw_data_with_trigger(); + std::vector received_cd_events; + std::vector received_triggers_events; + + RawFileConfig cfg; + cfg.do_time_shifting_ = false; + std::unique_ptr device(DeviceDiscovery::open_raw_file(tmp_file_, cfg)); + + if (!device) { + std::cerr << "Failed to open raw file." << std::endl; + FAIL(); + } + + // AND a PSEE decoder of CD & triggers events + auto decoder = device->get_facility(); + auto cd_decoder = device->get_facility>(); + auto trigger_decoder = device->get_facility>(); + auto es = device->get_facility(); + + ASSERT_NE(nullptr, decoder); + ASSERT_NE(nullptr, cd_decoder); + ASSERT_NE(nullptr, trigger_decoder); + ASSERT_NE(nullptr, es); + + cd_decoder->add_event_buffer_callback( + [&](auto ev_begin, auto ev_end) { received_cd_events.insert(received_cd_events.end(), ev_begin, ev_end); }); + trigger_decoder->add_event_buffer_callback([&](auto trigger, auto trigger_end) { + received_triggers_events.insert(received_triggers_events.end(), trigger, trigger_end); + }); + + es->start(); + + // WHEN we stream and decode data byte by byte data + long int bytes_polled_count; + while (es->wait_next_buffer() >= 0) { + auto raw_buffer = es->get_latest_raw_data(bytes_polled_count); + auto raw_buffer_end = raw_buffer + bytes_polled_count; + auto raw_data_to_decode_count = 1; + auto raw_buffer_decode_to = raw_buffer + raw_data_to_decode_count; + + for (; raw_buffer < raw_buffer_end;) { + decoder->decode(raw_buffer, raw_buffer_decode_to); + raw_buffer = raw_buffer_decode_to; + raw_buffer_decode_to = std::min(raw_buffer + raw_data_to_decode_count, raw_buffer_end); + } + } + + // THEN We decode the same data CD & triggers that are encoded in the RAW file + ASSERT_EQ(expected_events.first.size(), received_cd_events.size()); + for (SizeTypeFirst i = 0, i_end = expected_events.first.size(); i < i_end; ++i) { + ASSERT_EQ(expected_events.first[i].x, received_cd_events[i].x); + ASSERT_EQ(expected_events.first[i].y, received_cd_events[i].y); + ASSERT_EQ(expected_events.first[i].p, received_cd_events[i].p); + ASSERT_EQ(expected_events.first[i].t, received_cd_events[i].t); + } + + ASSERT_EQ(expected_events.second.size(), received_triggers_events.size()); + for (SizeTypeSecond i = 0, i_end = expected_events.second.size(); i < i_end; ++i) { + ASSERT_EQ(expected_events.second[i].p, received_triggers_events[i].p); + ASSERT_EQ(expected_events.second[i].t, received_triggers_events[i].t); + ASSERT_EQ(expected_events.second[i].id, received_triggers_events[i].id); + } +} + +TEST_F_WITH_DATASET(PseeDecoder_Gtest, decode_evt3_data_nominal) { + // GIVEN a RAW file in EVT3 format with a known content + std::string dataset_file_path = + (boost::filesystem::path(GtestsParameters::instance().dataset_dir) / "openeb" / "gen4_evt3_hand.raw").string(); + + size_t received_cd_event_count = 0; + RawFileConfig cfg; + cfg.do_time_shifting_ = false; + std::unique_ptr device(DeviceDiscovery::open_raw_file(dataset_file_path, cfg)); + + if (!device) { + std::cerr << "Failed to open raw file." << std::endl; + FAIL(); + } + + // AND a PSEE decoder of CD & triggers events + auto decoder = device->get_facility(); + auto cd_decoder = device->get_facility>(); + auto es = device->get_facility(); + + ASSERT_NE(nullptr, decoder); + ASSERT_NE(nullptr, cd_decoder); + ASSERT_NE(nullptr, es); + + cd_decoder->add_event_buffer_callback( + [&](auto ev_begin, auto ev_end) { received_cd_event_count += std::distance(ev_begin, ev_end); }); + + es->start(); + + // WHEN we stream and decode the events in the file + long int bytes_polled_count; + while (es->wait_next_buffer() >= 0) { + auto raw_buffer = es->get_latest_raw_data(bytes_polled_count); + decoder->decode(raw_buffer, raw_buffer + bytes_polled_count); + } + + // THEN We decode the same data CD & triggers that are encoded in the RAW file + ASSERT_EQ(18094969, received_cd_event_count); +} + +TEST_F_WITH_DATASET(PseeDecoder_Gtest, decode_evt3_data_random_split) { + // GIVEN a RAW file in EVT3 format with a known content + std::string dataset_file_path = + (boost::filesystem::path(GtestsParameters::instance().dataset_dir) / "openeb" / "gen4_evt3_hand.raw").string(); + + size_t received_cd_event_count = 0; + RawFileConfig cfg; + cfg.do_time_shifting_ = false; + std::unique_ptr device(DeviceDiscovery::open_raw_file(dataset_file_path, cfg)); + + if (!device) { + std::cerr << "Failed to open raw file." << std::endl; + FAIL(); + } + + // AND a PSEE decoder of CD & triggers events + auto decoder = device->get_facility(); + auto cd_decoder = device->get_facility>(); + auto es = device->get_facility(); + + ASSERT_NE(nullptr, decoder); + ASSERT_NE(nullptr, cd_decoder); + ASSERT_NE(nullptr, es); + + cd_decoder->add_event_buffer_callback( + [&](auto ev_begin, auto ev_end) { received_cd_event_count += std::distance(ev_begin, ev_end); }); + + es->start(); + + // WHEN we stream and decode events in buffer of random size + long int bytes_polled_count; + while (es->wait_next_buffer() >= 0) { + auto raw_buffer = es->get_latest_raw_data(bytes_polled_count); + auto raw_buffer_end = raw_buffer + bytes_polled_count; + auto raw_data_to_decode_count = 2 * (bytes_polled_count / 10) + + 1; // Ensures odd number of bytes so that we have split in middle of raw event + auto raw_buffer_decode_to = raw_buffer + raw_data_to_decode_count; + + for (; raw_buffer < raw_buffer_end;) { + decoder->decode(raw_buffer, raw_buffer_decode_to); + raw_buffer = raw_buffer_decode_to; + raw_buffer_decode_to = std::min(raw_buffer + raw_data_to_decode_count, raw_buffer_end); + } + } + + // THEN We decode the same data CD & triggers that are encoded in the RAW file + ASSERT_EQ(18094969, received_cd_event_count); +} + +TEST_F_WITH_DATASET(PseeDecoder_Gtest, decode_evt3_data_byte_by_byte) { + // GIVEN a RAW file in EVT3 format with a known content + std::string dataset_file_path = + (boost::filesystem::path(GtestsParameters::instance().dataset_dir) / "openeb" / "gen4_evt3_hand.raw").string(); + + size_t received_cd_event_count = 0; + RawFileConfig cfg; + cfg.do_time_shifting_ = false; + std::unique_ptr device(DeviceDiscovery::open_raw_file(dataset_file_path, cfg)); + + if (!device) { + std::cerr << "Failed to open raw file." << std::endl; + FAIL(); + } + + // AND a PSEE decoder of CD & triggers events + auto decoder = device->get_facility(); + auto cd_decoder = device->get_facility>(); + auto es = device->get_facility(); + + ASSERT_NE(nullptr, decoder); + ASSERT_NE(nullptr, cd_decoder); + ASSERT_NE(nullptr, es); + + cd_decoder->add_event_buffer_callback( + [&](auto ev_begin, auto ev_end) { received_cd_event_count += std::distance(ev_begin, ev_end); }); + + es->start(); + + // WHEN we stream and decode data byte by byte data + long int bytes_polled_count; + while (es->wait_next_buffer() >= 0) { + auto raw_buffer = es->get_latest_raw_data(bytes_polled_count); + auto raw_buffer_end = raw_buffer + bytes_polled_count; + auto raw_data_to_decode_count = 1; + auto raw_buffer_decode_to = raw_buffer + raw_data_to_decode_count; + + for (; raw_buffer < raw_buffer_end;) { + decoder->decode(raw_buffer, raw_buffer_decode_to); + raw_buffer = raw_buffer_decode_to; + raw_buffer_decode_to = std::min(raw_buffer + raw_data_to_decode_count, raw_buffer_end); + } + } + + // THEN We decode the same data CD & triggers that are encoded in the RAW file + ASSERT_EQ(18094969, received_cd_event_count); +} + +TEST_F_WITH_DATASET(PseeDecoder_Gtest, decode_evt3_nevents_monotonous_timestamps) { + // GIVEN a RAW file in EVT3 format with a known content + std::string dataset_file_path = + (boost::filesystem::path(GtestsParameters::instance().dataset_dir) / "openeb" / "gen4_evt3_hand.raw").string(); + + // AND a device configured to read by batches of n events + RawFileConfig cfg; + cfg.n_events_to_read_ = 10000; + std::unique_ptr device(DeviceDiscovery::open_raw_file(dataset_file_path, cfg)); + + if (!device) { + std::cerr << "Failed to open raw file." << std::endl; + FAIL(); + } + + // AND a PSEE decoder of CD & triggers events + auto decoder = device->get_facility(); + auto es = device->get_facility(); + + ASSERT_NE(nullptr, decoder); + ASSERT_NE(nullptr, es); + + es->start(); + + // WHEN we stream and decode data byte by byte + Metavision::timestamp previous_ts_last = 0; + long int bytes_polled_count; + while (es->wait_next_buffer() >= 0) { + auto raw_buffer = es->get_latest_raw_data(bytes_polled_count); + auto raw_buffer_end = raw_buffer + bytes_polled_count; + auto raw_data_to_decode_count = 1; + auto raw_buffer_decode_to = raw_buffer + raw_data_to_decode_count; + + for (; raw_buffer < raw_buffer_end;) { + decoder->decode(raw_buffer, raw_buffer_decode_to); + + // THEN the timestamps increase monotonously + Metavision::timestamp current_ts_last = decoder->get_last_timestamp(); + if (current_ts_last > 0) { + ASSERT_GE(current_ts_last, previous_ts_last); + previous_ts_last = current_ts_last; + } + + raw_buffer = raw_buffer_decode_to; + raw_buffer_decode_to = std::min(raw_buffer + raw_data_to_decode_count, raw_buffer_end); + } + } +} diff --git a/hal_psee_plugins/test/raw_file_header_gtest.cpp b/hal_psee_plugins/test/raw_file_header_gtest.cpp new file mode 100644 index 000000000..169c8b418 --- /dev/null +++ b/hal_psee_plugins/test/raw_file_header_gtest.cpp @@ -0,0 +1,49 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include +#include + +#include "metavision/utils/gtest/gtest_with_tmp_dir.h" +#include "metavision/utils/gtest/gtest_custom.h" +#include "metavision/hal/device/device_discovery.h" +#include "metavision/hal/device/device.h" +#include "metavision/hal/facilities/i_events_stream.h" +#include "metavision/hal/utils/hal_exception.h" +#include "metavision/hal/utils/raw_file_header.h" + +class RawFileHeader_Gtest : public Metavision::GTestWithTmpDir {}; + +TEST_F_WITH_CAMERA(RawFileHeader_Gtest, check_evt_format_is_in_psee_files_header, + camera_params(camera_param().integrator("Prophesee"))) { + std::string raw_file_name = tmpdir_handler_->get_full_path("recording.raw"); + { + std::unique_ptr device; + try { + device = Metavision::DeviceDiscovery::open(""); + } catch (const Metavision::HalException &e) { + std::cerr << e.what() << std::endl; + FAIL(); + } + + // Call log raw data, so that we write the header + bool log_success = device->get_facility()->log_raw_data(raw_file_name); + ASSERT_TRUE(log_success); + } + + std::ifstream ifs(raw_file_name); + ASSERT_TRUE(ifs.is_open()); + + Metavision::RawFileHeader header(ifs); + + ASSERT_FALSE(header.empty()); + ASSERT_FALSE(header.get_field("evt").empty()); +} diff --git a/hal_psee_plugins/test/tencoder_gtest.cpp b/hal_psee_plugins/test/tencoder_gtest.cpp new file mode 100644 index 000000000..49cc4b8f9 --- /dev/null +++ b/hal_psee_plugins/test/tencoder_gtest.cpp @@ -0,0 +1,208 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include "metavision/sdk/base/events/event2d.h" + +#include "tencoder.h" +#include "encoding_policies.h" +#include "tencoder_gtest_common.h" +#include "tencoder_gtest_instantiation.h" + +using namespace Metavision; + +template +struct GtestsParameters { + using EvtFormat = Format; + + using TimerHighRedundancyPolicy = TimerHighRedundancyPolicyType; + + static constexpr timestamp TIME_STEP = T_STEP; +}; + +template +class TEncoder_Gtest : public ::testing::Test { + using EvtFormat = typename Parameters::EvtFormat; + + using TimerHighRedundancyPolicy = typename Parameters::TimerHighRedundancyPolicy; + + using EncoderType = TEncoder; + +public: + TEncoder_Gtest() : encoder_(Parameters::TIME_STEP) {} + + virtual ~TEncoder_Gtest() {} + + template + void encode_and_decode(const std::vector &events_to_encode, std::vector &decoded_events) { + encode_all_events_and_decode_them_back(events_to_encode, decoded_events); + } + + template + void encode_and_decode(const std::vector &events_to_encode, std::vector &decoded_events, + const std::vector &events_to_encode2, std::vector &decoded_events2) { + // Encode the events + encoder_.encode(events_to_encode.cbegin(), events_to_encode.cend(), events_to_encode2.cbegin(), + events_to_encode2.cend()); + encoder_.flush(); + + // Now, decode back the events + setup_decoders_and_decode(encoded_buffer_, decoded_events, decoded_events2); + } + + template + void encode_and_decode(const std::vector &events_to_encode, std::vector &decoded_events, + const std::vector &events_to_encode2, std::vector &decoded_events2, + const std::vector &events_to_encode3, std::vector &decoded_events3) { + // Encode the events + encoder_.encode(events_to_encode.cbegin(), events_to_encode.cend(), events_to_encode2.cbegin(), + events_to_encode2.cend(), events_to_encode3.cbegin(), events_to_encode3.cend()); + encoder_.flush(); + + // Now, decode back the events + setup_decoders_and_decode(encoded_buffer_, decoded_events, decoded_events2, decoded_events3); + } + + template + void encode_and_decode(const std::vector &events_to_encode, std::vector &decoded_events, + const std::vector &events_to_encode2, std::vector &decoded_events2, + const std::vector &events_to_encode3, std::vector &decoded_events3, + const std::vector &events_to_encode4, std::vector &decoded_events4) { + // Encode the events + encoder_.encode(events_to_encode.cbegin(), events_to_encode.cend(), events_to_encode2.cbegin(), + events_to_encode2.cend(), events_to_encode3.cbegin(), events_to_encode3.cend(), + events_to_encode4.cbegin(), events_to_encode4.cend()); + encoder_.flush(); + + // Now, decode back the events + setup_decoders_and_decode(encoded_buffer_, decoded_events, decoded_events2, decoded_events3, + decoded_events4); + } + +protected: + virtual void SetUp() override { + encoder_.set_encode_event_callback( + [this](const uint8_t *b, const uint8_t *e) { encoded_buffer_.insert(encoded_buffer_.end(), b, e); }); + } + + virtual void TearDown() override {} + + EncoderType encoder_; + std::vector encoded_buffer_; +}; + +TYPED_TEST_CASE(TEncoder_Gtest, TestingTypes); + +TYPED_TEST(TEncoder_Gtest, test_timer_high_redundancy_timer_high_value) { + using EvtFormat = typename TypeParam::EvtFormat; + using TimerHighRedundancyPolicy = typename TypeParam::TimerHighRedundancyPolicy; + using CameraEvent2dTD = typename event2d_types_def::event2d_TD_class; + + static constexpr timestamp TH = (1 << event_raw_format_traits::NLowerBitsTH) - 1; + static constexpr timestamp TH2 = 2 * (1 << event_raw_format_traits::NLowerBitsTH); + + std::vector tds = {CameraEvent2dTD(288, 64, 1, TH), CameraEvent2dTD(288, 64, 1, TH2)}; + + // Encode + this->encoder_.encode(tds.begin(), tds.end()); + this->encoder_.flush(); + + // Count number of Timer High events + + // Get the expected value : + + // Timer-high raw event + TimerHighEncoder th_encoder; + ASSERT_EQ(sizeof(typename event_raw_format_traits::BaseEventType), + th_encoder.template get_size_encoded<>()); + typename event_raw_format_traits::BaseEventType ev_th; + th_encoder.initialize(TH); + th_encoder.template encode_next_event<>(reinterpret_cast(&ev_th)); + + // First is always 1 (because when we start encoding we just encode the latest time high): + EXPECT_EQ(1, count_how_many_time_high(ev_th, this->encoded_buffer_)); + + // The second must be TypeParam::TimerHighRedundancyPolicy::REDUNDANCY_FACTOR + th_encoder.template encode_next_event<>(reinterpret_cast(&ev_th)); + EXPECT_EQ(TypeParam::TimerHighRedundancyPolicy::REDUNDANCY_FACTOR, + count_how_many_time_high(ev_th, this->encoded_buffer_)); +} + +TYPED_TEST(TEncoder_Gtest, test_time_overflow) { + using EvtFormat = typename TypeParam::EvtFormat; + using CameraEvent2dTD = typename event2d_types_def::event2d_TD_class; + + static constexpr timestamp MAX_TH = timestamp((1 << 28) - 1) << event_raw_format_traits::NLowerBitsTH; + + std::vector tds = { + CameraEvent2dTD(288, 64, 1, MAX_TH - 5000), CameraEvent2dTD(228, 166, 0, MAX_TH - 4000), + CameraEvent2dTD(162, 166, 1, MAX_TH - 3000), CameraEvent2dTD(186, 166, 1, MAX_TH - 2000), + CameraEvent2dTD(288, 64, 1, MAX_TH - 1000), CameraEvent2dTD(228, 166, 0, MAX_TH - 900), + CameraEvent2dTD(162, 166, 1, MAX_TH - 800), CameraEvent2dTD(186, 166, 1, MAX_TH - 700), + CameraEvent2dTD(17, 236, 0, MAX_TH - 600), CameraEvent2dTD(85, 159, 1, MAX_TH - 500), + CameraEvent2dTD(274, 154, 0, MAX_TH - 400), CameraEvent2dTD(233, 154, 1, MAX_TH - 300), + CameraEvent2dTD(0, 154, 1, MAX_TH - 200), CameraEvent2dTD(184, 175, 0, MAX_TH - 100), + CameraEvent2dTD(64, 175, 0, MAX_TH - 10), CameraEvent2dTD(155, 161, 1, MAX_TH - 5), + CameraEvent2dTD(16, 161, 1, MAX_TH), CameraEvent2dTD(169, 223, 0, MAX_TH + 5), + CameraEvent2dTD(162, 223, 1, MAX_TH + 10), CameraEvent2dTD(206, 173, 0, MAX_TH + 100), + CameraEvent2dTD(175, 173, 1, MAX_TH + 200), CameraEvent2dTD(177, 173, 0, MAX_TH + 300), + CameraEvent2dTD(153, 173, 1, MAX_TH + 400), CameraEvent2dTD(71, 171, 1, MAX_TH + 500), + CameraEvent2dTD(233, 163, 1, MAX_TH + 600), CameraEvent2dTD(137, 158, 0, MAX_TH + 700), + CameraEvent2dTD(36, 135, 0, MAX_TH + 800), CameraEvent2dTD(197, 112, 0, MAX_TH + 900), + CameraEvent2dTD(26, 188, 1, MAX_TH + 1000), CameraEvent2dTD(25, 169, 1, MAX_TH + 2000), + CameraEvent2dTD(113, 220, 1, MAX_TH + 3000), CameraEvent2dTD(147, 193, 1, MAX_TH + 4000), + CameraEvent2dTD(224, 138, 0, MAX_TH + 5000)}; + + // Encode and decode back + std::vector tds_decoded; + this->encode_and_decode(tds, tds_decoded); + + // Now check the contents of vectors of decoded events + + // TDs : + compare_vectors(tds, tds_decoded); +} + +TYPED_TEST(TEncoder_Gtest, td_and_ext_trigger) { + using EvtFormat = typename TypeParam::EvtFormat; + using CameraEvent2dTD = typename event2d_types_def::event2d_TD_class; + + std::vector tds = build_vector_of_events(); + std::vector triggs = build_vector_of_events(); + + // Encode and decode back + std::vector tds_decoded; + std::vector triggs_decoded; + this->encode_and_decode(tds, tds_decoded, triggs, triggs_decoded); + + // Now check the contents of vectors of decoded events + + // TDs : + compare_vectors(tds, tds_decoded); + + // Triggers : + compare_vectors(triggs, triggs_decoded); +} + +TYPED_TEST(TEncoder_Gtest, td_empty_encoding) { + using EvtFormat = typename TypeParam::EvtFormat; + using CameraEvent2dTD = typename event2d_types_def::event2d_TD_class; + + std::vector tds; + + // Encode and decode back + std::vector tds_decoded; + this->encode_and_decode(tds, tds_decoded); + + // Now check the contents of vectors of decoded events + + // TDs : + compare_vectors(tds, tds_decoded); +} diff --git a/hal_psee_plugins/test/tencoder_gtest_instantiation.h b/hal_psee_plugins/test/tencoder_gtest_instantiation.h new file mode 100644 index 000000000..610606cd3 --- /dev/null +++ b/hal_psee_plugins/test/tencoder_gtest_instantiation.h @@ -0,0 +1,38 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_HAL_TENCODER_GTEST_INSTANTIATION_H +#define METAVISION_HAL_TENCODER_GTEST_INSTANTIATION_H + +#include + +#include "metavision/sdk/base/utils/timestamp.h" +#include "evt2_raw_format.h" +#include "encoding_policies.h" + +template +struct GtestsParameters; + +typedef ::testing::Types, + GtestsParameters, + GtestsParameters, + GtestsParameters, + GtestsParameters, + GtestsParameters, + GtestsParameters, + GtestsParameters, + GtestsParameters, + GtestsParameters, + GtestsParameters, + GtestsParameters> + TestingTypes; + +#endif // METAVISION_HAL_TENCODER_GTEST_INSTANTIATION_H diff --git a/hal_psee_plugins/test/timer_high_encoder_gtest.cpp b/hal_psee_plugins/test/timer_high_encoder_gtest.cpp new file mode 100644 index 000000000..10b5a1ed1 --- /dev/null +++ b/hal_psee_plugins/test/timer_high_encoder_gtest.cpp @@ -0,0 +1,153 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include + +#include "decoders/base/event_base.h" +#include "timer_high_encoder.h" +#include "evt2_raw_format.h" +#include "encoding_policies.h" + +using namespace Metavision; + +class TimerHighEncoder_GTest : public ::testing::Test { +protected: + virtual void SetUp() override {} + + virtual void TearDown() override {} +}; + +TEST_F(TimerHighEncoder_GTest, evt2_get_size_encoded) { + TimerHighEncoder t_encoder; + EXPECT_EQ(4, t_encoder.get_size_encoded()); +} + +TEST_F(TimerHighEncoder_GTest, evt2_no_redundancy_initialize) { + // EVT1 TH STEP is 64 + + TimerHighEncoder t_encoder; + EXPECT_EQ(0, t_encoder.get_current_time_high()); + EXPECT_EQ(0, t_encoder.get_next_timestamp_to_encode()); + + t_encoder.initialize(50); + EXPECT_EQ(0, t_encoder.get_current_time_high()); + EXPECT_EQ(0, t_encoder.get_next_timestamp_to_encode()); + + t_encoder.initialize(102); + EXPECT_EQ(64, t_encoder.get_current_time_high()); + EXPECT_EQ(64, t_encoder.get_next_timestamp_to_encode()); + + t_encoder.initialize(353); + EXPECT_EQ(320, t_encoder.get_current_time_high()); + EXPECT_EQ(320, t_encoder.get_next_timestamp_to_encode()); + + t_encoder.initialize(6413); + EXPECT_EQ(6400, t_encoder.get_current_time_high()); + EXPECT_EQ(6400, t_encoder.get_next_timestamp_to_encode()); +} + +TEST_F(TimerHighEncoder_GTest, evt2_redundancy_default_initialize) { + // EVT1 TH STEP is 64, repeated every 16 us + + TimerHighEncoder t_encoder; + EXPECT_EQ(0, t_encoder.get_current_time_high()); + EXPECT_EQ(0, t_encoder.get_next_timestamp_to_encode()); + + t_encoder.initialize(1626); + EXPECT_EQ(1600, t_encoder.get_current_time_high()); + EXPECT_EQ(1616, t_encoder.get_next_timestamp_to_encode()); + + t_encoder.initialize(2048); + EXPECT_EQ(2048, t_encoder.get_current_time_high()); + EXPECT_EQ(2048, t_encoder.get_next_timestamp_to_encode()); + + t_encoder.initialize(4030); + EXPECT_EQ(3968, t_encoder.get_current_time_high()); + EXPECT_EQ(4016, t_encoder.get_next_timestamp_to_encode()); + + t_encoder.initialize(5800); + EXPECT_EQ(5760, t_encoder.get_current_time_high()); + EXPECT_EQ(5792, t_encoder.get_next_timestamp_to_encode()); +} + +TEST_F(TimerHighEncoder_GTest, evt2_no_redundancy_encode) { + TimerHighEncoder t_encoder; + t_encoder.initialize(6413); + + ASSERT_EQ(sizeof(EventBase::RawEvent), t_encoder.get_size_encoded()); + EventBase::RawEvent th; + + t_encoder.encode_next_event(reinterpret_cast(&th)); + EXPECT_EQ(8, th.type); + EXPECT_EQ(6400, (th.trail) << 6); // i.e EXPECT_EQ(100, th.trail); + EXPECT_EQ(6400, t_encoder.get_current_time_high()); + EXPECT_EQ(6464, t_encoder.get_next_timestamp_to_encode()); +} + +TEST_F(TimerHighEncoder_GTest, evt2_redundancy_default_encode) { + TimerHighEncoder t_encoder; + t_encoder.initialize(6430); + + ASSERT_EQ(sizeof(EventBase::RawEvent), t_encoder.get_size_encoded()); + EventBase::RawEvent th; + + // Check we encode 3 times 6400 (because 6430is between the 2nd and 3rd repetition) + t_encoder.encode_next_event(reinterpret_cast(&th)); + EXPECT_EQ(8, th.type); + EXPECT_EQ(6400, (th.trail) << 6); // i.e EXPECT_EQ(100, th.trail); + EXPECT_EQ(6400, t_encoder.get_current_time_high()); + EXPECT_EQ(6432, t_encoder.get_next_timestamp_to_encode()); + + t_encoder.encode_next_event(reinterpret_cast(&th)); + EXPECT_EQ(8, th.type); + EXPECT_EQ(6400, (th.trail) << 6); // i.e EXPECT_EQ(100, th.trail); + EXPECT_EQ(6400, t_encoder.get_current_time_high()); + EXPECT_EQ(6448, t_encoder.get_next_timestamp_to_encode()); + t_encoder.encode_next_event(reinterpret_cast(&th)); + + EXPECT_EQ(8, th.type); + EXPECT_EQ(6400, (th.trail) << 6); // i.e EXPECT_EQ(100, th.trail); + EXPECT_EQ(6400, t_encoder.get_current_time_high()); + EXPECT_EQ(6464, t_encoder.get_next_timestamp_to_encode()); + + // Check we encode 4 times the same : + + t_encoder.encode_next_event(reinterpret_cast(&th)); + EXPECT_EQ(8, th.type); + EXPECT_EQ(6464, (th.trail) << 6); // i.e EXPECT_EQ(101, th.trail); + EXPECT_EQ(6464, t_encoder.get_current_time_high()); + EXPECT_EQ(6480, t_encoder.get_next_timestamp_to_encode()); + + t_encoder.encode_next_event(reinterpret_cast(&th)); + EXPECT_EQ(8, th.type); + EXPECT_EQ(6464, (th.trail) << 6); // i.e EXPECT_EQ(101, th.trail); + EXPECT_EQ(6464, t_encoder.get_current_time_high()); + EXPECT_EQ(6496, t_encoder.get_next_timestamp_to_encode()); + + t_encoder.encode_next_event(reinterpret_cast(&th)); + EXPECT_EQ(8, th.type); + EXPECT_EQ(6464, (th.trail) << 6); // i.e EXPECT_EQ(101, th.trail); + EXPECT_EQ(6464, t_encoder.get_current_time_high()); + EXPECT_EQ(6512, t_encoder.get_next_timestamp_to_encode()); + + t_encoder.encode_next_event(reinterpret_cast(&th)); + EXPECT_EQ(8, th.type); + EXPECT_EQ(6464, (th.trail) << 6); // i.e EXPECT_EQ(101, th.trail); + EXPECT_EQ(6464, t_encoder.get_current_time_high()); + EXPECT_EQ(6528, t_encoder.get_next_timestamp_to_encode()); + + // Check we update timestamp next time we encode : + t_encoder.encode_next_event(reinterpret_cast(&th)); + EXPECT_EQ(8, th.type); + EXPECT_EQ(6528, (th.trail) << 6); // i.e EXPECT_EQ(102, th.trail); + EXPECT_EQ(6528, t_encoder.get_current_time_high()); + EXPECT_EQ(6544, t_encoder.get_next_timestamp_to_encode()); +} diff --git a/sdk/cmake/MetavisionSDKCPackConfig.cmake b/sdk/cmake/MetavisionOffersCPackConfig.cmake similarity index 64% rename from sdk/cmake/MetavisionSDKCPackConfig.cmake rename to sdk/cmake/MetavisionOffersCPackConfig.cmake index b861845d9..fb579451d 100644 --- a/sdk/cmake/MetavisionSDKCPackConfig.cmake +++ b/sdk/cmake/MetavisionOffersCPackConfig.cmake @@ -11,12 +11,15 @@ # metavision-sdk-{modules} # ############################ include("${CMAKE_CURRENT_LIST_DIR}/MetavisionOpenCPackConfig.cmake") -if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/MetavisionSDKProCPackConfig.cmake") - include("${CMAKE_CURRENT_LIST_DIR}/MetavisionSDKProCPackConfig.cmake") -endif(EXISTS "${CMAKE_CURRENT_LIST_DIR}/MetavisionSDKProCPackConfig.cmake") -if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/MetavisionEssentialsCPackConfig.cmake") - include("${CMAKE_CURRENT_LIST_DIR}/MetavisionEssentialsCPackConfig.cmake") -endif(EXISTS "${CMAKE_CURRENT_LIST_DIR}/MetavisionEssentialsCPackConfig.cmake") +if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/MetavisionSDKAdvancedCPackConfig.cmake") + include("${CMAKE_CURRENT_LIST_DIR}/MetavisionSDKAdvancedCPackConfig.cmake") +endif(EXISTS "${CMAKE_CURRENT_LIST_DIR}/MetavisionSDKAdvancedCPackConfig.cmake") +if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/MetavisionSDKCPackConfig.cmake") + include("${CMAKE_CURRENT_LIST_DIR}/MetavisionSDKCPackConfig.cmake") +endif(EXISTS "${CMAKE_CURRENT_LIST_DIR}/MetavisionSDKCPackConfig.cmake") +if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/MetavisionStudioCPackConfig.cmake") + include("${CMAKE_CURRENT_LIST_DIR}/MetavisionStudioCPackConfig.cmake") +endif(EXISTS "${CMAKE_CURRENT_LIST_DIR}/MetavisionStudioCPackConfig.cmake") foreach(available_module IN LISTS METAVISION_SDK_MODULES_AVAILABLE) get_filename_component(module_cpack_config "${CMAKE_CURRENT_LIST_DIR}/../modules/${available_module}/cmake/MetavisionSDK_${available_module}CPackConfig.cmake" REALPATH) diff --git a/sdk/cmake/MetavisionOpenCPackConfig.cmake b/sdk/cmake/MetavisionOpenCPackConfig.cmake index b47b1036a..f57a22ffb 100644 --- a/sdk/cmake/MetavisionOpenCPackConfig.cmake +++ b/sdk/cmake/MetavisionOpenCPackConfig.cmake @@ -60,33 +60,39 @@ endforeach(available_open_module) ############################### # metavision-open-python3.X # ############################### -foreach (py_suffix ${PYTHON3_ALL_VERSIONS}) - set(CPACK_COMPONENT_METAVISION-OPEN-PYTHON${py_suffix}_DESCRIPTION "Metavision Open Python 3 libraries.\n${OPEN_PACKAGE_LICENSE}") - set(CPACK_COMPONENT_METAVISION-OPEN-PYTHON${py_suffix}_DEPENDS metavision-hal-python${py_suffix}) - foreach(available_open_module IN LISTS METAVISION_SDK_OPEN_MODULES_AVAILABLE) - if(metavision-sdk-${available_open_module}-python${py_suffix} IN_LIST components_to_install_public) - list(APPEND CPACK_COMPONENT_METAVISION-OPEN-PYTHON${py_suffix}_DEPENDS metavision-sdk-${available_open_module}-python${py_suffix}) - endif() - endforeach(available_open_module) -endforeach() +if (COMPILE_PYTHON3_BINDINGS) + foreach (py_suffix ${PYTHON3_ALL_VERSIONS}) + set(CPACK_COMPONENT_METAVISION-OPEN-PYTHON${py_suffix}_DESCRIPTION "Metavision Open Python 3 libraries.\n${OPEN_PACKAGE_LICENSE}") + set(CPACK_COMPONENT_METAVISION-OPEN-PYTHON${py_suffix}_DEPENDS metavision-hal-python${py_suffix}) + foreach(available_open_module IN LISTS METAVISION_SDK_OPEN_MODULES_AVAILABLE) + if(metavision-sdk-${available_open_module}-python${py_suffix} IN_LIST components_to_install_public) + list(APPEND CPACK_COMPONENT_METAVISION-OPEN-PYTHON${py_suffix}_DEPENDS metavision-sdk-${available_open_module}-python${py_suffix}) + endif() + endforeach(available_open_module) + endforeach() +endif (COMPILE_PYTHON3_BINDINGS) ########################### # metavision-open-python # ########################### -set(CPACK_COMPONENT_METAVISION-OPEN-PYTHON_DESCRIPTION "Metavision Open Python 3 Python Modules.\n${OPEN_PACKAGE_LICENSE}") -set(CPACK_COMPONENT_METAVISION-OPEN-PYTHON_DEPENDS) -list(APPEND CPACK_COMPONENT_METAVISION-OPEN-PYTHON_DEPENDS metavision-sdk-core-python) +if (COMPILE_PYTHON3_BINDINGS) + set(CPACK_COMPONENT_METAVISION-OPEN-PYTHON_DESCRIPTION "Metavision Open Python 3 Python Modules.\n${OPEN_PACKAGE_LICENSE}") + set(CPACK_COMPONENT_METAVISION-OPEN-PYTHON_DEPENDS) + # TODO: handle dependencies with a loop over modules with MV-517 + list(APPEND CPACK_COMPONENT_METAVISION-OPEN-PYTHON_DEPENDS metavision-sdk-core-python metavision-sdk-core-ml-python) +endif (COMPILE_PYTHON3_BINDINGS) #################################### # metavision-open-python-samples # #################################### -set(CPACK_COMPONENT_METAVISION-OPEN-PYTHON-SAMPLES_DESCRIPTION "Samples for Metavision Open Python 3 libraries.\n${OPEN_PACKAGE_LICENSE}") -set(CPACK_COMPONENT_METAVISION-OPEN-PYTHON-SAMPLES_DEPENDS) -foreach(available_open_module IN LISTS METAVISION_SDK_OPEN_MODULES_AVAILABLE) - if(metavision-sdk-${available_open_module}-python-samples IN_LIST components_to_install_public) - list(APPEND CPACK_COMPONENT_METAVISION-OPEN-PYTHON-SAMPLES_DEPENDS metavision-sdk-${available_open_module}-python-samples) - endif() -endforeach(available_open_module) - - +if (COMPILE_PYTHON3_BINDINGS) + set(CPACK_COMPONENT_METAVISION-OPEN-PYTHON-SAMPLES_DESCRIPTION "Samples for Metavision Open Python 3 libraries.\n${OPEN_PACKAGE_LICENSE}") + # TODO: handle core-ml dependency inside loop with MV-517 + set(CPACK_COMPONENT_METAVISION-OPEN-PYTHON-SAMPLES_DEPENDS metavision-sdk-core-ml-python-samples) + foreach(available_open_module IN LISTS METAVISION_SDK_OPEN_MODULES_AVAILABLE) + if(metavision-sdk-${available_open_module}-python-samples IN_LIST components_to_install_public) + list(APPEND CPACK_COMPONENT_METAVISION-OPEN-PYTHON-SAMPLES_DEPENDS metavision-sdk-${available_open_module}-python-samples) + endif() + endforeach(available_open_module) +endif (COMPILE_PYTHON3_BINDINGS) diff --git a/sdk/cmake/MetavisionSDKAdvancedCPackConfig.cmake b/sdk/cmake/MetavisionSDKAdvancedCPackConfig.cmake new file mode 100644 index 000000000..bea62efc3 --- /dev/null +++ b/sdk/cmake/MetavisionSDKAdvancedCPackConfig.cmake @@ -0,0 +1,98 @@ +# Copyright (c) Prophesee S.A. - All Rights Reserved +# +# Subject to Prophesee Metavision Licensing Terms and Conditions ("License T&C's"). +# You may not use this file except in compliance with these License T&C's. +# A copy of these License T&C's is located in the "licensing" folder accompanying this file. + +# Get the list of the registered public components +get_property(components_to_install_public GLOBAL PROPERTY list_cpack_public_components) + +################################## +# metavision-sdk-advanced-lib # +################################## + +# File and package name of the components are automatically set, just need to set the package description +set(CPACK_COMPONENT_METAVISION-SDK-ADVANCED-LIB_DESCRIPTION "Metavision SDK Advanced libraries.\n${PACKAGE_LICENSE}") +set(CPACK_COMPONENT_METAVISION-SDK-ADVANCED-LIB_DEPENDS metavision-open-lib) +foreach(available_module IN LISTS METAVISION_SDK_ADVANCED_MODULES_AVAILABLE) + if(metavision-sdk-${available_module}-lib IN_LIST components_to_install_public) + list(APPEND CPACK_COMPONENT_METAVISION-SDK-ADVANCED-LIB_DEPENDS metavision-sdk-${available_module}-lib) + endif() +endforeach(available_module) + +################################## +# metavision-sdk-advanced-bin # +################################## + +set(CPACK_COMPONENT_METAVISION-SDK-ADVANCED-BIN_DESCRIPTION "Metavision SDK Advanced applications.\n${PACKAGE_LICENSE}") +foreach(available_module IN LISTS METAVISION_SDK_ADVANCED_MODULES_AVAILABLE) + if(metavision-sdk-${available_module}-bin IN_LIST components_to_install_public) + list(APPEND CPACK_COMPONENT_METAVISION-SDK-ADVANCED-BIN_DEPENDS metavision-sdk-${available_module}-bin) + endif() +endforeach(available_module) + +#################################### +# metavision-sdk-advanced-dev # +#################################### +set(CPACK_COMPONENT_METAVISION-SDK-ADVANCED-DEV_DESCRIPTION "Development (C++) files for Metavision SDK Advanced libraries.\n${PACKAGE_LICENSE}") +set(CPACK_COMPONENT_METAVISION-SDK-ADVANCED-DEV_DEPENDS) +foreach(available_module IN LISTS METAVISION_SDK_ADVANCED_MODULES_AVAILABLE) + if(metavision-sdk-${available_module}-dev IN_LIST components_to_install_public) + list(APPEND CPACK_COMPONENT_METAVISION-SDK-ADVANCED-DEV_DEPENDS metavision-sdk-${available_module}-dev) + endif() +endforeach(available_module) + +##################################### +# metavision-sdk-advanced-samples # +##################################### +set(CPACK_COMPONENT_METAVISION-SDK-ADVANCED-SAMPLES_DESCRIPTION "Samples for Metavision SDK Advanced libraries.\n${OPEN_PACKAGE_LICENSE}") +set(CPACK_COMPONENT_METAVISION-SDK-ADVANCED-SAMPLES_DEPENDS) +foreach(available_module IN LISTS METAVISION_SDK_ADVANCED_MODULES_AVAILABLE) + if(metavision-sdk-${available_module}-samples IN_LIST components_to_install_public) + list(APPEND CPACK_COMPONENT_METAVISION-SDK-ADVANCED-SAMPLES_DEPENDS metavision-sdk-${available_module}-samples) + endif() +endforeach(available_module) + +##################################### +# metavision-sdk-advanced-python3.X # +##################################### +if (COMPILE_PYTHON3_BINDINGS) + foreach (py_suffix ${PYTHON3_ALL_VERSIONS}) + set(CPACK_COMPONENT_METAVISION-SDK-ADVANCED-PYTHON${py_suffix}_DESCRIPTION "Metavision SDK Advanced Python 3 libraries.\n${PACKAGE_LICENSE}") + set(CPACK_COMPONENT_METAVISION-SDK-ADVANCED-PYTHON${py_suffix}_DEPENDS metavision-open-python${py_suffix}) + foreach(available_module IN LISTS METAVISION_SDK_ADVANCED_MODULES_AVAILABLE) + if(metavision-sdk-${available_module}-python${py_suffix} IN_LIST components_to_install_public) + list(APPEND CPACK_COMPONENT_METAVISION-SDK-ADVANCED-PYTHON${py_suffix}_DEPENDS metavision-sdk-${available_module}-python${py_suffix}) + endif() + endforeach(available_module) + endforeach() +endif(COMPILE_PYTHON3_BINDINGS) + +################################## +# metavision-sdk-advanced-python # +################################## +if (COMPILE_PYTHON3_BINDINGS) + set(CPACK_COMPONENT_METAVISION-SDK-ADVANCED-PYTHON_DESCRIPTION "Metavision SDK Advanced Python 3 Modules.\n${PACKAGE_LICENSE}") + set(CPACK_COMPONENT_METAVISION-SDK-ADVANCED-PYTHON_DEPENDS metavision-open-python) + foreach(available_module IN LISTS METAVISION_SDK_ADVANCED_MODULES_AVAILABLE) + if(metavision-sdk-${available_module}-python IN_LIST components_to_install_public) + list(APPEND CPACK_COMPONENT_METAVISION-SDK-ADVANCED-PYTHON_DEPENDS metavision-sdk-${available_module}-python) + endif() + if(metavision-sdk-${available_module}-extended-python IN_LIST components_to_install_public) + list(APPEND CPACK_COMPONENT_METAVISION-SDK-ADVANCED-PYTHON_DEPENDS metavision-sdk-${available_module}-extended-python) + endif() + endforeach(available_module) +endif(COMPILE_PYTHON3_BINDINGS) + +########################################## +# metavision-sdk-advanced-python-samples # +########################################## +if (COMPILE_PYTHON3_BINDINGS) + set(CPACK_COMPONENT_METAVISION-SDK-ADVANCED-PYTHON-SAMPLES_DESCRIPTION "Samples for Metavision SDK Advanced Python 3 libraries.\n${PACKAGE_LICENSE}") + set(CPACK_COMPONENT_METAVISION-SDK-ADVANCED-PYTHON-SAMPLES_DEPENDS metavision-open-python-samples metavision-sdk-ml-extended-python-samples) + foreach(available_module IN LISTS METAVISION_SDK_ADVANCED_MODULES_AVAILABLE) + if(metavision-sdk-${available_module}-python-samples IN_LIST components_to_install_public) + list(APPEND CPACK_COMPONENT_METAVISION-SDK-ADVANCED-PYTHON-SAMPLES_DEPENDS metavision-sdk-${available_module}-python-samples) + endif() + endforeach(available_module) +endif(COMPILE_PYTHON3_BINDINGS) diff --git a/sdk/cmake/MetavisionSDKModulesHelper.cmake b/sdk/cmake/MetavisionSDKModulesHelper.cmake index edc44a1dc..771d519e0 100644 --- a/sdk/cmake/MetavisionSDKModulesHelper.cmake +++ b/sdk/cmake/MetavisionSDKModulesHelper.cmake @@ -387,15 +387,16 @@ endfunction(MetavisionSDK_add_module) ##################################################################### # -# Forward call to MetavisionSDK_add_module and install extra files related to Professional offer +# Forward call to MetavisionSDK_add_module and install sdk advanced files # # -function(MetavisionSDK_add_pro_module module_name) +function(MetavisionSDK_add_advanced_module module_name) MetavisionSDK_add_module(${module_name} ${ARGN}) - install(FILES "${PROJECT_SOURCE_DIR}/licensing/LICENSE_PROFESSIONAL" - DESTINATION share/metavision/licensing - ) + if(EXISTS "${PROJECT_SOURCE_DIR}/licensing/LICENSE_METAVISION_INTELLIGENCE") + install(FILES ${PROJECT_SOURCE_DIR}/licensing/LICENSE_METAVISION_INTELLIGENCE + DESTINATION share/metavision/licensing) + endif() -endfunction(MetavisionSDK_add_pro_module) +endfunction(MetavisionSDK_add_advanced_module) diff --git a/sdk/cmake/MetavisionSDKProCPackConfig.cmake b/sdk/cmake/MetavisionSDKProCPackConfig.cmake deleted file mode 100644 index 33eaa7c7b..000000000 --- a/sdk/cmake/MetavisionSDKProCPackConfig.cmake +++ /dev/null @@ -1,58 +0,0 @@ -# Copyright (c) Prophesee S.A. - All Rights Reserved -# -# Subject to Prophesee Metavision Licensing Terms and Conditions ("License T&C's"). -# You may not use this file except in compliance with these License T&C's. -# A copy of these License T&C's is located in the "licensing" folder accompanying this file. - -# Get the list of the registered public components -get_property(components_to_install_public GLOBAL PROPERTY list_cpack_public_components) - -############################# -# metavision-sdk-pro-lib # -############################# - -# File and package name of the components are automatically set, just need to set the package description -set(CPACK_COMPONENT_METAVISION-SDK-PRO-LIB_DESCRIPTION "Metavision SDK Professional libraries.\n${PACKAGE_LICENSE}") -set(CPACK_COMPONENT_METAVISION-SDK-PRO-LIB_DEPENDS metavision-open-lib) -foreach(available_professional_module IN LISTS METAVISION_SDK_PROFESSIONAL_MODULES_AVAILABLE) - if(metavision-sdk-${available_professional_module}-lib IN_LIST components_to_install_public) - list(APPEND CPACK_COMPONENT_METAVISION-SDK-PRO-LIB_DEPENDS metavision-sdk-${available_professional_module}-lib) - endif() -endforeach(available_professional_module) - -############################# -# metavision-sdk-pro-bin # -############################# -set(CPACK_COMPONENT_METAVISION-SDK-PRO-BIN_DESCRIPTION "Metavision SDK Professional applications.\n${PACKAGE_LICENSE}") -set(CPACK_COMPONENT_METAVISION-SDK-PRO-BIN_DEPENDS metavision-open-bin) -foreach(available_professional_module IN LISTS METAVISION_SDK_PROFESSIONAL_MODULES_AVAILABLE) - if(metavision-sdk-${available_professional_module}-bin IN_LIST components_to_install_public) - list(APPEND CPACK_COMPONENT_METAVISION-SDK-PRO-BIN_DEPENDS metavision-sdk-${available_professional_module}-bin) - endif() -endforeach(available_professional_module) - -################################ -# metavision-sdk-pro-python3.X # -################################ -foreach (py_suffix ${PYTHON3_ALL_VERSIONS}) - set(CPACK_COMPONENT_METAVISION-SDK-PRO-PYTHON${py_suffix}_DESCRIPTION "Metavision SDK Professional Python 3 libraries.\n${PACKAGE_LICENSE}") - set(CPACK_COMPONENT_METAVISION-SDK-PRO-PYTHON${py_suffix}_DEPENDS metavision-open-python${py_suffix}) - foreach(available_professional_module IN LISTS METAVISION_SDK_PROFESSIONAL_MODULES_AVAILABLE) - if(metavision-sdk-${available_professional_module}-python${py_suffix} IN_LIST components_to_install_public) - list(APPEND CPACK_COMPONENT_METAVISION-SDK-PRO-PYTHON${py_suffix}_DEPENDS metavision-sdk-${available_professional_module}-python${py_suffix}) - endif() - endforeach(available_professional_module) -endforeach() - -##################################### -# metavision-sdk-pro-python-samples # -##################################### -set(CPACK_COMPONENT_METAVISION-SDK-PRO-PYTHON-SAMPLES_DESCRIPTION "Samples for Metavision SDK Professional Python 3 libraries.\n${PACKAGE_LICENSE}") -set(CPACK_COMPONENT_METAVISION-SDK-PRO-PYTHON-SAMPLES_DEPENDS metavision-open-python-samples) -foreach(available_professional_module IN LISTS METAVISION_SDK_PROFESSIONAL_MODULES_AVAILABLE) - if(metavision-sdk-${available_professional_module}-python-samples IN_LIST components_to_install_public) - list(APPEND CPACK_COMPONENT_METAVISION-SDK-PRO-PYTHON-SAMPLES_DEPENDS metavision-sdk-${available_professional_module}-python-samples) - endif() -endforeach(available_professional_module) - - diff --git a/sdk/modules/base/cmake/MetavisionSDK_baseCPackConfig.cmake b/sdk/modules/base/cmake/MetavisionSDK_baseCPackConfig.cmake index 214239db2..9e2c4d31f 100644 --- a/sdk/modules/base/cmake/MetavisionSDK_baseCPackConfig.cmake +++ b/sdk/modules/base/cmake/MetavisionSDK_baseCPackConfig.cmake @@ -28,10 +28,12 @@ set(CPACK_COMPONENT_METAVISION-SDK-BASE-DEV_DEPENDS metavision-sdk-base-lib) string(REPLACE ";" ", " CPACK_DEBIAN_METAVISION-SDK-BASE-DEV_PACKAGE_DEPENDS "${CPACK_DEBIAN_METAVISION-SDK-BASE-DEV_PACKAGE_DEPENDS}") # Python bindings -foreach (py_suffix ${PYTHON3_ALL_VERSIONS}) - set(CPACK_COMPONENT_METAVISION-SDK-BASE-PYTHON${py_suffix}_DESCRIPTION "Metavision SDK Base Python 3 libraries.\n${OPEN_PACKAGE_LICENSE}") - set(CPACK_COMPONENT_METAVISION-SDK-BASE-PYTHON${py_suffix}_DEPENDS metavision-sdk-base-lib) -endforeach() +if (COMPILE_PYTHON3_BINDINGS) + foreach (py_suffix ${PYTHON3_ALL_VERSIONS}) + set(CPACK_COMPONENT_METAVISION-SDK-BASE-PYTHON${py_suffix}_DESCRIPTION "Metavision SDK Base Python 3 libraries.\n${OPEN_PACKAGE_LICENSE}") + set(CPACK_COMPONENT_METAVISION-SDK-BASE-PYTHON${py_suffix}_DEPENDS metavision-sdk-base-lib) + endforeach() +endif (COMPILE_PYTHON3_BINDINGS) # Samples set(CPACK_COMPONENT_METAVISION-SDK-BASE-SAMPLES_DESCRIPTION "Samples for Metavision SDK Base library.\n${OPEN_PACKAGE_LICENSE}") diff --git a/sdk/modules/base/cpp/CMakeLists.txt b/sdk/modules/base/cpp/CMakeLists.txt index a36addc63..8c3272fba 100644 --- a/sdk/modules/base/cpp/CMakeLists.txt +++ b/sdk/modules/base/cpp/CMakeLists.txt @@ -26,10 +26,4 @@ if (BUILD_TESTING) add_subdirectory(tests) endif (BUILD_TESTING) -# License file -install(FILES ${PROJECT_SOURCE_DIR}/licensing/LICENSE_OPEN - DESTINATION share/metavision/licensing - COMPONENT metavision-sdk-base-lib -) - -add_cpack_component(PUBLIC metavision-sdk-base-lib metavision-sdk-base-dev metavision-sdk-base-bin metavision-sdk-base-samples) \ No newline at end of file +add_cpack_component(PUBLIC metavision-sdk-base-lib metavision-sdk-base-dev metavision-sdk-base-bin metavision-sdk-base-samples) diff --git a/sdk/modules/base/cpp/include/metavision/sdk/base/events/event_imu.h b/sdk/modules/base/cpp/include/metavision/sdk/base/events/event_imu.h deleted file mode 100644 index 672fbf7a1..000000000 --- a/sdk/modules/base/cpp/include/metavision/sdk/base/events/event_imu.h +++ /dev/null @@ -1,124 +0,0 @@ -/********************************************************************************************************************** - * Copyright (c) Prophesee S.A. * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and limitations under the License. * - **********************************************************************************************************************/ - -#ifndef METAVISION_SDK_BASE_EVENT_IMU_H -#define METAVISION_SDK_BASE_EVENT_IMU_H - -#include - -#include "metavision/sdk/base/utils/detail/struct_pack.h" -#include "metavision/sdk/base/utils/timestamp.h" -#include "metavision/sdk/base/events/detail/event_traits.h" - -namespace Metavision { - -/// @brief Class representing an IMU event -/// @note This class is deprecated since version 2.1.0 and will be removed in next releases -class EventIMU { -public: - /// @brief Accelerometer x, y, and z values [g] - float ax, ay, az; - - /// @brief Gyroscope x, y, and z values [rad/s] - float gx, gy, gz; - - /// @brief Timestamp at which the event happened (in us) - timestamp t; - - /// @brief Default constructor - EventIMU() = default; - - /// @brief Constructor - /// @param ax Accelerometer x value (in g) - /// @param ay Accelerometer y value (in g) - /// @param az Accelerometer z value (in g) - /// @param gx Gyroscope x value (in rad/s) - /// @param gy Gyroscope y value (in rad/s) - /// @param gz Gyroscope z value (in rad/s) - /// @param ts Timestamp of the event (in us) - inline EventIMU(float ax, float ay, float az, float gx, float gy, float gz, timestamp ts) : - ax(ax), ay(ay), az(az), gx(gx), gy(gy), gz(gz), t(ts) {} - - /// @brief Writes EventIMU in buffer - void write_event(void *buf, timestamp origin) const { - RawEvent *buffer = (RawEvent *)buf; - buffer->ts = t - origin; - buffer->ax = ax; - buffer->ay = ay; - buffer->az = az; - buffer->gx = gx; - buffer->gy = gy; - buffer->gz = gz; - } - - /// @brief Reads EventIMU (old format) from buffer - static EventIMU read_event_v1(void *buf, const timestamp &delta_ts) { - RawEventV1 *buffer = static_cast(buf); - return EventIMU(buffer->ax, buffer->ay, buffer->az, buffer->gx, buffer->gy, buffer->gz, buffer->ts + delta_ts); - } - - /// @brief Reads event 2D from buffer - static EventIMU read_event(void *buf, const timestamp &delta_ts) { - RawEvent *buffer = static_cast(buf); - return EventIMU(buffer->ax, buffer->ay, buffer->az, buffer->gx, buffer->gy, buffer->gz, buffer->ts + delta_ts); - } - - /// @brief Gets the size of the RawEvent - static size_t get_raw_event_size() { - return sizeof(RawEvent); - } - - FORCE_PACK( - /// Structure of size 64 bits to represent one event (old format) - struct RawEventV1 { - unsigned int ts : 32; - unsigned int x : 9; - unsigned int y : 8; - unsigned int p : 1; - unsigned int padding : 14; - float ax; - float ay; - float az; - float gx; - float gy; - float gz; - }); - - /// operator<< - friend std::ostream &operator<<(std::ostream &output, const EventIMU &e) { - output << "EventIMU: ("; - output << e.ax << ", " << e.ay << ", " << e.az << ", " << e.gx << ", " << e.gy << ", " << e.gz << ", " << e.t - << ", "; - output << ")"; - return output; - } - - FORCE_PACK( - /// Structure of size 64 bits to represent one event - struct RawEvent { - unsigned int ts : 32; - unsigned int x : 14; // kept for retro-compatibility but empty field - unsigned int y : 14; // kept for retro-compatibility but empty field - unsigned int p : 4; // kept for retro-compatibility but empty field - float ax; - float ay; - float az; - float gx; - float gy; - float gz; - }); -}; - -} // namespace Metavision - -METAVISION_DEFINE_EVENT_TRAIT(Metavision::EventIMU, 15, "IMU") - -#endif // METAVISION_SDK_BASE_EVENT_IMU_H diff --git a/sdk/modules/base/cpp/include/metavision/sdk/base/utils/detail/log_impl.h b/sdk/modules/base/cpp/include/metavision/sdk/base/utils/detail/log_impl.h index 7f1193ca8..05e27e25d 100644 --- a/sdk/modules/base/cpp/include/metavision/sdk/base/utils/detail/log_impl.h +++ b/sdk/modules/base/cpp/include/metavision/sdk/base/utils/detail/log_impl.h @@ -303,7 +303,8 @@ template void LoggingOperation::log(const std::vector &v) { if (stream_ && should_output_) { (*stream_) << "[ "; - for (size_t i = 0; i < v.size() - 1; ++i) { + using SizeType = typename std::vector::size_type; + for (SizeType i = 0; i < v.size() - 1; ++i) { (*stream_) << v[i] << ", "; } (*stream_) << v.back(); diff --git a/sdk/modules/base/cpp/include/metavision/sdk/base/utils/object_pool.h b/sdk/modules/base/cpp/include/metavision/sdk/base/utils/object_pool.h index 1d1e35886..9cfae0d6d 100644 --- a/sdk/modules/base/cpp/include/metavision/sdk/base/utils/object_pool.h +++ b/sdk/modules/base/cpp/include/metavision/sdk/base/utils/object_pool.h @@ -158,7 +158,7 @@ class ObjectPool { /// @brief Constructor template Impl(size_t num_initial_objects, bool bounded_memory, Args &&...args) : bounded_memory_(bounded_memory) { - if (num_initial_objects == 0) { + if (num_initial_objects == 0 && bounded_memory) { throw std::invalid_argument( "Failed to allocate memory for the bounded object pool: pool's size can not be 0."); } diff --git a/sdk/modules/base/cpp/include/metavision/sdk/base/utils/python_bindings_doc.h b/sdk/modules/base/cpp/include/metavision/sdk/base/utils/python_bindings_doc.h index 47811a392..6c95ffc59 100644 --- a/sdk/modules/base/cpp/include/metavision/sdk/base/utils/python_bindings_doc.h +++ b/sdk/modules/base/cpp/include/metavision/sdk/base/utils/python_bindings_doc.h @@ -39,7 +39,7 @@ class PythonBindingsDoc { throw std::logic_error(oss.str()); } auto nb_keys = sequence_of_strings.size() / 2; - for (auto idx = 0; idx < nb_keys; ++idx) { + for (uint32_t idx = 0; idx < nb_keys; ++idx) { map_doc_[sequence_of_strings[2 * idx]] = sequence_of_strings[2 * idx + 1]; } } diff --git a/sdk/modules/base/cpp/include/metavision/sdk/base/utils/software_info.h b/sdk/modules/base/cpp/include/metavision/sdk/base/utils/software_info.h index b01c03753..c17bc1dfe 100644 --- a/sdk/modules/base/cpp/include/metavision/sdk/base/utils/software_info.h +++ b/sdk/modules/base/cpp/include/metavision/sdk/base/utils/software_info.h @@ -21,22 +21,6 @@ struct SoftwareInfo { /// @brief Supported version suffixes enum class VersionSuffix { NONE = 0, DEV = 1 }; - /// @brief Backward-compatible constructor - /// - /// @param version_major Major version number - /// @param version_minor Minor version number - /// @param version_patch Patch version number - /// @param version_suffix_type Version suffix type - /// @param vcs_branch VCS branch name - /// @param vcs_commit VCS commit's hash - /// @param vcs_date VCS commit's date - // clang-format off - [[deprecated("SoftwareInfo(int, int, int, int, const std::string&, const std::string&, const std::string&) is " - "deprecated since version 2.3.0 and will be removed in later releases.")]] - SoftwareInfo(int version_major, int version_minor, int version_patch, int version_suffix_type, - const std::string &vcs_branch, const std::string &vcs_commit, const std::string &vcs_date); - // clang-format on - /// @brief Constructor /// /// @param version_major Major version number @@ -58,13 +42,6 @@ struct SoftwareInfo { /// @brief Returns patch version number int get_version_patch() const; - /// @brief Returns version suffix type - // clang-format off - [[deprecated("SoftwareInfo::get_version_dev() is deprecated since version 2.3.0 and will be removed in later " - "releases.")]] - int get_version_dev() const; - // clang-format on - /// @brief Returns version suffix string std::string get_version_suffix() const; diff --git a/sdk/modules/base/cpp/src/generic_header.cpp b/sdk/modules/base/cpp/src/generic_header.cpp index 8521f0af7..83b6c475e 100644 --- a/sdk/modules/base/cpp/src/generic_header.cpp +++ b/sdk/modules/base/cpp/src/generic_header.cpp @@ -117,8 +117,6 @@ bool GenericHeader::check_prefix_and_read_header_line(std::istream &stream) { } void GenericHeader::parse_header(std::istream &stream) { - std::streampos start_pos = stream.tellg(); - while (check_prefix_and_read_header_line(stream)) { // In order for the value to be insert in the map, the line of the header has to be: // % Key value diff --git a/sdk/modules/base/cpp/src/software_info.cpp b/sdk/modules/base/cpp/src/software_info.cpp index bdee5acfa..c6da92394 100644 --- a/sdk/modules/base/cpp/src/software_info.cpp +++ b/sdk/modules/base/cpp/src/software_info.cpp @@ -35,24 +35,8 @@ std::string version_suffix_type_to_string(int version_suffix_type) { } } -int validate_version_suffix_type(int version_suffix_type) { - // Map the input version suffix type to one of the supported values. Unsupported types are mapped to - // (int)SoftwareInfo::VersionSuffix::NONE for backward-compatibility. - return version_suffix_string_to_type(version_suffix_type_to_string(version_suffix_type)); -} - } // namespace detail -SoftwareInfo::SoftwareInfo(int version_major, int version_minor, int version_patch, int version_suffix_type, - const std::string &vcs_branch, const std::string &vcs_commit, const std::string &vcs_date) : - version_major_(version_major), - version_minor_(version_minor), - version_patch_(version_patch), - version_suffix_type_(detail::validate_version_suffix_type(version_suffix_type)), - vcs_branch_(vcs_branch), - vcs_commit_(vcs_commit), - vcs_date_(vcs_date) {} - SoftwareInfo::SoftwareInfo(int version_major, int version_minor, int version_patch, const std::string &version_suffix_string, const std::string &vcs_branch, const std::string &vcs_commit, const std::string &vcs_date) : @@ -76,12 +60,6 @@ int SoftwareInfo::get_version_patch() const { return version_patch_; } -int SoftwareInfo::get_version_dev() const { - try { - return std::stoi(vcs_date_); - } catch (const std::exception &) { return 0; } -} - std::string SoftwareInfo::get_version_suffix() const { return detail::version_suffix_type_to_string(version_suffix_type_); } diff --git a/sdk/modules/base/cpp/tests/software_info_gtest.cpp b/sdk/modules/base/cpp/tests/software_info_gtest.cpp index b8d3abe16..a754ead74 100644 --- a/sdk/modules/base/cpp/tests/software_info_gtest.cpp +++ b/sdk/modules/base/cpp/tests/software_info_gtest.cpp @@ -38,16 +38,3 @@ TEST(SoftwareInfo_GTest, software_info_getters_official) { EXPECT_EQ("commithash", si.get_vcs_commit()); EXPECT_EQ("2017119", si.get_vcs_date()); } - -TEST(SoftwareInfo_GTest, software_info_getters_backward_compatibility) { - Metavision::SoftwareInfo si(3, 5, 1, 45632, "branchname", "commithash", "2017119"); - - EXPECT_EQ(3, si.get_version_major()); - EXPECT_EQ(5, si.get_version_minor()); - EXPECT_EQ(1, si.get_version_patch()); - EXPECT_EQ("", si.get_version_suffix()); - EXPECT_EQ("3.5.1", si.get_version()); - EXPECT_EQ("branchname", si.get_vcs_branch()); - EXPECT_EQ("commithash", si.get_vcs_commit()); - EXPECT_EQ("2017119", si.get_vcs_date()); -} diff --git a/sdk/modules/base/python/bindings/software_info_python.cpp b/sdk/modules/base/python/bindings/software_info_python.cpp index 92d856221..1c34f84b9 100644 --- a/sdk/modules/base/python/bindings/software_info_python.cpp +++ b/sdk/modules/base/python/bindings/software_info_python.cpp @@ -21,12 +21,6 @@ namespace Metavision { void export_software_info(py::module &m) { py::class_(m, "SoftwareInfo", pybind_doc_base["Metavision::SoftwareInfo"]) - .def(py::init(), - py::arg("version_major"), py::arg("version_minor"), py::arg("version_patch"), - py::arg("version_suffix_type"), py::arg("vcs_branch"), py::arg("vcs_commit"), py::arg("vcs_date"), - pybind_doc_base["Metavision::SoftwareInfo::SoftwareInfo(int version_major, int version_minor, int " - "version_patch, int version_suffix_type, const std::string &vcs_branch, const std::string " - "&vcs_commit, const std::string &vcs_date)"]) .def(py::init(), py::arg("version_major"), py::arg("version_minor"), py::arg("version_patch"), @@ -40,8 +34,6 @@ void export_software_info(py::module &m) { pybind_doc_base["Metavision::SoftwareInfo::get_version_minor"]) .def("get_version_patch", &Metavision::SoftwareInfo::get_version_patch, pybind_doc_base["Metavision::SoftwareInfo::get_version_patch"]) - .def("get_version_dev", &Metavision::SoftwareInfo::get_version_dev, - pybind_doc_base["Metavision::SoftwareInfo::get_version_dev"]) .def("get_version_suffix", &Metavision::SoftwareInfo::get_version_suffix, pybind_doc_base["Metavision::SoftwareInfo::get_version_suffix"]) .def("get_version", &Metavision::SoftwareInfo::get_version, diff --git a/sdk/modules/core/cmake/MetavisionSDK_coreCPackConfig.cmake b/sdk/modules/core/cmake/MetavisionSDK_coreCPackConfig.cmake index eff392ceb..74b96f792 100644 --- a/sdk/modules/core/cmake/MetavisionSDK_coreCPackConfig.cmake +++ b/sdk/modules/core/cmake/MetavisionSDK_coreCPackConfig.cmake @@ -35,23 +35,17 @@ set(CPACK_COMPONENT_METAVISION-SDK-CORE-SAMPLES_DESCRIPTION "Samples for Metavis set(CPACK_COMPONENT_METAVISION-SDK-CORE-SAMPLES_DEPENDS metavision-sdk-base-dev metavision-sdk-core-dev metavision-sdk-driver-dev metavision-sdk-ui-dev) # Pure python library -set(CPACK_COMPONENT_METAVISION-SDK-CORE-PYTHON_DESCRIPTION "Metavision SDK Core Python 3 library.\n${OPEN_PACKAGE_LICENSE}") -set(CPACK_COMPONENT_METAVISION-SDK-CORE-PYTHON_DEPENDS metavision-sdk-core-lib metavision-sdk-base-python${PYTHON3_DEFAULT_VERSION}) - -# Python bindings -foreach (py_suffix ${PYTHON3_ALL_VERSIONS}) - set(CPACK_COMPONENT_METAVISION-SDK-CORE-PYTHON${py_suffix}_DESCRIPTION "Metavision SDK Core Python 3 libraries.\n${OPEN_PACKAGE_LICENSE}") - set(CPACK_COMPONENT_METAVISION-SDK-CORE-PYTHON${py_suffix}_DEPENDS metavision-sdk-core-lib metavision-sdk-base-python${py_suffix}) -endforeach() - -# Python samples of metavision-sdk-core-python -set(CPACK_COMPONENT_METAVISION-SDK-CORE-PYTHON-SAMPLES_DESCRIPTION "Samples for Metavision SDK Core Python 3 library.\n${OPEN_PACKAGE_LICENSE}") -set(CPACK_COMPONENT_METAVISION-SDK-CORE-PYTHON-SAMPLES_DEPENDS metavision-hal-python${PYTHON3_DEFAULT_VERSION} metavision-sdk-core-python${PYTHON3_DEFAULT_VERSION} metavision-sdk-base-python${PYTHON3_DEFAULT_VERSION} metavision-sdk-ui-python${PYTHON3_DEFAULT_VERSION}) - -# Metavision Studio -set(CPACK_COMPONENT_METAVISION-STUDIO-CLIENT_DESCRIPTION "Metavision Studio client.\n${OPEN_PACKAGE_LICENSE}") -set(CPACK_COMPONENT_METAVISION-STUDIO-SERVER_DESCRIPTION "Metavision Studio server.\n${OPEN_PACKAGE_LICENSE}") -set(CPACK_COMPONENT_METAVISION-STUDIO-SERVER_DEPENDS metavision-sdk-core-lib metavision-sdk-driver-lib) -set(CPACK_COMPONENT_METAVISION-STUDIO_DESCRIPTION "Metavision Studio.\n${OPEN_PACKAGE_LICENSE}") -set(CPACK_COMPONENT_METAVISION-STUDIO-SAMPLE_DESCRIPTION "Metavision Studio source code.\n${OPEN_PACKAGE_LICENSE}") -set(CPACK_COMPONENT_METAVISION-STUDIO-SAMPLE_DEPENDS metavision-sdk-base-dev metavision-sdk-core-dev metavision-sdk-driver-dev) \ No newline at end of file +if (COMPILE_PYTHON3_BINDINGS) + set(CPACK_COMPONENT_METAVISION-SDK-CORE-PYTHON_DESCRIPTION "Metavision SDK Core Python 3 library.\n${OPEN_PACKAGE_LICENSE}") + set(CPACK_COMPONENT_METAVISION-SDK-CORE-PYTHON_DEPENDS metavision-sdk-core-lib metavision-sdk-base-python${PYTHON3_DEFAULT_VERSION}) + + # Python bindings + foreach (py_suffix ${PYTHON3_ALL_VERSIONS}) + set(CPACK_COMPONENT_METAVISION-SDK-CORE-PYTHON${py_suffix}_DESCRIPTION "Metavision SDK Core Python 3 libraries.\n${OPEN_PACKAGE_LICENSE}") + set(CPACK_COMPONENT_METAVISION-SDK-CORE-PYTHON${py_suffix}_DEPENDS metavision-sdk-core-lib metavision-sdk-base-python${py_suffix}) + endforeach() + + # Python samples of metavision-sdk-core-python + set(CPACK_COMPONENT_METAVISION-SDK-CORE-PYTHON-SAMPLES_DESCRIPTION "Samples for Metavision SDK Core Python 3 library.\n${OPEN_PACKAGE_LICENSE}") + set(CPACK_COMPONENT_METAVISION-SDK-CORE-PYTHON-SAMPLES_DEPENDS metavision-hal-python${PYTHON3_DEFAULT_VERSION} metavision-sdk-core-python${PYTHON3_DEFAULT_VERSION} metavision-sdk-base-python${PYTHON3_DEFAULT_VERSION} metavision-sdk-ui-python${PYTHON3_DEFAULT_VERSION}) +endif (COMPILE_PYTHON3_BINDINGS) diff --git a/sdk/modules/core/cpp/apps/metavision_player/src/view.cpp b/sdk/modules/core/cpp/apps/metavision_player/src/view.cpp index 2668864e2..c50b39d31 100644 --- a/sdk/modules/core/cpp/apps/metavision_player/src/view.cpp +++ b/sdk/modules/core/cpp/apps/metavision_player/src/view.cpp @@ -66,7 +66,7 @@ void View::showHelp(cv::Mat &frame) { const int LetterWidth = 8, LineHeight = 20; cv::Size size; for (auto &msg : msgs) { - if (msg.size() * LetterWidth > size.width) + if (msg.size() * LetterWidth > static_cast(size.width)) size.width = msg.size() * LetterWidth; size.height += LineHeight; } diff --git a/sdk/modules/core/cpp/apps/metavision_raw_to_video/test/metavision_raw_to_video_pytest.py b/sdk/modules/core/cpp/apps/metavision_raw_to_video/test/metavision_raw_to_video_pytest.py index 1728194d8..d1edb0bba 100644 --- a/sdk/modules/core/cpp/apps/metavision_raw_to_video/test/metavision_raw_to_video_pytest.py +++ b/sdk/modules/core/cpp/apps/metavision_raw_to_video/test/metavision_raw_to_video_pytest.py @@ -139,7 +139,7 @@ def pytestcase_test_metavision_raw_to_video_on_gen4_evt3_recording_default_args( filename = "gen4_evt3_hand.raw" filename_full = os.path.join(dataset_dir, "openeb", filename) - expected_video_info = {'width': 1280, 'height': 720, 'frame-count': 464} + expected_video_info = {'width': 1280, 'height': 720, 'frame-count': 451} generate_video(filename_full, 10000, 1, expected_video_info) @@ -172,5 +172,5 @@ def pytestcase_test_metavision_raw_to_video_on_gen4_evt3_recording_slow_motion_3 filename = "gen4_evt3_hand.raw" filename_full = os.path.join(dataset_dir, "openeb", filename) - expected_video_info = {'width': 1280, 'height': 720, 'frame-count': 1391} + expected_video_info = {'width': 1280, 'height': 720, 'frame-count': 1351} generate_video(filename_full, 20000, 3, expected_video_info) diff --git a/sdk/modules/core/cpp/include/metavision/sdk/core/algorithms/detail/async_algorithm_impl.h b/sdk/modules/core/cpp/include/metavision/sdk/core/algorithms/detail/async_algorithm_impl.h index c22540cfe..2fe38ba3a 100644 --- a/sdk/modules/core/cpp/include/metavision/sdk/core/algorithms/detail/async_algorithm_impl.h +++ b/sdk/modules/core/cpp/include/metavision/sdk/core/algorithms/detail/async_algorithm_impl.h @@ -309,6 +309,7 @@ void AsyncAlgorithm::initialize(timestamp ts) { } case Processing::MIXED: next_processing_n_events_ = delta_n_events_; + [[fallthrough]]; case Processing::N_US: { processing_ts_ = delta_ts_ * (ts / delta_ts_); next_processing_ts_ = processing_ts_ + delta_ts_; diff --git a/sdk/modules/core/cpp/include/metavision/sdk/core/algorithms/file_producer_algorithm.h b/sdk/modules/core/cpp/include/metavision/sdk/core/algorithms/file_producer_algorithm.h index d28ec0840..8f56adf49 100644 --- a/sdk/modules/core/cpp/include/metavision/sdk/core/algorithms/file_producer_algorithm.h +++ b/sdk/modules/core/cpp/include/metavision/sdk/core/algorithms/file_producer_algorithm.h @@ -42,27 +42,6 @@ class FileProducerAlgorithmT { template inline void process_events(OutputIt d_first, timestamp ts); - /// @note process(...) is deprecated since version 2.2.0 and will be removed in later releases. - /// Please use process_events(...) instead - template - // clang-format off - [[deprecated("process(...) is deprecated since version 2.2.0 and will be removed in later releases. " - "Please use process_events(...) instead")]] - inline void process(OutputIt d_first, timestamp ts) - // clang-format on - { - static bool warning_already_logged = false; - if (!warning_already_logged) { - std::ostringstream oss; - oss << "FileProducerAlgorithmT::process(...) is deprecated since version 2.2.0 "; - oss << "and will be removed in later releases. "; - oss << "Please use FileProducerAlgorithmT::process_events(...) instead" << std::endl; - MV_SDK_LOG_WARNING() << oss.str(); - warning_already_logged = true; - } - process_events(d_first, ts); - } - /// @brief If all events have been processed, returns true bool is_done(); diff --git a/sdk/modules/core/cpp/include/metavision/sdk/core/algorithms/flip_x_algorithm.h b/sdk/modules/core/cpp/include/metavision/sdk/core/algorithms/flip_x_algorithm.h index 8371e5bd0..8a7e0f066 100644 --- a/sdk/modules/core/cpp/include/metavision/sdk/core/algorithms/flip_x_algorithm.h +++ b/sdk/modules/core/cpp/include/metavision/sdk/core/algorithms/flip_x_algorithm.h @@ -47,27 +47,6 @@ class FlipXAlgorithm { detail::transform(it_begin, it_end, inserter, std::ref(*this)); } - /// @note process(...) is deprecated since version 2.2.0 and will be removed in later releases. - /// Please use process_events(...) instead - template - // clang-format off - [[deprecated("process(...) is deprecated since version 2.2.0 and will be removed in later releases. " - "Please use process_events(...) instead")]] - inline void process(InputIt first, InputIt last, OutputIt d_first) - // clang-format on - { - static bool warning_already_logged = false; - if (!warning_already_logged) { - std::ostringstream oss; - oss << "FlipXAlgorithm::process(...) is deprecated since version 2.2.0 "; - oss << "and will be removed in later releases. "; - oss << "Please use FlipXAlgorithm::process_events(...) instead" << std::endl; - MV_SDK_LOG_WARNING() << oss.str(); - warning_already_logged = true; - } - process_events(first, last, d_first); - } - /// @brief Returns the maximum X coordinate of the events /// @return Maximum X coordinate of the events inline std::int16_t width_minus_one() const; diff --git a/sdk/modules/core/cpp/include/metavision/sdk/core/algorithms/flip_y_algorithm.h b/sdk/modules/core/cpp/include/metavision/sdk/core/algorithms/flip_y_algorithm.h index dd1d3d4ca..a127d9835 100644 --- a/sdk/modules/core/cpp/include/metavision/sdk/core/algorithms/flip_y_algorithm.h +++ b/sdk/modules/core/cpp/include/metavision/sdk/core/algorithms/flip_y_algorithm.h @@ -47,27 +47,6 @@ class FlipYAlgorithm { detail::transform(it_begin, it_end, inserter, std::ref(*this)); } - /// @note process(...) is deprecated since version 2.2.0 and will be removed in later releases. - /// Please use process_events(...) instead - template - // clang-format off - [[deprecated("process(...) is deprecated since version 2.2.0 and will be removed in later releases. " - "Please use process_events(...) instead")]] - inline void process(InputIt first, InputIt last, OutputIt d_first) - // clang-format on - { - static bool warning_already_logged = false; - if (!warning_already_logged) { - std::ostringstream oss; - oss << "FlipYAlgorithm::process(...) is deprecated since version 2.2.0 "; - oss << "and will be removed in later releases. "; - oss << "Please use FlipYAlgorithm::process_events(...) instead" << std::endl; - MV_SDK_LOG_WARNING() << oss.str(); - warning_already_logged = true; - } - process_events(first, last, d_first); - } - /// @brief Returns the maximum Y coordinate of the events /// @return Maximum Y coordinate of the events inline std::int16_t height_minus_one() const; diff --git a/sdk/modules/core/cpp/include/metavision/sdk/core/algorithms/generic_producer_algorithm.h b/sdk/modules/core/cpp/include/metavision/sdk/core/algorithms/generic_producer_algorithm.h index 34a9afa54..4f719b420 100644 --- a/sdk/modules/core/cpp/include/metavision/sdk/core/algorithms/generic_producer_algorithm.h +++ b/sdk/modules/core/cpp/include/metavision/sdk/core/algorithms/generic_producer_algorithm.h @@ -178,27 +178,6 @@ class GenericProducerAlgorithm { MV_SDK_LOG_DEBUG() << "--> GenericProducerAlgorithm::process() with ts:" << ts; } - /// @note process(...) is deprecated since version 2.2.0 and will be removed in later releases. - /// Please use process_events(...) instead - template> - // clang-format off - [[deprecated("process(...) is deprecated since version 2.2.0 and will be removed in later releases. " - "Please use process_events(...) instead")]] - void process(timestamp ts, OutputIt inserter, TimingProfilerType *timing_profiler = TimingProfilerType::instance()) - // clang-format on - { - static bool warning_already_logged = false; - if (!warning_already_logged) { - std::ostringstream oss; - oss << "GenericProducerAlgorithm::process(...) is deprecated since version 2.2.0 "; - oss << "and will be removed in later releases. "; - oss << "Please use GenericProducerAlgorithm::process_events(...) instead" << std::endl; - MV_SDK_LOG_WARNING() << oss.str(); - warning_already_logged = true; - } - process_events(ts, inserter, timing_profiler); - } - /// @brief Sets timeout /// @param timeout Maximum time to wait for events (in us). If equal 0, no timeout is set (equivalent to /// infinite timeout); if negative, there will be no wait at all. diff --git a/sdk/modules/core/cpp/include/metavision/sdk/core/algorithms/periodic_frame_generation_algorithm.h b/sdk/modules/core/cpp/include/metavision/sdk/core/algorithms/periodic_frame_generation_algorithm.h index eee4fc3a1..e5109e86d 100644 --- a/sdk/modules/core/cpp/include/metavision/sdk/core/algorithms/periodic_frame_generation_algorithm.h +++ b/sdk/modules/core/cpp/include/metavision/sdk/core/algorithms/periodic_frame_generation_algorithm.h @@ -22,10 +22,6 @@ namespace Metavision { class PeriodicFrameGenerationAlgorithm; -using FrameGenerationAlgorithm - [[deprecated("This alias is deprecated since version 2.2.0 and will be removed in next releases")]] = - PeriodicFrameGenerationAlgorithm; - /// @brief Algorithm that generates frames from events at a fixed rate (fps). The reference clock used is the one of /// the input events. /// @@ -58,23 +54,6 @@ class PeriodicFrameGenerationAlgorithm : public BaseFrameGenerationAlgorithm, PeriodicFrameGenerationAlgorithm(int sensor_width, int sensor_height, uint32_t accumulation_time_us = 10000, double fps = 0., const Metavision::ColorPalette &palette = default_palette()); - /// @brief Constructor for backward compatibility with 2.1 API. - /// @param sensor_width Sensor's width (in pixels) - /// @param sensor_height Sensor's height (in pixels) - /// @param accumulation_time_us Accumulation time (in us) (@ref set_accumulation_time_us) - /// @param colored If true, the frame generator will use the Dark color palette, otherwise it will use the Gray - /// color palette. - /// @param fps The fps at which to generate the frames. The time reference used is the one from the input events. If - /// the fps is 0, the accumulation time is used to compute it (@ref set_fps). - /// @throw std::invalid_argument If the input fps is negative - [[deprecated("This constructor with boolean 'colored' is deprecated since version 2.2.0 and will be removed in " - "later releases. Please use the constructor using the Metavision::ColorPalette " - "instead")]] PeriodicFrameGenerationAlgorithm(int sensor_width, int sensor_height, - uint32_t accumulation_time_us, bool colored, - double fps) : - PeriodicFrameGenerationAlgorithm(sensor_width, sensor_height, accumulation_time_us, fps, - (colored ? default_palette() : Metavision::ColorPalette::Gray)) {} - /// @brief Sets the callback to call when an image has been generated /// /// @warning For efficiency purpose, the frame passed in the callback is a non const reference. If it is to be diff --git a/sdk/modules/core/cpp/include/metavision/sdk/core/algorithms/polarity_filter_algorithm.h b/sdk/modules/core/cpp/include/metavision/sdk/core/algorithms/polarity_filter_algorithm.h index bb04b7131..e5a062473 100644 --- a/sdk/modules/core/cpp/include/metavision/sdk/core/algorithms/polarity_filter_algorithm.h +++ b/sdk/modules/core/cpp/include/metavision/sdk/core/algorithms/polarity_filter_algorithm.h @@ -44,27 +44,6 @@ class PolarityFilterAlgorithm { return Metavision::detail::insert_if(it_begin, it_end, inserter, std::ref(*this)); } - /// @note process(...) is deprecated since version 2.2.0 and will be removed in later releases. - /// Please use process_events(...) instead - template - // clang-format off - [[deprecated("process(...) is deprecated since version 2.2.0 and will be removed in later releases. " - "Please use process_events(...) instead")]] - inline OutputIt process(InputIt first, InputIt last, OutputIt d_first) - // clang-format on - { - static bool warning_already_logged = false; - if (!warning_already_logged) { - std::ostringstream oss; - oss << "PolarityFilterAlgorithm::process(...) is deprecated since version 2.2.0 "; - oss << "and will be removed in later releases. "; - oss << "Please use PolarityFilterAlgorithm::process_events(...) instead" << std::endl; - MV_SDK_LOG_WARNING() << oss.str(); - warning_already_logged = true; - } - return process_events(first, last, d_first); - } - /// @brief Basic operator to check if an event is accepted /// @param ev Event2D to be tested inline bool operator()(const Event2d &ev) const; diff --git a/sdk/modules/core/cpp/include/metavision/sdk/core/algorithms/polarity_inverter_algorithm.h b/sdk/modules/core/cpp/include/metavision/sdk/core/algorithms/polarity_inverter_algorithm.h index 226172e58..7da2b6bd3 100644 --- a/sdk/modules/core/cpp/include/metavision/sdk/core/algorithms/polarity_inverter_algorithm.h +++ b/sdk/modules/core/cpp/include/metavision/sdk/core/algorithms/polarity_inverter_algorithm.h @@ -44,27 +44,6 @@ class PolarityInverterAlgorithm { Metavision::detail::transform(it_begin, it_end, inserter, std::ref(*this)); } - /// @note process(...) is deprecated since version 2.2.0 and will be removed in later releases. - /// Please use process_events(...) instead - template - // clang-format off - [[deprecated("process(...) is deprecated since version 2.2.0 and will be removed in later releases. " - "Please use process_events(...) instead")]] - inline void process(InputIt first, InputIt last, OutputIt d_first) - // clang-format on - { - static bool warning_already_logged = false; - if (!warning_already_logged) { - std::ostringstream oss; - oss << "PolarityInverterAlgorithm::process(...) is deprecated since version 2.2.0 "; - oss << "and will be removed in later releases. "; - oss << "Please use PolarityInverterAlgorithm::process_events(...) instead" << std::endl; - MV_SDK_LOG_WARNING() << oss.str(); - warning_already_logged = true; - } - process_events(first, last, d_first); - } - /// @brief Changes the polarity of an events /// @param ev Event2D that want to be changed inline void operator()(Event2d &ev) const; diff --git a/sdk/modules/core/cpp/include/metavision/sdk/core/algorithms/roi_filter_algorithm.h b/sdk/modules/core/cpp/include/metavision/sdk/core/algorithms/roi_filter_algorithm.h index 7bf8ddeb0..ed062e51f 100644 --- a/sdk/modules/core/cpp/include/metavision/sdk/core/algorithms/roi_filter_algorithm.h +++ b/sdk/modules/core/cpp/include/metavision/sdk/core/algorithms/roi_filter_algorithm.h @@ -50,27 +50,6 @@ class RoiFilterAlgorithm { template inline OutputIt process_events(InputIt it_begin, InputIt it_end, OutputIt inserter); - /// @note process(...) is deprecated since version 2.2.0 and will be removed in later releases. - /// Please use process_events(...) instead - template - // clang-format off - [[deprecated("process(...) is deprecated since version 2.2.0 and will be removed in later releases. " - "Please use process_events(...) instead")]] - inline OutputIt process(InputIt first, InputIt last, OutputIt d_first) - // clang-format on - { - static bool warning_already_logged = false; - if (!warning_already_logged) { - std::ostringstream oss; - oss << "RoiFilterAlgorithm::process(...) is deprecated since version 2.2.0 "; - oss << "and will be removed in later releases. "; - oss << "Please use RoiFilterAlgorithm::process_events(...) instead" << std::endl; - MV_SDK_LOG_WARNING() << oss.str(); - warning_already_logged = true; - } - return process_events(first, last, d_first); - } - /// @brief Returns true if the algorithm returns events expressed in coordinates relative to the ROI /// @return true if the algorithm is resetting the filtered events inline bool is_resetting() const; diff --git a/sdk/modules/core/cpp/include/metavision/sdk/core/algorithms/stream_logger_algorithm.h b/sdk/modules/core/cpp/include/metavision/sdk/core/algorithms/stream_logger_algorithm.h index 1a07c4658..2c42b3bd3 100644 --- a/sdk/modules/core/cpp/include/metavision/sdk/core/algorithms/stream_logger_algorithm.h +++ b/sdk/modules/core/cpp/include/metavision/sdk/core/algorithms/stream_logger_algorithm.h @@ -72,27 +72,6 @@ class StreamLoggerAlgorithm { template inline void process_events(InputIt it_begin, InputIt it_end, timestamp ts); - /// @note process(...) is deprecated since version 2.2.0 and will be removed in later releases. - /// Please use process_events(...) instead - template - // clang-format off - [[deprecated("process(...) is deprecated since version 2.2.0 and will be removed in later releases. Please use " - "process_events(...) instead")]] - inline void process(InputIterator first, InputIterator last, timestamp ts) - // clang-format on - { - static bool warning_already_logged = false; - if (!warning_already_logged) { - std::ostringstream oss; - oss << "StreamLoggerAlgorithm::process(...) is deprecated since version 2.2.0 "; - oss << "and will be removed in later releases. "; - oss << "Please use StreamLoggerAlgorithm::process_events(...) instead" << std::endl; - MV_SDK_LOG_WARNING() << oss.str(); - warning_already_logged = true; - } - process_events(first, last, ts); - } - /// @brief Closes the streaming. inline void close(); diff --git a/sdk/modules/core/cpp/include/metavision/sdk/core/events/event_bbox.h b/sdk/modules/core/cpp/include/metavision/sdk/core/events/event_bbox.h new file mode 100644 index 000000000..0b9b834de --- /dev/null +++ b/sdk/modules/core/cpp/include/metavision/sdk/core/events/event_bbox.h @@ -0,0 +1,190 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_SDK_ML_EVENT_BBOX_H +#define METAVISION_SDK_ML_EVENT_BBOX_H + +#include +#include + +#include "metavision/sdk/base/utils/timestamp.h" +#include "metavision/sdk/base/utils/detail/struct_pack.h" +#include "metavision/sdk/base/events/detail/event_traits.h" + +#include "metavision/sdk/core/utils/similarity_metrics.h" + +namespace Metavision { + +/// @brief Class representing a spatio-temporal bounding-box event. +/// +/// The timestamp of the event (i.e. member variable 't') is by convention the detection timestamp. +/// Convention about the spatial position is that points with u in [x, x + w[ and v in [y, y + h[ are inside +/// the bounding-box and everything else is outside. +struct EventBbox { + /// @brief Default constructor + inline EventBbox() { + t = 0; + x = 0.f; + y = 0.f; + w = 0.f; + h = 0.f; + class_id = 0; + track_id = 0; + class_confidence = 0.f; + } + + /// @brief Constructs a Event Bounding box + /// + /// @param time Timestamp of last detection + /// @param x Column index + /// @param y Row index + /// @param w Bounding box's width + /// @param h Bounding box's height + /// @param class_id Class identifier + /// @param track_id Track identification number + /// @param class_confidence Detection confidence + inline EventBbox(timestamp time, float x, float y, float w, float h, unsigned int class_id, unsigned int track_id, + float class_confidence) : + t(time), x(x), y(y), w(w), h(h), class_id(class_id), track_id(track_id), class_confidence(class_confidence) {} + + /// @brief Writes EventBbox in buffer + /// + /// @param buf Memory in which the bounding box will be serialized + /// @param origin Reference timestamp cut away from the bounding box timestamp + inline void write_event(void *buf, timestamp origin) const; + + /// @brief Reads EventBbox from a buffer + /// + /// @param buf Memory containing a serialized bounding box + /// @param delta_ts Origin timestamp to be added to the serialized timestamp + /// @return An unserialized event bounding box + inline static EventBbox read_event(void *buf, const timestamp &delta_ts); + + /// @brief Gets x position of the bounding box + /// @return X position of the bounding box + inline float get_x() const { + return x; + } + + /// @brief Gets y position of the bounding box + /// @return Y position of the bounding box + inline float get_y() const { + return y; + } + + /// @brief Gets bounding box's width + /// @return Width of the bounding box + inline float get_width() const { + return w; + } + + /// @brief Gets bounding box's height + /// @return Height of the bounding box + inline float get_height() const { + return h; + } + + /// @brief Gets bounding box's class id + /// @return bounding box's class id + inline unsigned int get_class_id() const { + return class_id; + } + + /// @brief Computes the area recovered by both boxes + /// @param bbox2 Box to be compared with + /// @return The intersection area between current bbox and bbox 2 (in pixel * pixel) + inline float intersection_area(const EventBbox &bbox2) const; + + /// @brief Computes the proportion of box overlap + /// @param bbox2 Box to be compared with + /// @return Percentage of overlap + inline float intersection_area_over_union(const EventBbox &bbox2) const; + + /// @brief Serializes an EventBbox into a stream + /// @param output Stream + /// @param e EventBbox to be serialized + /// @return Stream provided as input + friend std::ostream &operator<<(std::ostream &output, const EventBbox &e) { + output << "EventBbox: (" + << "t: " << e.t << " " + << "x: " << e.x << " " + << "y: " << e.y << " " + << "w: " << e.w << " " + << "h: " << e.h << " " + << "class_id: " << e.class_id << " " + << "track_id: " << e.track_id << " " + << "class_confidence: " << e.class_confidence << ")"; + return output; + } + + /// @brief Serialize a bounding box in csv format + /// + /// @param output Stream in which the csv of the bounding box will be written + /// @param sep Character inserted between fields + void write_csv_line(std::ostream &output, char sep = ' ') const { + output << t << sep << class_id << sep << track_id << sep << x << sep << y << sep << w << sep << h << sep + << class_confidence << std::endl; + } + + FORCE_PACK( + /// Packed struct to serialize events + struct RawEvent { + uint32_t ts; + float x; + float y; + float w; + float h; + unsigned char class_id; + unsigned int track_id; + float class_confidence; + }); + + timestamp t; ///< timestamp of the detection + float x; ///< X coordinate of top left corner + float y; ///< Y coordinate of top left corner + float w; ///< width of the bounding box + float h; ///< height of the bounding box + unsigned int class_id; ///< Class identifier of detected object + unsigned int track_id; ///< Track identifier + float class_confidence; ///< Confidence of the detection +}; + +void EventBbox::write_event(void *buf, timestamp origin) const { + RawEvent *buffer = static_cast(buf); + buffer->ts = t - origin; + buffer->x = x; + buffer->y = y; + buffer->w = w; + buffer->h = h; + buffer->class_id = class_id; + buffer->track_id = track_id; + buffer->class_confidence = class_confidence; +} + +EventBbox EventBbox::read_event(void *buf, const timestamp &delta_ts) { + RawEvent *buffer = static_cast(buf); + return EventBbox(buffer->ts + delta_ts, buffer->x, buffer->y, buffer->w, buffer->h, buffer->class_id, + buffer->track_id, buffer->class_confidence); +} + +float EventBbox::intersection_area(const EventBbox &bbox2) const { + return Utils::intersection(*this, bbox2); +} + +float EventBbox::intersection_area_over_union(const EventBbox &bbox2) const { + return Utils::intersection_over_union(*this, bbox2); +} + +} // namespace Metavision + +METAVISION_DEFINE_EVENT_TRAIT(Metavision::EventBbox, 16, "Bbox") + +#endif // METAVISION_SDK_CORE_EVENT_BBOX_H diff --git a/sdk/modules/core/cpp/include/metavision/sdk/core/utils/data_synchronizer_from_triggers.h b/sdk/modules/core/cpp/include/metavision/sdk/core/utils/data_synchronizer_from_triggers.h new file mode 100644 index 000000000..2efbe51b9 --- /dev/null +++ b/sdk/modules/core/cpp/include/metavision/sdk/core/utils/data_synchronizer_from_triggers.h @@ -0,0 +1,184 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_SDK_CORE_DATA_SYNCHRONIZER_FROM_TRIGGERS_H +#define METAVISION_SDK_CORE_DATA_SYNCHRONIZER_FROM_TRIGGERS_H + +#include +#include +#include +#include +#include + +#include "metavision/sdk/base/events/event_ext_trigger.h" +#include "metavision/sdk/base/utils/timestamp.h" +#include "metavision/sdk/core/utils/detail/iterator_traits.h" + +namespace Metavision { + +/// @brief The purpose of this class is to synchronize with the event-stream the data from an external source generating +/// external triggers +/// +/// @warning This class considers that the input stream of triggers is periodic and that the period doesn't change at +/// runtime. +/// @warning It is assumed here that the source of external triggers is the same as the external data's one +/// +/// Synchronization information is generated from the input triggers events. This information contains a +/// timestamp (the one of the trigger used to generate it) and an index. The indexes are guaranteed to be strictly and +/// incrementally increasing from a starting value (0 by default). However, some triggers may be lost for various +/// reasons, as a consequence the indexes are generated using both input triggers' timestamp and the expected period +/// of the external data: +/// -> index_increment = (trigger_ts - previous_trigger_ts)/period. +/// +/// The synchronization is done by matching indexes generated from the triggers with the ones provided by the +/// external data streams. When a data's index finds a match, its timestamp takes the value of its match. +/// +/// This class interpolates synchronization information if triggers are missing (i.e. index_increment > 1). This is to +/// guarantee that all data to synchronize can find a match. +/// -> interpolated_ts = previous_trigger_ts + period +/// +/// Only one polarity is used for the synchronization (i.e. up or down, chosen by the user) as it is +/// considered that each external data generates a pair of triggers (i.e. one data for two triggers). +/// +/// The synchronization routines are blocking and thread safe. +/// +class DataSynchronizerFromTriggers { +public: + /// @brief Synchronization information data used to timestamp a piece of external data using an external trigger and + /// the index of the piece of external data + struct SynchronizationInformation { + /// Timestamp of the trigger used to generate this + timestamp t; + + /// Index computed from the triggers timestamps + uint32_t index; + }; + + /// @brief Parameters to be used to configure the @ref DataSynchronizerFromTriggers + struct Parameters { + Parameters(uint32_t period_us); + + double periodicity_tolerance_factor_{0.1}; ///< Used to compute the time interval around the expected trigger's + ///< timestamp. If the timestamp falls before this range, the trigger + ///< is considered to be a duplicate and is not used. Though this + ///< should not happen. + uint32_t period_us_; ///< Triggers' pair period i.e. expected dt between two triggers of the same polarity. + uint32_t to_discard_count_{0}; ///< Number of triggers to discard from the beginning of the external triggers. + uint32_t index_offset_{0}; ///< This is the very first data to synchronize expected index and so the first + ///< trigger index. + bool reference_polarity_{0}; ///< The trigger's polarity to use. + }; + +public: + /// @brief Constructor + /// @param parameters The @ref Parameters to use to configure this object. + DataSynchronizerFromTriggers(const Parameters ¶meters); + + /// @brief Destructor + /// Sets the triggers source as done to unlock the synchronization if it is waiting. + ~DataSynchronizerFromTriggers(); + + /// @brief Resets the synchronization states variables. + /// Unlocks any pending synchronization before clearing the synchronization information remaining to be used. + void reset_synchronization(); + + /// @brief Notifies this object that the synchronization is done + /// + /// This means that either the trigger source and thus no trigger is to be received anymore, or that the external + /// data stream won't use triggers anymore + /// + /// This unlocks pending synchronization and forbids indexing of new triggers. + void set_synchronization_as_done(); + + /// @brief Generates @ref SynchronizationInformation from the external triggers input stream + /// + /// This information is to be used for the synchronization (@ref synchronize_data_from_triggers). + /// This method is not blocking: this is not a synchronization point. + /// @tparam ExtTriggerIterator The type of the external trigger input events iterator + /// @param trigger_it The first iterator to an external trigger to process + /// @param trigger_it_end The last iterator to an external trigger to process + /// @warning ExtTriggerIterator must be an iterator over EventExtTrigger + /// @return The number of external triggers that have been updated + template + size_t index_triggers(ExtTriggerIterator trigger_it, ExtTriggerIterator trigger_it_end); + + /// @brief Generates @ref SynchronizationInformation from the external triggers input stream + /// + /// This information is to be used for the synchronization (@ref synchronize_data_from_triggers). + /// This method is not blocking: this is not a synchronization point. + /// @tparam ExtTriggerIterator The type of the external trigger input events iterator + /// @param trigger_it The first iterator to an external trigger to process + /// @param trigger_it_end The last iterator to an external trigger to process + /// @param indexed_trigger_inserter_it An iterator to insert all triggers used to generate synchronization + /// information + /// @warning ExtTriggerIterator must be an iterator over EventExtTrigger + template + void index_triggers(ExtTriggerIterator trigger_it, ExtTriggerIterator trigger_it_end, + IndexTriggerInserterIterator indexed_trigger_inserter_it); + + /// @brief Synchronizes indexed data with the generated @ref SynchronizationInformation from method + /// @ref index_triggers + /// @warning It is assumed here that the source of external triggers is the same as the external data source + /// @warning It is assumed here that the data source to be synchronized has been indexed before the call. + /// @warning It is assumed here that the data source' indices are strictly increasing otherwise this may break the + /// synchronization procedure. + /// @warning Timestamp of input data source must be accessible and modifiable. + /// @warning Index of input data source must be accessible. + /// @tparam DataIterator The input data's iterator type + /// @param data_it The first iterator to the data to synchronize. Each data is accessed and modified. + /// @param data_it_end The last iterator to the data to synchronize. + /// @param data_timestamp_accessor A cb to access the timestamp of the input data. Timestamp must be modifiable. + /// @param data_index_accessor A cb to access the index of the input data. Neither the index nor the data is + /// modified. + /// @return The number of synchronized data. This amount is usually the same as std::distance(data_it, data_it_end) + /// unless we stopped receiving triggers. + template + uint32_t synchronize_data_from_triggers( + DataIterator data_it, DataIterator data_it_end, + std::function &)> data_timestamp_accessor, + std::function &)> data_index_accessor); + + /// @brief Indicates the maximum number of external triggers that can be pending to be used for synchronization + /// + /// This can be used to slow down an event-based data polling thread + /// @param max_remaining_to_be_consumed The maximum number of pending external triggers + void wait_for_triggers_consumed(uint32_t max_remaining_to_be_consumed = 0); + +private: + /// Queue of synchronization information generated from received external triggers + std::deque synchronization_information_deque_; + + /// Parameters + Parameters parameters_; + + /// States if at least one trigger has been indexed + bool first_trigger_indexed_; + + /// Sets this triggers source as done i.e. we don't expect to receive anymore events + bool triggers_source_is_done_; + + /// State variable to keep the count of the last generated index + uint32_t last_synchronization_index_; + + /// Last received trigger's timestamp + timestamp last_synchronization_ts_us_; + + /// Safety variable + std::mutex triggers_updated_mutex_; + std::condition_variable wait_for_triggers_cond_; + std::condition_variable wait_for_triggers_consumed_cond_; +}; + +} // namespace Metavision + +#include "metavision/sdk/core/utils/detail/data_synchronizer_from_triggers_impl.h" + +#endif // METAVISION_SDK_CORE_DATA_SYNCHRONIZER_FROM_TRIGGERS_H diff --git a/sdk/modules/core/cpp/include/metavision/sdk/core/utils/detail/data_synchronizer_from_triggers_impl.h b/sdk/modules/core/cpp/include/metavision/sdk/core/utils/detail/data_synchronizer_from_triggers_impl.h new file mode 100644 index 000000000..ad5a8d755 --- /dev/null +++ b/sdk/modules/core/cpp/include/metavision/sdk/core/utils/detail/data_synchronizer_from_triggers_impl.h @@ -0,0 +1,178 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_SDK_CORE_DETAIL_DATA_SYNCHRONIZER_FROM_TRIGGERS_IMPL_H +#define METAVISION_SDK_CORE_DETAIL_DATA_SYNCHRONIZER_FROM_TRIGGERS_IMPL_H + +#include + +namespace Metavision { + +template +size_t DataSynchronizerFromTriggers::index_triggers(ExtTriggerIterator trigger_it, ExtTriggerIterator trigger_it_end) { + std::vector out; + auto back_ins = std::back_inserter(out); + index_triggers(trigger_it, trigger_it_end, back_ins); + return out.size(); +} + +template +void DataSynchronizerFromTriggers::index_triggers(ExtTriggerIterator trigger_it, ExtTriggerIterator trigger_it_end, + IndexTriggerInserterIterator indexed_trigger_inserter_it) { + static_assert(is_const_iterator_over::value, + "Requires an iterator over EventExtTrigger element."); + + static_assert(detail::is_back_inserter_iterator_v, + "Requires a back inserter iterator."); + + static_assert( + std::is_same::value_type, EventExtTrigger>::value, + "Requires an output back inserter iterator over EventExtTrigger element."); + + std::lock_guard lock(triggers_updated_mutex_); + for (; trigger_it != trigger_it_end; ++trigger_it, ++indexed_trigger_inserter_it) { + // Consider the trigger only if polarity matches the reference one + if (trigger_it->p != parameters_.reference_polarity_) { + continue; + } + + // Discard trigger if requested + if (parameters_.to_discard_count_ != 0) { + --parameters_.to_discard_count_; + continue; + } + + if (first_trigger_indexed_) { + // We expect the new trigger to be at least (around) period_us in the future + + // This trigger is in the past or is a duplicate. + // This should never happen unless input trigger stream has been reordered + if (trigger_it->t <= + (last_synchronization_ts_us_ + parameters_.periodicity_tolerance_factor_ * parameters_.period_us_)) { + continue; + } + + // ------------------------------ + // Compute the new trigger index + const uint32_t new_synchronization_index = + last_synchronization_index_ + + std::round(static_cast(trigger_it->t - last_synchronization_ts_us_) / parameters_.period_us_); + + // If trigger index > current_index + 1, then we missed some triggers. We need to interpolate + // synchronization data. + for (uint32_t interpolated_index = last_synchronization_index_ + 1; + interpolated_index < new_synchronization_index; ++interpolated_index, ++indexed_trigger_inserter_it) { + // Interpolate the timestamp from the last trigger received timestamp + last_synchronization_ts_us_ += parameters_.period_us_; + + // Push the trigger in the queue for synchronization + synchronization_information_deque_.push_back({last_synchronization_ts_us_, interpolated_index}); + *indexed_trigger_inserter_it = + EventExtTrigger(trigger_it->p, last_synchronization_ts_us_, trigger_it->id); + } + + // Keep in memory last trigger index for interpolation + last_synchronization_index_ = new_synchronization_index; + } else { + // ------------------------------ + // First trigger received. Index starts from user offset. + first_trigger_indexed_ = true; + last_synchronization_index_ = parameters_.index_offset_; + } + + last_synchronization_ts_us_ = trigger_it->t; + synchronization_information_deque_.push_back({last_synchronization_ts_us_, last_synchronization_index_}); + *indexed_trigger_inserter_it = EventExtTrigger(trigger_it->p, last_synchronization_ts_us_, trigger_it->id); + } + + wait_for_triggers_cond_.notify_all(); +} + +template +uint32_t DataSynchronizerFromTriggers::synchronize_data_from_triggers( + DataIterator data_it_begin, DataIterator data_it_end, + std::function &)> data_timestamp_accessor, + std::function &)> data_index_accessor) { + auto data_it = data_it_begin; + std::unique_lock lock(triggers_updated_mutex_); + + for (; data_it != data_it_end; ++data_it) { + // ------------------------------ + // Check if the last sync info is older than the one to be synchronized. + // Possible cases: + // 1- There is sync information in the queue and one has the same index as the current data + // 2- No sync info is available in the queue -> we need to wait for some + // 3- Sync info are available in the queue but the most recent index is lower than the input data to + // synchronize + // 4- Sync info are available in the queue but the oldest one's index is greater than the input data to + // synchronize + + // Cases 2 & 3 -> Need to wait for sync info + bool has_synchronization_info = false; + + // We wait for new synchronization information if needed. + wait_for_triggers_cond_.wait(lock, [&]() { + // We check here if we have enough information to proceed with the synchronization + has_synchronization_info = !synchronization_information_deque_.empty() && + last_synchronization_index_ >= data_index_accessor(*data_it); + + if (!has_synchronization_info) { + if (!synchronization_information_deque_.empty()) { + // The last index is lower than the idx that we are searching. We consume the triggers to avoid + // a deadlock + synchronization_information_deque_.clear(); + } + + // If not, all triggers have been used for synchronization. We notify to unlock any process + // waiting on this condition + wait_for_triggers_consumed_cond_.notify_all(); + } + return has_synchronization_info || triggers_source_is_done_; + }); + + if (!has_synchronization_info) { + // Source is done and no sync info remains + break; + } + // Here, even if source is done but we have triggers to synchronize, we use all we have. + + // Case 4 -> interpolates sync info in the past + if (data_index_accessor(*data_it) < synchronization_information_deque_.front().index) { + SynchronizationInformation sync_info_past_interpolated = synchronization_information_deque_.front(); + const auto data_index = data_index_accessor(*data_it); + while (data_index < sync_info_past_interpolated.index) { + --sync_info_past_interpolated.index; + sync_info_past_interpolated.t -= parameters_.period_us_; + synchronization_information_deque_.push_front(sync_info_past_interpolated); + } + } + + // Case 1 -> We have enough triggers + SynchronizationInformation sync_information = synchronization_information_deque_.front(); + synchronization_information_deque_.pop_front(); + while (data_index_accessor(*data_it) != + sync_information.index) { // No need to check on size: the above checks ensure that the + // synchronization information is in the queue. + sync_information = synchronization_information_deque_.front(); + synchronization_information_deque_.pop_front(); + } + + data_timestamp_accessor(*data_it) = sync_information.t; + } + + wait_for_triggers_consumed_cond_.notify_all(); + + // compute the amount of data synchronized + return std::distance(data_it_begin, data_it); +} +} // namespace Metavision + +#endif // METAVISION_SDK_CORE_DETAIL_DATA_SYNCHRONIZER_FROM_TRIGGERS_IMPL_H diff --git a/sdk/modules/core/cpp/include/metavision/sdk/core/utils/mostrecent_timestamp_buffer.h b/sdk/modules/core/cpp/include/metavision/sdk/core/utils/mostrecent_timestamp_buffer.h index d1c3d562a..4ea96fcfb 100644 --- a/sdk/modules/core/cpp/include/metavision/sdk/core/utils/mostrecent_timestamp_buffer.h +++ b/sdk/modules/core/cpp/include/metavision/sdk/core/utils/mostrecent_timestamp_buffer.h @@ -147,13 +147,6 @@ class MostRecentTimestampBufferT { /// @note This class is a template specialization of @ref MostRecentTimestampBufferT for @ref timestamp using MostRecentTimestampBuffer = MostRecentTimestampBufferT; -/// @note TMostRecentTimestampBuffer is deprecated since version 2.3.1 and will be removed in later -/// releases. Please use MostRecentTimestampBufferT instead -template -class [[deprecated( - "TMostRecentTimestampBuffer is deprecated since version 2.3.1 and will be removed in later releases. " - "Please use MostRecentTimestampBufferT instead")]] TMostRecentTimestampBuffer; - } // namespace Metavision // Function definitions diff --git a/sdk/modules/core/cpp/include/metavision/sdk/core/utils/rate_estimator.h b/sdk/modules/core/cpp/include/metavision/sdk/core/utils/rate_estimator.h index 369dc7d85..a1bd01069 100644 --- a/sdk/modules/core/cpp/include/metavision/sdk/core/utils/rate_estimator.h +++ b/sdk/modules/core/cpp/include/metavision/sdk/core/utils/rate_estimator.h @@ -27,11 +27,19 @@ class RateEstimator { using Callback = std::function; /// @brief Constructor - /// @param cb Callback that will be called every @p step_time with the current timestamp, estimated average and + /// @param cb Callback that will be called with the current timestamp, estimated average and /// peak rates over the counts added in the @p window time span /// @param step_time Minimum period between two successive callbacks /// @param window_time Time window used to compute the average and peak rates - RateEstimator(const Callback &cb = Callback(), timestamp step_time = 100000, timestamp window_time = 1000000); + /// @param system_time_flag Flag indicating when the callback will be called; + /// if false, the callback is called with a multiple of @p step_time as current + /// timestamp, when data with a timestamp higher than the previous callback + /// timestamp plus @p step_time is added; + /// if true, the callback is called with the timestamp of the last added data as + /// current timestamp, when data is added while system time delay greater than + /// @p step_time since the last time the callback was called has elapsed. + RateEstimator(const Callback &cb = Callback(), timestamp step_time = 100000, timestamp window_time = 1000000, + bool system_time_flag = false); /// @brief Adds a sample @p count at t = @p time /// @param time Time of the sample @@ -60,6 +68,7 @@ class RateEstimator { Callback cb_; timestamp window_time_, step_time_, next_time_; std::deque> counts_; + bool system_time_flag_; }; } // namespace Metavision diff --git a/sdk/modules/core/cpp/include/metavision/sdk/core/utils/similarity_metrics.h b/sdk/modules/core/cpp/include/metavision/sdk/core/utils/similarity_metrics.h new file mode 100644 index 000000000..79d01954b --- /dev/null +++ b/sdk/modules/core/cpp/include/metavision/sdk/core/utils/similarity_metrics.h @@ -0,0 +1,85 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#ifndef METAVISION_SDK_ML_SIMILARITY_METRICS_H +#define METAVISION_SDK_ML_SIMILARITY_METRICS_H + +#include +#include +#include + +namespace Metavision { +namespace Utils { + +/// @brief Computes intersection area of two boxes +/// @param box1 Description of a 2D box +/// @param box2 Description of a 2D box +/// @return proportion of intersection area +template +inline float intersection(const T1 &box1, const T2 &box2) { + decltype(box1.x) zero(0); + float w_intersect = std::max(zero, std::min(box1.x + box1.w, box2.x + box2.w) - std::max(box1.x, box2.x)); + float h_intersect = std::max(zero, std::min(box1.y + box1.h, box2.y + box2.h) - std::max(box1.y, box2.y)); + return w_intersect * h_intersect; +} + +/// @brief Computes the ratio between intersection area and union area +/// @param box1 Description of a 2D box +/// @param box2 Description of a 2D box +/// @return Proportion of intersection area +template +inline float intersection_over_union(const T1 &box1, const T2 &box2) { + float intersection_area = intersection(box1, box2); + float union_area = box1.w * box1.h + box2.w * box2.h - intersection_area; + return union_area > 0 ? intersection_area / union_area : 0; +} + +/// @brief Helper function to compute similarity, taking into account the class. +/// @param box1 Description of a 2D box +/// @param box2 Description of a 2D box +/// @return Proportion of intersection area if class ID are the same, 0 otherwise +template +inline float compute_similarity_iou_using_classid(const T1 &box1, const T2 &box2) { + if (box1.class_id == box2.class_id) { + return Utils::intersection_over_union(box1, box2); + } + + return 0.f; +} + +/// Helper function to compute similarity, taking into account the class and a similarity matrix +/// @param box1 Description of a 2D box +/// @param box2 Description of a 2D box +/// @param similarity_matrix (nb_object_classes + 1) x (nb_object_classes + 1) matrix of similarity weights. +/// @param nb_object_classes Number of valid object classes. class_id 0 is 'background' class and is not counted as a +/// valid object class +/// @return Weighted proportion of intersection area (weights depends on class id) +template +inline float compute_similarity_iou_using_classid_and_similarity_matrix(const T1 &box1, const T2 &box2, + const std::vector &similarity_matrix, + unsigned int nb_object_classes) { + const auto class_1 = box1.class_id; + const auto class_2 = box2.class_id; + assert(class_1 > 0); + assert(class_1 <= nb_object_classes); + assert(class_2 > 0); + assert(class_2 <= nb_object_classes); + assert(similarity_matrix.size() == (nb_object_classes + 1) * (nb_object_classes + 1)); + + float similarity = Utils::intersection_over_union(box1, box2); + similarity *= similarity_matrix[class_1 * (nb_object_classes + 1) + class_2]; + return similarity; +} + +} // namespace Utils +} // namespace Metavision + +#endif // METAVISION_SDK_ML_SIMILARITY_METRICS_H diff --git a/sdk/modules/core/cpp/samples/metavision_csv_viewer/metavision_csv_viewer.cpp b/sdk/modules/core/cpp/samples/metavision_csv_viewer/metavision_csv_viewer.cpp index be147cc3f..3204a1b4f 100644 --- a/sdk/modules/core/cpp/samples/metavision_csv_viewer/metavision_csv_viewer.cpp +++ b/sdk/modules/core/cpp/samples/metavision_csv_viewer/metavision_csv_viewer.cpp @@ -144,8 +144,8 @@ int main(int argc, char *argv[]) { // 0) Stage producing events from a CSV file auto &csv_stage = p.add_stage(std::make_unique(in_csv_file_path)); - // 1) Stage generating a frame with events previously produced - auto &frame_stage = p.add_stage(std::make_unique(width, height, 30), csv_stage); + // 1) Stage generating a frame with events previously produced using accumulation time of 10ms + auto &frame_stage = p.add_stage(std::make_unique(width, height, 10), csv_stage); // 2) Stage displaying the generated frame auto &disp_stage = diff --git a/sdk/modules/core/cpp/samples/metavision_filtering/metavision_filtering.cpp b/sdk/modules/core/cpp/samples/metavision_filtering/metavision_filtering.cpp index 438ada80a..5a080aa42 100644 --- a/sdk/modules/core/cpp/samples/metavision_filtering/metavision_filtering.cpp +++ b/sdk/modules/core/cpp/samples/metavision_filtering/metavision_filtering.cpp @@ -94,7 +94,7 @@ int main(int argc, char *argv[]) { // 2) Stage wrapping a polarity filter algorithm auto &pol_stage = p.add_algorithm_stage(std::make_unique(0), roi_stage, false); - // 3) Stage generating a frame from filtered events + // 3) Stage generating a frame from filtered events using accumulation time of 30ms auto &frame_stage = p.add_stage(std::make_unique(width, height, 30), pol_stage); // 4) Stage displaying the frame diff --git a/sdk/modules/core/cpp/src/CMakeLists.txt b/sdk/modules/core/cpp/src/CMakeLists.txt index 3da556ef0..a12dab4f7 100644 --- a/sdk/modules/core/cpp/src/CMakeLists.txt +++ b/sdk/modules/core/cpp/src/CMakeLists.txt @@ -12,6 +12,7 @@ target_sources(metavision_sdk_core PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/base_frame_generation_algorithm.cpp ${CMAKE_CURRENT_SOURCE_DIR}/cd_frame_generator.cpp ${CMAKE_CURRENT_SOURCE_DIR}/cv_video_recorder.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/data_synchronizer_from_triggers.cpp ${CMAKE_CURRENT_SOURCE_DIR}/periodic_frame_generation_algorithm.cpp ${CMAKE_CURRENT_SOURCE_DIR}/on_demand_frame_generation_algorithm.cpp ${CMAKE_CURRENT_SOURCE_DIR}/rate_estimator.cpp diff --git a/sdk/modules/core/cpp/src/data_synchronizer_from_triggers.cpp b/sdk/modules/core/cpp/src/data_synchronizer_from_triggers.cpp new file mode 100644 index 000000000..795c31ef6 --- /dev/null +++ b/sdk/modules/core/cpp/src/data_synchronizer_from_triggers.cpp @@ -0,0 +1,54 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include "metavision/sdk/core/utils/data_synchronizer_from_triggers.h" + +namespace Metavision { +DataSynchronizerFromTriggers::Parameters::Parameters(uint32_t period_us) : period_us_(period_us) { + if (period_us_ == 0) { + throw std::invalid_argument("In Events synchronizer from triggers, period must be strictly greater than 0."); + } +} + +DataSynchronizerFromTriggers::DataSynchronizerFromTriggers(const Parameters ¶meters) : parameters_(parameters) { + reset_synchronization(); +} + +DataSynchronizerFromTriggers::~DataSynchronizerFromTriggers() { + set_synchronization_as_done(); +} + +void DataSynchronizerFromTriggers::reset_synchronization() { + set_synchronization_as_done(); + std::lock_guard lock(triggers_updated_mutex_); + synchronization_information_deque_.clear(); + first_trigger_indexed_ = false; + triggers_source_is_done_ = false; + last_synchronization_index_ = 0; + last_synchronization_ts_us_ = 0; +} + +void DataSynchronizerFromTriggers::set_synchronization_as_done() { + std::lock_guard lock(triggers_updated_mutex_); + triggers_source_is_done_ = true; + wait_for_triggers_cond_.notify_all(); + wait_for_triggers_consumed_cond_.notify_all(); +} + +void DataSynchronizerFromTriggers::wait_for_triggers_consumed(uint32_t max_remaining_to_be_consumed) { + std::unique_lock lock(triggers_updated_mutex_); + if (triggers_source_is_done_) + return; + wait_for_triggers_consumed_cond_.wait(lock, [this, max_remaining_to_be_consumed]() { + return triggers_source_is_done_ || synchronization_information_deque_.size() <= max_remaining_to_be_consumed; + }); +} +} // namespace Metavision diff --git a/sdk/modules/core/cpp/src/on_demand_frame_generation_algorithm.cpp b/sdk/modules/core/cpp/src/on_demand_frame_generation_algorithm.cpp index 646deb88c..dc94b4e2b 100644 --- a/sdk/modules/core/cpp/src/on_demand_frame_generation_algorithm.cpp +++ b/sdk/modules/core/cpp/src/on_demand_frame_generation_algorithm.cpp @@ -53,8 +53,8 @@ void OnDemandFrameGenerationAlgorithm::generate(timestamp ts, cv::Mat &frame, bo } void OnDemandFrameGenerationAlgorithm::set_accumulation_time_us(uint32_t accumulation_time_us) { - if (accumulation_time_us < 0) - throw std::invalid_argument("Accumulation time must be positive."); + if (accumulation_time_us == 0) + throw std::invalid_argument("Accumulation time must be strictly positive."); accumulation_time_us_ = accumulation_time_us; } diff --git a/sdk/modules/core/cpp/src/periodic_frame_generation_algorithm.cpp b/sdk/modules/core/cpp/src/periodic_frame_generation_algorithm.cpp index 146d944ca..d20899d0e 100644 --- a/sdk/modules/core/cpp/src/periodic_frame_generation_algorithm.cpp +++ b/sdk/modules/core/cpp/src/periodic_frame_generation_algorithm.cpp @@ -91,16 +91,18 @@ void PeriodicFrameGenerationAlgorithm::process_async(const timestamp processing_ // Fill the frame from the time surface const size_t num_pixels = time_surface_.size(); if (colored_) { - auto img_it = frame_.begin(); - for (size_t i = 0; i < num_pixels; ++i, ++img_it) { + // Matrices allocated with the create() method are always continuous in memory + auto img_ptr = frame_.ptr(0); + for (size_t i = 0; i < num_pixels; ++i) { const auto &last_pix_data = time_surface_[i]; - *img_it = last_pix_data.first < min_display_event_ts ? bg_color_ : off_on_colors_[last_pix_data.second]; + img_ptr[i] = last_pix_data.first < min_display_event_ts ? bg_color_ : off_on_colors_[last_pix_data.second]; } } else { - auto img_it = frame_.begin(); - for (size_t i = 0; i < num_pixels; ++i, ++img_it) { + // Matrices allocated with the create() method are always continuous in memory + auto img_ptr = frame_.ptr(0); + for (size_t i = 0; i < num_pixels; ++i) { const auto &last_pix_data = time_surface_[i]; - *img_it = + img_ptr[i] = last_pix_data.first < min_display_event_ts ? bg_color_[0] : off_on_colors_[last_pix_data.second][0]; } } diff --git a/sdk/modules/core/cpp/src/rate_estimator.cpp b/sdk/modules/core/cpp/src/rate_estimator.cpp index ca0b5e524..d30dc55eb 100644 --- a/sdk/modules/core/cpp/src/rate_estimator.cpp +++ b/sdk/modules/core/cpp/src/rate_estimator.cpp @@ -10,40 +10,50 @@ **********************************************************************************************************************/ #include +#include #include "metavision/sdk/core/utils/rate_estimator.h" namespace Metavision { -RateEstimator::RateEstimator(const Callback &cb, timestamp step_time, timestamp window_time) { - cb_ = cb; - step_time_ = step_time; - window_time_ = window_time; - next_time_ = step_time; +RateEstimator::RateEstimator(const Callback &cb, timestamp step_time, timestamp window_time, bool system_time_flag) { + cb_ = cb; + step_time_ = step_time; + window_time_ = window_time; + next_time_ = step_time; + system_time_flag_ = system_time_flag; } void RateEstimator::add_data(timestamp time, size_t count) { std::unique_lock guard(mutex_); + long long current_time = time; if (!counts_.empty() && counts_.back().first == time) { counts_.back().second += count; } else { counts_.emplace_back(time, count); } - if (time > next_time_) { + if (system_time_flag_) { + current_time = std::chrono::time_point_cast(std::chrono::steady_clock::now()) + .time_since_epoch() + .count(); + } + + if (current_time > next_time_) { // handle calls to reset_data where next_time has been reset to a "too far" value // this set next_time_ so that time - step_time_ < next_time_ < time - while (time > next_time_ + step_time_) { + while (current_time > next_time_ + step_time_) { next_time_ += step_time_; } if (cb_) { - timestamp last_time = 0; - int count = 0; + timestamp last_time = 0; + timestamp callback_time = (system_time_flag_ ? time : next_time_); + int count = 0; double peak_rate = 0., avg_rate = 0.; // find the first count corresponding to the next callback timestamp minus the time window - auto begin_it = std::lower_bound(counts_.begin(), counts_.end(), next_time_ - window_time_ + 1, + auto begin_it = std::lower_bound(counts_.begin(), counts_.end(), callback_time - window_time_ + 1, [](const auto &p, const timestamp &t) { return p.first < t; }), - end_it = std::lower_bound(counts_.begin(), counts_.end(), next_time_ + 1, + end_it = std::lower_bound(counts_.begin(), counts_.end(), callback_time + 1, [](const auto &p, const timestamp &t) { return p.first < t; }); if (begin_it != counts_.begin()) { last_time = std::prev(begin_it)->first; @@ -60,7 +70,7 @@ void RateEstimator::add_data(timestamp time, size_t count) { if (count != 0) { avg_rate /= count; } - cb_(next_time_, avg_rate * 1.e6, peak_rate * 1.e6); + cb_(callback_time, avg_rate * 1.e6, peak_rate * 1.e6); // remove older countime from the map, they won't be needed anymore counts_.erase(counts_.begin(), begin_it); diff --git a/sdk/modules/core/cpp/tests/CMakeLists.txt b/sdk/modules/core/cpp/tests/CMakeLists.txt index 0c1c3c142..6842fe019 100644 --- a/sdk/modules/core/cpp/tests/CMakeLists.txt +++ b/sdk/modules/core/cpp/tests/CMakeLists.txt @@ -13,6 +13,7 @@ set(metavision_sdk_core_tests_srcs ${CMAKE_CURRENT_SOURCE_DIR}/cd_frame_generator_gtest.cpp ${CMAKE_CURRENT_SOURCE_DIR}/counter_map_gtest.cpp ${CMAKE_CURRENT_SOURCE_DIR}/cv_color_map_gtest.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/data_synchronizer_from_triggers_gtest.cpp ${CMAKE_CURRENT_SOURCE_DIR}/flip_x_algorithm_gtest.cpp ${CMAKE_CURRENT_SOURCE_DIR}/flip_y_algorithm_gtest.cpp ${CMAKE_CURRENT_SOURCE_DIR}/frame_composer_gtest.cpp diff --git a/sdk/modules/core/cpp/tests/async_algorithm_gtest.cpp b/sdk/modules/core/cpp/tests/async_algorithm_gtest.cpp index ff7cb4181..2b7cfea44 100644 --- a/sdk/modules/core/cpp/tests/async_algorithm_gtest.cpp +++ b/sdk/modules/core/cpp/tests/async_algorithm_gtest.cpp @@ -18,6 +18,8 @@ using namespace Metavision; +using SizeType = std::vector::size_type; + class AsyncAlgorithmImpl : public AsyncAlgorithm { public: using State = std::vector; @@ -186,7 +188,7 @@ TEST_F(AsyncAlgorithm_GTest, us_1) { ASSERT_EQ(49, timestamps.back()); ASSERT_EQ(49, algo_.current_processing_ts_us_); - for (size_t i = 0; i < buffer_sizes.size(); ++i) + for (SizeType i = 0; i < buffer_sizes.size(); ++i) ASSERT_EQ(1, buffer_sizes[i]); ASSERT_EQ(49, timestamps.size()); @@ -232,7 +234,7 @@ TEST_F(AsyncAlgorithm_GTest, us_10) { ASSERT_EQ(40, timestamps.back()); ASSERT_EQ(40, algo_.current_processing_ts_us_); - for (size_t i = 0; i < buffer_sizes.size(); ++i) + for (SizeType i = 0; i < buffer_sizes.size(); ++i) ASSERT_EQ(10, buffer_sizes[i]); ASSERT_EQ(4, timestamps.size()); @@ -381,7 +383,7 @@ TEST_F(AsyncAlgorithm_GTest, timeshift_round_ts) { // buffer not being pcreated because async algo wait an events we greater timestamp to trig the process online ASSERT_EQ(40, sum_ev); ASSERT_EQ(4, buffer_sizes.size()); - for (size_t i = 0; i < buffer_sizes.size(); ++i) + for (SizeType i = 0; i < buffer_sizes.size(); ++i) ASSERT_EQ(10, buffer_sizes[i]); ASSERT_EQ(4, timestamps.size()); @@ -420,7 +422,7 @@ TEST_F(AsyncAlgorithm_GTest, timeshift_not_round_ts) { ASSERT_EQ(5, buffer_sizes.size()); ASSERT_EQ(7, buffer_sizes[0]); - for (size_t i = 1; i < buffer_sizes.size(); ++i) + for (SizeType i = 1; i < buffer_sizes.size(); ++i) ASSERT_EQ(10, buffer_sizes[i]); ASSERT_EQ(5, timestamps.size()); diff --git a/sdk/modules/core/cpp/tests/data_synchronizer_from_triggers_gtest.cpp b/sdk/modules/core/cpp/tests/data_synchronizer_from_triggers_gtest.cpp new file mode 100644 index 000000000..34f9ce131 --- /dev/null +++ b/sdk/modules/core/cpp/tests/data_synchronizer_from_triggers_gtest.cpp @@ -0,0 +1,430 @@ +/********************************************************************************************************************** + * Copyright (c) Prophesee S.A. * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and limitations under the License. * + **********************************************************************************************************************/ + +#include +#include +#include +#include +#include + +#include "metavision/sdk/core/utils/data_synchronizer_from_triggers.h" +#include "metavision/sdk/base/events/event2d.h" + +namespace Metavision { + +using SizeType = std::vector::size_type; + +struct Event2dIndex : public Event2d { + static uint32_t index_accessor(const Event2dIndex &ev) { + return ev.index; + } + static Metavision::timestamp ×tamp_accessor(Event2dIndex &ev) { + return ev.t; + } + uint32_t index; +}; + +template +std::vector create_trigger_buffer(const std::vector &indices, const uint32_t period_us, + const timestamp ts_offset_us = 0, + const timestamp noise = 0) { + std::vector triggers; + for (auto it_idx = indices.cbegin(), it_idx_end = indices.cend(); it_idx != it_idx_end; ++it_idx) { + Metavision::EventExtTrigger ev_up, ev_down; + ev_up.t = ts_offset_us + (period_us * (*it_idx)) + (noise > 0 ? (rand() % noise) : 0); + ev_up.p = 1; + ev_up.id = 0; + ev_down.t = ev_up.t; + ev_down.p = 0; + ev_down.id = 0; + triggers.push_back(ev_up); + triggers.push_back(ev_down); + } + + return triggers; +} + +class DataSynchronizerFromTriggers_GTest : public ::testing::Test { +public: + DataSynchronizerFromTriggers_GTest() {} + + virtual ~DataSynchronizerFromTriggers_GTest() {} +}; + +TEST_F(DataSynchronizerFromTriggers_GTest, ThrowIfNullPeriod) { + // Check that instantiating parameters with a period of value 0 is invalid and results in an exception being thrown + + uint32_t period_us = 0; + ASSERT_THROW({ DataSynchronizerFromTriggers::Parameters params(period_us); }, std::invalid_argument); +} + +TEST_F(DataSynchronizerFromTriggers_GTest, CanNotIndexTriggerConditions) { + // Check that the indexing method returns false whenever we don't index any trigger or index a duplicate + + std::vector triggers_indexed; + + uint32_t period_us = 20000; + DataSynchronizerFromTriggers::Parameters param(period_us); + param.index_offset_ = 0; + param.reference_polarity_ = 0; + param.periodicity_tolerance_factor_ = 0.1; + param.to_discard_count_ = 0; + DataSynchronizerFromTriggers sync(param); + + const Metavision::EventExtTrigger failed_to_index_polarity(!param.reference_polarity_, 0, + 0); // polarity 1 are not indexed + const Metavision::EventExtTrigger successfully_indexed(param.reference_polarity_, 0, + 0); // polarity 0 are indexed + const Metavision::EventExtTrigger failed_to_index(successfully_indexed); // Same as the previous one + const Metavision::EventExtTrigger successfully_indexed_bis(param.reference_polarity_, period_us, + 0); // okay trigger + + ASSERT_FALSE(sync.index_triggers(&failed_to_index_polarity, &failed_to_index_polarity + 1)); + ASSERT_TRUE(sync.index_triggers(&successfully_indexed, &successfully_indexed + 1)); + ASSERT_FALSE(sync.index_triggers(&failed_to_index, &failed_to_index + 1)); // Same as successfully_indexed + ASSERT_TRUE(sync.index_triggers(&successfully_indexed_bis, &successfully_indexed_bis + 1)); + ASSERT_FALSE(sync.index_triggers(&failed_to_index, + &failed_to_index + + 1)); // In the past (has t = 0 when successfully_indexed_bis has t = period) +} + +TEST_F(DataSynchronizerFromTriggers_GTest, Nominal) { + // Verify that with a basic set of triggers and indexed data, we associate the correct timestamps. + // All triggers + all frames = each frame has the timestamp of its corresponding trigger + + const int32_t period_us = 20000; + DataSynchronizerFromTriggers::Parameters param(period_us); + param.index_offset_ = 0; + param.reference_polarity_ = 0; + param.periodicity_tolerance_factor_ = 0.1; + param.to_discard_count_ = 0; + DataSynchronizerFromTriggers sync(param); + + const std::vector indices_data_input = {0, 1, 2, 3, 4, 5}; + const std::vector indices_trigger_input = {0, 1, 2, 3, 4, 5}; + std::vector to_index(indices_data_input.size()); + for (SizeType i = 0; i < indices_data_input.size(); ++i) { + to_index[i].index = indices_data_input[i]; + } + + auto trigger_buffer = create_trigger_buffer(indices_trigger_input, period_us); + ASSERT_TRUE(sync.index_triggers(trigger_buffer.cbegin(), trigger_buffer.cend())); + ASSERT_EQ(indices_data_input.size(), + sync.synchronize_data_from_triggers(to_index.begin(), to_index.end(), &Event2dIndex::timestamp_accessor, + &Event2dIndex::index_accessor)); + + for (SizeType i = 0; i < indices_data_input.size(); ++i) { + ASSERT_EQ(trigger_buffer[2 * i + !param.reference_polarity_].t, to_index[i].t); + } +} + +TEST_F(DataSynchronizerFromTriggers_GTest, NominalNoisy) { + // Verify that with a set of triggers with almost perfectly periodic ts and indexed data, we associate the correct + // timestamps. All triggers + all frames = each frames has the timestamp of its corresponding trigger + + const int32_t period_us = 20000; + DataSynchronizerFromTriggers::Parameters param(period_us); + param.index_offset_ = 0; + param.reference_polarity_ = 1; + param.periodicity_tolerance_factor_ = 0.1; + param.to_discard_count_ = 0; + DataSynchronizerFromTriggers sync(param); + + const std::vector indices_data_input = {0, 1, 2, 3, 4, 5}; + const std::vector indices_trigger_input = {0, 1, 2, 3, 4, 5}; + std::vector to_index(indices_data_input.size()); + for (SizeType i = 0; i < indices_data_input.size(); ++i) { + to_index[i].index = indices_data_input[i]; + } + + auto trigger_buffer = + create_trigger_buffer(indices_trigger_input, period_us, 0, param.periodicity_tolerance_factor_ * period_us); + ASSERT_TRUE(sync.index_triggers(trigger_buffer.cbegin(), trigger_buffer.cend())); + ASSERT_EQ(indices_data_input.size(), + sync.synchronize_data_from_triggers(to_index.begin(), to_index.end(), &Event2dIndex::timestamp_accessor, + &Event2dIndex::index_accessor)); + + for (SizeType i = 0; i < indices_data_input.size(); ++i) { + ASSERT_EQ(trigger_buffer[2 * i + !param.reference_polarity_].t, to_index[i].t); + } +} + +TEST_F(DataSynchronizerFromTriggers_GTest, LostTriggers) { + // Verify that with a set of triggers with some missing, and a set of indexed data, we associate the correct + // timestamps. If a trigger is missing, the timestamp must be interpolated correctly and must be between the + // previous and the following one + + const int32_t period_us = 20000; + DataSynchronizerFromTriggers::Parameters param(period_us); + param.index_offset_ = 0; + param.reference_polarity_ = 0; + param.periodicity_tolerance_factor_ = 0.1; + param.to_discard_count_ = 0; + DataSynchronizerFromTriggers sync(param); + + const std::vector indices_data_input = {0, 1, 2, 3, 4, 5}; + const std::vector indices_trigger_input = {0, 1, 4, 5}; + std::vector to_index(indices_data_input.size()); + for (SizeType i = 0; i < indices_data_input.size(); ++i) { + to_index[i].index = indices_data_input[i]; + } + + auto trigger_buffer = + create_trigger_buffer(indices_trigger_input, period_us, 0, param.periodicity_tolerance_factor_ * period_us); + + ASSERT_TRUE(sync.index_triggers(trigger_buffer.cbegin(), trigger_buffer.cend())); + ASSERT_EQ(indices_data_input.size(), + sync.synchronize_data_from_triggers(to_index.begin(), to_index.end(), &Event2dIndex::timestamp_accessor, + &Event2dIndex::index_accessor)); + + ASSERT_EQ(trigger_buffer[!param.reference_polarity_].t, to_index[0].t); + ASSERT_EQ(trigger_buffer[2 + !param.reference_polarity_].t, to_index[1].t); + ASSERT_EQ(trigger_buffer[2 + !param.reference_polarity_].t + period_us, + to_index[2].t); // missing trigger that was interpolated + ASSERT_EQ(trigger_buffer[2 + !param.reference_polarity_].t + 2 * period_us, + to_index[3].t); // missing trigger that was interpolated + ASSERT_EQ(trigger_buffer[4 + !param.reference_polarity_].t, to_index[4].t); + ASSERT_EQ(trigger_buffer[6 + !param.reference_polarity_].t, to_index[5].t); +} + +TEST_F(DataSynchronizerFromTriggers_GTest, LostDataAndTriggers) { + // Verify that with a set of triggers with some missing, and a set of indexed data with some missing, we associate + // the correct timestamps. + + const int32_t period_us = 20000; + DataSynchronizerFromTriggers::Parameters param(period_us); + param.index_offset_ = 0; + param.reference_polarity_ = 0; + param.periodicity_tolerance_factor_ = 0.1; + param.to_discard_count_ = 0; + DataSynchronizerFromTriggers sync(param); + + const std::vector indices_data_input = {0, 2, 3, 5}; + const std::vector indices_trigger_input = {0, 1, 4, 5}; + std::vector to_index(indices_data_input.size()); + for (SizeType i = 0; i < indices_data_input.size(); ++i) { + to_index[i].index = indices_data_input[i]; + } + + auto trigger_buffer = + create_trigger_buffer(indices_trigger_input, period_us, 0, param.periodicity_tolerance_factor_ * period_us); + + std::vector indexed; + sync.index_triggers(trigger_buffer.cbegin(), trigger_buffer.cend(), std::back_inserter(indexed)); + ASSERT_EQ(6, indexed.size()); // Trigger with index from 0 to 5 to be present/interpolated if missing to synchronize + // frame with sequence count from 0 to 5 --> 6 triggers must be indexed. + ASSERT_EQ(indices_data_input.size(), + sync.synchronize_data_from_triggers(to_index.begin(), to_index.end(), &Event2dIndex::timestamp_accessor, + &Event2dIndex::index_accessor)); + + ASSERT_EQ(trigger_buffer[!param.reference_polarity_].t, to_index[0].t); + ASSERT_EQ(trigger_buffer[2 + !param.reference_polarity_].t + period_us, + to_index[1].t); // missing trigger that was interpolated to missing frame + ASSERT_EQ(trigger_buffer[2 + !param.reference_polarity_].t + 2 * period_us, + to_index[2].t); // missing trigger that was interpolated + ASSERT_EQ(trigger_buffer[6 + !param.reference_polarity_].t, to_index[3].t); +} + +TEST_F(DataSynchronizerFromTriggers_GTest, NotEnoughTriggers) { + // In case we have more data than triggers, checks that only the right amount is timestamped and that we leave the + // function correctly (avoid deadlock) + + const int32_t period_us = 20000; + DataSynchronizerFromTriggers::Parameters param(period_us); + param.index_offset_ = 0; + param.reference_polarity_ = 0; + param.periodicity_tolerance_factor_ = 0.1; + param.to_discard_count_ = 0; + DataSynchronizerFromTriggers sync(param); + + const std::vector indices_data_input = {0, 1, 2, 3, 4, 5}; + const std::vector indices_trigger_input = {0, 1, 2, 3}; + std::vector to_index(indices_data_input.size()); + for (SizeType i = 0; i < indices_data_input.size(); ++i) { + to_index[i].index = indices_data_input[i]; + } + + auto trigger_buffer = + create_trigger_buffer(indices_trigger_input, period_us, 0, param.periodicity_tolerance_factor_ * period_us); + + ASSERT_TRUE(sync.index_triggers(trigger_buffer.cbegin(), trigger_buffer.cend())); + sync.set_synchronization_as_done(); + ASSERT_EQ(indices_trigger_input.size(), + sync.synchronize_data_from_triggers(to_index.begin(), to_index.end(), &Event2dIndex::timestamp_accessor, + &Event2dIndex::index_accessor)); + + using SizeType = std::vector::size_type; + for (SizeType i = 0; i < indices_trigger_input.size(); ++i) { + ASSERT_EQ(trigger_buffer[2 * i + !param.reference_polarity_].t, to_index[i].t); + } +} + +TEST_F(DataSynchronizerFromTriggers_GTest, NoTriggerToSyncFrame) { + // In case we have more data than triggers, checks that only the right amount is timestamped and that we leave the + // function correctly (avoid deadlock) + + const int32_t period_us = 20000; + DataSynchronizerFromTriggers::Parameters param(period_us); + param.index_offset_ = 3; + param.reference_polarity_ = 0; + param.periodicity_tolerance_factor_ = 0.1; + param.to_discard_count_ = 0; + DataSynchronizerFromTriggers sync(param); + + const std::vector indices_data_input = {1, 2, 3, 4, 5}; + const std::vector indices_trigger_input = {3, 4, 5}; + std::vector to_index(indices_data_input.size()); + for (SizeType i = 0; i < indices_data_input.size(); ++i) { + to_index[i].index = indices_data_input[i]; + } + + auto trigger_buffer = + create_trigger_buffer(indices_trigger_input, period_us, 0, param.periodicity_tolerance_factor_ * period_us); + + ASSERT_TRUE(sync.index_triggers(trigger_buffer.cbegin(), trigger_buffer.cend())); + sync.set_synchronization_as_done(); + ASSERT_EQ(indices_data_input.size(), + sync.synchronize_data_from_triggers(to_index.begin(), to_index.end(), &Event2dIndex::timestamp_accessor, + &Event2dIndex::index_accessor)); + + ASSERT_EQ(trigger_buffer[0 + !param.reference_polarity_].t - 2 * period_us, to_index[0].t); + ASSERT_EQ(trigger_buffer[0 + !param.reference_polarity_].t - period_us, to_index[1].t); + ASSERT_EQ(trigger_buffer[0 + !param.reference_polarity_].t, to_index[2].t); + ASSERT_EQ(trigger_buffer[2 + !param.reference_polarity_].t, to_index[3].t); + ASSERT_EQ(trigger_buffer[4 + !param.reference_polarity_].t, to_index[4].t); +} + +TEST_F(DataSynchronizerFromTriggers_GTest, TriggerDiscarded) { + // Checks first triggers to be discarded is taken into consideration + + const int32_t period_us = 20000; + DataSynchronizerFromTriggers::Parameters param(period_us); + param.index_offset_ = 0; + param.reference_polarity_ = 1; + param.periodicity_tolerance_factor_ = 0.1; + param.to_discard_count_ = 2; + DataSynchronizerFromTriggers sync(param); + + const std::vector indices_data_input = {0, 1, 2, 3, 4, 5}; + const std::vector indices_trigger_input = {0, 1, 2, 3, 4, 5, 6, 7}; + std::vector to_index(indices_data_input.size()); + for (SizeType i = 0; i < indices_data_input.size(); ++i) { + to_index[i].index = indices_data_input[i]; + } + + auto trigger_buffer = + create_trigger_buffer(indices_trigger_input, period_us, 0, param.periodicity_tolerance_factor_ * period_us); + + ASSERT_TRUE(sync.index_triggers(trigger_buffer.cbegin(), trigger_buffer.cend())); + ASSERT_EQ(indices_data_input.size(), + sync.synchronize_data_from_triggers(to_index.begin(), to_index.end(), &Event2dIndex::timestamp_accessor, + &Event2dIndex::index_accessor)); + + for (SizeType i = 0; i < indices_data_input.size(); ++i) { + ASSERT_EQ(trigger_buffer[2 * (i + param.to_discard_count_) + !param.reference_polarity_].t, to_index[i].t); + } +} + +TEST_F(DataSynchronizerFromTriggers_GTest, NominalThreaded) { + // Checks that we synchronize correctly data in nominal case in threaded context + + const int32_t period_us = 20000; + DataSynchronizerFromTriggers::Parameters param(period_us); + param.index_offset_ = 0; + param.reference_polarity_ = 1; + param.periodicity_tolerance_factor_ = 0.1; + param.to_discard_count_ = 0; + DataSynchronizerFromTriggers sync(param); + + const std::vector indices_data_input = {0, 1, 2, 3, 4, 5}; + const std::vector indices_trigger_input = {0, 1, 2, 3, 4, 5}; + std::vector to_index(indices_data_input.size()); + for (SizeType i = 0; i < indices_data_input.size(); ++i) { + to_index[i].index = indices_data_input[i]; + } + + auto trigger_buffer = create_trigger_buffer(indices_trigger_input, period_us, 0); + + std::thread trigger_thread([&]() { + for (SizeType i = 0; i < trigger_buffer.size() / 2; ++i) { + std::this_thread::sleep_for(std::chrono::microseconds(period_us)); + EXPECT_TRUE(sync.index_triggers(trigger_buffer.cbegin() + 2 * i, trigger_buffer.cbegin() + 2 * (i + 1))); + } + }); + + EXPECT_EQ(indices_data_input.size(), + sync.synchronize_data_from_triggers(to_index.begin(), to_index.end(), &Event2dIndex::timestamp_accessor, + &Event2dIndex::index_accessor)); + + for (SizeType i = 0; i < indices_data_input.size(); ++i) { + EXPECT_EQ(trigger_buffer[2 * (i + param.to_discard_count_) + !param.reference_polarity_].t, to_index[i].t); + } + + trigger_thread.join(); +} + +TEST_F(DataSynchronizerFromTriggers_GTest, LostTriggersThreaded) { + // Checks that we synchronize correctly data in threaded context even if triggers are missing + + const int32_t period_us = 20000; + DataSynchronizerFromTriggers::Parameters param(period_us); + param.index_offset_ = 0; + param.reference_polarity_ = 1; + param.periodicity_tolerance_factor_ = 0.1; + param.to_discard_count_ = 0; + DataSynchronizerFromTriggers sync(param); + + const std::vector indices_data_input = {0, 1, 2, 3, 4, 5}; + const std::vector indices_trigger_input = {0, 1, 5}; + std::vector to_index(indices_data_input.size()); + for (SizeType i = 0; i < indices_data_input.size(); ++i) { + to_index[i].index = indices_data_input[i]; + } + + auto trigger_buffer = create_trigger_buffer(indices_trigger_input, period_us, 0); + + std::thread trigger_thread([&]() { + std::this_thread::sleep_for(std::chrono::microseconds(period_us)); + EXPECT_TRUE(sync.index_triggers(trigger_buffer.cbegin(), trigger_buffer.cbegin() + 2)); + + std::this_thread::sleep_for(std::chrono::microseconds(period_us)); + EXPECT_TRUE(sync.index_triggers(trigger_buffer.cbegin() + 2, trigger_buffer.cbegin() + 4)); + + std::this_thread::sleep_for(std::chrono::microseconds(period_us)); // Missing 2, 3, and 4th trigger + std::this_thread::sleep_for(std::chrono::microseconds(period_us)); + std::this_thread::sleep_for(std::chrono::microseconds(period_us)); + + std::this_thread::sleep_for(std::chrono::microseconds(period_us)); + EXPECT_TRUE(sync.index_triggers(trigger_buffer.cbegin() + 4, trigger_buffer.cbegin() + 6)); + }); + + const auto tnow = std::chrono::system_clock::now(); + EXPECT_EQ(indices_data_input.size(), + sync.synchronize_data_from_triggers(to_index.begin(), to_index.end(), &Event2dIndex::timestamp_accessor, + &Event2dIndex::index_accessor)); + const auto tdiff = + std::chrono::duration_cast(std::chrono::system_clock::now() - tnow).count(); + EXPECT_GE(tdiff, period_us * indices_data_input.size()); + + EXPECT_EQ(trigger_buffer[!param.reference_polarity_].t, to_index[0].t); + EXPECT_EQ(trigger_buffer[2 + !param.reference_polarity_].t, to_index[1].t); + EXPECT_EQ(trigger_buffer[2 + !param.reference_polarity_].t + period_us, + to_index[2].t); // missing trigger that was interpolated + EXPECT_EQ(trigger_buffer[2 + !param.reference_polarity_].t + 2 * period_us, + to_index[3].t); // missing trigger that was interpolated + EXPECT_EQ(trigger_buffer[2 + !param.reference_polarity_].t + 3 * period_us, + to_index[4].t); // missing trigger that was interpolated + EXPECT_EQ(trigger_buffer[4 + !param.reference_polarity_].t, to_index[5].t); + + trigger_thread.join(); +} + +} // namespace Metavision diff --git a/sdk/modules/core/cpp/tests/frame_composer_gtest.cpp b/sdk/modules/core/cpp/tests/frame_composer_gtest.cpp index 96de73e65..ffc29e5bf 100644 --- a/sdk/modules/core/cpp/tests/frame_composer_gtest.cpp +++ b/sdk/modules/core/cpp/tests/frame_composer_gtest.cpp @@ -72,7 +72,8 @@ TEST_F(FrameComposer_GTest, fit_size) { FrameComposer composer(cv::Vec3b(0, 0, 0)); std::vector> sizes; sizes.reserve(frames.size()); - for (int i = 0; i < frames.size(); ++i) { + using SizeType = std::vector::size_type; + for (SizeType i = 0; i < frames.size(); ++i) { const cv::Rect &roi = rois[i]; FrameComposer::ResizingOptions resize_options(roi.width, roi.height); FrameComposer::GrayToColorOptions gray_o; diff --git a/sdk/modules/core/cpp/tests/generic_producer_algorithm_gtest.cpp b/sdk/modules/core/cpp/tests/generic_producer_algorithm_gtest.cpp index edce1c065..44396d2f4 100644 --- a/sdk/modules/core/cpp/tests/generic_producer_algorithm_gtest.cpp +++ b/sdk/modules/core/cpp/tests/generic_producer_algorithm_gtest.cpp @@ -34,8 +34,9 @@ class GenericProducerAlgorithm_GTest : public ::testing::Test { void assert_ring_size(size_t max_size) { std::unique_lock lock(producer_algo_.underfilled_wait_mut_); std::unique_lock lock2(producer_algo_.overfilled_wait_mut_); - if (producer_algo_.ring_event_.data_available()) + if (producer_algo_.ring_event_.data_available()) { ASSERT_GE(size_t(5), producer_algo_.ring_event_.get_last_time() - get_ring().get_first_time()); + } } GenericProducerAlgorithm producer_algo_; }; diff --git a/sdk/modules/core/cpp/tests/on_demand_frame_generation_algorithm_gtest.cpp b/sdk/modules/core/cpp/tests/on_demand_frame_generation_algorithm_gtest.cpp index 3b3be11eb..8d216e718 100644 --- a/sdk/modules/core/cpp/tests/on_demand_frame_generation_algorithm_gtest.cpp +++ b/sdk/modules/core/cpp/tests/on_demand_frame_generation_algorithm_gtest.cpp @@ -634,7 +634,8 @@ TEST(OnDemandFrameGenerationAlgorithm_GTest, delay_overlapping_frame_generation) // THEN we generate the expected frames cv::Mat expected_frame(sensor_height, sensor_width, CV_8UC3); ASSERT_EQ(events_gt.size(), generated_frames.size()); - for (int i = 0; i < events_gt.size(); i++) { + using SizeType = std::vector>::size_type; + for (SizeType i = 0; i < events_gt.size(); ++i) { expected_frame.setTo(bg_color); const auto &evs = events_gt[i]; for (const auto &ev : evs) diff --git a/sdk/modules/core/cpp/tests/pipeline_gtest.cpp b/sdk/modules/core/cpp/tests/pipeline_gtest.cpp index 2247ed4bf..428a0224e 100644 --- a/sdk/modules/core/cpp/tests/pipeline_gtest.cpp +++ b/sdk/modules/core/cpp/tests/pipeline_gtest.cpp @@ -515,10 +515,10 @@ TEST(PipelineTest, cancel_when_consuming_with_undetached_consumer) { // actually cancels the pipeline, at multiple stages of consumption size_t count = 5; std::vector datas(count); - for (int i = 0; i < count; ++i) { + for (size_t i = 0; i < count; ++i) { datas[i] = i; } - for (int i = 1; i <= count; ++i) { + for (size_t i = 1; i <= count; ++i) { Pipeline p; auto &s1 = p.add_stage(std::make_unique(datas)); auto &s2 = p.add_stage(std::make_unique(), s1); @@ -543,14 +543,14 @@ TEST(PipelineTest, cancel_when_consuming_with_detached_consumer) { // actually cancels the pipeline, at multiple stages of consumption size_t count = 5; std::vector datas(count); - for (int i = 0; i < count; ++i) { + for (size_t i = 0; i < count; ++i) { datas[i] = i; } - for (int i = 0; i < count; ++i) { + for (size_t i = 0; i < count; ++i) { Pipeline p(true); auto &s1 = p.add_stage(std::make_unique(datas)); auto &s2 = p.add_stage(std::make_unique(), s1); - int j = 0; + size_t j = 0; s2.set_consuming_callback([&p, &j, i](const boost::any &data) { try { if (j++ == i) @@ -642,7 +642,8 @@ TEST(PipelineTest, step_callbacks_are_called_in_sequence) { auto step_cb_data_it = outputs.cbegin(); auto consumed_data_it = outputs.cend(); - for (size_t i = 0; i < inputs.size(); ++i) { + using SizeType = std::vector::size_type; + for (SizeType i = 0; i < inputs.size(); ++i) { consumed_data_it = std::find(step_cb_data_it, outputs.cend(), PRODUCED_DATA_ID); EXPECT_TRUE(consumed_data_it != outputs.cend()); // the produced data is found in the output vector EXPECT_TRUE(std::prev(consumed_data_it) != outputs.cend()); // there is data before the produced data @@ -659,7 +660,7 @@ TEST(PipelineTest, step_callbacks_are_called_in_sequence) { EXPECT_EQ(0, n_elts % 2); // if so, they have been called the same number of times // even indexes correspond to the pre-step callbacks while the odd ones correspond to the post-step callbacks - for (size_t j = 0; j < n_elts; ++j) + for (int j = 0; j < n_elts; ++j) EXPECT_EQ((j % 2) ? POST_STEP_DATA_ID : PRE_STEP_DATA_ID, *(step_cb_data_it + j)); step_cb_data_it = consumed_data_it + 2; @@ -670,7 +671,7 @@ TEST(PipelineTest, step_callbacks_are_called_in_sequence) { const auto n_elts = std::distance(step_cb_data_it, outputs.cend()); EXPECT_EQ(0, n_elts % 2); - for (size_t j = 0; j < n_elts; ++j) + for (int j = 0; j < n_elts; ++j) EXPECT_EQ((j % 2) ? POST_STEP_DATA_ID : PRE_STEP_DATA_ID, *(step_cb_data_it + j)); } } diff --git a/sdk/modules/core/cpp/tests/rate_estimator_gtest.cpp b/sdk/modules/core/cpp/tests/rate_estimator_gtest.cpp index c1893cfe3..d7ef5df81 100644 --- a/sdk/modules/core/cpp/tests/rate_estimator_gtest.cpp +++ b/sdk/modules/core/cpp/tests/rate_estimator_gtest.cpp @@ -9,6 +9,8 @@ * See the License for the specific language governing permissions and limitations under the License. * **********************************************************************************************************************/ +#include +#include #include #include "metavision/sdk/core/utils/rate_estimator.h" @@ -197,4 +199,155 @@ TEST(RateEstimator_GTest, custom_ctor_values_outside_window) { EXPECT_DOUBLE_EQ(10 * k - 45, std::get<1>(values[i - 1])); EXPECT_DOUBLE_EQ(k / 0.1, std::get<2>(values[i - 1])); } -} \ No newline at end of file +} + +TEST(RateEstimator_GTest, custom_ctor_called_once_system_time) { + // GIVEN a default estimator (step=100ms) + size_t num_calls = 0; + RateEstimator estim([&num_calls](timestamp, double, double) { num_calls++; }, 100000, 1000000, true); + + // WHEN we add one count sample at t = 100ms + estim.add_data(100000, 1); + + // THEN the callback is supposed to be called once + EXPECT_EQ(1, num_calls); +} + +TEST(RateEstimator_GTest, custom_ctor_called_twice_system_time) { + // GIVEN a default estimator (step=100ms) + size_t num_calls = 0; + RateEstimator estim([&num_calls](timestamp, double, double) { num_calls++; }, 100000, 1000000, true); + + // WHEN we add two counts sample by waiting more than 100ms each time + estim.add_data(100000, 1); + std::this_thread::sleep_for(std::chrono::milliseconds(200)); + estim.add_data(200000, 1); + + // THEN the callback is supposed to be called twice, once for each t + EXPECT_EQ(2, num_calls); +} + +TEST(RateEstimator_GTest, custom_ctor_values_ok_system_time) { + // GIVEN a default estimator (step=100ms, window=1000ms) + timestamp cb_t; + double avg_rate = 0, peak_rate = 0; + RateEstimator estim( + [&](timestamp t, double avg, double peak) { + cb_t = t; + avg_rate = avg; + peak_rate = peak; + }, + 100000, 1000000, true); + + // WHEN we add a sample of 10 data at t = 100ms + std::this_thread::sleep_for(std::chrono::milliseconds(200)); + estim.add_data(100000, 10); + + // THEN the average and peak rate is 100 data/s at t = 100ms + EXPECT_EQ(100000, cb_t); + EXPECT_DOUBLE_EQ(100, avg_rate); + EXPECT_DOUBLE_EQ(100, peak_rate); +} + +TEST(RateEstimator_GTest, custom_ctor_values_ok_same_time_system_time) { + // GIVEN a default estimator (step=100ms, window=1000ms) + timestamp cb_t; + double avg_rate = 0, peak_rate = 0; + RateEstimator estim( + [&](timestamp t, double avg, double peak) { + cb_t = t; + avg_rate = avg; + peak_rate = peak; + }, + 100000, 1000000, true); + + // WHEN we add a sample of 10 data at t = 10ms, and another of 20 data at same time + estim.add_data(100000, 10); + std::this_thread::sleep_for(std::chrono::milliseconds(200)); + estim.add_data(100000, 20); + + // THEN the average and peak rate is 300 data/s at t = 100ms + EXPECT_EQ(100000, cb_t); + EXPECT_DOUBLE_EQ(300, avg_rate); + EXPECT_DOUBLE_EQ(300, peak_rate); +} + +TEST(RateEstimator_GTest, custom_ctor_values_ok_2_system_time) { + // GIVEN a default estimator (step=100ms, window=1000ms) + timestamp cb_t; + double avg_rate = 0, peak_rate = 0; + RateEstimator estim( + [&](timestamp t, double avg, double peak) { + cb_t = t; + avg_rate = avg; + peak_rate = peak; + }, + 100000, 1000000, true); + + // WHEN we add one sample of 3 data at t = 100ms and samples of 1 data at t = 200, 300, ..., 1000 ms + estim.add_data(100000, 3); + for (int i = 200000; i <= 1000000; i += 100000) { + std::this_thread::sleep_for(std::chrono::milliseconds(200)); + estim.add_data(i, 1); + } + + // THEN the average is (3+1+1+...+1)*10/0.1 = 12 data/s and peak rate is 3/0.1 = 30 data/s at t = 1000ms + EXPECT_EQ(1000000, cb_t); + EXPECT_DOUBLE_EQ(12, avg_rate); + EXPECT_DOUBLE_EQ(30, peak_rate); +} + +TEST(RateEstimator_GTest, custom_ctor_values_ok_3_system_time) { + std::vector> values; + // GIVEN a default estimator (step=100ms, window=1000ms) + RateEstimator estim([&](timestamp t, double avg, double peak) { values.emplace_back(t, avg, peak); }, 100000, + 1000000, true); + + // WHEN we add sample of 1,2,...,10 data at t = 100, 200, ..., 1000ms + for (int i = 100000; i <= 1000000; i += 100000) { + std::this_thread::sleep_for(std::chrono::milliseconds(200)); + estim.add_data(i, i / 100000); + } + + // THEN + // the avg is 1/0.1 = 10 data/s and peak is 1/0.1 = 10 data/s at t = 100ms + // the avg is (1+2)/0.2 = 15 data/s and peak is 2/0.1 = 20 data/s at t = 200ms + // the avg is (1+2+3)/0.3 = 20 data/s and peak is 3/0.1 = 30 data/s at t = 300ms + // ... + // the avg is (1+2+3+...+i)/(i/10) = (i*(i+1)/2)/(i/10) = 5*(i+1) data/s and peak is i/0.1 data/s at t = i*100ms + for (size_t i = 1; i <= 10; ++i) { + EXPECT_EQ(100000 * i, std::get<0>(values[i - 1])); + EXPECT_DOUBLE_EQ(5 * (i + 1), std::get<1>(values[i - 1])); + EXPECT_DOUBLE_EQ(i / 0.1, std::get<2>(values[i - 1])); + } +} + +TEST(RateEstimator_GTest, custom_ctor_values_outside_window_system_time) { + std::vector> values; + // GIVEN a default estimator (step=100ms, window=1000ms) + RateEstimator estim( + [&](timestamp t, double avg, double peak) { + if (t > 1000000) { + values.emplace_back(t, avg, peak); + } + }, + 100000, 1000000, true); + + // WHEN we add sample of 1, 2, ..., 20 data at t = 100, 200, ..., 2000ms + for (int i = 100000; i <= 2000000; i += 100000) { + std::this_thread::sleep_for(std::chrono::milliseconds(200)); + estim.add_data(i, i / 100000); + } + + // THEN + // the avg is (2+3+...+10+11) data/s and peak is 11/0.1 data/s at t = 1100ms + // the avg is (3+4+...+11+12) data/s and peak is 12/0.1 data/s at t = 1100ms + // ... + // the avg is ((i*(i+1)/2) - ((i-10)*(i-10+1)/2)) = 10*i - 45 data/s and peak is i/0.1 data/s at t = (10+i)*100ms + for (size_t i = 1; i <= 10; ++i) { + int k = 10 + i; + EXPECT_EQ(100000 * k, std::get<0>(values[i - 1])); + EXPECT_DOUBLE_EQ(10 * k - 45, std::get<1>(values[i - 1])); + EXPECT_DOUBLE_EQ(k / 0.1, std::get<2>(values[i - 1])); + } +} diff --git a/sdk/modules/core/cpp/tests/shared_cd_events_buffer_producer_algorithm_gtest.cpp b/sdk/modules/core/cpp/tests/shared_cd_events_buffer_producer_algorithm_gtest.cpp index 20ef05af1..3fd86e570 100644 --- a/sdk/modules/core/cpp/tests/shared_cd_events_buffer_producer_algorithm_gtest.cpp +++ b/sdk/modules/core/cpp/tests/shared_cd_events_buffer_producer_algorithm_gtest.cpp @@ -38,15 +38,6 @@ TEST_F(SharedCdEventsBufferProducer_Gtest, shared_cd_buffer_producer_0_size_fail ASSERT_THROW( Metavision::SharedCdEventsBufferProducerAlgorithm(params, [&](Metavision::timestamp ts, const auto &ev) {}), std::invalid_argument); - - // GIVEN A bounded buffer pool of size 0 - - params.bounded_memory_pool_ = false; - // WHEN trying to allocate - // THEN it throws - ASSERT_THROW( - Metavision::SharedCdEventsBufferProducerAlgorithm(params, [&](Metavision::timestamp ts, const auto &ev) {}), - std::invalid_argument); } TEST_F(SharedCdEventsBufferProducer_Gtest, unbounded_shared_cd_buffer_producer_0_size_allocates_new_buffer) { diff --git a/sdk/modules/core/python/bindings/CMakeLists.txt b/sdk/modules/core/python/bindings/CMakeLists.txt index 1910af2b4..1ecdc26c0 100644 --- a/sdk/modules/core/python/bindings/CMakeLists.txt +++ b/sdk/modules/core/python/bindings/CMakeLists.txt @@ -10,6 +10,7 @@ set(sdk_core_python_srcs ${CMAKE_CURRENT_SOURCE_DIR}/adaptive_rate_events_splitter_algorithm_python.cpp ${CMAKE_CURRENT_SOURCE_DIR}/base_frame_generation_algorithm_python.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/event_bbox_python.cpp ${CMAKE_CURRENT_SOURCE_DIR}/colors_python.cpp ${CMAKE_CURRENT_SOURCE_DIR}/flip_x_algorithm_python.cpp ${CMAKE_CURRENT_SOURCE_DIR}/flip_y_algorithm_python.cpp @@ -30,7 +31,7 @@ if (GENERATE_DOC_PYTHON_BINDINGS) set (sdk_core_python_compile_definitions GENERATE_DOC_PYTHON_BINDINGS_USING_CPP_COMMENTS) endif() -add_sdk_python_bindings(core +add_sdk_python_bindings(core SOURCES ${sdk_core_python_srcs} LINK_LIBRARIES PRIVATE diff --git a/sdk/modules/driver/cpp/src/illuminance.cpp b/sdk/modules/core/python/bindings/event_bbox_python.cpp similarity index 72% rename from sdk/modules/driver/cpp/src/illuminance.cpp rename to sdk/modules/core/python/bindings/event_bbox_python.cpp index dd3e8c578..987777115 100644 --- a/sdk/modules/driver/cpp/src/illuminance.cpp +++ b/sdk/modules/core/python/bindings/event_bbox_python.cpp @@ -9,19 +9,22 @@ * See the License for the specific language governing permissions and limitations under the License. * **********************************************************************************************************************/ -#include "metavision/sdk/driver/illuminance.h" -#include "metavision/sdk/driver/camera_exception.h" +#include +#include -namespace Metavision { +#include "metavision/sdk/core/events/event_bbox.h" +#include "metavision/utils/pybind/pod_event_buffer.h" -Illuminance::~Illuminance() {} +namespace py = pybind11; -CallbackId Illuminance::add_callback(const EventsIlluminanceCallback &cb) { - throw CameraException(CameraErrorCode::DeprecatedFeature, "Illuminance not available."); -} +namespace Metavision { + +void export_event_bbox(py::module &m) { + PYBIND11_NUMPY_DTYPE(Metavision::EventBbox, t, x, y, w, h, class_id, track_id, class_confidence); + py::array_t array; + m.attr("EventBbox") = array.dtype(); -bool Illuminance::remove_callback(CallbackId callback_id) { - throw CameraException(CameraErrorCode::DeprecatedFeature, "Illuminance not available."); + Metavision::export_PODEventBuffer(m, "EventBboxBuffer"); } } // namespace Metavision diff --git a/sdk/modules/core/python/bindings/metavision_sdk_core_bindings.cpp b/sdk/modules/core/python/bindings/metavision_sdk_core_bindings.cpp index b02e9a9a6..bab36d591 100644 --- a/sdk/modules/core/python/bindings/metavision_sdk_core_bindings.cpp +++ b/sdk/modules/core/python/bindings/metavision_sdk_core_bindings.cpp @@ -37,6 +37,7 @@ PythonBindingsDoc pybind_doc_core(Metavision::PythonDoc::python_doc_strings_core PythonBindingsDoc pybind_doc_core; #endif +void export_event_bbox(py::module &); void export_base_frame_generation_algorithm(py::module &); void export_colors(py::module &); void export_adaptive_rate_events_splitter_algorithm(py::module &); @@ -64,6 +65,7 @@ PYBIND11_MODULE(MODULE_NAME, m) { } // 2. Export event types + Metavision::export_event_bbox(m); Metavision::export_colors(m); Metavision::export_mostrecent_timestamp_buffer(m); diff --git a/sdk/modules/core/python/pypkg/metavision_core/event_io/__init__.py b/sdk/modules/core/python/pypkg/metavision_core/event_io/__init__.py index fddd23896..de809e22f 100644 --- a/sdk/modules/core/python/pypkg/metavision_core/event_io/__init__.py +++ b/sdk/modules/core/python/pypkg/metavision_core/event_io/__init__.py @@ -9,8 +9,10 @@ from .dat_tools import load_events, count_events, DatWriter # pylint:disable-all from .py_reader import EventDatReader, EventNpyReader +from .h5_io import H5EventsWriter, H5EventsReader from .raw_reader import RawReader from .events_iterator import EventsIterator from .live_replay import LiveReplayEventsIterator, is_live_camera from .raw_info import get_raw_info from .adaptive_rate_events_iterator import AdaptiveRateEventsIterator +from .box_npy_reader import EventBboxNpyReader diff --git a/sdk/modules/core/python/pypkg/metavision_core/event_io/box_npy_reader.py b/sdk/modules/core/python/pypkg/metavision_core/event_io/box_npy_reader.py new file mode 100644 index 000000000..d1600a957 --- /dev/null +++ b/sdk/modules/core/python/pypkg/metavision_core/event_io/box_npy_reader.py @@ -0,0 +1,33 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. +import numpy as np + +from . import EventNpyReader +from metavision_sdk_core import EventBbox + + +class EventBboxNpyReader(EventNpyReader): + """ + EventBboxNpyReader class to read NPY long files. + + Attributes: + path (string): Path to the file being read + current_time (int): Indicating the position of the cursor in the file in us + duration_s (int): Indicating the total duration of the file in seconds + + Args: + event_file (str): file containing events + """ + + def __init__(self, event_file): + super().__init__(event_file) + + def open_file(self): + super().open_file() + self._decode_dtype = EventBbox diff --git a/sdk/modules/core/python/pypkg/metavision_core/event_io/events_iterator.py b/sdk/modules/core/python/pypkg/metavision_core/event_io/events_iterator.py index f6341f3ab..c008d19ce 100644 --- a/sdk/modules/core/python/pypkg/metavision_core/event_io/events_iterator.py +++ b/sdk/modules/core/python/pypkg/metavision_core/event_io/events_iterator.py @@ -12,6 +12,8 @@ """ from .raw_reader import RawReaderBase from .py_reader import EventDatReader +from .h5_io import H5EventsReader +from .meta_event_producer import MetaEventBufferProducer from metavision_sdk_base import EventCD import numpy as np @@ -19,8 +21,8 @@ class EventsIterator(object): """ - EventsIterator is a small convenience class to iterate through either a camera, a DAT file - or a RAW file. + EventsIterator is a small convenience class to iterate through either a camera, a DAT file, a RAW file + or a H5 file containing events. Attributes: reader : class handling the file or camera. @@ -79,6 +81,9 @@ def _init_readers(self, input_path, **kwargs): if isinstance(input_path, type("")): if input_path.endswith(".dat"): self.reader = EventDatReader(input_path, **kwargs) + elif input_path.endswith(".h5"): + h5_reader = H5EventsReader(input_path) + self.reader = MetaEventBufferProducer(h5_reader, self.mode, self.delta_t, self.n_events, self.start_ts) else: self.reader = RawReaderBase(input_path, delta_t=self.delta_t, ev_count=self.n_events, **kwargs) else: diff --git a/sdk/modules/core/python/pypkg/metavision_core/event_io/h5_io.py b/sdk/modules/core/python/pypkg/metavision_core/event_io/h5_io.py new file mode 100644 index 000000000..349e73175 --- /dev/null +++ b/sdk/modules/core/python/pypkg/metavision_core/event_io/h5_io.py @@ -0,0 +1,143 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. +# pylint: disable=W0611 +""" +h5 io for event storage +you can use 2 compression backends: + - zlib (fast read, slow write) + - zstandard (fast read, fast write, but you have to install it) +""" +import h5py +import zlib +try: + import zstandard +except BaseException: + pass +import numpy as np +from metavision_sdk_base import EventCD + + +class H5EventsWriter(object): + """ + Compresses & Writes Event Packets as they are read + + Args: + out_name (str): destination path + height (int): height of recording + width (int): width of recording + compression_backend (str): compression api to be called, defaults to zlib. + If you can try to use zstandard which is faster at writing. + """ + + def __init__(self, out_name, height, width, compression_backend="zlib"): + dt = h5py.vlen_dtype(np.dtype("uint8")) + dt2 = np.int64 + self.f = h5py.File(out_name, "w") + self.dataset_size_increment = 1000 + shape = (self.dataset_size_increment,) + self.dset = self.f.create_dataset("event_buffers", shape, maxshape=(None,), dtype=dt) + self.ts = self.f.create_dataset("event_buffers_start_times", shape, maxshape=(None,), dtype=dt2) + self.dset.attrs["compression_backend"] = compression_backend + self.dset.attrs["height"] = height + self.dset.attrs["width"] = width + + compress_api = globals()[compression_backend] + self.compress_api = compress_api + self.index = 0 + self.is_close = False + + def __enter__(self): + return self + + def __exit__(self, type, value, traceback): + self.close() + + def write(self, events): + """ + Writes event buffer into a compressed packet + + Args: + events (ndarray): events of type EventCD + """ + if not len(events): + return + if self.index >= len(self.dset): + new_len = self.dset.shape[0] + self.dataset_size_increment + self.dset.resize((new_len,)) + self.ts.resize((new_len,)) + self.ts[self.index] = events['t'][0] + + zipped_data = self.compress_api.compress(events) + zipped_data = np.frombuffer(zipped_data, dtype="uint8") + + self.dset[self.index] = zipped_data + self.index += 1 + + def close(self): + if not self.is_close: + self.dset.resize((self.index,)) + self.ts.resize((self.index,)) + self.f.close() + self.is_close = True + + def __del__(self): + self.close() + + +class H5EventsReader(object): + """ + Reads & Seeks into a h5 file of compressed event packets. + + Args: + src_name (str): input path + """ + + def __init__(self, path): + self.path = path + dt = h5py.vlen_dtype(np.dtype("uint8")) + dt2 = np.int64 + self.f = h5py.File(path, "r") + self.len = len(self.f["event_buffers"]) + compression_backend = self.f["event_buffers"].attrs["compression_backend"] + self.height = self.f["event_buffers"].attrs["height"] + self.width = self.f["event_buffers"].attrs["width"] + self.start_times = self.f['event_buffers_start_times'][...] + self.compress_api = globals()[compression_backend] + self.start_index = 0 + self.sub_start_index = 0 + + def __len__(self): + return len(self.start_times) + + def seek_in_buffers(self, ts): + idx = np.searchsorted(self.start_times, ts, side='left') + return idx + + def seek_time(self, ts): + idx = np.searchsorted(self.start_times, ts, side='left') + self.start_index = max(0, idx - 1) + zipped_data = self.f["event_buffers"][self.start_index] + unzipped_data = self.compress_api.decompress(zipped_data.data) + events = np.frombuffer(unzipped_data, dtype=EventCD) + if self.start_index > 0: + assert events['t'][0] <= ts + self.sub_start_index = np.searchsorted(events["t"], ts) + self.sub_start_index = max(0, self.sub_start_index) + + def get_size(self): + return (self.height, self.width) + + def __iter__(self): + for i in range(self.start_index, len(self.f["event_buffers"])): + zipped_data = self.f["event_buffers"][i] + unzipped_data = self.compress_api.decompress(zipped_data.data) + events = np.frombuffer(unzipped_data, dtype=EventCD) + if i == self.start_index and self.sub_start_index > 0: + events = events[self.sub_start_index:] + yield events diff --git a/sdk/modules/core/python/pypkg/metavision_core/utils/samples.py b/sdk/modules/core/python/pypkg/metavision_core/utils/samples.py index be8a14841..b0d37be44 100644 --- a/sdk/modules/core/python/pypkg/metavision_core/utils/samples.py +++ b/sdk/modules/core/python/pypkg/metavision_core/utils/samples.py @@ -36,7 +36,7 @@ "195_falling_particles.raw": "https://dataset.prophesee.ai/index.php/s/kSfKSZfCLKPIblT/download", # generic/ # -------- - "laser.raw ": "https://dataset.prophesee.ai/index.php/s/bX0CnMiQ2XVGGjv/download", + "laser.raw": "https://dataset.prophesee.ai/index.php/s/bX0CnMiQ2XVGGjv/download", "spinner.dat": "https://dataset.prophesee.ai/index.php/s/YAri3vpPZHhEZfc/download", "spinner.raw": "https://dataset.prophesee.ai/index.php/s/mwiILym2zD8ud2b/download", "hand_spinner.raw": "https://dataset.prophesee.ai/index.php/s/nOcN4Fzlv5qCAxt/download", diff --git a/sdk/modules/core/python/samples/metavision_h5_io/metavision_h5_io.py b/sdk/modules/core/python/samples/metavision_h5_io/metavision_h5_io.py new file mode 100644 index 000000000..ca063fec3 --- /dev/null +++ b/sdk/modules/core/python/samples/metavision_h5_io/metavision_h5_io.py @@ -0,0 +1,114 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. +""" +h5io for event storage + +Example WRITE: +-------------- +>> python3 samples/metavision_h5_io/metavision_h5_io.py write path/to/test.raw path/to/test.h5 + +Example READ: +------------- +>> python3 samples/metavision_h5_io/metavision_h5_io.py read path/to/test.h5 +""" +import os +import argparse +import time +import numpy as np + +from tqdm import tqdm +from metavision_core.event_io.h5_io import H5EventsWriter +from metavision_core.event_io.events_iterator import EventsIterator +from metavision_core.event_io.meta_event_producer import MetaEventBufferProducer +from metavision_sdk_core import PeriodicFrameGenerationAlgorithm +from metavision_sdk_ui import EventLoop, BaseWindow, MTWindow, UIAction, UIKeyEvent + + +def parse_args(): + """Parse command line arguments.""" + parser = argparse.ArgumentParser(description='Metavision HDF5 IO sample') + + parser.add_argument('io', type=str, choices=['read', 'write'], + help='read or write operation') + + parser.add_argument('path', type=str, + help="Path to input file.") + + parser.add_argument('--out_path', type=str, default="", + help="Path to output h5 file.") + parser.add_argument('--start_ts', type=int, default=0, + help="start time") + parser.add_argument('--max_duration', type=int, default=-1, + help="start time") + parser.add_argument('--accumulation_time_us', type=int, default=10000, + help="window accumulation time") + parser.add_argument('--compression_backend', type=str, default="zlib", + help="Path to output h5 file.") + + parser.add_argument( + '-m', '--mode', choices=["delta_t", "n_events", "mixed"], + type=str, default='delta_t', help='bufferization strategy: delta_t, n_events or mixed') + parser.add_argument( + '-d', '--delta-t', type=int, default=10000, help='fixed duration for the bufferization') + parser.add_argument( + '-n', '--n-events', type=int, default=10000, help='fixed n events for the bufferization') + args = parser.parse_args() + return args + + +def write(src_path, out_path, start_ts, mode, n_events, delta_t, max_duration, backend): + if not out_path: + out_path = os.path.split(src_path, '.raw')[0] + '.h5' + if max_duration <= 0: + max_duration = None + mv_it = EventsIterator(src_path, start_ts, mode, delta_t, n_events, max_duration) + height, width = mv_it.get_size() + h5_writer = H5EventsWriter(out_path, height, width, backend) + for events in tqdm(mv_it): + h5_writer.write(events) + h5_writer.close() + + +def read(src_path, start_ts, mode, n_events, delta_t, max_duration, accumulation_time_us): + ext = os.path.splitext(src_path)[1] + max_duration = None if max_duration <= 0 else max_duration + mv_it = EventsIterator(src_path, start_ts, mode, delta_t, n_events, max_duration) + height, width = mv_it.get_size() + event_frame_gen = PeriodicFrameGenerationAlgorithm(width, height, accumulation_time_us) + cd_frame = np.zeros((height, width, 3), dtype=np.uint8) + with MTWindow(title="Metavision H5 IO", width=width, height=height, mode=BaseWindow.RenderMode.BGR) as window: + def on_cd_frame_cb(ts, cd_frame): + # Dispatch system events to the window + EventLoop.poll_and_dispatch() + window.show_async(cd_frame) + + event_frame_gen.set_output_callback(on_cd_frame_cb) + + def keyboard_cb(key, scancode, action, mods): + if action != UIAction.RELEASE: + return + if key == UIKeyEvent.KEY_ESCAPE or key == UIKeyEvent.KEY_Q: + window.set_close_flag() + + window.set_keyboard_callback(keyboard_cb) + + for i, events in enumerate(tqdm(mv_it)): + event_frame_gen.process_events(events) + if window.should_close(): + break + + +if __name__ == '__main__': + ARGS = parse_args() + if ARGS.io == 'read': + read(ARGS.path, ARGS.start_ts, ARGS.mode, ARGS.n_events, + ARGS.delta_t, ARGS.max_duration, ARGS.accumulation_time_us) + else: + write(ARGS.path, ARGS.out_path, ARGS.start_ts, ARGS.mode, ARGS.n_events, + ARGS.delta_t, ARGS.max_duration, ARGS.compression_backend) diff --git a/sdk/modules/core/python/samples/metavision_interop/extended_events_iterator.py b/sdk/modules/core/python/samples/metavision_interop/extended_events_iterator.py index 776968168..8298d40b6 100644 --- a/sdk/modules/core/python/samples/metavision_interop/extended_events_iterator.py +++ b/sdk/modules/core/python/samples/metavision_interop/extended_events_iterator.py @@ -96,5 +96,5 @@ def _init_readers(self, input_path, **kwargs): raise BaseException("format not handled!") else: - # we assume input_path is a actually device + # we assume input_path is an actual device self.reader = RawReaderBase.from_device(input_path, delta_t=self.delta_t, ev_count=self.n_events, **kwargs) diff --git a/sdk/modules/core/python/samples/metavision_raw_to_csv/metavision_raw_to_csv.py b/sdk/modules/core/python/samples/metavision_raw_to_csv/metavision_raw_to_csv.py index 55c3d5f72..a73fc6bfd 100644 --- a/sdk/modules/core/python/samples/metavision_raw_to_csv/metavision_raw_to_csv.py +++ b/sdk/modules/core/python/samples/metavision_raw_to_csv/metavision_raw_to_csv.py @@ -11,9 +11,9 @@ Metavision RAW to CSV python sample. """ - from metavision_core.event_io import EventsIterator import os +from tqdm import tqdm def parse_args(): @@ -21,30 +21,28 @@ def parse_args(): """Parse command line arguments.""" parser = argparse.ArgumentParser(description='Metavision RAW to CSV.', formatter_class=argparse.ArgumentDefaultsHelpFormatter) - parser.add_argument('-i', - '--input-raw-file', - dest='input_path', - required=True, - help="Path to input RAW file") + parser.add_argument('-i', '--input-file', dest='input_path', required=True, help="Path to input RAW/DAT file") + parser.add_argument('-o', '--output-dir', required=True, help="Path to csv output directory") + parser.add_argument('-s', '--start-ts', type=int, default=0, help="start time in microsecond") + parser.add_argument('-d', '--max-duration', type=int, default=1e6 * 60, help="maximum duration in microsecond") + parser.add_argument('--delta-t', type=int, default=1000000, help="Duration of served event slice in us.") args = parser.parse_args() return args def main(): - """ Main """ args = parse_args() - if not os.path.isfile(args.input_path): - print('Fail to access RAW file ' + args.input_path) - return - - # Events iterator on Camera or RAW file - mv_iterator = EventsIterator(input_path=args.input_path, delta_t=1000) + if os.path.isfile(args.input_path): + output_file = os.path.join(args.output_dir, os.path.basename(args.input_path)[:-4] + ".csv") + else: + raise TypeError(f'Fail to access file: {args.input_path}') - with open('cd.csv', 'w') as csv_file: + mv_iterator = EventsIterator(input_path=args.input_path, delta_t=args.delta_t, start_ts=args.start_ts, + max_duration=args.max_duration) - # Read formatted CD events from EventsIterator & write to CSV - for evs in mv_iterator: + with open(output_file, 'w') as csv_file: + for evs in tqdm(mv_iterator, total=args.max_duration // args.delta_t): for (x, y, p, t) in evs: csv_file.write("%d,%d,%d,%d\n" % (x, y, p, t)) diff --git a/sdk/modules/core/python/tests/bbox_npy_load_pytest.py b/sdk/modules/core/python/tests/bbox_npy_load_pytest.py new file mode 100644 index 000000000..49d9d32fd --- /dev/null +++ b/sdk/modules/core/python/tests/bbox_npy_load_pytest.py @@ -0,0 +1,22 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. + +""" +Unit tests for EventBboxNpyReader class loading bbox npy +""" +import os +from metavision_core.event_io.box_npy_reader import EventBboxNpyReader +from metavision_sdk_core import EventBbox + + +def pytestcase_load_old_box_npy_file(dataset_dir): + path = os.path.join(dataset_dir, 'openeb', 'core', 'event_io', 'old_bbox.npy') + box_reader = EventBboxNpyReader(path) + boxes = box_reader.load_delta_t(10000000) + assert boxes.dtype == EventBbox diff --git a/sdk/modules/core/python/tests/metavision_h5_io_pytest.py b/sdk/modules/core/python/tests/metavision_h5_io_pytest.py new file mode 100644 index 000000000..f5fde2566 --- /dev/null +++ b/sdk/modules/core/python/tests/metavision_h5_io_pytest.py @@ -0,0 +1,51 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. + +""" +Unit tests for EventsIterator class +""" +import os +import math +import numpy as np + +from metavision_core.event_io import EventsIterator +from metavision_core.event_io import H5EventsWriter + + +def pytestcase_equivalence(tmpdir, dataset_dir): + """Tests initialization of all member variables after creation of RawReader object from a file""" + # GIVEN + filename = os.path.join(dataset_dir, + "openeb", "core", "event_io", "recording.raw") + + raw_iterator = EventsIterator(filename, start_ts=0, delta_t=10000, + max_duration=1e7, relative_timestamps=False) + # WHEN (we write h5 file) + height, width = raw_iterator.get_size() + + out_path = str(tmpdir.join(os.path.basename(os.path.splitext(filename)[0] + '.h5'))) + raw_event_buffers = [] + with H5EventsWriter(out_path, height, width, "zlib") as h5_writer: + for i, events in enumerate(raw_iterator): + h5_writer.write(events.copy()) + if len(events): + raw_event_buffers.append(events.copy()) + + # THEN + h5_iterator = EventsIterator(out_path, start_ts=0, delta_t=10000, + max_duration=1e7, relative_timestamps=False) + h5_event_buffers = [] + for h5_events in h5_iterator: + h5_event_buffers.append(h5_events.copy()) + + assert len(raw_event_buffers) == len(h5_event_buffers) + + for raw_events, h5_events in zip(raw_event_buffers, h5_event_buffers): + for k in ['x', 'y', 'p', 't']: + np.testing.assert_equal(raw_events[k], h5_events[k]) diff --git a/sdk/modules/core/python/tests/metavision_sdk_core_bindings_pytest.py b/sdk/modules/core/python/tests/metavision_sdk_core_bindings_pytest.py index e1da14145..4ec14eda8 100644 --- a/sdk/modules/core/python/tests/metavision_sdk_core_bindings_pytest.py +++ b/sdk/modules/core/python/tests/metavision_sdk_core_bindings_pytest.py @@ -7,12 +7,12 @@ # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and limitations under the License. -# pylint: disable=no-member - import numpy as np import metavision_sdk_base import metavision_sdk_core +# pylint: disable=no-member + def pytestcase_RoiFilterAlgorithm(): events = np.zeros(5, dtype=metavision_sdk_base.EventCD) @@ -104,8 +104,8 @@ def pytestcase_FlipYAlgorithm(): def pytestcase_PeriodicFrameGenerationAlgorithm(): events = np.zeros(5, dtype=metavision_sdk_base.EventCD) - events["x"] = [1, 2, 3, 1, 4] - events["p"] = [0, 1, 0, 1, 1] + events["x"] = [1, 2, 3, 1, 4] + events["p"] = [0, 1, 0, 1, 1] events["t"] = [10, 20, 30, 40, 10002] last_processed_timestamp = 0 @@ -118,7 +118,6 @@ def callback_frame_generator(ts, cv_frame): nonlocal frame last_processed_timestamp = ts frame[...] = cv_frame[...] - frame_generator.set_output_callback(callback_frame_generator) # last event is not processed because its timestamp is above 10000 @@ -133,8 +132,8 @@ def callback_frame_generator(ts, cv_frame): def pytestcase_PeriodicFrameGenerationAlgorithmGray(): events = np.zeros(5, dtype=metavision_sdk_base.EventCD) - events["x"] = [1, 2, 3, 1, 4] - events["p"] = [0, 1, 0, 1, 1] + events["x"] = [1, 2, 3, 1, 4] + events["p"] = [0, 1, 0, 1, 1] events["t"] = [10, 20, 30, 40, 10002] last_processed_timestamp = 0 @@ -150,7 +149,6 @@ def callback_frame_generator(ts, cv_frame): nonlocal frame last_processed_timestamp = ts frame[...] = cv_frame[...] - frame_generator.set_output_callback(callback_frame_generator) # last event is not processed because its timestamp is above 10000 @@ -165,8 +163,8 @@ def callback_frame_generator(ts, cv_frame): def pytestcase_OnDemandFrameGenerationAlgorithm(): events = np.zeros(5, dtype=metavision_sdk_base.EventCD) - events["x"] = [1, 2, 3, 1, 4] - events["p"] = [0, 1, 0, 1, 1] + events["x"] = [1, 2, 3, 1, 4] + events["p"] = [0, 1, 0, 1, 1] events["t"] = [10, 20, 30, 40, 10002] frame = np.zeros((5, 5, 3), np.uint8) @@ -196,8 +194,8 @@ def pytestcase_OnDemandFrameGenerationAlgorithm(): def pytestcase_BaseFrameGenerationAlgorithmStaticGeneration(): events = np.zeros(5, dtype=metavision_sdk_base.EventCD) - events["x"] = [1, 2, 3, 1, 4] - events["p"] = [0, 1, 0, 1, 1] + events["x"] = [1, 2, 3, 1, 4] + events["p"] = [0, 1, 0, 1, 1] events["t"] = [10, 20, 30, 40, 10002] frame = np.zeros((5, 5, 3), np.uint8) @@ -267,7 +265,6 @@ def callback_single_channel(ts, time_surface): nonlocal time_surface_single_channel last_processed_timestamp = ts time_surface_single_channel.numpy()[...] = time_surface.numpy()[...] - ts_prod_single_channel.set_output_callback(callback_single_channel) ts_prod_single_channel.process_events(events) @@ -290,7 +287,6 @@ def callback_double_channel(ts, time_surface): nonlocal time_surface_double_channel last_processed_timestamp = ts time_surface_double_channel.numpy()[...] = time_surface.numpy()[...] - ts_prod_double_channel.set_output_callback(callback_double_channel) ts_prod_double_channel.process_events(events) diff --git a/sdk/modules/core_ml/CMakeLists.txt b/sdk/modules/core_ml/CMakeLists.txt new file mode 100644 index 000000000..6ff042a1e --- /dev/null +++ b/sdk/modules/core_ml/CMakeLists.txt @@ -0,0 +1,12 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. + +if(COMPILE_PYTHON3_BINDINGS) + add_subdirectory(python) +endif(COMPILE_PYTHON3_BINDINGS) diff --git a/sdk/modules/core_ml/cmake/MetavisionSDK_core_mlCPackConfig.cmake b/sdk/modules/core_ml/cmake/MetavisionSDK_core_mlCPackConfig.cmake new file mode 100644 index 000000000..2941ed24d --- /dev/null +++ b/sdk/modules/core_ml/cmake/MetavisionSDK_core_mlCPackConfig.cmake @@ -0,0 +1,24 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. + +########################################################## +# +# Metavision SDK core ml - debian packages information +# + +# File and package name of the components are automatically set, just need to set the package description +# and potential dependencies + +# Python Development package (Open) +set(CPACK_COMPONENT_METAVISION-SDK-CORE-ML-PYTHON_DESCRIPTION "Metavision SDK CORE ML Python Modules.\n${PACKAGE_LICENSE}") +set(CPACK_COMPONENT_METAVISION-SDK-CORE-ML-PYTHON_DEPENDS metavision-sdk-base-python${PYTHON3_DEFAULT_VERSION} metavision-sdk-core-python${PYTHON3_DEFAULT_VERSION}) + +# Python samples of metavision-sdk-core-ml-python +set(CPACK_COMPONENT_METAVISION-SDK-CORE-ML-PYTHON-SAMPLES_DESCRIPTION "Samples for Metavision SDK CORE ML Python library.\n${PACKAGE_LICENSE}") +set(CPACK_COMPONENT_METAVISION-SDK-CORE-ML-PYTHON-SAMPLES_DEPENDS metavision-sdk-core-python${PYTHON3_DEFAULT_VERSION} metavision-sdk-core-ml-python) diff --git a/sdk/modules/core_ml/python/CMakeLists.txt b/sdk/modules/core_ml/python/CMakeLists.txt new file mode 100644 index 000000000..f55b9f98c --- /dev/null +++ b/sdk/modules/core_ml/python/CMakeLists.txt @@ -0,0 +1,23 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. + +# Cpack +add_cpack_component(PUBLIC metavision-sdk-core-ml-python metavision-sdk-core-ml-python-samples) + +# Models +lfs_download("sdk/modules/core_ml/python/models") + +# Add Python library +add_subdirectory(pypkg) + +# Samples +add_subdirectory(samples) + +# Tests +add_subdirectory(tests) diff --git a/sdk/modules/core_ml/python/models/e2v.ckpt b/sdk/modules/core_ml/python/models/e2v.ckpt new file mode 100644 index 000000000..c7ef373be Binary files /dev/null and b/sdk/modules/core_ml/python/models/e2v.ckpt differ diff --git a/sdk/modules/core_ml/python/pypkg/CMakeLists.txt b/sdk/modules/core_ml/python/pypkg/CMakeLists.txt new file mode 100644 index 000000000..f91b8184f --- /dev/null +++ b/sdk/modules/core_ml/python/pypkg/CMakeLists.txt @@ -0,0 +1,10 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. + +install_sdk_python_module(core-ml "${CMAKE_CURRENT_SOURCE_DIR}/metavision_core_ml") diff --git a/sdk/modules/core_ml/python/pypkg/metavision_core_ml/__init__.py b/sdk/modules/core_ml/python/pypkg/metavision_core_ml/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/sdk/modules/core_ml/python/pypkg/metavision_core_ml/core/__init__.py b/sdk/modules/core_ml/python/pypkg/metavision_core_ml/core/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/sdk/modules/core_ml/python/pypkg/metavision_core_ml/core/modules.py b/sdk/modules/core_ml/python/pypkg/metavision_core_ml/core/modules.py new file mode 100644 index 000000000..d9aebca93 --- /dev/null +++ b/sdk/modules/core_ml/python/pypkg/metavision_core_ml/core/modules.py @@ -0,0 +1,176 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. + +""" +Reusable building blocks for neural networks. +""" +import torch +import torch.nn as nn +import torch.nn.functional as F + + +class DepthWiseSeparableConv2d(nn.Sequential): + """Depthwise Separable Convolution followed by pointwise 1x1 Convolution. + + A convolution is called depthwise separable when the normal convolution is split into two convolutions: + depthwise convolution and pointwise convolution. + + Args: + in_channels (int): number of input channels + out_channels (int): number of output channels + kernel_size (int): separable conv receptive field + stride (int): separable conv stride. + padding (int): separable conv padding. + depth_multiplier (int): Factor by which we multiply the *in_channels* to get the number of output_channels + in the depthwise convolution. + **kwargs: Additional keyword arguments passed to the first convolution operator. + """ + + def __init__(self, in_channels, out_channels, kernel_size=1, stride=1, padding=0, dilation=1, bias=False, + depth_multiplier=1, + **kwargs): + super(DepthWiseSeparableConv2d, self).__init__( + nn.Conv2d(in_channels, int(in_channels * depth_multiplier), kernel_size=kernel_size, stride=stride, + padding=padding, dilation=dilation, groups=in_channels, bias=bias, **kwargs), + nn.Conv2d(int(depth_multiplier * in_channels), out_channels, kernel_size=1, stride=1, padding=0, + dilation=1, groups=1, bias=bias) + ) + + +class ConvLayer(nn.Sequential): + """Building Block Convolution Layer + + Args: + in_channels (int): number of input channels + out_channels (int): number of output channels + kernel_size (int): conv receptive field + stride (int): conv stride + dilation (int): conv dilation + bias (bool): whether or not to add a bias + norm (str): type of the normalization + activation (str): type of non-linear activation + separable (bool): whether to use separable convolution + **kwargs: Additional keyword arguments passed to the convolution operator. + """ + + def __init__(self, in_channels, out_channels, + kernel_size=3, stride=1, padding=1, dilation=1, + bias=True, norm="BatchNorm2d", activation='ReLU', separable=False, **kwargs): + + conv_func = DepthWiseSeparableConv2d if separable else nn.Conv2d + self.out_channels = out_channels + self.separable = separable + if not separable and "depth_multiplier" in kwargs: + kwargs.pop('depth_multiplier') + + normalizer = nn.Identity() if norm == 'none' else getattr(nn, norm)(out_channels) + + super(ConvLayer, self).__init__( + conv_func(in_channels, out_channels, kernel_size=kernel_size, stride=stride, dilation=dilation, + padding=padding, bias=bias, **kwargs), + normalizer, + getattr(nn, activation)() + ) + + +class PreActBlock(nn.Module): + """ + Squeeze-Excite Block from: + Squeeze-and-Excitation Networks (Hu et al.) + + Args: + in_channels (int): number of input channels. + out_channels (int): number of output channels. + stride (int): convolution stride. + """ + + def __init__(self, in_channels, out_channels, stride=1): + assert out_channels % 4 == 0 + super(PreActBlock, self).__init__() + self.conv1 = ConvLayer(in_channels, out_channels, + kernel_size=3, stride=stride, padding=1, bias=False) + self.conv2 = ConvLayer(out_channels, out_channels, + kernel_size=3, stride=1, padding=1, bias=False) + self.downsample = nn.Sequential() + if stride != 1 or in_channels != out_channels: + self.downsample = nn.Sequential( + nn.Conv2d(in_channels, out_channels, + kernel_size=1, stride=stride, padding=0, bias=False) + ) + # SE layers + self.fc1 = nn.Conv2d(out_channels, out_channels // 4, kernel_size=1) + self.fc2 = nn.Conv2d(out_channels // 4, out_channels, kernel_size=1) + self.out_channels = out_channels + + def forward(self, x): + out = self.conv1(x) + out = self.conv2(out) + # Squeeze + w = F.adaptive_avg_pool2d(out, (1, 1)) + w = F.relu(self.fc1(w)) + w = torch.sigmoid(self.fc2(w)) + # Excitation + out = out * w + out += self.downsample(x) + return out + + +class ResBlock(nn.Module): + """ + Residual Convolutional Block + + Args: + in_channels (int): number of input channels + out_channels (int): number of output channels + stride (int): convolutional stride + norm (str): type of normalization + """ + + def __init__(self, in_channels, out_channels, stride=1, norm="BatchNorm2d"): + super(ResBlock, self).__init__() + bias = norm == 'none' + self.in_channels = in_channels + self.out_channels = out_channels + self.conv1 = ConvLayer( + in_channels=in_channels, + out_channels=out_channels, + kernel_size=3, + padding=1, + bias=bias, + norm=norm, + ) + self.conv2 = ConvLayer( + in_channels=out_channels, + out_channels=out_channels, + kernel_size=3, + stride=stride, + padding=1, + norm=norm, + bias=False, + ) + + self.downsample = nn.Sequential() + if stride != 1 or in_channels != out_channels: + self.downsample = ConvLayer( + in_channels=in_channels, + out_channels=out_channels, + kernel_size=1, + padding=0, + stride=stride, + norm=norm, + bias=False, + activation="Identity", + ) + + def forward(self, x): + out = self.conv1(x) + out = self.conv2(out) + out += self.downsample(x) + out = F.relu(out) + return out diff --git a/sdk/modules/core_ml/python/pypkg/metavision_core_ml/core/temporal_modules.py b/sdk/modules/core_ml/python/pypkg/metavision_core_ml/core/temporal_modules.py new file mode 100644 index 000000000..8048248a8 --- /dev/null +++ b/sdk/modules/core_ml/python/pypkg/metavision_core_ml/core/temporal_modules.py @@ -0,0 +1,374 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. + +""" +Layers involving recursion or temporal aspects. +""" +import torch +import torch.nn as nn +from typing import Tuple +from functools import partial + +from .modules import ConvLayer, DepthWiseSeparableConv2d + + +def time_to_batch(x: torch.Tensor) -> Tuple[torch.Tensor, int]: + """ + Collapses a five dimensional Tensor to four dimensional tensor + by putting sequence samples in the batch dimension. + + Args: + x (torch.Tensor): (num_time_bins, batch_size, channel_count, height, width) + + Returns: + x (torch.Tensor): shape (num_time_bins * batch_size, channel_count, height, width) + batch_size (int): number of separate sequences part of the Tensor. + """ + t, n, c, h, w = x.size() + x = x.view(n * t, c, h, w) + return (x, n) + + +def batch_to_time(x: torch.Tensor, n: int) -> torch.Tensor: + """Reverts a 5 dimensional Tensor that has been collapsed with time_to_batch to its original form + + Args: + x (torch.Tensor): shape (num_time_bins * batch_size, channel_count, height, width) + batch_size (int): number of separate sequences part of the Tensor. + + Returns: + x (torch.Tensor): shape (num_time_bins, batch_size, channel_count, height, width) + """ + nt, c, h, w = x.size() + time = nt // n + x = x.view(time, n, c, h, w) + return x + + +def seq_wise(function): + """Decorator to apply 4 dimensional tensor functions on 5 dimensional temporal tensor input.""" + def sequence_function(x5, *args, **kwargs): + x4, batch_size = time_to_batch(x5) + y4 = function(x4, *args, **kwargs) + return batch_to_time(y4, batch_size) + return sequence_function + + +class SequenceWise(nn.Module): + def __init__(self, module, ndims=5): + """ + Wrapper Module that allows the wrapped Module to be applied on sequential Tensors + of shape 5 (num_time_bins, batch_size, channel_count, height, width) + + Attributes: + module (torch.nn.Module): Module to wrap to be able to apply non sequential model on + tensor of 5 dimensions. + + Args: + module (torch.nn.Module): Module to wrap to be able to apply non sequential model on + tensor of 5 dimensions. + """ + super(SequenceWise, self).__init__() + self.ndims = ndims + self.module = module + + if hasattr(self.module, "out_channels"): + self.out_channels = self.module.out_channels + + def forward(self, x): + if x.dim() == self.ndims - 1: + return self.module(x) + else: + x4, batch_size = time_to_batch(x) + y4 = self.module(x4) + return batch_to_time(y4, batch_size) + + def __repr__(self): + module_str = self.module.__repr__() + str = f"{self.__class__.__name__} (\n{module_str})" + return str + + +class VideoSequential(nn.Sequential): + """ + Wrapper Module that allows to call a torch.nn.Sequential object + on shape 5 (num_time_bins, batch_size, channel_count, height, width) + + Difference with SequenceWise is that this handles a list of module. + You can build this like a Sequential Object. + + Example: + >> video_net = VideoSequential(nn.Conv2d(3,16,3,1,1), + nn.ReLU()) + >> t,b,c,h,w = 3,2,3,128,128 + >> x = torch.randn(t,b,c,h,w) + >> y = video_net(x) + """ + + def __init__(self, *args): + super().__init__(*args) + + def forward(self, x): + if x.dim() == 4: + return super().forward(x) + else: + return seq_wise(super().forward)(x) + + +class RNNCell(nn.Module): + """ + Abstract class that has memory. serving as a base class to memory layers. + + Args: + hard (bool): Applies hard gates to memory updates function. + """ + + def __init__(self, hard): + super(RNNCell, self).__init__() + self.set_gates(hard) + + def set_gates(self, hard): + if hard: + self.sigmoid = self.hard_sigmoid + self.tanh = self.hard_tanh + else: + self.sigmoid = torch.sigmoid + self.tanh = torch.tanh + + def hard_sigmoid(self, x_in): + x = x_in * 0.5 + 0.5 + y = torch.clamp(x, 0.0, 1.0) + return y + + def hard_tanh(self, x): + y = torch.clamp(x, -1.0, 1.0) + return y + + def reset(self): + raise NotImplementedError() + + +class ConvLSTMCell(RNNCell): + """ConvLSTMCell module, applies sequential part of LSTM. + + LSTM with matrix multiplication replaced by convolution + See Convolutional LSTM Network: A Machine Learning Approach for Precipitation Nowcasting + (Shi et al.) + + Args: + hidden_dim (int): number of output_channels of hidden state. + kernel_size (int): internal convolution receptive field. + conv_func (fun): functional that you can replace if you want to interact with your 2D state differently. + hard (bool): applies hard gates. + """ + + def __init__(self, hidden_dim, kernel_size, conv_func=nn.Conv2d, hard=False): + super(ConvLSTMCell, self).__init__(hard) + self.hidden_dim = hidden_dim + + self.conv_h2h = conv_func(in_channels=self.hidden_dim, + out_channels=4 * self.hidden_dim, + kernel_size=kernel_size, + padding=1, + bias=True) + + self.prev_h = torch.zeros((1, self.hidden_dim, 0, 0), dtype=torch.float32) + self.prev_c = torch.zeros((1, self.hidden_dim, 0, 0), dtype=torch.float32) + + @torch.jit.export + def get_dims_NCHW(self): + return self.prev_h.size() + + def forward(self, x): + assert x.dim() == 5 + + xseq = x.unbind(0) + + assert self.prev_h.size() == self.prev_c.size() + + hidden_N, hidden_C, hidden_H, hidden_W = self.prev_h.size() + input_N, input_C, input_H, input_W = xseq[0].size() + assert input_C == 4 * hidden_C + assert hidden_C == self.hidden_dim + + if hidden_N != input_N or hidden_H != input_H or hidden_W != input_W: + device = x.device + self.prev_h = torch.zeros((input_N, self.hidden_dim, input_H, input_W), dtype=torch.float32).to(device) + self.prev_c = torch.zeros((input_N, self.hidden_dim, input_H, input_W), dtype=torch.float32).to(device) + + self.prev_h.detach_() + self.prev_c.detach_() + + result = [] + for t, xt in enumerate(xseq): + assert xt.dim() == 4 + + tmp = self.conv_h2h(self.prev_h) + xt + + cc_i, cc_f, cc_o, cc_g = torch.split(tmp, self.hidden_dim, dim=1) + i = self.sigmoid(cc_i) + f = self.sigmoid(cc_f) + o = self.sigmoid(cc_o) + g = self.tanh(cc_g) + + c = f * self.prev_c + i * g + h = o * self.tanh(c) + result.append(h.unsqueeze(0)) + + self.prev_h = h + self.prev_c = c + + res = torch.cat(result, dim=0) + return res + + @torch.jit.export + def reset(self, mask): + """Sets the memory (or hidden state to zero), normally at the beginning of a new sequence. + + `reset()` needs to be called at the beginning of a new sequence. The mask is here to indicate which elements + of the batch are indeed new sequences. """ + if self.prev_h.numel() == 0: + return + batch_size, _, _, _ = self.prev_h.size() + if batch_size == len(mask): + assert batch_size == mask.numel() + mask = mask.reshape(-1, 1, 1, 1) + assert mask.shape == torch.Size([len(self.prev_h), 1, 1, 1]) + self.prev_h.detach_() + self.prev_c.detach_() + self.prev_h *= mask.to(device=self.prev_h.device) + self.prev_c *= mask.to(device=self.prev_c.device) + + @torch.jit.export + def reset_all(self): + """Resets memory for all sequences in one batch.""" + self.reset(torch.zeros((len(self.prev_h), 1, 1, 1), dtype=torch.float32, device=self.prev_h.device)) + + +class ConvGRUCell(RNNCell): + """ + ConvGRUCell module, applies sequential part of the Gated Recurrent Unit. + + GRU with matrix multiplication replaced by convolution + See Chung, Junyoung, et al. "Empirical evaluation of gated recurrent neural networks on sequence modeling. + + Args: + in_channels (int): number of input channels. + out_channels (int): number of output_channels of hidden state. + kernel_size (int): internal convolution receptive field. + padding (int): padding parameter for the convolution + conv_func (fun): functional that you can replace if you want to interact with your 2D state differently. + hard (bool): applies hard gates. + + """ + + def __init__(self, in_channels, out_channels, kernel_size=3, padding=1, conv_func=nn.Conv2d, hard=False, + stride=1, dilation=1): + super(ConvGRUCell, self).__init__(hard) + self.in_channels = in_channels + self.out_channels = out_channels + + self.conv_rz = conv_func(in_channels=self.in_channels + self.out_channels, out_channels=2 * self.out_channels, + kernel_size=kernel_size, padding=1) + self.conv_f = conv_func(in_channels=self.in_channels + self.out_channels, out_channels=self.out_channels, + kernel_size=kernel_size, padding=padding, stride=stride, dilation=dilation) + self.prev_h = torch.zeros((1, self.out_channels, 0, 0), dtype=torch.float32) + + def forward(self, xt): + """ + xt size: (T, B,C,H,W) + return size: (T, B,C',H,W) + """ + hidden_N, hidden_C, hidden_H, hidden_W = self.prev_h.size() + input_N, input_C, input_H, input_W = xt[0].size() + if hidden_N != input_N or hidden_H != input_H or hidden_W != input_W: + device = xt.device + self.prev_h = torch.zeros((input_N, self.out_channels, input_H, input_W), dtype=torch.float32, + device=device) + + self.prev_h.detach_() + + result = [] + for xi in xt: + assert xi.dim() == 4 + + z, r = self.conv_rz(torch.cat((self.prev_h, xi), dim=1)).split(self.out_channels, 1) + update_gate = self.sigmoid(z) + reset_gate = self.sigmoid(r) + + f = self.conv_f(torch.cat((self.prev_h * reset_gate, xi), dim=1)) + input_gate = self.tanh(f) + + self.prev_h = (1 - update_gate) * self.prev_h + update_gate * input_gate + + result.append(self.prev_h) + return torch.cat([r[None] for r in result], dim=0) + + @torch.jit.export + def reset(self, mask): + """Sets the memory (or hidden state to zero), normally at the beginning of a new sequence. + + `reset()` needs to be called at the beginning of a new sequence. The mask is here to indicate which elements + of the batch are indeed new sequences. """ + batch_size, _, _, _ = self.prev_h.size() + if batch_size == len(mask) and self.prev_h.device == mask.device: + assert mask.shape == torch.Size([len(self.prev_h), 1, 1, 1]) + self.prev_h.detach_() + self.prev_h *= mask.to(device=self.prev_h.device) + + +class ConvRNN(nn.Module): + """ConvRNN module. ConvLSTM cell followed by a feed forward convolution layer. + + Args: + in_channels (int): number of input channels + out_channels (int): number of output channels + kernel_size (int): separable conv receptive field + stride (int): separable conv stride. + padding (int): padding. + separable (boolean): if True, uses depthwise separable convolution for the forward convolutional layer. + separable_hidden (boolean): if True, uses depthwise separable convolution for the hidden convolutional layer. + cell (string): RNN cell type, currently gru and lstm only are supported. + **kwargs: additional parameters for the feed forward convolutional layer. + """ + + def __init__(self, in_channels, out_channels, kernel_size=3, stride=1, padding=1, dilation=1, + cell='lstm', separable=False, separable_hidden=False, **kwargs): + assert cell.lower() in ('lstm', 'gru'), f"Only 'gru' or 'lstm' cells are supported, got {cell}" + super(ConvRNN, self).__init__() + + self.in_channels = in_channels + self.out_channels = out_channels + self.conv_x2h = SequenceWise( + ConvLayer(in_channels, 4 * out_channels if cell == "lstm" else in_channels, kernel_size=kernel_size, + activation='Identity', stride=stride, padding=padding, dilation=dilation, separable=separable, + **kwargs)) + + if separable_hidden: + conv_hidden = partial(DepthWiseSeparableConv2d, stride=1) + else: + conv_hidden = nn.Conv2d + + if cell.lower() == "lstm": + self.timepool = ConvLSTMCell(out_channels, 3, conv_func=conv_hidden) + else: + self.timepool = ConvGRUCell(in_channels, out_channels, kernel_size=3, conv_func=conv_hidden) + + def forward(self, x): + y = self.conv_x2h(x) + h = self.timepool(y) + return h + + def reset(self, mask=torch.zeros((1,), dtype=torch.float32)): + """Resets memory of the network.""" + self.timepool.reset(mask) + + @torch.jit.export + def reset_all(self): + self.timepool.reset_all() diff --git a/sdk/modules/core_ml/python/pypkg/metavision_core_ml/core/unet.py b/sdk/modules/core_ml/python/pypkg/metavision_core_ml/core/unet.py new file mode 100644 index 000000000..b51aa7319 --- /dev/null +++ b/sdk/modules/core_ml/python/pypkg/metavision_core_ml/core/unet.py @@ -0,0 +1,113 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. +""" +Base unet code +U-Net: Convolutional Networks for Biomedical Image Segmentation +Olaf Ronneberger, Philipp Fischer, Thomas Brox + +Notes: +- User is responsible for creating the layers, +they should have in_channels, out_channels in argument (they must be pre-filled) +- User is responsible for making sure spatial sizes agree. +""" +import torch +import torch.nn as nn + + +def unet_layers( + down_block, + middle_block, + up_block, + input_size=5, + down_filter_sizes=[ + 32, + 64], + middle_filter_size=128, + up_filter_sizes=[ + 64, + 32, + 8]): + """Builds unet layers + can be used to build unet layers (but you are not forced to) + + Here we make sure to connect the last upsampled feature-map to the input! + + X - Y = Conv([X,Up(U2)]) + \ / + D1 - U2 = Conv([D1,Up(U1)]) + \ / + D2 - U1 = Conv([D2,Up(M)]) + \ / + D3 - M + + + All block types are partial functions expecting in_channels, out_channels as first two parameters. + + Args: + down_block: encoder's block type + middle_block: bottleneck's block type + up_block: decoder's block type + input_size: in_channels + down_filter_sizes: out_channels per encoder + middle_filter_size: bottleneck's channels + up_fitler_sizes: decoder's channels + """ + assert len(down_filter_sizes) <= len(up_filter_sizes) + encoders = [] + encoders_channels = [input_size] + last_channels = input_size + for cout in down_filter_sizes: + enc = down_block(encoders_channels[-1], cout) + encoders.append(enc) + encoders_channels.append(cout) + + middle = middle_block(encoders_channels[-1], middle_filter_size) + decoders = [middle] + decoders_channels = [middle_filter_size] + for i, cout in enumerate(up_filter_sizes): + # note index = -2! last encoder is at the same scale of current input, this is not what we want! + cin = decoders_channels[-1] + encoders_channels[-i - 2] + decoders.append(up_block(cin, cout)) + decoders_channels.append(cout) + + return encoders, decoders + + +class Unet(nn.Module): + """Ultra-Generic Unet + + Args: + encoders: list of encoder layers + decoders: list of decoder layers + down_layer: layer to resize input + up_layer: layer to resize + merge + """ + + def __init__(self, encoders, decoders, down, up): + super(Unet, self).__init__() + self.encoders = nn.ModuleList(encoders) + self.decoders = nn.ModuleList(decoders) + self.up = up + self.down = down + + def forward(self, x): + enc = [x] + for encoder in self.encoders: + x = self.down(x) + x = encoder(x) + enc.append(x) + + dec = [self.decoders[0](x)] + for i, decoder in enumerate(self.decoders[1:]): + skip = enc[-i - 2] + x = self.up(dec[-1], skip) + x = decoder(x) + dec.append(x) + + return dec[-1] diff --git a/sdk/modules/core_ml/python/pypkg/metavision_core_ml/data/__init__.py b/sdk/modules/core_ml/python/pypkg/metavision_core_ml/data/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/sdk/modules/core_ml/python/pypkg/metavision_core_ml/data/camera_poses.py b/sdk/modules/core_ml/python/pypkg/metavision_core_ml/data/camera_poses.py new file mode 100644 index 000000000..63f3b5c29 --- /dev/null +++ b/sdk/modules/core_ml/python/pypkg/metavision_core_ml/data/camera_poses.py @@ -0,0 +1,406 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. + +""" +Camera Pose Generator: + +This module allows to define a trajectory of camera poses +and generate continuous homographies by interpolating when +maximum optical flow is beyond a predefined threshold. +""" +from __future__ import absolute_import + +import numpy as np +import cv2 + +from scipy.spatial.transform import Rotation as R +from scipy.spatial.transform import Slerp + +from numba import jit + +DTYPE = np.float32 + + +@jit +def interpolate_times_tvecs(tvecs, key_times, inter_tvecs, inter_times, nums): + """ + Interpolates between key times times & translation vectors + + Args: + tvecs (np.array): key translation vectors + key_times (np.array): key times + inter_tvecs (np.array): interpolated translations + inter_times (np.array): interpolated times + nums (np.array): number of interpolation point between key points + """ + n = 0 + for i in range(nums.shape[0]): + num = nums[i] + tvec1 = tvecs[i] + tvec2 = tvecs[i + 1] + time1 = key_times[i] + time2 = key_times[i + 1] + for j in range(num): + a = j / num + ti = time1 * (1 - a) + a * time2 + inter_times[n] = ti + inter_tvecs[n] = tvec1 * (1 - a) + a * tvec2 + n += 1 + + +def generate_homography(rvec, tvec, nt, depth): + """ + Generates a single homography + + Args: + rvec (np.array): rotation vector + tvec (np.array): translation vector + nt (np.array): normal to camera + depth (float): depth to camera + """ + R = cv2.Rodrigues(rvec)[0].T + H = R - np.dot(tvec.reshape(3, 1), nt) / depth + return H + + +def generate_image_homography(rvec, tvec, nt, depth, K, Kinv): + """ + Generates a single image homography + + Args: + rvec (np.array): rotation vector + tvec (np.array): translation vector + nt (np.array): normal to camera + depth (float): depth + K (np.array): intrisic matrix + Kinv (np.array): inverse intrinsic matrix + """ + H = generate_homography(rvec, tvec, nt, depth) + G = np.dot(K, np.dot(H, Kinv)) + G /= G[2, 2] + return G + + +def generate_homographies_from_rotation_matrices(rot_mats, tvecs, nt, depth): + """ + Generates multiple homographies from rotation matrices + + Args: + rot_mats (np.array): N,3,3 rotation matrices + tvecs (np.array): N,3 translation vectors + nt (np.array): normal to camera + depth (float): depth to camera + """ + rot_mats = np.moveaxis(rot_mats, 2, 1) + t = np.einsum('ik,jd->ikd', tvecs, nt) + h = rot_mats - t / depth + return h + + +def generate_homographies(rvecs, tvecs, nt, d): + """ + Generates multiple homographies from rotation vectors + + Args: + rvecs (np.array): N,3 rotation vectors + tvecs (np.array): N,3 translation vectors + nt (np.array): normal to camera + d (float): depth + """ + rot_mats = R.from_rotvec(rvecs).as_matrix() + return generate_homographies_from_rotation_matrices(rot_mats=rot_mats, tvecs=tvecs, nt=nt, depth=d) + + +def generate_image_homographies_from_homographies(h, K, Kinv): + """ + Multiplies homography left & right by intrinsic matrix + + Args: + h (np.array): homographies N,3,3 + K (np.array): intrinsic + Kinv (np.ndarray): inverse intrinsic + """ + g = np.einsum('ikc,cd->ikd', h, Kinv) + g = np.einsum('kc,jcd->jkd', K, g) + g /= g[:, 2:3, 2:3] + return g + + +def get_transform(rvec1, tvec1, rvec2, tvec2, nt, depth): + """ + Get geometric Homography between 2 poses + + Args: + rvec1 (np.array): rotation vector 1 + tvec1 (np.array): translation vector 1 + rvec2 (np.array): rotation vector 2 + tvec2 (np.array): translation vector 2 + nt (np.array): plane normal + depth (float): depth from camera + """ + H_0_1 = generate_homography(rvec1, tvec1, nt, depth) + H_0_2 = generate_homography(rvec2, tvec2, nt, depth) + H_1_2 = H_0_2.dot(np.linalg.inv(H_0_1)) + return H_1_2 + + +def get_image_transform(rvec1, tvec1, rvec2, tvec2, nt, depth, K, Kinv): + """ + Get image Homography between 2 poses (includes cam intrinsics) + + Args: + rvec1 (np.array): rotation vector 1 + tvec1 (np.array): translation vector 1 + rvec2 (np.array): rotation vector 2 + tvec2 (np.array): translation vector 2 + nt (np.array): plane normal + depth (float): depth from camera + K (np.array): intrinsic + Kinv (np.ndarray): inverse intrinsic + """ + H_0_1 = generate_image_homography(rvec1, tvec1, nt, depth, K, Kinv) + H_0_2 = generate_image_homography(rvec2, tvec2, nt, depth, K, Kinv) + H_1_2 = H_0_2.dot(np.linalg.inv(H_0_1)) + return H_1_2 + + +def interpolate_poses(rvecs, tvecs, nt, depth, K, Kinv, height, width, opt_flow_threshold=2, max_frames_per_bin=20): + """ + Interpolate given poses + + Args: + rvecs (np.array): N,3 rotation vectors + tvecs (np.array): N,3 translation vectors + nt (np.array): plane normal + depth (float): depth to camera + K (np.array): camera intrinsic + Kinv (np.array): inverse camera intrinsic + height (int): height of image + width (int): width of image + opt_flow_threshold (float): maximum flow threshold + max_frames_per_bin (int): maximum number of pose interpolation + """ + max_frames = len(rvecs) + key_times = np.linspace(0, max_frames - 1, max_frames, dtype=np.float32) + + rotations = R.from_rotvec(rvecs) + + # all homographies + h_0_2 = generate_homographies_from_rotation_matrices(rotations.as_matrix(), tvecs, nt, depth) + hs = generate_image_homographies_from_homographies(h_0_2, K, Kinv) + + h_0_1 = hs[:-1] + h_0_2 = hs[1:] + h_0_1 = np.einsum('ijk,ikc->ijc', h_0_2, np.linalg.inv(h_0_1)) + + # 4 corners + uv1 = np.array([[0, 0, 1], [0, height - 1, 1], [width - 1, 0, 1], [width - 1, height - 1, 1]]) + + # maximum flows / image + xyz = np.einsum('jk,lck->ljc', uv1, h_0_1) # equivalent to uv1.dot(h_0_1.T) for each 3x3 in h_0_1 + + uv2 = xyz / xyz[..., 2:3] + flows = uv2[..., :2] - uv1[..., :2] + flow_mags = np.sqrt(flows[..., 0]**2 + flows[..., 1]**2) + max_flows = flow_mags.max(axis=1) + + # interpolate + nums = 1 + np.ceil(max_flows / opt_flow_threshold) + if max_frames_per_bin > 0: + nums = np.minimum(max_frames_per_bin, np.maximum(1, nums)) + nums = nums.astype(np.int32) + total = nums.sum() + + interp_tvecs = np.zeros((total, 3), dtype=np.float32) + times = np.zeros((total,), dtype=np.float32) + interpolate_times_tvecs(tvecs, key_times, interp_tvecs, times, nums) + + slerp = Slerp(key_times, rotations) + interp_rvecs = slerp(times).as_rotvec() + + return interp_rvecs, interp_tvecs, times, max_flows.max() + + +def get_flow(rvec1, tvec1, rvec2, tvec2, nt, depth, K, Kinv, height, width): + """ + Computes Optical Flow between 2 poses + + Args: + rvec1 (np.array): rotation vector 1 + tvec1 (np.array): translation vector 1 + rvec2 (np.array): rotation vector 2 + tvec2 (np.array): translation vector 2 + nt (np.array): plane normal + depth (float): depth from camera + K (np.array): intrisic matrix + Kinv (np.array): inverse intrisic matrix + height (int): height of image + width (int): width of image + infinite (bool): plan is infinite or not + """ + # 1. meshgrid of image 1 + uv1 = get_grid(height, width).reshape(height * width, 3) + + # adapt K with new height, width + H_0_1 = generate_image_homography(rvec1, tvec1, nt, depth, K, Kinv) + H_0_2 = generate_image_homography(rvec2, tvec2, nt, depth, K, Kinv) + + # 2. apply H_0_2.dot(H_1_0) directly + H_1_0 = H_0_2.dot(np.linalg.inv(H_0_1)) + + xyz = uv1.dot(H_1_0.T) + uv2 = xyz / xyz[:, 2:3] + + flow = uv2[:, :2] - uv1[:, :2] + flow = flow.reshape(height, width, 2) + return flow + + +def get_grid(height, width): + """ + Computes a 2d meshgrid + + Args: + height (int): height of grid + width (int): width of grid + """ + x, y = np.linspace(0, width - 1, width, dtype=DTYPE), np.linspace(0, height - 1, height, dtype=np.float32) + x, y = np.meshgrid(x, y) + x, y = x[:, :, None], y[:, :, None] + o = np.ones_like(x) + xy = np.concatenate([x, y, o], axis=2) + return xy + + +def generate_smooth_signal(num_signals, num_samples, min_speed=1e-4, max_speed=1e-1): + """ + Generates a smooth signal + + Args: + num_signals (int): number of signals to generate + num_samples (int): length of multidimensional signal + min_speed (float): minimum rate of change + max_speed (float): maximum rate of change + """ + t = np.linspace(0, num_samples - 1, num_samples) + + num_bases = 10 + samples = 0 * t + samples = samples[None, :].repeat(num_signals, 0) + for i in range(num_bases): + speed = np.random.uniform(min_speed, max_speed, (num_signals,))[:, None] + phase = np.random.uniform(np.pi, 10 * np.pi) + test = np.sin((speed * t[None, :]) + phase) + samples += test / num_bases + + # final + speed = np.random.uniform(min_speed, max_speed, (num_signals,))[:, None] + test = np.sin((speed * t[None, :])) + test = (test + 1) / 2 + samples *= test + return samples.astype(DTYPE) + + +def add_random_pause(signal, max_pos_size_ratio=0.3): + """ + Adds a random pause in a multidimensional signal + + Args: + signal (np.array): TxD signal + max_pos_size_ratio (float): size of pause relative to signal Length + """ + num_pos = len(signal) + max_pause_size = int(max_pos_size_ratio * num_pos) + min_pos = int(0.1 * num_pos) + pause_size = max_pause_size + pause_pos = np.random.randint(min_pos, num_pos - pause_size) + value = signal[pause_pos:pause_pos + 1].repeat(pause_size, 0) + cat = np.concatenate((signal[:pause_pos - 1], value, signal[pause_pos:]), axis=0) + return cat + + +class CameraPoseGenerator(object): + """ + CameraPoseGenerator generates a series of continuous homographies + with interpolation. + + Args: + height (int): height of image + width (int): width of image + max_frames (int): maximum number of poses + """ + + def __init__(self, height, width, max_frames=300, pause_probability=0.5): + self.K = np.array( + [[width / 2, 0, width / 2], [0, height / 2, height / 2], [0, 0, 1]], + dtype=DTYPE, + ) + self.Kinv = np.linalg.inv(self.K) + + self.nt = np.array([0, 0, 1], dtype=DTYPE).reshape(1, 3) + + signal = generate_smooth_signal(6, max_frames).T + if np.random.rand() < pause_probability: + signal = add_random_pause(signal) + rvecs = signal[:, :3] + tvecs = signal[:, 3:] + + self.depth = np.random.uniform(1.0, 2.0) + self.rvecs, self.tvecs, self.times, max_flow = interpolate_poses( + rvecs, tvecs, self.nt, self.depth, self.K, self.Kinv, height, width) + + self.time = 0 + self.max_frames = max_frames + assert len(self.rvecs) >= max_frames + self.rvecs, self.tvecs, self.times = self.rvecs[:max_frames], self.tvecs[:max_frames], self.times[:max_frames] + + def __len__(self): + """ + Returns number of poses + """ + return len(self.rvecs) + + def __call__(self): + """ + Returns next homography + """ + rvec2 = self.rvecs[self.time] + tvec2 = self.tvecs[self.time] + ts = self.times[self.time] + H = generate_image_homography(rvec2, tvec2, self.nt, self.depth, self.K, self.Kinv) + self.time += 1 + return H, ts + + def get_image_transform(self, rvec1, tvec1, rvec2, tvec2): + """ + Get Homography between 2 poses + + Args: + rvec1 (np.array): rotation vector 1 + tvec1 (np.array): translation vector 1 + rvec2 (np.array): rotation vector 2 + tvec2 (np.array): translation vector 2 + """ + return get_image_transform(rvec1, tvec1, rvec2, tvec2, self.nt, self.depth, self.K, self.Kinv) + + def get_flow(self, rvec1, tvec1, rvec2, tvec2, height, width): + """ + Computes Optical flow between 2 poses + + Args: + rvec1 (np.array): rotation vector 1 + tvec1 (np.array): translation vector 1 + rvec2 (np.array): rotation vector 2 + tvec2 (np.array): translation vector 2 + nt (np.array): plane normal + depth (float): depth from camera + height (int): height of image + width (int): width of image + """ + return get_flow(rvec1, tvec1, rvec2, tvec2, self.nt, self.depth, self.K, self.Kinv, height, width) diff --git a/sdk/modules/core_ml/python/pypkg/metavision_core_ml/data/image_planar_motion_stream.py b/sdk/modules/core_ml/python/pypkg/metavision_core_ml/data/image_planar_motion_stream.py new file mode 100644 index 000000000..b208685e2 --- /dev/null +++ b/sdk/modules/core_ml/python/pypkg/metavision_core_ml/data/image_planar_motion_stream.py @@ -0,0 +1,90 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. + +""" +6-DOF motion in front of image plane +All in numpy + OpenCV +Applies continuous homographies to your picture in time. +Also you can get the optical flow for this motion. +""" +from __future__ import absolute_import + +import numpy as np +import cv2 + +from metavision_core_ml.data.camera_poses import CameraPoseGenerator + + +class PlanarMotionStream(object): + """ + Generates a planar motion in front of the image + + Args: + image_filename: path to image + height: desired height + width: desired width + max_frames: number of frames to stream + rgb: color images or gray + infinite: border is mirrored + """ + + def __init__(self, image_filename, height, width, max_frames=1000, rgb=False, infinite=True, pause_probability=0.5): + self.height = height + self.width = width + self.max_frames = max_frames + self.rgb = rgb + self.filename = image_filename + if not self.rgb: + frame = cv2.imread(image_filename, cv2.IMREAD_GRAYSCALE) + else: + frame = cv2.imread(image_filename) + self.frame = frame + self.frame_height, self.frame_width = self.frame.shape[:2] + if self.height == -1 or self.width == -1: + self.height, self.width = self.frame_height, self.frame_width + self.camera = CameraPoseGenerator(self.frame_height, self.frame_width, self.max_frames, pause_probability) + self.iter = 0 + self.border_mode = cv2.BORDER_REFLECT101 if infinite else cv2.BORDER_CONSTANT + self.dt = np.random.randint(10000, 20000) + self.xy1 = None + + def get_size(self): + return (self.height, self.width) + + def pos_frame(self): + return self.iter + + def __len__(self): + return self.max_frames + + def __next__(self): + if self.iter >= len(self.camera): + raise StopIteration + + G_0to2, ts = self.camera() + + out = cv2.warpPerspective( + self.frame, + G_0to2, + dsize=(self.frame_width, self.frame_height), + borderMode=self.border_mode, + ) + self.iter += 1 + ts *= self.dt + out = cv2.resize(out, (self.width, self.height), 0, 0, cv2.INTER_AREA) + return out, ts + + def __iter__(self): + return self + + def get_relative_homography(self, time_step): + rvec1, tvec1 = self.camera.rvecs[time_step], self.camera.tvecs[time_step] + rvec2, tvec2 = self.camera.rvecs[self.iter-1], self.camera.tvecs[self.iter-1] + H_2_1 = self.camera.get_transform(rvec2, tvec2, rvec1, tvec1, self.height, self.width) + return H_2_1 diff --git a/sdk/modules/core_ml/python/pypkg/metavision_core_ml/data/scheduling.py b/sdk/modules/core_ml/python/pypkg/metavision_core_ml/data/scheduling.py new file mode 100644 index 000000000..f276c8a8a --- /dev/null +++ b/sdk/modules/core_ml/python/pypkg/metavision_core_ml/data/scheduling.py @@ -0,0 +1,132 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. +""" +Scheduling System for Videos +""" +import os +import random +import numpy as np +import skvideo.io +import json +from metavision_core_ml.utils.files import grab_videos, grab_images + + +class Metadata(object): + """ + Represents part of a file to be read. + + Args: + path (str): path to video + start_frame (int): first frame to seek to + end_frame (int): last frame to read + """ + + def __init__(self, path, start_frame, end_frame): + self.path = path + self.start_frame = start_frame + self.end_frame = end_frame + + def __len__(self): + return self.end_frame - self.start_frame + + def split(self, num_frames): + out = [] + for i in range(self.start_frame, self.end_frame, num_frames): + j = i + num_frames + out.append(Metadata(self.path, i, j)) + return out + + def __repr__(self): + return f"Metadata:\n path: {self.path}\n start_frame: {self.start_frame}\n end_frame: {self.end_frame}" + + +def build_video_metadata(folder): + """ + Builds Metadata from videos + + Args: + folder (str): path to videos (only looks in current directory, not subfolders) + """ + paths_images = grab_images(folder, recursive=False) + paths = grab_videos(folder, recursive=False) + assert len(paths_images) == 0 or len( + paths) == 0, f"Error {folder} contains both videos and images" + info_json_path = os.path.join(folder, 'video_info.json') + if os.path.exists(info_json_path): + with open(info_json_path, 'r') as f: + info = json.load(f) + else: + try: + info = {os.path.basename(path): int(skvideo.io.ffprobe(path)["video"]["@nb_frames"]) for path in paths} + except BaseException: + return [] + with open(info_json_path, 'w') as f: + json.dump(info, f) + out = [] + for path in paths: + num_frames = info[os.path.basename(path)] + out.append(Metadata(path, 0, num_frames)) + return out + + +def build_image_metadata(folder, min_size, max_size, denominator=1): + """ + Build Metadata from images + + Args: + folder (str): path to pictures + min_size (int): minimum number of frames + max_size (int): maximum number of frames + denominator (int): num_frames will always be a multiple of denominator. + It is used to avoid having batches that are missing some frames and need to be padded. This + happens when the number of time steps is not a multiple of num_frames. + """ + paths = grab_images(folder, recursive=False) + sizes = np.round(np.random.randint(min_size, max_size, size=len(paths)) / float(denominator)) * denominator + sizes = sizes.astype(np.int) + sizes[sizes == 0] = denominator + out = [] + for path, num_frames in zip(paths, sizes): + out.append(Metadata(path, 0, num_frames)) + return out + + +def split_video_metadata(metadatas, min_size, max_size): + """ + Split video metadata into smaller ones. + + Args: + metadatas (list): list of metadata objects + min_size (int): minimum number of frames + max_size (int): maximum number of frames + """ + sizes = np.random.randint(min_size, max_size, size=len(metadatas)) + out = [] + for md, size in zip(metadatas, sizes): + out += md.split(size) + random.shuffle(out) + return out + + +def build_metadata(folder, min_length, max_length, denominator=1): + """ + Builds Metadata for Videos and Images + + Args: + folder (str): path to videos or images + min_length (int): minimum number of frames + max_length (int): maximum number of frames + denominator (int): denominator of number of frames for image metadata + """ + metadata = build_video_metadata(folder) + metadata = split_video_metadata(metadata, min_length, max_length) + if not len(metadata): + print('no video, grabbing pictures') + metadata = build_image_metadata(folder, min_length, max_length, denominator=denominator) + return metadata diff --git a/sdk/modules/core_ml/python/pypkg/metavision_core_ml/data/stream_dataloader.py b/sdk/modules/core_ml/python/pypkg/metavision_core_ml/data/stream_dataloader.py new file mode 100644 index 000000000..3e5359d57 --- /dev/null +++ b/sdk/modules/core_ml/python/pypkg/metavision_core_ml/data/stream_dataloader.py @@ -0,0 +1,300 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. + +# pylint: disable=no-member + +""" +Module that enables Parallel Multistreaming. + +We define an IterableDataset that streams several iterables. +When fed to a Pytorch DataLoader with batch_size=None, +this streams batches from one worker at a time. +This has the effect of enabling parallel streaming. + +The StreamLoader is a class built on top of DataLoader, +that fuses batches together so batches are always temporally +coherent. + +Notice that you can also avoid using this fusion and just use +a regular DataLoader, and have multiple neural networks indexed +by worker's id. +""" +import random +import math +import time +import torch +import numpy as np + +from collections import deque +from itertools import chain, cycle +from torch.utils.data import IterableDataset, DataLoader + +# https://github.com/pytorch/pytorch/issues/11201 +import torch.multiprocessing +torch.multiprocessing.set_sharing_strategy('file_system') # nopep8 + + +def split_batch_size(batch_size, num_workers): + """Returns the number of files to handle per worker + + Args: + batch_size (int): total batch size + num_workers (int): number of workers + """ + num_workers = min(num_workers, batch_size) + split_sizes = np.zeros(num_workers, dtype=int) + split_size, remaining_files = divmod(batch_size, num_workers) + split_sizes[...] = split_size + + split_sizes[:remaining_files] += 1 + + return split_sizes.tolist() + + +def split_dataset_sizes(stream_list, split_sizes): + """Splits with different sizes proportional to the number of files each worker has to handle. + + Args: + stream_list (list): list of stream path + split_sizes (list): batch size per worker + """ + out = [] + split_sizes_array = np.array(split_sizes, dtype=float) + split_sizes_array *= len(stream_list) / split_sizes_array.sum() + ends = np.round(np.cumsum(split_sizes_array)).astype(int) + start = 0 + for end in ends: + out.append(stream_list[start: end]) + start = end + return out + + +def batch_to(batch, device): + if hasattr(batch, "to"): + return batch.to(device) + elif isinstance(batch, list): + return [batch_to(b, device) for b in batch] + elif isinstance(batch, tuple): + return tuple(batch_to(b, device) for b in batch) + elif isinstance(batch, dict): + return {key: batch_to(value, device) for key, value in batch.items()} + else: + return batch + + +def resample_to_batch_size(stream_list, batch_size): + """Resamples list to fit batch_size iterators + + Args: + stream_list (list): list of streams + batch_size (int): batch size + """ + stream_list = random.sample(stream_list, len(stream_list)) +\ + random.choices(stream_list, k=batch_size - len(stream_list) % batch_size) + return stream_list + + +class StreamDataset(IterableDataset): + """Stream Dataset + An Iterable Dataset zipping a group of iterables streams together. + + Args: + stream_list (list): list of streams (path/ metadata) + streamer (object): an iterator (user defined) + batch_size (int): total batch size + padding_mode (str): "zeros" "data" or "none", see "get_zip" function + fill_value (object): padding value + seed (int): seed integer to make the dataloading deterministic + """ + + def __init__(self, stream_list, streamer, batch_size, padding_mode, fill_value, seed=None): + self.stream_list = stream_list + self.batch_size = batch_size + self.streamer = streamer + self.padding_mode = padding_mode + self.fill_value = fill_value + assert batch_size <= len( + stream_list), f"batch_size {batch_size} is larger than the number of files {len(stream_list)} " + assert padding_mode in ['zeros', 'data'] + if padding_mode == 'zeros': + assert fill_value is not None + self.seed = seed + + def shuffle(self): + random.shuffle(self.stream_list) + + def _set_seed(self, seed=None): + """ so that data is different along threads and epochs""" + worker = torch.utils.data.get_worker_info() + worker_id = int(worker.id) if worker is not None else 0 + seed = int(time.time()) + worker_id if seed is None else seed + worker_id + np.random.seed(seed) + random.seed(seed) + torch.manual_seed(seed) + + def _worker_init_fn(self): + worker = torch.utils.data.get_worker_info() + worker_id = int(worker.id) if worker is not None else 0 + num_workers = 1 if not worker else worker.num_workers + split_sizes = split_batch_size(self.batch_size, num_workers) + stream_groups = split_dataset_sizes(self.stream_list, split_sizes) + split_size = split_sizes[worker_id] + stream_group = stream_groups[worker_id] + random.shuffle(stream_group) + return split_size, stream_group + + def __iter__(self): + """Iterates over stream files + + Note: Here the scheduling of iterable is done at the beginning. + Instead User can change this code to map lazily iterables. + """ + self._set_seed(self.seed) + + worker = torch.utils.data.get_worker_info() + worker_id = int(worker.id) if worker is not None else 0 + split_size, stream_list = self._worker_init_fn() + if len(stream_list) < split_size: + print('worker#', worker_id, ': Stopping... Number of streams < split_size') + return # PEP479 + + """ + Just-in-time mapping + The scheduling is done as we iterate. + """ + iterators = [iter(self.streamer(stream_list[i])) for i in range(split_size)] + actives = np.ones(len(iterators), dtype=bool) + file_pos = split_size - 1 + while actives.any(): + values = [] + for i, it in enumerate(iterators): + try: + value = next(it) + except StopIteration: + file_pos += 1 + actives[i] = (file_pos < len(stream_list)) + if self.padding_mode == 'data' or actives[i]: + num = file_pos % len(stream_list) + iterators[i] = iter(self.streamer(stream_list[num])) + try: + value = next(iterators[i]) + except StopIteration: + return # PEP479 + elif self.padding_mode == 'zeros': + value = self.fill_value + + values.append(value) + if actives.any(): + yield tuple(values), worker_id + # current worker is done + yield (None, worker_id) + + +class StreamDataLoader(object): + """StreamDataLoader + Wraps around the DataLoader to handle the asynchronous batches. + + Args: + dataset (StreamDataset): dataset streaming multiple iterables + num_workers (int): number of workers + collate_fn (function): function to collate batch parts + """ + + def __init__(self, dataset, num_workers, collate_fn): + self.dataset = dataset + num_workers = min(dataset.batch_size, num_workers) + self.num_workers = max(1, num_workers) + assert isinstance(dataset, StreamDataset) + self.dataloader = DataLoader(dataset, batch_size=None, num_workers=num_workers, + collate_fn=lambda x: x, drop_last=False) + self.collate_fn = collate_fn + self.split_sizes = split_batch_size(self.dataset.batch_size, self.num_workers) + self.device = torch.device('cpu') + + def cuda(self, device=torch.device('cuda')): + """Sets the StreamDataLoader to copy tensors to GPU memory before returning them. + + Args: + device (torch.device): The destination GPU device. Defaults to the current CUDA device. + """ + assert torch.cuda.is_available() + self.device = device + return self + + def to(self, device): + """Sets the StreamDataLoader to copy tensors to the given device before returning them. + + Args: + device (torch.device): The destination GPU device. For instance `torch.device('cpu')` + or torch.device('cuda'). + """ + self.device = device if isinstance(device, torch.device) else torch.device(device) + assert isinstance(self.device, torch.device) + return self + + def cpu(self): + """Sets the StreamDataLoader to leave tensors on CPU.""" + self.device = torch.device('cpu') + return self + + @property + def batch_size(self): + return self.dataset.batch_size + + def __iter__(self): + cache = [deque([]) for i in range(self.num_workers)] + last_worker_id = -1 + active_workers = np.ones(self.num_workers, dtype=bool) + + for data in self.dataloader: + data, worker_id = data + assert active_workers[worker_id] + if active_workers.sum() == sum([len(v) for v in cache]): + # All active workers should have received their data at this point + + # pytorch dataloader cycles through workers and receives their results in order + # see: https://discuss.pytorch.org/t/in-what-order-do-dataloader-workers-do-their-job/88288/2 + # which means we can assert additional constraints + assert worker_id <= last_worker_id + # check non-zero queues correspond to active workers + assert (np.array([len(v) > 0 for v in cache]) == active_workers).all() + # check active workers have exactly one element + assert (np.array([len(v) == 1 for v in cache]) == active_workers).all() + + # process active queues + values = [] + for i, deq in enumerate(cache): + if active_workers[i] == False: + value = [self.dataset.fill_value] * self.split_sizes[i] + else: + value = deq.popleft() + values.append(value) + + batch = chain.from_iterable(values) + yield batch_to(self.collate_fn(batch), self.device) + # check all deques are empty + assert np.array([len(v) == 0 for v in cache]).all() + + # now process the data we've received (either add it to the queue or disable the worker) + if data is None: + if self.dataset.padding_mode == "data": + # stop as soon as the first worker is done + cache = [deque([]) for i in range(self.num_workers)] + active_workers = np.zeros(self.num_workers, dtype=bool) + break + # mark the worker as inactive (padding will be used from now on) + active_workers[worker_id] = False + else: + # data received for this worker is valid, add it to the queue + assert len(cache[worker_id]) == 0 + cache[worker_id].append(data) + last_worker_id = worker_id + + assert not active_workers.any() + assert sum([len(v) for v in cache]) == 0 diff --git a/sdk/modules/core_ml/python/pypkg/metavision_core_ml/data/video_stream.py b/sdk/modules/core_ml/python/pypkg/metavision_core_ml/data/video_stream.py new file mode 100644 index 000000000..ab572b83e --- /dev/null +++ b/sdk/modules/core_ml/python/pypkg/metavision_core_ml/data/video_stream.py @@ -0,0 +1,110 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. +""" +Video .mp4 or .avi Iterator +Right now backend is OpenCV +""" +import os +import random +import numpy as np +import cv2 +import skvideo.io + + +class TimedVideoStream(object): + """ + Video iterator opening both a video stream and a file of timestamps. + If it does not exist, it generates them with a regular period of the frequency described in the metadata + of the video or 1/override_fps if given. + Timestamps are delivered in microseconds. + + Args: + input_path (str): Path to the file to read. + height (int): Height of the output frames. + width (int): Width of the output frames. + start_frame (int): First frame to seek to + max_frames (int): Maximum number of frames loaded (if greater than the number of frames in the video it will return all of them). + rgb (bool): Whether the output should be in rgb or greyscale. + override_fps (int): Frequency of the generated timestamps Hz (if timestamp file is not available) + If equal to 0, the frequency will be taken from the video's metadata + """ + + def __init__( + self, video_filename, height=-1, width=-1, start_frame=0, max_frames=0, rgb=False, override_fps=0): + + self.video_filename = video_filename + self.rgb = rgb + + metadata = skvideo.io.ffprobe(video_filename) + self.num_frames = int(metadata["video"]["@nb_frames"]) + + self.start_frame = start_frame + self.max_frames = (self.num_frames - start_frame) if max_frames <= 0 else min(max_frames, + self.num_frames - start_frame) + self.end_frame = start_frame + self.max_frames + self.height, self.width = int(metadata["video"]["@height"]), int(metadata["video"]["@width"]) + + avg_frame_rate = eval(metadata["video"]["@avg_frame_rate"]) + if override_fps: + self.freq = override_fps + else: + self.freq = avg_frame_rate + + self.duration_s = float(metadata["video"]['@duration']) + + if width < 0: + width = self.width + if height < 0: + height = self.height + + self.start_ts = start_frame / avg_frame_rate + assert self.start_ts <= float(metadata["video"]["@duration"]) + + self.input_dict = {'-ss': str(self.start_ts)} if start_frame else {} + self.outputdict = {"-s": str(width) + "x" + str(height)} + if not rgb: + self.outputdict["-pix_fmt"] = "gray" + + ts_path = os.path.splitext(video_filename)[0] + '_ts.npy' + if os.path.exists(ts_path): + self.timestamps_us = np.load(ts_path) * 1e6 + else: + timestamps_s, step = np.linspace(0, self.num_frames / self.freq, self.num_frames, + endpoint=False, retstep=True) + assert abs(step - 1 / self.freq) < 1e-6 + self.timestamps_us = timestamps_s * 1e6 + + self.timestamps_us = self.timestamps_us[self.start_frame:self.end_frame] + + def get_size(self): + """Function returning the size of the imager which produced the events. + + Returns: + Tuple of int (height, width) which might be (None, None)""" + return self.height, self.width + + def __iter__(self): + # Initialized here because vreader does not reinitialize when calling iter + self._it_video = skvideo.io.vreader( + self.video_filename, + num_frames=self.max_frames, + inputdict=self.input_dict, + outputdict=self.outputdict) # Gets the closest frame before start_ts + self._it_timestamps = iter(self.timestamps_us) + return self + + def __next__(self): + im = next(self._it_video) + if not self.rgb: + im = im.squeeze() + ts = next(self._it_timestamps) + return im, ts + + def __len__(self): + return len(self.timestamps_us) diff --git a/sdk/modules/core_ml/python/pypkg/metavision_core_ml/event_to_video/__init__.py b/sdk/modules/core_ml/python/pypkg/metavision_core_ml/event_to_video/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/sdk/modules/core_ml/python/pypkg/metavision_core_ml/event_to_video/data_module.py b/sdk/modules/core_ml/python/pypkg/metavision_core_ml/event_to_video/data_module.py new file mode 100644 index 000000000..280c024d3 --- /dev/null +++ b/sdk/modules/core_ml/python/pypkg/metavision_core_ml/event_to_video/data_module.py @@ -0,0 +1,57 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. +""" +Here we reuse the GPUSimulator from OpenEB +to stream synthetic events. +""" +import os +import pytorch_lightning as pl +from metavision_core_ml.event_to_video.gpu_esim import GPUEBSIM + + +class EventToVideoDataModule(pl.LightningDataModule): + """Simulation gives you events + frames + """ + + def __init__(self, hparams): + super().__init__() + self.save_hyperparameters(hparams) + self.split_names = ['train', 'val', 'test'] + + def get_dataloader(self, dataset_path): + dataloader = GPUEBSIM.from_params( + dataset_path, + self.hparams.num_workers, + self.hparams.batch_size, + self.hparams.num_tbins, + self.hparams.event_volume_depth, + self.hparams.height, + self.hparams.width, + self.hparams.min_frames_per_video, + self.hparams.max_frames_per_video, + self.hparams.batch_sampling_mode, + self.hparams.batch_min_frames, + self.hparams.batch_max_frames, + self.hparams.batch_min_delta_t, + self.hparams.batch_max_delta_t, + randomize_noises=True, + device=self.hparams.data_device) + return dataloader + + def train_dataloader(self): + path = os.path.join(self.hparams.dataset_path, self.split_names[0]) + return self.get_dataloader(path) + + def val_dataloader(self): + path = os.path.join(self.hparams.dataset_path, self.split_names[1]) + return self.get_dataloader(path) + + def test_dataloader(self): + path = os.path.join(self.hparams.dataset_path, self.split_names[1]) + return self.get_dataloader(path) diff --git a/sdk/modules/core_ml/python/pypkg/metavision_core_ml/event_to_video/event_to_video.py b/sdk/modules/core_ml/python/pypkg/metavision_core_ml/event_to_video/event_to_video.py new file mode 100644 index 000000000..9ae456fa7 --- /dev/null +++ b/sdk/modules/core_ml/python/pypkg/metavision_core_ml/event_to_video/event_to_video.py @@ -0,0 +1,93 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. + +# pylint: disable=C0321 + +import torch +import torch.nn as nn +import torch.nn.functional as F + +from metavision_core_ml.core.temporal_modules import VideoSequential, ConvRNN, seq_wise +from metavision_core_ml.core.unet import unet_layers, Unet +from metavision_core_ml.core.modules import ConvLayer, ResBlock, PreActBlock + + +class MergeSkip(nn.Module): + """ + Merge with skip connection + """ + + def __init__(self): + super().__init__() + + def forward(self, x, skip): + x = seq_wise(F.interpolate)(x, size=skip.shape[-2:], mode='bilinear', align_corners=False) + x = torch.cat((x, skip), dim=2) + return x + + +class EventToVideo(nn.Module): + """ + High Speed and High Dynamic Range Video with an Event Camera + Rebecq et al. + Every resize is done using bilinear sampling of factor 2 + (even though you could use a different resize) + Args: + in_channels (int): + out_channels (int): + num_layers (int): + base (int): + cell (str): type of rnn cell + """ + + def __init__( + self, in_channels, out_channels, num_layers=3, base=4, cell='lstm', separable=False, + separable_hidden=False, archi="all_rnn"): + super().__init__() + + # out_channels for last encoder using NE Encoders = base * 2**NE + downs = [base * 2**(i + 1) for i in range(num_layers)] + ups = [base * 2**(num_layers - i) for i in range(num_layers)] + + print('down channels: ', downs) + print('up channels: ', ups) + print('archi: ', archi) + + down = VideoSequential(nn.Upsample(scale_factor=0.5, mode='bilinear', align_corners=False)) + up = MergeSkip() + + if archi == 'all_rnn': + def enc_fun(x, y): return ConvRNN(x, y, cell=cell) + def midd_fun(x, y): return VideoSequential(ResBlock(x, y), ResBlock(y, y)) + def dec_fun(x, y): return ConvRNN(x, y, cell=cell) + else: + raise NotImplementedError("archi not available") + + encoders, decoders = unet_layers(enc_fun, midd_fun, dec_fun, base, downs, ups[0] * 2, ups) + self.unet = Unet(encoders, decoders, down, up) + + self.head = VideoSequential(ConvLayer(in_channels, base, 5, 1, 2)) + self.predictor = VideoSequential(nn.Conv2d(ups[-1], out_channels, 1, 1, 0)) + self.flow = VideoSequential(nn.Conv2d(ups[-1], 2, 1, 1, 0)) + + def forward(self, x): + y = self.head(x) + y = self.unet(y) + return y + + def predict_gray(self, y): + return torch.sigmoid(self.predictor(y)) + + def predict_flow(self, y): + return self.flow(y) + + def reset(self, mask): + for module in self.unet.modules(): + if hasattr(module, "reset"): + module.reset(mask) diff --git a/sdk/modules/core_ml/python/pypkg/metavision_core_ml/event_to_video/gpu_esim.py b/sdk/modules/core_ml/python/pypkg/metavision_core_ml/event_to_video/gpu_esim.py new file mode 100644 index 000000000..5a3a88f4d --- /dev/null +++ b/sdk/modules/core_ml/python/pypkg/metavision_core_ml/event_to_video/gpu_esim.py @@ -0,0 +1,143 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. +""" +Here we reuse the GPUSimulator from OpenEB +to stream synthetic events. +""" +import torch +import numpy as np + +from metavision_core_ml.video_to_event.video_stream_dataset import make_video_dataset +from metavision_core_ml.video_to_event.gpu_simulator import GPUEventSimulator + + +def collect_target_images(gray_images, timestamps, video_len, target_indices): + """ + Collect target frames + timestamps at target indices + and rearranges them into T,B,C,H,W tensor + + Args: + gray_images (tensor): H,W,T format (videos are concatenated along 3rd dimension + timestamps (tensor): B,T + video_len (tensor): B lengths + target_indices (tensor): B,M indices + """ + num_frames_cumsum = video_len.numpy().cumsum(0) + target_gray = [] + target_times = [] + for i in range(len(target_indices)): + row_img = [] + row_ts = [] + start_f = int(num_frames_cumsum[i - 1]) if i else 0 + end_f = int(num_frames_cumsum[i]) + for t in range(len(target_indices[i])): + tt = target_indices[i, t].item() + idx = start_f + tt + assert start_f <= idx < end_f + img = gray_images[..., idx].clone() + row_img.append(img[None, None]) + row_ts.append(timestamps[i, tt]) + row_img = torch.cat(row_img) + target_gray.append(row_img[:, None]) + target_times.append(torch.FloatTensor(row_ts)[None, :]) + target_images = torch.cat(target_gray, 1) # T,B,C,H,W + target_times = torch.cat(target_times, 0) + return target_images, target_times + + +class GPUEBSIM(object): + """ + Simulated Events on GPU + + Args: + dataloader: video-clips datalodaer + simulator: gpu-simulator + batch_times: number of rounds per batch + event_volume_depth: number of timesteps per round + device: hardware to run simulation on + """ + + def __init__(self, dataloader, simulator, batch_times, event_volume_depth, randomize_noises, device): + self.dataloader = dataloader + self.simulator = simulator + self.device = device + self.batch_times = batch_times + self.event_volume_depth = event_volume_depth + self.do_randomize_noises = randomize_noises + + @classmethod + def from_params(cls, folder, + num_workers, + batch_size, + batch_times, + event_volume_depth, + height, + width, + min_frames_per_video, + max_frames_per_video, + batch_mode, + batch_min_frames, + batch_max_frames, + batch_min_delta_t, + batch_max_delta_t, + randomize_noises=False, + device='cuda:0'): + print('randomize noises: ', randomize_noises) + dataloader = make_video_dataset( + folder, num_workers, batch_size, height, width, min_frames_per_video, max_frames_per_video, batch_mode, + batch_min_frames, batch_max_frames, batch_min_delta_t, batch_max_delta_t, batch_times=batch_times) + event_gpu = GPUEventSimulator(batch_size, height, width) + event_gpu.to(device) + return cls(dataloader, event_gpu, batch_times, event_volume_depth, randomize_noises, device) + + def randomize_noises(self, first_times): + batch_size = len(first_times) + self.simulator.randomize_thresholds(first_times, th_mu_min=0.05, + th_mu_max=0.2, th_std_min=1e-4, th_std_max=1e-2) + for i in range(batch_size): + if first_times[i].item(): + cutoff_rate = 70 if np.random.rand() < 0.1 else 1e6 + leak_rate = 0.1 * 1e-6 if np.random.rand() < 0.1 else 0 + shot_rate = 10 * 1e-6 if np.random.rand() < 0.1 else 0 + refractory_period = np.random.uniform(10, 200) + self.simulator.cutoff_rates[i] = cutoff_rate + self.simulator.leak_rates[i] = leak_rate + self.simulator.shot_rates[i] = shot_rate + self.simulator.refractory_periods[i] = refractory_period + + def __iter__(self): + for batch in self.dataloader: + gray_images = batch['images'].squeeze(0).to(self.device) + first_times = batch['first_times'].to(self.device) + timestamps = batch['timestamps'].to(self.device) + video_len = batch["video_len"].to(self.device) + target_indices = batch['target_indices'] + prev_ts = self.simulator.prev_image_ts.clone() + prev_ts = prev_ts * (1 - first_times) + timestamps[:, 0] * first_times + + if self.do_randomize_noises: + self.randomize_noises(batch['first_times']) + + log_images = self.simulator.dynamic_moving_average(gray_images, video_len, timestamps, first_times) + + target_images, target_times = collect_target_images( + gray_images, timestamps, batch['video_len'], target_indices) + + all_times = torch.cat((prev_ts[:, None], target_times.to(self.device)), dim=1).long() + inputs = self.simulator.event_volume_sequence( + log_images, video_len, timestamps, all_times, first_times, self.event_volume_depth) + + inputs *= self.simulator.threshold_mus[None, :, None, None, None] + + reset = 1 - first_times[:, None, None, None] + out_batch = {'inputs': inputs, + 'images': target_images, + 'reset': reset} + + yield out_batch diff --git a/sdk/modules/core_ml/python/pypkg/metavision_core_ml/event_to_video/lightning_model.py b/sdk/modules/core_ml/python/pypkg/metavision_core_ml/event_to_video/lightning_model.py new file mode 100644 index 000000000..f3f3c6b92 --- /dev/null +++ b/sdk/modules/core_ml/python/pypkg/metavision_core_ml/event_to_video/lightning_model.py @@ -0,0 +1,200 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. +""" +Pytorch Lightning module +""" +import torch +import torch.nn as nn +import torch.nn.functional as F +import pytorch_lightning as pl + +import os +import argparse +import numpy as np +import cv2 + +from types import SimpleNamespace +from torchvision.utils import make_grid +from tqdm import tqdm +from itertools import islice + +from metavision_core_ml.core.temporal_modules import time_to_batch, seq_wise +from metavision_core_ml.event_to_video.event_to_video import EventToVideo +from metavision_core_ml.utils.torch_ops import normalize_tiles +from metavision_core_ml.utils.show_or_write import ShowWrite +from metavision_core_ml.utils.torch_ops import cuda_tick, viz_flow + +from metavision_core_ml.losses.perceptual_loss import VGGPerceptualLoss +from metavision_core_ml.losses.warp import ssl_flow_l1 +from kornia.losses import ssim_loss + + +class EventToVideoCallback(pl.callbacks.base.Callback): + """ + callbacks to our model + """ + + def __init__(self, data_module, video_result_every_n_epochs=2, show_window=False): + super().__init__() + self.data_module = data_module + self.video_every = int(video_result_every_n_epochs) + self.show_window = show_window + + def on_epoch_end(self, trainer, pl_module): + if trainer.current_epoch and not (trainer.current_epoch % self.video_every): + pl_module.demo_video(self.data_module.val_dataloader(), trainer.current_epoch, show_video=self.show_window) + + +class EventToVideoLightningModel(pl.LightningModule): + """ + EventToVideo: Train your EventToVideo + """ + + def __init__(self, hparams: argparse.Namespace) -> None: + super().__init__() + self.save_hyperparameters(hparams, logger=False) + self.model = EventToVideo( + self.hparams.cin, + self.hparams.cout, + self.hparams.num_layers, + self.hparams.base, + self.hparams.cell, + self.hparams.separable, + self.hparams.separable_hidden, + self.hparams.archi) + self.vgg_perc_l1 = VGGPerceptualLoss() + + @classmethod + def load_from_checkpoint(cls, checkpoint_path): + checkpoint = torch.load(checkpoint_path, map_location=torch.device('cpu')) + hparams = argparse.Namespace(**checkpoint['hyper_parameters']) + model = cls(hparams) + model.load_state_dict(checkpoint['state_dict']) + return model + + def forward(self, x): + state = self.model(x) + return self.model.predict_gray(state) + + def compute_loss(self, x, y, reset_mask): + self.model.reset(reset_mask) + + target = (y / 255.0) + state = self.model(x) + pred = self.model.predict_gray(state) + + bw_flow = self.model.predict_flow(state) + + pred_flat = time_to_batch(pred)[0].float() + target_flat = time_to_batch(target)[0].float() + loss_dict = {} + loss_dict['ssim'] = ssim_loss(pred_flat, target_flat, 5) + loss_dict['smooth_l1'] = F.smooth_l1_loss(pred_flat, target_flat, beta=0.11) + + loss_dict['vgg_perc_l1'] = self.vgg_perc_l1(pred_flat, target_flat) * 0.5 + + # loss_dict['target_flow_l1'] = ssl_flow_l1(target, bw_flow) + loss_dict['pred_flow_l1'] = ssl_flow_l1(pred, bw_flow) + for k, v in loss_dict.items(): + assert v >= 0, k + return loss_dict + + def training_step(self, batch, batch_nb): + batch = SimpleNamespace(**batch) + loss_dict = self.compute_loss(batch.inputs, batch.images, batch.reset) + + loss = sum([v for k, v in loss_dict.items()]) + + assert loss.item() >= 0 + logs = {'loss': loss} + logs.update({'train_' + k: v.item() for k, v in loss_dict.items()}) + + self.log('train_loss', loss) + for k, v in loss_dict.items(): + self.log('train_' + k, v) + + return loss + + def validation_step(self, batch, batch_nb): + batch = SimpleNamespace(**batch) + loss_dict = self.compute_loss(batch.inputs, batch.images, batch.reset) + loss = sum([v for k, v in loss_dict.items()]) + assert loss.item() >= 0 + + logs = {'val_loss': loss} + logs.update({'val_' + k: v.item() for k, v in loss_dict.items()}) + + self.log('val_loss', loss) + for k, v in loss_dict.items(): + self.log('val_' + k, v) + return loss + + def validation_epoch_end(self, outputs): + val_loss_avg = torch.FloatTensor([item for item in outputs]).mean() + self.log('val_acc', val_loss_avg) + return val_loss_avg + + def configure_optimizers(self): + return torch.optim.Adam(self.parameters(), lr=self.hparams.lr) + + def demo_video(self, dataloader, epoch=0, show_video=True): + print('Demo') + height, width = self.hparams.height, self.hparams.width + batch_size = self.hparams.batch_size + nrows = 2 ** ((batch_size.bit_length() - 1) // 2) + ncols = int(np.ceil(self.hparams.batch_size / nrows)) + + self.model.eval() + + video_name = os.path.join(self.hparams.root_dir, 'videos', f'video#{epoch:d}.mp4') + dir = os.path.dirname(video_name) + if not os.path.isdir(dir): + os.mkdir(dir) + window_name = None + if show_video: + window_name = "test_epoch {:d}".format(epoch) + show_write = ShowWrite(window_name, video_name) + + with torch.no_grad(): + for batch in tqdm(islice(dataloader, self.hparams.demo_iter), total=self.hparams.demo_iter): + + batch = SimpleNamespace(**batch) + batch.inputs = batch.inputs.to(self.device) + batch.reset = batch.reset.to(self.device) + + x = batch.inputs + x = x[:, :, :3] + x = 255 * normalize_tiles(x) + y = batch.images + + self.model.reset(batch.reset) + + s = self.model(batch.inputs) + o = self.model.predict_gray(s) + o = normalize_tiles(o, num_stds=6) + o = 255 * o + + if self.hparams.plot_flow: + f = self.model.predict_flow(s) + f = seq_wise(viz_flow)(f) + for t in range(len(x)): + gx = make_grid(x[t], nrow=nrows, padding=0).permute(1, 2, 0).cpu().numpy().astype(np.uint8) + gy = make_grid(y[t], nrow=nrows, padding=0).permute(1, 2, 0).cpu().numpy().astype(np.uint8) + go = make_grid(o[t], nrow=nrows, padding=0).permute(1, 2, 0).data.cpu().numpy().astype(np.uint8) + + if self.hparams.plot_flow: + gf = make_grid( + f[t], + nrow=nrows, padding=0).permute( + 1, 2, 0).data.cpu().numpy().astype( + np.uint8) + cat = np.concatenate([gx, gy, gf, go], axis=1) + else: + cat = np.concatenate([gx, gy, go], axis=1) + show_write(cat) diff --git a/sdk/modules/core_ml/python/pypkg/metavision_core_ml/losses/__init__.py b/sdk/modules/core_ml/python/pypkg/metavision_core_ml/losses/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/sdk/modules/core_ml/python/pypkg/metavision_core_ml/losses/perceptual_loss.py b/sdk/modules/core_ml/python/pypkg/metavision_core_ml/losses/perceptual_loss.py new file mode 100644 index 000000000..3a17d6d69 --- /dev/null +++ b/sdk/modules/core_ml/python/pypkg/metavision_core_ml/losses/perceptual_loss.py @@ -0,0 +1,63 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. +""" +VGG Perceptual Loss (pretrained, uncalibrated) +""" +import torch +import torchvision + + +class VGGPerceptualLoss(torch.nn.Module): + """ + VGG Perceptual Loss, it computes L1 distance + between several layers of activations between 2 images. + + Args: + resize (bool): resize to original size before running the loss + """ + + def __init__(self, resize=True, freeze_bn=False): + super(VGGPerceptualLoss, self).__init__() + blocks = [] + blocks.append(torchvision.models.vgg16(pretrained=True).features[:4].eval()) + blocks.append(torchvision.models.vgg16(pretrained=True).features[4:9].eval()) + blocks.append(torchvision.models.vgg16(pretrained=True).features[9:16].eval()) + blocks.append(torchvision.models.vgg16(pretrained=True).features[16:23].eval()) + for bl in blocks: + for p in bl.parameters(): + p.requires_grad = False + + self.blocks = torch.nn.ModuleList(blocks) + self.transform = torch.nn.functional.interpolate + self.register_buffer("mean", torch.tensor([0.485, 0.456, 0.406]).view(1, 3, 1, 1)) + self.register_buffer("std", torch.tensor([0.229, 0.224, 0.225]).view(1, 3, 1, 1)) + self.resize = resize + self.freeze_bn = freeze_bn + + def train(self, mode: bool): + if self.freeze_bn: + return super().train(False) + + def forward(self, input, target): + if input.shape[1] != 3: + input = input.repeat(1, 3, 1, 1) + target = target.repeat(1, 3, 1, 1) + input = (input-self.mean) / self.std + target = (target-self.mean) / self.std + if self.resize: + input = self.transform(input, mode='bilinear', size=(224, 224), align_corners=False) + target = self.transform(target, mode='bilinear', size=(224, 224), align_corners=False) + loss = 0.0 + x = input + y = target + for block in self.blocks: + x = block(x) + y = block(y) + loss += torch.nn.functional.l1_loss(x, y) + return loss diff --git a/sdk/modules/core_ml/python/pypkg/metavision_core_ml/losses/warp.py b/sdk/modules/core_ml/python/pypkg/metavision_core_ml/losses/warp.py new file mode 100644 index 000000000..bfd925242 --- /dev/null +++ b/sdk/modules/core_ml/python/pypkg/metavision_core_ml/losses/warp.py @@ -0,0 +1,121 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under torche Apache License, Version 2.0 (the "License"); +# you may not use torchis file except in compliance with the License. +# You may obtain a copy of torche License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under torche License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, eitorcher express or implied. +# See torche License for the specific language governing permissions and limitations under the License. + +""" +Pytorch Functions for warping an image using +the flow. +""" +import torch + + +def create_meshgrid(width, height, is_cuda): + """ + Creates a 2d grid of X-Y coordinates. + + Args: + width (int): desired width + height (int): desired height + is_cuda (bool): device on gpu + """ + x, y = torch.meshgrid([torch.arange(0, width), torch.arange(0, height)]) + x, y = (x.transpose(0, 1).float(), y.transpose(0, 1).float()) + if is_cuda: + x = x.cuda() + y = y.cuda() + return x, y + + +def compute_source_coordinates(y_displacement, x_displacement): + """ + Returns source coordinates, given displacements. + + Given target coordinates (y, x), torch source coordinates are + computed as (y + y_displacement, x + x_displacement). + + Args: + x_displacement, y_displacement: are tensors witorch indices + [example_index, 1, y, x] + """ + width, height = y_displacement.size(-1), y_displacement.size(-2) + x_target, y_target = create_meshgrid(width, height, y_displacement.is_cuda) + x_source = x_target + x_displacement.squeeze(1) + y_source = y_target + y_displacement.squeeze(1) + out_of_boundary_mask = ((x_source.detach() < 0) | (x_source.detach() >= width) | + (y_source.detach() < 0) | (y_source.detach() >= height)) + return y_source, x_source, out_of_boundary_mask + + +def backwarp_2d(source, y_displacement, x_displacement): + """Returns warped source image and occlusion_mask. + Value in location (x, y) in output image in taken from + (x + x_displacement, y + y_displacement) location of torch source image. + If torch location in the source image is outside of its borders, + torch location in the target image is filled with zeros and the + location is added to torch "occlusion_mask". + + Args: + source: is a tensor witorch indices + [example_index, channel_index, y, x]. + x_displacement, + y_displacement: are tensors witorch indices [example_index, + 1, y, x]. + Returns: + target: is a tensor witorch indices + [example_index, channel_index, y, x]. + occlusion_mask: is a tensor witorch indices [example_index, 1, y, x]. + """ + width, height = source.size(-1), source.size(-2) + y_source, x_source, out_of_boundary_mask = compute_source_coordinates( + y_displacement, x_displacement) + x_source = (2.0 / float(width - 1)) * x_source - 1 + y_source = (2.0 / float(height - 1)) * y_source - 1 + x_source = x_source.masked_fill(out_of_boundary_mask, 0) + y_source = y_source.masked_fill(out_of_boundary_mask, 0) + grid_source = torch.stack([x_source, y_source], -1) + target = torch.nn.functional.grid_sample(source, + grid_source, + align_corners=True) + out_of_boundary_mask = out_of_boundary_mask.unsqueeze(1) + target.masked_fill_(out_of_boundary_mask.expand_as(target), 0) + return target, out_of_boundary_mask + + +@torch.cuda.amp.custom_fwd(cast_inputs=torch.float32) +def ssl_flow_l1(img_seq, flow_seq, direction='backward'): + """ + The flow with meshgrid + flow convention either: + - warp backward if flow is flow forward flow_t->t+1: gt is future + - warp forward if flow is flow backward flow_t->t-1: gt is past + + Args: + img_source: (T,B,C,H,W) + flow_seq: (T,B,C,H,W) + """ + t, b, c, h, w = img_seq.shape + if direction == 'backward': + warp_source = img_seq[1:] + flow_source = flow_seq[1:] + warp_gt = img_seq[:-1] + else: + warp_source = img_seq[:-1] + flow_source = flow_seq[:-1] + warp_gt = img_seq[1:] + + warp_source = warp_source.reshape((t-1)*b, c, h, w) + flow_source = flow_source.reshape((t-1)*b, 2, h, w) + warp_gt = warp_gt.reshape((t-1)*b, c, h, w) + + warped, warped_invalid = backwarp_2d( + source=warp_source, + y_displacement=flow_source[:, 0, ...], + x_displacement=flow_source[:, 1, ...], + ) + diff = (warped-warp_gt)[~warped_invalid] + diff = diff.abs() + return diff.mean() diff --git a/sdk/modules/core_ml/python/pypkg/metavision_core_ml/preprocessing/__init__.py b/sdk/modules/core_ml/python/pypkg/metavision_core_ml/preprocessing/__init__.py new file mode 100644 index 000000000..52f563d9d --- /dev/null +++ b/sdk/modules/core_ml/python/pypkg/metavision_core_ml/preprocessing/__init__.py @@ -0,0 +1 @@ +from .viz import viz_events diff --git a/sdk/modules/core_ml/python/pypkg/metavision_core_ml/preprocessing/event_to_tensor_torch.py b/sdk/modules/core_ml/python/pypkg/metavision_core_ml/preprocessing/event_to_tensor_torch.py new file mode 100644 index 000000000..f1f8f043d --- /dev/null +++ b/sdk/modules/core_ml/python/pypkg/metavision_core_ml/preprocessing/event_to_tensor_torch.py @@ -0,0 +1,122 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. +""" +Preprocessing functions in Pytorch +They take (N,5) events in (b,x,y,p,t) format. +""" +import numpy as np +import torch + +from metavision_sdk_base import EventCD + + +def event_cd_to_torch(events): + """ + Converts Events to Torch array + Note that Polarities are mapped from {0;1} to {-1;1} + + Args: + events (EventCD): structured array containing N events + + Returns: + (Tensor) N,5 in batch_index, x, y, polarity, timestamp (micro-seconds) where the batch index value is 0. + """ + event_th = torch.zeros((len(events), 5), dtype=torch.int32) + event_th[:, 1] = torch.from_numpy(events['x'].astype(np.int32)) + event_th[:, 2] = torch.from_numpy(events['y'].astype(np.int32)) + event_th[:, 3] = torch.from_numpy(2 * events['p'].astype(np.int32) - 1) + event_th[:, 4] = torch.from_numpy(events['t'].astype(np.int32)) + return event_th + + +def tensor_to_cd_events(events, sort=True): + """ + Convert the event produced by the GPU to our format for later reuse. + + Args: + events: N,5 in batch_index, x, y, polarity, timestamp (micro-seconds) + sort (boolean): whether to sort event chronologically. You might want to avoid doing it if the + algorithm you are using doesn't rely on them. + + Returns: + list of EventCD arrays + """ + events = events.cpu().numpy() + res = [] + indices = np.searchsorted(events[:, 0], np.arange(events[-1, 0] + 2)) + for i, ind in enumerate(indices[:-1]): + slice = events[ind:indices[i + 1]] + slicenp = np.zeros(len(slice), dtype=EventCD) + if sort: + sorting_indices = np.argsort(slice[:, 4]) + slice = slice[sorting_indices] + slicenp["x"] = slice[:, 1] + slicenp["y"] = slice[:, 2] + slicenp["p"] = slice[:, 3] > 0 + slicenp['t'] = slice[:, 4] + res.append(slicenp) + return res + + +def event_image(events, batch_size, height, width): + """ + Densifies events into an image + + Args: + events (tensor): N,5 (b,x,y,p,t) + batch_size (int): batch size + height (int): height of output image + width (int): width of output image + """ + bs = events[:, 0].long() + xs = events[:, 1].long() + ys = events[:, 2].long() + ps = events[:, 3].float() + img = torch.zeros((batch_size, height, width), dtype=torch.float32, device=events.device) + img.index_put_((bs, ys, xs), ps, accumulate=True) + return img + + +def event_volume(events, batch_size, height, width, start_times, durations, nbins, mode='bilinear', vol=None): + """ + Densifies events into an volume + (uniform cut) + + Args: + events (tensor): N,5 (b,x,y,p,t) + batch_size (int): batch size + height (int): height of output volume + width (int): width of output volume + start_times: (B,) start times of each volume + durations: (B,) durations for each volume + nbins (int): number of time bins for output volume + mode (str): either "bilinear" or "nearest" interpolation of voxels. + """ + bs = events[:, 0].long() + xs = events[:, 1].long() + ys = events[:, 2].long() + ps = events[:, 3].float() + ts = events[:, 4].float() + + start_times = start_times[bs] + durations = durations[bs] + ti_star = (ts - start_times) * nbins / durations - 0.5 + lbin = torch.floor(ti_star) + lbin = torch.clamp(lbin, min=0, max=nbins-1) + if vol is None: + vol = torch.zeros((batch_size, nbins, height, width), dtype=torch.float32, device=events.device) + if mode == 'bilinear': + rbin = torch.clamp(lbin + 1, max=nbins - 1) + lvals = torch.clamp(1 - torch.abs(lbin - ti_star), min=0) + rvals = 1 - lvals + vol.index_put_((bs, lbin.long(), ys, xs), ps * lvals, accumulate=True) + vol.index_put_((bs, rbin.long(), ys, xs), ps * rvals, accumulate=True) + else: + vol.index_put_((bs, lbin.long(), ys, xs), ps, accumulate=True) + return vol diff --git a/sdk/modules/core_ml/python/pypkg/metavision_core_ml/preprocessing/viz.py b/sdk/modules/core_ml/python/pypkg/metavision_core_ml/preprocessing/viz.py new file mode 100644 index 000000000..48a964ec3 --- /dev/null +++ b/sdk/modules/core_ml/python/pypkg/metavision_core_ml/preprocessing/viz.py @@ -0,0 +1,48 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. + +""" +Function to visualize events +""" + +import numpy as np +from numba import jit + +BG_COLOR = np.array([30, 37, 52], dtype=np.uint8) +POS_COLOR = np.array([216, 223, 236], dtype=np.uint8) +NEG_COLOR = np.array([64, 126, 201], dtype=np.uint8) + + +def viz_events(events, height, width, img=None): + """Creates a RGB frame representing the events given as input. + Args: + events (np.ndarray): structured array containing events + height (int): Height of the sensor in pixels + width (int): width of the sensor in pixels + img (np.ndarray): optional image of size (height, width, 3) and dtype unint8 to avoid reallocation + Returns: + output_array (np.ndarray): Array of shape (height, width, 3) + """ + if img is None: + img = np.full((height, width, 3), BG_COLOR, dtype=np.uint8) + else: + img[...] = BG_COLOR + _viz_events(events, img) + return img + + +@jit +def _viz_events(events, img): + for i in range(events.shape[0]): + x = int(events[i]["x"]) + y = int(events[i]["y"]) + if events[i]["p"] > 0: + img[y, x, :] = POS_COLOR + else: + img[y, x, :] = NEG_COLOR diff --git a/sdk/modules/core_ml/python/pypkg/metavision_core_ml/utils/__init__.py b/sdk/modules/core_ml/python/pypkg/metavision_core_ml/utils/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/sdk/modules/core_ml/python/pypkg/metavision_core_ml/utils/files.py b/sdk/modules/core_ml/python/pypkg/metavision_core_ml/utils/files.py new file mode 100644 index 000000000..3a59e4175 --- /dev/null +++ b/sdk/modules/core_ml/python/pypkg/metavision_core_ml/utils/files.py @@ -0,0 +1,103 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. + +""" +A collection of utilities for searching image/video files. +""" +import os +import glob + +VIDEO_EXTENSIONS = [".mp4", ".mov", ".m4v", ".avi"] +IMAGE_EXTENSIONS = [".jpg", ".png"] + + +def is_image(path): + """Checks if a path is an image + + Args: + path: file path + Returns: + is_image (bool): True or False + """ + return os.path.splitext(path)[1].lower() in IMAGE_EXTENSIONS + + +def is_video(path): + """Checks if a path is a video + + Args: + path: file path + + Returns: + is_video (bool): True or False + """ + return os.path.splitext(path)[1].lower() in VIDEO_EXTENSIONS + + +def grab_images_and_videos(adir, recursive=True): + """Grabs image and video files + + Args: + adir: directory with images + + Returns: + files: image and video files + """ + assert os.path.isdir(adir) + return grab_images(adir, recursive=recursive) + grab_videos(adir, recursive=recursive) + + +def grab_images(adir, recursive=True): + """Grabs image files + + Args: + adir: directory with images + + Returns: + files: image files + """ + assert os.path.isdir(adir) + return grab_files(adir, IMAGE_EXTENSIONS, recursive=recursive) + + +def grab_videos(adir, recursive=True): + """Grabs videos in a directory + + Args: + adir (str): directory + recursive (boolean): search recursively + + Returns: + files: files with image/ video extension + """ + assert os.path.isdir(adir) + files = grab_files(adir, VIDEO_EXTENSIONS, recursive=recursive) + return files + + +def grab_files(adir, extensions, recursive=True): + """Grabs files with allowed extensions + + Args: + adir (str): directory + extensions (list): allowed extensions + recursive (boolean): search recursively + + Returns: + files + """ + assert os.path.isdir(adir) + all_files = [] + search_string = adir + os.sep + "*" + if recursive: + search_string += "*" + os.sep + "*" + for ext in extensions: + all_files += glob.glob(search_string + ext, recursive=recursive) + all_files += glob.glob(search_string + ext.upper(), recursive=recursive) + return all_files diff --git a/sdk/modules/core_ml/python/pypkg/metavision_core_ml/utils/show_or_write.py b/sdk/modules/core_ml/python/pypkg/metavision_core_ml/utils/show_or_write.py new file mode 100644 index 000000000..2b14c3f3c --- /dev/null +++ b/sdk/modules/core_ml/python/pypkg/metavision_core_ml/utils/show_or_write.py @@ -0,0 +1,57 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. +""" +This wrapper shows and/or writes a video +""" +import cv2 +from skvideo.io import FFmpegWriter + + +class ShowWrite(object): + """ + ShowWrite either shows and/or writes a video + + Args: + window_name (str): if empty, will not show + video_path (str): if empty, will not write + crf (int): compression factor for video output + """ + + def __init__(self, window_name, video_path, crf=30): + assert window_name or video_path + self.window_name = window_name + if window_name: + self.window = cv2.namedWindow(window_name) + if video_path: + self.video_out = FFmpegWriter(video_path, outputdict={ + '-vcodec': 'libx264', # use the h.264 codec + '-crf': str(crf), # set the constant rate factor to 0, which is lossless + '-preset': 'veryslow' # the slower the better compression, in princple, try + # other options see https://trac.ffmpeg.org/wiki/Encode/H.264 + }) + self.called = False + self.last_ts = None + + def __call__(self, image, delay=5): + key = None + if hasattr(self, "window"): + cv2.imshow(self.window_name, image) + key = cv2.waitKey(delay) + if hasattr(self, "video_out"): + if image.ndim == 3: + image = image[..., ::-1] + self.video_out.writeFrame(image) + self.called = True + return key + + def __del__(self): + if hasattr(self, "video_out") and self.called: + self.video_out.close() + if hasattr(self, "window"): + cv2.destroyWindow(self.window_name) diff --git a/sdk/modules/core_ml/python/pypkg/metavision_core_ml/utils/torch_ops.py b/sdk/modules/core_ml/python/pypkg/metavision_core_ml/utils/torch_ops.py new file mode 100644 index 000000000..65efa6701 --- /dev/null +++ b/sdk/modules/core_ml/python/pypkg/metavision_core_ml/utils/torch_ops.py @@ -0,0 +1,101 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. +""" +Miscellaneous operations in Pytorch +""" +import os +import numpy as np +import torch +import time +import math +import kornia + + +def cuda_tick(): + """ + Measures time for torch + operations on gpu. + """ + torch.cuda.synchronize() + return time.time() + + +def cuda_time(func): + """ + Decorator for Pytorch ops + on gpu. + + Args: + func: method to time + """ + def wrapper(*args, **kwargs): + start = cuda_tick() + out = func(*args, **kwargs) + end = cuda_tick() + rt = end - start + freq = 1. / rt + if freq > 0: + print(freq, ' it/s @ ', func) + else: + print(rt, ' s/it @ ', func) + return out + return wrapper + + +def normalize_tiles(tensor, num_stds=6, num_dims=2, real_min_max=True): + """ + Normalizes tiles, allows us to have normalized views + (we filter outliers + standardize) + + Args: + tensor: tensor input, we assume last 2 dims are H,W + Returns: + tensor: normalized tensor + """ + shape = tensor.shape[:-num_dims] + trflat = tensor.view(*shape, -1) + + mu, std = trflat.mean(dim=-1), trflat.std(dim=-1)[0] * num_stds + mu = mu[(...,) + (None,) * num_dims] + std = std[(...,) + (None,) * num_dims] + + low, high = mu - std, mu + std + + tensor = torch.min(tensor, high) + tensor = torch.max(tensor, low) + + if real_min_max: + trflat = tensor.view(*shape, -1) + low, high = trflat.min(dim=-1)[0], trflat.max(dim=-1)[0] + low = low[(...,) + (None,) * num_dims] + high = high[(...,) + (None,) * num_dims] + + return (tensor - low) / (high - low + 1e-5) + + +def viz_flow(flow): + """ + Visualizes flow in rgb colors + + Args: + flow: (B,2,H,W) tensor + Returns: + rgb: (B,3,H,W) tensor + """ + b, c, h, w = flow.shape + mag = torch.linalg.norm(flow, dim=1) + ang = torch.atan2(flow[:, 1], flow[:, 0]) + mask = ang < 0 + ang[mask] = ang[mask] + 2*math.pi # ang<0 -> [pi;2*pi] + hsv = torch.zeros((b, 3, h, w), dtype=torch.float32, device=flow.device) + hsv[:, 0] = ang + hsv[:, 1] = 1 + hsv[:, 2] = mag / mag.max() + rgb = kornia.color.hsv_to_rgb(hsv) + return (255*rgb).byte() diff --git a/sdk/modules/core_ml/python/pypkg/metavision_core_ml/utils/train_utils.py b/sdk/modules/core_ml/python/pypkg/metavision_core_ml/utils/train_utils.py new file mode 100644 index 000000000..a911b4624 --- /dev/null +++ b/sdk/modules/core_ml/python/pypkg/metavision_core_ml/utils/train_utils.py @@ -0,0 +1,30 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. +""" +Tools common to training main functions. +""" +import os +from glob import glob, iglob + + +def extract_num(path): + filename = os.path.splitext(path)[0] + num = filename.split('=')[1] + return int(num) if num.isdigit() else -1 + + +def search_latest_checkpoint(root_dir, mode='time'): + """looks for latest checkpoint in latest sub-directory""" + vdir = os.path.join(root_dir, '**', 'checkpoints') + ckpts = glob(os.path.join(vdir, '*.ckpt'), recursive=True) + if mode == 'time': + ckpts.sort(key=lambda x: os.path.getmtime(x)) + else: + ckpts = sorted(glob(os.path.join(vdir, '*.ckpt')), key=extract_num) + return ckpts[-1] diff --git a/sdk/modules/core_ml/python/pypkg/metavision_core_ml/video_to_event/__init__.py b/sdk/modules/core_ml/python/pypkg/metavision_core_ml/video_to_event/__init__.py new file mode 100644 index 000000000..5ff2863ab --- /dev/null +++ b/sdk/modules/core_ml/python/pypkg/metavision_core_ml/video_to_event/__init__.py @@ -0,0 +1,13 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. + +from .simulator import EventSimulator +from .simu_events_iterator import SimulatedEventsIterator +from .video_stream_dataset import make_video_dataset +from .gpu_simulator import GPUEventSimulator diff --git a/sdk/modules/core_ml/python/pypkg/metavision_core_ml/video_to_event/cutoff_kernels.py b/sdk/modules/core_ml/python/pypkg/metavision_core_ml/video_to_event/cutoff_kernels.py new file mode 100644 index 000000000..ebe9a4860 --- /dev/null +++ b/sdk/modules/core_ml/python/pypkg/metavision_core_ml/video_to_event/cutoff_kernels.py @@ -0,0 +1,118 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. +# pylint: disable=E0633 +# pylint: disable=E1121 + +""" +cpu + cuda kernels for gpu simulation of cutoff +""" + +import math +from numba import njit +from numba import cuda + + +@cuda.jit() +def _cuda_kernel_dynamic_moving_average( + images, num_frames_cumsum, prev_log_images_0, prev_log_images_1, + prev_image_times, image_times, first_times, cutoff_rates, log_eps=1e-7): + """ + Dynamic Blurring of sequence + Log-space conversion + (GPU code) + """ + b, y, x = cuda.grid(3) + height, width, _ = images.shape + batch_size = len(num_frames_cumsum) + + if b < batch_size and y < height and x < width: + first_time = int(first_times[b]) + cutoff_hz = cutoff_rates[b] + cutoff_hz = cutoff_hz if cutoff_hz > 0 else 1e4 + tau = math.pi * 2 * cutoff_hz + start_f = num_frames_cumsum[b - 1] if b else 0 + end_f = num_frames_cumsum[b] + last_image_ts = prev_image_times[b] + + pixel = images[y, x] + log_pixel = math.log(pixel[start_f] / 255.0 + log_eps) + if first_time: + log_state0 = log_pixel + log_state1 = log_pixel + else: + log_state0 = prev_log_images_0[b, y, x] + log_state1 = prev_log_images_1[b, y, x] + + for t in range(start_f, end_f): + ind = t - start_f + + dt_s = 1e-6 * (image_times[b, ind] - last_image_ts) + eps = (pixel[t] + 20) / 275 * dt_s * tau + eps = max(0, min(eps, 1)) + + log_state0 = (1 - eps) * log_state0 + eps * math.log(pixel[t] / 255.0 + log_eps) + log_state1 = (1 - eps) * log_state1 + eps * log_state0 + + if t > start_f or not first_time: + pixel[t] = log_state1 + else: + pixel[start_f] = log_pixel + + last_image_ts = image_times[b, ind] + prev_log_images_0[b, y, x] = log_state0 + prev_log_images_1[b, y, x] = log_state1 + + +@njit() +def _cpu_kernel_dynamic_moving_average( + images, num_frames_cumsum, prev_log_images_0, prev_log_images_1, + prev_image_times, image_times, first_times, cutoff_rates, log_eps=1e-7): + """ + Dynamic Blurring of sequence + Log-space conversion + (CPU code) + """ + height, width = images.shape[:2] + batch_size = len(num_frames_cumsum) + for b in range(batch_size): + first_time = int(first_times[b]) + cutoff_hz = cutoff_rates[b] + cutoff_hz = cutoff_hz if cutoff_hz > 0 else 1e4 + tau = math.pi * 2 * cutoff_hz + start_f = num_frames_cumsum[b - 1] if b else 0 + end_f = num_frames_cumsum[b] + + for y in range(height): + for x in range(width): + last_image_ts = prev_image_times[b] + pixel = images[y, x] + log_pixel = math.log(pixel[start_f] / 255.0 + log_eps) + if first_time: + log_state0 = log_pixel + log_state1 = log_pixel + else: + log_state0 = prev_log_images_0[b, y, x] + log_state1 = prev_log_images_1[b, y, x] + + for t in range(start_f, end_f): + ind = t - start_f + + dt_s = 1e-6 * (image_times[b, ind] - last_image_ts) + eps = (pixel[t] + 20) / 275 * dt_s * tau + eps = max(0, min(eps, 1)) + + log_state0 = (1 - eps) * log_state0 + eps * math.log(pixel[t] / 255.0 + log_eps) + log_state1 = (1 - eps) * log_state1 + eps * log_state0 + + if t > start_f or not first_time: + pixel[t] = log_state1 + else: + pixel[start_f] = log_pixel + + last_image_ts = image_times[b, ind] + prev_log_images_0[b, y, x] = log_state0 + prev_log_images_1[b, y, x] = log_state1 diff --git a/sdk/modules/core_ml/python/pypkg/metavision_core_ml/video_to_event/events_kernels.py b/sdk/modules/core_ml/python/pypkg/metavision_core_ml/video_to_event/events_kernels.py new file mode 100644 index 000000000..3eccc59c5 --- /dev/null +++ b/sdk/modules/core_ml/python/pypkg/metavision_core_ml/video_to_event/events_kernels.py @@ -0,0 +1,231 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. +# pylint: disable=E0633 +# pylint: disable=E1121 +""" +Implementation in numba cuda GPU of kernels used to simulate events from images +GPU kernels used to simulate events from images +""" +from __future__ import absolute_import + +import math +from copy import deepcopy + +from numba import cuda, jit + + +exec_string = """@{decorator} +def _{runtime}_kernel_{func_name}( + {params}, log_sequence, num_frames_cumsum, image_times, first_times, rng_states, log_states, prev_log_images, + timestamps, thresholds, previous_image_times, refractory_periods, leak_rates, shot_noise_rates, threshold_mus, + persistent=True, {default_params}): + ''' + {documentation} + ''' + height, width = log_sequence.shape[:2] + batch_size = len(num_frames_cumsum) + {loop} + last_timestamp_at_xy = 0 if first_time else timestamps[b, y, x] + log_state_at_xy = log_states[b, y, x] + Cp = thresholds[1, b, y, x] + Cn = thresholds[0, b, y, x] + end_f = num_frames_cumsum[b] + start_f = num_frames_cumsum[b-1] if b else 0 + {on_start} + + for tt in range(start_f, end_f): + if first_time and tt == start_f: + log_state_at_xy = log_sequence[y, x, start_f] + continue + elif tt == start_f: + it = prev_log_images[b, y, x] + last_image_ts = previous_image_times[b] + else: + it = log_sequence[y, x, tt-1] + last_image_ts = image_times[b, tt-start_f-1] + + curr_image_ts = image_times[b, tt- start_f] + + itdt = log_sequence[y, x, tt] + prev_ref_val = log_state_at_xy + pol = 1. if itdt >= it else -1. + p = 1 if itdt >= it else 0 + C = thresholds[p, b, y, x] + delta_t = curr_image_ts - last_image_ts + all_crossing = False + polC = pol * C + num_events = 0 + + # Better Refractory Model! + # TODO: during characterization story MV-67, check if this code + # improves realism + # dt_since_last_event = curr_image_ts - last_timestamp_at_xy + # if dt_since_last_event >= refractory_period and last_timestamp_at_xy > 0: + #  time_end_refractory_period = last_timestamp_at_xy + refractory_period + #  if last_image_ts <= time_end_refractory_period <= curr_image_ts: + #  dt_since_last_image = time_end_refractory_period - last_image_ts + #  ratio = dt_since_last_image / delta_t + #  prev_ref_val = it * (1-ratio) + itdt * ratio + #  it = prev_ref_val + #  last_image_ts = time_end_refractory_period + + if abs(itdt - prev_ref_val) > C: + current_ref_val = prev_ref_val + + while not all_crossing: + current_ref_val += polC + + if (pol > 0 and current_ref_val > it and current_ref_val <= itdt) \ + or (pol < 0 and current_ref_val < it and current_ref_val >= itdt): + edt = (current_ref_val - it) * delta_t / (itdt - it) + ts = int(last_image_ts + edt) + dt = ts - last_timestamp_at_xy + if dt >= refractory_period or last_timestamp_at_xy == 0: + num_events += 1 + last_timestamp_at_xy = ts + + {on_event_write} + + log_state_at_xy = current_ref_val + else: + all_crossing = True + + it = itdt + + # shot noise + if shot_noise_micro_hz > 0: + intensity = math.exp(itdt) + shot_noise_factor = (shot_noise_micro_hz / 2) * delta_t / (1 + num_events) + shot_noise_factor *= (-0.75 * intensity + 1) + shot_on_prob = shot_noise_factor * threshold_mu / thresholds[1, b, y, x] + shot_off_prob = shot_noise_factor * threshold_mu / thresholds[0, b, y, x] + rand_on = rng_states[b, y, x] * (math.sin(curr_image_ts) + 1) / 2 + rand_off = rng_states[b, y, x] * (math.cos(curr_image_ts) + 1) / 2 + if rand_on > (1 - shot_on_prob): + pol = 1 + ts = curr_image_ts + log_state_at_xy += Cp + last_timestamp_at_xy = ts + {on_event_write} + if rand_off > (1 - shot_off_prob): + pol = -1 + ts = curr_image_ts + last_timestamp_at_xy = ts + log_state_at_xy -= Cn + {on_event_write} + + # noise leak-rate + deltaLeak = delta_t * leak_rate_micro_hz * Cp + log_state_at_xy -= deltaLeak + + if persistent: + timestamps[b, y, x] = last_timestamp_at_xy + log_states[b, y, x] = log_state_at_xy + prev_log_images[b, y, x] = log_sequence[y, x, end_f - 1] + + """ + + +def loop(runtime): + if runtime == "cuda": + return """ + b, y, x = cuda.grid(3) + if b < batch_size and y < height and x < width: + first_time = int(first_times[b]) + refractory_period = refractory_periods[b] + leak_rate_micro_hz = leak_rates[b] + shot_noise_micro_hz = shot_noise_rates[b] + threshold_mu = threshold_mus[b]""" + elif runtime == "cpu": + return """ + for b in range(batch_size): + refractory_period = refractory_periods[b] + leak_rate_micro_hz = leak_rates[b] + shot_noise_micro_hz = shot_noise_rates[b] + threshold_mu = threshold_mus[b] + first_time = int(first_times[b]) + for y in range(height): + for x in range(width):""" + else: + raise ValueError(f"unsupported runtime {runtime}") + + +def format_kernel_string(func_name="", params="", default_params="", runtime='cuda', + on_event_write="", documentation="", on_start=""): + loop_text = loop(runtime) + decorator = "cuda.jit()" if runtime == "cuda" else "jit(nopython=True)" + if "{runtime}" in on_event_write: + on_event_write = on_event_write.format(runtime=runtime) + return exec_string.format(func_name=func_name, params=params, default_params=default_params, loop=loop_text, + runtime=runtime, on_event_write=on_event_write, documentation=documentation, + on_start=on_start, decorator=decorator) + + +def format_kernel_strings(func_name="", params="", default_params="", runtimes=('cuda', "cpu"), + on_event_write="", documentation="", on_start=""): + return "\n".join(format_kernel_string(func_name=func_name, params=params, default_params=default_params, + runtime=runtime, on_event_write=on_event_write, + documentation=documentation, on_start=on_start) for runtime in runtimes) + + +exec(format_kernel_strings(func_name="count_events", params="counts", on_event_write="counts[b, y, x] += 1", + documentation="Counts num_events / pixel ")) + + +exec(format_kernel_strings( + func_name="fill_events", params="events, offsets", on_start="index = offsets[b, y, x]", + on_event_write="events[index, 0] = int(b); events[index, 1] = int(x); events[index, 2] = int(y);" + " events[index, 3] = pol; events[index, 4] = ts; index += 1", + documentation="Fills an event-buffer ")) + + +def fill_voxel_sequence(b, ts, x, y, pol, nbins, target_times, bin_index, voxel_grid, bilinear, split): + if split: + num_bins = nbins//2 + else: + num_bins = nbins + # fills voxel grid non linear cuts + while ts > target_times[b, bin_index + 1] and bin_index < len(voxel_grid)-1: + bin_index += 1 + + bin_index = min(bin_index, len(voxel_grid)-1) + t0 = target_times[b, bin_index] + tn = target_times[b, bin_index + 1] + dt = tn - t0 + ti_star = ((ts - t0) * num_bins / dt) - 0.5 + lbin = int(math.floor(ti_star)) + lbin = max(lbin, 0) + lbin = min(lbin, num_bins-1) + if split: + if pol > 0: + lbin = lbin + num_bins + pol = 1.0 + if bilinear: + rbin = min(lbin + 1, num_bins - 1) + left_value = max(0, 1 - abs(lbin - ti_star)) + right_value = 1 - left_value + + if 0 <= lbin < nbins: + voxel_grid[bin_index, b, lbin, y, x] += float(left_value * pol) + if 0 <= rbin < nbins: + voxel_grid[bin_index, b, rbin, y, x] += float(right_value * pol) + else: + if 0 <= lbin < nbins: + voxel_grid[bin_index, b, lbin, y, x] += pol + + +fill_voxel_sequence_cuda = cuda.jit(device=True)(fill_voxel_sequence) +fill_voxel_sequence_cpu = jit(nopython=True)(fill_voxel_sequence) + +exec(format_kernel_strings( + func_name="voxel_grid_sequence", params="voxel_grid, target_times", + default_params="bilinear=True, split=False", + on_event_write="fill_voxel_sequence_{runtime}(b, ts, x, y, pol, nbins, target_times, bin_index, voxel_grid, bilinear, split)", + on_start="nbins = voxel_grid.shape[2]; t0 = target_times[b, 0]; bin_index = 0", + documentation="Computes an event cube sequence")) diff --git a/sdk/modules/core_ml/python/pypkg/metavision_core_ml/video_to_event/gpu_simulator.py b/sdk/modules/core_ml/python/pypkg/metavision_core_ml/video_to_event/gpu_simulator.py new file mode 100644 index 000000000..3ca223ab9 --- /dev/null +++ b/sdk/modules/core_ml/python/pypkg/metavision_core_ml/video_to_event/gpu_simulator.py @@ -0,0 +1,425 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. +""" +More efficient reimplementation. +The main difference is cuda kernels & possibility to +directly stream the voxel grid. +""" +# pylint: disable=access-member-before-definition +# pylint: disable=undefined-variable + +import torch +import torch.nn as nn +import numpy as np + +from numba import cuda + +from .cutoff_kernels import _cuda_kernel_dynamic_moving_average, _cpu_kernel_dynamic_moving_average +from .events_kernels import _cuda_kernel_count_events, _cpu_kernel_count_events +from .events_kernels import _cpu_kernel_fill_events, _cuda_kernel_fill_events +from .events_kernels import _cuda_kernel_voxel_grid_sequence, _cpu_kernel_voxel_grid_sequence + + +class GPUEventSimulator(nn.Module): + """ + GPU Event Simulator of events from frames & timestamps. + + Implementation is based on the following publications: + + - Video to Events: Recycling Video Datasets for Event Cameras: Daniel Gehrig et al. + - V2E: From video frames to realistic DVS event camera streams: Tobi Delbruck et al. + + Args: + batch_size (int): number of video clips / batch + height (int): height + width (int): width + c_mu (float): threshold average + c_std (float): threshold standard deviation + refractory period (int): time before event can be triggered again + leak_rate_hz (float): frequency of reference voltage leakage + cutoff_hz (float): frequency for photodiode latency + shot_noise_hz (float): frequency of shot noise events + """ + + def __init__( + self, batch_size, height, width, c_mu=0.1, c_std=0.022, refractory_period=10, leak_rate_hz=0, cutoff_hz=0, + shot_noise_hz=0): + super().__init__() + shape1 = (batch_size, height, width) + shape2 = (2, batch_size, height, width) + self.register_buffer("log_states", torch.zeros(shape1, dtype=torch.float64)) + self.register_buffer("prev_log_images", torch.zeros(shape1, dtype=torch.float32)) + self.register_buffer("counts", torch.zeros(shape1, dtype=torch.int32)) + self.register_buffer("timestamps", torch.zeros(shape1, dtype=torch.float32)) + + thresholds = torch.randn(shape2, dtype=torch.float32) * c_std + c_mu + self.register_buffer("thresholds", thresholds) + self.register_buffer("prev_image_ts", torch.zeros((batch_size), dtype=torch.float32)) + self.register_buffer("filtering_prev_image_ts", torch.zeros((batch_size), dtype=torch.float32)) + self.thresholds.clamp_(0.01, 1.0) + + self.threshold_mu = c_mu + self.threshold_std = c_std + self.leak_rate_micro_hz = leak_rate_hz * 1e-6 + self.cutoff_hz = cutoff_hz + self.shot_noise_micro_hz = shot_noise_hz * 1e-6 + self.refractory_period = refractory_period + + self.register_buffer("prev_log_images_0", torch.zeros(shape1, dtype=torch.float32)) + self.register_buffer("prev_log_images_1", torch.zeros(shape1, dtype=torch.float32)) + + self.register_buffer("rng_states", torch.zeros(shape1, dtype=torch.float32)) + + # generate array of noise parameters + self.register_buffer("refractory_periods", torch.LongTensor([self.refractory_period] * batch_size)) + self.register_buffer("cutoff_rates", torch.tensor([self.cutoff_hz] * batch_size, dtype=torch.float32)) + self.register_buffer("leak_rates", torch.tensor([self.leak_rate_micro_hz] * batch_size, dtype=torch.float32)) + self.register_buffer("shot_rates", torch.tensor([self.shot_noise_micro_hz] * batch_size, dtype=torch.float32)) + self.register_buffer("threshold_mus", torch.tensor([c_mu] * batch_size, dtype=torch.float32)) + self.register_buffer("rgb_to_gray", torch.tensor([0.33, 0.33, 0.33], dtype=torch.float32)) + + def get_size(self): + return self.thresholds.shape[-2:] + + def randomize_broken_pixels(self, first_times, video_proba=1e-2, crazy_pixel_proba=5e-4, dead_pixel_proba=5e-3): + """ + Simulates dead & crazy pixels + + Args: + first_times: B video just started flags + video_proba: probability to simulate broken pixels + """ + height, width = self.thresholds.shape[-2:] + device = first_times.device + for i in range(len(first_times)): + if first_times[i].item(): + # crazy pixels + if np.random.rand() < video_proba: + mask = torch.rand(height, width).to(device) < crazy_pixel_proba + self.thresholds[:, i, mask] = 1e-3 + # dead pixels + if np.random.rand() < video_proba: + mask = torch.rand(height, width).to(device) < dead_pixel_proba + self.thresholds[:, i, mask] = 1e3 + + def randomize_thresholds(self, first_times, th_mu_min=0.05, th_mu_max=0.2, th_std_min=0.001, th_std_max=0.01): + """ + Re-Randomizes thresholds per video + + Args: + first_times: B video just started flags + th_mu_min: + th_mu_max: + th_std_min: + th_std_max: + """ + batch_size = len(first_times) + ft = first_times[:, None, None] + for i in range(batch_size): + if ft[i].item(): + mu = np.random.uniform(th_mu_min, th_mu_max) + std = np.random.uniform(th_std_min, th_std_max) + self.threshold_mus[i] = mu + self.thresholds[:, i].normal_(mean=mu, std=std) + self.thresholds[:, i].clamp_(0.01, 1.0) + + def randomize_cutoff(self, first_times, cutoff_min=0, cutoff_max=900): + """ + Randomizes the cutoff rates per video + + Args: + first_times: B video just started flags + cutoff_min: in hz + cutoff_max: in hz + """ + ft = first_times + cutoff_rates = torch.zeros_like(self.cutoff_rates).uniform_(cutoff_min, cutoff_max) + self.cutoff_rates = ft * cutoff_rates + (1 - ft) * self.cutoff_rates + + def randomize_leak(self, first_times, leak_min=0, leak_max=1): + """ + Randomizes the leak rates per video + + Args: + first_times: B video just started flags + leak_min: in hz + leak_max: in hz + """ + ft = first_times + rates = torch.zeros_like(self.leak_rates).uniform_(leak_min * 1e-6, leak_max * 1e-6) + self.leak_rates = ft * rates + (1 - ft) * self.leak_rates + + def randomize_shot(self, first_times, shot_min=0, shot_max=1): + """ + Randomizes the shot noise per video + + Args: + shot_min: in hz + shot_max: in hz + """ + ft = first_times + rates = torch.zeros_like(self.shot_rates).uniform_(shot_min * 1e-6, shot_max * 1e-6) + self.shot_rates = ft * rates + (1 - ft) * self.shot_rates + + def randomize_refractory_periods(self, first_times, ref_min=10, ref_max=1000): + """ + Randomizes the refractory period per video + + Args: + first_times: B video just started flags + ref_min: in microseconds + ref_max: in microseconds + """ + ft = first_times + rates = torch.zeros_like(self.shot_rates).uniform_(ref_min, ref_max) + self.refractory_periods = ft * rates + (1 - ft) * self.refractory_periods + + def forward(self): + raise NotImplementedError + + def _kernel_call(self, log_images, video_len, image_ts, first_times, cuda_kernel, cpu_kernel, args_list, *args, + reset_rng_states=True): + """ + generic functions to call simulation and feature computation kernels. + + Args: + log_images (Tensor): shape (H, W, total_num_frames) tensor containing the video frames + video_len (Tensor): shape (B,) len of each video in the batch. + images_ts (Tensor): shape (B, max(video_len)) timestamp associated with each frame. + first_times (Tensor): shape (B) whether the video is a new one or the continuation of one. + cuda_kernel (function): numba.cuda jitted function (defined in events_kernel.py) + cpu_kernel (function): numba jitted function (defined in events_kernel.py) + args_list (Tensor list): additional Tensor arguments that the kernel might take as argument. + *args: additional flags for the kernel + """ + device = log_images.device + height, width = log_images.shape[:2] + batch_size = len(video_len) + + if reset_rng_states: + self.rng_states.uniform_() + # prepare args + args_list = args_list + [ + log_images, video_len.cumsum(0), image_ts, first_times, self.rng_states, self.log_states, + self.prev_log_images, self.timestamps, self.thresholds, self.prev_image_ts, self.refractory_periods, + self.leak_rates, self.shot_rates, self.threshold_mus] + + if device.type == "cuda": + args_list = [v.to(device) for v in args_list] + cu_args = [cuda.as_cuda_array(v) for v in args_list] + list(args) + + block_dim = (1, 16, 16) + sizes = (batch_size, height, width) + grid_dim = tuple(int(np.ceil(a / b)) for a, b in zip(sizes, block_dim)) + + # kernel + cuda_kernel[grid_dim, block_dim](*cu_args) + else: + args_list = [v.numpy() for v in args_list] + list(args) + + # kernel + cpu_kernel(*args_list) + + @torch.no_grad() + def get_events(self, log_images, video_len, image_ts, first_times): + """ + Retrieves the AER event list in a pytorch array. + + Args: + log_images (Tensor): shape (H, W, total_num_frames) tensor containing the video frames + video_len (Tensor): shape (B,) len of each video in the batch. + images_ts (Tensor): shape (B, max(video_len)) timestamp associated with each frame. + first_times (Tensor): shape (B) whether the video is a new one or the continuation of one. + Returns: + events: N,5 in batch_index, x, y, polarity, timestamp (micro-seconds) + """ + height, width = log_images.shape[:2] + batch_size = len(video_len) + + self.counts[...] = 0 + + self._kernel_call(log_images, video_len, image_ts, first_times, _cuda_kernel_count_events, + _cpu_kernel_count_events, [self.counts], False, reset_rng_states=True) + # come-up with offset + event_counts = self.counts + cumsum = event_counts.view(-1).cumsum(dim=0) + total_num_events = cumsum[-1].item() + offsets = cumsum.view(batch_size, height, width) - event_counts + + events = torch.full((total_num_events, 5), fill_value=-10, device=cumsum.device, dtype=torch.int32) + + self._kernel_call(log_images, video_len, image_ts, first_times, _cuda_kernel_fill_events, + _cpu_kernel_fill_events, [events, offsets], True, reset_rng_states=False) + + # update values + self.prev_image_ts = image_ts[:, -1] + + return events + + @torch.no_grad() + def count_events(self, log_images, video_len, image_ts, first_times, reset=True, persistent=True): + """ + Estimates the number of events per pixel. + + Args: + log_images (Tensor): shape (H, W, total_num_frames) tensor containing the video frames + video_len (Tensor): shape (B,) len of each video in the batch. + images_ts (Tensor): shape (B, max(video_len)) timestamp associated with each frame. + first_times (Tensor): shape (B) whether the video is a new one or the continuation of one. + reset: do reset the count variable + Returns: + counts: B,H,W + """ + + if reset: + self.counts[...] = 0 + + self._kernel_call(log_images, video_len, image_ts, first_times, _cuda_kernel_count_events, + _cpu_kernel_count_events, [self.counts], persistent, reset_rng_states=True) + + # update values + self.prev_image_ts = image_ts[:, -1] + + return self.counts + + @torch.no_grad() + def event_volume(self, log_images, video_len, image_ts, first_times, nbins, mode='bilinear', split_channels=False): + """ + Computes a volume of discretized images formed after the events, without + storing the AER events themselves. We go from simulation directly to this + space-time quantized representation. You can obtain the event-volume of + [Unsupervised Event-based Learning of Optical Flow, Zhu et al. 2018] by + specifying the mode to "bilinear" or you can obtain a stack of histograms + if mode is set to "nearest". + + Args: + log_images (Tensor): shape (H, W, total_num_frames) tensor containing the video frames + video_len (Tensor): shape (B,) len of each video in the batch. + images_ts (Tensor): shape (B, max(video_len)) timestamp associated with each frame. + first_times (Tensor): shape (B) whether the video is a new one or the continuation of one. + nbins (int): number of time-bins for the voxel grid + mode (str): bilinear or nearest + split_channels: if True positive and negative events have a distinct channels instead of doing their + difference in a single channel. + """ + prev_times = self.prev_image_ts * (1 - first_times) + image_ts[:, 0] * first_times + end_times = image_ts[:, -1] + + target_timestamps = torch.cat((prev_times[:, None], end_times[:, None]), 1).long() + + return self.event_volume_sequence(log_images, video_len, image_ts, target_timestamps, + first_times, nbins, mode, split_channels).squeeze(0) + + @torch.no_grad() + def event_volume_sequence( + self, + log_images, + video_len, + image_ts, + target_timestamps, + first_times, + nbins, + mode='bilinear', + split_channels=False): + """ + Computes a volume of discretized images formed after the events, without + storing the AER events themselves. We go from simulation directly to this + space-time quantized representation. You can obtain the event-volume of + [Unsupervised Event-based Learning of Optical Flow, Zhu et al. 2018] by + specifying the mode to "bilinear" or you can obtain a stack of histograms + if mode is set to "nearest". + Here, we also receive a sequence of target timestamps to cut non uniformly the event volumes. + + Args: + log_images (Tensor): shape (H, W, total_num_frames) tensor containing the video frames + video_len (Tensor): shape (B,) len of each video in the batch. + images_ts (Tensor): shape (B, max(video_len)) timestamp associated with each frame. + first_times (Tensor): shape (B) whether the video is a new one or the continuation of one. + nbins (int): number of time-bins for the voxel grid + mode (str): bilinear or nearest + split_channels: if True positive and negative events have a distinct channels instead of doing their + difference in a single channel. + """ + height, width = log_images.shape[:2] + num_channels = nbins * 2 if split_channels else nbins + batch_size = len(video_len) + batch_times = target_timestamps.shape[1] - 1 + + device = log_images.device + voxel_grid = torch.zeros( + (batch_times, batch_size, num_channels, height, width), + dtype=torch.float32, device=device) + + # arbitrary voxel start times and durations + voxel_start_times = self.prev_image_ts * (1 - first_times) + image_ts[:, 0] * first_times + voxel_durations = image_ts[:, -1] - voxel_start_times + + # prepare args + args = [voxel_grid, target_timestamps] + + self._kernel_call( + log_images, video_len, image_ts, first_times, _cuda_kernel_voxel_grid_sequence, + _cpu_kernel_voxel_grid_sequence, args, True, mode == 'bilinear', split_channels, reset_rng_states=True) + + self.prev_image_ts = image_ts[:, -1] + + voxel_grid = voxel_grid.view(batch_times, batch_size, num_channels, height, width) + return voxel_grid + + @torch.no_grad() + def log_images(self, u8imgs, eps=1e-7): + """ + Converts byte images to log + + Args: + u8imgs (torch.Tensor): B,C,H,W,T byte images + eps (float): epsilon factor + """ + return torch.log(u8imgs.float() / 255.0 + eps) + + @torch.no_grad() + def dynamic_moving_average(self, images, num_frames, timestamps, first_times, eps=1e-7): + """ + + Converts byte images to log and + performs a pass-band motion blur of incoming images. + This simulates the latency of the photodiode w.r.t to incoming + light dynamic. + + Args: + images (torch.Tensor): H,W,T byte or float images in the 0 to 255 range + num_frames (torch.Tensor): shape (B,) len of each video in the batch. + timestamps (torch.Tensor): B,T timestamps + first_times (torch.Tensor): B flags + eps (float): epsilon factor + """ + fl_images = images.float() + + if self.cutoff_rates.sum() == 0: # this broke the sample + return self.log_images(images, eps=eps) + + height, width = images.shape[:2] + batch_size = len(num_frames) + + args = [fl_images, num_frames.cumsum(0), self.prev_log_images_0, self.prev_log_images_1, + self.filtering_prev_image_ts, timestamps, first_times, self.cutoff_rates] + + if images.device.type == "cuda": + cu_args = [cuda.as_cuda_array(v) for v in args] + block_dim = (1, 16, 16) + sizes = (batch_size, height, width) + grid_dim = tuple(int(np.ceil(a / b)) for a, b in zip(sizes, block_dim)) + _cuda_kernel_dynamic_moving_average[grid_dim, block_dim](*cu_args, eps) + else: + args = [v.numpy() for v in args] + _cpu_kernel_dynamic_moving_average(*args, eps) + + self.filtering_prev_image_ts = timestamps[:, -1] + + return fl_images diff --git a/sdk/modules/core_ml/python/pypkg/metavision_core_ml/video_to_event/simu_events_iterator.py b/sdk/modules/core_ml/python/pypkg/metavision_core_ml/video_to_event/simu_events_iterator.py new file mode 100644 index 000000000..9842f1a9d --- /dev/null +++ b/sdk/modules/core_ml/python/pypkg/metavision_core_ml/video_to_event/simu_events_iterator.py @@ -0,0 +1,175 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. + +""" +Simple Iterator built around the Metavision Reader classes. +""" + +import numpy as np +from metavision_sdk_base import EventCD +from metavision_core_ml.video_to_event.simulator import EventSimulator +from metavision_core_ml.data.video_stream import TimedVideoStream +from metavision_sdk_core import SharedCdEventsBufferProducer as EventsBufferProducer +from collections import deque +import skvideo.io +import cv2 + + +class SimulatedEventsIterator(object): + """ + SimulatedEventsIterator is a small convenience class to generate an iterator of events from any video + + Attributes: + reader : class handling the video (iterator of the frames and their timestamps). + delta_t (int): Duration of served event slice in us. + max_duration (int): If not None, maximal duration of the iteration in us. + end_ts (int): If max_duration is not None, last time_stamp to consider. + relative_timestamps (boolean): Whether the timestamps of served events are relative to the current + reader timestamp, or since the beginning of the recording. + + Args: + input_path (str): Path to the file to read. + start_ts (int): First timestamp to consider (in us). + mode (string): Load by timeslice or number of events. Either "delta_t" or "n_events" + delta_t (int): Duration of served event slice in us. + n_events (int): Number of events in the timeslice. + max_duration (int): If not None, maximal duration of the iteration in us. + relative_timestamps (boolean): Whether the timestamps of served events are relative to the current + reader timestamp, or since the beginning of the recording. + Cp (float): mean for ON threshold + Cn (float): mean for OFF threshold + refractory_period (float): min time between 2 events / pixel + sigma_threshold (float): standard deviation for threshold array + cutoff_hz (float): cutoff frequency for photodiode latency simulation + leak_rate_hz (float): frequency of reference value leakage + shot_noise_rate_hz (float): frequency for shot noise events + override_fps (int): override fps of the input video. + + Examples: + >>> for ev in SimulatedEventsIterator("beautiful_record.mp4", delta_t=1000000, max_duration=1e6*60): + >>> print("Rate : {:.2f}Mev/s".format(ev.size * 1e-6)) + """ + + def __init__(self, input_path, start_ts=0, mode="delta_t", delta_t=10000, n_events=10000, max_duration=None, + relative_timestamps=False, height=-1, width=-1, Cp=0.11, Cn=0.1, refractory_period=1e-3, + sigma_threshold=0.0, cutoff_hz=0, leak_rate_hz=0, shot_noise_rate_hz=0, override_fps=0): + + # Build simulator + # initialise a buffer of events + # Read metadata from videos + self.mode = mode + self.path = input_path + self.relative_timestamps = relative_timestamps + self.height, self.width = height, width + + # Time attributes + self.start_ts = start_ts + self.delta_t = delta_t + self.n_events = n_events + self.current_time = start_ts + self.override_fps = override_fps + + # Metadata + metadata = skvideo.io.ffprobe(input_path) + self.num_frames = int(metadata["video"]["@nb_frames"]) + self.original_height, self.original_width = int(metadata["video"]["@height"]), int(metadata["video"]["@width"]) + self.freq = eval(metadata["video"]["@avg_frame_rate"]) * 1e-6 + self.length = float(metadata["video"]['@duration']) * 1e6 + + if max_duration is None: + self.max_frames = 0 + else: + self.max_frames = int(max_duration * self.freq) + + if height is None or height < 0: + self.height = self.original_height + if width is None or width < 0: + self.width = self.original_width + + # Simulator parameters + self.Cp = Cp + self.Cn = Cn + self.refractory_period = refractory_period + self.sigma_threshold = sigma_threshold + self.cutoff_hz = cutoff_hz + self.leak_rate_hz = leak_rate_hz + self.shot_noise_rate_hz = shot_noise_rate_hz + + # Initialize Simulator, video frame iterator and buffer + self._initialize() + self.end_ts = self.reader.duration_s * 1e6 + + def _initialize(self): + # Initializes Event buffer + if self.mode == "delta_t": + self.buffer_producer = EventsBufferProducer(self._process_batch, event_count=0, time_slice_us=self.delta_t) + else: + self.buffer_producer = EventsBufferProducer( + self._process_batch, event_count=self.n_events, time_slice_us=0) + self._event_buffer = deque() + + # Initializes Video iterator + start_frame = int(self.start_ts * self.freq) + self.reader = TimedVideoStream( + self.path, self.height, self.width, start_frame=start_frame, max_frames=self.max_frames, rgb=False, + override_fps=self.override_fps) + # Initializes Simulator + self.simu = EventSimulator(self.height, self.width, Cp=self.Cp, Cn=self.Cn, + refractory_period=self.refractory_period, sigma_threshold=self.sigma_threshold, + cutoff_hz=self.cutoff_hz, leak_rate_hz=self.leak_rate_hz, + shot_noise_rate_hz=self.shot_noise_rate_hz) + self.simu.last_event_timestamp[...] = self.start_ts + + def get_size(self): + """Function returning the size of the imager which produced the events. + + Returns: + Tuple of int (height, width) which might be (None, None)""" + return int(self.original_height), int(self.original_width) + + def __repr__(self): + string = "SimulatedEventsIterator({})\n".format(self.path) + string += "delta_t {} us\n".format(self.delta_t) + string += "starts_ts {} us end_ts {}".format(self.start_ts, self.end_ts) + return string + + def __iter__(self): + # reinitializes the simulator at start_ts + self._initialize() + self.current_time = self.start_ts + self.delta_t + previous_time = self.start_ts + for img, ts in self.reader: + total = self.simu.image_callback(img, ts) + if (self.mode == 'n_events' and total < self.n_events) or ( + self.mode == 'delta_t' and ts < self.current_time): + continue + events = self.simu.get_events() + self.simu.flush_events() + self.buffer_producer.process_events(events) + + while len(self._event_buffer) > 0: + self.current_time += self.delta_t + current_time, output = self._event_buffer.popleft() + # If there are no events during delta_t, an empty buffer is yielded + while current_time - previous_time > self.delta_t and self.mode == 'delta_t': + yield np.empty(0, dtype=EventCD) + previous_time += self.delta_t + if self.relative_timestamps: + output['t'] -= previous_time + previous_time = current_time + yield output + + def _process_batch(self, ts, batch): + self._event_buffer.append((ts, batch)) + + def __del__(self): + if hasattr(self, "reader"): + del self.reader + if hasattr(self, "simu"): + self.simu.__del__() diff --git a/sdk/modules/core_ml/python/pypkg/metavision_core_ml/video_to_event/simulator.py b/sdk/modules/core_ml/python/pypkg/metavision_core_ml/video_to_event/simulator.py new file mode 100644 index 000000000..4c0eb7ac4 --- /dev/null +++ b/sdk/modules/core_ml/python/pypkg/metavision_core_ml/video_to_event/simulator.py @@ -0,0 +1,381 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. +""" +EventSimulator: Load a .mp4 video and start streaming events +""" + +import numpy as np +from metavision_core_ml.video_to_event.single_image_make_events_cpu import EventCPU + + +def eps_log(x, eps=1e-5): + """ + Takes Log of image + + Args: + x: uint8 gray frame + """ + if x.dtype is not np.float32: + x = x.astype(np.float32) + return np.log(eps + x / 255.0) + + +class EventSimulator(object): + """Event Simulator + + Implementation is based on the following publications: + + - Video to Events: Recycling Video Datasets for Event Cameras: Daniel Gehrig et al. + - V2E: From video frames to realistic DVS event camera streams: Tobi Delbruck et al. + + This object allows to accumulate events by feeding it with images and (increasing) timestamps. + The events are returned of type EventCD (see definition in event_io/dat_tools or metavision_sdk_base) + + Args: + Cp (float): mean for ON threshold + Cn (float): mean for OFF threshold + refractory_period (float): min time between 2 events / pixel + sigma_threshold (float): standard deviation for threshold array + cutoff_hz (float): cutoff frequency for photodiode latency simulation + leak_rate_hz (float): frequency of reference value leakage + shot_noise_rate_hz (float): frequency for shot noise events + """ + + def __init__( + self, height, width, Cp, Cn, refractory_period, sigma_threshold=0.0, cutoff_hz=0, leak_rate_hz=0, + shot_noise_rate_hz=0): + self.Cp = Cp + self.Cn = Cn + self.refractory_period = refractory_period + self.ref_values = None + self.last_event_timestamp = None + self.events = [] + self.last_img = None + self.last_img_ts = 0. + self.shot_noise_rate_hz = shot_noise_rate_hz + self.cutoff_hz = cutoff_hz + self.leak_rate_hz = leak_rate_hz + self.sigma_threshold = sigma_threshold + self.height = height + self.width = width + self.ref_values = np.zeros((height, width), dtype=np.float64) + self.last_img = np.zeros_like(self.ref_values) + self.last_event_timestamp = np.zeros((height, width), dtype=np.int32) + self.first_pass = True + + # Threshold Mismatches + self.Cps = self.sigma_threshold * np.random.randn(height, width).astype(np.float32) + self.Cp + if (self.Cps < 0.01).any() or (self.Cps > 1).any(): + print( + f"WARNING: EventSimulator: Some Cp are out of range: min: {self.Cps.min()} max: {self.Cps.max()}. Clipping to range [0.01;1]") + self.Cps = np.clip(self.Cps, 0.01, 1) + self.Cns = self.sigma_threshold * np.random.randn(height, width).astype(np.float32) + self.Cn + if (self.Cns < 0.01).any() or (self.Cns > 1).any(): + print( + f"WARNING: EventSimulator: Some Cn are out of range: min: {self.Cns.min()} max: {self.Cns.max()}. Clipping to range [0.01;1]") + self.Cns = np.clip(self.Cns, 0.01, 1) + + self.lpLogFrame0 = None + self.lpLogFrame1 = None + + self.event_maker = EventCPU() + + def get_mean_Cp(self): + return self.Cp + + def get_mean_Cn(self): + return self.Cn + + def get_max_nb_events(self): + return self.event_maker.get_max_nb_events() + + def set_config(self, config='noisy'): + """Set configuration + + Args: + config (str): name for configuration + """ + if config == 'clean': + self.Cp = 0.2 + self.Cn = 0.2 + self.sigma_threshold = 0.001 + self.cutoff_hz = 0 + self.leak_rate_hz = 0 + self.shot_noise_rate_hz = 0 + elif config == 'noisy': + self.Cp = 0.2 + self.Cn = 0.2 + self.sigma_threshold = 0.05 + self.cutoff_hz = 70 + self.leak_rate_hz = 0.1 + self.shot_noise_rate_hz = 10 + elif config == 'intermediate': + self.Cp = 0.2 + self.Cn = 0.2 + self.sigma_threshold = 0.01 + self.cutoff_hz = 10 + self.leak_rate_hz = 0.01 + self.shot_noise_rate_hz = 0.01 + + self.Cps = self.sigma_threshold * np.random.randn(self.height, self.width).astype(np.float32) + self.Cp + self.Cps = np.clip(self.Cps, 0.01, 1) + self.Cns = self.sigma_threshold * np.random.randn(self.height, self.width).astype(np.float32) + self.Cn + self.Cns = np.clip(self.Cns, 0.01, 1) + + def reset(self): + """ + Resets buffers + """ + self.first_pass = True + if self.last_img is not None: + self.last_img[...] = 0 + self.last_event_timestamp[...] = 0 + self.ref_values[...] = 0 + self.flush_events() + self.lpLogFrame0 = None + self.lpLogFrame1 = None + self.last_img = None + self.last_img_ts = 0. + + def get_size(self): + """Function returning the size of the imager which produced the events. + + Returns: + Tuple of int (height, width) which might be (None, None)""" + return self.height, self.width + + def get_events(self): + """Grab events + """ + return self.event_maker.get_events() + + def flush_events(self): + """Erase current events + """ + self.event_maker.flush_events() + + def log_image_callback(self, log_img, img_ts): + """ + For debugging, log is done outside + """ + if self.first_pass: + self.ref_values[...] = log_img + self.last_img = log_img.copy() + self.first_pass = False + num = 0 + self.last_img_ts = img_ts + else: + last_img_ts = self.last_img_ts + delta_t = img_ts - last_img_ts + + num, num_iters = self.event_maker.accumulate(self.ref_values, + self.last_img, + self.last_event_timestamp, + log_img, + last_img_ts, + delta_t, + self.Cps, + self.Cns, + self.refractory_period) + + if self.leak_rate_hz > 0: + self.leak_events(delta_t) + if num_iters > 0 and self.shot_noise_rate_hz > 0: + num = self.shot_noise_events(self.event_maker.event_buffer, img_ts, num, num_iters) + + self.event_maker.num = num + + self.last_img = log_img + self.last_img_ts = img_ts + return num + + def image_callback(self, img, img_ts): + """ + Accumulates Events into internal buffer + + Args: + img (np.ndarray): uint8 gray image of shape (H,W) + img_ts (int): timestamp in micro-seconds. + + Returns: + num: current total number of events + """ + assert img.shape == (self.height, self.width) + if self.first_pass: + log_img = self.dynamic_moving_average(img, img_ts) + self.ref_values[...] = log_img + self.last_img = log_img + self.first_pass = False + num = 0 + self.last_img_ts = img_ts + else: + log_img = self.dynamic_moving_average(img, img_ts) + + last_img_ts = self.last_img_ts + delta_t = img_ts - last_img_ts + + num, num_iters = self.event_maker.accumulate(self.ref_values, + self.last_img, + self.last_event_timestamp, + log_img, + last_img_ts, + delta_t, + self.Cps, + self.Cns, + self.refractory_period) + + if self.leak_rate_hz > 0: + self.leak_events(delta_t) + if num_iters > 0 and self.shot_noise_rate_hz > 0: + num = self.shot_noise_events(self.event_maker.event_buffer, img_ts, num, num_iters) + + self.event_maker.num = num + + self.last_img = log_img + self.last_img_ts = img_ts + return num + + def leak_events(self, delta_t): + """ + Leak events: switch in diff change amp leaks at some rate + equivalent to some hz of ON events. + Actual leak rate depends on threshold for each pixel. + We want nominal rate leak_rate_Hz, so + R_l=(dI/dt)/Theta_on, so + R_l*Theta_on=dI/dt, so + dI=R_l*Theta_on*dt + + Args: + delta_t (int): time between 2 images (us) + """ + if self.leak_rate_hz > 0: + delta_t_s = (delta_t * 1e-6) + deltaLeak = delta_t_s * self.leak_rate_hz * self.Cps # scalars + self.ref_values -= deltaLeak # subtract so it increases ON events + + def shot_noise_events(self, event_buffer, ts, num_events, num_iters): + """ + NOISE: add temporal noise here by + simple Poisson process that has a base noise rate + self.shot_noise_rate_hz. + If there is such noise event, + then we output event from each such pixel + + the shot noise rate varies with intensity: + for lowest intensity the rate rises to parameter. + the noise is reduced by factor + SHOT_NOISE_INTEN_FACTOR for brightest intensities + + Args: + ts (int): timestamp + num_events (int): current number of events + num_iters (int): max events per pixel since last round + """ + if self.shot_noise_rate_hz > 0: + SHOT_NOISE_INTEN_FACTOR = 0.25 + + deltaTime = (ts - self.last_img_ts) * 1e-6 + + shotNoiseFactor = ( + (self.shot_noise_rate_hz / 2) * deltaTime / num_iters) * \ + ((SHOT_NOISE_INTEN_FACTOR - 1) * self.inten01 + 1) + # =1 for inten=0 and SHOT_NOISE_INTEN_FACTOR for inten=1 + + rand01 = np.random.uniform( + size=self.ref_values.shape) # draw samples + + # probability for each pixel is + # dt*rate*nom_thres/actual_thres. + # That way, the smaller the threshold, + # the larger the rate + shotOnProbThisSample = shotNoiseFactor * np.divide( + self.Cp, self.Cps) + # array with True where ON noise event + shotOnCord = rand01 > (1 - shotOnProbThisSample) + + shotOffProbThisSample = shotNoiseFactor * np.divide( + self.Cp, self.Cps) + # array with True where OFF noise event + shotOffCord = rand01 < shotOffProbThisSample + + y1, x1 = np.where(shotOffCord) + + start, end = num_events, num_events + len(y1) + if end >= len(event_buffer) - 1: + return end + event_buffer[start:end]['y'] = y1 + event_buffer[start:end]['x'] = x1 + event_buffer[start:end]['p'] = 0 + event_buffer[start:end]['t'] = ts + + num_events = end + + y2, x2 = np.where(shotOnCord) + + start, end = end, end + len(y2) + + event_buffer[start:end]['y'] = y2 + event_buffer[start:end]['x'] = x2 + event_buffer[start:end]['p'] = 1 + event_buffer[start:end]['t'] = ts + + num_events = end + + self.ref_values[shotOnCord] += shotOnCord[shotOnCord] * self.Cps[shotOnCord] + self.ref_values[shotOffCord] -= shotOffCord[shotOffCord] * self.Cns[shotOffCord] + + return num_events + + def dynamic_moving_average(self, new_frame, ts, eps=1e-7): + """ + Apply nonlinear lowpass filter here. + Filter is 2nd order lowpass IIR + that uses two internal state variables + to store stages of cascaded first order RC filters. + Time constant of the filter is proportional to + the intensity value (with offset to deal with DN=0) + + Args: + new_frame (np.ndarray): new image + ts (int): new timestamp (us) + """ + new_frame = new_frame.astype(np.float32) + + deltaTimeUs = (ts - self.last_img_ts) + deltaTime = deltaTimeUs * 1e-6 + logNewFrame = eps_log(new_frame, eps) + + if self.lpLogFrame0 is None: + self.lpLogFrame0 = logNewFrame.copy() + self.lpLogFrame1 = logNewFrame.copy() + + inten01 = None + if self.cutoff_hz > 0 or self.shot_noise_rate_hz > 0: # will use later + # make sure we get no zero time constants + # limit max time constant to ~1/10 of white intensity level + self.inten01 = (np.array(new_frame, float) + 20) / 275 + if self.cutoff_hz <= 0: + eps = 1 + else: + tau = (1 / (np.pi * 2 * self.cutoff_hz)) + # make the update proportional to the local intensity + eps = self.inten01 * (deltaTime / tau) + eps[eps[:] > 1] = 1 # keep filter stable + + # first internal state is updated + self.lpLogFrame0 = (1 - eps) * self.lpLogFrame0 + eps * logNewFrame + # then 2nd internal state (output) is updated from first + self.lpLogFrame1 = (1 - eps) * self.lpLogFrame1 + eps * self.lpLogFrame0 + return self.lpLogFrame1 + + def __del__(self): + del self.event_maker + del self.ref_values + del self.last_img + del self.last_event_timestamp diff --git a/sdk/modules/core_ml/python/pypkg/metavision_core_ml/video_to_event/single_image_make_events_cpu.py b/sdk/modules/core_ml/python/pypkg/metavision_core_ml/video_to_event/single_image_make_events_cpu.py new file mode 100644 index 000000000..0402b9023 --- /dev/null +++ b/sdk/modules/core_ml/python/pypkg/metavision_core_ml/video_to_event/single_image_make_events_cpu.py @@ -0,0 +1,119 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. + +from __future__ import absolute_import + +import numpy as np +from numba import prange +from numba import jit + +from metavision_sdk_base import EventCD + + +@jit(nopython=True) +def make_events_cpu(events, ref_values, last_img, last_event_timestamp, log_img, last_img_ts, delta_t, Cps, Cns, + refractory_period): + """ + produce events into AER format + + Args: + events (np.ndarray): array in format EventCD + ref_values (np.ndarray): current log intensity state / pixel (H,W) + last_img (np.ndarray): last image log intensity (H,W) + last_event_timestamp (int): last image timestamp + log_img (np.ndarray): current log intensity image (H,W) + last_img_ts (np.ndarray): last timestamps emitted / pixel (2,H,W) + delta_t (int): current duration (us) since last image. + Cps (np.ndarray): array of ON thresholds + Cns (np.ndarray): array of OFF thresholds + refractory_period (int): minimum time between 2 events / pixel + """ + height, width = log_img.shape + num = 0 + num_iters = 0 + for y in prange(height): + for x in prange(width): + itdt = log_img[y, x] + it = last_img[y, x] + + prev_ref_val = ref_values[y, x] + pol = 1. if itdt >= it else -1. + p = 1 if itdt >= it else 0 + + # Simulate Thresholds Mismatched + Cp = Cps[y, x] + Cn = Cns[y, x] + C = Cp if pol > 0 else Cn + + if abs(itdt - prev_ref_val) > C: + current_ref_val = prev_ref_val + num_events = 0 + all_crossing = False + + while not all_crossing: + current_ref_val += pol * C + num_events += 1 + if (pol > 0 and current_ref_val > it and current_ref_val <= itdt) or ( + pol < 0 and current_ref_val < it and current_ref_val >= itdt): + # I can add events + edt = (current_ref_val - it) * delta_t / (itdt - it) + t = last_img_ts + edt + last_stamp_at_xy = last_event_timestamp[y, x] + dt = t - last_stamp_at_xy + if dt >= refractory_period or last_stamp_at_xy == 0: + # we update reference value only if we emit an event + events[num]['x'] = x + events[num]['y'] = y + events[num]['p'] = p + events[num]['t'] = t + last_event_timestamp[y, x] = t + num = min(len(events) - 1, num + 1) + + ref_values[y, x] = current_ref_val + else: + all_crossing = True + + num_iters = max(num_iters, num_events) + + return num, num_iters + + +class EventCPU(object): + def __init__(self): + self.max_nb_events = int(1e8) + self.event_buffer = np.zeros((self.max_nb_events,), dtype=EventCD) + self.num = 0 + self.num_iters = 0 + + def accumulate( + self, ref_values, last_img, last_event_timestamp, log_img, last_img_ts, delta_t, Cps, Cns, + refractory_period): + num, num_iters = make_events_cpu( + self.event_buffer[self.num:], + ref_values, last_img, last_event_timestamp, log_img, last_img_ts, delta_t, Cps, Cns, refractory_period) + self.num += num + assert self.num < self.max_nb_events - 1, f"Overflow: reached maximum number of events: {self.num}" + return self.num, num_iters + + def get_max_nb_events(self): + return self.max_nb_events + + def get_events(self): + evs = self.event_buffer[:self.num] + idx = np.argsort(evs['t']) + evs = evs[idx].copy() + return evs + + def flush_events(self): + self.num = 0 + self.num_iters = 0 + self.event_buffer.fill(0) + + def __del__(self): + del self.event_buffer diff --git a/sdk/modules/core_ml/python/pypkg/metavision_core_ml/video_to_event/video_stream_dataset.py b/sdk/modules/core_ml/python/pypkg/metavision_core_ml/video_to_event/video_stream_dataset.py new file mode 100644 index 000000000..1cbce4ffd --- /dev/null +++ b/sdk/modules/core_ml/python/pypkg/metavision_core_ml/video_to_event/video_stream_dataset.py @@ -0,0 +1,168 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. +""" +Image stream data loader +""" +import torch +import numpy as np + +from metavision_core_ml.data.video_stream import TimedVideoStream +from metavision_core_ml.data.image_planar_motion_stream import PlanarMotionStream +from metavision_core_ml.data.stream_dataloader import StreamDataset, StreamDataLoader +from metavision_core_ml.data.scheduling import build_metadata +from metavision_core_ml.utils.files import is_image, is_video + + +class VideoDatasetIterator(object): + """ + Dataset Iterator streaming images and timestamps + + Args: + metadata (object): path to picture or video + height (int): height of input images / video clip + width (int): width of input images / video clip + rgb (bool): stream rgb videos + mode (str): mode of batch sampling 'frames','delta_t','random' + min_tbins (int): minimum number of frames per batch step + max_tbins (int): maximum number of frames per batch step + min_dt (int): minimum duration of frames per batch step + max_dt (int): maximum duration of frames per batch step + batch_times (int): number of timesteps of training sequences + """ + + def __init__(self, metadata, height, width, rgb, mode='frames', min_tbins=3, max_tbins=10, + min_dt=3000, max_dt=50000, batch_times=1): + if is_video(metadata.path): + self.image_stream = TimedVideoStream(metadata.path, height, width, rgb=rgb, + start_frame=metadata.start_frame, max_frames=len(metadata)) + elif is_image(metadata.path): + self.image_stream = PlanarMotionStream(metadata.path, height, width, len(metadata), rgb=rgb) + self.height = height + self.width = width + self.rgb = rgb + self.metadata = metadata + self.mode = ['frames', 'delta_t'][np.random.randint(0, 2)] if mode == 'random' else mode + self.num_tbins = np.random.randint(min_tbins, max_tbins) + self.delta_t = np.random.randint(min_dt, max_dt) + self.batch_times = batch_times + + def __iter__(self): + out = [] + times = [] + target_indices = [] + first_time = True + last_time = None + n_times_dt = 0 + for i, (img, ts) in enumerate(self.image_stream): + if img.ndim == 3: + img = np.moveaxis(img, 2, 0) + else: + img = img[None] + + out.append(img[None, ..., None]) # B,C,H,W,T or B,H,W,T + times.append(ts) + if last_time is None: + last_time = ts + dt = times[-1] - last_time + if self.mode == 'delta_t' and dt >= self.delta_t: + n_times_dt += 1 + last_time = times[-1] + target_indices.append(len(out)-1) + elif self.mode == 'frames' and len(out) % self.num_tbins == 0: + target_indices.append(len(out)-1) + + if (self.mode == 'frames' and len(out) == (self.batch_times*self.num_tbins)) or ( + self.mode == 'delta_t' and n_times_dt >= self.batch_times): + + sequence = torch.from_numpy(np.concatenate(out, axis=-1)) + timestamps = torch.FloatTensor(times)[None, :] # B,T + assert target_indices[-1] == len(out)-1 + assert len(target_indices) == self.batch_times + target_indices = torch.FloatTensor(target_indices)[None, :] # B,T + yield sequence, timestamps, target_indices, first_time + out = [] + times = [] + target_indices = [] + first_time = False + n_times_dt = 0 + + if len(out) > 2: + sequence = torch.from_numpy(np.concatenate(out, axis=-1)) + timestamps = torch.FloatTensor(times)[None, :] # B,T + target_indices.append(len(out)-1) + + if len(target_indices) < self.batch_times: + target_indices = target_indices + [target_indices[-1]]*(self.batch_times-len(target_indices)) + + assert len(target_indices) == self.batch_times + target_indices = torch.FloatTensor(target_indices)[None, :] # B,T + yield sequence, timestamps, target_indices, first_time + + +def pad_collate_fn(data_list): + """ + Here we pad with last image/ timestamp to get a contiguous batch + """ + images, timestamps, target_indices, first_times = zip(*data_list) + video_len = [item.shape[-1] for item in images] + max_len = max([item.shape[-1] for item in images]) + b = len(images) + c, h, w = images[0].shape[1:-1] + out_images = torch.zeros((c, h, w, sum(video_len)), dtype=images[0].dtype) + out_timestamps = torch.zeros((b, max_len), dtype=timestamps[0].dtype) + target_indices = torch.cat(target_indices).int() + current_ind = 0 + for i in range(b): + video = images[i] + ilen = video.shape[-1] + out_images[..., current_ind: current_ind + ilen] = video + current_ind += ilen + out_timestamps[i, :ilen] = timestamps[i] + out_timestamps[i, ilen:] = timestamps[i][:, ilen - 1:].unsqueeze(1) + + first_times = torch.FloatTensor(first_times) + return {'images': out_images, + 'timestamps': out_timestamps, + 'target_indices': target_indices, + 'first_times': first_times, + 'video_len': torch.tensor(video_len, dtype=torch.int32)} + + +def make_video_dataset( + path, num_workers, batch_size, height, width, min_length, max_length, mode='frames', min_frames=5, + max_frames=30, min_delta_t=5000, max_delta_t=50000, rgb=False, seed=None, batch_times=1): + """ + Makes a video / moving picture dataset. + + Args: + path (str): folder to dataset + batch_size (int): number of video clips / batch + height (int): height + width (int): width + min_length (int): min length of video + max_length (int): max length of video + mode (str): 'frames', 'delta_t', or 'random' + min_frames (int): minimum number of frames per batch + max_frames (int): maximum number of frames per batch + min_delta_t (int): in microseconds, minimum duration per batch + max_delta_t (int): in microseconds, maximum duration per batch + rgb (bool): retrieve frames in rgb + seed (int): seed for randomness + batch_times (int): number of time steps in training sequence + """ + metadatas = build_metadata(path, min_length, max_length) + print('scheduled streams: ', len(metadatas)) + + def iterator_fun(metadata): + return VideoDatasetIterator( + metadata, height, width, rgb=rgb, mode=mode, min_tbins=min_frames, max_tbins=max_frames, + min_dt=min_delta_t, max_dt=max_delta_t, batch_times=batch_times) + dataset = StreamDataset(metadatas, iterator_fun, batch_size, "data", None, seed) + dataloader = StreamDataLoader(dataset, num_workers, pad_collate_fn) + return dataloader diff --git a/sdk/modules/core_ml/python/samples/CMakeLists.txt b/sdk/modules/core_ml/python/samples/CMakeLists.txt new file mode 100644 index 000000000..74a6fb244 --- /dev/null +++ b/sdk/modules/core_ml/python/samples/CMakeLists.txt @@ -0,0 +1,14 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. + +add_subdirectory(train_event_to_video) +add_subdirectory(demo_event_to_video) +add_subdirectory(viz_data_event_to_video) +add_subdirectory(viz_video_to_event_simulator) +add_subdirectory(viz_video_to_event_gpu_simulator) diff --git a/sdk/modules/core_ml/python/samples/demo_event_to_video/CMakeLists.txt b/sdk/modules/core_ml/python/samples/demo_event_to_video/CMakeLists.txt new file mode 100644 index 000000000..c066ff2a6 --- /dev/null +++ b/sdk/modules/core_ml/python/samples/demo_event_to_video/CMakeLists.txt @@ -0,0 +1,13 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. + +install(FILES demo_event_to_video.py + DESTINATION share/metavision/sdk/core_ml/python_samples/demo_event_to_video + COMPONENT metavision-sdk-core-ml-python-samples) + diff --git a/sdk/modules/core_ml/python/samples/demo_event_to_video/demo_event_to_video.py b/sdk/modules/core_ml/python/samples/demo_event_to_video/demo_event_to_video.py new file mode 100644 index 000000000..9dd69bd68 --- /dev/null +++ b/sdk/modules/core_ml/python/samples/demo_event_to_video/demo_event_to_video.py @@ -0,0 +1,143 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. +""" +E2V DEMO Script + +Copyright: (c) 2021 Prophesee +""" +import numpy as np +import argparse +import torch +import torch.nn.functional as F +from metavision_sdk_base import EventCD +from metavision_core_ml.event_to_video.lightning_model import EventToVideoLightningModel +from metavision_core_ml.preprocessing.event_to_tensor_torch import event_cd_to_torch, event_volume +from metavision_core_ml.utils.torch_ops import normalize_tiles, viz_flow +from metavision_core_ml.utils.show_or_write import ShowWrite +from metavision_core.event_io.events_iterator import EventsIterator +from metavision_core.event_io.adaptive_rate_events_iterator import AdaptiveRateEventsIterator + + +def parse_args(argv=None): + parser = argparse.ArgumentParser() + parser.add_argument('path', type=str, default='', help='path of events') + parser.add_argument('checkpoint', type=str, default='', help='checkpoint to evaluate') + parser.add_argument('--start_ts', type=int, default=0, help='start timestamp') + parser.add_argument('--mode', type=str, default='mixed', + choices=['n_events', 'delta_t', 'mixed', 'adaptive'], help='how to cut events') + + parser.add_argument('--n_events', type=int, default=30000, help='accumulate by N events') + parser.add_argument('--delta_t', type=int, default=30000, help='accumulate by delta_t') + parser.add_argument('--video_path', type=str, default='', help='path to video') + parser.add_argument('--height_width', nargs=2, default=None, type=int, help='resolution') + parser.add_argument('--max_duration', type=int, default=-1, help='run for this duration') + parser.add_argument('--thr_var', type=float, default=3e-5, help='threshold variance for adaptive rate') + parser.add_argument('--cpu', action='store_true', help='if true use cpu and not cuda') + parser.add_argument('--flow', action='store_true', help='if true predict also optical flow') + parser.add_argument('--viz_input', action='store_true', help='if true viz input') + parser.add_argument('--no_window', action='store_true', help='disable window') + + params, _ = parser.parse_known_args(argv) + return params + + +def run(params): + print('params: ', params) + + if params.mode == 'adaptive': + mv_it = AdaptiveRateEventsIterator(params.path, thr_var_per_event=params.thr_var) + else: + mv_it = EventsIterator(params.path, start_ts=params.start_ts, mode=params.mode, + n_events=params.n_events, delta_t=params.delta_t) + + window_name = "e2v" + if params.no_window: + window_name = None + show_write = ShowWrite(window_name, params.video_path) + + height, width = mv_it.get_size() + print('original size: ', height, width) + + device = 'cpu' if params.cpu else 'cuda' + model = EventToVideoLightningModel.load_from_checkpoint(params.checkpoint) + model.eval().to(device) + nbins = model.hparams.event_volume_depth + print('Nbins: ', nbins) + in_height, in_width = (height, width) if params.height_width is None else params.height_width + print('height_width: ', params.height_width) + + pause = False + mv_it = iter(mv_it) + while True: + + try: + events = next(mv_it) if not pause else np.array([], dtype=EventCD) + except StopIteration: + break + + if events.size > 0: + first_ts = events["t"][0] + if first_ts <= params.start_ts: + continue + last_ts = events["t"][-1] + if params.max_duration > 0 and last_ts > params.start_ts + params.max_duration: + break + + if not pause and not len(events): + continue + + if not pause: + events_th = event_cd_to_torch(events).to(device) + start_times = torch.FloatTensor([events['t'][0]]).view(1,).to(device) + durations = torch.FloatTensor([events['t'][-1] - events['t'][0]]).view(1,).to(device) + tensor_th = event_volume(events_th, 1, height, width, start_times, durations, nbins, 'bilinear') + tensor_th = F.interpolate(tensor_th, size=(in_height, in_width), + mode='bilinear', align_corners=True) + tensor_th = tensor_th * 0.1 + tensor_th = tensor_th.view(1, 1, nbins, in_height, in_width) + else: + tensor_th = torch.zeros((1, 1, nbins, in_height, in_width), dtype=torch.float32, device=device) + + state = model.model(tensor_th) + gray = model.model.predict_gray(state).view(1, 1, in_height, in_width) + gray = normalize_tiles(gray).view(in_height, in_width) + gray_np = gray.detach().cpu().numpy() * 255 + gray_np = np.uint8(gray_np) + gray_rgb = gray_np[..., None].repeat(3, 2) + + if params.flow: + flow = model.model.predict_flow(state) + flow_rgb = viz_flow(flow.squeeze(0)) + flow_rgb = flow_rgb.squeeze(0).permute(1, 2, 0).cpu().numpy() + cat = np.concatenate([flow_rgb, gray_rgb], axis=1) + else: + cat = gray_rgb + + if params.viz_input: + x = tensor_th.mean(dim=2) + x = 255 * normalize_tiles(x, num_dims=3, num_stds=9).view(in_height, in_width) + x = x.byte().cpu().numpy() + x = x[..., None].repeat(3, 2) + cat = np.concatenate((x, cat), axis=1) + + key = show_write(cat) + if key == 27: + break + if key == ord('p'): + pause = not pause + + +def main(): + params = parse_args() + run(params) + + +if __name__ == '__main__': + with torch.no_grad(): + main() diff --git a/sdk/modules/core_ml/python/samples/train_event_to_video/CMakeLists.txt b/sdk/modules/core_ml/python/samples/train_event_to_video/CMakeLists.txt new file mode 100644 index 000000000..8b99165a9 --- /dev/null +++ b/sdk/modules/core_ml/python/samples/train_event_to_video/CMakeLists.txt @@ -0,0 +1,13 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. + +install(FILES train_event_to_video.py + DESTINATION share/metavision/sdk/core_ml/python_samples/train_event_to_video + COMPONENT metavision-sdk-core-ml-python-samples) + diff --git a/sdk/modules/core_ml/python/samples/train_event_to_video/train_event_to_video.py b/sdk/modules/core_ml/python/samples/train_event_to_video/train_event_to_video.py new file mode 100644 index 000000000..e35a59a58 --- /dev/null +++ b/sdk/modules/core_ml/python/samples/train_event_to_video/train_event_to_video.py @@ -0,0 +1,157 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. +""" +E2V Training Script + +Copyright: (c) 2020 Prophesee +""" +import torch +import pytorch_lightning as pl +from pytorch_lightning.callbacks import ModelCheckpoint +from pytorch_lightning.loggers import TensorBoardLogger + +from metavision_core_ml.event_to_video.lightning_model import EventToVideoLightningModel +from metavision_core_ml.event_to_video.lightning_model import EventToVideoCallback +from metavision_core_ml.event_to_video.data_module import EventToVideoDataModule +from metavision_core_ml.utils.train_utils import search_latest_checkpoint + + +import os +import numpy as np +import argparse + +torch.manual_seed(0) +np.random.seed(0) + + +def train_parser(): + parser = argparse.ArgumentParser() + # dir params + parser.add_argument('root_dir', type=str, default='', help='logging directory') + parser.add_argument('dataset_path', type=str, default='', help='path') + + # train params + parser.add_argument('--lr', type=float, default=0.0007, help='learning rate') + parser.add_argument('--epochs', type=int, default=100, help='epochs') + parser.add_argument('--demo_iter', type=int, default=10, help='run demo for X batches') + parser.add_argument('--precision', type=int, default=16, help='precision 32 or 16') + parser.add_argument('--accumulate_grad_batches', type=int, default=1, + help='accumulate gradient for more than a single batch') + parser.add_argument('--batch_size', type=int, default=4, help='batch size') + parser.add_argument('--demo_every', type=int, default=1, help='run demo every X epoch') + parser.add_argument('--val_every', type=int, default=1, help='validate every X epochs') + parser.add_argument('--save_every', type=int, default=1, help='save every X epochs') + parser.add_argument('--just_test', action='store_true', help='launches demo video') + parser.add_argument('--cpu', action='store_true', help='use cpu') + parser.add_argument('--resume', action='store_true', help='resume from latest checkpoint') + parser.add_argument('--checkpoint', type=str, default='', help='resume from specific checkpoint') + parser.add_argument('--mask_loss_no_events_yet', action='store_true', help='mask loss where no events') + parser.add_argument('--limit_train_batches', type=int, default=10000, help='run training epoch for X batches') + parser.add_argument('--limit_val_batches', type=int, default=100, help='run training epoch for X batches') + parser.add_argument('--data_device', type=str, default='cuda', help='run simulation on the cpu/gpu') + parser.add_argument('--event_volume_depth', type=int, default=10, help='event volume depth') + + # network params + parser.add_argument('--cin', type=int, default=10, help='num inputs, check in your data') + parser.add_argument('--cout', type=int, default=1, help='num channels prediction, check your gt') + parser.add_argument('--base', type=int, default=8, help='width of network') + parser.add_argument('--num_layers', type=int, default=3, help='depth of network') + parser.add_argument('--cell', type=str, choices=['lstm', 'brc'], default='lstm', help='rnn cell') + parser.add_argument('--separable', action='store_true', help='use separable convolutions') + parser.add_argument('--separable_hidden', action='store_true', help='use separable for rnn convolutions') + parser.add_argument('--archi', type=str, default='all_rnn', help='archi type of unet') + parser.add_argument('--plot_flow', action='store_true', help='plot the flow') + + # data params + parser.add_argument('--height', type=int, default=180, help='image height') + parser.add_argument('--width', type=int, default=240, help='image width') + parser.add_argument('--num_tbins', type=int, default=10, help="timesteps per batch tbppt") + parser.add_argument('--min_frames_per_video', type=int, default=100, help='max frames per video') + parser.add_argument('--max_frames_per_video', type=int, default=10000, help='max frames per video') + parser.add_argument( + '--batch_sampling_mode', type=str, choices=['frames', 'delta_t', 'random'], + default='random', help='how to sample video batches') + parser.add_argument('--batch_min_frames', type=int, default=1, help='how to sample videos') + parser.add_argument('--batch_max_frames', type=int, default=10, help='how to sample videos') + parser.add_argument('--batch_min_delta_t', type=int, default=1000, help='how to sample videos') + parser.add_argument('--batch_max_delta_t', type=int, default=30000, help='how to sample videos') + parser.add_argument('--num_workers', type=int, default=2, help='number of threads') + + # display params + parser.add_argument("--no_window", action="store_true", + help="Disable output window during demo (only write a video)") + return parser + + +def train(params: argparse.Namespace): + print(params) + + model = EventToVideoLightningModel(params) + if not params.cpu: + model.cuda() + + if params.resume: + ckpt = search_latest_checkpoint(params.root_dir) + elif params.checkpoint != "": + ckpt = params.checkpoint + else: + ckpt = None + print('ckpt: ', ckpt) + + tmpdir = os.path.join(params.root_dir, 'checkpoints') + checkpoint_callback = ModelCheckpoint(dirpath=tmpdir, save_top_k=-1, every_n_epochs=params.save_every) + + logger = TensorBoardLogger(save_dir=os.path.join(params.root_dir, 'logs')) + + if ckpt is not None and params.just_test: + checkpoint = torch.load(ckpt, map_location=torch.device('cpu') if params.cpu else torch.device("cuda")) + model.load_state_dict(checkpoint['state_dict']) + + # Data Setup + data = EventToVideoDataModule(params) + + if params.just_test: + if not params.cpu: + model = model.cuda() + model.demo_video(data.val_dataloader(), -1) + else: + demo_callback = EventToVideoCallback(data, params.demo_every, show_window=not params.no_window) + trainer = pl.Trainer( + default_root_dir=params.root_dir, + callbacks=[checkpoint_callback, demo_callback], + logger=logger, + gpus=1, + precision=params.precision, + accumulate_grad_batches=params.accumulate_grad_batches, + progress_bar_refresh_rate=1, + max_epochs=params.epochs, + resume_from_checkpoint=ckpt, + log_every_n_steps=5, + limit_train_batches=params.limit_train_batches, + limit_val_batches=params.limit_val_batches, + accelerator="cpu" if params.cpu else None + ) + trainer.fit(model, data) + + +def main(): + """Using Pytorch Lightning to train our model + + you can visualize logs with tensorboard: + + %tensorboard --logdir my_root_dir/lightning_logs/ + """ + print('pl version: ', pl.__version__) + parser = train_parser() + params, _ = parser.parse_known_args() + train(params) + + +if __name__ == '__main__': + main() diff --git a/sdk/modules/core_ml/python/samples/viz_data_event_to_video/CMakeLists.txt b/sdk/modules/core_ml/python/samples/viz_data_event_to_video/CMakeLists.txt new file mode 100644 index 000000000..4f31a097d --- /dev/null +++ b/sdk/modules/core_ml/python/samples/viz_data_event_to_video/CMakeLists.txt @@ -0,0 +1,13 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. + +install(FILES viz_data_event_to_video.py + DESTINATION share/metavision/sdk/core_ml/python_samples/viz_data_event_to_video + COMPONENT metavision-sdk-core-ml-python-samples) + diff --git a/sdk/modules/core_ml/python/samples/viz_data_event_to_video/viz_data_event_to_video.py b/sdk/modules/core_ml/python/samples/viz_data_event_to_video/viz_data_event_to_video.py new file mode 100644 index 000000000..27b07424f --- /dev/null +++ b/sdk/modules/core_ml/python/samples/viz_data_event_to_video/viz_data_event_to_video.py @@ -0,0 +1,100 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. +""" +Visualize the event-to-video dataloader +""" +import sys +import time +import numpy as np +import cv2 +from metavision_core_ml.event_to_video.gpu_esim import GPUEBSIM +from metavision_core_ml.utils.torch_ops import normalize_tiles +from torchvision.utils import make_grid + + +def show_dataset(dataloader, batch_size, delay=5, verbose=False): + start = 0 + nrows = 2 ** ((batch_size.bit_length() - 1) // 2) + for batch_num, batch in enumerate(dataloader): + if verbose: + sys.stdout.write(f"\rbatch runtime: {time.time() - start:4.4f}") + sys.stdout.flush() + + x = batch["inputs"].detach().cpu() + y = batch["images"].detach().cpu() + + for t in range(len(x)): + gy = make_grid(y[t], nrow=nrows).permute(1, 2, 0).numpy().astype(np.uint8) + + # mean + xt = x[t].mean(dim=1, keepdims=True) + xt = 255 * normalize_tiles(xt, num_stds=6, real_min_max=True) + gx = make_grid(xt, nrow=nrows).permute(1, 2, 0).numpy().astype(np.uint8) + + cat = np.concatenate((gx, gy), axis=1).copy() + + cv2.putText( + cat, "frame#" + str(batch_num * len(x) + t), + (10, cat.shape[0] - 10), + cv2.FONT_HERSHEY_SIMPLEX, 1, (0, 0, 255)) + cv2.imshow('data', cat) + cv2.waitKey(delay) + + start = time.time() + + +def main(folder, num_workers=2, batch_size=4, batch_times=4, event_volume_depth=5, height=240, width=320, + min_frames_per_video=50, max_frames_per_video=5000, batch_sampling_mode='random', batch_min_frames=1, + batch_max_frames=10, batch_min_delta_t=1000, batch_max_delta_t=5000, device='cuda:0', verbose=False, + randomize_noises=False): + """ + Visualises a DataLoader for event to video training. + + Args: + folder (string): folder containing the mp4 videos (and optional _ts.npy timestamps files)/ + num_workers (int): number of processes used. + batch_size (int): number of videos loaded simultaenously + batch_times (int): number of time bins. + event_volume_depth (int): number of channels in the event cube. + height (int): height of each video in pixels. + width (int): width of each video in pixels. + min_frames_per_video (int): min number of frames for each video. + max_frames_per_video (int): max number of frames for each video. + batch_sampling_mode (bool): random, frames or delta_t + batch_min_frames (int): min frames per batch + batch_max_frames (int): max frames per batch + batch_min_delta_t (int): min duration per batch + batch_max_delta_t (int): max duration per batch + device (string): either cuda or cpu (must be a valid descriptor for a torch.device) + verbose (boolean): wether to print batch loading times + randomize_noises (boolean): add noises + """ + dataloader = GPUEBSIM.from_params( + folder, + num_workers, + batch_size, + batch_times, + event_volume_depth, + height, + width, + min_frames_per_video, + max_frames_per_video, + batch_sampling_mode, + batch_min_frames, + batch_max_frames, + batch_min_delta_t, + batch_max_delta_t, + randomize_noises, + device) + show_dataset(dataloader, batch_size, 5, verbose=verbose) + + +if __name__ == '__main__': + import fire + fire.Fire(main) diff --git a/sdk/modules/core_ml/python/samples/viz_video_to_event_gpu_simulator/CMakeLists.txt b/sdk/modules/core_ml/python/samples/viz_video_to_event_gpu_simulator/CMakeLists.txt new file mode 100644 index 000000000..41565f496 --- /dev/null +++ b/sdk/modules/core_ml/python/samples/viz_video_to_event_gpu_simulator/CMakeLists.txt @@ -0,0 +1,13 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. + +install(FILES viz_video_to_event_gpu_simulator.py + DESTINATION share/metavision/sdk/core_ml/python_samples/viz_video_to_event_gpu_simulator + COMPONENT metavision-sdk-core-ml-python-samples) + diff --git a/sdk/modules/core_ml/python/samples/viz_video_to_event_gpu_simulator/viz_video_to_event_gpu_simulator.py b/sdk/modules/core_ml/python/samples/viz_video_to_event_gpu_simulator/viz_video_to_event_gpu_simulator.py new file mode 100644 index 000000000..dc961ccfe --- /dev/null +++ b/sdk/modules/core_ml/python/samples/viz_video_to_event_gpu_simulator/viz_video_to_event_gpu_simulator.py @@ -0,0 +1,168 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. +""" +Numba cuda based implementation of event simulator +""" +import argparse +import numpy as np +import torch +import cv2 +import time + +from torchvision.utils import make_grid +from metavision_core_ml.utils.torch_ops import normalize_tiles +from metavision_core_ml.video_to_event.video_stream_dataset import make_video_dataset +from metavision_core_ml.video_to_event.gpu_simulator import GPUEventSimulator +from metavision_core_ml.preprocessing.event_to_tensor_torch import event_image +from metavision_core_ml.utils.torch_ops import cuda_tick +from profilehooks import profile + + +def parse_args(only_default_values=False): + parser = argparse.ArgumentParser(description='Run a batch gpu event based simulator on a video ', + formatter_class=argparse.ArgumentDefaultsHelpFormatter) + + parser.add_argument('path', help='path towards image or video dataset') + parser.add_argument('--threshold-mu', default=0.1, type=float, help="mean contrast threshold") + parser.add_argument('--threshold-std', default=0.0, type=float, help="std contrast threshold") + parser.add_argument('--refractory-period', default=0, type=int, help="refractory period") + parser.add_argument('--batch-size', default=4, type=int, help="grab clips of this duration") + parser.add_argument('--height', default=240, type=int, help="frame height") + parser.add_argument('--width', default=320, type=int, help="frame width") + parser.add_argument('--max-frames-per-video', default=5000, type=int, help="maximum frames to read per video") + parser.add_argument('--min-frames-per-batch', default=2, type=int, help="minimum frames per batch to construct " + "the event tensor") + parser.add_argument('--max-frames-per-batch', default=10, type=int, help="maximum frames per batch to construct " + "the event tensor") + parser.add_argument('--num-workers', default=2, type=int, help="dataset number of workers") + + parser.add_argument('--device', default='cuda:0', type=str, help="compute device") + parser.add_argument('--mode', default='event_volume', type=str, help="format returned") + parser.add_argument("--cutoff-hz", default=0, type=float, + help="cutoff frequency for photodiode latency simulation") + parser.add_argument("--leak-rate-hz", type=float, default=0, + help="frequency of reference value leakage") + parser.add_argument("--shot-noise-hz", default=0, type=float, + help="frequency for shot noise events") + parser.add_argument("--nbins", default=5, type=int, + help="voxel_grid nbins") + parser.add_argument("--split-channels", action='store_true', + help="voxel grid split channels") + parser.add_argument("--delay", default=5, type=int, + help="display with a delay in millisecond") + parser.add_argument("--record-video", action='store_true', + help="record a video on the current working directory") + parser.add_argument('--video-path', default='output.mp4', type=str, help="path of video output (.mp4)") + + return parser.parse_args() + + +@profile +def test_gpu_simulator(path, + threshold_mu, threshold_std, + refractory_period, + leak_rate_hz, cutoff_hz, shot_noise_hz, + num_workers, batch_size, + height, width, + max_frames_per_video, + device, mode, split_channels=False, + min_frames_per_batch=2, + max_frames_per_batch=10, + nbins=10, + delay=5, + record_video=False, + video_path="output.mp4"): + """ + Fixed Number of Frames/ Video + """ + print('parameters:', locals()) + nrows = 2 ** ((batch_size.bit_length() - 1) // 2) + dl = make_video_dataset( + path, num_workers, batch_size, height, width, max_frames_per_video - 1, max_frames_per_video, + min_frames=min_frames_per_batch, max_frames=max_frames_per_batch, rgb=False) + event_gpu = GPUEventSimulator(batch_size, height, width, threshold_mu, + threshold_std, refractory_period, leak_rate_hz, cutoff_hz, shot_noise_hz) + + event_gpu.to(device) + dl.to(device) + pause = False + last_images = None + start = time.time() + if record_video: + out = cv2.VideoWriter(video_path, cv2.VideoWriter_fourcc('M', 'J', 'P', 'G'), 5, (width*2, height)) + for i, batch in enumerate(dl): + + images = batch['images'].squeeze(dim=0) + + first_times = batch['first_times'] + timestamps = batch['timestamps'] + num_frames = batch['video_len'] + + if pause and last_images is not None: + images = last_images + + start = cuda_tick() + + # randomize parameters + # event_gpu.randomize_broken_pixels(first_times, video_proba=0.1) + # event_gpu.randomize_thresholds(first_times) + # event_gpu.randomize_cutoff(first_times) + # event_gpu.randomize_shot(first_times) + # event_gpu.randomize_refractory_periods(first_times) + + log_images = event_gpu.dynamic_moving_average(images, num_frames, timestamps, first_times) + + if mode == 'counts': + idx = 1 + counts = event_gpu.count_events(log_images, num_frames, timestamps, first_times) + elif mode == 'event_volume': + voxels = event_gpu.event_volume(log_images, num_frames, timestamps, + first_times, nbins, mode, split_channels=split_channels) + if split_channels: + counts = voxels[:, nbins:] - voxels[:, :nbins] + counts = counts.mean(dim=1) + else: + counts = voxels.mean(dim=1) + else: + events = event_gpu.get_events(log_images, num_frames, timestamps, first_times) + counts = event_image(events, batch_size, height, width) + + end = cuda_tick() + print('total runtime: ', end - start) + + im = 255 * normalize_tiles(counts.unsqueeze(1).float(), num_stds=3) + + im = make_grid(im, nrow=nrows).detach().cpu().permute(1, 2, 0).numpy().astype(np.uint8) + + blur_images = torch.exp(log_images) * 255 + first_frames_indices = torch.cat((torch.zeros(1, device=images.device), num_frames.cumsum(0)))[ + :-1].long() + imin = make_grid( + blur_images[None, ..., first_frames_indices].permute(3, 0, 1, 2), nrow=nrows).detach().cpu().permute( + 1, 2, 0).numpy().astype(np.uint8) + final = np.concatenate((im, imin), axis=1) + cv2.imshow('all', final) + if record_video: + out.write(final) + key = cv2.waitKey(delay) + if key == 27 or key == ord('q'): + break + if key == ord('p'): + pause = ~pause + + last_images = images + start = time.time() + cv2.destroyWindow('all') + if record_video: + out.release() + + +if __name__ == '__main__': + ARGS = parse_args() + test_gpu_simulator(**ARGS.__dict__) diff --git a/sdk/modules/core_ml/python/samples/viz_video_to_event_simulator/CMakeLists.txt b/sdk/modules/core_ml/python/samples/viz_video_to_event_simulator/CMakeLists.txt new file mode 100644 index 000000000..e986a946b --- /dev/null +++ b/sdk/modules/core_ml/python/samples/viz_video_to_event_simulator/CMakeLists.txt @@ -0,0 +1,12 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. + +install(FILES viz_video_to_event_simulator.py + DESTINATION share/metavision/sdk/core_ml/python_samples/viz_video_to_event_simulator + COMPONENT metavision-sdk-core-ml-python-samples) diff --git a/sdk/modules/core_ml/python/samples/viz_video_to_event_simulator/viz_video_to_event_simulator.py b/sdk/modules/core_ml/python/samples/viz_video_to_event_simulator/viz_video_to_event_simulator.py new file mode 100644 index 000000000..040c7390c --- /dev/null +++ b/sdk/modules/core_ml/python/samples/viz_video_to_event_simulator/viz_video_to_event_simulator.py @@ -0,0 +1,146 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. + +""" +Displays events produced by the frame-to-event simulator. +Streams either from a moving picture or a video with timestamps. +The application buffers 3 iterators: +- Image or Video Streamer +- EventSimulator +- FixedTime/CountBufferizer + +and finally applies some event tensorization. +""" +from __future__ import absolute_import + +import os +import time +import cv2 +import argparse + +import numpy as np +from metavision_core_ml.video_to_event.simulator import EventSimulator +from metavision_core.event_io.event_bufferizer import FixedCountBuffer +from metavision_core.event_io import DatWriter + +from metavision_core_ml.preprocessing import viz_events + +from metavision_core_ml.data.video_stream import TimedVideoStream +from metavision_core_ml.data.image_planar_motion_stream import PlanarMotionStream + + +def parse_args(only_default_values=False): + parser = argparse.ArgumentParser(description='Run a simple event based simulator on a video or an image', + formatter_class=argparse.ArgumentDefaultsHelpFormatter) + + parser.add_argument('path', help='path to a video or an image from which we will produce' + ' the corresponding events ') + + parser.add_argument('--n_events', type=int, default=50000, + help='number of events to display at once') + parser.add_argument('--height_width', nargs=2, default=None, type=int, + help="if set, scales the input image to the requested values.") + parser.add_argument("--no_display", dest="display", action="store_false", help='disable the graphical return.') + parser.add_argument("--verbose", action="store_true", help='set to have the speed of the simulator in ev/s') + parser.add_argument('-o', "--output", help="if provided, will write the events in the corresponding path") + parser.add_argument('-fps', '--override_fps', default=0, type=float, + help="if positive, overrides the framerate of the input video. Useful for slow motion videos.") + + simulator_options = parser.add_argument_group('Simulator parameters') + simulator_options.add_argument("--Cp", default="0.15", type=float, + help="mean for positive event contrast threshold distribution") + simulator_options.add_argument("--Cn", default="0.10", type=float, + help="mean value for negative event contrast threshold distribution") + simulator_options.add_argument( + "--refractory_period", default=1, type=float, + help="time interval (in us), after firing an event during which a pixel won't emit a new event.") + simulator_options.add_argument( + "--sigma_threshold", type=float, default="0.001", help="standard deviation for threshold" + "distribution across the array of pixels. The higher it is the less reliable the imager.") + simulator_options.add_argument("--cutoff_hz", default=0, type=float, + help="cutoff frequency for photodiode latency simulation") + simulator_options.add_argument("--leak_rate_hz", type=float, default=0, + help="frequency of reference value leakage") + simulator_options.add_argument("--shot_noise_rate_hz", default=10, type=float, + help="frequency for shot noise events") + + return parser.parse_args() + + +def main(args): + [height, width] = [-1, -1] if args.height_width is None else args.height_width + path = args.path + assert os.path.exists(path), f"{path} doesn't exist!" + assert os.path.isfile(path), f"{path} is not a file" + start = time.time() + if os.path.splitext(path)[1] in [".jpg", ".JPG", ".png", ".PNG"]: + image_stream = PlanarMotionStream(path, height, width) + else: + image_stream = TimedVideoStream(path, height, width, override_fps=args.override_fps) + + if args.height_width is None: + height, width = image_stream.get_size() + + n_events = args.n_events + fixed_buffer = FixedCountBuffer(n_events) + simu = EventSimulator(height, width, args.Cp, args.Cn, args.refractory_period, cutoff_hz=args.cutoff_hz, + sigma_threshold=args.sigma_threshold, shot_noise_rate_hz=args.shot_noise_rate_hz) + + if args.display: + cv2.namedWindow('events', cv2.WINDOW_NORMAL) + cv2.namedWindow('image', cv2.WINDOW_NORMAL) + + if args.output: + writer = DatWriter(args.output, height=height, width=width) + + for img, ts in image_stream: + total = simu.image_callback(img, ts) + + if total < n_events: + continue + + events = simu.get_events() + simu.flush_events() + + events = fixed_buffer(events) + + if not len(events): + continue + + end = time.time() + dt = events['t'][-1] - events['t'][0] + + image_rgb = viz_events(events, width=width, height=height) + + if args.verbose: + num_evs = len(events) + max_evs = np.unique(events["x"] * height + events['y'], return_counts=True)[1].max() + print( + f"runtime: {(end-start)*1000:.5f} ms, max ev/pixel: {max_evs}, total Mev: {num_evs * 1e-6:.5f}, dt: {dt} us") + + if args.display: + cv2.imshow('events', image_rgb[..., ::-1]) + cv2.imshow('image', img) + key = cv2.waitKey(5) + if key == 27: + break + if args.output: + writer.write(events) + + start = time.time() + + if args.display: + cv2.destroyAllWindows() + + if args.output: + writer.close() + + +if __name__ == '__main__': + main(parse_args()) diff --git a/sdk/modules/core_ml/python/tests/CMakeLists.txt b/sdk/modules/core_ml/python/tests/CMakeLists.txt new file mode 100644 index 000000000..c62278967 --- /dev/null +++ b/sdk/modules/core_ml/python/tests/CMakeLists.txt @@ -0,0 +1,19 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. +lfs_download("datasets/openeb/core_ml") + +get_filename_component(CORE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../core/python/pypkg" ABSOLUTE) +get_filename_component(CORE_ML_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../pypkg" ABSOLUTE) + +set(PYTHON_MODULES_PATHS ${CORE_DIR} ${CORE_ML_DIR}) + +add_sdk_python_module_test(core_ml ${PYTHON_MODULES_PATHS}) + +set_property(TEST pytests_core_ml APPEND PROPERTY ENVIRONMENT "SAMPLES=${CMAKE_CURRENT_SOURCE_DIR}/../samples/") +set_property(TEST pytests_core_ml APPEND PROPERTY ENVIRONMENT "MODELS=${CMAKE_CURRENT_SOURCE_DIR}/../models/") \ No newline at end of file diff --git a/sdk/modules/core_ml/python/tests/benchmark_unets.py b/sdk/modules/core_ml/python/tests/benchmark_unets.py new file mode 100644 index 000000000..72918e1e9 --- /dev/null +++ b/sdk/modules/core_ml/python/tests/benchmark_unets.py @@ -0,0 +1,99 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. + +# pylint: disable=C0321 + +""" +we build several unets and time them +""" +import torch +import torch.nn as nn + +from metavision_core_ml.core.temporal_modules import VideoSequential +from metavision_core_ml.core.unet import unet_layers, Unet +from metavision_core_ml.core.unet_utils import UpsampleConvLayer, DownsampleConvRNN, UpsampleConvRNN +from metavision_core_ml.core.modules import ConvLayer +from metavision_core_ml.utils.torch_ops import cuda_tick + +from einops.layers.torch import Rearrange + + +def sep_enc_rnn_dec_ff(in_channels, out_channels, num_layers, base): + downs = [base * 2**(i + 1) for i in range(num_layers)] + ups = [base * 2**(num_layers - i) for i in range(num_layers)] + ups[-1] = out_channels + # Trial Architecture + def down(x, y): return DownsampleConvRNN(x, y, separable=True, separable_hidden=True) + def midd(x, y): return VideoSequential(ConvLayer(x, y, separable=True)) + def up(x, y): return UpsampleConvLayer(x, y, separable=True) + enc, dec = unet_layers(down, midd, up, in_channels, downs, ups[0] * 2, ups) + net = Unet(enc, dec) + return net + + +def plain_enc_rnn_dec_ff(in_channels, out_channels, num_layers, base): + downs = [base * 2**(i + 1) for i in range(num_layers)] + ups = [base * 2**(num_layers - i) for i in range(num_layers)] + ups[-1] = out_channels + # Trial Architecture + def down(x, y): return DownsampleConvRNN(x, y, separable=False, separable_hidden=False) + def midd(x, y): return VideoSequential(ConvLayer(x, y, separable=False)) + def up(x, y): return UpsampleConvLayer(x, y, separable=False) + enc, dec = unet_layers(down, midd, up, in_channels, downs, ups[0] * 2, ups) + net = Unet(enc, dec) + return net + + +def sep_enc_ff_dec_rnn(in_channels, out_channels, num_layers, base): + downs = [base * 2**(i + 1) for i in range(num_layers)] + ups = [base * 2**(num_layers - i) for i in range(num_layers)] + ups[-1] = out_channels + # Trial Architecture + def down(x, y): return VideoSequential(ConvLayer(x, y, separable=True)) + def midd(x, y): return VideoSequential(ConvLayer(x, y, separable=True)) + def up(x, y): return UpsampleConvRNN(x, y, separable=True, separable_hidden=False) + enc, dec = unet_layers(down, midd, up, in_channels, downs, ups[0] * 2, ups) + net = Unet(enc, dec) + return net + + +def plain_enc_ff_dec_rnn(in_channels, out_channels, num_layers, base): + downs = [base * 2**(i + 1) for i in range(num_layers)] + ups = [base * 2**(num_layers - i) for i in range(num_layers)] + ups[-1] = out_channels + # Trial Architecture + def down(x, y): return VideoSequential(ConvLayer(x, y, separable=True)) + def midd(x, y): return VideoSequential(ConvLayer(x, y, separable=False)) + def up(x, y): return UpsampleConvRNN(x, y, separable=False, separable_hidden=False) + enc, dec = unet_layers(down, midd, up, in_channels, downs, ups[0] * 2, ups) + net = Unet(enc, dec) + return net + + +def measure_runtime(t, b, c, h, w, net, device, n_iters=10): + x = torch.randn(t, b, c, h, w) + x = x.to(device) + net.to(device) + y = net(x) + start = cuda_tick() + for i in range(n_iters): + y = net(x) + end = cuda_tick() + return (end-start)/n_iters + + +def benchmark(name, t=10, b=1, h=512, w=512, in_channels=5, out_channels=1, num_layers=3, base=8, device='cuda:0'): + net = globals()[name](in_channels, out_channels, num_layers, base) + runtime = measure_runtime(t, b, in_channels, h, w, net, device) + print('runtime: ', runtime) + + +if __name__ == '__main__': + import fire + fire.Fire(benchmark) diff --git a/sdk/modules/core_ml/python/tests/camera_pose_generator_pytest.py b/sdk/modules/core_ml/python/tests/camera_pose_generator_pytest.py new file mode 100644 index 000000000..e8d2e987f --- /dev/null +++ b/sdk/modules/core_ml/python/tests/camera_pose_generator_pytest.py @@ -0,0 +1,109 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. + +""" +Unit tests for the camera pose generator +""" +import os +import numpy as np +import cv2 + +import metavision_core_ml.data.camera_poses as cam + + +def pytestcase_interpolation(): + max_frames = 100 + height = 480 + width = 640 + opt_flow_threshold = 1.0 + K = np.array( + [[width / 2, 0, width / 2], [0, height / 2, height / 2], [0, 0, 1]], + dtype=np.float32, + ) + Kinv = np.linalg.inv(K) + + nt = np.array([0, 0, 1], dtype=np.float32).reshape(1, 3) + + np.random.seed(0) + for _ in range(10): + signal = cam.generate_smooth_signal(6, max_frames//10).T + rvecs = signal[:, :3] + tvecs = signal[:, 3:] + + depth = np.random.uniform(1.0, 2.0) + rvecs, tvecs, times, max_flow = cam.interpolate_poses( + rvecs, tvecs, nt, depth, K, Kinv, height, width, opt_flow_threshold=opt_flow_threshold, + max_frames_per_bin=-1) + + _, _, _, max_flow2 = cam.interpolate_poses(rvecs, tvecs, nt, depth, K, Kinv, height, width) + + assert max_flow2 <= opt_flow_threshold + + +def pytestcase_generate_pose_equivalence(): + max_frames = 100 + height = 480 + width = 640 + opt_flow_threshold = 1.0 + K = np.array( + [[width / 2, 0, width / 2], [0, height / 2, height / 2], [0, 0, 1]], + dtype=np.float32, + ) + Kinv = np.linalg.inv(K) + nt = np.array([0, 0, 1], dtype=np.float32).reshape(1, 3) + signal = cam.generate_smooth_signal(6, max_frames//10).T + rvecs = signal[:, :3] + tvecs = signal[:, 3:] + + depth = np.random.uniform(1.0, 2.0) + homographies = cam.generate_homographies(rvecs, tvecs, nt, depth) + + for i in range(len(rvecs)): + rvec, tvec = rvecs[i], tvecs[i] + homography = cam.generate_homography(rvec, tvec, nt, depth) + assert np.allclose(homography, homographies[i]) + + +def pytestcase_generate_transform_equivalence(): + max_frames = 100 + height = 480 + width = 640 + opt_flow_threshold = 1.0 + K = np.array( + [[width / 2, 0, width / 2], [0, height / 2, height / 2], [0, 0, 1]], + dtype=np.float32, + ) + Kinv = np.linalg.inv(K) + nt = np.array([0, 0, 1], dtype=np.float32).reshape(1, 3) + signal = cam.generate_smooth_signal(6, max_frames//10).T + rvecs = signal[:, :3] + tvecs = signal[:, 3:] + + depth = np.random.uniform(1.0, 2.0) + + # checking math + i = 0 + j = len(rvecs)-1 + h_0_1 = cam.generate_homography(rvecs[i], tvecs[i], nt, depth) + h_0_2 = cam.generate_homography(rvecs[j], tvecs[j], nt, depth) + h_1_2 = cam.get_transform(rvecs[i], tvecs[i], rvecs[j], tvecs[j], nt, depth) + + # check that 1->2 = 0->1->2 + h_0_2_bis = h_1_2.dot(h_0_1) + rel_error = np.abs(h_0_2 - h_0_2_bis) / np.abs(h_0_2) + assert np.allclose(h_0_2, h_0_2_bis), rel_error + + h_0_1 = cam.generate_image_homography(rvecs[i], tvecs[i], nt, depth, K, Kinv) + h_0_2 = cam.generate_image_homography(rvecs[j], tvecs[j], nt, depth, K, Kinv) + h_1_2 = cam.get_image_transform(rvecs[i], tvecs[i], rvecs[j], tvecs[j], nt, depth, K, Kinv) + + # check that 1->2 = 0->1->2 + h_0_2_bis = h_1_2.dot(h_0_1) + rel_error = np.abs(h_0_2 - h_0_2_bis) / np.abs(h_0_2) + assert np.allclose(h_0_2, h_0_2_bis), rel_error diff --git a/sdk/modules/core_ml/python/tests/event_to_video_inference_pytest.py b/sdk/modules/core_ml/python/tests/event_to_video_inference_pytest.py new file mode 100644 index 000000000..7b0c3a83f --- /dev/null +++ b/sdk/modules/core_ml/python/tests/event_to_video_inference_pytest.py @@ -0,0 +1,49 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. + +""" +Unit tests for the sample "demo_event_to_video.py" +""" +import os +import sys + +import numpy as np +import pytest + +test_dir_path = os.path.dirname(os.path.realpath(__file__)) +sample_dir_path = os.path.join(test_dir_path, '..', 'samples', 'demo_event_to_video') +assert os.path.isdir(sample_dir_path) +sys.path.append(sample_dir_path) + +try: + import torch + from demo_event_to_video import parse_args, run + imports_error = False +except ImportError as e: + print(e) + imports_error = True + + +@pytest.mark.skipif(imports_error, reason="some imports are failing, please install requirements.txt") +class TestEvent2VideoInferenceMain(object): + + def pytestcase_CLI_test(self, tmpdir, dataset_dir): + """checks that the box are split correctly.""" + # GIVEN + video_path = os.path.join(dataset_dir, 'openeb', 'gen4_evt2_hand.raw') + model_path = os.path.join(dataset_dir, '..', 'sdk', 'modules', 'core_ml', 'python', 'models', + 'e2v.ckpt') + + # WHEN + params = parse_args([video_path, model_path, '--height_width', '240', '320', '--mode', 'delta_t', + '--delta_t', '50000', '--max_duration', '2000000', '--no_window', '--cpu', + '--video_path', os.path.join(tmpdir, 'e2vid.mp4')]) + run(params) + # THEN + # just validate we did not crash diff --git a/sdk/modules/core_ml/python/tests/event_to_video_pytest.py b/sdk/modules/core_ml/python/tests/event_to_video_pytest.py new file mode 100644 index 000000000..2be4195e0 --- /dev/null +++ b/sdk/modules/core_ml/python/tests/event_to_video_pytest.py @@ -0,0 +1,20 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. +import torch +from metavision_core_ml.event_to_video.event_to_video import EventToVideo + + +def pytestcase_event_to_video(): + net = EventToVideo(10, 1, num_layers=3, base=16, cell='lstm') + + t, b, c, h, w = 4, 3, 10, 64, 64 + x = torch.randn(t, b, c, h, w) + y = net(x) + z = net.predict_gray(y) + assert z.shape == torch.Size((t, b, 1, h, w)) diff --git a/sdk/modules/core_ml/python/tests/event_to_video_training_pytest.py b/sdk/modules/core_ml/python/tests/event_to_video_training_pytest.py new file mode 100644 index 000000000..4061cdb8d --- /dev/null +++ b/sdk/modules/core_ml/python/tests/event_to_video_training_pytest.py @@ -0,0 +1,77 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. + +import sys +import os +import argparse +import pytest +import torch +import glob + +test_dir_path = os.path.dirname(os.path.realpath(__file__)) +sample_dir_path = os.path.join(test_dir_path, '..', 'samples', 'train_event_to_video') +assert os.path.isdir(sample_dir_path) +sys.path.append(sample_dir_path) + +try: + from train_event_to_video import train_parser, train + imports_error = False +except ImportError as e: + print(e) + imports_error = True + + +def get_argparse_defaults(parser): + defaults = {} + for action in parser._actions: + if not action.required and action.dest != "help": + defaults[action.dest] = action.default + return defaults + + +@pytest.mark.skipif(imports_error, reason="some imports are failing, please install requirements.txt") +def pytestcase_training_mini_dataset(tmpdir, dataset_dir): + """ + This is a functional test + Tests if we can create a LightningDetectionModel and train for a few batches. + """ + # Parse Params + parser = train_parser() + params = get_argparse_defaults(parser) + params['root_dir'] = tmpdir + params['dataset_path'] = os.path.join(dataset_dir, 'openeb', 'core_ml', 'mini_image_dataset') + params['lr'] = 0.0001 + params['event_volume_depth'] = 10 + params['batch_size'] = 2 + params['cout'] = 1 + params['precision'] = 32 + params['num_layers'] = 2 + params['cell'] = 'lstm' + params['archi'] = 'all_rnn' + params['epochs'] = 2 + params['base'] = 2 + params['demo_every'] = 100 + params['limit_train_batches'] = 3 + params['limit_val_batches'] = 3 + params['cpu'] = True + params['data_device'] = 'cpu' + params['height'] = 60 + params['width'] = 80 + params['num_tbins'] = 7 + params['num_workers'] = 0 + params['no_window'] = True + params = argparse.Namespace(**params) + + # Actual Training + train(params) + + # Verify checkpoint has been written + ckpt_filenames = glob.glob(os.path.join(tmpdir, "checkpoints", "epoch=1*.ckpt")) + assert len(ckpt_filenames) == 1 + dic = torch.load(ckpt_filenames[0]) diff --git a/sdk/modules/core_ml/python/tests/gpu_simulator_pytest.py b/sdk/modules/core_ml/python/tests/gpu_simulator_pytest.py new file mode 100644 index 000000000..3c526640a --- /dev/null +++ b/sdk/modules/core_ml/python/tests/gpu_simulator_pytest.py @@ -0,0 +1,514 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. +""" +Unit tests for the GPU Simulator +""" +import os +import pytest +import numpy as np +import torch +import torch.nn.functional as F +from metavision_core_ml.video_to_event.gpu_simulator import GPUEventSimulator +from metavision_core_ml.video_to_event.simulator import EventSimulator, eps_log +from metavision_core_ml.video_to_event.video_stream_dataset import make_video_dataset +from metavision_core_ml.preprocessing.event_to_tensor_torch import event_volume, event_image +from itertools import islice + +CUDA_NOT_AVAILABLE = not torch.cuda.is_available() + + +def pytestcase_num_tbins(dataset_dir): + """ + Runs the same simu in different fashion w.r.t num_tbins + """ + # GIVEN + path = os.path.join(dataset_dir, "openeb", "core_ml", "mini_image_dataset") + batch_size = 4 + height, width = 120, 180 + threshold_mu = 0.1 + refractory_period = 0 + leak_hz = 0.0 + cutoff_hz = 0 + + dataloader1 = make_video_dataset(path, 0, batch_size, height, width, 30, 300, seed=1) + batches = [batch for batch in islice(dataloader1, 10)] + simu = GPUEventSimulator(batch_size, height, width, threshold_mu, 0, refractory_period, leak_hz, cutoff_hz) + lstate = simu.log_states.clone() + counts_list = [] + for i, batch_dict in enumerate(batches): + log_batch = simu.log_images(batch_dict['images'].squeeze()) + timestamps = batch_dict['timestamps'] + first_times = batch_dict['first_times'] + if i > 1 and first_times.sum() > 0: + print('stop!') + break + + counts = simu.count_events(log_batch, batch_dict['video_len'], timestamps, first_times, reset=True) + counts_list.append(counts.clone()) + + counts_list = torch.cat([item[None] for item in counts_list]) + counts1 = counts_list.sum(dim=0) + + simu2 = GPUEventSimulator(batch_size, height, width, threshold_mu, 0, refractory_period, leak_hz, cutoff_hz) + lstate2 = simu2.log_states.clone() + batches = batches[:i] + batch_list = [[] for _ in range(batch_size)] + for batch in batches: + ind = 0 + for i, end in enumerate(batch["video_len"].cumsum(0)): + batch_list[i].append(batch['images'].squeeze()[..., ind:end]) + ind = end + + big_batch = torch.cat([torch.cat([b for b in batch], dim=-1) for batch in batch_list], dim=-1) + timestamps = torch.cat([batch['timestamps'] for batch in batches], dim=-1) + + video_len = torch.stack([batch['video_len'] for batch in batches]).sum(0) + first_times = batches[0]['first_times'] + log_batch = simu2.log_images(big_batch) + counts2 = simu2.count_events(log_batch, video_len, timestamps, first_times) + + # THEN + diff_state = simu.log_states - simu2.log_states + assert diff_state.abs().max().item() == 0 + diff = counts1 - counts2 + assert diff.abs().max().item() == 0 + + +def pytestcase_new_old(dataset_dir): + """ + Testing that Old Simulator is equivalent to the New GPU one + """ + path = os.path.join(dataset_dir, "openeb", "core_ml", "mini_image_dataset") + batch_size = 1 + height, width = 256, 256 + threshold_mu = 0.1 + threshold_std = 0.001 + refractory_period = 100 + nbins = 1 + dataloader = make_video_dataset(path, 0, batch_size, height, width, 30, 300, seed=1) + batches = [batch for batch in islice(dataloader, 40)] + + event_cpu = GPUEventSimulator(batch_size, height, width, threshold_mu, 0, refractory_period) + old_event_cpu = EventSimulator(height, width, threshold_mu, threshold_mu, refractory_period, 0) + old_event_cpu.Cps = event_cpu.thresholds[1, 0].numpy() + old_event_cpu.Cns = event_cpu.thresholds[0, 0].numpy() + + for i, batch_dict in enumerate(batches): + batch = batch_dict['images'].squeeze(0) + timestamps = batch_dict['timestamps'] + first_times = batch_dict['first_times'] + log_batch = event_cpu.log_images(batch) + + start_times = timestamps[:, 0] * first_times + (1 - first_times) * event_cpu.prev_image_ts + durations = timestamps[:, -1] - start_times + + # old: reset + if first_times[0] == 1: + old_event_cpu.reset() + old_event_cpu.Cps = event_cpu.thresholds[1, 0].numpy() + old_event_cpu.Cns = event_cpu.thresholds[0, 0].numpy() + + # old: actual simulation + for t in range(log_batch.shape[-1]): + img = log_batch[:, :, t].numpy().copy() + ts = timestamps[0, t].item() + old_event_cpu.log_image_callback(img, ts) + + old_events = old_event_cpu.get_events().copy() + old_event_cpu.flush_events() + + events = event_cpu.get_events(log_batch, batch_dict['video_len'], timestamps, first_times) + t1 = events[:, -1] + idx = torch.argsort(t1) + events = events[idx] + + if not len(events): + continue + + # Event-Volume Difference? + ev_vol1 = event_volume(events, batch_size, height, width, start_times, durations, nbins, 'nearest') + + events2 = torch.zeros((len(old_events), 5), dtype=torch.int32) + events2[:, 1] = torch.from_numpy(old_events['x'] * 1.0) + events2[:, 2] = torch.from_numpy(old_events['y'] * 1.0) + events2[:, 3] = torch.from_numpy(old_events['p'] * 2.0 - 1) + events2[:, 4] = torch.from_numpy(old_events['t'] * 1.0) + + ev_vol2 = event_volume(events2, batch_size, height, width, start_times, durations, nbins, 'nearest') + diff = (ev_vol1 - ev_vol2) + assert diff.abs().max().item() == 0 + + +def pytestcase_new_old_cutoff(dataset_dir): + """ + Testing that Old Simulator is equivalent to the New GPU one + """ + path = os.path.join(dataset_dir, "openeb", "core_ml", "mini_image_dataset") + batch_size = 1 + height, width = 256, 256 + threshold_mu = 0.1 + threshold_std = 0.001 + refractory_period = 100 + nbins = 1 + cutoff_hz = 30 + dataloader = make_video_dataset(path, 0, batch_size, height, width, 30, 300, seed=1) + batches = [batch for batch in islice(dataloader, 40)] + + event_cpu = GPUEventSimulator(batch_size, height, width, threshold_mu, 0, refractory_period, cutoff_hz=cutoff_hz) + old_event_cpu = EventSimulator(height, width, threshold_mu, threshold_mu, + refractory_period, 0, cutoff_hz=cutoff_hz) + + for i, batch_dict in enumerate(batches): + batch = batch_dict['images'].squeeze(dim=0) + timestamps = batch_dict['timestamps'] + first_times = batch_dict['first_times'] + log_batch = event_cpu.dynamic_moving_average(batch, batch_dict['video_len'], timestamps, first_times) + + # old: reset + if first_times[0] == 1: + old_event_cpu.reset() + old_event_cpu.Cps = event_cpu.thresholds[1, 0].numpy() + old_event_cpu.Cns = event_cpu.thresholds[0, 0].numpy() + + # old photodiode latency simulation + for t in range(batch.shape[-1]): + img = batch[..., t].numpy() + ts = timestamps[0, t].item() + log_t = old_event_cpu.dynamic_moving_average(img, ts) + old_event_cpu.last_img_ts = ts + log_t_2 = log_batch[..., t].cpu().numpy() + + assert np.allclose(log_t, log_t_2, atol=1e-6) + + +@pytest.mark.skipif(CUDA_NOT_AVAILABLE, reason="this machine does not have gpu available") +def pytestcase_cpu_gpu_cutoff(dataset_dir): + """ + Testing that Old Simulator is equivalent to the New GPU one + """ + path = os.path.join(dataset_dir, "openeb", "core_ml", "mini_image_dataset") + batch_size = 1 + height, width = 256, 256 + threshold_mu = 0.1 + threshold_std = 0.001 + refractory_period = 100 + nbins = 1 + cutoff_hz = 30 + dataloader = make_video_dataset(path, 0, batch_size, height, width, 30, 300, seed=1) + batches = [batch for batch in islice(dataloader, 40)] + + event_cpu = GPUEventSimulator(batch_size, height, width, threshold_mu, 0, refractory_period, cutoff_hz=cutoff_hz) + + event_gpu = GPUEventSimulator(batch_size, height, width, threshold_mu, 0, refractory_period, cutoff_hz=cutoff_hz) + event_gpu.to('cuda:0') + + for i, batch_dict in enumerate(batches): + batch = batch_dict['images'].squeeze(dim=0) + timestamps = batch_dict['timestamps'] + first_times = batch_dict['first_times'] + num_frames = batch_dict['video_len'] + + log_batch = event_cpu.dynamic_moving_average(batch, num_frames, timestamps, first_times) + log_batch2 = event_gpu.dynamic_moving_average( + batch.to('cuda:0'), + num_frames.to('cuda:0'), + timestamps.to('cuda:0'), + first_times.to('cuda:0')).to('cpu:0') + + assert torch.allclose(log_batch, log_batch2, atol=1e-6) + + +@pytest.mark.skipif(CUDA_NOT_AVAILABLE, reason="this machine does not have gpu available") +def pytestcase_cpu_gpu_count(dataset_dir): + """ + Runs the CPU & GPU versions. + Make sure they are equivalent for the counting of events. + """ + # GIVEN + path = os.path.join(dataset_dir, "openeb", "core_ml", "mini_image_dataset") + batch_size = 4 + height, width = 60, 80 + threshold_mu = 0.1 + refractory_period = 10 + leak_hz = 0.1 + cutoff_hz = 60 + dataloader = make_video_dataset(path, 0, batch_size, height, width, 30, 300, seed=1) + + batches = [batch for batch in islice(dataloader, 5)] + + event_cpu = GPUEventSimulator(batch_size, height, width, threshold_mu, 0, refractory_period, leak_hz, cutoff_hz) + event_gpu = GPUEventSimulator(batch_size, height, width, threshold_mu, 0, refractory_period, leak_hz, cutoff_hz) + event_gpu.to('cuda:0') + + # THEN + for batch_dict in batches: + batch = event_gpu.log_images(batch_dict['images'].squeeze()) + timestamps = batch_dict['timestamps'] + first_times = batch_dict['first_times'] + video_len = batch_dict['video_len'] + batch_gpu = batch.to('cuda:0') + timestamps_gpu = timestamps.to('cuda:0') + first_times_gpu = first_times.to('cuda:0') + counts = event_gpu.count_events(batch_gpu, video_len.cuda(), timestamps_gpu, first_times_gpu).cpu() + counts2 = event_cpu.count_events(batch, video_len, timestamps, first_times) + diff = counts - counts2 + assert diff.abs().max().item() == 0 + + +@pytest.mark.skipif(CUDA_NOT_AVAILABLE, reason="this machine does not have gpu available") +def pytestcase_cpu_gpu_event_volume(dataset_dir): + """ + Runs the CPU & GPU versions. + Make sure they are equivalent for the voxel grid of events. + """ + # GIVEN + path = os.path.join(dataset_dir, "openeb", "core_ml", "mini_image_dataset") + batch_size = 4 + nbins = 5 + height, width = 60, 80 + threshold_mu = 0.1 + refractory_period = 10 + leak_rate = 0.1 + cutoff_hz = 90 + dataloader = make_video_dataset(path, 0, batch_size, height, width, 30, 300, seed=1) + + batches = [batch for batch in islice(dataloader, 5)] + + event_cpu = GPUEventSimulator(batch_size, height, width, threshold_mu, 0, refractory_period, leak_rate, cutoff_hz) + event_gpu = GPUEventSimulator(batch_size, height, width, threshold_mu, 0, refractory_period, leak_rate, cutoff_hz) + event_gpu.to('cuda:0') + + # THEN + for batch_dict in batches: + batch = event_gpu.log_images(batch_dict['images'].squeeze()) + timestamps = batch_dict['timestamps'] + first_times = batch_dict['first_times'] + video_len = batch_dict['video_len'] + batch_gpu = batch.to('cuda:0') + timestamps_gpu = timestamps.to('cuda:0') + first_times_gpu = first_times.to('cuda:0') + + counts = event_gpu.event_volume(batch_gpu, video_len.cuda(), timestamps_gpu, first_times_gpu, nbins).cpu() + counts2 = event_cpu.event_volume(batch, video_len, timestamps, first_times, nbins) + diff = counts - counts2 + assert diff.abs().max().item() == 0 + + +@pytest.mark.skipif(CUDA_NOT_AVAILABLE, reason="this machine does not have gpu available") +def pytestcase_cpu_gpu_event_volume_split(dataset_dir): + """ + Runs the CPU & GPU versions. + Make sure they are equivalent for the voxel grid of events with separated channels + """ + # GIVEN + path = os.path.join(dataset_dir, "openeb", "core_ml", "mini_image_dataset") + batch_size = 4 + nbins = 5 + height, width = 60, 80 + threshold_mu = 0.1 + refractory_period = 10 + leak_rate = 0.1 + cutoff_hz = 90 + dataloader = make_video_dataset(path, 0, batch_size, height, width, 30, 300, seed=1) + + batches = [batch for batch in islice(dataloader, 5)] + + event_cpu = GPUEventSimulator(batch_size, height, width, threshold_mu, 0, refractory_period, leak_rate, cutoff_hz) + event_gpu = GPUEventSimulator(batch_size, height, width, threshold_mu, 0, refractory_period, leak_rate, cutoff_hz) + event_gpu.to('cuda:0') + + # THEN + for batch_dict in batches: + batch = event_gpu.log_images(batch_dict['images'].squeeze()) + timestamps = batch_dict['timestamps'] + first_times = batch_dict['first_times'] + video_len = batch_dict['video_len'] + batch_gpu = batch.to('cuda:0') + timestamps_gpu = timestamps.to('cuda:0') + first_times_gpu = first_times.to('cuda:0') + counts = event_gpu.event_volume(batch_gpu, video_len.cuda(), timestamps_gpu, first_times_gpu, nbins, + split_channels=True).cpu() + counts2 = event_cpu.event_volume(batch, video_len, timestamps, first_times, nbins, split_channels=True) + diff = counts - counts2 + assert diff.abs().max().item() == 0 + + +@pytest.mark.skipif(CUDA_NOT_AVAILABLE, reason="this machine does not have gpu available") +def pytestcase_cpu_gpu_event(dataset_dir): + """ + Runs the CPU & GPU versions. + Make sure they are equivalent for the events + """ + # GIVEN + path = os.path.join(dataset_dir, "openeb", "core_ml", "mini_image_dataset") + batch_size = 4 + height, width = 60, 80 + threshold_mu = 0.1 + refractory_period = 10 + nbins = 10 + leak_rate = 0.1 + cutoff_hz = 450 + dataloader = make_video_dataset(path, 0, batch_size, height, width, 30, 300, seed=1) + + batches = [batch for batch in islice(dataloader, 5)] + + event_cpu = GPUEventSimulator(batch_size, height, width, threshold_mu, 0, refractory_period, leak_rate, cutoff_hz) + event_gpu = GPUEventSimulator(batch_size, height, width, threshold_mu, 0, refractory_period, leak_rate, cutoff_hz) + + event_gpu.to('cuda:0') + + # THEN + for batch_dict in batches: + batch = event_gpu.log_images(batch_dict['images'].squeeze()) + timestamps = batch_dict['timestamps'] + first_times = batch_dict['first_times'] + video_len = batch_dict['video_len'] + batch_gpu = batch.to('cuda:0') + timestamps_gpu = timestamps.to('cuda:0') + first_times_gpu = first_times.to('cuda:0') + events = event_gpu.get_events(batch_gpu, video_len.cuda(), timestamps_gpu, first_times_gpu) + events2 = event_cpu.get_events(batch, video_len, timestamps, first_times) + + t1 = events[:, -1] + idx = torch.argsort(t1) + events = events[idx] + events2 = events2[idx] + diff = (events.cpu() - events2) + assert diff.abs().max().item() == 0 + + +def pytestcase_event_count_equivalence(dataset_dir): + """ + Here we make sure that: + video -> event_count == video -> aer -> event_count + """ + # GIVEN + path = os.path.join(dataset_dir, "openeb", "core_ml", "mini_image_dataset") + batch_size = 1 + height, width = 460, 480 + threshold_mu = 0.1 + refractory_period = 10 + nbins = 10 + leak_rate = 0.0 + cutoff_hz = 0 + + dataloader = make_video_dataset(path, 0, batch_size, height, width, 30, 300, seed=1) + batches = [batch for batch in islice(dataloader, 5)] + + sim1 = GPUEventSimulator(batch_size, height, width, threshold_mu, 0, refractory_period, leak_rate, cutoff_hz) + sim2 = GPUEventSimulator(batch_size, height, width, threshold_mu, 0, refractory_period, leak_rate, cutoff_hz) + + sim2.thresholds[...] = sim1.thresholds + + # THEN + for i, batch_dict in enumerate(batches): + batch = sim1.log_images(batch_dict['images'].squeeze(0)) + timestamps = batch_dict['timestamps'] + first_times = batch_dict['first_times'] + video_len = batch_dict['video_len'] + + start_times = sim1.prev_image_ts * (1 - first_times) + timestamps[:, 0] * first_times + durations = timestamps[:, -1] - start_times + + counts1 = sim1.count_events(batch, video_len, timestamps, first_times) + events = sim2.get_events(batch, video_len, timestamps, first_times) + events[:, 3] = 1 + counts2 = event_image(events, batch_size, height, width) + + diff = counts1 - counts2 + assert torch.allclose(counts1, counts2.to(counts1), atol=1e-3) + + +def pytestcase_event_count_event_volume_equivalence(dataset_dir): + """ + Here we make sure that: + video -> event-volume (nearest) == event count + """ + # GIVEN + path = os.path.join(dataset_dir, "openeb", "core_ml", "mini_image_dataset") + batch_size = 1 + height, width = 460, 480 + threshold_mu = 0.1 + refractory_period = 10 + nbins = 5 + leak_rate = 0.0 + cutoff_hz = 0 + mode = 'nearest' + + dataloader = make_video_dataset(path, 0, batch_size, height, width, 30, 300, seed=1) + batches = [batch for batch in islice(dataloader, 5)] + + sim0 = GPUEventSimulator(batch_size, height, width, threshold_mu, 0, refractory_period, leak_rate, cutoff_hz) + sim1 = GPUEventSimulator(batch_size, height, width, threshold_mu, 0, refractory_period, leak_rate, cutoff_hz) + sim2 = GPUEventSimulator(batch_size, height, width, threshold_mu, 0, refractory_period, leak_rate, cutoff_hz) + + sim2.thresholds[...] = sim1.thresholds + + # THEN + for i, batch_dict in enumerate(batches): + batch = sim1.log_images(batch_dict['images'].squeeze(0)) + timestamps = batch_dict['timestamps'] + first_times = batch_dict['first_times'] + video_len = batch_dict['video_len'] + + start_times = sim1.prev_image_ts * (1 - first_times) + timestamps[:, 0] * first_times + durations = timestamps[:, -1] - start_times + + counts1 = sim0.count_events(batch, video_len, timestamps, first_times, True, True) + + vol2 = sim2.event_volume(batch, video_len, timestamps, first_times, nbins, mode, split_channels=True) + + counts2 = vol2.abs().sum(dim=1) + assert torch.allclose(counts1, counts2.int(), atol=1e-3) + + +def pytestcase_event_volume_equivalence(dataset_dir): + """ + Here we make sure that: + video -> event-volume == video -> aer -> event_volume + """ + # GIVEN + path = os.path.join(dataset_dir, "openeb", "core_ml", "mini_image_dataset") + batch_size = 1 + height, width = 460, 480 + threshold_mu = 0.1 + refractory_period = 10 + nbins = 4 + leak_rate = 0.0 + cutoff_hz = 0 + mode = 'nearest' + + dataloader = make_video_dataset(path, 0, batch_size, height, width, 30, 300, seed=1) + batches = [batch for batch in islice(dataloader, 5)] + + sim1 = GPUEventSimulator(batch_size, height, width, threshold_mu, 0, refractory_period, leak_rate, cutoff_hz) + sim2 = GPUEventSimulator(batch_size, height, width, threshold_mu, 0, refractory_period, leak_rate, cutoff_hz) + + sim2.thresholds[...] = sim1.thresholds + + # THEN + for i, batch_dict in enumerate(batches): + batch = sim1.log_images(batch_dict['images'].squeeze(0)) + timestamps = batch_dict['timestamps'].long() + first_times = batch_dict['first_times'] + video_len = batch_dict['video_len'] + + start_times = sim1.prev_image_ts * (1 - first_times) + timestamps[:, 0] * first_times + durations = timestamps[:, -1] - start_times + + events = sim1.get_events(batch, video_len, timestamps, first_times) + vol1 = event_volume(events, batch_size, height, width, start_times, durations, nbins, mode) + vol2 = sim2.event_volume(batch, video_len, timestamps, first_times, nbins, mode) + + mean_per_bin_1 = vol1.sum(-1).sum(-1).mean(0).cpu().abs().numpy() + mean_per_bin_2 = vol2.sum(-1).sum(-1).mean(0).cpu().abs().numpy() + + assert (mean_per_bin_1 > 0).any() + assert (mean_per_bin_2 > 0).any() + assert torch.allclose(vol1, vol2, atol=1e-4) diff --git a/sdk/modules/core_ml/python/tests/simu_events_iterator_pytest.py b/sdk/modules/core_ml/python/tests/simu_events_iterator_pytest.py new file mode 100644 index 000000000..b324f3a14 --- /dev/null +++ b/sdk/modules/core_ml/python/tests/simu_events_iterator_pytest.py @@ -0,0 +1,198 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. + +""" +Unit tests for the Event Simulator Interface +""" +import os +import pytest +import skvideo.io +import numpy as np +from metavision_core_ml.video_to_event.simu_events_iterator import SimulatedEventsIterator +from metavision_core_ml.data.video_stream import TimedVideoStream + + +def pytestcase_all_events_in_frame(tmpdir): + """checks that all events returned are in the frame (and resize works).""" + tmp_res_filename = str(tmpdir.join("video_0.mp4")) + video_frames = np.random.random(size=(100, 12, 12, 3)) * 255 + video_frames = video_frames.astype(np.uint8) + + skvideo.io.vwrite(tmp_res_filename, video_frames) + simulation = SimulatedEventsIterator(tmp_res_filename, height=4, width=4) + + for events in simulation: + assert (0 <= events["x"]).all() + assert (events["x"] <= 3).all() + assert (0 <= events["y"]).all() + assert (events["y"] <= 3).all() + simulation.__del__() + + +def pytestcase_no_events_before_start_dt(tmpdir): + """checks that no events are before start_ts for mode delta_t""" + tmp_res_filename = str(tmpdir.join("video_0.mp4")) + start_ts = 3000000 + video_frames = np.random.random(size=(100, 12, 12, 3)) * 255 + video_frames = video_frames.astype(np.uint8) + + skvideo.io.vwrite(tmp_res_filename, video_frames) + simulation = SimulatedEventsIterator(tmp_res_filename, start_ts=start_ts) + for events in simulation: + assert (events["t"] >= start_ts).all() + simulation.__del__() + + +def pytestcase_no_events_before_start_ne(tmpdir): + """checks that no events are before start_ts for mode n_events""" + tmp_res_filename = str(tmpdir.join("video_0.mp4")) + start_ts = 3000000 + video_frames = np.random.random(size=(100, 12, 12, 3)) * 255 + video_frames = video_frames.astype(np.uint8) + + skvideo.io.vwrite(tmp_res_filename, video_frames) + simulation = SimulatedEventsIterator(tmp_res_filename, start_ts=start_ts, mode='n_events') + for events in simulation: + assert (events["t"] >= start_ts).all() + simulation.__del__() + + +def pytestcase_correct_n_events(tmpdir): + """checks that the buffers returned have n_events""" + tmp_res_filename = str(tmpdir.join("video_0.mp4")) + n_events = 10000 + video_frames = np.random.random(size=(100, 12, 12, 3)) * 255 + video_frames = video_frames.astype(np.uint8) + + skvideo.io.vwrite(tmp_res_filename, video_frames) + simulation = SimulatedEventsIterator(tmp_res_filename, mode='n_events', n_events=n_events) + + for events in simulation: + assert len(events) == n_events + simulation.__del__() + + +def pytestcase_buffers_dt_intra(tmpdir): + """checks that the range of the buffers is smaller than delta_t""" + tmp_res_filename = str(tmpdir.join("video_0.mp4")) + start_ts = 3000000 + delta_t = 15000 + video_frames = np.random.random(size=(100, 12, 12, 3)) * 255 + video_frames = video_frames.astype(np.uint8) + + skvideo.io.vwrite(tmp_res_filename, video_frames) + simulation = SimulatedEventsIterator(tmp_res_filename, start_ts=start_ts, delta_t=delta_t) + + for events in simulation: + if len(events): + assert events['t'][-1]-events['t'][0] <= delta_t + simulation.__del__() + + +def pytestcase_buffers_dt_extra(tmpdir): + """checks that the first event of each buffer is in the correct buffer""" + tmp_res_filename = str(tmpdir.join("video_0.mp4")) + start_ts = 3000000 + delta_t = 15000 + video_frames = np.random.random(size=(100, 12, 12, 3)) * 255 + video_frames = video_frames.astype(np.uint8) + + skvideo.io.vwrite(tmp_res_filename, video_frames) + simulation = SimulatedEventsIterator(tmp_res_filename, start_ts=start_ts, delta_t=delta_t) + begin_buffer_ts = start_ts + for events in simulation: + if len(events): + assert events['t'][0] >= begin_buffer_ts + begin_buffer_ts += delta_t + simulation.__del__() + + +def pytestcase_buffers_dt_extra_smaller(tmpdir): + """checks that the period between two consecutive buffers is smaller than 2 delta_t""" + tmp_res_filename = str(tmpdir.join("video_0.mp4")) + start_ts = 3000000 + delta_t = 15000 + video_frames = np.random.random(size=(100, 12, 12, 3)) * 255 + video_frames = video_frames.astype(np.uint8) + + skvideo.io.vwrite(tmp_res_filename, video_frames) + simulation = SimulatedEventsIterator(tmp_res_filename, start_ts=start_ts, delta_t=delta_t) + last_buffer = start_ts + simulation = iter(simulation) + first_buffer = next(simulation) + for events in simulation: + if len(events): + assert events['t'][0]-last_buffer <= 2*delta_t + last_buffer += delta_t + simulation.__del__() + + +def pytestcase_relative_timestamp(tmpdir): + """checks that the relative timestamps are between 0 and delta_t""" + tmp_res_filename = str(tmpdir.join("video_0.mp4")) + video_frames = np.random.random(size=(100, 12, 12, 3)) * 255 + video_frames = video_frames.astype(np.uint8) + start_ts = 3000000 + delta_t = 15000 + skvideo.io.vwrite(tmp_res_filename, video_frames) + + simulation = SimulatedEventsIterator(tmp_res_filename, start_ts=start_ts, + delta_t=delta_t, relative_timestamps=True) + for events in simulation: + if len(events): + assert events['t'][0] >= 0 + assert events['t'][0] <= delta_t + assert events['t'][-1] >= 0 + assert events['t'][-1] <= delta_t + simulation.__del__() + + +def pytestcase_timed_videostream_fps(tmpdir): + """checks that the override_fps argument is correctly applied""" + tmp_res_filename = str(tmpdir.join("video_0.mp4")) + video_frames = np.random.random(size=(241, 12, 12, 3)) * 255 + video_frames = video_frames.astype(np.uint8) + + skvideo.io.vwrite(tmp_res_filename, video_frames) + + video_stream_iterator = iter(TimedVideoStream(tmp_res_filename, override_fps=240)) + for img, ts in video_stream_iterator: + timestamp = ts + assert int(timestamp) == int(1e6) # We ran 241 frames timestamp should be 1sec (timestamp of first frame is 0) + + +def pytestcase_timed_videostream_max_frames(tmpdir): + """checks that TimedVideoStream does not generate more than max frames""" + tmp_res_filename = str(tmpdir.join("video_0.mp4")) + video_frames = np.random.random(size=(240, 12, 12, 3)) * 255 + video_frames = video_frames.astype(np.uint8) + max_frames = 34 + skvideo.io.vwrite(tmp_res_filename, video_frames) + + video_stream_iterator = TimedVideoStream(tmp_res_filename, max_frames=max_frames) + assert len(video_stream_iterator) == max_frames + + +def pytestcase_can_be_run_twice(tmpdir): + """Checks if the iter function works, meaning if the iterator can be run twice""" + tmp_res_filename = str(tmpdir.join("video_0.mp4")) + video_frames = np.random.random(size=(100, 12, 12, 3)) * 255 + video_frames = video_frames.astype(np.uint8) + start_ts = 3000000 + delta_t = 15000 + skvideo.io.vwrite(tmp_res_filename, video_frames) + + simulation = SimulatedEventsIterator(tmp_res_filename, start_ts=start_ts, + delta_t=delta_t, relative_timestamps=True) + for events in simulation: + last_event = events + for events in simulation: + last_event2 = events + assert (last_event == last_event2).all() + simulation.__del__() diff --git a/sdk/modules/core_ml/python/tests/stream_dataloader_pytest.py b/sdk/modules/core_ml/python/tests/stream_dataloader_pytest.py new file mode 100644 index 000000000..1939f714c --- /dev/null +++ b/sdk/modules/core_ml/python/tests/stream_dataloader_pytest.py @@ -0,0 +1,150 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. + +""" +Unit tests for the multistream dataloader +""" +import platform +import pytest +import numpy as np + +from metavision_core_ml.data.stream_dataloader import StreamDataLoader, StreamDataset +from metavision_core_ml.data.stream_dataloader import split_batch_size, split_dataset_sizes +from collections import defaultdict +from functools import partial + + +class DummyStream(object): + def __init__(self, stream, num_tbins): + self.pos = 0 + self.stream_num = stream[0] + self.max_len = stream[1] + self.num_tbins = num_tbins + + def __iter__(self): + return self + + def __next__(self): + if self.pos >= self.max_len: + raise StopIteration + max_pos = min(self.pos + self.num_tbins, self.max_len) + positions = [i for i in range(self.pos, max_pos)] + self.pos = max_pos + return positions, self.stream_num + + +def collate_fn(data_list): + frame_nums, stream_nums = zip(*data_list) + return {"frame_num": frame_nums, "stream_num": stream_nums} + + +class TestClassMultiStreams(object): + def setup_dataloader(self, stream_list, num_workers, batch_size, num_tbins): + iterator_fun = partial(DummyStream, num_tbins=num_tbins) + fill_value = ([-1] * num_tbins, -1) + dataset = StreamDataset(stream_list, iterator_fun, batch_size, "zeros", fill_value) + dataloader = StreamDataLoader(dataset, num_workers, collate_fn) + return dataloader + + def assert_all(self, dataloader, stream_list, num_tbins, batch_size): + # WHEN + streamed1 = defaultdict(list) + for stream_num, stream_len in stream_list: + stream_tuple = (stream_num, stream_len) + stream = DummyStream(stream_tuple, num_tbins) + for pos, _ in stream: + streamed1[stream_num] += [pos] + + streamed2 = defaultdict(list) + batch_number = defaultdict(list) + for batch in dataloader: + actual_batch_size = len(batch['stream_num']) + # THEN: batch_size should always be equal to user defined batch_size + assert batch_size == actual_batch_size + + for i in range(batch_size): + stream_num = batch['stream_num'][i] + if stream_num == -1: + continue + streamed2[stream_num] += [batch['frame_num'][i]] + batch_number[stream_num].append(i) + + # THEN: data is contiguous accross batches + for k, v in batch_number.items(): + assert len(set(v)) == 1 + + # THEN: ALL IS READ + for k, v1 in streamed1.items(): + v2 = streamed2[k] + assert v1 == v2 + + def pytestcase_zero_pad_num_streams(self, tmpdir, dataset_dir): + # num_streams%batch_size != 0 (2 worker) + num_workers, num_streams, batch_size, num_tbins = 2, 11, 4, 5 + num_workers = 0 if platform.system() == 'Windows' else num_workers + + # GIVEN + stream_list = [(i, num_tbins * np.random.randint(1, 4)) for i in range(num_streams)] + dataloader = self.setup_dataloader(stream_list, num_workers, batch_size, num_tbins) + + # THEN + self.assert_all(dataloader, stream_list, num_tbins, batch_size) + + def pytestcase_zero_pad_batch_size_greater_not_divisible(self, tmpdir, dataset_dir): + # batch_size > num_streams_per_worker + # batch_size%num_workers != 0 + num_workers, num_streams, batch_size, num_tbins = 3, 13, 7, 5 + num_workers = 0 if platform.system() == 'Windows' else num_workers + + # GIVEN + stream_list = [(i, num_tbins * np.random.randint(1, 4)) for i in range(num_streams)] + dataloader = self.setup_dataloader(stream_list, num_workers, batch_size, num_tbins) + + # THEN + self.assert_all(dataloader, stream_list, num_tbins, batch_size) + + def pytestcase_zero_pad_batch_size_not_enough_streams(self, tmpdir, dataset_dir): + # batch_size > num_streams_per_worker + # batch_size%num_workers != 0 + num_workers, num_streams, batch_size, num_tbins = 3, 2, 7, 5 + num_workers = 0 if platform.system() == 'Windows' else num_workers + + stream_list = [(i, num_tbins * np.random.randint(1, 4)) for i in range(num_streams)] + with pytest.raises(AssertionError): + dataloader = self.setup_dataloader(stream_list, num_workers, batch_size, num_tbins) + self.assert_all(dataloader, stream_list, num_tbins, batch_size) + + def pytestcase_split_size(self): + stream_list = [i for i in range(3)] + split_sizes = split_batch_size(batch_size=3, num_workers=2) + stream_groups = split_dataset_sizes(stream_list, split_sizes) + for stream_group, split_size in zip(stream_groups, split_sizes): + assert len(stream_group) >= split_size + + # all streams must be in the splits + assert sum([len(s) for s in stream_groups]) == len(stream_list) + + def pytestcase_split_size_correctness(self): + # the sum of the split must be equal to the batch size, but should only differ by one at most. + # GIVEN + for batch_size in range(1, 10): + for num_workers in range(1, batch_size + 1): + # WHEN + split_sizes = split_batch_size(batch_size, num_workers) + # THEN + split_sizes = np.array(split_sizes) + assert np.sum(split_sizes) == batch_size + assert np.max(split_sizes) - np.min(split_sizes) <= 1 + + def pytestcase_split_num_workers_greater_than_batch_size(self): + stream_list = [i for i in range(10)] + split_sizes = split_batch_size(batch_size=3, num_workers=6) + stream_groups = split_dataset_sizes(stream_list, split_sizes) + for stream_group, split_size in zip(stream_groups, split_sizes): + assert len(stream_group) >= split_size diff --git a/sdk/modules/core_ml/python/tests/test_new_old_simulator_dataloader.py b/sdk/modules/core_ml/python/tests/test_new_old_simulator_dataloader.py new file mode 100644 index 000000000..9038751e5 --- /dev/null +++ b/sdk/modules/core_ml/python/tests/test_new_old_simulator_dataloader.py @@ -0,0 +1,130 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. +""" +This will only test + +(frame+ts) -> events for old & new + +but with all noises + +""" +import torch +import numpy as np +import cv2 +import tqdm +from metavision_core_ml.video_to_event.gpu_simulator import GPUEventSimulator +from metavision_core_ml.video_to_event.simulator import EventSimulator, eps_log +from metavision_core_ml.video_to_event.video_stream_dataset import make_video_dataset +from metavision_core_ml.preprocessing.event_to_tensor_torch import event_cd_to_torch, event_volume +from metavision_core_ml.utils.torch_ops import normalize_tiles +from torchvision.utils import make_grid + + +class BatchEventSimulator(object): + """This would be equivalent in old of new code behavior""" + + def __init__( + self, batch_size, height, width, threshold_mu, threshold_std, refractory_period, leak_rate_hz, cutoff_hz, + shot_noise_hz): + self.simulators = [] + for i in range(batch_size): + simulator = EventSimulator(height, width, threshold_mu, threshold_mu, + refractory_period, threshold_std, cutoff_hz, leak_rate_hz, shot_noise_hz) + self.simulators.append(simulator) + + def get_events(self, log_images, timestamps, first_times): + all_events = [] + for i in range(len(log_images)): + if first_times[i].item(): + self.simulators[i].reset() + for t in range(log_images.shape[-1]): + img = log_images[i, ..., t] + ts = timestamps[i, t].item() + self.simulators[i].log_image_callback(img.numpy(), ts) + events = self.simulators[i].get_events() + self.simulators[i].flush_events() + + events_th = event_cd_to_torch(events) + events_th[:, 0] = i + all_events.append(events_th) + return torch.cat(all_events) + + +def main(folder, + num_workers=2, + batch_size=4, + height=240, + width=320, + max_frames_per_video=150, + threshold_mu=0.1, + threshold_std=0, + refractory_period=10, + leak_rate_hz=0, + cutoff_hz=1e6, + shot_noise_hz=0, + seed=0, + min_error_warning=1e-4): + + videos = make_video_dataset(folder, 0, batch_size, height, width, + max_frames_per_video//4, max_frames_per_video, False, seed) + new_simu = GPUEventSimulator(batch_size, height, width, threshold_mu, threshold_std, + refractory_period, leak_rate_hz, cutoff_hz, shot_noise_hz) + + old_simu = BatchEventSimulator(batch_size, height, width, threshold_mu, threshold_std, + refractory_period, leak_rate_hz, cutoff_hz, shot_noise_hz) + + nrows = 2 ** ((batch_size.bit_length() - 1) // 2) + for batch in tqdm.tqdm(videos): + gray = batch['images'].squeeze(1) + timestamps = batch['timestamps'] + first_times = batch['first_times'] + prev_ts = new_simu.prev_image_ts + + log_gray = new_simu.dynamic_moving_average(gray, timestamps, first_times) + # log_gray = new_simu.log_images(gray) + + ev1 = old_simu.get_events(log_gray, timestamps, first_times) + ev2 = new_simu.get_events(log_gray, timestamps, first_times) + + if len(ev1) == len(ev2) and not len(ev1): + print('no events skipping') + continue + + # vizu + start_times = prev_ts*(1-first_times) + timestamps[:, 0] * first_times + durations = timestamps[:, -1] - start_times + + vol1 = event_volume(ev1, batch_size, height, width, start_times, durations, 5) + vol2 = event_volume(ev2, batch_size, height, width, start_times, durations, 5) + + diff = (vol1-vol2) + max_diff = diff.abs().max().item() + + if max_diff < min_error_warning: + continue + + print('Warning! max diff: ', max_diff) + im1 = vol1.mean(dim=1) + im2 = vol2.mean(dim=1) + im1 = 255*normalize_tiles(im1[:, None]) + im2 = 255*normalize_tiles(im2[:, None]) + im3 = 255*normalize_tiles(torch.exp(log_gray[..., -1])[:, None]) + + im1 = make_grid(im1, nrow=nrows).detach().byte().cpu().permute(1, 2, 0).numpy() + im2 = make_grid(im2, nrow=nrows).detach().byte().cpu().permute(1, 2, 0).numpy() + im3 = make_grid(im3, nrow=nrows).detach().byte().cpu().permute(1, 2, 0).numpy() + + cat = np.concatenate((im3, im1, im2), axis=1) + cv2.imshow('old-new', cat) + cv2.waitKey(5) + + +if __name__ == '__main__': + import fire + fire.Fire(main) diff --git a/sdk/modules/core_ml/python/tests/timed_videostream_pytest.py b/sdk/modules/core_ml/python/tests/timed_videostream_pytest.py new file mode 100644 index 000000000..32c0e912a --- /dev/null +++ b/sdk/modules/core_ml/python/tests/timed_videostream_pytest.py @@ -0,0 +1,86 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. + +""" +Unit tests for the TimedVideoStream Interface +""" +import os +import pytest +import skvideo.io +import numpy as np +import cv2 +import random + +from metavision_core_ml.data.video_stream import TimedVideoStream + + +def pytestcase_test_seek(tmpdir): + """Checks number of frames is correct and we are able to seek properly""" + tmp_output_video_filename = str(tmpdir.join("dummy_video.mp4")) + if os.path.exists(tmp_output_video_filename): + os.remove(tmp_output_video_filename) + assert not os.path.exists(tmp_output_video_filename) + + # Begin write frames + font = cv2.FONT_HERSHEY_SIMPLEX + bottomLeftCornerOfText = (10, 200) + fontScale = 1 + fontColor = (1, 0, 0) + lineType = 2 + + video_writer = skvideo.io.FFmpegWriter(tmp_output_video_filename, outputdict={ + '-vcodec': 'libx264', # use the h.264 codec + '-crf': '0', # set the constant rate factor to 0, which is lossless + '-preset': 'veryslow' # the slower the better compression, in princple, try + # other options see https://trac.ffmpeg.org/wiki/Encode/H.264 + }) + + all_images = [] + nb_frames = 100 + for i in range(nb_frames): + image = np.zeros((480, 640, 3), dtype=np.uint8) + idx_str = str(i).zfill(6) + + cv2.putText(image, idx_str, + bottomLeftCornerOfText, + font, + fontScale, + fontColor, + lineType) + + all_images.append(image[..., ::-1]) + + video_writer.writeFrame(image[:, :, ::-1]) + video_writer.close() + assert os.path.isfile(tmp_output_video_filename) + # End write frames + + tvs = TimedVideoStream(video_filename=tmp_output_video_filename, start_frame=0, rgb=True) + assert len(tvs) == nb_frames + it_tvs = iter(tvs) + nb_loaded_images = 0 + for image, ts in it_tvs: + assert (np.abs(image.astype(np.float) - all_images[nb_loaded_images].astype(np.float)) <= 1).all() + nb_loaded_images += 1 + assert nb_loaded_images == nb_frames + + for i in range(10): + nb_loaded_images = 0 + start_frame = random.randint(0, nb_frames - 1) + tvs = TimedVideoStream(video_filename=tmp_output_video_filename, start_frame=start_frame, rgb=True) + assert len(tvs) == nb_frames - start_frame + it_tvs = iter(tvs) + for image, ts in it_tvs: + assert (np.abs(image.astype(np.float) - + all_images[start_frame + nb_loaded_images].astype(np.float)) <= 1).all() + nb_loaded_images += 1 + assert nb_loaded_images == nb_frames - start_frame + + os.remove(tmp_output_video_filename) + assert not os.path.exists(tmp_output_video_filename) diff --git a/sdk/modules/core_ml/python/tests/unet_pytest.py b/sdk/modules/core_ml/python/tests/unet_pytest.py new file mode 100644 index 000000000..c2b03276c --- /dev/null +++ b/sdk/modules/core_ml/python/tests/unet_pytest.py @@ -0,0 +1,122 @@ +# Copyright (c) Prophesee S.A. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. +import torch +import torch.nn as nn +import torch.nn.functional as F + +from metavision_core_ml.core.temporal_modules import VideoSequential, ConvRNN, seq_wise +from metavision_core_ml.core.unet import unet_layers, Unet +from metavision_core_ml.core.modules import ConvLayer + + +class MergeSkip(nn.Module): + """ + Merge with skip connection + """ + + def __init__(self): + super().__init__() + + def forward(self, x, skip): + x = seq_wise(F.interpolate)(x, size=skip.shape[-2:], mode='bilinear', align_corners=False) + x = torch.cat((x, skip), dim=2) + return x + + +def pytestcase_feed_forward_unet(): + """ + We build a feedforward unet + """ + num_layers = 3 + base = 4 + downs = [base * 2**(i + 1) for i in range(num_layers)] + ups = [base * 2**(num_layers - i) for i in range(num_layers)] + + down = nn.Identity() + up = MergeSkip() + + # Trial Architecture + def enc_fun(x, y): + return VideoSequential(ConvLayer(x, y, stride=2)) + + def midd_fun(x, y): + return VideoSequential(ConvLayer(x, y)) + + def dec_fun(x, y): + return VideoSequential(ConvLayer(x, y)) + + encoders, decoders = unet_layers(enc_fun, midd_fun, dec_fun, base, downs, ups[0] * 2, ups) + net = Unet(encoders, decoders, down, up) + + t, b, c, h, w = 4, 3, base, 64, 64 + x = torch.randn(t, b, c, h, w) + y = net(x) + assert y.shape == torch.Size((t, b, ups[-1], h, w)) + + +def pytestcase_recurrent_unet(): + """ + We build a recurrent unet + """ + num_layers = 3 + base = 4 + downs = [base * 2**(i + 1) for i in range(num_layers)] + ups = [base * 2**(num_layers - i) for i in range(num_layers)] + + down = VideoSequential(nn.Upsample(scale_factor=0.5, mode='bilinear', align_corners=False)) + up = MergeSkip() + + # Trial Architecture + def enc_fun(x, y): + return ConvRNN(x, y, separable=True, separable_hidden=True) + + def midd_fun(x, y): + return VideoSequential(ConvLayer(x, y, separable=True)) + + def dec_fun(x, y): + return VideoSequential(ConvLayer(x, y, separable=True)) + + encoders, decoders = unet_layers(enc_fun, midd_fun, dec_fun, base, downs, ups[0] * 2, ups) + net = Unet(encoders, decoders, down, up) + + t, b, c, h, w = 4, 3, base, 64, 64 + x = torch.randn(t, b, c, h, w) + y = net(x) + assert y.shape == torch.Size((t, b, ups[-1], h, w)) + + +def pytestcase_grunet(): + """ + We build a GRU unet + """ + num_layers = 3 + base = 4 + downs = [base * 2**(i + 1) for i in range(num_layers)] + ups = [base * 2**(num_layers - i) for i in range(num_layers)] + + down = nn.Identity() + up = MergeSkip() + + # Trial Architecture + def enc_fun(x, y): + return VideoSequential(ConvLayer(x, y, stride=2)) + + def midd_fun(x, y): + return ConvRNN(x, y, cell="gru") + + def dec_fun(x, y): + return VideoSequential(ConvLayer(x, y)) + + encoders, decoders = unet_layers(enc_fun, midd_fun, dec_fun, base, downs, ups[0] * 2, ups) + net = Unet(encoders, decoders, down, up) + + t, b, h, w = 4, 3, 64, 64 + x = torch.randn(t, b, base, h, w) + y = net(x) + assert y.shape == torch.Size((t, b, ups[-1], h, w)) diff --git a/sdk/modules/driver/cpp/apps/metavision_raw_info/metavision_raw_info.cpp b/sdk/modules/driver/cpp/apps/metavision_raw_info/metavision_raw_info.cpp index e1ac203ec..705104773 100644 --- a/sdk/modules/driver/cpp/apps/metavision_raw_info/metavision_raw_info.cpp +++ b/sdk/modules/driver/cpp/apps/metavision_raw_info/metavision_raw_info.cpp @@ -106,7 +106,7 @@ int main(int argc, char *argv[]) { Metavision::RawFileHeader header(ifs); Metavision::Camera camera; try { - camera = Metavision::Camera::from_file(in_raw_file_path, false); + camera = Metavision::Camera::from_file(in_raw_file_path, false, Metavision::Future::RawFileConfig()); } catch (Metavision::CameraException &e) { MV_LOG_ERROR() << e.what(); return 1; @@ -115,7 +115,6 @@ int main(int argc, char *argv[]) { struct EventType { enum { CD = 0, ExtTrigger, Count }; }; - Metavision::timestamp duration = -1; std::array first_ts, last_ts; std::array num_events; std::array label_events{"CD", "External triggers"}; @@ -123,6 +122,15 @@ int main(int argc, char *argv[]) { std::fill(last_ts.begin(), last_ts.end(), -1); std::fill(num_events.begin(), num_events.end(), 0); + Metavision::timestamp duration = -1; + try { + auto &osc = camera.offline_streaming_control(); + while (!osc.is_ready()) { + std::this_thread::sleep_for(std::chrono::milliseconds(50)); + } + duration = osc.get_duration(); + } catch (Metavision::CameraException &e) {} + try { Metavision::CD &cd = camera.cd(); cd.add_callback( @@ -158,7 +166,8 @@ int main(int argc, char *argv[]) { } camera.stop(); - // update duration as the maximum timestamp ever found + // if needed (i.e if OfflineStreamingControl facility is unavailable), update duration as the maximum timestamp ever + // found for (size_t i = 0; i < EventType::Count; ++i) { duration = std::max(duration, last_ts[i]); } diff --git a/sdk/modules/driver/cpp/apps/metavision_raw_info/test/metavision_raw_info_pytest.py b/sdk/modules/driver/cpp/apps/metavision_raw_info/test/metavision_raw_info_pytest.py index 9889f0d95..7d70a3da9 100644 --- a/sdk/modules/driver/cpp/apps/metavision_raw_info/test/metavision_raw_info_pytest.py +++ b/sdk/modules/driver/cpp/apps/metavision_raw_info/test/metavision_raw_info_pytest.py @@ -27,8 +27,8 @@ def check_file_information(filename_full, expected_output): assert error_code == 0 # Now check output, after stripping them for trailing whitespaces - output_strip = "\n".join([line.strip() for line in output.splitlines()]) - expected_output_strip = "\n".join([line.strip() for line in expected_output.splitlines()]) + output_strip = pytest_tools.get_mv_info_stripped_output(output) + expected_output_strip = pytest_tools.get_mv_info_stripped_output(expected_output) assert re.search(expected_output_strip, output_strip) @@ -96,8 +96,8 @@ def pytestcase_test_metavision_raw_info_on_gen31_recording(dataset_dir): Path {} Duration 13s 43ms 33us Integrator Prophesee -Plugin name hal_plugin_gen31_fx3\w* -Event encoding (?:EVT2|2.0) +Plugin name hal_plugin_gen31_fx3 +Event encoding EVT2 Camera generation 3.1 Camera systemID \d* Camera serial 00001621 @@ -126,8 +126,8 @@ def pytestcase_test_metavision_raw_info_on_gen4_evt2_recording(dataset_dir): Path {} Duration 10s 442ms 743us Integrator Prophesee -Plugin name hal_plugin_gen4_fx3\w* -Event encoding (?:EVT2|2.0) +Plugin name hal_plugin_gen41_evk3 +Event encoding EVT2 Camera generation 4.0 Camera systemID \d* Camera subsystemID 537921537 @@ -155,19 +155,18 @@ def pytestcase_test_metavision_raw_info_on_gen4_evt3_recording(dataset_dir): Name {} Path {} -Duration 15s 445ms 502us +Duration 15s 441ms 920us Integrator Prophesee -Plugin name hal_plugin_gen4_fx3\w* -Event encoding (?:EVT3|3.0) +Plugin name hal_plugin_gen41_evk3 +Event encoding EVT3 Camera generation 4.0 Camera systemID \d* -Camera subsystemID 537921537 Camera serial 00001495 ==================================================================================================== Type of event Number of events First timestamp Last timestamp Average event rate ---------------------------------------------------------------------------------------------------- -CD 18453063 5714 15445502 1.2 Mev/s +CD 18094969 5714 15000125 1.2 Mev/s """.format(filename, re.escape(filename_full)) check_file_information(filename_full, expected_output) diff --git a/sdk/modules/driver/cpp/apps/metavision_raw_to_dat/test/metavision_raw_to_dat_pytest.py b/sdk/modules/driver/cpp/apps/metavision_raw_to_dat/test/metavision_raw_to_dat_pytest.py index d825399cd..5922e1ca2 100644 --- a/sdk/modules/driver/cpp/apps/metavision_raw_to_dat/test/metavision_raw_to_dat_pytest.py +++ b/sdk/modules/driver/cpp/apps/metavision_raw_to_dat/test/metavision_raw_to_dat_pytest.py @@ -256,7 +256,7 @@ def pytestcase_test_metavision_raw_to_dat_on_gen4_evt3_recording(dataset_dir): width_expected = 1280 height_expected = 720 - number_cd_expected = 18453063 + number_cd_expected = 18094969 first_10events_expected = [{'x': 922, 'y': 61, 'p': 0, 't': 5714}, {'x': 1181, 'y': 480, 'p': 1, 't': 5714}, {'x': 869, 'y': 702, 'p': 1, 't': 5715}, {'x': 1181, 'y': 480, 'p': 1, 't': 5717}, @@ -265,19 +265,21 @@ def pytestcase_test_metavision_raw_to_dat_on_gen4_evt3_recording(dataset_dir): {'x': 1181, 'y': 480, 'p': 1, 't': 5723}, {'x': 922, 'y': 61, 'p': 0, 't': 5725} ] - mid_10events_expected = [{'x': 546, 'y': 303, 'p': 1, 't': 7266906}, {'x': 1181, 'y': 480, 'p': 1, 't': 7266906}, - {'x': 865, 'y': 100, 'p': 1, 't': 7266907}, {'x': 922, 'y': 61, 'p': 0, 't': 7266907}, - {'x': 667, 'y': 328, 'p': 1, 't': 7266909}, {'x': 1181, 'y': 480, 'p': 1, 't': 7266909}, - {'x': 461, 'y': 243, 'p': 1, 't': 7266912}, {'x': 522, 'y': 325, 'p': 1, 't': 7266912}, - {'x': 1181, 'y': 480, 'p': 1, 't': 7266913}, {'x': 922, 'y': 61, 'p': 0, 't': 7266913} - ] + mid_10events_expected = [ + {'x': 417, 'y': 91, 'p': 0, 't': 7171644}, {'x': 608, 'y': 351, 'p': 1, 't': 7171644}, + {'x': 407, 'y': 167, 'p': 0, 't': 7171644}, {'x': 922, 'y': 61, 'p': 0, 't': 7171645}, + {'x': 864, 'y': 152, 'p': 0, 't': 7171645}, {'x': 1181, 'y': 480, 'p': 1, 't': 7171645}, + {'x': 375, 'y': 252, 'p': 0, 't': 7171646}, {'x': 547, 'y': 158, 'p': 0, 't': 7171647}, + {'x': 521, 'y': 336, 'p': 0, 't': 7171647}, {'x': 1099, 'y': 20, 'p': 0, 't': 7171647} + ] last_10events_expected = [ - {'x': 1181, 'y': 480, 'p': 1, 't': 15445493}, {'x': 785, 'y': 323, 'p': 1, 't': 15445494}, - {'x': 922, 'y': 61, 'p': 0, 't': 15445495}, {'x': 840, 'y': 392, 'p': 0, 't': 15445495}, - {'x': 1181, 'y': 480, 'p': 1, 't': 15445496}, {'x': 1181, 'y': 480, 'p': 1, 't': 15445499}, - {'x': 922, 'y': 61, 'p': 0, 't': 15445501}, {'x': 369, 'y': 477, 'p': 1, 't': 15445502}, - {'x': 687, 'y': 248, 'p': 0, 't': 15445502}, {'x': 1181, 'y': 480, 'p': 1, 't': 15445502}] + {'x': 510, 'y': 562, 'p': 1, 't': 15000115}, {'x': 922, 'y': 61, 'p': 0, 't': 15000117}, + {'x': 1181, 'y': 480, 'p': 1, 't': 15000117}, {'x': 369, 'y': 477, 'p': 1, 't': 15000119}, + {'x': 1175, 'y': 381, 'p': 0, 't': 15000119}, {'x': 1181, 'y': 480, 'p': 1, 't': 15000120}, + {'x': 442, 'y': 507, 'p': 1, 't': 15000121}, {'x': 922, 'y': 61, 'p': 0, 't': 15000122}, + {'x': 1181, 'y': 480, 'p': 1, 't': 15000123}, {'x': 315, 'y': 408, 'p': 1, 't': 15000125} + ] run_raw_to_dat_on_cd_recording_and_check_result( filename_full, width_expected, height_expected, number_cd_expected, diff --git a/sdk/modules/driver/cpp/apps/metavision_viewer/metavision_viewer.cpp b/sdk/modules/driver/cpp/apps/metavision_viewer/metavision_viewer.cpp index 7e3934aed..a61f730e4 100644 --- a/sdk/modules/driver/cpp/apps/metavision_viewer/metavision_viewer.cpp +++ b/sdk/modules/driver/cpp/apps/metavision_viewer/metavision_viewer.cpp @@ -83,13 +83,17 @@ int setup_cd_callback_and_window(Metavision::Camera &camera, cv::Mat &cd_frame, cv::namedWindow(window_name, CV_GUI_EXPANDED); cv::resizeWindow(window_name, geometry.width(), geometry.height()); cv::moveWindow(window_name, 0, 0); +#if (CV_MAJOR_VERSION == 3 && (CV_MINOR_VERSION * 100 + CV_SUBMINOR_VERSION) >= 408) || \ + (CV_MAJOR_VERSION == 4 && (CV_MINOR_VERSION * 100 + CV_SUBMINOR_VERSION) >= 102) + cv::setWindowProperty(window_name, cv::WND_PROP_TOPMOST, 1); +#endif return id; } namespace { std::atomic signal_caught{false}; -void sig_handler(int s) { +[[maybe_unused]] void sig_handler(int s) { MV_LOG_TRACE() << "Interrupt signal received." << std::endl; signal_caught = true; } @@ -255,9 +259,8 @@ int main(int argc, char *argv[]) { if (!cd_frame.empty()) { if (osd) { - const std::string text = - human_readable_time(cd_frame_ts) + " / " + - human_readable_time(camera.offline_streaming_control().get_seek_end_time()); + const std::string text = human_readable_time(cd_frame_ts) + " / " + + human_readable_time(camera.offline_streaming_control().get_duration()); cv::putText(cd_frame, text, cv::Point(10, 20), cv::FONT_HERSHEY_PLAIN, 1, cv::Scalar(108, 143, 255), 1, cv::LINE_AA); } diff --git a/sdk/modules/driver/cpp/include/metavision/sdk/driver/biases.h b/sdk/modules/driver/cpp/include/metavision/sdk/driver/biases.h index 75cde0a81..9547f642a 100644 --- a/sdk/modules/driver/cpp/include/metavision/sdk/driver/biases.h +++ b/sdk/modules/driver/cpp/include/metavision/sdk/driver/biases.h @@ -16,7 +16,6 @@ #include #include "metavision/hal/facilities/i_ll_biases.h" -#include "metavision/sdk/base/utils/detail/deprecated_feature.h" namespace Metavision { @@ -38,9 +37,6 @@ class Biases { /// @param dest_file the destination file void save_to_file(const std::string &dest_file) const; - /// @note This method is deprecated since version 2.1.0 and will be removed in next releases - METAVISION_DEPRECATED_FEATURE(2.1.0) std::string get_current_biases_file_path() const; - /// @brief Get corresponding facility in HAL library I_LL_Biases *get_facility() const; diff --git a/sdk/modules/driver/cpp/include/metavision/sdk/driver/camera.h b/sdk/modules/driver/cpp/include/metavision/sdk/driver/camera.h index 5353dd63d..0ca92865b 100644 --- a/sdk/modules/driver/cpp/include/metavision/sdk/driver/camera.h +++ b/sdk/modules/driver/cpp/include/metavision/sdk/driver/camera.h @@ -29,15 +29,9 @@ // Metavision SDK Driver CD handler class #include "metavision/sdk/driver/cd.h" -// Metavision EM handler class -#include "metavision/sdk/driver/em.h" - // Metavision SDK Driver External Trigger handler class #include "metavision/sdk/driver/ext_trigger.h" -// Metavision SDK IMU events handler class -#include "metavision/sdk/driver/imu.h" - // Metavision SDK Driver Trigger Out handler class #include "metavision/sdk/driver/trigger_out.h" @@ -47,21 +41,6 @@ // Metavision SDK Driver camera ROI handler #include "metavision/sdk/driver/roi.h" -// Metavision SDK Driver temperature events handler class -#include "metavision/sdk/driver/temperature.h" - -// Metavision SDK Driver illuminance events handler class -#include "metavision/sdk/driver/illuminance.h" - -// Metavision SDK driver camera IMU handler -#include "metavision/sdk/driver/imu_module.h" - -// Metavision SDK driver Temperature handler -#include "metavision/sdk/driver/temperature_module.h" - -// Metavision SDK driver Illuminance handler -#include "metavision/sdk/driver/illuminance_module.h" - // Metavision SDK driver Biases class #include "metavision/sdk/driver/biases.h" @@ -92,9 +71,6 @@ // Metavision SDK Driver NoiseFilterModule class #include "metavision/sdk/driver/noise_filter_module.h" -// Metavision SDK core deprecated feature util -#include "metavision/sdk/base/utils/detail/deprecated_feature.h" - namespace Metavision { /// @brief Online camera type input sources: USB, embedded, remote @@ -127,10 +103,6 @@ using RuntimeErrorCallback = std::function; /// @brief Callback type alias to be used with @ref Camera::add_status_change_callback using StatusChangeCallback = std::function; -/// @note This alias is deprecated since version 2.1.0 and will be removed in next releases -/// @brief Callback type alias to be used with @ref Camera::set_exposure_frame_callback -using ExposureFrameCallback = std::function; - /// @brief Struct with the current camera configuration. struct CameraConfiguration { /// @brief Serial number of the camera @@ -242,9 +214,6 @@ class Camera { static Camera from_file(const std::string &rawfile, bool realtime_playback_speed, const Future::RawFileConfig &file_config); - /// @note This method is deprecated since version 2.1.0 and will be removed in next releases - METAVISION_DEPRECATED_FEATURE(2.1.0) static bool synchronize_and_start_cameras(Camera &master, Camera &slave); - /// @brief Gets class to handle RAW data from the camera /// @throw CameraException if the camera has not been initialized. RawData &raw_data(); @@ -253,16 +222,10 @@ class Camera { /// @throw CameraException if the camera has not been initialized. CD &cd(); - /// @note This method is deprecated since version 2.1.0 and will be removed in next releases - METAVISION_DEPRECATED_FEATURE(2.1.0) EM &em(); - /// @brief Gets class to handle External Triggers events /// @throw CameraException if the camera has not been initialized. ExtTrigger &ext_trigger(); - /// @note This method is deprecated since version 2.1.0 and will be removed in next releases - METAVISION_DEPRECATED_FEATURE(2.1.0) Imu &imu(); - /// @brief Gets class to handle trigger out signal /// @throw CameraException if the camera has not been initialized. /// @throw CameraException in case of failure (for example if camera runs from an offline source). @@ -273,15 +236,6 @@ class Camera { /// running from an offline source). Roi &roi(); - /// @note This method is deprecated since version 2.1.0 and will be removed in next releases - METAVISION_DEPRECATED_FEATURE(2.1.0) Temperature &temperature(); - - /// @note This method is deprecated since version 2.1.0 and will be removed in next releases - METAVISION_DEPRECATED_FEATURE(2.1.0) Illuminance &illuminance(); - - /// @note This method is deprecated since version 2.1.0 and will be removed in next releases - METAVISION_DEPRECATED_FEATURE(2.1.0) ImuModule &imu_module(); - /// @brief Gets class to handle AFK on the hardware side /// @throw CameraException in case of failure (for instance if the camera is not initialized or the camera is /// running from an offline source). @@ -297,12 +251,6 @@ class Camera { /// running from an offline source). NoiseFilterModule &noise_filter_module(); - /// @note This method is deprecated since version 2.1.0 and will be removed in next releases - METAVISION_DEPRECATED_FEATURE(2.1.0) TemperatureModule &temperature_module(); - - /// @note This method is deprecated since version 2.1.0 and will be removed in next releases - METAVISION_DEPRECATED_FEATURE(2.1.0) IlluminanceModule &illuminance_module(); - /// @brief Registers a callback that will be called when a runtime error occurs /// /// When a camera runtime error occurs, the camera thread is left and events are no longer sent. @@ -339,14 +287,6 @@ class Camera { /// @return true if the callback has been unregistered correctly, false otherwise. bool remove_status_change_callback(CallbackId callback_id); - /// @note This method is deprecated since version 2.1.0 and will be removed in next releases - METAVISION_DEPRECATED_FEATURE(2.1.0) - void set_exposure_frame_callback(std::uint16_t fps, ExposureFrameCallback exposure_frame_callback, - bool allow_skipped_frames = false); - - /// @note This method is deprecated since version 2.1.0 and will be removed in next releases - METAVISION_DEPRECATED_FEATURE(2.1.0) bool unset_exposure_frame_callback(); - /// @brief Gets class to handle camera biases /// @throw CameraException in case of failure (for example if camera runs from an offline source). Biases &biases(); @@ -389,12 +329,6 @@ class Camera { /// running, this function returns false. bool stop(); - /// @note This method is deprecated since version 2.1.0 and will be removed in next releases - METAVISION_DEPRECATED_FEATURE(2.1.0) bool set_max_event_rate_limit(uint32_t rate_kEV_s); - - /// @note This method is deprecated since version 2.1.0 and will be removed in next releases - METAVISION_DEPRECATED_FEATURE(2.1.0) bool set_max_events_lifespan(timestamp max_events_lifespan_us); - /// @brief Records data from camera to a file with .raw extension /// /// The call to this function stops ongoing recording.\n diff --git a/sdk/modules/driver/cpp/include/metavision/sdk/driver/camera_generation.h b/sdk/modules/driver/cpp/include/metavision/sdk/driver/camera_generation.h index 3b830f40b..5b57652c2 100644 --- a/sdk/modules/driver/cpp/include/metavision/sdk/driver/camera_generation.h +++ b/sdk/modules/driver/cpp/include/metavision/sdk/driver/camera_generation.h @@ -14,16 +14,11 @@ #include -#include "metavision/sdk/base/utils/detail/deprecated_feature.h" - namespace Metavision { /// @brief Facility class to handle camera generation class CameraGeneration { public: - /// @deprecated This enum class is deprecated since version 2.1.0 and will be removed in next releases - enum class Type { CD, EM }; - /// @brief Destructor /// /// Deletes a CameraGeneration class instance. @@ -35,9 +30,6 @@ class CameraGeneration { /// @brief Returns the minor version of the camera's generation short version_minor() const; - /// @deprecated This method is deprecated since version 2.1.0 and will be removed in next releases - METAVISION_DEPRECATED_FEATURE(2.1.0) Type type() const; - /// @brief overrides "equal to" operator bool operator==(const CameraGeneration &c) const; diff --git a/sdk/modules/driver/cpp/include/metavision/sdk/driver/em.h b/sdk/modules/driver/cpp/include/metavision/sdk/driver/em.h deleted file mode 100644 index aafd695f9..000000000 --- a/sdk/modules/driver/cpp/include/metavision/sdk/driver/em.h +++ /dev/null @@ -1,56 +0,0 @@ -/********************************************************************************************************************** - * Copyright (c) Prophesee S.A. * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and limitations under the License. * - **********************************************************************************************************************/ - -#ifndef METAVISION_SDK_DRIVER_EM_H -#define METAVISION_SDK_DRIVER_EM_H - -#include -#include - -// Metavision SDK Base EM event -#include "metavision/sdk/base/events/event_em.h" - -// Definition of CallbackId -#include "metavision/sdk/base/utils/callback_id.h" - -namespace Metavision { - -/// @note This alias is deprecated since version 2.1.0 and will be removed in next releases -using EventsEMCallback = std::function; - -/// @note This class is deprecated since version 2.1.0 and will be removed in next releases -/// @brief Facility class to handle EM events -class EM { -public: - /// @brief Destructor - /// - /// Deletes a EM class instance. - virtual ~EM(); - - /// @brief Subscribes to EM events - /// - /// Registers a callback that will be called each time a buffer of EventEM has been decoded. - /// @param cb Callback to call each time a buffer of EventEM has been decoded - /// @sa @ref EventsEMCallback - /// @return ID of the added callback - CallbackId add_callback(const EventsEMCallback &cb); - - /// @brief Removes a previously registered callback - /// - /// @param callback_id Callback ID - /// @return true if the callback has been unregistered correctly, false otherwise. - /// @sa @ref add_callback - bool remove_callback(CallbackId callback_id); -}; - -} // namespace Metavision - -#endif // METAVISION_SDK_DRIVER_EM_H diff --git a/sdk/modules/driver/cpp/include/metavision/sdk/driver/illuminance.h b/sdk/modules/driver/cpp/include/metavision/sdk/driver/illuminance.h deleted file mode 100644 index 7bf19f977..000000000 --- a/sdk/modules/driver/cpp/include/metavision/sdk/driver/illuminance.h +++ /dev/null @@ -1,59 +0,0 @@ -/********************************************************************************************************************** - * Copyright (c) Prophesee S.A. * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and limitations under the License. * - **********************************************************************************************************************/ - -#ifndef METAVISION_SDK_DRIVER_ILLUMINANCE_H -#define METAVISION_SDK_DRIVER_ILLUMINANCE_H - -#include -#include - -// Metavision SDK Base Illuminance event -#include "metavision/sdk/base/events/event_illuminance.h" - -// Definition of CallbackId -#include "metavision/sdk/base/utils/callback_id.h" - -namespace Metavision { - -/// @note This alias is deprecated since version 2.1.0 and will be removed in next releases -/// @brief Callback type alias for @ref EventIlluminance -/// -/// @param begin @ref EventIlluminance pointer to the beginning of the buffer. -/// @param end @ref EventIlluminance pointer to the end of the buffer. -using EventsIlluminanceCallback = std::function; - -/// @brief Facility class to handle illuminance events -class Illuminance { -public: - /// @brief Destructor - /// - /// Deletes a Illuminance class instance. - virtual ~Illuminance(); - - /// @brief Subscribes to Illuminance events - /// - /// Registers a callback that will be called each time a buffer of EventIlluminance has been decoded. - /// @param cb Callback to call each time a buffer of EventIlluminance has been decoded - /// @sa @ref EventsIlluminanceCallback - /// @return ID of the added callback - CallbackId add_callback(const EventsIlluminanceCallback &cb); - - /// @brief Removes a previously registered callback - /// - /// @param callback_id Callback ID - /// @return true if the callback has been unregistered correctly, false otherwise - /// @sa @ref add_callback - bool remove_callback(CallbackId callback_id); -}; - -} // namespace Metavision - -#endif // METAVISION_SDK_DRIVER_ILLUMINANCE_H diff --git a/sdk/modules/driver/cpp/include/metavision/sdk/driver/imu.h b/sdk/modules/driver/cpp/include/metavision/sdk/driver/imu.h deleted file mode 100644 index 7ad95884b..000000000 --- a/sdk/modules/driver/cpp/include/metavision/sdk/driver/imu.h +++ /dev/null @@ -1,58 +0,0 @@ -/********************************************************************************************************************** - * Copyright (c) Prophesee S.A. * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and limitations under the License. * - **********************************************************************************************************************/ - -#ifndef METAVISION_SDK_DRIVER_IMU_H -#define METAVISION_SDK_DRIVER_IMU_H - -#include -#include - -// Metavision SDK Base Imu event -#include "metavision/sdk/base/events/event_imu.h" - -// Definition of CallbackId -#include "metavision/sdk/base/utils/callback_id.h" - -namespace Metavision { - -/// @note This alias is deprecated since version 2.1.0 and will be removed in next releases -/// @brief Callback type alias for @ref EventIMU -/// @param begin @ref EventIMU pointer to the beginning of the buffer. -/// @param end @ref EventIMU pointer to the end of the buffer. -using EventsImuCallback = std::function; - -/// @note This class is deprecated since version 2.1.0 and will be removed in next releases -/// @brief Facility class to handle imu events -class Imu { -public: - /// @brief Destructor - /// - /// Deletes a Imu class instance. - virtual ~Imu(); - - /// @brief Subscribes to Imu events - /// - /// Registers a callback that will be called each time a buffer of EventIMU has been decoded. - /// @param cb Callback to call each time a buffer of EventIMU has been decoded - /// @sa @ref EventsImuCallback - /// @return ID of the added callback - CallbackId add_callback(const EventsImuCallback &cb); - - /// @brief Removes a previously registered callback - /// @param callback_id Callback ID - /// @return true if the callback has been unregistered correctly, false otherwise. - /// @sa @ref add_callback - bool remove_callback(CallbackId callback_id); -}; - -} // namespace Metavision - -#endif // METAVISION_SDK_DRIVER_IMU_H diff --git a/sdk/modules/driver/cpp/include/metavision/sdk/driver/temperature.h b/sdk/modules/driver/cpp/include/metavision/sdk/driver/temperature.h deleted file mode 100644 index 5a601a958..000000000 --- a/sdk/modules/driver/cpp/include/metavision/sdk/driver/temperature.h +++ /dev/null @@ -1,60 +0,0 @@ -/********************************************************************************************************************** - * Copyright (c) Prophesee S.A. * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and limitations under the License. * - **********************************************************************************************************************/ - -#ifndef METAVISION_SDK_DRIVER_TEMPERATURE_H -#define METAVISION_SDK_DRIVER_TEMPERATURE_H - -#include -#include - -// Metavision SDK Base Temperature event -#include "metavision/sdk/base/events/event_temperature.h" - -// Definition of CallbackId -#include "metavision/sdk/base/utils/callback_id.h" - -namespace Metavision { - -/// @note This alias is deprecated since version 2.1.0 and will be removed in next releases -/// @brief Callback type alias for @ref EventTemperature -/// -/// @param begin @ref EventTemperature pointer to the beginning of the buffer. -/// @param end @ref EventTemperature pointer to the end of the buffer. -using EventsTemperatureCallback = std::function; - -/// @note This class is deprecated since version 2.1.0 and will be removed in next releases -/// @brief Facility class to handle temperature events -class Temperature { -public: - /// @brief Destructor - /// - /// Deletes a Temperature class instance. - virtual ~Temperature(); - - /// @brief Subscribes to Temperature events - /// - /// Registers a callback that will be called each time a buffer of EventTemperature has been decoded. - /// @param cb Callback to call each time a buffer of EventTemperature has been decoded - /// @sa @ref EventsTemperatureCallback - /// @return ID of the added callback - CallbackId add_callback(const EventsTemperatureCallback &cb); - - /// @brief Removes a previously registered callback - /// - /// @param callback_id Callback ID - /// @return true if the callback has been unregistered correctly, false otherwise - /// @sa @ref add_callback - bool remove_callback(CallbackId callback_id); -}; - -} // namespace Metavision - -#endif // METAVISION_SDK_DRIVER_TEMPERATURE_H diff --git a/sdk/modules/driver/cpp/samples/metavision_raw_to_csv/test/metavision_raw_to_csv_pytest.py b/sdk/modules/driver/cpp/samples/metavision_raw_to_csv/test/metavision_raw_to_csv_pytest.py index 936fc69df..fd0342fde 100644 --- a/sdk/modules/driver/cpp/samples/metavision_raw_to_csv/test/metavision_raw_to_csv_pytest.py +++ b/sdk/modules/driver/cpp/samples/metavision_raw_to_csv/test/metavision_raw_to_csv_pytest.py @@ -217,7 +217,7 @@ def pytestcase_test_metavision_raw_to_csv_on_gen4_evt3_recording(dataset_dir): filename = "gen4_evt3_hand.raw" filename_full = os.path.join(dataset_dir, "openeb", filename) - number_events_expected = 18453063 + number_events_expected = 18094969 first_10events_expected = [{'x': 922, 'y': 61, 'p': 0, 't': 5714}, {'x': 1181, 'y': 480, 'p': 1, 't': 5714}, {'x': 869, 'y': 702, 'p': 1, 't': 5715}, {'x': 1181, 'y': 480, 'p': 1, 't': 5717}, @@ -226,19 +226,20 @@ def pytestcase_test_metavision_raw_to_csv_on_gen4_evt3_recording(dataset_dir): {'x': 1181, 'y': 480, 'p': 1, 't': 5723}, {'x': 922, 'y': 61, 'p': 0, 't': 5725} ] - mid_10events_expected = [{'x': 546, 'y': 303, 'p': 1, 't': 7266906}, {'x': 1181, 'y': 480, 'p': 1, 't': 7266906}, - {'x': 865, 'y': 100, 'p': 1, 't': 7266907}, {'x': 922, 'y': 61, 'p': 0, 't': 7266907}, - {'x': 667, 'y': 328, 'p': 1, 't': 7266909}, {'x': 1181, 'y': 480, 'p': 1, 't': 7266909}, - {'x': 461, 'y': 243, 'p': 1, 't': 7266912}, {'x': 522, 'y': 325, 'p': 1, 't': 7266912}, - {'x': 1181, 'y': 480, 'p': 1, 't': 7266913}, {'x': 922, 'y': 61, 'p': 0, 't': 7266913} - ] + mid_10events_expected = [ + {'x': 417, 'y': 91, 'p': 0, 't': 7171644}, {'x': 608, 'y': 351, 'p': 1, 't': 7171644}, + {'x': 407, 'y': 167, 'p': 0, 't': 7171644}, {'x': 922, 'y': 61, 'p': 0, 't': 7171645}, + {'x': 864, 'y': 152, 'p': 0, 't': 7171645}, {'x': 1181, 'y': 480, 'p': 1, 't': 7171645}, + {'x': 375, 'y': 252, 'p': 0, 't': 7171646}, {'x': 547, 'y': 158, 'p': 0, 't': 7171647}, + {'x': 521, 'y': 336, 'p': 0, 't': 7171647}, {'x': 1099, 'y': 20, 'p': 0, 't': 7171647} + ] last_10events_expected = [ - {'x': 1181, 'y': 480, 'p': 1, 't': 15445493}, {'x': 785, 'y': 323, 'p': 1, 't': 15445494}, - {'x': 922, 'y': 61, 'p': 0, 't': 15445495}, {'x': 840, 'y': 392, 'p': 0, 't': 15445495}, - {'x': 1181, 'y': 480, 'p': 1, 't': 15445496}, {'x': 1181, 'y': 480, 'p': 1, 't': 15445499}, - {'x': 922, 'y': 61, 'p': 0, 't': 15445501}, {'x': 369, 'y': 477, 'p': 1, 't': 15445502}, - {'x': 687, 'y': 248, 'p': 0, 't': 15445502}, {'x': 1181, 'y': 480, 'p': 1, 't': 15445502} + {'x': 510, 'y': 562, 'p': 1, 't': 15000115}, {'x': 922, 'y': 61, 'p': 0, 't': 15000117}, + {'x': 1181, 'y': 480, 'p': 1, 't': 15000117}, {'x': 369, 'y': 477, 'p': 1, 't': 15000119}, + {'x': 1175, 'y': 381, 'p': 0, 't': 15000119}, {'x': 1181, 'y': 480, 'p': 1, 't': 15000120}, + {'x': 442, 'y': 507, 'p': 1, 't': 15000121}, {'x': 922, 'y': 61, 'p': 0, 't': 15000122}, + {'x': 1181, 'y': 480, 'p': 1, 't': 15000123}, {'x': 315, 'y': 408, 'p': 1, 't': 15000125} ] run_raw_to_csv_and_check_result(filename_full, number_events_expected, first_10events_expected, diff --git a/sdk/modules/driver/cpp/src/CMakeLists.txt b/sdk/modules/driver/cpp/src/CMakeLists.txt index c98743d49..1308910f6 100644 --- a/sdk/modules/driver/cpp/src/CMakeLists.txt +++ b/sdk/modules/driver/cpp/src/CMakeLists.txt @@ -14,19 +14,12 @@ target_sources(metavision_sdk_driver PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/camera_generation.cpp ${CMAKE_CURRENT_SOURCE_DIR}/camera.cpp ${CMAKE_CURRENT_SOURCE_DIR}/cd.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/em.cpp ${CMAKE_CURRENT_SOURCE_DIR}/erc_module.cpp ${CMAKE_CURRENT_SOURCE_DIR}/ext_trigger.cpp ${CMAKE_CURRENT_SOURCE_DIR}/geometry.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/illuminance.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/illuminance_module.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/imu.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/imu_module.cpp ${CMAKE_CURRENT_SOURCE_DIR}/offline_streaming_control.cpp ${CMAKE_CURRENT_SOURCE_DIR}/noise_filter_module.cpp ${CMAKE_CURRENT_SOURCE_DIR}/raw_data.cpp ${CMAKE_CURRENT_SOURCE_DIR}/roi.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/temperature.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/temperature_module.cpp ${CMAKE_CURRENT_SOURCE_DIR}/trigger_out.cpp ) \ No newline at end of file diff --git a/sdk/modules/driver/cpp/src/biases.cpp b/sdk/modules/driver/cpp/src/biases.cpp index f9983c6cf..581ada699 100644 --- a/sdk/modules/driver/cpp/src/biases.cpp +++ b/sdk/modules/driver/cpp/src/biases.cpp @@ -122,10 +122,6 @@ void Biases::save_to_file(const std::string &dest_file) const { output_file.close(); } -std::string Biases::get_current_biases_file_path() const { - throw CameraException(CameraErrorCode::DeprecatedFeature, "Current biases file not available."); -} - I_LL_Biases *Biases::get_facility() const { return pimpl_; } diff --git a/sdk/modules/driver/cpp/src/camera.cpp b/sdk/modules/driver/cpp/src/camera.cpp index 821846c7c..f561e76e0 100644 --- a/sdk/modules/driver/cpp/src/camera.cpp +++ b/sdk/modules/driver/cpp/src/camera.cpp @@ -924,12 +924,6 @@ Camera Camera::from_file(const std::string &rawfile, bool realtime_playback_spee return Camera(new Private(rawfile, file_config, realtime_playback_speed)); } -bool Camera::synchronize_and_start_cameras(Camera &master, Camera &slave) { - throw CameraException( - CameraErrorCode::DeprecatedFeature, - "Cameras synchronization not available with Metavision SDK Driver. Use Metavision HAL instead."); -} - RawData &Camera::raw_data() { return pimpl_->raw_data(); } @@ -938,18 +932,10 @@ CD &Camera::cd() { return pimpl_->cd(); } -EM &Camera::em() { - throw CameraException(CameraErrorCode::DeprecatedFeature, "EM not available."); -} - ExtTrigger &Camera::ext_trigger() { return pimpl_->ext_trigger(); } -Imu &Camera::imu() { - throw CameraException(CameraErrorCode::DeprecatedFeature, "Imu not available."); -} - AntiFlickerModule &Camera::antiflicker_module() { return pimpl_->antiflicker_module(); } @@ -970,35 +956,6 @@ Roi &Camera::roi() { return pimpl_->roi(); } -Temperature &Camera::temperature() { - throw CameraException(CameraErrorCode::DeprecatedFeature, "Temperature not available."); -} - -Illuminance &Camera::illuminance() { - throw CameraException(CameraErrorCode::DeprecatedFeature, "Illuminance not available."); -} - -ImuModule &Camera::imu_module() { - throw CameraException(CameraErrorCode::DeprecatedFeature, "ImuModule not available."); -} - -TemperatureModule &Camera::temperature_module() { - throw CameraException(CameraErrorCode::DeprecatedFeature, "TemperatureModule not available."); -} - -IlluminanceModule &Camera::illuminance_module() { - throw CameraException(CameraErrorCode::DeprecatedFeature, "IlluminanceModule not available."); -} - -void Camera::set_exposure_frame_callback(std::uint16_t fps, ExposureFrameCallback exposure_frame_callback, - bool allow_skipped_frames) { - throw CameraException(CameraErrorCode::DeprecatedFeature, "Exposure Frame Callback not available."); -} - -bool Camera::unset_exposure_frame_callback() { - throw CameraException(CameraErrorCode::DeprecatedFeature, "Exposure Frame Callback not available."); -} - CallbackId Camera::add_runtime_error_callback(RuntimeErrorCallback error_callback) { return pimpl_->add_runtime_error_callback(error_callback); } @@ -1031,14 +988,6 @@ const CameraGeneration &Camera::generation() const { return pimpl_->generation(); } -bool Camera::set_max_event_rate_limit(uint32_t rate_kEV_s) { - throw CameraException(CameraErrorCode::DeprecatedFeature, "Cannot set event rate limit."); -} - -bool Camera::set_max_events_lifespan(timestamp max_events_lifespan_us) { - throw CameraException(CameraErrorCode::DeprecatedFeature, "Cannot set max events lifespan."); -} - bool Camera::start() { return pimpl_->start(); } diff --git a/sdk/modules/driver/cpp/src/camera_generation.cpp b/sdk/modules/driver/cpp/src/camera_generation.cpp index f93c8d4bf..b621cdccd 100644 --- a/sdk/modules/driver/cpp/src/camera_generation.cpp +++ b/sdk/modules/driver/cpp/src/camera_generation.cpp @@ -45,10 +45,6 @@ short CameraGeneration::version_minor() const { return pimpl_->minor_; } -CameraGeneration::Type CameraGeneration::type() const { - throw CameraException(CameraErrorCode::DeprecatedFeature, "type not supported anymore."); -} - CameraGeneration::Private &CameraGeneration::get_pimpl() { return *pimpl_; } diff --git a/sdk/modules/driver/cpp/src/offline_streaming_control.cpp b/sdk/modules/driver/cpp/src/offline_streaming_control.cpp index 3b2100e12..61ec80d22 100644 --- a/sdk/modules/driver/cpp/src/offline_streaming_control.cpp +++ b/sdk/modules/driver/cpp/src/offline_streaming_control.cpp @@ -104,10 +104,17 @@ timestamp OfflineStreamingControl::Private::get_duration() const { return duration_; } Camera cam = Camera::from_file(i_events_stream_->get_underlying_filename(), false, Future::RawFileConfig()); - cam.cd().add_callback([this](const EventCD *begin, const EventCD *end) { duration_ = std::prev(end)->t; }); + cam.cd().add_callback( + [this](const EventCD *begin, const EventCD *end) { duration_ = std::max(duration_, std::prev(end)->t); }); cam.offline_streaming_control().seek(get_seek_end_time()); cam.start(); + bool seek_done = false; while (cam.is_running()) { + if (!seek_done && cam.offline_streaming_control().is_ready()) { + cam.offline_streaming_control().seek(cam.offline_streaming_control().get_seek_end_time()); + duration_ = std::max(duration_, cam.offline_streaming_control().get_seek_end_time()); + seek_done = true; + } std::this_thread::yield(); } return duration_; diff --git a/sdk/modules/driver/cpp/src/temperature.cpp b/sdk/modules/driver/cpp/src/temperature.cpp deleted file mode 100644 index fed4d4b64..000000000 --- a/sdk/modules/driver/cpp/src/temperature.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/********************************************************************************************************************** - * Copyright (c) Prophesee S.A. * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and limitations under the License. * - **********************************************************************************************************************/ - -#include "metavision/sdk/driver/temperature.h" -#include "metavision/sdk/driver/camera_exception.h" - -namespace Metavision { - -Temperature::~Temperature() {} - -CallbackId Temperature::add_callback(const EventsTemperatureCallback &cb) { - throw CameraException(CameraErrorCode::DeprecatedFeature, "Temperature not available."); -} - -bool Temperature::remove_callback(CallbackId callback_id) { - throw CameraException(CameraErrorCode::DeprecatedFeature, "Temperature not available."); -} - -} // namespace Metavision diff --git a/sdk/modules/driver/cpp/tests/biases_gtest.cpp b/sdk/modules/driver/cpp/tests/biases_gtest.cpp index 4d0558e93..33b5ca9ed 100644 --- a/sdk/modules/driver/cpp/tests/biases_gtest.cpp +++ b/sdk/modules/driver/cpp/tests/biases_gtest.cpp @@ -307,22 +307,6 @@ TEST_F(Biases_GTest, save_to_file_when_passing_invalid_filename) { } } -DISABLE_WARNING("deprecated-declarations", "deprecated-declarations", 4996) -TEST_F(Biases_GTest, get_current_biases_file_path) { - // GIVEN a Biases instance - // Biases instance already built in the ctor of class Biases_GTest - - try { - // WHEN trying to get current biases file path - biases_->get_current_biases_file_path(); - FAIL() << "Expected exception Metavision::CameraErrorCode::DeprecatedFeature"; - } catch (const Metavision::CameraException &err) { - // THEN it throws an exception - EXPECT_EQ(err.code().value(), Metavision::CameraErrorCode::DeprecatedFeature); - } -} -ENABLE_WARNING("deprecated-declarations", "deprecated-declarations", 4996) - TEST_F(Biases_GTest, get_facility) { // GIVEN a Biases instance // Biases instance already built in the ctor of class Biases_GTest diff --git a/sdk/modules/driver/cpp/tests/camera_gtest.cpp b/sdk/modules/driver/cpp/tests/camera_gtest.cpp index 6e4942f9d..5fa8437f0 100644 --- a/sdk/modules/driver/cpp/tests/camera_gtest.cpp +++ b/sdk/modules/driver/cpp/tests/camera_gtest.cpp @@ -293,23 +293,6 @@ TEST_F(Camera_Gtest, basic_exceptions) { FAIL(); } catch (CameraException &e) { ASSERT_EQ(e.code().value(), CameraErrorCode::CameraNotFound); } - try { - camera.em().add_callback([](const EventEM *, const EventEM *) {}); - std::cout << "Should have thrown exception..." << std::endl; - FAIL(); - } catch (CameraException &e) { ASSERT_EQ(e.code().value(), CameraErrorCode::DeprecatedFeature); } - - try { - camera.set_max_event_rate_limit(12); - std::cout << "Should have thrown exception..." << std::endl; - FAIL(); - } catch (CameraException &e) { ASSERT_EQ(e.code().value(), CameraErrorCode::DeprecatedFeature); } - - try { - camera.set_max_events_lifespan(12); - std::cout << "Should have thrown exception..." << std::endl; - FAIL(); - } catch (CameraException &e) { ASSERT_EQ(e.code().value(), CameraErrorCode::DeprecatedFeature); } try { camera.stop_recording(); std::cout << "Should have thrown exception..." << std::endl; @@ -359,15 +342,6 @@ TEST_F_WITH_CAMERA(Camera_Gtest, camera_set_biases) { camera = Camera::from_serial(GtestsParameters::instance().serial); } - try { - camera.biases().get_current_biases_file_path(); - std::cout << "Should have thrown exception..." << std::endl; - FAIL(); - } catch (CameraException &e) { - // internal errors should appear to the user as the main category error - ASSERT_EQ(CameraErrorCode::DeprecatedFeature, e.code().value()); - } - try { camera.biases().set_from_file("not_a_bias_file.yolo"); std::cout << "Should have thrown exception..." << std::endl; @@ -689,19 +663,6 @@ TEST_F(Camera_Gtest, raw_file_logger) { ASSERT_TRUE(boost::filesystem::exists(file)); } -#ifndef _WIN32 // REMARK We skip the following tests because on Bamboo we do not do make install to avoid conflicts when - // building different branches - // (it is not in docker as on linux), so the config file is not installed -#ifndef __ANDROID__ - -TEST_F(Camera_Gtest, drop_is_deprecated) { - write_evt2_raw_data(); - Camera camera = Camera::from_file(tmp_file_); - ASSERT_THROW(camera.set_max_event_rate_limit(10), CameraException); -} -#endif // __ANDROID__ -#endif // _WIN32 - TEST_F(Camera_Gtest, start_stop) { write_evt2_raw_data(); @@ -875,7 +836,6 @@ TEST_F(Camera_Gtest, raw_events_callbacks_decoding_check) { } catch (CameraException &e) { FAIL(); } Future::I_Decoder *i_decoder = camera.get_pimpl().i_future_decoder_; - I_Decoder *i_old_decoder_ = camera.get_pimpl().i_decoder_; I_EventDecoder *i_cd_events_decoder = camera.get_pimpl().device_->get_facility>(); ASSERT_TRUE(i_cd_events_decoder); @@ -886,14 +846,10 @@ TEST_F(Camera_Gtest, raw_events_callbacks_decoding_check) { } }); - camera.raw_data().add_callback([i_decoder, i_old_decoder_](const uint8_t *data, size_t size) { + camera.raw_data().add_callback([i_decoder](const uint8_t *data, size_t size) { auto raw_data_begin = const_cast(data); auto raw_data_end = const_cast(data + size); - if (i_decoder) { - i_decoder->decode(raw_data_begin, raw_data_end); - } else { - i_old_decoder_->decode(raw_data_begin, raw_data_end); - } + i_decoder->decode(raw_data_begin, raw_data_end); }); camera.start(); @@ -903,14 +859,12 @@ TEST_F(Camera_Gtest, raw_events_callbacks_decoding_check) { } timestamp ts_shift; - if (i_decoder) { - ASSERT_TRUE(i_decoder->get_timestamp_shift(ts_shift)); - } else { - ASSERT_TRUE(i_old_decoder_->get_timestamp_shift(ts_shift)); - } + ASSERT_TRUE(i_decoder->get_timestamp_shift(ts_shift)); ASSERT_EQ(expected_events.size(), received_events.size()); - for (size_t i = 0; i < expected_events.size(); ++i) { + + using SizeType = std::vector::size_type; + for (SizeType i = 0; i < expected_events.size(); ++i) { ASSERT_EQ(expected_events[i].x, received_events[i].x); ASSERT_EQ(expected_events[i].y, received_events[i].y); ASSERT_EQ(expected_events[i].p, received_events[i].p); @@ -1294,7 +1248,9 @@ TEST_F(Camera_Gtest, decode_evt2_data) { ASSERT_EQ(expected_events.size(), received_events.size()); timestamp time_shift = -1; - for (size_t i = 0, i_end = expected_events.size(); i < i_end; ++i) { + + using SizeType = std::vector::size_type; + for (SizeType i = 0, i_end = expected_events.size(); i < i_end; ++i) { ASSERT_EQ(expected_events[i].x, received_events[i].x); ASSERT_EQ(expected_events[i].y, received_events[i].y); ASSERT_EQ(expected_events[i].p, received_events[i].p); @@ -1327,8 +1283,8 @@ TEST_F_WITH_DATASET(Camera_Gtest, decode_evt3_data) { } camera.stop(); - ASSERT_EQ(18453063, n_cd_decoded); - ASSERT_EQ(98794244, n_raw); + ASSERT_EQ(18094969, n_cd_decoded); + ASSERT_EQ(96786804, n_raw); } TEST_F_WITH_DATASET(Camera_Gtest, offline_streaming_control_not_ready) { @@ -1344,11 +1300,6 @@ TEST_F_WITH_DATASET(Camera_Gtest, offline_streaming_control_not_ready) { // With this function, index building is not requested, so OSC is never ready Camera camera = Camera::from_file(dataset); - if (camera.get_device().get_facility() == nullptr) { - GTEST_SUCCESS_("Disabled while waiting for RAW plugins to support seeking in MV-227"); - return; - } - ASSERT_NO_THROW(camera.offline_streaming_control()); std::this_thread::sleep_for(std::chrono::milliseconds(100)); @@ -1370,11 +1321,6 @@ TEST_F_WITH_DATASET(Camera_Gtest, offline_streaming_control_ready) { // With this function, index building is requested, so OSC should be ready Camera camera = Camera::from_file(dataset, false, Metavision::Future::RawFileConfig()); - if (camera.get_device().get_facility() == nullptr) { - GTEST_SUCCESS_("Disabled while waiting for RAW plugins to support seeking in MV-227"); - return; - } - ASSERT_NO_THROW(camera.offline_streaming_control()); bool ready = false; @@ -1397,22 +1343,15 @@ TEST_F_WITH_DATASET(Camera_Gtest, offline_streaming_control_seek_range) { (boost::filesystem::path(GtestsParameters::instance().dataset_dir) / "openeb" / "gen4_evt3_hand.raw").string()}; std::vector> ranges = { - {16, 13040000}, {49, 10440000}, {5714, 15442000}}; + {16, 13042000}, {49, 10442000}, {5714, 15441920}}; size_t i = 0; for (const auto &dataset : datasets) { Camera camera = Camera::from_file(dataset, false, Metavision::Future::RawFileConfig()); - if (camera.get_device().get_facility() == nullptr) { - GTEST_SUCCESS_("Disabled while waiting for RAW plugins to support seeking in MV-227"); - return; - } - - bool ready = false; int max_trials = 1000; for (int i = 0; i < max_trials; ++i) { if (camera.offline_streaming_control().is_ready()) { - ready = true; break; } std::this_thread::sleep_for(std::chrono::milliseconds(100)); @@ -1431,17 +1370,12 @@ TEST_F_WITH_DATASET(Camera_Gtest, offline_streaming_control_seeks) { (boost::filesystem::path(GtestsParameters::instance().dataset_dir) / "openeb" / "gen4_evt3_hand.raw").string()}; std::vector> ranges = { - {16, 13042000}, {49, 10442000}, {4096, 15444000}}; + {16, 13042000}, {49, 10442000}, {5714, 15441920}}; size_t i = 0; for (const auto &dataset : datasets) { Camera camera = Camera::from_file(dataset, false, Metavision::Future::RawFileConfig()); - if (camera.get_device().get_facility() == nullptr) { - GTEST_SUCCESS_("Disabled while waiting for RAW plugins to support seeking in MV-227"); - return; - } - std::atomic decoded{false}; Metavision::timestamp ts, last_ts = 0; camera.cd().add_callback([&](const EventCD *begin, const EventCD *end) { @@ -1453,11 +1387,9 @@ TEST_F_WITH_DATASET(Camera_Gtest, offline_streaming_control_seeks) { last_ts = std::prev(end)->t; }); - bool ready = false; int max_trials = 1000; for (int i = 0; i < max_trials; ++i) { if (camera.offline_streaming_control().is_ready()) { - ready = true; break; } std::this_thread::sleep_for(std::chrono::milliseconds(100)); @@ -1482,11 +1414,12 @@ TEST_F_WITH_DATASET(Camera_Gtest, offline_streaming_control_seeks) { std::vector targets; const timestamp timestamp_step = (ranges[i].second - ranges[i].first) / 10; - for (uint32_t step = 1; step <= 10; ++step) { + for (uint32_t step = 0; step < 10; ++step) { targets.push_back(ranges[i].first + step * timestamp_step); } - for (size_t j = 0; j < targets.size(); ++j) { + using SizeType = std::vector::size_type; + for (SizeType j = 0; j < targets.size(); ++j) { auto target = j % 2 ? targets[targets.size() - j] : targets[j]; decoded = false; diff --git a/sdk/modules/driver/cpp/tests/camera_stage_gtest.cpp b/sdk/modules/driver/cpp/tests/camera_stage_gtest.cpp index 30d402505..5a1b8317d 100644 --- a/sdk/modules/driver/cpp/tests/camera_stage_gtest.cpp +++ b/sdk/modules/driver/cpp/tests/camera_stage_gtest.cpp @@ -123,19 +123,15 @@ TEST_F(CameraStage_Gtest, camera_stage_produces_correct_events) { const auto &device = cam_stage.camera().get_pimpl().device_; ASSERT_TRUE(device); - const auto &future_decoder = device->get_facility(); - const auto &decoder = device->get_facility(); + const auto &decoder = device->get_facility(); - ASSERT_TRUE(future_decoder || decoder); + ASSERT_TRUE(decoder); - if (future_decoder) { - EXPECT_TRUE(future_decoder->get_timestamp_shift(tshift)); - } else if (decoder) { - EXPECT_TRUE(decoder->get_timestamp_shift(tshift)); - } + EXPECT_TRUE(decoder->get_timestamp_shift(tshift)); } - for (size_t i = 0; i < ref_data.size(); ++i) { + using SizeType = std::vector::size_type; + for (SizeType i = 0; i < ref_data.size(); ++i) { EXPECT_EQ(ref_data[i].x, mock_stage.events_received_[i].x); EXPECT_EQ(ref_data[i].y, mock_stage.events_received_[i].y); EXPECT_EQ(ref_data[i].t, mock_stage.events_received_[i].t + tshift); diff --git a/sdk/modules/ui/cmake/MetavisionSDK_uiCPackConfig.cmake b/sdk/modules/ui/cmake/MetavisionSDK_uiCPackConfig.cmake index 316662f63..c9e5625ab 100644 --- a/sdk/modules/ui/cmake/MetavisionSDK_uiCPackConfig.cmake +++ b/sdk/modules/ui/cmake/MetavisionSDK_uiCPackConfig.cmake @@ -25,8 +25,10 @@ string(REPLACE ";" ", " CPACK_DEBIAN_METAVISION-SDK-UI-DEV_PACKAGE_DEPENDS "${CP set(CPACK_COMPONENT_METAVISION-SDK-UI-SAMPLES_DESCRIPTION "Samples for Metavision SDK UI library.\n${OPEN_PACKAGE_LICENSE}") set(CPACK_COMPONENT_METAVISION-SDK-UI-SAMPLES_DEPENDS metavision-sdk-ui-dev metavision-sdk-base-dev) -# Python bindings -foreach (py_suffix ${PYTHON3_ALL_VERSIONS}) - set(CPACK_COMPONENT_METAVISION-SDK-UI-PYTHON${py_suffix}_DESCRIPTION "Metavision SDK UI Python 3 libraries.\n${OPEN_PACKAGE_LICENSE}") - set(CPACK_COMPONENT_METAVISION-SDK-UI-PYTHON${py_suffix}_DEPENDS metavision-sdk-base-lib metavision-sdk-ui-lib metavision-sdk-base-python${py_suffix} metavision-sdk-core-python${py_suffix}) -endforeach() \ No newline at end of file +if (COMPILE_PYTHON3_BINDINGS) + # Python bindings + foreach (py_suffix ${PYTHON3_ALL_VERSIONS}) + set(CPACK_COMPONENT_METAVISION-SDK-UI-PYTHON${py_suffix}_DESCRIPTION "Metavision SDK UI Python 3 libraries.\n${OPEN_PACKAGE_LICENSE}") + set(CPACK_COMPONENT_METAVISION-SDK-UI-PYTHON${py_suffix}_DEPENDS metavision-sdk-base-lib metavision-sdk-ui-lib metavision-sdk-base-python${py_suffix} metavision-sdk-core-python${py_suffix}) + endforeach() +endif (COMPILE_PYTHON3_BINDINGS) diff --git a/standalone_samples/metavision_evt2_raw_file_encoder/metavision_evt2_raw_file_encoder.cpp b/standalone_samples/metavision_evt2_raw_file_encoder/metavision_evt2_raw_file_encoder.cpp index 619ce04be..a0b76f235 100644 --- a/standalone_samples/metavision_evt2_raw_file_encoder/metavision_evt2_raw_file_encoder.cpp +++ b/standalone_samples/metavision_evt2_raw_file_encoder/metavision_evt2_raw_file_encoder.cpp @@ -248,7 +248,7 @@ int main(int argc, char *argv[]) { Metavision::Evt2::RawEvent *raw_events_end_ptr = raw_events_current_ptr + kSizeBuffer; // Determine the timestamp of the oldest event - Metavision::Evt2::Timestamp first_ts; + Metavision::Evt2::Timestamp first_ts = 0; if (!cd_done) { first_ts = CD_events_encoder.t; } diff --git a/utils/cpp/pybind/include/metavision/utils/pybind/py_array_to_cv_mat.h b/utils/cpp/pybind/include/metavision/utils/pybind/py_array_to_cv_mat.h index 8481d23ae..fa480caeb 100644 --- a/utils/cpp/pybind/include/metavision/utils/pybind/py_array_to_cv_mat.h +++ b/utils/cpp/pybind/include/metavision/utils/pybind/py_array_to_cv_mat.h @@ -31,7 +31,7 @@ inline void py_array_to_cv_mat(const py::array &py_image, cv::Mat &output_cv_mat throw std::invalid_argument("Incompatible input dtype. Must be np.ubyte."); const size_t num_channels = (colored ? 3 : 2); - if (py_image.ndim() != num_channels) { + if (static_cast(py_image.ndim()) != num_channels) { std::stringstream ss; ss << "Incompatible dimensions number. Must be a " << num_channels << " dimensional image."; throw std::invalid_argument(ss.str()); diff --git a/utils/python/metavision_utils/pytest_tools.py b/utils/python/metavision_utils/pytest_tools.py index 9ac28717b..b400d1ad2 100644 --- a/utils/python/metavision_utils/pytest_tools.py +++ b/utils/python/metavision_utils/pytest_tools.py @@ -40,6 +40,13 @@ def run_cmd_setting_mv_log_file(cmd, **kwargs): return output, error_code +def get_mv_info_stripped_output(res): + lines = res.splitlines() + for i in range(len(lines)): + if lines[i].startswith("="): + return "\n".join([line.strip() for line in lines[i:]]) + + def compare_lists(list_1, list_2): """"Compares two lists diff --git a/utils/scripts/setup_env.bat.in b/utils/scripts/setup_env.bat.in index 783474eeb..290b63166 100644 --- a/utils/scripts/setup_env.bat.in +++ b/utils/scripts/setup_env.bat.in @@ -12,5 +12,5 @@ rem See the License for the specific language governing permissions and limitati if not "%~1" == "" setlocal set PATH=@_CMAKE_RUNTIME_OUTPUT_DIRECTORY@;%PATH% set MV_HAL_PLUGIN_PATH=@_HAL_BUILD_PLUGIN_PATH@ -set PYTHONPATH=@_PYTHON3_OUTPUT_DIR@;@_CMAKE_SOURCE_DIR@\sdk\modules\core\python\pypkg;@_CMAKE_SOURCE_DIR@\sdk\modules\ml\python\pypkg;@_CMAKE_SOURCE_DIR@\sdk\modules\ml\python_extended\pypkg;%PYTHONPATH% -if not "%~1" == "" cmd /c %* \ No newline at end of file +set PYTHONPATH=@_PYTHON3_OUTPUT_DIR@;@_CMAKE_SOURCE_DIR@\sdk\modules\core\python\pypkg;@_CMAKE_SOURCE_DIR@\sdk\modules\ml\python\pypkg;@_CMAKE_SOURCE_DIR@\sdk\modules\ml\python_extended\pypkg;@_CMAKE_SOURCE_DIR@\sdk\modules\core_ml\python\pypkg;%PYTHONPATH% +if not "%~1" == "" cmd /c %* diff --git a/utils/scripts/setup_env.sh.in b/utils/scripts/setup_env.sh.in index 9c2e7116a..9744036c2 100644 --- a/utils/scripts/setup_env.sh.in +++ b/utils/scripts/setup_env.sh.in @@ -11,5 +11,5 @@ export PATH=@CMAKE_RUNTIME_OUTPUT_DIRECTORY@:$PATH export MV_HAL_PLUGIN_PATH=@HAL_BUILD_PLUGIN_PATH@ -export PYTHONPATH=@PYTHON3_OUTPUT_DIR@:@CMAKE_SOURCE_DIR@/sdk/modules/core/python/pypkg:@CMAKE_SOURCE_DIR@/sdk/modules/ml/python/pypkg:@CMAKE_SOURCE_DIR@/sdk/modules/ml/python_extended/pypkg:$PYTHONPATH -exec "$@" \ No newline at end of file +export PYTHONPATH=@PYTHON3_OUTPUT_DIR@:@CMAKE_SOURCE_DIR@/sdk/modules/core/python/pypkg:@CMAKE_SOURCE_DIR@/sdk/modules/ml/python/pypkg:@CMAKE_SOURCE_DIR@/sdk/modules/ml/python_extended/pypkg:@CMAKE_SOURCE_DIR@/sdk/modules/core_ml/python/pypkg:$PYTHONPATH +exec "$@"