A 200G or 400G PCS deals one stream of symbols into two Reed-Solomon messages. Then it deals the two codewords onto 8 or 16 lanes. Write the three steps that move the symbols.
Hardware context: An Ethernet MAC and physical coding sublayer: frame builder and checker, reconciliation sublayer and block encoder. Build, check and pace Ethernet frames, and code them for the physical layer as IEEE 802.3 specifies.
Three functions move 10-bit symbols. None of them changes a bit.
split is the pre-FEC distribution (119.2.4.5). It deals the symbols of one 10,280-bit block to messages A and B, one at a time.
deal is the symbol distribution (119.2.4.7). It puts the symbols of codewords A and B on the PCS lanes.
On a lane the symbols alternate between A and B. Neighbouring lanes start with different codewords.
am_group builds the alignment marker group (119.2.4.4.1, 119.2.4.4.2). It lays the markers out so that split and deal put each one back together on its own lane.
The Reed-Solomon encoder is not part of this problem. The codewords are arguments.
The layouts of the vectors are course choices. So are the one g400 switch and the zero upper bits of a 200G group.
The lesson shows these steps as tables of results. For deal and am_group the index rule is yours to work out from them.
The lesson's readable model holds the marker values, the pad and the status field.
P11.31 has a readable model that deals one codeword to four lanes. It has no second codeword, so it is not this answer.
Signals in the Timeline
| Signal | Width | Role |
|---|---|---|
test_number | 8 | input of each check |
Full specification
function automatic [2055:0] am_group(input [1919:0] am, input [132:0] pad, input [2:0] sf, input bit g400);
function automatic [10279:0] split(input [10279:0] blk);
function automatic [10879:0] deal(input [5439:0] ca, input [5439:0] cb, input bit g400);
| Item | Rule |
|---|---|
| Symbols | ten bits. In every vector, bit 0 is sent first, and symbol s is bits 10s to 10s + 9 |
split: input | tx_scrambled_am: 1,028 symbols. Symbol 0 is sent first |
split: rule | stream symbol 2i goes to message A and stream symbol 2i + 1 to message B, both as symbol i (119.2.4.5) |
split: result | a course choice of layout: message A in bits 5139:0 and message B in bits 10279:5140. Symbol 0 of a message is the first into the encoder: m(513) |
deal: input | codewords A and B, 544 symbols each, in sending order: symbol 0 is c(543) |
deal: rule | the symbol distribution of 119.2.4.7, for 8 or 16 lanes. Along a lane the symbols alternate between A and B. Lane 0 starts with the first symbol of A. The lesson's lane table shows the first symbols of seven lanes: work out the rule from it |
deal: result | a course choice of layout: lane x is bits w·x to w·x + w - 1. Here w is 1,360 for 8 lanes and 680 for 16 |
am_group: input | marker x in bits 120x to 120x + 119. 8 markers for 200G, 16 for 400G |
am_group: rule | the mapping of 119.2.4.4.1 and 119.2.4.4.2. Its test: after split and deal, lane x starts with marker x, whole and in order. The lesson's group table shows the first rows: work out the rule from it |
| Pad and status | after the markers comes the pad: 65 bits for 200G (pad[64:0]), 133 for 400G. Then the 3-bit status field sf, its bit 0 first |
am_group: result | 1,028 bits for 200G, with bits 2055:1028 at 0 (a course choice). 2,056 bits for 400G |
Six tests use Annex 119A of IEEE Std 802.3-2022: its marker groups, its blocks and its four codewords.
Examples
Example 1
Split a Counting Stream- Input
stream symbol i holds the number i
- Output
message_a_symbol_0 = 0, message_a_symbol_1 = 2, message_b_symbol_0 = 1, xor_of_all_31_bit_slices = 0x63dc3a31, xor_of_all_19_bit_slices = 0x22caf
Message A gets the even symbols: 0, 2, 4. Message B gets the odd ones, so its first symbol is 1.
Example 2
Deal Counting Codewords to 8 Lanes- Input
A holds s mod 256, B holds 512 + s mod 256
- Output
lane_0_symbol_0 = 0, lane_0_symbol_1 = 516, lane_1_symbol_0 = 512, xor_of_all_31_bit_slices = 0x3418aba6, xor_of_all_19_bit_slices = 0x48caa
Lane 0 starts with A0 then B4: the values 0 and 516. Lane 1 starts with B0: the value 512.
Example 3
The 200G Marker Group of Annex 119A- Input
the markers of Table 119-1, the annex pad, status 000
- Output
group_symbol_0 = 666, group_symbol_1 = 666, group_symbol_8 = 402, xor_of_all_31_bit_slices = 0x661cfc83, xor_of_all_19_bit_slices = 0x43b36
Row 0 holds symbol 0 of markers 0 to 7. Row 1 starts at group symbol 8 with symbol 1 of marker 1: the pair has swapped.
Constraints and Contract
- Keep the three names and their arguments.
- A call must not depend on the calls before it.
- You may add helper functions.
- Off limits: the names
ref_p,rng,tb,root, names that begin withfx_and the modules of the bench.
Hints
Hint 1
Start with split: two lines in a loop of 514.
Hint 2
For deal, copy the first three symbols of lanes 0, 1 and 2 from the lesson. Then find what changes from one to the next.
Hint 3
am_group is the same pattern seen from the lanes.
Hint 4
Check am_group with the other two: split its result, treat the halves as codewords, deal them, and look at each lane.
What the grader checks: Six tests use Annex 119A of IEEE Std 802.3-2022. Its marker groups are built from Tables 119-1 and 119-2. Its blocks are split into the messages of its four codewords. Its codewords are dealt to the lanes. A JavaScript model gives the expected values and must reproduce the annex when the problem is built. Five more tests are fixed, and five compare random inputs with a private model, bit for bit. The vector layouts, the g400 switch and the zero upper bits are course choices. The transcoder, the scrambler, the Reed-Solomon encoder, the PRBS9 pad generator, marker lock and the receive direction are not graded.
16 checks on Icarus Verilog · server. Run the examples first, then check the full regression. Full checks use the server judge. Downloads contain your source only; samples require the simulation service. A passing result establishes the tested cases, not a proof for all possible inputs.
See all 1 steps and the final capstone