Numbers
There are mainly 4 used number systems in Verilog. They are
- Binary – b or B
- Octal – o or O
- Decimal – d or D
- Hexadecimal – h or H
So numbers are represented in Verilog using the following format. <size>'<base><number>. If we didn’t mention the size in Verilog it takes default of size 32 bits. If both the base and size are not mentioned it takes default of 32 bits and decimal number system notation.
For example: 4’b1100 is same is 4’d12 in decimal notation.
‘b0111 is same as 00000000000000000000000000000111
123 by default is a 32 bit decimal number.
If any negative number is represented, by default it will be converted to 2’s complement form.
Getting Started with Verilog
For a long time, computer programming languages like FORTRAN, Pascal, and C were used to describe computer programs and their code execution is sequential. But there isn’t any language to describe the digital circuits. This is when Hardware Description Language(HDL) came into play. HDLs are even popular for verification purposes. There are mainly two types of HDL:
- Verilog HDL
- VHDL (Very High-Speed was Integrated Circuit (VHSIC) Hardware Description Language)
Note: Verilog HDL and VHDL aren’t the same. VHDL was used before Verilog came into existence. the difference between them will be discussed in the later part.
Table of Content
- What is Verilog?
- Gate Level Modeling
- Data-Flow Modeling
- Behavioral Modeling
- Operators
- Identifiers and Keywords
- Datatypes
- Module Declaration
- Classification of Verilog
- Verilog HDL Vs VHDL
Contact Us