How Do You Represent High Impedance States in Verilog?

  • Thread starter Thread starter asd1249jf
  • Start date Start date
  • Tags Tags
    Impedance
Click For Summary
SUMMARY

The discussion centers on representing high impedance states in Verilog. Specifically, a 16-bit hexadecimal value can be represented in high impedance using the syntax "16'hz" or "16'h?". Additionally, it is clarified that there is no concept of an unsized hexadecimal number in Verilog; any hexadecimal value without a specified size defaults to 32 bits. This highlights the importance of understanding variable sizing and high impedance states in Verilog programming.

PREREQUISITES
  • Understanding of Verilog syntax and data types
  • Knowledge of hexadecimal number representation
  • Familiarity with digital logic concepts, particularly high impedance states
  • Basic experience with hardware description languages (HDLs)
NEXT STEPS
  • Research Verilog data types and their implications on design
  • Learn about the use of high impedance states in digital circuits
  • Explore the differences between sized and unsized variables in Verilog
  • Study examples of Verilog code that implement high impedance states
USEFUL FOR

Digital designers, hardware engineers, and students learning Verilog who need to understand high impedance states and variable sizing in hardware description languages.

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 1 ·
Replies
1
Views
2K
Replies
2
Views
7K
  • · Replies 47 ·
2
Replies
47
Views
6K
Replies
5
Views
2K
  • · Replies 62 ·
3
Replies
62
Views
10K
Replies
2
Views
2K
Replies
9
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K