From dc44a192e2048975597b84b2d934554007544a23 Mon Sep 17 00:00:00 2001 From: DeflateAwning <11021263+DeflateAwning@users.noreply.github.com> Date: Fri, 3 Nov 2023 15:09:14 -0600 Subject: [PATCH] Update Hello World example --- README.md | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 01b34978f7..c6ec71cbc3 100644 --- a/README.md +++ b/README.md @@ -333,7 +333,7 @@ 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 @@ -341,23 +341,24 @@ 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 @@ -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