reference : http://iverilog.wikia.com/wiki/Getting_Started
[1] The simplest code for Verilog, please save it as hello.v
code :
module main;
initial
begin
$display("Hello, World");
$finish ; /* optional */
end
endmodule
initial
begin
$display("Hello, World");
$finish ; /* optional */
end
endmodule
ps :
module, endmodule -> declaration
main -> module name
$display -> just like printf in C
- setup the environment path
[2] compiler : Icarus Verilog
- Please download from : http://bleyer.org/icarus/- setup the environment path
[3] compile & execution (in case you use Windows and work in C:\ directory)
- c:\iverilog -o hello hello.v
- c:\vvp hello
沒有留言:
張貼留言