![]() However blanks(spaces) and tabs (from TAB key) are not ignored in strings. Reg name = "Hello!" // The 2 spaces in the beginning are ignored In fact, this helps in the indentation of code to make it easier to read. White space is a term used to represent the characters for spaces, tabs, newlines and formfeeds, and is usually ignored by Verilog except when it separates tokens. Integer a // Creates an int variable called a, and treats everything to the right of // as a comment ![]() However, single line comments can be nested in a multiple line comment. A multiple-line comment starts with /* and ends with */ and cannot be nested.A single line comment starts with // and tells Verilog compiler to treat everything after this point to the end of the line as a comment.There are two ways to write comments in Verilog. ![]() Verilog is case-sensitive, so var_a and var_A are different. All lines should be terminated by a semi-colon. A lexical token may consist of one or more characters and tokens can be comments, keywords, numbers, strings or white space. Lexical conventions in Verilog are similar to C in the sense that it contains a stream of tokens. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |