Professional Documents
Culture Documents
Chapter 6
3
Gate Primitives
• Example
4
Transmission Gate Primitives
5
Transmission Gate Primitives
• Example
6
bufif0 U1(data_bus,in, data_enable_low);
buf U2(out1,in);
not U3(out2,in);
7
Switch Primitives
• There are six different switch primitives (transistor models)
used in Verilog, nmos, pmos and cmos and the
corresponding three resistive versions rnmos, rpmos and
rcmos. The cmos type of switches have two gates and so
have two control signals.
• Syntax: keyword unique_name (drain, source, gate)
8
Switch Primitives
• Transmission gates are
bi-directional and can be
resistive or non-resistive.
• Resistive devices reduce
the signal strength which
appears on the output by
one level.
• All the switches only
pass signals from source
to drain, incorrect wiring
of the devices will result
in high impedance
outputs.
9
Switch Primitives
• Examples
10
Logic Values and Signal Strengths
11
Logic Values and Signal Strengths
12
Logic Values and Signal Strengths
• Two buffers that has output • Two buffers that has output
• A : Pull 1 • A : Supply 1
• B : Supply 0 • B : Large 1
• Since supply 0 is stronger • Since Supply 1 is stronger
then pull 1, Output C takes then Large 1, Output C takes
value of B. the value of A
13
Designing Using Primitives
• Designing using primitives is used only in library
development, where the ASIC vendor provides
the ASIC library Verilog description, using
Verilog primitives and User Defined Primitives
(UDP).
• Example
14
Designing Using Primitives
• Example
15
Designing Using Primitives
• D-Flip Flop from NAND Gate
16
Multiplexer 4 - > 1
17
18
Gate and Switch Delays
• In real circuits, logic gates have delays associated with them.
Verilog provides the mechanism to associate delays with
gates.
Rise, Fall and Turn-off delays.
Minimal, Typical, and Maximum delays.
• In Verilog delays can be introduced with #'num' as in the
examples below, where # is a special character to introduce
delay, and 'num' is the number of ticks simulator should delay
current statement execution.
#1 a = b : Delay by 1, i.e. execute after 1 tick
#2 not (a,b) : Delay by 2 all assignments made to a.
• Real transistors have resolution delays between the input and
output. This is modeled in Verilog by specifying one or more
delays for the rise, fall, turn-on and turn off time separated by
commas. 19
Gate and Switch Delays
• Syntax:
keyword #(delay{s}) unique_name (node specifications);
20
Gate and Switch Delays
• Rise Delay
The rise delay is associated with a gate output transition to 1
from another value (0, x, z).
• Fall Delay
The fall delay is associated with a gate output transition to 0
from another value (1, x, z).
21
Gate and Switch Delays
23
Gate and Switch Delays
24
Gate and Switch Delays
• Example - All Delays
25
Gate and Switch Delays
• Example – Complex Example
26
N-Input Primitives
27
N-Input Primitives
• Example
28
N-Output Primitives
29
N-Output Primitives
• Example
30
The End