[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Guidelines Section 4.6.1.6 (BITS construct)



>>>>> C M Heard writes:

Mike> Thus, in rev 1 one might have this:

Mike>    SYNTAX BITS { los(0), lof(1), ais(2), aisCI(3), rai(4),
Mike> raiCI(5) }

Mike> while rev 2 might look like this:

Mike>    SYNTAX BITS { los(0), lof(1), ais(2), aisCI(3), rai(4),
Mike> raiCI(5), unused1(6), unused2(7), muxFault(8) }

Mike> i.e. names are given to the unused bit positions.

Mike> If this is not what it's supposed to mean, then the restriction
Mike> in the 1st paragraph is inoperative as far as a MIB compiler is
Mike> concerned, because it can't tell if it's dealing with a new
Mike> definition or a revised one.  And such a distinction is really
Mike> arbitrary anyway.  So in that case we ought to consider the rule
Mike> in the first paragraph to be another CLR, stop enforcing it in
Mike> MIB reviews, and fix MIB compilers to stop complaining about it.
Mike> I never really understood the reason for this rule anyway.

The only way to allocate new bits safely is on new byte boundaries.
This was brought up during the SMIv2 to full standard revision. Since
the previous SMIv2 language said bits must be contiguous (one of the
few cases where I indeed agree this is a CLR) and some people found
this particular rule important (or too late to change it), we ended up
saying bits have to be contiguous and at the same time telling people
that they won't be continuous if you update a MIB module correctly.

Sure, naming the unused bits as you have done above is a good way out
of this strange dilemma and I like this very much - perhaps 'dontuse'
is even better than 'unused'.

I agree that compilers should not complain about non-contiguous named
bits and I hope smilint does not...

/js

-- 
Juergen Schoenwaelder    <http://www.informatik.uni-osnabrueck.de/schoenw/>