You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 26, 2020. It is now read-only.
This is a tutorial repository to learn verilog easily with all the basics that are required to get started for this language.
3
+
This is a beginner friendly tutorial repository to learn verilog easily with all the basics that are required to get started for this language. Also, this repository is read only and is not currently being maintained by the author .
4
4
5
-
---
6
-
7
-
#### Installation For Linux
5
+
### Installation For Linux
8
6
9
7
* sudo apt-get update
10
8
* sudo apt-get install verilog
11
9
* sudo apt-get install gtkwave
12
10
13
-
---
14
-
#### Introduction
15
-
16
-
Verilog is a hardware language. Examples of such languages are VHDL( VHSIC(Very High Speed Integrated Circuit) HDL).
17
-
It is vendor independent for example, Xilinx, Verywell etc.Full form verilog is __Verify Logic__. It is used for Digital ICs not for Analog ICs.
18
-
It uses gate level design abstraction. It was made at Gateway Design Automation and now is IEEE 1364-2001 standard.
19
-
HDL came to help with the verification of design of complex circuits that are in place. Also, logic systhesis tools can convert design to any fabrication technology. Verilog is concurrent, case-sensitive and synthesizable language.
11
+
### Introduction
20
12
13
+
Verilog is a hardware language which is a concurrent, case-sensitive and synthesizable language. Examples of such languages are VHDL( VHSIC(Very High Speed Integrated Circuit) HDL). It is vendor independent for example, Xilinx, Verywell etc.Full form verilog is __Verify Logic__. It is used for Digital ICs not for Analog ICs.It uses gate level design abstraction. It was made at Gateway Design Automation and now is IEEE 1364-2001 standard. HDL came to help with the verification of design of complex circuits that are in place. Also, logic synthesis tools can convert design to any fabrication technology.
21
14
22
-
Now, verilog's basic building block is module that provides information about input and output ports but hides internal implementation.
15
+
Now, verilog's basic building block is a module that provides information about input and output ports but hides internal implementation.
23
16
24
-
####Levels of abstraction
17
+
### Levels of abstraction
25
18
26
19
* Behavioral Level( Design of Algorithm ) : Algorithmic and performance oriented programs are written with it.
27
20
* Dataflow Level( Design of Equation ) : "assign" keyword is used for dataflow modelling. ex : assign c = a+b;
28
21
* Gate Level( Interconnection with Logic Gates ) : Circuits will be defined by logic gates. ex : and(output, input) etc.
29
-
* Switch Level( Implementation in terms of switches ) : Transistors either MOS or switches which conduct or are open. This style in complex and decreasing in popularity.
22
+
* Switch Level( Implementation in terms of switches ) : Transistors either MOS or switches which conduct or are open. This style is complex and decreasing in popularity.
30
23
31
-
---
32
-
#### Data Types
24
+
### Data Types
33
25
34
-
Two primary data-types are as follow :
35
-
* Nets : Connection between the components. Internal connection & is needed to be hidden from user. Like, wire a;
26
+
Two primary data-types are as follows :
27
+
* Nets : Connection between the components. Internal connection & is needed to be hidden from the user. Like, wire a;
36
28
* Registers : Store the data in variable. Like, reg a;
37
29
38
-
Other data-types are :
39
-
* Vectors : nets and registers can be declared as vectors with different widths. Like, wire[2:0] a; reg[7:0] b;
Integers, Arrays, Memories, Parameters, Strings are few other datatypes.
34
+
Integers, Arrays, Memories, Parameters, Strings are few other data types.
43
35
44
-
---
45
-
#### Concepts To Get Started
36
+
### Concepts To Get Started
46
37
47
-
* Module Instantiation : Process of connecting one module to another.
38
+
* Module Instantiation : Process of connecting one module to another.
48
39
Its subparts are Positional Mapping and Nomenclature Based Mapping.
49
40
```
50
41
ex 1 : module pos_map(q,clk,rst)
51
-
output[1:0] q;
52
-
input clk, rst;
53
-
tflipflop lab0(q[0], clk, rst);
54
-
tflipflop lab1(q[1], clk, rst);
55
-
end
56
-
42
+
output[1:0] q;
43
+
input clk, rst;
44
+
tflipflop lab0(q[0], clk, rst);
45
+
tflipflop lab1(q[1], clk, rst);
46
+
end
47
+
57
48
ex 2 : module nom_map(q,clk,rst)
58
-
output[1:0] q;
59
-
input clk, rst;
60
-
tflipflop lab0(.q(q[0]), .clk(clk), .rst(rst));
61
-
tflipflop lab1(.q(q[0]), .clk(clk), .rst(rst));
62
-
end
49
+
output[1:0] q;
50
+
input clk, rst;
51
+
tflipflop lab0(.q(q[0]), .clk(clk), .rst(rst));
52
+
tflipflop lab1(.q(q[0]), .clk(clk), .rst(rst));
53
+
end
63
54
```
64
55
65
-
* Comments : // for single line comment and /* ... */ multple comment lines.
66
-
67
-
* $display vs $monitor : $dispay is used to display immediate value of variables. It gets executed in active region. $monitor gets executed whenever the value of the given variable changes in it. It gets executed in the postponed region. Monitor is required only once to be written.
68
-
69
-
#### Note
70
-
71
-
More relevant points to be added.
56
+
* Comments : // for single line comment and /* ... */ multiple comment lines.
72
57
73
-
---
58
+
* $display vs $monitor : $dispay is used to display immediate value of variables. It gets executed in an active region. $monitor gets executed whenever the value of the given variable changes in it. It gets executed in the postponed region. Monitor is required only once to be written.
74
59
75
-
####Regular Codes
60
+
### Regular Codes
76
61
77
62
* and 
78
63
*
@@ -86,9 +71,6 @@ More relevant points to be added.
86
71
*
87
72
*
88
73
89
-
90
-
---
91
-
92
74
#### Code For Concepts
93
75
94
76
* and 
@@ -97,15 +79,13 @@ More relevant points to be added.
0 commit comments