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:
@@ -134,8 +134,8 @@ set_property file_type {Verilog Header} \
|
|||||||
# use_intrupt_ccab = 1 -> 上一版中断测试(programs/risc-v-intrupt-ccab.*)
|
# use_intrupt_ccab = 1 -> 上一版中断测试(programs/risc-v-intrupt-ccab.*)
|
||||||
# use_saolei = 1 -> 扫雷(saolei/tools/build.ps1 生成)
|
# use_saolei = 1 -> 扫雷(saolei/tools/build.ps1 生成)
|
||||||
# 三个都为 0 -> 走马灯 demo
|
# 三个都为 0 -> 走马灯 demo
|
||||||
set use_intrupt_sllsb 1
|
set use_intrupt_sllsb 0
|
||||||
set use_intrupt_ccab 0
|
set use_intrupt_ccab 1
|
||||||
set use_saolei 0
|
set use_saolei 0
|
||||||
|
|
||||||
# 中断测试程序的 ROM 初始化。
|
# 中断测试程序的 ROM 初始化。
|
||||||
|
|||||||
@@ -11,8 +11,9 @@
|
|||||||
# WHAT IT CHECKS
|
# WHAT IT CHECKS
|
||||||
# 1) a line inside .v/.vh/.xdc that has non-ASCII characters *outside* a comment
|
# 1) a line inside .v/.vh/.xdc that has non-ASCII characters *outside* a comment
|
||||||
# (i.e. real code position) -> corruption;
|
# (i.e. real code position) -> corruption;
|
||||||
# 2) a line that looks like pasted prose/markdown (leading "|", "**", or a line
|
# 2) a line that looks like pasted prose/markdown (leading "|", "**", or a bare
|
||||||
# that is bare text after `endmodule`).
|
# "#" 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/):
|
# USAGE (from the repository root or from pipelined-cpu/):
|
||||||
# powershell -ExecutionPolicy Bypass -File pipelined-cpu\tools\check_rtl_text.ps1
|
# 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 ----
|
# ---- 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 ("!! $rel`:$lineNo looks like pasted prose:")
|
||||||
Write-Output (" " + $trim)
|
Write-Output (" " + $trim)
|
||||||
$bad++
|
$bad++
|
||||||
|
|||||||
Reference in New Issue
Block a user