1
00:00:02,730 --> 00:00:07,170
In the previous lecture, we developed a combination lock controller in Nicholas.

2
00:00:08,170 --> 00:00:15,310
Now, the question is, how can we synthesize and develop death invite to such as this lecture will

3
00:00:15,310 --> 00:00:16,240
address this question.

4
00:00:22,500 --> 00:00:30,210
Our combination look at this description in the previous lecture had two ports, the input and the door

5
00:00:30,210 --> 00:00:31,020
open out.

6
00:00:33,110 --> 00:00:40,160
In order to test our circuit on the basis report, we are to order inputs and two other outputs to description

7
00:00:40,940 --> 00:00:45,710
the one with ENTA input determines the validation of the number on X input.

8
00:00:46,940 --> 00:00:53,840
In other words, this input tells the state machine that the input data is already invalid and can be

9
00:00:53,840 --> 00:00:54,470
sampled.

10
00:00:55,600 --> 00:01:02,470
Two groups of Output's drive a seven segment display to show a number corresponding to the index of

11
00:01:02,470 --> 00:01:03,400
the circuit state.

12
00:01:03,790 --> 00:01:09,050
This table shows the number shown on seven segment display corresponding to each state.

13
00:01:09,520 --> 00:01:15,000
These outputs are added only for debugging purposes and for understanding the circuit behavior.

14
00:01:16,110 --> 00:01:22,560
The one with lock input closes the open door, actually, it resets the state machine and puts that

15
00:01:22,560 --> 00:01:23,910
in a state as zero.

16
00:01:27,790 --> 00:01:33,940
To give new input to the design, we can connect the input to slide switches on the basis of report

17
00:01:34,210 --> 00:01:36,340
and enter input to a push-button.

18
00:01:37,300 --> 00:01:43,990
Then whenever we change the X value, we press the push button, which will give a single cycle pulse

19
00:01:43,990 --> 00:01:44,610
to the design.

20
00:01:45,400 --> 00:01:51,310
When the design finite state machine detects a single pulse on the enter input, it reads the X value

21
00:01:51,640 --> 00:01:53,650
and changes the state appropriately.

22
00:01:54,320 --> 00:01:55,750
Let's develop our design.

23
00:01:55,750 --> 00:01:56,800
Invite the specialists.

24
00:02:00,060 --> 00:02:06,510
Creating a white essentialist project with the name of combination underscore luck dashed by the socialist

25
00:02:06,880 --> 00:02:12,170
choose combination, underscore luck as a top functionary, choose the basis to report and the target

26
00:02:12,180 --> 00:02:13,200
FPGA platform.

27
00:02:34,650 --> 00:02:40,890
Download the design and test bench fines from the resources folder attached to this lecture at the fines

28
00:02:40,890 --> 00:02:41,730
to the project.

29
00:02:55,170 --> 00:02:56,130
Let's have a look at the.

30
00:02:59,960 --> 00:03:05,720
Open the design header file after including the required Heather finds an array containing the seven

31
00:03:05,720 --> 00:03:08,930
segment codes from zero to nine is defined.

32
00:03:11,070 --> 00:03:18,540
The design fine utilizes an enumeration type to define the design the states, then it's a function

33
00:03:18,540 --> 00:03:25,050
called get underscore seven underscore segment underscore code returns, the seven segment code corresponding

34
00:03:25,050 --> 00:03:26,220
to a received number.

35
00:03:27,750 --> 00:03:29,940
Then there is a design top function.

36
00:03:30,980 --> 00:03:34,830
Which receives three inputs and generates three hours.

37
00:03:35,880 --> 00:03:41,550
First, we define a static variable representing a hardware register which holds the design state.

38
00:03:41,940 --> 00:03:48,120
We also define the corresponding variable to keep track of all intermediate values for this state throughout

39
00:03:48,120 --> 00:03:48,600
the code.

40
00:03:50,420 --> 00:03:56,190
There is also a variable that holds all the intermediate values for the door open outward argument.

41
00:03:57,140 --> 00:03:59,390
Now we should define the statement.

42
00:04:02,440 --> 00:04:04,040
It contains five states.

43
00:04:04,690 --> 00:04:12,100
It starts at the S02 state whenever the signal is one, it reads the value on X and changes the state

44
00:04:12,190 --> 00:04:18,940
if it's to the input and will also be checked in other states before reading the value on X.

45
00:04:20,260 --> 00:04:26,530
Only in the last state in which the door is open, the state machine checks the lock input to lock the

46
00:04:26,530 --> 00:04:29,230
door and goes to the zero state.

47
00:04:34,730 --> 00:04:41,260
The testimony hydrofoil includes a design header fine and defines the design prototype, the test bench

48
00:04:41,270 --> 00:04:47,490
main function sets different value on X and activates to enter signals to give a proper sequence to

49
00:04:47,490 --> 00:04:48,080
the design.

50
00:04:48,500 --> 00:04:51,230
Please have a close look at the lines.

51
00:05:08,860 --> 00:05:10,720
Now let's perform the simulation.

52
00:05:31,790 --> 00:05:37,540
The output represents the state transitions after calling the top function with proper input data.

53
00:05:51,780 --> 00:05:57,900
After performing the high level sensors, the analysis perspective confirms the single cycle design

54
00:05:57,900 --> 00:05:58,290
a scheme.

55
00:06:10,640 --> 00:06:13,640
Now let's perform the RTL CECO simulation.

56
00:06:14,390 --> 00:06:17,990
Don't forget to select the all option for the down price feature.

57
00:06:55,180 --> 00:06:59,710
After finishing the RTL school simulation process opened the wavier.

58
00:07:04,330 --> 00:07:09,030
And show the design, input and output signals as well as the design Calexico.

59
00:07:48,660 --> 00:07:50,820
Now check the state transitions.

60
00:07:53,830 --> 00:08:00,430
In the last state, that is two, three, four, six, the door is open and the door is open until we

61
00:08:00,430 --> 00:08:02,170
activate the lock input signal.

62
00:08:20,290 --> 00:08:24,780
I know that you may have noticed some slight glitches on some outfits.

63
00:08:25,130 --> 00:08:30,570
First of all, these glitches are very tiny and don't impact the function behavior.

64
00:08:31,250 --> 00:08:36,350
It seems some simulation structures behind the scene calls these glitches.

65
00:08:38,710 --> 00:08:45,850
After checking the design behavior and timing, now we should export the RTL IP ready for logic synthesis.

66
00:08:54,500 --> 00:09:01,190
In the next lecture, we will instantiate our generated IP interview via the project to perform the

67
00:09:01,190 --> 00:09:05,840
largest synthesis and program, the basis to reward for playing with our design.

68
00:09:09,300 --> 00:09:14,850
This is our takeaway message, adding some design internal signals and registers to the top function

69
00:09:14,850 --> 00:09:18,290
arguments can help to better understand the design behavior.

70
00:09:21,230 --> 00:09:27,440
Now, the quiz question trying to find a reason that causes the glitches on the output waveform in the

71
00:09:27,440 --> 00:09:29,570
article, simulation output.
