Skip to content
Navigation Menu
Sign in
Products
Platform
GitHub
Repository hosting, code review, and collaboration
Copilot
AI coding agent for tasks, projects, and automated work
Build & Ship
Actions
CI/CD and automation
Code Quality
Quality analysis, fixes, and enforcement
Codespaces
Cloud development environments
Secure
Code Security
Vulnerability detection and remediation
Secret Protection
Secret scanning and leak prevention
All Features
Developers
Learn
Documentation
Training
Certifications
Build
Build with Copilot
Customize Copilot
Integrations
Explore
Trending repos
GitHub Sponsors
Developer articles
Changelog
Changelog
Your source for the latest features, improvements, and fixes across GitHub products, all in one place.
Businesses
By Stage
Enterprises
Small and medium teams
Startups
Nonprofits
By Industry
Healthcare
Financial services
Manufacturing
Government
See all industries
Evaluate GitHub
Why GitHub
Customer Stories
Business insights
Trust Center
Add-ons
GitHub Advanced Security
Enterprise-grade code security
Copilot for business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Resources
Learn & Connect
Documentation
Resource center
Blog
Events & webinars
Community Forum
Customer Stories
Integrations
Support
Customer support
Training
GitHub Status
Company
About
Partners
Changelog
GitHub Universe
GitHub Universe
The event for developers, by developers — talks, workshops, and what’s next for GitHub.
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
HH45137
spi-lcd-screen
Repository navigation
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
More
items
Files
Expand file tree
main
Breadcrumbs
spi-lcd-screen
/
make.bat
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
76 lines (65 loc) · 1.47 KB
main
Breadcrumbs
spi-lcd-screen
/
make.bat
Copy path
Top
File metadata and controls
Code
Blame
76 lines (65 loc) · 1.47 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
@echo off
chcp 65001
setlocal enabledelayedexpansion
REM 设置变量
set "SRC_DIR=src"
set "TOP=spi_screen"
set "TB=tb_%TOP%"
set "VCD=sim\%TOP%.vcd"
set "VERILOGS=%SRC_DIR%\%TOP%.v %SRC_DIR%\%TB%.v"
REM 检查命令参数
if "%1"=="" goto :sim
if /i "%1"=="sim" goto :sim
if /i "%1"=="clean" goto :clean
if /i "%1"=="help" goto :help
echo 未知命令: %1
goto :help
:sim
REM 运行仿真
echo 开始Verilog仿真...
echo 源文件: %VERILOGS%
echo 输出VCD文件: %VCD%
REM 创建sim目录(如果不存在)
if not exist sim mkdir sim
REM 使用iverilog编译
iverilog -o sim\%TOP%.tmp %VERILOGS%
if errorlevel 1 (
echo iverilog编译失败!
exit /b 1
)
REM 使用vvp运行仿真
vvp sim\%TOP%.tmp
if errorlevel 1 (
echo vvp仿真运行失败!
exit /b 1
)
REM 使用gtkwave查看波形
echo 正在启动gtkwave查看波形...
start gtkwave %VCD%
goto :end
:clean
REM 清理生成的文件
echo 清理仿真生成的文件...
if exist sim\*.vcd del /q sim\*.vcd
if exist sim\*.tmp del /q sim\*.tmp
if exist sim\*.gtkw del /q sim\*.gtkw
echo 清理完成!
goto :end
:help
REM 显示帮助信息
echo 用法:
echo %0 [sim^|clean^|help]
echo.
echo 命令:
echo sim - 运行Verilog仿真并显示波形(默认)
echo clean - 清理生成的仿真文件
echo help - 显示此帮助信息
echo.
echo 示例:
echo %0 - 运行仿真
echo %0 sim - 运行仿真
echo %0 clean - 清理文件
echo %0 help - 显示帮助
goto :end
:end
endlocal
You can’t perform that action at this time.