vhdl and unknown values

Status
Not open for further replies.

krpz

Newbie level 3
Joined
Oct 18, 2012
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,313
Hello, i have a question about vhdl and unknown values,

I wonder if in structural vhdl we need to write some extra code in order to deal with unknown values.For example in this piece of code:

Agt <= (a and pr_a)or (a and (not b)) or ((not b) and pr_a);

i read somewhere that the and, or, xor and not operator has been defined to correctly model unknown values. So this code is ok , or we need to remodel?

thanks.
 

Yes, they will correctly model unknown value by outputting unknown. any unknown in the equation will cause the output to be unknown (or 'X')

So yes, the code is ok - it defines a boolean equation.

But on real hardware, only '1' and '0' exist. Unknown is just a simulation concept.
 
Reactions: krpz

    krpz

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…