WEBVTT

00:13.230 --> 00:18.750
Here's a walkthrough of just kind of example outline of what a test bench would look like.

00:18.750 --> 00:22.380
Now this actual This code here wouldn't actually work.

00:22.380 --> 00:26.880
It's just kind of a skeleton or like what a test bench would look like.

00:27.000 --> 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

00:34.740 --> 00:37.770
libraries as well as standard logic 1 1 6 4.

00:37.780 --> 00:43.860
Also the numeric standard model all which allows us to use the center vector center logic vectors and

00:43.860 --> 00:46.780
the signed and unsigned types.

00:46.780 --> 00:53.520
Now libraries that are only supporter in test benches you can see here we have as the standard text

00:53.520 --> 00:56.040
I know and standard logic text.

00:56.250 --> 01:01.020
And this allows us to actually read in values from a text file.

01:01.020 --> 01:07.590
We have the entity which we just whatever name we call the testbench which normally we call it test

01:07.680 --> 01:12.350
underscore whatever the name of the actual design you're testing.

01:12.450 --> 01:18.740
And then we have the architecture test and this is where we instantiate the component of the VHDL entity

01:18.790 --> 01:19.920
we're testing.

01:20.370 --> 01:27.810
And we have the component names we essentially do the component instantiation and then in the to do

01:27.810 --> 01:33.080
section right on line 25 we want to create signals that we're going to use in our testbench.

01:33.330 --> 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

01:44.570 --> 01:44.830
to.

01:44.940 --> 01:47.820
We're testing port map and everything there.

01:47.820 --> 01:50.760
And then we'll have our expected process.

01:50.960 --> 01:57.140
Mine 33 and this is just a process where we're going to specify.

01:57.570 --> 01:59.080
It's going to give us the results we want.

01:59.130 --> 02:06.060
So the testbench is essentially we're generating inputs and this is a stimulus process 140 or C that

02:06.060 --> 02:12.630
is where we're actually generating inputs to put on the shelf while we are we're testing and then we

02:12.630 --> 02:18.210
want to check the outputs unexpected process and the end if we get if the results are not what we expect

02:18.690 --> 02:21.480
then we know that our design is not working correctly.

02:21.510 --> 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

02:27.240 --> 02:29.410
one this is kind of what the code will look like.
