R
rickman
Guest
I was using some logic to shorten typing of some operations where I
was trying to create tristate drivers. To be sure of the result I
looked up the logic tables and found that, for example the OR function
on a constant 'z' and a signal produces a '1' when the signal is a
'1', but when the signal is a zero results in an 'x'. This is not the
same as a 'z' obviously, which is what I wanted. Clearly this is not
a good idea even if it is shorter to type.
But I realized, how do I know what will be synthesized by this
expression? Then I came to my senses and realized I just needed to
use the IF statement and not worry about brevity.
Reading the sysnthesis standard 1076.6 it says,
'Three-state logic shall be modeled when an object, or an element of
the object, is explicitly assigned the IEEE Std 1164-1993 value Z.
The assignment to Z shall be a conditional assignment; that is,
assignment occurs under the control of a condition.'
So trying to get a logic function to do the job of a conditional
assignment just won't work, eh?
Rick
was trying to create tristate drivers. To be sure of the result I
looked up the logic tables and found that, for example the OR function
on a constant 'z' and a signal produces a '1' when the signal is a
'1', but when the signal is a zero results in an 'x'. This is not the
same as a 'z' obviously, which is what I wanted. Clearly this is not
a good idea even if it is shorter to type.
But I realized, how do I know what will be synthesized by this
expression? Then I came to my senses and realized I just needed to
use the IF statement and not worry about brevity.
Reading the sysnthesis standard 1076.6 it says,
'Three-state logic shall be modeled when an object, or an element of
the object, is explicitly assigned the IEEE Std 1164-1993 value Z.
The assignment to Z shall be a conditional assignment; that is,
assignment occurs under the control of a condition.'
So trying to get a logic function to do the job of a conditional
assignment just won't work, eh?
Rick