mirror of
https://github.com/retroSoC/retroSoC.git
synced 2026-11-04 22:32:36 +00:00
- Implemented module to handle debug reset requests, ensuring proper synchronization with the AHB-Lite bridge. - Created to integrate JTAG-DTM and Debug Module, facilitating abstract command exposure. - Updated and modules to include JTAG interface signals. - Enhanced the development environment with scripts for running debug sessions using OpenOCD and GDB. - Added tests for management debug reset functionality and JTAG integration, ensuring correct behavior under various scenarios. - Updated SDC generation to include JTAG clock domain and port requirements. - Modified various scripts to support new debug features and ensure compatibility with the Hazard3 architecture.
43 lines
1.2 KiB
Python
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/mini/top/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
|