0
1
00:00:03,070 --> 00:00:10,240
How to evaluate our code at the early stages of the design flow and find the possible errors? Simulation
1

2
00:00:10,420 --> 00:00:16,420
is one of the common techniques to answer this question. And a testbench is an essential component 
2

3
00:00:16,510 --> 00:00:17,910
in the simulation process. 
3

4
00:00:18,250 --> 00:00:24,220
In this lecture, I will talk about the basic concepts behind a high-level C/C++ testbench and its 
4

5
00:00:24,220 --> 00:00:26,070
role in the simulation process.
5

6
00:00:29,880 --> 00:00:35,430
Verification is the process, along with the design flow to ensure the final design would satisfy
6

7
00:00:35,430 --> 00:00:38,190
the original features described in the specification. 
7

8
00:00:39,700 --> 00:00:45,970
These features can be functional such as output values or non-functional such as timing, security 
8

9
00:00:45,970 --> 00:00:47,260
and power consumption, to name a few.
9

10
00:00:48,110 --> 00:00:53,630
A verification process may check the correctness of the design output values, or it can verify and 
10

11
00:00:53,630 --> 00:00:56,660
demonstrate the amount of security or power consumption. 
11

12
00:00:58,010 --> 00:01:01,010
There are different techniques for verification including
12

13
00:01:03,070 --> 00:01:09,480
Simulation, in which a full software environment is used to evaluate the design description. In this approach, 
13

14
00:01:09,640 --> 00:01:15,970
a piece of software called testbench applies some input to the design and the design outputs are compared
14

15
00:01:16,120 --> 00:01:17,320
to with golden models.
15

16
00:01:18,520 --> 00:01:24,700
Emulation, in which the components of the whole system are imported into an environment to evaluate the 
16

17
00:01:24,700 --> 00:01:25,630
target design.  
17

18
00:01:27,750 --> 00:01:34,020
Formal verification, in which some mathematical approaches are used to prove the correctness of a give
18

19
00:01:34,020 --> 00:01:37,220
design description. Intelligent verification.
19

20
00:01:38,230 --> 00:01:41,500
The focus of this course is mainly on simulation-based verification. 
20

21
00:01:43,010 --> 00:01:49,430
A combinational design has n inputs and m outputs. The role of simulation is to apply all possible 
21

22
00:01:49,430 --> 00:01:54,830
inputs and check the outputs, comparing with a golden model provided by the design specification. 
22

23
00:01:56,130 --> 00:02:01,650
In an ideal case, the number of inputs is two to the power of n (2n), which should be generated during the 
23

24
00:02:01,660 --> 00:02:06,510
simulation.  A testbench is a piece of software that manages the simulation process. 
24

25
00:02:06,870 --> 00:02:09,510
A typical testbench consists of four tasks:
25

26
00:02:10,480 --> 00:02:17,920
Generate inputs, Apply inputs to the design, Apply inputs to the golden model, Compare the outputs
26

27
00:02:17,920 --> 00:02:24,200
of design with that of the golden model. A testbench first generates the inputs, then applies 
27

28
00:02:24,220 --> 00:02:31,090
them to the design and golden model and finally compares the results and reports any discrepancy among
28

29
00:02:31,090 --> 00:02:31,270
them.
29

30
00:02:32,340 --> 00:02:40,230
Now that we get the testbench big picture, What is the testbench design flow in HLS? The next lecture 
30

31
00:02:40,230 --> 00:02:41,280
handles this question.
31

32
00:02:43,770 --> 00:02:50,160
These are our takeaway messages: Simulation is the verification technique provided by HLS tools
32

33
00:02:51,670 --> 00:02:59,350
A testbench should perform four main tasks: Generate input, Call the design, Execute the golden model
33

34
00:02:59,890 --> 00:03:02,980
and compare the design results with that of the golden model.
34

35
00:03:05,700 --> 00:03:12,270
Now the quiz question. Assume a hardware design has five binary inputs, how many input vectors should 
35

36
00:03:12,270 --> 00:03:15,450
a test bench generate to check the functionality of the design?
