Loading tools/pdl/doc/reference.md +20 −9 Original line number Diff line number Diff line Loading @@ -67,26 +67,37 @@ packet Coffee { d: 5, } // The first two field are laid out as a single // integer of 16-bits // MSB LSB // 16 8 0 // +---------------------------------------+ // | b14 .. .. b0 |a| // +---------------------------------------+ // // The file endianness is applied to this integer // to obtain the byte layout of the packet fields. // // Little endian layout // LSB MSB // 0 1 2 3 4 5 6 7 // MSB LSB // 7 6 5 4 3 2 1 0 // +---------------------------------------+ // 0 | a | b[6:0] | // 0 | b[6:0] | a | // +---------------------------------------+ // 1 | b[14:7] | // +---------------------------------------+ // 2 | c | d | // 2 | d | c | // +---------------------------------------+ // // Big endian layout // LSB MSB // 0 1 2 3 4 5 6 7 // MSB LSB // 7 6 5 4 3 2 1 0 // +---------------------------------------+ // 0 | b[14:7] | // +---------------------------------------+ // 1 | a | b[6:0] | // 1 | b[6:0] | a | // +---------------------------------------+ // 2 | c | d | // 2 | d | c | // +---------------------------------------+ ``` Loading Loading
tools/pdl/doc/reference.md +20 −9 Original line number Diff line number Diff line Loading @@ -67,26 +67,37 @@ packet Coffee { d: 5, } // The first two field are laid out as a single // integer of 16-bits // MSB LSB // 16 8 0 // +---------------------------------------+ // | b14 .. .. b0 |a| // +---------------------------------------+ // // The file endianness is applied to this integer // to obtain the byte layout of the packet fields. // // Little endian layout // LSB MSB // 0 1 2 3 4 5 6 7 // MSB LSB // 7 6 5 4 3 2 1 0 // +---------------------------------------+ // 0 | a | b[6:0] | // 0 | b[6:0] | a | // +---------------------------------------+ // 1 | b[14:7] | // +---------------------------------------+ // 2 | c | d | // 2 | d | c | // +---------------------------------------+ // // Big endian layout // LSB MSB // 0 1 2 3 4 5 6 7 // MSB LSB // 7 6 5 4 3 2 1 0 // +---------------------------------------+ // 0 | b[14:7] | // +---------------------------------------+ // 1 | a | b[6:0] | // 1 | b[6:0] | a | // +---------------------------------------+ // 2 | c | d | // 2 | d | c | // +---------------------------------------+ ``` Loading