How Do You Represent High Impedance States in Verilog?

  • Thread starter Thread starter asd1249jf
  • Start date Start date
  • Tags Tags
    Impedance
Click For Summary
High impedance states can be represented in Verilog using the syntax 16'hz for a 16-bit hexadecimal value. It is clarified that a variable can indeed be declared as high impedance, contrary to the belief that it only occurs when a variable is neither on nor off. Additionally, there is no concept of unsized hexadecimal numbers in Verilog; any unspecified size defaults to 32 bits. The correct representation for a 16-bit high impedance state is 16'hz, while hexadecimal values like BEEF will default to 32 bits if not sized. Understanding these representations is crucial for proper coding in Verilog.
asd1249jf
High Impedance in Verilog?

Homework Statement



Provide the correct Verilog text for encoding the following numerical values:

A) A 16 bit hexadecimal with all positions in the high impedance state:

B) An unsized hex number BEEF

Homework Equations



Verilog Problem. There is no relavant equation to be used.

The Attempt at a Solution



What the.. I didn't even know a variable can literally be declared as high impedance. I thought high impedance state occurs when the variable is neither off or on.

Also, I thought the variables you declare in verilog MUST be sized.

How are these accomplished?
 
Last edited by a moderator:
Physics news on Phys.org
l46kok said:

Homework Statement



Provide the correct Verilog text for encoding the following numerical values:

A) A 16 bit hexadecimal with all positions in the high impedance state:

B) An unsized hex number BEEF

Homework Equations



Verilog Problem. There is no relavant equation to be used.

The Attempt at a Solution



What the.. I didn't even know a variable can literally be declared as high impedance. I thought high impedance state occurs when the variable is neither off or on.

Also, I thought the variables you declare in verilog MUST be sized.

How are these accomplished?

You actually can have the states as high-impedance. In your case, it would be

16'h?
or
16'hz

would work.

There is no such thing as unsized hex number. Even if you forget to declare the size, by default, verilog would size it as 32 bit.
 

Similar threads

Replies
6
Views
10K
  • · Replies 5 ·
Replies
5
Views
3K
Replies
2
Views
7K
Replies
1
Views
2K
  • · Replies 47 ·
2
Replies
47
Views
5K
Replies
5
Views
2K
Replies
2
Views
2K
Replies
9
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K