现有组件功能与Amesim组件比较对齐,补全功能;仿真服务启动环境检测,旧版json工程文件适配读取

This commit is contained in:
ljz committed 2026-09-13 20:01:56 +08:00
1 parent b6c22a54f8
commit 6fc9afe41d
119 files changed
+260114 -351

No files matched your search

+6 -1
View File
@@ -5,6 +5,8 @@ the current project; omit --check to regenerate it. Audit evidence goes to
the ignored test/model-audit/mql8 directory. Mapping uses typed graph
isomorphism and endpoint edit cost, never component display names; names
are emitted only as evidence for review.
Time settings are reported separately; --require-same-time-settings also
makes their equality a --check gate. Parameter/port mismatches always fail.
"""
from __future__ import annotations
@@ -186,6 +188,8 @@ def main():
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument('--check', action='store_true',
help='Audit current JSON against AME without changing the project; evidence goes to test/model-audit/mql8/.')
parser.add_argument('--require-same-time-settings', action='store_true',
help='With --check, also require identical start/stop/sample/max-step settings; otherwise report these separately from model semantics.')
arguments = parser.parse_args()
HERE.mkdir(parents=True, exist_ok=True)
sources = {str(p.relative_to(ROOT)): {'sha256': hashlib.sha256(p.read_bytes()).hexdigest(),
@@ -335,7 +339,8 @@ def main():
if arguments.check:
assert not parameter_changes, 'Current JSON parameters differ from AME; see audit.json.'
assert not connection_changes, 'Current JSON connection ports differ from AME; see audit.json.'
assert original['simulation'] == corrected['simulation'], 'Current JSON time settings differ from AME.'
if arguments.require_same_time_settings:
assert original['simulation'] == corrected['simulation'], 'Current JSON time settings differ from AME.'
if __name__ == '__main__':