1
00:00:01,740 --> 00:00:07,230
In this lecture, we are going to synthesize the home alarm system for the basis to report and examine

2
00:00:07,230 --> 00:00:13,080
the system, practically notice that the project source files are attached to this lecture under the

3
00:00:13,080 --> 00:00:14,060
resources folder.

4
00:00:14,930 --> 00:00:21,110
Firstly, creative, you are the Atlas project with the name of home underscore Alah, underscore system,

5
00:00:21,260 --> 00:00:22,150
Batsheva Atlas.

6
00:00:22,610 --> 00:00:26,750
Don't forget to choose the basis to report as a target FPGA platform.

7
00:00:44,790 --> 00:00:47,970
Now create new design and has been source on Weatherford's.

8
00:01:17,970 --> 00:01:24,270
Open the design, Heather Fry, then include the AP, underscore that each fight and declare an artery

9
00:01:24,540 --> 00:01:28,140
that keeps all the Southern segment codes from F to zero.

10
00:01:31,040 --> 00:01:35,300
Now open the design source file and then start developing the design top function.

11
00:01:36,450 --> 00:01:43,440
Define a function with two inputs and outputs as shown here, then add the port interfaces.

12
00:01:46,320 --> 00:01:52,380
In the function body, get this light switches argument, which has the main system inputs and it split

13
00:01:52,380 --> 00:01:56,160
the sensor data and the system code into separate variables.

14
00:01:57,980 --> 00:02:03,200
Here I have defined the show, underscore false variable to save the push-Button status.

15
00:02:04,990 --> 00:02:12,820
Send all the light, which is a status to LCD on the board now check if the system is on or off.

16
00:02:13,300 --> 00:02:17,260
If it's off, then sure, the letter O on olsun segments.

17
00:02:19,280 --> 00:02:25,820
Otherwise, check the sensors if there isn't any problem, showed the letter A on all seven segments

18
00:02:25,970 --> 00:02:29,830
otherwise called a security breach function for more inspection.

19
00:02:32,000 --> 00:02:34,490
Let's describe the security breach, top function.

20
00:02:37,610 --> 00:02:44,270
For this purpose, create a new source file under the source folder with the name of security underscore

21
00:02:44,270 --> 00:02:45,380
bridge that CPB.

22
00:02:47,130 --> 00:02:52,980
As there is a problem in the system, the function sends the letter E to all seven segments, then it

23
00:02:52,980 --> 00:02:56,270
checks the push buttons via show underscore false variable.

24
00:02:56,820 --> 00:03:02,220
Then according to the census, it calls the proper function to display information on the seven segments.

25
00:03:04,010 --> 00:03:09,830
The display underscore window function shows the window number on the first seven segment, if the corresponding

26
00:03:09,830 --> 00:03:16,610
push button has been pressed, the display underscore motion function does the same for motion sensors.

27
00:03:19,170 --> 00:03:23,420
Don't forget to add security breach function Prototyp to the design hydrofoil.

28
00:03:26,340 --> 00:03:31,110
Now go to the test bench hydrofoil and other designed top function prototype.

29
00:03:32,120 --> 00:03:38,030
And it has been a source file and start developing their main function, firstly, define the status

30
00:03:38,030 --> 00:03:39,980
variable and report that properly.

31
00:03:54,100 --> 00:04:01,150
Then define a couple of variables to be used later in the code, then we should generate the test inputs

32
00:04:01,390 --> 00:04:08,140
for this purpose, usefulness the loops each corresponds to a design input, then prepare the design

33
00:04:08,140 --> 00:04:13,960
function arguments and call the design and the koan and software implementation and report any discrepancy.

34
00:04:15,550 --> 00:04:21,070
The only thing that has been remained is the software implementation for this purpose, check the code

35
00:04:21,070 --> 00:04:22,970
in the source files attached to this lecture.

36
00:04:54,050 --> 00:04:57,800
Now we are ready for the simulation, run that and check the reports.

37
00:05:16,270 --> 00:05:22,300
After performing the simulation successfully run the synthesis process, the report should confirm that

38
00:05:22,300 --> 00:05:24,760
the result of the hardware is fully combination.

39
00:05:37,860 --> 00:05:44,040
Ron Artest article simulation and make sure that the general generated article hardware behaves as expected.

40
00:06:02,260 --> 00:06:06,340
Generally, the article ipe and be ready for the logic syntheses step.

41
00:06:16,330 --> 00:06:20,770
Create a new Rebadow project considering the basis report as a target FPGA.

42
00:06:45,710 --> 00:06:51,560
Then create a blog design before using the generated article IP, we should add that to the vision of

43
00:06:51,560 --> 00:06:52,340
the repository.

44
00:06:56,410 --> 00:07:03,100
So right somewhere inside the diagram tab and select the IP settings option, then go to the repository

45
00:07:03,100 --> 00:07:10,620
option under the IP on the left, then press the button and browse without the actual misfold Devadas,

46
00:07:10,630 --> 00:07:14,380
such as for any possible IP and adds that to the repository.

47
00:07:22,650 --> 00:07:30,350
Now, add our home alarm system, I.P. into the diagram area and make all the ports external change

48
00:07:30,370 --> 00:07:31,920
report names if you want.

49
00:07:46,450 --> 00:07:52,300
Now, we should define the physical constraints for the ports, as usual, define a new constraint while.

50
00:08:00,280 --> 00:08:04,090
And use the comment of constraints provided by the basis three board vendor.

51
00:08:04,980 --> 00:08:11,040
And uncommon, the required constrains and modified the report names, alternatively, you can simply

52
00:08:11,040 --> 00:08:15,750
copy and paste the constraints provided in the source files attached to this lecture.

53
00:09:23,250 --> 00:09:29,580
Now, debate history, don't forget to generate outward products and create a steel wrapper before that.

54
00:09:41,900 --> 00:09:44,540
Now we can program the board and examine the system.

55
00:10:09,800 --> 00:10:16,130
The Dunolly illuminates, which indicates the board has been configured as the system is off, the seven

56
00:10:16,130 --> 00:10:19,370
segments showed the lateral to turn on the system.

57
00:10:19,560 --> 00:10:24,770
We should insert the one zero one one pattern using the last four as light switches.

58
00:10:25,790 --> 00:10:30,470
Now, as there is no problem in the House that some segments show the letter A.

59
00:10:32,130 --> 00:10:38,100
Now, let's open the first window while the system is active for this purpose, we can change the state

60
00:10:38,100 --> 00:10:39,450
of the first light switch.

61
00:10:40,780 --> 00:10:47,140
Now, some segments show the letter to indicate the open window we can use to push buttons.

62
00:10:52,570 --> 00:10:55,570
Now, let's activate the motion sensor for this purpose.

63
00:10:55,720 --> 00:11:01,960
We can change the state of S.W. seven that models the second motion sensor pressing the center push

64
00:11:01,960 --> 00:11:05,440
button reveals the sensor number that has detected a motion.
