Files
retroSoC/tests/test_mgmt_debug.py
T
maksyuki 9c706ba0ff feat: refactor test scripts to update paths and improve organization
- Updated paths in test files to reflect new directory structure for RTL and script files.
- Changed references from rtl/mini to rtl/ip and scripts/rtl where applicable.
- Added a new test file for Tiny product isolation, ensuring independent ABI and bus acceptance.
- Enhanced tests for memory map generation and protocol contracts for Tiny architecture.
- Ensured that all tests are aligned with the latest directory structure and naming conventions.
2026-09-25 15:44:02 +08:00

43 lines
1.2 KiB
Python

"""Directed reset-sequencing test for the management Hazard3 debug path."""
from __future__ import annotations
import shutil
import subprocess
from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
def test_management_debug_reset_waits_for_the_ahbl_bridge(tmp_path: Path) -> None:
iverilog = shutil.which("iverilog")
vvp = shutil.which("vvp")
if iverilog is None or vvp is None:
return
simulation = tmp_path / "mgmt_debug_reset_tb"
sources = (
ROOT / "rtl/managed/clusterip/common/rtl/utils/register.sv",
ROOT / "rtl/managed/clusterip/common/rtl/clkrst/rst_sync.sv",
ROOT / "rtl/ip/core/mgmt_debug_reset.sv",
ROOT / "tests/rtl/mgmt_debug_reset_tb.sv",
)
subprocess.run(
[
iverilog,
"-g2012",
"-DSV_ASSRT_DISABLE",
f"-I{ROOT / 'rtl/managed/clusterip/common/rtl'}",
"-s",
"mgmt_debug_reset_tb",
"-o",
str(simulation),
*(str(source) for source in sources),
],
check=True,
)
result = subprocess.run([vvp, str(simulation)], text=True, capture_output=True, check=True)
assert "management debug reset test passed" in result.stdout