Pullup , Pulldown in verilog

For bidirectional bus mostly pullup/weak state is used on interface by default. It can be assigned by following way.

1 . pullup(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 .

Advertisements

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s