Pullup , Pulldown in verilog

For bidirectional bus mostly pullup/weak state is used on interface when no other driver is present.

It can be assigned by following way.

1 . pullup(io_dq) , pulldown(io_dq)

2.  assign (weak1,weak0) io_dq = (direction) ? io : 1’bz;

Below table shows different values for each strength .

Strength
Value
Value displayed by display tasks
supply
7
Su
strong
6
St
pull
5
Pu
large
4
La
weak
3
We
medium
2
Me
small
1
Sm
highz
0
HiZ

To display strength of a signal %v is used with signal name. e.g. $display(“%v”,io_dq)

Please note that if you assign a wire directly by using assign io_w = io_c , then strength of wire io_c is not transfered to wire io_w. it has to be assigned by using assign (weak1,wek0) io_w = io_c .

Please provide comments to improve blog !!

SystemVerilog for Verification: A Guide to Learning the Testbench Language Features

SVA: The Power of Assertions in SystemVerilog

2 Comments Add yours

  1. PUSHPALATHA B S says:

    hi, please explain the meaning of this clearly. I am not able to understand: assign (weak1,weak0) io_dq = (direction) ? io : 1’bz

    Like

    1. Sattva says:

      1. Whenever direction=1 , it assigns io wire to io_dq else io_dq will be 1’bz.
      2. When it assigns io_dq to io , strength of assignment will be weak1 or weak0.

      Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s