W
whygee
Hi !
my today's challenge is to write (report) the value
of a std_ulogic with the least code bloat.
So I want to make a string out of a std_ulogic.
I have seen a conversion function in the synopsys package
but I want to avoid it. It works by defining an array type,
then a constant of this type, and finally the conversion
is a lookup in this constant table.
However this constant table should not have been re-defined,
it is already provided by the package std_logic_1164 :
TYPE std_ulogic IS ( 'U', -- Uninitialized
'X', -- Forcing Unknown
'0', -- Forcing 0
'1', -- Forcing 1
'Z', -- High Impedance
'W', -- Weak Unknown
'L', -- Weak 0
'H', -- Weak 1
'-' -- Don't care
);
however the resulting structure is not an array but a type :-/
I have searched several combinations of attributes but I don't
succeed in getting a character out of this :-(
any hint ?
I just want to display one signal ...
yg
my today's challenge is to write (report) the value
of a std_ulogic with the least code bloat.
So I want to make a string out of a std_ulogic.
I have seen a conversion function in the synopsys package
but I want to avoid it. It works by defining an array type,
then a constant of this type, and finally the conversion
is a lookup in this constant table.
However this constant table should not have been re-defined,
it is already provided by the package std_logic_1164 :
TYPE std_ulogic IS ( 'U', -- Uninitialized
'X', -- Forcing Unknown
'0', -- Forcing 0
'1', -- Forcing 1
'Z', -- High Impedance
'W', -- Weak Unknown
'L', -- Weak 0
'H', -- Weak 1
'-' -- Don't care
);
however the resulting structure is not an array but a type :-/
I have searched several combinations of attributes but I don't
succeed in getting a character out of this :-(
any hint ?
I just want to display one signal ...
yg