﻿1
00:00:01,400 --> 00:00:06,860
Welcome to Lafferty in this video I'm going to show you the complete isolation of the universal shift

2
00:00:06,860 --> 00:00:09,720
register should look like on the base to bored.

3
00:00:09,830 --> 00:00:15,130
Now if you have one or two don't worry on like this and I'm here to help.

4
00:00:15,200 --> 00:00:19,080
I'm more than happy you just send me an e-mail and let me know.

5
00:00:19,370 --> 00:00:22,990
This is probably a little bit more difficult but that's OK.

6
00:00:22,990 --> 00:00:25,130
That's the way I designed it was.

7
00:00:25,590 --> 00:00:26,920
I want to struggle a little bit.

8
00:00:26,930 --> 00:00:30,230
But if you're saying they're spending I don't want you to be frustrated.

9
00:00:30,290 --> 00:00:33,950
I want you to learn and that's the best way of learning is actually doing so.

10
00:00:34,070 --> 00:00:37,980
These labs are designed to have it so you have to understand the code.

11
00:00:38,450 --> 00:00:41,380
If you're ready let's grab your board let's go.

12
00:00:41,400 --> 00:00:41,790
All right.

13
00:00:41,790 --> 00:00:43,260
Here in lab three.

14
00:00:43,260 --> 00:00:47,650
Here is the universal shift register running on my basic toolbar.

15
00:00:47,790 --> 00:00:56,400
Now with the passing of the file that I gave you the inputs that are mapped are you've got an output

16
00:00:57,270 --> 00:01:03,450
which is eight minutes long which is represented by these eight ladies on the front of your base is

17
00:01:03,450 --> 00:01:10,500
two board right here and then you've got your input as your slight input which is these two switches

18
00:01:10,590 --> 00:01:16,500
on the far left over here and you've got your input which is the same as has a shift register in the

19
00:01:16,500 --> 00:01:17,540
previous line.

20
00:01:17,550 --> 00:01:23,520
Is this for switch over here and you've got the clock which is represented by this button right here

21
00:01:24,240 --> 00:01:28,950
and the reset which is indicated by this button over here.

22
00:01:28,960 --> 00:01:35,350
Now the way universal shift register works is very similar to the shift register except that with the

23
00:01:35,350 --> 00:01:40,000
universal shift register you can select if you want to shift to the left or do you want to shift to

24
00:01:40,000 --> 00:01:44,310
the right or do you want to load data and it's like a shift register.

25
00:01:44,310 --> 00:01:47,200
It's the same this or Friendster you just have more options.

26
00:01:47,330 --> 00:01:50,120
So you get demonstration here.

27
00:01:50,140 --> 00:01:55,380
So right here I've got these two select inputs are basically telling my shift register what I wanted

28
00:01:55,380 --> 00:01:57,870
to do right now they're both zero.

29
00:01:57,910 --> 00:02:01,690
So that is indicated as a whole where nothing happens.

30
00:02:01,690 --> 00:02:05,920
So if I click a button there nothing happens to it.

31
00:02:05,950 --> 00:02:14,290
Now if I push them both up right here I'm going to load the data bit and which is represented by just

32
00:02:14,290 --> 00:02:16,420
what's right here which is low right now.

33
00:02:16,430 --> 00:02:21,630
So if I push it you don't see anything because I'm losing zeros seemly now.

34
00:02:21,820 --> 00:02:23,510
Oh I hadn't thought of that up.

35
00:02:23,720 --> 00:02:32,760
And as soon as I was that button there you'll see a data represented by the light so if I push it again.

36
00:02:32,930 --> 00:02:39,230
It's basically a key so there are now five percent down to zero and go to zero in there and it turns

37
00:02:39,230 --> 00:02:40,610
that whole idea off.

38
00:02:40,640 --> 00:02:45,500
So let's go ahead and loaded it a bit and the shift register.

39
00:02:45,500 --> 00:02:45,940
OK.

40
00:02:45,950 --> 00:02:50,550
So when it had low then and now our select here we can determine if you want to shift to the right or

41
00:02:50,570 --> 00:02:51,650
left.

42
00:02:51,650 --> 00:02:53,080
If we shift to the right.

43
00:02:53,170 --> 00:02:56,190
This is basically going to fall off and go away.

44
00:02:56,210 --> 00:02:58,210
So we want to shift it to the left.

45
00:02:58,220 --> 00:03:04,150
So in order to do that we need to have our select before right one down what the far left one up but

46
00:03:04,250 --> 00:03:10,910
push that button you see a shift in over one and every time increase that call button it shifts over.

47
00:03:10,910 --> 00:03:17,430
Now if I'm on a ship at the fairway I go ahead and if I put them both down it's a whole where nothing's

48
00:03:17,450 --> 00:03:20,800
going to happen and push that button that it just stays there.

49
00:03:20,900 --> 00:03:22,400
But I would push them both up.

50
00:03:23,390 --> 00:03:24,250
Then go ahead.

51
00:03:24,270 --> 00:03:28,470
A lot of data that in which you see there lives in.

52
00:03:28,720 --> 00:03:33,610
And now let's say I want to continue shifting them down like so.

53
00:03:33,980 --> 00:03:35,570
OK now I shifting to the right.

54
00:03:35,680 --> 00:03:43,610
I just talked a lot down talk my selection of an old title over an ugly scene there.

55
00:03:43,660 --> 00:03:45,070
If I keep going.

56
00:03:45,400 --> 00:03:49,440
As soon as they get off the edge of your Ellet either that is kind of fall off and go away.

57
00:03:49,450 --> 00:03:54,670
That's because if you look in the code you're actually giving it a zero.

58
00:03:54,700 --> 00:03:58,890
As soon as it shifts out so it goes through and it clears out.

59
00:03:58,900 --> 00:04:06,760
Now here we have a reset which Let's go ahead and load some data and go to hit that target on and then

60
00:04:06,760 --> 00:04:14,750
you got to shift it down to that shifted in there which is a lot more operations but typically you would

61
00:04:14,750 --> 00:04:18,400
have something like inside your FPGA cube.

62
00:04:18,470 --> 00:04:23,010
You would have a clock and other things you'd have control things like that.

63
00:04:23,020 --> 00:04:27,920
And this clock we're just putting all these buttons and it switches so you can actually see and understand

64
00:04:28,030 --> 00:04:29,500
what's going on here.

65
00:04:29,510 --> 00:04:32,880
So give him a reset once again nothing happens.

66
00:04:33,050 --> 00:04:35,890
That's because a reset doesn't occur.

67
00:04:36,080 --> 00:04:37,550
It happens on a clock cycle.

68
00:04:37,760 --> 00:04:43,400
So I have to hold down my reset and press the clock and that's how you clear it which you can see that

69
00:04:43,400 --> 00:04:44,310
in the code.

70
00:04:44,380 --> 00:04:50,370
There's a piece of code there it's a process that is evaluated on a clock cycle.

71
00:04:50,370 --> 00:04:58,550
So for example some more bits in real quick and will explain how what was going on.

72
00:04:58,800 --> 00:05:02,330
OK so I've got three bits here and I clear them.

73
00:05:02,490 --> 00:05:09,540
If I hit the reset nothing's going to happen because that block of code there there's no the clock cycle

74
00:05:09,540 --> 00:05:12,840
hasn't happened yet so it's not being evaluated in that process.

75
00:05:12,840 --> 00:05:18,160
So if I want that to clear out the hold the reset down which is a logical one.

76
00:05:18,180 --> 00:05:22,890
So you see in code it says on the rising edge of clocks says I push this on the rising as the clock

77
00:05:22,890 --> 00:05:28,180
is going to evaluate that process and what that process does is always these values is zero.

78
00:05:28,200 --> 00:05:32,700
So the process is evaluated and your all your Ltds are clear.

79
00:05:32,760 --> 00:05:39,400
Now if you're not getting this on your board and you are lost or are struggling don't worry.

80
00:05:39,600 --> 00:05:46,470
I have a solutions manual on there that you can look at you know go through and explain how step by

81
00:05:46,470 --> 00:05:52,040
step how to get this to simulate Mollison and how to get it to run on this board.

