From 97ea93a45a46af5681ae78fe97dad70c27ee9e7b Mon Sep 17 00:00:00 2001 From: Yvan Tortorella Date: Sat, 17 Feb 2024 00:50:43 +0100 Subject: [PATCH 1/4] Add CI lint script. --- .github/workflows/lint.yml | 73 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..d39dbe5 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,73 @@ +# Copyright 2022 ETH Zurich and University of Bologna. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. +# SPDX-License-Identifier: Apache-2.0 + +name: lint + +on: [ push, pull_request, workflow_dispatch ] + +jobs: + + lint-license: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v3 + - + name: Check license + uses: pulp-platform/pulp-actions/lint-license@v2 + with: + license: | + Copyright (\d{4}(-\d{4})?\s)?.* + (Solderpad Hardware License, Version 0.51|Licensed under the Apache License, Version 2.0), see LICENSE for details. + SPDX-License-Identifier: (SHL-0.51|Apache-2.0) + # Exclude generated headers (no license checker support for optional lines) + exclude_paths: | + sw/utils/tinyprintf.h + sw/inc/* + *.md + *.do + *.lock + LICENSE* + + lint-sv: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v3 + - + name: Run Verible + uses: chipsalliance/verible-linter-action@main + with: + paths: hw + extra_args: "--waiver_files .github/verible.waiver" + github_token: ${{ secrets.GITHUB_TOKEN }} + fail_on_error: true + reviewdog_reporter: github-check + + lint-cxx: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v3 + - + name: Run Clang-format + uses: DoozyX/clang-format-lint-action@v0.14 + with: + extensions: 'c,h,cpp' + clangFormatVersion: 14 + style: > + { + IndentWidth: 4, + ColumnLimit: 100, + AlignEscapedNewlines: DontAlign, + SortIncludes: false, + AllowShortFunctionsOnASingleLine: None, + AllowShortIfStatementsOnASingleLine: true, + AllowShortLoopsOnASingleLine: true + } + exclude: | + ./sw/inc/* From 1b603ff92040839f79bbddefa669822ebd614bb7 Mon Sep 17 00:00:00 2001 From: Yvan Tortorella Date: Sat, 17 Feb 2024 00:34:01 +0100 Subject: [PATCH 2/4] Update licenses. --- Bender.local | 7 +++++++ Bender.yml | 18 ++++------------- Makefile | 17 +++------------- bender_common.mk | 17 ++++------------ bender_sim.mk | 16 ++++----------- bender_synth.mk | 16 ++++----------- golden-model/FP16/scripts/addmax.py | 17 +++------------- golden-model/FP16/scripts/addmin.py | 17 +++------------- golden-model/FP16/scripts/dump_utils.py | 17 +++------------- golden-model/FP16/scripts/gemm.py | 17 +++------------- golden-model/FP16/scripts/maxmin.py | 17 +++------------- golden-model/FP16/scripts/minmax.py | 17 +++------------- golden-model/FP16/scripts/mulmax.py | 17 +++------------- golden-model/FP16/scripts/mulmin.py | 17 +++------------- golden-model/FP8/scripts/addmax.py | 17 +++------------- golden-model/FP8/scripts/addmin.py | 17 +++------------- golden-model/FP8/scripts/dump_utils.py | 17 +++------------- golden-model/FP8/scripts/gemm.py | 17 +++------------- golden-model/FP8/scripts/maxmin.py | 17 +++------------- golden-model/FP8/scripts/minmax.py | 17 +++------------- golden-model/FP8/scripts/mulmax.py | 17 +++------------- golden-model/FP8/scripts/mulmin.py | 17 +++------------- golden-model/Makefile | 17 +++------------- golden-model/setup-py.sh | 7 +++++++ rtl/redmule_castin.sv | 26 ++++++------------------ rtl/redmule_castout.sv | 26 ++++++------------------ rtl/redmule_ce.sv | 26 ++++++------------------ rtl/redmule_complex.sv | 26 ++++++------------------ rtl/redmule_complex_wrap.sv | 26 ++++++------------------ rtl/redmule_ctrl.sv | 26 ++++++------------------ rtl/redmule_engine.sv | 26 ++++++------------------ rtl/redmule_fma.sv | 14 ++++--------- rtl/redmule_inst_decoder.sv | 26 ++++++------------------ rtl/redmule_noncomp.sv | 14 ++++--------- rtl/redmule_pkg.sv | 26 ++++++------------------ rtl/redmule_row.sv | 26 ++++++------------------ rtl/redmule_scheduler.sv | 26 ++++++------------------ rtl/redmule_streamer.sv | 26 ++++++------------------ rtl/redmule_tiler.sv | 27 ++++++------------------- rtl/redmule_top.sv | 26 ++++++------------------ rtl/redmule_w_buffer.sv | 26 ++++++------------------ rtl/redmule_wrap.sv | 26 ++++++------------------ rtl/redmule_x_buffer.sv | 26 ++++++------------------ rtl/redmule_z_buffer.sv | 26 ++++++------------------ scripts/non-regression_test.sh | 7 +++++++ scripts/parse_s19.pl | 19 ++++------------- scripts/s19tomem.py | 18 ++++------------- scripts/setup-complex.sh | 7 +++++++ scripts/setup-hwpe.sh | 7 +++++++ scripts/setup64.sh | 7 +++++++ sw/archi_redmule.h | 27 ++++++------------------- sw/hal_redmule.h | 26 ++++++------------------ sw/kernel/crt0.S | 27 ++++++------------------- sw/kernel/link.ld | 18 ++++------------- sw/redmule.c | 26 ++++++------------------ sw/redmule_complex.c | 26 ++++++------------------ sw/utils/redmule_utils.h | 25 ++++++----------------- tb/redmule_complex_tb.sv | 22 ++++++-------------- tb/redmule_tb.sv | 22 ++++++-------------- tb/tb_dummy_memory.sv | 23 ++++++--------------- 60 files changed, 294 insertions(+), 897 deletions(-) diff --git a/Bender.local b/Bender.local index 95988cd..8f27a73 100644 --- a/Bender.local +++ b/Bender.local @@ -1,2 +1,9 @@ +# Copyright 2023 ETH Zurich and University of Bologna. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. +# SPDX-License-Identifier: Apache-2.0 +# +# Yvan Tortorella +# + overrides: fpnew: { git: "https://github.com/pulp-platform/cvfpu.git", rev: "pulp-v0.1.3" } \ No newline at end of file diff --git a/Bender.yml b/Bender.yml index e32da41..dc279d3 100644 --- a/Bender.yml +++ b/Bender.yml @@ -1,18 +1,8 @@ -# Copyright (C) 2022-2023 ETH Zurich and University of Bologna -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# Copyright 2023 ETH Zurich and University of Bologna. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. +# SPDX-License-Identifier: Apache-2.0 # -# Author: Yvan Tortorella (yvan.tortorella@unibo.it) +# Yvan Tortorella # # Bender manifest diff --git a/Makefile b/Makefile index a9e032e..b7b9d21 100644 --- a/Makefile +++ b/Makefile @@ -1,19 +1,8 @@ -# Copyright (C) 2022-2023 ETH Zurich and University of Bologna -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# Copyright 2023 ETH Zurich and University of Bologna. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. # SPDX-License-Identifier: Apache-2.0 # -# Author: Yvan Tortorella (yvan.tortorella@unibo.it) +# Yvan Tortorella # # Top-level Makefile diff --git a/bender_common.mk b/bender_common.mk index a7f7b06..6db9d1a 100644 --- a/bender_common.mk +++ b/bender_common.mk @@ -1,18 +1,9 @@ -# Copyright (C) 2022-2023 ETH Zurich and University of Bologna -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# Copyright 2023 ETH Zurich and University of Bologna. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. # SPDX-License-Identifier: Apache-2.0 # +# Yvan Tortorella +# common_targs += -t cv32e40p_exclude_tracer diff --git a/bender_sim.mk b/bender_sim.mk index 477c788..e9c74cf 100644 --- a/bender_sim.mk +++ b/bender_sim.mk @@ -1,17 +1,9 @@ -# Copyright (C) 2022-2023 ETH Zurich and University of Bologna -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# Copyright 2023 ETH Zurich and University of Bologna. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. +# SPDX-License-Identifier: Apache-2.0 # -# http://www.apache.org/licenses/LICENSE-2.0 +# Yvan Tortorella # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# SPDX-License-Identifier: Apache-2.0 sim_targs += -t rtl sim_targs += -t test diff --git a/bender_synth.mk b/bender_synth.mk index 80bde9e..85f989a 100644 --- a/bender_synth.mk +++ b/bender_synth.mk @@ -1,17 +1,9 @@ -# Copyright (C) 2022-2023 ETH Zurich and University of Bologna -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# Copyright 2023 ETH Zurich and University of Bologna. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. +# SPDX-License-Identifier: Apache-2.0 # -# http://www.apache.org/licenses/LICENSE-2.0 +# Yvan Tortorella # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# SPDX-License-Identifier: Apache-2.0 synth_targs += diff --git a/golden-model/FP16/scripts/addmax.py b/golden-model/FP16/scripts/addmax.py index 1c3f8ba..63b6154 100644 --- a/golden-model/FP16/scripts/addmax.py +++ b/golden-model/FP16/scripts/addmax.py @@ -1,19 +1,8 @@ -# Copyright (C) 2022-2023 ETH Zurich and University of Bologna -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# Copyright 2023 ETH Zurich and University of Bologna. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. # SPDX-License-Identifier: Apache-2.0 # -# Author: Yvan Tortorella (yvan.tortorella@unibo.it) +# Yvan Tortorella # import numpy as np diff --git a/golden-model/FP16/scripts/addmin.py b/golden-model/FP16/scripts/addmin.py index a3842e1..3923771 100644 --- a/golden-model/FP16/scripts/addmin.py +++ b/golden-model/FP16/scripts/addmin.py @@ -1,19 +1,8 @@ -# Copyright (C) 2022-2023 ETH Zurich and University of Bologna -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# Copyright 2023 ETH Zurich and University of Bologna. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. # SPDX-License-Identifier: Apache-2.0 # -# Author: Yvan Tortorella (yvan.tortorella@unibo.it) +# Yvan Tortorella # import numpy as np diff --git a/golden-model/FP16/scripts/dump_utils.py b/golden-model/FP16/scripts/dump_utils.py index 95f5151..becfa28 100644 --- a/golden-model/FP16/scripts/dump_utils.py +++ b/golden-model/FP16/scripts/dump_utils.py @@ -1,19 +1,8 @@ -# Copyright (C) 2022-2023 ETH Zurich and University of Bologna -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# Copyright 2023 ETH Zurich and University of Bologna. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. # SPDX-License-Identifier: Apache-2.0 # -# Author: Yvan Tortorella (yvan.tortorella@unibo.it) +# Yvan Tortorella # import torch diff --git a/golden-model/FP16/scripts/gemm.py b/golden-model/FP16/scripts/gemm.py index c714eb9..29bae10 100644 --- a/golden-model/FP16/scripts/gemm.py +++ b/golden-model/FP16/scripts/gemm.py @@ -1,19 +1,8 @@ -# Copyright (C) 2022-2023 ETH Zurich and University of Bologna -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# Copyright 2023 ETH Zurich and University of Bologna. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. # SPDX-License-Identifier: Apache-2.0 # -# Author: Yvan Tortorella (yvan.tortorella@unibo.it) +# Yvan Tortorella # import numpy as np diff --git a/golden-model/FP16/scripts/maxmin.py b/golden-model/FP16/scripts/maxmin.py index be3934c..7fc7e0d 100644 --- a/golden-model/FP16/scripts/maxmin.py +++ b/golden-model/FP16/scripts/maxmin.py @@ -1,19 +1,8 @@ -# Copyright (C) 2022-2023 ETH Zurich and University of Bologna -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# Copyright 2023 ETH Zurich and University of Bologna. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. # SPDX-License-Identifier: Apache-2.0 # -# Author: Yvan Tortorella (yvan.tortorella@unibo.it) +# Yvan Tortorella # import numpy as np diff --git a/golden-model/FP16/scripts/minmax.py b/golden-model/FP16/scripts/minmax.py index 6fea4fe..fef363c 100644 --- a/golden-model/FP16/scripts/minmax.py +++ b/golden-model/FP16/scripts/minmax.py @@ -1,19 +1,8 @@ -# Copyright (C) 2022-2023 ETH Zurich and University of Bologna -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# Copyright 2023 ETH Zurich and University of Bologna. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. # SPDX-License-Identifier: Apache-2.0 # -# Author: Yvan Tortorella (yvan.tortorella@unibo.it) +# Yvan Tortorella # import numpy as np diff --git a/golden-model/FP16/scripts/mulmax.py b/golden-model/FP16/scripts/mulmax.py index b33f0e9..64d8555 100644 --- a/golden-model/FP16/scripts/mulmax.py +++ b/golden-model/FP16/scripts/mulmax.py @@ -1,19 +1,8 @@ -# Copyright (C) 2022-2023 ETH Zurich and University of Bologna -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# Copyright 2023 ETH Zurich and University of Bologna. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. # SPDX-License-Identifier: Apache-2.0 # -# Author: Yvan Tortorella (yvan.tortorella@unibo.it) +# Yvan Tortorella # import numpy as np diff --git a/golden-model/FP16/scripts/mulmin.py b/golden-model/FP16/scripts/mulmin.py index 47d925f..e014ace 100644 --- a/golden-model/FP16/scripts/mulmin.py +++ b/golden-model/FP16/scripts/mulmin.py @@ -1,19 +1,8 @@ -# Copyright (C) 2022-2023 ETH Zurich and University of Bologna -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# Copyright 2023 ETH Zurich and University of Bologna. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. # SPDX-License-Identifier: Apache-2.0 # -# Author: Yvan Tortorella (yvan.tortorella@unibo.it) +# Yvan Tortorella # import numpy as np diff --git a/golden-model/FP8/scripts/addmax.py b/golden-model/FP8/scripts/addmax.py index a2d3e6d..303916f 100644 --- a/golden-model/FP8/scripts/addmax.py +++ b/golden-model/FP8/scripts/addmax.py @@ -1,19 +1,8 @@ -# Copyright (C) 2022-2023 ETH Zurich and University of Bologna -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# Copyright 2023 ETH Zurich and University of Bologna. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. # SPDX-License-Identifier: Apache-2.0 # -# Author: Yvan Tortorella (yvan.tortorella@unibo.it) +# Yvan Tortorella # import numpy as np diff --git a/golden-model/FP8/scripts/addmin.py b/golden-model/FP8/scripts/addmin.py index aeaf4e8..20b961b 100644 --- a/golden-model/FP8/scripts/addmin.py +++ b/golden-model/FP8/scripts/addmin.py @@ -1,19 +1,8 @@ -# Copyright (C) 2022-2023 ETH Zurich and University of Bologna -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# Copyright 2023 ETH Zurich and University of Bologna. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. # SPDX-License-Identifier: Apache-2.0 # -# Author: Yvan Tortorella (yvan.tortorella@unibo.it) +# Yvan Tortorella # import numpy as np diff --git a/golden-model/FP8/scripts/dump_utils.py b/golden-model/FP8/scripts/dump_utils.py index 95f5151..becfa28 100644 --- a/golden-model/FP8/scripts/dump_utils.py +++ b/golden-model/FP8/scripts/dump_utils.py @@ -1,19 +1,8 @@ -# Copyright (C) 2022-2023 ETH Zurich and University of Bologna -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# Copyright 2023 ETH Zurich and University of Bologna. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. # SPDX-License-Identifier: Apache-2.0 # -# Author: Yvan Tortorella (yvan.tortorella@unibo.it) +# Yvan Tortorella # import torch diff --git a/golden-model/FP8/scripts/gemm.py b/golden-model/FP8/scripts/gemm.py index c03e0f6..0cec545 100644 --- a/golden-model/FP8/scripts/gemm.py +++ b/golden-model/FP8/scripts/gemm.py @@ -1,19 +1,8 @@ -# Copyright (C) 2022-2023 ETH Zurich and University of Bologna -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# Copyright 2023 ETH Zurich and University of Bologna. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. # SPDX-License-Identifier: Apache-2.0 # -# Author: Yvan Tortorella (yvan.tortorella@unibo.it) +# Yvan Tortorella # import numpy as np diff --git a/golden-model/FP8/scripts/maxmin.py b/golden-model/FP8/scripts/maxmin.py index 5e5222a..b1ef179 100644 --- a/golden-model/FP8/scripts/maxmin.py +++ b/golden-model/FP8/scripts/maxmin.py @@ -1,19 +1,8 @@ -# Copyright (C) 2022-2023 ETH Zurich and University of Bologna -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# Copyright 2023 ETH Zurich and University of Bologna. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. # SPDX-License-Identifier: Apache-2.0 # -# Author: Yvan Tortorella (yvan.tortorella@unibo.it) +# Yvan Tortorella # import numpy as np diff --git a/golden-model/FP8/scripts/minmax.py b/golden-model/FP8/scripts/minmax.py index 415f5ea..3dc9106 100644 --- a/golden-model/FP8/scripts/minmax.py +++ b/golden-model/FP8/scripts/minmax.py @@ -1,19 +1,8 @@ -# Copyright (C) 2022-2023 ETH Zurich and University of Bologna -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# Copyright 2023 ETH Zurich and University of Bologna. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. # SPDX-License-Identifier: Apache-2.0 # -# Author: Yvan Tortorella (yvan.tortorella@unibo.it) +# Yvan Tortorella # import numpy as np diff --git a/golden-model/FP8/scripts/mulmax.py b/golden-model/FP8/scripts/mulmax.py index 77a09d4..c7f7250 100644 --- a/golden-model/FP8/scripts/mulmax.py +++ b/golden-model/FP8/scripts/mulmax.py @@ -1,19 +1,8 @@ -# Copyright (C) 2022-2023 ETH Zurich and University of Bologna -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# Copyright 2023 ETH Zurich and University of Bologna. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. # SPDX-License-Identifier: Apache-2.0 # -# Author: Yvan Tortorella (yvan.tortorella@unibo.it) +# Yvan Tortorella # import numpy as np diff --git a/golden-model/FP8/scripts/mulmin.py b/golden-model/FP8/scripts/mulmin.py index 2c50042..0e935d4 100644 --- a/golden-model/FP8/scripts/mulmin.py +++ b/golden-model/FP8/scripts/mulmin.py @@ -1,19 +1,8 @@ -# Copyright (C) 2022-2023 ETH Zurich and University of Bologna -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# Copyright 2023 ETH Zurich and University of Bologna. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. # SPDX-License-Identifier: Apache-2.0 # -# Author: Yvan Tortorella (yvan.tortorella@unibo.it) +# Yvan Tortorella # import numpy as np diff --git a/golden-model/Makefile b/golden-model/Makefile index e3e0e39..db675d3 100644 --- a/golden-model/Makefile +++ b/golden-model/Makefile @@ -1,19 +1,8 @@ -# Copyright (C) 2022-2023 ETH Zurich and University of Bologna -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# Copyright 2023 ETH Zurich and University of Bologna. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. # SPDX-License-Identifier: Apache-2.0 # -# Author: Yvan Tortorella (yvan.tortorella@unibo.it) +# Yvan Tortorella # # RedMulE Golden Model Makefile diff --git a/golden-model/setup-py.sh b/golden-model/setup-py.sh index b3251c6..9ac81f7 100755 --- a/golden-model/setup-py.sh +++ b/golden-model/setup-py.sh @@ -1,3 +1,10 @@ +# Copyright 2023 ETH Zurich and University of Bologna. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. +# SPDX-License-Identifier: Apache-2.0 +# +# Yvan Tortorella +# + export PYTHON=python3 export PENV=$(pwd)/venv $PYTHON -m venv $PENV diff --git a/rtl/redmule_castin.sv b/rtl/redmule_castin.sv index 47a7716..6252be4 100644 --- a/rtl/redmule_castin.sv +++ b/rtl/redmule_castin.sv @@ -1,23 +1,9 @@ -/* - * Copyright (C) 2022-2023 ETH Zurich and University of Bologna - * - * Licensed under the Solderpad Hardware License, Version 0.51 - * (the "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * SPDX-License-Identifier: SHL-0.51 - * - * Authors: Yvan Tortorella - * - * RedMulE Input Cast Unit - */ +// Copyright 2023 ETH Zurich and University of Bologna. +// Solderpad Hardware License, Version 0.51, see LICENSE for details. +// SPDX-License-Identifier: SHL-0.51 +// +// Yvan Tortorella +// import fpnew_pkg::*; import hci_package::*; diff --git a/rtl/redmule_castout.sv b/rtl/redmule_castout.sv index f7e5507..1ce759a 100644 --- a/rtl/redmule_castout.sv +++ b/rtl/redmule_castout.sv @@ -1,23 +1,9 @@ -/* - * Copyright (C) 2022-2023 ETH Zurich and University of Bologna - * - * Licensed under the Solderpad Hardware License, Version 0.51 - * (the "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * SPDX-License-Identifier: SHL-0.51 - * - * Authors: Yvan Tortorella - * - * RedMulE Output Cast Unit - */ +// Copyright 2023 ETH Zurich and University of Bologna. +// Solderpad Hardware License, Version 0.51, see LICENSE for details. +// SPDX-License-Identifier: SHL-0.51 +// +// Yvan Tortorella +// import fpnew_pkg::*; import hci_package::*; diff --git a/rtl/redmule_ce.sv b/rtl/redmule_ce.sv index 965aea6..cea88f0 100644 --- a/rtl/redmule_ce.sv +++ b/rtl/redmule_ce.sv @@ -1,23 +1,9 @@ -/* - * Copyright (C) 2022-2023 ETH Zurich and University of Bologna - * - * Licensed under the Solderpad Hardware License, Version 0.51 - * (the "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * SPDX-License-Identifier: SHL-0.51 - * - * Authors: Yvan Tortorella - * - * RedMulE Computing Element (CE) - */ +// Copyright 2023 ETH Zurich and University of Bologna. +// Solderpad Hardware License, Version 0.51, see LICENSE for details. +// SPDX-License-Identifier: SHL-0.51 +// +// Yvan Tortorella +// module redmule_ce import fpnew_pkg::*; diff --git a/rtl/redmule_complex.sv b/rtl/redmule_complex.sv index 9a94aa0..caa7e57 100644 --- a/rtl/redmule_complex.sv +++ b/rtl/redmule_complex.sv @@ -1,23 +1,9 @@ -/* - * Copyright (C) 2022-2023 ETH Zurich and University of Bologna - * - * Licensed under the Solderpad Hardware License, Version 0.51 - * (the "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * SPDX-License-Identifier: SHL-0.51 - * - * Authors: Yvan Tortorella - * - * RedMulE Complex Core - */ +// Copyright 2023 ETH Zurich and University of Bologna. +// Solderpad Hardware License, Version 0.51, see LICENSE for details. +// SPDX-License-Identifier: SHL-0.51 +// +// Yvan Tortorella +// `include "hwpe-ctrl/typedef.svh" diff --git a/rtl/redmule_complex_wrap.sv b/rtl/redmule_complex_wrap.sv index dec43a2..61b42c7 100644 --- a/rtl/redmule_complex_wrap.sv +++ b/rtl/redmule_complex_wrap.sv @@ -1,23 +1,9 @@ -/* - * Copyright (C) 2022-2023 ETH Zurich and University of Bologna - * - * Licensed under the Solderpad Hardware License, Version 0.51 - * (the "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * SPDX-License-Identifier: SHL-0.51 - * - * Authors: Yvan Tortorella - * - * RedMulE Complex Core Wrap - */ +// Copyright 2023 ETH Zurich and University of Bologna. +// Solderpad Hardware License, Version 0.51, see LICENSE for details. +// SPDX-License-Identifier: SHL-0.51 +// +// Yvan Tortorella +// module redmule_complex_wrap import redmule_pkg::*; diff --git a/rtl/redmule_ctrl.sv b/rtl/redmule_ctrl.sv index 3e7633c..23b091e 100644 --- a/rtl/redmule_ctrl.sv +++ b/rtl/redmule_ctrl.sv @@ -1,23 +1,9 @@ -/* - * Copyright (C) 2022-2023 ETH Zurich and University of Bologna - * - * Licensed under the Solderpad Hardware License, Version 0.51 - * (the "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * SPDX-License-Identifier: SHL-0.51 - * - * Authors: Yvan Tortorella - * - * RedMulE Control Unit - */ +// Copyright 2023 ETH Zurich and University of Bologna. +// Solderpad Hardware License, Version 0.51, see LICENSE for details. +// SPDX-License-Identifier: SHL-0.51 +// +// Yvan Tortorella +// import redmule_pkg::*; diff --git a/rtl/redmule_engine.sv b/rtl/redmule_engine.sv index a5c3ad5..440f90d 100644 --- a/rtl/redmule_engine.sv +++ b/rtl/redmule_engine.sv @@ -1,23 +1,9 @@ -/* - * Copyright (C) 2022-2023 ETH Zurich and University of Bologna - * - * Licensed under the Solderpad Hardware License, Version 0.51 - * (the "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * SPDX-License-Identifier: SHL-0.51 - * - * Authors: Yvan Tortorella - * - * RedMulE Engine - */ +// Copyright 2023 ETH Zurich and University of Bologna. +// Solderpad Hardware License, Version 0.51, see LICENSE for details. +// SPDX-License-Identifier: SHL-0.51 +// +// Yvan Tortorella +// module redmule_engine import fpnew_pkg::*; diff --git a/rtl/redmule_fma.sv b/rtl/redmule_fma.sv index 630715c..bfb1c07 100644 --- a/rtl/redmule_fma.sv +++ b/rtl/redmule_fma.sv @@ -1,15 +1,9 @@ -// Copyright 2019 ETH Zurich and University of Bologna. +// Copyright 2023 ETH Zurich and University of Bologna. +// Solderpad Hardware License, Version 0.51, see LICENSE for details. +// SPDX-License-Identifier: SHL-0.51 // -// Copyright and related rights are licensed under the Solderpad Hardware -// License, Version 0.51 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://solderpad.org/licenses/SHL-0.51. Unless required by applicable law -// or agreed to in writing, software, hardware and materials distributed under -// this License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Yvan Tortorella // -// SPDX-License-Identifier: SHL-0.51 `include "common_cells/registers.svh" diff --git a/rtl/redmule_inst_decoder.sv b/rtl/redmule_inst_decoder.sv index fb063da..fc8e2dd 100644 --- a/rtl/redmule_inst_decoder.sv +++ b/rtl/redmule_inst_decoder.sv @@ -1,23 +1,9 @@ -/* - * Copyright (C) 2022-2023 ETH Zurich and University of Bologna - * - * Licensed under the Solderpad Hardware License, Version 0.51 - * (the "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * SPDX-License-Identifier: SHL-0.51 - * - * Authors: Yvan Tortorella - * - * RedMulE Instruction Decoder - */ +// Copyright 2023 ETH Zurich and University of Bologna. +// Solderpad Hardware License, Version 0.51, see LICENSE for details. +// SPDX-License-Identifier: SHL-0.51 +// +// Yvan Tortorella +// module redmule_inst_decoder import redmule_pkg::*; diff --git a/rtl/redmule_noncomp.sv b/rtl/redmule_noncomp.sv index 22e54b9..31020ad 100644 --- a/rtl/redmule_noncomp.sv +++ b/rtl/redmule_noncomp.sv @@ -1,15 +1,9 @@ -// Copyright 2019 ETH Zurich and University of Bologna. +// Copyright 2023 ETH Zurich and University of Bologna. +// Solderpad Hardware License, Version 0.51, see LICENSE for details. +// SPDX-License-Identifier: SHL-0.51 // -// Copyright and related rights are licensed under the Solderpad Hardware -// License, Version 0.51 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://solderpad.org/licenses/SHL-0.51. Unless required by applicable law -// or agreed to in writing, software, hardware and materials distributed under -// this License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Yvan Tortorella // -// SPDX-License-Identifier: SHL-0.51 `include "common_cells/registers.svh" diff --git a/rtl/redmule_pkg.sv b/rtl/redmule_pkg.sv index 8e7eb08..b60aa0e 100644 --- a/rtl/redmule_pkg.sv +++ b/rtl/redmule_pkg.sv @@ -1,23 +1,9 @@ -/* - * Copyright (C) 2022-2023 ETH Zurich and University of Bologna - * - * Licensed under the Solderpad Hardware License, Version 0.51 - * (the "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * SPDX-License-Identifier: SHL-0.51 - * - * Authors: Yvan Tortorella - * - * RedMulE Package - */ +// Copyright 2023 ETH Zurich and University of Bologna. +// Solderpad Hardware License, Version 0.51, see LICENSE for details. +// SPDX-License-Identifier: SHL-0.51 +// +// Yvan Tortorella +// `include "hci/typedef.svh" `include "hci/assign.svh" diff --git a/rtl/redmule_row.sv b/rtl/redmule_row.sv index ce79f91..c7a790b 100644 --- a/rtl/redmule_row.sv +++ b/rtl/redmule_row.sv @@ -1,23 +1,9 @@ -/* - * Copyright (C) 2022-2023 ETH Zurich and University of Bologna - * - * Licensed under the Solderpad Hardware License, Version 0.51 - * (the "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * SPDX-License-Identifier: SHL-0.51 - * - * Authors: Yvan Tortorella - * - * RedMulE Row of Computing Elements - */ +// Copyright 2023 ETH Zurich and University of Bologna. +// Solderpad Hardware License, Version 0.51, see LICENSE for details. +// SPDX-License-Identifier: SHL-0.51 +// +// Yvan Tortorella +// module redmule_row import fpnew_pkg::*; diff --git a/rtl/redmule_scheduler.sv b/rtl/redmule_scheduler.sv index 25ada86..f0aa2d4 100644 --- a/rtl/redmule_scheduler.sv +++ b/rtl/redmule_scheduler.sv @@ -1,23 +1,9 @@ -/* - * Copyright (C) 2022-2023 ETH Zurich and University of Bologna - * - * Licensed under the Solderpad Hardware License, Version 0.51 - * (the "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * SPDX-License-Identifier: SHL-0.51 - * - * Authors: Yvan Tortorella - * - * RedMulE Scheduler - */ +// Copyright 2023 ETH Zurich and University of Bologna. +// Solderpad Hardware License, Version 0.51, see LICENSE for details. +// SPDX-License-Identifier: SHL-0.51 +// +// Yvan Tortorella +// module redmule_scheduler import fpnew_pkg::*; diff --git a/rtl/redmule_streamer.sv b/rtl/redmule_streamer.sv index e5ccd7f..61f5958 100644 --- a/rtl/redmule_streamer.sv +++ b/rtl/redmule_streamer.sv @@ -1,23 +1,9 @@ -/* - * Copyright (C) 2022-2023 ETH Zurich and University of Bologna - * - * Licensed under the Solderpad Hardware License, Version 0.51 - * (the "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * SPDX-License-Identifier: SHL-0.51 - * - * Authors: Yvan Tortorella - * - * RedMulE Streamer - */ +// Copyright 2023 ETH Zurich and University of Bologna. +// Solderpad Hardware License, Version 0.51, see LICENSE for details. +// SPDX-License-Identifier: SHL-0.51 +// +// Yvan Tortorella +// module redmule_streamer import fpnew_pkg::*; diff --git a/rtl/redmule_tiler.sv b/rtl/redmule_tiler.sv index b2cdfed..feee6e0 100644 --- a/rtl/redmule_tiler.sv +++ b/rtl/redmule_tiler.sv @@ -1,24 +1,9 @@ -/* - * Copyright (C) 2022-2023 ETH Zurich and University of Bologna - * - * Licensed under the Solderpad Hardware License, Version 0.51 - * (the "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * SPDX-License-Identifier: SHL-0.51 - * - * Authors: Yvan Tortorella - * Francesco Conti - * - * RedMulE Tiler - */ +// Copyright 2023 ETH Zurich and University of Bologna. +// Solderpad Hardware License, Version 0.51, see LICENSE for details. +// SPDX-License-Identifier: SHL-0.51 +// +// Yvan Tortorella +// Francesco Conti module redmule_tiler import redmule_pkg::*; diff --git a/rtl/redmule_top.sv b/rtl/redmule_top.sv index edf9b5a..e459d99 100644 --- a/rtl/redmule_top.sv +++ b/rtl/redmule_top.sv @@ -1,23 +1,9 @@ -/* - * Copyright (C) 2022-2023 ETH Zurich and University of Bologna - * - * Licensed under the Solderpad Hardware License, Version 0.51 - * (the "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * SPDX-License-Identifier: SHL-0.51 - * - * Authors: Yvan Tortorella - * - * RedMulE Top-Level Module - */ +// Copyright 2023 ETH Zurich and University of Bologna. +// Solderpad Hardware License, Version 0.51, see LICENSE for details. +// SPDX-License-Identifier: SHL-0.51 +// +// Yvan Tortorella +// `include "hci/typedef.svh" `include "hci/assign.svh" diff --git a/rtl/redmule_w_buffer.sv b/rtl/redmule_w_buffer.sv index 78d9cea..a72b6c9 100644 --- a/rtl/redmule_w_buffer.sv +++ b/rtl/redmule_w_buffer.sv @@ -1,23 +1,9 @@ -/* - * Copyright (C) 2022-2023 ETH Zurich and University of Bologna - * - * Licensed under the Solderpad Hardware License, Version 0.51 - * (the "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * SPDX-License-Identifier: SHL-0.51 - * - * Authors: Yvan Tortorella - * - * RedMulE W Buffer - */ +// Copyright 2023 ETH Zurich and University of Bologna. +// Solderpad Hardware License, Version 0.51, see LICENSE for details. +// SPDX-License-Identifier: SHL-0.51 +// +// Yvan Tortorella +// module redmule_w_buffer import fpnew_pkg::*; diff --git a/rtl/redmule_wrap.sv b/rtl/redmule_wrap.sv index 25fa668..2a226ce 100644 --- a/rtl/redmule_wrap.sv +++ b/rtl/redmule_wrap.sv @@ -1,23 +1,9 @@ -/* - * Copyright (C) 2022-2023 ETH Zurich and University of Bologna - * - * Licensed under the Solderpad Hardware License, Version 0.51 - * (the "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * SPDX-License-Identifier: SHL-0.51 - * - * Authors: Yvan Tortorella - * - * RedMulE Wrapper - */ +// Copyright 2023 ETH Zurich and University of Bologna. +// Solderpad Hardware License, Version 0.51, see LICENSE for details. +// SPDX-License-Identifier: SHL-0.51 +// +// Yvan Tortorella +// `include "hci/typedef.svh" `include "hci/assign.svh" diff --git a/rtl/redmule_x_buffer.sv b/rtl/redmule_x_buffer.sv index e6448b8..231506b 100644 --- a/rtl/redmule_x_buffer.sv +++ b/rtl/redmule_x_buffer.sv @@ -1,23 +1,9 @@ -/* - * Copyright (C) 2022-2023 ETH Zurich and University of Bologna - * - * Licensed under the Solderpad Hardware License, Version 0.51 - * (the "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * SPDX-License-Identifier: SHL-0.51 - * - * Authors: Yvan Tortorella - * - * RedMulE X Buffer - */ +// Copyright 2023 ETH Zurich and University of Bologna. +// Solderpad Hardware License, Version 0.51, see LICENSE for details. +// SPDX-License-Identifier: SHL-0.51 +// +// Yvan Tortorella +// module redmule_x_buffer import fpnew_pkg::*; diff --git a/rtl/redmule_z_buffer.sv b/rtl/redmule_z_buffer.sv index b25714b..95b424a 100644 --- a/rtl/redmule_z_buffer.sv +++ b/rtl/redmule_z_buffer.sv @@ -1,23 +1,9 @@ -/* - * Copyright (C) 2022-2023 ETH Zurich and University of Bologna - * - * Licensed under the Solderpad Hardware License, Version 0.51 - * (the "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * SPDX-License-Identifier: SHL-0.51 - * - * Authors: Yvan Tortorella - * - * RedMulE Z Buffer - */ +// Copyright 2023 ETH Zurich and University of Bologna. +// Solderpad Hardware License, Version 0.51, see LICENSE for details. +// SPDX-License-Identifier: SHL-0.51 +// +// Yvan Tortorella +// module redmule_z_buffer import fpnew_pkg::*; diff --git a/scripts/non-regression_test.sh b/scripts/non-regression_test.sh index 313e181..37b00e8 100755 --- a/scripts/non-regression_test.sh +++ b/scripts/non-regression_test.sh @@ -1,3 +1,10 @@ +# Copyright 2023 ETH Zurich and University of Bologna. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. +# SPDX-License-Identifier: Apache-2.0 +# +# Yvan Tortorella +# + #!/bin/bash Red="\e[31m" Green="\e[32m" diff --git a/scripts/parse_s19.pl b/scripts/parse_s19.pl index b7897b7..aa99782 100755 --- a/scripts/parse_s19.pl +++ b/scripts/parse_s19.pl @@ -1,20 +1,9 @@ -#!/usr/bin/perl -w -# -# Copyright (C) 2018-2019 ETH Zurich and University of Bologna -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# Copyright 2023 ETH Zurich and University of Bologna. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. # SPDX-License-Identifier: Apache-2.0 # +# Yvan Tortorella +# use strict; diff --git a/scripts/s19tomem.py b/scripts/s19tomem.py index 744c3f3..56be50b 100644 --- a/scripts/s19tomem.py +++ b/scripts/s19tomem.py @@ -1,19 +1,9 @@ -# -# Copyright (C) 2018-2019 ETH Zurich and University of Bologna -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# Copyright 2023 ETH Zurich and University of Bologna. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. # SPDX-License-Identifier: Apache-2.0 # +# Yvan Tortorella +# import numpy as np import sys diff --git a/scripts/setup-complex.sh b/scripts/setup-complex.sh index c48ef6f..5ca7551 100644 --- a/scripts/setup-complex.sh +++ b/scripts/setup-complex.sh @@ -1,3 +1,10 @@ +# Copyright 2023 ETH Zurich and University of Bologna. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. +# SPDX-License-Identifier: Apache-2.0 +# +# Yvan Tortorella +# + export BENDER_DIR=$(pwd)/hw/bender echo "Exporting bender path to $BENDER_DIR" export PATH=$BENDER_DIR:$PATH diff --git a/scripts/setup-hwpe.sh b/scripts/setup-hwpe.sh index 84c100c..5570f6c 100644 --- a/scripts/setup-hwpe.sh +++ b/scripts/setup-hwpe.sh @@ -1,3 +1,10 @@ +# Copyright 2023 ETH Zurich and University of Bologna. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. +# SPDX-License-Identifier: Apache-2.0 +# +# Yvan Tortorella +# + export BENDER_DIR=$(pwd)/hw/bender echo "Exporting bender path to $BENDER_DIR" export PATH=$BENDER_DIR:$PATH diff --git a/scripts/setup64.sh b/scripts/setup64.sh index ccf1155..0913577 100644 --- a/scripts/setup64.sh +++ b/scripts/setup64.sh @@ -1,3 +1,10 @@ +# Copyright 2023 ETH Zurich and University of Bologna. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. +# SPDX-License-Identifier: Apache-2.0 +# +# Yvan Tortorella +# + export BENDER_DIR=$(pwd)/hw/bender echo "Exporting bender path to $BENDER_DIR" export PATH=$BENDER_DIR:$PATH diff --git a/sw/archi_redmule.h b/sw/archi_redmule.h index 99c2988..9e74220 100644 --- a/sw/archi_redmule.h +++ b/sw/archi_redmule.h @@ -1,24 +1,9 @@ -/* - * Copyright (C) 2022-2023 ETH Zurich and University of Bologna - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * SPDX-License-Identifier: Apache-2.0 - * - * Author: Yvan Tortorella - * - * High-level architecture of RedMulE - * - */ +// Copyright 2023 ETH Zurich and University of Bologna. +// Licensed under the Apache License, Version 2.0, see LICENSE for details. +// SPDX-License-Identifier: Apache-2.0 +// +// Yvan Tortorella +// #ifndef __ARCHI_REDMULE_H__ #define __ARCHI_REDMULE_H__ diff --git a/sw/hal_redmule.h b/sw/hal_redmule.h index 1a07fa6..a552480 100644 --- a/sw/hal_redmule.h +++ b/sw/hal_redmule.h @@ -1,23 +1,9 @@ -/* - * Copyright (C) 2022-2023 ETH Zurich and University of Bologna - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * SPDX-License-Identifier: Apache-2.0 - * - * Author: Yvan Tortorella - * - * RedMulE Hardware Abstraction Layer (HAL) - */ +// Copyright 2023 ETH Zurich and University of Bologna. +// Licensed under the Apache License, Version 2.0, see LICENSE for details. +// SPDX-License-Identifier: Apache-2.0 +// +// Yvan Tortorella +// #ifndef __HAL_REDMULE_H__ #define __HAL_REDMULE_H__ diff --git a/sw/kernel/crt0.S b/sw/kernel/crt0.S index 42a2474..2fb1964 100644 --- a/sw/kernel/crt0.S +++ b/sw/kernel/crt0.S @@ -1,24 +1,9 @@ -/* - * Copyright (C) 2018-2019 ETH Zurich and University of Bologna - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * SPDX-License-Identifier: Apache-2.0 - */ - -/* - * Authors: Germain Haugou, ETH (germain.haugou@iis.ee.ethz.ch) - * Francesco Conti, ETHZ & UNIBO - */ +// Copyright 2023 ETH Zurich and University of Bologna. +// Licensed under the Apache License, Version 2.0, see LICENSE for details. +// SPDX-License-Identifier: Apache-2.0 +// +// Yvan Tortorella +// .section .text .global _start diff --git a/sw/kernel/link.ld b/sw/kernel/link.ld index 6fc2078..c82b352 100644 --- a/sw/kernel/link.ld +++ b/sw/kernel/link.ld @@ -1,18 +1,8 @@ -/* - * Copyright (C) 2018-2019 ETH Zurich and University of Bologna - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. +/* Copyright 2023 ETH Zurich and University of Bologna. + * Licensed under the Apache License, Version 2.0, see LICENSE for details. * SPDX-License-Identifier: Apache-2.0 + * + * Yvan Tortorella */ SEARCH_DIR(.) diff --git a/sw/redmule.c b/sw/redmule.c index dfcef0f..a9c57a6 100644 --- a/sw/redmule.c +++ b/sw/redmule.c @@ -1,23 +1,9 @@ -/* - * Copyright (C) 2022-2023 ETH Zurich and University of Bologna - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * SPDX-License-Identifier: Apache-2.0 - * - * Author: Yvan Tortorella - * - * RedMulE SW test - */ +// Copyright 2023 ETH Zurich and University of Bologna. +// Licensed under the Apache License, Version 2.0, see LICENSE for details. +// SPDX-License-Identifier: Apache-2.0 +// +// Yvan Tortorella +// #include #include "redmule_utils.h" diff --git a/sw/redmule_complex.c b/sw/redmule_complex.c index 8ca84c1..bce6c60 100644 --- a/sw/redmule_complex.c +++ b/sw/redmule_complex.c @@ -1,23 +1,9 @@ -/* - * Copyright (C) 2022-2023 ETH Zurich and University of Bologna - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * SPDX-License-Identifier: Apache-2.0 - * - * Author: Yvan Tortorella - * - * RedMulE Complex test - */ +// Copyright 2023 ETH Zurich and University of Bologna. +// Licensed under the Apache License, Version 2.0, see LICENSE for details. +// SPDX-License-Identifier: Apache-2.0 +// +// Yvan Tortorella +// #include #include "redmule_utils.h" diff --git a/sw/utils/redmule_utils.h b/sw/utils/redmule_utils.h index af21770..9a8469f 100644 --- a/sw/utils/redmule_utils.h +++ b/sw/utils/redmule_utils.h @@ -1,22 +1,9 @@ -/* - * Copyright (C) 2022-2023 ETH Zurich and University of Bologna - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * SPDX-License-Identifier: Apache-2.0 - * - * Author: Yvan Tortorella - * - */ +// Copyright 2023 ETH Zurich and University of Bologna. +// Licensed under the Apache License, Version 2.0, see LICENSE for details. +// SPDX-License-Identifier: Apache-2.0 +// +// Yvan Tortorella +// #include "tinyprintf.h" diff --git a/tb/redmule_complex_tb.sv b/tb/redmule_complex_tb.sv index a6c3c98..c82d35e 100644 --- a/tb/redmule_complex_tb.sv +++ b/tb/redmule_complex_tb.sv @@ -1,19 +1,9 @@ -/* - * Copyright (C) 2022-2023 ETH Zurich, University of Bologna - * Copyright and related rights are licensed under the Solderpad Hardware - * License, Version 0.51 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://solderpad.org/licenses/SHL-0.51. Unless required by applicable law - * or agreed to in writing, software, hardware and materials distributed under - * this License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - * SPDX-License-Identifier: SHL-0.51 - * - * Author: Yvan Tortorella (yvan.tortorella@unibo.it) - * - * RedMulE testbench for Questa simulation - */ +// Copyright 2023 ETH Zurich and University of Bologna. +// Solderpad Hardware License, Version 0.51, see LICENSE for details. +// SPDX-License-Identifier: SHL-0.51 +// +// Yvan Tortorella +// `include "hci/typedef.svh" `include "hci/assign.svh" diff --git a/tb/redmule_tb.sv b/tb/redmule_tb.sv index 3c09325..996fa3a 100644 --- a/tb/redmule_tb.sv +++ b/tb/redmule_tb.sv @@ -1,19 +1,9 @@ -/* - * Copyright (C) 2022-2023 ETH Zurich, University of Bologna - * Copyright and related rights are licensed under the Solderpad Hardware - * License, Version 0.51 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://solderpad.org/licenses/SHL-0.51. Unless required by applicable law - * or agreed to in writing, software, hardware and materials distributed under - * this License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - * SPDX-License-Identifier: SHL-0.51 - * - * Author: Yvan Tortorella (yvan.tortorella@unibo.it) - * - * RedMulE testbench for Questa simulation - */ +// Copyright 2023 ETH Zurich and University of Bologna. +// Solderpad Hardware License, Version 0.51, see LICENSE for details. +// SPDX-License-Identifier: SHL-0.51 +// +// Yvan Tortorella +// `include "hci/typedef.svh" `include "hci/assign.svh" diff --git a/tb/tb_dummy_memory.sv b/tb/tb_dummy_memory.sv index 4c21ba0..d888ae0 100644 --- a/tb/tb_dummy_memory.sv +++ b/tb/tb_dummy_memory.sv @@ -1,20 +1,9 @@ -/* - * tb_dummy_memory.sv - * Francesco Conti - * - * Copyright (C) 2014-2018 ETH Zurich, University of Bologna - * Copyright and related rights are licensed under the Solderpad Hardware - * License, Version 0.51 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://solderpad.org/licenses/SHL-0.51. Unless required by applicable law - * or agreed to in writing, software, hardware and materials distributed under - * this License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - * SPDX-License-Identifier: SHL-0.51 - * - * Dummy memory transaction. - */ +// Copyright 2023 ETH Zurich and University of Bologna. +// Solderpad Hardware License, Version 0.51, see LICENSE for details. +// SPDX-License-Identifier: SHL-0.51 +// +// Francesco Conti +// timeunit 1ps; timeprecision 1ps; From cfd71df16e3df7059b3f331b77402b39fb011880 Mon Sep 17 00:00:00 2001 From: Yvan Tortorella Date: Sat, 17 Feb 2024 00:57:45 +0100 Subject: [PATCH 3/4] Fix licens and SW lint. --- .github/workflows/lint.yml | 2 +- sw/kernel/link.ld | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index d39dbe5..1bd7184 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -61,7 +61,7 @@ jobs: clangFormatVersion: 14 style: > { - IndentWidth: 4, + IndentWidth: 2, ColumnLimit: 100, AlignEscapedNewlines: DontAlign, SortIncludes: false, diff --git a/sw/kernel/link.ld b/sw/kernel/link.ld index c82b352..be2b82f 100644 --- a/sw/kernel/link.ld +++ b/sw/kernel/link.ld @@ -1,9 +1,8 @@ -/* Copyright 2023 ETH Zurich and University of Bologna. - * Licensed under the Apache License, Version 2.0, see LICENSE for details. - * SPDX-License-Identifier: Apache-2.0 - * - * Yvan Tortorella - */ +/* Copyright 2023 ETH Zurich and University of Bologna. */ +/* Licensed under the Apache License, Version 2.0, see LICENSE for details. */ +/* SPDX-License-Identifier: Apache-2.0 */ + +/* Yvan Tortorella */ SEARCH_DIR(.) __DYNAMIC = 0; From 34233a041370ad3a2fac407da5f8e1807b90dbcc Mon Sep 17 00:00:00 2001 From: Yvan Tortorella Date: Sat, 17 Feb 2024 01:24:11 +0100 Subject: [PATCH 4/4] Furhter fix SW lint. --- .github/workflows/lint.yml | 5 +- sw/archi_redmule.h | 36 ++++++------- sw/hal_redmule.h | 43 +++++---------- sw/redmule.c | 20 +++---- sw/redmule_complex.c | 28 +++++----- sw/utils/redmule_utils.h | 107 ++++++++++++++++++------------------- 6 files changed, 108 insertions(+), 131 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 1bd7184..b6ab51d 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -65,9 +65,10 @@ jobs: ColumnLimit: 100, AlignEscapedNewlines: DontAlign, SortIncludes: false, - AllowShortFunctionsOnASingleLine: None, + AllowShortFunctionsOnASingleLine: true, AllowShortIfStatementsOnASingleLine: true, AllowShortLoopsOnASingleLine: true } exclude: | - ./sw/inc/* + sw/inc/* + sw/utils/tinyprintf.h diff --git a/sw/archi_redmule.h b/sw/archi_redmule.h index 9e74220..99cbed0 100644 --- a/sw/archi_redmule.h +++ b/sw/archi_redmule.h @@ -52,26 +52,26 @@ #define __builtin_bitinsert(a,b,c,d) (a | (((b << (32-c)) >> (32-c)) << d)) // RedMulE architecture -#define ADDR_WIDTH 32 -#define DATA_WIDTH 512 -#define REDMULE_FMT 16 +#define ADDR_WIDTH 32 +#define DATA_WIDTH 512 +#define REDMULE_FMT 16 #define ARRAY_HEIGHT 8 -#define PIPE_REGS 3 -#define ARRAY_WIDTH 24 /* Superior limit is ARRAY_HEIGHT*PIPE_REGS */ +#define PIPE_REGS 3 +#define ARRAY_WIDTH 24 /* Superior limit is ARRAY_HEIGHT*PIPE_REGS */ // Base address #define REDMULE_BASE_ADD 0x00100000 // Commands -#define REDMULE_TRIGGER 0x00 -#define REDMULE_ACQUIRE 0x04 -#define REDMULE_FINISHED 0x08 -#define REDMULE_STATUS 0x0C +#define REDMULE_TRIGGER 0x00 +#define REDMULE_ACQUIRE 0x04 +#define REDMULE_FINISHED 0x08 +#define REDMULE_STATUS 0x0C #define REDMULE_RUNNING_JOB 0x10 -#define REDMULE_SOFT_CLEAR 0x14 +#define REDMULE_SOFT_CLEAR 0x14 // Registers -#define REDMULE_REG_OFFS 0x40 +#define REDMULE_REG_OFFS 0x40 #define REDMULE_REG_X_PTR 0x00 #define REDMULE_REG_W_PTR 0x04 #define REDMULE_REG_Z_PTR 0x08 @@ -81,7 +81,7 @@ // OPs definition #define MATMUL 0x0 -#define GEMM 0x1 +#define GEMM 0x1 #define ADDMAX 0x2 #define ADDMIN 0x3 #define MULMAX 0x4 @@ -90,15 +90,15 @@ #define MINMAX 0x7 // GEMM formats -#define Float8 0x0 -#define Float16 0x1 -#define Float8Alt 0x2 +#define Float8 0x0 +#define Float16 0x1 +#define Float8Alt 0x2 #define Float16Alt 0x3 // FP Formats encoding -#define FP16 0x2 -#define FP8 0x3 +#define FP16 0x2 +#define FP8 0x3 #define FP16ALT 0x4 -#define FP8ALT 0x5 +#define FP8ALT 0x5 #endif diff --git a/sw/hal_redmule.h b/sw/hal_redmule.h index a552480..6dec0f8 100644 --- a/sw/hal_redmule.h +++ b/sw/hal_redmule.h @@ -10,42 +10,31 @@ #include "tensor_dim.h" -/* - * - * For control, generic configuration register layout, - * and job-dependent register map, look at redmule_archi.h - * - */ - /* LOW-LEVEL HAL */ #define REDMULE_ADDR_BASE REDMULE_BASE_ADD #define REDMULE_ADDR_SPACE 0x00000100 -// For all the following functions we use __builtin_pulp_OffsetedWrite and __builtin_pulp_OffsetedRead -// instead of classic load/store because otherwise the compiler is not able to correctly factorize -// the HWPE base in case several accesses are done, ending up with twice more code - #define HWPE_WRITE(value, offset) *(int *)(REDMULE_ADDR_BASE + offset) = value #define HWPE_READ(offset) *(int *)(REDMULE_ADDR_BASE + offset) -static inline void redmule_x_add_set (unsigned int value) { +static inline void redmule_x_add_set(unsigned int value) { HWPE_WRITE(value, REDMULE_REG_OFFS + REDMULE_REG_X_PTR); } -static inline void redmule_w_add_set (unsigned int value) { +static inline void redmule_w_add_set(unsigned int value) { HWPE_WRITE(value, REDMULE_REG_OFFS + REDMULE_REG_W_PTR); } -static inline void redmule_z_add_set (unsigned int value) { +static inline void redmule_z_add_set(unsigned int value) { HWPE_WRITE(value, REDMULE_REG_OFFS + REDMULE_REG_Z_PTR); } -static inline void redmule_mcfg_set (uint32_t mcfg0, uint32_t mcfg1) { +static inline void redmule_mcfg_set(uint32_t mcfg0, uint32_t mcfg1) { HWPE_WRITE(mcfg0, REDMULE_REG_OFFS + REDMULE_MCFG0_PTR); HWPE_WRITE(mcfg1, REDMULE_REG_OFFS + REDMULE_MCFG1_PTR); } -static inline void redmule_arith_set (uint32_t arith) { +static inline void redmule_arith_set(uint32_t arith) { HWPE_WRITE(arith, REDMULE_REG_OFFS + REDMULE_ARITH_PTR); } @@ -74,27 +63,23 @@ static inline void hwpe_cg_disable() { return; } -void redmule_cfg (unsigned int x, unsigned int w, unsigned int z, - uint16_t m_size, uint16_t n_size, uint16_t k_size, - uint8_t gemm_op, uint8_t gemm_fmt){ +void redmule_cfg(unsigned int x, unsigned int w, unsigned int z, uint16_t m_size, uint16_t n_size, + uint16_t k_size, uint8_t gemm_op, uint8_t gemm_fmt){ uint32_t mcfg_reg0 = 0; uint32_t mcfg_reg1 = 0; uint32_t arith_reg = 0; - mcfg_reg0 = (k_size << 16) | - (m_size << 0); + mcfg_reg0 = (k_size << 16) | (m_size << 0); mcfg_reg1 = n_size << 0; - arith_reg = (gemm_op << 10) | - (gemm_fmt << 7); + arith_reg = (gemm_op << 10) | (gemm_fmt << 7); - redmule_x_add_set ((unsigned int) x); - redmule_w_add_set ((unsigned int) w); - redmule_z_add_set ((unsigned int) z); - redmule_mcfg_set ((unsigned int) mcfg_reg0, - (unsigned int) mcfg_reg1); - redmule_arith_set ((unsigned int) arith_reg); + redmule_x_add_set((unsigned int) x); + redmule_w_add_set((unsigned int) w); + redmule_z_add_set((unsigned int) z); + redmule_mcfg_set((unsigned int) mcfg_reg0, (unsigned int) mcfg_reg1); + redmule_arith_set((unsigned int) arith_reg); } diff --git a/sw/redmule.c b/sw/redmule.c index a9c57a6..ff93c45 100644 --- a/sw/redmule.c +++ b/sw/redmule.c @@ -29,7 +29,7 @@ int main() { volatile int errors = 0; int gold_sum = 0, check_sum = 0; - int i,j; + int i, j; int offload_id_tmp, offload_id; @@ -38,29 +38,25 @@ int main() { hwpe_soft_clear(); - while( ( offload_id_tmp = hwpe_acquire_job() ) < 0); + while ((offload_id_tmp = hwpe_acquire_job()) < 0); - redmule_cfg ((unsigned int) x, - (unsigned int) w, - (unsigned int) y, - m_size, n_size, k_size, - (uint8_t) GEMM, - (uint8_t) Float16); + redmule_cfg((unsigned int) x, (unsigned int) w, (unsigned int) y, m_size, n_size, k_size, + (uint8_t) GEMM, (uint8_t) Float16); // Start RedMulE operation hwpe_trigger_job(); // Wait for end of computation - asm volatile ("wfi" ::: "memory"); + asm volatile("wfi" ::: "memory"); // Disable RedMulE hwpe_cg_disable(); - errors = redmule16_compare_int(y, golden, m_size*k_size/2); + errors = redmule16_compare_int(y, golden, m_size*k_size / 2); - *(int *) 0x80000000 = errors; + *(int *)0x80000000 = errors; - tfp_printf ("Terminated test with %d errors. See you!\n", errors); + tfp_printf("Terminated test with %d errors. See you!\n", errors); return errors; } diff --git a/sw/redmule_complex.c b/sw/redmule_complex.c index bce6c60..c27c8f5 100644 --- a/sw/redmule_complex.c +++ b/sw/redmule_complex.c @@ -26,16 +26,16 @@ int main() { uint16_t n_size = N_SIZE; uint16_t k_size = K_SIZE; - uint32_t x_addr = *(uint32_t *) &x; - uint32_t w_addr = *(uint32_t *) &w; - uint32_t y_addr = *(uint32_t *) &y; + uint32_t x_addr = *(uint32_t *)&x; + uint32_t w_addr = *(uint32_t *)&w; + uint32_t y_addr = *(uint32_t *)&y; uint32_t cfg_reg0 = ((k_size << 16) | (m_size << 0)); uint32_t cfg_reg1 = (n_size << 0); - asm volatile ("addi t0, %0, 0" :: "r"(x_addr)); - asm volatile ("addi t1, %0, 0" :: "r"(w_addr)); - asm volatile ("addi t2, %0, 0" :: "r"(y_addr)); - asm volatile ("addi t3, %0, 0" :: "r"(cfg_reg0)); - asm volatile ("addi t4, %0, 0" :: "r"(cfg_reg1)); + asm volatile("addi t0, %0, 0" :: "r"(x_addr)); + asm volatile("addi t1, %0, 0" :: "r"(w_addr)); + asm volatile("addi t2, %0, 0" :: "r"(y_addr)); + asm volatile("addi t3, %0, 0" :: "r"(cfg_reg0)); + asm volatile("addi t4, %0, 0" :: "r"(cfg_reg1)); /* mcnfig instruction */ // asm volatile( @@ -45,8 +45,7 @@ int main() { // (0x00 << 7) | \ /* Empty */ // (0b0001011 << 0) \n"); /* OpCode */ - asm volatile( - ".word (0x0 << 25) | \ + asm volatile(".word (0x0 << 25) | \ (0b11101 << 20) | \ (0b11100 << 15) | \ (0x00 << 7) | \ @@ -66,8 +65,7 @@ int main() { // (0b001 << 7) | \ /* Data format */ // (0b0101011 << 0) \n"); /* OpCode */ - asm volatile( - ".word (0b00111 << 27) | \ + asm volatile(".word (0b00111 << 27) | \ (0b00 << 25) | \ (0b00110 << 20) | \ (0b00101 << 15) | \ @@ -80,11 +78,11 @@ int main() { // Wait for end of computation asm volatile ("wfi" ::: "memory"); - errors = redmule16_compare_int(y, golden, m_size*k_size/2); + errors = redmule16_compare_int(y, golden, m_size*k_size / 2); - *(int *) 0x80000000 = errors; + *(int *)0x80000000 = errors; - tfp_printf ("Terminated test with %d errors. See you!\n", errors); + tfp_printf("Terminated test with %d errors. See you!\n", errors); return errors; } diff --git a/sw/utils/redmule_utils.h b/sw/utils/redmule_utils.h index 9a8469f..6877cac 100644 --- a/sw/utils/redmule_utils.h +++ b/sw/utils/redmule_utils.h @@ -22,56 +22,58 @@ int redmule16_compare_int(uint32_t *actual_z, uint32_t *golden_z, int len) { int errors = 0; int error; - for (int i=0; i golden_LSHWord) ? (actual_LSHWord - golden_LSHWord) : - (actual_LSHWord < golden_LSHWord) ? (golden_LSHWord - actual_LSHWord) : 0; + diff = (actual_LSHWord > golden_LSHWord) ? (actual_LSHWord - golden_LSHWord) + : (actual_LSHWord < golden_LSHWord) ? (golden_LSHWord - actual_LSHWord) + : 0; if (diff > ERR) { error = 1; - #ifdef VERBOSE - tfp_printf ("diff: 0x%08x\n", diff); - tfp_printf ("LSW: Error!\n"); - #endif +#ifdef VERBOSE + tfp_printf ("diff: 0x%08x\n", diff); + tfp_printf ("LSW: Error!\n"); +#endif } // Checking Most Significant Half-Word actual_MSHWord = (uint16_t)((actual_word >> 16) & 0x0000FFFF); golden_MSHWord = (uint16_t)((golden_word >> 16) & 0x0000FFFF); - diff = (actual_MSHWord > golden_MSHWord) ? (actual_MSHWord - golden_MSHWord) : - (actual_MSHWord < golden_MSHWord) ? (golden_MSHWord - actual_MSHWord) : 0; + diff = (actual_MSHWord > golden_MSHWord) ? (actual_MSHWord - golden_MSHWord) + : (actual_MSHWord < golden_MSHWord) ? (golden_MSHWord - actual_MSHWord) + : 0; if (diff > ERR) { error = 1; - #ifdef VERBOSE - tfp_printf ("diff: 0x%08x\n", diff); - tfp_printf ("MSW: Error!\n"); - #endif +#ifdef VERBOSE + tfp_printf ("diff: 0x%08x\n", diff); + tfp_printf ("MSW: Error!\n"); +#endif } errors += error; - #ifdef DEBUG - tfp_printf(" Golden: 0x%08x; Actual: 0x%08x,\n", golden_word, actual_word); - #endif +#ifdef DEBUG + tfp_printf(" Golden: 0x%08x; Actual: 0x%08x,\n", golden_word, actual_word); +#endif - #ifdef VERBOSE - if(error) { - if(errors==1) tfp_printf(" golden <- actual @ address @ index\n"); - tfp_printf(" 0x%08x <- 0x%08x @ 0x%08x @ 0x%08x\n", golden_word, actual_word, (actual_z+i), i*4); +#ifdef VERBOSE + if (error) { + if(errors==1) tfp_printf(" golden <- actual @ address @ index\n"); + tfp_printf(" 0x%08x <- 0x%08x @ 0x%08x @ 0x%08x\n", golden_word, actual_word, (actual_z+i), i*4); } - #endif +#endif } return errors; } @@ -79,35 +81,30 @@ int redmule16_compare_int(uint32_t *actual_z, uint32_t *golden_z, int len) { int redmule8_compare_int(uint32_t *actual_z, uint32_t *golden_z, int len) { #define ERR 0x0011 uint32_t actual_word = 0; - uint8_t actual_Byte0, - actual_Byte1, - actual_Byte2, - actual_Byte3; + uint8_t actual_Byte0, actual_Byte1, actual_Byte2, actual_Byte3; uint32_t golden_word = 0; - uint8_t golden_Byte0, - golden_Byte1, - golden_Byte2, - golden_Byte3; + uint8_t golden_Byte0, golden_Byte1, golden_Byte2 golden_Byte3; uint32_t actual = 0; uint32_t golden = 0; int errors = 0; int error; - for (int i=0; i golden_Byte0) ? (actual_Byte0 - golden_Byte0) : - (actual_Byte0 < golden_Byte0) ? (golden_Byte0 - actual_Byte0) : 0; + (actual_Byte0 < golden_Byte0) ? (golden_Byte0 - actual_Byte0) + : 0; if (diff > ERR) { error = 1; @@ -116,8 +113,8 @@ int redmule8_compare_int(uint32_t *actual_z, uint32_t *golden_z, int len) { } // Cheching Byte1 - actual_Byte1 = (uint8_t)( (actual_word >> 8 ) & 0x000000FF); - golden_Byte1 = (uint8_t)( (golden_word >> 8 ) & 0x000000FF); + actual_Byte1 = (uint8_t)((actual_word >> 8 ) & 0x000000FF); + golden_Byte1 = (uint8_t)((golden_word >> 8 ) & 0x000000FF); diff = (actual_Byte1 > golden_Byte1) ? (actual_Byte1 - golden_Byte1) : (actual_Byte1 < golden_Byte1) ? (golden_Byte1 - actual_Byte1) : 0; @@ -129,43 +126,43 @@ int redmule8_compare_int(uint32_t *actual_z, uint32_t *golden_z, int len) { } // Cheching Byte2 - actual_Byte2 = (uint8_t)( (actual_word >> 16 ) & 0x000000FF); - golden_Byte2 = (uint8_t)( (golden_word >> 16 ) & 0x000000FF); + actual_Byte2 = (uint8_t)((actual_word >> 16 ) & 0x000000FF); + golden_Byte2 = (uint8_t)((golden_word >> 16 ) & 0x000000FF); diff = (actual_Byte2 > golden_Byte2) ? (actual_Byte2 - golden_Byte2) : (actual_Byte2 < golden_Byte2) ? (golden_Byte2 - actual_Byte2) : 0; if (diff > ERR) { error = 1; - tfp_printf ("diff: 0x%08x\n", diff); - tfp_printf ("Byte2: Error!\n"); + tfp_printf("diff: 0x%08x\n", diff); + tfp_printf("Byte2: Error!\n"); } // Cheching Byte3 - actual_Byte3 = (uint8_t)( (actual_word >> 24 ) & 0x000000FF); - golden_Byte3 = (uint8_t)( (golden_word >> 24 ) & 0x000000FF); + actual_Byte3 = (uint8_t)((actual_word >> 24 ) & 0x000000FF); + golden_Byte3 = (uint8_t)((golden_word >> 24 ) & 0x000000FF); diff = (actual_Byte3 > golden_Byte3) ? (actual_Byte3 - golden_Byte3) : (actual_Byte3 < golden_Byte3) ? (golden_Byte3 - actual_Byte3) : 0; if (diff > ERR) { error = 1; - tfp_printf ("diff: 0x%08x\n", diff); - tfp_printf ("Byte3: Error!\n"); + tfp_printf("diff: 0x%08x\n", diff); + tfp_printf("Byte3: Error!\n"); } errors += error; - #ifdef DEBUG - tfp_printf(" Golden: 0x%08x; Actual: 0x%08x,\n", golden_word, actual_word); - #endif +#ifdef DEBUG + tfp_printf("Golden: 0x%08x; Actual: 0x%08x,\n", golden_word, actual_word); +#endif - #ifdef VERBOSE - if(error) { - if(errors==1) tfp_printf(" golden <- actual @ address @ index\n"); +#ifdef VERBOSE + if(error) { + if(errors==1) tfp_printf(" golden <- actual @ address @ index\n"); tfp_printf(" 0x%08x <- 0x%08x @ 0x%08x @ 0x%08x\n", golden_word, actual_word, (actual_z+i), i*4); - } - #endif + } +#endif } return errors; }