mirror of
https://github.com/retroSoC/retroSoC.git
synced 2026-11-05 06:32:37 +00:00
- Introduced to validate AXI4 interface for 64-bit on-chip SRAM. - Added to test resource controller functionality including ownership, IRQ handling, and cache handshake. - Updated to include resource controller interface. - Enhanced to cover additional IRQ scenarios. - Added new tests in for AXI4 target guard timeout and isolation. - Updated to reflect changes in the high-performance profile. - Modified to verify on-chip SRAM bank configurations. - Added for directed verification of resource controller. - Updated to check SDRAM mapped window coverage. - Enhanced to ensure correct IRQ mappings and APB target generation.
50 lines
1.4 KiB
Python
50 lines
1.4 KiB
Python
"""Directed verification for the Mini Resource Controller."""
|
|
|
|
from __future__ import annotations
|
|
|
|
import os
|
|
import shutil
|
|
import subprocess
|
|
from pathlib import Path
|
|
|
|
|
|
ROOT = Path(__file__).resolve().parents[1]
|
|
|
|
|
|
def test_resource_controller_ownership_irq_and_cache_handshake(tmp_path: Path) -> None:
|
|
verilator = shutil.which("verilator")
|
|
if verilator is None:
|
|
return
|
|
|
|
output = tmp_path / "resource_controller_tb"
|
|
ccache_tmp = tmp_path / "ccache"
|
|
ccache_tmp.mkdir()
|
|
subprocess.run(
|
|
[
|
|
verilator,
|
|
"--binary",
|
|
"--timing",
|
|
"-Wno-fatal",
|
|
"--top-module",
|
|
"resource_controller_tb",
|
|
"-I" + str(ROOT / "rtl/managed/clusterip/common/rtl/interface"),
|
|
str(ROOT / "rtl/managed/clusterip/common/rtl/interface/apb4_if.sv"),
|
|
str(ROOT / "rtl/mini/top/resource_controller.sv"),
|
|
str(ROOT / "tests/rtl/resource_controller_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 "Resource Controller ownership, IRQ, and cache handshake test passed" in result.stdout
|