Professional Documents
Culture Documents
III-ECE
1-SEM
SYLLABUS UNIT - 1
•The Verilog language provides the digital designer with a means of describing a digital
system at a wide range of levels of abstraction, and, at the same time, provides access to
computer-aided design tools to aid in the design process at these levels.
• Verilog aimed at providing a functionally tested and a verified design description for the
target FPGA or ASIC
Verilog Basic
Case sensitive language
Keywords are lower case
Comments are specified as
// This is a single line comment
/* This is how a multiple-line
comment is specified in Verilog….. */
Multiple line comments can’t be nested
Semicolon(;) are line terminators
Four valued logic (‘0’,’1’,’z’,’x’)
Numbers are specified in the traditional form of a series of digits with or without a
sign but also in the following form:
<size><base format><number>
where <size> contains decimal digits that specify the size of the constant in the
number
VERILOG AS HDL
Circuit level
Gate level
Data flow level
Behavioral level
Ovarall design structure in verilog
Circuit level (or) switch level
called “Primitives”.
Data flow level
• All the activities scheduled at one time step are completed and then the
simulator.
Simulation and Synthesis
endmodule
SIMULATION AND SYNTHESIS TOOLS
- Modelsim and
• CASE SENSITIVITY
• KEYWORDS
• The keywords define the language constructs. A keyword signifies an activity to be
carried out, initiated, or terminated
•COMMENTS
• A single line comment begins with “//”
• multiline comments “/*” signifies the beginning of acomment and “*/” its end.
NUMBERS, STRINGS
•NUMBERS
• Integer Numbers : the number is taken as 32 bits wide.
• 25, 253, –253
- 8 'h f 4
Declaration
Strength Name Strength Level Element Modelled
Abbreviation
Supply Drive 7 Power supply connections. supply
Default gate & assign output
Strong Drive 6 strong
strength.
Gate & assign output
Pull Drive 5 pull
strength.
Large Capacitor 4 Size of trireg net capacitor. large
Gate & assign output
Weak Capacitor 3 weak
strength.
Medium
2 Size of trireg net capacitor. medium
Capacitor
Small Capacitor 1 Size of trireg net capacitor. small
High Impedence 0 Not Applicable. highz
Data Types
•The data handled in Verilog fall into two categories:
(i)Net data type
(ii)Variable data type
• The two types differ in the way they are used as well as with regard
to their respective hardware structures.
DIFFERENCES BETWEEN WIRE AND TRI
•wire: It represents a simple wire doing an interconnection.
• Only one output is connected to a wire and is driven by that.
• tri: It represents a simple signal line as a wire. Unlike the wire, a tri
can be driven by more than one signal outputs
Variable Data Type
•A variable is an abstraction for a storage device
• reg
• time
• integer
• real
• Realtime
•MEMORY
• Reg [15:0] memory[511:0];
• an array called “memory”; it has 512 locations.
• Each location is 16 bits wide
Scalars and Vectors
•Entities representing single bits — whether the bit is stored,
• changed, or transferred — are called “scalars.”
• Multiple lines carry signals in a cluster treated as a “vector.”
• reg[2:0] b;
• reg[4:2] c;
• wire[-2:2] d ;
• All the above declarations are vectors.
• If range is not specifies it is treated as scalars
Parameters, Operators
•PARAMETERS
•All constants can be declared as parameters at the outset in a
Verilog module
• parameter word_size = 16;
• parameter word_size = 16, mem_size = 256;