Files
IC-Coder-Plugin/tools/iverilog/INSTALL.md
Roe-xin 22b9a0ed13 feat:接入iverilog工具
- 将iverilog可以随着插件的下载而下载
- 用户输入自然语言就可以控制生成对应的VCD文件
2025-12-15 11:09:03 +08:00

132 lines
3.2 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

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.

# Iverilog 工具安装指南
## 自动安装(推荐)
插件会自动使用打包在 `tools/iverilog/bin/` 目录中的 iverilog 工具。
## 手动安装步骤
如果需要手动更新或安装 iverilog 工具,请按照以下步骤操作:
### Windows x64
1. **下载安装包**
- 访问http://bleyer.org/icarus/
- 下载:`iverilog-v12-20220611-x64_setup.exe` (18.2MB)
- 或直接下载http://bleyer.org/icarus/iverilog-v12-20220611-x64_setup.exe
2. **安装到临时目录**
- 运行安装程序
- 选择安装路径(例如:`C:\iverilog-temp`
- 完成安装
3. **复制必要文件**
将以下文件从安装目录复制到 `tools/iverilog/bin/`
**核心可执行文件:**
- `iverilog.exe` - Verilog 编译器
- `vvp.exe` - Verilog 仿真器
**依赖的 DLL 文件:**
- `libgcc_s_seh-1.dll`
- `libwinpthread-1.dll`
- `libstdc++-6.dll`
- 以及其他可能需要的 DLL 文件
**库文件目录(重要):**
- 复制整个 `lib/ivl/` 目录到 `tools/iverilog/lib/ivl/`
- 这个目录包含 iverilog 的标准库和模块
4. **目录结构**
最终的目录结构应该是:
```
tools/
└── iverilog/
├── bin/
│ ├── iverilog.exe
│ ├── vvp.exe
│ ├── libgcc_s_seh-1.dll
│ ├── libwinpthread-1.dll
│ └── libstdc++-6.dll
├── lib/
│ └── ivl/
│ ├── system.vpi
│ ├── v2005_math.vpi
│ └── ... (其他库文件)
└── README.md
```
5. **清理**
- 可以卸载临时安装的 iverilog
- 删除临时安装目录
### 验证安装
在命令行中运行:
```bash
cd "D:\IC Coder Plugin\ic-coder\tools\iverilog\bin"
.\iverilog.exe -V
```
应该看到类似输出:
```
Icarus Verilog version 12.0 (stable) (s20220611-xxx)
```
## 文件清单
### 必需文件(约 5-10 MB
**bin/ 目录:**
- iverilog.exe (~2MB)
- vvp.exe (~1MB)
- libgcc_s_seh-1.dll
- libwinpthread-1.dll
- libstdc++-6.dll
**lib/ivl/ 目录:**
- system.vpi
- v2005_math.vpi
- vhdl_sys.vpi
- vhdl_textio.vpi
- va_math.vpi
- 以及其他 .vpi 和 .vpl 文件
## 许可证
Icarus Verilog 使用 GPL v2+ 许可证。
- 官方网站http://iverilog.icarus.com/
- 源代码https://github.com/steveicarus/iverilog
- 许可证https://github.com/steveicarus/iverilog/blob/master/COPYING
## 注意事项
1. **文件大小**:完整的 iverilog 工具约 5-10 MB不包含 GTKWave
2. **依赖项**:确保复制所有必需的 DLL 文件
3. **库文件**lib/ivl/ 目录是必需的,包含 Verilog 标准库
4. **版本**:推荐使用 v12.0 或更高版本
## 故障排除
### 问题:运行时提示缺少 DLL
**解决方案**
- 使用 Dependency Walker 或 Dependencies.exe 检查缺少的 DLL
- 从 iverilog 安装目录复制缺少的 DLL 到 bin/ 目录
### 问题:编译时提示找不到标准库
**解决方案**
- 确保 lib/ivl/ 目录存在且包含所有 .vpi 文件
- 检查 iverilog 是否能找到库文件路径
### 问题vvp 运行失败
**解决方案**
- 确保 vvp.exe 和相关 DLL 都在 bin/ 目录中
- 检查是否有权限问题