﻿1
00:00:12,890 --> 00:00:19,850
Welcome to the integer boolean data types lecture and this lecture I'm going to discuss integers and

2
00:00:19,850 --> 00:00:23,550
moolie and Data Types of the VHDL language.

3
00:00:23,720 --> 00:00:25,460
First we'll start with integers.

4
00:00:25,460 --> 00:00:32,330
Integers are declared in the package standard integers have values that are whole numbers in a specified

5
00:00:32,330 --> 00:00:33,280
range.

6
00:00:33,650 --> 00:00:39,530
Which means if you have we can represent three but we cannot represent three point two we can represent

7
00:00:39,530 --> 00:00:44,540
three four but no numbers between with an integer.

8
00:00:44,540 --> 00:00:47,890
This allows you to use the plus and minus operators.

9
00:00:47,900 --> 00:00:52,910
So if you have two editors we can add them together and assign it to a third integer.

10
00:00:52,910 --> 00:00:55,830
This is the main advantage over a standard logic vector.

11
00:00:55,970 --> 00:01:00,340
However with an integer you cannot modify individual bits.

12
00:01:00,410 --> 00:01:06,260
So we just specify a range and we can change that number but we cannot individually select or change

13
00:01:06,560 --> 00:01:11,880
bits and injure as denoted by the spelling of itself.

14
00:01:11,930 --> 00:01:13,600
I n t g.

15
00:01:13,740 --> 00:01:17,330
Your example of an integer.

16
00:01:17,540 --> 00:01:20,750
We have our data class which is a signal.

17
00:01:20,750 --> 00:01:22,970
We have our signal name calling.

18
00:01:23,000 --> 00:01:24,560
Clock counter.

19
00:01:24,560 --> 00:01:29,210
And then we have our data type which is an integer specified by the integer spelling.

20
00:01:29,570 --> 00: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.

21
00:01:36,260 --> 00:01:43,300
So we give it a range and the keywords for that is you go range low end to the high end.

22
00:01:43,310 --> 00:01:48,110
So in this case we give it a range of 0 to max clock count.

23
00:01:48,110 --> 00:01:52,670
So whatever value or Max clock count as that is the size of our integer.

24
00:01:52,790 --> 00:01:58,910
So if our max clock count is four or integer is going to be a range from zero to 4.

25
00:01:58,940 --> 00:02:05,320
So that means the integer can be any whole number between means 0 1 2 3 and 4.

26
00:02:05,480 --> 00:02:08,630
And so that is how you initialize an integer.

27
00:02:08,630 --> 00:02:15,860
Also we can use integers in the generic which is commonly used example we have a generic called baud

28
00:02:16,220 --> 00:02:21,890
and we get the data type integer and we are giving it the value 1 9 2 0 0.

29
00:02:21,890 --> 00:02:25,880
Now if you notice in the generic We didn't give it a range.

30
00:02:25,880 --> 00:02:31,970
If you don't get your integer range it would default to 32 bits or depending upon whichever compiler

31
00:02:31,970 --> 00:02:39,440
or synthesizer you're using it will give it a specified range and a commonly is a 32 bit integer so

32
00:02:39,440 --> 00:02:43,670
it's like 0 to 65000 or some really large number.

33
00:02:43,880 --> 00:02:48,100
So if you really want to make sure that you're not using more resources then you need to.

34
00:02:48,250 --> 00: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

35
00:02:56,120 --> 00:02:58,550
and is also declared in the package standard.

36
00:02:58,640 --> 00:03:01,080
It can be either a 1 or a.

37
00:03:01,100 --> 00:03:02,580
True or false.

38
00:03:02,810 --> 00: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

39
00:03:09,770 --> 00:03:12,270
B 0 0 0 0 0.

40
00:03:12,530 --> 00:03:15,980
An example of a boolean.

41
00:03:15,980 --> 00:03:19,790
We're going to specify the most commonly used in a generic.

42
00:03:19,970 --> 00:03:27,210
So we have a name which is synchronous reset the datatype specified boolean and then the boolean value.

43
00:03:27,230 --> 00:03:29,280
And here we're indicating it is true.

44
00:03:29,450 --> 00:03:32,910
So we could type in either true or zero or 1.

45
00:03:33,110 --> 00:03:35,620
Or false.

46
00:03:35,630 --> 00:03:38,780
Now we've covered all the data types supported by VHDL.

47
00:03:38,780 --> 00:03:40,250
Let's learn about the syntax.

