Skip to content

Commit

Permalink
Update Hello World example
Browse files Browse the repository at this point in the history
  • Loading branch information
DeflateAwning committed Nov 3, 2023
1 parent 2cd94d4 commit dc44a19
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -333,31 +333,32 @@ attributes. They have the same general meaning as with the $attribute
syntax, but they are attached to objects by position instead of by
name. Also, the key is a Verilog identifier instead of a string.
## Running iverilog
## Running `iverilog`
The preferred way to invoke the compiler is with the `iverilog`(1)
command. This program invokes the preprocessor (`ivlpp`) and the
compiler (`ivl`) with the proper command line options to get the job
done in a friendly way. See the `iverilog`(1) man page for usage details.
### EXAMPLES
### EXAMPLE: Hello World
Example: Compiling `"hello.vl"`
```verilog
------------------------ hello.vl ----------------------------
// ------------------------ hello.vl ----------------------------
module main();
initial
begin
$display("Hi there");
$display("Hello World");
$finish ;
end
endmodule
--------------------------------------------------------------
// --------------------------------------------------------------
```
Ensure that `iverilog` is on your search path, and the vpi library
Expand All @@ -369,10 +370,10 @@ To compile the program:
iverilog hello.vl
```
(The above presumes that /usr/local/include and /usr/local/lib are
part of the compiler search path, which is usually the case for gcc.)
(The above presumes that `/usr/local/include` and `/usr/local/lib` are
part of the compiler search path, which is usually the case for `gcc`.)
To run the program:
To run the generated program:
```bash
./a.out
Expand Down

0 comments on commit dc44a19

Please sign in to comment.