fix(rtl): 修 cpu21_ps2_mouse 三处真 bug, 综合已通过 (0 errors / 0 critical warnings)

- frame_q[8:1][3] 是 Verilog-2001 非法写法(part-select 再取位), 综合报
  [Synth 8-2599] range is not allowed in a prefix 与 [Synth 8-1008] frame_q is not a memory
  -> 改为 frame_q[4] (= 数据字节 frame_q[8:1] 的 bit3)
- dx/dy 互换: 事件里把 dy 当 dx 上报
- 鼠标按键位错位: {2'b0, pkt_q[2], pkt_q[1]} 丢掉左键
  -> {2'b0, pkt_q[2], pkt_q[1], pkt_q[0]} (对齐 cpu21_mmio / mmio.h: bit0=左键, bit1=右键, bit2=中键)
- tools/check_rtl_text.ps1: 修 tag 变量引用解析错、修块注释漏报、字符串中文误报
- create_project.tcl 头注: Vivado 版本改为 2020.2 (本机实测: 建工程 + 综合均通过)
This commit is contained in:
2026-09-18 16:16:53 +08:00
parent e4d58a3439
commit 3512238965
3 changed files with 10 additions and 5 deletions
+2
View File
@@ -53,6 +53,8 @@ foreach ($f in $files) {
else {
$c = $code.IndexOf('//'); if ($c -ge 0) { $code = $code.Substring(0, $c) }
}
# 字符串字面量里的中文是合法的(如 $display("中文")),先去掉再判断
$code = $code -replace '"[^"]*"', '""'
$trim = $line.Trim()