a) Master state machine (Figure 12-3)
In the SAVE_CONFIRM_INFO state:
(i) In the comment (Note) that says that upstreamTxTime is in units of 2^(-16) seconds, it should be 2^(-16) ns
(ii) In the expression for residenceTime, the factor of 10^9 that multiplies paramsFromConfirm.T1 should actually be 10 (because paramsFromConfirm.T1 is in units of 10 ns, not in units of seconds.
b) Slave state machine (Figure 12-4)
In the CONSTRUCT_MD_SYNC_RECEIVE_STRUCTURE state:
(i) The expression for neighborPropDelay currently reads:
neighborPropDelay =
(indParams.T4 - indParams.T1) -
neighborRateRatio * (indParams.T3 - indParams.T2)) / 2.0;
This is missing an open parenthesis and a factor of 10 to convert from units of 10 ns to units of ns. The correct expression is:
neighborPropDelay =
( ( (indParams.T4 - indParams.T1) -
neighborRateRatio * (indParams.T3 - indParams.T2)) / 2.0) * 10;
(ii) The expression for MDSyncReceive.VendorSpecific.upstreamTxTime currently reads:
MDSyncReceive.VendorSpecific.upstreamTxTime = indParams.T2 -
neighborPropDelay/neighborRateRatio;
It is missing factors of 2^16 and 10 (to convert to units of 2^(-16) ns). The correct expression is:
MDSyncReceive.VendorSpecific.upstreamTxTime = indParams.T2* (2^16) *(10) -
neighborPropDelay*(2^16)/neighborRateRatio;
(iii) The statement: previousIndParams = indParams should be moved outside the if block (i.e., to just after the close brace).