diff --git a/.clang-format b/.clang-format index 1d75634d1..91295e2d3 100644 --- a/.clang-format +++ b/.clang-format @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + --- # Use LLVM Defaults BasedOnStyle: LLVM diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 371ef51ba..e223fe8db 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + name: CI # Set default shell as interactive (source ~/.bashrc) diff --git a/.gitmodules b/.gitmodules index e239baf8d..239d11589 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + [submodule "submodules/VEXRISCV"] path = lib/hardware/iob_system/submodules/VEXRISCV url = git@github.com:IObundle/iob-vexriscv.git diff --git a/CITATION.cff.license b/CITATION.cff.license new file mode 100644 index 000000000..9a5279e71 --- /dev/null +++ b/CITATION.cff.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: 2024 IObundle + +SPDX-License-Identifier: MIT diff --git a/LICENSES/Apache-2.0.txt b/LICENSES/Apache-2.0.txt new file mode 100644 index 000000000..137069b82 --- /dev/null +++ b/LICENSES/Apache-2.0.txt @@ -0,0 +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. diff --git a/LICENSES/MIT.txt b/LICENSES/MIT.txt new file mode 100644 index 000000000..2071b23b0 --- /dev/null +++ b/LICENSES/MIT.txt @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Makefile b/Makefile index 7e800322b..94af143f2 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + CORE := iob_soc SIMULATOR ?= icarus diff --git a/default.nix b/default.nix index 1c7be18cf..f84b9683c 100644 --- a/default.nix +++ b/default.nix @@ -1,2 +1,6 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + { pkgs ? import {} }: import lib/scripts/default.nix { inherit pkgs; } diff --git a/iob_soc.py b/iob_soc.py index c7c92a0e5..88a24543d 100644 --- a/iob_soc.py +++ b/iob_soc.py @@ -1,51 +1,53 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): # Py2hwsw dictionary describing current core core_dict = { - "original_name": "iob_soc", - "name": "iob_soc", "version": "0.1", - "parent": {"core_name": "iob_system", **py_params_dict}, - } - - # Dictionary of "iob_system" attributes to override/append - system_overrides = { - "ports": [ - { - "name": "rs232_m", - "descr": "iob-system uart interface", - "interface": { - "type": "rs232", - }, + "board_list": ["basys3"], + "parent": { + "core_name": "iob_system", + **py_params_dict, + "system_attributes": { + "ports": [ + { + "name": "rs232_m", + "descr": "iob-system uart interface", + "interface": { + "type": "rs232", + }, + }, + ], + "blocks": [ + { + "core_name": "iob_uart", + "instance_name": "UART0", + "instance_description": "UART peripheral", + "peripheral_addr_w": 3, + "parameters": {}, + "connect": { + "clk_en_rst_s": "clk_en_rst_s", + # Cbus connected automatically + "rs232_m": "rs232_m", + }, + }, + { + "core_name": "iob_timer", + "instance_name": "TIMER0", + "instance_description": "Timer peripheral", + "peripheral_addr_w": 4, + "parameters": {}, + "connect": { + "clk_en_rst_s": "clk_en_rst_s", + # Cbus connected automatically + }, + }, + ], }, - ], - "blocks": [ - { - "core_name": "iob_uart", - "instance_name": "UART0", - "instance_description": "UART peripheral", - "peripheral_addr_w": 3, - "parameters": {}, - "connect": { - "clk_en_rst_s": "clk_en_rst_s", - # Cbus connected automatically - "rs232_m": "rs232_m", - }, - }, - { - "core_name": "iob_timer", - "instance_name": "TIMER0", - "instance_description": "Timer peripheral", - "peripheral_addr_w": 4, - "parameters": {}, - "connect": { - "clk_en_rst_s": "clk_en_rst_s", - # Cbus connected automatically - }, - }, - ], + }, } - # Pass system_overrides dictionary via python parameter to the parent core (iob_system) - core_dict["parent"]["system_overrides"] = system_overrides - return core_dict diff --git a/lib/Makefile b/lib/Makefile index 9a1944796..272fec78b 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + # (c) 2022-Present IObundle, Lda, all rights reserved # # This makefile simulates the hardware modules in this repo diff --git a/lib/README.md b/lib/README.md index 03410efac..acfd523ba 100644 --- a/lib/README.md +++ b/lib/README.md @@ -1,3 +1,9 @@ + + # iob-lib This repository contains a set of Python scripts, Verilog, and C sources to simplify the development of subsystem IP cores. diff --git a/lib/default.nix b/lib/default.nix index 37cb9a161..3963e9008 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -1,2 +1,6 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + { pkgs ? import {} }: import scripts/default.nix { inherit pkgs; } diff --git a/lib/hardware/altera/alt_iobuf/alt_iobuf.py b/lib/hardware/altera/alt_iobuf/alt_iobuf.py index 0c764827b..cf6261ac4 100644 --- a/lib/hardware/altera/alt_iobuf/alt_iobuf.py +++ b/lib/hardware/altera/alt_iobuf/alt_iobuf.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "alt_iobuf", - "name": "alt_iobuf", "version": "0.1", "ports": [ { diff --git a/lib/hardware/altera/altddio_in/altddio_in.py b/lib/hardware/altera/altddio_in/altddio_in.py index bdd19fd81..99a1bbe90 100644 --- a/lib/hardware/altera/altddio_in/altddio_in.py +++ b/lib/hardware/altera/altddio_in/altddio_in.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "altddio_in", - "name": "altddio_in", "version": "0.1", "confs": [ { diff --git a/lib/hardware/altera/altddio_out/altddio_out.py b/lib/hardware/altera/altddio_out/altddio_out.py index c79d05645..40d23dd4f 100644 --- a/lib/hardware/altera/altddio_out/altddio_out.py +++ b/lib/hardware/altera/altddio_out/altddio_out.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "altddio_out", - "name": "altddio_out", "version": "0.1", "confs": [ { diff --git a/lib/hardware/altera/altera_alt_ddr3/altera_alt_ddr3.py b/lib/hardware/altera/altera_alt_ddr3/altera_alt_ddr3.py index de3aa0cca..cf55fe7b3 100644 --- a/lib/hardware/altera/altera_alt_ddr3/altera_alt_ddr3.py +++ b/lib/hardware/altera/altera_alt_ddr3/altera_alt_ddr3.py @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): # Number of slave interfaces (number of masters to connect to) N_SLAVES = ( @@ -5,8 +10,6 @@ def setup(py_params_dict): ) attributes_dict = { - "original_name": "altera_alt_ddr3", - "name": "altera_alt_ddr3", "version": "0.1", "confs": [ { diff --git a/lib/hardware/altera/altera_clk_buf_altclkctrl/altera_clk_buf_altclkctrl.py b/lib/hardware/altera/altera_clk_buf_altclkctrl/altera_clk_buf_altclkctrl.py index a99d005cd..d56820102 100644 --- a/lib/hardware/altera/altera_clk_buf_altclkctrl/altera_clk_buf_altclkctrl.py +++ b/lib/hardware/altera/altera_clk_buf_altclkctrl/altera_clk_buf_altclkctrl.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "altera_clk_buf_altclkctrl", - "name": "altera_clk_buf_altclkctrl", "version": "0.1", "ports": [ { diff --git a/lib/hardware/altera/altera_ddio_out_clkbuf/altera_ddio_out_clkbuf.py b/lib/hardware/altera/altera_ddio_out_clkbuf/altera_ddio_out_clkbuf.py index 463030247..6a2e0e4da 100644 --- a/lib/hardware/altera/altera_ddio_out_clkbuf/altera_ddio_out_clkbuf.py +++ b/lib/hardware/altera/altera_ddio_out_clkbuf/altera_ddio_out_clkbuf.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "altera_ddio_out_clkbuf", - "name": "altera_ddio_out_clkbuf", "version": "0.1", "ports": [ { diff --git a/lib/hardware/amd/xilinx_axi_interconnect/xilinx_axi_interconnect.py b/lib/hardware/amd/xilinx_axi_interconnect/xilinx_axi_interconnect.py index 29f4f5695..43a8bd84e 100644 --- a/lib/hardware/amd/xilinx_axi_interconnect/xilinx_axi_interconnect.py +++ b/lib/hardware/amd/xilinx_axi_interconnect/xilinx_axi_interconnect.py @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): # Number of slave interfaces (number of masters to connect to) N_SLAVES = ( @@ -9,8 +14,6 @@ def setup(py_params_dict): ) attributes_dict = { - "original_name": "xilinx_axi_interconnect", - "name": "xilinx_axi_interconnect", "version": "0.1", # # AXI Parameters diff --git a/lib/hardware/amd/xilinx_clock_wizard/hardware/src/clock_wizard.v b/lib/hardware/amd/xilinx_clock_wizard/hardware/src/clock_wizard.v index 8e6a85de2..231cde1c8 100644 --- a/lib/hardware/amd/xilinx_clock_wizard/hardware/src/clock_wizard.v +++ b/lib/hardware/amd/xilinx_clock_wizard/hardware/src/clock_wizard.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1ps / 1ps module clock_wizard #( diff --git a/lib/hardware/amd/xilinx_clock_wizard/xilinx_clock_wizard.py b/lib/hardware/amd/xilinx_clock_wizard/xilinx_clock_wizard.py index 6fa5d9ffa..207b2bd71 100644 --- a/lib/hardware/amd/xilinx_clock_wizard/xilinx_clock_wizard.py +++ b/lib/hardware/amd/xilinx_clock_wizard/xilinx_clock_wizard.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "xilinx_clock_wizard", - "name": "xilinx_clock_wizard", "version": "0.1", "confs": [ { diff --git a/lib/hardware/amd/xilinx_ddr4_ctrl/hardware/src/ddr.xdc b/lib/hardware/amd/xilinx_ddr4_ctrl/hardware/src/ddr.xdc index 58f4b5b53..3fb1f36ea 100644 --- a/lib/hardware/amd/xilinx_ddr4_ctrl/hardware/src/ddr.xdc +++ b/lib/hardware/amd/xilinx_ddr4_ctrl/hardware/src/ddr.xdc @@ -1,23 +1,6 @@ -# ---------------------------------------------------------------------------- -# _____ -# / \ -# /____ \____ -# / \===\ \==/ -# /___\===\___\/ AVNET Design Resource Center -# \======/ www.em.avnet.com/drc -# \====/ -# ---------------------------------------------------------------------------- -# -# Disclaimer: -# Avnet, Inc. makes no warranty for the use of this code or design. -# This code is provided "As Is". Avnet, Inc assumes no responsibility for -# any errors, which may appear in this code, nor does it make a commitment -# to update the information contained herein. Avnet, Inc specifically -# disclaims any implied warranties of fitness for a particular purpose. -# Copyright(c) 2009 Avnet, Inc. -# All rights reserved. -# -# ---------------------------------------------------------------------------- +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT ## DDR4 Interface set_property PACKAGE_PIN AA25 [get_ports {c0_ddr4_ck_t_o}] diff --git a/lib/hardware/amd/xilinx_ddr4_ctrl/xilinx_ddr4_ctrl.py b/lib/hardware/amd/xilinx_ddr4_ctrl/xilinx_ddr4_ctrl.py index 467456050..746d1a7d8 100644 --- a/lib/hardware/amd/xilinx_ddr4_ctrl/xilinx_ddr4_ctrl.py +++ b/lib/hardware/amd/xilinx_ddr4_ctrl/xilinx_ddr4_ctrl.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "xilinx_ddr4_ctrl", - "name": "xilinx_ddr4_ctrl", "version": "0.1", "confs": [ # diff --git a/lib/hardware/amd/xilinx_ibufg/xilinx_ibufg.py b/lib/hardware/amd/xilinx_ibufg/xilinx_ibufg.py index df6510153..7a74b5993 100644 --- a/lib/hardware/amd/xilinx_ibufg/xilinx_ibufg.py +++ b/lib/hardware/amd/xilinx_ibufg/xilinx_ibufg.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "xilinx_ibufg", - "name": "xilinx_ibufg", "version": "0.1", "ports": [ { diff --git a/lib/hardware/amd/xilinx_oddre1/xilinx_oddre1.py b/lib/hardware/amd/xilinx_oddre1/xilinx_oddre1.py index 63c59383e..d32df989e 100644 --- a/lib/hardware/amd/xilinx_oddre1/xilinx_oddre1.py +++ b/lib/hardware/amd/xilinx_oddre1/xilinx_oddre1.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "xilinx_oddre1", - "name": "xilinx_oddre1", "version": "0.1", "ports": [ { diff --git a/lib/hardware/arith_logic/counter/iob_counter/iob_counter.py b/lib/hardware/arith_logic/counter/iob_counter/iob_counter.py index 34c6a5166..f60244183 100644 --- a/lib/hardware/arith_logic/counter/iob_counter/iob_counter.py +++ b/lib/hardware/arith_logic/counter/iob_counter/iob_counter.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_counter", - "name": "iob_counter", "version": "0.1", "confs": [ { diff --git a/lib/hardware/arith_logic/counter/iob_counter_ld/iob_counter_ld.py b/lib/hardware/arith_logic/counter/iob_counter_ld/iob_counter_ld.py index 8f0bc674d..5083547b9 100644 --- a/lib/hardware/arith_logic/counter/iob_counter_ld/iob_counter_ld.py +++ b/lib/hardware/arith_logic/counter/iob_counter_ld/iob_counter_ld.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_counter_ld", - "name": "iob_counter_ld", "version": "0.1", "confs": [ { diff --git a/lib/hardware/arith_logic/counter/iob_modcnt/iob_modcnt.py b/lib/hardware/arith_logic/counter/iob_modcnt/iob_modcnt.py index cf07dab6d..ea4c26e18 100644 --- a/lib/hardware/arith_logic/counter/iob_modcnt/iob_modcnt.py +++ b/lib/hardware/arith_logic/counter/iob_modcnt/iob_modcnt.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_modcnt", - "name": "iob_modcnt", "version": "0.1", "confs": [ { diff --git a/lib/hardware/arith_logic/div/iob_div_pipe/hardware/modules/iob_div_slice.py b/lib/hardware/arith_logic/div/iob_div_pipe/hardware/modules/iob_div_slice.py index 85f869e94..27fc9c9a7 100644 --- a/lib/hardware/arith_logic/div/iob_div_pipe/hardware/modules/iob_div_slice.py +++ b/lib/hardware/arith_logic/div/iob_div_pipe/hardware/modules/iob_div_slice.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_div_slice", - "name": "iob_div_slice", "version": "0.1", "confs": [ { diff --git a/lib/hardware/arith_logic/div/iob_div_pipe/hardware/simulation/src/iob_div_pipe_tb.v b/lib/hardware/arith_logic/div/iob_div_pipe/hardware/simulation/src/iob_div_pipe_tb.v index 984a45246..c3d9d5e44 100644 --- a/lib/hardware/arith_logic/div/iob_div_pipe/hardware/simulation/src/iob_div_pipe_tb.v +++ b/lib/hardware/arith_logic/div/iob_div_pipe/hardware/simulation/src/iob_div_pipe_tb.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1ns / 1ps `define CLK_FREQ (100000000) diff --git a/lib/hardware/arith_logic/div/iob_div_pipe/iob_div_pipe.py b/lib/hardware/arith_logic/div/iob_div_pipe/iob_div_pipe.py index 20fbf9936..d6e524c95 100755 --- a/lib/hardware/arith_logic/div/iob_div_pipe/iob_div_pipe.py +++ b/lib/hardware/arith_logic/div/iob_div_pipe/iob_div_pipe.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_div_pipe", - "name": "iob_div_pipe", "version": "0.1", "confs": [ { diff --git a/lib/hardware/arith_logic/div/iob_div_subshift/hardware/simulation/src/iob_div_subshift_tb.v b/lib/hardware/arith_logic/div/iob_div_subshift/hardware/simulation/src/iob_div_subshift_tb.v index ba447ab53..dc8354c77 100644 --- a/lib/hardware/arith_logic/div/iob_div_subshift/hardware/simulation/src/iob_div_subshift_tb.v +++ b/lib/hardware/arith_logic/div/iob_div_subshift/hardware/simulation/src/iob_div_subshift_tb.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1ns / 1ps `define CLK_FREQ (100000000) diff --git a/lib/hardware/arith_logic/div/iob_div_subshift/iob_div_subshift.py b/lib/hardware/arith_logic/div/iob_div_subshift/iob_div_subshift.py index ea64f72f8..f6939e985 100755 --- a/lib/hardware/arith_logic/div/iob_div_subshift/iob_div_subshift.py +++ b/lib/hardware/arith_logic/div/iob_div_subshift/iob_div_subshift.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_div_subshift", - "name": "iob_div_subshift", "version": "0.1", "confs": [ { diff --git a/lib/hardware/arith_logic/div/iob_div_subshift_frac/hardware/simulation/src/iob_div_subshift_frac_tb.v b/lib/hardware/arith_logic/div/iob_div_subshift_frac/hardware/simulation/src/iob_div_subshift_frac_tb.v index 52c619e65..11fcb78f0 100644 --- a/lib/hardware/arith_logic/div/iob_div_subshift_frac/hardware/simulation/src/iob_div_subshift_frac_tb.v +++ b/lib/hardware/arith_logic/div/iob_div_subshift_frac/hardware/simulation/src/iob_div_subshift_frac_tb.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1ns / 1ps `define CLK_FREQ (100000000) diff --git a/lib/hardware/arith_logic/div/iob_div_subshift_frac/iob_div_subshift_frac.py b/lib/hardware/arith_logic/div/iob_div_subshift_frac/iob_div_subshift_frac.py index ccd869b7a..b8a83543a 100755 --- a/lib/hardware/arith_logic/div/iob_div_subshift_frac/iob_div_subshift_frac.py +++ b/lib/hardware/arith_logic/div/iob_div_subshift_frac/iob_div_subshift_frac.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_div_subshift_frac", - "name": "iob_div_subshift_frac", "version": "0.1", "confs": [ { diff --git a/lib/hardware/arith_logic/div/iob_div_subshift_signed/iob_div_subshift_signed.py b/lib/hardware/arith_logic/div/iob_div_subshift_signed/iob_div_subshift_signed.py index 9b14db0d1..1d4fdc70d 100644 --- a/lib/hardware/arith_logic/div/iob_div_subshift_signed/iob_div_subshift_signed.py +++ b/lib/hardware/arith_logic/div/iob_div_subshift_signed/iob_div_subshift_signed.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_div_subshift_signed", - "name": "iob_div_subshift_signed", "version": "0.1", "confs": [ { diff --git a/lib/hardware/arith_logic/iob_add/hardware/src/iob_add.v b/lib/hardware/arith_logic/iob_add/hardware/src/iob_add.v index c81555f15..3b5f1a45b 100644 --- a/lib/hardware/arith_logic/iob_add/hardware/src/iob_add.v +++ b/lib/hardware/arith_logic/iob_add/hardware/src/iob_add.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1ns / 1ps module iob_add2 diff --git a/lib/hardware/arith_logic/iob_add/iob_add.py b/lib/hardware/arith_logic/iob_add/iob_add.py index d057b2226..2fe2b52a3 100644 --- a/lib/hardware/arith_logic/iob_add/iob_add.py +++ b/lib/hardware/arith_logic/iob_add/iob_add.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_add", - "name": "iob_add", "version": "0.1", "generate_hw": False, "blocks": [ diff --git a/lib/hardware/arith_logic/iob_add2/iob_add2.py b/lib/hardware/arith_logic/iob_add2/iob_add2.py index 002727be3..eb08cd373 100644 --- a/lib/hardware/arith_logic/iob_add2/iob_add2.py +++ b/lib/hardware/arith_logic/iob_add2/iob_add2.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_add2", - "name": "iob_add2", "version": "0.1", "confs": [ { diff --git a/lib/hardware/arith_logic/iob_ctls/hardware/simulation/src/iob_ctls_tb.v b/lib/hardware/arith_logic/iob_ctls/hardware/simulation/src/iob_ctls_tb.v index 11a1cc19e..9a41a9135 100644 --- a/lib/hardware/arith_logic/iob_ctls/hardware/simulation/src/iob_ctls_tb.v +++ b/lib/hardware/arith_logic/iob_ctls/hardware/simulation/src/iob_ctls_tb.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1ns / 1ps module iob_ctls_tb; diff --git a/lib/hardware/arith_logic/iob_ctls/hardware/src/iob_ctls.v b/lib/hardware/arith_logic/iob_ctls/hardware/src/iob_ctls.v index f11cd1582..0a08404d9 100644 --- a/lib/hardware/arith_logic/iob_ctls/hardware/src/iob_ctls.v +++ b/lib/hardware/arith_logic/iob_ctls/hardware/src/iob_ctls.v @@ -1,10 +1,7 @@ -/***************************************************************************** +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT - Description: IOB_CTLS Count Trailing/Leading Symbols - - Copyright (C) 2020 IObundle, Lda All rights reserved - -******************************************************************************/ `timescale 1ns / 1ps module iob_ctls #( diff --git a/lib/hardware/arith_logic/iob_ctls/iob_ctls.py b/lib/hardware/arith_logic/iob_ctls/iob_ctls.py index 5f67ee949..e78e00dd4 100644 --- a/lib/hardware/arith_logic/iob_ctls/iob_ctls.py +++ b/lib/hardware/arith_logic/iob_ctls/iob_ctls.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_ctls", - "name": "iob_ctls", "version": "0.1", "generate_hw": False, "blocks": [ diff --git a/lib/hardware/arith_logic/iob_diff/hardware/src/iob_diff.v b/lib/hardware/arith_logic/iob_diff/hardware/src/iob_diff.v index 27e984538..cd3a7a91a 100644 --- a/lib/hardware/arith_logic/iob_diff/hardware/src/iob_diff.v +++ b/lib/hardware/arith_logic/iob_diff/hardware/src/iob_diff.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1ns / 1ps module iob_diff #( diff --git a/lib/hardware/arith_logic/iob_diff/iob_diff.py b/lib/hardware/arith_logic/iob_diff/iob_diff.py index 849014a7d..20fc7a1f6 100644 --- a/lib/hardware/arith_logic/iob_diff/iob_diff.py +++ b/lib/hardware/arith_logic/iob_diff/iob_diff.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_diff", - "name": "iob_diff", "version": "0.1", "generate_hw": False, "blocks": [ diff --git a/lib/hardware/arith_logic/iob_edge_detect/hardware/src/iob_edge_detect.v b/lib/hardware/arith_logic/iob_edge_detect/hardware/src/iob_edge_detect.v index 828307a9a..c8185d823 100644 --- a/lib/hardware/arith_logic/iob_edge_detect/hardware/src/iob_edge_detect.v +++ b/lib/hardware/arith_logic/iob_edge_detect/hardware/src/iob_edge_detect.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1ns / 1ps module iob_edge_detect #( diff --git a/lib/hardware/arith_logic/iob_edge_detect/iob_edge_detect.py b/lib/hardware/arith_logic/iob_edge_detect/iob_edge_detect.py index b9260be17..cd9d50bfd 100644 --- a/lib/hardware/arith_logic/iob_edge_detect/iob_edge_detect.py +++ b/lib/hardware/arith_logic/iob_edge_detect/iob_edge_detect.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_edge_detect", - "name": "iob_edge_detect", "version": "0.1", "generate_hw": False, "ports": [ diff --git a/lib/hardware/arith_logic/iob_fp/iob_fp_add/hardware/src/iob_fp_add.v b/lib/hardware/arith_logic/iob_fp/iob_fp_add/hardware/src/iob_fp_add.v index 934eb76cd..7a21657c2 100755 --- a/lib/hardware/arith_logic/iob_fp/iob_fp_add/hardware/src/iob_fp_add.v +++ b/lib/hardware/arith_logic/iob_fp/iob_fp_add/hardware/src/iob_fp_add.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1ns / 1ps // Canonical NAN diff --git a/lib/hardware/arith_logic/iob_fp/iob_fp_add/iob_fp_add.py b/lib/hardware/arith_logic/iob_fp/iob_fp_add/iob_fp_add.py index 9b104cff7..5e51fefd8 100755 --- a/lib/hardware/arith_logic/iob_fp/iob_fp_add/iob_fp_add.py +++ b/lib/hardware/arith_logic/iob_fp/iob_fp_add/iob_fp_add.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_fp_add", - "name": "iob_fp_add", "version": "0.1", "confs": [ { diff --git a/lib/hardware/arith_logic/iob_fp/iob_fp_clz/iob_fp_clz.py b/lib/hardware/arith_logic/iob_fp/iob_fp_clz/iob_fp_clz.py index 9d5fc1d80..ee56e4c9e 100755 --- a/lib/hardware/arith_logic/iob_fp/iob_fp_clz/iob_fp_clz.py +++ b/lib/hardware/arith_logic/iob_fp/iob_fp_clz/iob_fp_clz.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_fp_clz", - "name": "iob_fp_clz", "version": "0.1", "confs": [ { diff --git a/lib/hardware/arith_logic/iob_fp/iob_fp_cmp/iob_fp_cmp.py b/lib/hardware/arith_logic/iob_fp/iob_fp_cmp/iob_fp_cmp.py index 47f71ef96..efe6373ba 100755 --- a/lib/hardware/arith_logic/iob_fp/iob_fp_cmp/iob_fp_cmp.py +++ b/lib/hardware/arith_logic/iob_fp/iob_fp_cmp/iob_fp_cmp.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_fp_cmp", - "name": "iob_fp_cmp", "version": "0.1", "confs": [ { diff --git a/lib/hardware/arith_logic/iob_fp/iob_fp_div/hardware/src/iob_fp_div.v b/lib/hardware/arith_logic/iob_fp/iob_fp_div/hardware/src/iob_fp_div.v index 02211331c..285f68088 100755 --- a/lib/hardware/arith_logic/iob_fp/iob_fp_div/hardware/src/iob_fp_div.v +++ b/lib/hardware/arith_logic/iob_fp/iob_fp_div/hardware/src/iob_fp_div.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1ns / 1ps // Canonical NAN diff --git a/lib/hardware/arith_logic/iob_fp/iob_fp_div/iob_fp_div.py b/lib/hardware/arith_logic/iob_fp/iob_fp_div/iob_fp_div.py index 500fe35de..d079ca33e 100755 --- a/lib/hardware/arith_logic/iob_fp/iob_fp_div/iob_fp_div.py +++ b/lib/hardware/arith_logic/iob_fp/iob_fp_div/iob_fp_div.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_fp_div", - "name": "iob_fp_div", "version": "0.1", "generate_hw": False, "blocks": [ diff --git a/lib/hardware/arith_logic/iob_fp/iob_fp_dq/iob_fp_dq.py b/lib/hardware/arith_logic/iob_fp/iob_fp_dq/iob_fp_dq.py index b7fa90b37..debcfa04b 100755 --- a/lib/hardware/arith_logic/iob_fp/iob_fp_dq/iob_fp_dq.py +++ b/lib/hardware/arith_logic/iob_fp/iob_fp_dq/iob_fp_dq.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_fp_dq", - "name": "iob_fp_dq", "version": "0.1", "confs": [ { diff --git a/lib/hardware/arith_logic/iob_fp/iob_fp_float2int/hardware/src/iob_fp_float2int.v b/lib/hardware/arith_logic/iob_fp/iob_fp_float2int/hardware/src/iob_fp_float2int.v index 1ceb30a63..03a65d16c 100755 --- a/lib/hardware/arith_logic/iob_fp/iob_fp_float2int/hardware/src/iob_fp_float2int.v +++ b/lib/hardware/arith_logic/iob_fp/iob_fp_float2int/hardware/src/iob_fp_float2int.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + //This file was automatically generated by the python 'pipeliner' script //This module has a latency of 2 clocks `timescale 1ns / 1ps diff --git a/lib/hardware/arith_logic/iob_fp/iob_fp_float2int/iob_fp_float2int.py b/lib/hardware/arith_logic/iob_fp/iob_fp_float2int/iob_fp_float2int.py index fd0764fcc..fc3da87ab 100755 --- a/lib/hardware/arith_logic/iob_fp/iob_fp_float2int/iob_fp_float2int.py +++ b/lib/hardware/arith_logic/iob_fp/iob_fp_float2int/iob_fp_float2int.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_fp_float2int", - "name": "iob_fp_float2int", "version": "0.1", "generate_hw": False, "blocks": [ diff --git a/lib/hardware/arith_logic/iob_fp/iob_fp_float2uint/hardware/src/iob_fp_float2uint.v b/lib/hardware/arith_logic/iob_fp/iob_fp_float2uint/hardware/src/iob_fp_float2uint.v index ab59c5d7a..feebc15c2 100755 --- a/lib/hardware/arith_logic/iob_fp/iob_fp_float2uint/hardware/src/iob_fp_float2uint.v +++ b/lib/hardware/arith_logic/iob_fp/iob_fp_float2uint/hardware/src/iob_fp_float2uint.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + //This file was automatically generated by the python 'pipeliner' script //This module has a latency of 1 clocks `timescale 1ns / 1ps diff --git a/lib/hardware/arith_logic/iob_fp/iob_fp_float2uint/iob_fp_float2uint.py b/lib/hardware/arith_logic/iob_fp/iob_fp_float2uint/iob_fp_float2uint.py index 1c689a81f..fc3da87ab 100755 --- a/lib/hardware/arith_logic/iob_fp/iob_fp_float2uint/iob_fp_float2uint.py +++ b/lib/hardware/arith_logic/iob_fp/iob_fp_float2uint/iob_fp_float2uint.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_fp_float2uint", - "name": "iob_fp_float2uint", "version": "0.1", "generate_hw": False, "blocks": [ diff --git a/lib/hardware/arith_logic/iob_fp/iob_fp_fpu/hardware/src/iob_fp_fpu.v b/lib/hardware/arith_logic/iob_fp/iob_fp_fpu/hardware/src/iob_fp_fpu.v index 68c63a465..8b42ef434 100755 --- a/lib/hardware/arith_logic/iob_fp/iob_fp_fpu/hardware/src/iob_fp_fpu.v +++ b/lib/hardware/arith_logic/iob_fp/iob_fp_fpu/hardware/src/iob_fp_fpu.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1ns / 1ps // Function width diff --git a/lib/hardware/arith_logic/iob_fp/iob_fp_fpu/iob_fp_fpu.py b/lib/hardware/arith_logic/iob_fp/iob_fp_fpu/iob_fp_fpu.py index 98c99e520..72471c8d4 100755 --- a/lib/hardware/arith_logic/iob_fp/iob_fp_fpu/iob_fp_fpu.py +++ b/lib/hardware/arith_logic/iob_fp/iob_fp_fpu/iob_fp_fpu.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_fp_fpu", - "name": "iob_fp_fpu", "version": "0.1", "generate_hw": False, "blocks": [ diff --git a/lib/hardware/arith_logic/iob_fp/iob_fp_int2float/hardware/src/iob_fp_int2float.v b/lib/hardware/arith_logic/iob_fp/iob_fp_int2float/hardware/src/iob_fp_int2float.v index 490880893..bda8ced9e 100755 --- a/lib/hardware/arith_logic/iob_fp/iob_fp_int2float/hardware/src/iob_fp_int2float.v +++ b/lib/hardware/arith_logic/iob_fp/iob_fp_int2float/hardware/src/iob_fp_int2float.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + //This file was automatically generated by the python 'pipeliner' script //This module has a latency of 5 clocks `timescale 1ns / 1ps diff --git a/lib/hardware/arith_logic/iob_fp/iob_fp_int2float/iob_fp_int2float.py b/lib/hardware/arith_logic/iob_fp/iob_fp_int2float/iob_fp_int2float.py index 6a486e72d..fc3da87ab 100755 --- a/lib/hardware/arith_logic/iob_fp/iob_fp_int2float/iob_fp_int2float.py +++ b/lib/hardware/arith_logic/iob_fp/iob_fp_int2float/iob_fp_int2float.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_fp_int2float", - "name": "iob_fp_int2float", "version": "0.1", "generate_hw": False, "blocks": [ diff --git a/lib/hardware/arith_logic/iob_fp/iob_fp_minmax/iob_fp_minmax.py b/lib/hardware/arith_logic/iob_fp/iob_fp_minmax/iob_fp_minmax.py index cb2bbe68b..bd1f5e38f 100755 --- a/lib/hardware/arith_logic/iob_fp/iob_fp_minmax/iob_fp_minmax.py +++ b/lib/hardware/arith_logic/iob_fp/iob_fp_minmax/iob_fp_minmax.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_fp_minmax", - "name": "iob_fp_minmax", "version": "0.1", "confs": [ { diff --git a/lib/hardware/arith_logic/iob_fp/iob_fp_mul/hardware/src/iob_fp_mul.v b/lib/hardware/arith_logic/iob_fp/iob_fp_mul/hardware/src/iob_fp_mul.v index 7a9826fd3..b96384af4 100755 --- a/lib/hardware/arith_logic/iob_fp/iob_fp_mul/hardware/src/iob_fp_mul.v +++ b/lib/hardware/arith_logic/iob_fp/iob_fp_mul/hardware/src/iob_fp_mul.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1ns / 1ps // Canonical NAN diff --git a/lib/hardware/arith_logic/iob_fp/iob_fp_mul/iob_fp_mul.py b/lib/hardware/arith_logic/iob_fp/iob_fp_mul/iob_fp_mul.py index bdc6104cb..0b84f4c8c 100755 --- a/lib/hardware/arith_logic/iob_fp/iob_fp_mul/iob_fp_mul.py +++ b/lib/hardware/arith_logic/iob_fp/iob_fp_mul/iob_fp_mul.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_fp_mul", - "name": "iob_fp_mul", "version": "0.1", "generate_hw": False, "blocks": [ diff --git a/lib/hardware/arith_logic/iob_fp/iob_fp_round/iob_fp_round.py b/lib/hardware/arith_logic/iob_fp/iob_fp_round/iob_fp_round.py index 3e1cafe4c..fa0140eae 100755 --- a/lib/hardware/arith_logic/iob_fp/iob_fp_round/iob_fp_round.py +++ b/lib/hardware/arith_logic/iob_fp/iob_fp_round/iob_fp_round.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_fp_round", - "name": "iob_fp_round", "version": "0.1", "confs": [ { diff --git a/lib/hardware/arith_logic/iob_fp/iob_fp_special/iob_fp_special.py b/lib/hardware/arith_logic/iob_fp/iob_fp_special/iob_fp_special.py index 118d5ac5c..448f1f495 100755 --- a/lib/hardware/arith_logic/iob_fp/iob_fp_special/iob_fp_special.py +++ b/lib/hardware/arith_logic/iob_fp/iob_fp_special/iob_fp_special.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_fp_special", - "name": "iob_fp_special", "version": "0.1", "confs": [ { diff --git a/lib/hardware/arith_logic/iob_fp/iob_fp_sqrt/iob_fp_sqrt.py b/lib/hardware/arith_logic/iob_fp/iob_fp_sqrt/iob_fp_sqrt.py index 136231a42..4c62577b2 100755 --- a/lib/hardware/arith_logic/iob_fp/iob_fp_sqrt/iob_fp_sqrt.py +++ b/lib/hardware/arith_logic/iob_fp/iob_fp_sqrt/iob_fp_sqrt.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_fp_sqrt", - "name": "iob_fp_sqrt", "version": "0.1", "confs": [ { diff --git a/lib/hardware/arith_logic/iob_fp/iob_fp_uint2float/hardware/src/iob_fp_uint2float.v b/lib/hardware/arith_logic/iob_fp/iob_fp_uint2float/hardware/src/iob_fp_uint2float.v index 47f63468f..bd5226105 100755 --- a/lib/hardware/arith_logic/iob_fp/iob_fp_uint2float/hardware/src/iob_fp_uint2float.v +++ b/lib/hardware/arith_logic/iob_fp/iob_fp_uint2float/hardware/src/iob_fp_uint2float.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + //This file was automatically generated by the python 'pipeliner' script //This module has a latency of 5 clocks `timescale 1ns / 1ps diff --git a/lib/hardware/arith_logic/iob_fp/iob_fp_uint2float/iob_fp_uint2float.py b/lib/hardware/arith_logic/iob_fp/iob_fp_uint2float/iob_fp_uint2float.py index d76204c61..fc3da87ab 100755 --- a/lib/hardware/arith_logic/iob_fp/iob_fp_uint2float/iob_fp_uint2float.py +++ b/lib/hardware/arith_logic/iob_fp/iob_fp_uint2float/iob_fp_uint2float.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_fp_uint2float", - "name": "iob_fp_uint2float", "version": "0.1", "generate_hw": False, "blocks": [ diff --git a/lib/hardware/arith_logic/iob_functions/hardware/src/iob_functions.vs b/lib/hardware/arith_logic/iob_functions/hardware/src/iob_functions.vs index aa1273a51..b3aabe97b 100644 --- a/lib/hardware/arith_logic/iob_functions/hardware/src/iob_functions.vs +++ b/lib/hardware/arith_logic/iob_functions/hardware/src/iob_functions.vs @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + function [31:0] iob_max; input [31:0] a; input [31:0] b; diff --git a/lib/hardware/arith_logic/iob_functions/iob_functions.py b/lib/hardware/arith_logic/iob_functions/iob_functions.py index 70a219dfd..39fbb46d3 100644 --- a/lib/hardware/arith_logic/iob_functions/iob_functions.py +++ b/lib/hardware/arith_logic/iob_functions/iob_functions.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_functions", - "name": "iob_functions", "version": "0.1", "generate_hw": False, } diff --git a/lib/hardware/arith_logic/iob_int_sqrt/iob_int_sqrt.py b/lib/hardware/arith_logic/iob_int_sqrt/iob_int_sqrt.py index 35a7d4e9b..99195d7e3 100644 --- a/lib/hardware/arith_logic/iob_int_sqrt/iob_int_sqrt.py +++ b/lib/hardware/arith_logic/iob_int_sqrt/iob_int_sqrt.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_int_sqrt", - "name": "iob_int_sqrt", "version": "0.1", "confs": [ { diff --git a/lib/hardware/arith_logic/iob_prio_enc/hardware/simulation/src/iob_prio_enc_tb.v b/lib/hardware/arith_logic/iob_prio_enc/hardware/simulation/src/iob_prio_enc_tb.v index 3d020e253..1cafaa64d 100644 --- a/lib/hardware/arith_logic/iob_prio_enc/hardware/simulation/src/iob_prio_enc_tb.v +++ b/lib/hardware/arith_logic/iob_prio_enc/hardware/simulation/src/iob_prio_enc_tb.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1ns / 1ps module iob_prio_enc_tb; diff --git a/lib/hardware/arith_logic/iob_prio_enc/iob_prio_enc.py b/lib/hardware/arith_logic/iob_prio_enc/iob_prio_enc.py index 93a7655f6..25ec291c0 100644 --- a/lib/hardware/arith_logic/iob_prio_enc/iob_prio_enc.py +++ b/lib/hardware/arith_logic/iob_prio_enc/iob_prio_enc.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_prio_enc", - "name": "iob_prio_enc", "version": "0.1", "confs": [ { diff --git a/lib/hardware/arith_logic/iob_xor/iob_xor.py b/lib/hardware/arith_logic/iob_xor/iob_xor.py index 492699046..0ff6b4610 100644 --- a/lib/hardware/arith_logic/iob_xor/iob_xor.py +++ b/lib/hardware/arith_logic/iob_xor/iob_xor.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_xor", - "name": "iob_xor", "version": "0.1", "confs": [ { diff --git a/lib/hardware/buses/apb2iob/apb2iob.py b/lib/hardware/buses/apb2iob/apb2iob.py index 05685a554..478fed777 100644 --- a/lib/hardware/buses/apb2iob/apb2iob.py +++ b/lib/hardware/buses/apb2iob/apb2iob.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "apb2iob", - "name": "apb2iob", "version": "0.1", "generate_hw": False, "ports": [ diff --git a/lib/hardware/buses/apb2iob/document/ARM_AMBA3_APB.pdf.license b/lib/hardware/buses/apb2iob/document/ARM_AMBA3_APB.pdf.license new file mode 100644 index 000000000..9a5279e71 --- /dev/null +++ b/lib/hardware/buses/apb2iob/document/ARM_AMBA3_APB.pdf.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: 2024 IObundle + +SPDX-License-Identifier: MIT diff --git a/lib/hardware/buses/apb2iob/document/ARM_AMBA3_APBv2_0.pdf.license b/lib/hardware/buses/apb2iob/document/ARM_AMBA3_APBv2_0.pdf.license new file mode 100644 index 000000000..9a5279e71 --- /dev/null +++ b/lib/hardware/buses/apb2iob/document/ARM_AMBA3_APBv2_0.pdf.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: 2024 IObundle + +SPDX-License-Identifier: MIT diff --git a/lib/hardware/buses/apb2iob/hardware/src/apb2iob.v b/lib/hardware/buses/apb2iob/hardware/src/apb2iob.v index 6ba4df732..eb4212c43 100644 --- a/lib/hardware/buses/apb2iob/hardware/src/apb2iob.v +++ b/lib/hardware/buses/apb2iob/hardware/src/apb2iob.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1ns / 1ps diff --git a/lib/hardware/buses/arbiter/arbiter.py b/lib/hardware/buses/arbiter/arbiter.py index 91fdc52b5..39fbb46d3 100644 --- a/lib/hardware/buses/arbiter/arbiter.py +++ b/lib/hardware/buses/arbiter/arbiter.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "arbiter", - "name": "arbiter", "version": "0.1", "generate_hw": False, } diff --git a/lib/hardware/buses/arbiter/hardware/src/arbiter.v b/lib/hardware/buses/arbiter/hardware/src/arbiter.v index 08f7edb3b..d5bb331c6 100644 --- a/lib/hardware/buses/arbiter/hardware/src/arbiter.v +++ b/lib/hardware/buses/arbiter/hardware/src/arbiter.v @@ -1,26 +1,7 @@ -/* - -Copyright (c) 2014-2018 Alex Forencich - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -*/ +// SPDX-FileCopyrightText: 2014-2018 Alex Forencich +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT // Language: Verilog 2001 diff --git a/lib/hardware/buses/arbiter/hardware/src/priority_encoder.v b/lib/hardware/buses/arbiter/hardware/src/priority_encoder.v index ad737cc2e..fa9ec0416 100644 --- a/lib/hardware/buses/arbiter/hardware/src/priority_encoder.v +++ b/lib/hardware/buses/arbiter/hardware/src/priority_encoder.v @@ -1,26 +1,7 @@ -/* - -Copyright (c) 2014-2018 Alex Forencich - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -*/ +// SPDX-FileCopyrightText: 2014-2018 Alex Forencich +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT // Language: Verilog 2001 @@ -45,27 +26,26 @@ module priority_encoder #( parameter W2 = W1 / 2; generate - if (WIDTH == 1) begin: g_width_1 + if (WIDTH == 1) begin : g_width_1 // one input assign output_valid = input_unencoded; assign output_encoded = 0; - end else if (WIDTH == 2) begin: g_width_2 + end else if (WIDTH == 2) begin : g_width_2 // two inputs - just an OR gate assign output_valid = |input_unencoded; - if (LSB_PRIORITY == "LOW") begin: g_width_2_lsb_priority_low + if (LSB_PRIORITY == "LOW") begin : g_width_2_lsb_priority_low assign output_encoded = input_unencoded[1]; - end else begin: g_width_2_lsb_priority_high + end else begin : g_width_2_lsb_priority_high assign output_encoded = ~input_unencoded[0]; end - end else begin: g_width_other + end else begin : g_width_other // more than two inputs - split into two parts and recurse // also pad input to correct power-of-two width wire [$clog2(W2)-1:0] out1, out2; wire valid1, valid2; wire [W2-1:0] in2; assign in2[WIDTH-W2-1:0] = input_unencoded[WIDTH-1:W2]; - if (WIDTH-W2 < W2) - assign in2[W2-1:WIDTH-W2] = 0; + if (WIDTH - W2 < W2) assign in2[W2-1:WIDTH-W2] = 0; priority_encoder #( .WIDTH (W2), .LSB_PRIORITY(LSB_PRIORITY) @@ -86,9 +66,9 @@ module priority_encoder #( ); // multiplexer to select part assign output_valid = valid1 | valid2; - if (LSB_PRIORITY == "LOW") begin: g_width_other_lsb_priority_low + if (LSB_PRIORITY == "LOW") begin : g_width_other_lsb_priority_low assign output_encoded = valid2 ? {1'b1, out2} : {1'b0, out1}; - end else begin: g_width_other_lsb_priority_high + end else begin : g_width_other_lsb_priority_high assign output_encoded = valid1 ? {1'b0, out1} : {1'b1, out2}; end end diff --git a/lib/hardware/buses/axi2axil/axi2axil.py b/lib/hardware/buses/axi2axil/axi2axil.py index b89b8b8c5..b90db1a5e 100644 --- a/lib/hardware/buses/axi2axil/axi2axil.py +++ b/lib/hardware/buses/axi2axil/axi2axil.py @@ -1,11 +1,14 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): """AXI to AXI-Lite converter This converter has the same limitations as AXI-Lite: - No Burst Support: burst-related signals (like AWLEN, AWSIZE, ARBURST, etc.) are ignored. """ attributes_dict = { - "original_name": "axi2axil", - "name": "axi2axil", "version": "0.1", "confs": [ { diff --git a/lib/hardware/buses/axi2iob/axi2iob.py b/lib/hardware/buses/axi2iob/axi2iob.py index ed985bb20..31036d3da 100644 --- a/lib/hardware/buses/axi2iob/axi2iob.py +++ b/lib/hardware/buses/axi2iob/axi2iob.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "axi2iob", - "name": "axi2iob", "version": "0.1", "generate_hw": False, "confs": [ diff --git a/lib/hardware/buses/axi2iob/hardware/src/axi2iob.v b/lib/hardware/buses/axi2iob/hardware/src/axi2iob.v index 3a84df5e0..e76d5d246 100644 --- a/lib/hardware/buses/axi2iob/hardware/src/axi2iob.v +++ b/lib/hardware/buses/axi2iob/hardware/src/axi2iob.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + // Language: Verilog 2001 `timescale 1ns / 1ps diff --git a/lib/hardware/buses/axi_interconnect/axi_interconnect.py b/lib/hardware/buses/axi_interconnect/axi_interconnect.py index 2facfb6e1..6caaf1ac7 100644 --- a/lib/hardware/buses/axi_interconnect/axi_interconnect.py +++ b/lib/hardware/buses/axi_interconnect/axi_interconnect.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "axi_interconnect", - "name": "axi_interconnect", "version": "0.1", "generate_hw": False, "confs": [ diff --git a/lib/hardware/buses/axi_interconnect/hardware/src/axi_interconnect.v b/lib/hardware/buses/axi_interconnect/hardware/src/axi_interconnect.v index a80b722cf..fffa04311 100644 --- a/lib/hardware/buses/axi_interconnect/hardware/src/axi_interconnect.v +++ b/lib/hardware/buses/axi_interconnect/hardware/src/axi_interconnect.v @@ -1,26 +1,8 @@ -/* - -Copyright (c) 2018 Alex Forencich - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +// SPDX-FileCopyrightText: 2018 Alex Forencich +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -*/ /* Changes made (2023 Pedro Antunes): - formated the code with Verible @@ -36,234 +18,234 @@ Changes made (2023 Pedro Antunes): * AXI4 interconnect */ module axi_interconnect #( - // Number of AXI inputs (slave interfaces) - parameter S_COUNT = 4, - // Number of AXI outputs (master interfaces) - parameter M_COUNT = 4, - // Width of data bus in bits - parameter DATA_WIDTH = 32, - // Width of address bus in bits - parameter ADDR_WIDTH = 32, - // Width of wstrb (width of data bus in words) - parameter STRB_WIDTH = (DATA_WIDTH / 8), - // Width of ID signal - parameter ID_WIDTH = 8, - // Propagate awuser signal - parameter AWUSER_ENABLE = 0, - // Width of awuser signal - parameter AWUSER_WIDTH = 1, - // Propagate wuser signal - parameter WUSER_ENABLE = 0, - // Width of wuser signal - parameter WUSER_WIDTH = 1, - // Propagate buser signal - parameter BUSER_ENABLE = 0, - // Width of buser signal - parameter BUSER_WIDTH = 1, - // Propagate aruser signal - parameter ARUSER_ENABLE = 0, - // Width of aruser signal - parameter ARUSER_WIDTH = 1, - // Propagate ruser signal - parameter RUSER_ENABLE = 0, - // Width of ruser signal - parameter RUSER_WIDTH = 1, - // Propagate ID field - parameter FORWARD_ID = 0, - // Number of regions per master interface - parameter M_REGIONS = 1, - // Master interface base addresses - // M_COUNT concatenated fields of M_REGIONS concatenated fields of ADDR_WIDTH bits - // set to zero for default addressing based on M_ADDR_WIDTH - parameter M_BASE_ADDR = 0, - // Master interface address widths - // M_COUNT concatenated fields of M_REGIONS concatenated fields of 32 bits - parameter M_ADDR_WIDTH = {M_COUNT{{M_REGIONS{32'd24}}}}, - // Read connections between interfaces - // M_COUNT concatenated fields of S_COUNT bits - parameter M_CONNECT_READ = {M_COUNT{{S_COUNT{1'b1}}}}, - // Write connections between interfaces - // M_COUNT concatenated fields of S_COUNT bits - parameter M_CONNECT_WRITE = {M_COUNT{{S_COUNT{1'b1}}}}, - // Secure master (fail operations based on awprot/arprot) - // M_COUNT bits - parameter M_SECURE = {M_COUNT{1'b0}} + // Number of AXI inputs (slave interfaces) + parameter S_COUNT = 4, + // Number of AXI outputs (master interfaces) + parameter M_COUNT = 4, + // Width of data bus in bits + parameter DATA_WIDTH = 32, + // Width of address bus in bits + parameter ADDR_WIDTH = 32, + // Width of wstrb (width of data bus in words) + parameter STRB_WIDTH = (DATA_WIDTH / 8), + // Width of ID signal + parameter ID_WIDTH = 8, + // Propagate awuser signal + parameter AWUSER_ENABLE = 0, + // Width of awuser signal + parameter AWUSER_WIDTH = 1, + // Propagate wuser signal + parameter WUSER_ENABLE = 0, + // Width of wuser signal + parameter WUSER_WIDTH = 1, + // Propagate buser signal + parameter BUSER_ENABLE = 0, + // Width of buser signal + parameter BUSER_WIDTH = 1, + // Propagate aruser signal + parameter ARUSER_ENABLE = 0, + // Width of aruser signal + parameter ARUSER_WIDTH = 1, + // Propagate ruser signal + parameter RUSER_ENABLE = 0, + // Width of ruser signal + parameter RUSER_WIDTH = 1, + // Propagate ID field + parameter FORWARD_ID = 0, + // Number of regions per master interface + parameter M_REGIONS = 1, + // Master interface base addresses + // M_COUNT concatenated fields of M_REGIONS concatenated fields of ADDR_WIDTH bits + // set to zero for default addressing based on M_ADDR_WIDTH + parameter M_BASE_ADDR = 0, + // Master interface address widths + // M_COUNT concatenated fields of M_REGIONS concatenated fields of 32 bits + parameter M_ADDR_WIDTH = {M_COUNT{{M_REGIONS{32'd24}}}}, + // Read connections between interfaces + // M_COUNT concatenated fields of S_COUNT bits + parameter M_CONNECT_READ = {M_COUNT{{S_COUNT{1'b1}}}}, + // Write connections between interfaces + // M_COUNT concatenated fields of S_COUNT bits + parameter M_CONNECT_WRITE = {M_COUNT{{S_COUNT{1'b1}}}}, + // Secure master (fail operations based on awprot/arprot) + // M_COUNT bits + parameter M_SECURE = {M_COUNT{1'b0}} ) ( - input wire clk_i, - input wire rst_i, + input wire clk_i, + input wire rst_i, - /* + /* * AXI slave interfaces */ - input wire [ S_COUNT*ID_WIDTH-1:0] s_axi_awid_i, - input wire [ S_COUNT*ADDR_WIDTH-1:0] s_axi_awaddr_i, - input wire [ S_COUNT*8-1:0] s_axi_awlen_i, - input wire [ S_COUNT*3-1:0] s_axi_awsize_i, - input wire [ S_COUNT*2-1:0] s_axi_awburst_i, - input wire [ S_COUNT-1:0] s_axi_awlock_i, - input wire [ S_COUNT*4-1:0] s_axi_awcache_i, - input wire [ S_COUNT*3-1:0] s_axi_awprot_i, - input wire [ S_COUNT*4-1:0] s_axi_awqos_i, - input wire [S_COUNT*AWUSER_WIDTH-1:0] s_axi_awuser_i, - input wire [ S_COUNT-1:0] s_axi_awvalid_i, - output wire [ S_COUNT-1:0] s_axi_awready_o, - input wire [ S_COUNT*DATA_WIDTH-1:0] s_axi_wdata_i, - input wire [ S_COUNT*STRB_WIDTH-1:0] s_axi_wstrb_i, - input wire [ S_COUNT-1:0] s_axi_wlast_i, - input wire [ S_COUNT*WUSER_WIDTH-1:0] s_axi_wuser_i, - input wire [ S_COUNT-1:0] s_axi_wvalid_i, - output wire [ S_COUNT-1:0] s_axi_wready_o, - output wire [ S_COUNT*ID_WIDTH-1:0] s_axi_bid_o, - output wire [ S_COUNT*2-1:0] s_axi_bresp_o, - output wire [ S_COUNT*BUSER_WIDTH-1:0] s_axi_buser_o, - output wire [ S_COUNT-1:0] s_axi_bvalid_o, - input wire [ S_COUNT-1:0] s_axi_bready_i, - input wire [ S_COUNT*ID_WIDTH-1:0] s_axi_arid_i, - input wire [ S_COUNT*ADDR_WIDTH-1:0] s_axi_araddr_i, - input wire [ S_COUNT*8-1:0] s_axi_arlen_i, - input wire [ S_COUNT*3-1:0] s_axi_arsize_i, - input wire [ S_COUNT*2-1:0] s_axi_arburst_i, - input wire [ S_COUNT-1:0] s_axi_arlock_i, - input wire [ S_COUNT*4-1:0] s_axi_arcache_i, - input wire [ S_COUNT*3-1:0] s_axi_arprot_i, - input wire [ S_COUNT*4-1:0] s_axi_arqos_i, - input wire [S_COUNT*ARUSER_WIDTH-1:0] s_axi_aruser_i, - input wire [ S_COUNT-1:0] s_axi_arvalid_i, - output wire [ S_COUNT-1:0] s_axi_arready_o, - output wire [ S_COUNT*ID_WIDTH-1:0] s_axi_rid_o, - output wire [ S_COUNT*DATA_WIDTH-1:0] s_axi_rdata_o, - output wire [ S_COUNT*2-1:0] s_axi_rresp_o, - output wire [ S_COUNT-1:0] s_axi_rlast_o, - output wire [ S_COUNT*RUSER_WIDTH-1:0] s_axi_ruser_o, - output wire [ S_COUNT-1:0] s_axi_rvalid_o, - input wire [ S_COUNT-1:0] s_axi_rready_i, - - /* + input wire [ S_COUNT*ID_WIDTH-1:0] s_axi_awid_i, + input wire [ S_COUNT*ADDR_WIDTH-1:0] s_axi_awaddr_i, + input wire [ S_COUNT*8-1:0] s_axi_awlen_i, + input wire [ S_COUNT*3-1:0] s_axi_awsize_i, + input wire [ S_COUNT*2-1:0] s_axi_awburst_i, + input wire [ S_COUNT-1:0] s_axi_awlock_i, + input wire [ S_COUNT*4-1:0] s_axi_awcache_i, + input wire [ S_COUNT*3-1:0] s_axi_awprot_i, + input wire [ S_COUNT*4-1:0] s_axi_awqos_i, + input wire [S_COUNT*AWUSER_WIDTH-1:0] s_axi_awuser_i, + input wire [ S_COUNT-1:0] s_axi_awvalid_i, + output wire [ S_COUNT-1:0] s_axi_awready_o, + input wire [ S_COUNT*DATA_WIDTH-1:0] s_axi_wdata_i, + input wire [ S_COUNT*STRB_WIDTH-1:0] s_axi_wstrb_i, + input wire [ S_COUNT-1:0] s_axi_wlast_i, + input wire [ S_COUNT*WUSER_WIDTH-1:0] s_axi_wuser_i, + input wire [ S_COUNT-1:0] s_axi_wvalid_i, + output wire [ S_COUNT-1:0] s_axi_wready_o, + output wire [ S_COUNT*ID_WIDTH-1:0] s_axi_bid_o, + output wire [ S_COUNT*2-1:0] s_axi_bresp_o, + output wire [ S_COUNT*BUSER_WIDTH-1:0] s_axi_buser_o, + output wire [ S_COUNT-1:0] s_axi_bvalid_o, + input wire [ S_COUNT-1:0] s_axi_bready_i, + input wire [ S_COUNT*ID_WIDTH-1:0] s_axi_arid_i, + input wire [ S_COUNT*ADDR_WIDTH-1:0] s_axi_araddr_i, + input wire [ S_COUNT*8-1:0] s_axi_arlen_i, + input wire [ S_COUNT*3-1:0] s_axi_arsize_i, + input wire [ S_COUNT*2-1:0] s_axi_arburst_i, + input wire [ S_COUNT-1:0] s_axi_arlock_i, + input wire [ S_COUNT*4-1:0] s_axi_arcache_i, + input wire [ S_COUNT*3-1:0] s_axi_arprot_i, + input wire [ S_COUNT*4-1:0] s_axi_arqos_i, + input wire [S_COUNT*ARUSER_WIDTH-1:0] s_axi_aruser_i, + input wire [ S_COUNT-1:0] s_axi_arvalid_i, + output wire [ S_COUNT-1:0] s_axi_arready_o, + output wire [ S_COUNT*ID_WIDTH-1:0] s_axi_rid_o, + output wire [ S_COUNT*DATA_WIDTH-1:0] s_axi_rdata_o, + output wire [ S_COUNT*2-1:0] s_axi_rresp_o, + output wire [ S_COUNT-1:0] s_axi_rlast_o, + output wire [ S_COUNT*RUSER_WIDTH-1:0] s_axi_ruser_o, + output wire [ S_COUNT-1:0] s_axi_rvalid_o, + input wire [ S_COUNT-1:0] s_axi_rready_i, + + /* * AXI master interfaces */ - output wire [ M_COUNT*ID_WIDTH-1:0] m_axi_awid_o, - output wire [ M_COUNT*ADDR_WIDTH-1:0] m_axi_awaddr_o, - output wire [ M_COUNT*8-1:0] m_axi_awlen_o, - output wire [ M_COUNT*3-1:0] m_axi_awsize_o, - output wire [ M_COUNT*2-1:0] m_axi_awburst_o, - output wire [ M_COUNT-1:0] m_axi_awlock_o, - output wire [ M_COUNT*4-1:0] m_axi_awcache_o, - output wire [ M_COUNT*3-1:0] m_axi_awprot_o, - output wire [ M_COUNT*4-1:0] m_axi_awqos_o, - output wire [ M_COUNT*4-1:0] m_axi_awregion_o, - output wire [M_COUNT*AWUSER_WIDTH-1:0] m_axi_awuser_o, - output wire [ M_COUNT-1:0] m_axi_awvalid_o, - input wire [ M_COUNT-1:0] m_axi_awready_i, - output wire [ M_COUNT*DATA_WIDTH-1:0] m_axi_wdata_o, - output wire [ M_COUNT*STRB_WIDTH-1:0] m_axi_wstrb_o, - output wire [ M_COUNT-1:0] m_axi_wlast_o, - output wire [ M_COUNT*WUSER_WIDTH-1:0] m_axi_wuser_o, - output wire [ M_COUNT-1:0] m_axi_wvalid_o, - input wire [ M_COUNT-1:0] m_axi_wready_i, - input wire [ M_COUNT*ID_WIDTH-1:0] m_axi_bid_i, - input wire [ M_COUNT*2-1:0] m_axi_bresp_i, - input wire [ M_COUNT*BUSER_WIDTH-1:0] m_axi_buser_i, - input wire [ M_COUNT-1:0] m_axi_bvalid_i, - output wire [ M_COUNT-1:0] m_axi_bready_o, - output wire [ M_COUNT*ID_WIDTH-1:0] m_axi_arid_o, - output wire [ M_COUNT*ADDR_WIDTH-1:0] m_axi_araddr_o, - output wire [ M_COUNT*8-1:0] m_axi_arlen_o, - output wire [ M_COUNT*3-1:0] m_axi_arsize_o, - output wire [ M_COUNT*2-1:0] m_axi_arburst_o, - output wire [ M_COUNT-1:0] m_axi_arlock_o, - output wire [ M_COUNT*4-1:0] m_axi_arcache_o, - output wire [ M_COUNT*3-1:0] m_axi_arprot_o, - output wire [ M_COUNT*4-1:0] m_axi_arqos_o, - output wire [ M_COUNT*4-1:0] m_axi_arregion_o, - output wire [M_COUNT*ARUSER_WIDTH-1:0] m_axi_aruser_o, - output wire [ M_COUNT-1:0] m_axi_arvalid_o, - input wire [ M_COUNT-1:0] m_axi_arready_i, - input wire [ M_COUNT*ID_WIDTH-1:0] m_axi_rid_i, - input wire [ M_COUNT*DATA_WIDTH-1:0] m_axi_rdata_i, - input wire [ M_COUNT*2-1:0] m_axi_rresp_i, - input wire [ M_COUNT-1:0] m_axi_rlast_i, - input wire [ M_COUNT*RUSER_WIDTH-1:0] m_axi_ruser_i, - input wire [ M_COUNT-1:0] m_axi_rvalid_i, - output wire [ M_COUNT-1:0] m_axi_rready_o + output wire [ M_COUNT*ID_WIDTH-1:0] m_axi_awid_o, + output wire [ M_COUNT*ADDR_WIDTH-1:0] m_axi_awaddr_o, + output wire [ M_COUNT*8-1:0] m_axi_awlen_o, + output wire [ M_COUNT*3-1:0] m_axi_awsize_o, + output wire [ M_COUNT*2-1:0] m_axi_awburst_o, + output wire [ M_COUNT-1:0] m_axi_awlock_o, + output wire [ M_COUNT*4-1:0] m_axi_awcache_o, + output wire [ M_COUNT*3-1:0] m_axi_awprot_o, + output wire [ M_COUNT*4-1:0] m_axi_awqos_o, + output wire [ M_COUNT*4-1:0] m_axi_awregion_o, + output wire [M_COUNT*AWUSER_WIDTH-1:0] m_axi_awuser_o, + output wire [ M_COUNT-1:0] m_axi_awvalid_o, + input wire [ M_COUNT-1:0] m_axi_awready_i, + output wire [ M_COUNT*DATA_WIDTH-1:0] m_axi_wdata_o, + output wire [ M_COUNT*STRB_WIDTH-1:0] m_axi_wstrb_o, + output wire [ M_COUNT-1:0] m_axi_wlast_o, + output wire [ M_COUNT*WUSER_WIDTH-1:0] m_axi_wuser_o, + output wire [ M_COUNT-1:0] m_axi_wvalid_o, + input wire [ M_COUNT-1:0] m_axi_wready_i, + input wire [ M_COUNT*ID_WIDTH-1:0] m_axi_bid_i, + input wire [ M_COUNT*2-1:0] m_axi_bresp_i, + input wire [ M_COUNT*BUSER_WIDTH-1:0] m_axi_buser_i, + input wire [ M_COUNT-1:0] m_axi_bvalid_i, + output wire [ M_COUNT-1:0] m_axi_bready_o, + output wire [ M_COUNT*ID_WIDTH-1:0] m_axi_arid_o, + output wire [ M_COUNT*ADDR_WIDTH-1:0] m_axi_araddr_o, + output wire [ M_COUNT*8-1:0] m_axi_arlen_o, + output wire [ M_COUNT*3-1:0] m_axi_arsize_o, + output wire [ M_COUNT*2-1:0] m_axi_arburst_o, + output wire [ M_COUNT-1:0] m_axi_arlock_o, + output wire [ M_COUNT*4-1:0] m_axi_arcache_o, + output wire [ M_COUNT*3-1:0] m_axi_arprot_o, + output wire [ M_COUNT*4-1:0] m_axi_arqos_o, + output wire [ M_COUNT*4-1:0] m_axi_arregion_o, + output wire [M_COUNT*ARUSER_WIDTH-1:0] m_axi_aruser_o, + output wire [ M_COUNT-1:0] m_axi_arvalid_o, + input wire [ M_COUNT-1:0] m_axi_arready_i, + input wire [ M_COUNT*ID_WIDTH-1:0] m_axi_rid_i, + input wire [ M_COUNT*DATA_WIDTH-1:0] m_axi_rdata_i, + input wire [ M_COUNT*2-1:0] m_axi_rresp_i, + input wire [ M_COUNT-1:0] m_axi_rlast_i, + input wire [ M_COUNT*RUSER_WIDTH-1:0] m_axi_ruser_i, + input wire [ M_COUNT-1:0] m_axi_rvalid_i, + output wire [ M_COUNT-1:0] m_axi_rready_o ); - localparam CL_S_COUNT = $clog2(S_COUNT); - localparam CL_M_COUNT = $clog2(M_COUNT); - - localparam AUSER_WIDTH = AWUSER_WIDTH > ARUSER_WIDTH ? AWUSER_WIDTH : ARUSER_WIDTH; - - // default address computation - function automatic [M_COUNT*M_REGIONS*ADDR_WIDTH-1:0] calcBaseAddrs(input integer dummy); - integer i; - reg [ADDR_WIDTH-1:0] base; - begin - calcBaseAddrs = {M_COUNT * M_REGIONS * ADDR_WIDTH{1'b0}}; - base = 0; - for (i = 1; i < M_COUNT * M_REGIONS; i = i + 1) begin - if (M_ADDR_WIDTH[i*32+:32]) begin - base = base + 2 ** M_ADDR_WIDTH[(i-1)*32+:32]; // increment - base = base - (base % 2 ** M_ADDR_WIDTH[i*32+:32]); // align - calcBaseAddrs[i*ADDR_WIDTH+:ADDR_WIDTH] = base; - end + localparam CL_S_COUNT = $clog2(S_COUNT); + localparam CL_M_COUNT = $clog2(M_COUNT); + + localparam AUSER_WIDTH = AWUSER_WIDTH > ARUSER_WIDTH ? AWUSER_WIDTH : ARUSER_WIDTH; + + // default address computation + function automatic [M_COUNT*M_REGIONS*ADDR_WIDTH-1:0] calcBaseAddrs(input integer dummy); + integer i; + reg [ADDR_WIDTH-1:0] base; + begin + calcBaseAddrs = {M_COUNT * M_REGIONS * ADDR_WIDTH{1'b0}}; + base = 0; + for (i = 1; i < M_COUNT * M_REGIONS; i = i + 1) begin + if (M_ADDR_WIDTH[i*32+:32]) begin + base = base + 2 ** M_ADDR_WIDTH[(i-1)*32+:32]; // increment + base = base - (base % 2 ** M_ADDR_WIDTH[i*32+:32]); // align + calcBaseAddrs[i*ADDR_WIDTH+:ADDR_WIDTH] = base; + end + end end - end - endfunction + endfunction - localparam M_BASE_ADDR_INT = M_BASE_ADDR ? M_BASE_ADDR : calcBaseAddrs(0); + localparam M_BASE_ADDR_INT = M_BASE_ADDR ? M_BASE_ADDR : calcBaseAddrs(0); - integer i, j; + integer i, j; - // check configuration + // check configuration `ifndef SYNTHESIS - initial begin - if (M_REGIONS < 1 || M_REGIONS > 16) begin - $error("Error: M_REGIONS must be between 1 and 16 (instance %m)"); - $finish(); - end - - for (i = 0; i < M_COUNT * M_REGIONS; i = i + 1) begin - if (M_ADDR_WIDTH[i*32 +: 32] && (M_ADDR_WIDTH[i*32 +: 32] < 12 || M_ADDR_WIDTH[i*32 +: 32] > ADDR_WIDTH)) begin - $error("Error: address width out of range (instance %m)"); - $finish(); + initial begin + if (M_REGIONS < 1 || M_REGIONS > 16) begin + $error("Error: M_REGIONS must be between 1 and 16 (instance %m)"); + $finish(); end - end - - $display("Addressing configuration for axi_interconnect instance %m"); - for (i = 0; i < M_COUNT * M_REGIONS; i = i + 1) begin - if (M_ADDR_WIDTH[i*32+:32]) begin - $display( - "%2d (%2d): %x / %2d -- %x-%x", i / M_REGIONS, i % M_REGIONS, - M_BASE_ADDR_INT[i*ADDR_WIDTH+:ADDR_WIDTH], M_ADDR_WIDTH[i*32+:32], - M_BASE_ADDR_INT[i*ADDR_WIDTH+:ADDR_WIDTH] & ({ADDR_WIDTH{1'b1}} << M_ADDR_WIDTH[i*32+:32]), - M_BASE_ADDR_INT[i*ADDR_WIDTH+:ADDR_WIDTH] | ({ADDR_WIDTH{1'b1}} >> (ADDR_WIDTH - M_ADDR_WIDTH[i*32+:32]))); + + for (i = 0; i < M_COUNT * M_REGIONS; i = i + 1) begin + if (M_ADDR_WIDTH[i*32 +: 32] && (M_ADDR_WIDTH[i*32 +: 32] < 12 || M_ADDR_WIDTH[i*32 +: 32] > ADDR_WIDTH)) begin + $error("Error: address width out of range (instance %m)"); + $finish(); + end end - end - for (i = 0; i < M_COUNT * M_REGIONS; i = i + 1) begin - for (j = i + 1; j < M_COUNT * M_REGIONS; j = j + 1) begin - if (M_ADDR_WIDTH[i*32+:32] && M_ADDR_WIDTH[j*32+:32]) begin - if (((M_BASE_ADDR_INT[i*ADDR_WIDTH +: ADDR_WIDTH] & ({ADDR_WIDTH{1'b1}} << M_ADDR_WIDTH[i*32 +: 32])) <= (M_BASE_ADDR_INT[j*ADDR_WIDTH +: ADDR_WIDTH] | ({ADDR_WIDTH{1'b1}} >> (ADDR_WIDTH - M_ADDR_WIDTH[j*32 +: 32])))) && ((M_BASE_ADDR_INT[j*ADDR_WIDTH +: ADDR_WIDTH] & ({ADDR_WIDTH{1'b1}} << M_ADDR_WIDTH[j*32 +: 32])) <= (M_BASE_ADDR_INT[i*ADDR_WIDTH +: ADDR_WIDTH] | ({ADDR_WIDTH{1'b1}} >> (ADDR_WIDTH - M_ADDR_WIDTH[i*32 +: 32]))))) begin - $display("Overlapping regions:"); + $display("Addressing configuration for axi_interconnect instance %m"); + for (i = 0; i < M_COUNT * M_REGIONS; i = i + 1) begin + if (M_ADDR_WIDTH[i*32+:32]) begin $display( "%2d (%2d): %x / %2d -- %x-%x", i / M_REGIONS, i % M_REGIONS, M_BASE_ADDR_INT[i*ADDR_WIDTH+:ADDR_WIDTH], M_ADDR_WIDTH[i*32+:32], M_BASE_ADDR_INT[i*ADDR_WIDTH+:ADDR_WIDTH] & ({ADDR_WIDTH{1'b1}} << M_ADDR_WIDTH[i*32+:32]), M_BASE_ADDR_INT[i*ADDR_WIDTH+:ADDR_WIDTH] | ({ADDR_WIDTH{1'b1}} >> (ADDR_WIDTH - M_ADDR_WIDTH[i*32+:32]))); - $display( - "%2d (%2d): %x / %2d -- %x-%x", j / M_REGIONS, j % M_REGIONS, - M_BASE_ADDR_INT[j*ADDR_WIDTH+:ADDR_WIDTH], M_ADDR_WIDTH[j*32+:32], - M_BASE_ADDR_INT[j*ADDR_WIDTH+:ADDR_WIDTH] & ({ADDR_WIDTH{1'b1}} << M_ADDR_WIDTH[j*32+:32]), - M_BASE_ADDR_INT[j*ADDR_WIDTH+:ADDR_WIDTH] | ({ADDR_WIDTH{1'b1}} >> (ADDR_WIDTH - M_ADDR_WIDTH[j*32+:32]))); - $error("Error: address ranges overlap (instance %m)"); - $finish(); - end - end + end end - end - end + + for (i = 0; i < M_COUNT * M_REGIONS; i = i + 1) begin + for (j = i + 1; j < M_COUNT * M_REGIONS; j = j + 1) begin + if (M_ADDR_WIDTH[i*32+:32] && M_ADDR_WIDTH[j*32+:32]) begin + if (((M_BASE_ADDR_INT[i*ADDR_WIDTH +: ADDR_WIDTH] & ({ADDR_WIDTH{1'b1}} << M_ADDR_WIDTH[i*32 +: 32])) <= (M_BASE_ADDR_INT[j*ADDR_WIDTH +: ADDR_WIDTH] | ({ADDR_WIDTH{1'b1}} >> (ADDR_WIDTH - M_ADDR_WIDTH[j*32 +: 32])))) && ((M_BASE_ADDR_INT[j*ADDR_WIDTH +: ADDR_WIDTH] & ({ADDR_WIDTH{1'b1}} << M_ADDR_WIDTH[j*32 +: 32])) <= (M_BASE_ADDR_INT[i*ADDR_WIDTH +: ADDR_WIDTH] | ({ADDR_WIDTH{1'b1}} >> (ADDR_WIDTH - M_ADDR_WIDTH[i*32 +: 32]))))) begin + $display("Overlapping regions:"); + $display( + "%2d (%2d): %x / %2d -- %x-%x", i / M_REGIONS, i % M_REGIONS, + M_BASE_ADDR_INT[i*ADDR_WIDTH+:ADDR_WIDTH], M_ADDR_WIDTH[i*32+:32], + M_BASE_ADDR_INT[i*ADDR_WIDTH+:ADDR_WIDTH] & ({ADDR_WIDTH{1'b1}} << M_ADDR_WIDTH[i*32+:32]), + M_BASE_ADDR_INT[i*ADDR_WIDTH+:ADDR_WIDTH] | ({ADDR_WIDTH{1'b1}} >> (ADDR_WIDTH - M_ADDR_WIDTH[i*32+:32]))); + $display( + "%2d (%2d): %x / %2d -- %x-%x", j / M_REGIONS, j % M_REGIONS, + M_BASE_ADDR_INT[j*ADDR_WIDTH+:ADDR_WIDTH], M_ADDR_WIDTH[j*32+:32], + M_BASE_ADDR_INT[j*ADDR_WIDTH+:ADDR_WIDTH] & ({ADDR_WIDTH{1'b1}} << M_ADDR_WIDTH[j*32+:32]), + M_BASE_ADDR_INT[j*ADDR_WIDTH+:ADDR_WIDTH] | ({ADDR_WIDTH{1'b1}} >> (ADDR_WIDTH - M_ADDR_WIDTH[j*32+:32]))); + $error("Error: address ranges overlap (instance %m)"); + $finish(); + end + end + end + end + end `endif - localparam [2:0] + localparam [2:0] STATE_IDLE = 3'd0, STATE_DECODE = 3'd1, STATE_WRITE = 3'd2, @@ -273,197 +255,197 @@ module axi_interconnect #( STATE_READ_DROP = 3'd6, STATE_WAIT_IDLE = 3'd7; - reg [2:0] state_reg, state_next; - - reg match; - - reg [CL_M_COUNT-1:0] m_select_reg, m_select_next; - reg [ID_WIDTH-1:0] axi_id_reg, axi_id_next; - reg [ADDR_WIDTH-1:0] axi_addr_reg, axi_addr_next; - reg axi_addr_valid_reg, axi_addr_valid_next; - reg [7:0] axi_len_reg, axi_len_next; - reg [2:0] axi_size_reg, axi_size_next; - reg [1:0] axi_burst_reg, axi_burst_next; - reg axi_lock_reg, axi_lock_next; - reg [3:0] axi_cache_reg, axi_cache_next; - reg [2:0] axi_prot_reg, axi_prot_next; - reg [3:0] axi_qos_reg, axi_qos_next; - reg [3:0] axi_region_reg, axi_region_next; - reg [AUSER_WIDTH-1:0] axi_auser_reg, axi_auser_next; - reg [1:0] axi_bresp_reg, axi_bresp_next; - reg [BUSER_WIDTH-1:0] axi_buser_reg, axi_buser_next; - - reg [S_COUNT-1:0] s_axi_awready_reg, s_axi_awready_next; - reg [S_COUNT-1:0] s_axi_wready_reg, s_axi_wready_next; - reg [S_COUNT-1:0] s_axi_bvalid_reg, s_axi_bvalid_next; - reg [S_COUNT-1:0] s_axi_arready_reg, s_axi_arready_next; - - reg [M_COUNT-1:0] m_axi_awvalid_reg, m_axi_awvalid_next; - reg [M_COUNT-1:0] m_axi_bready_reg, m_axi_bready_next; - reg [M_COUNT-1:0] m_axi_arvalid_reg, m_axi_arvalid_next; - reg [M_COUNT-1:0] m_axi_rready_reg, m_axi_rready_next; - - // internal datapath - reg [ ID_WIDTH-1:0] s_axi_rid_int; - reg [ DATA_WIDTH-1:0] s_axi_rdata_int; - reg [ 1:0] s_axi_rresp_int; - reg s_axi_rlast_int; - reg [RUSER_WIDTH-1:0] s_axi_ruser_int; - reg s_axi_rvalid_int; - reg s_axi_rready_int_reg; - wire s_axi_rready_int_early; - - reg [ DATA_WIDTH-1:0] m_axi_wdata_int; - reg [ STRB_WIDTH-1:0] m_axi_wstrb_int; - reg m_axi_wlast_int; - reg [WUSER_WIDTH-1:0] m_axi_wuser_int; - reg m_axi_wvalid_int; - reg m_axi_wready_int_reg; - wire m_axi_wready_int_early; - - assign s_axi_awready_o = s_axi_awready_reg; - assign s_axi_wready_o = s_axi_wready_reg; - assign s_axi_bid_o = {S_COUNT{axi_id_reg}}; - assign s_axi_bresp_o = {S_COUNT{axi_bresp_reg}}; - assign s_axi_buser_o = {S_COUNT{BUSER_ENABLE ? axi_buser_reg : {BUSER_WIDTH{1'b0}}}}; - assign s_axi_bvalid_o = s_axi_bvalid_reg; - assign s_axi_arready_o = s_axi_arready_reg; - - assign m_axi_awid_o = {M_COUNT{FORWARD_ID ? axi_id_reg : {ID_WIDTH{1'b0}}}}; - assign m_axi_awaddr_o = {M_COUNT{axi_addr_reg}}; - assign m_axi_awlen_o = {M_COUNT{axi_len_reg}}; - assign m_axi_awsize_o = {M_COUNT{axi_size_reg}}; - assign m_axi_awburst_o = {M_COUNT{axi_burst_reg}}; - assign m_axi_awlock_o = {M_COUNT{axi_lock_reg}}; - assign m_axi_awcache_o = {M_COUNT{axi_cache_reg}}; - assign m_axi_awprot_o = {M_COUNT{axi_prot_reg}}; - assign m_axi_awqos_o = {M_COUNT{axi_qos_reg}}; - assign m_axi_awregion_o = {M_COUNT{axi_region_reg}}; - assign m_axi_awuser_o = {M_COUNT{AWUSER_ENABLE ? axi_auser_reg[AWUSER_WIDTH-1:0] : {AWUSER_WIDTH{1'b0}}}}; - assign m_axi_awvalid_o = m_axi_awvalid_reg; - assign m_axi_bready_o = m_axi_bready_reg; - assign m_axi_arid_o = {M_COUNT{FORWARD_ID ? axi_id_reg : {ID_WIDTH{1'b0}}}}; - assign m_axi_araddr_o = {M_COUNT{axi_addr_reg}}; - assign m_axi_arlen_o = {M_COUNT{axi_len_reg}}; - assign m_axi_arsize_o = {M_COUNT{axi_size_reg}}; - assign m_axi_arburst_o = {M_COUNT{axi_burst_reg}}; - assign m_axi_arlock_o = {M_COUNT{axi_lock_reg}}; - assign m_axi_arcache_o = {M_COUNT{axi_cache_reg}}; - assign m_axi_arprot_o = {M_COUNT{axi_prot_reg}}; - assign m_axi_arqos_o = {M_COUNT{axi_qos_reg}}; - assign m_axi_arregion_o = {M_COUNT{axi_region_reg}}; - assign m_axi_aruser_o = {M_COUNT{ARUSER_ENABLE ? axi_auser_reg[ARUSER_WIDTH-1:0] : {ARUSER_WIDTH{1'b0}}}}; - assign m_axi_arvalid_o = m_axi_arvalid_reg; - assign m_axi_rready_o = m_axi_rready_reg; - - // slave side mux - wire [(CL_S_COUNT > 0 ? CL_S_COUNT-1 : 0):0] s_select; - - wire [ID_WIDTH-1:0] current_s_axi_awid = s_axi_awid_i[s_select*ID_WIDTH+:ID_WIDTH]; - wire [ADDR_WIDTH-1:0] current_s_axi_awaddr = s_axi_awaddr_i[s_select*ADDR_WIDTH+:ADDR_WIDTH]; - wire [7:0] current_s_axi_awlen = s_axi_awlen_i[s_select*8+:8]; - wire [2:0] current_s_axi_awsize = s_axi_awsize_i[s_select*3+:3]; - wire [1:0] current_s_axi_awburst = s_axi_awburst_i[s_select*2+:2]; - wire current_s_axi_awlock = s_axi_awlock_i[s_select]; - wire [3:0] current_s_axi_awcache = s_axi_awcache_i[s_select*4+:4]; - wire [2:0] current_s_axi_awprot = s_axi_awprot_i[s_select*3+:3]; - wire [3:0] current_s_axi_awqos = s_axi_awqos_i[s_select*4+:4]; - wire [AWUSER_WIDTH-1:0] current_s_axi_awuser = s_axi_awuser_i[s_select*AWUSER_WIDTH+:AWUSER_WIDTH]; - wire current_s_axi_awvalid = s_axi_awvalid_i[s_select]; - wire current_s_axi_awready = s_axi_awready_o[s_select]; - wire [DATA_WIDTH-1:0] current_s_axi_wdata = s_axi_wdata_i[s_select*DATA_WIDTH+:DATA_WIDTH]; - wire [STRB_WIDTH-1:0] current_s_axi_wstrb = s_axi_wstrb_i[s_select*STRB_WIDTH+:STRB_WIDTH]; - wire current_s_axi_wlast = s_axi_wlast_i[s_select]; - wire [WUSER_WIDTH-1:0] current_s_axi_wuser = s_axi_wuser_i[s_select*WUSER_WIDTH+:WUSER_WIDTH]; - wire current_s_axi_wvalid = s_axi_wvalid_i[s_select]; - wire current_s_axi_wready = s_axi_wready_o[s_select]; - wire [ID_WIDTH-1:0] current_s_axi_bid = s_axi_bid_o[s_select*ID_WIDTH+:ID_WIDTH]; - wire [1:0] current_s_axi_bresp = s_axi_bresp_o[s_select*2+:2]; - wire [BUSER_WIDTH-1:0] current_s_axi_buser = s_axi_buser_o[s_select*BUSER_WIDTH+:BUSER_WIDTH]; - wire current_s_axi_bvalid = s_axi_bvalid_o[s_select]; - wire current_s_axi_bready = s_axi_bready_i[s_select]; - wire [ID_WIDTH-1:0] current_s_axi_arid = s_axi_arid_i[s_select*ID_WIDTH+:ID_WIDTH]; - wire [ADDR_WIDTH-1:0] current_s_axi_araddr = s_axi_araddr_i[s_select*ADDR_WIDTH+:ADDR_WIDTH]; - wire [7:0] current_s_axi_arlen = s_axi_arlen_i[s_select*8+:8]; - wire [2:0] current_s_axi_arsize = s_axi_arsize_i[s_select*3+:3]; - wire [1:0] current_s_axi_arburst = s_axi_arburst_i[s_select*2+:2]; - wire current_s_axi_arlock = s_axi_arlock_i[s_select]; - wire [3:0] current_s_axi_arcache = s_axi_arcache_i[s_select*4+:4]; - wire [2:0] current_s_axi_arprot = s_axi_arprot_i[s_select*3+:3]; - wire [3:0] current_s_axi_arqos = s_axi_arqos_i[s_select*4+:4]; - wire [ARUSER_WIDTH-1:0] current_s_axi_aruser = s_axi_aruser_i[s_select*ARUSER_WIDTH+:ARUSER_WIDTH]; - wire current_s_axi_arvalid = s_axi_arvalid_i[s_select]; - wire current_s_axi_arready = s_axi_arready_o[s_select]; - wire [ID_WIDTH-1:0] current_s_axi_rid = s_axi_rid_o[s_select*ID_WIDTH+:ID_WIDTH]; - wire [DATA_WIDTH-1:0] current_s_axi_rdata = s_axi_rdata_o[s_select*DATA_WIDTH+:DATA_WIDTH]; - wire [1:0] current_s_axi_rresp = s_axi_rresp_o[s_select*2+:2]; - wire current_s_axi_rlast = s_axi_rlast_o[s_select]; - wire [RUSER_WIDTH-1:0] current_s_axi_ruser = s_axi_ruser_o[s_select*RUSER_WIDTH+:RUSER_WIDTH]; - wire current_s_axi_rvalid = s_axi_rvalid_o[s_select]; - wire current_s_axi_rready = s_axi_rready_i[s_select]; - - // master side mux - wire [ID_WIDTH-1:0] current_m_axi_awid = m_axi_awid_o[m_select_reg*ID_WIDTH+:ID_WIDTH]; - wire [ADDR_WIDTH-1:0] current_m_axi_awaddr = m_axi_awaddr_o[m_select_reg*ADDR_WIDTH+:ADDR_WIDTH]; - wire [7:0] current_m_axi_awlen = m_axi_awlen_o[m_select_reg*8+:8]; - wire [2:0] current_m_axi_awsize = m_axi_awsize_o[m_select_reg*3+:3]; - wire [1:0] current_m_axi_awburst = m_axi_awburst_o[m_select_reg*2+:2]; - wire current_m_axi_awlock = m_axi_awlock_o[m_select_reg]; - wire [3:0] current_m_axi_awcache = m_axi_awcache_o[m_select_reg*4+:4]; - wire [2:0] current_m_axi_awprot = m_axi_awprot_o[m_select_reg*3+:3]; - wire [3:0] current_m_axi_awqos = m_axi_awqos_o[m_select_reg*4+:4]; - wire [3:0] current_m_axi_awregion = m_axi_awregion_o[m_select_reg*4+:4]; - wire [AWUSER_WIDTH-1:0] current_m_axi_awuser = m_axi_awuser_o[m_select_reg*AWUSER_WIDTH +: AWUSER_WIDTH]; - wire current_m_axi_awvalid = m_axi_awvalid_o[m_select_reg]; - wire current_m_axi_awready = m_axi_awready_i[m_select_reg]; - wire [DATA_WIDTH-1:0] current_m_axi_wdata = m_axi_wdata_o[m_select_reg*DATA_WIDTH+:DATA_WIDTH]; - wire [STRB_WIDTH-1:0] current_m_axi_wstrb = m_axi_wstrb_o[m_select_reg*STRB_WIDTH+:STRB_WIDTH]; - wire current_m_axi_wlast = m_axi_wlast_o[m_select_reg]; - wire [WUSER_WIDTH-1:0] current_m_axi_wuser = m_axi_wuser_o[m_select_reg*WUSER_WIDTH+:WUSER_WIDTH]; - wire current_m_axi_wvalid = m_axi_wvalid_o[m_select_reg]; - wire current_m_axi_wready = m_axi_wready_i[m_select_reg]; - wire [ID_WIDTH-1:0] current_m_axi_bid = m_axi_bid_i[m_select_reg*ID_WIDTH+:ID_WIDTH]; - wire [1:0] current_m_axi_bresp = m_axi_bresp_i[m_select_reg*2+:2]; - wire [BUSER_WIDTH-1:0] current_m_axi_buser = m_axi_buser_i[m_select_reg*BUSER_WIDTH+:BUSER_WIDTH]; - wire current_m_axi_bvalid = m_axi_bvalid_i[m_select_reg]; - wire current_m_axi_bready = m_axi_bready_o[m_select_reg]; - wire [ID_WIDTH-1:0] current_m_axi_arid = m_axi_arid_o[m_select_reg*ID_WIDTH+:ID_WIDTH]; - wire [ADDR_WIDTH-1:0] current_m_axi_araddr = m_axi_araddr_o[m_select_reg*ADDR_WIDTH+:ADDR_WIDTH]; - wire [7:0] current_m_axi_arlen = m_axi_arlen_o[m_select_reg*8+:8]; - wire [2:0] current_m_axi_arsize = m_axi_arsize_o[m_select_reg*3+:3]; - wire [1:0] current_m_axi_arburst = m_axi_arburst_o[m_select_reg*2+:2]; - wire current_m_axi_arlock = m_axi_arlock_o[m_select_reg]; - wire [3:0] current_m_axi_arcache = m_axi_arcache_o[m_select_reg*4+:4]; - wire [2:0] current_m_axi_arprot = m_axi_arprot_o[m_select_reg*3+:3]; - wire [3:0] current_m_axi_arqos = m_axi_arqos_o[m_select_reg*4+:4]; - wire [3:0] current_m_axi_arregion = m_axi_arregion_o[m_select_reg*4+:4]; - wire [ARUSER_WIDTH-1:0] current_m_axi_aruser = m_axi_aruser_o[m_select_reg*ARUSER_WIDTH +: ARUSER_WIDTH]; - wire current_m_axi_arvalid = m_axi_arvalid_o[m_select_reg]; - wire current_m_axi_arready = m_axi_arready_i[m_select_reg]; - wire [ID_WIDTH-1:0] current_m_axi_rid = m_axi_rid_i[m_select_reg*ID_WIDTH+:ID_WIDTH]; - wire [DATA_WIDTH-1:0] current_m_axi_rdata = m_axi_rdata_i[m_select_reg*DATA_WIDTH+:DATA_WIDTH]; - wire [1:0] current_m_axi_rresp = m_axi_rresp_i[m_select_reg*2+:2]; - wire current_m_axi_rlast = m_axi_rlast_i[m_select_reg]; - wire [RUSER_WIDTH-1:0] current_m_axi_ruser = m_axi_ruser_i[m_select_reg*RUSER_WIDTH+:RUSER_WIDTH]; - wire current_m_axi_rvalid = m_axi_rvalid_i[m_select_reg]; - wire current_m_axi_rready = m_axi_rready_o[m_select_reg]; - - // arbiter instance - wire [S_COUNT*2-1:0] request; - wire [S_COUNT*2-1:0] acknowledge; - wire [S_COUNT*2-1:0] grant; - wire grant_valid; - wire [CL_S_COUNT:0] grant_encoded; - - wire read = grant_encoded[0]; - assign s_select = grant_encoded >> 1; - - arbiter #( + reg [2:0] state_reg, state_next; + + reg match; + + reg [CL_M_COUNT-1:0] m_select_reg, m_select_next; + reg [ID_WIDTH-1:0] axi_id_reg, axi_id_next; + reg [ADDR_WIDTH-1:0] axi_addr_reg, axi_addr_next; + reg axi_addr_valid_reg, axi_addr_valid_next; + reg [7:0] axi_len_reg, axi_len_next; + reg [2:0] axi_size_reg, axi_size_next; + reg [1:0] axi_burst_reg, axi_burst_next; + reg axi_lock_reg, axi_lock_next; + reg [3:0] axi_cache_reg, axi_cache_next; + reg [2:0] axi_prot_reg, axi_prot_next; + reg [3:0] axi_qos_reg, axi_qos_next; + reg [3:0] axi_region_reg, axi_region_next; + reg [AUSER_WIDTH-1:0] axi_auser_reg, axi_auser_next; + reg [1:0] axi_bresp_reg, axi_bresp_next; + reg [BUSER_WIDTH-1:0] axi_buser_reg, axi_buser_next; + + reg [S_COUNT-1:0] s_axi_awready_reg, s_axi_awready_next; + reg [S_COUNT-1:0] s_axi_wready_reg, s_axi_wready_next; + reg [S_COUNT-1:0] s_axi_bvalid_reg, s_axi_bvalid_next; + reg [S_COUNT-1:0] s_axi_arready_reg, s_axi_arready_next; + + reg [M_COUNT-1:0] m_axi_awvalid_reg, m_axi_awvalid_next; + reg [M_COUNT-1:0] m_axi_bready_reg, m_axi_bready_next; + reg [M_COUNT-1:0] m_axi_arvalid_reg, m_axi_arvalid_next; + reg [M_COUNT-1:0] m_axi_rready_reg, m_axi_rready_next; + + // internal datapath + reg [ ID_WIDTH-1:0] s_axi_rid_int; + reg [ DATA_WIDTH-1:0] s_axi_rdata_int; + reg [ 1:0] s_axi_rresp_int; + reg s_axi_rlast_int; + reg [RUSER_WIDTH-1:0] s_axi_ruser_int; + reg s_axi_rvalid_int; + reg s_axi_rready_int_reg; + wire s_axi_rready_int_early; + + reg [ DATA_WIDTH-1:0] m_axi_wdata_int; + reg [ STRB_WIDTH-1:0] m_axi_wstrb_int; + reg m_axi_wlast_int; + reg [WUSER_WIDTH-1:0] m_axi_wuser_int; + reg m_axi_wvalid_int; + reg m_axi_wready_int_reg; + wire m_axi_wready_int_early; + + assign s_axi_awready_o = s_axi_awready_reg; + assign s_axi_wready_o = s_axi_wready_reg; + assign s_axi_bid_o = {S_COUNT{axi_id_reg}}; + assign s_axi_bresp_o = {S_COUNT{axi_bresp_reg}}; + assign s_axi_buser_o = {S_COUNT{BUSER_ENABLE ? axi_buser_reg : {BUSER_WIDTH{1'b0}}}}; + assign s_axi_bvalid_o = s_axi_bvalid_reg; + assign s_axi_arready_o = s_axi_arready_reg; + + assign m_axi_awid_o = {M_COUNT{FORWARD_ID ? axi_id_reg : {ID_WIDTH{1'b0}}}}; + assign m_axi_awaddr_o = {M_COUNT{axi_addr_reg}}; + assign m_axi_awlen_o = {M_COUNT{axi_len_reg}}; + assign m_axi_awsize_o = {M_COUNT{axi_size_reg}}; + assign m_axi_awburst_o = {M_COUNT{axi_burst_reg}}; + assign m_axi_awlock_o = {M_COUNT{axi_lock_reg}}; + assign m_axi_awcache_o = {M_COUNT{axi_cache_reg}}; + assign m_axi_awprot_o = {M_COUNT{axi_prot_reg}}; + assign m_axi_awqos_o = {M_COUNT{axi_qos_reg}}; + assign m_axi_awregion_o = {M_COUNT{axi_region_reg}}; + assign m_axi_awuser_o = {M_COUNT{AWUSER_ENABLE ? axi_auser_reg[AWUSER_WIDTH-1:0] : {AWUSER_WIDTH{1'b0}}}}; + assign m_axi_awvalid_o = m_axi_awvalid_reg; + assign m_axi_bready_o = m_axi_bready_reg; + assign m_axi_arid_o = {M_COUNT{FORWARD_ID ? axi_id_reg : {ID_WIDTH{1'b0}}}}; + assign m_axi_araddr_o = {M_COUNT{axi_addr_reg}}; + assign m_axi_arlen_o = {M_COUNT{axi_len_reg}}; + assign m_axi_arsize_o = {M_COUNT{axi_size_reg}}; + assign m_axi_arburst_o = {M_COUNT{axi_burst_reg}}; + assign m_axi_arlock_o = {M_COUNT{axi_lock_reg}}; + assign m_axi_arcache_o = {M_COUNT{axi_cache_reg}}; + assign m_axi_arprot_o = {M_COUNT{axi_prot_reg}}; + assign m_axi_arqos_o = {M_COUNT{axi_qos_reg}}; + assign m_axi_arregion_o = {M_COUNT{axi_region_reg}}; + assign m_axi_aruser_o = {M_COUNT{ARUSER_ENABLE ? axi_auser_reg[ARUSER_WIDTH-1:0] : {ARUSER_WIDTH{1'b0}}}}; + assign m_axi_arvalid_o = m_axi_arvalid_reg; + assign m_axi_rready_o = m_axi_rready_reg; + + // slave side mux + wire [(CL_S_COUNT > 0 ? CL_S_COUNT-1 : 0):0] s_select; + + wire [ID_WIDTH-1:0] current_s_axi_awid = s_axi_awid_i[s_select*ID_WIDTH+:ID_WIDTH]; + wire [ADDR_WIDTH-1:0] current_s_axi_awaddr = s_axi_awaddr_i[s_select*ADDR_WIDTH+:ADDR_WIDTH]; + wire [7:0] current_s_axi_awlen = s_axi_awlen_i[s_select*8+:8]; + wire [2:0] current_s_axi_awsize = s_axi_awsize_i[s_select*3+:3]; + wire [1:0] current_s_axi_awburst = s_axi_awburst_i[s_select*2+:2]; + wire current_s_axi_awlock = s_axi_awlock_i[s_select]; + wire [3:0] current_s_axi_awcache = s_axi_awcache_i[s_select*4+:4]; + wire [2:0] current_s_axi_awprot = s_axi_awprot_i[s_select*3+:3]; + wire [3:0] current_s_axi_awqos = s_axi_awqos_i[s_select*4+:4]; + wire [AWUSER_WIDTH-1:0] current_s_axi_awuser = s_axi_awuser_i[s_select*AWUSER_WIDTH+:AWUSER_WIDTH]; + wire current_s_axi_awvalid = s_axi_awvalid_i[s_select]; + wire current_s_axi_awready = s_axi_awready_o[s_select]; + wire [DATA_WIDTH-1:0] current_s_axi_wdata = s_axi_wdata_i[s_select*DATA_WIDTH+:DATA_WIDTH]; + wire [STRB_WIDTH-1:0] current_s_axi_wstrb = s_axi_wstrb_i[s_select*STRB_WIDTH+:STRB_WIDTH]; + wire current_s_axi_wlast = s_axi_wlast_i[s_select]; + wire [WUSER_WIDTH-1:0] current_s_axi_wuser = s_axi_wuser_i[s_select*WUSER_WIDTH+:WUSER_WIDTH]; + wire current_s_axi_wvalid = s_axi_wvalid_i[s_select]; + wire current_s_axi_wready = s_axi_wready_o[s_select]; + wire [ID_WIDTH-1:0] current_s_axi_bid = s_axi_bid_o[s_select*ID_WIDTH+:ID_WIDTH]; + wire [1:0] current_s_axi_bresp = s_axi_bresp_o[s_select*2+:2]; + wire [BUSER_WIDTH-1:0] current_s_axi_buser = s_axi_buser_o[s_select*BUSER_WIDTH+:BUSER_WIDTH]; + wire current_s_axi_bvalid = s_axi_bvalid_o[s_select]; + wire current_s_axi_bready = s_axi_bready_i[s_select]; + wire [ID_WIDTH-1:0] current_s_axi_arid = s_axi_arid_i[s_select*ID_WIDTH+:ID_WIDTH]; + wire [ADDR_WIDTH-1:0] current_s_axi_araddr = s_axi_araddr_i[s_select*ADDR_WIDTH+:ADDR_WIDTH]; + wire [7:0] current_s_axi_arlen = s_axi_arlen_i[s_select*8+:8]; + wire [2:0] current_s_axi_arsize = s_axi_arsize_i[s_select*3+:3]; + wire [1:0] current_s_axi_arburst = s_axi_arburst_i[s_select*2+:2]; + wire current_s_axi_arlock = s_axi_arlock_i[s_select]; + wire [3:0] current_s_axi_arcache = s_axi_arcache_i[s_select*4+:4]; + wire [2:0] current_s_axi_arprot = s_axi_arprot_i[s_select*3+:3]; + wire [3:0] current_s_axi_arqos = s_axi_arqos_i[s_select*4+:4]; + wire [ARUSER_WIDTH-1:0] current_s_axi_aruser = s_axi_aruser_i[s_select*ARUSER_WIDTH+:ARUSER_WIDTH]; + wire current_s_axi_arvalid = s_axi_arvalid_i[s_select]; + wire current_s_axi_arready = s_axi_arready_o[s_select]; + wire [ID_WIDTH-1:0] current_s_axi_rid = s_axi_rid_o[s_select*ID_WIDTH+:ID_WIDTH]; + wire [DATA_WIDTH-1:0] current_s_axi_rdata = s_axi_rdata_o[s_select*DATA_WIDTH+:DATA_WIDTH]; + wire [1:0] current_s_axi_rresp = s_axi_rresp_o[s_select*2+:2]; + wire current_s_axi_rlast = s_axi_rlast_o[s_select]; + wire [RUSER_WIDTH-1:0] current_s_axi_ruser = s_axi_ruser_o[s_select*RUSER_WIDTH+:RUSER_WIDTH]; + wire current_s_axi_rvalid = s_axi_rvalid_o[s_select]; + wire current_s_axi_rready = s_axi_rready_i[s_select]; + + // master side mux + wire [ID_WIDTH-1:0] current_m_axi_awid = m_axi_awid_o[m_select_reg*ID_WIDTH+:ID_WIDTH]; + wire [ADDR_WIDTH-1:0] current_m_axi_awaddr = m_axi_awaddr_o[m_select_reg*ADDR_WIDTH+:ADDR_WIDTH]; + wire [7:0] current_m_axi_awlen = m_axi_awlen_o[m_select_reg*8+:8]; + wire [2:0] current_m_axi_awsize = m_axi_awsize_o[m_select_reg*3+:3]; + wire [1:0] current_m_axi_awburst = m_axi_awburst_o[m_select_reg*2+:2]; + wire current_m_axi_awlock = m_axi_awlock_o[m_select_reg]; + wire [3:0] current_m_axi_awcache = m_axi_awcache_o[m_select_reg*4+:4]; + wire [2:0] current_m_axi_awprot = m_axi_awprot_o[m_select_reg*3+:3]; + wire [3:0] current_m_axi_awqos = m_axi_awqos_o[m_select_reg*4+:4]; + wire [3:0] current_m_axi_awregion = m_axi_awregion_o[m_select_reg*4+:4]; + wire [AWUSER_WIDTH-1:0] current_m_axi_awuser = m_axi_awuser_o[m_select_reg*AWUSER_WIDTH +: AWUSER_WIDTH]; + wire current_m_axi_awvalid = m_axi_awvalid_o[m_select_reg]; + wire current_m_axi_awready = m_axi_awready_i[m_select_reg]; + wire [DATA_WIDTH-1:0] current_m_axi_wdata = m_axi_wdata_o[m_select_reg*DATA_WIDTH+:DATA_WIDTH]; + wire [STRB_WIDTH-1:0] current_m_axi_wstrb = m_axi_wstrb_o[m_select_reg*STRB_WIDTH+:STRB_WIDTH]; + wire current_m_axi_wlast = m_axi_wlast_o[m_select_reg]; + wire [WUSER_WIDTH-1:0] current_m_axi_wuser = m_axi_wuser_o[m_select_reg*WUSER_WIDTH+:WUSER_WIDTH]; + wire current_m_axi_wvalid = m_axi_wvalid_o[m_select_reg]; + wire current_m_axi_wready = m_axi_wready_i[m_select_reg]; + wire [ID_WIDTH-1:0] current_m_axi_bid = m_axi_bid_i[m_select_reg*ID_WIDTH+:ID_WIDTH]; + wire [1:0] current_m_axi_bresp = m_axi_bresp_i[m_select_reg*2+:2]; + wire [BUSER_WIDTH-1:0] current_m_axi_buser = m_axi_buser_i[m_select_reg*BUSER_WIDTH+:BUSER_WIDTH]; + wire current_m_axi_bvalid = m_axi_bvalid_i[m_select_reg]; + wire current_m_axi_bready = m_axi_bready_o[m_select_reg]; + wire [ID_WIDTH-1:0] current_m_axi_arid = m_axi_arid_o[m_select_reg*ID_WIDTH+:ID_WIDTH]; + wire [ADDR_WIDTH-1:0] current_m_axi_araddr = m_axi_araddr_o[m_select_reg*ADDR_WIDTH+:ADDR_WIDTH]; + wire [7:0] current_m_axi_arlen = m_axi_arlen_o[m_select_reg*8+:8]; + wire [2:0] current_m_axi_arsize = m_axi_arsize_o[m_select_reg*3+:3]; + wire [1:0] current_m_axi_arburst = m_axi_arburst_o[m_select_reg*2+:2]; + wire current_m_axi_arlock = m_axi_arlock_o[m_select_reg]; + wire [3:0] current_m_axi_arcache = m_axi_arcache_o[m_select_reg*4+:4]; + wire [2:0] current_m_axi_arprot = m_axi_arprot_o[m_select_reg*3+:3]; + wire [3:0] current_m_axi_arqos = m_axi_arqos_o[m_select_reg*4+:4]; + wire [3:0] current_m_axi_arregion = m_axi_arregion_o[m_select_reg*4+:4]; + wire [ARUSER_WIDTH-1:0] current_m_axi_aruser = m_axi_aruser_o[m_select_reg*ARUSER_WIDTH +: ARUSER_WIDTH]; + wire current_m_axi_arvalid = m_axi_arvalid_o[m_select_reg]; + wire current_m_axi_arready = m_axi_arready_i[m_select_reg]; + wire [ID_WIDTH-1:0] current_m_axi_rid = m_axi_rid_i[m_select_reg*ID_WIDTH+:ID_WIDTH]; + wire [DATA_WIDTH-1:0] current_m_axi_rdata = m_axi_rdata_i[m_select_reg*DATA_WIDTH+:DATA_WIDTH]; + wire [1:0] current_m_axi_rresp = m_axi_rresp_i[m_select_reg*2+:2]; + wire current_m_axi_rlast = m_axi_rlast_i[m_select_reg]; + wire [RUSER_WIDTH-1:0] current_m_axi_ruser = m_axi_ruser_i[m_select_reg*RUSER_WIDTH+:RUSER_WIDTH]; + wire current_m_axi_rvalid = m_axi_rvalid_i[m_select_reg]; + wire current_m_axi_rready = m_axi_rready_o[m_select_reg]; + + // arbiter instance + wire [S_COUNT*2-1:0] request; + wire [S_COUNT*2-1:0] acknowledge; + wire [S_COUNT*2-1:0] grant; + wire grant_valid; + wire [CL_S_COUNT:0] grant_encoded; + + wire read = grant_encoded[0]; + assign s_select = grant_encoded >> 1; + + arbiter #( .PORTS (S_COUNT * 2), .TYPE ("ROUND_ROBIN"), .BLOCK ("ACKNOWLEDGE"), .LSB_PRIORITY("HIGH") - ) arb_inst ( + ) arb_inst ( .clk (clk_i), .rst (rst_i), .request (request), @@ -471,519 +453,519 @@ module axi_interconnect #( .grant (grant), .grant_valid (grant_valid), .grant_encoded(grant_encoded) - ); - - genvar n; - - // request generation - generate - for (n = 0; n < S_COUNT; n = n + 1) begin : req_gen - assign request[2*n] = s_axi_awvalid_i[n]; - assign request[2*n+1] = s_axi_arvalid_i[n]; - end - endgenerate - - // acknowledge generation - generate - for (n = 0; n < S_COUNT; n = n + 1) begin : ack_gen - assign acknowledge[2*n] = grant[2*n] && s_axi_bvalid_o[n] && s_axi_bready_i[n]; - assign acknowledge[2*n+1] = grant[2*n+1] && s_axi_rvalid_o[n] && s_axi_rready_i[n] && s_axi_rlast_o[n]; - end - endgenerate - - always @* begin - state_next = STATE_IDLE; - - match = 1'b0; - - m_select_next = m_select_reg; - axi_id_next = axi_id_reg; - axi_addr_next = axi_addr_reg; - axi_addr_valid_next = axi_addr_valid_reg; - axi_len_next = axi_len_reg; - axi_size_next = axi_size_reg; - axi_burst_next = axi_burst_reg; - axi_lock_next = axi_lock_reg; - axi_cache_next = axi_cache_reg; - axi_prot_next = axi_prot_reg; - axi_qos_next = axi_qos_reg; - axi_region_next = axi_region_reg; - axi_auser_next = axi_auser_reg; - axi_bresp_next = axi_bresp_reg; - axi_buser_next = axi_buser_reg; - - s_axi_awready_next = 0; - s_axi_wready_next = 0; - s_axi_bvalid_next = s_axi_bvalid_reg & ~s_axi_bready_i; - s_axi_arready_next = 0; - - m_axi_awvalid_next = m_axi_awvalid_reg & ~m_axi_awready_i; - m_axi_bready_next = 0; - m_axi_arvalid_next = m_axi_arvalid_reg & ~m_axi_arready_i; - m_axi_rready_next = 0; - - s_axi_rid_int = axi_id_reg; - s_axi_rdata_int = current_m_axi_rdata; - s_axi_rresp_int = current_m_axi_rresp; - s_axi_rlast_int = current_m_axi_rlast; - s_axi_ruser_int = current_m_axi_ruser; - s_axi_rvalid_int = 1'b0; - - m_axi_wdata_int = current_s_axi_wdata; - m_axi_wstrb_int = current_s_axi_wstrb; - m_axi_wlast_int = current_s_axi_wlast; - m_axi_wuser_int = current_s_axi_wuser; - m_axi_wvalid_int = 1'b0; - - case (state_reg) - STATE_IDLE: begin - // idle state; wait for arbitration - - if (grant_valid) begin - - axi_addr_valid_next = 1'b1; - - if (read) begin - // reading - axi_addr_next = current_s_axi_araddr; - axi_prot_next = current_s_axi_arprot; - axi_id_next = current_s_axi_arid; - axi_addr_next = current_s_axi_araddr; - axi_len_next = current_s_axi_arlen; - axi_size_next = current_s_axi_arsize; - axi_burst_next = current_s_axi_arburst; - axi_lock_next = current_s_axi_arlock; - axi_cache_next = current_s_axi_arcache; - axi_prot_next = current_s_axi_arprot; - axi_qos_next = current_s_axi_arqos; - axi_auser_next = current_s_axi_aruser; - s_axi_arready_next[s_select] = 1'b1; - end else begin - // writing - axi_addr_next = current_s_axi_awaddr; - axi_prot_next = current_s_axi_awprot; - axi_id_next = current_s_axi_awid; - axi_addr_next = current_s_axi_awaddr; - axi_len_next = current_s_axi_awlen; - axi_size_next = current_s_axi_awsize; - axi_burst_next = current_s_axi_awburst; - axi_lock_next = current_s_axi_awlock; - axi_cache_next = current_s_axi_awcache; - axi_prot_next = current_s_axi_awprot; - axi_qos_next = current_s_axi_awqos; - axi_auser_next = current_s_axi_awuser; - s_axi_awready_next[s_select] = 1'b1; - end - - state_next = STATE_DECODE; - end else begin - state_next = STATE_IDLE; - end + ); + + genvar n; + + // request generation + generate + for (n = 0; n < S_COUNT; n = n + 1) begin : req_gen + assign request[2*n] = s_axi_awvalid_i[n]; + assign request[2*n+1] = s_axi_arvalid_i[n]; + end + endgenerate + + // acknowledge generation + generate + for (n = 0; n < S_COUNT; n = n + 1) begin : ack_gen + assign acknowledge[2*n] = grant[2*n] && s_axi_bvalid_o[n] && s_axi_bready_i[n]; + assign acknowledge[2*n+1] = grant[2*n+1] && s_axi_rvalid_o[n] && s_axi_rready_i[n] && s_axi_rlast_o[n]; end - STATE_DECODE: begin - // decode state; determine master interface - - match = 1'b0; - for (i = 0; i < M_COUNT; i = i + 1) begin - for (j = 0; j < M_REGIONS; j = j + 1) begin - if (M_ADDR_WIDTH[(i*M_REGIONS+j)*32 +: 32] && (!M_SECURE[i] || !axi_prot_reg[1]) && ((read ? M_CONNECT_READ : M_CONNECT_WRITE) & (1 << (s_select+i*S_COUNT))) && (axi_addr_reg >> M_ADDR_WIDTH[(i*M_REGIONS+j)*32 +: 32]) == (M_BASE_ADDR_INT[(i*M_REGIONS+j)*ADDR_WIDTH +: ADDR_WIDTH] >> M_ADDR_WIDTH[(i*M_REGIONS+j)*32 +: 32])) begin - m_select_next = i; - axi_region_next = j; - match = 1'b1; + endgenerate + + always @* begin + state_next = STATE_IDLE; + + match = 1'b0; + + m_select_next = m_select_reg; + axi_id_next = axi_id_reg; + axi_addr_next = axi_addr_reg; + axi_addr_valid_next = axi_addr_valid_reg; + axi_len_next = axi_len_reg; + axi_size_next = axi_size_reg; + axi_burst_next = axi_burst_reg; + axi_lock_next = axi_lock_reg; + axi_cache_next = axi_cache_reg; + axi_prot_next = axi_prot_reg; + axi_qos_next = axi_qos_reg; + axi_region_next = axi_region_reg; + axi_auser_next = axi_auser_reg; + axi_bresp_next = axi_bresp_reg; + axi_buser_next = axi_buser_reg; + + s_axi_awready_next = 0; + s_axi_wready_next = 0; + s_axi_bvalid_next = s_axi_bvalid_reg & ~s_axi_bready_i; + s_axi_arready_next = 0; + + m_axi_awvalid_next = m_axi_awvalid_reg & ~m_axi_awready_i; + m_axi_bready_next = 0; + m_axi_arvalid_next = m_axi_arvalid_reg & ~m_axi_arready_i; + m_axi_rready_next = 0; + + s_axi_rid_int = axi_id_reg; + s_axi_rdata_int = current_m_axi_rdata; + s_axi_rresp_int = current_m_axi_rresp; + s_axi_rlast_int = current_m_axi_rlast; + s_axi_ruser_int = current_m_axi_ruser; + s_axi_rvalid_int = 1'b0; + + m_axi_wdata_int = current_s_axi_wdata; + m_axi_wstrb_int = current_s_axi_wstrb; + m_axi_wlast_int = current_s_axi_wlast; + m_axi_wuser_int = current_s_axi_wuser; + m_axi_wvalid_int = 1'b0; + + case (state_reg) + STATE_IDLE: begin + // idle state; wait for arbitration + + if (grant_valid) begin + + axi_addr_valid_next = 1'b1; + + if (read) begin + // reading + axi_addr_next = current_s_axi_araddr; + axi_prot_next = current_s_axi_arprot; + axi_id_next = current_s_axi_arid; + axi_addr_next = current_s_axi_araddr; + axi_len_next = current_s_axi_arlen; + axi_size_next = current_s_axi_arsize; + axi_burst_next = current_s_axi_arburst; + axi_lock_next = current_s_axi_arlock; + axi_cache_next = current_s_axi_arcache; + axi_prot_next = current_s_axi_arprot; + axi_qos_next = current_s_axi_arqos; + axi_auser_next = current_s_axi_aruser; + s_axi_arready_next[s_select] = 1'b1; + end else begin + // writing + axi_addr_next = current_s_axi_awaddr; + axi_prot_next = current_s_axi_awprot; + axi_id_next = current_s_axi_awid; + axi_addr_next = current_s_axi_awaddr; + axi_len_next = current_s_axi_awlen; + axi_size_next = current_s_axi_awsize; + axi_burst_next = current_s_axi_awburst; + axi_lock_next = current_s_axi_awlock; + axi_cache_next = current_s_axi_awcache; + axi_prot_next = current_s_axi_awprot; + axi_qos_next = current_s_axi_awqos; + axi_auser_next = current_s_axi_awuser; + s_axi_awready_next[s_select] = 1'b1; + end + + state_next = STATE_DECODE; + end else begin + state_next = STATE_IDLE; + end + end + STATE_DECODE: begin + // decode state; determine master interface + + match = 1'b0; + for (i = 0; i < M_COUNT; i = i + 1) begin + for (j = 0; j < M_REGIONS; j = j + 1) begin + if (M_ADDR_WIDTH[(i*M_REGIONS+j)*32 +: 32] && (!M_SECURE[i] || !axi_prot_reg[1]) && ((read ? M_CONNECT_READ : M_CONNECT_WRITE) & (1 << (s_select+i*S_COUNT))) && (axi_addr_reg >> M_ADDR_WIDTH[(i*M_REGIONS+j)*32 +: 32]) == (M_BASE_ADDR_INT[(i*M_REGIONS+j)*ADDR_WIDTH +: ADDR_WIDTH] >> M_ADDR_WIDTH[(i*M_REGIONS+j)*32 +: 32])) begin + m_select_next = i; + axi_region_next = j; + match = 1'b1; + end + end end - end - end - if (match) begin - if (read) begin - // reading - m_axi_rready_next[m_select_reg] = s_axi_rready_int_early; - state_next = STATE_READ; - end else begin - // writing + if (match) begin + if (read) begin + // reading + m_axi_rready_next[m_select_reg] = s_axi_rready_int_early; + state_next = STATE_READ; + end else begin + // writing + s_axi_wready_next[s_select] = m_axi_wready_int_early; + state_next = STATE_WRITE; + end + end else begin + // no match; return decode error + if (read) begin + // reading + state_next = STATE_READ_DROP; + end else begin + // writing + axi_bresp_next = 2'b11; + s_axi_wready_next[s_select] = 1'b1; + state_next = STATE_WRITE_DROP; + end + end + end + STATE_WRITE: begin + // write state; store and forward write data s_axi_wready_next[s_select] = m_axi_wready_int_early; - state_next = STATE_WRITE; - end - end else begin - // no match; return decode error - if (read) begin - // reading - state_next = STATE_READ_DROP; - end else begin - // writing - axi_bresp_next = 2'b11; - s_axi_wready_next[s_select] = 1'b1; - state_next = STATE_WRITE_DROP; - end - end - end - STATE_WRITE: begin - // write state; store and forward write data - s_axi_wready_next[s_select] = m_axi_wready_int_early; - - if (axi_addr_valid_reg) begin - m_axi_awvalid_next[m_select_reg] = 1'b1; - end - axi_addr_valid_next = 1'b0; - - if (current_s_axi_wready && current_s_axi_wvalid) begin - m_axi_wdata_int = current_s_axi_wdata; - m_axi_wstrb_int = current_s_axi_wstrb; - m_axi_wlast_int = current_s_axi_wlast; - m_axi_wuser_int = current_s_axi_wuser; - m_axi_wvalid_int = 1'b1; - - if (current_s_axi_wlast) begin - s_axi_wready_next[s_select] = 1'b0; + + if (axi_addr_valid_reg) begin + m_axi_awvalid_next[m_select_reg] = 1'b1; + end + axi_addr_valid_next = 1'b0; + + if (current_s_axi_wready && current_s_axi_wvalid) begin + m_axi_wdata_int = current_s_axi_wdata; + m_axi_wstrb_int = current_s_axi_wstrb; + m_axi_wlast_int = current_s_axi_wlast; + m_axi_wuser_int = current_s_axi_wuser; + m_axi_wvalid_int = 1'b1; + + if (current_s_axi_wlast) begin + s_axi_wready_next[s_select] = 1'b0; + m_axi_bready_next[m_select_reg] = 1'b1; + state_next = STATE_WRITE_RESP; + end else begin + state_next = STATE_WRITE; + end + end else begin + state_next = STATE_WRITE; + end + end + STATE_WRITE_RESP: begin + // write response state; store and forward write response m_axi_bready_next[m_select_reg] = 1'b1; - state_next = STATE_WRITE_RESP; - end else begin - state_next = STATE_WRITE; - end - end else begin - state_next = STATE_WRITE; - end - end - STATE_WRITE_RESP: begin - // write response state; store and forward write response - m_axi_bready_next[m_select_reg] = 1'b1; - - if (current_m_axi_bready && current_m_axi_bvalid) begin - m_axi_bready_next[m_select_reg] = 1'b0; - axi_bresp_next = current_m_axi_bresp; - s_axi_bvalid_next[s_select] = 1'b1; - state_next = STATE_WAIT_IDLE; - end else begin - state_next = STATE_WRITE_RESP; - end - end - STATE_WRITE_DROP: begin - // write drop state; drop write data - s_axi_wready_next[s_select] = 1'b1; - - axi_addr_valid_next = 1'b0; - - if (current_s_axi_wready && current_s_axi_wvalid) begin - s_axi_wready_next[s_select] = 1'b0; - s_axi_bvalid_next[s_select] = 1'b1; - state_next = STATE_WAIT_IDLE; - end else begin - state_next = STATE_WRITE_DROP; - end - end - STATE_READ: begin - // read state; store and forward read response - m_axi_rready_next[m_select_reg] = s_axi_rready_int_early; - - if (axi_addr_valid_reg) begin - m_axi_arvalid_next[m_select_reg] = 1'b1; - end - axi_addr_valid_next = 1'b0; - - if (current_m_axi_rready && current_m_axi_rvalid) begin - s_axi_rid_int = axi_id_reg; - s_axi_rdata_int = current_m_axi_rdata; - s_axi_rresp_int = current_m_axi_rresp; - s_axi_rlast_int = current_m_axi_rlast; - s_axi_ruser_int = current_m_axi_ruser; - s_axi_rvalid_int = 1'b1; - - if (current_m_axi_rlast) begin - m_axi_rready_next[m_select_reg] = 1'b0; - state_next = STATE_WAIT_IDLE; - end else begin - state_next = STATE_READ; - end - end else begin - state_next = STATE_READ; - end - end - STATE_READ_DROP: begin - // read drop state; generate decode error read response - - s_axi_rid_int = axi_id_reg; - s_axi_rdata_int = {DATA_WIDTH{1'b0}}; - s_axi_rresp_int = 2'b11; - s_axi_rlast_int = axi_len_reg == 0; - s_axi_ruser_int = {RUSER_WIDTH{1'b0}}; - s_axi_rvalid_int = 1'b1; - - if (s_axi_rready_int_reg) begin - axi_len_next = axi_len_reg - 1; - if (axi_len_reg == 0) begin - state_next = STATE_WAIT_IDLE; - end else begin - state_next = STATE_READ_DROP; - end - end else begin - state_next = STATE_READ_DROP; - end - end - STATE_WAIT_IDLE: begin - // wait for idle state; wait untl grant valid is deasserted - - if (!grant_valid || acknowledge) begin - state_next = STATE_IDLE; - end else begin - state_next = STATE_WAIT_IDLE; - end - end - default: ; // Do nothing - endcase - end - - always @(posedge clk_i, posedge rst_i) begin - if (rst_i) begin - state_reg <= STATE_IDLE; - - s_axi_awready_reg <= 0; - s_axi_wready_reg <= 0; - s_axi_bvalid_reg <= 0; - s_axi_arready_reg <= 0; - - m_axi_awvalid_reg <= 0; - m_axi_bready_reg <= 0; - m_axi_arvalid_reg <= 0; - m_axi_rready_reg <= 0; - - m_select_reg <= 2'd0; - axi_id_reg <= {ID_WIDTH{1'b0}}; - axi_addr_reg <= {ADDR_WIDTH{1'b0}}; - axi_addr_valid_reg <= 1'b0; - axi_len_reg <= {8{1'b0}}; - axi_size_reg <= {3{1'b0}}; - axi_burst_reg <= {2{1'b0}}; - axi_lock_reg <= 1'b0; - axi_cache_reg <= {4{1'b0}}; - axi_prot_reg <= {3{1'b0}}; - axi_qos_reg <= {4{1'b0}}; - axi_region_reg <= {4{1'b0}}; - axi_auser_reg <= {ARUSER_WIDTH{1'b0}}; - axi_bresp_reg <= {2{1'b0}}; - axi_buser_reg <= {BUSER_WIDTH{1'b0}}; - end else begin - state_reg <= state_next; - - s_axi_awready_reg <= s_axi_awready_next; - s_axi_wready_reg <= s_axi_wready_next; - s_axi_bvalid_reg <= s_axi_bvalid_next; - s_axi_arready_reg <= s_axi_arready_next; - - m_axi_awvalid_reg <= m_axi_awvalid_next; - m_axi_bready_reg <= m_axi_bready_next; - m_axi_arvalid_reg <= m_axi_arvalid_next; - m_axi_rready_reg <= m_axi_rready_next; - - m_select_reg <= m_select_next; - axi_id_reg <= axi_id_next; - axi_addr_reg <= axi_addr_next; - axi_addr_valid_reg <= axi_addr_valid_next; - axi_len_reg <= axi_len_next; - axi_size_reg <= axi_size_next; - axi_burst_reg <= axi_burst_next; - axi_lock_reg <= axi_lock_next; - axi_cache_reg <= axi_cache_next; - axi_prot_reg <= axi_prot_next; - axi_qos_reg <= axi_qos_next; - axi_region_reg <= axi_region_next; - axi_auser_reg <= axi_auser_next; - axi_bresp_reg <= axi_bresp_next; - axi_buser_reg <= axi_buser_next; - end - end - - // output datapath logic (R channel) - reg [ ID_WIDTH-1:0] s_axi_rid_reg; - reg [ DATA_WIDTH-1:0] s_axi_rdata_reg; - reg [ 1:0] s_axi_rresp_reg; - reg s_axi_rlast_reg; - reg [RUSER_WIDTH-1:0] s_axi_ruser_reg; - reg [S_COUNT-1:0] s_axi_rvalid_reg, s_axi_rvalid_next; - - reg [ ID_WIDTH-1:0] temp_s_axi_rid_reg; - reg [ DATA_WIDTH-1:0] temp_s_axi_rdata_reg; - reg [ 1:0] temp_s_axi_rresp_reg; - reg temp_s_axi_rlast_reg; - reg [RUSER_WIDTH-1:0] temp_s_axi_ruser_reg; - reg temp_s_axi_rvalid_reg, temp_s_axi_rvalid_next; - - // datapath control - reg store_axi_r_int_to_output; - reg store_axi_r_int_to_temp; - reg store_axi_r_temp_to_output; - - assign s_axi_rid_o = {S_COUNT{s_axi_rid_reg}}; - assign s_axi_rdata_o = {S_COUNT{s_axi_rdata_reg}}; - assign s_axi_rresp_o = {S_COUNT{s_axi_rresp_reg}}; - assign s_axi_rlast_o = {S_COUNT{s_axi_rlast_reg}}; - assign s_axi_ruser_o = {S_COUNT{RUSER_ENABLE ? s_axi_ruser_reg : {RUSER_WIDTH{1'b0}}}}; - assign s_axi_rvalid_o = s_axi_rvalid_reg; - - // enable ready input next cycle if output is ready or the temp reg will not be filled on the next cycle (output reg empty or no input) - assign s_axi_rready_int_early = current_s_axi_rready | (~temp_s_axi_rvalid_reg & (~current_s_axi_rvalid | ~s_axi_rvalid_int)); - - always @* begin - // transfer sink ready state to source - s_axi_rvalid_next = s_axi_rvalid_reg; - temp_s_axi_rvalid_next = temp_s_axi_rvalid_reg; - - store_axi_r_int_to_output = 1'b0; - store_axi_r_int_to_temp = 1'b0; - store_axi_r_temp_to_output = 1'b0; - - if (s_axi_rready_int_reg) begin - // input is ready - if (current_s_axi_rready | ~current_s_axi_rvalid) begin - // output is ready or currently not valid, transfer data to output - s_axi_rvalid_next[s_select] = s_axi_rvalid_int; - store_axi_r_int_to_output = 1'b1; + + if (current_m_axi_bready && current_m_axi_bvalid) begin + m_axi_bready_next[m_select_reg] = 1'b0; + axi_bresp_next = current_m_axi_bresp; + s_axi_bvalid_next[s_select] = 1'b1; + state_next = STATE_WAIT_IDLE; + end else begin + state_next = STATE_WRITE_RESP; + end + end + STATE_WRITE_DROP: begin + // write drop state; drop write data + s_axi_wready_next[s_select] = 1'b1; + + axi_addr_valid_next = 1'b0; + + if (current_s_axi_wready && current_s_axi_wvalid) begin + s_axi_wready_next[s_select] = 1'b0; + s_axi_bvalid_next[s_select] = 1'b1; + state_next = STATE_WAIT_IDLE; + end else begin + state_next = STATE_WRITE_DROP; + end + end + STATE_READ: begin + // read state; store and forward read response + m_axi_rready_next[m_select_reg] = s_axi_rready_int_early; + + if (axi_addr_valid_reg) begin + m_axi_arvalid_next[m_select_reg] = 1'b1; + end + axi_addr_valid_next = 1'b0; + + if (current_m_axi_rready && current_m_axi_rvalid) begin + s_axi_rid_int = axi_id_reg; + s_axi_rdata_int = current_m_axi_rdata; + s_axi_rresp_int = current_m_axi_rresp; + s_axi_rlast_int = current_m_axi_rlast; + s_axi_ruser_int = current_m_axi_ruser; + s_axi_rvalid_int = 1'b1; + + if (current_m_axi_rlast) begin + m_axi_rready_next[m_select_reg] = 1'b0; + state_next = STATE_WAIT_IDLE; + end else begin + state_next = STATE_READ; + end + end else begin + state_next = STATE_READ; + end + end + STATE_READ_DROP: begin + // read drop state; generate decode error read response + + s_axi_rid_int = axi_id_reg; + s_axi_rdata_int = {DATA_WIDTH{1'b0}}; + s_axi_rresp_int = 2'b11; + s_axi_rlast_int = axi_len_reg == 0; + s_axi_ruser_int = {RUSER_WIDTH{1'b0}}; + s_axi_rvalid_int = 1'b1; + + if (s_axi_rready_int_reg) begin + axi_len_next = axi_len_reg - 1; + if (axi_len_reg == 0) begin + state_next = STATE_WAIT_IDLE; + end else begin + state_next = STATE_READ_DROP; + end + end else begin + state_next = STATE_READ_DROP; + end + end + STATE_WAIT_IDLE: begin + // wait for idle state; wait untl grant valid is deasserted + + if (!grant_valid || acknowledge) begin + state_next = STATE_IDLE; + end else begin + state_next = STATE_WAIT_IDLE; + end + end + default: ; // Do nothing + endcase + end + + always @(posedge clk_i, posedge rst_i) begin + if (rst_i) begin + state_reg <= STATE_IDLE; + + s_axi_awready_reg <= 0; + s_axi_wready_reg <= 0; + s_axi_bvalid_reg <= 0; + s_axi_arready_reg <= 0; + + m_axi_awvalid_reg <= 0; + m_axi_bready_reg <= 0; + m_axi_arvalid_reg <= 0; + m_axi_rready_reg <= 0; + + m_select_reg <= 2'd0; + axi_id_reg <= {ID_WIDTH{1'b0}}; + axi_addr_reg <= {ADDR_WIDTH{1'b0}}; + axi_addr_valid_reg <= 1'b0; + axi_len_reg <= {8{1'b0}}; + axi_size_reg <= {3{1'b0}}; + axi_burst_reg <= {2{1'b0}}; + axi_lock_reg <= 1'b0; + axi_cache_reg <= {4{1'b0}}; + axi_prot_reg <= {3{1'b0}}; + axi_qos_reg <= {4{1'b0}}; + axi_region_reg <= {4{1'b0}}; + axi_auser_reg <= {ARUSER_WIDTH{1'b0}}; + axi_bresp_reg <= {2{1'b0}}; + axi_buser_reg <= {BUSER_WIDTH{1'b0}}; end else begin - // output is not ready, store input in temp - temp_s_axi_rvalid_next = s_axi_rvalid_int; - store_axi_r_int_to_temp = 1'b1; + state_reg <= state_next; + + s_axi_awready_reg <= s_axi_awready_next; + s_axi_wready_reg <= s_axi_wready_next; + s_axi_bvalid_reg <= s_axi_bvalid_next; + s_axi_arready_reg <= s_axi_arready_next; + + m_axi_awvalid_reg <= m_axi_awvalid_next; + m_axi_bready_reg <= m_axi_bready_next; + m_axi_arvalid_reg <= m_axi_arvalid_next; + m_axi_rready_reg <= m_axi_rready_next; + + m_select_reg <= m_select_next; + axi_id_reg <= axi_id_next; + axi_addr_reg <= axi_addr_next; + axi_addr_valid_reg <= axi_addr_valid_next; + axi_len_reg <= axi_len_next; + axi_size_reg <= axi_size_next; + axi_burst_reg <= axi_burst_next; + axi_lock_reg <= axi_lock_next; + axi_cache_reg <= axi_cache_next; + axi_prot_reg <= axi_prot_next; + axi_qos_reg <= axi_qos_next; + axi_region_reg <= axi_region_next; + axi_auser_reg <= axi_auser_next; + axi_bresp_reg <= axi_bresp_next; + axi_buser_reg <= axi_buser_next; end - end else if (current_s_axi_rready) begin - // input is not ready, but output is ready - s_axi_rvalid_next[s_select] = temp_s_axi_rvalid_reg; - temp_s_axi_rvalid_next = 1'b0; - store_axi_r_temp_to_output = 1'b1; - end - end - - always @(posedge clk_i, posedge rst_i) begin - if (rst_i) begin - s_axi_rvalid_reg <= 1'b0; - s_axi_rready_int_reg <= 1'b0; - temp_s_axi_rvalid_reg <= 1'b0; - s_axi_rid_reg <= {ID_WIDTH{1'b0}}; - s_axi_rdata_reg <= {DATA_WIDTH{1'b0}}; - s_axi_rresp_reg <= 2'd0; - s_axi_rlast_reg <= 1'b0; - s_axi_ruser_reg <= {RUSER_WIDTH{1'b0}}; - temp_s_axi_rid_reg <= {ID_WIDTH{1'b0}}; - temp_s_axi_rdata_reg <= {DATA_WIDTH{1'b0}}; - temp_s_axi_rresp_reg <= 2'd0; - temp_s_axi_rlast_reg <= 1'b0; - temp_s_axi_ruser_reg <= {RUSER_WIDTH{1'b0}}; - end else begin - s_axi_rvalid_reg <= s_axi_rvalid_next; - s_axi_rready_int_reg <= s_axi_rready_int_early; - temp_s_axi_rvalid_reg <= temp_s_axi_rvalid_next; - // datapath - if (store_axi_r_int_to_output) begin - s_axi_rid_reg <= s_axi_rid_int; - s_axi_rdata_reg <= s_axi_rdata_int; - s_axi_rresp_reg <= s_axi_rresp_int; - s_axi_rlast_reg <= s_axi_rlast_int; - s_axi_ruser_reg <= s_axi_ruser_int; - end else if (store_axi_r_temp_to_output) begin - s_axi_rid_reg <= temp_s_axi_rid_reg; - s_axi_rdata_reg <= temp_s_axi_rdata_reg; - s_axi_rresp_reg <= temp_s_axi_rresp_reg; - s_axi_rlast_reg <= temp_s_axi_rlast_reg; - s_axi_ruser_reg <= temp_s_axi_ruser_reg; + end + + // output datapath logic (R channel) + reg [ ID_WIDTH-1:0] s_axi_rid_reg; + reg [ DATA_WIDTH-1:0] s_axi_rdata_reg; + reg [ 1:0] s_axi_rresp_reg; + reg s_axi_rlast_reg; + reg [RUSER_WIDTH-1:0] s_axi_ruser_reg; + reg [S_COUNT-1:0] s_axi_rvalid_reg, s_axi_rvalid_next; + + reg [ ID_WIDTH-1:0] temp_s_axi_rid_reg; + reg [ DATA_WIDTH-1:0] temp_s_axi_rdata_reg; + reg [ 1:0] temp_s_axi_rresp_reg; + reg temp_s_axi_rlast_reg; + reg [RUSER_WIDTH-1:0] temp_s_axi_ruser_reg; + reg temp_s_axi_rvalid_reg, temp_s_axi_rvalid_next; + + // datapath control + reg store_axi_r_int_to_output; + reg store_axi_r_int_to_temp; + reg store_axi_r_temp_to_output; + + assign s_axi_rid_o = {S_COUNT{s_axi_rid_reg}}; + assign s_axi_rdata_o = {S_COUNT{s_axi_rdata_reg}}; + assign s_axi_rresp_o = {S_COUNT{s_axi_rresp_reg}}; + assign s_axi_rlast_o = {S_COUNT{s_axi_rlast_reg}}; + assign s_axi_ruser_o = {S_COUNT{RUSER_ENABLE ? s_axi_ruser_reg : {RUSER_WIDTH{1'b0}}}}; + assign s_axi_rvalid_o = s_axi_rvalid_reg; + + // enable ready input next cycle if output is ready or the temp reg will not be filled on the next cycle (output reg empty or no input) + assign s_axi_rready_int_early = current_s_axi_rready | (~temp_s_axi_rvalid_reg & (~current_s_axi_rvalid | ~s_axi_rvalid_int)); + + always @* begin + // transfer sink ready state to source + s_axi_rvalid_next = s_axi_rvalid_reg; + temp_s_axi_rvalid_next = temp_s_axi_rvalid_reg; + + store_axi_r_int_to_output = 1'b0; + store_axi_r_int_to_temp = 1'b0; + store_axi_r_temp_to_output = 1'b0; + + if (s_axi_rready_int_reg) begin + // input is ready + if (current_s_axi_rready | ~current_s_axi_rvalid) begin + // output is ready or currently not valid, transfer data to output + s_axi_rvalid_next[s_select] = s_axi_rvalid_int; + store_axi_r_int_to_output = 1'b1; + end else begin + // output is not ready, store input in temp + temp_s_axi_rvalid_next = s_axi_rvalid_int; + store_axi_r_int_to_temp = 1'b1; + end + end else if (current_s_axi_rready) begin + // input is not ready, but output is ready + s_axi_rvalid_next[s_select] = temp_s_axi_rvalid_reg; + temp_s_axi_rvalid_next = 1'b0; + store_axi_r_temp_to_output = 1'b1; end - if (store_axi_r_int_to_temp) begin - temp_s_axi_rid_reg <= s_axi_rid_int; - temp_s_axi_rdata_reg <= s_axi_rdata_int; - temp_s_axi_rresp_reg <= s_axi_rresp_int; - temp_s_axi_rlast_reg <= s_axi_rlast_int; - temp_s_axi_ruser_reg <= s_axi_ruser_int; - end - end - end - - // output datapath logic (W channel) - reg [ DATA_WIDTH-1:0] m_axi_wdata_reg = {DATA_WIDTH{1'b0}}; - reg [ STRB_WIDTH-1:0] m_axi_wstrb_reg = {STRB_WIDTH{1'b0}}; - reg m_axi_wlast_reg = 1'b0; - reg [WUSER_WIDTH-1:0] m_axi_wuser_reg = 1'b0; - reg [M_COUNT-1:0] m_axi_wvalid_reg, m_axi_wvalid_next; - - reg [ DATA_WIDTH-1:0] temp_m_axi_wdata_reg = {DATA_WIDTH{1'b0}}; - reg [ STRB_WIDTH-1:0] temp_m_axi_wstrb_reg = {STRB_WIDTH{1'b0}}; - reg temp_m_axi_wlast_reg = 1'b0; - reg [WUSER_WIDTH-1:0] temp_m_axi_wuser_reg = 1'b0; - reg temp_m_axi_wvalid_reg, temp_m_axi_wvalid_next; - - // datapath control - reg store_axi_w_int_to_output; - reg store_axi_w_int_to_temp; - reg store_axi_w_temp_to_output; - - assign m_axi_wdata_o = {M_COUNT{m_axi_wdata_reg}}; - assign m_axi_wstrb_o = {M_COUNT{m_axi_wstrb_reg}}; - assign m_axi_wlast_o = {M_COUNT{m_axi_wlast_reg}}; - assign m_axi_wuser_o = {M_COUNT{WUSER_ENABLE ? m_axi_wuser_reg : {WUSER_WIDTH{1'b0}}}}; - assign m_axi_wvalid_o = m_axi_wvalid_reg; - - // enable ready input next cycle if output is ready or the temp reg will not be filled on the next cycle (output reg empty or no input) - assign m_axi_wready_int_early = current_m_axi_wready | (~temp_m_axi_wvalid_reg & (~current_m_axi_wvalid | ~m_axi_wvalid_int)); - - always @* begin - // transfer sink ready state to source - m_axi_wvalid_next = m_axi_wvalid_reg; - temp_m_axi_wvalid_next = temp_m_axi_wvalid_reg; - - store_axi_w_int_to_output = 1'b0; - store_axi_w_int_to_temp = 1'b0; - store_axi_w_temp_to_output = 1'b0; - - if (m_axi_wready_int_reg) begin - // input is ready - if (current_m_axi_wready | ~current_m_axi_wvalid) begin - // output is ready or currently not valid, transfer data to output - m_axi_wvalid_next[m_select_reg] = m_axi_wvalid_int; - store_axi_w_int_to_output = 1'b1; + end + + always @(posedge clk_i, posedge rst_i) begin + if (rst_i) begin + s_axi_rvalid_reg <= 1'b0; + s_axi_rready_int_reg <= 1'b0; + temp_s_axi_rvalid_reg <= 1'b0; + s_axi_rid_reg <= {ID_WIDTH{1'b0}}; + s_axi_rdata_reg <= {DATA_WIDTH{1'b0}}; + s_axi_rresp_reg <= 2'd0; + s_axi_rlast_reg <= 1'b0; + s_axi_ruser_reg <= {RUSER_WIDTH{1'b0}}; + temp_s_axi_rid_reg <= {ID_WIDTH{1'b0}}; + temp_s_axi_rdata_reg <= {DATA_WIDTH{1'b0}}; + temp_s_axi_rresp_reg <= 2'd0; + temp_s_axi_rlast_reg <= 1'b0; + temp_s_axi_ruser_reg <= {RUSER_WIDTH{1'b0}}; end else begin - // output is not ready, store input in temp - temp_m_axi_wvalid_next = m_axi_wvalid_int; - store_axi_w_int_to_temp = 1'b1; + s_axi_rvalid_reg <= s_axi_rvalid_next; + s_axi_rready_int_reg <= s_axi_rready_int_early; + temp_s_axi_rvalid_reg <= temp_s_axi_rvalid_next; + // datapath + if (store_axi_r_int_to_output) begin + s_axi_rid_reg <= s_axi_rid_int; + s_axi_rdata_reg <= s_axi_rdata_int; + s_axi_rresp_reg <= s_axi_rresp_int; + s_axi_rlast_reg <= s_axi_rlast_int; + s_axi_ruser_reg <= s_axi_ruser_int; + end else if (store_axi_r_temp_to_output) begin + s_axi_rid_reg <= temp_s_axi_rid_reg; + s_axi_rdata_reg <= temp_s_axi_rdata_reg; + s_axi_rresp_reg <= temp_s_axi_rresp_reg; + s_axi_rlast_reg <= temp_s_axi_rlast_reg; + s_axi_ruser_reg <= temp_s_axi_ruser_reg; + end + if (store_axi_r_int_to_temp) begin + temp_s_axi_rid_reg <= s_axi_rid_int; + temp_s_axi_rdata_reg <= s_axi_rdata_int; + temp_s_axi_rresp_reg <= s_axi_rresp_int; + temp_s_axi_rlast_reg <= s_axi_rlast_int; + temp_s_axi_ruser_reg <= s_axi_ruser_int; + end end - end else if (current_m_axi_wready) begin - // input is not ready, but output is ready - m_axi_wvalid_next[m_select_reg] = temp_m_axi_wvalid_reg; - temp_m_axi_wvalid_next = 1'b0; - store_axi_w_temp_to_output = 1'b1; - end - end - - always @(posedge clk_i, posedge rst_i) begin - if (rst_i) begin - m_axi_wvalid_reg <= 1'b0; - m_axi_wready_int_reg <= 1'b0; - temp_m_axi_wvalid_reg <= 1'b0; - m_axi_wdata_reg <= {DATA_WIDTH{1'b0}}; - m_axi_wstrb_reg <= {STRB_WIDTH{1'b0}}; - m_axi_wlast_reg <= 1'b0; - m_axi_wuser_reg <= {WUSER_WIDTH{1'b0}}; - temp_m_axi_wdata_reg <= {DATA_WIDTH{1'b0}}; - temp_m_axi_wstrb_reg <= {STRB_WIDTH{1'b0}}; - temp_m_axi_wlast_reg <= 1'b0; - temp_m_axi_wuser_reg <= {WUSER_WIDTH{1'b0}}; - end else begin - m_axi_wvalid_reg <= m_axi_wvalid_next; - m_axi_wready_int_reg <= m_axi_wready_int_early; - temp_m_axi_wvalid_reg <= temp_m_axi_wvalid_next; - // datapath - if (store_axi_w_int_to_output) begin - m_axi_wdata_reg <= m_axi_wdata_int; - m_axi_wstrb_reg <= m_axi_wstrb_int; - m_axi_wlast_reg <= m_axi_wlast_int; - m_axi_wuser_reg <= m_axi_wuser_int; - end else if (store_axi_w_temp_to_output) begin - m_axi_wdata_reg <= temp_m_axi_wdata_reg; - m_axi_wstrb_reg <= temp_m_axi_wstrb_reg; - m_axi_wlast_reg <= temp_m_axi_wlast_reg; - m_axi_wuser_reg <= temp_m_axi_wuser_reg; + end + + // output datapath logic (W channel) + reg [ DATA_WIDTH-1:0] m_axi_wdata_reg = {DATA_WIDTH{1'b0}}; + reg [ STRB_WIDTH-1:0] m_axi_wstrb_reg = {STRB_WIDTH{1'b0}}; + reg m_axi_wlast_reg = 1'b0; + reg [WUSER_WIDTH-1:0] m_axi_wuser_reg = 1'b0; + reg [M_COUNT-1:0] m_axi_wvalid_reg, m_axi_wvalid_next; + + reg [ DATA_WIDTH-1:0] temp_m_axi_wdata_reg = {DATA_WIDTH{1'b0}}; + reg [ STRB_WIDTH-1:0] temp_m_axi_wstrb_reg = {STRB_WIDTH{1'b0}}; + reg temp_m_axi_wlast_reg = 1'b0; + reg [WUSER_WIDTH-1:0] temp_m_axi_wuser_reg = 1'b0; + reg temp_m_axi_wvalid_reg, temp_m_axi_wvalid_next; + + // datapath control + reg store_axi_w_int_to_output; + reg store_axi_w_int_to_temp; + reg store_axi_w_temp_to_output; + + assign m_axi_wdata_o = {M_COUNT{m_axi_wdata_reg}}; + assign m_axi_wstrb_o = {M_COUNT{m_axi_wstrb_reg}}; + assign m_axi_wlast_o = {M_COUNT{m_axi_wlast_reg}}; + assign m_axi_wuser_o = {M_COUNT{WUSER_ENABLE ? m_axi_wuser_reg : {WUSER_WIDTH{1'b0}}}}; + assign m_axi_wvalid_o = m_axi_wvalid_reg; + + // enable ready input next cycle if output is ready or the temp reg will not be filled on the next cycle (output reg empty or no input) + assign m_axi_wready_int_early = current_m_axi_wready | (~temp_m_axi_wvalid_reg & (~current_m_axi_wvalid | ~m_axi_wvalid_int)); + + always @* begin + // transfer sink ready state to source + m_axi_wvalid_next = m_axi_wvalid_reg; + temp_m_axi_wvalid_next = temp_m_axi_wvalid_reg; + + store_axi_w_int_to_output = 1'b0; + store_axi_w_int_to_temp = 1'b0; + store_axi_w_temp_to_output = 1'b0; + + if (m_axi_wready_int_reg) begin + // input is ready + if (current_m_axi_wready | ~current_m_axi_wvalid) begin + // output is ready or currently not valid, transfer data to output + m_axi_wvalid_next[m_select_reg] = m_axi_wvalid_int; + store_axi_w_int_to_output = 1'b1; + end else begin + // output is not ready, store input in temp + temp_m_axi_wvalid_next = m_axi_wvalid_int; + store_axi_w_int_to_temp = 1'b1; + end + end else if (current_m_axi_wready) begin + // input is not ready, but output is ready + m_axi_wvalid_next[m_select_reg] = temp_m_axi_wvalid_reg; + temp_m_axi_wvalid_next = 1'b0; + store_axi_w_temp_to_output = 1'b1; end - if (store_axi_w_int_to_temp) begin - temp_m_axi_wdata_reg <= m_axi_wdata_int; - temp_m_axi_wstrb_reg <= m_axi_wstrb_int; - temp_m_axi_wlast_reg <= m_axi_wlast_int; - temp_m_axi_wuser_reg <= m_axi_wuser_int; + end + + always @(posedge clk_i, posedge rst_i) begin + if (rst_i) begin + m_axi_wvalid_reg <= 1'b0; + m_axi_wready_int_reg <= 1'b0; + temp_m_axi_wvalid_reg <= 1'b0; + m_axi_wdata_reg <= {DATA_WIDTH{1'b0}}; + m_axi_wstrb_reg <= {STRB_WIDTH{1'b0}}; + m_axi_wlast_reg <= 1'b0; + m_axi_wuser_reg <= {WUSER_WIDTH{1'b0}}; + temp_m_axi_wdata_reg <= {DATA_WIDTH{1'b0}}; + temp_m_axi_wstrb_reg <= {STRB_WIDTH{1'b0}}; + temp_m_axi_wlast_reg <= 1'b0; + temp_m_axi_wuser_reg <= {WUSER_WIDTH{1'b0}}; + end else begin + m_axi_wvalid_reg <= m_axi_wvalid_next; + m_axi_wready_int_reg <= m_axi_wready_int_early; + temp_m_axi_wvalid_reg <= temp_m_axi_wvalid_next; + // datapath + if (store_axi_w_int_to_output) begin + m_axi_wdata_reg <= m_axi_wdata_int; + m_axi_wstrb_reg <= m_axi_wstrb_int; + m_axi_wlast_reg <= m_axi_wlast_int; + m_axi_wuser_reg <= m_axi_wuser_int; + end else if (store_axi_w_temp_to_output) begin + m_axi_wdata_reg <= temp_m_axi_wdata_reg; + m_axi_wstrb_reg <= temp_m_axi_wstrb_reg; + m_axi_wlast_reg <= temp_m_axi_wlast_reg; + m_axi_wuser_reg <= temp_m_axi_wuser_reg; + end + if (store_axi_w_int_to_temp) begin + temp_m_axi_wdata_reg <= m_axi_wdata_int; + temp_m_axi_wstrb_reg <= m_axi_wstrb_int; + temp_m_axi_wlast_reg <= m_axi_wlast_int; + temp_m_axi_wuser_reg <= m_axi_wuser_int; + end end - end - end + end endmodule diff --git a/lib/hardware/buses/axi_interconnect_wrapper/axi_interconnect_wrapper.py b/lib/hardware/buses/axi_interconnect_wrapper/axi_interconnect_wrapper.py index b0e1d8d29..a1349ce03 100644 --- a/lib/hardware/buses/axi_interconnect_wrapper/axi_interconnect_wrapper.py +++ b/lib/hardware/buses/axi_interconnect_wrapper/axi_interconnect_wrapper.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + AXI_IN_SIGNAL_NAMES = [ ("araddr", "AXI_ADDR_W"), ("arprot", 3), @@ -64,7 +68,6 @@ def setup(py_params_dict): ) attributes_dict = { - "original_name": "axi_interconnect_wrapper", "name": py_params_dict["name"], "version": "0.1", # @@ -144,6 +147,16 @@ def setup(py_params_dict): master_axi_ports = [] master_addr_w_parameter = "" for name, width in MASTERS.items(): + attributes_dict["confs"].append( + { + "name": f"{name.upper()}_ADDR_W", + "type": "P", + "val": width, + "min": "1", + "max": "32", + "descr": f"{name.upper()} address bus width. Can be smaller than address range of master, but not larger.", + } + ) master_axi_ports += [ { "name": f"{name}_axi_m", @@ -153,7 +166,7 @@ def setup(py_params_dict): "subtype": "master", "port_prefix": f"{name}_", "ID_W": "AXI_ID_W", - "ADDR_W": width, + "ADDR_W": f"{name.upper()}_ADDR_W", "DATA_W": "AXI_DATA_W", "LOCK_W": 1, }, @@ -263,10 +276,8 @@ def setup(py_params_dict): verilog_code += " // Connect all master AXI interfaces to interconnect\n" for sig_name, _ in AXI_OUT_SIGNAL_NAMES: assign_str = "" - for port in master_axi_ports: - prefix = "" - if "port_prefix" in port["interface"]: - prefix = port["interface"]["port_prefix"] + for master_name in MASTERS: + prefix = f"{master_name}_" assign_str = f"{prefix}axi_{sig_name}_i, " + assign_str assign_str = assign_str[:-2] verilog_code += ( @@ -274,13 +285,14 @@ def setup(py_params_dict): ) for sig_name, sig_size in AXI_IN_SIGNAL_NAMES: - for idx, port in enumerate(master_axi_ports): - prefix = "" - if "port_prefix" in port["interface"]: - prefix = port["interface"]["port_prefix"] + for idx, master_name in enumerate(MASTERS): + prefix = f"{master_name}_" + output_size = sig_size + if sig_name.endswith("addr"): + output_size = f"{name.upper()}_ADDR_W" bit_select = "" if type(sig_size) is not int or sig_size > 1: - bit_select = f"[{idx}*{sig_size}+:{sig_size}]" + bit_select = f"[{idx}*{sig_size}+:{output_size}]" elif len(master_axi_ports) > 1: bit_select = f"[{idx}]" verilog_code += f" assign {prefix}axi_{sig_name}_o = intercon_m_axi_{sig_name}{bit_select}; \n" diff --git a/lib/hardware/buses/axil2iob/axil2iob.py b/lib/hardware/buses/axil2iob/axil2iob.py index dfd741b25..a0a57fd55 100644 --- a/lib/hardware/buses/axil2iob/axil2iob.py +++ b/lib/hardware/buses/axil2iob/axil2iob.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "axil2iob", - "name": "axil2iob", "version": "0.1", "generate_hw": False, "ports": [ diff --git a/lib/hardware/buses/axil2iob/hardware/src/axil2iob.v b/lib/hardware/buses/axil2iob/hardware/src/axil2iob.v index a8cf09886..a88328f42 100644 --- a/lib/hardware/buses/axil2iob/hardware/src/axil2iob.v +++ b/lib/hardware/buses/axil2iob/hardware/src/axil2iob.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1ns / 1ps module axil2iob #( diff --git a/lib/hardware/buses/axil_tasks/axil_tasks.vh b/lib/hardware/buses/axil_tasks/axil_tasks.vh index c537b5396..6ffea0cab 100644 --- a/lib/hardware/buses/axil_tasks/axil_tasks.vh +++ b/lib/hardware/buses/axil_tasks/axil_tasks.vh @@ -1,7 +1,10 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + // // AXI-Lite write and read // - //axil_address_write(addr, data, width, awvalid, wvalid, awaddr, wdata, wstrb) task axil_write; input [AXIL_ADDR_W-1:0] addr; diff --git a/lib/hardware/buses/axis2axi/axis2axi.py b/lib/hardware/buses/axis2axi/axis2axi.py index 10b89a3f6..c04470ea2 100644 --- a/lib/hardware/buses/axis2axi/axis2axi.py +++ b/lib/hardware/buses/axis2axi/axis2axi.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "axis2axi", - "name": "axis2axi", "version": "0.1", "generate_hw": False, "ports": [ diff --git a/lib/hardware/buses/axis2axi/hardware/simulation/src/axidelay.v b/lib/hardware/buses/axis2axi/hardware/simulation/src/axidelay.v index a7eb98736..4bdcbb84a 100644 --- a/lib/hardware/buses/axis2axi/hardware/simulation/src/axidelay.v +++ b/lib/hardware/buses/axis2axi/hardware/simulation/src/axidelay.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1ns / 1ps // A generic axi like handshake delay for testbenches. diff --git a/lib/hardware/buses/axis2axi/hardware/simulation/src/axis2axi_tb.v b/lib/hardware/buses/axis2axi/hardware/simulation/src/axis2axi_tb.v index c1489fd70..665aebc6e 100644 --- a/lib/hardware/buses/axis2axi/hardware/simulation/src/axis2axi_tb.v +++ b/lib/hardware/buses/axis2axi/hardware/simulation/src/axis2axi_tb.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1ns / 1ps diff --git a/lib/hardware/buses/axis2axi/hardware/src/axis2axi.v b/lib/hardware/buses/axis2axi/hardware/src/axis2axi.v index 637b1d549..179797d99 100644 --- a/lib/hardware/buses/axis2axi/hardware/src/axis2axi.v +++ b/lib/hardware/buses/axis2axi/hardware/src/axis2axi.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1ns / 1ps /* Important: This unit has not been tested on a FPGA. Only simulation. Take care diff --git a/lib/hardware/buses/axis2axi/submodules/axis2axi_in/axis2axi_in.py b/lib/hardware/buses/axis2axi/submodules/axis2axi_in/axis2axi_in.py index 38efe336a..94c363043 100644 --- a/lib/hardware/buses/axis2axi/submodules/axis2axi_in/axis2axi_in.py +++ b/lib/hardware/buses/axis2axi/submodules/axis2axi_in/axis2axi_in.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "axis2axi_in", - "name": "axis2axi_in", "version": "0.1", "generate_hw": False, "ports": [ diff --git a/lib/hardware/buses/axis2axi/submodules/axis2axi_in/hardware/src/axis2axi_in.v b/lib/hardware/buses/axis2axi/submodules/axis2axi_in/hardware/src/axis2axi_in.v index 77dde0ac3..d1737ea3e 100644 --- a/lib/hardware/buses/axis2axi/submodules/axis2axi_in/hardware/src/axis2axi_in.v +++ b/lib/hardware/buses/axis2axi/submodules/axis2axi_in/hardware/src/axis2axi_in.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1ns / 1ps diff --git a/lib/hardware/buses/axis2axi/submodules/axis2axi_out/axis2axi_out.py b/lib/hardware/buses/axis2axi/submodules/axis2axi_out/axis2axi_out.py index 1d3898273..23bd9c633 100644 --- a/lib/hardware/buses/axis2axi/submodules/axis2axi_out/axis2axi_out.py +++ b/lib/hardware/buses/axis2axi/submodules/axis2axi_out/axis2axi_out.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "axis2axi_out", - "name": "axis2axi_out", "version": "0.1", "generate_hw": False, "ports": [ diff --git a/lib/hardware/buses/axis2axi/submodules/axis2axi_out/hardware/src/axis2axi_out.v b/lib/hardware/buses/axis2axi/submodules/axis2axi_out/hardware/src/axis2axi_out.v index 6a17af018..ca5488088 100644 --- a/lib/hardware/buses/axis2axi/submodules/axis2axi_out/hardware/src/axis2axi_out.v +++ b/lib/hardware/buses/axis2axi/submodules/axis2axi_out/hardware/src/axis2axi_out.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1ns / 1ps diff --git a/lib/hardware/buses/axis2axi/waves.gtkw.license b/lib/hardware/buses/axis2axi/waves.gtkw.license new file mode 100644 index 000000000..9a5279e71 --- /dev/null +++ b/lib/hardware/buses/axis2axi/waves.gtkw.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: 2024 IObundle + +SPDX-License-Identifier: MIT diff --git a/lib/hardware/buses/axis2fifo/axis2fifo.py b/lib/hardware/buses/axis2fifo/axis2fifo.py index 4678d7353..f30a638ad 100644 --- a/lib/hardware/buses/axis2fifo/axis2fifo.py +++ b/lib/hardware/buses/axis2fifo/axis2fifo.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "axis2fifo", - "name": "axis2fifo", "version": "0.1", "generate_hw": False, "blocks": [ diff --git a/lib/hardware/buses/axis2fifo/hardware/src/axis2fifo.v b/lib/hardware/buses/axis2fifo/hardware/src/axis2fifo.v index ef96a434d..fe6a65747 100644 --- a/lib/hardware/buses/axis2fifo/hardware/src/axis2fifo.v +++ b/lib/hardware/buses/axis2fifo/hardware/src/axis2fifo.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1ns / 1ps module axis2fifo #( diff --git a/lib/hardware/buses/axis2fifo/waves.gtkw.license b/lib/hardware/buses/axis2fifo/waves.gtkw.license new file mode 100644 index 000000000..9a5279e71 --- /dev/null +++ b/lib/hardware/buses/axis2fifo/waves.gtkw.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: 2024 IObundle + +SPDX-License-Identifier: MIT diff --git a/lib/hardware/buses/axis_tasks/axis_tasks.py b/lib/hardware/buses/axis_tasks/axis_tasks.py index 9699b484f..39fbb46d3 100644 --- a/lib/hardware/buses/axis_tasks/axis_tasks.py +++ b/lib/hardware/buses/axis_tasks/axis_tasks.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "axis_tasks", - "name": "axis_tasks", "version": "0.1", "generate_hw": False, } diff --git a/lib/hardware/buses/axis_tasks/hardware/src/axis_tasks.vs b/lib/hardware/buses/axis_tasks/hardware/src/axis_tasks.vs index 6e4020c24..8a75492ee 100644 --- a/lib/hardware/buses/axis_tasks/hardware/src/axis_tasks.vs +++ b/lib/hardware/buses/axis_tasks/hardware/src/axis_tasks.vs @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + // // Tasks for the AXI Stream protocol // diff --git a/lib/hardware/buses/bus_width_converter/bus_width_converter.py b/lib/hardware/buses/bus_width_converter/bus_width_converter.py index 3bd6b0aca..a8803caee 100644 --- a/lib/hardware/buses/bus_width_converter/bus_width_converter.py +++ b/lib/hardware/buses/bus_width_converter/bus_width_converter.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + interfaces = { "iob": [ ("valid", "output", 1), @@ -133,7 +137,6 @@ def setup(py_params_dict): master_interface_parameters[width] = f"MASTER_{width}" attributes_dict = { - "original_name": "bus_width_converter", "name": f"{INTERFACE}_bus_width_converter", "version": "0.1", "confs": verilog_parameters, diff --git a/lib/hardware/buses/fifo2axis/fifo2axis.py b/lib/hardware/buses/fifo2axis/fifo2axis.py index 5d3cb2d6c..cb4fb8a93 100644 --- a/lib/hardware/buses/fifo2axis/fifo2axis.py +++ b/lib/hardware/buses/fifo2axis/fifo2axis.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "fifo2axis", - "name": "fifo2axis", "version": "0.1", "generate_hw": False, "blocks": [ diff --git a/lib/hardware/buses/fifo2axis/hardware/src/fifo2axis.v b/lib/hardware/buses/fifo2axis/hardware/src/fifo2axis.v index d7d90b742..5eb392e78 100644 --- a/lib/hardware/buses/fifo2axis/hardware/src/fifo2axis.v +++ b/lib/hardware/buses/fifo2axis/hardware/src/fifo2axis.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1ns / 1ps module fifo2axis #( diff --git a/lib/hardware/buses/fifo2axis/waves.gtkw.license b/lib/hardware/buses/fifo2axis/waves.gtkw.license new file mode 100644 index 000000000..9a5279e71 --- /dev/null +++ b/lib/hardware/buses/fifo2axis/waves.gtkw.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: 2024 IObundle + +SPDX-License-Identifier: MIT diff --git a/lib/hardware/buses/iob2apb/iob2apb.py b/lib/hardware/buses/iob2apb/iob2apb.py index 682b2a36a..250e26e5c 100644 --- a/lib/hardware/buses/iob2apb/iob2apb.py +++ b/lib/hardware/buses/iob2apb/iob2apb.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob2apb", - "name": "iob2apb", "version": "0.1", "confs": [ { diff --git a/lib/hardware/buses/iob2axi/hardware/simulation/src/iob2axi_tb.disable.v b/lib/hardware/buses/iob2axi/hardware/simulation/src/iob2axi_tb.disable.v index ea26226a3..56b6a9335 100644 --- a/lib/hardware/buses/iob2axi/hardware/simulation/src/iob2axi_tb.disable.v +++ b/lib/hardware/buses/iob2axi/hardware/simulation/src/iob2axi_tb.disable.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1ns / 1ps diff --git a/lib/hardware/buses/iob2axi/hardware/src/iob2axi.v b/lib/hardware/buses/iob2axi/hardware/src/iob2axi.v index f7be0dc86..7b06ec5d6 100644 --- a/lib/hardware/buses/iob2axi/hardware/src/iob2axi.v +++ b/lib/hardware/buses/iob2axi/hardware/src/iob2axi.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1ns / 1ps module iob2axi #( diff --git a/lib/hardware/buses/iob2axi/hardware/src/iob2axi_rd.v b/lib/hardware/buses/iob2axi/hardware/src/iob2axi_rd.v index 0e77424b9..f0857a880 100644 --- a/lib/hardware/buses/iob2axi/hardware/src/iob2axi_rd.v +++ b/lib/hardware/buses/iob2axi/hardware/src/iob2axi_rd.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1ns / 1ps diff --git a/lib/hardware/buses/iob2axi/hardware/src/iob2axi_wr.v b/lib/hardware/buses/iob2axi/hardware/src/iob2axi_wr.v index 5ca9fb9c8..b7ec82533 100644 --- a/lib/hardware/buses/iob2axi/hardware/src/iob2axi_wr.v +++ b/lib/hardware/buses/iob2axi/hardware/src/iob2axi_wr.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1ns / 1ps diff --git a/lib/hardware/buses/iob2axi/iob2axi.py b/lib/hardware/buses/iob2axi/iob2axi.py index 46e5edd0e..488fc2b48 100644 --- a/lib/hardware/buses/iob2axi/iob2axi.py +++ b/lib/hardware/buses/iob2axi/iob2axi.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob2axi", - "name": "iob2axi", "version": "0.1", "generate_hw": False, "blocks": [ diff --git a/lib/hardware/buses/iob2axi/waves.gtkw.license b/lib/hardware/buses/iob2axi/waves.gtkw.license new file mode 100644 index 000000000..9a5279e71 --- /dev/null +++ b/lib/hardware/buses/iob2axi/waves.gtkw.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: 2024 IObundle + +SPDX-License-Identifier: MIT diff --git a/lib/hardware/buses/iob2axil/hardware/src/iob2axil.v b/lib/hardware/buses/iob2axil/hardware/src/iob2axil.v index f78cd12eb..8b34d066a 100644 --- a/lib/hardware/buses/iob2axil/hardware/src/iob2axil.v +++ b/lib/hardware/buses/iob2axil/hardware/src/iob2axil.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1ns / 1ps diff --git a/lib/hardware/buses/iob2axil/iob2axil.py b/lib/hardware/buses/iob2axil/iob2axil.py index 94790da52..9a0ed457c 100644 --- a/lib/hardware/buses/iob2axil/iob2axil.py +++ b/lib/hardware/buses/iob2axil/iob2axil.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob2axil", - "name": "iob2axil", "version": "0.1", "generate_hw": False, "confs": [ diff --git a/lib/hardware/buses/iob_asym_converter/hardware/src/iob_asym_converter.v b/lib/hardware/buses/iob_asym_converter/hardware/src/iob_asym_converter.v index bc460348b..9737df080 100644 --- a/lib/hardware/buses/iob_asym_converter/hardware/src/iob_asym_converter.v +++ b/lib/hardware/buses/iob_asym_converter/hardware/src/iob_asym_converter.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1ns / 1ps module iob_asym_converter #( diff --git a/lib/hardware/buses/iob_asym_converter/iob_asym_converter.py b/lib/hardware/buses/iob_asym_converter/iob_asym_converter.py index c38bb32a7..ac8bdfeb3 100644 --- a/lib/hardware/buses/iob_asym_converter/iob_asym_converter.py +++ b/lib/hardware/buses/iob_asym_converter/iob_asym_converter.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_asym_converter", - "name": "iob_asym_converter", "version": "0.1", "generate_hw": False, "ports": [ diff --git a/lib/hardware/buses/iob_axil_split/iob_axil_split.py b/lib/hardware/buses/iob_axil_split/iob_axil_split.py index 4d1ac31cc..3417b618d 100644 --- a/lib/hardware/buses/iob_axil_split/iob_axil_split.py +++ b/lib/hardware/buses/iob_axil_split/iob_axil_split.py @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): assert "name" in py_params_dict, print( "Error: Missing name for generated split module." @@ -43,7 +48,6 @@ def setup(py_params_dict): ] attributes_dict = { - "original_name": "iob_axil_split", "name": py_params_dict["name"], "version": "0.1", "ports": [ diff --git a/lib/hardware/buses/iob_axistream_in/hardware/src/iob_axistream_in.v b/lib/hardware/buses/iob_axistream_in/hardware/src/iob_axistream_in.v index 7b0ba896a..75ce3afa6 100644 --- a/lib/hardware/buses/iob_axistream_in/hardware/src/iob_axistream_in.v +++ b/lib/hardware/buses/iob_axistream_in/hardware/src/iob_axistream_in.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1ns / 1ps `include "iob_axistream_in_conf.vh" `include "iob_axistream_in_csrs_def.vh" diff --git a/lib/hardware/buses/iob_axistream_in/iob_axistream_in.py b/lib/hardware/buses/iob_axistream_in/iob_axistream_in.py index 8d79140b1..67679f825 100755 --- a/lib/hardware/buses/iob_axistream_in/iob_axistream_in.py +++ b/lib/hardware/buses/iob_axistream_in/iob_axistream_in.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_axistream_in", - "name": "iob_axistream_in", "version": "0.3", "board_list": ["cyclonev_gt_dk", "aes_ku040_db_g"], "confs": [ diff --git a/lib/hardware/buses/iob_axistream_in/software/linux/Readme.md b/lib/hardware/buses/iob_axistream_in/software/linux/Readme.md index 84daacdd6..9fc5e6851 100644 --- a/lib/hardware/buses/iob_axistream_in/software/linux/Readme.md +++ b/lib/hardware/buses/iob_axistream_in/software/linux/Readme.md @@ -1,3 +1,9 @@ + + # IOb AXIStream In Linux Kernel Drivers - Structure: - `drivers/`: directory with linux kernel module drivers for diff --git a/lib/hardware/buses/iob_axistream_in/software/linux/drivers/driver.mk b/lib/hardware/buses/iob_axistream_in/software/linux/drivers/driver.mk index a95d9097c..f01138534 100644 --- a/lib/hardware/buses/iob_axistream_in/software/linux/drivers/driver.mk +++ b/lib/hardware/buses/iob_axistream_in/software/linux/drivers/driver.mk @@ -1 +1,5 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + iob_axistream_in-objs := iob_axistream_in_main.o iob_class/iob_class_utils.o diff --git a/lib/hardware/buses/iob_axistream_in/software/linux/drivers/iob_axistream_in_main.c b/lib/hardware/buses/iob_axistream_in/software/linux/drivers/iob_axistream_in_main.c index cb17db476..f659b3bd7 100644 --- a/lib/hardware/buses/iob_axistream_in/software/linux/drivers/iob_axistream_in_main.c +++ b/lib/hardware/buses/iob_axistream_in/software/linux/drivers/iob_axistream_in_main.c @@ -1,3 +1,9 @@ +/* + * SPDX-FileCopyrightText: 2024 IObundle + * + * SPDX-License-Identifier: MIT + */ + /* iob_axistream_in_main.c: driver for iob_axistream_in * using device platform. No hardcoded hardware address: * 1. load driver: insmod iob_axistream_in.ko diff --git a/lib/hardware/buses/iob_axistream_in/software/linux/iob_axistream_in.dts b/lib/hardware/buses/iob_axistream_in/software/linux/iob_axistream_in.dts index 697148ee5..2ddffbfec 100644 --- a/lib/hardware/buses/iob_axistream_in/software/linux/iob_axistream_in.dts +++ b/lib/hardware/buses/iob_axistream_in/software/linux/iob_axistream_in.dts @@ -1,4 +1,7 @@ -// SPDX-License-Identifier: (GPL-2.0 OR MIT) +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + /* Copyright (c) 2024 IObundle */ /dts-v1/; diff --git a/lib/hardware/buses/iob_axistream_in/software/src/iob-axistream-in.c b/lib/hardware/buses/iob_axistream_in/software/src/iob-axistream-in.c index 9a4994c98..f7aa76996 100644 --- a/lib/hardware/buses/iob_axistream_in/software/src/iob-axistream-in.c +++ b/lib/hardware/buses/iob_axistream_in/software/src/iob-axistream-in.c @@ -1,3 +1,9 @@ +/* + * SPDX-FileCopyrightText: 2024 IObundle + * + * SPDX-License-Identifier: MIT + */ + #include "iob-axistream-in.h" void iob_axis_in_reset() { diff --git a/lib/hardware/buses/iob_axistream_in/software/src/iob-axistream-in.h b/lib/hardware/buses/iob_axistream_in/software/src/iob-axistream-in.h index 039402f1e..0eb0edab4 100644 --- a/lib/hardware/buses/iob_axistream_in/software/src/iob-axistream-in.h +++ b/lib/hardware/buses/iob_axistream_in/software/src/iob-axistream-in.h @@ -1,3 +1,9 @@ +/* + * SPDX-FileCopyrightText: 2024 IObundle + * + * SPDX-License-Identifier: MIT + */ + #include "iob_axistream_in_csrs.h" void iob_axis_in_reset(); diff --git a/lib/hardware/buses/iob_axistream_in/software/src/iob_axistream_in_swreg_pc_emul.c b/lib/hardware/buses/iob_axistream_in/software/src/iob_axistream_in_swreg_pc_emul.c index e8ed466f1..13f12cd94 100644 --- a/lib/hardware/buses/iob_axistream_in/software/src/iob_axistream_in_swreg_pc_emul.c +++ b/lib/hardware/buses/iob_axistream_in/software/src/iob_axistream_in_swreg_pc_emul.c @@ -1,3 +1,9 @@ +/* + * SPDX-FileCopyrightText: 2024 IObundle + * + * SPDX-License-Identifier: MIT + */ + /* PC Emulation of axistream-in peripheral */ #include diff --git a/lib/hardware/buses/iob_axistream_out/hardware/src/iob_axistream_out.v b/lib/hardware/buses/iob_axistream_out/hardware/src/iob_axistream_out.v index 48c6faa0a..b12a17d61 100644 --- a/lib/hardware/buses/iob_axistream_out/hardware/src/iob_axistream_out.v +++ b/lib/hardware/buses/iob_axistream_out/hardware/src/iob_axistream_out.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1ns / 1ps `include "iob_axistream_out_conf.vh" `include "iob_axistream_out_csrs_def.vh" diff --git a/lib/hardware/buses/iob_axistream_out/iob_axistream_out.py b/lib/hardware/buses/iob_axistream_out/iob_axistream_out.py index 6588828ee..722235ece 100755 --- a/lib/hardware/buses/iob_axistream_out/iob_axistream_out.py +++ b/lib/hardware/buses/iob_axistream_out/iob_axistream_out.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_axistream_out", - "name": "iob_axistream_out", "version": "0.3", "board_list": ["cyclonev_gt_dk", "aes_ku040_db_g"], "confs": [ diff --git a/lib/hardware/buses/iob_axistream_out/software/linux/Readme.md b/lib/hardware/buses/iob_axistream_out/software/linux/Readme.md index ac3982356..50392a061 100644 --- a/lib/hardware/buses/iob_axistream_out/software/linux/Readme.md +++ b/lib/hardware/buses/iob_axistream_out/software/linux/Readme.md @@ -1,3 +1,9 @@ + + # IOb AXIStream Out Linux Kernel Drivers - Structure: - `drivers/`: directory with linux kernel module drivers for diff --git a/lib/hardware/buses/iob_axistream_out/software/linux/drivers/driver.mk b/lib/hardware/buses/iob_axistream_out/software/linux/drivers/driver.mk index 14f885e16..3126ac2f8 100644 --- a/lib/hardware/buses/iob_axistream_out/software/linux/drivers/driver.mk +++ b/lib/hardware/buses/iob_axistream_out/software/linux/drivers/driver.mk @@ -1 +1,5 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + iob_axistream_out-objs := iob_axistream_out_main.o iob_class/iob_class_utils.o diff --git a/lib/hardware/buses/iob_axistream_out/software/linux/drivers/iob_axistream_out_main.c b/lib/hardware/buses/iob_axistream_out/software/linux/drivers/iob_axistream_out_main.c index 41d99163c..f411827fc 100644 --- a/lib/hardware/buses/iob_axistream_out/software/linux/drivers/iob_axistream_out_main.c +++ b/lib/hardware/buses/iob_axistream_out/software/linux/drivers/iob_axistream_out_main.c @@ -1,3 +1,9 @@ +/* + * SPDX-FileCopyrightText: 2024 IObundle + * + * SPDX-License-Identifier: MIT + */ + /* iob_axistream_out_main.c: driver for iob_axistream_out * using device platform. No hardcoded hardware address: * 1. load driver: insmod iob_axistream_out.ko diff --git a/lib/hardware/buses/iob_axistream_out/software/linux/iob_axistream_out.dts b/lib/hardware/buses/iob_axistream_out/software/linux/iob_axistream_out.dts index 7cffd051d..909349b75 100644 --- a/lib/hardware/buses/iob_axistream_out/software/linux/iob_axistream_out.dts +++ b/lib/hardware/buses/iob_axistream_out/software/linux/iob_axistream_out.dts @@ -1,4 +1,7 @@ -// SPDX-License-Identifier: (GPL-2.0 OR MIT) +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + /* Copyright (c) 2024 IObundle */ /dts-v1/; diff --git a/lib/hardware/buses/iob_axistream_out/software/src/iob-axistream-out.c b/lib/hardware/buses/iob_axistream_out/software/src/iob-axistream-out.c index dc86bb16f..fd65765fb 100644 --- a/lib/hardware/buses/iob_axistream_out/software/src/iob-axistream-out.c +++ b/lib/hardware/buses/iob_axistream_out/software/src/iob-axistream-out.c @@ -1,3 +1,9 @@ +/* + * SPDX-FileCopyrightText: 2024 IObundle + * + * SPDX-License-Identifier: MIT + */ + #include "iob-axistream-out.h" void iob_axis_out_reset() { diff --git a/lib/hardware/buses/iob_axistream_out/software/src/iob-axistream-out.h b/lib/hardware/buses/iob_axistream_out/software/src/iob-axistream-out.h index ea72eecc2..fefa9f876 100644 --- a/lib/hardware/buses/iob_axistream_out/software/src/iob-axistream-out.h +++ b/lib/hardware/buses/iob_axistream_out/software/src/iob-axistream-out.h @@ -1,3 +1,9 @@ +/* + * SPDX-FileCopyrightText: 2024 IObundle + * + * SPDX-License-Identifier: MIT + */ + #include "iob_axistream_out_csrs.h" void iob_axis_out_reset(); diff --git a/lib/hardware/buses/iob_axistream_out/software/src/iob_axistream_out_swreg_pc_emul.c b/lib/hardware/buses/iob_axistream_out/software/src/iob_axistream_out_swreg_pc_emul.c index b23d8f3cb..7fa63a8fa 100644 --- a/lib/hardware/buses/iob_axistream_out/software/src/iob_axistream_out_swreg_pc_emul.c +++ b/lib/hardware/buses/iob_axistream_out/software/src/iob_axistream_out_swreg_pc_emul.c @@ -1,3 +1,9 @@ +/* + * SPDX-FileCopyrightText: 2024 IObundle + * + * SPDX-License-Identifier: MIT + */ + /* PC Emulation of axistream-out peripheral */ #include diff --git a/lib/hardware/buses/iob_bus_demux/hardware/src/iob_bus_demux.v b/lib/hardware/buses/iob_bus_demux/hardware/src/iob_bus_demux.v index 9c2cde9c3..8f40bd9ac 100644 --- a/lib/hardware/buses/iob_bus_demux/hardware/src/iob_bus_demux.v +++ b/lib/hardware/buses/iob_bus_demux/hardware/src/iob_bus_demux.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1ns / 1ps // Split the IOb native interface, from a single master to multiple followers diff --git a/lib/hardware/buses/iob_bus_demux/iob_bus_demux.py b/lib/hardware/buses/iob_bus_demux/iob_bus_demux.py index dbe56c8fd..df1cf5887 100644 --- a/lib/hardware/buses/iob_bus_demux/iob_bus_demux.py +++ b/lib/hardware/buses/iob_bus_demux/iob_bus_demux.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_bus_demux", - "name": "iob_bus_demux", "version": "0.1", "generate_hw": False, "ports": [ diff --git a/lib/hardware/buses/iob_demux/iob_demux.py b/lib/hardware/buses/iob_demux/iob_demux.py index 6e0c9abeb..6e7b7ebd7 100644 --- a/lib/hardware/buses/iob_demux/iob_demux.py +++ b/lib/hardware/buses/iob_demux/iob_demux.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_demux", - "name": "iob_demux", "version": "0.1", "confs": [ { diff --git a/lib/hardware/buses/iob_iob2wishbone/hardware/src/iob_iob2wishbone.v b/lib/hardware/buses/iob_iob2wishbone/hardware/src/iob_iob2wishbone.v index fdfaa87c2..cbcc42978 100644 --- a/lib/hardware/buses/iob_iob2wishbone/hardware/src/iob_iob2wishbone.v +++ b/lib/hardware/buses/iob_iob2wishbone/hardware/src/iob_iob2wishbone.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1ns / 1ps module iob_iob2wishbone #( diff --git a/lib/hardware/buses/iob_iob2wishbone/iob_iob2wishbone.py b/lib/hardware/buses/iob_iob2wishbone/iob_iob2wishbone.py index 1bd2e1cc6..4903dc2f2 100644 --- a/lib/hardware/buses/iob_iob2wishbone/iob_iob2wishbone.py +++ b/lib/hardware/buses/iob_iob2wishbone/iob_iob2wishbone.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_iob2wishbone", - "name": "iob_iob2wishbone", "version": "0.1", "generate_hw": False, "blocks": [ diff --git a/lib/hardware/buses/iob_merge/iob_merge.py b/lib/hardware/buses/iob_merge/iob_merge.py index cf4aed24b..69bf2f188 100644 --- a/lib/hardware/buses/iob_merge/iob_merge.py +++ b/lib/hardware/buses/iob_merge/iob_merge.py @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): assert "name" in py_params_dict, print( "Error: Missing name for generated merge module." @@ -14,7 +19,6 @@ def setup(py_params_dict): DATA_W = int(py_params_dict["data_w"]) if "data_w" in py_params_dict else 32 attributes_dict = { - "original_name": "iob_merge", "name": py_params_dict["name"], "version": "0.1", "ports": [ diff --git a/lib/hardware/buses/iob_mux/iob_mux.py b/lib/hardware/buses/iob_mux/iob_mux.py index 76e89a74d..b626dad0a 100644 --- a/lib/hardware/buses/iob_mux/iob_mux.py +++ b/lib/hardware/buses/iob_mux/iob_mux.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_mux", - "name": "iob_mux", "version": "0.1", "confs": [ { diff --git a/lib/hardware/buses/iob_reverse/iob_reverse.py b/lib/hardware/buses/iob_reverse/iob_reverse.py index beb36ad79..400dc640d 100644 --- a/lib/hardware/buses/iob_reverse/iob_reverse.py +++ b/lib/hardware/buses/iob_reverse/iob_reverse.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_reverse", - "name": "iob_reverse", "version": "0.1", "confs": [ { diff --git a/lib/hardware/buses/iob_split/iob_split.py b/lib/hardware/buses/iob_split/iob_split.py index 112b997e4..539840986 100644 --- a/lib/hardware/buses/iob_split/iob_split.py +++ b/lib/hardware/buses/iob_split/iob_split.py @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): assert "name" in py_params_dict, print( "Error: Missing name for generated split module." @@ -14,7 +19,6 @@ def setup(py_params_dict): DATA_W = int(py_params_dict["data_w"]) if "data_w" in py_params_dict else 32 attributes_dict = { - "original_name": "iob_split", "name": py_params_dict["name"], "version": "0.1", "ports": [ diff --git a/lib/hardware/buses/iob_tasks/document/Makefile b/lib/hardware/buses/iob_tasks/document/Makefile index 39531a51c..70a92c425 100644 --- a/lib/hardware/buses/iob_tasks/document/Makefile +++ b/lib/hardware/buses/iob_tasks/document/Makefile @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + PNGS=$(patsubst %.drom,%.png,$(wildcard *.drom)) all: clean $(PNGS) diff --git a/lib/hardware/buses/iob_tasks/document/README.md b/lib/hardware/buses/iob_tasks/document/README.md index d9bc57d45..c0c72e72e 100644 --- a/lib/hardware/buses/iob_tasks/document/README.md +++ b/lib/hardware/buses/iob_tasks/document/README.md @@ -1,3 +1,9 @@ + + # IOb-interface The IOb Native Interface, or IOb interface shortly, has the following signals diff --git a/lib/hardware/buses/iob_tasks/document/iob_if_read.drom.license b/lib/hardware/buses/iob_tasks/document/iob_if_read.drom.license new file mode 100644 index 000000000..9a5279e71 --- /dev/null +++ b/lib/hardware/buses/iob_tasks/document/iob_if_read.drom.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: 2024 IObundle + +SPDX-License-Identifier: MIT diff --git a/lib/hardware/buses/iob_tasks/document/iob_if_read.png.license b/lib/hardware/buses/iob_tasks/document/iob_if_read.png.license new file mode 100644 index 000000000..9a5279e71 --- /dev/null +++ b/lib/hardware/buses/iob_tasks/document/iob_if_read.png.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: 2024 IObundle + +SPDX-License-Identifier: MIT diff --git a/lib/hardware/buses/iob_tasks/document/iob_if_write.drom.license b/lib/hardware/buses/iob_tasks/document/iob_if_write.drom.license new file mode 100644 index 000000000..9a5279e71 --- /dev/null +++ b/lib/hardware/buses/iob_tasks/document/iob_if_write.drom.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: 2024 IObundle + +SPDX-License-Identifier: MIT diff --git a/lib/hardware/buses/iob_tasks/document/iob_if_write.png.license b/lib/hardware/buses/iob_tasks/document/iob_if_write.png.license new file mode 100644 index 000000000..9a5279e71 --- /dev/null +++ b/lib/hardware/buses/iob_tasks/document/iob_if_write.png.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: 2024 IObundle + +SPDX-License-Identifier: MIT diff --git a/lib/hardware/buses/iob_tasks/hardware/src/iob_tasks.cpp b/lib/hardware/buses/iob_tasks/hardware/src/iob_tasks.cpp index 7d58845f4..9b7085f7c 100644 --- a/lib/hardware/buses/iob_tasks/hardware/src/iob_tasks.cpp +++ b/lib/hardware/buses/iob_tasks/hardware/src/iob_tasks.cpp @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + #include "iob_tasks.h" // Uncomment to enable periodic time printing diff --git a/lib/hardware/buses/iob_tasks/hardware/src/iob_tasks.h b/lib/hardware/buses/iob_tasks/hardware/src/iob_tasks.h index af1bdadbb..e3f3d9871 100644 --- a/lib/hardware/buses/iob_tasks/hardware/src/iob_tasks.h +++ b/lib/hardware/buses/iob_tasks/hardware/src/iob_tasks.h @@ -1,3 +1,9 @@ +/* + * SPDX-FileCopyrightText: 2024 IObundle + * + * SPDX-License-Identifier: MIT + */ + #ifndef H_IOB_TASKS_H #define H_IOB_TASKS_H diff --git a/lib/hardware/buses/iob_tasks/hardware/src/iob_tasks.vs b/lib/hardware/buses/iob_tasks/hardware/src/iob_tasks.vs index e70c03e01..74f2a72aa 100644 --- a/lib/hardware/buses/iob_tasks/hardware/src/iob_tasks.vs +++ b/lib/hardware/buses/iob_tasks/hardware/src/iob_tasks.vs @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + // // Tasks for the IOb Native protocol // diff --git a/lib/hardware/buses/iob_tasks/iob_tasks.py b/lib/hardware/buses/iob_tasks/iob_tasks.py index 6b5ae6444..39fbb46d3 100644 --- a/lib/hardware/buses/iob_tasks/iob_tasks.py +++ b/lib/hardware/buses/iob_tasks/iob_tasks.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_tasks", - "name": "iob_tasks", "version": "0.1", "generate_hw": False, } diff --git a/lib/hardware/buses/iob_wishbone2iob/iob_wishbone2iob.py b/lib/hardware/buses/iob_wishbone2iob/iob_wishbone2iob.py index 05709fb65..8f41eb060 100644 --- a/lib/hardware/buses/iob_wishbone2iob/iob_wishbone2iob.py +++ b/lib/hardware/buses/iob_wishbone2iob/iob_wishbone2iob.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_wishbone2iob", - "name": "iob_wishbone2iob", "version": "0.1", "confs": [ { diff --git a/lib/hardware/clocks_resets/iob_clkbuf/iob_clkbuf.py b/lib/hardware/clocks_resets/iob_clkbuf/iob_clkbuf.py index 5bf46573a..ed258c84b 100644 --- a/lib/hardware/clocks_resets/iob_clkbuf/iob_clkbuf.py +++ b/lib/hardware/clocks_resets/iob_clkbuf/iob_clkbuf.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_clkbuf", - "name": "iob_clkbuf", "version": "0.1", "ports": [ { diff --git a/lib/hardware/clocks_resets/iob_clkmux/iob_clkmux.py b/lib/hardware/clocks_resets/iob_clkmux/iob_clkmux.py index edf4c5a44..c6ed50a3b 100644 --- a/lib/hardware/clocks_resets/iob_clkmux/iob_clkmux.py +++ b/lib/hardware/clocks_resets/iob_clkmux/iob_clkmux.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_clkmux", - "name": "iob_clkmux", "version": "0.1", "ports": [ { diff --git a/lib/hardware/clocks_resets/iob_clock/iob_clock.py b/lib/hardware/clocks_resets/iob_clock/iob_clock.py index f1acdb7f6..b1ce3c32c 100644 --- a/lib/hardware/clocks_resets/iob_clock/iob_clock.py +++ b/lib/hardware/clocks_resets/iob_clock/iob_clock.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_clock", - "name": "iob_clock", "version": "0.1", "confs": [ { diff --git a/lib/hardware/clocks_resets/iob_nco/hardware/iob_nco_sync.py b/lib/hardware/clocks_resets/iob_nco/hardware/iob_nco_sync.py index 4462b3eba..66c862263 100644 --- a/lib/hardware/clocks_resets/iob_nco/hardware/iob_nco_sync.py +++ b/lib/hardware/clocks_resets/iob_nco/hardware/iob_nco_sync.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_nco_sync", - "name": "iob_nco_sync", "version": "0.1", "confs": [ { diff --git a/lib/hardware/clocks_resets/iob_nco/hardware/simulation/src/iob_nco_tb.v b/lib/hardware/clocks_resets/iob_nco/hardware/simulation/src/iob_nco_tb.v index 8f7d9ea96..de9deeaf4 100644 --- a/lib/hardware/clocks_resets/iob_nco/hardware/simulation/src/iob_nco_tb.v +++ b/lib/hardware/clocks_resets/iob_nco/hardware/simulation/src/iob_nco_tb.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1ns / 1ps `include "iob_nco_conf.vh" diff --git a/lib/hardware/clocks_resets/iob_nco/iob_nco.py b/lib/hardware/clocks_resets/iob_nco/iob_nco.py index 1a2366b4b..7682ea1e7 100644 --- a/lib/hardware/clocks_resets/iob_nco/iob_nco.py +++ b/lib/hardware/clocks_resets/iob_nco/iob_nco.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_nco", - "name": "iob_nco", "version": "0.1", "confs": [ { diff --git a/lib/hardware/clocks_resets/iob_nco/software/example_firmware.c b/lib/hardware/clocks_resets/iob_nco/software/example_firmware.c index 76b1f2280..1a48d5502 100644 --- a/lib/hardware/clocks_resets/iob_nco/software/example_firmware.c +++ b/lib/hardware/clocks_resets/iob_nco/software/example_firmware.c @@ -1,3 +1,9 @@ +/* + * SPDX-FileCopyrightText: 2024 IObundle + * + * SPDX-License-Identifier: MIT + */ + #include "bsp.h" #include "iob_nco.h" #include "iob_uart.h" diff --git a/lib/hardware/clocks_resets/iob_nco/software/linux/README.md b/lib/hardware/clocks_resets/iob_nco/software/linux/README.md index e3b06641f..ebb0acced 100644 --- a/lib/hardware/clocks_resets/iob_nco/software/linux/README.md +++ b/lib/hardware/clocks_resets/iob_nco/software/linux/README.md @@ -1,3 +1,9 @@ + + # IOb NCO Linux Kernel Drivers - Structure: - `drivers/`: directory with linux kernel module drivers for iob_nco diff --git a/lib/hardware/clocks_resets/iob_nco/software/linux/drivers/driver.mk b/lib/hardware/clocks_resets/iob_nco/software/linux/drivers/driver.mk index 26954d980..339c95d28 100644 --- a/lib/hardware/clocks_resets/iob_nco/software/linux/drivers/driver.mk +++ b/lib/hardware/clocks_resets/iob_nco/software/linux/drivers/driver.mk @@ -1 +1,5 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + iob_nco-objs := iob_nco_main.o iob_class/iob_class_utils.o diff --git a/lib/hardware/clocks_resets/iob_nco/software/linux/drivers/iob_nco_main.c b/lib/hardware/clocks_resets/iob_nco/software/linux/drivers/iob_nco_main.c index 1e5c1e838..aad310bc4 100644 --- a/lib/hardware/clocks_resets/iob_nco/software/linux/drivers/iob_nco_main.c +++ b/lib/hardware/clocks_resets/iob_nco/software/linux/drivers/iob_nco_main.c @@ -1,3 +1,9 @@ +/* + * SPDX-FileCopyrightText: 2024 IObundle + * + * SPDX-License-Identifier: MIT + */ + /* iob_nco_main.c: driver for iob_nco * using device platform. No hardcoded hardware address: * 1. load driver: insmod iob_nco.ko diff --git a/lib/hardware/clocks_resets/iob_nco/software/linux/iob_nco.dts b/lib/hardware/clocks_resets/iob_nco/software/linux/iob_nco.dts index 3afe06ac4..c43cd9988 100644 --- a/lib/hardware/clocks_resets/iob_nco/software/linux/iob_nco.dts +++ b/lib/hardware/clocks_resets/iob_nco/software/linux/iob_nco.dts @@ -1,4 +1,7 @@ -// SPDX-License-Identifier: (GPL-2.0 OR MIT) +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + /* Copyright (c) 2024 IObundle */ /dts-v1/; diff --git a/lib/hardware/clocks_resets/iob_nco/software/linux/user/Makefile b/lib/hardware/clocks_resets/iob_nco/software/linux/user/Makefile index f2a8d7022..fb7bd3def 100644 --- a/lib/hardware/clocks_resets/iob_nco/software/linux/user/Makefile +++ b/lib/hardware/clocks_resets/iob_nco/software/linux/user/Makefile @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + SRC = $(wildcard *.c) HDR += iob_nco.h FLAGS = -Wall -Werror -O2 diff --git a/lib/hardware/clocks_resets/iob_nco/software/linux/user/iob_nco_user.c b/lib/hardware/clocks_resets/iob_nco/software/linux/user/iob_nco_user.c index a3dd103b8..5b8dcf762 100644 --- a/lib/hardware/clocks_resets/iob_nco/software/linux/user/iob_nco_user.c +++ b/lib/hardware/clocks_resets/iob_nco/software/linux/user/iob_nco_user.c @@ -1,3 +1,9 @@ +/* + * SPDX-FileCopyrightText: 2024 IObundle + * + * SPDX-License-Identifier: MIT + */ + #include #include #include diff --git a/lib/hardware/clocks_resets/iob_nco/software/src/iob_nco.c b/lib/hardware/clocks_resets/iob_nco/software/src/iob_nco.c index 20292cfe9..d3008cfe1 100644 --- a/lib/hardware/clocks_resets/iob_nco/software/src/iob_nco.c +++ b/lib/hardware/clocks_resets/iob_nco/software/src/iob_nco.c @@ -1,3 +1,9 @@ +/* + * SPDX-FileCopyrightText: 2024 IObundle + * + * SPDX-License-Identifier: MIT + */ + #include "iob_nco.h" // Base Address diff --git a/lib/hardware/clocks_resets/iob_nco/software/src/iob_nco.h b/lib/hardware/clocks_resets/iob_nco/software/src/iob_nco.h index 4ef3f5852..40e14e59a 100644 --- a/lib/hardware/clocks_resets/iob_nco/software/src/iob_nco.h +++ b/lib/hardware/clocks_resets/iob_nco/software/src/iob_nco.h @@ -1,3 +1,9 @@ +/* + * SPDX-FileCopyrightText: 2024 IObundle + * + * SPDX-License-Identifier: MIT + */ + #pragma once #include "iob_nco_csrs.h" #include diff --git a/lib/hardware/clocks_resets/iob_nco/software/src/iob_nco_csrs_pc_emul.c b/lib/hardware/clocks_resets/iob_nco/software/src/iob_nco_csrs_pc_emul.c index 1d1f0847f..0b597d786 100644 --- a/lib/hardware/clocks_resets/iob_nco/software/src/iob_nco_csrs_pc_emul.c +++ b/lib/hardware/clocks_resets/iob_nco/software/src/iob_nco_csrs_pc_emul.c @@ -1,3 +1,9 @@ +/* + * SPDX-FileCopyrightText: 2024 IObundle + * + * SPDX-License-Identifier: MIT + */ + /* PC Emulation of nco peripheral */ #include diff --git a/lib/hardware/clocks_resets/iob_pulse_gen/hardware/simulation/src/iob_pulse_gen_tb.v b/lib/hardware/clocks_resets/iob_pulse_gen/hardware/simulation/src/iob_pulse_gen_tb.v index 73d2eeffb..5e04fd8cb 100644 --- a/lib/hardware/clocks_resets/iob_pulse_gen/hardware/simulation/src/iob_pulse_gen_tb.v +++ b/lib/hardware/clocks_resets/iob_pulse_gen/hardware/simulation/src/iob_pulse_gen_tb.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1ns / 1ps module iob_pulse_gen_tb; diff --git a/lib/hardware/clocks_resets/iob_pulse_gen/iob_pulse_gen.py b/lib/hardware/clocks_resets/iob_pulse_gen/iob_pulse_gen.py index 92d3abff9..76537bbb0 100644 --- a/lib/hardware/clocks_resets/iob_pulse_gen/iob_pulse_gen.py +++ b/lib/hardware/clocks_resets/iob_pulse_gen/iob_pulse_gen.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_pulse_gen", - "name": "iob_pulse_gen", "version": "0.1", "confs": [ { diff --git a/lib/hardware/fifo/iob_bfifo/hardware/src/iob_bfifo.v b/lib/hardware/fifo/iob_bfifo/hardware/src/iob_bfifo.v index 99f9c9795..d532ba734 100644 --- a/lib/hardware/fifo/iob_bfifo/hardware/src/iob_bfifo.v +++ b/lib/hardware/fifo/iob_bfifo/hardware/src/iob_bfifo.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1ns / 1ps module iob_bfifo #( diff --git a/lib/hardware/fifo/iob_bfifo/iob_bfifo.py b/lib/hardware/fifo/iob_bfifo/iob_bfifo.py index 04323d808..cdde59020 100644 --- a/lib/hardware/fifo/iob_bfifo/iob_bfifo.py +++ b/lib/hardware/fifo/iob_bfifo/iob_bfifo.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_bfifo", - "name": "iob_bfifo", "version": "0.1", "generate_hw": False, "blocks": [ diff --git a/lib/hardware/fifo/iob_fifo_async/hardware/simulation/src/iob_fifo_async_tb.v b/lib/hardware/fifo/iob_fifo_async/hardware/simulation/src/iob_fifo_async_tb.v index cedb03ea5..6bdbb7adc 100644 --- a/lib/hardware/fifo/iob_fifo_async/hardware/simulation/src/iob_fifo_async_tb.v +++ b/lib/hardware/fifo/iob_fifo_async/hardware/simulation/src/iob_fifo_async_tb.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1ns / 1ps `define IOB_PULSE(VAR, PRE, DURATION, POST) VAR=0; #PRE VAR=1; #DURATION VAR=0; #POST; diff --git a/lib/hardware/fifo/iob_fifo_async/hardware/src/iob_fifo_async.v b/lib/hardware/fifo/iob_fifo_async/hardware/src/iob_fifo_async.v index 95ce98f58..248596388 100644 --- a/lib/hardware/fifo/iob_fifo_async/hardware/src/iob_fifo_async.v +++ b/lib/hardware/fifo/iob_fifo_async/hardware/src/iob_fifo_async.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1ns / 1ps module iob_fifo_async #( diff --git a/lib/hardware/fifo/iob_fifo_async/iob_fifo_async.py b/lib/hardware/fifo/iob_fifo_async/iob_fifo_async.py index e5d32f9b6..77c83911c 100644 --- a/lib/hardware/fifo/iob_fifo_async/iob_fifo_async.py +++ b/lib/hardware/fifo/iob_fifo_async/iob_fifo_async.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_fifo_async", - "name": "iob_fifo_async", "version": "0.1", "generate_hw": False, "confs": [ diff --git a/lib/hardware/fifo/iob_fifo_sync/hardware/simulation/src/iob_fifo_sync_tb.v b/lib/hardware/fifo/iob_fifo_sync/hardware/simulation/src/iob_fifo_sync_tb.v index 21dd536e8..ce421e190 100644 --- a/lib/hardware/fifo/iob_fifo_sync/hardware/simulation/src/iob_fifo_sync_tb.v +++ b/lib/hardware/fifo/iob_fifo_sync/hardware/simulation/src/iob_fifo_sync_tb.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1ns / 1ps /* TODO: re-implement these tests diff --git a/lib/hardware/fifo/iob_fifo_sync/hardware/src/iob_fifo_sync.v b/lib/hardware/fifo/iob_fifo_sync/hardware/src/iob_fifo_sync.v index 35e813cce..c2b858777 100644 --- a/lib/hardware/fifo/iob_fifo_sync/hardware/src/iob_fifo_sync.v +++ b/lib/hardware/fifo/iob_fifo_sync/hardware/src/iob_fifo_sync.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1ns / 1ps module iob_fifo_sync #( diff --git a/lib/hardware/fifo/iob_fifo_sync/iob_fifo_sync.py b/lib/hardware/fifo/iob_fifo_sync/iob_fifo_sync.py index 3cdcebbda..5008739a9 100644 --- a/lib/hardware/fifo/iob_fifo_sync/iob_fifo_sync.py +++ b/lib/hardware/fifo/iob_fifo_sync/iob_fifo_sync.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_fifo_sync", - "name": "iob_fifo_sync", "version": "0.1", "generate_hw": False, "confs": [ diff --git a/lib/hardware/fifo/iob_gray2bin/hardware/src/iob_gray2bin.v b/lib/hardware/fifo/iob_gray2bin/hardware/src/iob_gray2bin.v index 9f7e07638..786cfe303 100644 --- a/lib/hardware/fifo/iob_gray2bin/hardware/src/iob_gray2bin.v +++ b/lib/hardware/fifo/iob_gray2bin/hardware/src/iob_gray2bin.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1ns / 1ps // Convert gray encoding to binary diff --git a/lib/hardware/fifo/iob_gray2bin/iob_gray2bin.py b/lib/hardware/fifo/iob_gray2bin/iob_gray2bin.py index d1a34e88f..39fbb46d3 100644 --- a/lib/hardware/fifo/iob_gray2bin/iob_gray2bin.py +++ b/lib/hardware/fifo/iob_gray2bin/iob_gray2bin.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_gray2bin", - "name": "iob_gray2bin", "version": "0.1", "generate_hw": False, } diff --git a/lib/hardware/fifo/iob_gray_counter/hardware/src/iob_gray_counter.v b/lib/hardware/fifo/iob_gray_counter/hardware/src/iob_gray_counter.v index 68c5122a1..85884738a 100644 --- a/lib/hardware/fifo/iob_gray_counter/hardware/src/iob_gray_counter.v +++ b/lib/hardware/fifo/iob_gray_counter/hardware/src/iob_gray_counter.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1ns / 1ps module iob_gray_counter #( diff --git a/lib/hardware/fifo/iob_gray_counter/iob_gray_counter.py b/lib/hardware/fifo/iob_gray_counter/iob_gray_counter.py index 8f9fd6bee..5c26cd2b0 100644 --- a/lib/hardware/fifo/iob_gray_counter/iob_gray_counter.py +++ b/lib/hardware/fifo/iob_gray_counter/iob_gray_counter.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_gray_counter", - "name": "iob_gray_counter", "version": "0.1", "generate_hw": False, "ports": [ diff --git a/lib/hardware/iob_gpio/Makefile b/lib/hardware/iob_gpio/Makefile index c2198d055..708ea0c2f 100644 --- a/lib/hardware/iob_gpio/Makefile +++ b/lib/hardware/iob_gpio/Makefile @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + # # TOP MAKEFILE # diff --git a/lib/hardware/iob_gpio/README.md b/lib/hardware/iob_gpio/README.md index 83c8557a6..c491925d6 100644 --- a/lib/hardware/iob_gpio/README.md +++ b/lib/hardware/iob_gpio/README.md @@ -1,3 +1,9 @@ + + # README # # iob-gpio diff --git a/lib/hardware/iob_gpio/hardware/fpga/fpga.mk b/lib/hardware/iob_gpio/hardware/fpga/fpga.mk index 168559f2f..9768a1168 100644 --- a/lib/hardware/iob_gpio/hardware/fpga/fpga.mk +++ b/lib/hardware/iob_gpio/hardware/fpga/fpga.mk @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + GPIO_DIR:=../../.. include $(GPIO_DIR)/hardware/hardware.mk diff --git a/lib/hardware/iob_gpio/hardware/fpga/quartus/Makefile b/lib/hardware/iob_gpio/hardware/fpga/quartus/Makefile index 1a73e9604..c4b29a48d 100644 --- a/lib/hardware/iob_gpio/hardware/fpga/quartus/Makefile +++ b/lib/hardware/iob_gpio/hardware/fpga/quartus/Makefile @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + FPGA_OBJ?=$(FPGA_FAMILY)/$(TOP_MODULE)_0.qxp CONSTRAINTS:=$(wildcard *.sdc) diff --git a/lib/hardware/iob_gpio/hardware/fpga/quartus/build.sh b/lib/hardware/iob_gpio/hardware/fpga/quartus/build.sh index 86f6406f1..a3c73b1e5 100755 --- a/lib/hardware/iob_gpio/hardware/fpga/quartus/build.sh +++ b/lib/hardware/iob_gpio/hardware/fpga/quartus/build.sh @@ -1,4 +1,9 @@ #!/usr/bin/bash + +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + export ALTERAPATH=/home/iobundle/Intel/Altera_full/18.0 export LM_LICENSE_FILE=1801@localhost:$ALTERAPATH/../1-MVXX5H_License.dat nios=/home/iobundle/Intel/Altera_full/18.0/nios2eds/nios2_command_shell.sh diff --git a/lib/hardware/iob_gpio/hardware/fpga/quartus/gpio.sdc b/lib/hardware/iob_gpio/hardware/fpga/quartus/gpio.sdc index d430a5ea2..f2112dde0 100644 --- a/lib/hardware/iob_gpio/hardware/fpga/quartus/gpio.sdc +++ b/lib/hardware/iob_gpio/hardware/fpga/quartus/gpio.sdc @@ -1,11 +1,6 @@ -#################################################################### +# SPDX-FileCopyrightText: 2024 IObundle # -# -# Description: Constraints File -# -# Copyright (C) 2018 IObundle, Lda All rights reserved -# -##################################################################### +# SPDX-License-Identifier: MIT create_clock -name "clk" -add -period 10.0 [get_ports clk] derive_clock_uncertainty diff --git a/lib/hardware/iob_gpio/hardware/fpga/quartus/gpio.tcl b/lib/hardware/iob_gpio/hardware/fpga/quartus/gpio.tcl index 185432dce..194f72e80 100644 --- a/lib/hardware/iob_gpio/hardware/fpga/quartus/gpio.tcl +++ b/lib/hardware/iob_gpio/hardware/fpga/quartus/gpio.tcl @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + # # Synthesis and implementation script # diff --git a/lib/hardware/iob_gpio/hardware/fpga/vivado/Makefile b/lib/hardware/iob_gpio/hardware/fpga/vivado/Makefile index 45dcf21ab..9bbc17de0 100644 --- a/lib/hardware/iob_gpio/hardware/fpga/vivado/Makefile +++ b/lib/hardware/iob_gpio/hardware/fpga/vivado/Makefile @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + FPGA_OBJ?=$(FPGA_FAMILY)/$(TOP_MODULE).edif CONSTRAINTS:=$(wildcard *.xdc) diff --git a/lib/hardware/iob_gpio/hardware/fpga/vivado/build.sh b/lib/hardware/iob_gpio/hardware/fpga/vivado/build.sh index 09aaa0eb0..b9464febe 100755 --- a/lib/hardware/iob_gpio/hardware/fpga/vivado/build.sh +++ b/lib/hardware/iob_gpio/hardware/fpga/vivado/build.sh @@ -1,5 +1,9 @@ #!/usr/bin/bash +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + export XILINXPATH=/opt/Xilinx export LM_LICENSE_FILE=$LM_LICENSE_FILE:$XILINXPATH/Xilinx.lic source /opt/Xilinx/Vivado/settings64.sh diff --git a/lib/hardware/iob_gpio/hardware/fpga/vivado/gpio.tcl b/lib/hardware/iob_gpio/hardware/fpga/vivado/gpio.tcl index 1b008f0a3..cff21b313 100644 --- a/lib/hardware/iob_gpio/hardware/fpga/vivado/gpio.tcl +++ b/lib/hardware/iob_gpio/hardware/fpga/vivado/gpio.tcl @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT set TOP [lindex $argv 0] set PART [lindex $argv 1] diff --git a/lib/hardware/iob_gpio/hardware/include/inst.vh b/lib/hardware/iob_gpio/hardware/include/inst.vh index 5980963ec..1425b7b91 100644 --- a/lib/hardware/iob_gpio/hardware/include/inst.vh +++ b/lib/hardware/iob_gpio/hardware/include/inst.vh @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + // // GPIO // diff --git a/lib/hardware/iob_gpio/hardware/include/pio.vh b/lib/hardware/iob_gpio/hardware/include/pio.vh index 64154e7ce..cfc479086 100644 --- a/lib/hardware/iob_gpio/hardware/include/pio.vh +++ b/lib/hardware/iob_gpio/hardware/include/pio.vh @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + // GPIO input [`GPIO_INPUT_W-1:0] gpio_input, output [`GPIO_OUTPUT_W-1:0] gpio_output, diff --git a/lib/hardware/iob_gpio/hardware/simulation/icarus/Makefile b/lib/hardware/iob_gpio/hardware/simulation/icarus/Makefile index d54e8be06..f3ae59504 100644 --- a/lib/hardware/iob_gpio/hardware/simulation/icarus/Makefile +++ b/lib/hardware/iob_gpio/hardware/simulation/icarus/Makefile @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + GPIO_DIR:=../../.. incdir:=-I diff --git a/lib/hardware/iob_gpio/hardware/simulation/simulation.mk b/lib/hardware/iob_gpio/hardware/simulation/simulation.mk index 1b71bc247..fa7ba28e0 100644 --- a/lib/hardware/iob_gpio/hardware/simulation/simulation.mk +++ b/lib/hardware/iob_gpio/hardware/simulation/simulation.mk @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + include $(GPIO_DIR)/hardware/hardware.mk DEFINE+=$(defmacro)VCD diff --git a/lib/hardware/iob_gpio/iob_gpio.py b/lib/hardware/iob_gpio/iob_gpio.py index 7276769eb..aac72bd3f 100755 --- a/lib/hardware/iob_gpio/iob_gpio.py +++ b/lib/hardware/iob_gpio/iob_gpio.py @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): NAME = py_params_dict["name"] if "name" in py_params_dict else "iob_gpio" N_INPUTS = int(py_params_dict["n_inputs"]) if "n_inputs" in py_params_dict else 1 @@ -8,7 +13,6 @@ def setup(py_params_dict): ) attributes_dict = { - "original_name": "iob_gpio", "name": NAME, "version": "0.1", "confs": [ diff --git a/lib/hardware/iob_gpio/software/linux/README.md b/lib/hardware/iob_gpio/software/linux/README.md index 44371fe8f..e0b978e2c 100644 --- a/lib/hardware/iob_gpio/software/linux/README.md +++ b/lib/hardware/iob_gpio/software/linux/README.md @@ -1,3 +1,9 @@ + + # IOb GPIO Linux Kernel Drivers - Structure: - `drivers/`: directory with linux kernel module drivers for iob_gpio diff --git a/lib/hardware/iob_gpio/software/linux/drivers/driver.mk b/lib/hardware/iob_gpio/software/linux/drivers/driver.mk index 676432d33..15f32bea1 100644 --- a/lib/hardware/iob_gpio/software/linux/drivers/driver.mk +++ b/lib/hardware/iob_gpio/software/linux/drivers/driver.mk @@ -1 +1,5 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + iob_gpio-objs := iob_gpio_main.o iob_class/iob_class_utils.o diff --git a/lib/hardware/iob_gpio/software/linux/drivers/iob_gpio_main.c b/lib/hardware/iob_gpio/software/linux/drivers/iob_gpio_main.c index 9dfeb0dd9..aeb5e780c 100644 --- a/lib/hardware/iob_gpio/software/linux/drivers/iob_gpio_main.c +++ b/lib/hardware/iob_gpio/software/linux/drivers/iob_gpio_main.c @@ -1,3 +1,9 @@ +/* + * SPDX-FileCopyrightText: 2024 IObundle + * + * SPDX-License-Identifier: MIT + */ + /* iob_gpio_main.c: driver for iob_gpio * using device platform. No hardcoded hardware address: * 1. load driver: insmod iob_gpio.ko diff --git a/lib/hardware/iob_gpio/software/linux/iob_gpio.dts b/lib/hardware/iob_gpio/software/linux/iob_gpio.dts index eb6ab46b1..367ff6217 100644 --- a/lib/hardware/iob_gpio/software/linux/iob_gpio.dts +++ b/lib/hardware/iob_gpio/software/linux/iob_gpio.dts @@ -1,4 +1,7 @@ -// SPDX-License-Identifier: (GPL-2.0 OR MIT) +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + /* Copyright (c) 2024 IObundle */ /dts-v1/; diff --git a/lib/hardware/iob_gpio/software/linux/user/Makefile b/lib/hardware/iob_gpio/software/linux/user/Makefile index 259cc9dfe..ab9c37399 100644 --- a/lib/hardware/iob_gpio/software/linux/user/Makefile +++ b/lib/hardware/iob_gpio/software/linux/user/Makefile @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + SRC = $(wildcard *.c) HDR += iob_gpio.h FLAGS = -Wall -Werror -O2 diff --git a/lib/hardware/iob_gpio/software/linux/user/iob_gpio_user.c b/lib/hardware/iob_gpio/software/linux/user/iob_gpio_user.c index 087162687..cd73c968b 100644 --- a/lib/hardware/iob_gpio/software/linux/user/iob_gpio_user.c +++ b/lib/hardware/iob_gpio/software/linux/user/iob_gpio_user.c @@ -1,3 +1,9 @@ +/* + * SPDX-FileCopyrightText: 2024 IObundle + * + * SPDX-License-Identifier: MIT + */ + #include #include #include diff --git a/lib/hardware/iob_gpio/software/src/iob-gpio.c b/lib/hardware/iob_gpio/software/src/iob-gpio.c index 1532e9962..a4f2f7173 100644 --- a/lib/hardware/iob_gpio/software/src/iob-gpio.c +++ b/lib/hardware/iob_gpio/software/src/iob-gpio.c @@ -1,3 +1,9 @@ +/* + * SPDX-FileCopyrightText: 2024 IObundle + * + * SPDX-License-Identifier: MIT + */ + #include "iob-gpio.h" // GPIO functions diff --git a/lib/hardware/iob_gpio/software/src/iob-gpio.h b/lib/hardware/iob_gpio/software/src/iob-gpio.h index cf6d7c3ee..153632919 100644 --- a/lib/hardware/iob_gpio/software/src/iob-gpio.h +++ b/lib/hardware/iob_gpio/software/src/iob-gpio.h @@ -1,3 +1,9 @@ +/* + * SPDX-FileCopyrightText: 2024 IObundle + * + * SPDX-License-Identifier: MIT + */ + #include #include "iob_gpio_csrs.h" diff --git a/lib/hardware/iob_gpio/software/src/iob_gpio_swreg_pc_emul.c b/lib/hardware/iob_gpio/software/src/iob_gpio_swreg_pc_emul.c index be6408ec9..641641b89 100644 --- a/lib/hardware/iob_gpio/software/src/iob_gpio_swreg_pc_emul.c +++ b/lib/hardware/iob_gpio/software/src/iob_gpio_swreg_pc_emul.c @@ -1,3 +1,9 @@ +/* + * SPDX-FileCopyrightText: 2024 IObundle + * + * SPDX-License-Identifier: MIT + */ + /* PC Emulation of GPIO peripheral */ #include diff --git a/lib/hardware/iob_iobuf/iob_iobuf.py b/lib/hardware/iob_iobuf/iob_iobuf.py index ec5809bdf..85904c9ab 100644 --- a/lib/hardware/iob_iobuf/iob_iobuf.py +++ b/lib/hardware/iob_iobuf/iob_iobuf.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_iobuf", - "name": "iob_iobuf", "version": "0.1", "ports": [ { diff --git a/lib/hardware/iob_picorv32/hardware/src/iob_picorv32.v b/lib/hardware/iob_picorv32/hardware/src/iob_picorv32.v index 5cdf9d1dd..4dcb19de8 100644 --- a/lib/hardware/iob_picorv32/hardware/src/iob_picorv32.v +++ b/lib/hardware/iob_picorv32/hardware/src/iob_picorv32.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1 ns / 1 ps `include "iob_picorv32_conf.vh" diff --git a/lib/hardware/iob_picorv32/hardware/src/picorv32.v b/lib/hardware/iob_picorv32/hardware/src/picorv32.v index f4b437bf0..b13d9a1ad 100644 --- a/lib/hardware/iob_picorv32/hardware/src/picorv32.v +++ b/lib/hardware/iob_picorv32/hardware/src/picorv32.v @@ -1,20 +1,10 @@ +// SPDX-FileCopyrightText: 2015 Clifford Wolf +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + /* * PicoRV32 -- A Small RISC-V (RV32I) Processor Core - * - * Copyright (C) 2015 Clifford Wolf - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * */ `timescale 1 ns / 1 ps @@ -584,20 +574,15 @@ module picorv32 #( always @(posedge clk) begin if (resetn && !trap) begin - if (mem_do_prefetch || mem_do_rinst || mem_do_rdata) - `ASSERT_(!mem_do_wdata); + if (mem_do_prefetch || mem_do_rinst || mem_do_rdata) `ASSERT_(!mem_do_wdata); - if (mem_do_prefetch || mem_do_rinst) - `ASSERT_(!mem_do_rdata); + if (mem_do_prefetch || mem_do_rinst) `ASSERT_(!mem_do_rdata); - if (mem_do_rdata) - `ASSERT_(!mem_do_prefetch && !mem_do_rinst); + if (mem_do_rdata) `ASSERT_(!mem_do_prefetch && !mem_do_rinst); - if (mem_do_wdata) - `ASSERT_(!(mem_do_prefetch || mem_do_rinst || mem_do_rdata)); + if (mem_do_wdata) `ASSERT_(!(mem_do_prefetch || mem_do_rinst || mem_do_rdata)); - if (mem_state == 2 || mem_state == 3) - `ASSERT_(mem_valid || mem_do_prefetch); + if (mem_state == 2 || mem_state == 3) `ASSERT_(mem_valid || mem_do_prefetch); end end @@ -1540,11 +1525,15 @@ module picorv32 #( if (latched_branch) begin current_pc = latched_store ? (latched_stalu ? alu_out_q : reg_out) & ~1 : reg_next_pc; - `DEBUG_($display("ST_RD: %2d 0x%08x, BRANCH 0x%08x", latched_rd, - reg_pc + (latched_compr ? 2 : 4), current_pc)); + `DEBUG_($display( + "ST_RD: %2d 0x%08x, BRANCH 0x%08x", + latched_rd, + reg_pc + (latched_compr ? 2 : 4), + current_pc + )); end else if (latched_store && !latched_branch) begin - `DEBUG_($display("ST_RD: %2d 0x%08x", latched_rd, - latched_stalu ? alu_out_q : reg_out)); + `DEBUG_($display( + "ST_RD: %2d 0x%08x", latched_rd, latched_stalu ? alu_out_q : reg_out)); end else if (ENABLE_IRQ && irq_state[0]) begin current_pc = PROGADDR_IRQ; irq_active <= 1; diff --git a/lib/hardware/iob_picorv32/iob_picorv32.py b/lib/hardware/iob_picorv32/iob_picorv32.py index 55d12fab1..1830190a8 100644 --- a/lib/hardware/iob_picorv32/iob_picorv32.py +++ b/lib/hardware/iob_picorv32/iob_picorv32.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_picorv32", - "name": "iob_picorv32", "version": "0.1", "generate_hw": False, "confs": [ diff --git a/lib/hardware/iob_regfileif/README.md b/lib/hardware/iob_regfileif/README.md index cb41c48c5..1c1edf070 100644 --- a/lib/hardware/iob_regfileif/README.md +++ b/lib/hardware/iob_regfileif/README.md @@ -1,3 +1,9 @@ + + # README # # iob-regfileif diff --git a/lib/hardware/iob_regfileif/config.mk b/lib/hardware/iob_regfileif/config.mk index 05e524d4e..e9295d88d 100644 --- a/lib/hardware/iob_regfileif/config.mk +++ b/lib/hardware/iob_regfileif/config.mk @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + TOP_MODULE=iob_regfileif #PATHS diff --git a/lib/hardware/iob_regfileif/hardware/hardware.mk b/lib/hardware/iob_regfileif/hardware/hardware.mk index 81530d569..59ee8e52e 100755 --- a/lib/hardware/iob_regfileif/hardware/hardware.mk +++ b/lib/hardware/iob_regfileif/hardware/hardware.mk @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + ifeq ($(filter REGFILEIF, $(HW_MODULES)),) include $(REGFILEIF_DIR)/config.mk diff --git a/lib/hardware/iob_regfileif/hardware/include/inst.vh b/lib/hardware/iob_regfileif/hardware/include/inst.vh index 7ec7a8be9..22b949397 100644 --- a/lib/hardware/iob_regfileif/hardware/include/inst.vh +++ b/lib/hardware/iob_regfileif/hardware/include/inst.vh @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + // // /**/ // diff --git a/lib/hardware/iob_regfileif/hardware/include/pio.vh b/lib/hardware/iob_regfileif/hardware/include/pio.vh index fcff27c6a..2e3ef7361 100644 --- a/lib/hardware/iob_regfileif/hardware/include/pio.vh +++ b/lib/hardware/iob_regfileif/hardware/include/pio.vh @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + // REGFILEIF input /**/_valid, input [`iob_regfileif_csrs_ADDR_W-1:0] /**/_address, diff --git a/lib/hardware/iob_regfileif/iob_regfileif.py b/lib/hardware/iob_regfileif/iob_regfileif.py index 77711927c..ce061aee5 100755 --- a/lib/hardware/iob_regfileif/iob_regfileif.py +++ b/lib/hardware/iob_regfileif/iob_regfileif.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + import copy import json @@ -124,8 +128,6 @@ def setup(py_params_dict): confs = py_params_dict["instantiator"]["confs"] attributes_dict = { - "original_name": "iob_regfileif", - "name": "iob_regfileif", "version": "0.1", } attributes_dict |= { diff --git a/lib/hardware/iob_regfileif/nativebridgeif_wrappper/hardware/src/iob_nativebridgeif.v b/lib/hardware/iob_regfileif/nativebridgeif_wrappper/hardware/src/iob_nativebridgeif.v index 749d16bc1..9a9ef2df9 100644 --- a/lib/hardware/iob_regfileif/nativebridgeif_wrappper/hardware/src/iob_nativebridgeif.v +++ b/lib/hardware/iob_regfileif/nativebridgeif_wrappper/hardware/src/iob_nativebridgeif.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1ns/1ps `include "iob_lib.vh" `include "iob_nativebridgeif_conf.vh" diff --git a/lib/hardware/iob_regfileif/nativebridgeif_wrappper/iob_nativebridgeif_setup.py b/lib/hardware/iob_regfileif/nativebridgeif_wrappper/iob_nativebridgeif_setup.py index f9e60e9e4..b4ebacc9f 100755 --- a/lib/hardware/iob_regfileif/nativebridgeif_wrappper/iob_nativebridgeif_setup.py +++ b/lib/hardware/iob_regfileif/nativebridgeif_wrappper/iob_nativebridgeif_setup.py @@ -1,5 +1,9 @@ #!/usr/bin/env python3 +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + import os, sys sys.path.insert(0, os.getcwd() + "/submodules/LIB/scripts") diff --git a/lib/hardware/iob_regfileif/software/python/iobnativebridge.py b/lib/hardware/iob_regfileif/software/python/iobnativebridge.py index 4fad906fb..a65541e98 100755 --- a/lib/hardware/iob_regfileif/software/python/iobnativebridge.py +++ b/lib/hardware/iob_regfileif/software/python/iobnativebridge.py @@ -1,4 +1,9 @@ #!/usr/bin/env python3 + +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + # # Create IOBNATIVEBRIDGEIF in directory specified # The IOBNATIVEBRIDGEIF is a peripheral that only contains wires. It bridges the peripheral bus with an external interface. diff --git a/lib/hardware/iob_regfileif/software/python/mkregsregfileif.py b/lib/hardware/iob_regfileif/software/python/mkregsregfileif.py index a092faedf..8b0fbd343 100755 --- a/lib/hardware/iob_regfileif/software/python/mkregsregfileif.py +++ b/lib/hardware/iob_regfileif/software/python/mkregsregfileif.py @@ -1,4 +1,9 @@ #!/usr/bin/python3 + +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + # # Build configured REGFILEIF/NATIVEBRIDGEIF registers and signals # diff --git a/lib/hardware/iob_system/README.md b/lib/hardware/iob_system/README.md index 8e1a7fd5f..4169f08c0 100644 --- a/lib/hardware/iob_system/README.md +++ b/lib/hardware/iob_system/README.md @@ -1,3 +1,9 @@ + + # IOb-SoC IOb-SoC is a System-on-Chip (SoC) template comprising an open-source RISC-V diff --git a/lib/hardware/iob_system/document/doc_build.mk b/lib/hardware/iob_system/document/doc_build.mk index e627a8e7b..16bafba69 100644 --- a/lib/hardware/iob_system/document/doc_build.mk +++ b/lib/hardware/iob_system/document/doc_build.mk @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + # (c) 2022-Present IObundle, Lda, all rights reserved # # This makefile segment is used at build-time in $(BUILD_DIR)/doc/Makefile diff --git a/lib/hardware/iob_system/document/figures/bd.odg.license b/lib/hardware/iob_system/document/figures/bd.odg.license new file mode 100644 index 000000000..9a5279e71 --- /dev/null +++ b/lib/hardware/iob_system/document/figures/bd.odg.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: 2024 IObundle + +SPDX-License-Identifier: MIT diff --git a/lib/hardware/iob_system/document/figures/bd2.odg.license b/lib/hardware/iob_system/document/figures/bd2.odg.license new file mode 100644 index 000000000..9a5279e71 --- /dev/null +++ b/lib/hardware/iob_system/document/figures/bd2.odg.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: 2024 IObundle + +SPDX-License-Identifier: MIT diff --git a/lib/hardware/iob_system/document/figures/csr_gen.odg.license b/lib/hardware/iob_system/document/figures/csr_gen.odg.license new file mode 100644 index 000000000..9a5279e71 --- /dev/null +++ b/lib/hardware/iob_system/document/figures/csr_gen.odg.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: 2024 IObundle + +SPDX-License-Identifier: MIT diff --git a/lib/hardware/iob_system/document/figures/inst.odg.license b/lib/hardware/iob_system/document/figures/inst.odg.license new file mode 100644 index 000000000..9a5279e71 --- /dev/null +++ b/lib/hardware/iob_system/document/figures/inst.odg.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: 2024 IObundle + +SPDX-License-Identifier: MIT diff --git a/lib/hardware/iob_system/document/figures/symb.odg.license b/lib/hardware/iob_system/document/figures/symb.odg.license new file mode 100644 index 000000000..9a5279e71 --- /dev/null +++ b/lib/hardware/iob_system/document/figures/symb.odg.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: 2024 IObundle + +SPDX-License-Identifier: MIT diff --git a/lib/hardware/iob_system/document/figures/tbbd.odg.license b/lib/hardware/iob_system/document/figures/tbbd.odg.license new file mode 100644 index 000000000..9a5279e71 --- /dev/null +++ b/lib/hardware/iob_system/document/figures/tbbd.odg.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: 2024 IObundle + +SPDX-License-Identifier: MIT diff --git a/lib/hardware/iob_system/document/tsrc/bd_desc.tex b/lib/hardware/iob_system/document/tsrc/bd_desc.tex index 55e8badfd..ec0300cc7 100644 --- a/lib/hardware/iob_system/document/tsrc/bd_desc.tex +++ b/lib/hardware/iob_system/document/tsrc/bd_desc.tex @@ -1 +1,5 @@ +% SPDX-FileCopyrightText: 2024 IObundle +% +% SPDX-License-Identifier: MIT + \item Place block diagram description here diff --git a/lib/hardware/iob_system/document/tsrc/benefits.tex b/lib/hardware/iob_system/document/tsrc/benefits.tex index 892f5fbac..58173aac4 100644 --- a/lib/hardware/iob_system/document/tsrc/benefits.tex +++ b/lib/hardware/iob_system/document/tsrc/benefits.tex @@ -1,3 +1,7 @@ +% SPDX-FileCopyrightText: 2024 IObundle +% +% SPDX-License-Identifier: MIT + \begin{itemize} \itemsep-0.5em \item Compact and easy to integrate hardware and software implementation diff --git a/lib/hardware/iob_system/document/tsrc/deliverables.tex b/lib/hardware/iob_system/document/tsrc/deliverables.tex index 618b0a122..4540e9fe9 100644 --- a/lib/hardware/iob_system/document/tsrc/deliverables.tex +++ b/lib/hardware/iob_system/document/tsrc/deliverables.tex @@ -1,3 +1,7 @@ +% SPDX-FileCopyrightText: 2024 IObundle +% +% SPDX-License-Identifier: MIT + \begin{itemize} \itemsep-0.5em \item FPGA synthesized netlist or Verilog source code, and respective diff --git a/lib/hardware/iob_system/document/tsrc/features.tex b/lib/hardware/iob_system/document/tsrc/features.tex index 84b0e481c..fa77bdaee 100644 --- a/lib/hardware/iob_system/document/tsrc/features.tex +++ b/lib/hardware/iob_system/document/tsrc/features.tex @@ -1,3 +1,7 @@ +% SPDX-FileCopyrightText: 2024 IObundle +% +% SPDX-License-Identifier: MIT + \begin{itemize} \item 32-bit RISC-V control CPU \item Support for Integer (I), atomic (A), and multiply/divide extensions (M) diff --git a/lib/hardware/iob_system/document/tsrc/intro.tex b/lib/hardware/iob_system/document/tsrc/intro.tex index d0aead711..12fc6827d 100644 --- a/lib/hardware/iob_system/document/tsrc/intro.tex +++ b/lib/hardware/iob_system/document/tsrc/intro.tex @@ -1,3 +1,7 @@ +% SPDX-FileCopyrightText: 2024 IObundle +% +% SPDX-License-Identifier: MIT + IOb-SoC is a RISC-V-based System-on-Chip Platform written in Verilog, which users can download for free, modify, simulate and implement in FPGA. It supports stand-alone and boot loading modes. IOb-SoC can use an internal RAM or an diff --git a/lib/hardware/iob_system/document/tsrc/presentation.tex b/lib/hardware/iob_system/document/tsrc/presentation.tex index 89f2aa6d2..48538c321 100644 --- a/lib/hardware/iob_system/document/tsrc/presentation.tex +++ b/lib/hardware/iob_system/document/tsrc/presentation.tex @@ -1,3 +1,7 @@ +% SPDX-FileCopyrightText: 2024 IObundle +% +% SPDX-License-Identifier: MIT + \documentclass [xcolor=svgnames, t] {beamer} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} diff --git a/lib/hardware/iob_system/document/tsrc/results.tex b/lib/hardware/iob_system/document/tsrc/results.tex index d003ead48..de0a759fc 100644 --- a/lib/hardware/iob_system/document/tsrc/results.tex +++ b/lib/hardware/iob_system/document/tsrc/results.tex @@ -1 +1,5 @@ +% SPDX-FileCopyrightText: 2024 IObundle +% +% SPDX-License-Identifier: MIT + The results obtained use all the default user configurable parameters, which affect the RAM usage results. diff --git a/lib/hardware/iob_system/document/tsrc/title.tex b/lib/hardware/iob_system/document/tsrc/title.tex index e009810a8..7a9e793db 100644 --- a/lib/hardware/iob_system/document/tsrc/title.tex +++ b/lib/hardware/iob_system/document/tsrc/title.tex @@ -1,2 +1,6 @@ +% SPDX-FileCopyrightText: 2024 IObundle +% +% SPDX-License-Identifier: MIT + \title{IOb-SoC, a RISC-V SoC} \header{IOb-SoC, a RISC-V SoC} diff --git a/lib/hardware/iob_system/document/tsrc/ug_title.tex b/lib/hardware/iob_system/document/tsrc/ug_title.tex index 72d6f9df4..8e72c5c5d 100644 --- a/lib/hardware/iob_system/document/tsrc/ug_title.tex +++ b/lib/hardware/iob_system/document/tsrc/ug_title.tex @@ -1,3 +1,7 @@ +% SPDX-FileCopyrightText: 2024 IObundle +% +% SPDX-License-Identifier: MIT + %replace ipcore-name by the name of your ip core (e.g. IOb-Cache) and description by a brief description (e.g. a Configurable Cache) \title{% diff --git a/lib/hardware/iob_system/hardware/fpga/fpga_build.mk b/lib/hardware/iob_system/hardware/fpga/fpga_build.mk index 1bd479897..d775651dc 100644 --- a/lib/hardware/iob_system/hardware/fpga/fpga_build.mk +++ b/lib/hardware/iob_system/hardware/fpga/fpga_build.mk @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + include auto_fpga_build.mk # Add iob-system software as a build dependency diff --git a/lib/hardware/iob_system/hardware/fpga/quartus/cyclonev_gt_dk/board.tcl b/lib/hardware/iob_system/hardware/fpga/quartus/cyclonev_gt_dk/board.tcl index a78dfaba9..42b49e371 100644 --- a/lib/hardware/iob_system/hardware/fpga/quartus/cyclonev_gt_dk/board.tcl +++ b/lib/hardware/iob_system/hardware/fpga/quartus/cyclonev_gt_dk/board.tcl @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + set FAMILY "Cyclone V" set PART "5CGTFD9E5F35C7" diff --git a/lib/hardware/iob_system/hardware/fpga/quartus/cyclonev_gt_dk/cyclonev_gt_dk.py b/lib/hardware/iob_system/hardware/fpga/quartus/cyclonev_gt_dk/cyclonev_gt_dk.py index f08a53548..7efb04118 100644 --- a/lib/hardware/iob_system/hardware/fpga/quartus/cyclonev_gt_dk/cyclonev_gt_dk.py +++ b/lib/hardware/iob_system/hardware/fpga/quartus/cyclonev_gt_dk/cyclonev_gt_dk.py @@ -1,9 +1,12 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): params = py_params_dict["iob_system_params"] attributes_dict = { - "original_name": "cyclonev_gt_dk", - "name": "cyclonev_gt_dk", "version": "0.1", "confs": [ { @@ -312,7 +315,6 @@ def setup(py_params_dict): "m0_axi_m": "memory_axi", }, "num_slaves": 1, - "num_masters": 1, }, { "core_name": "axi_ram", diff --git a/lib/hardware/iob_system/hardware/fpga/quartus/cyclonev_gt_dk/cyclonev_gt_dk.sdc b/lib/hardware/iob_system/hardware/fpga/quartus/cyclonev_gt_dk/cyclonev_gt_dk.sdc index 30e0fd454..94cc2920e 100644 --- a/lib/hardware/iob_system/hardware/fpga/quartus/cyclonev_gt_dk/cyclonev_gt_dk.sdc +++ b/lib/hardware/iob_system/hardware/fpga/quartus/cyclonev_gt_dk/cyclonev_gt_dk.sdc @@ -1,2 +1,6 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + create_clock -name "clk" -period 20.0 [get_ports {clk_i}] #create_clock -period 40 [get_ports {enet_rx_clk_i}] diff --git a/lib/hardware/iob_system/hardware/fpga/quartus/quartus.sdc b/lib/hardware/iob_system/hardware/fpga/quartus/quartus.sdc index c59d7643f..a88bc8a67 100644 --- a/lib/hardware/iob_system/hardware/fpga/quartus/quartus.sdc +++ b/lib/hardware/iob_system/hardware/fpga/quartus/quartus.sdc @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + derive_pll_clocks derive_clock_uncertainty diff --git a/lib/hardware/iob_system/hardware/fpga/quartus/quartus_postmap.tcl b/lib/hardware/iob_system/hardware/fpga/quartus/quartus_postmap.tcl index e5ac0b9bc..ca6f22139 100644 --- a/lib/hardware/iob_system/hardware/fpga/quartus/quartus_postmap.tcl +++ b/lib/hardware/iob_system/hardware/fpga/quartus/quartus_postmap.tcl @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + if { $USE_EXTMEM == "1" } { source "db/ip/alt_ddr3/submodules/alt_ddr3_mem_if_ddr3_emif_0_p0_parameters.tcl" diff --git a/lib/hardware/iob_system/hardware/fpga/src/fpga.sdc b/lib/hardware/iob_system/hardware/fpga/src/fpga.sdc index 9c75c7ec2..7ad1cb2b5 100644 --- a/lib/hardware/iob_system/hardware/fpga/src/fpga.sdc +++ b/lib/hardware/iob_system/hardware/fpga/src/fpga.sdc @@ -1 +1,6 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + #no project specific constraints diff --git a/lib/hardware/iob_system/hardware/fpga/vivado/aes_ku040_db_g/aes_ku040_db_g.py b/lib/hardware/iob_system/hardware/fpga/vivado/aes_ku040_db_g/aes_ku040_db_g.py index 3c909816a..842097076 100644 --- a/lib/hardware/iob_system/hardware/fpga/vivado/aes_ku040_db_g/aes_ku040_db_g.py +++ b/lib/hardware/iob_system/hardware/fpga/vivado/aes_ku040_db_g/aes_ku040_db_g.py @@ -1,10 +1,13 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): # user-passed parameters params = py_params_dict["iob_system_params"] attributes_dict = { - "original_name": "aes_ku040_db_g", - "name": "aes_ku040_db_g", "version": "0.1", # # Configuration diff --git a/lib/hardware/iob_system/hardware/fpga/vivado/aes_ku040_db_g/aes_ku040_db_g.sdc b/lib/hardware/iob_system/hardware/fpga/vivado/aes_ku040_db_g/aes_ku040_db_g.sdc index f2776a9e0..a2783eceb 100644 --- a/lib/hardware/iob_system/hardware/fpga/vivado/aes_ku040_db_g/aes_ku040_db_g.sdc +++ b/lib/hardware/iob_system/hardware/fpga/vivado/aes_ku040_db_g/aes_ku040_db_g.sdc @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + ## System Clock create_clock -name "clk" -period 4.0 [get_ports {c0_sys_clk_clk_p_i}] diff --git a/lib/hardware/iob_system/hardware/fpga/vivado/basys3/basys3.py b/lib/hardware/iob_system/hardware/fpga/vivado/basys3/basys3.py index 5b534b32f..1d16914d6 100644 --- a/lib/hardware/iob_system/hardware/fpga/vivado/basys3/basys3.py +++ b/lib/hardware/iob_system/hardware/fpga/vivado/basys3/basys3.py @@ -1,10 +1,13 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): # user-passed parameters params = py_params_dict["iob_system_params"] attributes_dict = { - "original_name": "basys3", - "name": "basys3", "version": "0.1", # # Configuration diff --git a/lib/hardware/iob_system/hardware/fpga/vivado/basys3/basys3.sdc b/lib/hardware/iob_system/hardware/fpga/vivado/basys3/basys3.sdc index 79d781aab..eb211c9cf 100644 --- a/lib/hardware/iob_system/hardware/fpga/vivado/basys3/basys3.sdc +++ b/lib/hardware/iob_system/hardware/fpga/vivado/basys3/basys3.sdc @@ -1,23 +1,6 @@ -# ---------------------------------------------------------------------------- -# _____ -# / \ -# /____ \____ -# / \===\ \==/ -# /___\===\___\/ AVNET Design Resource Center -# \======/ www.em.avnet.com/drc -# \====/ -# ---------------------------------------------------------------------------- +# SPDX-FileCopyrightText: 2024 IObundle # -# Disclaimer: -# Avnet, Inc. makes no warranty for the use of this code or design. -# This code is provided "As Is". Avnet, Inc assumes no responsibility for -# any errors, which may appear in this code, nor does it make a commitment -# to update the information contained herein. Avnet, Inc specifically -# disclaims any implied warranties of fitness for a particular purpose. -# Copyright(c) 2009 Avnet, Inc. -# All rights reserved. -# -# ---------------------------------------------------------------------------- +# SPDX-License-Identifier: MIT ## System Clock set_property PACKAGE_PIN W5 [get_ports clk_i] diff --git a/lib/hardware/iob_system/hardware/fpga/vivado/vivado.sdc b/lib/hardware/iob_system/hardware/fpga/vivado/vivado.sdc index 30fd3a2e0..c3dc03967 100644 --- a/lib/hardware/iob_system/hardware/fpga/vivado/vivado.sdc +++ b/lib/hardware/iob_system/hardware/fpga/vivado/vivado.sdc @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + ## Synchronizers #set_property ASYNC_REG TRUE [get_cells -hier {*iob_r_data_o*[*]}] #set_property ASYNC_REG TRUE [get_cells -hier {*iob_rn_data_o*[*]}] diff --git a/lib/hardware/iob_system/hardware/fpga/vivado/vivado_premap.tcl b/lib/hardware/iob_system/hardware/fpga/vivado/vivado_premap.tcl index 7a7785712..3d7086b81 100644 --- a/lib/hardware/iob_system/hardware/fpga/vivado/vivado_premap.tcl +++ b/lib/hardware/iob_system/hardware/fpga/vivado/vivado_premap.tcl @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + if {$N_INTERCONNECT_SLAVES eq ""} { set N_INTERCONNECT_SLAVES 1 ; # Default value when not provided } diff --git a/lib/hardware/iob_system/hardware/modules/iob_system_cache_system/iob_system_cache_system.py b/lib/hardware/iob_system/hardware/modules/iob_system_cache_system/iob_system_cache_system.py index 6947ae3c3..149e93ad4 100644 --- a/lib/hardware/iob_system/hardware/modules/iob_system_cache_system/iob_system_cache_system.py +++ b/lib/hardware/iob_system/hardware/modules/iob_system_cache_system/iob_system_cache_system.py @@ -1,10 +1,13 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): ADDR_W = py_params_dict["addr_w"] if "addr_w" in py_params_dict else 32 DATA_W = py_params_dict["data_w"] if "data_w" in py_params_dict else 32 MEM_ADDR_W = py_params_dict["mem_addr_w"] if "mem_addr_w" in py_params_dict else 32 attributes_dict = { - "original_name": "iob_system_cache_system", - "name": "iob_system_cache_system", "version": "0.1", "confs": [ { diff --git a/lib/hardware/iob_system/hardware/modules/iob_system_mwrap/iob_system_mwrap.py b/lib/hardware/iob_system/hardware/modules/iob_system_mwrap/iob_system_mwrap.py index d36b38f6c..b48513e58 100644 --- a/lib/hardware/iob_system/hardware/modules/iob_system_mwrap/iob_system_mwrap.py +++ b/lib/hardware/iob_system/hardware/modules/iob_system_mwrap/iob_system_mwrap.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + import copy import iob_system @@ -9,7 +13,6 @@ def setup(py_params_dict): iob_system_attr = iob_system.setup(params) attributes_dict = { - "original_name": "iob_system_mwrap", "name": params["name"] + "_mwrap", "version": "0.1", "confs": [ diff --git a/lib/hardware/iob_system/hardware/modules/iob_system_sim_wrapper/iob_system_sim_wrapper.py b/lib/hardware/iob_system/hardware/modules/iob_system_sim_wrapper/iob_system_sim_wrapper.py index 597bac82f..9d62d9dc2 100644 --- a/lib/hardware/iob_system/hardware/modules/iob_system_sim_wrapper/iob_system_sim_wrapper.py +++ b/lib/hardware/iob_system/hardware/modules/iob_system_sim_wrapper/iob_system_sim_wrapper.py @@ -1,8 +1,12 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): params = py_params_dict["iob_system_params"] attributes_dict = { - "original_name": "iob_system_sim_wrapper", "name": params["name"] + "_sim_wrapper", "version": "0.1", "confs": [ @@ -228,7 +232,6 @@ def setup(py_params_dict): "m0_axi_m": "memory_axi", }, "num_slaves": 1, - "num_masters": 1, }, { "core_name": "axi_ram", diff --git a/lib/hardware/iob_system/hardware/simulation/sim_build.mk b/lib/hardware/iob_system/hardware/simulation/sim_build.mk index 36ee7630a..0549141a1 100644 --- a/lib/hardware/iob_system/hardware/simulation/sim_build.mk +++ b/lib/hardware/iob_system/hardware/simulation/sim_build.mk @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + include auto_sim_build.mk # Add iob-system software as a build dependency diff --git a/lib/hardware/iob_system/hardware/simulation/src/iob_system_tb.cpp b/lib/hardware/iob_system/hardware/simulation/src/iob_system_tb.cpp index e4c02c35c..a43733422 100644 --- a/lib/hardware/iob_system/hardware/simulation/src/iob_system_tb.cpp +++ b/lib/hardware/iob_system/hardware/simulation/src/iob_system_tb.cpp @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + #include #include #include diff --git a/lib/hardware/iob_system/hardware/simulation/src/iob_system_tb.v b/lib/hardware/iob_system/hardware/simulation/src/iob_system_tb.v index 1c03a6061..a58eb6036 100644 --- a/lib/hardware/iob_system/hardware/simulation/src/iob_system_tb.v +++ b/lib/hardware/iob_system/hardware/simulation/src/iob_system_tb.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1ns / 1ps `include "bsp.vh" diff --git a/lib/hardware/iob_system/hardware/syn/genus/syn_build.tcl b/lib/hardware/iob_system/hardware/syn/genus/syn_build.tcl index edfea6b65..30b959bf5 100644 --- a/lib/hardware/iob_system/hardware/syn/genus/syn_build.tcl +++ b/lib/hardware/iob_system/hardware/syn/genus/syn_build.tcl @@ -1 +1,5 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + set_db hdl_error_on_latch false \ No newline at end of file diff --git a/lib/hardware/iob_system/hardware/syn/src/bsp.vh b/lib/hardware/iob_system/hardware/syn/src/bsp.vh index 119649af3..e8b97e4a0 100644 --- a/lib/hardware/iob_system/hardware/syn/src/bsp.vh +++ b/lib/hardware/iob_system/hardware/syn/src/bsp.vh @@ -1 +1,6 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + + //empty file for now diff --git a/lib/hardware/iob_system/iob_system.py b/lib/hardware/iob_system/iob_system.py index bc4fb7563..021532c7d 100755 --- a/lib/hardware/iob_system/iob_system.py +++ b/lib/hardware/iob_system/iob_system.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + import sys import os @@ -24,7 +28,6 @@ def setup(py_params_dict): update_params(params, py_params_dict) attributes_dict = { - "original_name": "iob_system", "name": params["name"], "version": "0.7", "is_system": True, @@ -335,6 +338,7 @@ def setup(py_params_dict): "AXI_ID_W": "AXI_ID_W", "AXI_ADDR_W": params["addr_w"], "AXI_DATA_W": "AXI_DATA_W", + "MEM_ADDR_W": "AXI_ADDR_W", }, "connect": { "clk_i": "clk", diff --git a/lib/hardware/iob_system/scripts/iob_system_utils.py b/lib/hardware/iob_system/scripts/iob_system_utils.py index 4cec49325..85de01473 100644 --- a/lib/hardware/iob_system/scripts/iob_system_utils.py +++ b/lib/hardware/iob_system/scripts/iob_system_utils.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + import os import sys @@ -42,11 +46,11 @@ def iob_system_scripts(attributes_dict, params, py_params): def handle_system_overrides(attributes_dict, py_params): - """Override/append attributes given in `system_overrides` python parameter (usually by child core). + """Override/append attributes given in `system_attributes` python parameter (usually by child core). :param dict attributes_dict: iob_system attributes - :param dict py_params: Dictionary containing `system_overrides` python parameter + :param dict py_params: Dictionary containing `system_attributes` python parameter """ - child_attributes = py_params.get("system_overrides") + child_attributes = py_params.get("system_attributes") if not child_attributes: return @@ -69,6 +73,11 @@ def handle_system_overrides(attributes_dict, py_params): identifier = "name" if child_attribute_name in ["blocks", "sw_modules"]: identifier = "instance_name" + elif child_attribute_name in ["board_list", "ignore_snippets"]: + # Elements in list do not have identifier, so just append them to parent list + for child_obj in child_value: + attributes_dict[child_attribute_name].append(child_obj) + continue # Process each object from list for child_obj in child_value: diff --git a/lib/hardware/iob_system/software/src/iob_system_firmware.S b/lib/hardware/iob_system/software/src/iob_system_firmware.S index 08a08e457..c7438f46c 100644 --- a/lib/hardware/iob_system/software/src/iob_system_firmware.S +++ b/lib/hardware/iob_system/software/src/iob_system_firmware.S @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + #include "iob_system_conf.h" #include "iob_system_periphs.h" #include "iob_system_system.h" diff --git a/lib/hardware/iob_system/software/src/iob_system_firmware.c b/lib/hardware/iob_system/software/src/iob_system_firmware.c index 3a439aaf3..222a2765e 100644 --- a/lib/hardware/iob_system/software/src/iob_system_firmware.c +++ b/lib/hardware/iob_system/software/src/iob_system_firmware.c @@ -1,3 +1,9 @@ +/* + * SPDX-FileCopyrightText: 2024 IObundle + * + * SPDX-License-Identifier: MIT + */ + #include "bsp.h" #include "iob_system_conf.h" #include "iob_system_periphs.h" diff --git a/lib/hardware/iob_system/software/src/iob_system_firmware.lds b/lib/hardware/iob_system/software/src/iob_system_firmware.lds index 66b433d02..c798abfc5 100644 --- a/lib/hardware/iob_system/software/src/iob_system_firmware.lds +++ b/lib/hardware/iob_system/software/src/iob_system_firmware.lds @@ -1,3 +1,9 @@ +/* + * SPDX-FileCopyrightText: 2024 IObundle + * + * SPDX-License-Identifier: MIT + */ + SECTIONS { /* Program code */ INCLUDE auto_iob_system_firmware.lds diff --git a/lib/hardware/iob_system/software/src/iob_system_system.h b/lib/hardware/iob_system/software/src/iob_system_system.h index f680a0b05..798a87749 100644 --- a/lib/hardware/iob_system/software/src/iob_system_system.h +++ b/lib/hardware/iob_system/software/src/iob_system_system.h @@ -1,3 +1,9 @@ +/* + * SPDX-FileCopyrightText: 2024 IObundle + * + * SPDX-License-Identifier: MIT + */ + #define B_BIT 30 // Bootrom selection bit #define P_BIT 31 // Peripheral bus selection bit diff --git a/lib/hardware/iob_system/software/sw_build.mk b/lib/hardware/iob_system/software/sw_build.mk index d6e81cb39..e3f12fb7a 100644 --- a/lib/hardware/iob_system/software/sw_build.mk +++ b/lib/hardware/iob_system/software/sw_build.mk @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + ######################################### # Embedded targets # ######################################### diff --git a/lib/hardware/iob_system/submodules/BOOTROM/iob_bootrom.py b/lib/hardware/iob_system/submodules/BOOTROM/iob_bootrom.py index d7f0166ad..6cecf449e 100644 --- a/lib/hardware/iob_system/submodules/BOOTROM/iob_bootrom.py +++ b/lib/hardware/iob_system/submodules/BOOTROM/iob_bootrom.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + import os import sys import shutil @@ -10,8 +14,6 @@ def setup(py_params_dict): ) attributes_dict = { - "original_name": "iob_bootrom", - "name": "iob_bootrom", "version": VERSION, "confs": [ { diff --git a/lib/hardware/iob_system/submodules/BOOTROM/software_templates/src/iob_system_boot.S b/lib/hardware/iob_system/submodules/BOOTROM/software_templates/src/iob_system_boot.S index 28fecfa35..4f1c25486 100644 --- a/lib/hardware/iob_system/submodules/BOOTROM/software_templates/src/iob_system_boot.S +++ b/lib/hardware/iob_system/submodules/BOOTROM/software_templates/src/iob_system_boot.S @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + #include "iob_system_conf.h" #include "iob_system_periphs.h" #include "iob_system_system.h" diff --git a/lib/hardware/iob_system/submodules/BOOTROM/software_templates/src/iob_system_boot.c b/lib/hardware/iob_system/submodules/BOOTROM/software_templates/src/iob_system_boot.c index 842290fd7..f7283e4bf 100644 --- a/lib/hardware/iob_system/submodules/BOOTROM/software_templates/src/iob_system_boot.c +++ b/lib/hardware/iob_system/submodules/BOOTROM/software_templates/src/iob_system_boot.c @@ -1,3 +1,9 @@ +/* + * SPDX-FileCopyrightText: 2024 IObundle + * + * SPDX-License-Identifier: MIT + */ + #include "bsp.h" #include "iob_system_conf.h" #include "iob_system_periphs.h" diff --git a/lib/hardware/iob_system/submodules/BOOTROM/software_templates/src/iob_system_boot.lds b/lib/hardware/iob_system/submodules/BOOTROM/software_templates/src/iob_system_boot.lds index 036400e46..5a33546ec 100644 --- a/lib/hardware/iob_system/submodules/BOOTROM/software_templates/src/iob_system_boot.lds +++ b/lib/hardware/iob_system/submodules/BOOTROM/software_templates/src/iob_system_boot.lds @@ -1,3 +1,9 @@ +/* + * SPDX-FileCopyrightText: 2024 IObundle + * + * SPDX-License-Identifier: MIT + */ + SECTIONS { /* Program code */ INCLUDE auto_iob_system_boot.lds diff --git a/lib/hardware/iob_system/submodules/BOOTROM/software_templates/src/iob_system_preboot.S b/lib/hardware/iob_system/submodules/BOOTROM/software_templates/src/iob_system_preboot.S index c1569364f..144c2c30e 100644 --- a/lib/hardware/iob_system/submodules/BOOTROM/software_templates/src/iob_system_preboot.S +++ b/lib/hardware/iob_system/submodules/BOOTROM/software_templates/src/iob_system_preboot.S @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + #include "iob_system_conf.h" #include "iob_system_system.h" diff --git a/lib/hardware/iob_system/submodules/BOOTROM/software_templates/src/iob_system_preboot.lds b/lib/hardware/iob_system/submodules/BOOTROM/software_templates/src/iob_system_preboot.lds index 3232907a2..709b6c57b 100644 --- a/lib/hardware/iob_system/submodules/BOOTROM/software_templates/src/iob_system_preboot.lds +++ b/lib/hardware/iob_system/submodules/BOOTROM/software_templates/src/iob_system_preboot.lds @@ -1,3 +1,9 @@ +/* + * SPDX-FileCopyrightText: 2024 IObundle + * + * SPDX-License-Identifier: MIT + */ + SECTIONS { .memory : { . = 0x000000; diff --git a/lib/hardware/iob_system/submodules/VEXRISCV b/lib/hardware/iob_system/submodules/VEXRISCV index 4466e1e60..606637108 160000 --- a/lib/hardware/iob_system/submodules/VEXRISCV +++ b/lib/hardware/iob_system/submodules/VEXRISCV @@ -1 +1 @@ -Subproject commit 4466e1e6042b656c6eeaf6b4bbb6096b30577b04 +Subproject commit 6066371084ce19ce40b00a699681b5fc761bfff2 diff --git a/lib/hardware/iob_timer/hardware/simulation/src/timer_tb.v b/lib/hardware/iob_timer/hardware/simulation/src/timer_tb.v index abe7af21d..34ac61e33 100644 --- a/lib/hardware/iob_timer/hardware/simulation/src/timer_tb.v +++ b/lib/hardware/iob_timer/hardware/simulation/src/timer_tb.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1ns / 1ps `include "iob_timer_csrs_def.vh" diff --git a/lib/hardware/iob_timer/hardware/src/timer_core.v b/lib/hardware/iob_timer/hardware/src/timer_core.v index a020fc910..190acc010 100644 --- a/lib/hardware/iob_timer/hardware/src/timer_core.v +++ b/lib/hardware/iob_timer/hardware/src/timer_core.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1ns / 1ps `include "iob_timer_csrs_def.vh" diff --git a/lib/hardware/iob_timer/hardware/timer_core.py b/lib/hardware/iob_timer/hardware/timer_core.py index d79f1f147..f7f854b32 100644 --- a/lib/hardware/iob_timer/hardware/timer_core.py +++ b/lib/hardware/iob_timer/hardware/timer_core.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "timer_core", - "name": "timer_core", "version": "0.1", "generate_hw": False, "ports": [ diff --git a/lib/hardware/iob_timer/iob_timer.py b/lib/hardware/iob_timer/iob_timer.py index b16556fd8..4d10d1f15 100755 --- a/lib/hardware/iob_timer/iob_timer.py +++ b/lib/hardware/iob_timer/iob_timer.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_timer", - "name": "iob_timer", "version": "0.1", "confs": [ { diff --git a/lib/hardware/iob_timer/software/example_firmware.c b/lib/hardware/iob_timer/software/example_firmware.c index 4e54c4dc3..37d0d7121 100644 --- a/lib/hardware/iob_timer/software/example_firmware.c +++ b/lib/hardware/iob_timer/software/example_firmware.c @@ -1,3 +1,9 @@ +/* + * SPDX-FileCopyrightText: 2024 IObundle + * + * SPDX-License-Identifier: MIT + */ + #include "bsp.h" #include "iob_timer.h" #include "iob_uart.h" diff --git a/lib/hardware/iob_timer/software/linux/README.md b/lib/hardware/iob_timer/software/linux/README.md index bdd1ede15..756586ab9 100644 --- a/lib/hardware/iob_timer/software/linux/README.md +++ b/lib/hardware/iob_timer/software/linux/README.md @@ -1,3 +1,9 @@ + + # IOb Timer Linux Kernel Drivers - Structure: - `drivers/`: directory with linux kernel module drivers for iob_timer diff --git a/lib/hardware/iob_timer/software/linux/drivers/driver.mk b/lib/hardware/iob_timer/software/linux/drivers/driver.mk index a6ffb45c5..f4419cf85 100644 --- a/lib/hardware/iob_timer/software/linux/drivers/driver.mk +++ b/lib/hardware/iob_timer/software/linux/drivers/driver.mk @@ -1 +1,5 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + iob_timer-objs := iob_timer_main.o iob_class/iob_class_utils.o diff --git a/lib/hardware/iob_timer/software/linux/drivers/iob_timer_main.c b/lib/hardware/iob_timer/software/linux/drivers/iob_timer_main.c index cfe67cecf..2071fb0d2 100644 --- a/lib/hardware/iob_timer/software/linux/drivers/iob_timer_main.c +++ b/lib/hardware/iob_timer/software/linux/drivers/iob_timer_main.c @@ -1,3 +1,9 @@ +/* + * SPDX-FileCopyrightText: 2024 IObundle + * + * SPDX-License-Identifier: MIT + */ + /* iob_timer_main.c: driver for iob_timer * using device platform. No hardcoded hardware address: * 1. load driver: insmod iob_timer.ko diff --git a/lib/hardware/iob_timer/software/linux/iob_timer.dts b/lib/hardware/iob_timer/software/linux/iob_timer.dts index d2a709208..b43c8c4e6 100644 --- a/lib/hardware/iob_timer/software/linux/iob_timer.dts +++ b/lib/hardware/iob_timer/software/linux/iob_timer.dts @@ -1,4 +1,7 @@ -// SPDX-License-Identifier: (GPL-2.0 OR MIT) +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + /* Copyright (c) 2024 IObundle */ /dts-v1/; diff --git a/lib/hardware/iob_timer/software/linux/user/Makefile b/lib/hardware/iob_timer/software/linux/user/Makefile index cbce7c9df..3e9654961 100644 --- a/lib/hardware/iob_timer/software/linux/user/Makefile +++ b/lib/hardware/iob_timer/software/linux/user/Makefile @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + SRC = $(wildcard *.c) HDR += iob_timer.h FLAGS = -Wall -Werror -O2 diff --git a/lib/hardware/iob_timer/software/linux/user/iob_timer_user.c b/lib/hardware/iob_timer/software/linux/user/iob_timer_user.c index 936f1c922..a136347fa 100644 --- a/lib/hardware/iob_timer/software/linux/user/iob_timer_user.c +++ b/lib/hardware/iob_timer/software/linux/user/iob_timer_user.c @@ -1,3 +1,9 @@ +/* + * SPDX-FileCopyrightText: 2024 IObundle + * + * SPDX-License-Identifier: MIT + */ + #include #include #include diff --git a/lib/hardware/iob_timer/software/src/iob_timer.c b/lib/hardware/iob_timer/software/src/iob_timer.c index 41217d9bf..c73c8d73b 100644 --- a/lib/hardware/iob_timer/software/src/iob_timer.c +++ b/lib/hardware/iob_timer/software/src/iob_timer.c @@ -1,3 +1,9 @@ +/* + * SPDX-FileCopyrightText: 2024 IObundle + * + * SPDX-License-Identifier: MIT + */ + #include "iob_timer.h" // Base Address diff --git a/lib/hardware/iob_timer/software/src/iob_timer.h b/lib/hardware/iob_timer/software/src/iob_timer.h index ba5a33095..8d01cbc1a 100644 --- a/lib/hardware/iob_timer/software/src/iob_timer.h +++ b/lib/hardware/iob_timer/software/src/iob_timer.h @@ -1,3 +1,9 @@ +/* + * SPDX-FileCopyrightText: 2024 IObundle + * + * SPDX-License-Identifier: MIT + */ + #pragma once #include "iob_timer_csrs.h" diff --git a/lib/hardware/iob_timer/software/src/iob_timer_csrs_pc_emul.c b/lib/hardware/iob_timer/software/src/iob_timer_csrs_pc_emul.c index 943ba3464..42cb2eefd 100644 --- a/lib/hardware/iob_timer/software/src/iob_timer_csrs_pc_emul.c +++ b/lib/hardware/iob_timer/software/src/iob_timer_csrs_pc_emul.c @@ -1,3 +1,9 @@ +/* + * SPDX-FileCopyrightText: 2024 IObundle + * + * SPDX-License-Identifier: MIT + */ + /* PC Emulation of TIMER peripheral */ #include diff --git a/lib/hardware/iob_uart/Makefile b/lib/hardware/iob_uart/Makefile index 281e01f0e..304ae251e 100644 --- a/lib/hardware/iob_uart/Makefile +++ b/lib/hardware/iob_uart/Makefile @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + CORE := iob_uart LIB_DIR=../../../../lib diff --git a/lib/hardware/iob_uart/README.md b/lib/hardware/iob_uart/README.md index c39a7cf7e..6808b0d1c 100644 --- a/lib/hardware/iob_uart/README.md +++ b/lib/hardware/iob_uart/README.md @@ -1,3 +1,9 @@ + + # README # # iob-uart diff --git a/lib/hardware/iob_uart/config_setup.mk b/lib/hardware/iob_uart/config_setup.mk index 5f50fab9a..99aa95259 100644 --- a/lib/hardware/iob_uart/config_setup.mk +++ b/lib/hardware/iob_uart/config_setup.mk @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + # (c) 2022-Present IObundle, Lda, all rights reserved # # This make segment is used at setup-time by ./Makefile diff --git a/lib/hardware/iob_uart/document/figures/bd.odg.license b/lib/hardware/iob_uart/document/figures/bd.odg.license new file mode 100644 index 000000000..9a5279e71 --- /dev/null +++ b/lib/hardware/iob_uart/document/figures/bd.odg.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: 2024 IObundle + +SPDX-License-Identifier: MIT diff --git a/lib/hardware/iob_uart/document/figures/inst.odg.license b/lib/hardware/iob_uart/document/figures/inst.odg.license new file mode 100644 index 000000000..9a5279e71 --- /dev/null +++ b/lib/hardware/iob_uart/document/figures/inst.odg.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: 2024 IObundle + +SPDX-License-Identifier: MIT diff --git a/lib/hardware/iob_uart/document/figures/symb.odg.license b/lib/hardware/iob_uart/document/figures/symb.odg.license new file mode 100644 index 000000000..9a5279e71 --- /dev/null +++ b/lib/hardware/iob_uart/document/figures/symb.odg.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: 2024 IObundle + +SPDX-License-Identifier: MIT diff --git a/lib/hardware/iob_uart/document/figures/tbbd.odg.license b/lib/hardware/iob_uart/document/figures/tbbd.odg.license new file mode 100644 index 000000000..9a5279e71 --- /dev/null +++ b/lib/hardware/iob_uart/document/figures/tbbd.odg.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: 2024 IObundle + +SPDX-License-Identifier: MIT diff --git a/lib/hardware/iob_uart/document/pb/Makefile b/lib/hardware/iob_uart/document/pb/Makefile index 1bc7651bf..f90e17a45 100644 --- a/lib/hardware/iob_uart/document/pb/Makefile +++ b/lib/hardware/iob_uart/document/pb/Makefile @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + UART_DIR:=../.. NOCLEAN=-name "pb.pdf" diff --git a/lib/hardware/iob_uart/document/pb/pb.pdf.license b/lib/hardware/iob_uart/document/pb/pb.pdf.license new file mode 100644 index 000000000..9a5279e71 --- /dev/null +++ b/lib/hardware/iob_uart/document/pb/pb.pdf.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: 2024 IObundle + +SPDX-License-Identifier: MIT diff --git a/lib/hardware/iob_uart/document/pb/test.expected.license b/lib/hardware/iob_uart/document/pb/test.expected.license new file mode 100644 index 000000000..9a5279e71 --- /dev/null +++ b/lib/hardware/iob_uart/document/pb/test.expected.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: 2024 IObundle + +SPDX-License-Identifier: MIT diff --git a/lib/hardware/iob_uart/document/tsrc/bd_desc.tex b/lib/hardware/iob_uart/document/tsrc/bd_desc.tex index 55e8badfd..ec0300cc7 100644 --- a/lib/hardware/iob_uart/document/tsrc/bd_desc.tex +++ b/lib/hardware/iob_uart/document/tsrc/bd_desc.tex @@ -1 +1,5 @@ +% SPDX-FileCopyrightText: 2024 IObundle +% +% SPDX-License-Identifier: MIT + \item Place block diagram description here diff --git a/lib/hardware/iob_uart/document/tsrc/benefits.tex b/lib/hardware/iob_uart/document/tsrc/benefits.tex index 0b982b03d..1430f4cc8 100644 --- a/lib/hardware/iob_uart/document/tsrc/benefits.tex +++ b/lib/hardware/iob_uart/document/tsrc/benefits.tex @@ -1,3 +1,7 @@ +% SPDX-FileCopyrightText: 2024 IObundle +% +% SPDX-License-Identifier: MIT + \begin{itemize} \itemsep-0.5em \item Compact and easy to integrate hardware and software implementation diff --git a/lib/hardware/iob_uart/document/tsrc/deliverables.tex b/lib/hardware/iob_uart/document/tsrc/deliverables.tex index ff80e76ee..5024f4843 100644 --- a/lib/hardware/iob_uart/document/tsrc/deliverables.tex +++ b/lib/hardware/iob_uart/document/tsrc/deliverables.tex @@ -1,3 +1,7 @@ +% SPDX-FileCopyrightText: 2024 IObundle +% +% SPDX-License-Identifier: MIT + \begin{itemize} \itemsep-0.5em \item ASIC or FPGA synthesized netlist or Verilog source code, and respective diff --git a/lib/hardware/iob_uart/document/tsrc/features.tex b/lib/hardware/iob_uart/document/tsrc/features.tex index fdd93af80..ed4818834 100644 --- a/lib/hardware/iob_uart/document/tsrc/features.tex +++ b/lib/hardware/iob_uart/document/tsrc/features.tex @@ -1,3 +1,7 @@ +% SPDX-FileCopyrightText: 2024 IObundle +% +% SPDX-License-Identifier: MIT + \begin{itemize} \item Supported in IObundle's RISC-V IOb-SoC open-source and free of charge template. \item IObundle's IOb-SoC native CPU interface. diff --git a/lib/hardware/iob_uart/document/tsrc/intro.tex b/lib/hardware/iob_uart/document/tsrc/intro.tex index 184978042..2b55c0df1 100644 --- a/lib/hardware/iob_uart/document/tsrc/intro.tex +++ b/lib/hardware/iob_uart/document/tsrc/intro.tex @@ -1,3 +1,7 @@ +% SPDX-FileCopyrightText: 2024 IObundle +% +% SPDX-License-Identifier: MIT + The IObundle UART is a RISC-V-based Peripheral written in Verilog, which users can download for free, modify, simulate and implement in FPGA or ASIC. It is written in Verilog and includes a C software driver. The IObundle UART is a very diff --git a/lib/hardware/iob_uart/document/tsrc/results.tex b/lib/hardware/iob_uart/document/tsrc/results.tex index d003ead48..de0a759fc 100644 --- a/lib/hardware/iob_uart/document/tsrc/results.tex +++ b/lib/hardware/iob_uart/document/tsrc/results.tex @@ -1 +1,5 @@ +% SPDX-FileCopyrightText: 2024 IObundle +% +% SPDX-License-Identifier: MIT + The results obtained use all the default user configurable parameters, which affect the RAM usage results. diff --git a/lib/hardware/iob_uart/document/tsrc/title.tex b/lib/hardware/iob_uart/document/tsrc/title.tex index 0495781ff..002148e44 100644 --- a/lib/hardware/iob_uart/document/tsrc/title.tex +++ b/lib/hardware/iob_uart/document/tsrc/title.tex @@ -1,2 +1,6 @@ +% SPDX-FileCopyrightText: 2024 IObundle +% +% SPDX-License-Identifier: MIT + \title{IOb-UART, a RISC-V UART} \header{IOb-UART, a RISC-V UART} diff --git a/lib/hardware/iob_uart/document/tsrc/ug_title.tex b/lib/hardware/iob_uart/document/tsrc/ug_title.tex index 50ea279f4..da566d98a 100644 --- a/lib/hardware/iob_uart/document/tsrc/ug_title.tex +++ b/lib/hardware/iob_uart/document/tsrc/ug_title.tex @@ -1,3 +1,7 @@ +% SPDX-FileCopyrightText: 2024 IObundle +% +% SPDX-License-Identifier: MIT + %replace ipcore-name by the name of your ip core (e.g. IOb-Cache) and description by a brief description (e.g. a Configurable Cache) \title{% diff --git a/lib/hardware/iob_uart/document/ug/Makefile b/lib/hardware/iob_uart/document/ug/Makefile index 7ec68673a..7b04ddfa6 100644 --- a/lib/hardware/iob_uart/document/ug/Makefile +++ b/lib/hardware/iob_uart/document/ug/Makefile @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + UART_DIR:=../.. CORE_DIR:=$(UART_DIR) diff --git a/lib/hardware/iob_uart/document/ug/csrs.tex b/lib/hardware/iob_uart/document/ug/csrs.tex index 7c8f10c8c..7b0d2f4b0 100644 --- a/lib/hardware/iob_uart/document/ug/csrs.tex +++ b/lib/hardware/iob_uart/document/ug/csrs.tex @@ -1,3 +1,7 @@ +% SPDX-FileCopyrightText: 2024 IObundle +% +% SPDX-License-Identifier: MIT + \begin{table}[H] \centering \begin{tabular}{|l|c|c|r|P{0.8cm}|p{5.5cm}|} diff --git a/lib/hardware/iob_uart/document/ug/if.tex b/lib/hardware/iob_uart/document/ug/if.tex index e26f3f278..2c877a54c 100644 --- a/lib/hardware/iob_uart/document/ug/if.tex +++ b/lib/hardware/iob_uart/document/ug/if.tex @@ -1,3 +1,7 @@ +% SPDX-FileCopyrightText: 2024 IObundle +% +% SPDX-License-Identifier: MIT + \begin{table}[H] \centering \begin{tabular}{|l|l|r|p{10.5cm}|} diff --git a/lib/hardware/iob_uart/document/ug/inst.tex b/lib/hardware/iob_uart/document/ug/inst.tex index 35ab743d1..aeec9c19c 100644 --- a/lib/hardware/iob_uart/document/ug/inst.tex +++ b/lib/hardware/iob_uart/document/ug/inst.tex @@ -1,3 +1,7 @@ +% SPDX-FileCopyrightText: 2024 IObundle +% +% SPDX-License-Identifier: MIT + The IOb-UART is a fully synchronous, single clock ({\tt clk}) domain design with an asynchronous active-high reset signal ({\tt arst}) that drives all the flip-flops in the design. The reset signal should be de-asserted diff --git a/lib/hardware/iob_uart/document/ug/revhist.tex b/lib/hardware/iob_uart/document/ug/revhist.tex index 842291784..956738a4a 100644 --- a/lib/hardware/iob_uart/document/ug/revhist.tex +++ b/lib/hardware/iob_uart/document/ug/revhist.tex @@ -1 +1,5 @@ +% SPDX-FileCopyrightText: 2024 IObundle +% +% SPDX-License-Identifier: MIT + \today & Initial document version \input{version}. \\ \hline diff --git a/lib/hardware/iob_uart/document/ug/sim.tex b/lib/hardware/iob_uart/document/ug/sim.tex index 0039f9687..46c9ac6df 100644 --- a/lib/hardware/iob_uart/document/ug/sim.tex +++ b/lib/hardware/iob_uart/document/ug/sim.tex @@ -1,3 +1,7 @@ +% SPDX-FileCopyrightText: 2024 IObundle +% +% SPDX-License-Identifier: MIT + The provided testbench implements a self-loop, where the IOb-UART handshakes ({\tt cts} to {\tt rts}, and sends data to itself ({\tt txd} to {\tt rxd}). The testbench drives the clock and reset signals, and emulates the CPU actions with diff --git a/lib/hardware/iob_uart/document/ug/synth.tex b/lib/hardware/iob_uart/document/ug/synth.tex index e94287b59..26ca465f3 100644 --- a/lib/hardware/iob_uart/document/ug/synth.tex +++ b/lib/hardware/iob_uart/document/ug/synth.tex @@ -1,2 +1,6 @@ +% SPDX-FileCopyrightText: 2024 IObundle +% +% SPDX-License-Identifier: MIT + This IP core synthesizes for FPGA and ASIC with very low logic resources consumption. The implementation does not require memory or arithmetic resources. diff --git a/lib/hardware/iob_uart/document/ug/test.expected.license b/lib/hardware/iob_uart/document/ug/test.expected.license new file mode 100644 index 000000000..9a5279e71 --- /dev/null +++ b/lib/hardware/iob_uart/document/ug/test.expected.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: 2024 IObundle + +SPDX-License-Identifier: MIT diff --git a/lib/hardware/iob_uart/document/ug/ug.pdf.license b/lib/hardware/iob_uart/document/ug/ug.pdf.license new file mode 100644 index 000000000..9a5279e71 --- /dev/null +++ b/lib/hardware/iob_uart/document/ug/ug.pdf.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: 2024 IObundle + +SPDX-License-Identifier: MIT diff --git a/lib/hardware/iob_uart/hardware/simulation/sim_build.mk b/lib/hardware/iob_uart/hardware/simulation/sim_build.mk index 0f01da0bc..780b35a26 100644 --- a/lib/hardware/iob_uart/hardware/simulation/sim_build.mk +++ b/lib/hardware/iob_uart/hardware/simulation/sim_build.mk @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + # # This file is included in BUILD_DIR/sim/Makefile # diff --git a/lib/hardware/iob_uart/hardware/simulation/src/iob_uart_tb.v b/lib/hardware/iob_uart/hardware/simulation/src/iob_uart_tb.v index 9e158b8cb..41a8648e4 100644 --- a/lib/hardware/iob_uart/hardware/simulation/src/iob_uart_tb.v +++ b/lib/hardware/iob_uart/hardware/simulation/src/iob_uart_tb.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1ns / 1ps `include "iob_uart_csrs_def.vh" diff --git a/lib/hardware/iob_uart/hardware/simulation/test.expected.license b/lib/hardware/iob_uart/hardware/simulation/test.expected.license new file mode 100644 index 000000000..9a5279e71 --- /dev/null +++ b/lib/hardware/iob_uart/hardware/simulation/test.expected.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: 2024 IObundle + +SPDX-License-Identifier: MIT diff --git a/lib/hardware/iob_uart/hardware/src/uart_core.v b/lib/hardware/iob_uart/hardware/src/uart_core.v index 56e6fbb81..d988ca725 100644 --- a/lib/hardware/iob_uart/hardware/src/uart_core.v +++ b/lib/hardware/iob_uart/hardware/src/uart_core.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1ns / 1ps `include "iob_uart_csrs_def.vh" `include "iob_uart_conf.vh" diff --git a/lib/hardware/iob_uart/hardware/uart_core.py b/lib/hardware/iob_uart/hardware/uart_core.py index 0abe3c647..f1b0da190 100644 --- a/lib/hardware/iob_uart/hardware/uart_core.py +++ b/lib/hardware/iob_uart/hardware/uart_core.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "uart_core", - "name": "uart_core", "version": "0.1", "generate_hw": False, "ports": [ diff --git a/lib/hardware/iob_uart/iob_uart.py b/lib/hardware/iob_uart/iob_uart.py index 7bafedd17..bdd3dc767 100755 --- a/lib/hardware/iob_uart/iob_uart.py +++ b/lib/hardware/iob_uart/iob_uart.py @@ -1,8 +1,12 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): CSR_IF = py_params_dict["csr_if"] if "csr_if" in py_params_dict else "iob" NAME = py_params_dict["name"] if "name" in py_params_dict else "iob_uart" attributes_dict = { - "original_name": "iob_uart", "name": NAME, "version": "0.1", "board_list": ["cyclonev_gt_dk", "aes_ku040_db_g"], diff --git a/lib/hardware/iob_uart/software/src/iob_uart.c b/lib/hardware/iob_uart/software/src/iob_uart.c index 35721efa0..a076e80ca 100644 --- a/lib/hardware/iob_uart/software/src/iob_uart.c +++ b/lib/hardware/iob_uart/software/src/iob_uart.c @@ -1,3 +1,9 @@ +/* + * SPDX-FileCopyrightText: 2024 IObundle + * + * SPDX-License-Identifier: MIT + */ + #include "iob_uart.h" #include diff --git a/lib/hardware/iob_uart/software/src/iob_uart.h b/lib/hardware/iob_uart/software/src/iob_uart.h index 1f344021a..14a189191 100644 --- a/lib/hardware/iob_uart/software/src/iob_uart.h +++ b/lib/hardware/iob_uart/software/src/iob_uart.h @@ -1,3 +1,9 @@ +/* + * SPDX-FileCopyrightText: 2024 IObundle + * + * SPDX-License-Identifier: MIT + */ + #include #include #include diff --git a/lib/hardware/iob_uart/software/src/iob_uart_csrs_pc_emul.c b/lib/hardware/iob_uart/software/src/iob_uart_csrs_pc_emul.c index 2c8f2f19a..d041dc370 100644 --- a/lib/hardware/iob_uart/software/src/iob_uart_csrs_pc_emul.c +++ b/lib/hardware/iob_uart/software/src/iob_uart_csrs_pc_emul.c @@ -1,3 +1,9 @@ +/* + * SPDX-FileCopyrightText: 2024 IObundle + * + * SPDX-License-Identifier: MIT + */ + /* PC Emulation of UART peripheral */ #include diff --git a/lib/hardware/memories/axi_ram/axi_ram.py b/lib/hardware/memories/axi_ram/axi_ram.py index f7125ad33..73473473b 100644 --- a/lib/hardware/memories/axi_ram/axi_ram.py +++ b/lib/hardware/memories/axi_ram/axi_ram.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "axi_ram", - "name": "axi_ram", "version": "0.1", "generate_hw": False, "confs": [ diff --git a/lib/hardware/memories/axi_ram/hardware/src/axi_ram.v b/lib/hardware/memories/axi_ram/hardware/src/axi_ram.v index 2473777ad..8e932b078 100644 --- a/lib/hardware/memories/axi_ram/hardware/src/axi_ram.v +++ b/lib/hardware/memories/axi_ram/hardware/src/axi_ram.v @@ -1,26 +1,8 @@ -/* - -Copyright (c) 2018 Alex Forencich - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +// SPDX-FileCopyrightText: 2018 Alex Forencich +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -*/ /* Changes made (2023 Pedro Antunes): - formated the code with Verible; diff --git a/lib/hardware/memories/ram/iob_ram_2p/hardware/simulation/src/iob_ram_2p_tb.v b/lib/hardware/memories/ram/iob_ram_2p/hardware/simulation/src/iob_ram_2p_tb.v index f6f0de75a..f0f012c1d 100644 --- a/lib/hardware/memories/ram/iob_ram_2p/hardware/simulation/src/iob_ram_2p_tb.v +++ b/lib/hardware/memories/ram/iob_ram_2p/hardware/simulation/src/iob_ram_2p_tb.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1ns / 1ps `define ADDR_W 10 `define DATA_W 32 diff --git a/lib/hardware/memories/ram/iob_ram_2p/iob_ram_2p.py b/lib/hardware/memories/ram/iob_ram_2p/iob_ram_2p.py index 57e68a97d..9f5deaed4 100644 --- a/lib/hardware/memories/ram/iob_ram_2p/iob_ram_2p.py +++ b/lib/hardware/memories/ram/iob_ram_2p/iob_ram_2p.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_ram_2p", - "name": "iob_ram_2p", "version": "0.1", "version": "0.1", "confs": [ diff --git a/lib/hardware/memories/ram/iob_ram_at2p/hardware/simulation/src/iob_ram_at2p_tb.v b/lib/hardware/memories/ram/iob_ram_at2p/hardware/simulation/src/iob_ram_at2p_tb.v index 44b5542cc..344e80846 100644 --- a/lib/hardware/memories/ram/iob_ram_at2p/hardware/simulation/src/iob_ram_at2p_tb.v +++ b/lib/hardware/memories/ram/iob_ram_at2p/hardware/simulation/src/iob_ram_at2p_tb.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1ns / 1ps `define DATA_W 8 diff --git a/lib/hardware/memories/ram/iob_ram_at2p/iob_ram_at2p.py b/lib/hardware/memories/ram/iob_ram_at2p/iob_ram_at2p.py index 668eb7a9a..6dca17c81 100644 --- a/lib/hardware/memories/ram/iob_ram_at2p/iob_ram_at2p.py +++ b/lib/hardware/memories/ram/iob_ram_at2p/iob_ram_at2p.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_ram_at2p", - "name": "iob_ram_at2p", "version": "0.1", "confs": [ { diff --git a/lib/hardware/memories/ram/iob_ram_atdp/hardware/simulation/src/iob_ram_atdp_tb.v b/lib/hardware/memories/ram/iob_ram_atdp/hardware/simulation/src/iob_ram_atdp_tb.v index 85d83f9ee..b689f7524 100644 --- a/lib/hardware/memories/ram/iob_ram_atdp/hardware/simulation/src/iob_ram_atdp_tb.v +++ b/lib/hardware/memories/ram/iob_ram_atdp/hardware/simulation/src/iob_ram_atdp_tb.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1ns / 1ps `define DATA_W 8 diff --git a/lib/hardware/memories/ram/iob_ram_atdp/iob_ram_atdp.py b/lib/hardware/memories/ram/iob_ram_atdp/iob_ram_atdp.py index c9c7911b3..b409f7d00 100644 --- a/lib/hardware/memories/ram/iob_ram_atdp/iob_ram_atdp.py +++ b/lib/hardware/memories/ram/iob_ram_atdp/iob_ram_atdp.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_ram_atdp", - "name": "iob_ram_atdp", "version": "0.1", "confs": [ { diff --git a/lib/hardware/memories/ram/iob_ram_atdp_be/hardware/simulation/src/iob_ram_atdp_be_tb.v b/lib/hardware/memories/ram/iob_ram_atdp_be/hardware/simulation/src/iob_ram_atdp_be_tb.v index 102db8e80..d295abe6c 100644 --- a/lib/hardware/memories/ram/iob_ram_atdp_be/hardware/simulation/src/iob_ram_atdp_be_tb.v +++ b/lib/hardware/memories/ram/iob_ram_atdp_be/hardware/simulation/src/iob_ram_atdp_be_tb.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1ns / 1ps `define DATA_W 32 diff --git a/lib/hardware/memories/ram/iob_ram_atdp_be/iob_ram_atdp_be.py b/lib/hardware/memories/ram/iob_ram_atdp_be/iob_ram_atdp_be.py index 92aa0d07f..d7902410f 100644 --- a/lib/hardware/memories/ram/iob_ram_atdp_be/iob_ram_atdp_be.py +++ b/lib/hardware/memories/ram/iob_ram_atdp_be/iob_ram_atdp_be.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_ram_atdp_be", - "name": "iob_ram_atdp_be", "version": "0.1", "confs": [ { diff --git a/lib/hardware/memories/ram/iob_ram_sp/hardware/simulation/src/iob_ram_sp_tb.v b/lib/hardware/memories/ram/iob_ram_sp/hardware/simulation/src/iob_ram_sp_tb.v index 5a1112a68..9183831e7 100644 --- a/lib/hardware/memories/ram/iob_ram_sp/hardware/simulation/src/iob_ram_sp_tb.v +++ b/lib/hardware/memories/ram/iob_ram_sp/hardware/simulation/src/iob_ram_sp_tb.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1ns / 1ps `define DATA_W 8 diff --git a/lib/hardware/memories/ram/iob_ram_sp/iob_ram_sp.py b/lib/hardware/memories/ram/iob_ram_sp/iob_ram_sp.py index e9c79a064..d5d78ff9e 100644 --- a/lib/hardware/memories/ram/iob_ram_sp/iob_ram_sp.py +++ b/lib/hardware/memories/ram/iob_ram_sp/iob_ram_sp.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_ram_sp", - "name": "iob_ram_sp", "version": "0.1", "confs": [ { diff --git a/lib/hardware/memories/ram/iob_ram_sp_be/hardware/simulation/src/iob_ram_sp_be_tb.v b/lib/hardware/memories/ram/iob_ram_sp_be/hardware/simulation/src/iob_ram_sp_be_tb.v index ec258ab28..24a0d3cce 100644 --- a/lib/hardware/memories/ram/iob_ram_sp_be/hardware/simulation/src/iob_ram_sp_be_tb.v +++ b/lib/hardware/memories/ram/iob_ram_sp_be/hardware/simulation/src/iob_ram_sp_be_tb.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1ns / 1ps `define DATA_W 32 diff --git a/lib/hardware/memories/ram/iob_ram_sp_be/iob_ram_sp_be.py b/lib/hardware/memories/ram/iob_ram_sp_be/iob_ram_sp_be.py index 9ae5caeae..1298bc2fb 100644 --- a/lib/hardware/memories/ram/iob_ram_sp_be/iob_ram_sp_be.py +++ b/lib/hardware/memories/ram/iob_ram_sp_be/iob_ram_sp_be.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_ram_sp_be", - "name": "iob_ram_sp_be", "version": "0.1", "confs": [ { diff --git a/lib/hardware/memories/ram/iob_ram_sp_se/hardware/simulation/src/iob_ram_sp_se_tb.v b/lib/hardware/memories/ram/iob_ram_sp_se/hardware/simulation/src/iob_ram_sp_se_tb.v index 3cec8a0b9..b88c9ec0a 100644 --- a/lib/hardware/memories/ram/iob_ram_sp_se/hardware/simulation/src/iob_ram_sp_se_tb.v +++ b/lib/hardware/memories/ram/iob_ram_sp_se/hardware/simulation/src/iob_ram_sp_se_tb.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1ns / 1ps `define DATA_W 32 diff --git a/lib/hardware/memories/ram/iob_ram_sp_se/iob_ram_sp_se.py b/lib/hardware/memories/ram/iob_ram_sp_se/iob_ram_sp_se.py index 0e5d992f2..b42cfffa6 100644 --- a/lib/hardware/memories/ram/iob_ram_sp_se/iob_ram_sp_se.py +++ b/lib/hardware/memories/ram/iob_ram_sp_se/iob_ram_sp_se.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_ram_sp_se", - "name": "iob_ram_sp_se", "version": "0.1", "confs": [ { diff --git a/lib/hardware/memories/ram/iob_ram_t2p/hardware/simulation/src/iob_ram_t2p_tb.v b/lib/hardware/memories/ram/iob_ram_t2p/hardware/simulation/src/iob_ram_t2p_tb.v index 8f7debc57..6ba6026d2 100644 --- a/lib/hardware/memories/ram/iob_ram_t2p/hardware/simulation/src/iob_ram_t2p_tb.v +++ b/lib/hardware/memories/ram/iob_ram_t2p/hardware/simulation/src/iob_ram_t2p_tb.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1ns / 1ps `define ADDR_W 10 `define DATA_W 32 diff --git a/lib/hardware/memories/ram/iob_ram_t2p/iob_ram_t2p.py b/lib/hardware/memories/ram/iob_ram_t2p/iob_ram_t2p.py index 5a83c9329..4d147fad5 100644 --- a/lib/hardware/memories/ram/iob_ram_t2p/iob_ram_t2p.py +++ b/lib/hardware/memories/ram/iob_ram_t2p/iob_ram_t2p.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_ram_t2p", - "name": "iob_ram_t2p", "version": "0.1", "confs": [ { diff --git a/lib/hardware/memories/ram/iob_ram_t2p_be/hardware/simulation/src/iob_ram_t2p_be_tb.v b/lib/hardware/memories/ram/iob_ram_t2p_be/hardware/simulation/src/iob_ram_t2p_be_tb.v index 8847b3ec5..7c0c32d6c 100644 --- a/lib/hardware/memories/ram/iob_ram_t2p_be/hardware/simulation/src/iob_ram_t2p_be_tb.v +++ b/lib/hardware/memories/ram/iob_ram_t2p_be/hardware/simulation/src/iob_ram_t2p_be_tb.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1ns / 1ps `define DATA_W 8 diff --git a/lib/hardware/memories/ram/iob_ram_t2p_be/iob_ram_t2p_be.py b/lib/hardware/memories/ram/iob_ram_t2p_be/iob_ram_t2p_be.py index 7d4805a84..f0a878e1e 100644 --- a/lib/hardware/memories/ram/iob_ram_t2p_be/iob_ram_t2p_be.py +++ b/lib/hardware/memories/ram/iob_ram_t2p_be/iob_ram_t2p_be.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_ram_t2p_be", - "name": "iob_ram_t2p_be", "version": "0.1", "confs": [ { diff --git a/lib/hardware/memories/ram/iob_ram_t2p_tiled/hardware/simulation/src/iob_ram_t2p_tiled_tb.v b/lib/hardware/memories/ram/iob_ram_t2p_tiled/hardware/simulation/src/iob_ram_t2p_tiled_tb.v index 71bb53cb3..a96c2384f 100644 --- a/lib/hardware/memories/ram/iob_ram_t2p_tiled/hardware/simulation/src/iob_ram_t2p_tiled_tb.v +++ b/lib/hardware/memories/ram/iob_ram_t2p_tiled/hardware/simulation/src/iob_ram_t2p_tiled_tb.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1ns / 1ps `define DATA_W 16 diff --git a/lib/hardware/memories/ram/iob_ram_t2p_tiled/iob_ram_t2p_tiled.py b/lib/hardware/memories/ram/iob_ram_t2p_tiled/iob_ram_t2p_tiled.py index 0b68f6b27..9ec1d42a1 100644 --- a/lib/hardware/memories/ram/iob_ram_t2p_tiled/iob_ram_t2p_tiled.py +++ b/lib/hardware/memories/ram/iob_ram_t2p_tiled/iob_ram_t2p_tiled.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_ram_t2p_tiled", - "name": "iob_ram_t2p_tiled", "version": "0.1", "confs": [ { diff --git a/lib/hardware/memories/ram/iob_ram_tdp/hardware/simulation/src/iob_ram_tdp_tb.v b/lib/hardware/memories/ram/iob_ram_tdp/hardware/simulation/src/iob_ram_tdp_tb.v index ec6e51db2..ebe6b771b 100644 --- a/lib/hardware/memories/ram/iob_ram_tdp/hardware/simulation/src/iob_ram_tdp_tb.v +++ b/lib/hardware/memories/ram/iob_ram_tdp/hardware/simulation/src/iob_ram_tdp_tb.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1ns / 1ps `define DATA_W 8 diff --git a/lib/hardware/memories/ram/iob_ram_tdp/iob_ram_tdp.py b/lib/hardware/memories/ram/iob_ram_tdp/iob_ram_tdp.py index d90c43bfa..234fcde33 100644 --- a/lib/hardware/memories/ram/iob_ram_tdp/iob_ram_tdp.py +++ b/lib/hardware/memories/ram/iob_ram_tdp/iob_ram_tdp.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_ram_tdp", - "name": "iob_ram_tdp", "version": "0.1", "confs": [ { diff --git a/lib/hardware/memories/ram/iob_ram_tdp_be/hardware/simulation/src/iob_ram_tdp_be_tb.v b/lib/hardware/memories/ram/iob_ram_tdp_be/hardware/simulation/src/iob_ram_tdp_be_tb.v index 5ce3a7948..c0673f5e7 100644 --- a/lib/hardware/memories/ram/iob_ram_tdp_be/hardware/simulation/src/iob_ram_tdp_be_tb.v +++ b/lib/hardware/memories/ram/iob_ram_tdp_be/hardware/simulation/src/iob_ram_tdp_be_tb.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1ns / 1ps `define DATA_W 32 diff --git a/lib/hardware/memories/ram/iob_ram_tdp_be/iob_ram_tdp_be.py b/lib/hardware/memories/ram/iob_ram_tdp_be/iob_ram_tdp_be.py index 22b18fc80..937fa24ac 100644 --- a/lib/hardware/memories/ram/iob_ram_tdp_be/iob_ram_tdp_be.py +++ b/lib/hardware/memories/ram/iob_ram_tdp_be/iob_ram_tdp_be.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_ram_tdp_be", - "name": "iob_ram_tdp_be", "version": "0.1", "confs": [ { diff --git a/lib/hardware/memories/ram/iob_ram_tdp_be_xil/hardware/simulation/src/iob_ram_tdp_be_xil_tb.v b/lib/hardware/memories/ram/iob_ram_tdp_be_xil/hardware/simulation/src/iob_ram_tdp_be_xil_tb.v index d25582db2..32e2ffeb2 100644 --- a/lib/hardware/memories/ram/iob_ram_tdp_be_xil/hardware/simulation/src/iob_ram_tdp_be_xil_tb.v +++ b/lib/hardware/memories/ram/iob_ram_tdp_be_xil/hardware/simulation/src/iob_ram_tdp_be_xil_tb.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1ns / 1ps `define DATA_W 32 diff --git a/lib/hardware/memories/ram/iob_ram_tdp_be_xil/iob_ram_tdp_be_xil.py b/lib/hardware/memories/ram/iob_ram_tdp_be_xil/iob_ram_tdp_be_xil.py index fdcf56a5e..95de8953b 100644 --- a/lib/hardware/memories/ram/iob_ram_tdp_be_xil/iob_ram_tdp_be_xil.py +++ b/lib/hardware/memories/ram/iob_ram_tdp_be_xil/iob_ram_tdp_be_xil.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_ram_tdp_be_xil", - "name": "iob_ram_tdp_be_xil", "version": "0.1", "confs": [ { diff --git a/lib/hardware/memories/regfile/iob_regfile_2p/hardware/src/iob_regfile_2p.v b/lib/hardware/memories/regfile/iob_regfile_2p/hardware/src/iob_regfile_2p.v index 9e2aa9d68..df11f5259 100644 --- a/lib/hardware/memories/regfile/iob_regfile_2p/hardware/src/iob_regfile_2p.v +++ b/lib/hardware/memories/regfile/iob_regfile_2p/hardware/src/iob_regfile_2p.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1 ns / 1 ps module iob_regfile_2p #( diff --git a/lib/hardware/memories/regfile/iob_regfile_2p/iob_regfile_2p.py b/lib/hardware/memories/regfile/iob_regfile_2p/iob_regfile_2p.py index d1d17e066..e049898f5 100644 --- a/lib/hardware/memories/regfile/iob_regfile_2p/iob_regfile_2p.py +++ b/lib/hardware/memories/regfile/iob_regfile_2p/iob_regfile_2p.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_regfile_2p", - "name": "iob_regfile_2p", "version": "0.1", "generate_hw": False, "ports": [ diff --git a/lib/hardware/memories/regfile/iob_regfile_at2p/hardware/src/iob_regfile_at2p.v b/lib/hardware/memories/regfile/iob_regfile_at2p/hardware/src/iob_regfile_at2p.v index 0e9acc120..ee51d760a 100644 --- a/lib/hardware/memories/regfile/iob_regfile_at2p/hardware/src/iob_regfile_at2p.v +++ b/lib/hardware/memories/regfile/iob_regfile_at2p/hardware/src/iob_regfile_at2p.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1 ns / 1 ps diff --git a/lib/hardware/memories/regfile/iob_regfile_at2p/iob_regfile_at2p.py b/lib/hardware/memories/regfile/iob_regfile_at2p/iob_regfile_at2p.py index f3a804c96..1c5c454cf 100644 --- a/lib/hardware/memories/regfile/iob_regfile_at2p/iob_regfile_at2p.py +++ b/lib/hardware/memories/regfile/iob_regfile_at2p/iob_regfile_at2p.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_regfile_at2p", - "name": "iob_regfile_at2p", "version": "0.1", "generate_hw": False, "blocks": [ diff --git a/lib/hardware/memories/regfile/iob_regfile_sp/hardware/simulation/src/iob_regfile_sp_tb.v b/lib/hardware/memories/regfile/iob_regfile_sp/hardware/simulation/src/iob_regfile_sp_tb.v index 652969a5c..8afaed1e7 100644 --- a/lib/hardware/memories/regfile/iob_regfile_sp/hardware/simulation/src/iob_regfile_sp_tb.v +++ b/lib/hardware/memories/regfile/iob_regfile_sp/hardware/simulation/src/iob_regfile_sp_tb.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1ns / 1ps `define DATA_W 32 diff --git a/lib/hardware/memories/regfile/iob_regfile_sp/hardware/src/iob_regfile_sp.v b/lib/hardware/memories/regfile/iob_regfile_sp/hardware/src/iob_regfile_sp.v index e94f7fbd4..65442579e 100644 --- a/lib/hardware/memories/regfile/iob_regfile_sp/hardware/src/iob_regfile_sp.v +++ b/lib/hardware/memories/regfile/iob_regfile_sp/hardware/src/iob_regfile_sp.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1 ns / 1 ps module iob_regfile_sp #( diff --git a/lib/hardware/memories/regfile/iob_regfile_sp/iob_regfile_sp.py b/lib/hardware/memories/regfile/iob_regfile_sp/iob_regfile_sp.py index b7a1a9742..757d18396 100644 --- a/lib/hardware/memories/regfile/iob_regfile_sp/iob_regfile_sp.py +++ b/lib/hardware/memories/regfile/iob_regfile_sp/iob_regfile_sp.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_regfile_sp", - "name": "iob_regfile_sp", "version": "0.09", "generate_hw": False, "ports": [ diff --git a/lib/hardware/memories/rom/iob_rom_2p/hardware/simulation/src/iob_rom_2p_tb.v b/lib/hardware/memories/rom/iob_rom_2p/hardware/simulation/src/iob_rom_2p_tb.v index f64db2cff..b74fbe707 100644 --- a/lib/hardware/memories/rom/iob_rom_2p/hardware/simulation/src/iob_rom_2p_tb.v +++ b/lib/hardware/memories/rom/iob_rom_2p/hardware/simulation/src/iob_rom_2p_tb.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1ns / 1ps `define ADDR_W 10 `define DATA_W 32 diff --git a/lib/hardware/memories/rom/iob_rom_2p/hardware/src/iob_rom_2p.v b/lib/hardware/memories/rom/iob_rom_2p/hardware/src/iob_rom_2p.v index bd0287002..87c0b2192 100644 --- a/lib/hardware/memories/rom/iob_rom_2p/hardware/src/iob_rom_2p.v +++ b/lib/hardware/memories/rom/iob_rom_2p/hardware/src/iob_rom_2p.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1ns / 1ps module iob_rom_2p #( diff --git a/lib/hardware/memories/rom/iob_rom_2p/iob_rom_2p.py b/lib/hardware/memories/rom/iob_rom_2p/iob_rom_2p.py index 5b49ad8fe..ecb7939a7 100644 --- a/lib/hardware/memories/rom/iob_rom_2p/iob_rom_2p.py +++ b/lib/hardware/memories/rom/iob_rom_2p/iob_rom_2p.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_rom_2p", - "name": "iob_rom_2p", "version": "0.1", "generate_hw": False, "blocks": [ diff --git a/lib/hardware/memories/rom/iob_rom_atdp/hardware/simulation/src/iob_rom_atdp_tb.v b/lib/hardware/memories/rom/iob_rom_atdp/hardware/simulation/src/iob_rom_atdp_tb.v index a9d1ee5c5..4652b7d1e 100644 --- a/lib/hardware/memories/rom/iob_rom_atdp/hardware/simulation/src/iob_rom_atdp_tb.v +++ b/lib/hardware/memories/rom/iob_rom_atdp/hardware/simulation/src/iob_rom_atdp_tb.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1ns / 1ps `define DATA_W 8 diff --git a/lib/hardware/memories/rom/iob_rom_atdp/iob_rom_atdp.py b/lib/hardware/memories/rom/iob_rom_atdp/iob_rom_atdp.py index ad020ff08..3bd0ee18a 100644 --- a/lib/hardware/memories/rom/iob_rom_atdp/iob_rom_atdp.py +++ b/lib/hardware/memories/rom/iob_rom_atdp/iob_rom_atdp.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_rom_atdp", - "name": "iob_rom_atdp", "version": "0.1", "confs": [ { diff --git a/lib/hardware/memories/rom/iob_rom_sp/hardware/simulation/src/iob_rom_sp_tb.v b/lib/hardware/memories/rom/iob_rom_sp/hardware/simulation/src/iob_rom_sp_tb.v index fbb98ca00..8a2840507 100644 --- a/lib/hardware/memories/rom/iob_rom_sp/hardware/simulation/src/iob_rom_sp_tb.v +++ b/lib/hardware/memories/rom/iob_rom_sp/hardware/simulation/src/iob_rom_sp_tb.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1ns / 1ps `define DATA_W 8 diff --git a/lib/hardware/memories/rom/iob_rom_sp/iob_rom_sp.py b/lib/hardware/memories/rom/iob_rom_sp/iob_rom_sp.py index ee75cd803..efbb25ec1 100644 --- a/lib/hardware/memories/rom/iob_rom_sp/iob_rom_sp.py +++ b/lib/hardware/memories/rom/iob_rom_sp/iob_rom_sp.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_rom_sp", - "name": "iob_rom_sp", "version": "0.1", "confs": [ { diff --git a/lib/hardware/memories/rom/iob_rom_tdp/hardware/simulation/src/iob_rom_tdp_tb.v b/lib/hardware/memories/rom/iob_rom_tdp/hardware/simulation/src/iob_rom_tdp_tb.v index 21dc96c71..46339d21c 100644 --- a/lib/hardware/memories/rom/iob_rom_tdp/hardware/simulation/src/iob_rom_tdp_tb.v +++ b/lib/hardware/memories/rom/iob_rom_tdp/hardware/simulation/src/iob_rom_tdp_tb.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1ns / 1ps `define DATA_W 8 diff --git a/lib/hardware/memories/rom/iob_rom_tdp/iob_rom_tdp.py b/lib/hardware/memories/rom/iob_rom_tdp/iob_rom_tdp.py index 849c116d0..05782c85f 100644 --- a/lib/hardware/memories/rom/iob_rom_tdp/iob_rom_tdp.py +++ b/lib/hardware/memories/rom/iob_rom_tdp/iob_rom_tdp.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_rom_tdp", - "name": "iob_rom_tdp", "version": "0.1", "confs": [ { diff --git a/lib/hardware/shifters/iob_pack/hardware/src/iob_pack.v b/lib/hardware/shifters/iob_pack/hardware/src/iob_pack.v index 676642e0d..133fdd51b 100644 --- a/lib/hardware/shifters/iob_pack/hardware/src/iob_pack.v +++ b/lib/hardware/shifters/iob_pack/hardware/src/iob_pack.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1ns / 1ps module iob_pack #( diff --git a/lib/hardware/shifters/iob_pack/iob_pack.py b/lib/hardware/shifters/iob_pack/iob_pack.py index a038c2a51..0d31bcf9c 100644 --- a/lib/hardware/shifters/iob_pack/iob_pack.py +++ b/lib/hardware/shifters/iob_pack/iob_pack.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_pack", - "name": "iob_pack", "version": "0.1", "generate_hw": False, "blocks": [ diff --git a/lib/hardware/shifters/iob_piso_reg/iob_piso_reg.py b/lib/hardware/shifters/iob_piso_reg/iob_piso_reg.py index 1d2371068..867770a0b 100644 --- a/lib/hardware/shifters/iob_piso_reg/iob_piso_reg.py +++ b/lib/hardware/shifters/iob_piso_reg/iob_piso_reg.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_piso_reg", - "name": "iob_piso_reg", "version": "0.1", "confs": [ { diff --git a/lib/hardware/shifters/iob_shift_reg/hardware/simulation/src/iob_shift_reg_tb.v b/lib/hardware/shifters/iob_shift_reg/hardware/simulation/src/iob_shift_reg_tb.v index 4d55ba8d0..158c86b4a 100644 --- a/lib/hardware/shifters/iob_shift_reg/hardware/simulation/src/iob_shift_reg_tb.v +++ b/lib/hardware/shifters/iob_shift_reg/hardware/simulation/src/iob_shift_reg_tb.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1ns / 1ps module iob_shift_reg_tb; diff --git a/lib/hardware/shifters/iob_shift_reg/hardware/src/iob_shift_reg.v b/lib/hardware/shifters/iob_shift_reg/hardware/src/iob_shift_reg.v index f6b590c68..d2aad570a 100644 --- a/lib/hardware/shifters/iob_shift_reg/hardware/src/iob_shift_reg.v +++ b/lib/hardware/shifters/iob_shift_reg/hardware/src/iob_shift_reg.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1ns / 1ps diff --git a/lib/hardware/shifters/iob_shift_reg/iob_shift_reg.py b/lib/hardware/shifters/iob_shift_reg/iob_shift_reg.py index 0dda55f7f..eb5c4fb1a 100644 --- a/lib/hardware/shifters/iob_shift_reg/iob_shift_reg.py +++ b/lib/hardware/shifters/iob_shift_reg/iob_shift_reg.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_shift_reg", - "name": "iob_shift_reg", "version": "0.1", "generate_hw": False, "ports": [ diff --git a/lib/hardware/shifters/iob_sipo_reg/hardware/src/iob_sipo_reg.v b/lib/hardware/shifters/iob_sipo_reg/hardware/src/iob_sipo_reg.v index 1c5fa7ac1..2fa7b56b2 100644 --- a/lib/hardware/shifters/iob_sipo_reg/hardware/src/iob_sipo_reg.v +++ b/lib/hardware/shifters/iob_sipo_reg/hardware/src/iob_sipo_reg.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1ns / 1ps module iob_sipo_reg #( diff --git a/lib/hardware/shifters/iob_sipo_reg/iob_sipo_reg.py b/lib/hardware/shifters/iob_sipo_reg/iob_sipo_reg.py index 632320e4b..400b8811c 100644 --- a/lib/hardware/shifters/iob_sipo_reg/iob_sipo_reg.py +++ b/lib/hardware/shifters/iob_sipo_reg/iob_sipo_reg.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_sipo_reg", - "name": "iob_sipo_reg", "version": "0.1", "generate_hw": False, "blocks": [ diff --git a/lib/hardware/shifters/iob_unpack/hardware/src/iob_unpack.v b/lib/hardware/shifters/iob_unpack/hardware/src/iob_unpack.v index baec2fd87..d476588db 100644 --- a/lib/hardware/shifters/iob_unpack/hardware/src/iob_unpack.v +++ b/lib/hardware/shifters/iob_unpack/hardware/src/iob_unpack.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1ns / 1ps module iob_unpack #( diff --git a/lib/hardware/shifters/iob_unpack/iob_unpack.py b/lib/hardware/shifters/iob_unpack/iob_unpack.py index c6ad42d03..0d31bcf9c 100644 --- a/lib/hardware/shifters/iob_unpack/iob_unpack.py +++ b/lib/hardware/shifters/iob_unpack/iob_unpack.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_unpack", - "name": "iob_unpack", "version": "0.1", "generate_hw": False, "blocks": [ diff --git a/lib/hardware/synchronizers/iob_f2s_1bit_sync/hardware/src/iob_f2s_1bit_sync.v b/lib/hardware/synchronizers/iob_f2s_1bit_sync/hardware/src/iob_f2s_1bit_sync.v index 088045f6b..dacfce6da 100644 --- a/lib/hardware/synchronizers/iob_f2s_1bit_sync/hardware/src/iob_f2s_1bit_sync.v +++ b/lib/hardware/synchronizers/iob_f2s_1bit_sync/hardware/src/iob_f2s_1bit_sync.v @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 IObundle +// +// SPDX-License-Identifier: MIT + `timescale 1ns / 1ps module iob_f2s_1bit_sync ( diff --git a/lib/hardware/synchronizers/iob_f2s_1bit_sync/iob_f2s_1bit_sync.py b/lib/hardware/synchronizers/iob_f2s_1bit_sync/iob_f2s_1bit_sync.py index 22aaf32bb..3a7d37d81 100644 --- a/lib/hardware/synchronizers/iob_f2s_1bit_sync/iob_f2s_1bit_sync.py +++ b/lib/hardware/synchronizers/iob_f2s_1bit_sync/iob_f2s_1bit_sync.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_f2s_1bit_sync", - "name": "iob_f2s_1bit_sync", "version": "0.1", "generate_hw": False, "blocks": [ diff --git a/lib/hardware/synchronizers/iob_neg2posedge_sync/iob_neg2posedge_sync.py b/lib/hardware/synchronizers/iob_neg2posedge_sync/iob_neg2posedge_sync.py index 5dcc74940..f064a5a9d 100644 --- a/lib/hardware/synchronizers/iob_neg2posedge_sync/iob_neg2posedge_sync.py +++ b/lib/hardware/synchronizers/iob_neg2posedge_sync/iob_neg2posedge_sync.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_neg2posedge_sync", - "name": "iob_neg2posedge_sync", "version": "0.1", "confs": [ { diff --git a/lib/hardware/synchronizers/iob_reset_sync/iob_reset_sync.py b/lib/hardware/synchronizers/iob_reset_sync/iob_reset_sync.py index b24be9741..eab7f6879 100644 --- a/lib/hardware/synchronizers/iob_reset_sync/iob_reset_sync.py +++ b/lib/hardware/synchronizers/iob_reset_sync/iob_reset_sync.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + edge = 1 @@ -6,8 +10,6 @@ def setup(py_params_dict): if "RST_POL" in py_params_dict: edge = py_params_dict["RST_POL"] attributes_dict = { - "original_name": "iob_reset_sync", - "name": "iob_reset_sync", "version": "0.1", "ports": [ { diff --git a/lib/hardware/synchronizers/iob_sync/iob_sync.py b/lib/hardware/synchronizers/iob_sync/iob_sync.py index d60061563..4263ce26d 100644 --- a/lib/hardware/synchronizers/iob_sync/iob_sync.py +++ b/lib/hardware/synchronizers/iob_sync/iob_sync.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_sync", - "name": "iob_sync", "version": "0.1", "confs": [ { diff --git a/lib/scripts/default.nix b/lib/scripts/default.nix index 457cf9b0b..503120660 100644 --- a/lib/scripts/default.nix +++ b/lib/scripts/default.nix @@ -1,8 +1,12 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + { pkgs ? import {} }: let - py2hwsw_commit = "db8edfe33d2790cd7d779ec9537187b1edbad5d6"; # Replace with the desired commit. - py2hwsw_sha256 = "Y4J8l5U2SCjrx692L9UXuB3VVOlXwE1tV7j7XbU/TCo="; # Replace with the actual SHA256 hash. + py2hwsw_commit = "1b80e60335d43f1912a0dd80a97bef7b18bdea57"; # Replace with the desired commit. + py2hwsw_sha256 = "Ny0kpLwJy9/zC2JdEVefxWSj1uIRzSoNEPKu4OMIFo4="; # Replace with the actual SHA256 hash. py2hwsw = pkgs.python3.pkgs.buildPythonPackage rec { pname = "py2hwsw"; diff --git a/lib/scripts/patches/yosys/abc-editline.patch.license b/lib/scripts/patches/yosys/abc-editline.patch.license new file mode 100644 index 000000000..9a5279e71 --- /dev/null +++ b/lib/scripts/patches/yosys/abc-editline.patch.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: 2024 IObundle + +SPDX-License-Identifier: MIT diff --git a/lib/scripts/patches/yosys/fix-clang-build.patch.license b/lib/scripts/patches/yosys/fix-clang-build.patch.license new file mode 100644 index 000000000..9a5279e71 --- /dev/null +++ b/lib/scripts/patches/yosys/fix-clang-build.patch.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: 2024 IObundle + +SPDX-License-Identifier: MIT diff --git a/lib/scripts/patches/yosys/plugin-search-dirs.patch.license b/lib/scripts/patches/yosys/plugin-search-dirs.patch.license new file mode 100644 index 000000000..9a5279e71 --- /dev/null +++ b/lib/scripts/patches/yosys/plugin-search-dirs.patch.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: 2024 IObundle + +SPDX-License-Identifier: MIT diff --git a/lib/scripts/riscv-gnu-toolchain.nix b/lib/scripts/riscv-gnu-toolchain.nix index 9faef587c..f4c310b11 100644 --- a/lib/scripts/riscv-gnu-toolchain.nix +++ b/lib/scripts/riscv-gnu-toolchain.nix @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + { pkgs ? import {} }: pkgs.stdenv.mkDerivation { diff --git a/lib/scripts/test.sh b/lib/scripts/test.sh index 14cda8d4a..ef4087311 100755 --- a/lib/scripts/test.sh +++ b/lib/scripts/test.sh @@ -1,5 +1,9 @@ #!/usr/bin/env bash +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + set -e #find directories containing testbenches diff --git a/lib/scripts/yosys-abc.nix b/lib/scripts/yosys-abc.nix index c32117380..ef395111b 100644 --- a/lib/scripts/yosys-abc.nix +++ b/lib/scripts/yosys-abc.nix @@ -1,5 +1,9 @@ -# Copyright 2023 Efabless Corporation +# SPDX-FileCopyrightText: 2003-2023 Eelco Dolstra and the Nixpkgs/NixOS contributors +# SPDX-FileCopyrightText: 2023 Efabless Corporation +# SPDX-FileCopyrightText: 2024 IObundle # +# SPDX-License-Identifier: Apache-2.0 + # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -64,4 +68,4 @@ let }; }; in -yosys_abc \ No newline at end of file +yosys_abc diff --git a/lib/scripts/yosys.nix b/lib/scripts/yosys.nix index 0c7650b83..ea80452c8 100644 --- a/lib/scripts/yosys.nix +++ b/lib/scripts/yosys.nix @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + { pkgs ? import {} }: let diff --git a/lib/software/modules/emb_utils/software/src/iob_emb_utils.c b/lib/software/modules/emb_utils/software/src/iob_emb_utils.c index 879397c2e..d1a7d4fba 100644 --- a/lib/software/modules/emb_utils/software/src/iob_emb_utils.c +++ b/lib/software/modules/emb_utils/software/src/iob_emb_utils.c @@ -1,3 +1,9 @@ +/* + * SPDX-FileCopyrightText: 2024 IObundle + * + * SPDX-License-Identifier: MIT + */ + void perror(char *s) { printf("ERROR: %s", s); uart_finish(); diff --git a/lib/software/modules/emb_utils/software/src/iob_emb_utils.h b/lib/software/modules/emb_utils/software/src/iob_emb_utils.h index f9c97d86f..22748a26a 100644 --- a/lib/software/modules/emb_utils/software/src/iob_emb_utils.h +++ b/lib/software/modules/emb_utils/software/src/iob_emb_utils.h @@ -1 +1,7 @@ +/* + * SPDX-FileCopyrightText: 2024 IObundle + * + * SPDX-License-Identifier: MIT + */ + void perror(char *s); diff --git a/lib/software/modules/iob_str/iob_str.py b/lib/software/modules/iob_str/iob_str.py index 5dfba23c6..96aa5f364 100644 --- a/lib/software/modules/iob_str/iob_str.py +++ b/lib/software/modules/iob_str/iob_str.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "iob_str", - "name": "iob_str", "version": "0.1", "generate_hw": False, "instantiate": False, diff --git a/lib/software/modules/iob_str/software/src/iob_str.c b/lib/software/modules/iob_str/software/src/iob_str.c index 40fd8ccac..cc1e54d4d 100644 --- a/lib/software/modules/iob_str/software/src/iob_str.c +++ b/lib/software/modules/iob_str/software/src/iob_str.c @@ -1,3 +1,9 @@ +/* + * SPDX-FileCopyrightText: 2024 IObundle + * + * SPDX-License-Identifier: MIT + */ + #include #include diff --git a/lib/software/modules/iob_str/software/src/iob_str.h b/lib/software/modules/iob_str/software/src/iob_str.h index 3f3f10bc4..3000982e6 100644 --- a/lib/software/modules/iob_str/software/src/iob_str.h +++ b/lib/software/modules/iob_str/software/src/iob_str.h @@ -1,3 +1,9 @@ +/* + * SPDX-FileCopyrightText: 2024 IObundle + * + * SPDX-License-Identifier: MIT + */ + int iob_strcpy(char *dst, char *src); int iob_strcmp(char *str1, char *str2, int str_size); int iob_strlen(char *str); diff --git a/lib/software/modules/printf/printf.py b/lib/software/modules/printf/printf.py index cf8989f85..96aa5f364 100644 --- a/lib/software/modules/printf/printf.py +++ b/lib/software/modules/printf/printf.py @@ -1,7 +1,10 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + + def setup(py_params_dict): attributes_dict = { - "original_name": "printf", - "name": "printf", "version": "0.1", "generate_hw": False, "instantiate": False, diff --git a/lib/software/modules/printf/software/src/printf.c b/lib/software/modules/printf/software/src/printf.c index 90ea03e9c..1d918aaa9 100644 --- a/lib/software/modules/printf/software/src/printf.c +++ b/lib/software/modules/printf/software/src/printf.c @@ -1,3 +1,9 @@ +/* + * SPDX-FileCopyrightText: 2024 IObundle + * + * SPDX-License-Identifier: MIT + */ + /////////////////////////////////////////////////////////////////////////////// // \author (c) Marco Paland (info@paland.com) // 2014-2019, PALANDesign Hannover, Germany diff --git a/lib/software/modules/printf/software/src/printf.h b/lib/software/modules/printf/software/src/printf.h index 919725920..093f345ac 100644 --- a/lib/software/modules/printf/software/src/printf.h +++ b/lib/software/modules/printf/software/src/printf.h @@ -1,3 +1,9 @@ +/* + * SPDX-FileCopyrightText: 2024 IObundle + * + * SPDX-License-Identifier: MIT + */ + /////////////////////////////////////////////////////////////////////////////// // \author (c) Marco Paland (info@paland.com) // 2014-2019, PALANDesign Hannover, Germany diff --git a/lib/software/modules/prng/xoshiro256plusplus/example/Makefile b/lib/software/modules/prng/xoshiro256plusplus/example/Makefile index fd93b89f6..c9637bad4 100644 --- a/lib/software/modules/prng/xoshiro256plusplus/example/Makefile +++ b/lib/software/modules/prng/xoshiro256plusplus/example/Makefile @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 IObundle +# +# SPDX-License-Identifier: MIT + XOSHIRO_PATH = .. SOURCES = $(wildcard *.c) diff --git a/lib/software/modules/prng/xoshiro256plusplus/example/example_xoshiro.c b/lib/software/modules/prng/xoshiro256plusplus/example/example_xoshiro.c index 37fa7d7a2..46f302f49 100644 --- a/lib/software/modules/prng/xoshiro256plusplus/example/example_xoshiro.c +++ b/lib/software/modules/prng/xoshiro256plusplus/example/example_xoshiro.c @@ -1,3 +1,9 @@ +/* + * SPDX-FileCopyrightText: 2024 IObundle + * + * SPDX-License-Identifier: MIT + */ + #include #include diff --git a/lib/software/modules/prng/xoshiro256plusplus/iob_xoshiro256plusplus.c b/lib/software/modules/prng/xoshiro256plusplus/iob_xoshiro256plusplus.c index bd643f492..501c02db4 100644 --- a/lib/software/modules/prng/xoshiro256plusplus/iob_xoshiro256plusplus.c +++ b/lib/software/modules/prng/xoshiro256plusplus/iob_xoshiro256plusplus.c @@ -1,3 +1,9 @@ +/* + * SPDX-FileCopyrightText: 2024 IObundle + * + * SPDX-License-Identifier: MIT + */ + /* * Adapted from https://prng.di.unimi.it/xoshiro256plusplus.c * 64 bit PRNG diff --git a/lib/software/modules/prng/xoshiro256plusplus/iob_xoshiro256plusplus.h b/lib/software/modules/prng/xoshiro256plusplus/iob_xoshiro256plusplus.h index f821362f7..7e8907380 100644 --- a/lib/software/modules/prng/xoshiro256plusplus/iob_xoshiro256plusplus.h +++ b/lib/software/modules/prng/xoshiro256plusplus/iob_xoshiro256plusplus.h @@ -1,3 +1,9 @@ +/* + * SPDX-FileCopyrightText: 2024 IObundle + * + * SPDX-License-Identifier: MIT + */ + #ifndef H_IOB_XOSHIRO256PLUSPLUS_H #define H_IOB_XOSHIRO256PLUSPLUS_H diff --git a/software/src/iob_soc_firmware.c b/software/src/iob_soc_firmware.c index 639c59633..487324c15 100644 --- a/software/src/iob_soc_firmware.c +++ b/software/src/iob_soc_firmware.c @@ -1,3 +1,9 @@ +/* + * SPDX-FileCopyrightText: 2024 IObundle + * + * SPDX-License-Identifier: MIT + */ + #include "bsp.h" #include "iob_soc_conf.h" #include "iob_soc_periphs.h"