Files

56 lines
1.6 KiB
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 示例:proj1 TFT 800×480 刷屏
## 目标
ACG525 + 芯路恒 TFT_V3.0(2×18)显示彩条;按键切红/绿/蓝满屏。
## 工程文件
工作区:`fpga/proj1/`
| 文件 | 作用 |
|------|------|
| `src/tft_top.v` | 顶层:分频、复位、模式、LED |
| `src/lcd_driver.v` | 1056×525 时序 |
| `src/lcd_display.v` | 彩条/纯色 |
| `src/tft_top.cst` | LCD/KEY/LED 约束 |
| `src/tft_top.sdc` | 50 MHz |
| `build.tcl` | `run all` |
| `impl/pnr/proj1.fs` | 比特流 |
## 构建与下载
```powershell
cd C:\Users\Administrator\Documents\fpga\gwin-skill
.\scripts\build_and_download.ps1 -ProjectDir ..\proj1
```
等价:
```powershell
$gowin = "C:\Users\Administrator\Documents\fpga\tool-chain\Gowin\Gowin_V1.9.11.03_Education_x64"
$env:PATH = "$gowin\IDE\bin;$gowin\Programmer\bin;" + $env:PATH
cd C:\Users\Administrator\Documents\fpga\proj1
cmd /c "type build.tcl | gw_sh.exe"
programmer_cli.exe -d GW5A-25A --fsFile "$PWD\impl\pnr\proj1.fs" -r 2
```
## 预期现象
- 上电/下载后背光亮,出现彩条
- KEY0/1/2:红/绿/蓝满屏
- KEY5:复位
- LED 有心跳与模式指示
## 彩条方向说明
- 逻辑 `lcd_x` 递增对应扫描行方向;若屏上表现为「上下变色」,可用 `lcd_y` 分区做「左右竖条」,以目视为准微调 `lcd_display.v`
- 2×18 仅 RGB565,不要接不存在的 R[2:0] 等低位脚
## Agent 复盘要点
1. 引脚来自 xlsx,不是官方 DK_START 手册
2. `gw_sh` 必须 pipe + 无 BOM
3. 下载成功日志含 `Finished` 与 Status Code
4. 供电与下载线分离要求见 SKILL.md