Thread Links Date Links
Thread Prev Thread Next Thread Index Date Prev Date Next Date Index

Re: 64B/66B Control Codes Mapping & Bit Order





Thomas,

The table in Figure 49-5 is a bit misleading but let me
try to answer your question. You want to send a word that
encodes a "Control Block Format" of C0,C1,C2,C3,C4,C5,C6,C7
where all the Cs have the RS value for RSVD5. In my
opinion, the Cs in this first column should be Zs to
match the proposal. They certainly are not a 1:1 mapping
to the Cs in the "Block Payload" column. I've already made
this comment to the clause editor. 

Anyway, lets take a look at the 66-bit frame. In this
table, the "Sync" column shows bits[1:0] of this frame
where bit[0] is on the left and bit[1] is on the right.
For the "Block Payload" column, the left most bit is
bit[2] of the frame and the right most bit is bit[65].

If we look at the the first "Control Block Format" row
in the table (the one that you are asking about), the
Type Field sits in bits[9:2] of the frame. For this
row, the Type Field has a hexadecimal value of 0x1e.
In binary, this looks like:
[9] = 0
[8] = 0
[7] = 0
[6] = 1
[5] = 1
[4] = 1
[3] = 1
[2] = 0

If we look further, the C0 in this row sits in bits[16:10]
and, because of the RSVD5 encoding, contains a hexadecimal
value of 0x78. In binary, this looks like:
[16] = 1
[15] = 1
[14] = 1
[13] = 1
[12] = 0
[11] = 0
[10] = 0

I'll let you continue down this path I've started you on.
When the bits are all put together, starting with bit[0]
on the left as shown in Figure 49-3 under the heading
Transmit Block (except that these bits[65:2] have not yet
been scrambled) you'd see the following:

SYNC TYPE     C0      C1      C2      C3      C4      C5      C6      C7
[0]                                                                   
[65]
10_01111000_0001111_0001111_0001111_0001111_0001111_0001111_0001111_0001111

I guess this means that your interpretation #2 is correct
where the bits are transmitted left most bit first.

Hope this helps. Although it might be too late to make
a dramatic change to this table at this point (simply
because people are beginning to be familiar with it),
I would be eager to recommend to the clause editor that
this table be redrawn where the first column changes the
order of the bytes from D0...D7 to D7...D0. Then, move
the SYNC column to the far left and reverse the order of
those bits (DATA = 10, CONTROL = 01). The Block Payload
column could then be re-ordered to show D7...D0 for the
Data Block Format and C7...C0, Type Field for Control
Block Format. This way, the 66-bit field is laid out
in front of you with [65] (the msb) on the left and [0]
(the lsb) on the right, the way many of us are most
familiar with looking at numbers or fields. Also, the
hexadecimal equivalents of fields, which are written with
msn (most significant nibble) on the left and lsn on
the right, could be simply expanded into their binary
equivalents without having to perform a mental bit swap
to match the table.

Shutting up...

Ben

Thomas Tang wrote:
> 
> Hi,
> 
> We have a question regarding the bit order when we map the control codes
> into the 64B/66B frame.
> For example, when we have 0x1E in the type field for C0,C1,C2,C3,C4,C5,C6,C7
> pattern and
> we want to send 0x78 (reserved 5) for C0..C7, we have two interpretions on
> how we map these
> codes and the bit order of the bits shifting out.
> 
> Interpretion 1 : C0 to C7 all have a value of "1111000" which will form a
> pattern of
>                  "00011110_1111000_1111000_11110000.....". After swapping
> lsb and msb of
>                  each octet, the pattern shifting out will be
> "01111000_10001111_11000111..".
> 
> Interpretion 2 : C0 to C7 all have a value of reversed 0x78 of "0001111",
>                  the pattern shifting out will be
> "01111000_00011110_00111100..".
> 
> Which one is the correct? Thanks.
> 
> Thomas Tang
> Newport Communication.


-- 
-----------------------------------------
Benjamin Brown
AMCC
2 Commerce Park West
Suite 104 
Bedford NH 03110
603-641-9837 - Work
603-491-0296 - Cell
603-798-4115 - Home
bbrown@xxxxxxxx
-----------------------------------------