WEBVTT

1
00:00:00.000 --> 00:00:02.520
Join two registers in a chain.

2
00:00:03.440 --> 00:00:06.360
Stage one receives the external input.

3
00:00:07.200 --> 00:00:10.860
Stage two receives the output of stage
one.

4
00:00:11.580 --> 00:00:13.040
Both use the same clock.

5
00:00:13.980 --> 00:00:18.660
At each edge, identify the value on each
input first,

6
00:00:19.380 --> 00:00:24.340
then work out what each output will hold
after the updates.

7
00:00:24.800 --> 00:00:28.960
At the twenty five nanosecond edge, stage
one

8
00:00:28.960 --> 00:00:33.500
holds hex one two and stage two holds
zero.

9
00:00:34.480 --> 00:00:37.560
Stage one reads the input, three four.

10
00:00:38.200 --> 00:00:41.340
Stage two reads the old one two.

11
00:00:42.280 --> 00:00:45.580
After the scheduled updates, stage one
holds

12
00:00:45.580 --> 00:00:49.160
three four and stage two holds one two.

13
00:00:49.620 --> 00:00:56.000
Drive the three hexadecimal samples: one
two, three four, and five six.

14
00:00:56.980 --> 00:01:03.360
One two first enters stage one and reaches
stage two on the next rising edge.

15
00:01:04.380 --> 00:01:07.960
Three four enters stage one at that same
edge.

16
00:01:08.800 --> 00:01:14.400
For every row, match stage two to stage
one after the previous edge.

17
00:01:14.850 --> 00:01:19.050
The right side deliberately uses blocking
assignments in one block.

18
00:01:19.910 --> 00:01:24.750
The first statement immediately changes
the stage one variable to three four.

19
00:01:25.510 --> 00:01:27.810
The next statement reads that new value.

20
00:01:28.850 --> 00:01:31.490
On the left, the first write is queued,

21
00:01:31.850 --> 00:01:34.750
so the next statement still reads the
earlier one two.

22
00:01:35.780 --> 00:01:40.620
In the combinational block, compute the
intermediate value first.

23
00:01:41.640 --> 00:01:45.040
The next statement uses that freshly
calculated result.

24
00:01:46.020 --> 00:01:50.620
In the clocked block, both stages read at
the same edge and update later.

25
00:01:51.700 --> 00:01:55.380
The intended dependency tells you which
assignment semantics to use.

26
00:01:56.040 --> 00:01:59.100
The clock period is ten nanoseconds.

27
00:01:59.800 --> 00:02:05.760
Drive at the falling edge at twenty and
sample at the rising edge at twenty five.

28
00:02:07.180 --> 00:02:11.020
Wait one nanosecond in the testbench
before checking the outputs.

29
00:02:11.840 --> 00:02:16.260
In the design, both stages sample on the
clock edge and schedule their writes.

30
00:02:16.720 --> 00:02:20.320
If a downstream register reads stage two
at

31
00:02:20.320 --> 00:02:23.840
the twenty five nanosecond edge, it sees
zero.

32
00:02:24.900 --> 00:02:28.300
After the update, stage two holds one two.

33
00:02:29.420 --> 00:02:32.640
Use the edge snapshot to answer what was
transferred.

34
00:02:33.300 --> 00:02:37.280
Use the later observation to check what
the two registers now contain.

35
00:02:37.775 --> 00:02:43.075
Add one shared enable and carry a valid
bit with each word.

36
00:02:43.855 --> 00:02:45.595
A pause holds both pairs.

37
00:02:46.755 --> 00:02:50.855
When the chain resumes, stage two takes
the pair from stage one.

38
00:02:52.055 --> 00:02:54.255
Elaboration sets the instance count.

39
00:02:54.955 --> 00:02:58.835
Follow the enabled clock edges to find
when a word arrives.

