boolean to std_logic

Dec 31, 2003 2 Replies

Is there any standard package that can convert TRUE to '1' and FALSE to '0'? Should I write my function? Why there isn't implicit sythax of that?


Please ignore this message it was sent to appropriate comp.lang.vhdl group.

:Is there any standard package that can convert TRUE to '1' and FALSE to '0'? :Should I write my function? Why there isn't implicit sythax of that? :

There are a number of standard functions for this, in the various libraries. Example: ieee.numeric_extra.to_std_logic()

There isn't "implicit syntax" because VHDL is a strongly-typed language. You can only change one type to another explicitly. (Some day, that will save your life :)

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required