- 註冊時間
- 2006-10-8
- 最後登錄
- 2019-6-20
- 主題
- 查看
- 積分
- 1306
- 閱讀權限
- 110
- 文章
- 1393
- 相冊
- 0
- 日誌
- 1
![Rank: 11](static/image/common/star_level3.gif) ![Rank: 11](static/image/common/star_level3.gif) ![Rank: 11](static/image/common/star_level2.gif) ![Rank: 11](static/image/common/star_level1.gif)
狀態︰
離線
|
1.Icarus Verilog for Windows — http://bleyer.org/icarus/
◦iverilog : 編譯
◦vvp : 執行
◦iverilog-vpi : Verilog 與 C 的連結方法
■參考:http://iverilog.wikia.com/wiki/Using_VPI
2.Icarus Verilog — http://iverilog.icarus.com/
◦相關套件:http://ivi.sourceforge.net/screenshots.html (波形模擬繪圖)
程式範例
module main;
initial
begin
$display("Hello, World");
$finish ;
end
endmodule
執行結果
D:\ccc101>cd icarus
D:\ccc101\icarus>iverilog -o hello hello.v
D:\ccc101\icarus>vvp hello
Hello, World
原始說明
By a text editor (or copy hello.vl from the Icarus Verilog examples directory) arrange for this program to be in a text file, "hello.vl". Next, compile this program with a command like this:
% iverilog -o hello hello.vl
The results of this compile are placed into the file "hello", as the "-o" flag tells the compiler where to place the compiled result. Next, execute the compiled program like so:
% vvp hello
Hello, World
在 Windows 中安裝
The easiest way to install under Windows is to get a precompiled installer for the version you wish to install. Icarus Verilog is distributed for Windows users as a self-installing .exe. Just execute the installer and follow the instructions. During the install, take note of the directory where the program is installed: for example,
C:\iverilog is a good place to install.
Once the binary is installed, you need to add the bin directory to your execution path. The executables you need are in C:\iverilog\bin, where the "C:\iverilog" part is actually the root of where you installed the package. The programs are in the bin subdirectory. Put this directory in your PATH environment variable, and the above commands become accessible to you at the command line prompt, or even in batch files.
範例二
D:\ccc101\icarus\samples>iverilog -o sqrt sqrt.vl
D:\ccc101\icarus\samples>vvp sqrt
0 main.acc = 0000000000000000
225 main.acc = 0000000000000100
235 main.acc = 0000000000000110
sqrt( 63) --> 7
245 main.acc = 0000000000000111
範例三
D:\ccc101\icarus\samples>iverilog -o ifsr16 ifsr16.v
ifsr16.v: No such file or directory
No top level modules, and no -s option.
D:\ccc101\icarus\samples>iverilog -o lfsr16 lfsr16.v
D:\ccc101\icarus\samples>vvp lfsr16
VCD info: dumpfile lfsr16.vcd opened for output.
xxxxx
10000
00001
00011
00111
01111
11110
11101
11010
10101
01011
10110
01100
11001
10010
00100
01000
10000
00001
00011
00111
01111
11110
11101
11010
10101
01011
10110
01100
11001
10010
00100
01000
10000
參考文獻
1.Icarus Verilog
◦http://iverilog.icarus.com/
2.Icarus Verilog for Windows
◦http://bleyer.org/icarus/
3.GPL EDA
◦http://www.gpleda.org/
|
|