Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Hardware Description Language STD_LOGIC

Status
Not open for further replies.

Electroenthusiast

Active Member
Digital electronics theory supports four distinct logic values (as defined in VHDL's std_logic):
* 1 or High, usually representing TRUE.
* 0 or Low, usually representing FALSE.
* X representing a "Conflict".
* U representing "Unassigned" or "Unknown".
* - representing "Don't Care".
* Z representing "high impedance", undriven line.
* H, L and W are other high-impedance values, the weak pull to "High", "Low" and "Don't Know" correspondingly.

Reference: en.wikipedia.org/wiki/Ternary_logic

I didnt understand the concept of X, Z, H, L & W

Where is "conflict used in VHDL" ?
I read about High Impedance state, but may i know where exactly it has practical appliaction? As in Wiki ... i question why should 'we use it(refer wiki)?'
And whats weak High(H) / weak Low(L) ? Where is its practical Apllication?

Whats the difference between Unknown U and Don't Know (W)?... i guess both are some; am i right ?
 
Last edited:
A conflict occures when two drivers are driving one signal at the same time.

A tristate is high impeadance. It's used on a shared bus when you have multiple drivers, only one driver is allowed to drive the bus, so the other's must have high output impeadance, so that the signal experiences no conflicts ( see above for conflicts )

Weak highs and weak lows allows conflicts to occur without errors. If one driver is driving a "strong" signal and another one is driving a "weak" signal, then the value of the signal will resolve to the level of the "strong" driver. A real example of this condition is a pullup network, which holds a line at a particular level until a driver drives it to a different level.

Not sure about W.
 
Last edited:
In VHDL 1164 std logic lib, X is strong driven unknown not a conflict. W is weak driven unknown, and U is uninitialized.
 
Last edited:
A conflict occures when two drivers are driving one signal at the same time.

A tristate is high impeadance. It's used on a shared bus when you have multiple drivers, only one driver is allowed to drive the bus, so the other's must have high output impeadance, so that the signal experiences no conflicts ( see above for conflicts )

Weak highs and weak lows allows conflicts to occur without errors. If one driver is driving a "strong" signal and another one is driving a "weak" signal, then the value of the signal will resolve to the level of the "strong" driver. A real example of this condition is a pullup network, which holds a line at a particular level until a driver drives it to a different level.

Not sure about W.

Thanks, but require more information about it...

In VHDL 1164 std logic lib, X is strong driven unknown not a conflict. W is weak driven unknown, and U is uninitialized.

What value will Unknown it take? 0 / 1 / ?
what does 1164 signify there? i'm asking this because its there in my mind from many days...
Even this one: ....VHDL was IEEE Standard 1073-1993... what does 1073 signify? On what basis ? :)
 
To be honest, I have not worked with VHDL in over 10 years and I forgot more than I remember, but from best as I recall, unknown implies that the wire being defined as X will power up as either a logic 1 or 0. This is most often used for running simulations, ie. a way to verify a design with the state of a node being unknown. I have a early class so I don't have time to drag out my VHDL books and read up, but I will do so tomorrow if you still need clarification. I imagine our resident HDL expert Brownout will be able clear things up quite nicely although I think he writes in Verilog. :)
 
............from best as I recall, unknown implies that the wire being defined as X will power up as either a logic 1 or 0. This is most often used for running simulations, ie. a way to verify a design with the state of a node being unknown............
....drag out my VHDL books and read up....

That's more than enough for me;
Dont worry i'l not be troubling you somuch! LOL :)
 
What value will Unknown it take? 0 / 1 / ?

Well, it's unknown, so there is no way to know what value it will take. Mike is right, this is primarily a definition for simulation. But it real life, an unknown could be a 1, a 0 or a conflict, in which case it could be an indeterminate value. Think of it this way, what is the value of a net which is driven to a "1" by one chip, and a "0" by a different one?
 
Last edited:
Well, it's unknown, so there is no way to know what value it will take. Mike is right, this is primarily a definition for simulation. But it real life, an unknown could be a 1, a 0 or a conflict, in which case it could be an indeterminate value. Think of it this way, what is the value of a net which is driven to a "1" by one chip, and a "0" by a different one?

ok, can u give me a practical example where unknown is used? :O
Any Book? I have one from Nazeih M. Botros;
 
Code:
process RAM(ce, rw, din, dout, address, error)
begin
  if(ce = 'x') then
   error <= '1';
   dout <= "xxxx";
  elsif(ce = '0') then
   error <= '0';
   dout <= "zzzz";
  elsif(ce = '1') then
   error <= '0';
   dout <= ram(address);
   ...
 
Last edited:
Code:
process RAM(ce, rw, din, dout, address, error)
begin
  if(ce = 'x') then
   error <= '1';
   dout <= "xxxx";
  elsif(ce = '0') then
   error <= '0';
   dout <= "zzzz";
  elsif(ce = '1') then
   error <= '0';
   dout <= ram(address);
   ...

if(ce = 'x') then
error <= '1';

Even without the above lines the program can be written, what advantage does it make?
i know that 'ce' can be 0 or 1?
What difference does it makes ( if you remove those lines in program)? :)
 
Last edited:
If 'ce' is defined as STD_LOGIC, it can take on values other than '0' and '1'. For example, it could be 'x'. So, if it has the value of 'x', then which condition in the code would resolve to true? The answer can't be determined without those lines.
 
Finally, Learnt It!!!
X > A conflict occures when two drivers are driving one signal at the same time.
U> Unknown
So was bit confused!...
where did you get the above example?

:)
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top