Welcome to the integer boolean data types lecture and this lecture I'm going to discuss integers and
moolie and Data Types of the VHDL language.
First we'll start with integers.
Integers are declared in the package standard integers have values that are whole numbers in a specified
range.
Which means if you have we can represent three but we cannot represent three point two we can represent
three four but no numbers between with an integer.
This allows you to use the plus and minus operators.
So if you have two editors we can add them together and assign it to a third integer.
This is the main advantage over a standard logic vector.
However with an integer you cannot modify individual bits.
So we just specify a range and we can change that number but we cannot individually select or change
bits and injure as denoted by the spelling of itself.
I n t g.
Your example of an integer.
We have our data class which is a signal.
We have our signal name calling.
Clock counter.
And then we have our data type which is an integer specified by the integer spelling.
And then the size of the integer and to specify the size of the integer we want to give it a range.
So we give it a range and the keywords for that is you go range low end to the high end.
So in this case we give it a range of 0 to max clock count.
So whatever value or Max clock count as that is the size of our integer.
So if our max clock count is four or integer is going to be a range from zero to 4.
So that means the integer can be any whole number between means 0 1 2 3 and 4.
And so that is how you initialize an integer.
Also we can use integers in the generic which is commonly used example we have a generic called baud
and we get the data type integer and we are giving it the value 1 9 2 0 0.
Now if you notice in the generic We didn't give it a range.
If you don't get your integer range it would default to 32 bits or depending upon whichever compiler
or synthesizer you're using it will give it a specified range and a commonly is a 32 bit integer so
it's like 0 to 65000 or some really large number.
So if you really want to make sure that you're not using more resources then you need to.
You can specify the range that you are the Enter to be the next type of talk about is able in a way
and is also declared in the package standard.
It can be either a 1 or a.
True or false.
In this case a one is equal to a true A zero is equal to a false as denoted by the keywords boolean
B 0 0 0 0 0.
An example of a boolean.
We're going to specify the most commonly used in a generic.
So we have a name which is synchronous reset the datatype specified boolean and then the boolean value.
And here we're indicating it is true.
So we could type in either true or zero or 1.
Or false.
Now we've covered all the data types supported by VHDL.
Let's learn about the syntax.