tcl: 新增扫雷专用建工程脚本 + 修文本自检误报

- create_project_saolei.tcl:独立工程 pipelined-cpu-saolei,只装配扫雷所需源文件,
  sources_1/sim_1 都固定定义 SAOLEI_ROM,sim_1 顶层 = tb_saolei;先清理旧工程再新建
  (实测:建工程 + 综合均通过,0 error / 0 critical warning)
- check_rtl_text.ps1:不再把 Verilog 延时语法 #10 / #(expr) / #delay 误报成粘贴正文
- create_project.tcl:默认程序切回中断测试 ccab
This commit is contained in:
2026-09-19 19:50:37 +08:00
parent b8c62c2726
commit 0908580e46
2 changed files with 8 additions and 5 deletions
+6 -3
View File
@@ -11,8 +11,9 @@
# WHAT IT CHECKS
# 1) a line inside .v/.vh/.xdc that has non-ASCII characters *outside* a comment
# (i.e. real code position) -> corruption;
# 2) a line that looks like pasted prose/markdown (leading "|", "**", or a line
# that is bare text after `endmodule`).
# 2) a line that looks like pasted prose/markdown (leading "|", "**", or a bare
# "#" that is NOT a Verilog delay/parameter override: #10, #(expr), #delay are
# legal Verilog, so only "#" followed by something else (space, CJK...) is flagged).
#
# USAGE (from the repository root or from pipelined-cpu/):
# powershell -ExecutionPolicy Bypass -File pipelined-cpu\tools\check_rtl_text.ps1
@@ -71,7 +72,9 @@ foreach ($f in $files) {
}
# ---- check 2: pasted prose / markdown leftovers ----
if ($trim -match '^\||^\*\*|^#[^0-9#]' -and $f.Extension -ne '.xdc') {
# 注意:.v/.vh 里 "#" 是合法的延时语法(#10 / #(expr) / #delay),
# 只有 "#" 后面跟着空格/中文等非代码字符才当成注释残留。
if ($trim -match '^\||^\*\*|^#[^0-9(A-Za-z_]' -and $f.Extension -ne '.xdc') {
Write-Output ("!! $rel`:$lineNo looks like pasted prose:")
Write-Output (" " + $trim)
$bad++