diff --git a/.gitignore b/.gitignore index 8baeeed29..2053ab5c1 100644 --- a/.gitignore +++ b/.gitignore @@ -3,7 +3,6 @@ /build*/ *~ -*.swp .clang_complete .project .cproject @@ -12,14 +11,18 @@ .direnv/ .cache/ +*.swp +*.pyc +*.a +*.o +*.so +*.user *.egg-info/ python/dist/ +python/.eggs/ # YouCompleteMe .ycm_extra_conf.py -*.pyc - -python/.eggs/ -go/lib/_obj/ +graph.dot diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 344e1a2e5..584974162 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -117,7 +117,16 @@ test:cppcheck: -U '_MSC_BUILD;_MSC_VER' -I include -I common/include - src/ lib/ common/ tests/unit/ | tee cppcheck.log + src/ + lib/ + common/lib/ + common/tests/unit/ + tests/unit/ + fpga/gpu/ + fpga/src/ + fpga/lib/ + fpga/tests/unit/ + | tee cppcheck.log image: ${DOCKER_IMAGE_DEV}:${DOCKER_TAG} tags: - docker diff --git a/.gitmodules b/.gitmodules index 1269318c7..162371edb 100644 --- a/.gitmodules +++ b/.gitmodules @@ -5,3 +5,12 @@ path = packaging/live-iso/fedora-kickstarts url = https://pagure.io/fedora-kickstarts.git +[submodule "fpga/thirdparty/libxil"] + path = fpga/thirdparty/libxil + url = https://github.com/VILLASframework/libxil.git +[submodule "fpga/thirdparty/udmabuf"] + path = fpga/thirdparty/udmabuf + url = https://github.com/ikwzm/udmabuf +[submodule "fpga/lib/gpu/gdrcopy"] + path = fpga/gpu/thirdparty/gdrcopy + url = https://github.com/daniel-k/gdrcopy.git diff --git a/LICENSES/Apache-2.0.txt b/LICENSES/Apache-2.0.txt index 38ab65d4f..137069b82 100644 --- a/LICENSES/Apache-2.0.txt +++ b/LICENSES/Apache-2.0.txt @@ -1,73 +1,73 @@ -Apache License -Version 2.0, January 2004 -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. - -"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: - - (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. - - You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work. - -To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. - -Copyright [yyyy] [name of copyright owner] - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + +"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + + (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. + + You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + +To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. + +Copyright [yyyy] [name of copyright owner] + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/fpga/LICENSES/BSD-3-Clause.txt b/LICENSES/BSD-3-Clause.txt similarity index 100% rename from fpga/LICENSES/BSD-3-Clause.txt rename to LICENSES/BSD-3-Clause.txt diff --git a/fpga/LICENSES/GPL-2.0-or-later.txt b/LICENSES/GPL-2.0-or-later.txt similarity index 100% rename from fpga/LICENSES/GPL-2.0-or-later.txt rename to LICENSES/GPL-2.0-or-later.txt diff --git a/fpga/LICENSES/GPL-3.0-or-later.txt b/LICENSES/GPL-3.0-or-later.txt similarity index 100% rename from fpga/LICENSES/GPL-3.0-or-later.txt rename to LICENSES/GPL-3.0-or-later.txt diff --git a/fpga/LICENSES/Unlicense.txt b/LICENSES/Unlicense.txt similarity index 100% rename from fpga/LICENSES/Unlicense.txt rename to LICENSES/Unlicense.txt diff --git a/fpga/LICENSES/WTFPL.txt b/LICENSES/WTFPL.txt similarity index 100% rename from fpga/LICENSES/WTFPL.txt rename to LICENSES/WTFPL.txt diff --git a/README.md b/README.md index 521b6e80e..d67a05792 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,11 @@ VILLASnode is used in distributed- and co-simulation scenarios and developed for User documentation is available here: +## Related Projects + +- [MIOB](https://github.com/RWTH-ACS/miob) +- [DINO](https://github.com/RWTH-ACS/dino) + ## License This project is released under the terms of the [Apache 2.0 license](LICENSE). @@ -44,6 +49,9 @@ For other licensing options please consult [Prof. Antonello Monti](mailto:amonti - SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University - SPDX-FileCopyrightText: 2023 OPAL-RT Germany GmbH +- SPDX-FileCopyrightText: 2022-2023 Niklas Eiling +- SPDX-FileCopyrightText: 2018-2023 Steffen Vogel +- SPDX-FileCopyrightText: 2018 Daniel Krebs - SPDX-License-Identifier: Apache-2.0 ## Contact @@ -51,8 +59,10 @@ For other licensing options please consult [Prof. Antonello Monti](mailto:amonti [![EONERC ACS Logo](doc/pictures/eonerc_logo.png)](http://www.acs.eonerc.rwth-aachen.de) - Steffen Vogel -- Marija Stevic +- Niklas Eiling +- Felix Wege +- Alexandra Bach -[Institute for Automation of Complex Power Systems (ACS)](http://www.acs.eonerc.rwth-aachen.de) -[EON Energy Research Center (EONERC)](http://www.eonerc.rwth-aachen.de) -[RWTH University Aachen, Germany](http://www.rwth-aachen.de) +[Institute for Automation of Complex Power Systems (ACS)](http://www.acs.eonerc.rwth-aachen.de) +[EON Energy Research Center (EONERC)](http://www.eonerc.rwth-aachen.de) +[RWTH University Aachen, Germany](http://www.rwth-aachen.de) diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 012d1cf40..709017938 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -4,29 +4,10 @@ # SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University # SPDX-License-Identifier: Apache-2.0 -cmake_minimum_required(VERSION 3.14) - -project(villas-common - VERSION 0.0.0 - DESCRIPTION "VILLAScommon" - HOMEPAGE_URL "https://github.com/VILLASframework/common" - LANGUAGES C CXX -) - -# Some more project settings -set(PROJECT_AUTHOR "Steffen Vogel") -set(PROJECT_COPYRIGHT "2014-2021, Institute for Automation of Complex Power Systems, RWTH Aachen University") - -set(CMAKE_CXX_STANDARD 17) -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Werror") - -set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/cmake) - include(FindPkgConfig) include(FeatureSummary) include(GNUInstallDirs) - # Check packages find_package(OpenSSL 1.0.0 REQUIRED) find_package(CURL 7.29 REQUIRED) diff --git a/common/lib/CMakeLists.txt b/common/lib/CMakeLists.txt index e4b2a5845..afb095be5 100644 --- a/common/lib/CMakeLists.txt +++ b/common/lib/CMakeLists.txt @@ -49,8 +49,8 @@ endif() target_include_directories(villas-common PUBLIC ${OPENSSL_INCLUDE_DIR} ${CURL_INCLUDE_DIRS} - ${PROJECT_BINARY_DIR}/include - ${PROJECT_SOURCE_DIR}/include + ${PROJECT_BINARY_DIR}/common/include + ${PROJECT_SOURCE_DIR}/common/include ) target_link_libraries(villas-common PUBLIC @@ -87,7 +87,7 @@ install( ) install( - DIRECTORY ${PROJECT_SOURCE_DIR}/include/villas/ + DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/common/include/villas/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/villas COMPONENT devel FILES_MATCHING diff --git a/common/tests/unit/CMakeLists.txt b/common/tests/unit/CMakeLists.txt index 6d31419b3..fed95c055 100644 --- a/common/tests/unit/CMakeLists.txt +++ b/common/tests/unit/CMakeLists.txt @@ -24,7 +24,7 @@ if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64") endif() target_include_directories(unit-tests-common PUBLIC - ${PROJECT_SOURCE_DIR}/include + ${PROJECT_SOURCE_DIR}/common/include ${CRITERION_INCLUDE_DIRS} ) diff --git a/fpga/doc/pictures/villas_fpga.png b/doc/pictures/villas_fpga.png similarity index 100% rename from fpga/doc/pictures/villas_fpga.png rename to doc/pictures/villas_fpga.png diff --git a/fpga/doc/pictures/villas_fpga.svg b/doc/pictures/villas_fpga.svg similarity index 100% rename from fpga/doc/pictures/villas_fpga.svg rename to doc/pictures/villas_fpga.svg diff --git a/fpga/etc/fpgas.json b/etc/fpga/fpgas.json similarity index 100% rename from fpga/etc/fpgas.json rename to etc/fpga/fpgas.json diff --git a/fpga/etc/vc707-xbar-pcie-dino/vc707-xbar-pcie-dino-v2.json b/etc/fpga/vc707-xbar-pcie-dino/vc707-xbar-pcie-dino-v2.json similarity index 100% rename from fpga/etc/vc707-xbar-pcie-dino/vc707-xbar-pcie-dino-v2.json rename to etc/fpga/vc707-xbar-pcie-dino/vc707-xbar-pcie-dino-v2.json diff --git a/fpga/etc/vc707-xbar-pcie-dino/vc707-xbar-pcie-dino.json b/etc/fpga/vc707-xbar-pcie-dino/vc707-xbar-pcie-dino.json similarity index 100% rename from fpga/etc/vc707-xbar-pcie-dino/vc707-xbar-pcie-dino.json rename to etc/fpga/vc707-xbar-pcie-dino/vc707-xbar-pcie-dino.json diff --git a/fpga/etc/vc707-xbar-pcie/vc707-xbar-pcie.json b/etc/fpga/vc707-xbar-pcie/vc707-xbar-pcie.json similarity index 100% rename from fpga/etc/vc707-xbar-pcie/vc707-xbar-pcie.json rename to etc/fpga/vc707-xbar-pcie/vc707-xbar-pcie.json diff --git a/fpga/.dockerignore b/fpga/.dockerignore deleted file mode 100644 index 815976fd5..000000000 --- a/fpga/.dockerignore +++ /dev/null @@ -1,7 +0,0 @@ -# Project-wide dockerignore file -# -# SPDX-FileCopyrightText: 2017 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 - -* -!thirdparty/criterion/ diff --git a/fpga/.editorconfig b/fpga/.editorconfig deleted file mode 100644 index 1bb986709..000000000 --- a/fpga/.editorconfig +++ /dev/null @@ -1,32 +0,0 @@ -# EditorConfig is awesome: http://EditorConfig.org -# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 - -# top-most EditorConfig file -root = true - -# Unix-style newlines with a newline ending every file -[*] -charset = utf-8 -end_of_line = lf -insert_final_newline = true -trim_trailing_whitespace=true - -# Matches multiple files with brace expansion notation -# Set default charset -[*.{c,h,proto,cpp,hpp,h.in,hpp.in}] -indent_style = space -indent_size = 2 - -[*.py] -indent_style = space -indent_size = 4 - -[*.conf] -indent_style = tab -indent_size = 8 - -[*.nix] -indent_style = space -indent_size = 2 - diff --git a/fpga/.gitignore b/fpga/.gitignore deleted file mode 100644 index 97d5b8e04..000000000 --- a/fpga/.gitignore +++ /dev/null @@ -1,13 +0,0 @@ -# Project-wide gitignore file -# -# SPDX-FileCopyrightText: 2017 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 - -build/ -.vscode/ - -*.a -*.o -*.so -*.user -graph.dot diff --git a/fpga/.gitlab-ci.yml b/fpga/.gitlab-ci.yml deleted file mode 100644 index 228fa409e..000000000 --- a/fpga/.gitlab-ci.yml +++ /dev/null @@ -1,99 +0,0 @@ -# GitLab CI configuration -# -# SPDX-FileCopyrightText: 2017 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 - -variables: - GIT_SUBMODULE_STRATEGY: recursive - PREFIX: /usr/ - DOCKER_TAG: ${CI_COMMIT_REF_NAME} - DOCKER_IMAGE_DEV: villas/fpga-dev - -stages: -- prepare -- build -- test - -# Stage: prepare - -# Build docker image which is used to build & test VILLASnode -docker-dev: - stage: prepare - script: - - docker build -t ${DOCKER_IMAGE_DEV}:${DOCKER_TAG} . - tags: - - docker - -# Stage: build - -build:source: - stage: build - script: - - mkdir build && cd build && cmake3 .. && make -j8 - artifacts: - expire_in: 1 week - name: ${CI_PROJECT_NAME}-${CI_BUILD_REF} - paths: - - build/ - image: ${DOCKER_IMAGE_DEV}:${DOCKER_TAG} - tags: - - docker - -# Stage: test - -test:unit: - stage: test - tags: - - docker - allow_failure: true - image: ${DOCKER_IMAGE_DEV}:${DOCKER_TAG} - script: | - rm -r build && mkdir build && cd build - cmake .. - make -j$(nproc) unit-tests-fpga - if [ "$(who | wc -l)" -eq "0" ]; then - tests/unit/unit-tests-fpga --jobs 1 --filter 'fpga/*' - else - echo "System is currently used by: $(who)" - echo "We are skipping the test. Please restart manually." - fi - -test:cppcheck: - stage: test - script: - - cppcheck -j $(nproc) - --max-configs=32 - --error-exitcode=1 - --quiet - --inline-suppr - --enable=warning,performance,portability,information,missingInclude - --std=c++11 - --suppress=noValidConfiguration - -I include - -I common/include - gpu/ - src/ - lib/ - tests/unit/ - --suppress=unmatchedSuppression - -igpu/thirdparty | tee cppcheck.log - image: ${DOCKER_IMAGE_DEV}:${DOCKER_TAG} - dependencies: - - build:source - tags: - - docker - artifacts: - when: on_failure - paths: - - cppcheck.log - expose_as: cppcheck - -test:reuse: - tags: - - docker - stage: test - image: - name: fsfe/reuse:latest - entrypoint: [""] - script: - - reuse lint diff --git a/fpga/.gitmodules b/fpga/.gitmodules deleted file mode 100644 index c12e2121a..000000000 --- a/fpga/.gitmodules +++ /dev/null @@ -1,17 +0,0 @@ -# Git submodule list -# -# SPDX-FileCopyrightText: 2017 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 - -[submodule "common"] - path = common - url = https://github.com/VILLASframework/common.git -[submodule "thirdparty/libxil"] - path = thirdparty/libxil - url = https://github.com/VILLASframework/libxil.git -[submodule "thirdparty/udmabuf"] - path = thirdparty/udmabuf - url = https://github.com/ikwzm/udmabuf -[submodule "lib/gpu/gdrcopy"] - path = gpu/thirdparty/gdrcopy - url = https://github.com/daniel-k/gdrcopy.git diff --git a/fpga/.reuse/dep5 b/fpga/.reuse/dep5 deleted file mode 100644 index 3e77ed91f..000000000 --- a/fpga/.reuse/dep5 +++ /dev/null @@ -1,8 +0,0 @@ -Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ -Upstream-Name: VILLASfpga -Upstream-Contact: Steffen Vogel -Source: https://fein-aachen.org/en/projects/villas-fpga/ - -Files: .vscode/* doc/pictures/* etc/**.json -Copyright: 2018-2023, Institute for Automation of Complex Power Systems, RWTH Aachen University -License: Apache-2.0 diff --git a/fpga/.vscode/c_cpp_properties.json b/fpga/.vscode/c_cpp_properties.json deleted file mode 100644 index 597001b72..000000000 --- a/fpga/.vscode/c_cpp_properties.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "configurations": [ - { - "name": "Linux", - "includePath": [ - "${workspaceFolder}/**" - ], - "defines": [], - "cStandard": "c11", - "cppStandard": "c++17", - "intelliSenseMode": "clang-x64", - "configurationProvider": "vector-of-bool.cmake-tools", - "compileCommands": "${workspaceFolder}/build/compile_commands.json" - } - ], - "version": 4 -} diff --git a/fpga/.vscode/launch.json b/fpga/.vscode/launch.json deleted file mode 100644 index 1bce5a80d..000000000 --- a/fpga/.vscode/launch.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - "name": "(gdb) Launch", - "type": "cppdbg", - "request": "launch", - "program": "${workspaceFolder}/build/src/villas-fpga-ctrl", - "args": [ - "-c", "${workspaceFolder}/etc/fpgas.json", "--connect", "\"2<->stdout\"" - ], - "stopAtEntry": false, - "cwd": "${workspaceFolder}", - "environment": [ - { - "name": "LD_LIBRARY_PATH", - "value": "/usr/local/lib64/" - } - ], - "externalConsole": false, - "MIMode": "gdb", - "miDebuggerPath": "${workspaceFolder}/scripts/gdb_sudo.sh", - "setupCommands": [ - { - "description": "Enable pretty-printing for gdb", - "text": "-enable-pretty-printing", - "ignoreFailures": true - } - ] - } - ] -} diff --git a/fpga/CHANGELOG.md b/fpga/CHANGELOG.md deleted file mode 100644 index 36cb1b17d..000000000 --- a/fpga/CHANGELOG.md +++ /dev/null @@ -1,30 +0,0 @@ -# Changelog - - - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). - -## [Unreleased] - -### Added - -### Changed - -### Fixed - -## [0.1.0] - 2017-11-21 - -### Changed - -- Switched to CMake - -### Added - -- Sourcecode import from VILLASnode project: - http://git.rwth-aachen.de/VILLASframework/VILLASnode diff --git a/fpga/CMakeLists.txt b/fpga/CMakeLists.txt index 0f5dbba0b..906e6df9e 100644 --- a/fpga/CMakeLists.txt +++ b/fpga/CMakeLists.txt @@ -3,25 +3,6 @@ # Author: Daniel Krebs # SPDX-FileCopyrightText: 2018 Institute for Automation of Complex Power Systems, RWTH Aachen University # SPDX-License-Identifier: Apache-2.0 - -cmake_minimum_required(VERSION 3.5) - -project(VILLASfpga - LANGUAGES C CXX - VERSION 0.1.0 -) - -set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/cmake) - -# Several CMake settings/defaults -set(CMAKE_CXX_STANDARD 17) -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Werror") - -if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME) - set(TOPLEVEL_PROJECT ON) -else() - set(TOPLEVEL_PROJECT OFF) -endif() # GPU library is optional, check for CUDA presence include(CheckLanguage) @@ -49,14 +30,10 @@ add_subdirectory(thirdparty/libxil) add_subdirectory(lib) add_subdirectory(src) -if(CRITERION_FOUND AND TOPLEVEL_PROJECT) +if(CRITERION_FOUND) add_subdirectory(tests/unit) endif() -if(NOT CMAKE_PROJECT_NAME STREQUAL "villas-node") - add_subdirectory(common) -endif() - # Project settings set(PROJECT_NAME "VILLASfpga") set(PROJECT_DESCRIPTION "Host library for configuring and communicating with VILLASfpga") @@ -71,30 +48,6 @@ set(PROJECT_RELEASE "1") configure_file("libvillas-fpga.pc.in" "libvillas-fpga.pc" @ONLY) install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libvillas-fpga.pc" DESTINATION "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}/pkgconfig") -# CPack -set(CPACK_PACKAGE_DESCRIPTION_SUMMARY ${PROJECT_DESCRIPTION}) -set(CPACK_PACKAGE_VENDOR ${PROJECT_VENDOR}) -set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README.md") -set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSES/Apache-2.0.txt") -set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README.md") - -set(CPACK_PACKAGE_NAME "villas-fpga") -set(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR}) -set(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR}) -set(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH}) -set(CPACK_PACKAGE_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}") - -set(CPACK_SOURCE_GENERATOR "TGZ") -set(CPACK_SOURCE_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}") -set(CPACK_SOURCE_IGNORE_FILES "/build/;/.git/;~$;${CPACK_SOURCE_IGNORE_FILES}") - -set(CPACK_RPM_PACKAGE_RELEASE ${PROJECT_RELEASE}) -set(CPACK_RPM_PACKAGE_ARCHITECTURE "x86_64") -set(CPACK_RPM_PACKAGE_LICENSE "Apache-2.0") -set(CPACK_RPM_PACKAGE_URL ${PROJECT_URL}) -set(CPACK_RPM_PACKAGE_REQUIRES "libxil") -set(CPACK_RPM_PACKAGE_GROUP "Development/Libraries") - # As close as possible to Fedoras naming set(CPACK_PACKAGE_FILE_NAME "${CPACK_SOURCE_PACKAGE_FILE_NAME}-${CPACK_RPM_PACKAGE_RELEASE}.${CPACK_RPM_PACKAGE_ARCHITECTURE}") diff --git a/fpga/Dockerfile b/fpga/Dockerfile deleted file mode 100644 index 30779dc9f..000000000 --- a/fpga/Dockerfile +++ /dev/null @@ -1,93 +0,0 @@ -# Dockerfile for VILLASfpga development. -# -# This Dockerfile builds an image which contains all library dependencies -# and tools to build VILLASfpga. -# However, VILLASfpga itself it not part of the image. -# -# This image can be used for developing VILLASfpga -# by running: -# make docker -# -# Author: Steffen Vogel -# SPDX-FileCopyrightText: 2017 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: Apache-2.0 - -FROM rockylinux:9 - -LABEL \ - org.label-schema.schema-version="1.0" \ - org.label-schema.name="VILLASfpga" \ - org.label-schema.license="Apache-2.0" \ - org.label-schema.vendor="Institute for Automation of Complex Power Systems, RWTH Aachen University" \ - org.label-schema.author.name="Steffen Vogel" \ - org.label-schema.author.email="post@steffenvogel.de" \ - org.label-schema.description="A image containing all build-time dependencies for VILLASfpga based on Fedora" \ - org.label-schema.url="http://fein-aachen.org/projects/villas-framework/" \ - org.label-schema.vcs-url="https://git.rwth-aachen.de/VILLASframework/VILLASfpga" \ - org.label-schema.usage="https://villas.fein-aachen.org/doc/fpga.html" - -# Enable Extra Packages for Enterprise Linux (EPEL) and Software collection repo -RUN dnf -y update && \ - dnf install -y epel-release dnf-plugins-core && \ - dnf install -y https://rpms.remirepo.net/enterprise/remi-release-9.rpm && \ - dnf config-manager --set-enabled crb && \ - dnf config-manager --set-enabled remi - -# Toolchain -RUN dnf -y install \ - git clang gdb ccache \ - redhat-rpm-config \ - rpmdevtools rpm-build\ - make cmake ninja-build \ - wget \ - pkgconfig \ - autoconf automake libtool \ - cppcheck \ - git curl tar - -# Dependencies -RUN dnf -y install \ - jansson-devel \ - openssl-devel \ - curl-devel \ - lapack-devel \ - libuuid-devel - -# Build & Install Fmtlib -RUN git clone --recursive https://github.com/fmtlib/fmt.git /tmp/fmt && \ - mkdir -p /tmp/fmt/build && cd /tmp/fmt/build && \ - git checkout 6.1.2 && \ - cmake3 -DBUILD_SHARED_LIBS=1 -DFMT_TEST=OFF .. && \ - make -j$(nproc) install && \ - rm -rf /tmp/fmt - -# Build & Install spdlog -RUN git clone --recursive https://github.com/gabime/spdlog.git /tmp/spdlog && \ - mkdir -p /tmp/spdlog/build && cd /tmp/spdlog/build && \ - git checkout v1.8.2 && \ - cmake -DSPDLOG_FMT_EXTERNAL=ON \ - -DSPDLOG_BUILD_BENCH=OFF \ - -DSPDLOG_BUILD_SHARED=ON \ - -DSPDLOG_BUILD_TESTS=OFF .. && \ - make -j$(nproc) install && \ - rm -rf /tmp/spdlog - -# Build & Install Criterion -RUN git clone --recursive https://github.com/Snaipe/Criterion /tmp/criterion && \ - mkdir -p /tmp/criterion/build && cd /tmp/criterion/build && \ - git checkout v2.3.3 && \ - cmake .. && \ - make -j$(nproc) install && \ - rm -rf /tmp/* - -# Build & Install libxil -RUN git clone https://git.rwth-aachen.de/acs/public/villas/fpga/libxil.git /tmp/libxil && \ - mkdir -p /tmp/libxil/build && cd /tmp/libxil/build && \ - cmake .. && \ - make -j$(nproc) install && \ - rm -rf /tmp/* - -ENV LD_LIBRARY_PATH /usr/local/lib:/usr/local/lib64 - -WORKDIR /fpga - diff --git a/fpga/LICENSES/Apache-2.0.txt b/fpga/LICENSES/Apache-2.0.txt deleted file mode 100644 index 137069b82..000000000 --- a/fpga/LICENSES/Apache-2.0.txt +++ /dev/null @@ -1,73 +0,0 @@ -Apache License -Version 2.0, January 2004 -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. - -"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: - - (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. - - You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work. - -To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. - -Copyright [yyyy] [name of copyright owner] - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/fpga/README.md b/fpga/README.md deleted file mode 100644 index 0ac2f756b..000000000 --- a/fpga/README.md +++ /dev/null @@ -1,38 +0,0 @@ -# VILLASfpga - -[![build status](https://git.rwth-aachen.de/acs/public/villas/fpga/fpga/badges/master/pipeline.svg)](https://git.rwth-aachen.de/acs/public/villas/fpga/fpga/-/pipelines/) - -VILLASfpga provides a flexbible, real-time capable interconnect between FPGAs and Linux, e.g., to connect simulators and devices for hardware-in-the loop simulations. VILLASfpga can guarantee fixed latencies in the nanosecond range. -VILLASfpga supports Xilinx FPGAs connected to a Linux system via PCI-Express or via a platform bus as found on MPSoC devices. - -## Documentation - -User documentation is available here: - -## License - -This project is released under the terms of the [Apache 2.0](LICENSE) license: - -- SPDX-FileCopyrightText: 2022-2023 Niklas Eiling -- SPDX-FileCopyrightText: 2018-2023 Steffen Vogel -- SPDX-FileCopyrightText: 2018 Daniel Krebs -- SPDX-License-Identifier: Apache-2.0 - -We kindly ask all academic publications employing components of VILLASframework to cite one of the following papers: - -- A. Monti et al., "[A Global Real-Time Superlab: Enabling High Penetration of Power Electronics in the Electric Grid](https://ieeexplore.ieee.org/document/8458285/)," in IEEE Power Electronics Magazine, vol. 5, no. 3, pp. 35-44, Sept. 2018. -- S. Vogel, M. Mirz, L. Razik and A. Monti, "[An open solution for next-generation real-time power system simulation](http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=8245739&isnumber=8244404)," 2017 IEEE Conference on Energy Internet and Energy System Integration (EI2), Beijing, 2017, pp. 1-6. - -## Related Projects - -- [MIOB](https://github.com/RWTH-ACS/miob) -- [DINO](https://github.com/RWTH-ACS/dino) - -## Contact - -- Niklas Eiling -- Steffen Vogel -- Daniel Krebs - -[Institute for Automation of Complex Power Systems (ACS)](http://www.acs.eonerc.rwth-aachen.de) -[RWTH University Aachen, Germany](http://www.rwth-aachen.de) diff --git a/fpga/cmake/FindCriterion.cmake b/fpga/cmake/FindCriterion.cmake deleted file mode 100644 index 34ee4d0a9..000000000 --- a/fpga/cmake/FindCriterion.cmake +++ /dev/null @@ -1,28 +0,0 @@ -# Try to find Criterion -# -# Once done this will define -# CRITERION_FOUND - System has Criterion -# CRITERION_INCLUDE_DIRS - The Criterion include directories -# CRITERION_LIBRARIES - The libraries needed to use Criterion -# -# SPDX-FileCopyrightText: 2017 Institute for Automation of Complex Power Systems, RWTH Aachen University -# SPDX-License-Identifier: WTFPL - -find_package(PkgConfig) - -find_path(CRITERION_INCLUDE_DIR criterion/criterion.h - PATH_SUFFIXES criterion) - -find_library(CRITERION_LIBRARY NAMES criterion libcriterion) - -set(CRITERION_LIBRARIES ${CRITERION_LIBRARY}) -set(CRITERION_INCLUDE_DIRS ${CRITERION_INCLUDE_DIR}) - -include(FindPackageHandleStandardArgs) - -# Handle the QUIET and REQUIRED arguments and set CRITERION_FOUND to TRUE -# if all listed variables are TRUE -find_package_handle_standard_args(Criterion DEFAULT_MSG - CRITERION_LIBRARY CRITERION_INCLUDE_DIR) - -mark_as_advanced(CRITERION_INCLUDE_DIR CRITERION_LIBRARY) diff --git a/fpga/common b/fpga/common deleted file mode 160000 index 15e338d2b..000000000 --- a/fpga/common +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 15e338d2be87d7d4d54ec9735ccd055b2abff084 diff --git a/fpga/doc/pictures/eonerc_logo.png b/fpga/doc/pictures/eonerc_logo.png deleted file mode 100644 index 81c3ad0ca..000000000 Binary files a/fpga/doc/pictures/eonerc_logo.png and /dev/null differ diff --git a/fpga/gpu/CMakeLists.txt b/fpga/gpu/CMakeLists.txt index 63276fcb5..5dac61d74 100644 --- a/fpga/gpu/CMakeLists.txt +++ b/fpga/gpu/CMakeLists.txt @@ -4,13 +4,6 @@ # SPDX-FileCopyrightText: 2018 Institute for Automation of Complex Power Systems, RWTH Aachen University # SPDX-License-Identifier: Apache-2.0 -cmake_minimum_required(VERSION 3.8) - -project(villas-gpu - VERSION 1.0 - DESCRIPTION "VILLASgpu" - LANGUAGES C CXX CUDA) - add_subdirectory(thirdparty/gdrcopy) add_library(villas-gpu diff --git a/fpga/lib/CMakeLists.txt b/fpga/lib/CMakeLists.txt index e1c2040c7..d6c4436b5 100644 --- a/fpga/lib/CMakeLists.txt +++ b/fpga/lib/CMakeLists.txt @@ -50,7 +50,7 @@ target_compile_definitions(villas-fpga PRIVATE target_include_directories(villas-fpga PUBLIC ${PROJECT_BINARY_DIR}/include - ${PROJECT_SOURCE_DIR}/include + ${PROJECT_SOURCE_DIR}/fpga/include ${JANSSON_INCLUDE_DIRS} ) diff --git a/fpga/scripts/villas-fpga-cat.sh b/tools/fpga-cat.sh similarity index 100% rename from fpga/scripts/villas-fpga-cat.sh rename to tools/fpga-cat.sh diff --git a/fpga/scripts/non_root.sh b/tools/fpga-non-root.sh similarity index 100% rename from fpga/scripts/non_root.sh rename to tools/fpga-non-root.sh diff --git a/fpga/scripts/villas-fpga-xbar-select.sh b/tools/fpga-xbar-select.sh similarity index 100% rename from fpga/scripts/villas-fpga-xbar-select.sh rename to tools/fpga-xbar-select.sh diff --git a/fpga/scripts/gdb_sudo.sh b/tools/gdb-sudo.sh similarity index 100% rename from fpga/scripts/gdb_sudo.sh rename to tools/gdb-sudo.sh diff --git a/fpga/scripts/hwdef-parse.py b/tools/hwdef-parse.py similarity index 100% rename from fpga/scripts/hwdef-parse.py rename to tools/hwdef-parse.py diff --git a/fpga/scripts/rebind_device.sh b/tools/pci-rebind-device.sh similarity index 100% rename from fpga/scripts/rebind_device.sh rename to tools/pci-rebind-device.sh diff --git a/fpga/scripts/reset_pci_device.sh b/tools/pci-reset-device.sh similarity index 100% rename from fpga/scripts/reset_pci_device.sh rename to tools/pci-reset-device.sh