feat: add QSPI Flash and Flash Read Binder modules

- Introduced  for handling QSPI flash memory operations, including command and address handling.
- Added  to interface with the C++ flash memory implementation, allowing for read operations via DPI-C.
- Created  for the flash memory implementation, supporting initialization, reading, and memory copying.
- Updated  to integrate the new QSPI Flash module and connect it with the existing system.
- Refactored file paths in various filelists and scripts to accommodate the new directory structure under .
- Enhanced the Python scripts for generating memory maps and preparing the environment for the new structure.
- Adjusted test scripts to reflect changes in the directory structure and ensure compatibility with the new modules.
This commit is contained in:
maksyuki committed 2026-07-20 16:50:57 +08:00
1 parent 82e5c605a8
commit fb3621e6b8
111 files changed
+411 -216

No files matched your search

+10 -10
View File
@@ -10,8 +10,8 @@ from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
GENERATOR = ROOT / "rtl/mini/script/generate_memory_map.py"
MEMORY_MAP = ROOT / "rtl/mini/memory_map.json"
GENERATOR = ROOT / "rtl/mini/address_map/generate_memory_map.py"
MEMORY_MAP = ROOT / "rtl/mini/address_map/memory_map.json"
def generate(output_dir: Path, *, ip: str = "NONE", sram: str = "NO") -> None:
@@ -96,10 +96,10 @@ def test_bus_fault_responder_handles_reserved_and_unmapped_addresses(tmp_path: P
[
"+define+SV_ASSRT_DISABLE",
f"+incdir+{tmp_path / 'rtl'}",
f"+incdir+{ROOT / 'rtl/clusterip/common/rtl'}",
str(ROOT / "rtl/clusterip/common/rtl/interface/nmi_if.sv"),
str(ROOT / "rtl/clusterip/common/rtl/utils/register.sv"),
str(ROOT / "rtl/ip/native/nmi_regslice.sv"),
f"+incdir+{ROOT / 'rtl/managed/clusterip/common/rtl'}",
str(ROOT / "rtl/managed/clusterip/common/rtl/interface/nmi_if.sv"),
str(ROOT / "rtl/managed/clusterip/common/rtl/utils/register.sv"),
str(ROOT / "rtl/ip/native/interconnect/nmi_regslice.sv"),
str(ROOT / "rtl/mini/top/bus.sv"),
str(ROOT / "tests/rtl/bus_fault_tb.sv"),
"",
@@ -148,10 +148,10 @@ def test_sysctrl_fault_registers_record_and_clear_pending(tmp_path: Path) -> Non
"+define+SV_ASSRT_DISABLE",
f"+incdir+{tmp_path / 'rtl'}",
f"+incdir+{ROOT / 'rtl/mini/top'}",
f"+incdir+{ROOT / 'rtl/clusterip/common/rtl'}",
str(ROOT / "rtl/clusterip/common/rtl/interface/nmi_if.sv"),
str(ROOT / "rtl/clusterip/common/rtl/utils/register.sv"),
str(ROOT / "rtl/ip/native/sysctrl.sv"),
f"+incdir+{ROOT / 'rtl/managed/clusterip/common/rtl'}",
str(ROOT / "rtl/managed/clusterip/common/rtl/interface/nmi_if.sv"),
str(ROOT / "rtl/managed/clusterip/common/rtl/utils/register.sv"),
str(ROOT / "rtl/ip/native/peripheral/sysctrl.sv"),
str(ROOT / "tests/rtl/sysctrl_fault_tb.sv"),
"",
]
+2 -2
View File
@@ -84,7 +84,7 @@ def test_generate_all_is_stable_and_expands_paths(tmp_path: Path) -> None:
assert {path: path.stat().st_mtime_ns for path in generated} == mtimes
assert (tmp_path / "def.fl").read_text(encoding="utf-8") == " ".join(defines) + "\n"
cluster = (tmp_path / "clusterip.fl").read_text(encoding="utf-8")
assert str(ROOT / "rtl/clusterip") in cluster
assert str(ROOT / "rtl/managed/clusterip") in cluster
def test_prepare_norflash_and_missing_firmware(tmp_path: Path) -> None:
@@ -583,7 +583,7 @@ def test_clean_all_stays_within_repository(tmp_path: Path) -> None:
generated = fake_root / "rtl/mini/.iverilog_build"
generated.mkdir(parents=True)
(generated / "simv").write_text("generated", encoding="utf-8")
dependency = fake_root / "rtl/ip/3rd-party"
dependency = fake_root / "rtl/managed/third_party"
dependency.mkdir(parents=True)
(dependency / "model.v").write_text("dependency", encoding="utf-8")