WEBVTT

00:12.890 --> 00:19.850
Welcome to the integer boolean data types lecture and this lecture I'm going to discuss integers and

00:19.850 --> 00:23.550
moolie and Data Types of the VHDL language.

00:23.720 --> 00:25.460
First we'll start with integers.

00:25.460 --> 00:32.330
Integers are declared in the package standard integers have values that are whole numbers in a specified

00:32.330 --> 00:33.280
range.

00:33.650 --> 00:39.530
Which means if you have we can represent three but we cannot represent three point two we can represent

00:39.530 --> 00:44.540
three four but no numbers between with an integer.

00:44.540 --> 00:47.890
This allows you to use the plus and minus operators.

00:47.900 --> 00:52.910
So if you have two editors we can add them together and assign it to a third integer.

00:52.910 --> 00:55.830
This is the main advantage over a standard logic vector.

00:55.970 --> 01:00.340
However with an integer you cannot modify individual bits.

01:00.410 --> 01:06.260
So we just specify a range and we can change that number but we cannot individually select or change

01:06.560 --> 01:11.880
bits and injure as denoted by the spelling of itself.

01:11.930 --> 01:13.600
I n t g.

01:13.740 --> 01:17.330
Your example of an integer.

01:17.540 --> 01:20.750
We have our data class which is a signal.

01:20.750 --> 01:22.970
We have our signal name calling.

01:23.000 --> 01:24.560
Clock counter.

01:24.560 --> 01:29.210
And then we have our data type which is an integer specified by the integer spelling.

01:29.570 --> 01:36.200
And then the size of the integer and to specify the size of the integer we want to give it a range.

01:36.260 --> 01:43.300
So we give it a range and the keywords for that is you go range low end to the high end.

01:43.310 --> 01:48.110
So in this case we give it a range of 0 to max clock count.

01:48.110 --> 01:52.670
So whatever value or Max clock count as that is the size of our integer.

01:52.790 --> 01:58.910
So if our max clock count is four or integer is going to be a range from zero to 4.

01:58.940 --> 02:05.320
So that means the integer can be any whole number between means 0 1 2 3 and 4.

02:05.480 --> 02:08.630
And so that is how you initialize an integer.

02:08.630 --> 02:15.860
Also we can use integers in the generic which is commonly used example we have a generic called baud

02:16.220 --> 02:21.890
and we get the data type integer and we are giving it the value 1 9 2 0 0.

02:21.890 --> 02:25.880
Now if you notice in the generic We didn't give it a range.

02:25.880 --> 02:31.970
If you don't get your integer range it would default to 32 bits or depending upon whichever compiler

02:31.970 --> 02:39.440
or synthesizer you're using it will give it a specified range and a commonly is a 32 bit integer so

02:39.440 --> 02:43.670
it's like 0 to 65000 or some really large number.

02:43.880 --> 02:48.100
So if you really want to make sure that you're not using more resources then you need to.

02:48.250 --> 02:56.120
You can specify the range that you are the Enter to be the next type of talk about is able in a way

02:56.120 --> 02:58.550
and is also declared in the package standard.

02:58.640 --> 03:01.080
It can be either a 1 or a.

03:01.100 --> 03:02.580
True or false.

03:02.810 --> 03:09.740
In this case a one is equal to a true A zero is equal to a false as denoted by the keywords boolean

03:09.770 --> 03:12.270
B 0 0 0 0 0.

03:12.530 --> 03:15.980
An example of a boolean.

03:15.980 --> 03:19.790
We're going to specify the most commonly used in a generic.

03:19.970 --> 03:27.210
So we have a name which is synchronous reset the datatype specified boolean and then the boolean value.

03:27.230 --> 03:29.280
And here we're indicating it is true.

03:29.450 --> 03:32.910
So we could type in either true or zero or 1.

03:33.110 --> 03:35.620
Or false.

03:35.630 --> 03:38.780
Now we've covered all the data types supported by VHDL.

03:38.780 --> 03:40.250
Let's learn about the syntax.
