11 Verilog Operators 19-08-2023
11 Verilog Operators 19-08-2023
Arithmetic Operators:
Unary Operators
It takes each bit from one operand and perform the operation with the corresponding
bit in other operand.
Result of both Logical & Case Equality Operators are logic-1 or logic-0.
Logical Equality operators will not consider “X” and “Z” components. It results “X”, when
the above components involved during operation.
Case Equality operators will consider “X” and “Z” components during operation.
Relational Operators:
Note:
Performs Bitwise operation on only one operand and the Result is one bit
1’b1 or 1’b0.
Regular Shift operators can shift the operand to the Left or Right number of bits.
After Shift operation, Vacant bit positions are filled with zero.
Arithmetic Shift operators can shift the operand to the Left or Right number of
bits.
After shift operation, Vacant bit positions are filled with a value which can be
determined by considering context of the expression.
Concatenation Operator:
Concatenations are expressed as operands within the braces, with Commas separating
the operands.
Conditional Operator:
Conditional operator having three operands.
Syntax:
(Conditional Expression) ? (True Expression) : (False Expression) ;
Data Types
Register
Net
Register data type:
Register can store/hold a value until next value assigned.
Synthesizable in Nature.
Not Synthesizable.
In Verilog, Nesting of Module is Illegal. That means one module definition
can not contain in another module definition. But, we can incorporate copies
of other module using module instantiation.
Verilog-Simulation:
For Simulation purpose, we apply different input stimulus (Test Bench) to the
digital design at different time, to check whether RTL code behaves in a given
intended manner or not.
Verilog-Synthesis:
Synthesis is a process in which the digital design that is modeled by HDL (RTL code)
is translated into the implementation consisting of Logic Gates.
Flow of Design starts from Top level block to Bottom level block.
Each Main Block divide into the Sub-blocks until reaches to the leaf cell
(smallest possible block).
Flow of Design starts from Bottom level block to Top level block.
First identify Building block (Module (or) Leaf Cell). Combined them to form
bigger block (Macro cell). And then use macros to form Top level block.