1
00:00:01,480 --> 00:00:06,820
After understanding the idea behind the sermon segment driver Succot, let's ride the corresponding

2
00:00:06,880 --> 00:00:08,110
Etchells in this lecture.

3
00:00:10,940 --> 00:00:16,700
As I mentioned before, our CNN segment Driver Circuit consists of two behind IPIS generated by wired

4
00:00:16,700 --> 00:00:22,100
to suchness, signal generator and the driver to display the seven segment numbers.

5
00:00:23,870 --> 00:00:28,810
We start with designing the signal generator and then we design the display driver.

6
00:00:31,810 --> 00:00:35,170
We should refresh the southern segment by concentrate here.

7
00:00:35,380 --> 00:00:41,590
I assume that the refresh rate is 16 millisecond, then we should generate a sequence of single cycle

8
00:00:41,590 --> 00:00:46,060
pulses with a constant period, which is a quarter of the refrigerator.

9
00:00:46,420 --> 00:00:49,510
Therefore, the signal period is four milliseconds.

10
00:00:49,900 --> 00:00:57,820
If we assume that the design clock period is ten nanoseconds, then 400000 cycles fit in a single period.

11
00:00:59,420 --> 00:01:05,600
As you may notice, this signal generator circuit was one of the utility circuits that we designed earlier

12
00:01:05,600 --> 00:01:12,020
in this course, you can find the corresponding source files of this IP in the resources folder attached

13
00:01:12,020 --> 00:01:12,620
to this lecture.

14
00:01:16,360 --> 00:01:23,260
Let's quickly review the IP code invited us wise to such a project with the name of someone underscore

15
00:01:23,280 --> 00:01:28,890
segment underscore signal Dasch why the Socialists and choose the bases to be born as a target FPGA

16
00:01:28,900 --> 00:01:29,500
platform.

17
00:01:45,980 --> 00:01:51,320
Download the design and Test match files from the resources folder attached to this lecture and add

18
00:01:51,320 --> 00:01:52,730
them to the created project.

19
00:02:04,040 --> 00:02:09,440
Have a look at the design here for the macro signal, Andras Calpurnia is defined as the number of clock

20
00:02:09,440 --> 00:02:11,580
cycles fit in a single period.

21
00:02:12,620 --> 00:02:13,730
There are two definitions.

22
00:02:14,030 --> 00:02:21,350
One for the final article IP, which is 400000 and the other for the simulation purposes, which is

23
00:02:21,350 --> 00:02:21,620
10.

24
00:02:23,500 --> 00:02:28,900
The design source, Fine, contains a simple state machine implemented with an if else statement.

25
00:02:41,200 --> 00:02:45,860
And it has been a source file called the design top function several times in fall.

26
00:02:48,590 --> 00:02:53,210
Let's choose the value often for the signal underscore carrier to perform the simulation.

27
00:03:11,660 --> 00:03:17,240
The simulation output shows that the circuit generates a sequence of regular passes for the desired

28
00:03:17,240 --> 00:03:17,600
period.

29
00:03:17,720 --> 00:03:24,350
Now let's perform the sentences and then RTL CECO simulation and have a look at the signal waveforms.

30
00:05:12,870 --> 00:05:16,250
Signal waveforms also confirm the cycle accuracy of our design.

31
00:05:31,540 --> 00:05:38,330
Now for generating the article IP, we should change the signal undisclosed period Macross to 400000.

32
00:05:38,620 --> 00:05:44,230
Now the design should be synthesized again after finishing the high level syntheses export the corresponding.

33
00:06:39,860 --> 00:06:46,130
The display driver circuit receives for visitor numbers and generates the corresponding segment data

34
00:06:46,130 --> 00:06:49,370
and control signals as it is a sequential circuit.

35
00:06:49,400 --> 00:06:52,310
It receives a design clock signal and a result.

36
00:06:53,760 --> 00:06:56,680
If former state a state machine model the driver behavior.

37
00:06:57,360 --> 00:07:04,080
Each state provides data for one and segment, we also need a reference signal to trigger the transition

38
00:07:04,080 --> 00:07:04,940
between states.

39
00:07:05,430 --> 00:07:07,860
Let's write a driver code, each of us.

40
00:07:11,550 --> 00:07:17,520
Curity new white essentialist project with the name of seven underscore segment underscore driver dashboard

41
00:07:17,520 --> 00:07:22,480
to service to the seven underscore segment underscore driver as a top function name.

42
00:07:22,920 --> 00:07:25,980
Don't forget to choose the basis to report as a target of PJ.

43
00:07:36,730 --> 00:07:42,130
Download the design and test files from the resources folder attached to this lecture, add them to

44
00:07:42,130 --> 00:07:43,300
the creative project.

45
00:07:51,630 --> 00:07:58,820
Let's review the cuts first opened the design Heather, it includes AP underscore Intertek hydrofoil.

46
00:07:59,520 --> 00:08:05,550
It also defines a constant area containing the seven segment codes corresponding to the digits from

47
00:08:05,550 --> 00:08:06,150
zero to nine.

48
00:08:07,120 --> 00:08:14,080
Now open the design source file after including the header file, an enumeration type defines the state's.

49
00:08:16,300 --> 00:08:23,140
The design to function contains seven arguments, five inputs and outputs, the function is pipelined

50
00:08:23,140 --> 00:08:23,710
aswell.

51
00:08:24,890 --> 00:08:27,170
We also need to design port interfaces.

52
00:08:28,510 --> 00:08:35,470
A static labor holds the design state according to our design coding style, we define temporary variables

53
00:08:35,470 --> 00:08:38,230
corresponding to outputs and the circuit state.

54
00:08:39,340 --> 00:08:41,430
Now we need a forest state, state machine.

55
00:08:42,360 --> 00:08:48,720
We can use a switch statement to implement that initial state, the circuit sends out the data and control

56
00:08:48,720 --> 00:08:50,460
signals for one seven segment.

57
00:08:51,380 --> 00:08:57,410
The state transitions occur when the state machine receives a high voltage level on the reference signal

58
00:08:58,220 --> 00:09:01,820
as a reference signal provides a single cycle positive pulse.

59
00:09:01,820 --> 00:09:04,190
The state transitions happen regularly.

60
00:09:05,840 --> 00:09:09,590
In the end, we modified the state's register and Outsports.

61
00:09:12,710 --> 00:09:17,680
The test bench had a fight includes the design halophiles and the design top function prototype.

62
00:09:18,050 --> 00:09:24,410
Firstly, the test bench source file defines a match between seven segment codes and the digits from

63
00:09:24,410 --> 00:09:25,190
zero to nine.

64
00:09:26,370 --> 00:09:31,060
This map helps us to generate a more readable output after simulation.

65
00:09:31,530 --> 00:09:36,660
The main function body defines the required variable, then it calls the design several times.

66
00:09:39,390 --> 00:09:45,840
To generate regular passes for the design reference signal to nested loops are used, whereas the reference

67
00:09:45,840 --> 00:09:50,850
signal is zero throughout the inner loop execution, it becomes one in the outer fold.

68
00:09:51,180 --> 00:09:57,420
So using this technique, we generate a regular pulse with the period of 10 cycles that can be examined

69
00:09:57,510 --> 00:09:58,590
during the simulation.

70
00:09:59,280 --> 00:10:02,280
Now let's simulate the code and checked out.

71
00:10:24,070 --> 00:10:29,170
In the printed output, you see the number shown on a certain segment along with the corresponding seven

72
00:10:29,170 --> 00:10:30,430
segment control signals.

73
00:10:30,660 --> 00:10:37,510
Also, we can see that after every 10 repetitions, the circuit goes to the next state because of receiving

74
00:10:37,510 --> 00:10:39,750
a positive pulse on the input reference signal.

75
00:10:54,740 --> 00:10:57,470
Now, let's synthesize the code and check the reports.

76
00:11:24,890 --> 00:11:30,290
If you go to the analysis perspective, we can see that each function execution requires two clock cycles

77
00:11:30,290 --> 00:11:30,790
to finish.

78
00:11:30,950 --> 00:11:37,070
However, the function is pipelined with the initiation into one on one so it can accept input data

79
00:11:37,070 --> 00:11:38,090
on each clock cycle.

80
00:11:39,180 --> 00:11:43,770
Now we can perform the artillery simulation and check the signal waveforms.

81
00:13:43,480 --> 00:13:48,360
As we can see, when the circuit receives a positive level on the reference signal, it goes to the

82
00:13:48,360 --> 00:13:51,330
next state and drives the corresponding southern segment.

83
00:14:05,890 --> 00:14:11,980
Now clears the way for we are an export party, like ready for integrating the design ships and if you

84
00:14:11,980 --> 00:14:12,880
want to project.

85
00:14:39,820 --> 00:14:45,430
Now that we have generated the required lips for our Sun segment Drybar, we should connect them together

86
00:14:45,450 --> 00:14:50,550
any we want to project and generate the FPGA with a stream and check the design on the basis rebought.

87
00:14:50,830 --> 00:14:52,810
The next lecture will do this task.

88
00:14:58,290 --> 00:15:03,750
This is our takeaway message using this loops in the test range, we can generate different types of

89
00:15:03,750 --> 00:15:09,240
periodic input signals for the design on their test, which is described using the technique.

90
00:15:14,810 --> 00:15:21,410
Now, the question, why are there two clock cycles between the rising edge of the refresh signal and

91
00:15:21,410 --> 00:15:23,990
data changes on the seven segment signals?
