Tuesday, August 19, 2008

VHDL Part 24 : Boolean in VHDL

I had seen a lot of times that boolean types were used in generic declarations. I wonder where to use the boolean types so I did a little study that would eventually help me when to use it. my reference is cited at the bottom of this post.

In VHDL, Boolean types are enumerated types. It can only take two values: true and false. Of course, this does not have any width. It can be the result of any logical operation (or, nor, and, nand, xor, not) in an if statement for instance. It can also be assigned to a similar data type to express a logical state.

logicalState <= booleanValue;

Reference:
(1) Pellerin, D. and Taylor, D., VHDL Made Easy, Prentice Hall PTR, 1996.

No comments: