feat: add comprehensive tests for AXI4 components and lifecycle controllers

- Implemented tests for AXI4 async bridge functionality, including transfer and warm flush scenarios.
- Added tests for AXI4 data crossbar to validate concurrent outstanding requests and ACL handling.
- Introduced clock frequency monitor tests to ensure detection of clock stop and restart events.
- Developed tests for extension DMA master to verify copy operations, tail strobe behavior, and timeout handling.
- Created tests for HP lifecycle controller to validate drain, flush, and forced reset functionalities.
- Updated existing test scripts to include new RTL components and ensure proper simulation configurations.
This commit is contained in:
maksyuki committed 2026-08-30 13:15:10 +08:00
1 parent 2b6819449c
commit 98eb8ebad6
67 files changed
+4165 -612

No files matched your search

+42
View File
@@ -3,6 +3,8 @@
from __future__ import annotations
import json
import os
import shutil
import subprocess
import sys
from pathlib import Path
@@ -142,3 +144,43 @@ def test_extensions_reject_duplicate_regions_and_irqs(tmp_path: Path) -> None:
result = validate(write_invalid_extensions(tmp_path, document))
assert result.returncode != 0
assert "overlapping or out-of-range IRQs" in result.stderr
def test_extension_dma_executes_copy_tail_and_timeout(tmp_path: Path) -> None:
verilator = shutil.which("verilator")
if verilator is None:
return
output = tmp_path / "extension_dma_master_tb"
ccache_tmp = tmp_path / "ccache"
ccache_tmp.mkdir()
subprocess.run(
[
verilator,
"--binary",
"--timing",
"-Wno-fatal",
"--top-module",
"extension_dma_master_tb",
"-I" + str(ROOT / "rtl/managed/clusterip/common/rtl"),
"-I" + str(ROOT / "rtl/managed/clusterip/common/rtl/interface"),
"-I" + str(ROOT / "rtl/mini/top"),
str(ROOT / "rtl/managed/clusterip/common/rtl/interface/axi4_if.sv"),
str(ROOT / "rtl/mini/top/extension_dma_master.sv"),
str(ROOT / "tests/rtl/extension_dma_master_tb.sv"),
"-Mdir",
str(tmp_path / "obj"),
"-o",
str(output),
],
check=True,
text=True,
capture_output=True,
env={
**os.environ,
"CCACHE_DIR": str(ccache_tmp),
"CCACHE_TEMPDIR": str(ccache_tmp),
},
)
result = subprocess.run([output], check=True, text=True, capture_output=True)
assert "Extension DMA copy, tail strobe, and timeout test passed" in result.stdout