WEBVTT

1
00:00:00.000 --> 00:00:03.160
The collector takes three eight bit words.

2
00:00:03.880 --> 00:00:07.540
Code zero zero sends channel A to the
output.

3
00:00:08.360 --> 00:00:10.820
Code zero one sends channel B.

4
00:00:11.580 --> 00:00:14.400
Code one zero sends channel C.

5
00:00:15.740 --> 00:00:18.720
The selector changes which word goes out.

6
00:00:19.140 --> 00:00:22.080
All three inputs stay wired in place.

7
00:00:22.660 --> 00:00:27.400
Parameters set the channel count and the
width of each word.

8
00:00:28.280 --> 00:00:32.160
Elaboration makes a twenty four bit bus
for three

9
00:00:32.160 --> 00:00:35.820
eight bit channels and a thirty two bit
bus for four.

10
00:00:36.760 --> 00:00:41.280
At run time the selector chooses among the
existing connections.

11
00:00:41.900 --> 00:00:44.740
Changing the selector cannot add a
channel.

12
00:00:45.480 --> 00:00:50.560
On the flat bus, channel zero occupies the
low eight bits.

13
00:00:51.440 --> 00:00:54.360
Channel one sits above it, then channel
two.

14
00:00:55.240 --> 00:01:00.880
Below, the same data is arranged as an
unpacked array of eight bit words.

15
00:01:01.700 --> 00:01:05.260
Choose the channel first, then choose a
bit within that channel.

16
00:01:05.650 --> 00:01:08.310
Selector zero starts at bit zero.

17
00:01:09.030 --> 00:01:11.270
Selector one starts at bit eight.

18
00:01:11.990 --> 00:01:14.250
Selector two starts at bit sixteen.

19
00:01:15.030 --> 00:01:19.030
Multiply the selector by the word width to
find the start.

20
00:01:19.810 --> 00:01:22.850
The slice always takes eight bits upward
from there.

21
00:01:23.370 --> 00:01:24.970
Only its start moves.

22
00:01:25.920 --> 00:01:29.160
Two selector bits give four encodings.

23
00:01:29.580 --> 00:01:32.820
The first three have channels; one one has
none.

24
00:01:33.640 --> 00:01:37.700
Check that the selector is below the
channel count before slicing.

25
00:01:38.800 --> 00:01:43.240
The invalid branch drives data, valid and
parity to zero.

26
00:01:43.900 --> 00:01:47.520
The receiver uses valid to tell whether
the data can be used.

27
00:01:48.350 --> 00:01:53.310
Once a word is selected, XOR across all
its bits.

28
00:01:54.010 --> 00:01:56.250
An even count of ones gives zero.

29
00:01:57.130 --> 00:02:01.810
In the final vector, channel C gains one
bit set to one,

30
00:02:02.210 --> 00:02:05.470
so its count becomes odd and parity
becomes one.

31
00:02:07.090 --> 00:02:09.290
The function reuses the description.

32
00:02:09.290 --> 00:02:14.190
Inspect the synthesized circuit to see
whether calls share logic.

33
00:02:14.690 --> 00:02:18.030
Test one, three and four channels.

34
00:02:18.790 --> 00:02:22.850
With one channel, the selector port still
has one bit.

35
00:02:23.570 --> 00:02:26.630
With three, one one reports invalid.

36
00:02:27.670 --> 00:02:31.190
With four, the same code reads the last
word.

37
00:02:32.030 --> 00:02:36.010
Run these boundary cases at both word
widths to check

38
00:02:36.010 --> 00:02:39.710
that the interface still works after
elaboration.

