docs: add licensing information and attribution comments to various RTL and test files

- Updated multiple RTL files in the  and  directories to include licensing information under the Mulan PSL v2.
- Added attribution comments for contributions from ETH Zurich and University of Bologna in .
- Enhanced test files in the  directory with licensing details and ensured compliance with the Solderpad Hardware License, Version 0.51.
- Introduced a new test in  to verify the preservation of attribution for PULP HyperBus sources.
This commit is contained in:
maksyuki committed 2026-08-24 10:02:48 +08:00
1 parent e1b49ac0ec
commit c0f04067b2
171 files changed
+1295 -8

No files matched your search

+51
View File
@@ -21,6 +21,34 @@ HAL_REGS = ROOT / "crt/include/retrosoc/hal/opipsram_regs.h"
HAL_SOURCE = ROOT / "crt/src/hal/opipsram.c"
OPIPSRAM_MODEL = ROOT / "rtl/mini/dv/model/opipsram_model.sv"
OPIPSRAM_TB = ROOT / "tests/rtl/opipsram_tb.sv"
PULP_HYPERBUS_COMMIT = "80de8df600edc5d7956a94c9d42f911d6e61efd7"
PULP_SHL_LICENSE = ROOT / "licenses/PULP_Platform-SHL-0.51"
PULP_PHY_SOURCES = {
ROOT / "rtl/ip/memory/opipsram_phy.sv": (
"src/hyperbus_phy.sv",
(
"Armin Berger <bergerar@ethz.ch>",
"Stephan Keck <kecks@ethz.ch>",
"Thomas Benz <tbenz@iis.ee.ethz.ch>",
"Paul Scheffler <paulsc@iis.ee.ethz.ch>",
),
),
ROOT / "rtl/ip/memory/opipsram_trx.sv": (
"src/hyperbus_trx.sv",
(
"Paul Scheffler <paulsc@iis.ee.ethz.ch>",
"Armin Berger <bergerar@ethz.ch>",
"Stephan Keck <kecks@ethz.ch>",
),
),
ROOT / "rtl/tech/tc_opipsram_delay.sv": (
"src/hyperbus_delay.sv",
(
"Thomas Benz <paulsc@iis.ee.ethz.ch>",
"Paul Scheffler <paulsc@iis.ee.ethz.ch>",
),
),
}
def _values(path: Path, pattern: str) -> dict[str, int]:
@@ -39,6 +67,29 @@ def _values(path: Path, pattern: str) -> dict[str, int]:
return values
def test_opipsram_phy_preserves_pulp_hyperbus_attribution() -> None:
assert PULP_SHL_LICENSE.is_file()
license_text = PULP_SHL_LICENSE.read_text(encoding="utf-8")
assert "SOLDERPAD HARDWARE LICENSE version 0.51" in license_text
for path, (source, authors) in PULP_PHY_SOURCES.items():
text = path.read_text(encoding="utf-8")
assert text.startswith("// Copyright 2023 ETH Zurich and University of Bologna.\n")
assert "// Solderpad Hardware License, Version 0.51, see LICENSE for details.\n" in text
assert "// SPDX-License-Identifier: SHL-0.51\n" in text
assert f"PULP Platform HyperBus v0.0.4 ({source})" in text
assert PULP_HYPERBUS_COMMIT in text
assert "Modified by retroSoC" in text
assert "retroSoC is licensed under Mulan PSL v2." in text
for author in authors:
assert f"// {author}\n" in text
for path in (ROOT / "docs/ip/opipsram.md", ROOT / "ATTRIBUTIONS.md", ROOT / "NOTICE"):
text = path.read_text(encoding="utf-8")
assert PULP_HYPERBUS_COMMIT in text
assert "SHL-0.51" in text
def test_opipsram_protocol_model_compiles_and_runs() -> None:
verilator = shutil.which("verilator")
if verilator is None: