WEBVTT

1
00:00:00.000 --> 00:00:04.420
Software writes the same configuration twice.

2
00:00:04.420 --> 00:00:08.360
The shadow comparator sees a match and commits
it.

3
00:00:08.360 --> 00:00:14.640
If both writes carry the same wrong value, the
protocol still succeeds.

4
00:00:14.640 --> 00:00:20.060
We distinguish update consistency from permission
to choose that value.

5
00:00:21.220 --> 00:00:28.160
A control/status register, CSR, exposes
configuration or status to software.

6
00:00:28.630 --> 00:00:36.390
A shadow update first stages a value without
changing the committed value used by hardware.

7
00:00:36.390 --> 00:00:40.870
A second matching write completes the update.

8
00:00:40.870 --> 00:00:48.030
Our four-bit RW example starts at restrictive
FAIL=9.

9
00:00:48.910 --> 00:00:56.510
At edge 1, write 6 enters staged storage and
pending becomes true after the edge.

10
00:00:56.510 --> 00:01:00.070
The active CSR is still 9.

11
00:01:00.070 --> 00:01:05.350
At edge 2, another 6 compares with staged=6.

12
00:01:05.350 --> 00:01:11.830
The update commit occurs on that edge; active
storage changes afterward.

13
00:01:11.830 --> 00:01:17.890
This CSR commit means accepted configuration
update, not instruction retirement.

14
00:01:18.970 --> 00:01:23.250
If the second value is 7, the pair fails.

15
00:01:23.250 --> 00:01:27.810
The committed value remains 9 and an update error
is recorded.

16
00:01:27.810 --> 00:01:32.290
That is a detected inconsistency in the write
protocol.

17
00:01:32.290 --> 00:01:38.430
It says nothing about a persistent storage error
after a successful update; that target needs a

18
00:01:38.430 --> 00:01:39.890
separate checker and test.

19
00:01:41.390 --> 00:01:48.430
OpenTitan documents paired shadow writes,
update/storage error distinctions and reset

20
00:01:48.430 --> 00:01:49.790
concerns.

21
00:01:49.790 --> 00:01:56.470
Our compact protocol omits its complemented
storage, read-to-reset-phase behavior and

22
00:01:56.470 --> 00:01:58.690
specific bus semantics.

23
00:01:58.690 --> 00:02:04.230
It must not be presented as a replica of
prim_subreg_shadow.

24
00:02:04.650 --> 00:02:09.210
The expected configuration in this scenario is 9.

25
00:02:09.210 --> 00:02:15.630
Two writes of 6 match each other but not the
independent policy reference.

26
00:02:15.630 --> 00:02:18.450
Pair-only hardware accepts them.

27
00:02:18.450 --> 00:02:23.970
The monitor records an unauthorized update even
though no mismatch occurred.

28
00:02:23.970 --> 00:02:27.310
Repeating data is not a second policy decision.

29
00:02:28.030 --> 00:02:34.490
A policy-bound variant requires each accepted
write to equal an independently justified

30
00:02:34.490 --> 00:02:36.530
expected value.

31
00:02:36.530 --> 00:02:39.910
The lab gets that value from a trusted harness.

32
00:02:39.910 --> 00:02:46.010
A product may instead enforce privilege,
lifecycle and permitted field values.

33
00:02:46.010 --> 00:02:51.290
Whatever policy is used must protect its source
and the final write enable.

34
00:02:52.070 --> 00:02:59.010
Lock has a different job: after configuration is
frozen, no writes may enter either phase.

35
00:02:59.010 --> 00:03:03.290
Our locked control refuses both beats.

36
00:03:03.290 --> 00:03:10.090
For the separate lock fault, one transient force
clears lockSeen for the two-beat window.

37
00:03:10.090 --> 00:03:13.550
Correct matching data can then change a locked
register.

38
00:03:14.067 --> 00:03:21.947
A split reset can reset the active CSR while
preserving staged data and pending.

39
00:03:21.947 --> 00:03:29.627
After edge 1, our deliberately broken reset
target restores only value=9.

40
00:03:29.627 --> 00:03:36.387
At edge 2, the preserved pending phase treats the
next write as the second beat.

41
00:03:36.387 --> 00:03:44.567
With first=second=expected=9, it commits even
though reset canceled the first beat in the

42
00:03:44.567 --> 00:03:46.307
independent reference.

43
00:03:46.307 --> 00:03:50.287
This is a reset-epoch violation with correct
data.

44
00:03:51.527 --> 00:03:56.967
This scenario declares the reset target and
retained fields explicitly.

45
00:03:56.967 --> 00:04:01.747
It is not a single-bit flip or an OpenTitan
behavior claim.

46
00:04:01.747 --> 00:04:05.647
Reset clears the independent referencePending.

47
00:04:05.647 --> 00:04:14.027
Coherent reset also clears DUT pending: edge 2
has pending=false and no commit; afterward that

48
00:04:14.027 --> 00:04:16.767
write stages a new first beat.

49
00:04:16.767 --> 00:04:25.227
Edge 3 has pending=true and value=9, still the
reset value, not a completed update.

50
00:04:25.227 --> 00:04:31.367
A product must specify value, phase, lock and
error-history reset together.

51
00:04:32.447 --> 00:04:35.527
Interleaved writers create another protocol
concern.

52
00:04:35.527 --> 00:04:41.027
If interrupt code writes between the pair, the
second beat might belong to a different

53
00:04:41.027 --> 00:04:42.407
operation.

54
00:04:42.407 --> 00:04:49.307
Atomic software access or an explicit transaction
protocol can prevent accidental mixing; neither

55
00:04:49.307 --> 00:04:53.027
automatically blocks a faulted lock or common
wrong data.

56
00:04:53.657 --> 00:05:02.257
Choose first=6, second=7, expected=9 and pair
policy.

57
00:05:02.257 --> 00:05:08.397
Inspect edge 3: value remains 9 and bad is true.

58
00:05:08.397 --> 00:05:11.257
Change only second to 6.

59
00:05:11.257 --> 00:05:17.397
There is one commit at edge 2, bad stays false,
and reference is false.

60
00:05:17.397 --> 00:05:21.957
Export this equal-wrong pair before trying
policy-bound.

61
00:05:21.957 --> 00:05:29.537
The Node campaign enumerated all 256 four-bit
write pairs.

62
00:05:29.537 --> 00:05:31.137
Sixteen matched.

63
00:05:31.137 --> 00:05:39.597
Fifteen matching values differed from expected=9
and were unauthorized under pair-only policy.

64
00:05:39.597 --> 00:05:42.597
Policy-bound rejected those cases.

65
00:05:42.597 --> 00:05:48.597
A matching authorized pair committed once;
mismatches never changed the active value.

66
00:05:49.497 --> 00:05:54.597
Set both writes and expected to 9 before the lock
experiment.

67
00:05:54.597 --> 00:05:59.857
Set locked true and target none: no commit.

68
00:05:59.857 --> 00:06:06.817
Change only target to lock: correct data now
bypasses the trusted locked policy.

69
00:06:06.817 --> 00:06:15.117
Then clear locked and compare none, partial-reset
and coherent-reset: they commit once, commit

70
00:06:15.117 --> 00:06:21.557
outside the reset epoch, and stage a new first
beat without committing, respectively.

71
00:06:21.557 --> 00:06:24.577
Policy-bound cannot repair retained phase.

72
00:06:25.257 --> 00:06:26.917
The fragment is uncompiled.

73
00:06:27.287 --> 00:06:35.327
It lacks complete reset, bus response,
byte-enable and access-type logic.

74
00:06:35.327 --> 00:06:44.167
A product must test lock polarity, readback
behavior, storage checking, phase integrity and

75
00:06:44.167 --> 00:06:46.227
reset skew.

76
00:06:46.227 --> 00:06:51.707
The next lesson measures when an error signal
actually prevents the accepted operation.

77
00:06:52.297 --> 00:07:02.037
Four-bit RW CSR, two writes at edges 1/2, one
update acceptance at edge 2.

78
00:07:02.037 --> 00:07:08.837
Common wrong pair, lock force and committed-only
reset are separate protocol cases.

79
00:07:09.917 --> 00:07:18.817
Node ran all 256 write pairs, lock/reset
witnesses and an exactly-once authorized pair.

80
00:07:18.817 --> 00:07:23.057
No complete CSR RTL or bus test ran.

81
00:07:23.937 --> 00:07:31.157
This simplified protocol excludes complemented
storage, byte masks, read semantics, concurrent

82
00:07:31.157 --> 00:07:33.637
writers and physical reset behavior.

