﻿1
00:00:13,230 --> 00:00:18,750
Here's a walkthrough of just kind of example outline of what a test bench would look like.

2
00:00:18,750 --> 00:00:22,380
Now this actual This code here wouldn't actually work.

3
00:00:22,380 --> 00:00:26,880
It's just kind of a skeleton or like what a test bench would look like.

4
00:00:27,000 --> 00:00:34,740
So if you look at line 1 we've got comments and then lines three through five are where we call in the

5
00:00:34,740 --> 00:00:37,770
libraries as well as standard logic 1 1 6 4.

6
00:00:37,780 --> 00:00:43,860
Also the numeric standard model all which allows us to use the center vector center logic vectors and

7
00:00:43,860 --> 00:00:46,780
the signed and unsigned types.

8
00:00:46,780 --> 00:00:53,520
Now libraries that are only supporter in test benches you can see here we have as the standard text

9
00:00:53,520 --> 00:00:56,040
I know and standard logic text.

10
00:00:56,250 --> 00:01:01,020
And this allows us to actually read in values from a text file.

11
00:01:01,020 --> 00:01:07,590
We have the entity which we just whatever name we call the testbench which normally we call it test

12
00:01:07,680 --> 00:01:12,350
underscore whatever the name of the actual design you're testing.

13
00:01:12,450 --> 00:01:18,740
And then we have the architecture test and this is where we instantiate the component of the VHDL entity

14
00:01:18,790 --> 00:01:19,920
we're testing.

15
00:01:20,370 --> 00:01:27,810
And we have the component names we essentially do the component instantiation and then in the to do

16
00:01:27,810 --> 00:01:33,080
section right on line 25 we want to create signals that we're going to use in our testbench.

17
00:01:33,330 --> 00:01:44,570
And then after that in the begin we want to call some of them to test but we'll create the name of entity

18
00:01:44,570 --> 00:01:44,830
to.

19
00:01:44,940 --> 00:01:47,820
We're testing port map and everything there.

20
00:01:47,820 --> 00:01:50,760
And then we'll have our expected process.

21
00:01:50,960 --> 00:01:57,140
Mine 33 and this is just a process where we're going to specify.

22
00:01:57,570 --> 00:01:59,080
It's going to give us the results we want.

23
00:01:59,130 --> 00:02:06,060
So the testbench is essentially we're generating inputs and this is a stimulus process 140 or C that

24
00:02:06,060 --> 00:02:12,630
is where we're actually generating inputs to put on the shelf while we are we're testing and then we

25
00:02:12,630 --> 00:02:18,210
want to check the outputs unexpected process and the end if we get if the results are not what we expect

26
00:02:18,690 --> 00:02:21,480
then we know that our design is not working correctly.

27
00:02:21,510 --> 00:02:27,240
And so that's just kind of how novio But what a test bench looks like and kind of what when we create

28
00:02:27,240 --> 00:02:29,410
one this is kind of what the code will look like.

